@adaptabletools/adaptable-cjs 17.0.0-canary.4 → 18.0.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +62 -14
- package/base.css.map +1 -1
- package/index.css +267 -165
- package/index.css.map +1 -1
- package/package.json +5 -4
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +7 -7
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +9 -9
- package/src/AdaptableOptions/CommentsOptions.d.ts +28 -0
- package/src/AdaptableOptions/EditOptions.d.ts +6 -6
- package/src/AdaptableOptions/GridFilterOptions.d.ts +13 -8
- package/src/AdaptableOptions/GroupingOptions.d.ts +9 -9
- package/src/AdaptableOptions/InteropioPluginOptions.d.ts +10 -0
- package/src/AdaptableOptions/MenuOptions.d.ts +18 -4
- package/src/AdaptableOptions/MenuOptions.js +14 -6
- package/src/AdaptableOptions/NotesOptions.d.ts +2 -9
- package/src/Api/AdaptableApi.d.ts +6 -1
- package/src/Api/CommentApi.d.ts +58 -0
- package/src/Api/EventApi.d.ts +48 -12
- package/src/Api/Events/CalculatedColumnChanged.d.ts +19 -0
- package/src/Api/Events/CellSelectionChanged.d.ts +11 -0
- package/src/Api/Events/CommentsChangedInfo.d.ts +5 -0
- package/src/Api/Events/LiveDataChanged.d.ts +3 -3
- package/src/Api/Events/RowSelectionChanged.d.ts +11 -0
- package/src/Api/GridApi.d.ts +0 -6
- package/src/Api/GridFilterApi.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -6
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +15 -0
- package/src/Api/Implementation/CommentsApiImpl.js +46 -0
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExpressionApiImpl.js +3 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +0 -1
- package/src/Api/Implementation/GridApiImpl.js +0 -4
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +1 -1
- package/src/Api/Implementation/NotesApiImpl.d.ts +3 -7
- package/src/Api/Implementation/NotesApiImpl.js +1 -15
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
- package/src/Api/Implementation/OptionsApiImpl.js +3 -0
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -6
- package/src/Api/Implementation/PluginsApiImpl.js +3 -15
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -12
- package/src/Api/Implementation/ScheduleApiImpl.js +0 -36
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +3 -0
- package/src/Api/Internal/ActionRowInternalApi.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +3 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +16 -0
- package/src/Api/Internal/DashboardInternalApi.d.ts +1 -0
- package/src/Api/Internal/DashboardInternalApi.js +5 -0
- package/src/Api/Internal/DataImportInternalApi.js +2 -0
- package/src/Api/Internal/DataSetInternalApi.js +2 -1
- package/src/Api/Internal/GridInternalApi.d.ts +3 -1
- package/src/Api/Internal/GridInternalApi.js +32 -9
- package/src/Api/Internal/LayoutInternalApi.d.ts +2 -2
- package/src/Api/Internal/LayoutInternalApi.js +11 -11
- package/src/Api/InteropioPluginApi.d.ts +10 -0
- package/src/Api/{NotesAPi.d.ts → NotesApi.d.ts} +19 -21
- package/src/Api/OptionsApi.d.ts +5 -0
- package/src/Api/PluginsApi.d.ts +3 -13
- package/src/Api/ScheduleApi.d.ts +1 -48
- package/src/Api/ThemeApi.d.ts +5 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +4 -2
- package/src/PredefinedConfig/CellAddress.d.ts +13 -0
- package/src/PredefinedConfig/CellAddress.js +5 -0
- package/src/PredefinedConfig/CommentState.d.ts +48 -0
- package/src/PredefinedConfig/CommentState.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +2 -1
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
- package/src/PredefinedConfig/Common/Enums.js +0 -1
- package/src/PredefinedConfig/Common/Schedule.d.ts +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +0 -2
- package/src/PredefinedConfig/NotesState.d.ts +0 -13
- package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -0
- package/src/PredefinedConfig/ScheduleState.d.ts +0 -5
- package/src/PredefinedConfig/SystemState.d.ts +5 -6
- package/src/PredefinedConfig/ThemeState.d.ts +1 -1
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +79 -0
- package/src/Redux/ActionsReducers/CommentsRedux.js +189 -0
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/NotesRedux.js +4 -5
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +0 -48
- package/src/Redux/ActionsReducers/PluginsRedux.js +1 -49
- package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +16 -0
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +47 -1
- package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +0 -53
- package/src/Redux/ActionsReducers/ScheduleRedux.js +2 -90
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -12
- package/src/Redux/ActionsReducers/SystemRedux.js +55 -23
- package/src/Redux/Store/AdaptableStore.d.ts +2 -2
- package/src/Redux/Store/AdaptableStore.js +107 -46
- package/src/Strategy/CommentsModule.d.ts +16 -0
- package/src/Strategy/CommentsModule.js +82 -0
- package/src/Strategy/LayoutModule.d.ts +12 -4
- package/src/Strategy/LayoutModule.js +19 -14
- package/src/Strategy/NotesModule.d.ts +0 -13
- package/src/Strategy/NotesModule.js +9 -88
- package/src/Strategy/PlusMinusModule.js +2 -0
- package/src/Strategy/ScheduleModule.js +0 -23
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +2 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +14 -5
- package/src/Strategy/Utilities/getExpressionViewItems.js +8 -2
- package/src/Utilities/Constants/ConfigConstants.d.ts +1 -0
- package/src/Utilities/Constants/ConfigConstants.js +2 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +8 -3
- package/src/Utilities/Constants/ModuleConstants.d.ts +3 -3
- package/src/Utilities/Constants/ModuleConstants.js +4 -4
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -3
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +7 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +6 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +18 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +12 -12
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +8 -1
- package/src/Utilities/Helpers/PreviewHelper.js +5 -2
- package/src/Utilities/ObjectFactory.d.ts +19 -22
- package/src/Utilities/ObjectFactory.js +51 -60
- package/src/Utilities/Services/CellPopupService.d.ts +23 -0
- package/src/Utilities/Services/CellPopupService.js +138 -0
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
- package/src/Utilities/Services/Interface/IThemeService.d.ts +8 -0
- package/src/Utilities/Services/ModuleService.js +1 -3
- package/src/Utilities/Services/ReportService.d.ts +1 -1
- package/src/Utilities/Services/ThemeService.d.ts +3 -0
- package/src/Utilities/Services/ThemeService.js +33 -1
- package/src/Utilities/Services/ValidationService.js +11 -11
- package/src/View/AdaptableView.js +3 -3
- package/src/View/AdaptableViewFactory.js +4 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
- package/src/View/Charting/useChartingElements.js +8 -3
- package/src/View/Comments/CommentsEditor.d.ts +7 -0
- package/src/View/Comments/CommentsEditor.js +100 -0
- package/src/View/Comments/CommentsPopup.d.ts +2 -0
- package/src/View/Comments/CommentsPopup.js +87 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -1
- package/src/View/Components/CellPopup/index.js +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +8 -2
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -3
- package/src/View/Components/FilterForm/QuickFilterForm.js +5 -4
- package/src/View/Components/FilterForm/QuickFilterValues.d.ts +2 -2
- package/src/View/Components/FilterForm/QuickFilterValues.js +4 -3
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.d.ts +5 -0
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +67 -0
- package/src/View/Components/Popups/GridCellPopup/index.d.ts +1 -0
- package/src/View/Components/Popups/GridCellPopup/index.js +5 -0
- package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
- package/src/View/Components/Selectors/ColumnSelector.js +2 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +5 -4
- package/src/View/Components/Selectors/PermittedValuesSelector.js +25 -3
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
- package/src/View/Dashboard/ModuleToolbarWrapper.js +1 -1
- package/src/View/Dashboard/PinnedDashboard.js +2 -1
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -1
- package/src/View/GridFilter/GridFilterExpressionEditor.js +1 -1
- package/src/View/GridFilter/GridFilterPopup.js +10 -8
- package/src/View/GridFilter/GridFilterViewPanel.js +51 -14
- package/src/View/GridFilter/NamedQuerySelector.js +1 -1
- package/src/View/GridFilter/useGridFilterExpressionEditor.d.ts +3 -0
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +17 -6
- package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +5 -23
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +3 -2
- package/src/View/Layout/Wizard/getGridFilterPreview.d.ts +6 -0
- package/src/View/Layout/Wizard/getGridFilterPreview.js +16 -0
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +4 -4
- package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Notes/NoteEditor.d.ts +8 -0
- package/src/View/Notes/NoteEditor.js +33 -0
- package/src/View/Notes/NotesPopup.d.ts +2 -2
- package/src/View/Notes/NotesPopup.js +78 -55
- package/src/View/PlusMinus/MovePlusMinus.d.ts +7 -0
- package/src/View/PlusMinus/MovePlusMinus.js +27 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +0 -9
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +0 -4
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +2 -8
- package/src/View/Schedule/Wizard/ScheduleWizard.js +0 -8
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +3 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -2
- package/src/agGrid/Adaptable.d.ts +7 -0
- package/src/agGrid/Adaptable.js +49 -35
- package/src/agGrid/BadgeRenderer.js +9 -5
- package/src/agGrid/agGridHelper.d.ts +2 -1
- package/src/agGrid/agGridHelper.js +15 -3
- package/src/agGrid/agGridMenuHelper.d.ts +2 -0
- package/src/agGrid/agGridMenuHelper.js +73 -25
- package/src/components/Datepicker/index.js +4 -4
- package/src/components/ExpressionEditor/ExpressionPreview.d.ts +7 -0
- package/src/components/ExpressionEditor/ExpressionPreview.js +25 -0
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +2 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +6 -0
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +40 -11
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +14 -2
- package/src/components/ExpressionEditor/QueryBuilder/booleanExpressions.js +1 -0
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -1
- package/src/components/ExpressionEditor/index.js +4 -7
- package/src/components/InputGroup/InputGroup.d.ts +7 -0
- package/src/components/InputGroup/InputGroup.js +12 -0
- package/src/components/InputGroup/index.d.ts +1 -0
- package/src/components/InputGroup/index.js +4 -0
- package/src/components/OverlayTrigger/index.js +7 -2
- package/src/components/Select/Select.d.ts +1 -2
- package/src/components/Select/Select.js +63 -23
- package/src/components/Textarea/index.d.ts +9 -0
- package/src/components/Textarea/index.js +50 -2
- package/src/components/Toastify/index.d.ts +2 -2
- package/src/components/Toastify/index.js +1 -1
- package/src/components/icons/comments.d.ts +3 -0
- package/src/components/icons/comments.js +7 -0
- package/src/components/icons/index.js +3 -1
- package/src/env.d.ts +3 -1
- package/src/env.js +3 -1
- package/src/metamodel/adaptable.metamodel.d.ts +72 -158
- package/src/metamodel/adaptable.metamodel.js +138 -260
- package/src/parser/src/parser.d.ts +2 -0
- package/src/parser/src/parser.js +1880 -705
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +5 -2
- package/src/parser/src/predicate/types.d.ts +1 -1
- package/src/parser/src/types.d.ts +1 -1
- package/src/renderReactRoot.js +15 -0
- package/src/themes/index.js +4 -0
- package/src/types.d.ts +10 -13
- package/themes/dark.css +3 -3
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +0 -35
- package/src/AdaptableOptions/Glue42PluginOptions.d.ts +0 -25
- package/src/AdaptableOptions/Glue42WebPluginOptions.d.ts +0 -10
- package/src/Api/Events/SelectionChanged.d.ts +0 -16
- package/src/Api/FinsembleApi.d.ts +0 -10
- package/src/Api/Glue42Api.d.ts +0 -75
- package/src/Api/Glue42WebApi.d.ts +0 -10
- package/src/PredefinedConfig/Glue42State.d.ts +0 -46
- package/src/View/Notes/NotesListing.d.ts +0 -2
- package/src/View/Notes/NotesListing.js +0 -88
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.d.ts +0 -9
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +0 -25
- package/src/bundle-dependencies/bundles/react-toastify/components/CloseButton.d.ts +0 -9
- package/src/bundle-dependencies/bundles/react-toastify/components/Icons.d.ts +0 -24
- package/src/bundle-dependencies/bundles/react-toastify/components/ProgressBar.d.ts +0 -59
- package/src/bundle-dependencies/bundles/react-toastify/components/Toast.d.ts +0 -3
- package/src/bundle-dependencies/bundles/react-toastify/components/ToastContainer.d.ts +0 -3
- package/src/bundle-dependencies/bundles/react-toastify/components/Transitions.d.ts +0 -6
- package/src/bundle-dependencies/bundles/react-toastify/components/index.d.ts +0 -6
- package/src/bundle-dependencies/bundles/react-toastify/core/eventManager.d.ts +0 -39
- package/src/bundle-dependencies/bundles/react-toastify/core/index.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/core/toast.d.ts +0 -41
- package/src/bundle-dependencies/bundles/react-toastify/hooks/index.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToast.d.ts +0 -10
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToastContainer.d.ts +0 -23
- package/src/bundle-dependencies/bundles/react-toastify/index.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/index.js +0 -1
- package/src/bundle-dependencies/bundles/react-toastify/inject-style.d.ts +0 -8
- package/src/bundle-dependencies/bundles/react-toastify/types/index.d.ts +0 -269
- package/src/bundle-dependencies/bundles/react-toastify/utils/collapseToast.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/utils/constant.d.ts +0 -23
- package/src/bundle-dependencies/bundles/react-toastify/utils/cssTransition.d.ts +0 -43
- package/src/bundle-dependencies/bundles/react-toastify/utils/index.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/utils/mapper.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/utils/propValidator.d.ts +0 -9
- /package/src/AdaptableOptions/{FinsemblePluginOptions.js → CommentsOptions.js} +0 -0
- /package/src/AdaptableOptions/{Glue42PluginOptions.js → InteropioPluginOptions.js} +0 -0
- /package/src/{AdaptableOptions/Glue42WebPluginOptions.js → Api/CommentApi.js} +0 -0
- /package/src/Api/Events/{SelectionChanged.js → CalculatedColumnChanged.js} +0 -0
- /package/src/Api/{FinsembleApi.js → Events/CellSelectionChanged.js} +0 -0
- /package/src/Api/{Glue42Api.js → Events/CommentsChangedInfo.js} +0 -0
- /package/src/Api/{Glue42WebApi.js → Events/RowSelectionChanged.js} +0 -0
- /package/src/Api/Internal/{ExpressionnternalApi.d.ts → ExpressionInternalApi.d.ts} +0 -0
- /package/src/Api/Internal/{ExpressionnternalApi.js → ExpressionInternalApi.js} +0 -0
- /package/src/Api/{NotesAPi.js → InteropioPluginApi.js} +0 -0
- /package/src/{PredefinedConfig/Glue42State.js → Api/NotesApi.js} +0 -0
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import { AdaptableTheme } from '../../../types';
|
|
1
2
|
import { IAdaptableService } from './IAdaptableService';
|
|
2
3
|
export interface IThemeService extends IAdaptableService {
|
|
4
|
+
getDOMPrefferedColorScheme(): 'dark' | 'light';
|
|
5
|
+
/**
|
|
6
|
+
* Maps the theme to the correct theme object or string
|
|
7
|
+
* This is used to apply the correct theme when the theme is OS
|
|
8
|
+
* @param theme
|
|
9
|
+
*/
|
|
10
|
+
mapOsTheme(theme: AdaptableTheme | string): AdaptableTheme | string;
|
|
3
11
|
}
|
|
@@ -106,7 +106,7 @@ class ModuleService {
|
|
|
106
106
|
case 'ColumnFilter':
|
|
107
107
|
return learnUrl + 'handbook-column-filter';
|
|
108
108
|
case 'GridFilter':
|
|
109
|
-
return learnUrl + 'handbook-
|
|
109
|
+
return learnUrl + 'handbook-grid-filter';
|
|
110
110
|
case 'FlashingCell':
|
|
111
111
|
return learnUrl + 'handbook-flashing-cell';
|
|
112
112
|
case 'FormatColumn':
|
|
@@ -141,8 +141,6 @@ class ModuleService {
|
|
|
141
141
|
return learnUrl + 'handbook-theming';
|
|
142
142
|
case 'ToolPanel':
|
|
143
143
|
return learnUrl + 'ui-tool-panel';
|
|
144
|
-
case 'Glue42':
|
|
145
|
-
return learnUrl + 'integrations-glue42';
|
|
146
144
|
case 'IPushPull':
|
|
147
145
|
return learnUrl + 'integrations-ipushpull';
|
|
148
146
|
case 'OpenFin':
|
|
@@ -29,7 +29,7 @@ export declare class ReportService implements IReportService {
|
|
|
29
29
|
getReportDataAsArray(report: Report, includePrimaryKey?: boolean): any[][];
|
|
30
30
|
convertReportDataToArray(reportData: ReportData): any[][];
|
|
31
31
|
getRowObjectForColumnIds(rowNode: IRowNode, columnIds: string[]): Record<string, any>;
|
|
32
|
-
PublishLiveLiveDataChangedEvent(reportDestination: 'ipushpull'
|
|
32
|
+
PublishLiveLiveDataChangedEvent(reportDestination: 'ipushpull', liveDataTrigger: 'Connected' | 'Disconnected' | 'LiveDataStarted' | 'LiveDataStopped' | 'LiveDataUpdated', liveReport?: any): void;
|
|
33
33
|
getCellExportValueFromRowNode(rowNode: IRowNode, columnId: string): any;
|
|
34
34
|
getCellExportValueFromRawValue(rowNode: IRowNode, cellRawValue: any, columnId: string): any;
|
|
35
35
|
getReportFileName(reportName: string, destination: SystemExportDestination | CustomDestination): string;
|
|
@@ -10,4 +10,7 @@ export declare class ThemeService implements IThemeService {
|
|
|
10
10
|
applyNewThemeVariables(theme: AdaptableTheme): void;
|
|
11
11
|
destroy(): void;
|
|
12
12
|
showMissingThemeFiles(theme: AdaptableTheme): void;
|
|
13
|
+
getDOMPrefferedColorScheme(): 'dark' | 'light';
|
|
14
|
+
mapOsTheme(theme: AdaptableTheme | string): AdaptableTheme;
|
|
15
|
+
attachPrefferedColorSchemeListener(): () => void;
|
|
13
16
|
}
|
|
@@ -6,7 +6,8 @@ class ThemeService {
|
|
|
6
6
|
var _a;
|
|
7
7
|
this.unsubscribe = () => { };
|
|
8
8
|
this.onThemeChanged = () => {
|
|
9
|
-
|
|
9
|
+
let currentTheme = this.api.themeApi.getCurrentThemeObject();
|
|
10
|
+
currentTheme = this.mapOsTheme(currentTheme);
|
|
10
11
|
this.applyNewThemeVariables(currentTheme);
|
|
11
12
|
// this needs to be called after variables are set
|
|
12
13
|
// as it may show the warning for a custom/runtime theme
|
|
@@ -26,9 +27,11 @@ class ThemeService {
|
|
|
26
27
|
subscribe() {
|
|
27
28
|
const themeChangedUnsubscribe = this.api.eventApi.on('ThemeChanged', this.onThemeChanged);
|
|
28
29
|
const themeEditedUnsubscribe = this.api.eventApi.on('ThemeEdited', this.onThemeChanged);
|
|
30
|
+
const prefferedColorSchemeUnsubscribe = this.attachPrefferedColorSchemeListener();
|
|
29
31
|
this.unsubscribe = () => {
|
|
30
32
|
themeChangedUnsubscribe();
|
|
31
33
|
themeEditedUnsubscribe();
|
|
34
|
+
prefferedColorSchemeUnsubscribe();
|
|
32
35
|
};
|
|
33
36
|
}
|
|
34
37
|
applyNewThemeVariables(theme) {
|
|
@@ -82,5 +85,34 @@ If it's a default theme, try
|
|
|
82
85
|
import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
83
86
|
}
|
|
84
87
|
}
|
|
88
|
+
// prefers-color-scheme
|
|
89
|
+
getDOMPrefferedColorScheme() {
|
|
90
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
91
|
+
}
|
|
92
|
+
mapOsTheme(theme) {
|
|
93
|
+
theme = typeof theme === 'string' ? this.api.themeApi.getThemeByName(theme) : theme;
|
|
94
|
+
if ((typeof theme === 'string' && theme === 'os') ||
|
|
95
|
+
(typeof theme === 'object' && theme.Name === 'os')) {
|
|
96
|
+
return this.api.themeApi.getThemeByName(this.getDOMPrefferedColorScheme());
|
|
97
|
+
}
|
|
98
|
+
return theme;
|
|
99
|
+
}
|
|
100
|
+
attachPrefferedColorSchemeListener() {
|
|
101
|
+
const handlePrefferedColorSchemeChange = () => {
|
|
102
|
+
// we need to reapply the theme
|
|
103
|
+
const currentTheme = this.api.themeApi.getCurrentThemeObject();
|
|
104
|
+
if (currentTheme.Name === 'os') {
|
|
105
|
+
this.api.themeApi.applyCurrentTheme();
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
window
|
|
109
|
+
.matchMedia('(prefers-color-scheme: dark)')
|
|
110
|
+
.addEventListener('change', handlePrefferedColorSchemeChange);
|
|
111
|
+
return () => {
|
|
112
|
+
window
|
|
113
|
+
.matchMedia('(prefers-color-scheme: dark)')
|
|
114
|
+
.removeEventListener('change', handlePrefferedColorSchemeChange);
|
|
115
|
+
};
|
|
116
|
+
}
|
|
85
117
|
}
|
|
86
118
|
exports.ThemeService = ThemeService;
|
|
@@ -99,29 +99,29 @@ class ValidationService {
|
|
|
99
99
|
.validateOnServer(serverValidationContext)
|
|
100
100
|
.then((validationResult) => {
|
|
101
101
|
var _a, _b;
|
|
102
|
-
if (validationResult.
|
|
103
|
-
validationResult.
|
|
102
|
+
if (validationResult.newCellValue === undefined) {
|
|
103
|
+
validationResult.newCellValue = cellDataChangedInfo.newValue;
|
|
104
104
|
}
|
|
105
105
|
// If they have changed the return value then we should update the grid, log the function change
|
|
106
106
|
// otherwise the value will persist
|
|
107
|
-
if (validationResult.
|
|
108
|
-
cellDataChangedInfo.newValue = validationResult.
|
|
107
|
+
if (validationResult.newCellValue !== cellDataChangedInfo.newValue) {
|
|
108
|
+
cellDataChangedInfo.newValue = validationResult.newCellValue;
|
|
109
109
|
// this.adaptable.setValue(cellDataChangedInfo, false);
|
|
110
110
|
const row = (_a = cellDataChangedInfo.rowNode) === null || _a === void 0 ? void 0 : _a.data;
|
|
111
111
|
if (!row) {
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
-
row[(_b = this.adaptableApi.columnApi.internalApi.getAgGridColumnFieldForAdaptableColumn(cellDataChangedInfo.column.columnId)) !== null && _b !== void 0 ? _b : cellDataChangedInfo.column.columnId] = validationResult.
|
|
114
|
+
row[(_b = this.adaptableApi.columnApi.internalApi.getAgGridColumnFieldForAdaptableColumn(cellDataChangedInfo.column.columnId)) !== null && _b !== void 0 ? _b : cellDataChangedInfo.column.columnId] = validationResult.newCellValue;
|
|
115
115
|
this.adaptableApi.gridApi.updateGridData([row]);
|
|
116
|
-
if (StringExtensions_1.default.IsNotNullOrEmpty(validationResult.
|
|
116
|
+
if (StringExtensions_1.default.IsNotNullOrEmpty(validationResult.validationMessage) &&
|
|
117
117
|
this.adaptableApi.optionsApi.getEditOptions().displayServerValidationMessages) {
|
|
118
|
-
const validationHeader = validationResult.
|
|
119
|
-
? validationResult.
|
|
118
|
+
const validationHeader = validationResult.validationHeader
|
|
119
|
+
? validationResult.validationHeader
|
|
120
120
|
: GeneralConstants_1.SERVER_VALIDATION_HEADER;
|
|
121
|
-
const messageType = validationResult.
|
|
122
|
-
? validationResult.
|
|
121
|
+
const messageType = validationResult.messageType
|
|
122
|
+
? validationResult.messageType
|
|
123
123
|
: GeneralConstants_1.SERVER_VALIDATION_MESSAGE_TYPE;
|
|
124
|
-
this.adaptableApi.alertApi.showAlert(validationHeader, validationResult.
|
|
124
|
+
this.adaptableApi.alertApi.showAlert(validationHeader, validationResult.validationMessage, messageType);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
config.onServerValidationCompleted();
|
|
@@ -12,10 +12,10 @@ const AdaptablePopup_1 = require("./Components/Popups/AdaptablePopup");
|
|
|
12
12
|
const AdaptablePopupConfirmation_1 = require("./Components/Popups/AdaptablePopupConfirmation");
|
|
13
13
|
const AdaptablePopupPrompt_1 = require("./Components/Popups/AdaptablePopupPrompt");
|
|
14
14
|
const FormPopups_1 = require("./Components/Popups/FormPopups/FormPopups");
|
|
15
|
+
const GridCellPopup_1 = require("./Components/Popups/GridCellPopup");
|
|
15
16
|
const WindowPopups_1 = require("./Components/Popups/WindowPopups/WindowPopups");
|
|
16
17
|
const Dashboard_1 = require("./Dashboard/Dashboard");
|
|
17
18
|
const License_1 = require("./License");
|
|
18
|
-
const NotesPopup_1 = require("./Notes/NotesPopup");
|
|
19
19
|
const FloatingQuickSearch_1 = require("./QuickSearch/FloatingQuickSearch/FloatingQuickSearch");
|
|
20
20
|
const renderWithAdaptableContext_1 = require("./renderWithAdaptableContext");
|
|
21
21
|
class AdaptableView extends React.Component {
|
|
@@ -24,7 +24,7 @@ class AdaptableView extends React.Component {
|
|
|
24
24
|
const watermark = (_d = (_c = (_b = (_a = this.props.AdaptableApi) === null || _a === void 0 ? void 0 : _a.internalApi) === null || _b === void 0 ? void 0 : _b.getSystemState()) === null || _c === void 0 ? void 0 : _c.License) === null || _d === void 0 ? void 0 : _d.watermark;
|
|
25
25
|
const adaptableOptions = this.props.AdaptableApi.optionsApi.getAdaptableOptions();
|
|
26
26
|
return (React.createElement("div", null,
|
|
27
|
-
React.createElement(
|
|
27
|
+
React.createElement(GridCellPopup_1.GridCellPopup, null),
|
|
28
28
|
React.createElement(FloatingQuickSearch_1.QuickSearchDrawer, null),
|
|
29
29
|
this.props.AdaptableApi.internalApi.getModuleService().isModuleAvailable('Dashboard') && (React.createElement(Dashboard_1.Dashboard, { api: this.props.AdaptableApi })),
|
|
30
30
|
this.props.AdaptableApi.optionsApi.getUserInterfaceOptions().showLoadingScreen && (React.createElement(AdaptableLoadingScreen_1.AdaptableLoadingScreen, { onClose: this.props.onCloseLoadingPopup, showLoadingScreen: this.props.PopupState.LoadingPopup.ShowLoadingPopup })),
|
|
@@ -37,7 +37,7 @@ class AdaptableView extends React.Component {
|
|
|
37
37
|
, {
|
|
38
38
|
// we NEEEEED!!!! this containerId, otherwise, toastify will have memory leaks when the adaptable
|
|
39
39
|
// instance is destroyed and re-created many times
|
|
40
|
-
containerId: adaptableOptions.adaptableId,
|
|
40
|
+
containerId: adaptableOptions.adaptableId, limit: adaptableOptions.notificationsOptions.maxNotifications, closeButton: false, icon: false, theme: "colored" }),
|
|
41
41
|
(watermark === null || watermark === void 0 ? void 0 : watermark.show) && React.createElement(License_1.LicenseWatermark, null, watermark === null || watermark === void 0 ? void 0 : watermark.text),
|
|
42
42
|
React.createElement(WindowPopups_1.WindowPopups, null),
|
|
43
43
|
React.createElement(FormPopups_1.FormPopups, null),
|
|
@@ -33,7 +33,8 @@ const StatusBarPopup_1 = require("./StatusBar/StatusBarPopup");
|
|
|
33
33
|
const ChartingViewPanel_1 = require("./Charting/ChartingViewPanel");
|
|
34
34
|
const GridFilterPopup_1 = require("./GridFilter/GridFilterPopup");
|
|
35
35
|
const ColumnInfoPopup_1 = require("./ColumnInfo/ColumnInfoPopup");
|
|
36
|
-
const
|
|
36
|
+
const NotesPopup_1 = require("./Notes/NotesPopup");
|
|
37
|
+
const CommentsPopup_1 = require("./Comments/CommentsPopup");
|
|
37
38
|
const DataImportPopup_1 = require("./DataImport/DataImportPopup");
|
|
38
39
|
exports.AdaptableViewFactory = {
|
|
39
40
|
BulkUpdatePopup: BulkUpdatePopup_1.BulkUpdatePopup,
|
|
@@ -49,7 +50,8 @@ exports.AdaptableViewFactory = {
|
|
|
49
50
|
ToolPanelPopup: ToolPanelPopup_1.ToolPanelPopup,
|
|
50
51
|
SystemStatusPopup: SystemStatusPopup_1.SystemStatusPopup,
|
|
51
52
|
DataChangeHistoryPopup: DataChangeHistoryPopup_1.DataChangeHistoryPopup,
|
|
52
|
-
NotesPopup:
|
|
53
|
+
NotesPopup: NotesPopup_1.NotesPopup,
|
|
54
|
+
CommentsPopup: CommentsPopup_1.CommentsPopup,
|
|
53
55
|
DataImportPopup: DataImportPopup_1.DataImportPopup,
|
|
54
56
|
GridFilterPopup: GridFilterPopup_1.GridFilterPopup,
|
|
55
57
|
};
|
|
@@ -172,7 +172,7 @@ const ColumnsList = ({ columns: cols, handle, onValidityChange, onChange, onSele
|
|
|
172
172
|
pk: {
|
|
173
173
|
header: () => React.createElement(HeaderCellWrapper, null, "Primary Key"),
|
|
174
174
|
maxWidth: 80,
|
|
175
|
-
|
|
175
|
+
defaultSortable: false,
|
|
176
176
|
renderMenuIcon: false,
|
|
177
177
|
render: (params) => {
|
|
178
178
|
const { data } = params;
|
|
@@ -331,7 +331,7 @@ const ColumnsList = ({ columns: cols, handle, onValidityChange, onChange, onSele
|
|
|
331
331
|
default: {
|
|
332
332
|
defaultFlex: 1,
|
|
333
333
|
align: 'center',
|
|
334
|
-
|
|
334
|
+
defaultSortable: false,
|
|
335
335
|
},
|
|
336
336
|
}, headerOptions: {
|
|
337
337
|
alwaysReserveSpaceForSortIcon: false,
|
|
@@ -154,7 +154,7 @@ const AlertButtonsEditor = (props) => {
|
|
|
154
154
|
label: StringExtensions_1.default.CapitaliseFirstLetter(variant),
|
|
155
155
|
value: variant,
|
|
156
156
|
};
|
|
157
|
-
}),
|
|
157
|
+
}), renderSingleValue: (option) => `Variant: ${option.label}`, value: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant, onChange: (value) => {
|
|
158
158
|
setVariant(value);
|
|
159
159
|
} })),
|
|
160
160
|
React.createElement(Select_1.Select, { options: [
|
|
@@ -168,7 +168,7 @@ const AlertButtonsEditor = (props) => {
|
|
|
168
168
|
value: tone,
|
|
169
169
|
};
|
|
170
170
|
}),
|
|
171
|
-
],
|
|
171
|
+
], renderSingleValue: (option) => `Tone: ${option.label}`, onChange: (value) => {
|
|
172
172
|
if (value === 'text') {
|
|
173
173
|
setTone(null);
|
|
174
174
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
|
|
3
3
|
import { AlertType } from '../Utilities/getAlertType';
|
|
4
|
-
export declare const getRuleStepDescription: (alertType: AlertType) => JSX.Element
|
|
4
|
+
export declare const getRuleStepDescription: (alertType: AlertType) => "" | JSX.Element;
|
|
5
5
|
export declare const renderAlertRulesSummary: (alertDefinition: AlertDefinition) => JSX.Element;
|
|
6
6
|
export interface AlertRulesWizardSectionProps {
|
|
7
7
|
onChange: (data: AlertDefinition) => void;
|
|
@@ -20,7 +20,7 @@ const getRuleStepDescription = (alertType) => {
|
|
|
20
20
|
case 'RowChange':
|
|
21
21
|
return React.createElement(React.Fragment, null, "Specify which type of Row Change will trigger the Alert");
|
|
22
22
|
case 'Validation':
|
|
23
|
-
return React.createElement(React.Fragment, null, "Create the Validation Rule which will trigger the Alert (using a Predicate or a Query)");
|
|
23
|
+
return (React.createElement(React.Fragment, null, "Create the Validation Rule which will trigger the Alert (using a Predicate or a Query)"));
|
|
24
24
|
case 'Aggregation':
|
|
25
25
|
return React.createElement(React.Fragment, null, "Build an Aggregation Boolean Rule to specify when the Alert should trigger");
|
|
26
26
|
case 'Observable':
|
|
@@ -62,9 +62,10 @@ const AlertRulesWizardSection = (props) => {
|
|
|
62
62
|
const showObservable = props.alertType === 'Observable';
|
|
63
63
|
const showAggregation = props.alertType === 'Aggregation';
|
|
64
64
|
const showBoolean = props.alertType === 'DataChange' || props.alertType == 'Validation';
|
|
65
|
-
const showPredicate = props.alertType === 'DataChange' ||
|
|
65
|
+
const showPredicate = props.alertType === 'DataChange' ||
|
|
66
|
+
props.alertType == 'Validation' ||
|
|
67
|
+
props.alertType === 'RowChange';
|
|
66
68
|
const enablePredicateColumnId = props.alertType === 'DataChange' || props.alertType == 'Validation';
|
|
67
|
-
;
|
|
68
69
|
if (props.alertType === 'RowChange') {
|
|
69
70
|
return React.createElement(RowChangeEditor, { alert: data, onChange: props.onChange });
|
|
70
71
|
}
|
|
@@ -50,7 +50,7 @@ const CalculatedColumnExpressionWizardSection = (props) => {
|
|
|
50
50
|
return 'quantileAggregatedScalar';
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
return (React.createElement(Tabs_1.Tabs, { autoFocus: false },
|
|
53
|
+
return (React.createElement(Tabs_1.Tabs, { autoFocus: false, height: "100%" },
|
|
54
54
|
React.createElement(Tabs_1.Tabs.Tab, null, (0, StringExtensions_1.Humanize)(props.expressionType)),
|
|
55
55
|
React.createElement(Tabs_1.Tabs.Content, null, (() => {
|
|
56
56
|
switch (props.expressionType) {
|
|
@@ -100,7 +100,7 @@ const CalculatedColumnWizard = (props) => {
|
|
|
100
100
|
isValid: CalculatedColumnExpressionWizardSection_1.isValidCalculatedColumnExpression,
|
|
101
101
|
renderSummary: CalculatedColumnExpressionWizardSection_1.renderCalculatedColumnExpressionSummary,
|
|
102
102
|
render: () => {
|
|
103
|
-
return (React.createElement(rebass_1.Box, { p: 2 },
|
|
103
|
+
return (React.createElement(rebass_1.Box, { height: "100%", p: 2 },
|
|
104
104
|
React.createElement(CalculatedColumnExpressionWizardSection_1.CalculatedColumnExpressionWizardSection, { expressionType: expressionType, onChange: setCalculatedColumn })));
|
|
105
105
|
},
|
|
106
106
|
},
|
|
@@ -71,7 +71,7 @@ const useChartingElements = ({ elementType, accessLevel, size = 'normal', }) =>
|
|
|
71
71
|
if ((0, ChartingState_1.isAgChartDefinition)(selectedChart)) {
|
|
72
72
|
containerOptions.unshift({
|
|
73
73
|
label: chartingOptions.agGridContainerName,
|
|
74
|
-
value:
|
|
74
|
+
value: chartingOptions.agGridContainerName,
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
const style = {};
|
|
@@ -82,8 +82,13 @@ const useChartingElements = ({ elementType, accessLevel, size = 'normal', }) =>
|
|
|
82
82
|
iconSize = 15;
|
|
83
83
|
}
|
|
84
84
|
const chartSelector = (React.createElement(Select_1.Select, { className: `ab-${elementType}__Chart__select`, size: size, value: selectedChartId, options: options, placeholder: 'Select Chart', disabled: !hasCharts, onChange: (chartUuid) => setSelectedChartId(chartUuid) }));
|
|
85
|
-
const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(Select_1.Select, { value: selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name, size: size, onChange: (containerName) => {
|
|
86
|
-
|
|
85
|
+
const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(Select_1.Select, { value: selectedContainer === null ? chartingOptions.agGridContainerName : selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name, size: size, onChange: (containerName) => {
|
|
86
|
+
if (containerName === chartingOptions.agGridContainerName) {
|
|
87
|
+
setSelectedContainer(null);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
setSelectedContainer(chartContainers.find((containerOption) => containerOption.name === containerName));
|
|
91
|
+
}
|
|
87
92
|
}, options: containerOptions, placeholder: "Select Container" }));
|
|
88
93
|
const chartButton = (React.createElement(SimpleButton_1.default, { style: style, mr: 1, onClick: () => (isOpen ? hideChart() : showChart(selectedContainer)), disabled: !Boolean(selectedChart), variant: 'text', tone: 'neutral', icon: isOpen ? 'visibility-off' : 'visibility-on', tooltip: isOpen ? 'Hide Chart' : 'Show Chart' }));
|
|
89
94
|
const deleteButton = (React.createElement(DeleteChartButton_1.DeleteChartButton, { iconSize: iconSize, chart: selectedChart, accessLevel: chartAccessLevel }));
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommentsEditor = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_redux_1 = require("react-redux");
|
|
7
|
+
const rebass_1 = require("rebass");
|
|
8
|
+
const icons_1 = require("../../components/icons");
|
|
9
|
+
const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
|
|
10
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
11
|
+
const CommentsRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/CommentsRedux"));
|
|
12
|
+
const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
|
|
13
|
+
const dateUtils_1 = require("../../Utilities/ExpressionFunctions/dateUtils");
|
|
14
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
15
|
+
const AdaptableInput_1 = tslib_1.__importDefault(require("../Components/AdaptableInput"));
|
|
16
|
+
// Edit Mode
|
|
17
|
+
// [author] [edit, delete]
|
|
18
|
+
// [text-editor] * this is different
|
|
19
|
+
// [show-all-comments-button]
|
|
20
|
+
// View Mode
|
|
21
|
+
// [author] [edit, delete]
|
|
22
|
+
// [text]
|
|
23
|
+
// [show-all-comments-button]
|
|
24
|
+
const CommentsEditor = (props) => {
|
|
25
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
26
|
+
const cellAddress = (0, react_redux_1.useSelector)((state) => (0, SystemRedux_1.SystemCommentsAndNotesSelector)(state.System));
|
|
27
|
+
const userId = React.useMemo(() => {
|
|
28
|
+
return adaptable.api.optionsApi.getUserName();
|
|
29
|
+
}, []);
|
|
30
|
+
const commentThread = (0, react_redux_1.useSelector)((state) => CommentsRedux.GetCellCommentSelector(state.Comment, cellAddress));
|
|
31
|
+
const [activeEditingComment, setActiveEditingComment] = React.useState(() => {
|
|
32
|
+
/**
|
|
33
|
+
* When opening the popup and there is only one comment, we want to open it in edit mode.
|
|
34
|
+
* This happens usualy when a new comment is added via cell menu.
|
|
35
|
+
*/
|
|
36
|
+
// if (cellComments?.Comments?.length === 1 && cellComments?.Comments[0].Value === '') {
|
|
37
|
+
// return cellComments?.Comments[0].Uuid;
|
|
38
|
+
// }
|
|
39
|
+
return null;
|
|
40
|
+
});
|
|
41
|
+
const [newCommentText, setNewCommentText] = React.useState('');
|
|
42
|
+
if (!commentThread) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
const comments = commentThread.Comments;
|
|
46
|
+
return (React.createElement(Panel_1.default, { color: "var(--ab-color-text-on-primary)", onClick: () => props.enableEditMode(), minWidth: 250 },
|
|
47
|
+
comments &&
|
|
48
|
+
comments.length > 0 &&
|
|
49
|
+
comments.map((comment, index) => {
|
|
50
|
+
var _a, _b, _c, _d;
|
|
51
|
+
if (!comment) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
const isOwnComment = ((_a = comment === null || comment === void 0 ? void 0 : comment.Author) === null || _a === void 0 ? void 0 : _a.UserName)
|
|
55
|
+
? ((_b = comment === null || comment === void 0 ? void 0 : comment.Author) === null || _b === void 0 ? void 0 : _b.UserName) === userId
|
|
56
|
+
: true; // no owner means it's the current user
|
|
57
|
+
return (React.createElement(rebass_1.Box, { p: 2, key: (_c = comment.Uuid) !== null && _c !== void 0 ? _c : index, style: {
|
|
58
|
+
borderBottom: '1px solid var(--ab-color-primarydark)',
|
|
59
|
+
} },
|
|
60
|
+
React.createElement(rebass_1.Flex, { mb: 2, alignItems: "center" },
|
|
61
|
+
React.createElement(rebass_1.Box, null,
|
|
62
|
+
React.createElement(rebass_1.Box, { fontSize: 3, fontWeight: "bold" }, (_d = comment === null || comment === void 0 ? void 0 : comment.Author) === null || _d === void 0 ? void 0 : _d.UserName),
|
|
63
|
+
comment.Timestamp && (React.createElement(rebass_1.Box, { fontSize: 2 }, (0, dateUtils_1.formatDate)(comment.Timestamp, 'MM.DD.YYYY HH:mm')))),
|
|
64
|
+
React.createElement(rebass_1.Box, { flex: 1 }),
|
|
65
|
+
React.createElement(SimpleButton_1.default, { variant: "text", icon: "edit", disabled: !isOwnComment, onClick: () => setActiveEditingComment(comment.Uuid) }),
|
|
66
|
+
React.createElement(SimpleButton_1.default, { variant: "text", icon: "delete", disabled: !isOwnComment, onClick: () => {
|
|
67
|
+
adaptable.api.commentApi.deleteComment(comment, cellAddress);
|
|
68
|
+
requestAnimationFrame(() => {
|
|
69
|
+
props.onRefreshContent();
|
|
70
|
+
});
|
|
71
|
+
} })),
|
|
72
|
+
React.createElement(rebass_1.Box, { onClick: () => setActiveEditingComment(comment.Uuid) }, comment.Uuid === activeEditingComment ? (React.createElement(AdaptableInput_1.default, { autoFocus: true, width: "100%", defaultValue: comment.Value, onBlur: () => {
|
|
73
|
+
if (comment.Uuid === activeEditingComment) {
|
|
74
|
+
setActiveEditingComment(null);
|
|
75
|
+
}
|
|
76
|
+
}, onChange: (event) => {
|
|
77
|
+
adaptable.api.commentApi.editComment(Object.assign(Object.assign({}, comment), { Value: event.target.value }), cellAddress);
|
|
78
|
+
} })) : (React.createElement(rebass_1.Text, null, comment.Value)))));
|
|
79
|
+
}),
|
|
80
|
+
React.createElement(AdaptableInput_1.default, { autoFocus: !comments || comments.length === 0, value: newCommentText, onChange: (event) => {
|
|
81
|
+
setNewCommentText(event.target.value);
|
|
82
|
+
}, onKeyDown: (event) => {
|
|
83
|
+
if (event.key === 'Enter') {
|
|
84
|
+
adaptable.api.commentApi.addComment(newCommentText, cellAddress);
|
|
85
|
+
setNewCommentText('');
|
|
86
|
+
requestAnimationFrame(() => {
|
|
87
|
+
props.onRefreshContent();
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}, mt: 2, mb: "2", width: "100%", placeholder: "Write new comment" }),
|
|
91
|
+
React.createElement(SimpleButton_1.default, { width: "100%", variant: "raised", onClick: () => {
|
|
92
|
+
adaptable.api.settingsPanelApi.openSettingsPanel('Comments');
|
|
93
|
+
adaptable.api.internalApi.getCellPopupService().hidePopup();
|
|
94
|
+
} },
|
|
95
|
+
React.createElement(rebass_1.Box, { mr: 2 },
|
|
96
|
+
React.createElement(icons_1.Icon, { name: "folder" })),
|
|
97
|
+
' ',
|
|
98
|
+
"Open all comments")));
|
|
99
|
+
};
|
|
100
|
+
exports.CommentsEditor = CommentsEditor;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommentsPopup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_redux_1 = require("react-redux");
|
|
7
|
+
const InfiniteTable_1 = require("../../components/InfiniteTable");
|
|
8
|
+
const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
|
|
9
|
+
const rebass_1 = require("rebass");
|
|
10
|
+
const dateUtils_1 = require("../../Utilities/ExpressionFunctions/dateUtils");
|
|
11
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
12
|
+
const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
|
|
13
|
+
const AdaptableButton_1 = require("../Components/AdaptableButton");
|
|
14
|
+
const tableDOMProps = {
|
|
15
|
+
style: {
|
|
16
|
+
minHeight: 160,
|
|
17
|
+
minWidth: '10rem',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
const CellComments = (props) => {
|
|
21
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
22
|
+
const columnsMap = React.useMemo(() => {
|
|
23
|
+
const columns = {
|
|
24
|
+
author: {
|
|
25
|
+
field: 'Author',
|
|
26
|
+
maxWidth: 100,
|
|
27
|
+
valueGetter: (params) => params.data.Author.UserName,
|
|
28
|
+
},
|
|
29
|
+
timestamp: {
|
|
30
|
+
field: 'Timestamp',
|
|
31
|
+
maxWidth: 150,
|
|
32
|
+
valueGetter: (params) => {
|
|
33
|
+
return (0, dateUtils_1.formatDate)(params.data.Timestamp, 'MM.DD.YYYY HH:mm');
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
message: {
|
|
37
|
+
header: 'Message',
|
|
38
|
+
field: 'Value',
|
|
39
|
+
defaultFlex: 3,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
return columns;
|
|
43
|
+
}, []);
|
|
44
|
+
const cellValue = adaptable.api.gridApi.getCellDisplayValue(props.commentThread.PrimaryKeyValue, props.commentThread.ColumnId);
|
|
45
|
+
const columnFriendlyName = adaptable.api.columnApi.getFriendlyNameForColumnId(props.commentThread.ColumnId);
|
|
46
|
+
return (React.createElement(Panel_1.default, { mb: 2, header: React.createElement(rebass_1.Flex, { width: "100%", alignItems: "center" },
|
|
47
|
+
React.createElement(rebass_1.Box, { mr: 2 },
|
|
48
|
+
"Cell Value: ",
|
|
49
|
+
cellValue),
|
|
50
|
+
React.createElement(rebass_1.Box, { mr: 2 },
|
|
51
|
+
"Primary Key: [",
|
|
52
|
+
props.commentThread.PrimaryKeyValue,
|
|
53
|
+
"]"),
|
|
54
|
+
React.createElement(rebass_1.Box, null,
|
|
55
|
+
"Column: ",
|
|
56
|
+
columnFriendlyName),
|
|
57
|
+
React.createElement(rebass_1.Box, { flex: 1 }),
|
|
58
|
+
React.createElement(AdaptableButton_1.AdaptableButtonComponent, { mr: 1, variant: "text", icon: "visibility-on", onClick: () => {
|
|
59
|
+
adaptable.api.internalApi.getCellPopupService().showPopup({
|
|
60
|
+
ColumnId: props.commentThread.ColumnId,
|
|
61
|
+
PrimaryKeyValue: props.commentThread.PrimaryKeyValue,
|
|
62
|
+
}, true);
|
|
63
|
+
} }),
|
|
64
|
+
React.createElement(AdaptableButton_1.AdaptableButtonComponent, { icon: "delete", variant: "text", onClick: () => {
|
|
65
|
+
adaptable.api.commentApi.deleteCommentThread(props.commentThread);
|
|
66
|
+
} })) },
|
|
67
|
+
React.createElement(InfiniteTable_1.DataSource, { data: props.commentThread.Comments, primaryKey: "Uuid" },
|
|
68
|
+
React.createElement(InfiniteTable_1.InfiniteTable, { columnTypes: {
|
|
69
|
+
default: {
|
|
70
|
+
align: 'start',
|
|
71
|
+
defaultFlex: 1,
|
|
72
|
+
defaultSortable: false,
|
|
73
|
+
},
|
|
74
|
+
}, headerOptions: {
|
|
75
|
+
alwaysReserveSpaceForSortIcon: false,
|
|
76
|
+
}, rowHeight: 30, columnHeaderHeight: 30, domProps: tableDOMProps, columns: columnsMap }))));
|
|
77
|
+
};
|
|
78
|
+
const CommentsPopup = (props) => {
|
|
79
|
+
const cellComments = (0, react_redux_1.useSelector)((state) => {
|
|
80
|
+
return state.Comment.CommentThreads;
|
|
81
|
+
});
|
|
82
|
+
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Comments', glyphicon: 'comments', infoLink: props.moduleInfo.HelpPage }, (cellComments !== null && cellComments !== void 0 ? cellComments : []).map((cellComments, index) => {
|
|
83
|
+
var _a;
|
|
84
|
+
return React.createElement(CellComments, { key: (_a = cellComments === null || cellComments === void 0 ? void 0 : cellComments.Uuid) !== null && _a !== void 0 ? _a : index, commentThread: cellComments });
|
|
85
|
+
})));
|
|
86
|
+
};
|
|
87
|
+
exports.CommentsPopup = CommentsPopup;
|
|
@@ -126,7 +126,8 @@ const AdaptableObjectListItem = (props) => {
|
|
|
126
126
|
const showEditButton = Boolean(EditWizard);
|
|
127
127
|
const adaptableOpttions = adaptable.api.optionsApi.getAdaptableOptions();
|
|
128
128
|
const disableDeleteConfirmationState = (0, react_redux_1.useSelector)((adaptableState) => SystemRedux.SystemDisableDeleteConfirmationSelector(adaptableState.System));
|
|
129
|
-
const disableDeleteConfirmation = disableDeleteConfirmationState ||
|
|
129
|
+
const disableDeleteConfirmation = disableDeleteConfirmationState ||
|
|
130
|
+
((_h = adaptableOpttions === null || adaptableOpttions === void 0 ? void 0 : adaptableOpttions.userInterfaceOptions) === null || _h === void 0 ? void 0 : _h.disableDeleteConfirmation);
|
|
130
131
|
return (React.createElement(React.Fragment, null,
|
|
131
132
|
React.createElement(exports.AdaptableObjectListItemView, { module: props.module, disableDeleteConfirmation: disableDeleteConfirmation, abObject: props.data.abObject, accessLevel: accessLevel, actions: actions, className: itemClassName, handleOnEdit: handleOnEdit, items: props.data.items, showActions: showActions, showEditButton: showEditButton, style: props.data.style, teamSharingActivated: teamSharingActivated, onShare: (config) => adaptable.api.teamSharingApi.shareAdaptableEntity(props.data.abObject, props.module.moduleInfo.ModuleName, config), entityType: entityType, deleteAction: deleteAction, deleteDisabled: props.deleteDisabled, deleteTooltip: props.deleteTooltip, editDisabled: isEditDisabled, suspendedEnabled: hasSuspend, onSuspend: () => dispatch(viewOptions.getSuspendAction(props.data.abObject)), onUnSuspend: () => dispatch(viewOptions.getUnSuspendAction(props.data.abObject)) }),
|
|
132
133
|
isEditWizardVisible && EditWizard && (React.createElement(EditWizard, { defaultCurrentSectionName: wizardStepName, moduleInfo: props.module.moduleInfo, data: props.data.abObject, configEntities: null, onCloseWizard: handleCloseWizard, onFinishWizard: handleCloseWizard }))));
|
|
@@ -17,7 +17,7 @@ const ensurePortalElement = () => {
|
|
|
17
17
|
}
|
|
18
18
|
portalElement = document.createElement('div');
|
|
19
19
|
portalElement.style.position = 'absolute';
|
|
20
|
-
portalElement.style.zIndex = '
|
|
20
|
+
portalElement.style.zIndex = '999';
|
|
21
21
|
portalElement.style.top = '0px';
|
|
22
22
|
portalElement.style.left = '0px';
|
|
23
23
|
document.body.appendChild(portalElement);
|
|
@@ -110,7 +110,8 @@ class FilterFormComponent extends React.Component {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
async loadPermittedValues(filter = '') {
|
|
113
|
-
const { values: distinctColumnValues, suppressClientSideFilter } = await (0, runIfNotResolvedIn_1.runIfNotResolvedIn)(this.props.api.gridApi.internalApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter, this.props.api.optionsApi.getColumnFilterOptions().valuesFilterOptions
|
|
113
|
+
const { values: distinctColumnValues, suppressClientSideFilter } = await (0, runIfNotResolvedIn_1.runIfNotResolvedIn)(this.props.api.gridApi.internalApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter, this.props.api.optionsApi.getColumnFilterOptions().valuesFilterOptions
|
|
114
|
+
.showDistinctFilteredValuesOnly), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
|
|
114
115
|
if (this._isMounted) {
|
|
115
116
|
this.setState({
|
|
116
117
|
distinctColumnValues,
|
|
@@ -178,7 +179,12 @@ class FilterFormComponent extends React.Component {
|
|
|
178
179
|
} })));
|
|
179
180
|
}
|
|
180
181
|
return (_a = predicateDef.inputs) === null || _a === void 0 ? void 0 : _a.map((predicateInput, index) => (React.createElement(rebass_1.Flex, { key: index, flexDirection: "row" },
|
|
181
|
-
React.createElement(AdaptableInput_1.default, {
|
|
182
|
+
React.createElement(AdaptableInput_1.default, { onMouseDown: (event) => {
|
|
183
|
+
if (predicateInput.type === 'date') {
|
|
184
|
+
// This prevents the ag-grid dropdown closing when a date is selected
|
|
185
|
+
event.stopPropagation();
|
|
186
|
+
}
|
|
187
|
+
}, disabled: this.isFilterDisabled(), type: predicateInput.type, autoFocus: index === 0, value: filter.Predicate.Inputs[index], onChange: (e) => this.changeColumnPredicateInput(e.target.value, index), mb: 1, flex: 1, fontSize: 2 }))));
|
|
182
188
|
}
|
|
183
189
|
isFilterDisabled() {
|
|
184
190
|
var _a;
|
|
@@ -78,9 +78,7 @@ const ListBoxFilterForm = (props) => {
|
|
|
78
78
|
const textClear = (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { autoFocus: true, type: "text", placeholder: "Search Column Values", value: FilterValue, style: {
|
|
79
79
|
paddingTop: 'var(--ab-space-1)',
|
|
80
80
|
paddingBottom: 'var(--ab-space-1)',
|
|
81
|
-
|
|
82
|
-
borderRadius: 'var(--ab__border-radius)',
|
|
83
|
-
}, OnTextChange: handleFilterValueChange }));
|
|
81
|
+
}, inputStyle: { padding: 'var(--ab-space-1)' }, OnTextChange: handleFilterValueChange }));
|
|
84
82
|
const baseClassName = 'ab-ListBoxFilterForm';
|
|
85
83
|
return (React.createElement("div", { className: (0, join_1.default)(baseClassName, props.useAgGridStyle ? `${baseClassName}--aggrid-style` : null, props.isLoading && `${baseClassName}--loading`) },
|
|
86
84
|
React.createElement(rebass_1.Box, { px: 2 },
|