UNPKG

@eeacms/react-chart-editor

Version:

plotly.js chart editor react component UI

2 lines 3.51 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.SUPERSCRIPT=exports.SUBSCRIPT=exports.STYLE_MAP=exports.STYLES_TO_HTML_TAGS=exports.LINK=exports.ITALIC=exports.INLINE_STYLES=exports.BOLD=void 0;var _react=_interopRequireDefault(require("react"));var _draftJsUtils=require("draft-js-utils");var _plotlyIcons=require("plotly-icons");var _constants=require("../../../../lib/constants");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(function(){var enterModule=typeof reactHotLoaderGlobal!=="undefined"?reactHotLoaderGlobal.enterModule:undefined;enterModule&&enterModule(module)})();var __signature__=typeof reactHotLoaderGlobal!=="undefined"?reactHotLoaderGlobal.default.signature:function(a){return a};const SUPERSCRIPT=exports.SUPERSCRIPT="SUPERSCRIPT";const SUBSCRIPT=exports.SUBSCRIPT="SUBSCRIPT";const LINK=exports.LINK="LINK";const{BOLD,ITALIC}=_draftJsUtils.INLINE_STYLE;exports.ITALIC=ITALIC;exports.BOLD=BOLD;const STYLES_TO_HTML_TAGS=exports.STYLES_TO_HTML_TAGS={[BOLD]:{element:"b"},[ITALIC]:{element:"i"},[SUPERSCRIPT]:{element:"sup"},[SUBSCRIPT]:{element:"sub"},[LINK]:{element:"a"}};const STYLE_MAP=exports.STYLE_MAP={[BOLD]:{fontWeight:"bolder"},[ITALIC]:{fontStyle:"italic"},[SUBSCRIPT]:{lineHeight:0,fontSize:"65%",position:"relative",bottom:"-3px"},[SUPERSCRIPT]:{lineHeight:0,fontSize:"65%",position:"relative",top:"-5px"},[LINK]:{color:_constants.COLORS.editorLink,linkDecoration:"none",cursor:"pointer"}};const INLINE_STYLES=exports.INLINE_STYLES=[{label:_react.default.createElement("span",{style:STYLE_MAP[BOLD]},"B"),value:BOLD},{label:_react.default.createElement("span",{style:STYLE_MAP[ITALIC]},"I"),value:ITALIC},{label:_react.default.createElement("span",null,"x",_react.default.createElement("span",{style:STYLE_MAP[SUBSCRIPT]},"2")),value:SUBSCRIPT},{label:_react.default.createElement("span",null,"x",_react.default.createElement("span",{style:STYLE_MAP[SUPERSCRIPT]},"2")),value:SUPERSCRIPT},{label:_react.default.createElement("span",null,_react.default.createElement(_plotlyIcons.LinkIcon,{className:"icon-link"})),value:LINK}];;(function(){var reactHotLoader=typeof reactHotLoaderGlobal!=="undefined"?reactHotLoaderGlobal.default:undefined;if(!reactHotLoader){return}reactHotLoader.register(SUPERSCRIPT,"SUPERSCRIPT","/react-chart-editor/src/components/widgets/text_editors/RichText/configuration.js");reactHotLoader.register(SUBSCRIPT,"SUBSCRIPT","/react-chart-editor/src/components/widgets/text_editors/RichText/configuration.js");reactHotLoader.register(LINK,"LINK","/react-chart-editor/src/components/widgets/text_editors/RichText/configuration.js");reactHotLoader.register(BOLD,"BOLD","/react-chart-editor/src/components/widgets/text_editors/RichText/configuration.js");reactHotLoader.register(ITALIC,"ITALIC","/react-chart-editor/src/components/widgets/text_editors/RichText/configuration.js");reactHotLoader.register(STYLES_TO_HTML_TAGS,"STYLES_TO_HTML_TAGS","/react-chart-editor/src/components/widgets/text_editors/RichText/configuration.js");reactHotLoader.register(STYLE_MAP,"STYLE_MAP","/react-chart-editor/src/components/widgets/text_editors/RichText/configuration.js");reactHotLoader.register(INLINE_STYLES,"INLINE_STYLES","/react-chart-editor/src/components/widgets/text_editors/RichText/configuration.js")})();;(function(){var leaveModule=typeof reactHotLoaderGlobal!=="undefined"?reactHotLoaderGlobal.leaveModule:undefined;leaveModule&&leaveModule(module)})(); //# sourceMappingURL=configuration.js.map