зеркало из https://github.com/mozilla/hubs.git
2 строки
18 KiB
JavaScript
2 строки
18 KiB
JavaScript
/*! For license information please see room-RoomSidebar-stories.04a7695c.iframe.bundle.js.LICENSE.txt */
|
|
(globalThis.webpackChunkhubs=globalThis.webpackChunkhubs||[]).push([[3133],{"./src/react-components/room/RoomSidebar.stories.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CanEdit:()=>CanEdit,NotLoggedIn:()=>NotLoggedIn,NotSceneOwner:()=>NotSceneOwner,SceneOwner:()=>SceneOwner,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/react/index.js");var _SceneOwner$parameter,_SceneOwner$parameter2,_SceneOwner$parameter3,_NotSceneOwner$parame,_NotSceneOwner$parame2,_NotSceneOwner$parame3,_CanEdit$parameters,_CanEdit$parameters2,_CanEdit$parameters2$,_NotLoggedIn$paramete,_NotLoggedIn$paramete2,_NotLoggedIn$paramete3,_layout_RoomLayout__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/react-components/layout/RoomLayout.js"),_RoomSidebar__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/react-components/room/RoomSidebar.js"),_assets_images_home_hero_background_unbranded_png__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/assets/images/home-hero-background-unbranded.png"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/react/jsx-runtime.js");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!=typeof input||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!=typeof res)return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"==typeof key?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}const __WEBPACK_DEFAULT_EXPORT__={title:"Room/RoomSidebar",parameters:{layout:"fullscreen"}},room={name:"Room Name",description:"Room Description",scene:{name:"Scene Name",account_id:"123",allow_promotion:!1,allow_remixing:!1,url:"#",screenshot_url:_assets_images_home_hero_background_unbranded_png__WEBPACK_IMPORTED_MODULE_3__,attributions:{creator:"Creator",content:[{name:"Model 1",author:"User 1",url:"https://sketchfab.com/example"},{name:"Model 2",author:"User 2",url:"https://poly.google.com"},{name:"Model 3",author:"User 3"}]}}},SceneOwner=()=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_layout_RoomLayout__WEBPACK_IMPORTED_MODULE_1__.s,{sidebar:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_RoomSidebar__WEBPACK_IMPORTED_MODULE_2__.g,{accountId:"123",room})});SceneOwner.displayName="SceneOwner";const NotSceneOwner=()=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_layout_RoomLayout__WEBPACK_IMPORTED_MODULE_1__.s,{sidebar:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_RoomSidebar__WEBPACK_IMPORTED_MODULE_2__.g,{accountId:"456",room})});NotSceneOwner.displayName="NotSceneOwner";const CanEdit=()=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_layout_RoomLayout__WEBPACK_IMPORTED_MODULE_1__.s,{sidebar:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_RoomSidebar__WEBPACK_IMPORTED_MODULE_2__.g,{accountId:"123",room,canEdit:!0})});CanEdit.displayName="CanEdit";const NotLoggedIn=()=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_layout_RoomLayout__WEBPACK_IMPORTED_MODULE_1__.s,{sidebar:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_RoomSidebar__WEBPACK_IMPORTED_MODULE_2__.g,{room})});NotLoggedIn.displayName="NotLoggedIn",SceneOwner.parameters=_objectSpread(_objectSpread({},SceneOwner.parameters),{},{docs:_objectSpread(_objectSpread({},null===(_SceneOwner$parameter=SceneOwner.parameters)||void 0===_SceneOwner$parameter?void 0:_SceneOwner$parameter.docs),{},{source:_objectSpread({originalSource:'() => <RoomLayout sidebar={<RoomSidebar accountId="123" room={room} />} />'},null===(_SceneOwner$parameter2=SceneOwner.parameters)||void 0===_SceneOwner$parameter2||null===(_SceneOwner$parameter3=_SceneOwner$parameter2.docs)||void 0===_SceneOwner$parameter3?void 0:_SceneOwner$parameter3.source)})}),NotSceneOwner.parameters=_objectSpread(_objectSpread({},NotSceneOwner.parameters),{},{docs:_objectSpread(_objectSpread({},null===(_NotSceneOwner$parame=NotSceneOwner.parameters)||void 0===_NotSceneOwner$parame?void 0:_NotSceneOwner$parame.docs),{},{source:_objectSpread({originalSource:'() => <RoomLayout sidebar={<RoomSidebar accountId="456" room={room} />} />'},null===(_NotSceneOwner$parame2=NotSceneOwner.parameters)||void 0===_NotSceneOwner$parame2||null===(_NotSceneOwner$parame3=_NotSceneOwner$parame2.docs)||void 0===_NotSceneOwner$parame3?void 0:_NotSceneOwner$parame3.source)})}),CanEdit.parameters=_objectSpread(_objectSpread({},CanEdit.parameters),{},{docs:_objectSpread(_objectSpread({},null===(_CanEdit$parameters=CanEdit.parameters)||void 0===_CanEdit$parameters?void 0:_CanEdit$parameters.docs),{},{source:_objectSpread({originalSource:'() => <RoomLayout sidebar={<RoomSidebar accountId="123" room={room} canEdit />} />'},null===(_CanEdit$parameters2=CanEdit.parameters)||void 0===_CanEdit$parameters2||null===(_CanEdit$parameters2$=_CanEdit$parameters2.docs)||void 0===_CanEdit$parameters2$?void 0:_CanEdit$parameters2$.source)})}),NotLoggedIn.parameters=_objectSpread(_objectSpread({},NotLoggedIn.parameters),{},{docs:_objectSpread(_objectSpread({},null===(_NotLoggedIn$paramete=NotLoggedIn.parameters)||void 0===_NotLoggedIn$paramete?void 0:_NotLoggedIn$paramete.docs),{},{source:_objectSpread({originalSource:"() => <RoomLayout sidebar={<RoomSidebar room={room} />} />"},null===(_NotLoggedIn$paramete2=NotLoggedIn.parameters)||void 0===_NotLoggedIn$paramete2||null===(_NotLoggedIn$paramete3=_NotLoggedIn$paramete2.docs)||void 0===_NotLoggedIn$paramete3?void 0:_NotLoggedIn$paramete3.source)})});const __namedExportsOrder=["SceneOwner","NotSceneOwner","CanEdit","NotLoggedIn"];SceneOwner.__docgenInfo={description:"",methods:[],displayName:"SceneOwner"},NotSceneOwner.__docgenInfo={description:"",methods:[],displayName:"NotSceneOwner"},CanEdit.__docgenInfo={description:"",methods:[],displayName:"CanEdit"},NotLoggedIn.__docgenInfo={description:"",methods:[],displayName:"NotLoggedIn"}},"./src/react-components/input/Button.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Lw:()=>CancelButton,VD:()=>ApplyButton,aT:()=>AcceptButton,aW:()=>NextButton,fY:()=>ContinueButton,um:()=>presets,zx:()=>Button});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__),classnames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__),_Button_scss__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/react-components/input/Button.scss"),_TextInput_scss__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/react-components/input/TextInput.scss"),react_intl__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/react-intl/lib/src/components/message.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/react/jsx-runtime.js");const _excluded=["as","sm","lg","xl","thin","thick","preset","className","children"];function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){_defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!=typeof input||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!=typeof res)return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"==typeof key?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],excluded.indexOf(key)>=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],excluded.indexOf(key)>=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}const presets=["transparent","basic","primary","accept","cancel","accent1","accent2","accent3","accent4","accent5","accent6","landing","signin","text"],Button=(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)((0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((_ref,ref)=>{let{as,sm,lg,xl,thin,thick,preset,className,children}=_ref,rest=_objectWithoutProperties(_ref,_excluded);const ButtonComponent=as,buttonProps="button"===ButtonComponent?{type:"button"}:{};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(ButtonComponent,_objectSpread(_objectSpread(_objectSpread({className:classnames__WEBPACK_IMPORTED_MODULE_1___default()(_Button_scss__WEBPACK_IMPORTED_MODULE_2__.Z.button,_TextInput_scss__WEBPACK_IMPORTED_MODULE_3__.Z.button,_Button_scss__WEBPACK_IMPORTED_MODULE_2__.Z[preset],{[_Button_scss__WEBPACK_IMPORTED_MODULE_2__.Z.sm]:sm,[_Button_scss__WEBPACK_IMPORTED_MODULE_2__.Z.lg]:lg,[_Button_scss__WEBPACK_IMPORTED_MODULE_2__.Z.xl]:xl,[_Button_scss__WEBPACK_IMPORTED_MODULE_2__.Z.thin]:thin,[_Button_scss__WEBPACK_IMPORTED_MODULE_2__.Z.thick]:thick},className)},buttonProps),rest),{},{ref,children}))})));function NextButton(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(Button,_objectSpread(_objectSpread({preset:"accept"},props),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_intl__WEBPACK_IMPORTED_MODULE_6__.Z,{id:"button.next",defaultMessage:"Next"})}))}function CancelButton(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(Button,_objectSpread(_objectSpread({preset:"cancel"},props),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_intl__WEBPACK_IMPORTED_MODULE_6__.Z,{id:"button.cancel",defaultMessage:"Cancel"})}))}function ContinueButton(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(Button,_objectSpread(_objectSpread({preset:"accept"},props),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_intl__WEBPACK_IMPORTED_MODULE_6__.Z,{id:"button.continue",defaultMessage:"Continue"})}))}function AcceptButton(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(Button,_objectSpread(_objectSpread({preset:"accept"},props),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_intl__WEBPACK_IMPORTED_MODULE_6__.Z,{id:"button.accept",defaultMessage:"Accept"})}))}function ApplyButton(props){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(Button,_objectSpread(_objectSpread({preset:"accept"},props),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_intl__WEBPACK_IMPORTED_MODULE_6__.Z,{id:"button.apply",defaultMessage:"Apply"})}))}Button.propTypes={as:prop_types__WEBPACK_IMPORTED_MODULE_5___default().elementType,preset:prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOf(presets),className:prop_types__WEBPACK_IMPORTED_MODULE_5___default().string,children:prop_types__WEBPACK_IMPORTED_MODULE_5___default().node,sm:prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool,lg:prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool,xl:prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool,thin:prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool,thick:prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool},Button.defaultProps={as:"button",preset:"basic"},NextButton.displayName="NextButton",CancelButton.displayName="CancelButton",ContinueButton.displayName="ContinueButton",AcceptButton.displayName="AcceptButton",ApplyButton.displayName="ApplyButton",NextButton.__docgenInfo={description:"",methods:[],displayName:"NextButton"},CancelButton.__docgenInfo={description:"",methods:[],displayName:"CancelButton"},ContinueButton.__docgenInfo={description:"",methods:[],displayName:"ContinueButton"},AcceptButton.__docgenInfo={description:"",methods:[],displayName:"AcceptButton"},ApplyButton.__docgenInfo={description:"",methods:[],displayName:"ApplyButton"}},"./node_modules/classnames/index.js":(module,exports)=>{var __WEBPACK_AMD_DEFINE_RESULT__;!function(){"use strict";var hasOwn={}.hasOwnProperty;function classNames(){for(var classes=[],i=0;i<arguments.length;i++){var arg=arguments[i];if(arg){var argType=typeof arg;if("string"===argType||"number"===argType)classes.push(arg);else if(Array.isArray(arg)){if(arg.length){var inner=classNames.apply(null,arg);inner&&classes.push(inner)}}else if("object"===argType){if(arg.toString!==Object.prototype.toString&&!arg.toString.toString().includes("[native code]")){classes.push(arg.toString());continue}for(var key in arg)hasOwn.call(arg,key)&&arg[key]&&classes.push(key)}}}return classes.join(" ")}module.exports?(classNames.default=classNames,module.exports=classNames):void 0===(__WEBPACK_AMD_DEFINE_RESULT__=function(){return classNames}.apply(exports,[]))||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}()},"./node_modules/react-intl/lib/src/components/message.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var tslib__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/tslib/tslib.es6.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_useIntl__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react-intl/lib/src/components/useIntl.js"),_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react-intl/lib/src/utils.js");function FormattedMessage(props){var intl=(0,_useIntl__WEBPACK_IMPORTED_MODULE_3__.Z)(),formatMessage=intl.formatMessage,_a=intl.textComponent,Text=void 0===_a?react__WEBPACK_IMPORTED_MODULE_0__.Fragment:_a,id=props.id,description=props.description,defaultMessage=props.defaultMessage,values=props.values,children=props.children,_b=props.tagName,Component=void 0===_b?Text:_b,nodes=formatMessage({id,description,defaultMessage},values,{ignoreTag:props.ignoreTag});return"function"==typeof children?children(Array.isArray(nodes)?nodes:[nodes]):Component?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,null,react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(nodes)):react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,nodes)}FormattedMessage.displayName="FormattedMessage";var MemoizedFormattedMessage=react__WEBPACK_IMPORTED_MODULE_0__.memo(FormattedMessage,(function areEqual(prevProps,nextProps){var values=prevProps.values,otherProps=(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(prevProps,["values"]),nextValues=nextProps.values,nextOtherProps=(0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(nextProps,["values"]);return(0,_utils__WEBPACK_IMPORTED_MODULE_2__.wU)(nextValues,values)&&(0,_utils__WEBPACK_IMPORTED_MODULE_2__.wU)(otherProps,nextOtherProps)}));MemoizedFormattedMessage.displayName="MemoizedFormattedMessage";const __WEBPACK_DEFAULT_EXPORT__=MemoizedFormattedMessage},"./node_modules/react-intl/lib/src/components/useIntl.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>useIntl});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_injectIntl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-intl/lib/src/components/injectIntl.js"),_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react-intl/lib/src/utils.js");function useIntl(){var intl=react__WEBPACK_IMPORTED_MODULE_0__.useContext(_injectIntl__WEBPACK_IMPORTED_MODULE_1__._y);return(0,_utils__WEBPACK_IMPORTED_MODULE_2__.lq)(intl),intl}}}]); |