@selfcommunity/react-ui 0.7.50-alpha.1 → 0.7.50-event.28
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/lib/cjs/assets/logo.d.ts +2 -0
- package/lib/cjs/assets/logo.js +3 -0
- package/lib/cjs/components/Category/Category.d.ts +1 -1
- package/lib/cjs/components/Category/Category.js +1 -1
- package/lib/cjs/components/ChangeCover/ChangeCover.js +3 -3
- package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +1 -1
- package/lib/cjs/components/Composer/Composer.js +9 -7
- package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.d.ts +1 -1
- package/lib/cjs/components/Composer/Layer/CategoryLayer/CategoryLayer.d.ts +1 -1
- package/lib/cjs/components/Composer/Layer/CloseLayer/CloseLayer.d.ts +1 -1
- package/lib/cjs/components/Composer/Layer/LocationLayer/LocationLayer.d.ts +1 -1
- package/lib/cjs/components/ComposerIconButton/ComposerIconButton.d.ts +1 -1
- package/lib/cjs/components/CreateEventButton/CreateEventButton.d.ts +38 -0
- package/lib/cjs/components/CreateEventButton/CreateEventButton.js +79 -0
- package/lib/cjs/components/CreateEventButton/index.d.ts +3 -0
- package/lib/cjs/components/CreateEventButton/index.js +5 -0
- package/lib/cjs/components/CreateGroupButton/CreateGroupButton.js +1 -1
- package/lib/cjs/components/Event/Event.d.ts +57 -0
- package/lib/cjs/components/Event/Event.js +90 -0
- package/lib/cjs/components/Event/Skeleton.d.ts +22 -0
- package/lib/cjs/components/Event/Skeleton.js +44 -0
- package/lib/cjs/components/Event/constants.d.ts +1 -0
- package/lib/cjs/components/Event/constants.js +4 -0
- package/lib/cjs/components/Event/index.d.ts +4 -0
- package/lib/cjs/components/Event/index.js +8 -0
- package/lib/cjs/components/EventForm/EventAddress.d.ts +12 -0
- package/lib/cjs/components/EventForm/EventAddress.js +129 -0
- package/lib/cjs/components/EventForm/EventForm.d.ts +59 -0
- package/lib/cjs/components/EventForm/EventForm.js +323 -0
- package/lib/cjs/components/EventForm/UploadEventCover.d.ts +40 -0
- package/lib/cjs/components/EventForm/UploadEventCover.js +98 -0
- package/lib/cjs/components/EventForm/constants.d.ts +1 -0
- package/lib/cjs/components/EventForm/constants.js +4 -0
- package/lib/cjs/components/EventForm/index.d.ts +3 -0
- package/lib/cjs/components/EventForm/index.js +5 -0
- package/lib/cjs/components/EventLocationWidget/EventLocationWidget.d.ts +55 -0
- package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +103 -0
- package/lib/cjs/components/EventLocationWidget/Skeleton.d.ts +22 -0
- package/lib/cjs/components/EventLocationWidget/Skeleton.js +47 -0
- package/lib/cjs/components/EventLocationWidget/constants.d.ts +1 -0
- package/lib/cjs/components/EventLocationWidget/constants.js +4 -0
- package/lib/cjs/components/EventLocationWidget/index.d.ts +4 -0
- package/lib/cjs/components/EventLocationWidget/index.js +8 -0
- package/lib/cjs/components/Feed/Feed.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js +5 -5
- package/lib/cjs/components/GroupForm/GroupForm.js +2 -2
- package/lib/cjs/components/GroupHeader/GroupHeader.js +3 -3
- package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +1 -1
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +3 -3
- package/lib/cjs/components/GroupInvitedWidget/GroupInvitedWidget.js +1 -1
- package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +1 -1
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +1 -1
- package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.d.ts +3 -2
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.js +19 -3
- package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +3 -1
- package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.js +22 -3
- package/lib/cjs/components/NavigationMenuIconButton/index.d.ts +2 -1
- package/lib/cjs/components/NavigationMenuIconButton/index.js +3 -1
- package/lib/cjs/components/Notification/Notification.js +1 -1
- package/lib/cjs/components/PlatformWidget/PlatformWidget.d.ts +24 -2
- package/lib/cjs/components/PlatformWidget/PlatformWidget.js +256 -18
- package/lib/cjs/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/cjs/components/PlatformWidget/constants.js +5 -1
- package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +1 -1
- package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +6 -6
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
- package/lib/cjs/constants/Event.d.ts +2 -0
- package/lib/cjs/constants/Event.js +5 -0
- package/lib/cjs/constants/PubSub.d.ts +1 -1
- package/lib/cjs/constants/PubSub.js +10 -10
- package/lib/cjs/index.d.ts +12 -4
- package/lib/cjs/index.js +21 -5
- package/lib/cjs/shared/BaseDialog/BaseDialog.js +3 -2
- package/lib/cjs/shared/EmojiPicker/EmojiPicker.js +4 -2
- package/lib/cjs/shared/Media/File/PreviewComponent.d.ts +1 -1
- package/lib/cjs/shared/Media/Link/LayerComponent.d.ts +1 -1
- package/lib/cjs/shared/Media/Link/PreviewComponent.d.ts +1 -1
- package/lib/cjs/shared/MetadataField/index.d.ts +2 -1
- package/lib/cjs/types/index.d.ts +2 -1
- package/lib/cjs/types/platformWidget.d.ts +15 -0
- package/lib/cjs/types/platformWidget.js +2 -0
- package/lib/cjs/utils/string.d.ts +1 -0
- package/lib/cjs/utils/string.js +9 -1
- package/lib/esm/assets/logo.d.ts +2 -0
- package/lib/esm/assets/logo.js +1 -0
- package/lib/esm/components/Category/Category.d.ts +1 -1
- package/lib/esm/components/Category/Category.js +1 -1
- package/lib/esm/components/ChangeCover/ChangeCover.js +3 -3
- package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +1 -1
- package/lib/esm/components/Composer/Composer.js +9 -7
- package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.d.ts +1 -1
- package/lib/esm/components/Composer/Layer/CategoryLayer/CategoryLayer.d.ts +1 -1
- package/lib/esm/components/Composer/Layer/CloseLayer/CloseLayer.d.ts +1 -1
- package/lib/esm/components/Composer/Layer/LocationLayer/LocationLayer.d.ts +1 -1
- package/lib/esm/components/ComposerIconButton/ComposerIconButton.d.ts +1 -1
- package/lib/esm/components/CreateEventButton/CreateEventButton.d.ts +38 -0
- package/lib/esm/components/CreateEventButton/CreateEventButton.js +76 -0
- package/lib/esm/components/CreateEventButton/index.d.ts +3 -0
- package/lib/esm/components/CreateEventButton/index.js +2 -0
- package/lib/esm/components/CreateGroupButton/CreateGroupButton.js +1 -1
- package/lib/esm/components/Event/Event.d.ts +57 -0
- package/lib/esm/components/Event/Event.js +87 -0
- package/lib/esm/components/Event/Skeleton.d.ts +22 -0
- package/lib/esm/components/Event/Skeleton.js +40 -0
- package/lib/esm/components/Event/constants.d.ts +1 -0
- package/lib/esm/components/Event/constants.js +1 -0
- package/lib/esm/components/Event/index.d.ts +4 -0
- package/lib/esm/components/Event/index.js +4 -0
- package/lib/esm/components/EventForm/EventAddress.d.ts +12 -0
- package/lib/esm/components/EventForm/EventAddress.js +126 -0
- package/lib/esm/components/EventForm/EventForm.d.ts +59 -0
- package/lib/esm/components/EventForm/EventForm.js +320 -0
- package/lib/esm/components/EventForm/UploadEventCover.d.ts +40 -0
- package/lib/esm/components/EventForm/UploadEventCover.js +95 -0
- package/lib/esm/components/EventForm/constants.d.ts +1 -0
- package/lib/esm/components/EventForm/constants.js +1 -0
- package/lib/esm/components/EventForm/index.d.ts +3 -0
- package/lib/esm/components/EventForm/index.js +2 -0
- package/lib/esm/components/EventLocationWidget/EventLocationWidget.d.ts +55 -0
- package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +100 -0
- package/lib/esm/components/EventLocationWidget/Skeleton.d.ts +22 -0
- package/lib/esm/components/EventLocationWidget/Skeleton.js +43 -0
- package/lib/esm/components/EventLocationWidget/constants.d.ts +1 -0
- package/lib/esm/components/EventLocationWidget/constants.js +1 -0
- package/lib/esm/components/EventLocationWidget/index.d.ts +4 -0
- package/lib/esm/components/EventLocationWidget/index.js +4 -0
- package/lib/esm/components/Feed/Feed.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Share/Share.js +5 -5
- package/lib/esm/components/GroupForm/GroupForm.js +3 -3
- package/lib/esm/components/GroupHeader/GroupHeader.js +4 -4
- package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +2 -2
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +4 -4
- package/lib/esm/components/GroupInvitedWidget/GroupInvitedWidget.js +2 -2
- package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +2 -2
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +2 -2
- package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +1 -1
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.d.ts +3 -2
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.js +21 -4
- package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +3 -1
- package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.js +23 -3
- package/lib/esm/components/NavigationMenuIconButton/index.d.ts +2 -1
- package/lib/esm/components/NavigationMenuIconButton/index.js +2 -1
- package/lib/esm/components/Notification/Notification.js +1 -1
- package/lib/esm/components/PlatformWidget/PlatformWidget.d.ts +24 -2
- package/lib/esm/components/PlatformWidget/PlatformWidget.js +260 -22
- package/lib/esm/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/esm/components/PlatformWidget/constants.js +4 -0
- package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +1 -1
- package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +6 -6
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
- package/lib/esm/constants/Event.d.ts +2 -0
- package/lib/esm/constants/Event.js +2 -0
- package/lib/esm/constants/PubSub.d.ts +1 -1
- package/lib/esm/constants/PubSub.js +9 -9
- package/lib/esm/index.d.ts +12 -4
- package/lib/esm/index.js +13 -3
- package/lib/esm/shared/BaseDialog/BaseDialog.js +3 -2
- package/lib/esm/shared/EmojiPicker/EmojiPicker.js +4 -2
- package/lib/esm/shared/Media/File/PreviewComponent.d.ts +1 -1
- package/lib/esm/shared/Media/Link/LayerComponent.d.ts +1 -1
- package/lib/esm/shared/Media/Link/PreviewComponent.d.ts +1 -1
- package/lib/esm/shared/MetadataField/index.d.ts +2 -1
- package/lib/esm/types/index.d.ts +2 -1
- package/lib/esm/types/platformWidget.d.ts +15 -0
- package/lib/esm/types/platformWidget.js +1 -0
- package/lib/esm/utils/string.d.ts +1 -0
- package/lib/esm/utils/string.js +7 -0
- package/lib/umd/204.js +2 -0
- package/lib/umd/204.js.LICENSE.txt +22 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +24 -7
- package/lib/umd/311.js +0 -2
- package/lib/umd/311.js.LICENSE.txt +0 -7
|
@@ -3,5 +3,5 @@ import { BoxProps } from '@mui/material';
|
|
|
3
3
|
import { ComposerLayerProps } from '../../../../types/composer';
|
|
4
4
|
export interface CloseLayerProps extends Omit<BoxProps, 'defaultValue'>, ComposerLayerProps {
|
|
5
5
|
}
|
|
6
|
-
declare const CloseLayer: React.ForwardRefExoticComponent<Pick<CloseLayerProps, "p" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
6
|
+
declare const CloseLayer: React.ForwardRefExoticComponent<Pick<CloseLayerProps, "id" | "role" | "p" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "component" | "sx" | "classes" | "onClose" | "onSave"> & React.RefAttributes<unknown>>;
|
|
7
7
|
export default CloseLayer;
|
|
@@ -5,5 +5,5 @@ import { ComposerLayerProps } from '../../../../types/composer';
|
|
|
5
5
|
export interface LocationLayerProps extends Omit<BoxProps, 'defaultValue'>, Omit<ComposerLayerProps, 'defaultValue'> {
|
|
6
6
|
defaultValue: SCContributionLocation;
|
|
7
7
|
}
|
|
8
|
-
declare const LocationLayer: React.ForwardRefExoticComponent<Pick<LocationLayerProps, "p" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
8
|
+
declare const LocationLayer: React.ForwardRefExoticComponent<Pick<LocationLayerProps, "id" | "role" | "p" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "component" | "sx" | "classes" | "onClose" | "onSave"> & React.RefAttributes<unknown>>;
|
|
9
9
|
export default LocationLayer;
|
|
@@ -30,5 +30,5 @@ export interface ComposerIconButtonProps extends IconButtonProps {
|
|
|
30
30
|
|
|
31
31
|
* @param inProps
|
|
32
32
|
*/
|
|
33
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<ComposerIconButtonProps, "form" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
33
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<ComposerIconButtonProps, "id" | "role" | "form" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "sx" | "name" | "classes" | "value" | "type" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "action" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "ComposerProps"> & React.RefAttributes<HTMLButtonElement>>;
|
|
34
34
|
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ButtonProps } from '@mui/material/Button/Button';
|
|
2
|
+
import { EventFormProps } from '../EventForm';
|
|
3
|
+
export interface CreateEventButtonProps extends ButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Overrides or extends the styles applied to the component.
|
|
6
|
+
* @default null
|
|
7
|
+
*/
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Props to spread to CreateGroup component
|
|
11
|
+
* @default empty object
|
|
12
|
+
*/
|
|
13
|
+
EventFormProps?: EventFormProps;
|
|
14
|
+
/**
|
|
15
|
+
* Any other properties
|
|
16
|
+
*/
|
|
17
|
+
[p: string]: any;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
*> API documentation for the Community-JS Create Group Button component. Learn about the available props and the CSS API.
|
|
21
|
+
*
|
|
22
|
+
#### Import
|
|
23
|
+
```jsx
|
|
24
|
+
import {CreateEventButton} from '@selfcommunity/react-ui';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### Component Name
|
|
28
|
+
The name `SCCreateEventButton` can be used when providing style overrides in the theme.
|
|
29
|
+
|
|
30
|
+
#### CSS
|
|
31
|
+
|
|
32
|
+
|Rule Name|Global class|Description|
|
|
33
|
+
|---|---|---|
|
|
34
|
+
|root|.SCCreateEventButton-root|Styles applied to the root element.|
|
|
35
|
+
|
|
36
|
+
* @param inProps
|
|
37
|
+
*/
|
|
38
|
+
export default function CreateEventButton(inProps: CreateEventButtonProps): JSX.Element;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React, { useContext, useMemo } from 'react';
|
|
3
|
+
import { useThemeProps } from '@mui/system';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import { Button, Icon } from '@mui/material';
|
|
6
|
+
import { FormattedMessage } from 'react-intl';
|
|
7
|
+
import { SCPreferences, SCUserContext, useSCPreferences } from '@selfcommunity/react-core';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import EventForm from '../EventForm';
|
|
10
|
+
import HiddenPlaceholder from '../../shared/HiddenPlaceholder';
|
|
11
|
+
const PREFIX = 'SCCreateEventButton';
|
|
12
|
+
const classes = {
|
|
13
|
+
root: `${PREFIX}-root`
|
|
14
|
+
};
|
|
15
|
+
const Root = styled(Button, {
|
|
16
|
+
name: PREFIX,
|
|
17
|
+
slot: 'Root',
|
|
18
|
+
overridesResolver: (props, styles) => styles.root
|
|
19
|
+
})(() => ({}));
|
|
20
|
+
/**
|
|
21
|
+
*> API documentation for the Community-JS Create Group Button component. Learn about the available props and the CSS API.
|
|
22
|
+
*
|
|
23
|
+
#### Import
|
|
24
|
+
```jsx
|
|
25
|
+
import {CreateEventButton} from '@selfcommunity/react-ui';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
#### Component Name
|
|
29
|
+
The name `SCCreateEventButton` can be used when providing style overrides in the theme.
|
|
30
|
+
|
|
31
|
+
#### CSS
|
|
32
|
+
|
|
33
|
+
|Rule Name|Global class|Description|
|
|
34
|
+
|---|---|---|
|
|
35
|
+
|root|.SCCreateEventButton-root|Styles applied to the root element.|
|
|
36
|
+
|
|
37
|
+
* @param inProps
|
|
38
|
+
*/
|
|
39
|
+
export default function CreateEventButton(inProps) {
|
|
40
|
+
var _a;
|
|
41
|
+
//PROPS
|
|
42
|
+
const props = useThemeProps({
|
|
43
|
+
props: inProps,
|
|
44
|
+
name: PREFIX
|
|
45
|
+
});
|
|
46
|
+
const { className, EventFormProps = {}, children } = props, rest = __rest(props, ["className", "EventFormProps", "children"]);
|
|
47
|
+
// CONTEXT
|
|
48
|
+
const scUserContext = useContext(SCUserContext);
|
|
49
|
+
// STATE
|
|
50
|
+
const [open, setOpen] = React.useState(false);
|
|
51
|
+
// CONST
|
|
52
|
+
const authUserId = scUserContext.user ? scUserContext.user.id : null;
|
|
53
|
+
const preferences = useSCPreferences();
|
|
54
|
+
const onlyStaffEnabled = useMemo(() => preferences.preferences[SCPreferences.CONFIGURATIONS_GROUPS_ONLY_STAFF_ENABLED].value, [preferences.preferences]);
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
const canCreateEvent = useMemo(() => { var _a, _b; return (_b = (_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission) === null || _b === void 0 ? void 0 : _b.create_group; }, [(_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission]);
|
|
58
|
+
/**
|
|
59
|
+
* Handle click on button
|
|
60
|
+
*/
|
|
61
|
+
const handleClick = () => {
|
|
62
|
+
setOpen((o) => !o);
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* If there's no authUserId, component is hidden.
|
|
66
|
+
*/
|
|
67
|
+
if ((!canCreateEvent && onlyStaffEnabled) || !authUserId) {
|
|
68
|
+
return React.createElement(HiddenPlaceholder, null);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Renders root object
|
|
72
|
+
*/
|
|
73
|
+
return (React.createElement(React.Fragment, null,
|
|
74
|
+
React.createElement(Root, Object.assign({ className: classNames(classes.root, className), onClick: handleClick, variant: "contained", color: "secondary", startIcon: React.createElement(Icon, { fontSize: "small" }, "add") }, rest), children !== null && children !== void 0 ? children : React.createElement(FormattedMessage, { id: "ui.createEventButton", defaultMessage: "ui.createEventButton" })),
|
|
75
|
+
open && React.createElement(EventForm, Object.assign({}, EventFormProps, { open: true, onClose: handleClick }))));
|
|
76
|
+
}
|
|
@@ -71,6 +71,6 @@ export default function CreateGroupButton(inProps) {
|
|
|
71
71
|
* Renders root object
|
|
72
72
|
*/
|
|
73
73
|
return (React.createElement(React.Fragment, null,
|
|
74
|
-
React.createElement(Root, Object.assign({ className: classNames(classes.root, className), onClick: handleClick, variant: "contained", startIcon: React.createElement(Icon,
|
|
74
|
+
React.createElement(Root, Object.assign({ className: classNames(classes.root, className), onClick: handleClick, variant: "contained", startIcon: React.createElement(Icon, null, "add") }, rest), children !== null && children !== void 0 ? children : React.createElement(FormattedMessage, { id: "ui.createGroupButton", defaultMessage: "ui.createGroupButton" })),
|
|
75
75
|
open && React.createElement(GroupForm, Object.assign({}, GroupFormProps, { open: true, onClose: handleClick }))));
|
|
76
76
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ButtonBaseProps } from '@mui/material';
|
|
2
|
+
import { SCEventType } from '@selfcommunity/types';
|
|
3
|
+
import { WidgetProps } from '../Widget';
|
|
4
|
+
export interface EventProps extends WidgetProps {
|
|
5
|
+
/**
|
|
6
|
+
* Event Object
|
|
7
|
+
* @default null
|
|
8
|
+
*/
|
|
9
|
+
event?: SCEventType;
|
|
10
|
+
/**
|
|
11
|
+
* Id of the event for filter the feed
|
|
12
|
+
* @default null
|
|
13
|
+
*/
|
|
14
|
+
eventId?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Props to spread to the button
|
|
17
|
+
* @default {}
|
|
18
|
+
*/
|
|
19
|
+
buttonProps?: ButtonBaseProps;
|
|
20
|
+
/**
|
|
21
|
+
* Any other properties
|
|
22
|
+
*/
|
|
23
|
+
[p: string]: any;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* > API documentation for the Community-JS Event component. Learn about the available props and the CSS API.
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
* This component renders an event item.
|
|
30
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/Event)
|
|
31
|
+
|
|
32
|
+
#### Import
|
|
33
|
+
|
|
34
|
+
```jsx
|
|
35
|
+
import {event} from '@selfcommunity/react-ui';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Component Name
|
|
39
|
+
|
|
40
|
+
The name `SCEvent` can be used when providing style overrides in the theme.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
#### CSS
|
|
44
|
+
|
|
45
|
+
|Rule Name|Global class|Description|
|
|
46
|
+
|---|---|---|
|
|
47
|
+
|root|.SCEvent-root|Styles applied to the root element.|
|
|
48
|
+
|avatar|.SCEvent-avatar|Styles applied to the avatar element.|
|
|
49
|
+
|primary|.SCEvent-primary|Styles applied to the primary item element section|
|
|
50
|
+
|secondary|.SCEvent-secondary|Styles applied to the secondary item element section|
|
|
51
|
+
|actions|.SCEvent-actions|Styles applied to the actions section.|
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
*
|
|
55
|
+
* @param inProps
|
|
56
|
+
*/
|
|
57
|
+
export default function Event(inProps: EventProps): JSX.Element;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { Avatar, Button, Typography } from '@mui/material';
|
|
5
|
+
import { SCEventLocationType } from '@selfcommunity/types';
|
|
6
|
+
import { Link, SCRoutes, useSCFetchEvent, useSCRouting } from '@selfcommunity/react-core';
|
|
7
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import { useThemeProps } from '@mui/system';
|
|
10
|
+
import BaseItemButton from '../../shared/BaseItemButton';
|
|
11
|
+
import { PREFIX } from './constants';
|
|
12
|
+
import EventSkeleton from './Skeleton';
|
|
13
|
+
const classes = {
|
|
14
|
+
root: `${PREFIX}-root`,
|
|
15
|
+
avatar: `${PREFIX}-avatar`,
|
|
16
|
+
primary: `${PREFIX}-primary`,
|
|
17
|
+
secondary: `${PREFIX}-secondary`,
|
|
18
|
+
actions: `${PREFIX}-actions`
|
|
19
|
+
};
|
|
20
|
+
const Root = styled(BaseItemButton, {
|
|
21
|
+
name: PREFIX,
|
|
22
|
+
slot: 'Root',
|
|
23
|
+
overridesResolver: (props, styles) => styles.root
|
|
24
|
+
})(() => ({}));
|
|
25
|
+
/**
|
|
26
|
+
* > API documentation for the Community-JS Event component. Learn about the available props and the CSS API.
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
* This component renders an event item.
|
|
30
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/Event)
|
|
31
|
+
|
|
32
|
+
#### Import
|
|
33
|
+
|
|
34
|
+
```jsx
|
|
35
|
+
import {event} from '@selfcommunity/react-ui';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Component Name
|
|
39
|
+
|
|
40
|
+
The name `SCEvent` can be used when providing style overrides in the theme.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
#### CSS
|
|
44
|
+
|
|
45
|
+
|Rule Name|Global class|Description|
|
|
46
|
+
|---|---|---|
|
|
47
|
+
|root|.SCEvent-root|Styles applied to the root element.|
|
|
48
|
+
|avatar|.SCEvent-avatar|Styles applied to the avatar element.|
|
|
49
|
+
|primary|.SCEvent-primary|Styles applied to the primary item element section|
|
|
50
|
+
|secondary|.SCEvent-secondary|Styles applied to the secondary item element section|
|
|
51
|
+
|actions|.SCEvent-actions|Styles applied to the actions section.|
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
*
|
|
55
|
+
* @param inProps
|
|
56
|
+
*/
|
|
57
|
+
export default function Event(inProps) {
|
|
58
|
+
// PROPS
|
|
59
|
+
const props = useThemeProps({
|
|
60
|
+
props: inProps,
|
|
61
|
+
name: PREFIX
|
|
62
|
+
});
|
|
63
|
+
const { eventId = null, event = null, className = null, elevation } = props, rest = __rest(props, ["eventId", "event", "className", "elevation"]);
|
|
64
|
+
// STATE
|
|
65
|
+
const { scEvent } = useSCFetchEvent({ id: eventId, event });
|
|
66
|
+
// CONTEXT
|
|
67
|
+
const scRoutingContext = useSCRouting();
|
|
68
|
+
// HOOKS
|
|
69
|
+
const intl = useIntl();
|
|
70
|
+
/**
|
|
71
|
+
* Renders event object
|
|
72
|
+
*/
|
|
73
|
+
if (!scEvent) {
|
|
74
|
+
return React.createElement(EventSkeleton, { elevation: elevation });
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Renders root object
|
|
78
|
+
*/
|
|
79
|
+
return (React.createElement(Root, Object.assign({ elevation: elevation, disableTypography: true }, rest, { className: classNames(classes.root, className), ButtonBaseProps: { component: Link, to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, scEvent) }, image: React.createElement(Avatar, { variant: "square", alt: scEvent.name, src: scEvent.image_medium, className: classes.avatar }), primary: React.createElement(Typography, { component: "div", className: classes.primary },
|
|
80
|
+
React.createElement(Typography, { component: "span" }, `${intl.formatDate(scEvent.start_date, { weekday: 'long', month: 'long', day: 'numeric' })}`),
|
|
81
|
+
React.createElement(Typography, { variant: "body1" }, scEvent.name)), secondary: React.createElement(Typography, { component: "p", variant: "body2", className: classes.secondary },
|
|
82
|
+
React.createElement(FormattedMessage, { id: `ui.eventForm.privacy.${scEvent.privacy}`, defaultMessage: `ui.eventForm.privacy.${scEvent.privacy}` }),
|
|
83
|
+
" -",
|
|
84
|
+
' ',
|
|
85
|
+
(scEvent === null || scEvent === void 0 ? void 0 : scEvent.location) === SCEventLocationType.PERSON ? (React.createElement(FormattedMessage, { id: `ui.eventForm.address.live.label`, defaultMessage: `ui.eventForm.address.live.label` })) : (React.createElement(FormattedMessage, { id: `ui.eventForm.address.online.label`, defaultMessage: `ui.eventForm.address.online.label` }))), actions: React.createElement(Button, { size: "small", variant: "outlined", component: Link, to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, scEvent) },
|
|
86
|
+
React.createElement(FormattedMessage, { defaultMessage: "ui.event.see", id: "ui.event.see" })) })));
|
|
87
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { WidgetProps } from '../Widget';
|
|
2
|
+
/**
|
|
3
|
+
* > API documentation for the Community-JS Event Skeleton component. Learn about the available props and the CSS API.
|
|
4
|
+
|
|
5
|
+
#### Import
|
|
6
|
+
|
|
7
|
+
```jsx
|
|
8
|
+
import {EventSkeleton} from '@selfcommunity/react-ui';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
#### Component Name
|
|
12
|
+
|
|
13
|
+
The name `SCEvent-skeleton-root` can be used when providing style overrides in the theme.
|
|
14
|
+
|
|
15
|
+
#### CSS
|
|
16
|
+
|
|
17
|
+
|Rule Name|Global class|Description|
|
|
18
|
+
|---|---|---|
|
|
19
|
+
|root|.SCEvent-skeleton-root|Styles applied to the root element.|
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export default function EventSkeleton(props: WidgetProps): JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from '@mui/material';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import Skeleton from '@mui/material/Skeleton';
|
|
5
|
+
import BaseItem from '../../shared/BaseItem';
|
|
6
|
+
import { PREFIX } from './constants';
|
|
7
|
+
const classes = {
|
|
8
|
+
root: `${PREFIX}-skeleton-root`
|
|
9
|
+
};
|
|
10
|
+
const Root = styled(BaseItem, {
|
|
11
|
+
name: PREFIX,
|
|
12
|
+
slot: 'SkeletonRoot'
|
|
13
|
+
})(() => ({}));
|
|
14
|
+
/**
|
|
15
|
+
* > API documentation for the Community-JS Event Skeleton component. Learn about the available props and the CSS API.
|
|
16
|
+
|
|
17
|
+
#### Import
|
|
18
|
+
|
|
19
|
+
```jsx
|
|
20
|
+
import {EventSkeleton} from '@selfcommunity/react-ui';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
#### Component Name
|
|
24
|
+
|
|
25
|
+
The name `SCEvent-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|.SCEvent-skeleton-root|Styles applied to the root element.|
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export default function EventSkeleton(props) {
|
|
35
|
+
//const theme = useTheme<SCThemeType>();
|
|
36
|
+
return (React.createElement(Root, Object.assign({ className: classes.root }, props, { image: React.createElement(Skeleton, { animation: "wave", variant: "rectangular", width: 100, height: 60 }), primary: React.createElement(Skeleton, { animation: "wave", height: 10, width: 120, style: { marginBottom: 10 } }), secondary: React.createElement(React.Fragment, null,
|
|
37
|
+
React.createElement(Skeleton, { animation: "wave", height: 10, width: 120, style: { marginBottom: 10 } }),
|
|
38
|
+
React.createElement(Skeleton, { animation: "wave", height: 10, width: 120, style: { marginBottom: 10 } })), actions: React.createElement(Button, { size: "small", variant: "outlined", disabled: true },
|
|
39
|
+
React.createElement(Skeleton, { animation: "wave", height: 10, width: 30, style: { marginTop: 5, marginBottom: 5 } })) })));
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCEvent";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PREFIX = 'SCEvent';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SCEventLocationType } from '@selfcommunity/types';
|
|
2
|
+
export interface EventAddressProps {
|
|
3
|
+
forwardGeolocationData: (data: {
|
|
4
|
+
location: SCEventLocationType;
|
|
5
|
+
geolocation?: string;
|
|
6
|
+
lat?: number;
|
|
7
|
+
lng?: number;
|
|
8
|
+
link?: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export default function EventAddress(inProps: EventAddressProps): JSX.Element;
|