@adaptabletools/adaptable-cjs 23.0.4 → 23.0.5-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/agGrid.js +0 -31
- package/index.css +0 -64
- package/index.js +0 -31
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
- package/src/AdaptableOptions/AdaptablePlugin.js +1 -9
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +3 -39
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +44 -16
- package/src/AdaptableState/Aggregations/only.js +0 -11
- package/src/AdaptableState/Aggregations/weightedAverage.d.ts +0 -1
- package/src/AdaptableState/Aggregations/weightedAverage.js +3 -30
- package/src/AdaptableState/Common/AdaptableColumn.js +0 -1
- package/src/AdaptableState/Common/AdaptableForm.js +0 -49
- package/src/AdaptableState/Common/AdaptableFormatPresets.js +0 -13
- package/src/AdaptableState/Common/AdaptablePredicate.js +3 -125
- package/src/AdaptableState/Common/AggregationColumns.js +0 -10
- package/src/AdaptableState/Common/Enums.js +0 -3
- package/src/AdaptableState/Common/Menu.js +1 -7
- package/src/AdaptableState/Common/MenuItem.js +0 -2
- package/src/AdaptableState/Common/Types.js +2 -5
- package/src/AdaptableState/StatusBarState.js +0 -3
- package/src/AdaptableState/StyledColumns/BadgeStyle.js +0 -1
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +0 -4
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +0 -5
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +0 -8
- package/src/AdaptableState/Uuid.js +0 -1
- package/src/Api/Implementation/AdaptableApiImpl.js +0 -4
- package/src/Api/Implementation/AlertApiImpl.js +0 -21
- package/src/Api/Implementation/ApiBase.js +0 -24
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +0 -1
- package/src/Api/Implementation/ChartingApiImpl.js +0 -3
- package/src/Api/Implementation/ColumnApiImpl.js +1 -15
- package/src/Api/Implementation/ColumnFilterApiImpl.js +0 -9
- package/src/Api/Implementation/ColumnScopeApiImpl.js +0 -21
- package/src/Api/Implementation/DashboardApiImpl.js +0 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +0 -1
- package/src/Api/Implementation/ExportApiImpl.js +0 -10
- package/src/Api/Implementation/ExpressionApiImpl.js +0 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +0 -3
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -2
- package/src/Api/Implementation/GridApiImpl.js +1 -22
- package/src/Api/Implementation/GridFilterApiImpl.js +0 -2
- package/src/Api/Implementation/LayoutApiImpl.js +0 -18
- package/src/Api/Implementation/LayoutHelpers.js +0 -16
- package/src/Api/Implementation/NamedQueryApiImpl.js +0 -1
- package/src/Api/Implementation/PredicateApiImpl.js +0 -5
- package/src/Api/Implementation/RowFormApiImpl.js +0 -2
- package/src/Api/Implementation/StateApiImpl.js +0 -7
- package/src/Api/Implementation/SystemStatusApiImpl.js +0 -2
- package/src/Api/Implementation/TeamSharingApiImpl.js +0 -3
- package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -1
- package/src/Api/Internal/ActionColumnInternalApi.js +0 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
- package/src/Api/Internal/AdaptableInternalApi.js +1 -39
- package/src/Api/Internal/AlertInternalApi.js +1 -102
- package/src/Api/Internal/CalculatedColumnInternalApi.js +0 -17
- package/src/Api/Internal/ChartingInternalApi.js +0 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +0 -52
- package/src/Api/Internal/ColumnInternalApi.js +0 -32
- package/src/Api/Internal/CustomSortInternalApi.js +0 -5
- package/src/Api/Internal/DashboardInternalApi.js +0 -23
- package/src/Api/Internal/DataImportInternalApi.js +0 -1
- package/src/Api/Internal/EventInternalApi.js +0 -2
- package/src/Api/Internal/ExportInternalApi.js +1 -16
- package/src/Api/Internal/ExpressionInternalApi.js +0 -23
- package/src/Api/Internal/Fdc3InternalApi.js +0 -9
- package/src/Api/Internal/FlashingCellInternalApi.js +0 -5
- package/src/Api/Internal/FormatColumnInternalApi.js +5 -107
- package/src/Api/Internal/FreeTextColumnInternalApi.js +0 -8
- package/src/Api/Internal/GridFilterInternalApi.js +0 -3
- package/src/Api/Internal/GridInternalApi.js +0 -37
- package/src/Api/Internal/LayoutInternalApi.js +0 -18
- package/src/Api/Internal/NamedQueryInternalApi.js +0 -9
- package/src/Api/Internal/PredicateInternalApi.js +0 -23
- package/src/Api/Internal/RowFormInternalApi.js +0 -18
- package/src/Api/Internal/StateInternalApi.js +0 -25
- package/src/Api/Internal/StyledColumnInternalApi.js +0 -62
- package/src/Api/Internal/TeamSharingInternalApi.js +0 -9
- package/src/Redux/ActionsReducers/AlertRedux.js +0 -24
- package/src/Redux/ActionsReducers/ApplicationRedux.js +0 -9
- package/src/Redux/ActionsReducers/BulkUpdateRedux.js +0 -6
- package/src/Redux/ActionsReducers/CalculatedColumnRedux.js +1 -16
- package/src/Redux/ActionsReducers/ChartingRedux.js +0 -24
- package/src/Redux/ActionsReducers/CommentsRedux.js +0 -24
- package/src/Redux/ActionsReducers/CustomSortRedux.js +0 -24
- package/src/Redux/ActionsReducers/DashboardRedux.js +0 -33
- package/src/Redux/ActionsReducers/ExportRedux.js +0 -36
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +0 -24
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +0 -36
- package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +1 -20
- package/src/Redux/ActionsReducers/InternalRedux.js +0 -42
- package/src/Redux/ActionsReducers/LayoutRedux.js +1 -67
- package/src/Redux/ActionsReducers/NamedQueryRedux.js +0 -15
- package/src/Redux/ActionsReducers/NoteRedux.js +0 -14
- package/src/Redux/ActionsReducers/PluginsRedux.js +0 -3
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +0 -34
- package/src/Redux/ActionsReducers/PopupRedux.js +2 -6
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +0 -15
- package/src/Redux/ActionsReducers/ShortcutRedux.js +0 -24
- package/src/Redux/ActionsReducers/SmartEditRedux.js +0 -6
- package/src/Redux/ActionsReducers/StatusBarRedux.js +0 -6
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +0 -27
- package/src/Redux/ActionsReducers/SystemStatusRedux.js +0 -6
- package/src/Redux/ActionsReducers/TeamSharingRedux.js +0 -1
- package/src/Redux/ActionsReducers/ThemeRedux.js +0 -26
- package/src/Redux/ActionsReducers/ToolPanelRedux.js +0 -22
- package/src/Redux/ActionsReducers/UserInterfaceRedux.js +0 -3
- package/src/Redux/ActionsReducers/utils.js +0 -6
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +0 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +0 -25
- package/src/Redux/Store/AdaptableStore.js +5 -301
- package/src/Strategy/AdaptableModuleBase.js +0 -35
- package/src/Strategy/AlertModule.js +0 -9
- package/src/Strategy/CellSummaryModule.js +0 -12
- package/src/Strategy/ChartingModule.js +0 -1
- package/src/Strategy/ColumnFilterModule.js +1 -11
- package/src/Strategy/CommentModule.js +0 -2
- package/src/Strategy/DashboardModule.js +0 -4
- package/src/Strategy/ExportModule.js +0 -1
- package/src/Strategy/FlashingCellModule.js +0 -8
- package/src/Strategy/FormatColumnModule.js +0 -3
- package/src/Strategy/FreeTextColumnModule.js +0 -3
- package/src/Strategy/LayoutModule.js +0 -26
- package/src/Strategy/NoteModule.js +0 -3
- package/src/Strategy/PlusMinusModule.js +0 -3
- package/src/Strategy/SettingsPanelModule.js +0 -1
- package/src/Strategy/ShortcutModule.js +0 -1
- package/src/Strategy/SmartEditModule.js +0 -5
- package/src/Strategy/StatusBarModule.js +0 -7
- package/src/Strategy/StyledColumnModule.js +1 -16
- package/src/Strategy/TeamSharingModule.js +0 -9
- package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +0 -5
- package/src/Utilities/Constants/DocumentationLinkConstants.js +0 -1
- package/src/Utilities/Constants/GeneralConstants.js +0 -10
- package/src/Utilities/Constants/ObjectDefaultConstants.js +0 -3
- package/src/Utilities/Constants/ReduxConstants.js +4 -8
- package/src/Utilities/Emitter.js +0 -9
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +0 -8
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +0 -15
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +0 -3
- package/src/Utilities/ExpressionFunctions/deepMap.js +0 -16
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +0 -9
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +7 -78
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +0 -9
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +2 -16
- package/src/Utilities/Extensions/ArrayExtensions.js +1 -63
- package/src/Utilities/Extensions/NumberExtensions.js +0 -27
- package/src/Utilities/Extensions/ObjectExtensions.js +0 -36
- package/src/Utilities/Extensions/StringExtensions.js +0 -27
- package/src/Utilities/Helpers/ActionColumnHelper.js +0 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +0 -8
- package/src/Utilities/Helpers/DateHelper.js +0 -10
- package/src/Utilities/Helpers/DisplayFormatHelper.js +0 -8
- package/src/Utilities/Helpers/Helper.js +3 -9
- package/src/Utilities/Helpers/PlusMinusHelper.js +0 -20
- package/src/Utilities/Helpers/QuickSearchHelper.js +0 -5
- package/src/Utilities/Helpers/Scheduling/CronExpression.js +0 -43
- package/src/Utilities/Helpers/Scheduling/ScheduledReportHelper.js +0 -4
- package/src/Utilities/Helpers/SettingsPanelHelper.js +40 -4
- package/src/Utilities/Helpers/StyleHelper.js +0 -56
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +0 -46
- package/src/Utilities/Helpers/StyledColumns/GradientStyleHelper.js +0 -38
- package/src/Utilities/Helpers/StyledColumns/IconStyleHelper.js +0 -39
- package/src/Utilities/Helpers/StyledColumns/PercentBarStyleHelper.js +0 -1
- package/src/Utilities/Helpers/StyledColumns/SparklineStyleHelper.js +0 -5
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +0 -37
- package/src/Utilities/Helpers/TimingHelper.js +0 -13
- package/src/Utilities/ObjectFactory.js +2 -4
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +0 -7
- package/src/Utilities/Services/AlertService.js +0 -1
- package/src/Utilities/Services/AnnotationsService.js +0 -22
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +0 -8
- package/src/Utilities/Services/ChartingService.js +0 -9
- package/src/Utilities/Services/DataService.js +0 -11
- package/src/Utilities/Services/Fdc3Service.js +0 -3
- package/src/Utilities/Services/FlashingCellService.js +0 -6
- package/src/Utilities/Services/ModuleService.js +0 -8
- package/src/Utilities/Services/QueryLanguageService.js +2 -25
- package/src/Utilities/Services/RowFormService.js +0 -1
- package/src/Utilities/Services/RowSummaryService.js +1 -20
- package/src/Utilities/Services/TeamSharingService.js +0 -15
- package/src/Utilities/Services/ThemeService.js +0 -7
- package/src/Utilities/Services/ValidationService.js +0 -21
- package/src/Utilities/createAgStatusPanelComponent.js +0 -3
- package/src/Utilities/getExpressionViewItems.js +0 -2
- package/src/Utilities/getObjectTagsViewItems.js +0 -1
- package/src/Utilities/getScrollbarSize.js +0 -1
- package/src/Utilities/logDeprecation.js +0 -3
- package/src/Utilities/resolveContainerElement.js +0 -21
- package/src/Utilities/runIfNotResolvedIn.js +0 -7
- package/src/Utilities/sortColumnStateForVisibleColumns.js +2 -12
- package/src/Utilities/waitForTimeout.js +0 -1
- package/src/Utilities/wizardSelection.js +0 -2
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/AdaptableView.js +1 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +0 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +0 -23
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +0 -2
- package/src/View/AdaptableWizardView/Wizard.js +0 -12
- package/src/View/AdaptableWizardView/helper.js +0 -11
- package/src/View/Alert/ActiveAlertsPanel.js +0 -2
- package/src/View/Alert/AlertStatusSubPanel.js +0 -8
- package/src/View/Alert/Utilities/getAlertType.js +0 -7
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +0 -5
- package/src/View/Alert/Utilities/mapAlertDefinition.js +0 -3
- package/src/View/Alert/Wizard/AlertWizard.js +0 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +0 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +0 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +0 -1
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +0 -3
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -7
- package/src/View/Charting/EditChartButton.js +1 -4
- package/src/View/Charting/ShowChartButton.js +0 -3
- package/src/View/Charting/useAgChartState.js +0 -5
- package/src/View/Charting/useChartingElements.js +0 -4
- package/src/View/Charting/useExternalChartState.js +0 -6
- package/src/View/ColumnInfo/ColumnInfo.js +7 -17
- package/src/View/Comments/CommentsEditor.js +1 -16
- package/src/View/Components/AdaptableButton/AdaptableButtonComponent.js +0 -1
- package/src/View/Components/AdaptableButton/AdaptableButtonView.js +0 -3
- package/src/View/Components/AdaptableDateInput/index.js +2 -9
- package/src/View/Components/AdaptableIconComponent/index.js +0 -4
- package/src/View/Components/AdaptableIconSelector/index.js +0 -3
- package/src/View/Components/AdaptableInput/index.js +0 -2
- package/src/View/Components/Badge/index.js +0 -8
- package/src/View/Components/Buttons/ButtonNewPage.js +1 -2
- package/src/View/Components/CellPopup/index.js +1 -2
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +0 -4
- package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +0 -4
- package/src/View/Components/ColumnFilter/ColumnFilter.js +3 -46
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +0 -2
- package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -20
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -16
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +1 -4
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -6
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +0 -20
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +0 -5
- package/src/View/Components/ColumnFilter/utils.js +2 -9
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +0 -2
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +0 -1
- package/src/View/Components/EntityRulesEditor/index.js +1 -11
- package/src/View/Components/ExternalRenderer.js +1 -3
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -52
- package/src/View/Components/ModuleValueSelector/index.js +0 -2
- package/src/View/Components/Panels/PanelWithImage.js +1 -5
- package/src/View/Components/Panels/PanelWithRow.js +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +0 -6
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +0 -6
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -2
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +0 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +0 -3
- package/src/View/Components/Popups/AdaptableToaster.js +0 -2
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +0 -8
- package/src/View/Components/RangesComponent.js +0 -57
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +0 -3
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -6
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -18
- package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +0 -4
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
- package/src/View/Components/ValueSelector/index.js +0 -4
- package/src/View/Components/wizardColumnListStyles.js +0 -5
- package/src/View/Dashboard/CustomToolbar.js +1 -25
- package/src/View/Dashboard/PinnedToolbarsSelector.js +0 -1
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -22
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +0 -1
- package/src/View/DataImport/systemFileHandlers.js +1 -1
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +0 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +0 -27
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +0 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +0 -7
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -12
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +0 -10
- package/src/View/GridFilter/GridFilterPopup.js +0 -1
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +0 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -31
- package/src/View/Layout/LayoutViewPanel.js +0 -2
- package/src/View/Layout/PivotDetailsPopoup.js +0 -2
- package/src/View/Layout/TransposedPopup.js +0 -7
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -6
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +0 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -32
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +0 -3
- package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +0 -2
- package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +0 -4
- package/src/View/Note/NotePopup.js +0 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +0 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +0 -4
- package/src/View/StatusBar/StatusBarPanel.js +0 -8
- package/src/View/StatusBar/StatusBarPopup.js +0 -2
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +0 -11
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +0 -28
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -25
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +0 -26
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +0 -40
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +0 -55
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +0 -15
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +0 -21
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +0 -10
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +0 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -21
- package/src/View/SystemStatus/SystemStatusPopup.js +0 -1
- package/src/View/TeamSharing/SharedEntityObjectView.js +0 -1
- package/src/View/Theme/ThemeSelector.js +0 -1
- package/src/View/UIHelper.js +0 -6
- package/src/View/UIInterfaces.js +0 -1
- package/src/View/Wizard/CollapsibleWizardCard.js +1 -8
- package/src/View/Wizard/OnePageWizards.js +2 -9
- package/src/View/Wizard/SummaryColorTag.js +0 -1
- package/src/View/Wizard/useKeyboardNavigation.js +1 -3
- package/src/agGrid/Adaptable.js +0 -12
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
- package/src/agGrid/AdaptableAgGrid.js +3 -482
- package/src/agGrid/AdaptableFilterHandler.js +0 -5
- package/src/agGrid/AdaptableLogger.js +0 -6
- package/src/agGrid/AgGridAdapter.js +3 -90
- package/src/agGrid/AgGridColumnAdapter.js +6 -168
- package/src/agGrid/AgGridExportAdapter.js +4 -106
- package/src/agGrid/AgGridFilterAdapter.js +0 -5
- package/src/agGrid/AgGridFloatingFilterAdapter.js +0 -10
- package/src/agGrid/AgGridMenuAdapter.js +0 -143
- package/src/agGrid/AgGridModulesAdapter.js +0 -2
- package/src/agGrid/AgGridOptionsService.js +0 -2
- package/src/agGrid/AgGridThemeAdapter.js +0 -7
- package/src/agGrid/agGridDataTypeDefinitions.js +0 -8
- package/src/agGrid/cellRenderers/BadgeRenderer.js +0 -10
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +1 -96
- package/src/agGrid/cellRenderers/IconRenderer.js +0 -55
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +0 -51
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +1 -50
- package/src/agGrid/cellRenderers/RatingRenderer.js +0 -40
- package/src/agGrid/editors/AdaptableDateEditor/index.js +0 -18
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +0 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +0 -11
- package/src/agGrid/editors/AdaptablePercentageEditor/index.js +0 -9
- package/src/agGrid/index.js +0 -6
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -73
- package/src/components/CodeBlock/index.d.ts +0 -1
- package/src/components/CodeBlock/index.js +2 -3
- package/src/components/ColorPicker/ColorPicker.js +0 -6
- package/src/components/Combobox/VirtualizedList.js +0 -5
- package/src/components/Combobox/index.js +5 -63
- package/src/components/Dashboard/Dashboard.js +1 -4
- package/src/components/Datepicker/index.js +2 -97
- package/src/components/DragAndDropContext/TabList.js +2 -6
- package/src/components/Drawer/index.js +0 -7
- package/src/components/Dropdown/index.js +0 -1
- package/src/components/DropdownButton/index.js +0 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -16
- package/src/components/ExpressionEditor/EditorButton.js +0 -1
- package/src/components/ExpressionEditor/EditorInput.js +1 -7
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +0 -1
- package/src/components/ExpressionEditor/ExpressionPreview.js +4 -14
- package/src/components/ExpressionEditor/NamedQueryContext.js +0 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -6
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +0 -12
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +0 -4
- package/src/components/ExpressionEditor/index.js +5 -14
- package/src/components/Icon/index.js +0 -2
- package/src/components/Input/NumberInput.js +0 -10
- package/src/components/Modal/Backdrop.js +0 -1
- package/src/components/OverlayTrigger/Overlay.js +0 -1
- package/src/components/OverlayTrigger/index.js +3 -15
- package/src/components/ProgressIndicator/ProgressIndicator.js +3 -16
- package/src/components/ResizeObserver/index.js +0 -7
- package/src/components/SimpleButton/index.js +2 -16
- package/src/components/Tabs/index.js +0 -3
- package/src/components/Tag/Tag.js +0 -1
- package/src/components/Tag/columnScopeTagHelpers.js +0 -2
- package/src/components/Textarea/index.js +1 -8
- package/src/components/Toggle/Toggle.js +1 -5
- package/src/components/Toggle/ToggleGroup.js +1 -3
- package/src/components/ToggleButton/index.js +1 -3
- package/src/components/Tree/TreeDropdown/index.js +2 -130
- package/src/components/Tree/treeUtils.js +0 -4
- package/src/components/WindowModal/WindowModal.js +1 -14
- package/src/components/WindowModal/useStacking.js +0 -7
- package/src/components/icons/bullet-chart.js +0 -4
- package/src/components/icons/icon-style.js +0 -4
- package/src/components/icons/index.js +26 -36
- package/src/components/icons/range-bar.js +0 -5
- package/src/components/icons/star.js +0 -1
- package/src/components/twUtils.js +3 -12
- package/src/components/ui/calendar.js +1 -9
- package/src/components/ui/combobox.js +0 -4
- package/src/components/utils/captureTabNavigation/getFocusableChildren.js +0 -1
- package/src/components/utils/useDraggable.js +0 -4
- package/src/components/utils/useProperty.js +0 -18
- package/src/devTools/index.js +0 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/LMEmitter.js +0 -5
- package/src/layout-manager/src/destructurePivotColumnId.js +0 -19
- package/src/layout-manager/src/index.js +2 -182
- package/src/layout-manager/src/isLayoutEqual.js +0 -1
- package/src/layout-manager/src/isPivotColumnTotal.js +0 -2
- package/src/layout-manager/src/normalizeLayoutModel.js +0 -27
- package/src/layout-manager/src/simplifyLayoutModel.js +0 -11
- package/src/layout-manager/src/sortColumnIdsByOrder.js +2 -12
- package/src/lib/utils.js +0 -1
- package/src/migration/AdaptableUpgradeHelper.js +0 -2
- package/src/migration/VersionUpgrade17.js +0 -33
- package/src/migration/VersionUpgrade20.js +1 -21
- package/src/migration/VersionUpgrade21.js +0 -3
- package/src/migration/VersionUpgrade22.js +0 -11
- package/src/migration/VersionUpgrade23.js +0 -73
- package/src/parser/src/evaluator.js +0 -1
- package/src/parser/src/index.js +0 -1
- package/src/parser/src/parser.js +4 -103
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +0 -5
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +0 -2
- package/src/parser/src/tokenizer.js +0 -2
- package/src/parser/src/utils.js +0 -1
- package/src/renderReactRoot.js +0 -12
- package/src/setupDevTools.js +0 -6
- package/src/twMerge.js +0 -1
- package/src/types.d.ts +1 -1
- package/src/types.js +0 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/NamedObject.d.ts +0 -10
- package/src/AdaptableState/Common/NamedObject.js +0 -2
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +0 -35
- package/src/Utilities/ExpressionFunctions/groupingMap.js +0 -103
- package/src/Utilities/Interface/AdaptableToolPanelContext.d.ts +0 -4
- package/src/Utilities/Interface/AdaptableToolPanelContext.js +0 -2
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +0 -20
- package/src/Utilities/Services/Interface/IMetamodelService.js +0 -2
- package/src/Utilities/Services/MetamodelService.d.ts +0 -17
- package/src/Utilities/Services/MetamodelService.js +0 -167
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +0 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +0 -104
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +0 -38
- package/src/View/Components/Buttons/EntityListActionButtons.js +0 -47
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.d.ts +0 -12
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +0 -72
- package/src/View/Components/EntityRowItem.d.ts +0 -7
- package/src/View/Components/EntityRowItem.js +0 -12
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +0 -3
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +0 -9
- package/src/View/Components/ModuleProfile.d.ts +0 -8
- package/src/View/Components/ModuleProfile.js +0 -15
- package/src/View/Components/ModuleSummary/ModuleDetail.d.ts +0 -23
- package/src/View/Components/ModuleSummary/ModuleDetail.js +0 -20
- package/src/View/Components/ModuleSummary/ModuleHeader.d.ts +0 -15
- package/src/View/Components/ModuleSummary/ModuleHeader.js +0 -20
- package/src/View/Components/ModuleSummary/SummaryRowItem.d.ts +0 -7
- package/src/View/Components/ModuleSummary/SummaryRowItem.js +0 -17
- package/src/View/Components/SharedProps/ModuleSummaryProps.d.ts +0 -9
- package/src/View/Components/SharedProps/ModuleSummaryProps.js +0 -2
- package/src/View/Components/SharedProps/ToolPanelModuleViewPopupProps.d.ts +0 -13
- package/src/View/Components/SharedProps/ToolPanelModuleViewPopupProps.js +0 -2
- package/src/View/Components/SharedProps/ToolbarModuleViewPopupProps.d.ts +0 -14
- package/src/View/Components/SharedProps/ToolbarModuleViewPopupProps.js +0 -2
- package/src/View/Components/StyleVisualItem.d.ts +0 -9
- package/src/View/Components/StyleVisualItem.js +0 -45
- package/src/View/Components/WizardSummaryPage.d.ts +0 -7
- package/src/View/Components/WizardSummaryPage.js +0 -22
- package/src/components/Accordion.d.ts +0 -7
- package/src/components/Accordion.js +0 -38
- package/src/components/FlexWithFooter.d.ts +0 -9
- package/src/components/FlexWithFooter.js +0 -15
- package/src/components/NotifyResize/index.d.ts +0 -9
- package/src/components/NotifyResize/index.js +0 -38
- package/src/components/PopupWithFooter.d.ts +0 -14
- package/src/components/PopupWithFooter.js +0 -15
- package/src/components/SelectableList/index.d.ts +0 -15
- package/src/components/SelectableList/index.js +0 -100
- package/src/components/SizedContainer/index.d.ts +0 -17
- package/src/components/SizedContainer/index.js +0 -23
- package/src/components/Table/index.d.ts +0 -4
- package/src/components/Table/index.js +0 -9
- package/src/components/WizardPanel/index.d.ts +0 -9
- package/src/components/WizardPanel/index.js +0 -10
- package/src/components/icons/align-justify.d.ts +0 -3
- package/src/components/icons/align-justify.js +0 -6
- package/src/components/icons/column-info.d.ts +0 -3
- package/src/components/icons/column-info.js +0 -6
- package/src/components/icons/gradient-column.d.ts +0 -3
- package/src/components/icons/gradient-column.js +0 -6
- package/src/components/icons/invalid.d.ts +0 -3
- package/src/components/icons/invalid.js +0 -6
- package/src/components/icons/logout copy.d.ts +0 -3
- package/src/components/icons/logout copy.js +0 -6
- package/src/components/icons/smart-edit.d.ts +0 -3
- package/src/components/icons/smart-edit.js +0 -6
- package/src/components/icons/team-share.d.ts +0 -3
- package/src/components/icons/team-share.js +0 -6
- package/src/components/icons/unchecked.d.ts +0 -3
- package/src/components/icons/unchecked.js +0 -6
- package/src/components/icons/user-filter.d.ts +0 -3
- package/src/components/icons/user-filter.js +0 -6
- package/src/components/utils/useContainerScrollObserver/index.d.ts +0 -6
- package/src/components/utils/useContainerScrollObserver/index.js +0 -83
- package/src/components/utils/useGlobalEvent.d.ts +0 -1
- package/src/components/utils/useGlobalEvent.js +0 -12
- package/src/components/utils/useLatest.d.ts +0 -1
- package/src/components/utils/useLatest.js +0 -10
- package/src/components/utils/usePropState.d.ts +0 -2
- package/src/components/utils/usePropState.js +0 -11
- package/src/metamodel/adaptable-metamodel-model.d.ts +0 -26
- package/src/metamodel/adaptable-metamodel-model.js +0 -2
- package/src/metamodel/adaptable.metamodel.d.ts +0 -6244
- package/src/metamodel/adaptable.metamodel.js +0 -1
|
@@ -9,10 +9,7 @@ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/
|
|
|
9
9
|
const react_redux_1 = require("react-redux");
|
|
10
10
|
const EditChartButton = (props) => {
|
|
11
11
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(ButtonEdit_1.ButtonEdit, { iconSize: props.iconSize, tooltip: "Edit Chart",
|
|
13
|
-
// It gets complicated when a chart is both open and opened in edit wizard
|
|
14
|
-
// There an be conflicts between the two open charts (preview and main) and the changes to the active chart may not be syncronized correctly.
|
|
15
|
-
disabled: !props.chart || props.isOpen, accessLevel: props.accessLevel, onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ChartingModuleId, 'Chart', {
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(ButtonEdit_1.ButtonEdit, { iconSize: props.iconSize, tooltip: "Edit Chart", disabled: !props.chart || props.isOpen, accessLevel: props.accessLevel, onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ChartingModuleId, 'Chart', {
|
|
16
13
|
action: 'Edit',
|
|
17
14
|
value: props.chart,
|
|
18
15
|
source: 'Toolbar',
|
|
@@ -47,9 +47,6 @@ const ShowExternalChartButton = (props) => {
|
|
|
47
47
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
48
48
|
const chartingOptions = adaptable.adaptableOptions?.chartingOptions;
|
|
49
49
|
const chartContainers = chartingOptions?.chartContainers;
|
|
50
|
-
/**
|
|
51
|
-
* Need to refresh after the chart is closed/opened
|
|
52
|
-
*/
|
|
53
50
|
const { isOpen, showChart: onShow, hideChart: onHide, } = (0, useExternalChartState_1.useExternalChartState)(props.chartDefinition);
|
|
54
51
|
const containerOptions = chartContainers
|
|
55
52
|
? chartContainers?.map((contianerDef) => ({
|
|
@@ -43,13 +43,8 @@ const useAgChartState = (chartDefinition) => {
|
|
|
43
43
|
}
|
|
44
44
|
const chartRef = adaptable.api.chartingApi.getChartRef(chartDefinition.Model.chartId);
|
|
45
45
|
if (chartRef) {
|
|
46
|
-
// chart alredy opened
|
|
47
46
|
return;
|
|
48
47
|
}
|
|
49
|
-
/**
|
|
50
|
-
* When using a custom container, make sure multiple charts are not opened in the same container.
|
|
51
|
-
* If multple charts are opened in the same contianer, it infinitly adds the charts to the container.
|
|
52
|
-
*/
|
|
53
48
|
if (chartContainer && element) {
|
|
54
49
|
if (chartContainer.chartsDisplay !== 'multiple') {
|
|
55
50
|
closeAlreadyOpenedChartsInContainer(element);
|
|
@@ -23,16 +23,13 @@ const useChartingElements = ({ elementType, accessLevel, size = 'normal', }) =>
|
|
|
23
23
|
const chartingOptions = adaptable.adaptableOptions?.chartingOptions;
|
|
24
24
|
const chartContainers = chartingOptions?.chartContainers;
|
|
25
25
|
const [selectedChartId, setSelectedChartId] = React.useState(() => {
|
|
26
|
-
// ID is kept in state becaus that does not change, the definition might change
|
|
27
26
|
return allChartDefinitions.length > 0 ? allChartDefinitions[0].Uuid : null;
|
|
28
27
|
});
|
|
29
28
|
const selectedChart = allChartDefinitions.find((chart) => chart.Uuid === selectedChartId);
|
|
30
29
|
const isAgChart = (0, ChartingState_1.isAgChartDefinition)(selectedChart);
|
|
31
30
|
const chartAccessLevel = AdaptableHelper_1.default.getAccessLevelForObject(selectedChart, accessLevel);
|
|
32
31
|
const [selectedContainer, setSelectedContainer] = React.useState(null);
|
|
33
|
-
// Need to always call as they the rule for hooks
|
|
34
32
|
const { isOpen: isAgChartOpen, showChart: showAgChart, closeChart: hideAgChart, } = (0, useAgChartState_1.useAgChartState)(isAgChart ? selectedChart : undefined);
|
|
35
|
-
// Need to always call as they the rule for hooks
|
|
36
33
|
const { isOpen: isExternalChartOpened, showChart: showExternalChart, hideChart: hideExternalChart, } = (0, useExternalChartState_1.useExternalChartState)(!isAgChart ? selectedChart : undefined);
|
|
37
34
|
const isOpen = isAgChart ? isAgChartOpen : isExternalChartOpened;
|
|
38
35
|
const showChart = isAgChart ? showAgChart : showExternalChart;
|
|
@@ -57,7 +54,6 @@ const useChartingElements = ({ elementType, accessLevel, size = 'normal', }) =>
|
|
|
57
54
|
selectedChartValue = 'No Charts';
|
|
58
55
|
}
|
|
59
56
|
React.useEffect(() => {
|
|
60
|
-
// select first
|
|
61
57
|
if (!selectedChart && chartDefinitions.length > 0) {
|
|
62
58
|
setSelectedChartId(chartDefinitions[0].Uuid);
|
|
63
59
|
}
|
|
@@ -4,12 +4,9 @@ exports.useExternalChartState = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
7
|
-
// need to trigger other show-chart buttons to close/hide
|
|
8
7
|
const buttonChangeSubscribers = [];
|
|
9
8
|
const useExternalChartState = (chartDefinition) => {
|
|
10
9
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
11
|
-
// needs to update when ever a chart is:
|
|
12
|
-
// - opened, hidden
|
|
13
10
|
const [isOpen, setIsOpen] = react_1.default.useState(() => {
|
|
14
11
|
return (chartDefinition &&
|
|
15
12
|
adaptable.api.chartingApi.internalApi.isExternalChartOpened(chartDefinition));
|
|
@@ -27,7 +24,6 @@ const useExternalChartState = (chartDefinition) => {
|
|
|
27
24
|
updateIsOpen();
|
|
28
25
|
};
|
|
29
26
|
buttonChangeSubscribers.push(subscriber);
|
|
30
|
-
// clear own subscriptions
|
|
31
27
|
return () => {
|
|
32
28
|
const index = buttonChangeSubscribers.indexOf(subscriber);
|
|
33
29
|
if (index > -1) {
|
|
@@ -38,14 +34,12 @@ const useExternalChartState = (chartDefinition) => {
|
|
|
38
34
|
return {
|
|
39
35
|
showChart: (container) => {
|
|
40
36
|
adaptable.api.chartingApi.internalApi.onShowExternalChart(chartDefinition, container);
|
|
41
|
-
// The small delay allows the library to render the chart before the button is updated
|
|
42
37
|
requestAnimationFrame(() => {
|
|
43
38
|
buttonChangeSubscribers.forEach((subscriber) => subscriber());
|
|
44
39
|
});
|
|
45
40
|
},
|
|
46
41
|
hideChart: () => {
|
|
47
42
|
adaptable.api.chartingApi.internalApi.onHideExternalChart(chartDefinition);
|
|
48
|
-
// The small delay allows the library to destroy the chart before the button is updated
|
|
49
43
|
requestAnimationFrame(() => {
|
|
50
44
|
buttonChangeSubscribers.forEach((subscriber) => subscriber());
|
|
51
45
|
});
|
|
@@ -19,19 +19,15 @@ const BASE_CLASS_NAME = 'ab-AdaptableColumns';
|
|
|
19
19
|
const domProps = {
|
|
20
20
|
className: 'twa:flex-1 twa:min-h-0 twa:w-full',
|
|
21
21
|
};
|
|
22
|
-
// TODOS:
|
|
23
|
-
// - use column from props as initial value
|
|
24
|
-
// - table summary
|
|
25
|
-
// - access level for edit/new buttons
|
|
26
22
|
const MODULES_WITH_COLUMN = [
|
|
27
|
-
'Alert',
|
|
28
|
-
'CalculatedColumn',
|
|
29
|
-
'CustomSort',
|
|
30
|
-
'FormatColumn',
|
|
23
|
+
'Alert',
|
|
24
|
+
'CalculatedColumn',
|
|
25
|
+
'CustomSort',
|
|
26
|
+
'FormatColumn',
|
|
31
27
|
'FlashingCell',
|
|
32
|
-
'PlusMinus',
|
|
33
|
-
'Shortcut',
|
|
34
|
-
'StyledColumn',
|
|
28
|
+
'PlusMinus',
|
|
29
|
+
'Shortcut',
|
|
30
|
+
'StyledColumn',
|
|
35
31
|
];
|
|
36
32
|
const MODULES_WITH_SCOPE = [
|
|
37
33
|
'Alert',
|
|
@@ -40,7 +36,6 @@ const MODULES_WITH_SCOPE = [
|
|
|
40
36
|
'Shortcut',
|
|
41
37
|
'StyledColumn',
|
|
42
38
|
];
|
|
43
|
-
/** Column Info summary only — shows the resolved default width when layout has no explicit sizing. */
|
|
44
39
|
const formatColumnInfoSummaryWidth = (columnId, sizing, resolveDefaultWidth) => {
|
|
45
40
|
const explicit = (0, columnLayoutHelpers_1.formatColumnInspectorSizing)(columnId, sizing, resolveDefaultWidth);
|
|
46
41
|
if (explicit !== 'Default') {
|
|
@@ -197,13 +192,9 @@ const ModuleView = (props) => {
|
|
|
197
192
|
const EditWizard = module?.getViewProperties?.()?.getEditWizard?.();
|
|
198
193
|
const column = adaptable.api.columnApi.getColumnWithColumnId(props.selectedColumnId);
|
|
199
194
|
const allItems = module?.toViewAll?.();
|
|
200
|
-
// Dont show calculated column for non calc cols
|
|
201
195
|
if (module.moduleInfo.ModuleName == 'CalculatedColumn' && !column.isCalculatedColumn) {
|
|
202
196
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
203
197
|
}
|
|
204
|
-
// if (MODULES_WITH_VIEW_ONLY.includes(props.moduleName) && !allItems?.length) {
|
|
205
|
-
// return <></>;
|
|
206
|
-
// }
|
|
207
198
|
const itemsInScope = allItems.filter((item) => {
|
|
208
199
|
if ('Scope' in item.abObject) {
|
|
209
200
|
return adaptable.api.columnScopeApi.isColumnInScope(column, item.abObject.Scope);
|
|
@@ -219,7 +210,6 @@ const ModuleView = (props) => {
|
|
|
219
210
|
const handleWizardClose = React.useCallback(() => {
|
|
220
211
|
setIsWizardOpen(false);
|
|
221
212
|
}, []);
|
|
222
|
-
// filter out items with scope
|
|
223
213
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { "data-name": module.moduleInfo.ModuleName, className: `${BASE_CLASS_NAME}__module-list twa:mb-4`, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { children: [(0, jsx_runtime_1.jsx)("b", { className: `${BASE_CLASS_NAME}__header`, children: module.moduleInfo.FriendlyName }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" }), (0, jsx_runtime_1.jsx)(ButtonNew_1.ButtonNew, { onClick: () => setIsWizardOpen(true), children: "New" })] }), itemsInScope?.length ? (0, jsx_runtime_1.jsx)(AdaptableObjectList_1.AdaptableObjectList, { items: itemsInScope, module: module }) : null, isWizardOpen && EditWizard && ((0, jsx_runtime_1.jsx)(EditWizard, { popupParams: {
|
|
224
214
|
column,
|
|
225
215
|
action: 'New',
|
|
@@ -15,14 +15,6 @@ const AdaptableInput_1 = tslib_1.__importDefault(require("../Components/Adaptabl
|
|
|
15
15
|
const DisplayFormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/DisplayFormatHelper"));
|
|
16
16
|
const Flex_1 = require("../../components/Flex");
|
|
17
17
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
18
|
-
// Edit Mode
|
|
19
|
-
// [author] [edit, delete]
|
|
20
|
-
// [text-editor] * this is different
|
|
21
|
-
// [show-all-comments-button]
|
|
22
|
-
// View Mode
|
|
23
|
-
// [author] [edit, delete]
|
|
24
|
-
// [text]
|
|
25
|
-
// [show-all-comments-button]
|
|
26
18
|
const CommentsEditor = (props) => {
|
|
27
19
|
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
28
20
|
const showCloseButton = api.optionsApi.getCommentOptions()?.showPopupCloseButton ?? true;
|
|
@@ -33,13 +25,6 @@ const CommentsEditor = (props) => {
|
|
|
33
25
|
const commentThread = (0, react_redux_1.useSelector)((state) => CommentsRedux.GetCellCommentSelector(state.Comment, cellAddress));
|
|
34
26
|
const isReadOnlyModule = api.entitlementApi.getEntitlementAccessLevelForModule('Comment') === GeneralConstants_1.ACCESS_LEVEL_READ_ONLY;
|
|
35
27
|
const [activeEditingComment, setActiveEditingComment] = React.useState(() => {
|
|
36
|
-
/**
|
|
37
|
-
* When opening the popup and there is only one comment, we want to open it in edit mode.
|
|
38
|
-
* This happens usualy when a new comment is added via cell menu.
|
|
39
|
-
*/
|
|
40
|
-
// if (cellComments?.Comments?.length === 1 && cellComments?.Comments[0].Value === '') {
|
|
41
|
-
// return cellComments?.Comments[0].Uuid;
|
|
42
|
-
// }
|
|
43
28
|
return null;
|
|
44
29
|
});
|
|
45
30
|
const [newCommentText, setNewCommentText] = React.useState('');
|
|
@@ -72,7 +57,7 @@ const CommentsEditor = (props) => {
|
|
|
72
57
|
}
|
|
73
58
|
const isOwnComment = comment?.Author?.UserName
|
|
74
59
|
? comment?.Author?.UserName === userId
|
|
75
|
-
: true;
|
|
60
|
+
: true;
|
|
76
61
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-Comment twa:p-2", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:mb-2", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": "comment-username", className: "twa:text-3 twa:font-bold", children: comment?.Author?.UserName }), comment.Timestamp && ((0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": "comment-timestamp", className: "twa:text-2", children: formatDate(comment.Timestamp, api.commentApi.internalApi.getCommentsDateFormat()) }))] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { variant: "text", icon: "edit", disabled: !isOwnComment || isReadOnlyModule, onClick: () => setActiveEditingComment(comment.Uuid) }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { variant: "text", icon: "delete", disabled: !isOwnComment || isReadOnlyModule, onClick: () => {
|
|
77
62
|
api.commentApi.deleteComment(comment, cellAddress);
|
|
78
63
|
requestAnimationFrame(() => {
|
|
@@ -6,7 +6,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const Icon_1 = require("../../../components/Icon");
|
|
7
7
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
8
8
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
9
|
-
/** Renders {@link SimpleButton} with Adaptable custom/system icon preparation. */
|
|
10
9
|
const AdaptableButtonComponent = (props) => {
|
|
11
10
|
let icon = props.icon;
|
|
12
11
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
@@ -6,9 +6,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const GeneralConstants_1 = require("../../../Utilities/Constants/GeneralConstants");
|
|
8
8
|
const AdaptableButtonComponent_1 = require("./AdaptableButtonComponent");
|
|
9
|
-
/**
|
|
10
|
-
* Default variant/tone when `buttonStyle` omits them — differs by surface by design.
|
|
11
|
-
*/
|
|
12
9
|
exports.ADAPTABLE_BUTTON_SURFACE_DEFAULTS = {
|
|
13
10
|
dashboard: { variant: 'text', tone: 'none' },
|
|
14
11
|
customToolbar: { variant: 'outlined', tone: 'neutral' },
|
|
@@ -11,23 +11,16 @@ const AdaptableDateInput = React.forwardRef(function AdaptableDateInputCmp(props
|
|
|
11
11
|
const dateInputOptions = (0, AdaptableContext_1.useAdaptable)().adaptableOptions.userInterfaceOptions.dateInputOptions;
|
|
12
12
|
const { value: _, defaultValue: __, onChange, required, disabled, showClearButton, ...inputProps } = props;
|
|
13
13
|
const [value, setValue] = (0, useProperty_1.default)(props, 'value', undefined, {
|
|
14
|
-
onChange: (dateString) =>
|
|
15
|
-
// wrap date value in ChangeEvent in order to keep the external API unchanged
|
|
16
|
-
props.onChange?.({
|
|
14
|
+
onChange: (dateString) => props.onChange?.({
|
|
17
15
|
target: {
|
|
18
|
-
// ALWAYS trigger onChange with the ISO format
|
|
19
16
|
value: dateString,
|
|
20
17
|
},
|
|
21
18
|
}),
|
|
22
19
|
});
|
|
23
20
|
const dateValue = value ? (0, DateHelper_1.parseDateValue)(value) : null;
|
|
24
21
|
const datepickerProps = {
|
|
25
|
-
// this is OK as long as we do not support range datepicker
|
|
26
22
|
value: dateValue,
|
|
27
|
-
onChange: (dateValue) =>
|
|
28
|
-
// convert to ISO8601 string format
|
|
29
|
-
// see https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#date_strings
|
|
30
|
-
setValue((0, DateHelper_1.dateToISO)(dateValue) ?? ''),
|
|
23
|
+
onChange: (dateValue) => setValue((0, DateHelper_1.dateToISO)(dateValue) ?? ''),
|
|
31
24
|
required,
|
|
32
25
|
disabled,
|
|
33
26
|
dateProps: {
|
|
@@ -4,10 +4,6 @@ exports.AdaptableIconComponent = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Icon_1 = require("../../../components/Icon");
|
|
6
6
|
const useCustomIcon_1 = require("./useCustomIcon");
|
|
7
|
-
/**
|
|
8
|
-
* This is a connected componnet.
|
|
9
|
-
* It needs to be used only inside adaptable context.
|
|
10
|
-
*/
|
|
11
7
|
const AdaptableIconComponent = (props) => {
|
|
12
8
|
const icon = (0, useCustomIcon_1.useCustomIcon)(props.icon);
|
|
13
9
|
return (0, jsx_runtime_1.jsx)(Icon_1.IconComponent, { ...props, icon: icon });
|
|
@@ -4,9 +4,6 @@ exports.AdaptableIconSelector = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const IconSelector_1 = require("../../../components/IconSelector");
|
|
6
6
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
7
|
-
/**
|
|
8
|
-
* This component connects to adaptable to retrieve custom icons
|
|
9
|
-
*/
|
|
10
7
|
const AdaptableIconSelector = (props) => {
|
|
11
8
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
12
9
|
const customIcons = adaptable.api.userInterfaceApi.getCustomIcons();
|
|
@@ -10,11 +10,9 @@ const AdaptableInput = React.forwardRef((props, ref) => {
|
|
|
10
10
|
const useNativeInputDate = (0, AdaptableContext_1.useAdaptable)().adaptableOptions.userInterfaceOptions?.dateInputOptions?.useNativeInput;
|
|
11
11
|
const { showClearButton, ...inputProps } = props;
|
|
12
12
|
if (props.type === 'date' && !useNativeInputDate) {
|
|
13
|
-
// use AdapTable date input
|
|
14
13
|
return ((0, jsx_runtime_1.jsx)(AdaptableDateInput_1.default, { showClearButton: showClearButton, ...inputProps, ref: ref }));
|
|
15
14
|
}
|
|
16
15
|
else {
|
|
17
|
-
// native input
|
|
18
16
|
return (0, jsx_runtime_1.jsx)(Input_1.default, { ...inputProps, ref: ref });
|
|
19
17
|
}
|
|
20
18
|
});
|
|
@@ -13,13 +13,6 @@ const DENSITY_CLASS = {
|
|
|
13
13
|
Normal: 'ab-Badge--normal',
|
|
14
14
|
Comfortable: 'ab-Badge--comfortable',
|
|
15
15
|
};
|
|
16
|
-
/**
|
|
17
|
-
* Maps a {@link BadgePillStyle} to React/CSS properties for the pill.
|
|
18
|
-
*
|
|
19
|
-
* Intentionally does **not** read corner radius (owned by `Shape`), text
|
|
20
|
-
* alignment (owned by `BadgeStyle.Font.Alignment` at the cell level),
|
|
21
|
-
* `ClassName`, or `FontSize` — none make sense on a pill.
|
|
22
|
-
*/
|
|
23
16
|
const pillStyleToCss = (pill) => {
|
|
24
17
|
const result = {};
|
|
25
18
|
if (!pill)
|
|
@@ -49,7 +42,6 @@ const pillStyleToCss = (pill) => {
|
|
|
49
42
|
}
|
|
50
43
|
if (pill.BorderColor) {
|
|
51
44
|
result.borderColor = pill.BorderColor;
|
|
52
|
-
// Subtler 1px outline; pills are usually only ~20px tall.
|
|
53
45
|
result.borderWidth = 1;
|
|
54
46
|
result.borderStyle = 'solid';
|
|
55
47
|
}
|
|
@@ -7,8 +7,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
7
7
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
8
8
|
class ButtonNewPage extends React.Component {
|
|
9
9
|
render() {
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { "data-name": "new-page", tooltip: "New Page", iconSize: 20, icon: "newpage"
|
|
11
|
-
, variant: "text", ...this.props }));
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { "data-name": "new-page", tooltip: "New Page", iconSize: 20, icon: "newpage", variant: "text", ...this.props }));
|
|
12
11
|
}
|
|
13
12
|
}
|
|
14
13
|
exports.ButtonNewPage = ButtonNewPage;
|
|
@@ -18,7 +18,7 @@ const ensurePortalElement = (className) => {
|
|
|
18
18
|
}
|
|
19
19
|
portalElement = document.createElement('div');
|
|
20
20
|
portalElement.style.position = 'absolute';
|
|
21
|
-
portalElement.style.zIndex = '4';
|
|
21
|
+
portalElement.style.zIndex = '4';
|
|
22
22
|
portalElement.style.top = '0px';
|
|
23
23
|
portalElement.style.left = '0px';
|
|
24
24
|
if (className) {
|
|
@@ -43,7 +43,6 @@ exports.CellPopup = React.forwardRef((props, ref) => {
|
|
|
43
43
|
const showOverlayOptions = {
|
|
44
44
|
id: OVERLAY_ID,
|
|
45
45
|
alignPosition: [
|
|
46
|
-
// overlay - target
|
|
47
46
|
['TopLeft', 'TopRight'],
|
|
48
47
|
['TopRight', 'TopLeft'],
|
|
49
48
|
['TopCenter', 'BottomCenter'],
|
|
@@ -15,10 +15,6 @@ const useColumnFilterLocation = () => {
|
|
|
15
15
|
return React.useContext(ColumnFilterLocationContext) ?? 'columnMenu';
|
|
16
16
|
};
|
|
17
17
|
exports.useColumnFilterLocation = useColumnFilterLocation;
|
|
18
|
-
/**
|
|
19
|
-
* This wrapper knows about predicates.
|
|
20
|
-
* It transforms predicates in QlPredicates.
|
|
21
|
-
*/
|
|
22
18
|
const AdaptableColumnFilter = (props) => {
|
|
23
19
|
const { qlPredicate, qlPredicateDefs, columnFilter, handlePredicateChange } = (0, useAdaptableFilterWrapper_1.useAdaptableFilterWrapper)(props.columnId, 'FilterForm');
|
|
24
20
|
const filterContent = ((0, jsx_runtime_1.jsx)(exports.ColumnFilterLocationProvider, { value: props.location, children: (0, jsx_runtime_1.jsx)(ColumnFilter_1.ColumnFilterComponent, { location: props.location, wrapperProps: props.wrapperProps, columnId: props.columnId, predicate: qlPredicate, predicateDefs: qlPredicateDefs, disabled: columnFilter?.IsSuspended, onPredicateChange: React.useCallback((predicate) => {
|
|
@@ -7,10 +7,6 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
7
7
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
8
8
|
const FloatingFilter_1 = require("./FloatingFilter");
|
|
9
9
|
const useAdaptableFilterWrapper_1 = require("./useAdaptableFilterWrapper");
|
|
10
|
-
/**
|
|
11
|
-
* This wrapper knows about predicates.
|
|
12
|
-
* It transforms predicates in QlPredicates.
|
|
13
|
-
*/
|
|
14
10
|
const AdaptableFloatingFilter = (props) => {
|
|
15
11
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
16
12
|
const { qlPredicate, qlPredicateDefs, columnFilter, column, handlePredicateChange, handleOnChange, handleClear, } = (0, useAdaptableFilterWrapper_1.useAdaptableFilterWrapper)(props.Column.columnId, 'FilterBar');
|
|
@@ -27,46 +27,19 @@ const ColumnFilterPredicateDropdown = (props) => {
|
|
|
27
27
|
const operator = props.predicate?.operator;
|
|
28
28
|
const isAndOr = operator === 'AND' || operator === 'OR';
|
|
29
29
|
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex twa:items-center ab-ColumnFilterPredicateDropdown twa:p-0.5", style: {
|
|
30
|
-
//@ts-ignore ignore
|
|
31
30
|
'--ab-color-input-background': 'var(--ab-color-primary)',
|
|
32
|
-
}, children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { "data-name": "filter-predicate-dropdown", extraWidthChars: 8,
|
|
33
|
-
// The trigger lives inside ag-grid's column menu, which closes itself
|
|
34
|
-
// on mousedowns outside its DOM subtree. Since the popup is portaled
|
|
35
|
-
// to `document.body`, mousedowns inside it would otherwise bubble to
|
|
36
|
-
// `document` and unmount the trigger mid-interaction (causing the
|
|
37
|
-
// popup to re-align to (0,0) before disappearing).
|
|
38
|
-
stopMouseDownPropagation: true, showItemTooltip: true, className: predicateDef ? `twa:min-w-[10rem]` : null, onValueChange: (value) => {
|
|
31
|
+
}, children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { "data-name": "filter-predicate-dropdown", extraWidthChars: 8, stopMouseDownPropagation: true, showItemTooltip: true, className: predicateDef ? `twa:min-w-[10rem]` : null, onValueChange: (value) => {
|
|
39
32
|
props.onPredicateChange({
|
|
40
33
|
operator: value,
|
|
41
34
|
args: [],
|
|
42
35
|
});
|
|
43
|
-
}, items: options,
|
|
44
|
-
// For the "Add Condition" picker the current predicate is the top-level
|
|
45
|
-
// AND/OR predicate, which is not a selectable item. Use `null` (a proper
|
|
46
|
-
// controlled empty value) plus a placeholder rather than a fake string
|
|
47
|
-
// value: passing a non-item value makes base-ui's Select reconcile and
|
|
48
|
-
// fire a spurious `onValueChange` when the items change (e.g. switching
|
|
49
|
-
// the filter to another column), which previously crashed.
|
|
50
|
-
placeholder: "Add Condition", value: isAndOr ? null : props.predicate?.operator }) }));
|
|
36
|
+
}, items: options, placeholder: "Add Condition", value: isAndOr ? null : props.predicate?.operator }) }));
|
|
51
37
|
};
|
|
52
38
|
const ColumnFilterEditor = (props) => {
|
|
53
39
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mb-3 twa:overflow-x-hidden twa:p-0.5", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:mb-2", children: [(0, jsx_runtime_1.jsx)(ColumnFilterPredicateDropdown, { columnId: props.columnId, disabled: props.disabled, predicate: props.predicate, predicateDefs: props.predicateDefs, onPredicateChange: props.onPredicateChange }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2", children: (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { disabled: props.deleteDisabled, onClick: props.onDelete, variant: "text", icon: "delete" }) })] }), (0, jsx_runtime_1.jsx)(ColumnFilterInputList_1.ColumnFilterInputList, { columnId: props.columnId, disabled: props.disabled, predicate: props.predicate, onPredicateChange: props.onPredicateChange, predicateDefs: props.predicateDefs })] }));
|
|
54
40
|
};
|
|
55
41
|
const AndOrInput = (props) => {
|
|
56
|
-
return (
|
|
57
|
-
// <Select
|
|
58
|
-
// value={props.operator}
|
|
59
|
-
// onChange={props.onChange}
|
|
60
|
-
// options={[
|
|
61
|
-
// { label: 'AND', value: 'AND' },
|
|
62
|
-
// { label: 'OR', value: 'OR' },
|
|
63
|
-
// ]}
|
|
64
|
-
// />
|
|
65
|
-
((0, jsx_runtime_1.jsxs)(
|
|
66
|
-
Flex_1.Flex,
|
|
67
|
-
{ className: "twa:flex-1", children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:mr-2", onClick: () => props.onChange('AND'), checked: props.operator === 'AND', children: "AND" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:mr-2", onClick: () => props.onChange('OR'), checked: props.operator === 'OR', children: "OR" })] }
|
|
68
|
-
))
|
|
69
|
-
);
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:flex-1", children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:mr-2", onClick: () => props.onChange('AND'), checked: props.operator === 'AND', children: "AND" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:mr-2", onClick: () => props.onChange('OR'), checked: props.operator === 'OR', children: "OR" })] }));
|
|
70
43
|
};
|
|
71
44
|
const ColumnFilterComponent = (props) => {
|
|
72
45
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
@@ -76,13 +49,9 @@ const ColumnFilterComponent = (props) => {
|
|
|
76
49
|
React.useEffect(() => {
|
|
77
50
|
if (props.location !== 'columnMenu')
|
|
78
51
|
return;
|
|
79
|
-
// when the location is columnMenu, and this is not displayed
|
|
80
|
-
// inside the ColumnFilterWindow, we want to focus on the first dropdown
|
|
81
52
|
const dropdown = contentWrapperRef.current?.querySelector('[data-name="filter-predicate-dropdown"]');
|
|
82
53
|
dropdown?.focus();
|
|
83
54
|
}, [props.location]);
|
|
84
|
-
// When rendered inside ag-grid's column menu, Tabbing would otherwise escape
|
|
85
|
-
// to the surrounding menu/grid. Trap focus so Tab / Shift+Tab cycle within the filter.
|
|
86
55
|
const handleFocusTrap = React.useCallback((e) => {
|
|
87
56
|
if (props.location !== 'columnMenu') {
|
|
88
57
|
return;
|
|
@@ -95,8 +64,6 @@ const ColumnFilterComponent = (props) => {
|
|
|
95
64
|
setPredicateNotYetApplied(undefined);
|
|
96
65
|
};
|
|
97
66
|
const onPredicateChange = (predicate) => {
|
|
98
|
-
// even if manuallyApplyColumnFilter is false, when we explicitly clear the filter
|
|
99
|
-
// we want to apply the filter immediately
|
|
100
67
|
if (!manuallyApplyColumnFilter || !predicate) {
|
|
101
68
|
props.onPredicateChange(predicate);
|
|
102
69
|
}
|
|
@@ -112,7 +79,6 @@ const ColumnFilterComponent = (props) => {
|
|
|
112
79
|
const currentPredicate = currentPredicateRef.current;
|
|
113
80
|
const newPredicate = {
|
|
114
81
|
...currentPredicate,
|
|
115
|
-
// @ts-ignore
|
|
116
82
|
args: [...currentPredicate.args, { operator: predicateDef.operator, args: [] }],
|
|
117
83
|
};
|
|
118
84
|
onPredicateChange(newPredicate);
|
|
@@ -129,15 +95,10 @@ const ColumnFilterComponent = (props) => {
|
|
|
129
95
|
? props.predicate
|
|
130
96
|
: predicateNotYetApplied ?? props.predicate;
|
|
131
97
|
const currentPredicateRef = React.useRef(currentPredicate);
|
|
132
|
-
//#ref-predicate
|
|
133
98
|
currentPredicateRef.current = currentPredicate;
|
|
134
|
-
// Not sure how to check this but would be nice...
|
|
135
99
|
const isLastPredicateValid = true;
|
|
136
100
|
const filterPredicateDropdown = ((0, jsx_runtime_1.jsx)(ColumnFilterPredicateDropdown, { columnId: props.columnId, disabled: props.disabled, predicate: currentPredicate, predicateDefs: props.predicateDefs, onPredicateChange: (predicate) => {
|
|
137
101
|
const predicateDef = props.predicateDefs.find((predicateDef) => predicateDef.operator === predicate.operator);
|
|
138
|
-
// Guard against the select emitting a value that is not a known
|
|
139
|
-
// predicate for the current column (e.g. a stale/reconciled value while
|
|
140
|
-
// switching columns).
|
|
141
102
|
if (!predicateDef) {
|
|
142
103
|
return;
|
|
143
104
|
}
|
|
@@ -173,10 +134,6 @@ const ColumnFilterComponent = (props) => {
|
|
|
173
134
|
args: newArgs,
|
|
174
135
|
});
|
|
175
136
|
}, columnId: props.columnId, disabled: props.disabled, predicate: predicate, predicateDefs: props.predicateDefs, onPredicateChange: (predicate) => {
|
|
176
|
-
// #ref-predicate - for whatever reason
|
|
177
|
-
// the `currentPredicate` here would be one from an old render
|
|
178
|
-
// if we weren't using a ref. we're not using memo/usecallback here,
|
|
179
|
-
// so I don't understand why this is happening
|
|
180
137
|
const currentPredicate = currentPredicateRef.current;
|
|
181
138
|
const newArgs = [...currentPredicate.args];
|
|
182
139
|
newArgs[index] = predicate;
|
|
@@ -18,12 +18,10 @@ const ColumnFilterWindow = (props) => {
|
|
|
18
18
|
React.useEffect(() => {
|
|
19
19
|
setColumnId(initialColumnId);
|
|
20
20
|
}, [props.popupProps.value]);
|
|
21
|
-
// when the window is opened, focus on the column selector
|
|
22
21
|
React.useEffect(() => {
|
|
23
22
|
const focusable = columnSelectorWrapperRef.current?.querySelector('[data-name="column-selector"]');
|
|
24
23
|
focusable?.focus();
|
|
25
24
|
}, []);
|
|
26
|
-
// const onChange = props.popupProps.onChange;
|
|
27
25
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "ab-ColumnFilterWindow twa:flex-1 twa:min-h-0 twa:p-2 twa:h-full", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mb-2", ref: columnSelectorWrapperRef, children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Column", children: (0, jsx_runtime_1.jsx)(ColumnSelector_1.ColumnSelector, { renderOption: (column) => {
|
|
28
26
|
const columnFilter = api.filterApi.columnFilterApi.getColumnFilterForColumn(column.columnId);
|
|
29
27
|
const label = column.friendlyName ?? column.columnId;
|
|
@@ -16,14 +16,9 @@ const utils_2 = require("../../../lib/utils");
|
|
|
16
16
|
const lucide_react_1 = require("lucide-react");
|
|
17
17
|
const FloatingFilter = (props) => {
|
|
18
18
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
19
|
-
/**
|
|
20
|
-
* We always have a syntetic predicate with AND or OR, so the logic is easyer.
|
|
21
|
-
* The wrapper is in charge of constructing the correct column filter.
|
|
22
|
-
*/
|
|
23
19
|
const isMultiple = props.predicate?.args?.length > 1;
|
|
24
20
|
const isManualApply = adaptable.api.filterApi.columnFilterApi.internalApi.shouldManuallyApplyColumnFilter(props.columnId);
|
|
25
21
|
const isInlineEditable = !isMultiple && !isManualApply;
|
|
26
|
-
// only used when there is only one filter selected
|
|
27
22
|
let singleFilterPredicateDef = null;
|
|
28
23
|
if (props.predicate.args.length === 1) {
|
|
29
24
|
singleFilterPredicateDef = props.predicateDefs.find((predicateDef) => predicateDef.operator === props.predicate.args[0].operator);
|
|
@@ -54,8 +49,6 @@ const FloatingFilter = (props) => {
|
|
|
54
49
|
const renderTriggerValue = () => ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:min-w-0", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex twa:items-center", children: !isManualApply && singleFilterPredicateDef?.icon ? (singleFilterPredicateDef?.icon) : ((0, jsx_runtime_1.jsx)(AdaptableIconComponent_1.AdaptableIconComponent, { icon: { name: 'filter' } })) }), showLabel && ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-FloatingFilter-label twa:ml-2 twa:flex-1 twa:truncate", title: label, children: label }))] }));
|
|
55
50
|
let filterDropdown = null;
|
|
56
51
|
const filterDropdownSelect = ((0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { chevronIcon: null, "data-name": "floating-filter-button", ariaLabel: `Column Filter Operator Dropdown: current operator is ${label}`, size: "small", stopMouseDownPropagation: true, disabled: props.disabled, open: selectOpen, extraWidthChars: 5, onOpenChange: (nextOpen) => {
|
|
57
|
-
// In non-inline mode the select doesn't pick an operator inline; opening it
|
|
58
|
-
// instead opens the full column filter popup, so keep the dropdown closed.
|
|
59
52
|
if (nextOpen && !isInlineEditable) {
|
|
60
53
|
adaptable.api.filterApi.columnFilterApi.internalApi.openColumnFilterPopup(props.columnId);
|
|
61
54
|
return;
|
|
@@ -76,12 +69,6 @@ const FloatingFilter = (props) => {
|
|
|
76
69
|
const showClearButton = isMultiple ||
|
|
77
70
|
!(0, utils_1.isPredicateEmpty)(props.predicate.args[0], singleFilterPredicateDef);
|
|
78
71
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "ab-FloatingFilter twa:w-full", onKeyDownCapture: (e) => {
|
|
79
|
-
// AG Grid's header keyboard navigation intercepts Tab and calls preventDefault(),
|
|
80
|
-
// which prevents focus from moving between the controls inside the floating filter
|
|
81
|
-
// (operator select, filter input(s), expand/clear buttons). We handle Tab ourselves
|
|
82
|
-
// in the capture phase (before AG Grid's handlers) and move focus to the next/previous
|
|
83
|
-
// focusable control. At the boundaries we let the event through so AG Grid can move
|
|
84
|
-
// to the adjacent header cell.
|
|
85
72
|
if (e.key !== 'Tab') {
|
|
86
73
|
return;
|
|
87
74
|
}
|
|
@@ -97,24 +84,18 @@ const FloatingFilter = (props) => {
|
|
|
97
84
|
}
|
|
98
85
|
const nextIndex = currentIndex + (e.shiftKey ? -1 : 1);
|
|
99
86
|
if (nextIndex < 0 || nextIndex >= focusable.length) {
|
|
100
|
-
// boundary reached: let AG Grid navigate between header cells
|
|
101
87
|
return;
|
|
102
88
|
}
|
|
103
89
|
e.preventDefault();
|
|
104
90
|
e.nativeEvent.stopImmediatePropagation();
|
|
105
91
|
focusable[nextIndex]?.focus();
|
|
106
|
-
// Focusing the values combobox's input makes it set isFocused=true, which
|
|
107
|
-
// re-renders and can momentarily recreate the input, dropping focus to <body>.
|
|
108
|
-
// Re-resolve the target after the re-render and restore focus to it.
|
|
109
92
|
requestAnimationFrame(() => {
|
|
110
93
|
if (document.activeElement === document.body || document.activeElement === null) {
|
|
111
94
|
const refreshed = (0, utils_2.getFocusableElements)(wrapper);
|
|
112
95
|
refreshed[Math.min(nextIndex, refreshed.length - 1)]?.focus();
|
|
113
96
|
}
|
|
114
97
|
});
|
|
115
|
-
}, children: [filterDropdown, isInlineEditable && ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:flex-1 twa:min-w-0", children: (0, jsx_runtime_1.jsx)(FloatingFilterInputList_1.FloatingFilterInputList, { onKeyDown: props.onKeydown, columnId: props.columnId, disabled: props.disabled,
|
|
116
|
-
// It works only with a predicate
|
|
117
|
-
predicate: props.predicate.args[0], predicateDefs: props.predicateDefs, onPredicateChange: (predicate) => {
|
|
98
|
+
}, children: [filterDropdown, isInlineEditable && ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:flex-1 twa:min-w-0", children: (0, jsx_runtime_1.jsx)(FloatingFilterInputList_1.FloatingFilterInputList, { onKeyDown: props.onKeydown, columnId: props.columnId, disabled: props.disabled, predicate: props.predicate.args[0], predicateDefs: props.predicateDefs, onPredicateChange: (predicate) => {
|
|
118
99
|
props.onPredicateChange({
|
|
119
100
|
operator: props.predicate.operator,
|
|
120
101
|
args: [predicate],
|
|
@@ -25,12 +25,6 @@ const ColumnFilterInput = (props) => {
|
|
|
25
25
|
setHasFocus(false);
|
|
26
26
|
}, []);
|
|
27
27
|
React.useEffect(() => {
|
|
28
|
-
// only update if the input is not focused
|
|
29
|
-
// eg: value coming from a sidebar filter
|
|
30
|
-
// should be reflected in the input
|
|
31
|
-
// but if the input is focused, it means the user is typing
|
|
32
|
-
// so we don't want to update the input value from the outside (from state)
|
|
33
|
-
// but we leave liveValue as is in the local component state
|
|
34
28
|
if (!hasFocus) {
|
|
35
29
|
setLiveValue(value);
|
|
36
30
|
}
|
|
@@ -41,11 +35,9 @@ const ColumnFilterInput = (props) => {
|
|
|
41
35
|
const showDatePicker = filterOptions.showDatePicker;
|
|
42
36
|
const onChange = React.useMemo(() => {
|
|
43
37
|
return debounceOrImmediate((value) => {
|
|
44
|
-
//@ts-ignore
|
|
45
38
|
onChangeProp(value);
|
|
46
39
|
}, debounceTime);
|
|
47
40
|
}, [onChangeProp, debounceTime]);
|
|
48
|
-
// the onClear needs to have the same debounce time as the onChange
|
|
49
41
|
const onClear = React.useMemo(() => {
|
|
50
42
|
return debounceOrImmediate(() => {
|
|
51
43
|
onClearProp();
|
|
@@ -56,9 +48,8 @@ const ColumnFilterInput = (props) => {
|
|
|
56
48
|
? true
|
|
57
49
|
: value === 'unchecked'
|
|
58
50
|
? false
|
|
59
|
-
:
|
|
51
|
+
:
|
|
60
52
|
null, onChange: (checked) => {
|
|
61
|
-
// sequence: 'checked' -> 'unchecked' -> 'all' -> 'checked'
|
|
62
53
|
const newCheckedValue = value === 'unchecked' && checked === true
|
|
63
54
|
? 'all'
|
|
64
55
|
: checked === true
|
|
@@ -88,7 +79,6 @@ const ColumnFilterInput = (props) => {
|
|
|
88
79
|
setLiveValue('');
|
|
89
80
|
}
|
|
90
81
|
else {
|
|
91
|
-
// @ts-ignore
|
|
92
82
|
onChange(value);
|
|
93
83
|
setLiveValue(value);
|
|
94
84
|
}
|
|
@@ -100,10 +90,7 @@ const ColumnFilterInput = (props) => {
|
|
|
100
90
|
padding: 'var(--ab-base-space)',
|
|
101
91
|
border: 'none',
|
|
102
92
|
}
|
|
103
|
-
: {}, "data-name": "floating-filter-input", onFocus: onFocus, onBlur: onBlur, disabled: disabled, type: type === 'number' ? 'text' : type,
|
|
104
|
-
// autoFocus has to be FALSE because if the input receives focus in the init phase,
|
|
105
|
-
// it may scroll the AG Grid header viewport into view and de-synchronize it (relative to the content viewport)
|
|
106
|
-
autoFocus: false, value: liveValue ?? '', onKeyDown: onKeyDown, showClearButton: false, className: 'twa:flex-1', onChange: (e) => {
|
|
93
|
+
: {}, "data-name": "floating-filter-input", onFocus: onFocus, onBlur: onBlur, disabled: disabled, type: type === 'number' ? 'text' : type, autoFocus: false, value: liveValue ?? '', onKeyDown: onKeyDown, showClearButton: false, className: 'twa:flex-1', onChange: (e) => {
|
|
107
94
|
const prevValue = `${liveValue}`;
|
|
108
95
|
const value = e.target.value;
|
|
109
96
|
if (value) {
|
|
@@ -124,7 +111,6 @@ const ColumnFilterInput = (props) => {
|
|
|
124
111
|
const newValueEndsWithZero = value.endsWith('0');
|
|
125
112
|
const separatorCount = (value.match(/[.,]/g) || []).length;
|
|
126
113
|
if (prevValueHasSeparator && separatorCount > 1) {
|
|
127
|
-
// not a valid number
|
|
128
114
|
return;
|
|
129
115
|
}
|
|
130
116
|
if (newValueEndsWithSeparator) {
|
|
@@ -33,10 +33,7 @@ const ColumnFilterInputList = (props) => {
|
|
|
33
33
|
operator: props.predicate.operator,
|
|
34
34
|
args: inputs,
|
|
35
35
|
});
|
|
36
|
-
}, value: props.predicate.args,
|
|
37
|
-
// are not known ql operators for now
|
|
38
|
-
// should change when porting, it has knoladge about predicates
|
|
39
|
-
type: props.predicate.operator === 'In' ? 'In' : 'NotIn' }) }));
|
|
36
|
+
}, value: props.predicate.args, type: props.predicate.operator === 'In' ? 'In' : 'NotIn' }) }));
|
|
40
37
|
}
|
|
41
38
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (matchingInputs ?? []).map((input, index) => {
|
|
42
39
|
const value = props?.predicate?.args?.[index];
|