@adaptabletools/adaptable-cjs 23.0.0-canary.7 → 23.0.0-canary.9
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/index.css +98 -17
- package/package.json +1 -1
- package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.js +2 -3
- package/src/AdaptableState/Common/Enums.d.ts +0 -12
- package/src/AdaptableState/Common/Enums.js +1 -16
- package/src/{Utilities → AdaptableState/Common}/MenuItem.d.ts +4 -4
- package/src/{Utilities → AdaptableState/Common}/MenuItem.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/BulletChartStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.d.ts +84 -0
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.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/AlertApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +5 -5
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExportApiImpl.js +1 -1
- package/src/Api/Implementation/LayoutHelpers.js +2 -3
- package/src/Api/Implementation/QuickSearchApiImpl.js +4 -4
- package/src/Api/Implementation/ThemeApiImpl.js +2 -2
- package/src/Api/Internal/ActionColumnInternalApi.js +2 -2
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/ChartingInternalApi.js +2 -2
- package/src/Api/Internal/ColumnInternalApi.js +2 -2
- package/src/Api/Internal/EventInternalApi.js +3 -4
- package/src/Api/Internal/ExportInternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +4 -4
- package/src/Api/Internal/GridInternalApi.js +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +6 -6
- package/src/Redux/ActionsReducers/ExportRedux.js +1 -1
- package/src/Redux/ActionsReducers/InternalRedux.js +1 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +2 -3
- package/src/Redux/Store/AdaptableReduxMerger.js +7 -9
- package/src/Redux/Store/AdaptableStore.js +5 -5
- package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
- package/src/Strategy/AdaptableModuleBase.js +1 -1
- package/src/Strategy/AlertModule.d.ts +1 -1
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/ChartingModule.d.ts +1 -1
- package/src/Strategy/ChartingModule.js +4 -4
- package/src/Strategy/ColumnInfoModule.d.ts +2 -2
- package/src/Strategy/CommentModule.d.ts +1 -1
- package/src/Strategy/CustomSortModule.d.ts +1 -1
- package/src/Strategy/ExportModule.js +2 -2
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +2 -2
- package/src/Strategy/NoteModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +8 -8
- package/src/Strategy/SettingsPanelModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/TeamSharingModule.js +4 -4
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +2 -3
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +32 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +54 -1
- package/src/Utilities/Extensions/NumberExtensions.d.ts +21 -0
- package/src/Utilities/Extensions/NumberExtensions.js +78 -0
- package/src/Utilities/Extensions/ObjectExtensions.d.ts +44 -0
- package/src/Utilities/Extensions/ObjectExtensions.js +277 -0
- package/src/Utilities/Extensions/StringExtensions.d.ts +26 -0
- package/src/Utilities/Extensions/StringExtensions.js +49 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +7 -7
- package/src/Utilities/Helpers/{alertFormHelper.js → AlertHelper.js} +1 -1
- package/src/Utilities/Helpers/DateHelper.js +2 -2
- package/src/Utilities/Helpers/{FormatHelper.js → DisplayFormatHelper.js} +5 -5
- package/src/Utilities/Helpers/Helper.d.ts +0 -6
- package/src/Utilities/Helpers/Helper.js +0 -38
- package/src/Utilities/Helpers/{QuickSearchStyleHelper.js → QuickSearchHelper.js} +2 -3
- package/src/Utilities/Helpers/{ScheduleHelper.d.ts → Scheduling/ScheduleHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduleHelper.js → Scheduling/ScheduleHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduleJobManager.d.ts → Scheduling/ScheduleJobManager.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduleJobRunner.d.ts → Scheduling/ScheduleJobRunner.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledAlertHelper.d.ts → Scheduling/ScheduledAlertHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledAlertHelper.js → Scheduling/ScheduledAlertHelper.js} +4 -4
- package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.d.ts → Scheduling/ScheduledJobsMiddlewareHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.js → Scheduling/ScheduledJobsMiddlewareHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduledReportHelper.d.ts → Scheduling/ScheduledReportHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledReportHelper.js → Scheduling/ScheduledReportHelper.js} +1 -1
- package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +5 -0
- package/src/Utilities/{Defaults/DefaultSettingsPanel.js → Helpers/SettingsPanelHelper.js} +16 -1
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.d.ts +63 -0
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +334 -0
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -2
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js} +9 -9
- package/src/Utilities/Helpers/{IconStylePresets.d.ts → StyledColumns/IconStyleHelper.d.ts} +6 -1
- package/src/Utilities/Helpers/{IconStylePresets.js → StyledColumns/IconStyleHelper.js} +16 -0
- package/src/Utilities/Helpers/{percentBarPreviewHelper.d.ts → StyledColumns/PercentBarStyleHelper.d.ts} +2 -1
- package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +11 -17
- package/src/Utilities/Helpers/{SparklineOptionsHelper.js → StyledColumns/SparklineStyleHelper.js} +1 -1
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.d.ts +52 -0
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +124 -0
- package/src/Utilities/Helpers/TimingHelper.d.ts +34 -0
- package/src/Utilities/{utils/debounce.js → Helpers/TimingHelper.js} +25 -9
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +118 -2
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
- package/src/Utilities/Services/RowSummaryService.js +6 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
- package/src/View/Alert/Utilities/getAlertType.js +1 -1
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +1 -1
- package/src/View/Alert/Utilities/mapAlertDefinition.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +159 -126
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +4 -4
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertWizard.js +10 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +2 -2
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
- package/src/View/Comments/CommentsEditor.js +2 -2
- package/src/View/Comments/CommentsPopup.js +2 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +3 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +3 -2
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +2 -0
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +6 -0
- package/src/View/Components/Buttons/EntityListActionButtons.js +1 -1
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -0
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +8 -8
- package/src/View/Components/ColumnFilter/ColumnFilter.js +14 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -2
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +2 -2
- package/src/View/Components/Popups/Utilities.js +5 -5
- package/src/View/Components/RangesComponent.d.ts +4 -3
- package/src/View/Components/RangesComponent.js +5 -9
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -3
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +2 -3
- package/src/View/Dashboard/CustomDashboardButton.js +2 -3
- package/src/View/Dashboard/Dashboard.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryTable.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +2 -2
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
- package/src/View/Export/ExportSchedulesTab.js +3 -4
- package/src/View/Filter/FilterViewPanel.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +13 -13
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +4 -4
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +2 -2
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +128 -102
- package/src/View/Note/NoteEditor.js +2 -2
- package/src/View/Note/NotePopup.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +7 -7
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -4
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +2 -2
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +36 -30
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +1 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +79 -68
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +8 -8
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +42 -15
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +92 -52
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +14 -14
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +37 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.d.ts +23 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.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 +3 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +7 -9
- 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/StyledColumnGradientPreview.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +24 -15
- 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/Components/StyledColumnSparklinePreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +20 -60
- package/src/View/UIHelper.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
- package/src/View/Wizard/OnePageWizards.js +3 -1
- package/src/agGrid/AdaptableAgGrid.js +11 -11
- package/src/agGrid/AgGridColumnAdapter.js +30 -28
- package/src/agGrid/AgGridExportAdapter.js +3 -3
- package/src/agGrid/AgGridMenuAdapter.js +129 -4
- package/src/agGrid/cellRenderers/BadgeRenderer.js +9 -7
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +47 -46
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
- package/src/agGrid/cellRenderers/IconRenderer.js +20 -19
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +29 -101
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +54 -52
- package/src/agGrid/cellRenderers/RatingRenderer.js +6 -6
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/components/ColorPicker/ColorPicker.js +2 -2
- package/src/components/Datepicker/index.js +2 -2
- package/src/components/FormLayout/index.js +2 -2
- package/src/components/OverlayTrigger/index.js +2 -2
- package/src/env.js +2 -2
- package/src/layout-manager/src/isLayoutEqual.js +4 -5
- package/src/metamodel/adaptable.metamodel.d.ts +118 -19
- 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 +12 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -3
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.d.ts +0 -5
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.js +0 -18
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +0 -3
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +0 -19
- package/src/Utilities/Helpers/styledColumnRowKindSupport.d.ts +0 -25
- package/src/Utilities/Helpers/styledColumnRowKindSupport.js +0 -70
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +0 -4
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +0 -120
- package/src/Utilities/utils/chunk.d.ts +0 -6
- package/src/Utilities/utils/chunk.js +0 -20
- package/src/Utilities/utils/clamp.d.ts +0 -5
- package/src/Utilities/utils/clamp.js +0 -10
- package/src/Utilities/utils/cloneDeepWith.d.ts +0 -9
- package/src/Utilities/utils/cloneDeepWith.js +0 -70
- package/src/Utilities/utils/debounce.d.ts +0 -20
- package/src/Utilities/utils/flatten.d.ts +0 -5
- package/src/Utilities/utils/flatten.js +0 -10
- package/src/Utilities/utils/flattenDeep.d.ts +0 -5
- package/src/Utilities/utils/flattenDeep.js +0 -10
- package/src/Utilities/utils/get.d.ts +0 -6
- package/src/Utilities/utils/get.js +0 -38
- package/src/Utilities/utils/index.d.ts +0 -22
- package/src/Utilities/utils/index.js +0 -48
- package/src/Utilities/utils/isArray.d.ts +0 -6
- package/src/Utilities/utils/isArray.js +0 -8
- package/src/Utilities/utils/isEqual.d.ts +0 -5
- package/src/Utilities/utils/isEqual.js +0 -127
- package/src/Utilities/utils/isObject.d.ts +0 -6
- package/src/Utilities/utils/isObject.js +0 -12
- package/src/Utilities/utils/isPlainObject.d.ts +0 -6
- package/src/Utilities/utils/isPlainObject.js +0 -20
- package/src/Utilities/utils/kebabCase.d.ts +0 -5
- package/src/Utilities/utils/kebabCase.js +0 -12
- package/src/Utilities/utils/merge.d.ts +0 -11
- package/src/Utilities/utils/merge.js +0 -44
- package/src/Utilities/utils/mergeWith.d.ts +0 -7
- package/src/Utilities/utils/mergeWith.js +0 -50
- package/src/Utilities/utils/orderBy.d.ts +0 -8
- package/src/Utilities/utils/orderBy.js +0 -33
- package/src/Utilities/utils/parseInt.d.ts +0 -6
- package/src/Utilities/utils/parseInt.js +0 -12
- package/src/Utilities/utils/sentenceCase.d.ts +0 -6
- package/src/Utilities/utils/sentenceCase.js +0 -19
- package/src/Utilities/utils/startCase.d.ts +0 -5
- package/src/Utilities/utils/startCase.js +0 -15
- package/src/Utilities/utils/throttle.d.ts +0 -17
- package/src/Utilities/utils/throttle.js +0 -23
- package/src/Utilities/utils/toNumber.d.ts +0 -5
- package/src/Utilities/utils/toNumber.js +0 -42
- package/src/Utilities/utils/uniq.d.ts +0 -7
- package/src/Utilities/utils/uniq.js +0 -12
- package/src/Utilities/utils/uniqBy.d.ts +0 -8
- package/src/Utilities/utils/uniqBy.js +0 -25
- package/src/Utilities/utils/words.d.ts +0 -7
- package/src/Utilities/utils/words.js +0 -13
- package/src/agGrid/buildValueAggregationMenuItem.d.ts +0 -19
- package/src/agGrid/buildValueAggregationMenuItem.js +0 -114
- package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.d.ts +0 -30
- package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.js +0 -58
- package/src/agGrid/createAgGridIcon.d.ts +0 -10
- package/src/agGrid/createAgGridIcon.js +0 -19
- /package/src/{Utilities → AdaptableState/Aggregations}/only.d.ts +0 -0
- /package/src/{Utilities → AdaptableState/Aggregations}/only.js +0 -0
- /package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.d.ts +0 -0
- /package/src/Utilities/Helpers/{ActionColumnWidthHelper.d.ts → ActionColumnHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ActionColumnWidthHelper.js → ActionColumnHelper.js} +0 -0
- /package/src/Utilities/Helpers/{alertFormHelper.d.ts → AlertHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{chartingHelper.d.ts → ChartHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{chartingHelper.js → ChartHelper.js} +0 -0
- /package/src/Utilities/Helpers/{FormatHelper.d.ts → DisplayFormatHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{plusMinusTriggerKeys.d.ts → PlusMinusHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{plusMinusTriggerKeys.js → PlusMinusHelper.js} +0 -0
- /package/src/Utilities/Helpers/{QuickSearchStyleHelper.d.ts → QuickSearchHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ScheduleJobManager.js → Scheduling/ScheduleJobManager.js} +0 -0
- /package/src/Utilities/Helpers/{ScheduleJobRunner.js → Scheduling/ScheduleJobRunner.js} +0 -0
- /package/src/Utilities/Helpers/{SparklineOptionsHelper.d.ts → StyledColumns/SparklineStyleHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ThemeHelpers.d.ts → ThemeHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ThemeHelpers.js → ThemeHelper.js} +0 -0
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AlertBehaviourWizardSection = exports.renderAlertBehaviourSummary = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
|
|
6
|
+
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduledAlertHelper");
|
|
7
7
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
8
8
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
9
9
|
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
@@ -12,9 +12,12 @@ const Helper_1 = require("../../../Utilities/Helpers/Helper");
|
|
|
12
12
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
|
|
13
13
|
const AdaptableIconSelector_1 = require("../../Components/AdaptableIconSelector");
|
|
14
14
|
const Flex_1 = require("../../../components/Flex");
|
|
15
|
-
const
|
|
15
|
+
const StringExtensions_2 = require("../../../Utilities/Extensions/StringExtensions");
|
|
16
16
|
const NewSelect_1 = require("../../../components/NewSelect");
|
|
17
|
-
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}`;
|
|
18
21
|
const TONE_OPTIONS = [
|
|
19
22
|
{
|
|
20
23
|
label: 'Tone: Use Alert Tone',
|
|
@@ -38,6 +41,125 @@ const AlertButtonPreview = ({ button, messageType }) => {
|
|
|
38
41
|
function renderTone(option) {
|
|
39
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] }));
|
|
40
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, StringExtensions_2.sentenceCase)(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, StringExtensions_2.sentenceCase)(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
|
+
};
|
|
41
163
|
const AlertButtonsEditor = (props) => {
|
|
42
164
|
const { api, adaptableAlert } = props;
|
|
43
165
|
const onChange = (newButtons) => {
|
|
@@ -45,22 +167,14 @@ const AlertButtonsEditor = (props) => {
|
|
|
45
167
|
};
|
|
46
168
|
const alertDefinition = adaptableAlert.alertDefinition;
|
|
47
169
|
const messageType = alertDefinition?.MessageType ?? 'Info';
|
|
48
|
-
// const rowAddedAlert =
|
|
49
|
-
// api.alertApi.internalApi.isAlertDefinitionForAddedRowChangeEvent(alertDefinition);
|
|
50
170
|
const isRowRemovedAlert = api.alertApi.internalApi.isAlertDefinitionForRemovedRowChangeEvent(alertDefinition);
|
|
51
|
-
// except row change
|
|
52
171
|
const hasHighlightCell = props.alertType !== 'RowChange';
|
|
53
|
-
// all, except row removed
|
|
54
172
|
const hasHighlightRow = !isRowRemovedAlert;
|
|
55
|
-
// except row removed
|
|
56
173
|
const hasJumpToCell = props.alertType !== 'RowChange';
|
|
57
|
-
// all
|
|
58
174
|
const hasJumpToRow = !isRowRemovedAlert;
|
|
59
|
-
// all
|
|
60
175
|
const hasSuspend = true;
|
|
61
|
-
// only data change
|
|
62
176
|
const hasUndo = props.alertType === 'DataChange';
|
|
63
|
-
const
|
|
177
|
+
const alertButtons = (0, Helper_1.cloneObject)(props.AlertButtons || []) || [];
|
|
64
178
|
const buttonCommands = [];
|
|
65
179
|
if (hasHighlightRow) {
|
|
66
180
|
buttonCommands.push('highlight-row');
|
|
@@ -86,121 +200,40 @@ const AlertButtonsEditor = (props) => {
|
|
|
86
200
|
buttonCommands.push(ch.name);
|
|
87
201
|
});
|
|
88
202
|
}
|
|
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
|
-
};
|
|
124
|
-
const setTone = (tone) => {
|
|
125
|
-
onChange(AlertButtons.map((btn, i) => {
|
|
126
|
-
if (i === index) {
|
|
127
|
-
const buttonStyle = { ...btn.ButtonStyle };
|
|
128
|
-
if (tone == null) {
|
|
129
|
-
delete buttonStyle.tone;
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
buttonStyle.tone = tone;
|
|
133
|
-
}
|
|
134
|
-
return {
|
|
135
|
-
...btn,
|
|
136
|
-
ButtonStyle: buttonStyle,
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
return btn;
|
|
140
|
-
}));
|
|
141
|
-
};
|
|
142
|
-
const handleCommandChange = (checked, commandName) => {
|
|
143
|
-
let commands = btnCommands;
|
|
144
|
-
if (!checked) {
|
|
145
|
-
// remove current Command
|
|
146
|
-
commands = commands.filter((a) => a !== commandName);
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
commands = [...commands, commandName];
|
|
150
|
-
}
|
|
151
|
-
onChange(AlertButtons.map((btn, i) => {
|
|
152
|
-
if (i === index) {
|
|
153
|
-
return {
|
|
154
|
-
...btn,
|
|
155
|
-
Command: commands.length ? commands : undefined,
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
return btn;
|
|
159
|
-
}));
|
|
160
|
-
};
|
|
161
|
-
let iconSelector = null;
|
|
162
|
-
if (!button.icon || (button.icon && 'name' in button.icon)) {
|
|
163
|
-
iconSelector = ((0, jsx_runtime_1.jsx)(AdaptableIconSelector_1.AdaptableIconSelector, { value: button.icon && 'name' in button.icon ? button?.icon?.name : '', onChange: (iconName) => {
|
|
164
|
-
onChange(AlertButtons.map((btn) => {
|
|
165
|
-
if (btn === button) {
|
|
166
|
-
return {
|
|
167
|
-
...btn,
|
|
168
|
-
icon: {
|
|
169
|
-
name: iconName,
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
return btn;
|
|
174
|
-
}));
|
|
175
|
-
} }));
|
|
176
|
-
}
|
|
177
|
-
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: () => {
|
|
178
|
-
onChange(AlertButtons.filter((btn) => btn !== button));
|
|
179
|
-
} })] }), (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) => {
|
|
180
|
-
onChange(AlertButtons.map((btn, i) => {
|
|
181
|
-
if (i === index) {
|
|
182
|
-
return { ...btn, Label: e.target.value };
|
|
183
|
-
}
|
|
184
|
-
return btn;
|
|
185
|
-
}));
|
|
186
|
-
} }) }), (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) => {
|
|
187
|
-
return {
|
|
188
|
-
label: StringExtensions_1.default.CapitaliseFirstLetter(variant),
|
|
189
|
-
value: variant,
|
|
190
|
-
};
|
|
191
|
-
}), renderValue: (option) => `Variant: ${option.label}`, value: buttonStyle?.variant, onValueChange: (value) => {
|
|
192
|
-
setVariant(value);
|
|
193
|
-
} }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { items: TONE_OPTIONS, onValueChange: (value) => {
|
|
194
|
-
if (value === 'text') {
|
|
195
|
-
setTone(null);
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
setTone(value);
|
|
199
|
-
}, 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) => {
|
|
200
|
-
return ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { onChange: (checked) => handleCommandChange(checked, commandName), checked: button.Command === commandName ||
|
|
201
|
-
(Array.isArray(button.Command) &&
|
|
202
|
-
button.Command.includes(commandName)), children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: (0, sentenceCase_1.default)(commandName) }) }, commandName));
|
|
203
|
-
}), 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)));
|
|
204
237
|
}) })] }));
|
|
205
238
|
};
|
|
206
239
|
exports.AlertButtonsEditor = AlertButtonsEditor;
|
|
@@ -10,8 +10,8 @@ const CheckBox_1 = require("../../../components/CheckBox");
|
|
|
10
10
|
const AdaptablePopupAlert_1 = require("../../Components/Popups/AdaptablePopupAlert");
|
|
11
11
|
const AlertButtonsEditor_1 = require("./AlertButtonsEditor");
|
|
12
12
|
const getAlertType_1 = require("../Utilities/getAlertType");
|
|
13
|
-
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
|
|
14
|
-
const
|
|
13
|
+
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduledAlertHelper");
|
|
14
|
+
const AlertHelper_1 = require("../../../Utilities/Helpers/AlertHelper");
|
|
15
15
|
const Flex_1 = require("../../../components/Flex");
|
|
16
16
|
const Card_1 = require("../../../components/Card");
|
|
17
17
|
const renderAlertNotificationSummary = (data, api) => {
|
|
@@ -37,7 +37,7 @@ const AlertPreview = ({ alertDefinition, api, focusFirstButton, ...boxProps }) =
|
|
|
37
37
|
}, [alertDefinition?.MessageType]);
|
|
38
38
|
const alertToPreview = React.useMemo(() => {
|
|
39
39
|
const defaultForm = api.alertApi.internalApi.getDefaultAlertNotificationForm();
|
|
40
|
-
const alertForm = (0,
|
|
40
|
+
const alertForm = (0, AlertHelper_1.resolveAlertFormForDefinition)(alertDefinition, defaultForm);
|
|
41
41
|
if (typeof alertForm !== 'string') {
|
|
42
42
|
alertForm.Buttons = (alertForm.Buttons ?? []).map(mapButtons);
|
|
43
43
|
}
|
|
@@ -139,6 +139,6 @@ const AlertNotificationWizardSection = (props) => {
|
|
|
139
139
|
} }));
|
|
140
140
|
})()
|
|
141
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 &&
|
|
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 })) })] }) })) : 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] }));
|
|
143
143
|
};
|
|
144
144
|
exports.AlertNotificationWizardSection = AlertNotificationWizardSection;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AlertRulesWizardSection = exports.renderAlertRulesSummary = exports.getRuleStepDescription = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
|
|
6
|
+
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduledAlertHelper");
|
|
7
7
|
const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
|
|
8
8
|
const Tag_1 = require("../../../components/Tag");
|
|
9
9
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AlertScheduledWizardSection = exports.renderAlertScheduledSummary = exports.isScheduledAlertTimeValid = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
|
|
6
|
+
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduledAlertHelper");
|
|
7
7
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
8
8
|
const ScheduleScheduleWizard_1 = require("../../Schedule/Wizard/ScheduleScheduleWizard");
|
|
9
9
|
const Tag_1 = require("../../../components/Tag");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AlertScopeWizardSection = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
|
|
5
|
+
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduledAlertHelper");
|
|
6
6
|
const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
|
|
7
7
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
8
8
|
const Flex_1 = require("../../../components/Flex");
|
|
@@ -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");
|
|
@@ -15,7 +16,7 @@ const AlertMessageWizardSection_1 = require("./AlertMessageWizardSection");
|
|
|
15
16
|
const isValidAlertMessage_1 = require("./isValidAlertMessage");
|
|
16
17
|
const BaseAlertScopeWizardSection_1 = require("./BaseAlertScopeWizardSection");
|
|
17
18
|
const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
|
|
18
|
-
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
|
|
19
|
+
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduledAlertHelper");
|
|
19
20
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
20
21
|
const react_redux_1 = require("react-redux");
|
|
21
22
|
const AlertRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/AlertRedux"));
|
|
@@ -81,7 +82,14 @@ 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,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isValidAlertRules = void 0;
|
|
4
4
|
const Utilities_1 = require("../../Components/EntityRulesEditor/Utilities");
|
|
5
|
-
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
|
|
5
|
+
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduledAlertHelper");
|
|
6
6
|
const isValidAlertRules = (alert, api, context) => {
|
|
7
7
|
if ((0, ScheduledAlertHelper_1.isScheduledAlertDefinition)(alert)) {
|
|
8
8
|
return true;
|
|
@@ -5,7 +5,7 @@ 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
7
|
const react_redux_1 = require("react-redux");
|
|
8
|
-
const
|
|
8
|
+
const ObjectExtensions_1 = require("../../../../Utilities/Extensions/ObjectExtensions");
|
|
9
9
|
const InternalRedux = tslib_1.__importStar(require("../../../../Redux/ActionsReducers/InternalRedux"));
|
|
10
10
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
11
11
|
const PreviewChartSection = (props) => {
|
|
@@ -26,7 +26,7 @@ const PreviewChartSection = (props) => {
|
|
|
26
26
|
}, [divRef]);
|
|
27
27
|
React.useEffect(() => {
|
|
28
28
|
const model = currentChartModels.find((model) => model.chartId == localChartId);
|
|
29
|
-
if (model && !(0,
|
|
29
|
+
if (model && !(0, ObjectExtensions_1.isEqual)(model, props.chartDefinition.Model)) {
|
|
30
30
|
props.onChange({
|
|
31
31
|
...props.chartDefinition,
|
|
32
32
|
Model: model,
|
|
@@ -5,13 +5,13 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
7
7
|
const NewSelect_1 = require("../../../../components/NewSelect");
|
|
8
|
-
const
|
|
8
|
+
const ChartHelper_1 = require("../../../../Utilities/Helpers/ChartHelper");
|
|
9
9
|
const Flex_1 = require("../../../../components/Flex");
|
|
10
10
|
const Card_1 = require("../../../../components/Card");
|
|
11
11
|
const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
|
|
12
12
|
const PreviewChartSection_1 = require("./PreviewChartSection");
|
|
13
13
|
const isSettingsValid = (chartDefinition, api) => {
|
|
14
|
-
return (0,
|
|
14
|
+
return (0, ChartHelper_1.validateChartName)(api, chartDefinition.Name, chartDefinition.Uuid);
|
|
15
15
|
};
|
|
16
16
|
exports.isSettingsValid = isSettingsValid;
|
|
17
17
|
const AGG_FUNCS = ['sum', 'min', 'max', 'count', 'avg', 'first', 'last'];
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SettingsSection = exports.isSettingsValid = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const
|
|
6
|
+
const ChartHelper_1 = require("../../../../Utilities/Helpers/ChartHelper");
|
|
7
7
|
const Flex_1 = require("../../../../components/Flex");
|
|
8
8
|
const Card_1 = require("../../../../components/Card");
|
|
9
9
|
const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
|
|
10
10
|
const PreviewChartSection_1 = require("./PreviewChartSection");
|
|
11
11
|
const isSettingsValid = (chartDefinition, api) => {
|
|
12
|
-
return (0,
|
|
12
|
+
return (0, ChartHelper_1.validateChartName)(api, chartDefinition.Name, chartDefinition.Uuid);
|
|
13
13
|
};
|
|
14
14
|
exports.isSettingsValid = isSettingsValid;
|
|
15
15
|
const SettingsSection = (props) => {
|
|
@@ -12,7 +12,7 @@ const CommentsRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/
|
|
|
12
12
|
const InternalRedux_1 = require("../../Redux/ActionsReducers/InternalRedux");
|
|
13
13
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
14
14
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../Components/AdaptableInput"));
|
|
15
|
-
const
|
|
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
18
|
// Edit Mode
|
|
@@ -55,7 +55,7 @@ const CommentsEditor = (props) => {
|
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
57
|
const formatDate = (date, format) => {
|
|
58
|
-
return
|
|
58
|
+
return DisplayFormatHelper_1.default.DateFormatter(date, { Pattern: format });
|
|
59
59
|
};
|
|
60
60
|
return ((0, jsx_runtime_1.jsxs)(Panel_1.default, { color: "var(--ab-color-primary-foreground)", onClick: () => props.enableEditMode(), className: "ab-CommentPopup twa:min-w-[250px]", onKeyDown: (event) => {
|
|
61
61
|
if (event.key === 'Escape') {
|
|
@@ -10,7 +10,7 @@ const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
|
|
|
10
10
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
11
11
|
const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
|
|
12
12
|
const AdaptableButton_1 = require("../Components/AdaptableButton");
|
|
13
|
-
const
|
|
13
|
+
const DisplayFormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/DisplayFormatHelper"));
|
|
14
14
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
15
15
|
const Flex_1 = require("../../components/Flex");
|
|
16
16
|
const tableDOMProps = {
|
|
@@ -34,7 +34,7 @@ const CellComments = (props) => {
|
|
|
34
34
|
const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Comment') ===
|
|
35
35
|
GeneralConstants_1.ACCESS_LEVEL_READ_ONLY;
|
|
36
36
|
const formatDate = (date, format) => {
|
|
37
|
-
return
|
|
37
|
+
return DisplayFormatHelper_1.default.DateFormatter(date, { Pattern: format });
|
|
38
38
|
};
|
|
39
39
|
const columnsMap = React.useMemo(() => {
|
|
40
40
|
const columns = {
|
|
@@ -9,6 +9,7 @@ const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/Simp
|
|
|
9
9
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
10
10
|
const Flex_1 = require("../../../components/Flex");
|
|
11
11
|
const Tag_1 = require("../../../components/Tag/Tag");
|
|
12
|
+
const objectListActionButtonStyles_1 = require("./objectListActionButtonStyles");
|
|
12
13
|
const baseClassName = 'ab-Adaptable-Object-Compact-List';
|
|
13
14
|
const ICON_SIZE = 20;
|
|
14
15
|
const AdaptableObjectCompactListItem = (props) => {
|
|
@@ -45,7 +46,7 @@ const AdaptableObjectCompactListItem = (props) => {
|
|
|
45
46
|
? React.createElement(objectView.item.view, {
|
|
46
47
|
data: props.abObject,
|
|
47
48
|
})
|
|
48
|
-
: objectView.item.view, Boolean(objectView.item?.values && objectView.item?.values?.length) && ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `${baseClassName}__Item__Values`, children: (0, jsx_runtime_1.jsx)(Tag_1.TagList, { tags: objectView.item.values, variant: objectView.item.tagVariant }) }))] }), suspendAction && unSuspendAction && ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { onMouseDown: handleSuspendUnSuspend, tone: isSuspended ? '
|
|
49
|
+
: objectView.item.view, Boolean(objectView.item?.values && objectView.item?.values?.length) && ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `${baseClassName}__Item__Values`, children: (0, jsx_runtime_1.jsx)(Tag_1.TagList, { tags: objectView.item.values, variant: objectView.item.tagVariant }) }))] }), suspendAction && unSuspendAction && ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { onMouseDown: handleSuspendUnSuspend, tone: "neutral", variant: "text", iconSize: ICON_SIZE, icon: isSuspended ? 'resume' : 'pause', tooltip: isSuspended ? 'Resume' : 'Suspend', className: (0, objectListActionButtonStyles_1.objectListActionButtonClassName)('suspend', isSuspended ? 'twa:opacity-60' : undefined) })), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:ml-1 twa:flex-[0_0_auto] twa:gap-1", children: deleteAction && ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { iconSize: ICON_SIZE, icon: "delete", variant: "text", onMouseDown: handleDelete, accessLevel: moduleAccessLevel, className: (0, objectListActionButtonStyles_1.objectListActionButtonClassName)('delete') })) })] }));
|
|
49
50
|
};
|
|
50
51
|
exports.AdaptableObjectCompactListItem = AdaptableObjectCompactListItem;
|
|
51
52
|
const AdaptableObjectCompactList = (props) => {
|
|
@@ -69,7 +70,7 @@ const AdaptableObjectCompactList = (props) => {
|
|
|
69
70
|
dispatch(unSuspendAllAction);
|
|
70
71
|
}
|
|
71
72
|
}, [isAtLeastOneAbObjectActive]);
|
|
72
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: baseClassName, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: `${baseClassName}__Header twa:text-3`, children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: `${baseClassName}__Title`, alignItems: 'center', children: props.module.moduleInfo.FriendlyName }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" }), suspendAllAction && unSuspendAllAction && ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { className: "twa:mr-2", onMouseDown: handleSuspendUnsuspendAll, tone:
|
|
73
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: baseClassName, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: `${baseClassName}__Header twa:text-3`, children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: `${baseClassName}__Title`, alignItems: 'center', children: props.module.moduleInfo.FriendlyName }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" }), suspendAllAction && unSuspendAllAction && ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { className: "twa:mr-2", onMouseDown: handleSuspendUnsuspendAll, tone: "neutral", variant: "raised", icon: isAtLeastOneAbObjectActive ? 'pause' : 'resume', accessLevel: accessLevel, children: isAtLeastOneAbObjectActive ? 'Suspend All' : 'Resume All' })), deleteAllAction && ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { onMouseDown: () => dispatch(deleteAllAction), variant: "raised", tone: "neutral", accessLevel: accessLevel, children: "Clear All" }))] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `${baseClassName}__Body`, children: props.abObjects.map((abObject) => {
|
|
73
74
|
return ((0, jsx_runtime_1.jsx)(exports.AdaptableObjectCompactListItem, { abObject: abObject, module: props.module }, abObject.Uuid));
|
|
74
75
|
}) })] }));
|
|
75
76
|
};
|
|
@@ -17,6 +17,7 @@ const SuspendToggleButton_1 = require("../Buttons/SuspendToggleButton/SuspendTog
|
|
|
17
17
|
const Flex_1 = require("../../../components/Flex");
|
|
18
18
|
const twMerge_1 = require("../../../twMerge");
|
|
19
19
|
const Tag_1 = require("../../../components/Tag/Tag");
|
|
20
|
+
const objectListActionButtonStyles_1 = require("./objectListActionButtonStyles");
|
|
20
21
|
const ICON_SIZE = 26;
|
|
21
22
|
const LIST_BASE_CLASS_NAME = 'ab-Adaptable-Object-List';
|
|
22
23
|
const ITEM_BASE_CLASS_NAME = `${LIST_BASE_CLASS_NAME}__Item`;
|
|
@@ -39,7 +40,7 @@ const AdaptableObjectListItemView = (props) => {
|
|
|
39
40
|
dispatch(props.deleteAction);
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
|
-
const deleteActionButton = (0, jsx_runtime_1.jsx)(ButtonDelete_1.ButtonDelete, { ...deleteActionProps });
|
|
43
|
+
const deleteActionButton = ((0, jsx_runtime_1.jsx)(ButtonDelete_1.ButtonDelete, { ...deleteActionProps, className: (0, twMerge_1.twMerge)((0, objectListActionButtonStyles_1.objectListActionButtonClassName)('delete'), deleteActionProps.className) }));
|
|
43
44
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { "data-name": "adaptable-object-list-item", "data-value": props.abObject.Uuid, as: "li", className: (0, twMerge_1.twMerge)(baseClassName, 'twa:rounded-standard', props.className), style: props.style, children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `twa:flex-1 ${baseClassName}__rows twa:gap-2 twa:flex twa:flex-col`, children: props.items.filter?.(Boolean)?.map((tag, index) => {
|
|
44
45
|
const labelElement = typeof tag.label === 'function'
|
|
45
46
|
? React.createElement(tag.label, { key: index, data: props.abObject })
|
|
@@ -57,7 +58,7 @@ const AdaptableObjectListItemView = (props) => {
|
|
|
57
58
|
module: props.module,
|
|
58
59
|
})
|
|
59
60
|
: tag.viewAfter] })] }, `${index}-${tag.name}`));
|
|
60
|
-
}) }), props.showActions && ((0, jsx_runtime_1.
|
|
61
|
+
}) }), props.showActions && ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: `${baseClassName}__buttons twa:ml-3 twa:pl-3 twa:text-right twa:min-w-[80px]`, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:justify-end twa:items-center twa:gap-1", children: [props.actions, props.teamSharingActivated && ((0, jsx_runtime_1.jsx)(ButtonShare_1.ButtonShare, { iconSize: ICON_SIZE, Header: `TeamSharing ${props.entityType}`, accessLevel: props.accessLevel, onShare: props.onShare, className: (0, objectListActionButtonStyles_1.objectListActionButtonClassName)('share') })), props.showEditButton && ((0, jsx_runtime_1.jsx)(ButtonEdit_1.ButtonEdit, { iconSize: ICON_SIZE, disabled: props.editDisabled, accessLevel: props.accessLevel, className: (0, objectListActionButtonStyles_1.objectListActionButtonClassName)('edit'), onClick: () => props.handleOnEdit() })), props.suspendedEnabled && ((0, jsx_runtime_1.jsx)(SuspendToggleButton_1.SuspendToggleButton, { iconSize: ICON_SIZE, className: (0, objectListActionButtonStyles_1.objectListActionButtonClassName)('suspend'), onSuspend: props.onSuspend, onUnSuspend: props.onUnSuspend, suspendableObject: props.abObject, accessLevel: props.accessLevel })), props.onDelete && ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { "data-name": "delete", disabled: props.deleteDisabled, iconSize: ICON_SIZE, tooltip: props.deleteTooltip, icon: "delete", onClick: props.onDelete, variant: "text", className: (0, objectListActionButtonStyles_1.objectListActionButtonClassName)('delete') })), props.deleteAction ? deleteActionButton : null] }) }))] }));
|
|
61
62
|
};
|
|
62
63
|
exports.AdaptableObjectListItemView = AdaptableObjectListItemView;
|
|
63
64
|
const AdaptableObjectListItem = (props) => {
|