@adaptabletools/adaptable-cjs 17.0.0-canary.4 → 18.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +62 -14
- package/base.css.map +1 -1
- package/index.css +267 -165
- package/index.css.map +1 -1
- package/package.json +5 -4
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +7 -7
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +9 -9
- package/src/AdaptableOptions/CommentsOptions.d.ts +28 -0
- package/src/AdaptableOptions/EditOptions.d.ts +6 -6
- package/src/AdaptableOptions/GridFilterOptions.d.ts +13 -8
- package/src/AdaptableOptions/GroupingOptions.d.ts +9 -9
- package/src/AdaptableOptions/InteropioPluginOptions.d.ts +10 -0
- package/src/AdaptableOptions/MenuOptions.d.ts +18 -4
- package/src/AdaptableOptions/MenuOptions.js +14 -6
- package/src/AdaptableOptions/NotesOptions.d.ts +2 -9
- package/src/Api/AdaptableApi.d.ts +6 -1
- package/src/Api/CommentApi.d.ts +58 -0
- package/src/Api/EventApi.d.ts +48 -12
- package/src/Api/Events/CalculatedColumnChanged.d.ts +19 -0
- package/src/Api/Events/CellSelectionChanged.d.ts +11 -0
- package/src/Api/Events/CommentsChangedInfo.d.ts +5 -0
- package/src/Api/Events/LiveDataChanged.d.ts +3 -3
- package/src/Api/Events/RowSelectionChanged.d.ts +11 -0
- package/src/Api/GridApi.d.ts +0 -6
- package/src/Api/GridFilterApi.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -6
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +15 -0
- package/src/Api/Implementation/CommentsApiImpl.js +46 -0
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExpressionApiImpl.js +3 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +0 -1
- package/src/Api/Implementation/GridApiImpl.js +0 -4
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +1 -1
- package/src/Api/Implementation/NotesApiImpl.d.ts +2 -6
- package/src/Api/Implementation/NotesApiImpl.js +1 -15
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
- package/src/Api/Implementation/OptionsApiImpl.js +3 -0
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -6
- package/src/Api/Implementation/PluginsApiImpl.js +3 -15
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -12
- package/src/Api/Implementation/ScheduleApiImpl.js +0 -36
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +3 -0
- package/src/Api/Internal/ActionRowInternalApi.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +3 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +16 -0
- package/src/Api/Internal/DashboardInternalApi.d.ts +1 -0
- package/src/Api/Internal/DashboardInternalApi.js +5 -0
- package/src/Api/Internal/DataImportInternalApi.js +2 -0
- package/src/Api/Internal/DataSetInternalApi.js +2 -1
- package/src/Api/Internal/GridInternalApi.d.ts +3 -1
- package/src/Api/Internal/GridInternalApi.js +32 -9
- package/src/Api/Internal/LayoutInternalApi.d.ts +2 -2
- package/src/Api/Internal/LayoutInternalApi.js +11 -11
- package/src/Api/InteropioPluginApi.d.ts +10 -0
- package/src/Api/{NotesAPi.d.ts → NotesApi.d.ts} +19 -21
- package/src/Api/OptionsApi.d.ts +5 -0
- package/src/Api/PluginsApi.d.ts +3 -13
- package/src/Api/ScheduleApi.d.ts +1 -48
- package/src/Api/ThemeApi.d.ts +5 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +4 -2
- package/src/PredefinedConfig/CellAddress.d.ts +13 -0
- package/src/PredefinedConfig/CellAddress.js +5 -0
- package/src/PredefinedConfig/CommentState.d.ts +48 -0
- package/src/PredefinedConfig/CommentState.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +2 -1
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
- package/src/PredefinedConfig/Common/Enums.js +0 -1
- package/src/PredefinedConfig/Common/Schedule.d.ts +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +0 -2
- package/src/PredefinedConfig/NotesState.d.ts +0 -13
- package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -0
- package/src/PredefinedConfig/ScheduleState.d.ts +0 -5
- package/src/PredefinedConfig/SystemState.d.ts +5 -6
- package/src/PredefinedConfig/ThemeState.d.ts +1 -1
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +79 -0
- package/src/Redux/ActionsReducers/CommentsRedux.js +189 -0
- package/src/Redux/ActionsReducers/NotesRedux.js +1 -2
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +0 -48
- package/src/Redux/ActionsReducers/PluginsRedux.js +1 -49
- package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +16 -0
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +47 -1
- package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +0 -53
- package/src/Redux/ActionsReducers/ScheduleRedux.js +2 -90
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -12
- package/src/Redux/ActionsReducers/SystemRedux.js +55 -23
- package/src/Redux/Store/AdaptableStore.d.ts +2 -2
- package/src/Redux/Store/AdaptableStore.js +107 -46
- package/src/Strategy/CommentsModule.d.ts +16 -0
- package/src/Strategy/CommentsModule.js +82 -0
- package/src/Strategy/LayoutModule.d.ts +12 -4
- package/src/Strategy/LayoutModule.js +19 -14
- package/src/Strategy/NotesModule.d.ts +0 -13
- package/src/Strategy/NotesModule.js +9 -88
- package/src/Strategy/PlusMinusModule.js +2 -0
- package/src/Strategy/ScheduleModule.js +0 -23
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +2 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +14 -5
- package/src/Strategy/Utilities/getExpressionViewItems.js +8 -2
- package/src/Utilities/Constants/ConfigConstants.d.ts +1 -0
- package/src/Utilities/Constants/ConfigConstants.js +2 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +8 -3
- package/src/Utilities/Constants/ModuleConstants.d.ts +3 -3
- package/src/Utilities/Constants/ModuleConstants.js +4 -4
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -3
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +7 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +6 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +18 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +12 -12
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +8 -1
- package/src/Utilities/Helpers/PreviewHelper.js +5 -2
- package/src/Utilities/ObjectFactory.d.ts +19 -22
- package/src/Utilities/ObjectFactory.js +51 -60
- package/src/Utilities/Services/CellPopupService.d.ts +23 -0
- package/src/Utilities/Services/CellPopupService.js +138 -0
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
- package/src/Utilities/Services/Interface/IThemeService.d.ts +8 -0
- package/src/Utilities/Services/ModuleService.js +1 -3
- package/src/Utilities/Services/ReportService.d.ts +1 -1
- package/src/Utilities/Services/ThemeService.d.ts +3 -0
- package/src/Utilities/Services/ThemeService.js +33 -1
- package/src/Utilities/Services/ValidationService.js +11 -11
- package/src/View/AdaptableView.js +3 -3
- package/src/View/AdaptableViewFactory.js +4 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
- package/src/View/Charting/useChartingElements.js +8 -3
- package/src/View/Comments/CommentsEditor.d.ts +7 -0
- package/src/View/Comments/CommentsEditor.js +100 -0
- package/src/View/Comments/CommentsPopup.d.ts +2 -0
- package/src/View/Comments/CommentsPopup.js +87 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -1
- package/src/View/Components/CellPopup/index.js +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +8 -2
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -3
- package/src/View/Components/FilterForm/QuickFilterForm.js +5 -4
- package/src/View/Components/FilterForm/QuickFilterValues.d.ts +2 -2
- package/src/View/Components/FilterForm/QuickFilterValues.js +4 -3
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.d.ts +5 -0
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +67 -0
- package/src/View/Components/Popups/GridCellPopup/index.d.ts +1 -0
- package/src/View/Components/Popups/GridCellPopup/index.js +5 -0
- package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
- package/src/View/Components/Selectors/ColumnSelector.js +2 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +5 -4
- package/src/View/Components/Selectors/PermittedValuesSelector.js +25 -3
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
- package/src/View/Dashboard/ModuleToolbarWrapper.js +1 -1
- package/src/View/Dashboard/PinnedDashboard.js +2 -1
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -1
- package/src/View/GridFilter/GridFilterExpressionEditor.js +1 -1
- package/src/View/GridFilter/GridFilterPopup.js +10 -8
- package/src/View/GridFilter/GridFilterViewPanel.js +14 -11
- package/src/View/GridFilter/NamedQuerySelector.js +1 -1
- package/src/View/GridFilter/useGridFilterExpressionEditor.d.ts +3 -0
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +17 -6
- package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +5 -23
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +3 -2
- package/src/View/Layout/Wizard/getGridFilterPreview.d.ts +6 -0
- package/src/View/Layout/Wizard/getGridFilterPreview.js +16 -0
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +4 -4
- package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Notes/NoteEditor.d.ts +8 -0
- package/src/View/Notes/NoteEditor.js +33 -0
- package/src/View/Notes/NotesPopup.d.ts +2 -2
- package/src/View/Notes/NotesPopup.js +78 -55
- package/src/View/PlusMinus/MovePlusMinus.d.ts +7 -0
- package/src/View/PlusMinus/MovePlusMinus.js +27 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +0 -9
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +0 -4
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +2 -8
- package/src/View/Schedule/Wizard/ScheduleWizard.js +0 -8
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +3 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -2
- package/src/agGrid/Adaptable.d.ts +7 -0
- package/src/agGrid/Adaptable.js +49 -35
- package/src/agGrid/BadgeRenderer.js +9 -5
- package/src/agGrid/agGridHelper.d.ts +2 -1
- package/src/agGrid/agGridHelper.js +15 -3
- package/src/agGrid/agGridMenuHelper.d.ts +2 -0
- package/src/agGrid/agGridMenuHelper.js +73 -25
- package/src/components/Datepicker/index.js +4 -4
- package/src/components/ExpressionEditor/ExpressionPreview.d.ts +7 -0
- package/src/components/ExpressionEditor/ExpressionPreview.js +25 -0
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +2 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +6 -0
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +40 -11
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +14 -2
- package/src/components/ExpressionEditor/QueryBuilder/booleanExpressions.js +1 -0
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -1
- package/src/components/ExpressionEditor/index.js +4 -7
- package/src/components/InputGroup/InputGroup.d.ts +7 -0
- package/src/components/InputGroup/InputGroup.js +12 -0
- package/src/components/InputGroup/index.d.ts +1 -0
- package/src/components/InputGroup/index.js +4 -0
- package/src/components/OverlayTrigger/index.js +7 -2
- package/src/components/Select/Select.d.ts +1 -2
- package/src/components/Select/Select.js +63 -23
- package/src/components/Toastify/index.d.ts +2 -2
- package/src/components/Toastify/index.js +1 -1
- package/src/components/icons/comments.d.ts +3 -0
- package/src/components/icons/comments.js +7 -0
- package/src/components/icons/index.js +3 -1
- package/src/env.d.ts +3 -1
- package/src/env.js +3 -1
- package/src/metamodel/adaptable.metamodel.d.ts +72 -158
- package/src/metamodel/adaptable.metamodel.js +128 -260
- package/src/parser/src/parser.d.ts +2 -0
- package/src/parser/src/parser.js +1880 -705
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +5 -2
- package/src/parser/src/predicate/types.d.ts +1 -1
- package/src/parser/src/types.d.ts +1 -1
- package/src/renderReactRoot.js +15 -0
- package/src/themes/index.js +4 -0
- package/src/types.d.ts +10 -13
- package/themes/dark.css +3 -3
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +0 -35
- package/src/AdaptableOptions/Glue42PluginOptions.d.ts +0 -25
- package/src/AdaptableOptions/Glue42WebPluginOptions.d.ts +0 -10
- package/src/Api/Events/SelectionChanged.d.ts +0 -16
- package/src/Api/FinsembleApi.d.ts +0 -10
- package/src/Api/Glue42Api.d.ts +0 -75
- package/src/Api/Glue42WebApi.d.ts +0 -10
- package/src/PredefinedConfig/Glue42State.d.ts +0 -46
- package/src/View/Notes/NotesListing.d.ts +0 -2
- package/src/View/Notes/NotesListing.js +0 -88
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.d.ts +0 -9
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +0 -25
- package/src/bundle-dependencies/bundles/react-toastify/components/CloseButton.d.ts +0 -9
- package/src/bundle-dependencies/bundles/react-toastify/components/Icons.d.ts +0 -24
- package/src/bundle-dependencies/bundles/react-toastify/components/ProgressBar.d.ts +0 -59
- package/src/bundle-dependencies/bundles/react-toastify/components/Toast.d.ts +0 -3
- package/src/bundle-dependencies/bundles/react-toastify/components/ToastContainer.d.ts +0 -3
- package/src/bundle-dependencies/bundles/react-toastify/components/Transitions.d.ts +0 -6
- package/src/bundle-dependencies/bundles/react-toastify/components/index.d.ts +0 -6
- package/src/bundle-dependencies/bundles/react-toastify/core/eventManager.d.ts +0 -39
- package/src/bundle-dependencies/bundles/react-toastify/core/index.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/core/toast.d.ts +0 -41
- package/src/bundle-dependencies/bundles/react-toastify/hooks/index.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToast.d.ts +0 -10
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToastContainer.d.ts +0 -23
- package/src/bundle-dependencies/bundles/react-toastify/index.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/index.js +0 -1
- package/src/bundle-dependencies/bundles/react-toastify/inject-style.d.ts +0 -8
- package/src/bundle-dependencies/bundles/react-toastify/types/index.d.ts +0 -269
- package/src/bundle-dependencies/bundles/react-toastify/utils/collapseToast.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/utils/constant.d.ts +0 -23
- package/src/bundle-dependencies/bundles/react-toastify/utils/cssTransition.d.ts +0 -43
- package/src/bundle-dependencies/bundles/react-toastify/utils/index.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/utils/mapper.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/utils/propValidator.d.ts +0 -9
- /package/src/AdaptableOptions/{FinsemblePluginOptions.js → CommentsOptions.js} +0 -0
- /package/src/AdaptableOptions/{Glue42PluginOptions.js → InteropioPluginOptions.js} +0 -0
- /package/src/{AdaptableOptions/Glue42WebPluginOptions.js → Api/CommentApi.js} +0 -0
- /package/src/Api/Events/{SelectionChanged.js → CalculatedColumnChanged.js} +0 -0
- /package/src/Api/{FinsembleApi.js → Events/CellSelectionChanged.js} +0 -0
- /package/src/Api/{Glue42Api.js → Events/CommentsChangedInfo.js} +0 -0
- /package/src/Api/{Glue42WebApi.js → Events/RowSelectionChanged.js} +0 -0
- /package/src/Api/Internal/{ExpressionnternalApi.d.ts → ExpressionInternalApi.d.ts} +0 -0
- /package/src/Api/Internal/{ExpressionnternalApi.js → ExpressionInternalApi.js} +0 -0
- /package/src/Api/{NotesAPi.js → InteropioPluginApi.js} +0 -0
- /package/src/{PredefinedConfig/Glue42State.js → Api/NotesApi.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
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)});
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CloseButtonProps, IconProps } from '../components';
|
|
3
|
-
declare type Nullable<T> = {
|
|
4
|
-
[P in keyof T]: T[P] | null;
|
|
5
|
-
};
|
|
6
|
-
export declare type TypeOptions = 'info' | 'success' | 'warning' | 'error' | 'default';
|
|
7
|
-
export declare type Theme = 'light' | 'dark' | 'colored';
|
|
8
|
-
export declare type ToastPosition = 'top-right' | 'top-center' | 'top-left' | 'bottom-right' | 'bottom-center' | 'bottom-left';
|
|
9
|
-
export interface ToastContentProps<Data = {}> {
|
|
10
|
-
closeToast?: () => void;
|
|
11
|
-
toastProps: ToastProps;
|
|
12
|
-
data?: Data;
|
|
13
|
-
}
|
|
14
|
-
export declare type ToastContent<T = unknown> = React.ReactNode | ((props: ToastContentProps<T>) => React.ReactNode);
|
|
15
|
-
export declare type Id = number | string;
|
|
16
|
-
export declare type ToastTransition = React.FC<ToastTransitionProps> | React.ComponentClass<ToastTransitionProps>;
|
|
17
|
-
/**
|
|
18
|
-
* ClassName for the elements - can take a function to build a classname or a raw string that is cx'ed to defaults
|
|
19
|
-
*/
|
|
20
|
-
export declare type ToastClassName = ((context?: {
|
|
21
|
-
type?: TypeOptions;
|
|
22
|
-
defaultClassName?: string;
|
|
23
|
-
position?: ToastPosition;
|
|
24
|
-
rtl?: boolean;
|
|
25
|
-
}) => string) | string;
|
|
26
|
-
export interface ClearWaitingQueueParams {
|
|
27
|
-
containerId?: Id;
|
|
28
|
-
}
|
|
29
|
-
export declare type DraggableDirection = 'x' | 'y';
|
|
30
|
-
interface CommonOptions {
|
|
31
|
-
/**
|
|
32
|
-
* Pause the timer when the mouse hover the toast.
|
|
33
|
-
* `Default: true`
|
|
34
|
-
*/
|
|
35
|
-
pauseOnHover?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Pause the toast when the window loses focus.
|
|
38
|
-
* `Default: true`
|
|
39
|
-
*/
|
|
40
|
-
pauseOnFocusLoss?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Remove the toast when clicked.
|
|
43
|
-
* `Default: true`
|
|
44
|
-
*/
|
|
45
|
-
closeOnClick?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Set the delay in ms to close the toast automatically.
|
|
48
|
-
* Use `false` to prevent the toast from closing.
|
|
49
|
-
* `Default: 5000`
|
|
50
|
-
*/
|
|
51
|
-
autoClose?: number | false;
|
|
52
|
-
/**
|
|
53
|
-
* Set the default position to use.
|
|
54
|
-
* `One of: 'top-right', 'top-center', 'top-left', 'bottom-right', 'bottom-center', 'bottom-left'`
|
|
55
|
-
* `Default: 'top-right'`
|
|
56
|
-
*/
|
|
57
|
-
position?: ToastPosition;
|
|
58
|
-
/**
|
|
59
|
-
* Pass a custom close button.
|
|
60
|
-
* To remove the close button pass `false`
|
|
61
|
-
*/
|
|
62
|
-
closeButton?: boolean | ((props: CloseButtonProps) => React.ReactNode) | React.ReactElement<CloseButtonProps>;
|
|
63
|
-
/**
|
|
64
|
-
* An optional css class to set for the progress bar.
|
|
65
|
-
*/
|
|
66
|
-
progressClassName?: ToastClassName;
|
|
67
|
-
/**
|
|
68
|
-
* An optional style to set for the progress bar.
|
|
69
|
-
*/
|
|
70
|
-
progressStyle?: React.CSSProperties;
|
|
71
|
-
/**
|
|
72
|
-
* An optional css class to set for the toast content.
|
|
73
|
-
*/
|
|
74
|
-
bodyClassName?: ToastClassName;
|
|
75
|
-
/**
|
|
76
|
-
* An optional inline style to apply for the toast content.
|
|
77
|
-
*/
|
|
78
|
-
bodyStyle?: React.CSSProperties;
|
|
79
|
-
/**
|
|
80
|
-
* Hide or show the progress bar.
|
|
81
|
-
* `Default: false`
|
|
82
|
-
*/
|
|
83
|
-
hideProgressBar?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Pass a custom transition built with react-transition-group.
|
|
86
|
-
*/
|
|
87
|
-
transition?: ToastTransition;
|
|
88
|
-
/**
|
|
89
|
-
* Allow toast to be draggable
|
|
90
|
-
* `Default: true`
|
|
91
|
-
*/
|
|
92
|
-
draggable?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* The percentage of the toast's width it takes for a drag to dismiss a toast
|
|
95
|
-
* `Default: 80`
|
|
96
|
-
*/
|
|
97
|
-
draggablePercent?: number;
|
|
98
|
-
/**
|
|
99
|
-
* Specify in which direction should you swipe to dismiss the toast
|
|
100
|
-
* `Default: "x"`
|
|
101
|
-
*/
|
|
102
|
-
draggableDirection?: DraggableDirection;
|
|
103
|
-
/**
|
|
104
|
-
* Define the ARIA role for the toast
|
|
105
|
-
* `Default: alert`
|
|
106
|
-
* https://www.w3.org/WAI/PF/aria/roles
|
|
107
|
-
*/
|
|
108
|
-
role?: string;
|
|
109
|
-
/**
|
|
110
|
-
* Set id to handle multiple container
|
|
111
|
-
*/
|
|
112
|
-
containerId?: Id;
|
|
113
|
-
/**
|
|
114
|
-
* Fired when clicking inside toaster
|
|
115
|
-
*/
|
|
116
|
-
onClick?: (event: React.MouseEvent) => void;
|
|
117
|
-
/**
|
|
118
|
-
* Support right to left display.
|
|
119
|
-
* `Default: false`
|
|
120
|
-
*/
|
|
121
|
-
rtl?: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Used to display a custom icon. Set it to `false` to prevent
|
|
124
|
-
* the icons from being displayed
|
|
125
|
-
*/
|
|
126
|
-
icon?: boolean | ((props: IconProps) => React.ReactNode) | React.ReactElement<IconProps> | string | number | React.ReactNode;
|
|
127
|
-
/**
|
|
128
|
-
* Theme to use.
|
|
129
|
-
* `One of: 'light', 'dark', 'colored'`
|
|
130
|
-
* `Default: 'light'`
|
|
131
|
-
*/
|
|
132
|
-
theme?: Theme;
|
|
133
|
-
}
|
|
134
|
-
export interface ToastOptions<Data = {}> extends CommonOptions {
|
|
135
|
-
/**
|
|
136
|
-
* An optional css class to set.
|
|
137
|
-
*/
|
|
138
|
-
className?: ToastClassName;
|
|
139
|
-
/**
|
|
140
|
-
* Called when toast is mounted.
|
|
141
|
-
*/
|
|
142
|
-
onOpen?: <T = {}>(props: T) => void;
|
|
143
|
-
/**
|
|
144
|
-
* Called when toast is unmounted.
|
|
145
|
-
*/
|
|
146
|
-
onClose?: <T = {}>(props: T) => void;
|
|
147
|
-
/**
|
|
148
|
-
* An optional inline style to apply.
|
|
149
|
-
*/
|
|
150
|
-
style?: React.CSSProperties;
|
|
151
|
-
/**
|
|
152
|
-
* Set the toast type.
|
|
153
|
-
* `One of: 'info', 'success', 'warning', 'error', 'default'`
|
|
154
|
-
*/
|
|
155
|
-
type?: TypeOptions;
|
|
156
|
-
/**
|
|
157
|
-
* Set a custom `toastId`
|
|
158
|
-
*/
|
|
159
|
-
toastId?: Id;
|
|
160
|
-
/**
|
|
161
|
-
* Used during update
|
|
162
|
-
*/
|
|
163
|
-
updateId?: Id;
|
|
164
|
-
/**
|
|
165
|
-
* Set the percentage for the controlled progress bar. `Value must be between 0 and 1.`
|
|
166
|
-
*/
|
|
167
|
-
progress?: number | string;
|
|
168
|
-
/**
|
|
169
|
-
* Add a delay in ms before the toast appear.
|
|
170
|
-
*/
|
|
171
|
-
delay?: number;
|
|
172
|
-
isLoading?: boolean;
|
|
173
|
-
data?: Data;
|
|
174
|
-
}
|
|
175
|
-
export interface UpdateOptions<T = unknown> extends Nullable<ToastOptions<T>> {
|
|
176
|
-
/**
|
|
177
|
-
* Used to update a toast.
|
|
178
|
-
* Pass any valid ReactNode(string, number, component)
|
|
179
|
-
*/
|
|
180
|
-
render?: ToastContent<T>;
|
|
181
|
-
}
|
|
182
|
-
export interface ToastContainerProps extends CommonOptions {
|
|
183
|
-
/**
|
|
184
|
-
* An optional css class to set.
|
|
185
|
-
*/
|
|
186
|
-
className?: ToastClassName;
|
|
187
|
-
/**
|
|
188
|
-
* Whether or not to display the newest toast on top.
|
|
189
|
-
* `Default: false`
|
|
190
|
-
*/
|
|
191
|
-
newestOnTop?: boolean;
|
|
192
|
-
/**
|
|
193
|
-
* An optional inline style to apply.
|
|
194
|
-
*/
|
|
195
|
-
style?: React.CSSProperties;
|
|
196
|
-
/**
|
|
197
|
-
* An optional inline style to apply for the toast.
|
|
198
|
-
*/
|
|
199
|
-
toastStyle?: React.CSSProperties;
|
|
200
|
-
/**
|
|
201
|
-
* An optional css class for the toast.
|
|
202
|
-
*/
|
|
203
|
-
toastClassName?: ToastClassName;
|
|
204
|
-
/**
|
|
205
|
-
* Show the toast only if it includes containerId and it's the same as containerId
|
|
206
|
-
* `Default: false`
|
|
207
|
-
*/
|
|
208
|
-
enableMultiContainer?: boolean;
|
|
209
|
-
/**
|
|
210
|
-
* Limit the number of toast displayed at the same time
|
|
211
|
-
*/
|
|
212
|
-
limit?: number;
|
|
213
|
-
}
|
|
214
|
-
export interface ToastTransitionProps {
|
|
215
|
-
isIn: boolean;
|
|
216
|
-
done: () => void;
|
|
217
|
-
position: ToastPosition | string;
|
|
218
|
-
preventExitTransition: boolean;
|
|
219
|
-
nodeRef: React.RefObject<HTMLElement>;
|
|
220
|
-
children?: React.ReactNode;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* @INTERNAL
|
|
224
|
-
*/
|
|
225
|
-
export interface ToastProps extends ToastOptions {
|
|
226
|
-
isIn: boolean;
|
|
227
|
-
staleId?: Id;
|
|
228
|
-
toastId: Id;
|
|
229
|
-
key: Id;
|
|
230
|
-
transition: ToastTransition;
|
|
231
|
-
closeToast: () => void;
|
|
232
|
-
position: ToastPosition;
|
|
233
|
-
children?: ToastContent;
|
|
234
|
-
draggablePercent: number;
|
|
235
|
-
draggableDirection?: DraggableDirection;
|
|
236
|
-
progressClassName?: ToastClassName;
|
|
237
|
-
className?: ToastClassName;
|
|
238
|
-
bodyClassName?: ToastClassName;
|
|
239
|
-
deleteToast: () => void;
|
|
240
|
-
theme: Theme;
|
|
241
|
-
type: TypeOptions;
|
|
242
|
-
iconOut?: React.ReactNode;
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* @INTERNAL
|
|
246
|
-
*/
|
|
247
|
-
export interface NotValidatedToastProps extends Partial<ToastProps> {
|
|
248
|
-
toastId: Id;
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* @INTERNAL
|
|
252
|
-
*/
|
|
253
|
-
export interface Toast {
|
|
254
|
-
content: ToastContent;
|
|
255
|
-
props: ToastProps;
|
|
256
|
-
}
|
|
257
|
-
export declare type ToastItemStatus = 'added' | 'removed' | 'updated';
|
|
258
|
-
export interface ToastItem<Data = {}> {
|
|
259
|
-
content: React.ReactNode;
|
|
260
|
-
id: Id;
|
|
261
|
-
theme?: Theme;
|
|
262
|
-
type?: TypeOptions;
|
|
263
|
-
isLoading?: boolean;
|
|
264
|
-
containerId?: Id;
|
|
265
|
-
data: Data;
|
|
266
|
-
icon?: React.ReactNode | false;
|
|
267
|
-
status: ToastItemStatus;
|
|
268
|
-
}
|
|
269
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ToastPosition, TypeOptions } from '../types';
|
|
2
|
-
declare type KeyOfPosition = 'TOP_LEFT' | 'TOP_RIGHT' | 'TOP_CENTER' | 'BOTTOM_LEFT' | 'BOTTOM_RIGHT' | 'BOTTOM_CENTER';
|
|
3
|
-
declare type KeyOfType = 'INFO' | 'SUCCESS' | 'WARNING' | 'ERROR' | 'DEFAULT';
|
|
4
|
-
export declare const POSITION: {
|
|
5
|
-
[key in KeyOfPosition]: ToastPosition;
|
|
6
|
-
};
|
|
7
|
-
export declare const TYPE: {
|
|
8
|
-
[key in KeyOfType]: TypeOptions;
|
|
9
|
-
};
|
|
10
|
-
export declare const enum Default {
|
|
11
|
-
COLLAPSE_DURATION = 300,
|
|
12
|
-
DEBOUNCE_DURATION = 50,
|
|
13
|
-
CSS_NAMESPACE = "Toastify",
|
|
14
|
-
DRAGGABLE_PERCENT = 80
|
|
15
|
-
}
|
|
16
|
-
export declare const enum Direction {
|
|
17
|
-
X = "x",
|
|
18
|
-
Y = "y"
|
|
19
|
-
}
|
|
20
|
-
export declare const enum SyntheticEvent {
|
|
21
|
-
ENTRANCE_ANIMATION_END = "d"
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ToastTransitionProps } from '../types';
|
|
3
|
-
export interface CSSTransitionProps {
|
|
4
|
-
/**
|
|
5
|
-
* Css class to apply when toast enter
|
|
6
|
-
*/
|
|
7
|
-
enter: string;
|
|
8
|
-
/**
|
|
9
|
-
* Css class to apply when toast leave
|
|
10
|
-
*/
|
|
11
|
-
exit: string;
|
|
12
|
-
/**
|
|
13
|
-
* Append current toast position to the classname.
|
|
14
|
-
* If multiple classes are provided, only the last one will get the position
|
|
15
|
-
* For instance `myclass--top-center`...
|
|
16
|
-
* `Default: false`
|
|
17
|
-
*/
|
|
18
|
-
appendPosition?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Collapse toast smoothly when exit animation end
|
|
21
|
-
* `Default: true`
|
|
22
|
-
*/
|
|
23
|
-
collapse?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Collapse transition duration
|
|
26
|
-
* `Default: 300`
|
|
27
|
-
*/
|
|
28
|
-
collapseDuration?: number;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Css animation that just work.
|
|
32
|
-
* You could use animate.css for instance
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* ```
|
|
36
|
-
* cssTransition({
|
|
37
|
-
* enter: "animate__animated animate__bounceIn",
|
|
38
|
-
* exit: "animate__animated animate__bounceOut"
|
|
39
|
-
* })
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
export declare function cssTransition({ enter, exit, appendPosition, collapse, collapseDuration }: CSSTransitionProps): ({ children, position, preventExitTransition, done, nodeRef, isIn }: ToastTransitionProps) => JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Id } from '../types';
|
|
2
|
-
export declare function isNum(v: any): v is Number;
|
|
3
|
-
export declare function isBool(v: any): v is Boolean;
|
|
4
|
-
export declare function isStr(v: any): v is String;
|
|
5
|
-
export declare function isFn(v: any): v is Function;
|
|
6
|
-
export declare function parseClassName(v: any): any;
|
|
7
|
-
export declare function isToastIdValid(toastId?: Id): true | Id | undefined;
|
|
8
|
-
export declare function getAutoCloseDelay(toastAutoClose?: false | number, containerAutoClose?: false | number): number | false | undefined;
|
|
9
|
-
export declare function canBeRendered<T>(content: T): boolean;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|