@selfcommunity/react-ui 0.11.0-mui7.14 → 0.11.0-mui7.15

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.
Files changed (24) hide show
  1. package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +3 -3
  2. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +0 -2
  3. package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.js +3 -3
  4. package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +3 -3
  5. package/lib/cjs/components/UserPaymentMethods/Skeleton.d.ts +24 -3
  6. package/lib/cjs/components/UserPaymentMethods/Skeleton.js +2 -4
  7. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.d.ts +25 -3
  8. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +2 -2
  9. package/lib/cjs/shared/CustomSnackMessage/index.js +2 -2
  10. package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
  11. package/lib/cjs/shared/Media/File/asUploadButton.js +1 -1
  12. package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +4 -4
  13. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +0 -2
  14. package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.js +4 -4
  15. package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +4 -4
  16. package/lib/esm/components/UserPaymentMethods/Skeleton.d.ts +24 -3
  17. package/lib/esm/components/UserPaymentMethods/Skeleton.js +2 -4
  18. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.d.ts +25 -3
  19. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +3 -3
  20. package/lib/esm/shared/CustomSnackMessage/index.js +2 -2
  21. package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
  22. package/lib/esm/shared/Media/File/asUploadButton.js +3 -3
  23. package/lib/umd/react-ui.js +1 -1
  24. package/package.json +8 -8
@@ -29,9 +29,9 @@ const Root = (0, material_1.styled)(material_1.Dialog, {
29
29
  const Transition = react_1.default.forwardRef(function Transition(props, ref) {
30
30
  return (0, jsx_runtime_1.jsx)(material_1.Slide, Object.assign({ direction: "up", ref: ref }, props));
31
31
  });
32
- const NoTransition = react_1.default.forwardRef(function NoTransition(props) {
33
- return (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [" ", props.children, " "] });
34
- });
32
+ const NoTransition = function NoTransition(props) {
33
+ return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: props.children });
34
+ };
35
35
  function CheckoutReturnDialog(inProps) {
36
36
  // PROPS
37
37
  const props = (0, system_1.useThemeProps)({
@@ -9,7 +9,6 @@ const components_core_1 = require("@livekit/components-core");
9
9
  const components_react_1 = require("@livekit/components-react");
10
10
  const ParticipantTileAvatar_1 = tslib_1.__importDefault(require("./ParticipantTileAvatar"));
11
11
  const ParticipantTileActions_1 = tslib_1.__importDefault(require("./ParticipantTileActions"));
12
- const react_core_1 = require("@selfcommunity/react-core");
13
12
  /**
14
13
  * The `ParticipantContextIfNeeded` component only creates a `ParticipantContext`
15
14
  * if there is no `ParticipantContext` already.
@@ -35,7 +34,6 @@ exports.ParticipantTile =
35
34
  /* @__PURE__ */ React.forwardRef(function ParticipantTile(_a, ref) {
36
35
  var _b, _c;
37
36
  var { trackRef, children, onParticipantClick, disableSpeakingIndicator, disableTileFocusToggle = false, disableTileActions = false } = _a, htmlProps = tslib_1.__rest(_a, ["trackRef", "children", "onParticipantClick", "disableSpeakingIndicator", "disableTileFocusToggle", "disableTileActions"]);
38
- const scUserContext = (0, react_core_1.useSCUser)();
39
37
  const trackReference = (0, components_react_1.useEnsureTrackRef)(trackRef);
40
38
  const { elementProps } = (0, components_react_1.useParticipantTile)({
41
39
  htmlProps,
@@ -20,9 +20,9 @@ const Root = (0, material_1.styled)(BaseDialog_1.default, {
20
20
  const Transition = react_1.default.forwardRef(function Transition(props, ref) {
21
21
  return (0, jsx_runtime_1.jsx)(material_1.Slide, Object.assign({ direction: "up", ref: ref }, props));
22
22
  });
23
- const NoTransition = react_1.default.forwardRef(function NoTransition(props) {
24
- return (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [" ", props.children, " "] });
25
- });
23
+ const NoTransition = function NoTransition(props) {
24
+ return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: props.children });
25
+ };
26
26
  function PaymentDetailDialog(inProps) {
27
27
  // PROPS
28
28
  const props = (0, system_1.useThemeProps)({
@@ -21,9 +21,9 @@ const Root = (0, material_1.styled)(BaseDialog_1.default, {
21
21
  const Transition = react_1.default.forwardRef(function Transition(props, ref) {
22
22
  return (0, jsx_runtime_1.jsx)(material_1.Slide, Object.assign({ direction: "up", ref: ref }, props));
23
23
  });
24
- const NoTransition = react_1.default.forwardRef(function NoTransition(props) {
25
- return (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [" ", props.children, " "] });
26
- });
24
+ const NoTransition = function NoTransition(props) {
25
+ return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: props.children });
26
+ };
27
27
  function PaywallsDialog(inProps) {
28
28
  var _a;
29
29
  // PROPS
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { ForwardRefRenderFunction } from 'react';
2
2
  export interface UserPaymentMethodsSkeletonProps {
3
3
  /**
4
4
  * Overrides or extends the styles applied to the component.
@@ -11,5 +11,26 @@ export interface UserPaymentMethodsSkeletonProps {
11
11
  showBillingAddress?: boolean;
12
12
  }
13
13
  export type UserPaymentMethodsSkeletonRef = {};
14
- declare const _default: React.ForwardRefExoticComponent<UserPaymentMethodsSkeletonProps & React.RefAttributes<UserPaymentMethodsSkeletonRef>>;
15
- export default _default;
14
+ /**
15
+ * > API documentation for the Community-JS User Payment Methods Skeleton component. Learn about the available props and the CSS API.
16
+
17
+ #### Import
18
+
19
+ ```jsx
20
+ import {UserPaymentMethodsSkeleton} from '@selfcommunity/react-ui';
21
+ ```
22
+
23
+ #### Component Name
24
+
25
+ The name `SCUserPaymentMethodsSkeleton-skeleton-root` can be used when providing style overrides in the theme.
26
+
27
+ #### CSS
28
+
29
+ |Rule Name|Global class|Description|
30
+ |---|---|---|
31
+ |root|.SCUserPaymentMethodsSkeleton-skeleton-root|Styles applied to the root element.|
32
+ *
33
+ * @param inProps
34
+ */
35
+ declare const UserPaymentMethodsSkeleton: ForwardRefRenderFunction<UserPaymentMethodsSkeletonRef, UserPaymentMethodsSkeletonProps>;
36
+ export default UserPaymentMethodsSkeleton;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
5
  const material_1 = require("@mui/material");
7
6
  const constants_1 = require("./constants");
8
7
  const system_1 = require("@mui/system");
@@ -35,9 +34,8 @@ const Root = (0, material_1.styled)(material_1.Box, {
35
34
  |root|.SCUserPaymentMethodsSkeleton-skeleton-root|Styles applied to the root element.|
36
35
  *
37
36
  * @param inProps
38
- * @param ref
39
37
  */
40
- const UserPaymentMethodsSkeleton = (inProps, ref) => {
38
+ const UserPaymentMethodsSkeleton = (inProps) => {
41
39
  // PROPS
42
40
  const props = (0, system_1.useThemeProps)({
43
41
  props: inProps,
@@ -46,4 +44,4 @@ const UserPaymentMethodsSkeleton = (inProps, ref) => {
46
44
  const { className = null, showBillingAddress = false } = props, rest = tslib_1.__rest(props, ["className", "showBillingAddress"]);
47
45
  return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 200 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 50 }) })), showBillingAddress && ((0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 150 }) }))), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: 25, height: 25 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", width: 105, height: 35 }) }))] }) })));
48
46
  };
49
- exports.default = (0, react_1.forwardRef)(UserPaymentMethodsSkeleton);
47
+ exports.default = UserPaymentMethodsSkeleton;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { ForwardRefRenderFunction } from 'react';
2
2
  export interface UserPaymentMethodsProps {
3
3
  /**
4
4
  * Overrides or extends the styles applied to the component.
@@ -15,5 +15,27 @@ export interface UserPaymentMethodsProps {
15
15
  [p: string]: any;
16
16
  }
17
17
  export type UserPaymentMethodsRef = {};
18
- declare const _default: React.ForwardRefExoticComponent<Omit<UserPaymentMethodsProps, "ref"> & React.RefAttributes<UserPaymentMethodsRef>>;
19
- export default _default;
18
+ /**
19
+ * > API documentation for the Community-JS User Payment Methods. Learn about the available props and the CSS API.
20
+
21
+ #### Import
22
+
23
+ ```jsx
24
+ import {UserPaymentMethods} from '@selfcommunity/react-ui';
25
+ ```
26
+
27
+ #### Component Name
28
+
29
+ The name `SCUserPaymentMethods` can be used when providing style overrides in the theme.
30
+
31
+
32
+ #### CSS
33
+
34
+ |Rule Name|Global class|Description|
35
+ |---|---|---|
36
+ |root|.SCUserPaymentMethods-root|Styles applied to the root element.|
37
+
38
+ * @param inProps
39
+ */
40
+ declare const UserPaymentMethods: ForwardRefRenderFunction<UserPaymentMethodsRef, UserPaymentMethodsProps>;
41
+ export default UserPaymentMethods;
@@ -47,7 +47,7 @@ const Root = (0, material_1.styled)(material_1.Box, {
47
47
 
48
48
  * @param inProps
49
49
  */
50
- const UserPaymentMethods = (inProps, ref) => {
50
+ const UserPaymentMethods = (inProps) => {
51
51
  // PROPS
52
52
  const props = (0, system_1.useThemeProps)({
53
53
  props: inProps,
@@ -335,4 +335,4 @@ const UserPaymentMethods = (inProps, ref) => {
335
335
  return ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: method.type.toUpperCase() })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: method.type === 'card' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_svg_credit_card_payment_icons_1.PaymentIcon, { type: ((_a = method.card) === null || _a === void 0 ? void 0 : _a.brand) || 'Generic', format: "flatRounded", width: 50 }), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.paymentNumber }, { children: ["**** **** **** ", (_b = method.card) === null || _b === void 0 ? void 0 : _b.last4] }))] })) })), (0, jsx_runtime_1.jsxs)(material_1.TableCell, Object.assign({ scope: "row" }, { children: [(_c = method.card) === null || _c === void 0 ? void 0 : _c.exp_month, "/", (_d = method.card) === null || _d === void 0 ? void 0 : _d.exp_year] })), showBillingAddress && ((0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: method.billing_details.name })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: [(_f = (_e = method.billing_details) === null || _e === void 0 ? void 0 : _e.address) === null || _f === void 0 ? void 0 : _f.line1, (0, jsx_runtime_1.jsx)("br", {}), (_h = (_g = method.billing_details) === null || _g === void 0 ? void 0 : _g.address) === null || _h === void 0 ? void 0 : _h.line2] })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: [(_k = (_j = method.billing_details) === null || _j === void 0 ? void 0 : _j.address) === null || _k === void 0 ? void 0 : _k.postal_code, " - ", (_m = (_l = method.billing_details) === null || _l === void 0 ? void 0 : _l.address) === null || _m === void 0 ? void 0 : _m.city, " -", ' ', (_p = (_o = method.billing_details) === null || _o === void 0 ? void 0 : _o.address) === null || _p === void 0 ? void 0 : _p.country] }))] }), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ "aria-label": "edit", color: "primary", onClick: () => handleOpenEditAddressDialog(method) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "edit" }) }))] })) }))), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: defaultPaymentMethodLoading === method.id ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 20 })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [method.id === defaultPaymentMethodId, (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: method.id === defaultPaymentMethodId, onClick: () => handleSetDefaultPaymentMethodId(method.id) })] })) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: 'contained', onClick: () => handleDelete(method.id) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.btnRemove", defaultMessage: "ui.userPaymentMethods.btnRemove" }) })) }))] }, index));
336
336
  }), hasMore && (0, jsx_runtime_1.jsx)(Skeleton_1.default, {})] })] })) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", mb: 2 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.noPaymentMethods", defaultMessage: "ui.userPaymentMethods.noPaymentMethods" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: 'contained', onClick: handleOpenAddPaymentMethodDialog }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) }))] })), openDeleteDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: openDeleteDialog, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteTitle", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteTitle" }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteDescription", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteDescription" }), onConfirm: handleConfirmDelete, onClose: handleConfirmClose, isUpdating: isDeletingPaymentMethod })), editPaymentMethodDialogOpen && editPaymentMethod !== null && ((0, jsx_runtime_1.jsx)(UserChangeAddressDialog_1.default, { open: true, defaultAddress: editPaymentMethod, handleAddress: handleAddress })), addPaymentMethodDialogOpen && (0, jsx_runtime_1.jsx)(UserAddPaymentMethodDialog_1.default, { open: true, handlePaymentMethod: handlePaymentMethodSuccess })] })) })));
337
337
  };
338
- exports.default = (0, react_1.forwardRef)(UserPaymentMethods);
338
+ exports.default = UserPaymentMethods;
@@ -16,8 +16,8 @@ const classes = {
16
16
  const Root = (0, material_1.styled)(notistack_1.SnackbarContent, {
17
17
  name: PREFIX,
18
18
  slot: 'Root',
19
- overridesResolver: (props, styles) => styles.root
20
- })(({ theme }) => ({}));
19
+ overridesResolver: (_props, styles) => styles.root
20
+ })(() => ({}));
21
21
  /**
22
22
  * Custom Snackbar for notistack messages
23
23
  * Use this component:
@@ -1,4 +1,4 @@
1
- import type { ComponentType } from "react";
1
+ import type { ComponentType } from 'react';
2
2
  type FileInputProps = {
3
3
  capture?: string;
4
4
  accept: string;
@@ -23,7 +23,7 @@ const asUploadButton = (Component, InputProps) => {
23
23
  showFileUpload(uploadOptionsRef.current);
24
24
  onClick === null || onClick === void 0 ? void 0 : onClick(e);
25
25
  }, [getInternalFileInput, showFileUpload, uploadOptionsRef, onClick]);
26
- return (0, jsx_runtime_1.jsx)(Component, Object.assign({ ref: ref, onClick: onButtonClick, id: id, className: className, children: children || text || "Upload" }, extraProps));
26
+ return (0, jsx_runtime_1.jsx)(Component, Object.assign({ ref: ref, onClick: onButtonClick, id: id, className: className, children: children || text || 'Upload' }, extraProps));
27
27
  };
28
28
  (0, shared_ui_1.markAsUploadOptionsComponent)(AsUploadButton);
29
29
  return (0, react_1.forwardRef)(AsUploadButton);
@@ -1,5 +1,5 @@
1
1
  import { __rest } from "tslib";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
4
4
  import { Button, CircularProgress, Dialog, DialogContent, DialogTitle, Slide, Stack, styled, Typography } from '@mui/material';
5
5
  import { useThemeProps } from '@mui/system';
@@ -27,9 +27,9 @@ const Root = styled(Dialog, {
27
27
  const Transition = React.forwardRef(function Transition(props, ref) {
28
28
  return _jsx(Slide, Object.assign({ direction: "up", ref: ref }, props));
29
29
  });
30
- const NoTransition = React.forwardRef(function NoTransition(props) {
31
- return _jsxs(React.Fragment, { children: [" ", props.children, " "] });
32
- });
30
+ const NoTransition = function NoTransition(props) {
31
+ return _jsx(React.Fragment, { children: props.children });
32
+ };
33
33
  export default function CheckoutReturnDialog(inProps) {
34
34
  // PROPS
35
35
  const props = useThemeProps({
@@ -6,7 +6,6 @@ import { isTrackReference, isTrackReferencePinned } from '@livekit/components-co
6
6
  import { AudioTrack, ConnectionQualityIndicator, FocusToggle, LockLockedIcon, ParticipantContext, ParticipantName, ScreenShareIcon, TrackMutedIndicator, TrackRefContext, useEnsureTrackRef, useFeatureContext, useIsEncrypted, useMaybeLayoutContext, useMaybeParticipantContext, useMaybeTrackRefContext, useParticipantTile, VideoTrack } from '@livekit/components-react';
7
7
  import ParticipantTileAvatar from './ParticipantTileAvatar';
8
8
  import ParticipantTileActions from './ParticipantTileActions';
9
- import { useSCUser } from '@selfcommunity/react-core';
10
9
  /**
11
10
  * The `ParticipantContextIfNeeded` component only creates a `ParticipantContext`
12
11
  * if there is no `ParticipantContext` already.
@@ -30,7 +29,6 @@ export const ParticipantTile =
30
29
  /* @__PURE__ */ React.forwardRef(function ParticipantTile(_a, ref) {
31
30
  var _b, _c;
32
31
  var { trackRef, children, onParticipantClick, disableSpeakingIndicator, disableTileFocusToggle = false, disableTileActions = false } = _a, htmlProps = __rest(_a, ["trackRef", "children", "onParticipantClick", "disableSpeakingIndicator", "disableTileFocusToggle", "disableTileActions"]);
33
- const scUserContext = useSCUser();
34
32
  const trackReference = useEnsureTrackRef(trackRef);
35
33
  const { elementProps } = useParticipantTile({
36
34
  htmlProps,
@@ -1,5 +1,5 @@
1
1
  import { __rest } from "tslib";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import React from 'react';
4
4
  import { Slide, styled } from '@mui/material';
5
5
  import { useThemeProps } from '@mui/system';
@@ -18,9 +18,9 @@ const Root = styled(BaseDialog, {
18
18
  const Transition = React.forwardRef(function Transition(props, ref) {
19
19
  return _jsx(Slide, Object.assign({ direction: "up", ref: ref }, props));
20
20
  });
21
- const NoTransition = React.forwardRef(function NoTransition(props) {
22
- return _jsxs(React.Fragment, { children: [" ", props.children, " "] });
23
- });
21
+ const NoTransition = function NoTransition(props) {
22
+ return _jsx(React.Fragment, { children: props.children });
23
+ };
24
24
  export default function PaymentDetailDialog(inProps) {
25
25
  // PROPS
26
26
  const props = useThemeProps({
@@ -1,5 +1,5 @@
1
1
  import { __rest } from "tslib";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import React from 'react';
4
4
  import { Slide, styled } from '@mui/material';
5
5
  import { useThemeProps } from '@mui/system';
@@ -19,9 +19,9 @@ const Root = styled(BaseDialog, {
19
19
  const Transition = React.forwardRef(function Transition(props, ref) {
20
20
  return _jsx(Slide, Object.assign({ direction: "up", ref: ref }, props));
21
21
  });
22
- const NoTransition = React.forwardRef(function NoTransition(props) {
23
- return _jsxs(React.Fragment, { children: [" ", props.children, " "] });
24
- });
22
+ const NoTransition = function NoTransition(props) {
23
+ return _jsx(React.Fragment, { children: props.children });
24
+ };
25
25
  export default function PaywallsDialog(inProps) {
26
26
  var _a;
27
27
  // PROPS
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { ForwardRefRenderFunction } from 'react';
2
2
  export interface UserPaymentMethodsSkeletonProps {
3
3
  /**
4
4
  * Overrides or extends the styles applied to the component.
@@ -11,5 +11,26 @@ export interface UserPaymentMethodsSkeletonProps {
11
11
  showBillingAddress?: boolean;
12
12
  }
13
13
  export type UserPaymentMethodsSkeletonRef = {};
14
- declare const _default: React.ForwardRefExoticComponent<UserPaymentMethodsSkeletonProps & React.RefAttributes<UserPaymentMethodsSkeletonRef>>;
15
- export default _default;
14
+ /**
15
+ * > API documentation for the Community-JS User Payment Methods Skeleton component. Learn about the available props and the CSS API.
16
+
17
+ #### Import
18
+
19
+ ```jsx
20
+ import {UserPaymentMethodsSkeleton} from '@selfcommunity/react-ui';
21
+ ```
22
+
23
+ #### Component Name
24
+
25
+ The name `SCUserPaymentMethodsSkeleton-skeleton-root` can be used when providing style overrides in the theme.
26
+
27
+ #### CSS
28
+
29
+ |Rule Name|Global class|Description|
30
+ |---|---|---|
31
+ |root|.SCUserPaymentMethodsSkeleton-skeleton-root|Styles applied to the root element.|
32
+ *
33
+ * @param inProps
34
+ */
35
+ declare const UserPaymentMethodsSkeleton: ForwardRefRenderFunction<UserPaymentMethodsSkeletonRef, UserPaymentMethodsSkeletonProps>;
36
+ export default UserPaymentMethodsSkeleton;
@@ -1,6 +1,5 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { forwardRef } from 'react';
4
3
  import { Box, TableCell, TableRow, Skeleton, styled } from '@mui/material';
5
4
  import { PREFIX } from './constants';
6
5
  import { useThemeProps } from '@mui/system';
@@ -33,9 +32,8 @@ const Root = styled(Box, {
33
32
  |root|.SCUserPaymentMethodsSkeleton-skeleton-root|Styles applied to the root element.|
34
33
  *
35
34
  * @param inProps
36
- * @param ref
37
35
  */
38
- const UserPaymentMethodsSkeleton = (inProps, ref) => {
36
+ const UserPaymentMethodsSkeleton = (inProps) => {
39
37
  // PROPS
40
38
  const props = useThemeProps({
41
39
  props: inProps,
@@ -44,4 +42,4 @@ const UserPaymentMethodsSkeleton = (inProps, ref) => {
44
42
  const { className = null, showBillingAddress = false } = props, rest = __rest(props, ["className", "showBillingAddress"]);
45
43
  return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsxs(TableRow, { children: [_jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 40 }) })), _jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 40, width: 200 }) })), _jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 40, width: 50 }) })), showBillingAddress && (_jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 40, width: 150 }) }))), _jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "rectangular", width: 25, height: 25 }) })), _jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "rounded", width: 105, height: 35 }) }))] }) })));
46
44
  };
47
- export default forwardRef(UserPaymentMethodsSkeleton);
45
+ export default UserPaymentMethodsSkeleton;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { ForwardRefRenderFunction } from 'react';
2
2
  export interface UserPaymentMethodsProps {
3
3
  /**
4
4
  * Overrides or extends the styles applied to the component.
@@ -15,5 +15,27 @@ export interface UserPaymentMethodsProps {
15
15
  [p: string]: any;
16
16
  }
17
17
  export type UserPaymentMethodsRef = {};
18
- declare const _default: React.ForwardRefExoticComponent<Omit<UserPaymentMethodsProps, "ref"> & React.RefAttributes<UserPaymentMethodsRef>>;
19
- export default _default;
18
+ /**
19
+ * > API documentation for the Community-JS User Payment Methods. Learn about the available props and the CSS API.
20
+
21
+ #### Import
22
+
23
+ ```jsx
24
+ import {UserPaymentMethods} from '@selfcommunity/react-ui';
25
+ ```
26
+
27
+ #### Component Name
28
+
29
+ The name `SCUserPaymentMethods` can be used when providing style overrides in the theme.
30
+
31
+
32
+ #### CSS
33
+
34
+ |Rule Name|Global class|Description|
35
+ |---|---|---|
36
+ |root|.SCUserPaymentMethods-root|Styles applied to the root element.|
37
+
38
+ * @param inProps
39
+ */
40
+ declare const UserPaymentMethods: ForwardRefRenderFunction<UserPaymentMethodsRef, UserPaymentMethodsProps>;
41
+ export default UserPaymentMethods;
@@ -1,6 +1,6 @@
1
1
  import { __awaiter, __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';
3
+ import { useCallback, useEffect, useMemo, useState } from 'react';
4
4
  import { Box, Button, Checkbox, CircularProgress, Icon, IconButton, Paper, Stack, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Typography, styled } from '@mui/material';
5
5
  import { PaymentIcon } from 'react-svg-credit-card-payment-icons';
6
6
  import { useSCPaymentsEnabled, useSCUser } from '@selfcommunity/react-core';
@@ -45,7 +45,7 @@ const Root = styled(Box, {
45
45
 
46
46
  * @param inProps
47
47
  */
48
- const UserPaymentMethods = (inProps, ref) => {
48
+ const UserPaymentMethods = (inProps) => {
49
49
  // PROPS
50
50
  const props = useThemeProps({
51
51
  props: inProps,
@@ -333,4 +333,4 @@ const UserPaymentMethods = (inProps, ref) => {
333
333
  return (_jsxs(TableRow, { children: [_jsx(TableCell, Object.assign({ scope: "row" }, { children: method.type.toUpperCase() })), _jsx(TableCell, Object.assign({ scope: "row" }, { children: method.type === 'card' && (_jsxs(_Fragment, { children: [_jsx(PaymentIcon, { type: ((_a = method.card) === null || _a === void 0 ? void 0 : _a.brand) || 'Generic', format: "flatRounded", width: 50 }), _jsxs(Typography, Object.assign({ className: classes.paymentNumber }, { children: ["**** **** **** ", (_b = method.card) === null || _b === void 0 ? void 0 : _b.last4] }))] })) })), _jsxs(TableCell, Object.assign({ scope: "row" }, { children: [(_c = method.card) === null || _c === void 0 ? void 0 : _c.exp_month, "/", (_d = method.card) === null || _d === void 0 ? void 0 : _d.exp_year] })), showBillingAddress && (_jsx(TableCell, Object.assign({ scope: "row" }, { children: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [_jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: 'body1' }, { children: method.billing_details.name })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [(_f = (_e = method.billing_details) === null || _e === void 0 ? void 0 : _e.address) === null || _f === void 0 ? void 0 : _f.line1, _jsx("br", {}), (_h = (_g = method.billing_details) === null || _g === void 0 ? void 0 : _g.address) === null || _h === void 0 ? void 0 : _h.line2] })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [(_k = (_j = method.billing_details) === null || _j === void 0 ? void 0 : _j.address) === null || _k === void 0 ? void 0 : _k.postal_code, " - ", (_m = (_l = method.billing_details) === null || _l === void 0 ? void 0 : _l.address) === null || _m === void 0 ? void 0 : _m.city, " -", ' ', (_p = (_o = method.billing_details) === null || _o === void 0 ? void 0 : _o.address) === null || _p === void 0 ? void 0 : _p.country] }))] }), _jsx(IconButton, Object.assign({ "aria-label": "edit", color: "primary", onClick: () => handleOpenEditAddressDialog(method) }, { children: _jsx(Icon, { children: "edit" }) }))] })) }))), _jsx(TableCell, Object.assign({ scope: "row" }, { children: defaultPaymentMethodLoading === method.id ? (_jsx(CircularProgress, { size: 20 })) : (_jsxs(_Fragment, { children: [method.id === defaultPaymentMethodId, _jsx(Checkbox, { checked: method.id === defaultPaymentMethodId, onClick: () => handleSetDefaultPaymentMethodId(method.id) })] })) })), _jsx(TableCell, Object.assign({ scope: "row" }, { children: _jsx(Button, Object.assign({ variant: 'contained', onClick: () => handleDelete(method.id) }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.btnRemove", defaultMessage: "ui.userPaymentMethods.btnRemove" }) })) }))] }, index));
334
334
  }), hasMore && _jsx(UserPaymentMethodsSkeleton, {})] })] })) }))) : (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body2", mb: 2 }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.noPaymentMethods", defaultMessage: "ui.userPaymentMethods.noPaymentMethods" }) })), _jsx(Button, Object.assign({ size: "small", variant: 'contained', onClick: handleOpenAddPaymentMethodDialog }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) }))] })), openDeleteDialog && (_jsx(ConfirmDialog, { open: openDeleteDialog, title: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteTitle", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteTitle" }), btnConfirm: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteDescription", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteDescription" }), onConfirm: handleConfirmDelete, onClose: handleConfirmClose, isUpdating: isDeletingPaymentMethod })), editPaymentMethodDialogOpen && editPaymentMethod !== null && (_jsx(UserChangeAddressDialog, { open: true, defaultAddress: editPaymentMethod, handleAddress: handleAddress })), addPaymentMethodDialogOpen && _jsx(UserAddPaymentMethodDialog, { open: true, handlePaymentMethod: handlePaymentMethodSuccess })] })) })));
335
335
  };
336
- export default forwardRef(UserPaymentMethods);
336
+ export default UserPaymentMethods;
@@ -13,8 +13,8 @@ const classes = {
13
13
  const Root = styled(SnackbarContent, {
14
14
  name: PREFIX,
15
15
  slot: 'Root',
16
- overridesResolver: (props, styles) => styles.root
17
- })(({ theme }) => ({}));
16
+ overridesResolver: (_props, styles) => styles.root
17
+ })(() => ({}));
18
18
  /**
19
19
  * Custom Snackbar for notistack messages
20
20
  * Use this component:
@@ -1,4 +1,4 @@
1
- import type { ComponentType } from "react";
1
+ import type { ComponentType } from 'react';
2
2
  type FileInputProps = {
3
3
  capture?: string;
4
4
  accept: string;
@@ -1,7 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { forwardRef, useCallback, useRef } from "react";
4
- import { markAsUploadOptionsComponent, useUploadyContext } from "@rpldy/shared-ui";
3
+ import { forwardRef, useCallback, useRef } from 'react';
4
+ import { markAsUploadOptionsComponent, useUploadyContext } from '@rpldy/shared-ui';
5
5
  const asUploadButton = (Component, InputProps) => {
6
6
  const AsUploadButton = (props, ref) => {
7
7
  const { showFileUpload, getInternalFileInput } = useUploadyContext();
@@ -21,7 +21,7 @@ const asUploadButton = (Component, InputProps) => {
21
21
  showFileUpload(uploadOptionsRef.current);
22
22
  onClick === null || onClick === void 0 ? void 0 : onClick(e);
23
23
  }, [getInternalFileInput, showFileUpload, uploadOptionsRef, onClick]);
24
- return _jsx(Component, Object.assign({ ref: ref, onClick: onButtonClick, id: id, className: className, children: children || text || "Upload" }, extraProps));
24
+ return _jsx(Component, Object.assign({ ref: ref, onClick: onButtonClick, id: id, className: className, children: children || text || 'Upload' }, extraProps));
25
25
  };
26
26
  markAsUploadOptionsComponent(AsUploadButton);
27
27
  return forwardRef(AsUploadButton);