ricos-context
Advanced tools
Comparing version 8.72.50 to 8.72.51
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _extends=require("@babel/runtime/helpers/extends"),React=require("react");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _extends__default=_interopDefaultLegacy(_extends),React__default=_interopDefaultLegacy(React),EditorContext=React__default.default.createContext(null),EditorContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(EditorContext.Consumer,null,(function(value){return children(value)}))};var RicosContext=React__default.default.createContext({locale:"en",localeContent:"en",experiments:{},isMobile:!1,t:function(text){return text},languageDir:"ltr",theme:{},portal:null,debugMode:[]});var ToolbarContext=React__default.default.createContext({contentId:"",isMobile:!1,theme:{},locale:"en",helpers:{},plugins:[],linkPanelData:void 0,headingsData:void 0,linkSettings:{},experiments:{},toolbarSettings:{},cssOverride:{},getEditorCommands:function(){return{}},portal:null,toolbars:null,colorPickerData:{},defaultLineSpacing:{}}),EventsContext=React__default.default.createContext(null),EventsContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(EventsContext.Consumer,null,(function(value){return children(value)}))};var ModalContext=React__default.default.createContext(null);var ShortcutsContext=React__default.default.createContext(null),ShortcutsContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(ShortcutsContext.Consumer,null,(function(value){return children(value)}))};var StylesContext=React__default.default.createContext(null),StylesContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(StylesContext.Consumer,null,(function(value){return children(value)}))};var PluginsContext=React__default.default.createContext(null),UploadContext=React__default.default.createContext(null);var PluginsEventsContext=React__default.default.createContext(null),ZIndexContext=React__default.default.createContext(null);exports.EditorContext=EditorContext,exports.EditorContextConsumer=EditorContextConsumer,exports.EditorContextProvider=function(_ref){var editor=_ref.editor,children=_ref.children;return React__default.default.createElement(EditorContext.Provider,{value:editor},children)},exports.EventsContext=EventsContext,exports.EventsContextConsumer=EventsContextConsumer,exports.EventsContextProvider=function(_ref){var events=_ref.events,children=_ref.children;return React__default.default.createElement(EventsContext.Provider,{value:events},children)},exports.ModalContext=ModalContext,exports.ModalContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(ModalContext.Consumer,null,(function(value){return children(value)}))},exports.ModalContextProvider=function(_ref){var modalService=_ref.modalService,children=_ref.children;return React__default.default.createElement(ModalContext.Provider,{value:modalService},children)},exports.PluginsContext=PluginsContext,exports.PluginsContextProvider=function(_ref){var plugins=_ref.plugins,children=_ref.children;return React__default.default.createElement(PluginsContext.Provider,{value:plugins},children)},exports.PluginsEventsContext=PluginsEventsContext,exports.PluginsEventsContextProvider=function(_ref){var pluginsEvents=_ref.pluginsEvents,children=_ref.children;return React__default.default.createElement(PluginsEventsContext.Provider,{value:pluginsEvents},children)},exports.RicosContext=RicosContext,exports.RicosContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(RicosContext.Consumer,null,(function(value){return children(value)}))},exports.RicosContextProvider=function(_ref){var children=_ref.children,isMobile=_ref.isMobile,locale=_ref.locale,localeContent=_ref.localeContent,experiments=_ref.experiments,languageDir=_ref.languageDir,theme=_ref.theme,t=_ref.t,portal=_ref.portal,_ref$debugMode=_ref.debugMode,debugMode=void 0===_ref$debugMode?[]:_ref$debugMode;return React__default.default.createElement(RicosContext.Provider,{value:{t:t,locale:locale,localeContent:localeContent,isMobile:isMobile,experiments:experiments,languageDir:languageDir,theme:theme,portal:portal,debugMode:debugMode}},React__default.default.cloneElement(React__default.default.Children.only(children)))},exports.ShortcutsContext=ShortcutsContext,exports.ShortcutsContextConsumer=ShortcutsContextConsumer,exports.ShortcutsContextProvider=function(_ref){var shortcuts=_ref.shortcuts,children=_ref.children;return React__default.default.createElement(ShortcutsContext.Provider,{value:shortcuts},children)},exports.StylesContext=StylesContext,exports.StylesContextConsumer=StylesContextConsumer,exports.StylesContextProvider=function(_ref){var styles=_ref.styles,children=_ref.children;return React__default.default.createElement(StylesContext.Provider,{value:styles},children)},exports.ToolbarContext=ToolbarContext,exports.UploadContext=UploadContext,exports.UploadContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(UploadContext.Consumer,null,(function(value){return children(value)}))},exports.UploadContextProvider=function(_ref){var uploadService=_ref.uploadService,updateService=_ref.updateService,children=_ref.children;return React__default.default.createElement(UploadContext.Provider,{value:{uploadService:uploadService,updateService:updateService}},children)},exports.ZIndexContext=ZIndexContext,exports.ZIndexContextProvider=function(_ref){var zIndexService=_ref.zIndexService,children=_ref.children;return React__default.default.createElement(ZIndexContext.Provider,{value:zIndexService},children)},exports.withEditorContext=function(Component){return function(props){return React__default.default.createElement(EditorContextConsumer,null,(function(editor){return React__default.default.createElement(Component,_extends__default.default({},props,{editor:editor}))}))}},exports.withEventsContext=function(Component){return function(props){return React__default.default.createElement(EventsContextConsumer,null,(function(value){return React__default.default.createElement(Component,_extends__default.default({},props,{events:value}))}))}},exports.withModalContext=function(Component){return function(props){return React__default.default.createElement(ModalContext.Consumer,null,(function(modalService){return React__default.default.createElement(Component,_extends__default.default({},props,{modalService:modalService}))}))}},exports.withPluginsContext=function(WrappedComponent){return function(props){return React__default.default.createElement(PluginsContext.Consumer,null,(function(plugins){return React__default.default.createElement(WrappedComponent,_extends__default.default({},props,{plugins:plugins}))}))}},exports.withPluginsEventsContext=function(WrappedComponent){return function(props){return React__default.default.createElement(PluginsEventsContext.Consumer,null,(function(pluginsEvents){return React__default.default.createElement(WrappedComponent,_extends__default.default({},props,{pluginsEvents:pluginsEvents}))}))}},exports.withRicosContext=function(Component){return function(props){return React__default.default.createElement(RicosContext.Consumer,null,(function(value){return React__default.default.createElement(Component,_extends__default.default({},props,{ricosContext:value}))}))}},exports.withShortcutsContext=function(Component){return function(props){return React__default.default.createElement(ShortcutsContextConsumer,null,(function(shortcuts){return React__default.default.createElement(Component,_extends__default.default({},props,{shortcuts:shortcuts}))}))}},exports.withStylesContext=function(Component){return function(props){return React__default.default.createElement(StylesContextConsumer,null,(function(value){return React__default.default.createElement(Component,_extends__default.default({},props,{styles:value}))}))}},exports.withToolbarContext=function(WrappedComponent){return function(props){var t=React.useContext(RicosContext).t;return React__default.default.createElement(ToolbarContext.Consumer,null,(function(contexts){return React__default.default.createElement(WrappedComponent,_extends__default.default({},props,{context:_extends__default.default({},contexts,{t:t})}))}))}},exports.withUploadContext=function(Component){return function(props){return React__default.default.createElement(UploadContext.Consumer,null,(function(_ref3){var uploadService=_ref3.uploadService,updateService=_ref3.updateService;return React__default.default.createElement(Component,_extends__default.default({},props,{uploadService:uploadService,updateService:updateService}))}))}}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _extends=require("@babel/runtime/helpers/extends"),React=require("react");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _extends__default=_interopDefaultLegacy(_extends),React__default=_interopDefaultLegacy(React),EditorContext=React__default.default.createContext(null),EditorContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(EditorContext.Consumer,null,(function(value){return children(value)}))};var RicosContext=React__default.default.createContext({locale:"en",localeContent:"en",experiments:{},isMobile:!1,t:function(text){return text},languageDir:"ltr",theme:{},portal:null,debugMode:[]});var ToolbarContext=React__default.default.createContext({contentId:"",isMobile:!1,theme:{},locale:"en",helpers:{},plugins:[],linkPanelData:void 0,headingsData:void 0,linkSettings:{},experiments:{},toolbarSettings:{},cssOverride:{},getEditorCommands:function(){return{}},portal:null,toolbars:null,colorPickerData:{},defaultLineSpacing:{}}),EventsContext=React__default.default.createContext(null),EventsContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(EventsContext.Consumer,null,(function(value){return children(value)}))};var ModalContext=React__default.default.createContext(null);var ShortcutsContext=React__default.default.createContext(null),ShortcutsContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(ShortcutsContext.Consumer,null,(function(value){return children(value)}))};var StylesContext=React__default.default.createContext(null),StylesContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(StylesContext.Consumer,null,(function(value){return children(value)}))};var PluginsContext=React__default.default.createContext(null),UploadContext=React__default.default.createContext(null);var PluginsEventsContext=React__default.default.createContext(null),ZIndexContext=React__default.default.createContext(null);exports.EditorContext=EditorContext,exports.EditorContextConsumer=EditorContextConsumer,exports.EditorContextProvider=function(_ref){var editor=_ref.editor,children=_ref.children;return React__default.default.createElement(EditorContext.Provider,{value:editor},children)},exports.EventsContext=EventsContext,exports.EventsContextConsumer=EventsContextConsumer,exports.EventsContextProvider=function(_ref){var events=_ref.events,children=_ref.children;return React__default.default.createElement(EventsContext.Provider,{value:events},children)},exports.ModalContext=ModalContext,exports.ModalContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(ModalContext.Consumer,null,(function(value){return children(value)}))},exports.ModalContextProvider=function(_ref){var modalService=_ref.modalService,children=_ref.children;return React__default.default.createElement(ModalContext.Provider,{value:modalService},children)},exports.PluginsContext=PluginsContext,exports.PluginsContextProvider=function(_ref){var plugins=_ref.plugins,children=_ref.children;return React__default.default.createElement(PluginsContext.Provider,{value:plugins},children)},exports.PluginsEventsContext=PluginsEventsContext,exports.PluginsEventsContextProvider=function(_ref){var pluginsEvents=_ref.pluginsEvents,children=_ref.children;return React__default.default.createElement(PluginsEventsContext.Provider,{value:pluginsEvents},children)},exports.RicosContext=RicosContext,exports.RicosContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(RicosContext.Consumer,null,(function(value){return children(value)}))},exports.RicosContextProvider=function(_ref){var children=_ref.children,isMobile=_ref.isMobile,locale=_ref.locale,localeContent=_ref.localeContent,experiments=_ref.experiments,languageDir=_ref.languageDir,theme=_ref.theme,t=_ref.t,portal=_ref.portal,editorExternalContainer=_ref.editorExternalContainer,_ref$debugMode=_ref.debugMode,debugMode=void 0===_ref$debugMode?[]:_ref$debugMode;return React__default.default.createElement(RicosContext.Provider,{value:{t:t,locale:locale,localeContent:localeContent,isMobile:isMobile,experiments:experiments,languageDir:languageDir,theme:theme,portal:portal,debugMode:debugMode,editorExternalContainer:editorExternalContainer}},React__default.default.cloneElement(React__default.default.Children.only(children)))},exports.ShortcutsContext=ShortcutsContext,exports.ShortcutsContextConsumer=ShortcutsContextConsumer,exports.ShortcutsContextProvider=function(_ref){var shortcuts=_ref.shortcuts,children=_ref.children;return React__default.default.createElement(ShortcutsContext.Provider,{value:shortcuts},children)},exports.StylesContext=StylesContext,exports.StylesContextConsumer=StylesContextConsumer,exports.StylesContextProvider=function(_ref){var styles=_ref.styles,children=_ref.children;return React__default.default.createElement(StylesContext.Provider,{value:styles},children)},exports.ToolbarContext=ToolbarContext,exports.UploadContext=UploadContext,exports.UploadContextConsumer=function(_ref2){var children=_ref2.children;return React__default.default.createElement(UploadContext.Consumer,null,(function(value){return children(value)}))},exports.UploadContextProvider=function(_ref){var uploadService=_ref.uploadService,updateService=_ref.updateService,children=_ref.children;return React__default.default.createElement(UploadContext.Provider,{value:{uploadService:uploadService,updateService:updateService}},children)},exports.ZIndexContext=ZIndexContext,exports.ZIndexContextProvider=function(_ref){var zIndexService=_ref.zIndexService,children=_ref.children;return React__default.default.createElement(ZIndexContext.Provider,{value:zIndexService},children)},exports.withEditorContext=function(Component){return function(props){return React__default.default.createElement(EditorContextConsumer,null,(function(editor){return React__default.default.createElement(Component,_extends__default.default({},props,{editor:editor}))}))}},exports.withEventsContext=function(Component){return function(props){return React__default.default.createElement(EventsContextConsumer,null,(function(value){return React__default.default.createElement(Component,_extends__default.default({},props,{events:value}))}))}},exports.withModalContext=function(Component){return function(props){return React__default.default.createElement(ModalContext.Consumer,null,(function(modalService){return React__default.default.createElement(Component,_extends__default.default({},props,{modalService:modalService}))}))}},exports.withPluginsContext=function(WrappedComponent){return function(props){return React__default.default.createElement(PluginsContext.Consumer,null,(function(plugins){return React__default.default.createElement(WrappedComponent,_extends__default.default({},props,{plugins:plugins}))}))}},exports.withPluginsEventsContext=function(WrappedComponent){return function(props){return React__default.default.createElement(PluginsEventsContext.Consumer,null,(function(pluginsEvents){return React__default.default.createElement(WrappedComponent,_extends__default.default({},props,{pluginsEvents:pluginsEvents}))}))}},exports.withRicosContext=function(Component){return function(props){return React__default.default.createElement(RicosContext.Consumer,null,(function(value){return React__default.default.createElement(Component,_extends__default.default({},props,{ricosContext:value}))}))}},exports.withShortcutsContext=function(Component){return function(props){return React__default.default.createElement(ShortcutsContextConsumer,null,(function(shortcuts){return React__default.default.createElement(Component,_extends__default.default({},props,{shortcuts:shortcuts}))}))}},exports.withStylesContext=function(Component){return function(props){return React__default.default.createElement(StylesContextConsumer,null,(function(value){return React__default.default.createElement(Component,_extends__default.default({},props,{styles:value}))}))}},exports.withToolbarContext=function(WrappedComponent){return function(props){var t=React.useContext(RicosContext).t;return React__default.default.createElement(ToolbarContext.Consumer,null,(function(contexts){return React__default.default.createElement(WrappedComponent,_extends__default.default({},props,{context:_extends__default.default({},contexts,{t:t})}))}))}},exports.withUploadContext=function(Component){return function(props){return React__default.default.createElement(UploadContext.Consumer,null,(function(_ref3){var uploadService=_ref3.uploadService,updateService=_ref3.updateService;return React__default.default.createElement(Component,_extends__default.default({},props,{uploadService:uploadService,updateService:updateService}))}))}}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import _extends from"@babel/runtime/helpers/extends";import React,{useContext}from"react";var EditorContext=React.createContext(null),EditorContextProvider=function(_ref){var editor=_ref.editor,children=_ref.children;return React.createElement(EditorContext.Provider,{value:editor},children)},EditorContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(EditorContext.Consumer,null,(function(value){return children(value)}))};function withEditorContext(Component){return function(props){return React.createElement(EditorContextConsumer,null,(function(editor){return React.createElement(Component,_extends({},props,{editor:editor}))}))}}var RicosContext=React.createContext({locale:"en",localeContent:"en",experiments:{},isMobile:!1,t:function(text){return text},languageDir:"ltr",theme:{},portal:null,debugMode:[]}),RicosContextProvider=function(_ref){var children=_ref.children,isMobile=_ref.isMobile,locale=_ref.locale,localeContent=_ref.localeContent,experiments=_ref.experiments,languageDir=_ref.languageDir,theme=_ref.theme,t=_ref.t,portal=_ref.portal,_ref$debugMode=_ref.debugMode,debugMode=void 0===_ref$debugMode?[]:_ref$debugMode;return React.createElement(RicosContext.Provider,{value:{t:t,locale:locale,localeContent:localeContent,isMobile:isMobile,experiments:experiments,languageDir:languageDir,theme:theme,portal:portal,debugMode:debugMode}},React.cloneElement(React.Children.only(children)))};function withRicosContext(Component){return function(props){return React.createElement(RicosContext.Consumer,null,(function(value){return React.createElement(Component,_extends({},props,{ricosContext:value}))}))}}var RicosContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(RicosContext.Consumer,null,(function(value){return children(value)}))},ToolbarContext=React.createContext({contentId:"",isMobile:!1,theme:{},locale:"en",helpers:{},plugins:[],linkPanelData:void 0,headingsData:void 0,linkSettings:{},experiments:{},toolbarSettings:{},cssOverride:{},getEditorCommands:function(){return{}},portal:null,toolbars:null,colorPickerData:{},defaultLineSpacing:{}}),withToolbarContext=function(WrappedComponent){return function(props){var t=useContext(RicosContext).t;return React.createElement(ToolbarContext.Consumer,null,(function(contexts){return React.createElement(WrappedComponent,_extends({},props,{context:_extends({},contexts,{t:t})}))}))}},EventsContext=React.createContext(null),EventsContextProvider=function(_ref){var events=_ref.events,children=_ref.children;return React.createElement(EventsContext.Provider,{value:events},children)},EventsContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(EventsContext.Consumer,null,(function(value){return children(value)}))};function withEventsContext(Component){return function(props){return React.createElement(EventsContextConsumer,null,(function(value){return React.createElement(Component,_extends({},props,{events:value}))}))}}var ModalContext=React.createContext(null),ModalContextProvider=function(_ref){var modalService=_ref.modalService,children=_ref.children;return React.createElement(ModalContext.Provider,{value:modalService},children)},ModalContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(ModalContext.Consumer,null,(function(value){return children(value)}))};function withModalContext(Component){return function(props){return React.createElement(ModalContext.Consumer,null,(function(modalService){return React.createElement(Component,_extends({},props,{modalService:modalService}))}))}}var ShortcutsContext=React.createContext(null),ShortcutsContextProvider=function(_ref){var shortcuts=_ref.shortcuts,children=_ref.children;return React.createElement(ShortcutsContext.Provider,{value:shortcuts},children)},ShortcutsContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(ShortcutsContext.Consumer,null,(function(value){return children(value)}))};function withShortcutsContext(Component){return function(props){return React.createElement(ShortcutsContextConsumer,null,(function(shortcuts){return React.createElement(Component,_extends({},props,{shortcuts:shortcuts}))}))}}var StylesContext=React.createContext(null),StylesContextProvider=function(_ref){var styles=_ref.styles,children=_ref.children;return React.createElement(StylesContext.Provider,{value:styles},children)},StylesContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(StylesContext.Consumer,null,(function(value){return children(value)}))};function withStylesContext(Component){return function(props){return React.createElement(StylesContextConsumer,null,(function(value){return React.createElement(Component,_extends({},props,{styles:value}))}))}}var PluginsContext=React.createContext(null),PluginsContextProvider=function(_ref){var plugins=_ref.plugins,children=_ref.children;return React.createElement(PluginsContext.Provider,{value:plugins},children)},withPluginsContext=function(WrappedComponent){return function(props){return React.createElement(PluginsContext.Consumer,null,(function(plugins){return React.createElement(WrappedComponent,_extends({},props,{plugins:plugins}))}))}},UploadContext=React.createContext(null),UploadContextProvider=function(_ref){var uploadService=_ref.uploadService,updateService=_ref.updateService,children=_ref.children;return React.createElement(UploadContext.Provider,{value:{uploadService:uploadService,updateService:updateService}},children)},UploadContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(UploadContext.Consumer,null,(function(value){return children(value)}))};function withUploadContext(Component){return function(props){return React.createElement(UploadContext.Consumer,null,(function(_ref3){var uploadService=_ref3.uploadService,updateService=_ref3.updateService;return React.createElement(Component,_extends({},props,{uploadService:uploadService,updateService:updateService}))}))}}var PluginsEventsContext=React.createContext(null),PluginsEventsContextProvider=function(_ref){var pluginsEvents=_ref.pluginsEvents,children=_ref.children;return React.createElement(PluginsEventsContext.Provider,{value:pluginsEvents},children)},withPluginsEventsContext=function(WrappedComponent){return function(props){return React.createElement(PluginsEventsContext.Consumer,null,(function(pluginsEvents){return React.createElement(WrappedComponent,_extends({},props,{pluginsEvents:pluginsEvents}))}))}},ZIndexContext=React.createContext(null),ZIndexContextProvider=function(_ref){var zIndexService=_ref.zIndexService,children=_ref.children;return React.createElement(ZIndexContext.Provider,{value:zIndexService},children)};export{EditorContext,EditorContextConsumer,EditorContextProvider,EventsContext,EventsContextConsumer,EventsContextProvider,ModalContext,ModalContextConsumer,ModalContextProvider,PluginsContext,PluginsContextProvider,PluginsEventsContext,PluginsEventsContextProvider,RicosContext,RicosContextConsumer,RicosContextProvider,ShortcutsContext,ShortcutsContextConsumer,ShortcutsContextProvider,StylesContext,StylesContextConsumer,StylesContextProvider,ToolbarContext,UploadContext,UploadContextConsumer,UploadContextProvider,ZIndexContext,ZIndexContextProvider,withEditorContext,withEventsContext,withModalContext,withPluginsContext,withPluginsEventsContext,withRicosContext,withShortcutsContext,withStylesContext,withToolbarContext,withUploadContext}; | ||
import _extends from"@babel/runtime/helpers/extends";import React,{useContext}from"react";var EditorContext=React.createContext(null),EditorContextProvider=function(_ref){var editor=_ref.editor,children=_ref.children;return React.createElement(EditorContext.Provider,{value:editor},children)},EditorContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(EditorContext.Consumer,null,(function(value){return children(value)}))};function withEditorContext(Component){return function(props){return React.createElement(EditorContextConsumer,null,(function(editor){return React.createElement(Component,_extends({},props,{editor:editor}))}))}}var RicosContext=React.createContext({locale:"en",localeContent:"en",experiments:{},isMobile:!1,t:function(text){return text},languageDir:"ltr",theme:{},portal:null,debugMode:[]}),RicosContextProvider=function(_ref){var children=_ref.children,isMobile=_ref.isMobile,locale=_ref.locale,localeContent=_ref.localeContent,experiments=_ref.experiments,languageDir=_ref.languageDir,theme=_ref.theme,t=_ref.t,portal=_ref.portal,editorExternalContainer=_ref.editorExternalContainer,_ref$debugMode=_ref.debugMode,debugMode=void 0===_ref$debugMode?[]:_ref$debugMode;return React.createElement(RicosContext.Provider,{value:{t:t,locale:locale,localeContent:localeContent,isMobile:isMobile,experiments:experiments,languageDir:languageDir,theme:theme,portal:portal,debugMode:debugMode,editorExternalContainer:editorExternalContainer}},React.cloneElement(React.Children.only(children)))};function withRicosContext(Component){return function(props){return React.createElement(RicosContext.Consumer,null,(function(value){return React.createElement(Component,_extends({},props,{ricosContext:value}))}))}}var RicosContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(RicosContext.Consumer,null,(function(value){return children(value)}))},ToolbarContext=React.createContext({contentId:"",isMobile:!1,theme:{},locale:"en",helpers:{},plugins:[],linkPanelData:void 0,headingsData:void 0,linkSettings:{},experiments:{},toolbarSettings:{},cssOverride:{},getEditorCommands:function(){return{}},portal:null,toolbars:null,colorPickerData:{},defaultLineSpacing:{}}),withToolbarContext=function(WrappedComponent){return function(props){var t=useContext(RicosContext).t;return React.createElement(ToolbarContext.Consumer,null,(function(contexts){return React.createElement(WrappedComponent,_extends({},props,{context:_extends({},contexts,{t:t})}))}))}},EventsContext=React.createContext(null),EventsContextProvider=function(_ref){var events=_ref.events,children=_ref.children;return React.createElement(EventsContext.Provider,{value:events},children)},EventsContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(EventsContext.Consumer,null,(function(value){return children(value)}))};function withEventsContext(Component){return function(props){return React.createElement(EventsContextConsumer,null,(function(value){return React.createElement(Component,_extends({},props,{events:value}))}))}}var ModalContext=React.createContext(null),ModalContextProvider=function(_ref){var modalService=_ref.modalService,children=_ref.children;return React.createElement(ModalContext.Provider,{value:modalService},children)},ModalContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(ModalContext.Consumer,null,(function(value){return children(value)}))};function withModalContext(Component){return function(props){return React.createElement(ModalContext.Consumer,null,(function(modalService){return React.createElement(Component,_extends({},props,{modalService:modalService}))}))}}var ShortcutsContext=React.createContext(null),ShortcutsContextProvider=function(_ref){var shortcuts=_ref.shortcuts,children=_ref.children;return React.createElement(ShortcutsContext.Provider,{value:shortcuts},children)},ShortcutsContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(ShortcutsContext.Consumer,null,(function(value){return children(value)}))};function withShortcutsContext(Component){return function(props){return React.createElement(ShortcutsContextConsumer,null,(function(shortcuts){return React.createElement(Component,_extends({},props,{shortcuts:shortcuts}))}))}}var StylesContext=React.createContext(null),StylesContextProvider=function(_ref){var styles=_ref.styles,children=_ref.children;return React.createElement(StylesContext.Provider,{value:styles},children)},StylesContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(StylesContext.Consumer,null,(function(value){return children(value)}))};function withStylesContext(Component){return function(props){return React.createElement(StylesContextConsumer,null,(function(value){return React.createElement(Component,_extends({},props,{styles:value}))}))}}var PluginsContext=React.createContext(null),PluginsContextProvider=function(_ref){var plugins=_ref.plugins,children=_ref.children;return React.createElement(PluginsContext.Provider,{value:plugins},children)},withPluginsContext=function(WrappedComponent){return function(props){return React.createElement(PluginsContext.Consumer,null,(function(plugins){return React.createElement(WrappedComponent,_extends({},props,{plugins:plugins}))}))}},UploadContext=React.createContext(null),UploadContextProvider=function(_ref){var uploadService=_ref.uploadService,updateService=_ref.updateService,children=_ref.children;return React.createElement(UploadContext.Provider,{value:{uploadService:uploadService,updateService:updateService}},children)},UploadContextConsumer=function(_ref2){var children=_ref2.children;return React.createElement(UploadContext.Consumer,null,(function(value){return children(value)}))};function withUploadContext(Component){return function(props){return React.createElement(UploadContext.Consumer,null,(function(_ref3){var uploadService=_ref3.uploadService,updateService=_ref3.updateService;return React.createElement(Component,_extends({},props,{uploadService:uploadService,updateService:updateService}))}))}}var PluginsEventsContext=React.createContext(null),PluginsEventsContextProvider=function(_ref){var pluginsEvents=_ref.pluginsEvents,children=_ref.children;return React.createElement(PluginsEventsContext.Provider,{value:pluginsEvents},children)},withPluginsEventsContext=function(WrappedComponent){return function(props){return React.createElement(PluginsEventsContext.Consumer,null,(function(pluginsEvents){return React.createElement(WrappedComponent,_extends({},props,{pluginsEvents:pluginsEvents}))}))}},ZIndexContext=React.createContext(null),ZIndexContextProvider=function(_ref){var zIndexService=_ref.zIndexService,children=_ref.children;return React.createElement(ZIndexContext.Provider,{value:zIndexService},children)};export{EditorContext,EditorContextConsumer,EditorContextProvider,EventsContext,EventsContextConsumer,EventsContextProvider,ModalContext,ModalContextConsumer,ModalContextProvider,PluginsContext,PluginsContextProvider,PluginsEventsContext,PluginsEventsContextProvider,RicosContext,RicosContextConsumer,RicosContextProvider,ShortcutsContext,ShortcutsContextConsumer,ShortcutsContextProvider,StylesContext,StylesContextConsumer,StylesContextProvider,ToolbarContext,UploadContext,UploadContextConsumer,UploadContextProvider,ZIndexContext,ZIndexContextProvider,withEditorContext,withEventsContext,withModalContext,withPluginsContext,withPluginsEventsContext,withRicosContext,withShortcutsContext,withStylesContext,withToolbarContext,withUploadContext}; | ||
//# sourceMappingURL=index.js.map |
@@ -5,3 +5,3 @@ import type { ComponentType } from 'react'; | ||
export declare const RicosContext: React.Context<GeneralContext>; | ||
export declare const RicosContextProvider: ({ children, isMobile, locale, localeContent, experiments, languageDir, theme, t, portal, debugMode, }: { | ||
export declare const RicosContextProvider: ({ children, isMobile, locale, localeContent, experiments, languageDir, theme, t, portal, editorExternalContainer, debugMode, }: { | ||
children: any; | ||
@@ -16,2 +16,3 @@ isMobile: any; | ||
portal: any; | ||
editorExternalContainer: any; | ||
debugMode?: DebugMode[] | undefined; | ||
@@ -18,0 +19,0 @@ }) => JSX.Element; |
{ | ||
"name": "ricos-context", | ||
"version": "8.72.50", | ||
"version": "8.72.51", | ||
"author": { | ||
@@ -37,6 +37,6 @@ "name": "Alex Greenstein", | ||
"dependencies": { | ||
"ricos-types": "8.72.50" | ||
"ricos-types": "8.72.51" | ||
}, | ||
"devDependencies": { | ||
"ricos-common": "8.72.50" | ||
"ricos-common": "8.72.51" | ||
}, | ||
@@ -43,0 +43,0 @@ "unpkg": true, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71642
263
+ Addedricos-content@8.72.51(transitive)
+ Addedricos-schema@8.72.51(transitive)
+ Addedricos-types@8.72.51(transitive)
- Removedricos-content@8.72.50(transitive)
- Removedricos-schema@8.72.50(transitive)
- Removedricos-types@8.72.50(transitive)
Updatedricos-types@8.72.51