From 69767b0b750b2439f3f6020419cdf5a1f2fab749 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 3 Nov 2022 19:36:14 -0500 Subject: [PATCH] Don't check react-notification into the repo --- app/soapbox/actions/alerts.ts | 2 +- .../ui/containers/notifications_container.tsx | 2 +- .../react-notification/defaultPropTypes.js | Bin 725 -> 0 bytes app/soapbox/react-notification/index.d.ts | 88 ------------------ app/soapbox/react-notification/index.js | Bin 126 -> 0 bytes .../react-notification/notification.js | Bin 4864 -> 0 bytes .../react-notification/notificationStack.js | Bin 2864 -> 0 bytes .../react-notification/stackedNotification.js | Bin 1644 -> 0 bytes package.json | 1 + yarn.lock | 7 ++ 10 files changed, 10 insertions(+), 90 deletions(-) delete mode 100644 app/soapbox/react-notification/defaultPropTypes.js delete mode 100644 app/soapbox/react-notification/index.d.ts delete mode 100644 app/soapbox/react-notification/index.js delete mode 100644 app/soapbox/react-notification/notification.js delete mode 100644 app/soapbox/react-notification/notificationStack.js delete mode 100644 app/soapbox/react-notification/stackedNotification.js diff --git a/app/soapbox/actions/alerts.ts b/app/soapbox/actions/alerts.ts index 3e5aed4b32..8f200563a3 100644 --- a/app/soapbox/actions/alerts.ts +++ b/app/soapbox/actions/alerts.ts @@ -5,7 +5,7 @@ import { httpErrorMessages } from 'soapbox/utils/errors'; import type { SnackbarActionSeverity } from './snackbar'; import type { AnyAction } from '@reduxjs/toolkit'; import type { AxiosError } from 'axios'; -import type { NotificationObject } from 'soapbox/react-notification'; +import type { NotificationObject } from 'react-notification'; const messages = defineMessages({ unexpectedTitle: { id: 'alert.unexpected.title', defaultMessage: 'Oops!' }, diff --git a/app/soapbox/features/ui/containers/notifications_container.tsx b/app/soapbox/features/ui/containers/notifications_container.tsx index 79d8724c13..2119228bf8 100644 --- a/app/soapbox/features/ui/containers/notifications_container.tsx +++ b/app/soapbox/features/ui/containers/notifications_container.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { useIntl, MessageDescriptor } from 'react-intl'; +import { NotificationStack, NotificationObject, StyleFactoryFn } from 'react-notification'; import { useHistory } from 'react-router-dom'; import { dismissAlert } from 'soapbox/actions/alerts'; import { Button } from 'soapbox/components/ui'; import { useAppSelector, useAppDispatch } from 'soapbox/hooks'; -import { NotificationStack, NotificationObject, StyleFactoryFn } from 'soapbox/react-notification'; import type { Alert } from 'soapbox/reducers/alerts'; diff --git a/app/soapbox/react-notification/defaultPropTypes.js b/app/soapbox/react-notification/defaultPropTypes.js deleted file mode 100644 index 1a3dd9d4e8faf2fffa255d31482d26465a5a2174..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 725 zcma)3y-ve05Z?0?-U<@*0q9i93<%gz2gf;AM{Qs5T~Mp4?@pa4iWAX@#ggwke}6__ zQxx?Yss1?Dz{*DQYEfVA_mT#SRZ+m9U8=z9#)&!=N_k+`J9rpgE-Ao^O(Zv;mj#s} zED^)*ZZZW29)hIt_I8Q<2Hy=vsM0_iK??t4FNxfg`)|cS6?Agxq_A;l_PK~{f=Lj| z(T%e88lA8ADNN-Tm^O)^IGDjp9cR!){{xS+I~B4==Cu`wx%cb!_vZ6235_oy=4Cu} tyg6lGhjE(uS^H5XL&crz&HNJbx(%1}_r}`Na^QNFL3NZS``GiU_yyeG^pgMp diff --git a/app/soapbox/react-notification/index.d.ts b/app/soapbox/react-notification/index.d.ts deleted file mode 100644 index 22f0211c8a..0000000000 --- a/app/soapbox/react-notification/index.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -declare module 'soapbox/react-notification' { - import { Component, ReactElement } from 'react'; - - interface StyleFactoryFn { - (index: number, style: object | void, notification: NotificationProps): object; - } - - interface OnClickNotificationProps { - /** - * Callback function to run when the action is clicked. - * @param notification Notification currently being clicked - * @param deactivate Function that can be called to set the notification to inactive. - * Used to activate notification exit animation on click. - */ - onClick?(notification: NotificationProps, deactivate: () => void): void; - } - - interface NotificationProps extends OnClickNotificationProps { - /** The name of the action, e.g., "close" or "undo". */ - action?: string; - /** Custom action styles. */ - actionStyle?: object; - /** Custom snackbar styles when the bar is active. */ - activeBarStyle?: object; - /** - * Custom class to apply to the top-level component when active. - * @default 'notification-bar-active' - */ - activeClassName?: string; - /** Custom snackbar styles. */ - barStyle?: object; - /** Custom class to apply to the top-level component. */ - className?: string; - /** - * Timeout for onDismiss event. - * @default 2000 - */ - dismissAfter?: boolean | number; - /** - * If true, the notification is visible. - * @default false - */ - isActive?: boolean; - /** The message or component for the notification. */ - message: string | ReactElement; - /** Setting this prop to `false` will disable all inline styles. */ - style?: boolean; - /** The title for the notification. */ - title?: string | ReactElement; - /** Custom title styles. */ - titleStyle?: object; - - /** - * Callback function to run when dismissAfter timer runs out - * @param notification Notification currently being dismissed. - */ - onDismiss?(notification: NotificationProps): void; - } - - interface NotificationStackProps extends OnClickNotificationProps { - /** Create the style of the actions. */ - actionStyleFactory?: StyleFactoryFn; - /** Create the style of the active notification. */ - activeBarStyleFactory?: StyleFactoryFn; - /** Create the style of the notification. */ - barStyleFactory?: StyleFactoryFn; - /** - * If false, notification dismiss timers start immediately. - * @default true - */ - dismissInOrder?: boolean; - /** Array of notifications to render. */ - notifications: NotificationObject[]; - /** - * Callback function to run when dismissAfter timer runs out - * @param notification Notification currently being dismissed. - */ - onDismiss?(notification: NotificationObject): void; - } - - export interface NotificationObject extends NotificationProps { - key: number | string; - } - - export class Notification extends Component {} - - export class NotificationStack extends Component {} -} diff --git a/app/soapbox/react-notification/index.js b/app/soapbox/react-notification/index.js deleted file mode 100644 index 3d7da7ceeb9da6df6524ce5b9b058b926b2e2ff2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 126 zcmYeTD9A4=QK(i(Nli;E%_&hxELQN#FUd^HOinDx%+FJ(RY)t!&s9*@)6YW^R=4I# SC7?67Br!P~hjy?W&lBv0T6fyJOn*HghG@?lnXF?RY5K^n-x5VtEDJ7TuF67YqEs8%9-IB4#x-M zL*SasMoyiCVpU0H;FPn>3}Fp#BnnDi8rZ;G$rbbzE%jb_&799!U6{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`NtnEQVZ4#yT&+Bv;l!q?~R8+ZjlA zJcoAw0K-t+8noSI*`cw$NHDRFu}&23s>YP!#YF zQx#62Z!0^{xQgA{@o8}1+WK$!4NUFKMtI4zFv7kdrE%-`%e@1yc@WI zl_R+`6rF=mfiPU;?;tX=d=z~g6cu5(@q`J!mJ(~C)t^$V@4}Kv^@ipJZOFK|7gfXL z!0@mrot|=l$vZMuJQO?X_?@cnwno`@r<5C_^{XH#iF@IQ zDZ-ZZ7a7&yFeTn)fx~i@(WIR|6a0gqP%<WTHGX; zmG6(71jAFJ^h0Ng{s&6{{T=cWP>-wIow%E7}y`Z^K;J zPyF9T7+w*$?~D{kPM_d>D~wU3BKW<8@q;H1jO>6VIn88(#tZhTWIp~@dNirOhCY_u zh`v5vJ~8j4dz@!y8lKSoB3%0ALew}ZOPGZF{6JA3`;aSo++t-GOmgFB_7-&WX(VEw QW&FE;!$yZrUm_RTPYmO_fdBvi diff --git a/app/soapbox/react-notification/stackedNotification.js b/app/soapbox/react-notification/stackedNotification.js deleted file mode 100644 index c8d7200d49d9a20a235cc3adeb18b48e2c7aec78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1644 zcmbtUO>f&U487-9aF-?yGP}cW>s+jBuN#K0#m=rwFG6g|km$BUkpDhPmSQ;#c3BQV z!jH$tCz8b)TB%5?-$2;)P)l1qwOGT;R<;N)+U%T9D;WB^BDAnB7R4ISy0rHp+!AkT$EH$=D2>8Nd!bMib*Y6K$o< zEwK<#hA04OZv@F_`~*$aTJ(X3G+|q*y2aa8iXEqUjKq{bNmZ|$HM`>6gR3N>cz3e? zrUyl82qxXNdliZF`RbnU{M}yHc#S{}q|b1}5VS4&IePmNTV}#An2g=rbVC%Sm`D zqht4|x|x!q#mdZNo5>om-bMu>Lgpkz)NCeHVDEZQ?ND;Zep)gxNP|&l)c@c2O{S3_ zI4wVsF4nBo8oo4x;+f*DN(OWE)M$l~y?1`)Nrl?2v3zzrFx##p1nId$_`x56jRP(C zE2(pwZKsld<#7zO8dv7x0*DWUZpPJ_JDrfrSb7;}4T7p?GXAk4r<)9i>~x|G9}qqY zvCjB*u;PZ?=W{AZumSAzJfGTf!#RFJf92jg6G76DyKxiCJ=ZL+-)wpmBZO_>