@adaptabletools/adaptable-cjs 23.0.0-canary.6 → 23.0.0-canary.8
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/icons/sort-asc.svg +1 -1
- package/index.css +828 -263
- package/package.json +1 -1
- package/src/AdaptableOptions/DataSetOptions.d.ts +26 -2
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -1
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +42 -10
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +7 -0
- package/src/AdaptableState/Common/AdaptableMessageType.d.ts +1 -1
- package/src/AdaptableState/Common/Enums.d.ts +1 -1
- package/src/AdaptableState/Common/Enums.js +1 -1
- package/src/AdaptableState/StyledColumnState.d.ts +8 -850
- package/src/AdaptableState/StyledColumnState.js +0 -10
- package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
- package/src/AdaptableState/StyledColumns/BadgeStyle.js +12 -0
- package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +147 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartCellText.d.ts +60 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +7 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +24 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartMarker.js +6 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +7 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +10 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
- package/src/AdaptableState/StyledColumns/IconStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.js +2 -0
- package/src/Api/ColumnScopeApi.d.ts +1 -1
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/DataSetInternalApi.d.ts +3 -0
- package/src/Api/Internal/DataSetInternalApi.js +73 -13
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -1
- package/src/Redux/Store/AdaptableStore.js +6 -4
- package/src/Strategy/CalculatedColumnModule.js +1 -0
- package/src/Strategy/ColumnFilterModule.js +1 -0
- package/src/Strategy/FlashingCellModule.js +6 -2
- package/src/Strategy/FormatColumnModule.js +1 -1
- package/src/Strategy/FreeTextColumnModule.js +38 -28
- package/src/Strategy/Interface/IModule.d.ts +3 -1
- package/src/Strategy/LayoutModule.js +15 -66
- package/src/Strategy/StyledColumnModule.js +11 -28
- package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.d.ts +1 -0
- package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.js +1 -0
- package/src/Strategy/Utilities/Export/getExportColumnsViewItems.d.ts +2 -0
- package/src/Strategy/Utilities/Export/getExportColumnsViewItems.js +17 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +1 -0
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +5 -1
- package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.d.ts +11 -0
- package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.js +111 -0
- package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.d.ts +48 -0
- package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +177 -0
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.d.ts +1 -0
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -0
- package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.d.ts +26 -0
- package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.js +97 -0
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +3 -5
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +48 -42
- package/src/Utilities/Helpers/FormatHelper.js +3 -0
- package/src/Utilities/Helpers/IconStylePresets.d.ts +1 -1
- package/src/Utilities/Helpers/ScheduleHelper.js +2 -0
- package/src/Utilities/Helpers/StyleHelper.d.ts +18 -0
- package/src/Utilities/Helpers/StyleHelper.js +30 -1
- package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +3 -1
- package/src/Utilities/Helpers/StyledColumnGradientHelper.js +6 -4
- package/src/Utilities/Helpers/barChartCellText.d.ts +63 -0
- package/src/Utilities/Helpers/barChartCellText.js +333 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +2 -1
- package/src/Utilities/Helpers/percentBarPreviewHelper.js +3 -8
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +3 -0
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +19 -0
- package/src/Utilities/getScopeViewItems.js +2 -0
- package/src/Utilities/wizardSelection.d.ts +10 -0
- package/src/Utilities/wizardSelection.js +22 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
- package/src/View/Alert/AlertViewPanel.js +2 -2
- package/src/View/Alert/Utilities/getAlertButtonStyle.js +7 -4
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +0 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -6
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +159 -125
- package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +1 -2
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +4 -5
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -2
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +30 -7
- package/src/View/Alert/Wizard/AlertWizard.js +12 -4
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -1
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -14
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +4 -6
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +29 -3
- package/src/View/CellSummary/CellSummaryViewPanel.js +4 -4
- package/src/View/Charting/ShowChartButton.js +8 -8
- package/src/View/ColumnInfo/ColumnInfo.js +21 -1
- package/src/View/Components/AdaptableObjectCollection/index.js +2 -3
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +3 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +7 -6
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +2 -0
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +6 -0
- package/src/View/Components/AdaptableObjectRow/index.js +2 -2
- package/src/View/Components/Buttons/ButtonBase/index.js +2 -3
- package/src/View/Components/Buttons/ButtonNew.d.ts +2 -0
- package/src/View/Components/Buttons/ButtonNew.js +1 -1
- package/src/View/Components/Buttons/EntityListActionButtons.js +3 -3
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -0
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +9 -9
- package/src/View/Components/ColumnFilter/ColumnFilter.js +15 -3
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +2 -2
- package/src/View/Components/ColumnSelector/index.d.ts +12 -0
- package/src/View/Components/ColumnSelector/index.js +30 -6
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +2 -2
- package/src/View/Components/ModuleValueSelector/index.js +2 -1
- package/src/View/Components/NewScopeComponent.js +3 -8
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +5 -4
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +4 -4
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +3 -3
- package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +3 -2
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +38 -28
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +3 -4
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -3
- package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.d.ts +11 -0
- package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.js +5 -0
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +3 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +27 -28
- package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -1
- package/src/View/Components/RangesComponent.d.ts +4 -5
- package/src/View/Components/RangesComponent.js +95 -66
- package/src/View/Components/ReorderDraggable/index.js +2 -3
- package/src/View/Components/Selectors/BulkUpdateValueSelector.d.ts +0 -2
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +3 -3
- package/src/View/Components/StyleComponent.js +30 -63
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +9 -6
- package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +3 -13
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +5 -80
- package/src/View/Components/ToolPanel/ToolPanelPopupSections.d.ts +17 -0
- package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +81 -0
- package/src/View/Components/ValueSelector/index.d.ts +29 -0
- package/src/View/Components/ValueSelector/index.js +112 -29
- package/src/View/Components/wizardColumnListStyles.d.ts +10 -0
- package/src/View/Components/wizardColumnListStyles.js +13 -0
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -6
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +2 -2
- package/src/View/Dashboard/DashboardPopup.d.ts +1 -11
- package/src/View/Dashboard/DashboardPopup.js +3 -67
- package/src/View/Dashboard/DashboardPopupSections.d.ts +20 -0
- package/src/View/Dashboard/DashboardPopupSections.js +73 -0
- package/src/View/Dashboard/PinnedToolbarsSelector.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +1 -6
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +8 -20
- package/src/View/DataChangeHistory/DataChangeHistoryTable.d.ts +8 -0
- package/src/View/DataChangeHistory/DataChangeHistoryTable.js +99 -0
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +5 -3
- package/src/View/DataChangeHistory/buildActionColumnButton.js +33 -41
- package/src/View/DataChangeHistory/dataChangeHistoryHelpers.d.ts +15 -0
- package/src/View/DataChangeHistory/dataChangeHistoryHelpers.js +46 -0
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
- package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +32 -19
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
- package/src/View/DataSet/DataSetViewPanel.d.ts +2 -2
- package/src/View/Export/ExportDestinationPicker.js +4 -5
- package/src/View/Export/ExportSchedulesTab.js +3 -4
- package/src/View/Export/ExportViewPanel.js +2 -2
- package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +2 -1
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +2 -7
- package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +2 -1
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +2 -5
- package/src/View/Filter/FilterViewPanel.js +1 -1
- package/src/View/FlashingCell/FlashingCellStyle.d.ts +4 -2
- package/src/View/FlashingCell/FlashingCellStyle.js +5 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +2 -1
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +5 -9
- package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.d.ts +9 -0
- package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.js +10 -0
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +5 -1
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +0 -5
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +3 -8
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +101 -44
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +0 -1
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -6
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +55 -15
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +2 -3
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +5 -9
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +4 -9
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +3 -2
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -2
- package/src/View/GridFilter/GridFilterPopupUI/index.js +3 -2
- package/src/View/GridFilter/GridFilterViewPanel.js +5 -5
- package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +2 -3
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -2
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +24 -28
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +13 -1
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +77 -33
- package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +4 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +154 -275
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +4 -1
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +146 -143
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +5 -2
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +22 -10
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +4 -1
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +21 -10
- package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +5 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +23 -12
- package/src/View/Layout/Wizard/sections/RowSelectionSection.js +7 -3
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +130 -104
- package/src/View/Layout/Wizard/sections/SortSection.d.ts +12 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +43 -18
- package/src/View/Layout/Wizard/sections/columnLayoutCards.d.ts +20 -0
- package/src/View/Layout/Wizard/sections/columnLayoutCards.js +167 -0
- package/src/View/Layout/Wizard/sections/columnLayoutHelpers.d.ts +30 -0
- package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +216 -0
- package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.js +72 -0
- package/src/View/Layout/Wizard/sections/layoutWizardColumns.d.ts +11 -0
- package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +57 -0
- package/src/View/License/LicenseWatermark.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.d.ts +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -2
- package/src/View/Note/NoteEditor.js +2 -2
- package/src/View/QuickSearch/QuickSearchPopup.js +2 -3
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +2 -2
- package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
- package/src/View/StateManagement/StateManagementPopup.js +1 -1
- package/src/View/StateManagement/components/ExportDropdown.d.ts +2 -2
- package/src/View/StateManagement/components/ExportDropdown.js +12 -13
- package/src/View/StatusBar/StatusBarPanel.js +2 -2
- package/src/View/StatusBar/StatusBarPopup.js +33 -5
- package/src/View/StatusBar/statusBarPanelHelpers.d.ts +2 -0
- package/src/View/StatusBar/statusBarPanelHelpers.js +11 -0
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +3 -1
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +13 -10
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +143 -119
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +1 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +7 -13
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.js +54 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +28 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +76 -70
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +83 -38
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +172 -75
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +31 -45
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +40 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.d.ts +23 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.js +62 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +3 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +13 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +5 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +13 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +11 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +26 -57
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +93 -6
- package/src/View/UIHelper.d.ts +0 -2
- package/src/View/UIHelper.js +8 -24
- package/src/View/Wizard/CollapsibleWizardCard.d.ts +68 -0
- package/src/View/Wizard/CollapsibleWizardCard.js +90 -0
- package/src/View/Wizard/OnePageWizards.js +6 -6
- package/src/View/Wizard/SummaryColorTag.d.ts +24 -0
- package/src/View/Wizard/SummaryColorTag.js +79 -0
- package/src/View/Wizard/WizardTypeSelection.d.ts +34 -0
- package/src/View/Wizard/WizardTypeSelection.js +40 -0
- package/src/View/Wizard/rowGroupSummaryTags.d.ts +18 -0
- package/src/View/Wizard/rowGroupSummaryTags.js +21 -0
- package/src/View/Wizard/scopeSummaryTags.d.ts +6 -0
- package/src/View/Wizard/scopeSummaryTags.js +38 -0
- package/src/agGrid/AgGridAdapter.js +0 -5
- package/src/agGrid/AgGridColumnAdapter.js +3 -2
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +4 -7
- package/src/agGrid/cellRenderers/BadgeRenderer.js +7 -5
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +43 -42
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
- package/src/agGrid/cellRenderers/IconRenderer.js +13 -11
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +24 -96
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +49 -46
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -1
- package/src/components/Card/index.js +5 -7
- package/src/components/CheckBox/index.js +2 -3
- package/src/components/CodeBlock/index.js +2 -3
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -0
- package/src/components/ColorPicker/ColorPicker.js +8 -6
- package/src/components/ColorPicker/OptionalColorPicker.d.ts +12 -0
- package/src/components/ColorPicker/OptionalColorPicker.js +31 -0
- package/src/components/ColorPicker/index.d.ts +1 -0
- package/src/components/ColorPicker/index.js +1 -0
- package/src/components/Combobox/comboboxUtils.d.ts +1 -0
- package/src/components/Combobox/index.js +19 -18
- package/src/components/Dashboard/DashboardManager.js +2 -4
- package/src/components/Dialog/index.js +4 -4
- package/src/components/DragAndDropContext/DragAndDropContext.d.ts +5 -0
- package/src/components/DragAndDropContext/DragAndDropContext.js +4 -1
- package/src/components/DragAndDropContext/ModuleManager.d.ts +15 -3
- package/src/components/DragAndDropContext/ModuleManager.js +43 -4
- package/src/components/DragAndDropContext/TabList.d.ts +11 -4
- package/src/components/DragAndDropContext/TabList.js +52 -38
- package/src/components/DragAndDropContext/UnusedPanel.d.ts +4 -3
- package/src/components/DragAndDropContext/UnusedPanel.js +13 -9
- package/src/components/DragAndDropContext/dragScope.d.ts +6 -0
- package/src/components/DragAndDropContext/dragScope.js +34 -0
- package/src/components/DragAndDropContext/types.d.ts +7 -0
- package/src/components/DropdownButton/index.d.ts +33 -25
- package/src/components/DropdownButton/index.js +24 -158
- package/src/components/EmptyContent/index.js +2 -3
- package/src/components/ErrorBox/index.js +2 -3
- package/src/components/ExpressionEditor/BaseEditorInput.js +3 -3
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +3 -3
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +9 -9
- package/src/components/FieldWrap/index.js +2 -3
- package/src/components/Flex.js +2 -2
- package/src/components/FormLayout/index.d.ts +1 -1
- package/src/components/HelpBlock/index.js +3 -4
- package/src/components/IconSelector/IconSelector.d.ts +8 -0
- package/src/components/IconSelector/IconSelector.js +13 -8
- package/src/components/IconSelector/index.d.ts +1 -0
- package/src/components/IconSelector/index.js +3 -0
- package/src/components/Modal/index.js +2 -2
- package/src/components/NewSelect/index.js +11 -1
- package/src/components/Panel/index.js +7 -7
- package/src/components/Radio/index.d.ts +1 -1
- package/src/components/Radio/index.js +8 -6
- package/src/components/SimpleButton/index.js +7 -7
- package/src/components/StylePreview.js +2 -3
- package/src/components/Tabs/index.js +4 -4
- package/src/components/Tag/Tag.d.ts +16 -0
- package/src/components/Tag/Tag.js +16 -5
- package/src/components/Tag/columnScopeTagHelpers.d.ts +8 -0
- package/src/components/Tag/columnScopeTagHelpers.js +12 -0
- package/src/components/Tag/index.d.ts +1 -1
- package/src/components/Tag/index.js +3 -1
- package/src/components/Textarea/index.js +2 -3
- package/src/components/Toggle/Toggle.d.ts +2 -0
- package/src/components/Toggle/Toggle.js +14 -7
- package/src/components/Toggle/ToggleGroup.js +2 -2
- package/src/components/ToggleButton/index.js +4 -5
- package/src/components/Tree/TreeDropdown/index.js +3 -5
- package/src/components/WarningBox/index.js +2 -3
- package/src/components/icons/sort-asc.js +1 -1
- package/src/components/ui/button.d.ts +2 -2
- package/src/components/ui/combobox.d.ts +3 -1
- package/src/components/ui/combobox.js +2 -2
- package/src/components/ui/input-group.d.ts +1 -1
- package/src/components/ui/select.js +3 -2
- package/src/components/ui/textarea.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.js +7 -3
- package/src/metamodel/adaptable.metamodel.d.ts +80 -14
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade23.d.ts +27 -31
- package/src/migration/VersionUpgrade23.js +110 -29
- package/src/types.d.ts +13 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +0 -17
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -295
- package/src/components/DropdownButton/DropdownButtonItem.d.ts +0 -12
- package/src/components/DropdownButton/renderItem.d.ts +0 -14
- package/src/components/DropdownButton/renderItem.js +0 -14
- package/src/components/DropdownButton/useExpanded.d.ts +0 -24
- package/src/components/DropdownButton/useExpanded.js +0 -59
- package/src/components/NewDropdownButton/index.d.ts +0 -27
- package/src/components/NewDropdownButton/index.js +0 -28
- /package/src/{components/DropdownButton/DropdownButtonItem.js → AdaptableState/StyledColumns/BulletChartStyle.js} +0 -0
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AlertButtonsEditor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const ButtonNew_1 = require("../../Components/Buttons/ButtonNew");
|
|
6
7
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
7
8
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
8
9
|
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
@@ -13,7 +14,10 @@ const AdaptableIconSelector_1 = require("../../Components/AdaptableIconSelector"
|
|
|
13
14
|
const Flex_1 = require("../../../components/Flex");
|
|
14
15
|
const sentenceCase_1 = tslib_1.__importDefault(require("../../../Utilities/utils/sentenceCase"));
|
|
15
16
|
const NewSelect_1 = require("../../../components/NewSelect");
|
|
16
|
-
const
|
|
17
|
+
const Tag_1 = require("../../../components/Tag");
|
|
18
|
+
const CollapsibleWizardCard_1 = require("../../Wizard/CollapsibleWizardCard");
|
|
19
|
+
const utils_1 = require("../../../lib/utils");
|
|
20
|
+
const alertButtonCardId = (index) => `alert-button-${index}`;
|
|
17
21
|
const TONE_OPTIONS = [
|
|
18
22
|
{
|
|
19
23
|
label: 'Tone: Use Alert Tone',
|
|
@@ -37,6 +41,125 @@ const AlertButtonPreview = ({ button, messageType }) => {
|
|
|
37
41
|
function renderTone(option) {
|
|
38
42
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(SimpleButton_1.default, { className: "twa:mr-2 twa:w-[10px] twa:h-[10px] twa:line-height-0 twa:rounded-[100%] twa:bg-current", tone: option.value, variant: "text" }), option.label] }));
|
|
39
43
|
}
|
|
44
|
+
const getButtonCommands = (button) => {
|
|
45
|
+
if (button.Command && typeof button.Command === 'string') {
|
|
46
|
+
return [button.Command];
|
|
47
|
+
}
|
|
48
|
+
if (button.Command && Array.isArray(button.Command)) {
|
|
49
|
+
return button.Command;
|
|
50
|
+
}
|
|
51
|
+
return [];
|
|
52
|
+
};
|
|
53
|
+
const AlertButtonActionTags = ({ button }) => {
|
|
54
|
+
const commands = getButtonCommands(button);
|
|
55
|
+
if (!commands.length) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: commands.map((command) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:shrink-0", children: (0, sentenceCase_1.default)(command) }, command))) }));
|
|
59
|
+
};
|
|
60
|
+
const AlertButtonCardSummary = ({ button }) => {
|
|
61
|
+
const commands = getButtonCommands(button);
|
|
62
|
+
if (!commands.length) {
|
|
63
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No actions" });
|
|
64
|
+
}
|
|
65
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: (0, jsx_runtime_1.jsx)(AlertButtonActionTags, { button: button }) }));
|
|
66
|
+
};
|
|
67
|
+
const AlertButtonCompactSummary = ({ button }) => ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1 twa:min-w-0 twa:overflow-hidden twa:flex-wrap", children: [(0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:shrink-0", children: button.Label || 'Untitled' }), (0, jsx_runtime_1.jsx)(AlertButtonActionTags, { button: button })] }));
|
|
68
|
+
const AlertButtonEditorForm = ({ button, index, alertButtons, buttonCommands, onChange, }) => {
|
|
69
|
+
const buttonStyle = button.ButtonStyle;
|
|
70
|
+
const buttonLabel = button.Label;
|
|
71
|
+
const btnCommands = getButtonCommands(button);
|
|
72
|
+
const btnUserFunctions = btnCommands.filter((command) => !buttonCommands.includes(command));
|
|
73
|
+
const setVariant = (variant) => {
|
|
74
|
+
onChange(alertButtons.map((btn, i) => {
|
|
75
|
+
if (i === index) {
|
|
76
|
+
const nextButtonStyle = { ...btn.ButtonStyle };
|
|
77
|
+
nextButtonStyle.variant = variant;
|
|
78
|
+
return {
|
|
79
|
+
...btn,
|
|
80
|
+
ButtonStyle: nextButtonStyle,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
return btn;
|
|
84
|
+
}));
|
|
85
|
+
};
|
|
86
|
+
const setTone = (tone) => {
|
|
87
|
+
onChange(alertButtons.map((btn, i) => {
|
|
88
|
+
if (i === index) {
|
|
89
|
+
const nextButtonStyle = { ...btn.ButtonStyle };
|
|
90
|
+
if (tone == null) {
|
|
91
|
+
delete nextButtonStyle.tone;
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
nextButtonStyle.tone = tone;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
...btn,
|
|
98
|
+
ButtonStyle: nextButtonStyle,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return btn;
|
|
102
|
+
}));
|
|
103
|
+
};
|
|
104
|
+
const handleCommandChange = (checked, commandName) => {
|
|
105
|
+
let commands = btnCommands;
|
|
106
|
+
if (!checked) {
|
|
107
|
+
commands = commands.filter((a) => a !== commandName);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
commands = [...commands, commandName];
|
|
111
|
+
}
|
|
112
|
+
onChange(alertButtons.map((btn, i) => {
|
|
113
|
+
if (i === index) {
|
|
114
|
+
return {
|
|
115
|
+
...btn,
|
|
116
|
+
Command: commands.length ? commands : undefined,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
return btn;
|
|
120
|
+
}));
|
|
121
|
+
};
|
|
122
|
+
let iconSelector = null;
|
|
123
|
+
if (!button.icon || (button.icon && 'name' in button.icon)) {
|
|
124
|
+
iconSelector = ((0, jsx_runtime_1.jsx)(AdaptableIconSelector_1.AdaptableIconSelector, { value: button.icon && 'name' in button.icon ? button?.icon?.name : '', onChange: (iconName) => {
|
|
125
|
+
onChange(alertButtons.map((btn) => {
|
|
126
|
+
if (btn === button) {
|
|
127
|
+
return {
|
|
128
|
+
...btn,
|
|
129
|
+
icon: {
|
|
130
|
+
name: iconName,
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
return btn;
|
|
135
|
+
}));
|
|
136
|
+
} }));
|
|
137
|
+
}
|
|
138
|
+
return ((0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Button Text" }), children: (0, jsx_runtime_1.jsx)(Input_1.default, { value: buttonLabel, className: "twa:max-w-[200px]", onChange: (e) => {
|
|
139
|
+
onChange(alertButtons.map((btn, i) => {
|
|
140
|
+
if (i === index) {
|
|
141
|
+
return { ...btn, Label: e.target.value };
|
|
142
|
+
}
|
|
143
|
+
return btn;
|
|
144
|
+
}));
|
|
145
|
+
} }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Style" }), children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-2 twa:flex-wrap", children: [(0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { items: ['text', 'outlined', 'raised'].map((variant) => {
|
|
146
|
+
return {
|
|
147
|
+
label: StringExtensions_1.default.CapitaliseFirstLetter(variant),
|
|
148
|
+
value: variant,
|
|
149
|
+
};
|
|
150
|
+
}), renderValue: (option) => `Variant: ${option.label}`, value: buttonStyle?.variant, onValueChange: (value) => {
|
|
151
|
+
setVariant(value);
|
|
152
|
+
} }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { items: TONE_OPTIONS, onValueChange: (value) => {
|
|
153
|
+
if (value === 'text') {
|
|
154
|
+
setTone(null);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
setTone(value);
|
|
158
|
+
}, value: buttonStyle?.tone ?? 'text' })] }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Actions" }), children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-3 twa:flex-wrap", children: [buttonCommands.map((commandName) => {
|
|
159
|
+
return ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { onChange: (checked) => handleCommandChange(checked, commandName), checked: button.Command === commandName ||
|
|
160
|
+
(Array.isArray(button.Command) && button.Command.includes(commandName)), children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: (0, sentenceCase_1.default)(commandName) }) }, commandName));
|
|
161
|
+
}), btnUserFunctions.length ? ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { checked: true, disabled: true, children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-2", children: ["User function", btnUserFunctions.length > 1 ? 's' : '', ": ", btnUserFunctions.join(', ')] }) })) : null] }) }), iconSelector && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Icon" }), children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: iconSelector }) }))] }));
|
|
162
|
+
};
|
|
40
163
|
const AlertButtonsEditor = (props) => {
|
|
41
164
|
const { api, adaptableAlert } = props;
|
|
42
165
|
const onChange = (newButtons) => {
|
|
@@ -44,22 +167,14 @@ const AlertButtonsEditor = (props) => {
|
|
|
44
167
|
};
|
|
45
168
|
const alertDefinition = adaptableAlert.alertDefinition;
|
|
46
169
|
const messageType = alertDefinition?.MessageType ?? 'Info';
|
|
47
|
-
// const rowAddedAlert =
|
|
48
|
-
// api.alertApi.internalApi.isAlertDefinitionForAddedRowChangeEvent(alertDefinition);
|
|
49
170
|
const isRowRemovedAlert = api.alertApi.internalApi.isAlertDefinitionForRemovedRowChangeEvent(alertDefinition);
|
|
50
|
-
// except row change
|
|
51
171
|
const hasHighlightCell = props.alertType !== 'RowChange';
|
|
52
|
-
// all, except row removed
|
|
53
172
|
const hasHighlightRow = !isRowRemovedAlert;
|
|
54
|
-
// except row removed
|
|
55
173
|
const hasJumpToCell = props.alertType !== 'RowChange';
|
|
56
|
-
// all
|
|
57
174
|
const hasJumpToRow = !isRowRemovedAlert;
|
|
58
|
-
// all
|
|
59
175
|
const hasSuspend = true;
|
|
60
|
-
// only data change
|
|
61
176
|
const hasUndo = props.alertType === 'DataChange';
|
|
62
|
-
const
|
|
177
|
+
const alertButtons = (0, Helper_1.cloneObject)(props.AlertButtons || []) || [];
|
|
63
178
|
const buttonCommands = [];
|
|
64
179
|
if (hasHighlightRow) {
|
|
65
180
|
buttonCommands.push('highlight-row');
|
|
@@ -85,121 +200,40 @@ const AlertButtonsEditor = (props) => {
|
|
|
85
200
|
buttonCommands.push(ch.name);
|
|
86
201
|
});
|
|
87
202
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
};
|
|
123
|
-
const setTone = (tone) => {
|
|
124
|
-
onChange(AlertButtons.map((btn, i) => {
|
|
125
|
-
if (i === index) {
|
|
126
|
-
const buttonStyle = { ...btn.ButtonStyle };
|
|
127
|
-
if (tone == null) {
|
|
128
|
-
delete buttonStyle.tone;
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
buttonStyle.tone = tone;
|
|
132
|
-
}
|
|
133
|
-
return {
|
|
134
|
-
...btn,
|
|
135
|
-
ButtonStyle: buttonStyle,
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
return btn;
|
|
139
|
-
}));
|
|
140
|
-
};
|
|
141
|
-
const handleCommandChange = (checked, commandName) => {
|
|
142
|
-
let commands = btnCommands;
|
|
143
|
-
if (!checked) {
|
|
144
|
-
// remove current Command
|
|
145
|
-
commands = commands.filter((a) => a !== commandName);
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
commands = [...commands, commandName];
|
|
149
|
-
}
|
|
150
|
-
onChange(AlertButtons.map((btn, i) => {
|
|
151
|
-
if (i === index) {
|
|
152
|
-
return {
|
|
153
|
-
...btn,
|
|
154
|
-
Command: commands.length ? commands : undefined,
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
return btn;
|
|
158
|
-
}));
|
|
159
|
-
};
|
|
160
|
-
let iconSelector = null;
|
|
161
|
-
if (!button.icon || (button.icon && 'name' in button.icon)) {
|
|
162
|
-
iconSelector = ((0, jsx_runtime_1.jsx)(AdaptableIconSelector_1.AdaptableIconSelector, { value: button.icon && 'name' in button.icon ? button?.icon?.name : '', onChange: (iconName) => {
|
|
163
|
-
onChange(AlertButtons.map((btn) => {
|
|
164
|
-
if (btn === button) {
|
|
165
|
-
return {
|
|
166
|
-
...btn,
|
|
167
|
-
icon: {
|
|
168
|
-
name: iconName,
|
|
169
|
-
},
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
return btn;
|
|
173
|
-
}));
|
|
174
|
-
} }));
|
|
175
|
-
}
|
|
176
|
-
return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { className: "twa:justify-between twa:gap-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:font-medium twa:shrink-0", children: ["Button ", index + 1] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { justifyContent: "center", className: "twa:flex-1 twa:min-w-0", children: (0, jsx_runtime_1.jsx)(AlertButtonPreview, { button: button, messageType: messageType }) }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { icon: "close", tone: "error", disabled: AlertButtons.length <= 1, variant: "text", tooltip: AlertButtons.length <= 1 ? 'Cannot remove last button' : 'Remove button', onClick: () => {
|
|
177
|
-
onChange(AlertButtons.filter((btn) => btn !== button));
|
|
178
|
-
} })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Button Text" }), children: (0, jsx_runtime_1.jsx)(Input_1.default, { value: buttonLabel, className: "twa:max-w-[200px]", onChange: (e) => {
|
|
179
|
-
onChange(AlertButtons.map((btn, i) => {
|
|
180
|
-
if (i === index) {
|
|
181
|
-
return { ...btn, Label: e.target.value };
|
|
182
|
-
}
|
|
183
|
-
return btn;
|
|
184
|
-
}));
|
|
185
|
-
} }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Style" }), children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-2 twa:flex-wrap", children: [(0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { items: ['text', 'outlined', 'raised'].map((variant) => {
|
|
186
|
-
return {
|
|
187
|
-
label: StringExtensions_1.default.CapitaliseFirstLetter(variant),
|
|
188
|
-
value: variant,
|
|
189
|
-
};
|
|
190
|
-
}), renderValue: (option) => `Variant: ${option.label}`, value: buttonStyle?.variant, onValueChange: (value) => {
|
|
191
|
-
setVariant(value);
|
|
192
|
-
} }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { items: TONE_OPTIONS, onValueChange: (value) => {
|
|
193
|
-
if (value === 'text') {
|
|
194
|
-
setTone(null);
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
setTone(value);
|
|
198
|
-
}, value: buttonStyle?.tone ?? 'text' })] }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Actions" }), children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-3 twa:flex-wrap", children: [buttonCommands.map((commandName) => {
|
|
199
|
-
return ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { onChange: (checked) => handleCommandChange(checked, commandName), checked: button.Command === commandName ||
|
|
200
|
-
(Array.isArray(button.Command) &&
|
|
201
|
-
button.Command.includes(commandName)), children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: (0, sentenceCase_1.default)(commandName) }) }, commandName));
|
|
202
|
-
}), btnUserFunctions.length ? ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { checked: true, disabled: true, children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-2", children: ["User function", btnUserFunctions.length > 1 ? 's' : '', ":", ' ', btnUserFunctions.join(', ')] }) })) : null] }) }), iconSelector && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Icon" }), children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: iconSelector }) }))] }) })] }, index));
|
|
203
|
+
const { bindCard, hasExpandedCard, expandedFillsSpace, expandedId, setExpandedId } = (0, CollapsibleWizardCard_1.useWizardCardAccordion)(null);
|
|
204
|
+
const handleAddButton = () => {
|
|
205
|
+
const newIndex = alertButtons.length;
|
|
206
|
+
onChange([
|
|
207
|
+
...(alertButtons || []),
|
|
208
|
+
{
|
|
209
|
+
Label: 'OK',
|
|
210
|
+
ButtonStyle: {
|
|
211
|
+
variant: 'raised',
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
]);
|
|
215
|
+
setExpandedId(alertButtonCardId(newIndex));
|
|
216
|
+
};
|
|
217
|
+
const handleDeleteButton = (index) => {
|
|
218
|
+
if (alertButtons.length <= 1) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
const cardId = alertButtonCardId(index);
|
|
222
|
+
onChange(alertButtons.filter((_, i) => i !== index));
|
|
223
|
+
if (expandedId === cardId) {
|
|
224
|
+
setExpandedId(null);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
if (expandedId?.startsWith('alert-button-')) {
|
|
228
|
+
const expandedIndex = Number(expandedId.replace('alert-button-', ''));
|
|
229
|
+
if (!Number.isNaN(expandedIndex) && expandedIndex > index) {
|
|
230
|
+
setExpandedId(alertButtonCardId(expandedIndex - 1));
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, utils_1.cn)((0, CollapsibleWizardCard_1.getWizardAccordionSectionClassName)(hasExpandedCard, expandedFillsSpace), 'twa:mt-3'), children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", justifyContent: "space-between", className: "twa:mb-2 twa:shrink-0", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:max-w-[520px]", children: "Add buttons to the notification and set actions to perform when clicked" }), (0, jsx_runtime_1.jsx)(ButtonNew_1.ButtonNew, { onClick: handleAddButton, children: "Add" })] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:min-h-0", children: alertButtons.map((button, index) => {
|
|
235
|
+
const cardBinding = bindCard(alertButtonCardId(index));
|
|
236
|
+
return ((0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...cardBinding, surface: "panel", "data-name": `alert-button-${index}`, title: `Button ${index + 1}`, help: "Set button text, style, icon, and actions", collapsedHelp: false, compactSummary: (0, jsx_runtime_1.jsx)(AlertButtonCompactSummary, { button: button }), headerVisual: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", justifyContent: "space-end", className: "twa:gap-1 twa:min-w-0 twa:overflow-hidden twa:flex-wrap", children: [(0, jsx_runtime_1.jsx)(AlertButtonPreview, { button: button, messageType: messageType }), cardBinding.compact ? (0, jsx_runtime_1.jsx)(AlertButtonActionTags, { button: button }) : null] }), headerActions: (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { icon: "delete", disabled: alertButtons.length <= 1, variant: "text", tooltip: alertButtons.length <= 1 ? 'Cannot remove last button' : 'Delete button', onClick: () => handleDeleteButton(index) }), summary: (0, jsx_runtime_1.jsx)(AlertButtonCardSummary, { button: button }), bodyClassName: "twa:!pt-0", children: (0, jsx_runtime_1.jsx)(AlertButtonEditorForm, { button: button, index: index, alertButtons: alertButtons, buttonCommands: buttonCommands, onChange: onChange }) }, alertButtonCardId(index)));
|
|
203
237
|
}) })] }));
|
|
204
238
|
};
|
|
205
239
|
exports.AlertButtonsEditor = AlertButtonsEditor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AlertDefinition } from '../../../AdaptableState/AlertState';
|
|
3
3
|
import { AlertType } from '../Utilities/getAlertType';
|
|
4
|
-
export declare const renderAlertMessageSummary: (alertType
|
|
4
|
+
export declare const renderAlertMessageSummary: (alertType: AlertType | undefined, data: AlertDefinition) => React.JSX.Element;
|
|
5
5
|
type AlertDisplayWizardSectionProps = {
|
|
6
6
|
onChange: (data: AlertDefinition) => void;
|
|
7
7
|
alertType: AlertType;
|
|
@@ -13,8 +13,7 @@ const Textarea_1 = tslib_1.__importDefault(require("../../../components/Textarea
|
|
|
13
13
|
const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
|
|
14
14
|
const Flex_1 = require("../../../components/Flex");
|
|
15
15
|
const Card_1 = require("../../../components/Card");
|
|
16
|
-
const renderAlertMessageSummary = (alertType) => {
|
|
17
|
-
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
16
|
+
const renderAlertMessageSummary = (alertType, data) => {
|
|
18
17
|
if (alertType === getAlertType_1.AlertType.Scheduled) {
|
|
19
18
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Message Type: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.MessageType })] }), (0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Header: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.MessageHeader || 'Not specified' })] }), (0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Body: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.MessageText || 'Not specified' })] })] }));
|
|
20
19
|
}
|
|
@@ -3,7 +3,7 @@ import { AlertDefinition } from '../../../AdaptableState/AlertState';
|
|
|
3
3
|
import { AdaptableApi } from '../../../types';
|
|
4
4
|
import { AlertType } from '../Utilities/getAlertType';
|
|
5
5
|
import { BoxProps } from '../../../components/Flex';
|
|
6
|
-
export declare const renderAlertNotificationSummary: () => React.JSX.Element;
|
|
6
|
+
export declare const renderAlertNotificationSummary: (data: AlertDefinition, api: AdaptableApi) => React.JSX.Element;
|
|
7
7
|
interface AlertPreviewProps extends BoxProps {
|
|
8
8
|
className?: string;
|
|
9
9
|
style?: React.CSSProperties;
|
|
@@ -4,6 +4,7 @@ exports.AlertNotificationWizardSection = exports.AlertPreview = exports.renderAl
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
|
+
const utils_1 = require("../../../lib/utils");
|
|
7
8
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
8
9
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
9
10
|
const AdaptablePopupAlert_1 = require("../../Components/Popups/AdaptablePopupAlert");
|
|
@@ -12,10 +13,8 @@ const getAlertType_1 = require("../Utilities/getAlertType");
|
|
|
12
13
|
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
|
|
13
14
|
const alertFormHelper_1 = require("../../../Utilities/Helpers/alertFormHelper");
|
|
14
15
|
const Flex_1 = require("../../../components/Flex");
|
|
15
|
-
const clsx_1 = tslib_1.__importDefault(require("clsx"));
|
|
16
16
|
const Card_1 = require("../../../components/Card");
|
|
17
|
-
const renderAlertNotificationSummary = () => {
|
|
18
|
-
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
17
|
+
const renderAlertNotificationSummary = (data, api) => {
|
|
19
18
|
if (!data.AlertProperties?.DisplayNotification) {
|
|
20
19
|
return (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "No Alert Notification will be displayed" });
|
|
21
20
|
}
|
|
@@ -57,7 +56,7 @@ const AlertPreview = ({ alertDefinition, api, focusFirstButton, ...boxProps }) =
|
|
|
57
56
|
};
|
|
58
57
|
return result;
|
|
59
58
|
}, [alertDefinition, api, mapButtons]);
|
|
60
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { ...boxProps, className: (0,
|
|
59
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { ...boxProps, className: (0, utils_1.cn)('ab-AlertPreview', boxProps.className), style: {
|
|
61
60
|
border: '1px solid var(--ab-color-input-border)',
|
|
62
61
|
...boxProps.style,
|
|
63
62
|
}, children: (0, jsx_runtime_1.jsx)(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, focusFirstButton: focusFirstButton, adaptableAlert: alertToPreview, onClose: () => { } }) }));
|
|
@@ -140,6 +139,6 @@ const AlertNotificationWizardSection = (props) => {
|
|
|
140
139
|
} }));
|
|
141
140
|
})()
|
|
142
141
|
: null] })] }) }), data.AlertProperties?.DisplayNotification ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": "alert-preview", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Alert Preview" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Preview how the notification will appear when triggered" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: !isScheduled &&
|
|
143
|
-
typeof data.AlertForm === 'string' ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Preview not available because form is dynamically driven" })) : ((0, jsx_runtime_1.jsx)(exports.AlertPreview, { alertDefinition: data, api: api })) })] }) })) : null] }));
|
|
142
|
+
typeof data.AlertForm === 'string' ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "Preview not available because form is dynamically driven" })) : ((0, jsx_runtime_1.jsx)(exports.AlertPreview, { alertDefinition: data, api: api, focusFirstButton: false })) })] }) })) : null] }));
|
|
144
143
|
};
|
|
145
144
|
exports.AlertNotificationWizardSection = AlertNotificationWizardSection;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AlertDefinition } from '../../../AdaptableState/AlertState';
|
|
3
3
|
export declare const isScheduledAlertTimeValid: (alert: AlertDefinition) => true | string;
|
|
4
|
-
export declare const renderAlertScheduledSummary: () => React.JSX.Element;
|
|
4
|
+
export declare const renderAlertScheduledSummary: (data: AlertDefinition) => React.JSX.Element;
|
|
5
5
|
type AlertScheduledWizardSectionProps = {
|
|
6
6
|
onChange: (alert: AlertDefinition) => void;
|
|
7
7
|
};
|
|
@@ -17,8 +17,7 @@ const isScheduledAlertTimeValid = (alert) => {
|
|
|
17
17
|
return (0, ScheduleScheduleWizard_1.isScheduleValid)({ Schedule: alert.Schedule });
|
|
18
18
|
};
|
|
19
19
|
exports.isScheduledAlertTimeValid = isScheduledAlertTimeValid;
|
|
20
|
-
const renderAlertScheduledSummary = () => {
|
|
21
|
-
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
20
|
+
const renderAlertScheduledSummary = (data) => {
|
|
22
21
|
if (!(0, ScheduledAlertHelper_1.isScheduledAlertDefinition)(data)) {
|
|
23
22
|
return null;
|
|
24
23
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { AlertType } from '../Utilities/getAlertType';
|
|
3
3
|
import { AdaptableApi, AlertDefinition } from '../../../types';
|
|
4
4
|
export declare const isSettingsValid: (data: AlertDefinition, api: AdaptableApi) => true | "Name is required" | "An Alert already exists with that name";
|
|
5
|
-
export declare const renderAlertTypeSummary: (alertType: AlertType) => React.JSX.Element;
|
|
5
|
+
export declare const renderAlertTypeSummary: (alertType: AlertType, data: AlertDefinition) => React.JSX.Element;
|
|
6
6
|
type AlertTypeWizardSectionProps = {
|
|
7
7
|
onAlertTypeChange: (alertType: AlertType) => void;
|
|
8
8
|
alertType: AlertType | null;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AlertTypeWizardSection = exports.renderAlertTypeSummary = exports.isSettingsValid = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
5
|
const getAlertType_1 = require("../Utilities/getAlertType");
|
|
7
|
-
const TypeRadio_1 = require("../../Wizard/TypeRadio");
|
|
8
6
|
const Tag_1 = require("../../../components/Tag");
|
|
9
7
|
const Flex_1 = require("../../../components/Flex");
|
|
10
8
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
11
|
-
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
12
9
|
const OnePageAdaptableWizard_2 = require("../../Wizard/OnePageAdaptableWizard");
|
|
13
|
-
const
|
|
10
|
+
const WizardTypeSelection_1 = require("../../Wizard/WizardTypeSelection");
|
|
14
11
|
const isSettingsValid = (data, api) => {
|
|
15
12
|
if (!data.Name?.trim()) {
|
|
16
13
|
return 'Name is required';
|
|
@@ -23,12 +20,38 @@ const isSettingsValid = (data, api) => {
|
|
|
23
20
|
return true;
|
|
24
21
|
};
|
|
25
22
|
exports.isSettingsValid = isSettingsValid;
|
|
26
|
-
const renderAlertTypeSummary = (alertType) => {
|
|
27
|
-
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
23
|
+
const renderAlertTypeSummary = (alertType, data) => {
|
|
28
24
|
const text = (0, getAlertType_1.getAlertTypeText)(alertType);
|
|
29
25
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_2.SummaryText, { children: ["Name ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.Name || 'Not specified' })] }), (0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_2.SummaryText, { children: ["Type ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: text })] })] }));
|
|
30
26
|
};
|
|
31
27
|
exports.renderAlertTypeSummary = renderAlertTypeSummary;
|
|
28
|
+
const ALERT_TYPE_OPTIONS = [
|
|
29
|
+
{
|
|
30
|
+
type: getAlertType_1.AlertType.DataChange,
|
|
31
|
+
description: "A data change has been made to the Grid's data source",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: getAlertType_1.AlertType.RowChange,
|
|
35
|
+
description: 'A Row has been added or removed from the data source',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: getAlertType_1.AlertType.Aggregation,
|
|
39
|
+
description: 'A change has been made to aggregated data (i.e. from multiple Rows)',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: getAlertType_1.AlertType.Observable,
|
|
43
|
+
description: 'A specified change (or lack of change) over time has been observed in the Grid',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: getAlertType_1.AlertType.Validation,
|
|
47
|
+
description: "A change made to the Grid's data has broken a validation rule",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: getAlertType_1.AlertType.Scheduled,
|
|
51
|
+
description: 'A reminder is triggered to display at a specfied date and time',
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
const ALERT_TYPE_COUNT = ALERT_TYPE_OPTIONS.length;
|
|
32
55
|
const AlertTypeWizardSection = (props) => {
|
|
33
56
|
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
34
57
|
const handleNameChange = (event) => {
|
|
@@ -37,6 +60,6 @@ const AlertTypeWizardSection = (props) => {
|
|
|
37
60
|
Name: event.target.value,
|
|
38
61
|
});
|
|
39
62
|
};
|
|
40
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:
|
|
63
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:h-full twa:min-h-0 twa:p-2 twa:gap-2", children: [(0, jsx_runtime_1.jsx)(WizardTypeSelection_1.WizardNameFieldSection, { value: data.Name ?? '', onChange: handleNameChange, inputDataName: "alert-name" }), (0, jsx_runtime_1.jsx)(WizardTypeSelection_1.WizardTypeSelectionSection, { headingId: "alert-type-heading", title: "Alert Type", dataName: "alert-type", columns: (0, WizardTypeSelection_1.getWizardTypeSelectionGridColumns)(ALERT_TYPE_COUNT), intro: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Click a card to choose one of ", ALERT_TYPE_COUNT, " alert types for when the Alert should fire"] }), children: ALERT_TYPE_OPTIONS.map((option) => ((0, jsx_runtime_1.jsx)(WizardTypeSelection_1.WizardTypeSelectionCard, { label: (0, getAlertType_1.getAlertTypeText)(option.type), description: option.description, selected: props.alertType === option.type, dataName: `alert-type-${option.type}`, onSelect: () => props.onAlertTypeChange(option.type) }, option.type))) })] }));
|
|
41
64
|
};
|
|
42
65
|
exports.AlertTypeWizardSection = AlertTypeWizardSection;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AlertWizard = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
7
|
const react_1 = require("react");
|
|
7
8
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
8
9
|
const Helper_1 = require("../../../Utilities/Helpers/Helper");
|
|
@@ -81,13 +82,20 @@ const AlertWizard = (props) => {
|
|
|
81
82
|
setAlertType(newAlertType);
|
|
82
83
|
doSetAlertDefinition((0, getDefaultAlertDefinition_1.getDefaultAlertDefinition)(alertDefinition, newAlertType));
|
|
83
84
|
};
|
|
84
|
-
|
|
85
|
+
const defaultEditSectionName = React.useMemo(() => {
|
|
86
|
+
if (props.defaultCurrentSectionName || !props.data) {
|
|
87
|
+
return props.defaultCurrentSectionName;
|
|
88
|
+
}
|
|
89
|
+
const type = (0, getAlertType_1.getAlertType)(props.data);
|
|
90
|
+
return type === getAlertType_1.AlertType.Scheduled ? 'Schedule' : 'Rule';
|
|
91
|
+
}, [props.defaultCurrentSectionName, props.data]);
|
|
92
|
+
return ((0, jsx_runtime_1.jsx)(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: defaultEditSectionName, moduleInfo: props.moduleInfo, modal: props.modal, data: alertDefinition, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
85
93
|
{
|
|
86
94
|
title: 'Name & Type',
|
|
87
95
|
isValid: AlertTypeWizardSection_1.isSettingsValid,
|
|
88
96
|
details: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Enter Name and select and select an Alert Type" })),
|
|
89
97
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(AlertTypeWizardSection_1.AlertTypeWizardSection, { alertType: alertType, onAlertTypeChange: handleAlertTypeChange, onChange: setAlertDefinition }) })),
|
|
90
|
-
renderSummary: () => (0, AlertTypeWizardSection_1.renderAlertTypeSummary)(alertType),
|
|
98
|
+
renderSummary: (data) => (0, AlertTypeWizardSection_1.renderAlertTypeSummary)(alertType, data),
|
|
91
99
|
},
|
|
92
100
|
{
|
|
93
101
|
title: 'Schedule',
|
|
@@ -117,7 +125,7 @@ const AlertWizard = (props) => {
|
|
|
117
125
|
details: "Select the Alert's Message Type and Text",
|
|
118
126
|
isValid: (data) => (0, isValidAlertMessage_1.isValidAlertMessage)(data, alertType),
|
|
119
127
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(AlertMessageWizardSection_1.AlertMessageWizardSection, { alertType: alertType, onChange: setAlertDefinition }) })),
|
|
120
|
-
renderSummary: () => (0, AlertMessageWizardSection_1.renderAlertMessageSummary)(alertType),
|
|
128
|
+
renderSummary: (data) => (0, AlertMessageWizardSection_1.renderAlertMessageSummary)(alertType, data),
|
|
121
129
|
},
|
|
122
130
|
{
|
|
123
131
|
title: 'Notification',
|
|
@@ -129,7 +137,7 @@ const AlertWizard = (props) => {
|
|
|
129
137
|
title: behaviourSpelling,
|
|
130
138
|
details: 'Configure ' + behaviourSpelling + 's for the Alert',
|
|
131
139
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(AlertBehaviourWizardSection_1.AlertBehaviourWizardSection, { alertType: alertType, onChange: setAlertDefinition }) })),
|
|
132
|
-
renderSummary: AlertBehaviourWizardSection_1.
|
|
140
|
+
renderSummary: AlertBehaviourWizardSection_1.renderAlertBehaviourSummary,
|
|
133
141
|
},
|
|
134
142
|
{
|
|
135
143
|
details: 'Select Alert Tags',
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderScopeSummary = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const clsx_1 = tslib_1.__importDefault(require("clsx"));
|
|
9
|
-
const Tag_1 = require("../../../components/Tag/Tag");
|
|
10
|
-
const renderScopeSummary = () => {
|
|
11
|
-
const { data, api: { columnScopeApi: scopeApi }, } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
5
|
+
const scopeSummaryTags_1 = require("../../Wizard/scopeSummaryTags");
|
|
6
|
+
const renderScopeSummary = (data) => {
|
|
12
7
|
if (!('Scope' in data)) {
|
|
13
8
|
return null;
|
|
14
9
|
}
|
|
15
|
-
|
|
16
|
-
const columnsInScope = scopeApi.getColumnsInScope(scope);
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: scopeApi.scopeIsAll(scope)
|
|
18
|
-
? 'Changes to any Column in the row will trigger an Alert'
|
|
19
|
-
: null }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:overflow-hidden", children: 'ColumnIds' in scope ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, clsx_1.default)('twa:text-2', columnsInScope.length ? 'twa:mb-2' : 'twa:mb-0'), children: "Changes in selected columns will trigger an alert" }), columnsInScope.length ? ((0, jsx_runtime_1.jsx)(Tag_1.TagList, { tags: columnsInScope.map((c) => c.friendlyName) })) : null] })) : null }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: 'DataTypes' in scope ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:mb-2", children: "Changes in Columns with these Data Types trigger an Alert" }), (0, jsx_runtime_1.jsx)(Tag_1.TagList, { tags: scope.DataTypes.map((dataType) => {
|
|
20
|
-
return `DataType: ${dataType}`;
|
|
21
|
-
}) })] })) : null })] }));
|
|
10
|
+
return (0, jsx_runtime_1.jsx)(scopeSummaryTags_1.ScopeSummaryTags, { scope: data.Scope });
|
|
22
11
|
};
|
|
23
12
|
exports.renderScopeSummary = renderScopeSummary;
|
|
@@ -46,7 +46,7 @@ class BulkUpdatePopupComponent extends React.Component {
|
|
|
46
46
|
if (!col) {
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
|
-
return ((0, jsx_runtime_1.jsxs)(PanelWithImage_1.PanelWithImage, { bodyProps: { className: 'twa:p-
|
|
49
|
+
return ((0, jsx_runtime_1.jsxs)(PanelWithImage_1.PanelWithImage, { bodyProps: { className: 'twa:p-2' }, glyphicon: this.props.moduleInfo.Glyph, header: this.props.moduleInfo.FriendlyName, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed(), variant: "primary", children: [col.dataType == 'date' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(HelpBlock_1.default, { className: "twa:my-2", children: "Enter a date value. Alternatively, tick the checkbox and select from an existing column value." }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", flexDirection: "row", className: "twa:flex-1 twa:mr-2", children: (0, jsx_runtime_1.jsx)(BulkUpdateValueSelector_1.BulkUpdateValueSelector, { selectedGridCells: this.props.SelectedGridCells, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: col, api: this.props.api, onColumnValueChange: (values) => this.onColumnValueSelectedChanged(values), allowNew: false, className: "twa:w-full twa:max-w-[inherit]" }) }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
|
|
50
50
|
this.props.PreviewInfo.previewValidationSummary.validationResult == 'All', onClick: () => {
|
|
51
51
|
this.onApplyClick();
|
|
52
52
|
}, variant: "raised", tone: "accent", children: "Apply Bulk Update" })] })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(HelpBlock_1.default, { className: "twa:my-2", children: "Select an existing Column value from the dropdown, or enter a new value" }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:mt-2 twa:gap-2 twa:items-stretch", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", flexDirection: "row", className: "twa:mr-2 twa:flex-1", children: (0, jsx_runtime_1.jsx)(BulkUpdateValueSelector_1.BulkUpdateValueSelector, { selectedGridCells: this.props.SelectedGridCells, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: col, api: this.props.api, onColumnValueChange: (columns) => this.onColumnValueSelectedChanged(columns), className: "twa:w-full twa:max-w-[inherit]" }) }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
|