@adaptabletools/adaptable 14.0.0-canary.0 → 14.0.0-canary.2
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/README.md +3 -3
- package/agGrid.d.ts +23 -1
- package/agGrid.js +23 -1
- package/base.css +1408 -2113
- package/base.css.map +1 -0
- package/bundle.cjs.js +215 -186
- package/index.css +1586 -1473
- package/index.css.map +1 -0
- package/package.json +10 -10
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +20 -5
- package/src/AdaptableOptions/ActionOptions.d.ts +66 -32
- package/src/AdaptableOptions/AdaptableOptions.d.ts +6 -2
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +10 -104
- package/src/AdaptableOptions/AlertOptions.d.ts +10 -1
- package/src/AdaptableOptions/ChartingOptions.d.ts +27 -0
- package/src/{Api/ConditionalStyleApi.js → AdaptableOptions/ChartingOptions.js} +0 -0
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/EntitlementOptions.d.ts +14 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +3 -3
- package/src/AdaptableOptions/ExpressionOptions.d.ts +204 -0
- package/src/{Api/InternalApi.js → AdaptableOptions/ExpressionOptions.js} +0 -0
- package/src/AdaptableOptions/FilterOptions.d.ts +8 -1
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +21 -6
- package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +32 -0
- package/src/{Strategy/Interface/IConditionalStyleModule.js → AdaptableOptions/FinsemblePluginOptions.js} +0 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +46 -5
- package/src/AdaptableOptions/LayoutOptions.d.ts +20 -2
- package/src/AdaptableOptions/MasterDetailPluginOptions.d.ts +6 -4
- package/src/AdaptableOptions/NotificationsOptions.d.ts +2 -1
- package/src/AdaptableOptions/PredicateOptions.d.ts +32 -0
- package/src/AdaptableOptions/PredicateOptions.js +2 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +4 -4
- package/src/Api/ActionApi.d.ts +14 -3
- package/src/Api/AdaptableApi.d.ts +21 -12
- package/src/Api/AlertApi.d.ts +139 -83
- package/src/Api/BulkUpdateApi.d.ts +9 -2
- package/src/Api/CalculatedColumnApi.d.ts +26 -21
- package/src/Api/CalendarApi.d.ts +29 -0
- package/src/Api/CalendarApi.js +2 -0
- package/src/Api/CellSummaryApi.d.ts +15 -8
- package/src/Api/ChartingApi.d.ts +45 -1
- package/src/Api/ColumnApi.d.ts +166 -110
- package/src/Api/ConfigApi.d.ts +19 -29
- package/src/Api/CustomSortApi.d.ts +36 -7
- package/src/Api/DashboardApi.d.ts +13 -6
- package/src/Api/DataChangeHistoryApi.d.ts +8 -1
- package/src/Api/DataSetApi.d.ts +13 -3
- package/src/Api/EntitlementApi.d.ts +31 -0
- package/src/Api/EntitlementApi.js +2 -0
- package/src/Api/EventApi.d.ts +15 -24
- package/src/Api/ExportApi.d.ts +35 -18
- package/src/Api/FilterApi.d.ts +75 -67
- package/src/Api/FinanceApi.d.ts +22 -9
- package/src/Api/FinsembleApi.d.ts +10 -0
- package/src/Api/FinsembleApi.js +2 -0
- package/src/Api/FlashingCellApi.d.ts +28 -12
- package/src/Api/FormatColumnApi.d.ts +96 -102
- package/src/Api/FreeTextColumnApi.d.ts +53 -21
- package/src/Api/GridApi.d.ts +59 -23
- package/src/Api/IPushPullApi.d.ts +1 -1
- package/src/Api/Implementation/ActionApiImpl.d.ts +9 -3
- package/src/Api/Implementation/ActionApiImpl.js +23 -11
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +10 -5
- package/src/Api/Implementation/AdaptableApiImpl.js +12 -5
- package/src/Api/Implementation/AlertApiImpl.d.ts +59 -26
- package/src/Api/Implementation/AlertApiImpl.js +187 -171
- package/src/Api/Implementation/ApiBase.d.ts +50 -3
- package/src/Api/Implementation/ApiBase.js +144 -5
- package/src/Api/Implementation/ApplicationApiImpl.d.ts +1 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +1 -0
- package/src/Api/Implementation/BulkUpdateApiImpl.js +4 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +7 -2
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +28 -37
- package/src/Api/Implementation/CalendarApiImpl.d.ts +9 -0
- package/src/Api/Implementation/CalendarApiImpl.js +59 -0
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +1 -0
- package/src/Api/Implementation/CellSummaryApiImpl.js +6 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +11 -3
- package/src/Api/Implementation/ChartingApiImpl.js +41 -6
- package/src/Api/Implementation/ColumnApiImpl.d.ts +28 -8
- package/src/Api/Implementation/ColumnApiImpl.js +204 -194
- package/src/Api/Implementation/ConfigApiImpl.d.ts +3 -4
- package/src/Api/Implementation/ConfigApiImpl.js +4 -12
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +16 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +33 -7
- package/src/Api/Implementation/DashboardApiImpl.d.ts +6 -1
- package/src/Api/Implementation/DashboardApiImpl.js +13 -15
- package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +5 -0
- package/src/Api/Implementation/DataSetApiImpl.d.ts +6 -0
- package/src/Api/Implementation/DataSetApiImpl.js +17 -8
- package/src/Api/Implementation/EntitlementApiImpl.d.ts +11 -0
- package/src/Api/Implementation/EntitlementApiImpl.js +25 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +12 -4
- package/src/Api/Implementation/ExportApiImpl.js +43 -77
- package/src/Api/Implementation/FilterApiImpl.d.ts +11 -4
- package/src/Api/Implementation/FilterApiImpl.js +62 -166
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +9 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +29 -26
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +49 -26
- package/src/Api/Implementation/FormatColumnApiImpl.js +84 -259
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +13 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +42 -27
- package/src/Api/Implementation/GridApiImpl.d.ts +17 -2
- package/src/Api/Implementation/GridApiImpl.js +122 -62
- package/src/Api/Implementation/LayoutApiImpl.d.ts +15 -7
- package/src/Api/Implementation/LayoutApiImpl.js +44 -112
- package/src/Api/Implementation/OptionsApiImpl.d.ts +36 -0
- package/src/Api/Implementation/OptionsApiImpl.js +100 -0
- package/src/Api/Implementation/PluginsApiImpl.d.ts +3 -1
- package/src/Api/Implementation/PluginsApiImpl.js +6 -0
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +2 -1
- package/src/Api/Implementation/PlusMinusApiImpl.js +5 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +13 -2
- package/src/Api/Implementation/PredicateApiImpl.js +41 -23
- package/src/Api/Implementation/QueryApiImpl.d.ts +7 -2
- package/src/Api/Implementation/QueryApiImpl.js +25 -52
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +6 -3
- package/src/Api/Implementation/QueryLanguageApiImpl.js +14 -18
- package/src/Api/Implementation/QuickSearchApiImpl.d.ts +1 -0
- package/src/Api/Implementation/QuickSearchApiImpl.js +5 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +27 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +86 -17
- package/src/Api/Implementation/ScopeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ScopeApiImpl.js +9 -7
- package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +2 -0
- package/src/Api/Implementation/SettingsPanelApiImpl.js +9 -0
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +8 -1
- package/src/Api/Implementation/ShortcutApiImpl.js +25 -4
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +1 -0
- package/src/Api/Implementation/SmartEditApiImpl.js +5 -0
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +30 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +96 -0
- package/src/Api/Implementation/SystemStatusApiImpl.d.ts +6 -1
- package/src/Api/Implementation/SystemStatusApiImpl.js +20 -14
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +6 -5
- package/src/Api/Implementation/TeamSharingApiImpl.js +15 -25
- package/src/Api/Implementation/ThemeApiImpl.d.ts +5 -1
- package/src/Api/Implementation/ThemeApiImpl.js +23 -4
- package/src/Api/Implementation/ToolPanelApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ToolPanelApiImpl.js +8 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +13 -4
- package/src/Api/Internal/ActionInternalApi.d.ts +23 -0
- package/src/Api/Internal/ActionInternalApi.js +198 -0
- package/src/Api/{Implementation/InternalApiImpl.d.ts → Internal/AdaptableInternalApi.d.ts} +21 -57
- package/src/Api/Internal/AdaptableInternalApi.js +461 -0
- package/src/Api/Internal/AlertInternalApi.d.ts +148 -0
- package/src/Api/Internal/AlertInternalApi.js +484 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +24 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +57 -0
- package/src/Api/Internal/ColumnInternalApi.d.ts +33 -0
- package/src/Api/Internal/ColumnInternalApi.js +67 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +6 -0
- package/src/Api/Internal/CustomSortInternalApi.js +11 -0
- package/src/Api/Internal/DashboardInternalApi.d.ts +8 -0
- package/src/Api/Internal/DashboardInternalApi.js +26 -0
- package/src/Api/Internal/DataSetInternalApi.d.ts +9 -0
- package/src/Api/Internal/DataSetInternalApi.js +20 -0
- package/src/Api/Internal/ExportInternalApi.d.ts +11 -0
- package/src/Api/Internal/ExportInternalApi.js +73 -0
- package/src/Api/Internal/FilterInternalApi.d.ts +58 -0
- package/src/Api/Internal/FilterInternalApi.js +194 -0
- package/src/Api/Internal/FlashingCellInternalApi.d.ts +12 -0
- package/src/Api/Internal/FlashingCellInternalApi.js +56 -0
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +109 -0
- package/src/Api/Internal/FormatColumnInternalApi.js +225 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +15 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +44 -0
- package/src/Api/Internal/GridInternalApi.d.ts +82 -0
- package/src/Api/Internal/GridInternalApi.js +252 -0
- package/src/Api/Internal/LayoutInternalApi.d.ts +48 -0
- package/src/Api/Internal/LayoutInternalApi.js +163 -0
- package/src/Api/Internal/PredicateInternalApi.d.ts +37 -0
- package/src/Api/Internal/PredicateInternalApi.js +140 -0
- package/src/Api/Internal/QueryInternalApi.d.ts +17 -0
- package/src/Api/Internal/QueryInternalApi.js +57 -0
- package/src/Api/Internal/QueryLanguageInternalApi.d.ts +11 -0
- package/src/Api/Internal/QueryLanguageInternalApi.js +34 -0
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +59 -0
- package/src/Api/Internal/StyledColumnInternalApi.js +249 -0
- package/src/Api/Internal/SystemStatusInternalApi.d.ts +11 -0
- package/src/Api/Internal/SystemStatusInternalApi.js +27 -0
- package/src/Api/Internal/TeamSharingInternalApi.d.ts +20 -0
- package/src/Api/Internal/TeamSharingInternalApi.js +66 -0
- package/src/Api/LayoutApi.d.ts +36 -41
- package/src/Api/OptionsApi.d.ts +131 -0
- package/src/Api/OptionsApi.js +2 -0
- package/src/Api/PluginsApi.d.ts +5 -0
- package/src/Api/PlusMinusApi.d.ts +9 -2
- package/src/Api/PredicateApi.d.ts +41 -10
- package/src/Api/QueryApi.d.ts +23 -18
- package/src/Api/QueryLanguageApi.d.ts +3 -7
- package/src/Api/QuickSearchApi.d.ts +5 -1
- package/src/Api/ScheduleApi.d.ts +97 -16
- package/src/Api/ScopeApi.d.ts +1 -1
- package/src/Api/SettingsPanelApi.d.ts +12 -1
- package/src/Api/ShortcutApi.d.ts +28 -7
- package/src/Api/SmartEditApi.d.ts +8 -1
- package/src/Api/StyledColumnApi.d.ts +100 -0
- package/src/Api/StyledColumnApi.js +2 -0
- package/src/Api/SystemStatusApi.d.ts +12 -6
- package/src/Api/TeamSharingApi.d.ts +4 -17
- package/src/Api/ThemeApi.d.ts +25 -6
- package/src/Api/ToolPanelApi.d.ts +10 -1
- package/src/Api/UserInterfaceApi.d.ts +13 -2
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -0
- package/src/PredefinedConfig/AlertState.d.ts +20 -5
- package/src/PredefinedConfig/ChartingState.d.ts +13 -4
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.js +4 -0
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +0 -5
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +10 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +22 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +8 -2
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +64 -45
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +6 -6
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +3 -7
- package/src/PredefinedConfig/Common/Types.d.ts +7 -7
- package/src/PredefinedConfig/Common/Types.js +4 -0
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +10 -19
- package/src/PredefinedConfig/FlashingCellState.d.ts +9 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +28 -92
- package/src/PredefinedConfig/GridState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +7 -2
- package/src/PredefinedConfig/StyledColumnState.d.ts +139 -0
- package/src/PredefinedConfig/StyledColumnState.js +2 -0
- package/src/PredefinedConfig/SystemState.d.ts +21 -0
- package/src/Redux/ActionsReducers/ChartingRedux.d.ts +28 -5
- package/src/Redux/ActionsReducers/ChartingRedux.js +45 -5
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +14 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +43 -1
- package/src/Redux/ActionsReducers/FreeTextColumnRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +3 -3
- package/src/Redux/ActionsReducers/GridRedux.d.ts +18 -0
- package/src/Redux/ActionsReducers/GridRedux.js +65 -2
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +4 -4
- package/src/Redux/ActionsReducers/PluginsRedux.js +5 -5
- package/src/Redux/ActionsReducers/PopupRedux.js +10 -2
- package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +1 -1
- package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +49 -0
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +92 -0
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +20 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +67 -5
- package/src/Redux/DeadRedux.d.ts +6 -0
- package/src/Redux/DeadRedux.js +19 -1
- package/src/Redux/Store/AdaptableStore.js +45 -34
- package/src/Strategy/AdaptableModuleBase.js +6 -6
- package/src/Strategy/AlertModule.d.ts +1 -6
- package/src/Strategy/AlertModule.js +38 -93
- package/src/Strategy/BulkUpdateModule.js +3 -3
- package/src/Strategy/CalculatedColumnModule.js +6 -6
- package/src/Strategy/ChartingModule.d.ts +7 -1
- package/src/Strategy/ChartingModule.js +97 -0
- package/src/Strategy/CustomSortModule.js +4 -4
- package/src/Strategy/DashboardModule.js +2 -2
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +12 -0
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.js +4 -4
- package/src/Strategy/FilterModule.js +10 -13
- package/src/Strategy/FlashingCellModule.d.ts +2 -0
- package/src/Strategy/FlashingCellModule.js +27 -7
- package/src/Strategy/FormatColumnModule.d.ts +4 -10
- package/src/Strategy/FormatColumnModule.js +70 -185
- package/src/Strategy/FreeTextColumnModule.js +3 -3
- package/src/Strategy/Interface/IModule.d.ts +12 -10
- package/src/Strategy/LayoutModule.d.ts +3 -0
- package/src/Strategy/LayoutModule.js +138 -25
- package/src/Strategy/PlusMinusModule.js +2 -2
- package/src/Strategy/QueryModule.js +3 -3
- package/src/Strategy/ScheduleModule.js +10 -12
- package/src/Strategy/ShortcutModule.js +5 -5
- package/src/Strategy/SmartEditModule.js +3 -3
- package/src/Strategy/StyledColumnModule.d.ts +24 -0
- package/src/Strategy/StyledColumnModule.js +179 -0
- package/src/Strategy/TeamSharingModule.js +3 -3
- package/src/Strategy/ThemeModule.js +1 -1
- package/src/Strategy/Utilities/Alert/getAlertBehaviourViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.js +1 -1
- package/src/Strategy/Utilities/Export/getExportColumnsViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +3 -4
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +1 -16
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.js +4 -3
- package/src/Strategy/Utilities/getScopeViewItems.js +2 -2
- package/src/Strategy/Utilities/updateSingleToMultiplePredicates.d.ts +5 -0
- package/src/Strategy/Utilities/updateSingleToMultiplePredicates.js +12 -0
- package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
- package/src/Utilities/Constants/ModuleConstants.js +4 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +32 -25
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +19 -15
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +11 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +22 -11
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +76 -79
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +3 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +9 -5
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +2 -4
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +15 -4
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +2 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +136 -29
- package/src/Utilities/Extensions/ObjectExtensions.d.ts +10 -0
- package/src/Utilities/Extensions/ObjectExtensions.js +20 -0
- package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/StringExtensions.js +21 -1
- package/src/Utilities/Extensions/TypeExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/TypeExtensions.js +5 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +6 -2
- package/src/Utilities/Helpers/FormatHelper.d.ts +1 -1
- package/src/Utilities/Helpers/FormatHelper.js +20 -11
- package/src/Utilities/ObjectFactory.d.ts +10 -6
- package/src/Utilities/ObjectFactory.js +30 -26
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -2
- package/src/Utilities/Services/ChartingService.d.ts +10 -0
- package/src/Utilities/Services/ChartingService.js +100 -0
- package/src/Utilities/Services/DataService.js +1 -1
- package/src/Utilities/Services/EntitlementService.js +4 -1
- package/src/Utilities/Services/Interface/IChartingService.d.ts +5 -0
- package/src/Utilities/Services/Interface/IChartingService.js +2 -0
- package/src/Utilities/Services/Interface/IEntitlementService.d.ts +2 -1
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +1 -0
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +14 -4
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -5
- package/src/Utilities/Services/{LicenseService.d.ts → LicenseService/index.d.ts} +3 -3
- package/src/Utilities/Services/LicenseService/index.js +1 -0
- package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.d.ts +1 -0
- package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.js +15 -0
- package/src/Utilities/Services/MetamodelService.js +6 -4
- package/src/Utilities/Services/ModuleService.js +4 -2
- package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
- package/src/Utilities/Services/QueryLanguageService.js +91 -42
- package/src/Utilities/Services/ReportService.js +9 -9
- package/src/Utilities/Services/RowEditService.d.ts +0 -19
- package/src/Utilities/Services/RowEditService.js +5 -162
- package/src/Utilities/Services/TeamSharingService.js +3 -3
- package/src/Utilities/Services/ValidationService.js +9 -7
- package/src/Utilities/license/LicenseDetails.d.ts +1 -1
- package/src/Utilities/license/decode.d.ts +1 -0
- package/src/Utilities/license/decode.js +1 -1
- package/src/Utilities/logDeprecation.d.ts +3 -0
- package/src/Utilities/logDeprecation.js +30 -0
- package/src/View/AdaptablePopover/index.d.ts +4 -2
- package/src/View/AdaptablePopover/index.js +6 -2
- package/src/View/AdaptableView.d.ts +3 -3
- package/src/View/AdaptableViewFactory.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +3 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +103 -92
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +2 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +4 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +8 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +7 -34
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +7 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +2 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +4 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +2 -1
- package/src/View/AdaptableWizardView/index.d.ts +1 -1
- package/src/View/Alert/AlertEntityRow.js +1 -1
- package/src/View/Alert/AlertStatusSubPanel.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +17 -16
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +25 -2
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +23 -14
- package/src/View/Alert/Wizard/AlertWizard.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +7 -5
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +5 -5
- package/src/View/Alert/Wizard/isValidAlertRules.js +5 -4
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +3 -3
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +4 -3
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +1 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +34 -12
- package/src/View/Components/AdaptableObjectRow/index.js +1 -6
- package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonEdit.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonInfo.d.ts +1 -3
- package/src/View/Components/Buttons/ButtonInfo.js +3 -5
- package/src/View/Components/Charting/ChartingStatusBarPopover.d.ts +2 -0
- package/src/View/Components/Charting/ChartingStatusBarPopover.js +23 -0
- package/src/View/Components/Charting/ChartingViewPanel.d.ts +3 -0
- package/src/View/Components/Charting/ChartingViewPanel.js +95 -0
- package/src/View/Components/Charting/ChartingWizard/ChartingWizard.d.ts +6 -0
- package/src/View/Components/Charting/ChartingWizard/ChartingWizard.js +37 -0
- package/src/View/Components/Charting/ChartingWizard/PreviewChartSection.d.ts +6 -0
- package/src/View/Components/Charting/ChartingWizard/PreviewChartSection.js +34 -0
- package/src/View/Components/Charting/ChartingWizard/SettingsSection.d.ts +8 -0
- package/src/View/Components/Charting/ChartingWizard/SettingsSection.js +53 -0
- package/src/View/Components/Charting/DeleteChartButton.d.ts +7 -0
- package/src/View/Components/Charting/DeleteChartButton.js +12 -0
- package/src/View/Components/Charting/EditChartButton.d.ts +8 -0
- package/src/View/Components/Charting/EditChartButton.js +21 -0
- package/src/View/Components/Charting/ShowChartButton.d.ts +5 -0
- package/src/View/Components/Charting/ShowChartButton.js +38 -0
- package/src/View/Components/Charting/useChartState.d.ts +9 -0
- package/src/View/Components/Charting/useChartState.js +71 -0
- package/src/View/Components/EntityRulesEditor/PredicatesEditor.d.ts +16 -0
- package/src/View/Components/EntityRulesEditor/PredicatesEditor.js +86 -0
- package/src/View/Components/EntityRulesEditor/Utilities.d.ts +6 -0
- package/src/View/Components/EntityRulesEditor/Utilities.js +21 -0
- package/src/View/Components/EntityRulesEditor/index.d.ts +5 -9
- package/src/View/Components/EntityRulesEditor/index.js +44 -124
- package/src/View/Components/ExpressionWizard.js +2 -2
- package/src/View/Components/ExternalRenderer.js +3 -1
- package/src/View/Components/FilterForm/FilterForm.js +13 -18
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +2 -2
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +2 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -21
- package/src/View/Components/NewScopeComponent.js +3 -3
- package/src/View/Components/Panels/PanelWithButton.js +1 -5
- package/src/View/Components/Panels/PanelWithImage.js +1 -5
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.d.ts +1 -2
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +6 -7
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +3 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +3 -16
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +12 -14
- package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/TopBar.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
- package/src/View/Components/Popups/AdaptablePopupConfirmation.d.ts +2 -12
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +46 -39
- package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +5 -5
- package/src/View/Components/Popups/AdaptableToaster.js +2 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
- package/src/View/Components/PredicateEditor/PredicateEditor.d.ts +10 -0
- package/src/View/Components/PredicateEditor/PredicateEditor.js +44 -0
- package/src/View/Components/RangesComponent.d.ts +11 -3
- package/src/View/Components/RangesComponent.js +121 -64
- package/src/View/Components/ScopeComponent.js +9 -9
- package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
- package/src/View/Components/Selectors/ColumnSelector.js +2 -1
- package/src/View/Components/Selectors/ColumnValueSelector.js +3 -3
- package/src/View/Components/StyleComponent.d.ts +1 -0
- package/src/View/Components/StyleComponent.js +60 -37
- package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +3 -9
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +26 -11
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +0 -1
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +2 -2
- package/src/View/CustomSort/Wizard/CustomSortSummaryWizard.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
- package/src/View/Dashboard/Dashboard.js +4 -3
- package/src/View/Dashboard/DashboardPopup.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +10 -1
- package/src/View/DataSet/DataSetSelector.js +2 -2
- package/src/View/DataSet/DataSetStatusPanelPopover.js +1 -1
- package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
- package/src/View/DataSet/DataSetViewPanel.js +1 -1
- package/src/View/Export/ExportSelector.js +2 -2
- package/src/View/Export/ExportViewPanel.d.ts +1 -1
- package/src/View/Export/ExportViewPanel.js +5 -5
- package/src/View/Export/ReportExportDropdown.js +2 -2
- package/src/View/Export/Wizard/ReportNameWizardSection.js +11 -12
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +1 -1
- package/src/View/Filter/FilterSummary.d.ts +1 -1
- package/src/View/Filter/FilterSummary.js +1 -1
- package/src/View/Filter/FilterViewPanel.d.ts +1 -1
- package/src/View/Filter/FilterViewPanel.js +1 -1
- package/src/View/FlashingCell/FlashingCellStyle.js +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +6 -6
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +8 -6
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +4 -3
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/MoveFormatColumn.d.ts +7 -0
- package/src/View/FormatColumn/MoveFormatColumn.js +27 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +35 -29
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +8 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +28 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +23 -3
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +2 -28
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -3
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +7 -302
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +18 -26
- package/src/View/FormatColumn/Wizard/constants.d.ts +1 -0
- package/src/View/FormatColumn/Wizard/constants.js +4 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -7
- package/src/View/GridInfo/ColumnInfoComponent.js +27 -19
- package/src/View/GridInfo/GridInfoPopup.js +16 -15
- package/src/View/Layout/LayoutRadioSelector.js +2 -2
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +1 -1
- package/src/View/Layout/LayoutViewPanel.d.ts +1 -1
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.d.ts +3 -0
- package/src/View/Layout/PivotDetailsPopoup.js +65 -0
- package/src/View/Layout/SaveLayoutButton.js +1 -1
- package/src/View/Layout/Wizard/Components/ColumnLabels.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +9 -4
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +5 -5
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +12 -11
- package/src/View/Layout/Wizard/sections/FilterSection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/FilterSection.js +52 -3
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +2 -2
- package/src/View/Layout/Wizard/sections/SettingsSection.d.ts +2 -2
- package/src/View/Layout/Wizard/sections/SettingsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +2 -5
- package/src/View/License/LicenseWatermark.d.ts +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -5
- package/src/View/Query/ExpandedQueryPopup.js +1 -1
- package/src/View/Query/QueryViewPanel.d.ts +1 -1
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +1 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
- package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -2
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +3 -3
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +3 -3
- package/src/View/SmartEdit/SmartEditViewPanel.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +10 -10
- package/src/View/StateManagement/StateManagementPopup.js +4 -4
- package/src/View/StateManagement/components/ClearButton.d.ts +1 -1
- package/src/View/StateManagement/components/LoadButton.d.ts +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +4 -4
- package/src/View/StatusBar/StatusBarPanel.js +1 -1
- package/src/View/StatusBar/StatusBarPopup.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +6 -0
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +285 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +7 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +106 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +75 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +38 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +26 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +23 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +25 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +263 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/index.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/index.js +4 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.d.ts +7 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +68 -0
- package/src/View/SystemStatus/SystemStatusEntityRow.js +4 -6
- package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
- package/src/View/TeamSharing/SharedEntityDependencies.js +1 -1
- package/src/View/TeamSharing/SharedEntityObjectView.js +1 -1
- package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
- package/src/View/Theme/ThemePopup.js +1 -1
- package/src/View/Theme/ThemeStatusPanelPopover.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +4 -4
- package/src/View/Wizard/OnePageAdaptableWizard.js +3 -4
- package/src/View/Wizard/OnePageWizards.d.ts +3 -3
- package/src/View/Wizard/OnePageWizards.js +2 -2
- package/src/agGrid/ActionColumnRenderer.d.ts +3 -0
- package/src/agGrid/ActionColumnRenderer.js +98 -64
- package/src/agGrid/Adaptable.d.ts +43 -14
- package/src/agGrid/Adaptable.js +555 -409
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.js +62 -19
- package/src/agGrid/FloatingFilterWrapper.d.ts +2 -2
- package/src/agGrid/FloatingFilterWrapper.js +70 -32
- package/src/agGrid/PercentBarRenderer.d.ts +2 -2
- package/src/agGrid/PercentBarRenderer.js +16 -15
- package/src/agGrid/agGridHelper.d.ts +2 -2
- package/src/agGrid/agGridHelper.js +31 -20
- package/src/agGrid/agGridMenuHelper.js +3 -3
- package/src/agGrid/createAgStatusPanelComponent.d.ts +2 -1
- package/src/agGrid/createAgStatusPanelComponent.js +20 -3
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +5 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +87 -20
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +3 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +81 -30
- package/src/agGrid/weightedAverage.js +19 -11
- package/src/bundle-dependencies/bundles/react-toastify/index.js +1 -1
- package/src/components/CheckBox/index.d.ts +1 -1
- package/src/components/CheckBox/index.js +7 -2
- package/src/components/ColorPicker/ColorPicker.d.ts +11 -0
- package/src/{View → components/ColorPicker}/ColorPicker.js +19 -6
- package/src/components/ColorPicker/index.d.ts +1 -0
- package/src/components/ColorPicker/index.js +4 -0
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/Dialog/index.d.ts +4 -2
- package/src/components/Dialog/index.js +2 -2
- package/src/components/DragAndDropContext/TabList.js +1 -1
- package/src/components/DragAndDropContext/UnusedPanel.js +3 -2
- package/src/components/DropdownButton/index.d.ts +21 -4
- package/src/components/DropdownButton/index.js +7 -8
- package/src/components/EllipsisContainer/index.js +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +102 -36
- package/src/components/ExpressionEditor/EditorInput.js +1 -1
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +1 -1
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +5 -1
- package/src/components/ExpressionEditor/index.js +12 -58
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +4 -2
- package/src/components/Loader/Loader.d.ts +2 -2
- package/src/components/Logo/index.d.ts +1 -1
- package/src/components/Modal/index.d.ts +1 -1
- package/src/components/Modal/index.js +0 -2
- package/src/components/OverlayTrigger/Overlay.d.ts +1 -4
- package/src/components/OverlayTrigger/Overlay.js +3 -40
- package/src/components/OverlayTrigger/index.d.ts +4 -4
- package/src/components/OverlayTrigger/index.js +75 -50
- package/src/components/OverlayTrigger/utils.d.ts +1 -1
- package/src/components/OverlayTrigger/utils.js +4 -4
- package/src/components/PopupWithFooter.d.ts +2 -2
- package/src/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
- package/src/components/SelectList.d.ts +1 -1
- package/src/components/SimpleButton/index.d.ts +4 -7
- package/src/components/SimpleButton/index.js +5 -4
- package/src/components/SizedContainer/index.d.ts +1 -1
- package/src/components/StylePreview.d.ts +1 -1
- package/src/components/StylePreview.js +2 -1
- package/src/components/Tag/Tag.d.ts +1 -1
- package/src/components/Textarea/index.d.ts +6 -4
- package/src/components/ToggleButton/index.d.ts +1 -1
- package/src/components/Tooltip/index.d.ts +1 -3
- package/src/components/Tooltip/index.js +2 -2
- package/src/components/WindowModal/WindowModal.d.ts +1 -1
- package/src/components/icons/{conditional-style.d.ts → brush.d.ts} +0 -0
- package/src/components/icons/brush.js +7 -0
- package/src/components/icons/index.d.ts +3 -2
- package/src/components/icons/index.js +4 -2
- package/src/components/icons/layout.d.ts +2 -1
- package/src/components/icons/open-in-new.d.ts +3 -0
- package/src/components/icons/{conditional-style.js → open-in-new.js} +1 -1
- package/src/components/utils/useContainerScrollObserver/index.d.ts +1 -1
- package/src/env.js +1 -3
- package/src/metamodel/adaptable.metamodel.d.ts +572 -160
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/parser.js +644 -382
- package/src/parser/src/types.d.ts +15 -3
- package/src/renderReactRoot.d.ts +5 -0
- package/src/renderReactRoot.js +56 -0
- package/src/types.d.ts +26 -17
- package/themes/dark.css +8 -4
- package/themes/dark.css.map +1 -0
- package/themes/light.css +4 -1
- package/themes/light.css.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableComponents.d.ts +0 -1
- package/src/AdaptableComponents.js +0 -5
- package/src/Api/ConditionalStyleApi.d.ts +0 -108
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +0 -29
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +0 -98
- package/src/Api/Implementation/InternalApiImpl.js +0 -654
- package/src/Api/InternalApi.d.ts +0 -147
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +0 -49
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +0 -95
- package/src/Strategy/ConditionalStyleModule.d.ts +0 -29
- package/src/Strategy/ConditionalStyleModule.js +0 -225
- package/src/Strategy/Interface/IConditionalStyleModule.d.ts +0 -6
- package/src/Strategy/Utilities/getStyleViewItems.d.ts +0 -2
- package/src/Strategy/Utilities/getStyleViewItems.js +0 -16
- package/src/Utilities/Helpers/CalendarHelper.d.ts +0 -25
- package/src/Utilities/Helpers/CalendarHelper.js +0 -342
- package/src/Utilities/Services/LicenseService.js +0 -1
- package/src/View/ColorPicker.d.ts +0 -14
- package/src/View/ConditionalStyle/ConditionalStyleSummary.d.ts +0 -25
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +0 -108
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.d.ts +0 -9
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +0 -42
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.d.ts +0 -8
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.js +0 -43
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +0 -8
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +0 -29
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.d.ts +0 -8
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.js +0 -23
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.d.ts +0 -6
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +0 -114
- package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.d.ts +0 -1
- package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.js +0 -4
- package/src/components/OverlayTrigger/getOverlayStyle.d.ts +0 -13
- package/src/components/OverlayTrigger/getOverlayStyle.js +0 -56
|
@@ -1,13 +1,88 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdaptableDateEditor = void 0;
|
|
3
|
+
exports.AdaptableDateEditor = exports.ReactAdaptableDateEditor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_dom_1 = require("react-dom");
|
|
7
6
|
const renderWithAdaptableContext_1 = require("../../../View/renderWithAdaptableContext");
|
|
8
7
|
const InternalAdaptableDateEditor_1 = require("./InternalAdaptableDateEditor");
|
|
9
8
|
const core_1 = require("@ag-grid-community/core");
|
|
10
9
|
const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
|
|
10
|
+
const react_1 = require("react");
|
|
11
|
+
function shouldClearExistingValue(params) {
|
|
12
|
+
return params.eventKey === core_1.KeyCode.BACKSPACE || params.eventKey === core_1.KeyCode.DELETE;
|
|
13
|
+
}
|
|
14
|
+
function getStartValue(params) {
|
|
15
|
+
return shouldClearExistingValue(params) ? '' : params.value;
|
|
16
|
+
}
|
|
17
|
+
const style = {
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
top: '0px',
|
|
20
|
+
left: '0px',
|
|
21
|
+
right: '0px',
|
|
22
|
+
bottom: '0px',
|
|
23
|
+
};
|
|
24
|
+
const defaultDateValueParser = ({ newValue, oldValue, defaultParser }) => {
|
|
25
|
+
if ((typeof oldValue === 'string' || oldValue == null) && defaultParser) {
|
|
26
|
+
return defaultParser(newValue);
|
|
27
|
+
}
|
|
28
|
+
return newValue;
|
|
29
|
+
};
|
|
30
|
+
exports.ReactAdaptableDateEditor = (0, react_1.forwardRef)((props, ref) => {
|
|
31
|
+
var _a;
|
|
32
|
+
const [initialValue] = (0, react_1.useState)(() => getStartValue(props));
|
|
33
|
+
const valueRef = (0, react_1.useRef)(initialValue);
|
|
34
|
+
const colValueParser = props.column.getColDef().valueParser;
|
|
35
|
+
const valueParser = typeof colValueParser === 'function' ? colValueParser : defaultDateValueParser;
|
|
36
|
+
const adaptable = props.api.__adaptable;
|
|
37
|
+
const editorRef = (0, react_1.useRef)(null);
|
|
38
|
+
(0, react_1.useImperativeHandle)(ref, () => {
|
|
39
|
+
return {
|
|
40
|
+
focusIn() {
|
|
41
|
+
var _a;
|
|
42
|
+
(_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
43
|
+
},
|
|
44
|
+
// the final value to send to the grid, on completion of editing
|
|
45
|
+
getValue() {
|
|
46
|
+
return valueRef.current;
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
const editorElement = (React.createElement(InternalAdaptableDateEditor_1.InternalAdaptableDateEditor, { defaultValue: initialValue, dateFormat: adaptable.adaptableOptions.userInterfaceOptions.dateInputOptions.dateFormat, onValueChange: (value) => {
|
|
51
|
+
const invalid = isNaN(+value);
|
|
52
|
+
if (valueParser) {
|
|
53
|
+
const params = Object.assign(Object.assign({}, props), { oldValue: props.value, newValue: value, defaultParser: (value) => {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
const Pattern = (_b = (_a = adaptable.adaptableOptions.userInterfaceOptions) === null || _a === void 0 ? void 0 : _a.dateInputOptions) === null || _b === void 0 ? void 0 : _b.dateFormat;
|
|
56
|
+
if (!Pattern) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return (0, FormatHelper_1.DateFormatter)(value, {
|
|
60
|
+
Pattern,
|
|
61
|
+
});
|
|
62
|
+
} });
|
|
63
|
+
valueRef.current = valueParser(params);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
valueRef.current = invalid ? null : value;
|
|
67
|
+
}
|
|
68
|
+
if (!invalid) {
|
|
69
|
+
requestAnimationFrame(() => {
|
|
70
|
+
props.stopEditing();
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}, showClearButton: (_a = props.showClearButton) !== null && _a !== void 0 ? _a : true, onStopEdit: (keyboardEventKey) => {
|
|
74
|
+
if (keyboardEventKey === 'Escape') {
|
|
75
|
+
props.api.stopEditing(true);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
props.stopEditing();
|
|
79
|
+
}
|
|
80
|
+
}, ref: (editor) => {
|
|
81
|
+
editorRef.current = editor;
|
|
82
|
+
editor === null || editor === void 0 ? void 0 : editor.focus();
|
|
83
|
+
} }));
|
|
84
|
+
return React.createElement("div", { style: style }, (0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable));
|
|
85
|
+
});
|
|
11
86
|
/**
|
|
12
87
|
* Used by default for all `abColDefDate` columns.
|
|
13
88
|
*
|
|
@@ -33,26 +108,20 @@ const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
|
|
|
33
108
|
*/
|
|
34
109
|
class AdaptableDateEditor {
|
|
35
110
|
constructor() {
|
|
36
|
-
this.valueParser =
|
|
37
|
-
if ((typeof oldValue === 'string' || oldValue == null) && defaultParser) {
|
|
38
|
-
return defaultParser(newValue);
|
|
39
|
-
}
|
|
40
|
-
return newValue;
|
|
41
|
-
};
|
|
111
|
+
this.valueParser = defaultDateValueParser;
|
|
42
112
|
}
|
|
43
113
|
init(params) {
|
|
44
|
-
this.value =
|
|
114
|
+
this.value = getStartValue(params);
|
|
45
115
|
const { valueParser } = params.column.getColDef();
|
|
46
116
|
this.params = params;
|
|
47
117
|
if (typeof valueParser === 'function') {
|
|
48
118
|
this.valueParser = valueParser;
|
|
49
119
|
}
|
|
50
120
|
this.el = document.createElement('div');
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
this.el.style.bottom = '0px';
|
|
121
|
+
Object.keys(style).forEach((key) => {
|
|
122
|
+
//@ts-ignore
|
|
123
|
+
this.el.style[key] = style[key];
|
|
124
|
+
});
|
|
56
125
|
}
|
|
57
126
|
/* Component Editor Lifecycle methods */
|
|
58
127
|
// gets called once when grid ready to insert the element
|
|
@@ -76,7 +145,7 @@ class AdaptableDateEditor {
|
|
|
76
145
|
afterGuiAttached() {
|
|
77
146
|
var _a;
|
|
78
147
|
const adaptable = this.getAdaptableInstance(this.params);
|
|
79
|
-
const defaultValue =
|
|
148
|
+
const defaultValue = shouldClearExistingValue(this.params) ? '' : this.params.value;
|
|
80
149
|
const editorElement = (React.createElement(InternalAdaptableDateEditor_1.InternalAdaptableDateEditor, { defaultValue: defaultValue, dateFormat: adaptable.adaptableOptions.userInterfaceOptions.dateInputOptions.dateFormat, onValueChange: (value) => {
|
|
81
150
|
const invalid = isNaN(+value);
|
|
82
151
|
if (this.valueParser) {
|
|
@@ -111,13 +180,11 @@ class AdaptableDateEditor {
|
|
|
111
180
|
this.editor = editor;
|
|
112
181
|
editor === null || editor === void 0 ? void 0 : editor.focus();
|
|
113
182
|
} }));
|
|
114
|
-
|
|
183
|
+
this.unmountReactRoot = adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable), this.el);
|
|
115
184
|
}
|
|
116
185
|
destroy() {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
shouldClearExistingValue(params) {
|
|
120
|
-
return params.eventKey === core_1.KeyCode.BACKSPACE || params.eventKey === core_1.KeyCode.DELETE;
|
|
186
|
+
var _a;
|
|
187
|
+
(_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
121
188
|
}
|
|
122
189
|
}
|
|
123
190
|
exports.AdaptableDateEditor = AdaptableDateEditor;
|
|
@@ -22,7 +22,7 @@ const inputStyle = {
|
|
|
22
22
|
width: '100%',
|
|
23
23
|
border: 'none',
|
|
24
24
|
};
|
|
25
|
-
exports.InternalAdaptableNumberEditor = React.forwardRef((props, ref)
|
|
25
|
+
exports.InternalAdaptableNumberEditor = React.forwardRef(function InternalAdaptableNumberEditorFn(props, ref) {
|
|
26
26
|
var _a;
|
|
27
27
|
const inputRef = React.useRef(null);
|
|
28
28
|
const focus = () => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { ICellEditorComp, ICellEditorParams } from '@ag-grid-community/core';
|
|
2
3
|
/**
|
|
3
4
|
* Adaptable number editor parameters extending the AG Grid {@link ICellEditorParams}.
|
|
@@ -14,6 +15,7 @@ interface AdaptableNumberCellEditorParams extends ICellEditorParams {
|
|
|
14
15
|
*/
|
|
15
16
|
emptyValue: string;
|
|
16
17
|
}
|
|
18
|
+
export declare const ReactAdaptableNumberEditor: React.ForwardRefExoticComponent<AdaptableNumberCellEditorParams & React.RefAttributes<unknown>>;
|
|
17
19
|
/**
|
|
18
20
|
* Used by default for all `abColDefNumber` columns.
|
|
19
21
|
*
|
|
@@ -42,6 +44,7 @@ export declare class AdaptableNumberEditor implements ICellEditorComp {
|
|
|
42
44
|
private params;
|
|
43
45
|
private editor;
|
|
44
46
|
private valueParser;
|
|
47
|
+
private unmountReactRoot?;
|
|
45
48
|
init(params: AdaptableNumberCellEditorParams): void;
|
|
46
49
|
getGui(): HTMLDivElement;
|
|
47
50
|
getValue(): any;
|
|
@@ -50,8 +53,5 @@ export declare class AdaptableNumberEditor implements ICellEditorComp {
|
|
|
50
53
|
afterGuiAttached(): void;
|
|
51
54
|
destroy(): void;
|
|
52
55
|
private onValueChange;
|
|
53
|
-
private getStartValue;
|
|
54
|
-
private shouldClearExistingValue;
|
|
55
|
-
private isValidChar;
|
|
56
56
|
}
|
|
57
57
|
export {};
|
|
@@ -1,12 +1,82 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdaptableNumberEditor = void 0;
|
|
3
|
+
exports.AdaptableNumberEditor = exports.ReactAdaptableNumberEditor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_dom_1 = require("react-dom");
|
|
7
6
|
const renderWithAdaptableContext_1 = require("../../../View/renderWithAdaptableContext");
|
|
8
7
|
const InternalAdaptableNumberEditor_1 = require("./InternalAdaptableNumberEditor");
|
|
9
8
|
const core_1 = require("@ag-grid-community/core");
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
function shouldClearExistingValue(params) {
|
|
11
|
+
return params.eventKey === core_1.KeyCode.BACKSPACE || params.eventKey === core_1.KeyCode.DELETE;
|
|
12
|
+
}
|
|
13
|
+
function isValidChar(char) {
|
|
14
|
+
// allow only digits
|
|
15
|
+
return ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'].includes(char);
|
|
16
|
+
// we do NOT allow key shortcuts for starting non-digits (minus sign, decimal separators) as the input[number] handling is very buggy and we would open a can of worms
|
|
17
|
+
}
|
|
18
|
+
function getStartValue(params) {
|
|
19
|
+
if (shouldClearExistingValue(params)) {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
if (params.charPress && isValidChar(params.charPress)) {
|
|
23
|
+
return params.charPress;
|
|
24
|
+
}
|
|
25
|
+
return params.value;
|
|
26
|
+
}
|
|
27
|
+
const defaultValueParser = ({ newValue, oldValue: _ }) => {
|
|
28
|
+
return newValue;
|
|
29
|
+
};
|
|
30
|
+
const style = {
|
|
31
|
+
position: 'absolute',
|
|
32
|
+
top: '0px',
|
|
33
|
+
left: '0px',
|
|
34
|
+
right: '0px',
|
|
35
|
+
bottom: '0px',
|
|
36
|
+
};
|
|
37
|
+
exports.ReactAdaptableNumberEditor = (0, react_1.forwardRef)((props, ref) => {
|
|
38
|
+
var _a, _b;
|
|
39
|
+
const [initialValue] = (0, react_1.useState)(() => getStartValue(props));
|
|
40
|
+
const valueRef = (0, react_1.useRef)(initialValue);
|
|
41
|
+
const columnId = props.column.getColId();
|
|
42
|
+
const adaptable = props.api.__adaptable;
|
|
43
|
+
const colValueParser = props.column.getColDef().valueParser;
|
|
44
|
+
const valueParser = typeof colValueParser === 'function' ? colValueParser : defaultValueParser;
|
|
45
|
+
function onValueChange(value) {
|
|
46
|
+
value = valueParser
|
|
47
|
+
? valueParser(Object.assign(Object.assign({}, props), { oldValue: props.value, newValue: value }))
|
|
48
|
+
: value;
|
|
49
|
+
valueRef.current = value;
|
|
50
|
+
}
|
|
51
|
+
const editorRef = (0, react_1.useRef)(null);
|
|
52
|
+
(0, react_1.useImperativeHandle)(ref, () => {
|
|
53
|
+
return {
|
|
54
|
+
focusIn() {
|
|
55
|
+
var _a;
|
|
56
|
+
(_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
57
|
+
},
|
|
58
|
+
// the final value to send to the grid, on completion of editing
|
|
59
|
+
getValue() {
|
|
60
|
+
return valueRef.current;
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
const editorElement = (React.createElement(InternalAdaptableNumberEditor_1.InternalAdaptableNumberEditor, { defaultValue: initialValue, showClearButton: (_a = props.showClearButton) !== null && _a !== void 0 ? _a : true, emptyValue: (_b = props.emptyValue) !== null && _b !== void 0 ? _b : '', onValueChange: onValueChange, ref: (editor) => {
|
|
65
|
+
editorRef.current = editor;
|
|
66
|
+
editor === null || editor === void 0 ? void 0 : editor.focus();
|
|
67
|
+
} }));
|
|
68
|
+
function onKeyDown(keyDownEvent) {
|
|
69
|
+
adaptable._emit('CellEditorKeyDown', {
|
|
70
|
+
keyDownEvent,
|
|
71
|
+
cellValue: valueRef.current,
|
|
72
|
+
columnId,
|
|
73
|
+
updateValueCallback: (updatedValue) => {
|
|
74
|
+
editorRef.current.setValue(updatedValue);
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return (React.createElement("div", { style: style, onKeyDown: onKeyDown }, (0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable)));
|
|
79
|
+
});
|
|
10
80
|
/**
|
|
11
81
|
* Used by default for all `abColDefNumber` columns.
|
|
12
82
|
*
|
|
@@ -30,9 +100,7 @@ const core_1 = require("@ag-grid-community/core");
|
|
|
30
100
|
*/
|
|
31
101
|
class AdaptableNumberEditor {
|
|
32
102
|
constructor() {
|
|
33
|
-
this.valueParser =
|
|
34
|
-
return newValue;
|
|
35
|
-
};
|
|
103
|
+
this.valueParser = defaultValueParser;
|
|
36
104
|
this.onValueChange = (value) => {
|
|
37
105
|
this.value = this.valueParser
|
|
38
106
|
? this.valueParser(Object.assign(Object.assign({}, this.params), { oldValue: this.params.value, newValue: value }))
|
|
@@ -40,7 +108,7 @@ class AdaptableNumberEditor {
|
|
|
40
108
|
};
|
|
41
109
|
}
|
|
42
110
|
init(params) {
|
|
43
|
-
this.value =
|
|
111
|
+
this.value = getStartValue(params);
|
|
44
112
|
this.params = params;
|
|
45
113
|
this.columnId = params.column.getColId();
|
|
46
114
|
const { valueParser } = params.column.getColDef();
|
|
@@ -48,11 +116,10 @@ class AdaptableNumberEditor {
|
|
|
48
116
|
this.valueParser = valueParser;
|
|
49
117
|
}
|
|
50
118
|
this.el = document.createElement('div');
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
this.el.style.bottom = '0px';
|
|
119
|
+
Object.keys(style).forEach((key) => {
|
|
120
|
+
//@ts-ignore
|
|
121
|
+
this.el.style[key] = style[key];
|
|
122
|
+
});
|
|
56
123
|
}
|
|
57
124
|
/* Component Editor Lifecycle methods */
|
|
58
125
|
// gets called once when grid ready to insert the element
|
|
@@ -77,7 +144,7 @@ class AdaptableNumberEditor {
|
|
|
77
144
|
this.editor = editor;
|
|
78
145
|
editor === null || editor === void 0 ? void 0 : editor.focus();
|
|
79
146
|
} }));
|
|
80
|
-
|
|
147
|
+
this.unmountReactRoot = adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable), this.el);
|
|
81
148
|
this.getGui().addEventListener('keydown', (keyDownEvent) => {
|
|
82
149
|
adaptable._emit('CellEditorKeyDown', {
|
|
83
150
|
keyDownEvent,
|
|
@@ -90,24 +157,8 @@ class AdaptableNumberEditor {
|
|
|
90
157
|
});
|
|
91
158
|
}
|
|
92
159
|
destroy() {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
getStartValue(params) {
|
|
96
|
-
if (this.shouldClearExistingValue(params)) {
|
|
97
|
-
return '';
|
|
98
|
-
}
|
|
99
|
-
if (params.charPress && this.isValidChar(params.charPress)) {
|
|
100
|
-
return params.charPress;
|
|
101
|
-
}
|
|
102
|
-
return params.value;
|
|
103
|
-
}
|
|
104
|
-
shouldClearExistingValue(params) {
|
|
105
|
-
return params.eventKey === core_1.KeyCode.BACKSPACE || params.eventKey === core_1.KeyCode.DELETE;
|
|
106
|
-
}
|
|
107
|
-
isValidChar(char) {
|
|
108
|
-
// allow only digits
|
|
109
|
-
return ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'].includes(char);
|
|
110
|
-
// we do NOT allow key shortcuts for starting non-digits (minus sign, decimal separators) as the input[number] handling is very buggy and we would open a can of worms
|
|
160
|
+
var _a;
|
|
161
|
+
(_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
111
162
|
}
|
|
112
163
|
}
|
|
113
164
|
exports.AdaptableNumberEditor = AdaptableNumberEditor;
|
|
@@ -79,22 +79,30 @@ const cellSummaryWeightedAverage = ({ numericColumns, selectedCellInfo, adaptabl
|
|
|
79
79
|
sumPrimaryValues += weightedGridCell.rawValue * gridCell.normalisedValue;
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
-
if (isValid) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
if (!isValid) {
|
|
83
|
+
return '';
|
|
84
|
+
}
|
|
85
|
+
const abColumn = adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
86
|
+
if (!abColumn) {
|
|
87
|
+
return '';
|
|
88
|
+
}
|
|
89
|
+
const activeFormatColumnsWithDisplayFormat = adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
|
|
90
|
+
if (activeFormatColumnsWithDisplayFormat.length === 1 &&
|
|
91
|
+
activeFormatColumnsWithDisplayFormat[0].DisplayFormat.Formatter === 'NumberFormatter') {
|
|
92
|
+
// there only one FormatColumn on this column, so we will use it to format the aggregated value
|
|
93
|
+
const [singleActiveFormatColumnsWithDisplayFormat] = activeFormatColumnsWithDisplayFormat;
|
|
94
|
+
const options = singleActiveFormatColumnsWithDisplayFormat
|
|
95
|
+
.DisplayFormat.Options;
|
|
96
|
+
if (options) {
|
|
97
|
+
return FormatHelper_1.default.NumberFormatter(sumPrimaryValues / sumWeightedValue, options);
|
|
90
98
|
}
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
// there are multiple (possibly conflicting) FormatColumns for this column, we cannot know which to use
|
|
91
102
|
return FormatHelper_1.default.NumberFormatter(sumPrimaryValues / sumWeightedValue, {
|
|
92
103
|
FractionDigits: 2,
|
|
93
104
|
});
|
|
94
105
|
}
|
|
95
|
-
else {
|
|
96
|
-
return '';
|
|
97
|
-
}
|
|
98
106
|
}
|
|
99
107
|
};
|
|
100
108
|
exports.cellSummaryWeightedAverage = cellSummaryWeightedAverage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Le=Object.defineProperty,Re=Object.defineProperties;var Pe=Object.getOwnPropertyDescriptors;var K=Object.getOwnPropertySymbols;var ce=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable;var de=(e,t,n)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m=(e,t)=>{for(var n in t||(t={}))ce.call(t,n)&&de(e,n,t[n]);if(K)for(var n of K(t))ue.call(t,n)&&de(e,n,t[n]);return e},S=(e,t)=>Re(e,Pe(t));var ne=(e,t)=>{var n={};for(var o in e)ce.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&K)for(var o of K(e))t.indexOf(o)<0&&ue.call(e,o)&&(n[o]=e[o]);return n};var xe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ge=xe((Xe,se)=>{function fe(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=fe(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function me(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=fe(e))&&(o&&(o+=" "),o+=t);return o}se.exports=me,se.exports.clsx=me});var f=require("react"),Be=ge();function ye(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var g=ye(f),w=ye(Be);function W(e){return typeof e=="number"&&!isNaN(e)}function G(e){return typeof e=="boolean"}function A(e){return typeof e=="string"}function B(e){return typeof e=="function"}function Z(e){return A(e)||B(e)?e:null}function oe(e){return e===0||e}function De(e,t){return e===!1||W(e)&&e>0?e:t}function ae(e){return f.isValidElement(e)||A(e)||B(e)||W(e)}var Te={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},k={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function pe(e,t,n){n===void 0&&(n=300);let{scrollHeight:o,style:c}=e;requestAnimationFrame(()=>{c.minHeight="initial",c.height=o+"px",c.transition="all "+n+"ms",requestAnimationFrame(()=>{c.height="0",c.padding="0",c.margin="0",setTimeout(t,n)})})}function Y(e){let{enter:t,exit:n,appendPosition:o=!1,collapse:c=!0,collapseDuration:i=300}=e;return function(l){let{children:L,position:v,preventExitTransition:E,done:p,nodeRef:I,isIn:b}=l,_=o?t+"--"+v:t,r=o?n+"--"+v:n,d=f.useRef(),C=f.useRef(0);f.useLayoutEffect(()=>{O()},[]),f.useEffect(()=>{b||(E?P():R())},[b]);function O(){let y=I.current;d.current=y.className,y.className+=" "+_,y.addEventListener("animationend",a),y.addEventListener("animationcancel",a)}function a(y){if(y.target!==I.current)return;let u=I.current;u.dispatchEvent(new Event("d")),u.removeEventListener("animationend",a),u.removeEventListener("animationcancel",a),C.current===0&&y.type!=="animationcancel"&&(u.className=d.current)}function R(){C.current=1;let y=I.current;y.className+=" "+r,y.addEventListener("animationend",P)}function P(){let y=I.current;y.removeEventListener("animationend",P),c?pe(y,p,i):p()}return g.default.createElement(g.default.Fragment,null,L)}}function he(e,t){return{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}}var D={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){let n=this.list.get(e).filter(o=>o!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){let t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{let n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},J=e=>{let c=e,{theme:t,type:n}=c,o=ne(c,["theme","type"]);return g.default.createElement("svg",m({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":"var(--toastify-icon-color-"+n+")"},o))};function Se(e){return g.default.createElement(J,m({},e),g.default.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function Me(e){return g.default.createElement(J,m({},e),g.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function ke(e){return g.default.createElement(J,m({},e),g.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function we(e){return g.default.createElement(J,m({},e),g.default.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function Fe(){return g.default.createElement("div",{className:"Toastify__spinner"})}var $={info:Me,warning:Se,success:ke,error:we,spinner:Fe},Ae=e=>e in $;function ze(e){let{theme:t,type:n,isLoading:o,icon:c}=e,i=null,s={theme:t,type:n};return c===!1||(B(c)?i=c(s):f.isValidElement(c)?i=f.cloneElement(c,s):A(c)||W(c)?i=c:o?i=$.spinner():Ae(n)&&(i=$[n](s))),i}function Ee(e){let[,t]=f.useReducer(r=>r+1,0),[n,o]=f.useState([]),c=f.useRef(null),i=f.useRef(new Map).current,s=r=>n.indexOf(r)!==-1,l=f.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:s,getToast:r=>i.get(r)}).current;f.useEffect(()=>(l.containerId=e.containerId,D.cancelEmit(3).on(0,I).on(1,r=>c.current&&v(r)).on(5,L).emit(2,l),()=>{i.clear(),c.current=null,D.off(0),D.off(1),D.off(5),D.emit(3,l)}),[]),f.useEffect(()=>{l.props=e,l.isToastActive=s,l.displayedToast=n.length});function L(r){let{containerId:d}=r,{limit:C}=l.props;C&&(!d||l.containerId===d)&&(l.count-=l.queue.length,l.queue=[])}function v(r){o(d=>oe(r)?d.filter(C=>C!==r):[])}function E(){let{toastContent:r,toastProps:d,staleId:C}=l.queue.shift();b(r,d,C)}function p(r){return!c.current||l.props.enableMultiContainer&&r.containerId!==l.props.containerId||i.has(r.toastId)&&r.updateId==null}function I(r,d){let U=d,{delay:C,staleId:O}=U,a=ne(U,["delay","staleId"]);if(!ae(r)||p(a))return;let{toastId:R,updateId:P,data:y}=a,{props:u}=l,T=()=>v(R),x=P==null;x&&l.count++;let N={toastId:R,updateId:P,data:y,containerId:a.containerId,isLoading:a.isLoading,theme:a.theme||u.theme,icon:a.icon!=null?a.icon:u.icon,isIn:!1,key:a.key||l.toastKey++,type:a.type,closeToast:T,closeButton:a.closeButton,rtl:u.rtl,position:a.position||u.position,transition:a.transition||u.transition,className:Z(a.className||u.toastClassName),bodyClassName:Z(a.bodyClassName||u.bodyClassName),style:a.style||u.toastStyle,bodyStyle:a.bodyStyle||u.bodyStyle,onClick:a.onClick||u.onClick,pauseOnHover:G(a.pauseOnHover)?a.pauseOnHover:u.pauseOnHover,pauseOnFocusLoss:G(a.pauseOnFocusLoss)?a.pauseOnFocusLoss:u.pauseOnFocusLoss,draggable:G(a.draggable)?a.draggable:u.draggable,draggablePercent:a.draggablePercent||u.draggablePercent,draggableDirection:a.draggableDirection||u.draggableDirection,closeOnClick:G(a.closeOnClick)?a.closeOnClick:u.closeOnClick,progressClassName:Z(a.progressClassName||u.progressClassName),progressStyle:a.progressStyle||u.progressStyle,autoClose:a.isLoading?!1:De(a.autoClose,u.autoClose),hideProgressBar:G(a.hideProgressBar)?a.hideProgressBar:u.hideProgressBar,progress:a.progress,role:a.role||u.role,deleteToast(){let Q=he(i.get(R),"removed");i.delete(R),D.emit(4,Q);let F=l.queue.length;if(l.count=oe(R)?l.count-1:l.count-l.displayedToast,l.count<0&&(l.count=0),F>0){let V=oe(R)?1:l.props.limit;if(F===1||V===1)l.displayedToast++,E();else{let z=V>F?F:V;l.displayedToast=z;for(let H=0;H<z;H++)E()}}else t()}};N.iconOut=ze(N),B(a.onOpen)&&(N.onOpen=a.onOpen),B(a.onClose)&&(N.onClose=a.onClose),N.closeButton=u.closeButton,a.closeButton===!1||ae(a.closeButton)?N.closeButton=a.closeButton:a.closeButton===!0&&(N.closeButton=ae(u.closeButton)?u.closeButton:!0);let M=r;f.isValidElement(r)&&!A(r.type)?M=f.cloneElement(r,{closeToast:T,toastProps:N,data:y}):B(r)&&(M=r({closeToast:T,toastProps:N,data:y})),u.limit&&u.limit>0&&l.count>u.limit&&x?l.queue.push({toastContent:M,toastProps:N,staleId:O}):W(C)?setTimeout(()=>{b(M,N,O)},C):b(M,N,O)}function b(r,d,C){let{toastId:O}=d;C&&i.delete(C);let a={content:r,props:d};i.set(O,a),o(R=>[...R,O].filter(P=>P!==C)),D.emit(4,he(a,a.props.updateId==null?"added":"updated"))}function _(r){let d=new Map,C=Array.from(i.values());return e.newestOnTop&&C.reverse(),C.forEach(O=>{let{position:a}=O.props;d.has(a)||d.set(a,[]),d.get(a).push(O)}),Array.from(d,O=>r(O[0],O[1]))}return{getToastToRender:_,containerRef:c,isToastActive:s}}function ve(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function Ce(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function be(e){let[t,n]=f.useState(!1),[o,c]=f.useState(!1),i=f.useRef(null),s=f.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,l=f.useRef(e),{autoClose:L,pauseOnHover:v,closeToast:E,onClick:p,closeOnClick:I}=e;f.useEffect(()=>{l.current=e}),f.useEffect(()=>(i.current&&i.current.addEventListener("d",r,{once:!0}),B(e.onOpen)&&e.onOpen(f.isValidElement(e.children)&&e.children.props),()=>{let T=l.current;B(T.onClose)&&T.onClose(f.isValidElement(T.children)&&T.children.props)}),[]),f.useEffect(()=>(e.pauseOnFocusLoss&&C(),()=>{e.pauseOnFocusLoss&&O()}),[e.pauseOnFocusLoss]);function b(T){if(e.draggable){a();let x=i.current;s.canCloseOnClick=!0,s.canDrag=!0,s.boundingRect=x.getBoundingClientRect(),x.style.transition="",s.x=ve(T.nativeEvent),s.y=Ce(T.nativeEvent),e.draggableDirection==="x"?(s.start=s.x,s.removalDistance=x.offsetWidth*(e.draggablePercent/100)):(s.start=s.y,s.removalDistance=x.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent/100))}}function _(){if(s.boundingRect){let{top:T,bottom:x,left:N,right:M}=s.boundingRect;e.pauseOnHover&&s.x>=N&&s.x<=M&&s.y>=T&&s.y<=x?d():r()}}function r(){n(!0)}function d(){n(!1)}function C(){document.hasFocus()||d(),window.addEventListener("focus",r),window.addEventListener("blur",d)}function O(){window.removeEventListener("focus",r),window.removeEventListener("blur",d)}function a(){s.didMove=!1,document.addEventListener("mousemove",P),document.addEventListener("mouseup",y),document.addEventListener("touchmove",P),document.addEventListener("touchend",y)}function R(){document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",y),document.removeEventListener("touchmove",P),document.removeEventListener("touchend",y)}function P(T){let x=i.current;s.canDrag&&x&&(s.didMove=!0,t&&d(),s.x=ve(T),s.y=Ce(T),e.draggableDirection==="x"?s.delta=s.x-s.start:s.delta=s.y-s.start,s.start!==s.x&&(s.canCloseOnClick=!1),x.style.transform="translate"+e.draggableDirection+"("+s.delta+"px)",x.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function y(){R();let T=i.current;if(s.canDrag&&s.didMove&&T){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance){c(!0),e.closeToast();return}T.style.transition="transform 0.2s, opacity 0.2s",T.style.transform="translate"+e.draggableDirection+"(0)",T.style.opacity="1"}}let u={onMouseDown:b,onTouchStart:b,onMouseUp:_,onTouchEnd:_};return L&&v&&(u.onMouseEnter=d,u.onMouseLeave=r),I&&(u.onClick=T=>{p&&p(T),s.canCloseOnClick&&E()}),{playToast:r,pauseToast:d,isRunning:t,preventExitTransition:o,toastRef:i,eventHandlers:u}}function _e(e){let{closeToast:t,theme:n,ariaLabel:o="close"}=e;return g.default.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:c=>{c.stopPropagation(),t(c)},"aria-label":o},g.default.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},g.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Ie(e){let{delay:t,isRunning:n,closeToast:o,type:c,hide:i,className:s,style:l,controlledProgress:L,progress:v,rtl:E,isIn:p,theme:I}=e,b=S(m({},l),{animationDuration:t+"ms",animationPlayState:n?"running":"paused",opacity:i?0:1});L&&(b.transform="scaleX("+v+")");let _=w.default("Toastify__progress-bar",L?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+I,"Toastify__progress-bar--"+c,{["Toastify__progress-bar--rtl"]:E}),r=B(s)?s({rtl:E,type:c,defaultClassName:_}):w.default(_,s),d={[L&&v>=1?"onTransitionEnd":"onAnimationEnd"]:L&&v<1?null:()=>{p&&o()}};return g.default.createElement("div",m({role:"progressbar","aria-hidden":i?"true":"false","aria-label":"notification timer",className:r,style:b},d))}Ie.defaultProps={type:k.DEFAULT,hide:!1};var He=e=>{let{isRunning:t,preventExitTransition:n,toastRef:o,eventHandlers:c}=be(e),{closeButton:i,children:s,autoClose:l,onClick:L,type:v,hideProgressBar:E,closeToast:p,transition:I,position:b,className:_,style:r,bodyClassName:d,bodyStyle:C,progressClassName:O,progressStyle:a,updateId:R,role:P,progress:y,rtl:u,toastId:T,deleteToast:x,isIn:N,isLoading:M,iconOut:U,theme:Q}=e,F=w.default("Toastify__toast","Toastify__toast-theme--"+Q,"Toastify__toast--"+v,{["Toastify__toast--rtl"]:u}),V=B(_)?_({rtl:u,position:b,type:v,defaultClassName:F}):w.default(F,_),z=!!y,H={closeToast:p,type:v,theme:Q},j=null;return i===!1||(B(i)?j=i(H):g.default.isValidElement(i)?j=g.default.cloneElement(i,H):j=_e(H)),g.default.createElement(I,{isIn:N,done:x,position:b,preventExitTransition:n,nodeRef:o},g.default.createElement("div",S(m({id:T,onClick:L,className:V},c),{style:r,ref:o}),g.default.createElement("div",S(m({},N&&{role:P}),{className:B(d)?d({type:v}):w.default("Toastify__toast-body",d),style:C}),U!=null&&g.default.createElement("div",{className:w.default("Toastify__toast-icon",{["Toastify--animate-icon Toastify__zoom-enter"]:!M})},U),g.default.createElement("div",null,s)),j,(l||z)&&g.default.createElement(Ie,S(m({},R&&!z?{key:"pb-"+R}:{}),{rtl:u,theme:Q,delay:l,isRunning:t,isIn:N,closeToast:p,hide:E,type:v,style:a,className:O,controlledProgress:z,progress:y}))))},Oe=Y({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),qe=Y({enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0}),Ue=Y({enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"}),Qe=Y({enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"}),ie=f.forwardRef((e,t)=>{let{getToastToRender:n,containerRef:o,isToastActive:c}=Ee(e),{className:i,style:s,rtl:l,containerId:L}=e;function v(E){let p=w.default("Toastify__toast-container","Toastify__toast-container--"+E,{["Toastify__toast-container--rtl"]:l});return B(i)?i({position:E,rtl:l,defaultClassName:p}):w.default(p,Z(i))}return f.useEffect(()=>{t&&(t.current=o.current)},[]),g.default.createElement("div",{ref:o,className:"Toastify",id:L},n((E,p)=>{let I=p.length?m({},s):S(m({},s),{pointerEvents:"none"});return g.default.createElement("div",{className:v(E),style:I,key:"container-"+E},p.map((b,_)=>{let{content:r,props:d}=b;return g.default.createElement(He,S(m({},d),{isIn:c(d.toastId),style:S(m({},d.style),{"--nth":_+1,"--len":p.length}),key:"toast-"+d.key}),r)}))}))});ie.displayName="ToastContainer";ie.defaultProps={position:Te.TOP_RIGHT,transition:Oe,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:_e,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var q=new Map,re,le=[];function Ve(e,t){let{containerId:n}=t,o=q.get(n||re);return o?o.getToast(e):null}function Ne(){return Math.random().toString(36).substring(2,9)}function We(e){return e&&(A(e.toastId)||W(e.toastId))?e.toastId:Ne()}function X(e,t){return q.size>0?D.emit(0,e,t):le.push({content:e,options:t}),t.toastId}function ee(e,t){return S(m({},t),{type:t&&t.type||e,toastId:We(t)})}function te(e){return(t,n)=>X(t,ee(e,n))}function h(e,t){return X(e,ee(k.DEFAULT,t))}h.loading=(e,t)=>X(e,ee(k.DEFAULT,m({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)));function Ge(e,t,n){let{pending:o,error:c,success:i}=t,s;o&&(s=A(o)?h.loading(o,n):h.loading(o.render,m(m({},n),o)));let l={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null,delay:100},L=(E,p,I)=>{if(p==null){h.dismiss(s);return}let b=S(m(m({type:E},l),n),{data:I}),_=A(p)?{render:p}:p;return s?h.update(s,m(m({},b),_)):h(_.render,m(m({},b),_)),I},v=B(e)?e():e;return v.then(E=>L("success",i,E)).catch(E=>L("error",c,E)),v}h.promise=Ge;h.success=te(k.SUCCESS);h.info=te(k.INFO);h.error=te(k.ERROR);h.warning=te(k.WARNING);h.warn=h.warning;h.dark=(e,t)=>X(e,ee(k.DEFAULT,m({theme:"dark"},t)));h.dismiss=e=>D.emit(1,e);h.clearWaitingQueue=function(e){return e===void 0&&(e={}),D.emit(5,e)};h.isActive=e=>{let t=!1;return q.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t};h.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{let n=Ve(e,t);if(n){let{props:o,content:c}=n,i=S(m(m({},o),t),{toastId:t.toastId||e,updateId:Ne()});i.toastId!==e&&(i.staleId=e);let s=i.render||c;delete i.render,X(s,i)}},0)};h.done=e=>{h.update(e,{progress:1})};h.onChange=e=>(D.on(4,e),()=>{D.off(4,e)});h.POSITION=Te;h.TYPE=k;D.on(2,e=>{re=e.containerId||e,q.set(re,e),le.forEach(t=>{D.emit(0,t.content,t.options)}),le=[]}).on(3,e=>{q.delete(e.containerId||e),q.size===0&&D.off(0).off(1).off(5)});exports.Bounce=Oe;exports.Flip=Qe;exports.Icons=$;exports.Slide=qe;exports.ToastContainer=ie;exports.Zoom=Ue;exports.collapseToast=pe;exports.cssTransition=Y;exports.toast=h;exports.useToast=be;exports.useToastContainer=Ee;
|
|
1
|
+
var Ie=Object.create;var W=Object.defineProperty,Oe=Object.defineProperties,Le=Object.getOwnPropertyDescriptor,Ne=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols,xe=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var ue=(e,t,n)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t)=>{for(var n in t||(t={}))oe.call(t,n)&&ue(e,n,t[n]);if(Z)for(var n of Z(t))ce.call(t,n)&&ue(e,n,t[n]);return e},D=(e,t)=>Oe(e,Ne(t)),de=e=>W(e,"__esModule",{value:!0});var ae=(e,t)=>{var n={};for(var s in e)oe.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&Z)for(var s of Z(e))t.indexOf(s)<0&&ce.call(e,s)&&(n[s]=e[s]);return n};var Re=(e,t)=>{de(e);for(var n in t)W(e,n,{get:t[n],enumerable:!0})},Be=(e,t,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Pe(t))!oe.call(e,s)&&s!=="default"&&W(e,s,{get:()=>t[s],enumerable:!(n=Le(t,s))||n.enumerable});return e},De=e=>Be(de(W(e!=null?Ie(xe(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);Re(exports,{Bounce:()=>Ce,Flip:()=>Ge,Icons:()=>te,Slide:()=>Qe,ToastContainer:()=>ie,Zoom:()=>We,collapseToast:()=>ge,cssTransition:()=>V,toast:()=>T,useToast:()=>Ee,useToastContainer:()=>ye});var a=De(require("react"));function fe(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=fe(e[t]))&&(s&&(s+=" "),s+=n);else for(t in e)e[t]&&(s&&(s+=" "),s+=t);return s}function Se(){for(var e,t,n=0,s="";n<arguments.length;)(e=arguments[n++])&&(t=fe(e))&&(s&&(s+=" "),s+=t);return s}var M=Se;function G(e){return typeof e=="number"&&!isNaN(e)}function Y(e){return typeof e=="boolean"}function F(e){return typeof e=="string"}function x(e){return typeof e=="function"}function J(e){return F(e)||x(e)?e:null}function $(e){return e!=null}function Me(e,t){return e===!1||G(e)&&e>0?e:t}function re(e){return(0,a.isValidElement)(e)||F(e)||x(e)||G(e)}var me={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},k={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function ge(e,t,n){n===void 0&&(n=300);let{scrollHeight:s,style:u}=e;requestAnimationFrame(()=>{u.minHeight="initial",u.height=s+"px",u.transition="all "+n+"ms",requestAnimationFrame(()=>{u.height="0",u.padding="0",u.margin="0",setTimeout(t,n)})})}function V(e){let{enter:t,exit:n,appendPosition:s=!1,collapse:u=!0,collapseDuration:i=300}=e;return function(c){let{children:I,position:v,preventExitTransition:h,done:y,nodeRef:O,isIn:b}=c,C=s?t+"--"+v:t,l=s?n+"--"+v:n,d=(0,a.useRef)(0);return(0,a.useLayoutEffect)(()=>{let m=O.current,E=C.split(" "),r=P=>{P.target===O.current&&(m.dispatchEvent(new Event("d")),m.removeEventListener("animationend",r),m.removeEventListener("animationcancel",r),d.current===0&&P.type!=="animationcancel"&&m.classList.remove(...E))};(()=>{m.classList.add(...E),m.addEventListener("animationend",r),m.addEventListener("animationcancel",r)})()},[]),(0,a.useEffect)(()=>{let m=O.current,E=()=>{m.removeEventListener("animationend",E),u?ge(m,y,i):y()};b||(h?E():(()=>{d.current=1,m.className+=" "+l,m.addEventListener("animationend",E)})())},[b]),a.default.createElement(a.default.Fragment,null,I)}}function pe(e,t){return{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}}var R={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){let n=this.list.get(e).filter(s=>s!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){let t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{let n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},ee=e=>{let u=e,{theme:t,type:n}=u,s=ae(u,["theme","type"]);return a.default.createElement("svg",g({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":"var(--toastify-icon-color-"+n+")"},s))};function ke(e){return a.default.createElement(ee,g({},e),a.default.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function we(e){return a.default.createElement(ee,g({},e),a.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function Fe(e){return a.default.createElement(ee,g({},e),a.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function Ae(e){return a.default.createElement(ee,g({},e),a.default.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function ze(){return a.default.createElement("div",{className:"Toastify__spinner"})}var te={info:we,warning:ke,success:Fe,error:Ae,spinner:ze},He=e=>e in te;function qe(e){let{theme:t,type:n,isLoading:s,icon:u}=e,i=null,o={theme:t,type:n};return u===!1||(x(u)?i=u(o):(0,a.isValidElement)(u)?i=(0,a.cloneElement)(u,o):F(u)||G(u)?i=u:s?i=te.spinner():He(n)&&(i=te[n](o))),i}function ye(e){let[,t]=(0,a.useReducer)(l=>l+1,0),[n,s]=(0,a.useState)([]),u=(0,a.useRef)(null),i=(0,a.useRef)(new Map).current,o=l=>n.indexOf(l)!==-1,c=(0,a.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:o,getToast:l=>i.get(l)}).current;(0,a.useEffect)(()=>(c.containerId=e.containerId,R.cancelEmit(3).on(0,O).on(1,l=>u.current&&v(l)).on(5,I).emit(2,c),()=>{i.clear(),R.emit(3,c)}),[]),(0,a.useEffect)(()=>{c.props=e,c.isToastActive=o,c.displayedToast=n.length});function I(l){let{containerId:d}=l,{limit:m}=c.props;m&&(!d||c.containerId===d)&&(c.count-=c.queue.length,c.queue=[])}function v(l){s(d=>$(l)?d.filter(m=>m!==l):[])}function h(){let{toastContent:l,toastProps:d,staleId:m}=c.queue.shift();b(l,d,m)}function y(l){return!u.current||c.props.enableMultiContainer&&l.containerId!==c.props.containerId||i.has(l.toastId)&&l.updateId==null}function O(l,d){let q=d,{delay:m,staleId:E}=q,r=ae(q,["delay","staleId"]);if(!re(l)||y(r))return;let{toastId:N,updateId:P,data:B}=r,{props:f}=c,p=()=>v(N),L=P==null;L&&c.count++;let _={toastId:N,updateId:P,data:B,containerId:r.containerId,isLoading:r.isLoading,theme:r.theme||f.theme,icon:r.icon!=null?r.icon:f.icon,isIn:!1,key:r.key||c.toastKey++,type:r.type,closeToast:p,closeButton:r.closeButton,rtl:f.rtl,position:r.position||f.position,transition:r.transition||f.transition,className:J(r.className||f.toastClassName),bodyClassName:J(r.bodyClassName||f.bodyClassName),style:r.style||f.toastStyle,bodyStyle:r.bodyStyle||f.bodyStyle,onClick:r.onClick||f.onClick,pauseOnHover:Y(r.pauseOnHover)?r.pauseOnHover:f.pauseOnHover,pauseOnFocusLoss:Y(r.pauseOnFocusLoss)?r.pauseOnFocusLoss:f.pauseOnFocusLoss,draggable:Y(r.draggable)?r.draggable:f.draggable,draggablePercent:r.draggablePercent||f.draggablePercent,draggableDirection:r.draggableDirection||f.draggableDirection,closeOnClick:Y(r.closeOnClick)?r.closeOnClick:f.closeOnClick,progressClassName:J(r.progressClassName||f.progressClassName),progressStyle:r.progressStyle||f.progressStyle,autoClose:r.isLoading?!1:Me(r.autoClose,f.autoClose),hideProgressBar:Y(r.hideProgressBar)?r.hideProgressBar:f.hideProgressBar,progress:r.progress,role:r.role||f.role,deleteToast(){let U=pe(i.get(N),"removed");i.delete(N),R.emit(4,U);let w=c.queue.length;if(c.count=$(N)?c.count-1:c.count-c.displayedToast,c.count<0&&(c.count=0),w>0){let Q=$(N)?1:c.props.limit;if(w===1||Q===1)c.displayedToast++,h();else{let z=Q>w?w:Q;c.displayedToast=z;for(let H=0;H<z;H++)h()}}else t()}};_.iconOut=qe(_),x(r.onOpen)&&(_.onOpen=r.onOpen),x(r.onClose)&&(_.onClose=r.onClose),_.closeButton=f.closeButton,r.closeButton===!1||re(r.closeButton)?_.closeButton=r.closeButton:r.closeButton===!0&&(_.closeButton=re(f.closeButton)?f.closeButton:!0);let S=l;(0,a.isValidElement)(l)&&!F(l.type)?S=(0,a.cloneElement)(l,{closeToast:p,toastProps:_,data:B}):x(l)&&(S=l({closeToast:p,toastProps:_,data:B})),f.limit&&f.limit>0&&c.count>f.limit&&L?c.queue.push({toastContent:S,toastProps:_,staleId:E}):G(m)?setTimeout(()=>{b(S,_,E)},m):b(S,_,E)}function b(l,d,m){let{toastId:E}=d;m&&i.delete(m);let r={content:l,props:d};i.set(E,r),s(N=>[...N,E].filter(P=>P!==m)),R.emit(4,pe(r,r.props.updateId==null?"added":"updated"))}function C(l){let d=new Map,m=Array.from(i.values());return e.newestOnTop&&m.reverse(),m.forEach(E=>{let{position:r}=E.props;d.has(r)||d.set(r,[]),d.get(r).push(E)}),Array.from(d,E=>l(E[0],E[1]))}return{getToastToRender:C,containerRef:u,isToastActive:o}}function Te(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function he(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function Ee(e){let[t,n]=(0,a.useState)(!1),[s,u]=(0,a.useState)(!1),i=(0,a.useRef)(null),o=(0,a.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,c=(0,a.useRef)(e),{autoClose:I,pauseOnHover:v,closeToast:h,onClick:y,closeOnClick:O}=e;(0,a.useEffect)(()=>{c.current=e}),(0,a.useEffect)(()=>(i.current&&i.current.addEventListener("d",l,{once:!0}),x(e.onOpen)&&e.onOpen((0,a.isValidElement)(e.children)&&e.children.props),()=>{let p=c.current;x(p.onClose)&&p.onClose((0,a.isValidElement)(p.children)&&p.children.props)}),[]),(0,a.useEffect)(()=>(e.pauseOnFocusLoss&&m(),()=>{e.pauseOnFocusLoss&&E()}),[e.pauseOnFocusLoss]);function b(p){if(e.draggable){r();let L=i.current;o.canCloseOnClick=!0,o.canDrag=!0,o.boundingRect=L.getBoundingClientRect(),L.style.transition="",o.x=Te(p.nativeEvent),o.y=he(p.nativeEvent),e.draggableDirection==="x"?(o.start=o.x,o.removalDistance=L.offsetWidth*(e.draggablePercent/100)):(o.start=o.y,o.removalDistance=L.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent/100))}}function C(){if(o.boundingRect){let{top:p,bottom:L,left:_,right:S}=o.boundingRect;e.pauseOnHover&&o.x>=_&&o.x<=S&&o.y>=p&&o.y<=L?d():l()}}function l(){n(!0)}function d(){n(!1)}function m(){document.hasFocus()||d(),window.addEventListener("focus",l),window.addEventListener("blur",d)}function E(){window.removeEventListener("focus",l),window.removeEventListener("blur",d)}function r(){o.didMove=!1,document.addEventListener("mousemove",P),document.addEventListener("mouseup",B),document.addEventListener("touchmove",P),document.addEventListener("touchend",B)}function N(){document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",B),document.removeEventListener("touchmove",P),document.removeEventListener("touchend",B)}function P(p){let L=i.current;o.canDrag&&L&&(o.didMove=!0,t&&d(),o.x=Te(p),o.y=he(p),e.draggableDirection==="x"?o.delta=o.x-o.start:o.delta=o.y-o.start,o.start!==o.x&&(o.canCloseOnClick=!1),L.style.transform="translate"+e.draggableDirection+"("+o.delta+"px)",L.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function B(){N();let p=i.current;if(o.canDrag&&o.didMove&&p){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance){u(!0),e.closeToast();return}p.style.transition="transform 0.2s, opacity 0.2s",p.style.transform="translate"+e.draggableDirection+"(0)",p.style.opacity="1"}}let f={onMouseDown:b,onTouchStart:b,onMouseUp:C,onTouchEnd:C};return I&&v&&(f.onMouseEnter=d,f.onMouseLeave=l),O&&(f.onClick=p=>{y&&y(p),o.canCloseOnClick&&h()}),{playToast:l,pauseToast:d,isRunning:t,preventExitTransition:s,toastRef:i,eventHandlers:f}}function ve(e){let{closeToast:t,theme:n,ariaLabel:s="close"}=e;return a.default.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:u=>{u.stopPropagation(),t(u)},"aria-label":s},a.default.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},a.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function be(e){let{delay:t,isRunning:n,closeToast:s,type:u,hide:i,className:o,style:c,controlledProgress:I,progress:v,rtl:h,isIn:y,theme:O}=e,b=D(g({},c),{animationDuration:t+"ms",animationPlayState:n?"running":"paused",opacity:i?0:1});I&&(b.transform="scaleX("+v+")");let C=M("Toastify__progress-bar",I?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+O,"Toastify__progress-bar--"+u,{["Toastify__progress-bar--rtl"]:h}),l=x(o)?o({rtl:h,type:u,defaultClassName:C}):M(C,o),d={[I&&v>=1?"onTransitionEnd":"onAnimationEnd"]:I&&v<1?null:()=>{y&&s()}};return a.default.createElement("div",g({role:"progressbar","aria-hidden":i?"true":"false","aria-label":"notification timer",className:l,style:b},d))}be.defaultProps={type:k.DEFAULT,hide:!1};var Ue=e=>{let{isRunning:t,preventExitTransition:n,toastRef:s,eventHandlers:u}=Ee(e),{closeButton:i,children:o,autoClose:c,onClick:I,type:v,hideProgressBar:h,closeToast:y,transition:O,position:b,className:C,style:l,bodyClassName:d,bodyStyle:m,progressClassName:E,progressStyle:r,updateId:N,role:P,progress:B,rtl:f,toastId:p,deleteToast:L,isIn:_,isLoading:S,iconOut:q,theme:U}=e,w=M("Toastify__toast","Toastify__toast-theme--"+U,"Toastify__toast--"+v,{["Toastify__toast--rtl"]:f}),Q=x(C)?C({rtl:f,position:b,type:v,defaultClassName:w}):M(w,C),z=!!B,H={closeToast:y,type:v,theme:U},j=null;return i===!1||(x(i)?j=i(H):a.default.isValidElement(i)?j=a.default.cloneElement(i,H):j=ve(H)),a.default.createElement(O,{isIn:_,done:L,position:b,preventExitTransition:n,nodeRef:s},a.default.createElement("div",D(g({id:p,onClick:I,className:Q},u),{style:l,ref:s}),a.default.createElement("div",D(g({},_&&{role:P}),{className:x(d)?d({type:v}):M("Toastify__toast-body",d),style:m}),q!=null&&a.default.createElement("div",{className:M("Toastify__toast-icon",{["Toastify--animate-icon Toastify__zoom-enter"]:!S})},q),a.default.createElement("div",null,o)),j,(c||z)&&a.default.createElement(be,D(g({},N&&!z?{key:"pb-"+N}:{}),{rtl:f,theme:U,delay:c,isRunning:t,isIn:_,closeToast:y,hide:h,type:v,style:r,className:E,controlledProgress:z,progress:B}))))},Ce=V({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),Qe=V({enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0}),We=V({enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"}),Ge=V({enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"}),ie=(0,a.forwardRef)((e,t)=>{let{getToastToRender:n,containerRef:s,isToastActive:u}=ye(e),{className:i,style:o,rtl:c,containerId:I}=e;function v(h){let y=M("Toastify__toast-container","Toastify__toast-container--"+h,{["Toastify__toast-container--rtl"]:c});return x(i)?i({position:h,rtl:c,defaultClassName:y}):M(y,J(i))}return(0,a.useEffect)(()=>{t&&(t.current=s.current)},[]),a.default.createElement("div",{ref:s,className:"Toastify",id:I},n((h,y)=>{let O=y.length?g({},o):D(g({},o),{pointerEvents:"none"});return a.default.createElement("div",{className:v(h),style:O,key:"container-"+h},y.map((b,C)=>{let{content:l,props:d}=b;return a.default.createElement(Ue,D(g({},d),{isIn:u(d.toastId),style:D(g({},d.style),{"--nth":C+1,"--len":y.length}),key:"toast-"+d.key}),l)}))}))});ie.displayName="ToastContainer";ie.defaultProps={position:me.TOP_RIGHT,transition:Ce,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:ve,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var A=new Map,le,X=[];function Ye(e,t){let{containerId:n}=t,s=A.get(n||le);return s?s.getToast(e):null}function _e(){return Math.random().toString(36).substring(2,9)}function Ve(e){return e&&(F(e.toastId)||G(e.toastId))?e.toastId:_e()}function K(e,t){return A.size>0?R.emit(0,e,t):X.push({content:e,options:t}),t.toastId}function ne(e,t){return D(g({},t),{type:t&&t.type||e,toastId:Ve(t)})}function se(e){return(t,n)=>K(t,ne(e,n))}function T(e,t){return K(e,ne(k.DEFAULT,t))}T.loading=(e,t)=>K(e,ne(k.DEFAULT,g({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)));function Xe(e,t,n){let{pending:s,error:u,success:i}=t,o;s&&(o=F(s)?T.loading(s,n):T.loading(s.render,g(g({},n),s)));let c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null,delay:100},I=(h,y,O)=>{if(y==null){T.dismiss(o);return}let b=D(g(g({type:h},c),n),{data:O}),C=F(y)?{render:y}:y;return o?T.update(o,g(g({},b),C)):T(C.render,g(g({},b),C)),O},v=x(e)?e():e;return v.then(h=>I("success",i,h)).catch(h=>I("error",u,h)),v}T.promise=Xe;T.success=se(k.SUCCESS);T.info=se(k.INFO);T.error=se(k.ERROR);T.warning=se(k.WARNING);T.warn=T.warning;T.dark=(e,t)=>K(e,ne(k.DEFAULT,g({theme:"dark"},t)));T.dismiss=e=>{A.size>0?R.emit(1,e):X=X.filter(t=>$(e)&&t.options.toastId!==e)};T.clearWaitingQueue=function(e){return e===void 0&&(e={}),R.emit(5,e)};T.isActive=e=>{let t=!1;return A.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t};T.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{let n=Ye(e,t);if(n){let{props:s,content:u}=n,i=D(g(g({},s),t),{toastId:t.toastId||e,updateId:_e()});i.toastId!==e&&(i.staleId=e);let o=i.render||u;delete i.render,K(o,i)}},0)};T.done=e=>{T.update(e,{progress:1})};T.onChange=e=>(R.on(4,e),()=>{R.off(4,e)});T.POSITION=me;T.TYPE=k;R.on(2,e=>{le=e.containerId||e,A.set(le,e),X.forEach(t=>{R.emit(0,t.content,t.options)}),X=[]}).on(3,e=>{A.delete(e.containerId||e),A.size===0&&R.off(0).off(1).off(5)});
|
|
@@ -15,7 +15,7 @@ declare type TypeProps = {
|
|
|
15
15
|
gapDistance?: number | string;
|
|
16
16
|
childrenPosition?: 'start' | 'end';
|
|
17
17
|
};
|
|
18
|
-
export interface CheckBoxProps extends TypeProps, Omit<ContainerProps, keyof TypeProps>, Omit<React.HTMLProps<HTMLDivElement>, keyof TypeProps> {
|
|
18
|
+
export interface CheckBoxProps extends TypeProps, Omit<ContainerProps, keyof TypeProps>, Omit<React.HTMLProps<HTMLDivElement>, keyof TypeProps | 'ref'> {
|
|
19
19
|
}
|
|
20
20
|
declare const CheckBox: ({ children, checked, onChange, value, name, disabled, readOnly, variant, gapDistance, childrenPosition, as, ...props }: CheckBoxProps) => JSX.Element;
|
|
21
21
|
export declare const CheckBoxGroup: (props: FlexProps & {
|
|
@@ -31,7 +31,12 @@ const CheckBox = (_a) => {
|
|
|
31
31
|
? 'unchecked'
|
|
32
32
|
: 'indeterminate';
|
|
33
33
|
const gap = React.createElement("div", { style: { marginLeft: gapDistance, display: 'inline-block' } });
|
|
34
|
-
children = children ? React.createElement("div", { style: {
|
|
34
|
+
children = children ? (React.createElement("div", { style: {
|
|
35
|
+
display: 'inline-block',
|
|
36
|
+
whiteSpace: 'nowrap',
|
|
37
|
+
overflow: 'hidden',
|
|
38
|
+
textOverflow: 'ellipsis',
|
|
39
|
+
} }, children)) : null;
|
|
35
40
|
const before = childrenPosition === 'start' ? children : null;
|
|
36
41
|
const beforeGap = childrenPosition === 'start' && children ? gap : null;
|
|
37
42
|
const after = childrenPosition === 'end' ? children : null;
|
|
@@ -46,7 +51,7 @@ const CheckBox = (_a) => {
|
|
|
46
51
|
opacity: 0,
|
|
47
52
|
cursor: 'pointer',
|
|
48
53
|
}, onChange: onInputChange }));
|
|
49
|
-
return (React.createElement(rebass_1.Box, Object.assign({ my: 2 }, props, { className: (0, join_1.default)('ab-CheckBox', `ab-CheckBox--${type}`, `ab-CheckBox--variant-${variant}`, disabled ? 'ab-CheckBox--disabled' : '', readOnly ? 'ab-CheckBox--readonly' : '', props.className), style:
|
|
54
|
+
return (React.createElement(rebass_1.Box, Object.assign({ my: 2 }, props, { className: (0, join_1.default)('ab-CheckBox', `ab-CheckBox--${type}`, `ab-CheckBox--variant-${variant}`, disabled ? 'ab-CheckBox--disabled' : '', readOnly ? 'ab-CheckBox--readonly' : '', props.className), style: props.style, as: as }),
|
|
50
55
|
before,
|
|
51
56
|
beforeGap,
|
|
52
57
|
input,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HTMLProps } from 'react';
|
|
3
|
+
import { BoxProps } from 'rebass';
|
|
4
|
+
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
5
|
+
export declare type ColorPickerProps = Omit<HTMLProps<HTMLInputElement>, 'onChange'> & {
|
|
6
|
+
api: AdaptableApi;
|
|
7
|
+
onChange: (color: string) => void;
|
|
8
|
+
value: string;
|
|
9
|
+
includeAlpha?: boolean;
|
|
10
|
+
} & Omit<BoxProps, 'onChange'>;
|
|
11
|
+
export declare const ColorPicker: React.ForwardRefExoticComponent<Pick<ColorPickerProps, "max" | "required" | "type" | "data" | "default" | "high" | "low" | "key" | "id" | "media" | "height" | "width" | "start" | "open" | "name" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "color" | "content" | "display" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflow" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "textAlign" | "translate" | "verticalAlign" | "value" | "hidden" | "cite" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "acceptCharset" | "action" | "method" | "noValidate" | "target" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "async" | "disabled" | "multiple" | "size" | "manifest" | "m" | "wrap" | "accept" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "min" | "minLength" | "muted" | "optimum" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "api" | "bg" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "variant" | "tx" | "sx" | "includeAlpha"> & React.RefAttributes<unknown>>;
|
|
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ColorPicker = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const Input_1 = tslib_1.__importDefault(require("../Input"));
|
|
8
|
+
const StyleHelper_1 = require("../../Utilities/Helpers/StyleHelper");
|
|
8
9
|
const tinycolor = require('tinycolor2');
|
|
9
10
|
exports.ColorPicker = React.forwardRef((props, ref) => {
|
|
10
11
|
const ColorPalette = props.api.userInterfaceApi.getColorPalette();
|
|
11
|
-
let { api, value } = props, restProps = tslib_1.__rest(props, ["api", "value"]);
|
|
12
|
+
let { api, value, includeAlpha = true } = props, restProps = tslib_1.__rest(props, ["api", "value", "includeAlpha"]);
|
|
12
13
|
const optionsMap = ColorPalette.reduce((acc, colorItem) => (Object.assign(Object.assign({}, acc), { [(0, StyleHelper_1.getVariableColor)(colorItem)]: colorItem })), {});
|
|
13
14
|
const ABcolorChoicesOptions = Object.keys(optionsMap).map((x) => {
|
|
14
15
|
return (React.createElement("option", { key: x, value: x }, x));
|
|
@@ -18,8 +19,14 @@ exports.ColorPicker = React.forwardRef((props, ref) => {
|
|
|
18
19
|
const color = (0, StyleHelper_1.getVariableColor)(value);
|
|
19
20
|
return tinycolor(color).toHexString();
|
|
20
21
|
}, [value]);
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const preparedAlphaColor = React.useMemo(() => {
|
|
23
|
+
const color = (0, StyleHelper_1.getVariableColor)(value);
|
|
24
|
+
return [tinycolor(color).setAlpha(0).toRgbString(), tinycolor(color).setAlpha(1).toRgbString()];
|
|
25
|
+
}, [value]);
|
|
26
|
+
const rangeBackround = `linear-gradient(90deg, ${preparedAlphaColor[0]} 0%, ${preparedAlphaColor[1]} 100%)`;
|
|
27
|
+
const alpha = tinycolor(value).getAlpha();
|
|
28
|
+
return (React.createElement(rebass_1.Flex, { className: 'ColorPicker' },
|
|
29
|
+
React.createElement(Input_1.default, Object.assign({}, restProps, { mr: 2, onChange: (event) => {
|
|
23
30
|
var _a;
|
|
24
31
|
/**
|
|
25
32
|
* The value is not in the map when the color is not in the palette.
|
|
@@ -30,5 +37,11 @@ exports.ColorPicker = React.forwardRef((props, ref) => {
|
|
|
30
37
|
width: 70,
|
|
31
38
|
padding: 0 /* we need this to be 0, since otherwise on Windows browsers, the chosen color cannot be seen */,
|
|
32
39
|
}, list: "ABcolorChoices" })),
|
|
33
|
-
ABcolorChoices
|
|
40
|
+
ABcolorChoices,
|
|
41
|
+
includeAlpha && (React.createElement(rebass_1.Flex, { alignItems: "center" },
|
|
42
|
+
React.createElement(rebass_1.Box, { mr: 1 }, "Opacity"),
|
|
43
|
+
React.createElement(Input_1.default, { className: "ab-ColorPicker-range", style: { background: rangeBackround }, value: alpha, onChange: (event) => {
|
|
44
|
+
const color = tinycolor(value).setAlpha(event.target.value).toRgbString();
|
|
45
|
+
props.onChange(color);
|
|
46
|
+
}, min: 0, max: 1, step: 0.01, type: "range" })))));
|
|
34
47
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ColorPicker';
|