├── lib ├── index.d.ts ├── schemas │ ├── common.js │ ├── transform.js │ ├── common.js.map │ ├── transform.js.map │ └── common.d.ts ├── containers │ ├── sidebar │ │ ├── RowItems │ │ │ ├── index.d.ts │ │ │ ├── RowFactory.d.ts │ │ │ ├── index.js │ │ │ ├── index.js.map │ │ │ └── RowFactory.js.map │ │ ├── Property │ │ │ ├── items │ │ │ │ ├── Html.d.ts │ │ │ │ ├── Html.js │ │ │ │ ├── Html.js.map │ │ │ │ ├── Font.d.ts │ │ │ │ ├── Align.d.ts │ │ │ │ ├── LineHeight.d.ts │ │ │ │ ├── Link.d.ts │ │ │ │ ├── BorderRadius.d.ts │ │ │ │ ├── Switch.d.ts │ │ │ │ ├── Slide.d.ts │ │ │ │ ├── Color.d.ts │ │ │ │ ├── Input.d.ts │ │ │ │ ├── Line.d.ts │ │ │ │ ├── Number.d.ts │ │ │ │ ├── Colors.d.ts │ │ │ │ ├── Align.js.map │ │ │ │ ├── SocialItem.d.ts │ │ │ │ ├── Line.js.map │ │ │ │ ├── BorderRadius.js.map │ │ │ │ ├── Number.js.map │ │ │ │ ├── Switch.js.map │ │ │ │ ├── Input.js.map │ │ │ │ ├── index.d.ts │ │ │ │ ├── Font.js.map │ │ │ │ ├── index.js │ │ │ │ ├── Image.d.ts │ │ │ │ ├── LineHeight.js.map │ │ │ │ ├── Color.js.map │ │ │ │ ├── index.js.map │ │ │ │ ├── Align.js │ │ │ │ ├── Line.js │ │ │ │ ├── Link.js.map │ │ │ │ ├── BorderRadius.js │ │ │ │ ├── Slide.js.map │ │ │ │ ├── Font.js │ │ │ │ ├── Number.js │ │ │ │ ├── Input.js │ │ │ │ ├── LineHeight.js │ │ │ │ ├── Switch.js │ │ │ │ ├── Space.d.ts │ │ │ │ ├── Color.js │ │ │ │ ├── Slide.js │ │ │ │ └── Link.js │ │ │ ├── BodyProperty.d.ts │ │ │ ├── Group.d.ts │ │ │ ├── Property.d.ts │ │ │ ├── RowProperty.d.ts │ │ │ ├── BodyProperty.js.map │ │ │ ├── BodyProperty.js │ │ │ ├── Group.js.map │ │ │ ├── RowProperty.js.map │ │ │ └── RowProperty.js │ │ └── ContentItems │ │ │ ├── ContentFactory.d.ts │ │ │ └── ContentFactory.js.map │ ├── Main.d.ts │ ├── Wrapper.d.ts │ ├── common │ │ ├── PlaceHolder.d.ts │ │ ├── PlaceHolder.js │ │ ├── PlaceHolder.js.map │ │ ├── DragUtil.d.ts │ │ ├── Selector.d.ts │ │ ├── DragUtil.js.map │ │ ├── DragUtil.js │ │ └── Selector.js.map │ ├── Row.d.ts │ ├── Content.d.ts │ ├── Main.js │ ├── Main.js.map │ ├── extension │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── Extension.js.map │ │ ├── index.js.map │ │ ├── Html.d.ts │ │ ├── Text.d.ts │ │ ├── Social.d.ts │ │ ├── Divider.d.ts │ │ ├── ExtensionGroup.d.ts │ │ ├── Image.d.ts │ │ ├── Button.d.ts │ │ ├── ExtensionGroup.js.map │ │ ├── Extension.js │ │ ├── Extension.d.ts │ │ └── Html.js.map │ ├── SideBar.d.ts │ ├── Wrapper.js.map │ ├── Row.js.map │ ├── Body.d.ts │ ├── editor │ │ ├── Column.d.ts │ │ ├── Row.d.ts │ │ └── Content.d.ts │ ├── Content.js.map │ ├── Container.d.ts │ └── SideBar.js.map ├── lib │ ├── history.d.ts │ ├── transform.d.ts │ ├── values.js.map │ ├── values.d.ts │ ├── values.js │ ├── enum.js.map │ └── enum.d.ts ├── components │ ├── tinymce │ │ ├── autocomplete.d.ts │ │ ├── index.d.ts │ │ └── autocomplete.js.map │ ├── utils │ │ ├── util.d.ts │ │ ├── util.js.map │ │ └── util.js │ ├── form │ │ ├── Align.d.ts │ │ ├── Html.d.ts │ │ ├── Line.d.ts │ │ ├── Input.d.ts │ │ ├── Input.js.map │ │ ├── Number.d.ts │ │ ├── Html.js.map │ │ ├── Input.js │ │ ├── AutoCompletePanel.d.ts │ │ ├── Align.js.map │ │ ├── Html.js │ │ ├── Line.js.map │ │ └── Line.js │ ├── dialog │ │ ├── LazyRenderBox.d.ts │ │ └── LazyRenderBox.js.map │ ├── error │ │ ├── ErrorBoundary.d.ts │ │ ├── ErrorBoundary.js.map │ │ └── ErrorBoundary.js │ ├── portal │ │ ├── index.d.ts │ │ └── index.js.map │ ├── tabs │ │ ├── index.d.ts │ │ └── index.js.map │ ├── button │ │ ├── index.d.ts │ │ ├── index.js.map │ │ └── index.js │ ├── index.d.ts │ ├── index.js │ └── index.js.map ├── store │ ├── store.d.ts │ ├── store.js.map │ └── store.js ├── entry.js.map ├── entry.d.ts ├── entry.js ├── Video.d.ts ├── index.js.map └── index.js ├── .eslintignore ├── dist ├── sources │ └── fonts │ │ ├── icons.eot │ │ ├── icons.ttf │ │ └── icons.woff └── skins │ └── lightgray │ ├── img │ ├── trans.gif │ ├── anchor.gif │ ├── loader.gif │ └── object.gif │ ├── fonts │ ├── tinymce.eot │ ├── tinymce.ttf │ ├── tinymce.woff │ ├── tinymce-small.eot │ ├── tinymce-small.ttf │ ├── tinymce-mobile.woff │ └── tinymce-small.woff │ └── content.mobile.min.css ├── src ├── containers │ ├── sidebar │ │ ├── Property │ │ │ ├── items │ │ │ │ ├── Html.tsx │ │ │ │ ├── Align.tsx │ │ │ │ ├── BorderRadius.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── Line.tsx │ │ │ │ ├── Number.tsx │ │ │ │ ├── Font.tsx │ │ │ │ ├── Switch.tsx │ │ │ │ ├── Input.tsx │ │ │ │ ├── LineHeight.tsx │ │ │ │ ├── Color.tsx │ │ │ │ ├── Slide.tsx │ │ │ │ └── Link.tsx │ │ │ ├── BodyProperty.tsx │ │ │ ├── Group.tsx │ │ │ └── RowProperty.tsx │ │ ├── RowItems │ │ │ ├── index.ts │ │ │ └── RowFactory.tsx │ │ └── ContentItems │ │ │ └── ContentFactory.tsx │ ├── Main.tsx │ ├── common │ │ ├── PlaceHolder.tsx │ │ ├── DragUtil.ts │ │ └── Selector.tsx │ ├── extension │ │ ├── index.ts │ │ ├── ExtensionGroup.tsx │ │ └── Extension.tsx │ ├── Row.tsx │ ├── Wrapper.tsx │ ├── Content.tsx │ └── SideBar.tsx ├── schemas │ └── common.ts ├── store │ └── store.ts ├── sources │ └── icons │ │ ├── text.svg │ │ ├── plus.svg │ │ ├── divider.svg │ │ ├── body.svg │ │ ├── menu.svg │ │ ├── button.svg │ │ ├── drag-handler.svg │ │ ├── play-button.svg │ │ ├── block.svg │ │ ├── down.svg │ │ ├── video.svg │ │ ├── copy.svg │ │ ├── preview.svg │ │ ├── up.svg │ │ ├── email.svg │ │ ├── html.svg │ │ ├── import.svg │ │ ├── export.svg │ │ ├── youtube2.svg │ │ ├── linkedin.svg │ │ ├── twitter.svg │ │ └── trash.svg ├── index.html ├── entry.ts ├── lib │ └── values.ts ├── typings │ └── index.d.ts ├── components │ ├── index.ts │ ├── form │ │ ├── Input.tsx │ │ ├── Html.tsx │ │ ├── Align.tsx │ │ └── Line.tsx │ ├── error │ │ └── ErrorBoundary.tsx │ ├── dialog │ │ └── LazyRenderBox.tsx │ ├── button │ │ ├── index.tsx │ │ └── index.less │ ├── react-animate-css │ │ ├── slide-top-bottom-fade.less │ │ ├── slide-left-right.less │ │ └── slide-left-right-fade.less │ ├── portal │ │ └── index.tsx │ ├── utils │ │ └── util.ts │ ├── tinymce │ │ └── autocomplete.ts │ └── tabs │ │ └── index.tsx ├── index.tsx └── style │ ├── layout.css │ └── reset.css ├── postcss.config.js ├── .gitignore ├── SECURITY.md ├── tsconfig.json └── LICENSE /lib/index.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /lib/schemas/common.js: -------------------------------------------------------------------------------- 1 | //# sourceMappingURL=common.js.map -------------------------------------------------------------------------------- /lib/schemas/transform.js: -------------------------------------------------------------------------------- 1 | //# sourceMappingURL=transform.js.map -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | dist/* 3 | build/dll/* 4 | build/* 5 | *.test.ts 6 | *.test.tsx 7 | *.d.ts -------------------------------------------------------------------------------- /lib/containers/sidebar/RowItems/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: any[]; 2 | export default _default; 3 | -------------------------------------------------------------------------------- /dist/sources/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/sources/fonts/icons.eot -------------------------------------------------------------------------------- /dist/sources/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/sources/fonts/icons.ttf -------------------------------------------------------------------------------- /dist/sources/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/sources/fonts/icons.woff -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Html.d.ts: -------------------------------------------------------------------------------- 1 | import { Html } from '../../../../components'; 2 | export default Html; 3 | -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/Html.tsx: -------------------------------------------------------------------------------- 1 | import { Html } from '../../../../components'; 2 | 3 | export default Html; -------------------------------------------------------------------------------- /lib/containers/Main.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const Main: () => JSX.Element; 3 | export default Main; 4 | -------------------------------------------------------------------------------- /dist/skins/lightgray/img/trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/skins/lightgray/img/trans.gif -------------------------------------------------------------------------------- /dist/skins/lightgray/img/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/skins/lightgray/img/anchor.gif -------------------------------------------------------------------------------- /dist/skins/lightgray/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/skins/lightgray/img/loader.gif -------------------------------------------------------------------------------- /dist/skins/lightgray/img/object.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/skins/lightgray/img/object.gif -------------------------------------------------------------------------------- /dist/skins/lightgray/fonts/tinymce.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/skins/lightgray/fonts/tinymce.eot -------------------------------------------------------------------------------- /dist/skins/lightgray/fonts/tinymce.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/skins/lightgray/fonts/tinymce.ttf -------------------------------------------------------------------------------- /dist/skins/lightgray/fonts/tinymce.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/skins/lightgray/fonts/tinymce.woff -------------------------------------------------------------------------------- /lib/schemas/common.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/schemas/common.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /dist/skins/lightgray/fonts/tinymce-small.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/skins/lightgray/fonts/tinymce-small.eot -------------------------------------------------------------------------------- /dist/skins/lightgray/fonts/tinymce-small.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/skins/lightgray/fonts/tinymce-small.ttf -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Html.js: -------------------------------------------------------------------------------- 1 | import { Html } from '../../../../components'; 2 | export default Html; 3 | //# sourceMappingURL=Html.js.map -------------------------------------------------------------------------------- /lib/schemas/transform.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"transform.js","sourceRoot":"","sources":["../../src/schemas/transform.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer')({ 4 | browsers: ['last 5 versions'] 5 | }) 6 | ] 7 | } -------------------------------------------------------------------------------- /dist/skins/lightgray/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/skins/lightgray/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /dist/skins/lightgray/fonts/tinymce-small.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shareworksgroup/DesignEditor/HEAD/dist/skins/lightgray/fonts/tinymce-small.woff -------------------------------------------------------------------------------- /lib/containers/sidebar/RowItems/RowFactory.d.ts: -------------------------------------------------------------------------------- 1 | declare function RowFactory(rowType: any, segmentations?: number[]): any; 2 | export default RowFactory; 3 | -------------------------------------------------------------------------------- /lib/containers/Wrapper.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | declare class Wrapper extends React.Component { 3 | render(): JSX.Element; 4 | } 5 | export default Wrapper; 6 | -------------------------------------------------------------------------------- /lib/lib/history.d.ts: -------------------------------------------------------------------------------- 1 | export declare const record: (delay?: number) => Function; 2 | export declare const UndoRedoApi: { 3 | undo: () => void; 4 | redo: () => void; 5 | }; 6 | -------------------------------------------------------------------------------- /src/containers/Main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Body from './Body'; 3 | 4 | const Main = () =>
; 5 | 6 | export default Main; -------------------------------------------------------------------------------- /lib/containers/sidebar/ContentItems/ContentFactory.d.ts: -------------------------------------------------------------------------------- 1 | declare function ContentFactory(contentType: string, label: string, iconClass: string): any; 2 | export default ContentFactory; 3 | -------------------------------------------------------------------------------- /lib/containers/common/PlaceHolder.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const _default: ({ style }: { 3 | style?: IKeyValueMap; 4 | }) => JSX.Element; 5 | export default _default; 6 | -------------------------------------------------------------------------------- /src/containers/common/PlaceHolder.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default ({ style }: { style?: IKeyValueMap }) =>
4 | Drag it here 5 |
; 6 | -------------------------------------------------------------------------------- /lib/containers/Row.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | declare class Row extends React.Component { 3 | render(): JSX.Element; 4 | } 5 | interface IRowProps { 6 | rootStore?: any; 7 | } 8 | export default Row; 9 | -------------------------------------------------------------------------------- /lib/containers/Content.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | declare class Content extends React.Component { 3 | render(): any; 4 | } 5 | interface IContentProps { 6 | rootStore?: any; 7 | } 8 | export default Content; 9 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Html.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Html.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/Html.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,eAAe,IAAI,CAAC"} -------------------------------------------------------------------------------- /dist/skins/lightgray/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{position:absolute;display:inline-block;background-color:green;opacity:.5}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%} -------------------------------------------------------------------------------- /lib/components/tinymce/autocomplete.d.ts: -------------------------------------------------------------------------------- 1 | export default class AutoComplete { 2 | private editor; 3 | private matchReg; 4 | private callback; 5 | on(editor: any, matchReg: RegExp, callback?: Function): void; 6 | private onInput; 7 | off(): void; 8 | } 9 | -------------------------------------------------------------------------------- /lib/containers/Main.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Body from './Body'; 3 | var Main = function () { return React.createElement("div", { className: "ds_main" }, 4 | React.createElement(Body, null)); }; 5 | export default Main; 6 | //# sourceMappingURL=Main.js.map -------------------------------------------------------------------------------- /lib/components/utils/util.d.ts: -------------------------------------------------------------------------------- 1 | declare const Util: { 2 | isParent: (obj: any, parentObj: any) => boolean; 3 | outClick: (target: any, callback: any) => { 4 | cancel: () => void; 5 | }; 6 | canceloutClick: (target: any) => void; 7 | }; 8 | export default Util; 9 | -------------------------------------------------------------------------------- /lib/store/store.d.ts: -------------------------------------------------------------------------------- 1 | import { IRootStore } from '../schemas/common'; 2 | import DesignState from './DesignState'; 3 | declare class RootStore implements IRootStore { 4 | DesignState: DesignState; 5 | constructor(); 6 | } 7 | declare const _default: RootStore; 8 | export default _default; 9 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Font.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const Font: ({ title, fontFamily, onUpdate }: IFontProps) => JSX.Element; 3 | interface IFontProps { 4 | title?: string; 5 | fontFamily?: string; 6 | onUpdate?: onUpdate; 7 | } 8 | export default Font; 9 | -------------------------------------------------------------------------------- /lib/containers/Main.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Main.js","sourceRoot":"","sources":["../../src/containers/Main.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,IAAM,IAAI,GAAG,cAAM,OAAA,6BAAK,SAAS,EAAC,SAAS;IAAC,oBAAC,IAAI,OAAG,CAAM,EAAvC,CAAuC,CAAC;AAE3D,eAAe,IAAI,CAAC"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Align.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const AlignItem: ({ align, title, onUpdate }: IAlignItemProps) => JSX.Element; 3 | interface IAlignItemProps { 4 | align?: TextAlgin; 5 | title?: string; 6 | onUpdate?: onUpdate; 7 | } 8 | export default AlignItem; 9 | -------------------------------------------------------------------------------- /src/containers/extension/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Button } from './Button'; 2 | export { default as Divider } from './Divider'; 3 | export { default as Html } from './Html'; 4 | export { default as Image } from './Image'; 5 | export { default as Text } from './Text'; 6 | export { default as Social } from './Social'; -------------------------------------------------------------------------------- /lib/containers/extension/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as Button } from './Button'; 2 | export { default as Divider } from './Divider'; 3 | export { default as Html } from './Html'; 4 | export { default as Image } from './Image'; 5 | export { default as Text } from './Text'; 6 | export { default as Social } from './Social'; 7 | -------------------------------------------------------------------------------- /lib/components/form/Align.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './index.less'; 3 | declare class Align extends React.Component { 4 | render(): JSX.Element; 5 | } 6 | interface IAlignProps { 7 | align?: TextAlgin; 8 | onChange?: (align: TextAlgin) => void; 9 | } 10 | export default Align; 11 | -------------------------------------------------------------------------------- /lib/containers/common/PlaceHolder.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | export default (function (_a) { 3 | var style = _a.style; 4 | return React.createElement("div", { className: "ds_placeholder", style: style }, 5 | React.createElement("span", null, "Drag it here")); 6 | }); 7 | //# sourceMappingURL=PlaceHolder.js.map -------------------------------------------------------------------------------- /lib/containers/common/PlaceHolder.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"PlaceHolder.js","sourceRoot":"","sources":["../../../src/containers/common/PlaceHolder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,gBAAe,UAAC,EAAmC;QAAjC,gBAAK;IAAiC,OAAA,6BAAK,SAAS,EAAC,gBAAgB,EAAC,KAAK,EAAE,KAAK;QAClG,iDAAyB,CACrB;AAFkD,CAElD,EAAC"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/LineHeight.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const LineHeight: ({ lineHeight, title, onUpdate }: ILineHeightProps) => JSX.Element; 3 | interface ILineHeightProps { 4 | lineHeight?: number; 5 | title?: string; 6 | onUpdate?: onUpdate; 7 | } 8 | export default LineHeight; 9 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Link.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const Link: ({ title, linkType, link, onUpdate }: ILinkProps) => JSX.Element; 3 | interface ILinkProps { 4 | title?: string; 5 | linkType?: string; 6 | link?: string; 7 | onUpdate?: onUpdate; 8 | } 9 | export default Link; 10 | -------------------------------------------------------------------------------- /lib/components/form/Html.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import './html/prism.css'; 3 | declare const _default: ({ value, onChange, style }: IHtmlProps) => JSX.Element; 4 | export default _default; 5 | interface IHtmlProps { 6 | value?: string; 7 | onChange?: (value: string) => void; 8 | style?: IKeyValueMap; 9 | } 10 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/BorderRadius.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const BorderRadius: ({ borderRadius, title, onUpdate }: IBorderRadiusProps) => JSX.Element; 3 | interface IBorderRadiusProps { 4 | borderRadius?: number; 5 | title?: string; 6 | onUpdate?: onUpdate; 7 | } 8 | export default BorderRadius; 9 | -------------------------------------------------------------------------------- /lib/containers/extension/index.js: -------------------------------------------------------------------------------- 1 | export { default as Button } from './Button'; 2 | export { default as Divider } from './Divider'; 3 | export { default as Html } from './Html'; 4 | export { default as Image } from './Image'; 5 | export { default as Text } from './Text'; 6 | export { default as Social } from './Social'; 7 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/containers/common/DragUtil.d.ts: -------------------------------------------------------------------------------- 1 | export declare const getSource: >(data?: {}, transform?: (T: any) => T) => { 2 | beginDrag(props: T): {}; 3 | canDrag: (props: any) => boolean; 4 | }; 5 | export declare const getCollect: () => (connect: any, monitor: any) => { 6 | connectDragSource: any; 7 | isDragging: any; 8 | }; 9 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Switch.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const SwitchItem: ({ title, checked, attribute, onUpdate }: ISwitchItemProps) => JSX.Element; 3 | interface ISwitchItemProps { 4 | title?: string; 5 | checked?: boolean; 6 | attribute?: string; 7 | onUpdate?: onUpdate; 8 | } 9 | export default SwitchItem; 10 | -------------------------------------------------------------------------------- /lib/schemas/common.d.ts: -------------------------------------------------------------------------------- 1 | export interface IRootStore { 2 | DesignState: any; 3 | } 4 | export interface IStoreProps { 5 | rootStore: IRootStore; 6 | } 7 | export interface IDndProps { 8 | connectDropTarget: Function; 9 | isOver: boolean; 10 | canDrop: boolean; 11 | } 12 | export interface IRGBA { 13 | rgb: string; 14 | alpha: number; 15 | } 16 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Slide.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import 'rc-slider/assets/index.css'; 3 | declare const Slide: ({ title, value, attribute, onUpdate }: ISlideProps) => JSX.Element; 4 | interface ISlideProps { 5 | title?: string; 6 | value?: number; 7 | attribute?: string; 8 | onUpdate?: onUpdate; 9 | } 10 | export default Slide; 11 | -------------------------------------------------------------------------------- /src/schemas/common.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | export interface IRootStore { 4 | DesignState: any; 5 | } 6 | 7 | export interface IStoreProps { 8 | rootStore: IRootStore; 9 | } 10 | 11 | export interface IDndProps { 12 | connectDropTarget: Function; 13 | isOver: boolean; 14 | canDrop: boolean; 15 | } 16 | 17 | export interface IRGBA { 18 | rgb: string; 19 | alpha: number; 20 | } 21 | -------------------------------------------------------------------------------- /lib/containers/SideBar.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | declare class SideBar extends React.Component { 3 | state: { 4 | active: number; 5 | }; 6 | onUpdate: (key: any, value: any) => void; 7 | onTabClick: () => void; 8 | render(): JSX.Element; 9 | } 10 | interface ISideBarProps { 11 | rootStore?: any; 12 | } 13 | export default SideBar; 14 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Color.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import 'rc-color-picker/assets/index.css'; 3 | declare const Color: ({ title, value, attribute, onUpdate }: IColorProps) => JSX.Element; 4 | interface IColorProps { 5 | title?: string; 6 | value?: string; 7 | attribute?: string; 8 | onUpdate?: onUpdate; 9 | } 10 | export default Color; 11 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Input.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const InputItem: ({ title, value, attribute, desc, onUpdate }: IInputItemProps) => JSX.Element; 3 | interface IInputItemProps { 4 | title?: string; 5 | value?: string; 6 | attribute?: string; 7 | desc?: string; 8 | onUpdate?: onUpdate; 9 | } 10 | export default InputItem; 11 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Line.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const LineItem: ({ title, lineWidth, lineStyle, lineColor, onUpdate }: ILineItemProps) => JSX.Element; 3 | interface ILineItemProps { 4 | title?: string; 5 | lineWidth?: number; 6 | lineStyle?: string; 7 | lineColor?: string; 8 | onUpdate?: onUpdate; 9 | } 10 | export default LineItem; 11 | -------------------------------------------------------------------------------- /lib/store/store.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store/store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,SAAS,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC;AAE1C;IAIE;QACE,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1D,CAAC;IACH,gBAAC;AAAD,CAAC,AAPD,IAOC;AAED,eAAe,IAAI,SAAS,EAAE,CAAC"} -------------------------------------------------------------------------------- /lib/store/store.js: -------------------------------------------------------------------------------- 1 | import { configure } from 'mobx'; 2 | import DesignState from './DesignState'; 3 | configure({ enforceActions: 'observed' }); 4 | var RootStore = /** @class */ (function () { 5 | function RootStore() { 6 | this.DesignState = new DesignState({ rootStore: this }); 7 | } 8 | return RootStore; 9 | }()); 10 | export default new RootStore(); 11 | //# sourceMappingURL=store.js.map -------------------------------------------------------------------------------- /lib/components/form/Line.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import 'rc-color-picker/assets/index.css'; 3 | import './index.less'; 4 | declare const _default: ({ lineWidth, lineStyle, lineColor, onUpdate }: ILineProps) => JSX.Element; 5 | export default _default; 6 | interface ILineProps { 7 | lineWidth?: number; 8 | lineStyle?: string; 9 | lineColor?: string; 10 | onUpdate?: onUpdate; 11 | } 12 | -------------------------------------------------------------------------------- /lib/components/form/Input.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './index.less'; 3 | declare const _default: ({ addOn, value, className, style, onChange }: IInputProps) => JSX.Element; 4 | export default _default; 5 | interface IInputProps { 6 | addOn?: string; 7 | value?: string; 8 | className?: string; 9 | style?: IKeyValueMap; 10 | onChange?: (event: React.ChangeEvent) => void; 11 | } 12 | -------------------------------------------------------------------------------- /lib/containers/extension/Extension.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Extension.js","sourceRoot":"","sources":["../../../src/containers/extension/Extension.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC;IAA6C,6BAAuC;IAApF;;IAoBA,CAAC;IAfC,wCAAoB,GAApB;QACE,IAAI,CAAC,QAAQ,GAAG,UAAC,KAAuB,EAAE,QAAQ,IAAO,CAAC,CAAC;IAC7D,CAAC;IALM,eAAK,GAAY,IAAI,CAAC;IAkB/B,gBAAC;CAAA,AApBD,CAA6C,KAAK,CAAC,SAAS,GAoB3D;AAuBD,eAAe,SAAS,CAAC"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/BodyProperty.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const BodyProperty: ({ backgroundColor, width, fontFamily, containerPadding, onUpdate }: IBodyPropertyProps) => JSX.Element; 3 | interface IBodyPropertyProps { 4 | backgroundColor: string; 5 | width: number; 6 | fontFamily: string; 7 | containerPadding: string; 8 | onUpdate: onUpdate; 9 | } 10 | export default BodyProperty; 11 | -------------------------------------------------------------------------------- /lib/entry.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"entry.js","sourceRoot":"","sources":["../src/entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAGlD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAC/E,MAAM,CAAC,IAAM,cAAc,GAAG,eAAe,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,eAAe,YAAY,CAAC"} -------------------------------------------------------------------------------- /src/containers/common/DragUtil.ts: -------------------------------------------------------------------------------- 1 | export const getSource = (data = {}, transform?: (T) => T) => ({ 2 | beginDrag(props: T) { 3 | const item = transform ? transform(props) : {}; 4 | return { ...data, ...item }; 5 | }, 6 | canDrag: props => true 7 | }); 8 | 9 | export const getCollect = () => (connect, monitor) => ({ 10 | connectDragSource: connect.dragSource(), 11 | isDragging: monitor.isDragging() 12 | }); -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/Group.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | declare class Group extends React.Component { 3 | state: IGroupState; 4 | toggle: () => void; 5 | render(): JSX.Element; 6 | } 7 | interface IGroupProps { 8 | title?: string; 9 | className?: string; 10 | } 11 | interface IGroupState { 12 | height: 'auto' | number; 13 | expand: boolean; 14 | } 15 | export default Group; 16 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Number.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const NumberItem: ({ title, value, step, max, min, attribute, onUpdate }: INumberItemProps) => JSX.Element; 3 | interface INumberItemProps { 4 | title?: string; 5 | value?: number; 6 | step?: number; 7 | max?: number; 8 | min?: number; 9 | attribute?: string; 10 | onUpdate?: onUpdate; 11 | } 12 | export default NumberItem; 13 | -------------------------------------------------------------------------------- /src/store/store.ts: -------------------------------------------------------------------------------- 1 | 2 | import { configure } from 'mobx'; 3 | import { IRootStore } from '../schemas/common'; 4 | import DesignState from './DesignState'; 5 | 6 | configure({ enforceActions: 'observed' }); 7 | 8 | class RootStore implements IRootStore { 9 | 10 | DesignState: DesignState; 11 | 12 | constructor() { 13 | this.DesignState = new DesignState({ rootStore: this }); 14 | } 15 | } 16 | 17 | export default new RootStore(); 18 | -------------------------------------------------------------------------------- /src/sources/icons/text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/containers/extension/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/containers/extension/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"} -------------------------------------------------------------------------------- /lib/containers/common/Selector.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | declare class Selector extends React.Component { 3 | dragDom: HTMLDivElement; 4 | componentDidMount(): void; 5 | render(): JSX.Element; 6 | } 7 | interface ISelectorProps { 8 | placeholder?: string; 9 | type?: string; 10 | onDelete?: () => void; 11 | onCopy?: () => void; 12 | onRef?: (dragDom: HTMLDivElement) => void; 13 | } 14 | export default Selector; 15 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Design 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/containers/Row.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { inject, observer } from 'mobx-react'; 3 | import Items from './sidebar/RowItems'; 4 | 5 | @inject('rootStore') 6 | @observer 7 | class Row extends React.Component { 8 | render() { 9 | return
    10 | {Items.map((Component, index) => )} 11 |
; 12 | } 13 | } 14 | 15 | interface IRowProps { 16 | rootStore?: any; 17 | } 18 | 19 | export default Row; -------------------------------------------------------------------------------- /src/containers/Wrapper.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { DragDropContext } from 'react-dnd'; 3 | import HTML5Backend from 'react-dnd-html5-backend'; 4 | import SideBar from './SideBar'; 5 | import Main from './Main'; 6 | 7 | @DragDropContext(HTML5Backend) 8 | class Wrapper extends React.Component { 9 | render() { 10 | return
11 |
12 | 13 |
; 14 | } 15 | } 16 | 17 | export default Wrapper; -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/Property.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | interface IPropertyProps { 3 | rootStore?: any; 4 | propertyId?: string; 5 | } 6 | declare class PropertyWrap extends React.Component { 7 | render(): JSX.Element; 8 | } 9 | interface IPropertyWrapProps extends IPropertyProps { 10 | className?: string; 11 | visible?: boolean; 12 | destroyOnClose?: boolean; 13 | style?: IKeyValueMap; 14 | } 15 | export default PropertyWrap; 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 一些文件类型 2 | *.diff 3 | *.err 4 | *.log 5 | *.orig 6 | *.rej 7 | *.swo 8 | *.swp 9 | *.vi 10 | *.zip 11 | *~ 12 | ~* 13 | 14 | # 系统、编辑器 15 | ._* 16 | .cache 17 | .DS_Store 18 | .idea 19 | .project 20 | .settings 21 | .tmproj 22 | *.esproj 23 | *.sublime-project 24 | *.sublime-workspace 25 | nbproject 26 | Thumbs.db 27 | 28 | # 包文件夹 29 | /bower_components 30 | /node_modules 31 | 32 | # 目标文件 33 | 34 | 35 | /dist/index.html 36 | # vendor.min.js 的配置文件 37 | manifest.json 38 | .vscode 39 | *.scssc -------------------------------------------------------------------------------- /src/sources/icons/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/entry.d.ts: -------------------------------------------------------------------------------- 1 | import * as PropertyWidgets from './containers/sidebar/Property/items'; 2 | import DesignEditor from './containers/Container'; 3 | export { default as Extension } from './containers/extension/Extension'; 4 | export { default as PropertyGroup } from './containers/sidebar/Property/Group'; 5 | export declare const PropertyWidget: typeof PropertyWidgets; 6 | export { default as ExtensionGroup } from './containers/extension/ExtensionGroup'; 7 | export { ExtensionGroupGeneral } from './lib/enum'; 8 | export default DesignEditor; 9 | -------------------------------------------------------------------------------- /src/entry.ts: -------------------------------------------------------------------------------- 1 | import * as PropertyWidgets from './containers/sidebar/Property/items'; 2 | import DesignEditor from './containers/Container'; 3 | 4 | 5 | export { default as Extension } from './containers/extension/Extension'; 6 | export { default as PropertyGroup } from './containers/sidebar/Property/Group'; 7 | export const PropertyWidget = PropertyWidgets; 8 | export { default as ExtensionGroup } from './containers/extension/ExtensionGroup'; 9 | export { ExtensionGroupGeneral } from './lib/enum'; 10 | export default DesignEditor; -------------------------------------------------------------------------------- /lib/components/dialog/LazyRenderBox.d.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | export default class LazyRenderBox extends React.Component { 3 | shouldComponentUpdate(nextProps: ILazyRenderBoxProps): boolean; 4 | render(): JSX.Element; 5 | } 6 | interface ILazyRenderBoxProps { 7 | hiddenClassName?: string; 8 | visible?: boolean; 9 | className?: string; 10 | style?: Object; 11 | key?: string; 12 | onClick?: (event: React.MouseEvent) => void; 13 | } 14 | export {}; 15 | -------------------------------------------------------------------------------- /lib/lib/transform.d.ts: -------------------------------------------------------------------------------- 1 | import { IData } from '../schemas/transform'; 2 | import { IExtension } from 'src/containers/extension/Extension'; 3 | declare class Transform { 4 | data: IData; 5 | bodyWidth: number; 6 | extensions: IExtension[]; 7 | constructor(rawData: IData, extensions: IExtension[]); 8 | toHtml(): string; 9 | private transferBody; 10 | private transferRow; 11 | private transferColumn; 12 | private transferContent; 13 | private getExtensionByType; 14 | } 15 | export default Transform; 16 | -------------------------------------------------------------------------------- /lib/components/error/ErrorBoundary.d.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | declare class ErrorBoundary extends React.Component { 3 | constructor(props: IErrorBoundaryProps); 4 | componentDidCatch(error: IError, info: React.ErrorInfo): void; 5 | render(): {}; 6 | } 7 | interface IErrorBoundaryProps { 8 | tips?: string | React.ReactNode; 9 | children?: React.ReactNode; 10 | } 11 | interface IErrorBoundaryStates { 12 | hasError: boolean; 13 | } 14 | export default ErrorBoundary; 15 | -------------------------------------------------------------------------------- /lib/entry.js: -------------------------------------------------------------------------------- 1 | import * as PropertyWidgets from './containers/sidebar/Property/items'; 2 | import DesignEditor from './containers/Container'; 3 | export { default as Extension } from './containers/extension/Extension'; 4 | export { default as PropertyGroup } from './containers/sidebar/Property/Group'; 5 | export var PropertyWidget = PropertyWidgets; 6 | export { default as ExtensionGroup } from './containers/extension/ExtensionGroup'; 7 | export { ExtensionGroupGeneral } from './lib/enum'; 8 | export default DesignEditor; 9 | //# sourceMappingURL=entry.js.map -------------------------------------------------------------------------------- /lib/lib/values.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"values.js","sourceRoot":"","sources":["../../src/lib/values.ts"],"names":[],"mappings":"AAAA,IAAM,OAAO,GAAG,wBAAwB,CAAC;AAEzC,MAAM,CAAC,IAAM,UAAU,GAAG;IACxB,eAAe,EAAE,SAAS;IAC1B,KAAK,EAAE,GAAG;IACV,UAAU,EAAE,iBAAiB;IAC7B,gBAAgB,EAAE,KAAK;CACxB,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB,eAAe,EAAE,OAAO;IACxB,sBAAsB,EAAE,OAAO;IAC/B,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,KAAK;IACpB,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,IAAI;IACZ,eAAe,EAAE,EAAE;CACpB,CAAC"} -------------------------------------------------------------------------------- /src/lib/values.ts: -------------------------------------------------------------------------------- 1 | const NoColor = 'rgba(255, 255, 255, 0)'; 2 | 3 | export const bodyValues = { 4 | backgroundColor: "#ffffff", 5 | width: 800, 6 | fontFamily: 'MicroSoft Yahei', 7 | containerPadding: '0px', 8 | }; 9 | 10 | export const rowValues = { 11 | backgroundColor: NoColor, 12 | columnsBackgroundColor: NoColor, 13 | deletable: true, 14 | draggable: true, 15 | noStackMobile: false, 16 | padding: "10px", 17 | selectable: true, 18 | fullWidth: false, 19 | repeat: false, 20 | center: true, 21 | backgroundImage: '', 22 | }; -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Colors.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import 'rc-color-picker/assets/index.css'; 3 | declare const Colors: ({ title, colors: { color, backgroundColor, hoverColor, hoverBackgroundColor }, onUpdate }: IColorsProps) => JSX.Element; 4 | interface IColorsProps { 5 | title?: string; 6 | colors?: { 7 | color: string; 8 | backgroundColor: string; 9 | hoverColor: string; 10 | hoverBackgroundColor: string; 11 | }; 12 | onUpdate?: onUpdate; 13 | } 14 | export default Colors; 15 | -------------------------------------------------------------------------------- /lib/lib/values.d.ts: -------------------------------------------------------------------------------- 1 | export declare const bodyValues: { 2 | backgroundColor: string; 3 | width: number; 4 | fontFamily: string; 5 | containerPadding: string; 6 | }; 7 | export declare const rowValues: { 8 | backgroundColor: string; 9 | columnsBackgroundColor: string; 10 | deletable: boolean; 11 | draggable: boolean; 12 | noStackMobile: boolean; 13 | padding: string; 14 | selectable: boolean; 15 | fullWidth: boolean; 16 | repeat: boolean; 17 | center: boolean; 18 | backgroundImage: string; 19 | }; 20 | -------------------------------------------------------------------------------- /lib/components/portal/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | declare class Portal extends React.Component { 3 | container: HTMLDivElement; 4 | componentDidMount(): void; 5 | componentDidUpdate(prevProps: IPortalProps): void; 6 | componentWillUnmount(): void; 7 | createContainer(): void; 8 | getContainer: () => HTMLDivElement; 9 | removeContainer(): void; 10 | render(): any; 11 | } 12 | interface IPortalProps { 13 | getContainer?: Function; 14 | didUpdate?: Function; 15 | } 16 | export default Portal; 17 | -------------------------------------------------------------------------------- /lib/containers/Wrapper.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Wrapper.js","sourceRoot":"","sources":["../../src/containers/Wrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAG1B;IAAsB,2BAAe;IAArC;;IAOA,CAAC;IANC,wBAAM,GAAN;QACE,OAAO,6BAAK,SAAS,EAAC,cAAc;YAClC,oBAAC,IAAI,OAAQ;YACb,oBAAC,OAAO,OAAW,CACf,CAAC;IACT,CAAC;IANG,OAAO;QADZ,eAAe,CAAC,YAAY,CAAC;OACxB,OAAO,CAOZ;IAAD,cAAC;CAAA,AAPD,CAAsB,KAAK,CAAC,SAAS,GAOpC;AAED,eAAe,OAAO,CAAC"} -------------------------------------------------------------------------------- /lib/containers/Row.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Row.js","sourceRoot":"","sources":["../../src/containers/Row.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,MAAM,oBAAoB,CAAC;AAIvC;IAAkB,uBAA0B;IAA5C;;IAMA,CAAC;IALC,oBAAM,GAAN;QACE,OAAO,4BAAI,SAAS,EAAC,QAAQ,IAC1B,KAAK,CAAC,GAAG,CAAC,UAAC,SAAS,EAAE,KAAK,IAAK,OAAA,oBAAC,SAAS,IAAC,GAAG,EAAE,KAAK,GAAI,EAAzB,CAAyB,CAAC,CACxD,CAAC;IACR,CAAC;IALG,GAAG;QAFR,MAAM,CAAC,WAAW,CAAC;QACnB,QAAQ;OACH,GAAG,CAMR;IAAD,UAAC;CAAA,AAND,CAAkB,KAAK,CAAC,SAAS,GAMhC;AAMD,eAAe,GAAG,CAAC"} -------------------------------------------------------------------------------- /src/typings/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'rc-color-picker/assets/index.css'; 2 | declare module 'tinymce'; 3 | 4 | interface IKeyValueMap { 5 | [key: string]: T; 6 | } 7 | 8 | type TextAlgin = 'left' | 'right' | 'center'; 9 | 10 | type onUpdate = (key: string, value: any) => void; 11 | 12 | interface ISocialItem { 13 | guid: string; 14 | icon: string; 15 | url: string; 16 | } 17 | 18 | interface IError { 19 | stack?: string; 20 | } 21 | 22 | interface IPosition { 23 | x: number; 24 | y: number; 25 | } 26 | 27 | interface IItem { 28 | key: string; 29 | title: string; 30 | } -------------------------------------------------------------------------------- /lib/lib/values.js: -------------------------------------------------------------------------------- 1 | var NoColor = 'rgba(255, 255, 255, 0)'; 2 | export var bodyValues = { 3 | backgroundColor: "#ffffff", 4 | width: 800, 5 | fontFamily: 'MicroSoft Yahei', 6 | containerPadding: '0px', 7 | }; 8 | export var rowValues = { 9 | backgroundColor: NoColor, 10 | columnsBackgroundColor: NoColor, 11 | deletable: true, 12 | draggable: true, 13 | noStackMobile: false, 14 | padding: "10px", 15 | selectable: true, 16 | fullWidth: false, 17 | repeat: false, 18 | center: true, 19 | backgroundImage: '', 20 | }; 21 | //# sourceMappingURL=values.js.map -------------------------------------------------------------------------------- /lib/Video.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { Extension } from './entry'; 3 | declare class Video extends Extension { 4 | getIconClass(): string; 5 | getContentType(): string; 6 | getLabel(): string; 7 | toHtml(data: any): string; 8 | getInitialAttribute(): IVideoProps; 9 | getProperties(values: IVideoProps, update: any): JSX.Element; 10 | render(): JSX.Element; 11 | } 12 | interface IVideoProps { 13 | url?: string; 14 | containerPadding?: string; 15 | textAlign?: TextAlgin; 16 | fullWidth?: boolean; 17 | } 18 | export default Video; 19 | -------------------------------------------------------------------------------- /src/containers/sidebar/RowItems/index.ts: -------------------------------------------------------------------------------- 1 | 2 | import RowFactor from './RowFactory'; 3 | import { RowType } from '../../../lib/enum'; 4 | 5 | export default [ 6 | RowFactor(RowType.SINGLE, [1]), 7 | RowFactor(RowType.DOUBLE, [1, 1]), 8 | RowFactor(RowType.THREE, [1, 1, 1]), 9 | RowFactor(RowType.FOUR, [1, 1, 1, 1]), 10 | RowFactor(RowType.FIVE, [1, 1, 1, 1, 1]), 11 | RowFactor(RowType.ONETWO, [1, 2]), 12 | RowFactor(RowType.TWOONE, [2, 1]), 13 | RowFactor(RowType.ONETWOONETWO, [1, 2, 1, 2]), 14 | RowFactor(RowType.TWOONETWOONE, [2, 1, 2, 1]), 15 | RowFactor(RowType.ONEFOURONE, [1, 4, 1])]; -------------------------------------------------------------------------------- /lib/components/tabs/index.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | declare class Tabs extends React.Component { 3 | state: ITabsState; 4 | static Tab: typeof Tab; 5 | render(): JSX.Element; 6 | } 7 | interface ITabsProps { 8 | onClick?: (event: React.MouseEvent) => void; 9 | } 10 | interface ITabsState { 11 | selectedIndex: number; 12 | } 13 | declare class Tab extends React.Component { 14 | render(): JSX.Element; 15 | } 16 | interface ITabProps { 17 | icon?: string; 18 | tab?: string; 19 | } 20 | export default Tabs; 21 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # SMS ONE Coding Security Standards 2 | 3 | 1. **do not** put any sensitive information in source code repository 4 | 2. **do** make sure no SQL injection problem 5 | 3. **do** make sure API parameters are verified 6 | 4. **do** make sure API access rights are controlled 7 | 5. **do** make sure the API is stateless 8 | 6. **do** make sure no special account can access the system with unneccessary rights 9 | 7. **do** make sure all test code for developing are deleted 10 | 8. **do** make sure catch the third party library's exceptions 11 | 9. **do not** open system backdoor 12 | 10. **do** think about the system performance -------------------------------------------------------------------------------- /src/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as LazyRenderBox } from './dialog/LazyRenderBox'; 2 | export { default as Tabs } from './tabs'; 3 | export { default as Button } from './button'; 4 | export { default as Input } from './form/Input'; 5 | export { default as Align } from './form/Align'; 6 | export { default as Number } from './form/Number'; 7 | export { default as Line } from './form/Line'; 8 | export { default as Html } from './form/Html'; 9 | export { default as AutoCompletePanel } from './form/AutoCompletePanel'; 10 | export { default as ErrorBoundary } from './error/ErrorBoundary'; 11 | export { default as TinyMce } from './tinymce'; -------------------------------------------------------------------------------- /lib/components/button/index.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './index.less'; 3 | declare const Button: { 4 | (props: IButtonProps): JSX.Element; 5 | Group({ children, className }: IButtonGroupProps): JSX.Element; 6 | }; 7 | interface IButtonProps { 8 | children?: React.ReactFragment; 9 | style?: IKeyValueMap; 10 | className?: string; 11 | icon?: string; 12 | loading?: boolean; 13 | onClick?: (event: React.MouseEvent) => void; 14 | } 15 | interface IButtonGroupProps { 16 | children?: React.ReactFragment; 17 | className?: string; 18 | } 19 | export default Button; 20 | -------------------------------------------------------------------------------- /lib/components/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as LazyRenderBox } from './dialog/LazyRenderBox'; 2 | export { default as Tabs } from './tabs'; 3 | export { default as Button } from './button'; 4 | export { default as Input } from './form/Input'; 5 | export { default as Align } from './form/Align'; 6 | export { default as Number } from './form/Number'; 7 | export { default as Line } from './form/Line'; 8 | export { default as Html } from './form/Html'; 9 | export { default as AutoCompletePanel } from './form/AutoCompletePanel'; 10 | export { default as ErrorBoundary } from './error/ErrorBoundary'; 11 | export { default as TinyMce } from './tinymce'; 12 | -------------------------------------------------------------------------------- /lib/containers/sidebar/RowItems/index.js: -------------------------------------------------------------------------------- 1 | import RowFactor from './RowFactory'; 2 | import { RowType } from '../../../lib/enum'; 3 | export default [ 4 | RowFactor(RowType.SINGLE, [1]), 5 | RowFactor(RowType.DOUBLE, [1, 1]), 6 | RowFactor(RowType.THREE, [1, 1, 1]), 7 | RowFactor(RowType.FOUR, [1, 1, 1, 1]), 8 | RowFactor(RowType.FIVE, [1, 1, 1, 1, 1]), 9 | RowFactor(RowType.ONETWO, [1, 2]), 10 | RowFactor(RowType.TWOONE, [2, 1]), 11 | RowFactor(RowType.ONETWOONETWO, [1, 2, 1, 2]), 12 | RowFactor(RowType.TWOONETWOONE, [2, 1, 2, 1]), 13 | RowFactor(RowType.ONEFOURONE, [1, 4, 1]) 14 | ]; 15 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/containers/Body.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ConnectDropTarget } from 'react-dnd'; 3 | declare class Body extends React.Component { 4 | onBodyClick: () => void; 5 | render(): React.ReactElement React.ReactElement React.Component)>) | (new (props: any) => React.Component)>; 6 | } 7 | interface IBodyProps { 8 | guid?: string; 9 | rootStore?: any; 10 | size?: number | string; 11 | connectDropTarget?: ConnectDropTarget; 12 | isOver?: boolean; 13 | canDrop?: boolean; 14 | } 15 | export default Body; 16 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDom from 'react-dom'; 3 | import Container, { ExtensionGroup, ExtensionGroupGeneral } from './entry'; 4 | import Video from './Video'; 5 | 6 | let instance = null; 7 | ReactDom.render(
8 | data.fileUrl} 11 | onUploadError={error => console.log(error.message)} 12 | onRef={obj => { instance = obj; (window as any).instance = obj; }}> 13 | 14 | 16 | 17 |
, document.getElementById('root')); -------------------------------------------------------------------------------- /lib/containers/common/DragUtil.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"DragUtil.js","sourceRoot":"","sources":["../../../src/containers/common/DragUtil.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,MAAM,CAAC,IAAM,SAAS,GAAG,UAAmB,IAAS,EAAE,SAAoB;IAA/B,qBAAA,EAAA,SAAS;IAA2B,OAAA,CAAC;QAC/E,SAAS,EAAT,UAAU,KAAQ;YAChB,IAAM,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/C,oBAAY,IAAI,EAAK,IAAI,EAAG;QAC9B,CAAC;QACD,OAAO,EAAE,UAAA,KAAK,IAAI,OAAA,IAAI,EAAJ,CAAI;KACvB,CAAC;AAN8E,CAM9E,CAAC;AAEH,MAAM,CAAC,IAAM,UAAU,GAAG,cAAM,OAAA,UAAC,OAAO,EAAE,OAAO,IAAK,OAAA,CAAC;IACrD,iBAAiB,EAAE,OAAO,CAAC,UAAU,EAAE;IACvC,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE;CACjC,CAAC,EAHoD,CAGpD,EAH8B,CAG9B,CAAC"} -------------------------------------------------------------------------------- /lib/containers/extension/Html.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import Extension from './Extension'; 3 | import { ContentType } from '../../lib/enum'; 4 | declare class Html extends Extension { 5 | getIconClass(): string; 6 | getContentType(): ContentType; 7 | getLabel(): string; 8 | toHtml(data: any): string; 9 | getInitialAttribute(): { 10 | html: string; 11 | containerPadding: string; 12 | }; 13 | getProperties(values: any, update: any): JSX.Element; 14 | render(): JSX.Element; 15 | } 16 | interface IHtmlProps { 17 | html: string; 18 | containerPadding: string; 19 | } 20 | export default Html; 21 | -------------------------------------------------------------------------------- /lib/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as LazyRenderBox } from './dialog/LazyRenderBox'; 2 | export { default as Tabs } from './tabs'; 3 | export { default as Button } from './button'; 4 | export { default as Input } from './form/Input'; 5 | export { default as Align } from './form/Align'; 6 | export { default as Number } from './form/Number'; 7 | export { default as Line } from './form/Line'; 8 | export { default as Html } from './form/Html'; 9 | export { default as AutoCompletePanel } from './form/AutoCompletePanel'; 10 | export { default as ErrorBoundary } from './error/ErrorBoundary'; 11 | export { default as TinyMce } from './tinymce'; 12 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/RowProperty.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare const RowProperty: ({ columnsBackgroundColor, backgroundColor, backgroundImage, noStackMobile, padding, fullWidth, repeat, center, _meta, onUpdate }: IRowPropertyProps) => JSX.Element; 3 | interface IRowPropertyProps { 4 | columnsBackgroundColor?: string; 5 | backgroundColor?: string; 6 | backgroundImage?: string; 7 | noStackMobile?: boolean; 8 | padding?: string; 9 | fullWidth?: boolean; 10 | repeat?: boolean; 11 | center?: boolean; 12 | _meta?: { 13 | guid: string; 14 | }; 15 | onUpdate?: onUpdate; 16 | } 17 | export default RowProperty; 18 | -------------------------------------------------------------------------------- /lib/components/form/Input.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/form/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,gBAAe,UAAC,EAAyE;QAAvE,gBAAK,EAAE,gBAAK,EAAE,wBAAS,EAAE,aAAU,EAAV,+BAAU,EAAE,gBAAmB,EAAnB,+CAAmB;IAAoB,OAAA,CAC5F,6BAAK,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC;QAC/D,KAAK,IAAI,6BAAK,SAAS,EAAC,qBAAqB;YAC5C,8BAAM,SAAS,EAAC,kBAAkB,IAAE,KAAK,CAAQ,CAC7C;QACN,+BAAO,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAC,cAAc,GAAG,CAC7H,CACP;AAP6F,CAO7F,EAAC"} -------------------------------------------------------------------------------- /lib/components/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"} -------------------------------------------------------------------------------- /lib/components/error/ErrorBoundary.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/components/error/ErrorBoundary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;IAA4B,iCAA0D;IACpF,uBAAY,KAA0B;QAAtC,YACE,kBAAM,KAAK,CAAC,SAEb;QADC,KAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;IACnC,CAAC;IAED,yCAAiB,GAAjB,UAAkB,KAAa,EAAE,IAAqB;QACpD,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,8BAAM,GAAN;QACU,IAAA,oBAA6B,EAA7B,kDAA6B,CAAgB;QACrD,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACvB,OAAO,IAAI,CAAC;SACb;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;IACH,oBAAC;AAAD,CAAC,AAjBD,CAA4B,KAAK,CAAC,SAAS,GAiB1C;AAWD,eAAe,aAAa,CAAC"} -------------------------------------------------------------------------------- /lib/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,SAAS,EAAE,EAAE,cAAc,EAAyB,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,IAAI,QAAQ,GAAG,IAAI,CAAC;AAEpB,QAAQ,CAAC,MAAM,CAAC;IACd,oBAAC,SAAS,IACR,cAAc,EAAC,2CAA2C,EAC1D,QAAQ,EAAE,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,OAAO,EAAZ,CAAY,EAC9B,aAAa,EAAE,UAAA,KAAK,IAAI,OAAA,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAA1B,CAA0B,EAClD,KAAK,EAAE,UAAA,GAAG,IAAM,QAAQ,GAAG,GAAG,CAAC,CAAE,MAAc,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC;QACjE,oBAAC,cAAc,IAAC,KAAK,EAAC,gBAAgB;YACpC,oBAAC,KAAK,OAAG,CACM,CACP,CACR,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/containers/extension/Text.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import Extension from './Extension'; 3 | import { ContentType } from '../../lib/enum'; 4 | declare class Text extends Extension { 5 | getIconClass(): string; 6 | getContentType(): ContentType; 7 | getLabel(): string; 8 | toHtml(data: any): string; 9 | getInitialAttribute(): ITextProps; 10 | getProperties(values: any, update: any): JSX.Element; 11 | render(): JSX.Element; 12 | } 13 | interface ITextProps { 14 | color: string; 15 | text: string; 16 | textAlign: TextAlgin; 17 | lineHeight: number; 18 | padding: string; 19 | containerPadding: string; 20 | } 21 | export default Text; 22 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Align.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Align.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/Align.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,IAAM,SAAS,GAAG,UAAC,EAAiF;QAA/E,aAAgB,EAAhB,qCAAgB,EAAE,aAAoB,EAApB,yCAAoB,EAAE,gBAAoB,EAApB,+CAAoB;IAAwB,OAAA,CAAC,6BAAK,SAAS,EAAC,0BAA0B;QACjJ,6BAAK,SAAS,EAAC,UAAU;YACvB,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,+BAAO,SAAS,EAAC,kBAAkB;oBAAC,kCAAO,KAAK,CAAQ,CAAQ,CAC5D;YACN,6BAAK,SAAS,EAAC,OAAO;gBACpB,oBAAC,KAAK,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAA,KAAK,IAAM,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAI,CACzE,CACF,CACF,CAAC;AATkG,CASlG,CAAC;AAQR,eAAe,SAAS,CAAC"} -------------------------------------------------------------------------------- /src/sources/icons/divider.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /lib/components/form/Number.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | declare enum Operate { 3 | Minus = 1, 4 | Plus = 2 5 | } 6 | declare class Number extends React.Component { 7 | onChange: (e: React.ChangeEvent, type?: Operate) => void; 8 | onMinus: () => void; 9 | onPlus: () => void; 10 | render(): JSX.Element; 11 | } 12 | interface INumberProps { 13 | value?: number; 14 | step?: number; 15 | max?: number; 16 | min?: number; 17 | className?: string; 18 | style?: IKeyValueMap; 19 | onChange?: (value: number) => void; 20 | formatter?: (value: number) => any; 21 | parser?: (value: string) => string; 22 | } 23 | export default Number; 24 | -------------------------------------------------------------------------------- /lib/containers/extension/Social.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import Extension from './Extension'; 3 | import { ContentType } from '../../lib/enum'; 4 | declare class Social extends Extension { 5 | getIconClass(): string; 6 | getContentType(): ContentType; 7 | getLabel(): string; 8 | toHtml(data: any): string; 9 | getInitialAttribute(): ISocialProps; 10 | getProperties(values: any, update: any): JSX.Element; 11 | render(): JSX.Element; 12 | } 13 | interface ISocialProps { 14 | items: ISocialItem[]; 15 | textAlign: TextAlgin; 16 | containerPadding: string; 17 | margin: string; 18 | width: number; 19 | height: number; 20 | } 21 | export default Social; 22 | -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDom from 'react-dom'; 3 | import Container, { ExtensionGroup } from './entry'; 4 | import Video from './Video'; 5 | var instance = null; 6 | ReactDom.render(React.createElement("div", null, 7 | React.createElement(Container, { imageUploadUrl: "http://localhost:3001/UserFeedback/upload", onUpload: function (data) { return data.fileUrl; }, onUploadError: function (error) { return console.log(error.message); }, onRef: function (obj) { instance = obj; window.instance = obj; } }, 8 | React.createElement(ExtensionGroup, { title: "Custom Content" }, 9 | React.createElement(Video, null)))), document.getElementById('root')); 10 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/containers/extension/Divider.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import Extension from './Extension'; 3 | import { ContentType } from '../../lib/enum'; 4 | declare class Divider extends Extension { 5 | getIconClass(): string; 6 | getContentType(): ContentType; 7 | getLabel(): string; 8 | toHtml(data: any): string; 9 | getInitialAttribute(): IDividerProps; 10 | getProperties(values: any, update: any): JSX.Element; 11 | render(): JSX.Element; 12 | } 13 | interface IDividerProps { 14 | width: number; 15 | lineStyle: string; 16 | lineWidth: number; 17 | lineColor: string; 18 | textAlign: TextAlgin; 19 | containerPadding: string; 20 | } 21 | export default Divider; 22 | -------------------------------------------------------------------------------- /lib/components/button/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,IAAM,MAAM,GAAG,UAAC,KAAmB;IACzB,IAAA,yBAAQ,EAAE,mBAAK,EAAE,2BAAS,EAAE,eAAW,EAAX,gCAAW,EAAE,kBAAe,EAAf,oCAAe,EAAE,uBAAO,CAAW;IACpF,OAAO,gCAAQ,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,IAAI,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO;QACtG,OAAO,IAAI,2BAAG,SAAS,EAAC,SAAS,GAAG;QACpC,IAAI;QACL,kCAAO,QAAQ,CAAQ,CAChB,CAAC;AACZ,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,GAAG,UAAC,EAA0C;QAAxC,sBAAQ,EAAE,wBAAS;IAA0B,OAAA,6BAAK,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC,IAAG,QAAQ,CAAO;AAAtE,CAAsE,CAAC;AAgBtI,eAAe,MAAM,CAAC"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/SocialItem.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | declare class SocialItem extends React.Component { 3 | state: ISocialItemState; 4 | addItem: () => void; 5 | modifyItem: (guid: any, icon: any, url: any) => void; 6 | deleteItem: (guid: any) => void; 7 | onDragEnd: (result: any) => void; 8 | onSortEnd: ({ oldIndex, newIndex }: { 9 | oldIndex: any; 10 | newIndex: any; 11 | }) => void; 12 | render(): JSX.Element; 13 | } 14 | interface ISocialItemProps { 15 | items?: ISocialItem[]; 16 | onUpdate?: onUpdate; 17 | } 18 | interface ISocialItemState { 19 | icon: string; 20 | url: string; 21 | } 22 | export default SocialItem; 23 | -------------------------------------------------------------------------------- /lib/containers/extension/ExtensionGroup.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { IExtensionProps, IExtension } from './Extension'; 3 | declare class ExtensionGroup extends React.Component { 4 | componentDidMount(): void; 5 | initConfig(): void; 6 | render(): any; 7 | } 8 | export interface IExtensionGroupProps { 9 | children?: React.ReactElement | React.ReactElement[]; 10 | rootStore?: any; 11 | title: string; 12 | } 13 | export interface IExtensionGroup

{ 14 | new (props: any): React.Component; 15 | } 16 | interface IExtensionGroupStates { 17 | } 18 | export default ExtensionGroup; 19 | -------------------------------------------------------------------------------- /src/sources/icons/body.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/Align.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Align } from '../../../../components'; 3 | 4 | const AlignItem = ({ align = 'center', title = "Alignments", onUpdate = () => { } }: IAlignItemProps) => (

5 |
6 |
7 | 8 |
9 |
10 | { onUpdate('textAlign', align); }} /> 11 |
12 |
13 |
); 14 | 15 | interface IAlignItemProps { 16 | align?: TextAlgin; 17 | title?: string; 18 | onUpdate?: onUpdate; 19 | } 20 | 21 | export default AlignItem; -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Line.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Line.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,IAAM,QAAQ,GAAG,UAAC,EAAyF;QAAvF,aAAc,EAAd,mCAAc,EAAE,wBAAS,EAAE,wBAAS,EAAE,wBAAS,EAAE,gBAAoB,EAApB,+CAAoB;IAAuB,OAAA,CAC9G,6BAAK,SAAS,EAAC,0BAA0B;QACvC,6BAAK,SAAS,EAAC,UAAU;YACvB,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,+BAAO,SAAS,EAAC,kBAAkB;oBAAC,kCAAO,KAAK,CAAQ,CAAQ,CAC5D;YACN,6BAAK,SAAS,EAAC,OAAO;gBACpB,oBAAC,IAAI,IAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAC,GAAG,EAAE,GAAG,IAAO,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAI,CACvH,CACF,CACF,CAAC;AAVuG,CAUvG,CAAC;AAUV,eAAe,QAAQ,CAAC"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/BorderRadius.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"BorderRadius.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/BorderRadius.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,IAAM,YAAY,GAAG,UAAC,EAAwF;QAAtF,oBAAgB,EAAhB,qCAAgB,EAAE,aAAwB,EAAxB,6CAAwB,EAAE,gBAAoB,EAApB,+CAAoB;IAA2B,OAAA,CACjH,6BAAK,SAAS,EAAC,0BAA0B;QACvC,6BAAK,SAAS,EAAC,UAAU;YACvB,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,+BAAO,SAAS,EAAC,kBAAkB;oBAAC,kCAAO,KAAK,CAAQ,CAAQ,CAC5D;YACN,6BAAK,SAAS,EAAC,kBAAkB;gBAC/B,oBAAC,MAAM,IAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAA,GAAG,IAAM,QAAQ,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAI,CACnG,CACF,CACF,CAAC;AAV0G,CAU1G,CAAC;AAQV,eAAe,YAAY,CAAC"} -------------------------------------------------------------------------------- /lib/containers/editor/Column.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ConnectDropTarget } from 'react-dnd'; 3 | import { IColumn } from 'src/schemas/transform'; 4 | declare class Column extends React.Component { 5 | onUpdate: (guid: any, key: any, value: any) => void; 6 | render(): React.ReactElement React.ReactElement React.Component)>) | (new (props: any) => React.Component)>; 7 | } 8 | interface IColumnProps { 9 | column?: IColumn; 10 | guid?: string; 11 | rootStore?: any; 12 | size?: number | string; 13 | connectDropTarget?: ConnectDropTarget; 14 | isOver?: boolean; 15 | canDrop?: boolean; 16 | } 17 | export default Column; 18 | -------------------------------------------------------------------------------- /lib/containers/extension/Image.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import Extension from './Extension'; 3 | import { ContentType } from '../../lib/enum'; 4 | declare class Image extends Extension { 5 | getIconClass(): string; 6 | getContentType(): ContentType; 7 | getLabel(): string; 8 | toHtml(data: any): string; 9 | getInitialAttribute(): IImageProps; 10 | getProperties(values: any, update: any): JSX.Element; 11 | render(): JSX.Element; 12 | } 13 | interface IImageProps { 14 | link: string; 15 | linkType: string; 16 | containerPadding: string; 17 | textAlign: TextAlgin; 18 | fullWidth: false; 19 | alter: string; 20 | url: string; 21 | width: number; 22 | height: number; 23 | } 24 | export default Image; 25 | -------------------------------------------------------------------------------- /src/components/form/Input.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import './index.less'; 4 | 5 | export default ({ addOn, value, className, style = {}, onChange = () => {} }: IInputProps) => ( 6 |
7 | {addOn &&
8 | {addOn} 9 |
} 10 | 11 |
12 | ); 13 | 14 | interface IInputProps { 15 | addOn?: string; 16 | value?: string; 17 | className?: string; 18 | style?: IKeyValueMap; 19 | onChange?: (event: React.ChangeEvent) => void; 20 | } -------------------------------------------------------------------------------- /lib/components/form/Html.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Html.js","sourceRoot":"","sources":["../../../src/components/form/Html.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,iCAAiC,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,kBAAkB,CAAC;AAE1B,gBAAe,UAAC,EAA2C;QAAzC,gBAAK,EAAE,sBAAQ,EAAE,aAAU,EAAV,+BAAU;IAAmB,OAAA,CAC9D,6BAAK,KAAK,eAAO,KAAK,EAAK,EAAE,SAAS,EAAE,EAAE,EAAE;QAC1C,oBAAC,MAAM,IACL,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,UAAA,KAAK,IAAI,OAAA,QAAQ,CAAC,KAAK,CAAC,EAAf,CAAe,EACvC,SAAS,EAAE,UAAA,IAAI,IAAM,IAAM,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EACjG,OAAO,EAAE,EAAE,EACX,KAAK,EAAE;gBACL,UAAU,EAAE,qCAAqC;gBACjD,QAAQ,EAAE,EAAE;aACb,GACD,CACE,CAAC;AAZuD,CAYvD,EAAC"} -------------------------------------------------------------------------------- /lib/components/dialog/LazyRenderBox.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"LazyRenderBox.js","sourceRoot":"","sources":["../../../src/components/dialog/LazyRenderBox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;IAA2C,iCAAwC;IAAnF;;IAeA,CAAC;IAdC,6CAAqB,GAArB,UAAsB,SAA8B;QAClD,OAAO,CAAC,CAAC,SAAS,CAAC,eAAe,IAAI,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC;IAC5D,CAAC;IACD,8BAAM,GAAN;QACE,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QACrC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YACvD,SAAS,IAAI,MAAI,IAAI,CAAC,KAAK,CAAC,eAAiB,CAAC;SAC/C;QACD,IAAM,KAAK,gBAAQ,IAAI,CAAC,KAAK,CAAE,CAAC;QAChC,OAAO,KAAK,CAAC,eAAe,CAAC;QAC7B,OAAO,KAAK,CAAC,OAAO,CAAC;QACrB,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QAC5B,OAAO,wCAAS,KAAK,EAAI,CAAC;IAC5B,CAAC;IACH,oBAAC;AAAD,CAAC,AAfD,CAA2C,KAAK,CAAC,SAAS,GAezD"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Number.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Number.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/Number.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,IAAM,UAAU,GAAG,UAAC,EAAmG;QAAjG,gBAAK,EAAE,gBAAK,EAAE,YAAS,EAAT,8BAAS,EAAE,WAAU,EAAV,+BAAU,EAAE,WAAO,EAAP,4BAAO,EAAE,wBAAS,EAAE,gBAAoB,EAApB,+CAAoB;IAAyB,OAAA,CAC1H,6BAAK,SAAS,EAAC,0BAA0B;QACvC,6BAAK,SAAS,EAAC,UAAU;YACvB,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,+BAAO,SAAS,EAAC,kBAAkB;oBAAC,kCAAO,KAAK,CAAQ,CAAQ,CAC5D;YACN,6BAAK,SAAS,EAAC,kBAAkB;gBAC/B,oBAAC,MAAM,IAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAA,GAAG,IAAM,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAI,CACpG,CACF,CACF,CAAC;AAVmH,CAUnH,CAAC;AAYV,eAAe,UAAU,CAAC"} -------------------------------------------------------------------------------- /lib/containers/editor/Row.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ConnectDropTarget, ConnectDragSource } from 'react-dnd'; 3 | declare class Row extends React.Component { 4 | guid: string; 5 | subtype: string; 6 | constructor(props: any); 7 | state: { 8 | position: number; 9 | }; 10 | setPosition(position: any): void; 11 | onSelect: (e: any) => void; 12 | onDelete: () => void; 13 | onCopy: () => void; 14 | render(): JSX.Element; 15 | } 16 | interface IRowProps { 17 | guid?: string; 18 | rootStore?: any; 19 | subtype?: string; 20 | width?: number; 21 | cells?: number[]; 22 | connectDropTarget?: ConnectDropTarget; 23 | connectDragSource?: ConnectDragSource; 24 | isOver?: boolean; 25 | canDrop?: boolean; 26 | } 27 | export default Row; 28 | -------------------------------------------------------------------------------- /lib/components/form/Input.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import './index.less'; 4 | export default (function (_a) { 5 | var addOn = _a.addOn, value = _a.value, className = _a.className, _b = _a.style, style = _b === void 0 ? {} : _b, _c = _a.onChange, onChange = _c === void 0 ? function () { } : _c; 6 | return (React.createElement("div", { style: style, className: classnames("input-group", className) }, 7 | addOn && React.createElement("div", { className: "input-group-prepend" }, 8 | React.createElement("span", { className: "input-group-text" }, addOn)), 9 | React.createElement("input", { type: "text", style: addOn ? {} : { borderRadius: '0.25rem' }, value: value, onChange: onChange, className: "form-control" }))); 10 | }); 11 | //# sourceMappingURL=Input.js.map -------------------------------------------------------------------------------- /src/components/form/Html.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import Editor from './html/react-simple-code-editor'; 3 | import { highlight, languages } from './html/prism'; 4 | import './html/prism.css'; 5 | 6 | export default ({ value, onChange, style = {} }: IHtmlProps) => ( 7 |
8 | onChange(value)} 11 | highlight={code => { const a = highlight(code, languages.html); console.log(code, a); return a; }} 12 | padding={10} 13 | style={{ 14 | fontFamily: '"Fira code", "Fira Mono", monospace', 15 | fontSize: 12, 16 | }} 17 | /> 18 |
); 19 | 20 | interface IHtmlProps { 21 | value?: string; 22 | onChange?: (value: string) => void; 23 | style?: IKeyValueMap; 24 | } -------------------------------------------------------------------------------- /lib/components/form/AutoCompletePanel.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './index.less'; 3 | declare class AutoCompletePanel extends React.Component { 4 | dom: HTMLDivElement; 5 | state: IAutoCompletePanelState; 6 | componentDidMount(): void; 7 | componentWillUnmount(): void; 8 | pressKey: (e: any) => void; 9 | onBodyClick: (e: any) => void; 10 | onItemClick: (item: any) => void; 11 | onRef: (dom: any) => void; 12 | render(): JSX.Element; 13 | } 14 | interface IAutoCompletePanelProps { 15 | data?: IItem[]; 16 | show?: boolean; 17 | position?: IPosition; 18 | onClick?: (item: IItem) => void; 19 | onClose?: () => void; 20 | } 21 | interface IAutoCompletePanelState { 22 | index: number; 23 | } 24 | export default AutoCompletePanel; 25 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Switch.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,IAAM,UAAU,GAAG,UAAC,EAA0H;QAAxH,aAAgC,EAAhC,qDAAgC,EAAE,eAAe,EAAf,oCAAe,EAAE,iBAA2B,EAA3B,gDAA2B,EAAE,gBAAoB,EAApB,+CAAoB;IAAyB,OAAA,CACjJ,6BAAK,SAAS,EAAC,0BAA0B;QACvC,6BAAK,SAAS,EAAC,UAAU;YACvB,6BAAK,SAAS,EAAC,wBAAwB;gBACrC,+BAAO,SAAS,EAAC,kBAAkB;oBACjC,8BAAM,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,IAAG,KAAK,CAAQ;oBAChD,6BAAK,KAAK,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE;wBAC9D,oBAAC,MAAM,IAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAA,OAAO,IAAM,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,GAAI,CACvG,CACA,CACJ,CACF,CACF,CAAC;AAZ0I,CAY1I,CAAC;AASV,eAAe,UAAU,CAAC"} -------------------------------------------------------------------------------- /src/components/error/ErrorBoundary.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | class ErrorBoundary extends React.Component { 4 | constructor(props: IErrorBoundaryProps) { 5 | super(props); 6 | this.state = { hasError: false }; 7 | } 8 | 9 | componentDidCatch(error: IError, info: React.ErrorInfo) { 10 | this.setState({ hasError: true }); 11 | } 12 | 13 | render() { 14 | const { tips = 'SOMETHING WENT WRONG' } = this.props; 15 | if (this.state.hasError) { 16 | return tips; 17 | } 18 | return this.props.children; 19 | } 20 | } 21 | 22 | interface IErrorBoundaryProps { 23 | tips?: string | React.ReactNode; 24 | children?: React.ReactNode; 25 | } 26 | 27 | interface IErrorBoundaryStates { 28 | hasError: boolean; 29 | } 30 | 31 | export default ErrorBoundary; -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Input.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,IAAM,SAAS,GAAG,UAAC,EAAwE;QAAtE,gBAAK,EAAE,gBAAK,EAAE,wBAAS,EAAE,cAAI,EAAE,gBAAoB,EAApB,+CAAoB;IAAwB,OAAA,CAC9F,6BAAK,SAAS,EAAC,0BAA0B;QACvC,6BAAK,SAAS,EAAC,UAAU;YACvB,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,+BAAO,SAAS,EAAC,kBAAkB;oBAAC,kCAAO,KAAK,CAAQ,CAAQ,CAC5D,CACF;QACN,6BAAK,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAChD,6BAAK,SAAS,EAAC,QAAQ;gBACrB,oBAAC,KAAK,IAAC,QAAQ,EAAE,UAAA,CAAC,IAAM,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI;gBAC/E,IAAI,IAAI,6BAAK,SAAS,EAAC,gBAAgB,IACrC,IAAI,CACD,CACF,CACF,CACF,CAAC;AAfuF,CAevF,CAAC;AAUV,eAAe,SAAS,CAAC"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as Link } from './Link'; 2 | export { default as Colors } from './Colors'; 3 | export { default as Align } from './Align'; 4 | export { default as LineHeight } from './LineHeight'; 5 | export { default as BorderRadius } from './BorderRadius'; 6 | export { default as Color } from './Color'; 7 | export { default as Switch } from './Switch'; 8 | export { default as Space } from './Space'; 9 | export { default as Slide } from './Slide'; 10 | export { default as Line } from './Line'; 11 | export { default as HtmlEditor } from './Html'; 12 | export { default as Input } from './Input'; 13 | export { default as ImageEditor } from './Image'; 14 | export { default as NumberItem } from './Number'; 15 | export { default as Font } from './Font'; 16 | export { default as SocialItem } from './SocialItem'; 17 | -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/BorderRadius.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Number } from '../../../../components'; 3 | 4 | const BorderRadius = ({ borderRadius = 4, title = "Rounded Border", onUpdate = () => { } }: IBorderRadiusProps) => ( 5 |
6 |
7 |
8 | 9 |
10 |
11 | { onUpdate('borderRadius', val); }} /> 12 |
13 |
14 |
); 15 | 16 | interface IBorderRadiusProps { 17 | borderRadius?: number; 18 | title?: string; 19 | onUpdate?: onUpdate; 20 | } 21 | 22 | export default BorderRadius; -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export { default as Link } from './Link'; 3 | export { default as Colors } from './Colors'; 4 | export { default as Align } from './Align'; 5 | export { default as LineHeight } from './LineHeight'; 6 | export { default as BorderRadius } from './BorderRadius'; 7 | export { default as Color } from './Color'; 8 | export { default as Switch } from './Switch'; 9 | export { default as Space } from './Space'; 10 | export { default as Slide } from './Slide'; 11 | export { default as Line } from './Line'; 12 | export { default as HtmlEditor } from './Html'; 13 | export { default as Input } from './Input'; 14 | export { default as ImageEditor } from './Image'; 15 | export { default as NumberItem } from './Number'; 16 | export { default as Font } from './Font'; 17 | export { default as SocialItem } from './SocialItem'; -------------------------------------------------------------------------------- /src/sources/icons/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Font.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Font.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/Font.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,IAAM,IAAI,GAAG,UAAC,EAAuD;QAArD,gBAAK,EAAE,0BAAU,EAAE,gBAAoB,EAApB,+CAAoB;IAAmB,OAAA,CACxE,6BAAK,SAAS,EAAC,0BAA0B;QACvC,6BAAK,SAAS,EAAC,UAAU;YACvB,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,+BAAO,SAAS,EAAC,kBAAkB;oBAAC,kCAAO,KAAK,CAAQ,CAAQ,CAC5D;YACN,6BAAK,SAAS,EAAC,OAAO;gBACpB,gCAAQ,SAAS,EAAC,8BAA8B,EAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAA,CAAC,IAAM,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAE1H,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,gCAAQ,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAG,CAAC,CAAU,EAA7C,CAA6C,CAAC,CAErE,CACL,CACF,CACF,CAAC;AAdiE,CAcjE,CAAC;AAQV,eAAe,IAAI,CAAC"} -------------------------------------------------------------------------------- /src/sources/icons/button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/index.js: -------------------------------------------------------------------------------- 1 | export { default as Link } from './Link'; 2 | export { default as Colors } from './Colors'; 3 | export { default as Align } from './Align'; 4 | export { default as LineHeight } from './LineHeight'; 5 | export { default as BorderRadius } from './BorderRadius'; 6 | export { default as Color } from './Color'; 7 | export { default as Switch } from './Switch'; 8 | export { default as Space } from './Space'; 9 | export { default as Slide } from './Slide'; 10 | export { default as Line } from './Line'; 11 | export { default as HtmlEditor } from './Html'; 12 | export { default as Input } from './Input'; 13 | export { default as ImageEditor } from './Image'; 14 | export { default as NumberItem } from './Number'; 15 | export { default as Font } from './Font'; 16 | export { default as SocialItem } from './SocialItem'; 17 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Image.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | declare class Image extends React.Component { 3 | timerGenerate: (duration: number, callback: Function) => { 4 | stop: () => void; 5 | }; 6 | dropzone: HTMLLabelElement; 7 | state: { 8 | uploading: boolean; 9 | progress: number; 10 | }; 11 | componentDidMount(): void; 12 | componentWillUnmount(): void; 13 | onPrevent: (e: any) => void; 14 | onDrop: (e: any) => void; 15 | onChange: (e: any) => void; 16 | render(): JSX.Element; 17 | } 18 | interface IImageProps { 19 | attribute?: string; 20 | url?: string; 21 | onUpdate?: onUpdate; 22 | title?: string; 23 | desc?: string; 24 | options?: boolean; 25 | fullWidth?: boolean; 26 | repeat?: boolean; 27 | center?: boolean; 28 | } 29 | export default Image; 30 | -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/Line.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Line } from '../../../../components'; 3 | 4 | const LineItem = ({ title = "Line", lineWidth, lineStyle, lineColor, onUpdate = () => { } }: ILineItemProps) => ( 5 |
6 |
7 |
8 | 9 |
10 |
11 | { onUpdate(key, val); }} /> 12 |
13 |
14 |
); 15 | 16 | interface ILineItemProps { 17 | title?: string; 18 | lineWidth?: number; 19 | lineStyle?: string; 20 | lineColor?: string; 21 | onUpdate?: onUpdate; 22 | } 23 | 24 | export default LineItem; -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "compilerOptions": { 4 | "module": "esnext", 5 | "outDir": "./lib", 6 | "sourceMap": true, 7 | "noImplicitAny": false, 8 | "declaration": true, 9 | "moduleResolution": "node", 10 | "esModuleInterop": true, 11 | "removeComments": false, 12 | "resolveJsonModule": true, 13 | "emitDecoratorMetadata": true, 14 | "allowSyntheticDefaultImports":true, 15 | "experimentalDecorators": true, 16 | "target": "es5", 17 | "jsx":"react", 18 | "baseUrl":".", 19 | "paths":{ 20 | "@store": ["./src/store"], 21 | "components": ["./src/components"], 22 | "containers": ["./src/containers"] 23 | }, 24 | "lib": [ 25 | "es5", 26 | "es2017", 27 | "dom", 28 | "scripthost" 29 | ] 30 | }, 31 | "include": [ 32 | "./src/**/*" 33 | ], 34 | "exclude": ["node_modules", "dist"] 35 | } -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/LineHeight.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"LineHeight.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/LineHeight.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,IAAM,UAAU,GAAG,UAAC,EAAmF;QAAjF,kBAAgB,EAAhB,qCAAgB,EAAE,aAAqB,EAArB,0CAAqB,EAAE,gBAAoB,EAApB,+CAAoB;IAAyB,OAAA,CAC1G,6BAAK,SAAS,EAAC,0BAA0B;QACvC,6BAAK,SAAS,EAAC,UAAU;YACvB,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,+BAAO,SAAS,EAAC,kBAAkB;oBAAC,kCAAO,KAAK,CAAQ,CAAQ,CAC5D;YACN,6BAAK,SAAS,EAAC,kBAAkB;gBAC/B,oBAAC,MAAM,IACL,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,EAAE,EACR,SAAS,EAAE,UAAA,GAAG,IAAI,OAAG,GAAG,MAAG,EAAT,CAAS,EAC3B,MAAM,EAAE,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,EAApB,CAAoB,EACnC,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,UAAA,GAAG,IAAM,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GACjD,CACE,CACF,CACF,CAAC;AAjBmG,CAiBnG,CAAC;AAQV,eAAe,UAAU,CAAC"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Color.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Color.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/Color.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,kCAAkC,CAAC;AAE1C,IAAM,KAAK,GAAG,UAAC,EAA2F;QAAzF,aAAe,EAAf,oCAAe,EAAE,aAAc,EAAd,mCAAc,EAAE,iBAAmB,EAAnB,wCAAmB,EAAE,gBAAoB,EAApB,+CAAoB;IACzF,IAAM,IAAI,GAAU,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpC,OAAO,6BAAK,SAAS,EAAC,0BAA0B;QAC9C,6BAAK,SAAS,EAAC,UAAU;YACvB,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,+BAAO,SAAS,EAAC,kBAAkB;oBAAC,kCAAO,KAAK,CAAQ,CAAQ,CAC5D;YACN,6BAAK,SAAS,EAAC,kBAAkB;gBAC/B,oBAAC,WAAW,IAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAA,CAAC,IAAM,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAI,CACpH,CACF,CACF,CAAC;AACT,CAAC,CAAC;AASF,eAAe,KAAK,CAAC"} -------------------------------------------------------------------------------- /lib/containers/editor/Content.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ConnectDropTarget, ConnectDragSource } from 'react-dnd'; 3 | declare class Content extends React.Component { 4 | guid: string; 5 | subtype: string; 6 | _isMounted: boolean; 7 | constructor(props: any); 8 | state: { 9 | position: number; 10 | }; 11 | componentDidMount(): void; 12 | componentWillUnmount(): void; 13 | onSelect: (e: any) => void; 14 | setPosition(position: any): void; 15 | onDelete: () => void; 16 | onCopy: () => void; 17 | render(): JSX.Element; 18 | } 19 | interface IContentProps { 20 | guid?: string; 21 | columnGuid?: string; 22 | type?: string; 23 | rootStore?: any; 24 | connectDropTarget?: ConnectDropTarget; 25 | connectDragSource?: ConnectDragSource; 26 | isOver?: boolean; 27 | canDrop?: boolean; 28 | } 29 | export default Content; 30 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/BodyProperty.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"BodyProperty.js","sourceRoot":"","sources":["../../../../src/containers/sidebar/Property/BodyProperty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEzD,IAAM,YAAY,GAAG,UAAC,EAAsF;QAApF,oCAAe,EAAE,gBAAK,EAAE,0BAAU,EAAE,sCAAgB,EAAE,sBAAQ;IAA2B,OAAA,oBAAC,KAAK,CAAC,QAAQ;QAC9H,oBAAC,KAAK,IAAC,KAAK,EAAC,SAAS;YACpB,oBAAC,KAAK,IAAC,KAAK,EAAC,kBAAkB,EAAC,KAAK,EAAE,eAAe,EAAE,SAAS,EAAC,iBAAiB,EAAC,QAAQ,EAAE,QAAQ,GAAI;YAC1G,oBAAC,UAAU,IAAC,KAAK,EAAC,eAAe,EAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAC,OAAO,EAAC,QAAQ,EAAE,QAAQ,GAAI;YACnG,oBAAC,IAAI,IAAC,KAAK,EAAC,aAAa,EAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAI;YACxE,oBAAC,KAAK,IAAC,KAAK,EAAC,mBAAmB,EAAC,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAC,kBAAkB,EAAC,QAAQ,EAAE,QAAQ,GAAI,CACvG,CACO;AAPgG,CAOhG,CAAC;AAUlB,eAAe,YAAY,CAAC"} -------------------------------------------------------------------------------- /src/components/dialog/LazyRenderBox.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export default class LazyRenderBox extends React.Component { 4 | shouldComponentUpdate(nextProps: ILazyRenderBoxProps) { 5 | return !!nextProps.hiddenClassName || !!nextProps.visible; 6 | } 7 | render() { 8 | let className = this.props.className; 9 | if (!!this.props.hiddenClassName && !this.props.visible) { 10 | className += ` ${this.props.hiddenClassName}`; 11 | } 12 | const props = { ...this.props }; 13 | delete props.hiddenClassName; 14 | delete props.visible; 15 | props.className = className; 16 | return
; 17 | } 18 | } 19 | 20 | interface ILazyRenderBoxProps { 21 | hiddenClassName?: string; 22 | visible?: boolean; 23 | className?: string; 24 | style?: Object; 25 | key?: string; 26 | onClick?: (event: React.MouseEvent) => void; 27 | } -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/Number.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Number } from '../../../../components'; 3 | 4 | const NumberItem = ({ title, value, step = 50, max = 1000, min = 0, attribute, onUpdate = () => { } }: INumberItemProps) => ( 5 |
6 |
7 |
8 | 9 |
10 |
11 | { onUpdate(attribute, val); }} /> 12 |
13 |
14 |
); 15 | 16 | interface INumberItemProps { 17 | title?: string; 18 | value?: number; 19 | step?: number; 20 | max?: number; 21 | min?: number; 22 | attribute?: string; 23 | onUpdate?: onUpdate; 24 | } 25 | 26 | export default NumberItem; -------------------------------------------------------------------------------- /lib/components/button/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import './index.less'; 4 | var Button = function (props) { 5 | var children = props.children, style = props.style, className = props.className, _a = props.icon, icon = _a === void 0 ? null : _a, _b = props.loading, loading = _b === void 0 ? false : _b, onClick = props.onClick; 6 | return React.createElement("button", { className: classnames("button", className, icon && "icon"), style: style, onClick: onClick }, 7 | loading && React.createElement("i", { className: "loading" }), 8 | icon, 9 | React.createElement("span", null, children)); 10 | }; 11 | Button.Group = function (_a) { 12 | var children = _a.children, className = _a.className; 13 | return React.createElement("div", { className: classnames("buttonGroup", className) }, children); 14 | }; 15 | export default Button; 16 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/containers/sidebar/ContentItems/ContentFactory.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ContentFactory.js","sourceRoot":"","sources":["../../../../src/containers/sidebar/ContentItems/ContentFactory.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAqB,MAAM,WAAW,CAAC;AAC1D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,SAAS,cAAc,CAAC,WAAmB,EAAE,KAAa,EAAE,SAAiB;IAE3E;QAA6B,kCAAqC;QAAlE;;QAMA,CAAC;QAJC,+BAAM,GAAN;YACQ,IAAA,eAAuC,EAArC,wCAAiB,EAAE,YAAkB,CAAC;YAC9C,OAAO,iBAAiB,CAAC,4BAAI,GAAG,EAAE,GAAG;gBAAE,2BAAG,SAAS,EAAE,SAAS,GAAI;gBAAA,+BAAI,KAAK,CAAK,CAAK,CAAC,CAAC;QACzF,CAAC;QAJM,mBAAI,GAAG,WAAW,CAAC;QADtB,cAAc;YADlB,UAAkB,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;WACtH,cAAc,CAMnB;QAAD,qBAAC;KAAA,AAND,CAA6B,KAAK,CAAC,SAAS,GAM3C;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AAOD,eAAe,cAAc,CAAC"} -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/Font.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Fonts } from '../../../../lib/enum'; 3 | 4 | const Font = ({ title, fontFamily, onUpdate = () => { } }: IFontProps) => ( 5 |
6 |
7 |
8 | 9 |
10 |
11 | 16 |
17 |
18 |
); 19 | 20 | interface IFontProps { 21 | title?: string; 22 | fontFamily?: string; 23 | onUpdate?: onUpdate; 24 | } 25 | 26 | export default Font; -------------------------------------------------------------------------------- /lib/components/form/Align.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Align.js","sourceRoot":"","sources":["../../../src/components/form/Align.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB;IAAoB,yBAA4B;IAAhD;;IAeA,CAAC;IAdC,sBAAM,GAAN;QACQ,IAAA,eAAgC,EAA9B,gBAAK,EAAE,sBAAuB,CAAC;QACvC,OAAO,6BAAK,SAAS,EAAC,YAAY;YAChC,2BAAG,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,KAAK,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,cAAQ,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC1F,2BAAG,SAAS,EAAC,yBAAyB,GAAG,CACvC;YACJ,2BAAG,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,KAAK,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,cAAQ,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC9F,2BAAG,SAAS,EAAC,iCAAiC,GAAG,CAC/C;YACJ,2BAAG,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,KAAK,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,cAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBAC5F,2BAAG,SAAS,EAAC,0BAA0B,GAAG,CACxC,CACA,CAAC;IACT,CAAC;IACH,YAAC;AAAD,CAAC,AAfD,CAAoB,KAAK,CAAC,SAAS,GAelC;AAOD,eAAe,KAAK,CAAC"} -------------------------------------------------------------------------------- /src/sources/icons/drag-handler.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/containers/sidebar/ContentItems/ContentFactory.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { DragType, OperationMode } from '../../../lib/enum'; 3 | import { DragSource, ConnectDragSource } from 'react-dnd'; 4 | import * as Util from '../../common/DragUtil'; 5 | 6 | function ContentFactory(contentType: string, label: string, iconClass: string): any { 7 | @(DragSource as any)(DragType.CONTENT, Util.getSource({ mode: OperationMode.INSERT, type: contentType }), Util.getCollect()) 8 | class ContentElement extends React.Component { 9 | static type = contentType; 10 | render() { 11 | const { connectDragSource, key } = this.props; 12 | return connectDragSource(
  • {label}

  • ); 13 | } 14 | } 15 | return ContentElement; 16 | } 17 | 18 | interface IContentElementProps { 19 | connectDragSource?: ConnectDragSource; 20 | key?: string; 21 | } 22 | 23 | export default ContentFactory; -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"} -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/Switch.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Switch from "react-switch"; 3 | 4 | const SwitchItem = ({ title = 'Do Not Stack on Mobile', checked = false, attribute = 'noStackMobile', onUpdate = () => { } }: ISwitchItemProps) => ( 5 |
    6 |
    7 |
    8 | 14 |
    15 |
    16 |
    ); 17 | 18 | interface ISwitchItemProps { 19 | title?: string; 20 | checked?: boolean; 21 | attribute?: string; 22 | onUpdate?: onUpdate; 23 | } 24 | 25 | export default SwitchItem; -------------------------------------------------------------------------------- /lib/containers/extension/Button.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import Extension from './Extension'; 3 | import { ContentType } from '../../lib/enum'; 4 | declare class Button extends Extension { 5 | getIconClass(): string; 6 | getContentType(): ContentType; 7 | getLabel(): string; 8 | toHtml(data: any): string; 9 | getInitialAttribute(): IButtonProps; 10 | getProperties(values: any, update: any): JSX.Element; 11 | render(): JSX.Element; 12 | } 13 | interface IButtonProps { 14 | linkType?: string; 15 | text?: string; 16 | link?: string; 17 | color?: string; 18 | padding?: string; 19 | backgroundColor?: string; 20 | hoverColor?: string; 21 | hoverBackgroundColor?: string; 22 | textAlign?: TextAlgin; 23 | lineHeight?: number; 24 | borderRadius?: number; 25 | containerPadding?: string; 26 | lineStyle?: string; 27 | lineWidth?: number; 28 | lineColor?: string; 29 | } 30 | export default Button; 31 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Align.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Align } from '../../../../components'; 3 | var AlignItem = function (_a) { 4 | var _b = _a.align, align = _b === void 0 ? 'center' : _b, _c = _a.title, title = _c === void 0 ? "Alignments" : _c, _d = _a.onUpdate, onUpdate = _d === void 0 ? function () { } : _d; 5 | return (React.createElement("div", { className: "ds-widget ds-link-widget" }, 6 | React.createElement("div", { className: "card-row" }, 7 | React.createElement("div", { className: "ds-widget-label col-6" }, 8 | React.createElement("label", { className: "ds-label-primary" }, 9 | React.createElement("span", null, title))), 10 | React.createElement("div", { className: "col-6" }, 11 | React.createElement(Align, { align: align, onChange: function (align) { onUpdate('textAlign', align); } }))))); 12 | }; 13 | export default AlignItem; 14 | //# sourceMappingURL=Align.js.map -------------------------------------------------------------------------------- /src/components/form/Align.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import './index.less'; 4 | 5 | class Align extends React.Component { 6 | render() { 7 | const { align, onChange } = this.props; 8 | return ; 19 | } 20 | } 21 | 22 | interface IAlignProps { 23 | align?: TextAlgin; 24 | onChange?: (align: TextAlgin) => void; 25 | } 26 | 27 | export default Align; -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/Input.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Input } from '../../../../components'; 3 | 4 | const InputItem = ({ title, value, attribute, desc, onUpdate = () => { } }: IInputItemProps) => ( 5 |
    6 |
    7 |
    8 | 9 |
    10 |
    11 |
    12 |
    13 | { onUpdate(attribute, e.target.value); }} value={value} /> 14 | {desc &&
    15 | {desc} 16 |
    } 17 |
    18 |
    19 |
    ); 20 | 21 | interface IInputItemProps { 22 | title?: string; 23 | value?: string; 24 | attribute?: string; 25 | desc?: string; 26 | onUpdate?: onUpdate; 27 | } 28 | 29 | export default InputItem; -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/LineHeight.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Number } from '../../../../components'; 3 | 4 | const LineHeight = ({ lineHeight = 120, title = "Line Height", onUpdate = () => { } }: ILineHeightProps) => ( 5 |
    6 |
    7 |
    8 | 9 |
    10 |
    11 | `${val}%`} 15 | parser={val => val.replace('%', '')} 16 | value={lineHeight} 17 | onChange={val => { onUpdate('lineHeight', val); }} 18 | /> 19 |
    20 |
    21 |
    ); 22 | 23 | interface ILineHeightProps { 24 | lineHeight?: number; 25 | title?: string; 26 | onUpdate?: onUpdate; 27 | } 28 | 29 | export default LineHeight; -------------------------------------------------------------------------------- /lib/containers/sidebar/RowItems/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/containers/sidebar/RowItems/index.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAe;IACb,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9B,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjC,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACnC,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACrC,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACxC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjC,SAAS,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7C,SAAS,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7C,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/containers/extension/ExtensionGroup.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ExtensionGroup.js","sourceRoot":"","sources":["../../../src/containers/extension/ExtensionGroup.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAG1C;IAA6B,kCAA4D;IAAzF;;IAwBA,CAAC;IAtBC,0CAAiB,GAAjB;QACE,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,mCAAU,GAAV;QACQ,IAAA,eAAgC,EAA9B,sBAAQ,EAAE,gBAAoB,CAAC;QACvC,UAAU,CAAC;YACT,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAkD,QAAQ,EAAE,UAAA,KAAK;gBACrF,IAAI,KAAK,EAAE;oBACT,IAAM,OAAO,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAsB,CAAC,CAAC,sBAAsB;oBAC/E,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;oBAC3C,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;oBACzB,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;oBAC/C,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;iBACpF;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,+BAAM,GAAN;QACE,OAAO,IAAI,CAAC;IACd,CAAC;IACH,qBAAC;AAAD,CAAC,AAxBD,CAA6B,KAAK,CAAC,SAAS,GAwB3C;AAaD,eAAe,cAAc,CAAC"} -------------------------------------------------------------------------------- /src/containers/sidebar/Property/BodyProperty.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Group from './Group'; 3 | import { Font, Color, NumberItem, Space } from './items'; 4 | 5 | const BodyProperty = ({ backgroundColor, width, fontFamily, containerPadding, onUpdate }: IBodyPropertyProps) => 6 | 7 | 8 | 9 | 10 | 11 | 12 | ; 13 | 14 | interface IBodyPropertyProps { 15 | backgroundColor: string; 16 | width: number; 17 | fontFamily: string; 18 | containerPadding: string; 19 | onUpdate: onUpdate; 20 | } 21 | 22 | export default BodyProperty; -------------------------------------------------------------------------------- /src/sources/icons/play-button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /lib/containers/common/DragUtil.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | export var getSource = function (data, transform) { 13 | if (data === void 0) { data = {}; } 14 | return ({ 15 | beginDrag: function (props) { 16 | var item = transform ? transform(props) : {}; 17 | return __assign({}, data, item); 18 | }, 19 | canDrag: function (props) { return true; } 20 | }); 21 | }; 22 | export var getCollect = function () { return function (connect, monitor) { return ({ 23 | connectDragSource: connect.dragSource(), 24 | isDragging: monitor.isDragging() 25 | }); }; }; 26 | //# sourceMappingURL=DragUtil.js.map -------------------------------------------------------------------------------- /src/components/button/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import './index.less'; 4 | 5 | const Button = (props: IButtonProps) => { 6 | const { children, style, className, icon = null, loading = false, onClick } = props; 7 | return ; 12 | }; 13 | 14 | Button.Group = ({ children, className }: IButtonGroupProps) =>
    {children}
    ; 15 | 16 | interface IButtonProps { 17 | children?: React.ReactFragment; 18 | style?: IKeyValueMap; 19 | className?: string; 20 | icon?: string; 21 | loading?: boolean; 22 | onClick?: (event: React.MouseEvent) => void; 23 | } 24 | 25 | interface IButtonGroupProps { 26 | children?: React.ReactFragment; 27 | className?: string; 28 | } 29 | 30 | export default Button; -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Line.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Line } from '../../../../components'; 3 | var LineItem = function (_a) { 4 | var _b = _a.title, title = _b === void 0 ? "Line" : _b, lineWidth = _a.lineWidth, lineStyle = _a.lineStyle, lineColor = _a.lineColor, _c = _a.onUpdate, onUpdate = _c === void 0 ? function () { } : _c; 5 | return (React.createElement("div", { className: "ds-widget ds-link-widget" }, 6 | React.createElement("div", { className: "card-row" }, 7 | React.createElement("div", { className: "ds-widget-label col-6" }, 8 | React.createElement("label", { className: "ds-label-primary" }, 9 | React.createElement("span", null, title))), 10 | React.createElement("div", { className: "col-6" }, 11 | React.createElement(Line, { lineWidth: lineWidth, lineStyle: lineStyle, lineColor: lineColor, onUpdate: function (key, val) { onUpdate(key, val); } }))))); 12 | }; 13 | export default LineItem; 14 | //# sourceMappingURL=Line.js.map -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Link.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,IAAM,IAAI,GAAG,UAAC,EAA2D;QAAzD,gBAAK,EAAE,sBAAQ,EAAE,cAAI,EAAE,gBAAoB,EAApB,+CAAoB;IAAmB,OAAA,CAC5E,6BAAK,SAAS,EAAC,0BAA0B;QACvC,6BAAK,SAAS,EAAC,UAAU;YACvB,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,+BAAO,SAAS,EAAC,kBAAkB;oBAAC,kCAAO,KAAK,CAAQ,CAAQ,CAC5D;YACN,6BAAK,SAAS,EAAC,OAAO;gBACpB,gCAAQ,SAAS,EAAC,8BAA8B,EAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAA,CAAC,IAAM,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBACxH,gCAAQ,KAAK,EAAC,OAAO,eAAkB;oBACvC,gCAAQ,KAAK,EAAC,QAAQ,cAAiB,CAChC,CACL,CACF;QACN,6BAAK,SAAS,EAAC,UAAU,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAChD,6BAAK,SAAS,EAAC,QAAQ;gBACrB,oBAAC,KAAK,IAAC,KAAK,EAAC,KAAK,EAAC,QAAQ,EAAE,UAAA,CAAC,IAAM,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,GAAI,CACpF,CACF,CACF,CAAC;AAlBqE,CAkBrE,CAAC;AASV,eAAe,IAAI,CAAC"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/BorderRadius.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Number } from '../../../../components'; 3 | var BorderRadius = function (_a) { 4 | var _b = _a.borderRadius, borderRadius = _b === void 0 ? 4 : _b, _c = _a.title, title = _c === void 0 ? "Rounded Border" : _c, _d = _a.onUpdate, onUpdate = _d === void 0 ? function () { } : _d; 5 | return (React.createElement("div", { className: "ds-widget ds-link-widget" }, 6 | React.createElement("div", { className: "card-row" }, 7 | React.createElement("div", { className: "ds-widget-label col-6" }, 8 | React.createElement("label", { className: "ds-label-primary" }, 9 | React.createElement("span", null, title))), 10 | React.createElement("div", { className: "col-6 text-right" }, 11 | React.createElement(Number, { max: 100, step: 1, value: borderRadius, onChange: function (val) { onUpdate('borderRadius', val); } }))))); 12 | }; 13 | export default BorderRadius; 14 | //# sourceMappingURL=BorderRadius.js.map -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Slide.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Slide.js","sourceRoot":"","sources":["../../../../../src/containers/sidebar/Property/items/Slide.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,IAAM,KAAK,GAAG,UAAC,EAAwF;QAAtF,aAAe,EAAf,oCAAe,EAAE,aAAW,EAAX,gCAAW,EAAE,iBAAmB,EAAnB,wCAAmB,EAAE,gBAAoB,EAApB,+CAAoB;IAAoB,OAAA,CAC1G,6BAAK,SAAS,EAAC,0BAA0B;QACvC,6BAAK,SAAS,EAAC,UAAU;YACvB,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,+BAAO,SAAS,EAAC,kBAAkB;oBAAC,kCAAO,KAAK,CAAQ,CAAQ,CAC5D;YACN,6BAAK,SAAS,EAAC,OAAO;gBACpB,oBAAC,MAAM,IACL,UAAU,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,EAC1C,WAAW,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,EACvC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,UAAA,GAAG,IAAM,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAC9C;gBACF,oBAAC,MAAM,IAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAA,GAAG,IAAM,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,GAAI,CACxH,CACF,CACF,CAAC;AAhBmG,CAgBnG,CAAC;AASV,eAAe,KAAK,CAAC"} -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/Color.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ColorPicker from 'rc-color-picker'; 3 | import { rgb2rgba, rgba2rgb } from '../../../../lib/util'; 4 | import { IRGBA } from '../../../../schemas/common'; 5 | import 'rc-color-picker/assets/index.css'; 6 | 7 | const Color = ({ title = 'Color', value = '#fff', attribute = 'color', onUpdate = () => { } }: IColorProps) => { 8 | const rgba: IRGBA = rgba2rgb(value); 9 | return
    10 |
    11 |
    12 | 13 |
    14 |
    15 | { onUpdate(attribute, rgb2rgba(e.color, e.alpha)); }} /> 16 |
    17 |
    18 |
    ; 19 | }; 20 | 21 | interface IColorProps { 22 | title?: string; 23 | value?: string; 24 | attribute?: string; 25 | onUpdate?: onUpdate; 26 | } 27 | 28 | export default Color; -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Font.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Fonts } from '../../../../lib/enum'; 3 | var Font = function (_a) { 4 | var title = _a.title, fontFamily = _a.fontFamily, _b = _a.onUpdate, onUpdate = _b === void 0 ? function () { } : _b; 5 | return (React.createElement("div", { className: "ds-widget ds-link-widget" }, 6 | React.createElement("div", { className: "card-row" }, 7 | React.createElement("div", { className: "ds-widget-label col-6" }, 8 | React.createElement("label", { className: "ds-label-primary" }, 9 | React.createElement("span", null, title))), 10 | React.createElement("div", { className: "col-6" }, 11 | React.createElement("select", { className: "form-control form-control-sm", value: fontFamily, onChange: function (e) { onUpdate('fontFamily', e.target.value); } }, Object.keys(Fonts).map(function (i) { return React.createElement("option", { key: i, value: Fonts[i] }, i); })))))); 12 | }; 13 | export default Font; 14 | //# sourceMappingURL=Font.js.map -------------------------------------------------------------------------------- /src/sources/icons/block.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/BodyProperty.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Group from './Group'; 3 | import { Font, Color, NumberItem, Space } from './items'; 4 | var BodyProperty = function (_a) { 5 | var backgroundColor = _a.backgroundColor, width = _a.width, fontFamily = _a.fontFamily, containerPadding = _a.containerPadding, onUpdate = _a.onUpdate; 6 | return React.createElement(React.Fragment, null, 7 | React.createElement(Group, { title: "GENERAL" }, 8 | React.createElement(Color, { title: "Background Color", value: backgroundColor, attribute: "backgroundColor", onUpdate: onUpdate }), 9 | React.createElement(NumberItem, { title: "Content Width", value: width, max: 3000, attribute: "width", onUpdate: onUpdate }), 10 | React.createElement(Font, { title: "Font Family", fontFamily: fontFamily, onUpdate: onUpdate }), 11 | React.createElement(Space, { title: "Container Padding", value: containerPadding, attribute: "containerPadding", onUpdate: onUpdate }))); 12 | }; 13 | export default BodyProperty; 14 | //# sourceMappingURL=BodyProperty.js.map -------------------------------------------------------------------------------- /src/style/layout.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Charm|Open+Sans+Condensed:300|Oswald|Poppins|Roboto+Condensed|Sarabun|Slabo+27px|Source+Sans+Pro|Ubuntu|ZCOOL+KuaiLe|ZCOOL+QingKe+HuangYou|ZCOOL+XiaoWei'); 2 | 3 | .col-1 { 4 | flex: 0 0 8.33333%; 5 | max-width: 8.33333%; } 6 | .col-2 { 7 | flex: 0 0 16.66667%; 8 | max-width: 16.66667%; } 9 | .col-3 { 10 | flex: 0 0 25%; 11 | max-width: 25%; } 12 | .col-4 { 13 | flex: 0 0 33.33333%; 14 | max-width: 33.33333%; } 15 | .col-5 { 16 | flex: 0 0 41.66667%; 17 | max-width: 41.66667%; } 18 | .col-6 { 19 | flex: 0 0 50%; 20 | max-width: 50%; } 21 | .col-7 { 22 | flex: 0 0 58.33333%; 23 | max-width: 58.33333%; } 24 | .col-8 { 25 | flex: 0 0 66.66667%; 26 | max-width: 66.66667%; } 27 | .col-9 { 28 | flex: 0 0 75%; 29 | max-width: 75%; } 30 | .col-10 { 31 | flex: 0 0 83.33333%; 32 | max-width: 83.33333%; } 33 | .col-11 { 34 | flex: 0 0 91.66667%; 35 | max-width: 91.66667%; } 36 | .col-12 { 37 | flex: 0 0 100%; 38 | max-width: 100%; } 39 | .col-24 { 40 | flex: 0 0 20%; 41 | max-width: 20%; 42 | } 43 | -------------------------------------------------------------------------------- /src/containers/Content.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { inject, observer } from 'mobx-react'; 3 | import ContentFactory from './sidebar/ContentItems/ContentFactory'; 4 | import Group from './sidebar/Property/Group'; 5 | 6 | @inject('rootStore') 7 | @observer 8 | class Content extends React.Component { 9 | render() { 10 | const { rootStore } = this.props; 11 | const extensionGroups = rootStore.DesignState.getExtensionGroups(); 12 | return extensionGroups.map(group => 13 |
      14 | {rootStore.DesignState.extensions.filter(extension => extension.group === group).map(Extension => { 15 | const instance = new Extension(); 16 | return ContentFactory(instance.getContentType(), instance.getLabel(), instance.getIconClass()); 17 | }) 18 | .map((Component, index) => )} 19 |
    20 |
    ); 21 | } 22 | } 23 | 24 | interface IContentProps { 25 | rootStore?: any; 26 | } 27 | 28 | export default Content; -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Number.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Number } from '../../../../components'; 3 | var NumberItem = function (_a) { 4 | var title = _a.title, value = _a.value, _b = _a.step, step = _b === void 0 ? 50 : _b, _c = _a.max, max = _c === void 0 ? 1000 : _c, _d = _a.min, min = _d === void 0 ? 0 : _d, attribute = _a.attribute, _e = _a.onUpdate, onUpdate = _e === void 0 ? function () { } : _e; 5 | return (React.createElement("div", { className: "ds-widget ds-link-widget" }, 6 | React.createElement("div", { className: "card-row" }, 7 | React.createElement("div", { className: "ds-widget-label col-6" }, 8 | React.createElement("label", { className: "ds-label-primary" }, 9 | React.createElement("span", null, title))), 10 | React.createElement("div", { className: "col-6 text-right" }, 11 | React.createElement(Number, { max: max, min: min, step: step, value: value, onChange: function (val) { onUpdate(attribute, val); } }))))); 12 | }; 13 | export default NumberItem; 14 | //# sourceMappingURL=Number.js.map -------------------------------------------------------------------------------- /lib/components/tinymce/index.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import AutoComplete from './autocomplete'; 3 | interface ITinyMceProps { 4 | focus?: boolean; 5 | value?: string; 6 | autoComplete?: boolean; 7 | config?: IKeyValueMap; 8 | onChange?: (type: string, content: string) => void; 9 | getContainer?: () => HTMLDivElement; 10 | } 11 | declare class TinyMce extends React.Component { 12 | _isMounted: boolean; 13 | autoComplete: AutoComplete; 14 | editor: any; 15 | state: { 16 | showDynamic: boolean; 17 | query: string; 18 | data: any[]; 19 | position: { 20 | x: number; 21 | y: number; 22 | }; 23 | }; 24 | componentDidMount(): void; 25 | componentDidUpdate({ focus }: { 26 | focus: any; 27 | }): void; 28 | componentWillUnmount(): void; 29 | handleEditorChange: (editor: any) => void; 30 | insertDynamic: (value: any) => void; 31 | initAutoComplete: (editor: any) => void; 32 | getContainer: () => HTMLDivElement; 33 | render(): JSX.Element; 34 | } 35 | export default TinyMce; 36 | -------------------------------------------------------------------------------- /lib/containers/Content.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Content.js","sourceRoot":"","sources":["../../src/containers/Content.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,cAAc,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,MAAM,0BAA0B,CAAC;AAI7C;IAAsB,2BAA8B;IAApD;;IAcA,CAAC;IAbC,wBAAM,GAAN;QACU,IAAA,gCAAS,CAAgB;QACjC,IAAM,eAAe,GAAG,SAAS,CAAC,WAAW,CAAC,kBAAkB,EAAE,CAAC;QACnE,OAAO,eAAe,CAAC,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,oBAAC,KAAK,IAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAC,cAAc;YAC3F,4BAAI,SAAS,EAAC,YAAY,IACvB,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,UAAA,SAAS,IAAI,OAAA,SAAS,CAAC,KAAK,KAAK,KAAK,EAAzB,CAAyB,CAAC,CAAC,GAAG,CAAC,UAAA,SAAS;gBAC5F,IAAM,QAAQ,GAAG,IAAI,SAAS,EAAE,CAAC;gBACjC,OAAO,cAAc,CAAC,QAAQ,CAAC,cAAc,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;YACjG,CAAC,CAAC;iBACC,GAAG,CAAC,UAAC,SAAS,EAAE,KAAK,IAAK,OAAA,oBAAC,SAAS,IAAC,GAAG,EAAK,KAAK,SAAI,KAAO,GAAI,EAAvC,CAAuC,CAAC,CAClE,CACC,EAR4B,CAQ5B,CAAC,CAAC;IACZ,CAAC;IAbG,OAAO;QAFZ,MAAM,CAAC,WAAW,CAAC;QACnB,QAAQ;OACH,OAAO,CAcZ;IAAD,cAAC;CAAA,AAdD,CAAsB,KAAK,CAAC,SAAS,GAcpC;AAMD,eAAe,OAAO,CAAC"} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 lang.yang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Input.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Input } from '../../../../components'; 3 | var InputItem = function (_a) { 4 | var title = _a.title, value = _a.value, attribute = _a.attribute, desc = _a.desc, _b = _a.onUpdate, onUpdate = _b === void 0 ? function () { } : _b; 5 | return (React.createElement("div", { className: "ds-widget ds-link-widget" }, 6 | React.createElement("div", { className: "card-row" }, 7 | React.createElement("div", { className: "ds-widget-label col-6" }, 8 | React.createElement("label", { className: "ds-label-primary" }, 9 | React.createElement("span", null, title)))), 10 | React.createElement("div", { className: "card-row", style: { marginTop: 10 } }, 11 | React.createElement("div", { className: "col-12" }, 12 | React.createElement(Input, { onChange: function (e) { onUpdate(attribute, e.target.value); }, value: value }), 13 | desc && React.createElement("div", { className: "ds-widget-hint" }, desc))))); 14 | }; 15 | export default InputItem; 16 | //# sourceMappingURL=Input.js.map -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/LineHeight.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Number } from '../../../../components'; 3 | var LineHeight = function (_a) { 4 | var _b = _a.lineHeight, lineHeight = _b === void 0 ? 120 : _b, _c = _a.title, title = _c === void 0 ? "Line Height" : _c, _d = _a.onUpdate, onUpdate = _d === void 0 ? function () { } : _d; 5 | return (React.createElement("div", { className: "ds-widget ds-link-widget" }, 6 | React.createElement("div", { className: "card-row" }, 7 | React.createElement("div", { className: "ds-widget-label col-6" }, 8 | React.createElement("label", { className: "ds-label-primary" }, 9 | React.createElement("span", null, title))), 10 | React.createElement("div", { className: "col-6 text-right" }, 11 | React.createElement(Number, { max: 1000, step: 10, formatter: function (val) { return val + "%"; }, parser: function (val) { return val.replace('%', ''); }, value: lineHeight, onChange: function (val) { onUpdate('lineHeight', val); } }))))); 12 | }; 13 | export default LineHeight; 14 | //# sourceMappingURL=LineHeight.js.map -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/Slide.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Slider from 'rc-slider'; 3 | import 'rc-slider/assets/index.css'; 4 | import { Number } from '../../../../components'; 5 | 6 | const Slide = ({ title = "Width", value = 100, attribute = 'width', onUpdate = () => { } }: ISlideProps) => ( 7 |
    8 |
    9 |
    10 | 11 |
    12 |
    13 | { onUpdate(attribute, val); }} 18 | /> 19 | { onUpdate(attribute, val); }} style={{ marginTop: 5 }} /> 20 |
    21 |
    22 |
    ); 23 | 24 | interface ISlideProps { 25 | title?: string; 26 | value?: number; 27 | attribute?: string; 28 | onUpdate?: onUpdate; 29 | } 30 | 31 | export default Slide; -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Switch.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Switch from "react-switch"; 3 | var SwitchItem = function (_a) { 4 | var _b = _a.title, title = _b === void 0 ? 'Do Not Stack on Mobile' : _b, _c = _a.checked, checked = _c === void 0 ? false : _c, _d = _a.attribute, attribute = _d === void 0 ? 'noStackMobile' : _d, _e = _a.onUpdate, onUpdate = _e === void 0 ? function () { } : _e; 5 | return (React.createElement("div", { className: "ds-widget ds-link-widget" }, 6 | React.createElement("div", { className: "card-row" }, 7 | React.createElement("div", { className: "ds-widget-label col-12" }, 8 | React.createElement("label", { className: "ds-label-primary" }, 9 | React.createElement("span", { style: { marginRight: 10 } }, title), 10 | React.createElement("div", { style: { verticalAlign: 'middle', display: 'inline-block' } }, 11 | React.createElement(Switch, { checked: checked, onChange: function (checked) { onUpdate(attribute, checked); }, height: 17, width: 34 }))))))); 12 | }; 13 | export default SwitchItem; 14 | //# sourceMappingURL=Switch.js.map -------------------------------------------------------------------------------- /src/containers/sidebar/Property/items/Link.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Input } from '../../../../components'; 3 | 4 | const Link = ({ title, linkType, link, onUpdate = () => { } }: ILinkProps) => ( 5 |
    6 |
    7 |
    8 | 9 |
    10 |
    11 | 15 |
    16 |
    17 |
    18 |
    19 | { onUpdate('link', e.target.value); }} value={link} /> 20 |
    21 |
    22 |
    ); 23 | 24 | interface ILinkProps { 25 | title?: string; 26 | linkType?: string; 27 | link?: string; 28 | onUpdate?: onUpdate; 29 | } 30 | 31 | export default Link; -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Space.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | declare class Space extends React.Component { 3 | constructor(props: any); 4 | static computeState(props: ISpaceProps): { 5 | more: boolean; 6 | value: string; 7 | top: number; 8 | right: number; 9 | bottom: number; 10 | left: number; 11 | all: number; 12 | }; 13 | static getDerivedStateFromProps(nextProps: any, prevState: any): { 14 | more: boolean; 15 | value: string; 16 | top: number; 17 | right: number; 18 | bottom: number; 19 | left: number; 20 | all: number; 21 | }; 22 | onMore: (checked: boolean) => void; 23 | onChange: (operate: any, val: any) => void; 24 | render(): JSX.Element; 25 | } 26 | interface ISpaceProps { 27 | title?: string; 28 | value?: string; 29 | attribute?: string; 30 | onUpdate?: onUpdate; 31 | } 32 | interface ISpaceState { 33 | more?: boolean; 34 | all?: number; 35 | left?: number; 36 | top?: number; 37 | right?: number; 38 | bottom?: number; 39 | } 40 | export default Space; 41 | -------------------------------------------------------------------------------- /src/sources/icons/down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /lib/containers/extension/Extension.js: -------------------------------------------------------------------------------- 1 | var __extends = (this && this.__extends) || (function () { 2 | var extendStatics = function (d, b) { 3 | extendStatics = Object.setPrototypeOf || 4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; 6 | return extendStatics(d, b); 7 | }; 8 | return function (d, b) { 9 | extendStatics(d, b); 10 | function __() { this.constructor = d; } 11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 12 | }; 13 | })(); 14 | import React from 'react'; 15 | var Extension = /** @class */ (function (_super) { 16 | __extends(Extension, _super); 17 | function Extension() { 18 | return _super !== null && _super.apply(this, arguments) || this; 19 | } 20 | Extension.prototype.componentWillUnmount = function () { 21 | this.setState = function (state, callback) { }; 22 | }; 23 | Extension.check = true; 24 | return Extension; 25 | }(React.Component)); 26 | export default Extension; 27 | //# sourceMappingURL=Extension.js.map -------------------------------------------------------------------------------- /src/sources/icons/video.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/containers/sidebar/RowItems/RowFactory.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { DragType, OperationMode } from '../../../lib/enum'; 3 | import { DragSource, ConnectDragSource } from 'react-dnd'; 4 | import * as Util from '../../common/DragUtil'; 5 | 6 | function RowFactory(rowType, segmentations = [1]): any { 7 | 8 | @(DragSource as any)(DragType.ROW, Util.getSource({ mode: OperationMode.INSERT, type: rowType, cells: segmentations }), Util.getCollect()) 9 | class RowElement extends React.Component { 10 | static type = rowType; 11 | render() { 12 | const { connectDragSource } = this.props; 13 | const total = segmentations.reduce((i, total) => i + total, 0); 14 | return connectDragSource(
  • 15 | { 16 | segmentations.map((i, index) => 17 | (
    18 |
    19 |
    )) 20 | } 21 |
  • ); 22 | } 23 | } 24 | 25 | interface IRowElementProps { 26 | connectDragSource?: ConnectDragSource; 27 | } 28 | 29 | return RowElement; 30 | } 31 | 32 | export default RowFactory; -------------------------------------------------------------------------------- /lib/containers/sidebar/RowItems/RowFactory.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"RowFactory.js","sourceRoot":"","sources":["../../../../src/containers/sidebar/RowItems/RowFactory.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAqB,MAAM,WAAW,CAAC;AAC1D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,SAAS,UAAU,CAAC,OAAO,EAAE,aAAmB;IAAnB,8BAAA,EAAA,iBAAiB,CAAC,CAAC;IAG9C;QAAyB,8BAAiC;QAA1D;;QAcA,CAAC;QAZC,2BAAM,GAAN;YACU,IAAA,gDAAiB,CAAgB;YACzC,IAAM,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,KAAK,IAAK,OAAA,CAAC,GAAG,KAAK,EAAT,CAAS,EAAE,CAAC,CAAC,CAAC;YAC/D,OAAO,iBAAiB,CAAC,gCAErB,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,EAAE,KAAK;gBACzB,OAAA,CAAC,6BAAK,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,uBAAqB,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAG;oBAC9F,6BAAK,SAAS,EAAC,gBAAgB,GAAO,CAClC,CAAC;YAFP,CAEO,CAAC,CAET,CAAC,CAAC;QACT,CAAC;QAZM,eAAI,GAAG,OAAO,CAAC;QADlB,UAAU;YADd,UAAkB,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;WACpI,UAAU,CAcf;QAAD,iBAAC;KAAA,AAdD,CAAyB,KAAK,CAAC,SAAS,GAcvC;IAMD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,eAAe,UAAU,CAAC"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Color.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ColorPicker from 'rc-color-picker'; 3 | import { rgb2rgba, rgba2rgb } from '../../../../lib/util'; 4 | import 'rc-color-picker/assets/index.css'; 5 | var Color = function (_a) { 6 | var _b = _a.title, title = _b === void 0 ? 'Color' : _b, _c = _a.value, value = _c === void 0 ? '#fff' : _c, _d = _a.attribute, attribute = _d === void 0 ? 'color' : _d, _e = _a.onUpdate, onUpdate = _e === void 0 ? function () { } : _e; 7 | var rgba = rgba2rgb(value); 8 | return React.createElement("div", { className: "ds-widget ds-link-widget" }, 9 | React.createElement("div", { className: "card-row" }, 10 | React.createElement("div", { className: "ds-widget-label col-6" }, 11 | React.createElement("label", { className: "ds-label-primary" }, 12 | React.createElement("span", null, title))), 13 | React.createElement("div", { className: "col-6 text-right" }, 14 | React.createElement(ColorPicker, { color: rgba.rgb, alpha: rgba.alpha, onChange: function (e) { onUpdate(attribute, rgb2rgba(e.color, e.alpha)); } })))); 15 | }; 16 | export default Color; 17 | //# sourceMappingURL=Color.js.map -------------------------------------------------------------------------------- /lib/containers/common/Selector.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Selector.js","sourceRoot":"","sources":["../../../src/containers/common/Selector.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC;IAAuB,4BAA+B;IAAtD;;IAkCA,CAAC;IA9BC,oCAAiB,GAAjB;QACU,IAAA,qBAAiB,EAAjB,4CAAiB,CAAgB;QACzC,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACrB;IACH,CAAC;IACD,yBAAM,GAAN;QAAA,iBAuBC;QAtBO,IAAA,eAA4F,EAA1F,mBAAmB,EAAnB,wCAAmB,EAAE,YAAY,EAAZ,iCAAY,EAAE,gBAAoB,EAApB,+CAAoB,EAAE,cAAkB,EAAlB,6CAAiC,CAAC;QACnG,OAAO,6BAAK,SAAS,EAAC,mBAAmB;YACvC,6BAAK,SAAS,EAAC,eAAe,IAAE,WAAW,CAAO;YAClD,6BACE,GAAG,EAAE,UAAA,GAAG,IAAM,KAAI,CAAC,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,EACnC,SAAS,EAAE,UAAU,CAAC,eAAe,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,wBAAwB,CAAC;gBAExG,2BAAG,SAAS,EAAC,gBAAgB,GAAG,CAC5B;YACN,6BAAK,SAAS,EAAC,0CAA0C;gBACvD,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;oBAC/B,2BAAG,SAAS,EAAC,4BAA4B,EAAC,OAAO,EAAE,QAAQ;wBACzD,2BAAG,SAAS,EAAC,iBAAiB,GAAG,CAC/B,CACA;gBACN,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;oBAC/B,2BAAG,SAAS,EAAC,kBAAkB,EAAC,OAAO,EAAE,MAAM;wBAC7C,2BAAG,SAAS,EAAC,gBAAgB,GAAG,CAC9B,CACA,CACF,CACF,CAAC;IACT,CAAC;IACH,eAAC;AAAD,CAAC,AAlCD,CAAuB,KAAK,CAAC,SAAS,GAkCrC;AAUD,eAAe,QAAQ,CAAC"} -------------------------------------------------------------------------------- /lib/components/portal/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/portal/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;IAAqB,0BAAiC;IAAtD;QAAA,qEA8CC;QAlBC,kBAAY,GAAG;YACb,IAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAChD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;YACrC,OAAO,SAAS,CAAC;QACnB,CAAC,CAAA;;IAcH,CAAC;IA1CC,kCAAiB,GAAjB;QACE,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAED,mCAAkB,GAAlB,UAAmB,SAAuB;QAChC,IAAA,gCAAS,CAAgB;QACjC,IAAI,SAAS,EAAE;YACb,SAAS,CAAC,SAAS,CAAC,CAAC;SACtB;IACH,CAAC;IAED,qCAAoB,GAApB;QACE,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAED,gCAAe,GAAf;QACE,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE;YAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;SAC5C;aAAM;YACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;SACtC;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAQD,gCAAe,GAAf;QACE,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACvD;IACH,CAAC;IAED,uBAAM,GAAN;QACE,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;SAC1D;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACH,aAAC;AAAD,CAAC,AA9CD,CAAqB,KAAK,CAAC,SAAS,GA8CnC;AAOD,eAAe,MAAM,CAAC"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/Group.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Group.js","sourceRoot":"","sources":["../../../../src/containers/sidebar/Property/Group.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAEjD;IAAoB,yBAAyC;IAA7D;QAAA,qEAoCC;QAlCC,WAAK,GAAgB;YACnB,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,IAAI;SACb,CAAA;QAED,YAAM,GAAG;YACP,IAAI,KAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACrB,KAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;aAC7C;iBAAM;gBACL,KAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aACjD;QACH,CAAC,CAAA;;IAuBH,CAAC;IArBC,sBAAM,GAAN;QACQ,IAAA,eAA2C,EAAzC,gBAAK,EAAE,sBAAQ,EAAE,wBAAwB,CAAC;QAClD,OAAO,6BAAK,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC;YAClD,6BAAK,SAAS,EAAC,aAAa,EAAC,OAAO,EAAE,IAAI,CAAC,MAAM;gBAC/C,6BAAK,SAAS,EAAC,UAAU;oBACvB,6BAAK,SAAS,EAAC,QAAQ;wBAAC,kCAAO,KAAK,CAAQ,CAAM;oBAClD,6BAAK,SAAS,EAAC,0BAA0B;wBACvC,2BAAG,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,gBAAgB,GAAM,CACrE,CACF,CACF;YACN,oBAAC,aAAa,IACZ,SAAS,EAAC,eAAe,EACzB,MAAM,EAAG,IAAI,CAAC,KAAK,CAAC,MAAM;gBAE1B,6BAAK,SAAS,EAAC,WAAW,IACvB,QAAQ,CACL,CACQ,CACZ,CAAC;IACT,CAAC;IACH,YAAC;AAAD,CAAC,AApCD,CAAoB,KAAK,CAAC,SAAS,GAoClC;AAaD,eAAe,KAAK,CAAC"} -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/RowProperty.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"RowProperty.js","sourceRoot":"","sources":["../../../../src/containers/sidebar/Property/RowProperty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE5D,IAAM,WAAW,GAAG,UAAC,EAGyB;QAHvB,kDAAsB,EAC3C,oCAAe,EAAE,oCAAe,EAChC,gCAAa,EAAE,oBAAO,EAAE,wBAAS,EAAE,kBAAM,EACzC,kBAAM,EAAE,gBAAK,EAAE,sBAAQ;IAA0B,OAAA,oBAAC,KAAK,CAAC,QAAQ;QAChE,oBAAC,KAAK,IAAC,KAAK,EAAC,SAAS;YACpB,oBAAC,KAAK,IAAC,KAAK,EAAC,kBAAkB,EAAC,KAAK,EAAE,eAAe,EAAE,SAAS,EAAC,iBAAiB,EAAC,QAAQ,EAAE,QAAQ,GAAI;YAC1G,oBAAC,WAAW,IACV,GAAG,EAAE,KAAK,CAAC,IAAI,EACf,SAAS,EAAC,iBAAiB,EAC3B,GAAG,EAAE,eAAe,EACpB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,QACP,QAAQ,EAAE,QAAQ,GAClB;YACF,oBAAC,KAAK,IAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAC,SAAS,EAAC,QAAQ,EAAE,QAAQ,GAAI,CAC3E;QACR,oBAAC,KAAK,IAAC,KAAK,EAAC,QAAQ;YACnB,oBAAC,MAAM,IAAC,KAAK,EAAC,wBAAwB,EAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAC,eAAe,EAAC,QAAQ,EAAE,QAAQ,GAAI,CACzG;QACR,oBAAC,KAAK,IAAC,KAAK,EAAC,SAAS;YACpB,oBAAC,KAAK,IAAC,KAAK,EAAC,oBAAoB,EAAC,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAC,wBAAwB,EAAC,QAAQ,EAAE,QAAQ,GAAI,CACpH,CACO;AArBkC,CAqBlC,CAAC;AAelB,eAAe,WAAW,CAAC"} -------------------------------------------------------------------------------- /src/sources/icons/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /lib/components/tabs/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/tabs/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC;IAAmB,wBAAuC;IAA1D;QAAA,qEA4BC;QA1BC,WAAK,GAAe;YAClB,aAAa,EAAE,CAAC;SACjB,CAAA;;IAwBH,CAAC;IApBC,qBAAM,GAAN;QAAA,iBAmBC;QAlBO,IAAA,eAAkC,EAAhC,sBAAQ,EAAE,oBAAsB,CAAC;QACzC,OAAO,oBAAC,KAAK,CAAC,QAAQ;YACpB,4BAAI,SAAS,EAAC,cAAc,EAAC,OAAO,EAAE,OAAO,IAC1C,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,KAAU,EAAE,KAAK;gBAC9C,OAAO,4BAAI,SAAS,EAAC,UAAU;oBAC7B,2BACE,OAAO,EAAE,cAAQ,KAAI,CAAC,QAAQ,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAC3D,SAAS,EAAE,UAAU,CAAC,UAAU,EAAE,KAAI,CAAC,KAAK,CAAC,aAAa,KAAK,KAAK,IAAI,QAAQ,CAAC;wBAEjF,2BAAG,SAAS,EAAK,KAAK,CAAC,KAAK,CAAC,IAAI,UAAO,GAAI;wBAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAC1D,CACD,CAAC;YACR,CAAC,CAAC,CACC;YACL,6BAAK,OAAO,EAAE,OAAO,IAClB,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CACvD,CACS,CAAC;IACpB,CAAC;IACH,WAAC;AAAD,CAAC,AA5BD,CAAmB,KAAK,CAAC,SAAS,GA4BjC;AAUD;IAAkB,uBAA0B;IAA5C;;IAKA,CAAC;IAJC,oBAAM,GAAN;QACU,IAAA,8BAAQ,CAAgB;QAChC,OAAO,iCAAM,QAAQ,CAAO,CAAC;IAC/B,CAAC;IACH,UAAC;AAAD,CAAC,AALD,CAAkB,KAAK,CAAC,SAAS,GAKhC;AAOD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;AAEf,eAAe,IAAI,CAAC"} -------------------------------------------------------------------------------- /lib/components/form/Html.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import * as React from 'react'; 13 | import Editor from './html/react-simple-code-editor'; 14 | import { highlight, languages } from './html/prism'; 15 | import './html/prism.css'; 16 | export default (function (_a) { 17 | var value = _a.value, onChange = _a.onChange, _b = _a.style, style = _b === void 0 ? {} : _b; 18 | return (React.createElement("div", { style: __assign({}, style, { minHeight: 50 }) }, 19 | React.createElement(Editor, { value: value, onValueChange: function (value) { return onChange(value); }, highlight: function (code) { var a = highlight(code, languages.html); console.log(code, a); return a; }, padding: 10, style: { 20 | fontFamily: '"Fira code", "Fira Mono", monospace', 21 | fontSize: 12, 22 | } }))); 23 | }); 24 | //# sourceMappingURL=Html.js.map -------------------------------------------------------------------------------- /src/components/react-animate-css/slide-top-bottom-fade.less: -------------------------------------------------------------------------------- 1 | 2 | @prefixTopFade: slide-top-fade; 3 | @prefixBottomFade: slide-bottom-fade; 4 | @duration: 250ms; 5 | 6 | .@{prefixTopFade}-enter { 7 | opacity: 0; 8 | transform: translate3d(0, -20%, 0); 9 | } 10 | 11 | .@{prefixTopFade}-enter.@{prefixTopFade}-enter-active { 12 | opacity: 1; 13 | transform: translate3d(0, 0, 0); 14 | transition: all @duration ease-out; 15 | } 16 | 17 | .@{prefixTopFade}-leave { 18 | opacity: 1; 19 | transform: translate3d(0, 0, 0); 20 | } 21 | 22 | .@{prefixTopFade}-leave.@{prefixTopFade}-leave-active { 23 | opacity: 0; 24 | transform: translate3d(0, -20%, 0); 25 | transition: all @duration ease-out; 26 | } 27 | 28 | 29 | .@{prefixBottomFade}-enter { 30 | opacity: 0; 31 | transform: translate3d(0, 20%, 0); 32 | } 33 | 34 | .@{prefixBottomFade}-enter.@{prefixBottomFade}-enter-active { 35 | opacity: 1; 36 | transform: translate3d(0, 0, 0); 37 | transition: all @duration ease-out; 38 | } 39 | 40 | .@{prefixBottomFade}-leave { 41 | opacity: 1; 42 | transform: translate3d(0, 0, 0); 43 | } 44 | 45 | .@{prefixBottomFade}-leave.@{prefixBottomFade}-leave-active { 46 | opacity: 0; 47 | transform: translate3d(0, 20%, 0); 48 | transition: all @duration ease-out; 49 | } 50 | 51 | -------------------------------------------------------------------------------- /lib/containers/Container.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import '../style/index.less'; 3 | import { IExtensionGroupProps, IExtensionGroup } from './extension/ExtensionGroup'; 4 | declare class DesignEditor extends React.Component { 5 | componentDidMount(): void; 6 | componentWillUnmount(): void; 7 | bindShortKey: (e: KeyboardEvent) => void; 8 | componentWillReceiveProps(nextProps: any, nextState: any): void; 9 | initConfig(): void; 10 | export: () => string; 11 | getData: () => import("../schemas/transform").IData; 12 | setData: (json: any) => void; 13 | render(): JSX.Element; 14 | } 15 | interface IApi { 16 | export: () => void; 17 | getData: () => IKeyValueMap; 18 | setData: (json: IKeyValueMap) => void; 19 | undo: () => void; 20 | redo: () => void; 21 | } 22 | interface IDesignEditorProps { 23 | children?: React.ReactElement | React.ReactElement[]; 24 | onRef?: (api: IApi) => void; 25 | mentions?: any; 26 | contents?: any; 27 | enableUndoRedo?: boolean; 28 | imageUploadUrl?: string; 29 | onUpload?: (data: IKeyValueMap) => string; 30 | onUploadError?: (error: Error) => void; 31 | } 32 | export default DesignEditor; 33 | -------------------------------------------------------------------------------- /src/sources/icons/preview.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /lib/components/form/Line.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Line.js","sourceRoot":"","sources":["../../../src/components/form/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,cAAc,CAAC;AACtB,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEpD,gBAAe,UAAC,EAAyD;QAAvD,wBAAS,EAAE,wBAAS,EAAE,wBAAS,EAAE,sBAAQ;IACzD,IAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IACjC,OAAO,oBAAC,KAAK,CAAC,QAAQ;QACpB,gCAAQ,SAAS,EAAC,cAAc,EAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAA,CAAC,IAAM,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC1G,gCAAQ,KAAK,EAAC,OAAO,YAAe;YACpC,gCAAQ,KAAK,EAAC,QAAQ,aAAgB;YACtC,gCAAQ,KAAK,EAAC,QAAQ,aAAgB,CAC/B;QACT,6BAAK,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE;YAC1B,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,EAAE;gBAC3D,oBAAC,MAAM,IAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAA,GAAG,IAAM,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAI,CACpG;YACN,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,EAAE,EAAE;gBACrD,oBAAC,WAAW,IAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAA,CAAC,IAAM,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAI,CACtH,CACF,CACS,CAAC;AACpB,CAAC,EAAC"} -------------------------------------------------------------------------------- /lib/containers/extension/Extension.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { IContentMeta } from 'src/schemas/transform'; 3 | import { ContentType } from 'src/lib/enum'; 4 | declare abstract class Extension extends React.Component

    { 5 | static check: boolean; 6 | type: string; 7 | componentWillUnmount(): void; 8 | abstract getIconClass(): string; 9 | abstract getLabel(): string; 10 | abstract getContentType(): string; 11 | abstract toHtml(json: IKeyValueMap): string; 12 | abstract getInitialAttribute(): P & IExtensionProps; 13 | abstract getProperties(values: P & IExtensionProps, update: onUpdate): React.ReactFragment; 14 | } 15 | export interface IExtensionProps { 16 | focus?: boolean; 17 | onUpdate?: onUpdate; 18 | _meta?: IContentMeta; 19 | } 20 | export interface IExtension

    { 21 | new (props: any): React.Component; 22 | type?: ContentType | string; 23 | group?: string; 24 | getContentType: () => string; 25 | getLabel: () => string; 26 | getIconClass: () => string; 27 | toHtml: (json: IKeyValueMap) => string; 28 | getInitialAttribute: () => P & IExtensionProps; 29 | getProperties: (values: P & IExtensionProps, update: onUpdate) => React.ReactFragment; 30 | } 31 | export default Extension; 32 | -------------------------------------------------------------------------------- /src/sources/icons/up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/sources/icons/email.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/components/form/Line.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ColorPicker from 'rc-color-picker'; 3 | import 'rc-color-picker/assets/index.css'; 4 | import './index.less'; 5 | import Number from './Number'; 6 | import { rgb2rgba, rgba2rgb } from '../../lib/util'; 7 | 8 | export default ({ lineWidth, lineStyle, lineColor, onUpdate }: ILineProps) => { 9 | const rgba = rgba2rgb(lineColor); 10 | return 11 | 16 |

    17 |
    18 | { onUpdate('lineWidth', val); }} /> 19 |
    20 |
    21 | { onUpdate('lineColor', rgb2rgba(e.color, e.alpha)); }} /> 22 |
    23 |
    24 | ; 25 | }; 26 | 27 | interface ILineProps { 28 | lineWidth?: number; 29 | lineStyle?: string; 30 | lineColor?: string; 31 | onUpdate?: onUpdate; 32 | } -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Slide.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Slider from 'rc-slider'; 3 | import 'rc-slider/assets/index.css'; 4 | import { Number } from '../../../../components'; 5 | var Slide = function (_a) { 6 | var _b = _a.title, title = _b === void 0 ? "Width" : _b, _c = _a.value, value = _c === void 0 ? 100 : _c, _d = _a.attribute, attribute = _d === void 0 ? 'width' : _d, _e = _a.onUpdate, onUpdate = _e === void 0 ? function () { } : _e; 7 | return (React.createElement("div", { className: "ds-widget ds-link-widget" }, 8 | React.createElement("div", { className: "card-row" }, 9 | React.createElement("div", { className: "ds-widget-label col-6" }, 10 | React.createElement("label", { className: "ds-label-primary" }, 11 | React.createElement("span", null, title))), 12 | React.createElement("div", { className: "col-6" }, 13 | React.createElement(Slider, { trackStyle: { backgroundColor: '#007BFF' }, handleStyle: { borderColor: '#4094EF' }, value: value, onChange: function (val) { onUpdate(attribute, val); } }), 14 | React.createElement(Number, { max: 100, min: 0, step: 1, value: value, onChange: function (val) { onUpdate(attribute, val); }, style: { marginTop: 5 } }))))); 15 | }; 16 | export default Slide; 17 | //# sourceMappingURL=Slide.js.map -------------------------------------------------------------------------------- /src/components/portal/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { createPortal } from 'react-dom'; 3 | 4 | class Portal extends React.Component { 5 | 6 | container: HTMLDivElement; 7 | 8 | componentDidMount() { 9 | this.createContainer(); 10 | } 11 | 12 | componentDidUpdate(prevProps: IPortalProps) { 13 | const { didUpdate } = this.props; 14 | if (didUpdate) { 15 | didUpdate(prevProps); 16 | } 17 | } 18 | 19 | componentWillUnmount() { 20 | this.removeContainer(); 21 | } 22 | 23 | createContainer() { 24 | if (this.props.getContainer) { 25 | this.container = this.props.getContainer(); 26 | } else { 27 | this.container = this.getContainer(); 28 | } 29 | this.forceUpdate(); 30 | } 31 | 32 | getContainer = () => { 33 | const container = document.createElement('div'); 34 | document.body.appendChild(container); 35 | return container; 36 | } 37 | 38 | removeContainer() { 39 | if (this.container) { 40 | this.container.parentNode.removeChild(this.container); 41 | } 42 | } 43 | 44 | render() { 45 | if (this.container) { 46 | return createPortal(this.props.children, this.container); 47 | } 48 | return null; 49 | } 50 | } 51 | 52 | interface IPortalProps { 53 | getContainer?: Function; 54 | didUpdate?: Function; 55 | } 56 | 57 | export default Portal; -------------------------------------------------------------------------------- /src/components/react-animate-css/slide-left-right.less: -------------------------------------------------------------------------------- 1 | 2 | @prefixLeft: slide-left; 3 | @prefixRight: slide-right; 4 | @duration: 250ms; 5 | 6 | .@{prefixLeft}-enter { 7 | position: absolute; 8 | top: 0; 9 | bottom: 0; 10 | width: 100%; 11 | z-index: 10000; 12 | opacity: 1; 13 | transform: translate3d(100%, 0, 0); 14 | } 15 | 16 | .@{prefixLeft}-enter.@{prefixLeft}-enter-active { 17 | opacity: 1; 18 | transform: translate3d(0, 0, 0); 19 | transition: all @duration ease-out; 20 | } 21 | 22 | .@{prefixLeft}-leave { 23 | opacity: 1; 24 | transform: translate3d(0, 0, 0); 25 | } 26 | 27 | .@{prefixLeft}-leave.@{prefixLeft}-leave-active { 28 | opacity: 1; 29 | transform: translate3d(-100%, 0, 0); 30 | transition: all @duration ease-out; 31 | } 32 | 33 | 34 | .@{prefixRight}-enter { 35 | transform: translate3d(-100%, 0, 0); 36 | } 37 | 38 | .@{prefixRight}-enter.@{prefixRight}-enter-active { 39 | transform: translate3d(0, 0, 0); 40 | transition: all @duration ease-out; 41 | } 42 | 43 | .@{prefixRight}-leave { 44 | position: absolute; 45 | top: 0; 46 | bottom: 0; 47 | width: 100%; 48 | background: #fff; 49 | z-index: 10000; 50 | opacity: 1; 51 | transform: translate3d(0, 0, 0); 52 | } 53 | 54 | .@{prefixRight}-leave.@{prefixRight}-leave-active { 55 | opacity: 1; 56 | transform: translate3d(100%, 0, 0); 57 | transition: all @duration ease-out; 58 | } 59 | 60 | -------------------------------------------------------------------------------- /src/components/utils/util.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | let targetMapping = []; 4 | 5 | const _onDocumentClick = e => { 6 | targetMapping.forEach(obj => { 7 | if (e.target === obj.target || Util.isParent(e.target, obj.target)) return; 8 | obj.callbacks.forEach(callback => callback()); 9 | }); 10 | }; 11 | 12 | window.document.body.addEventListener('click', _onDocumentClick); 13 | 14 | const Util = { 15 | isParent: (obj, parentObj) => { 16 | while (obj !== undefined && obj != null && obj.tagName && obj.tagName.toUpperCase() !== 'BODY') { 17 | if (obj === parentObj) { 18 | return true; 19 | } 20 | // eslint-disable-next-line no-param-reassign 21 | obj = obj.parentNode; 22 | } 23 | return false; 24 | }, 25 | outClick: (target, callback) => { 26 | const callbacks = targetMapping.filter(item => item.target === target); 27 | if (callbacks.length > 0) { 28 | callbacks[0].callbacks.push(callback); 29 | } else { 30 | targetMapping.push({ 31 | target, 32 | callbacks: [callback], 33 | }); 34 | } 35 | return { 36 | cancel: () => { 37 | targetMapping = targetMapping.filter(item => item.target !== target); 38 | } 39 | }; 40 | }, 41 | canceloutClick: target => { 42 | targetMapping = targetMapping.filter(item => item.target !== target); 43 | } 44 | }; 45 | 46 | export default Util; 47 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/items/Link.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Input } from '../../../../components'; 3 | var Link = function (_a) { 4 | var title = _a.title, linkType = _a.linkType, link = _a.link, _b = _a.onUpdate, onUpdate = _b === void 0 ? function () { } : _b; 5 | return (React.createElement("div", { className: "ds-widget ds-link-widget" }, 6 | React.createElement("div", { className: "card-row" }, 7 | React.createElement("div", { className: "ds-widget-label col-6" }, 8 | React.createElement("label", { className: "ds-label-primary" }, 9 | React.createElement("span", null, title))), 10 | React.createElement("div", { className: "col-6" }, 11 | React.createElement("select", { className: "form-control form-control-sm", value: linkType, onChange: function (e) { onUpdate('linkType', e.target.value); } }, 12 | React.createElement("option", { value: "_self" }, "Same Tab"), 13 | React.createElement("option", { value: "_blank" }, "New Tab")))), 14 | React.createElement("div", { className: "card-row", style: { marginTop: 10 } }, 15 | React.createElement("div", { className: "col-12" }, 16 | React.createElement(Input, { addOn: "URL", onChange: function (e) { onUpdate('link', e.target.value); }, value: link }))))); 17 | }; 18 | export default Link; 19 | //# sourceMappingURL=Link.js.map -------------------------------------------------------------------------------- /src/components/react-animate-css/slide-left-right-fade.less: -------------------------------------------------------------------------------- 1 | 2 | @prefixLeft: slide-left-fade; 3 | @prefixRight: slide-right-fade; 4 | @duration: 250ms; 5 | 6 | .@{prefixLeft}-enter { 7 | position: absolute; 8 | top: 0; 9 | bottom: 0; 10 | width: 100%; 11 | z-index: 10000; 12 | opacity: 0; 13 | transform: translate3d(30%, 0, 0); 14 | } 15 | 16 | .@{prefixLeft}-enter.@{prefixLeft}-enter-active { 17 | opacity: 1; 18 | transform: translate3d(0, 0, 0); 19 | transition: all @duration ease-out; 20 | } 21 | 22 | .@{prefixLeft}-leave { 23 | opacity: 1; 24 | transform: translate3d(0, 0, 0); 25 | } 26 | 27 | .@{prefixLeft}-leave.@{prefixLeft}-leave-active { 28 | opacity: 0; 29 | transform: translate3d(-30%, 0, 0); 30 | transition: all @duration ease-out; 31 | } 32 | 33 | 34 | .@{prefixRight}-enter { 35 | opacity: 0; 36 | transform: translate3d(-30%, 0, 0); 37 | } 38 | 39 | .@{prefixRight}-enter.@{prefixRight}-enter-active { 40 | opacity: 1; 41 | transform: translate3d(0, 0, 0); 42 | transition: all @duration ease-out; 43 | } 44 | 45 | .@{prefixRight}-leave { 46 | position: absolute; 47 | top: 0; 48 | bottom: 0; 49 | width: 100%; 50 | background: #fff; 51 | z-index: 10000; 52 | opacity: 1; 53 | transform: translate3d(0, 0, 0); 54 | } 55 | 56 | .@{prefixRight}-leave.@{prefixRight}-leave-active { 57 | opacity: 0; 58 | transform: translate3d(30%, 0, 0); 59 | transition: all @duration ease-out; 60 | } 61 | 62 | -------------------------------------------------------------------------------- /src/containers/extension/ExtensionGroup.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import rootStore from '../../store/store'; 3 | import { IExtensionProps, IExtension } from './Extension'; 4 | 5 | class ExtensionGroup extends React.Component { 6 | 7 | componentDidMount() { 8 | this.initConfig(); 9 | } 10 | 11 | initConfig() { 12 | const { children, title } = this.props; 13 | setTimeout(() => { 14 | React.Children.forEach>(children, child => { 15 | if (child) { 16 | const content = new child.type({}) as any as IExtension; // eslint-disable-line 17 | child.type.type = content.getContentType(); 18 | child.type.group = title; 19 | rootStore.DesignState.addExtension(child.type); 20 | rootStore.DesignState.setAttribute(child.type.type, content.getInitialAttribute()); 21 | } 22 | }); 23 | }); 24 | } 25 | 26 | render() { 27 | return null; 28 | } 29 | } 30 | 31 | export interface IExtensionGroupProps { 32 | children?: React.ReactElement | React.ReactElement[]; 33 | rootStore?: any; 34 | title: string; 35 | } 36 | export interface IExtensionGroup { 37 | new (props: any): React.Component; 38 | } 39 | interface IExtensionGroupStates { 40 | } 41 | 42 | export default ExtensionGroup; -------------------------------------------------------------------------------- /src/sources/icons/html.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /lib/containers/extension/Html.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Html.js","sourceRoot":"","sources":["../../../src/containers/extension/Html.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,MAAM,2BAA2B,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAE9D;IAAmB,wBAAqB;IAAxC;;IAmDA,CAAC;IAlDC,2BAAY,GAAZ;QACE,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,6BAAc,GAAd;QACE,OAAO,WAAW,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED,uBAAQ,GAAR;QACE,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,qBAAM,GAAN,UAAO,IAAI;QACD,IAAA,gBAAI,EAAE,wCAAgB,CAAU;QACxC,OAAO,uCACiB,gBAAgB,2BAC7B,IAAI,qCAER,CAAC;IACV,CAAC;IAED,kCAAmB,GAAnB;QACE,OAAO;YACL,IAAI,EAAE,oBAAoB;YAC1B,gBAAgB,EAAE,MAAM;SACzB,CAAC;IACJ,CAAC;IAED,4BAAa,GAAb,UAAc,MAAM,EAAE,MAAM;QAClB,IAAA,kBAAI,EAAE,0CAAgB,CAAY;QAC1C,OAAO,oBAAC,KAAK,CAAC,QAAQ;YACpB,oBAAC,KAAK,IAAC,KAAK,EAAC,MAAM;gBACjB,oBAAC,UAAU,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAA,KAAK,IAAM,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAI,CAChG;YACR,oBAAC,KAAK,IAAC,KAAK,EAAC,SAAS;gBACpB,oBAAC,KAAK,IAAC,KAAK,EAAC,mBAAmB,EAAC,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAC,kBAAkB,EAAC,QAAQ,EAAE,MAAM,GAAI,CACrG,CACO,CAAC;IACpB,CAAC;IAED,qBAAM,GAAN;QACQ,IAAA,eAAuC,EAArC,cAAI,EAAE,sCAA+B,CAAC;QAC9C,OAAO,6BAAK,SAAS,EAAC,iBAAiB;YACrC,6BAAK,KAAK,EAAE;oBACV,OAAO,EAAE,gBAAgB;iBAC1B;gBACC,6BAAK,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAQ,CAClD,CACF,CAAC;IACT,CAAC;IACH,WAAC;AAAD,CAAC,AAnDD,CAAmB,SAAS,GAmD3B;AAOD,eAAe,IAAI,CAAC"} -------------------------------------------------------------------------------- /src/containers/extension/Extension.tsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { IContentMeta } from 'src/schemas/transform'; 3 | import { ContentType } from 'src/lib/enum'; 4 | 5 | abstract class Extension extends React.Component

    { 6 | 7 | static check: boolean = true; 8 | type: string; 9 | 10 | componentWillUnmount() { 11 | this.setState = (state: IExtendsionState, callback) => { }; 12 | } 13 | 14 | abstract getIconClass(): string; 15 | 16 | abstract getLabel(): string; 17 | 18 | abstract getContentType(): string; 19 | 20 | abstract toHtml(json: IKeyValueMap): string; 21 | 22 | abstract getInitialAttribute(): P & IExtensionProps; 23 | 24 | abstract getProperties(values: P & IExtensionProps, update: onUpdate): React.ReactFragment; 25 | } 26 | 27 | export interface IExtensionProps { 28 | focus?: boolean; 29 | onUpdate?: onUpdate; 30 | _meta?: IContentMeta; 31 | } 32 | 33 | export interface IExtension { 34 | new (props: any): React.Component; 35 | type?: ContentType | string; 36 | group?: string; 37 | getContentType: () => string; 38 | getLabel: () => string; 39 | getIconClass: () => string; 40 | toHtml: (json: IKeyValueMap) => string; 41 | getInitialAttribute: () => P & IExtensionProps; 42 | getProperties: (values: P & IExtensionProps, update: onUpdate) => React.ReactFragment; 43 | } 44 | 45 | interface IExtendsionState { 46 | } 47 | 48 | export default Extension; -------------------------------------------------------------------------------- /lib/containers/SideBar.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"SideBar.js","sourceRoot":"","sources":["../../src/containers/SideBar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,QAAQ,MAAM,6BAA6B,CAAC;AACnD,OAAO,YAAY,MAAM,iCAAiC,CAAC;AAI3D;IAAsB,2BAA8B;IAFpD;QAAA,qEAgCC;QA7BC,WAAK,GAAG;YACN,MAAM,EAAE,CAAC;SACV,CAAA;QAED,cAAQ,GAAG,UAAC,GAAG,EAAE,KAAK;YACC,IAAA,+CAAW,CAAkB;YAClD,WAAW,CAAC,mBAAmB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9C,CAAC,CAAA;QAED,gBAAU,GAAG;YACU,IAAA,+CAAW,CAAkB;YAClD,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC,CAAA;;IAiBH,CAAC;IAhBC,wBAAM,GAAN;QACuB,IAAA,8CAAW,CAAkB;QAClD,IAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;QAC1C,OAAO,6BAAK,SAAS,EAAC,YAAY;YAChC,oBAAC,IAAI,IAAC,OAAO,EAAE,IAAI,CAAC,UAAU;gBAC5B,oBAAC,IAAI,CAAC,GAAG,IAAC,GAAG,EAAC,SAAS,EAAC,IAAI,EAAC,gBAAgB;oBAAC,oBAAC,OAAO,OAAG,CAAW;gBACpE,oBAAC,IAAI,CAAC,GAAG,IAAC,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,wBAAwB;oBAAC,oBAAC,GAAG,OAAG,CAAW;gBACpE,oBAAC,IAAI,CAAC,GAAG,IAAC,GAAG,EAAC,MAAM,EAAC,IAAI,EAAC,gBAAgB;oBACxC,6BAAK,SAAS,EAAC,oCAAoC;wBACjD,oBAAC,YAAY,eAAK,IAAI,IAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,CAC/C,CACG,CACN;YACP,oBAAC,QAAQ,IAAC,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,QAAQ,EAAE,cAAc,SAAG,CAC1F,CAAC;IACT,CAAC;IA7BG,OAAO;QAFZ,MAAM,CAAC,WAAW,CAAC;QACnB,QAAQ;OACH,OAAO,CA8BZ;IAAD,cAAC;CAAA,AA9BD,CAAsB,KAAK,CAAC,SAAS,GA8BpC;AAMD,eAAe,OAAO,CAAC"} -------------------------------------------------------------------------------- /lib/components/utils/util.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/components/utils/util.ts"],"names":[],"mappings":"AAEA,IAAI,aAAa,GAAG,EAAE,CAAC;AAEvB,IAAM,gBAAgB,GAAG,UAAA,CAAC;IACxB,aAAa,CAAC,OAAO,CAAC,UAAA,GAAG;QACvB,IAAI,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC;YAAE,OAAO;QAC3E,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,EAAE,EAAV,CAAU,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAEjE,IAAM,IAAI,GAAG;IACX,QAAQ,EAAE,UAAC,GAAG,EAAE,SAAS;QACvB,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,MAAM,EAAE;YAC9F,IAAI,GAAG,KAAK,SAAS,EAAE;gBACrB,OAAO,IAAI,CAAC;aACb;YACD,6CAA6C;YAC7C,GAAG,GAAG,GAAG,CAAC,UAAU,CAAC;SACtB;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,QAAQ,EAAE,UAAC,MAAM,EAAE,QAAQ;QACzB,IAAM,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,MAAM,KAAK,MAAM,EAAtB,CAAsB,CAAC,CAAC;QACvE,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YACxB,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACvC;aAAM;YACL,aAAa,CAAC,IAAI,CAAC;gBACjB,MAAM,QAAA;gBACN,SAAS,EAAE,CAAC,QAAQ,CAAC;aACtB,CAAC,CAAC;SACJ;QACD,OAAO;YACL,MAAM,EAAE;gBACN,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,MAAM,KAAK,MAAM,EAAtB,CAAsB,CAAC,CAAC;YACvE,CAAC;SACF,CAAC;IACJ,CAAC;IACD,cAAc,EAAE,UAAA,MAAM;QACpB,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,MAAM,KAAK,MAAM,EAAtB,CAAsB,CAAC,CAAC;IACvE,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"} -------------------------------------------------------------------------------- /lib/components/error/ErrorBoundary.js: -------------------------------------------------------------------------------- 1 | var __extends = (this && this.__extends) || (function () { 2 | var extendStatics = function (d, b) { 3 | extendStatics = Object.setPrototypeOf || 4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; 6 | return extendStatics(d, b); 7 | }; 8 | return function (d, b) { 9 | extendStatics(d, b); 10 | function __() { this.constructor = d; } 11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 12 | }; 13 | })(); 14 | import * as React from 'react'; 15 | var ErrorBoundary = /** @class */ (function (_super) { 16 | __extends(ErrorBoundary, _super); 17 | function ErrorBoundary(props) { 18 | var _this = _super.call(this, props) || this; 19 | _this.state = { hasError: false }; 20 | return _this; 21 | } 22 | ErrorBoundary.prototype.componentDidCatch = function (error, info) { 23 | this.setState({ hasError: true }); 24 | }; 25 | ErrorBoundary.prototype.render = function () { 26 | var _a = this.props.tips, tips = _a === void 0 ? 'SOMETHING WENT WRONG' : _a; 27 | if (this.state.hasError) { 28 | return tips; 29 | } 30 | return this.props.children; 31 | }; 32 | return ErrorBoundary; 33 | }(React.Component)); 34 | export default ErrorBoundary; 35 | //# sourceMappingURL=ErrorBoundary.js.map -------------------------------------------------------------------------------- /lib/components/form/Line.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ColorPicker from 'rc-color-picker'; 3 | import 'rc-color-picker/assets/index.css'; 4 | import './index.less'; 5 | import Number from './Number'; 6 | import { rgb2rgba, rgba2rgb } from '../../lib/util'; 7 | export default (function (_a) { 8 | var lineWidth = _a.lineWidth, lineStyle = _a.lineStyle, lineColor = _a.lineColor, onUpdate = _a.onUpdate; 9 | var rgba = rgba2rgb(lineColor); 10 | return React.createElement(React.Fragment, null, 11 | React.createElement("select", { className: "form-control", value: lineStyle, onChange: function (e) { onUpdate('lineStyle', e.target.value); } }, 12 | React.createElement("option", { value: "solid" }, "Solid"), 13 | React.createElement("option", { value: "dotted" }, "Dotted"), 14 | React.createElement("option", { value: "dashed" }, "Dashed")), 15 | React.createElement("div", { style: { marginTop: 5 } }, 16 | React.createElement("div", { style: { display: 'inline-block', verticalAlign: 'top' } }, 17 | React.createElement(Number, { max: 20, min: 1, step: 1, value: lineWidth, onChange: function (val) { onUpdate('lineWidth', val); } })), 18 | React.createElement("div", { style: { display: 'inline-block', marginLeft: 30 } }, 19 | React.createElement(ColorPicker, { color: rgba.rgb, alpha: rgba.alpha, onChange: function (e) { onUpdate('lineColor', rgb2rgba(e.color, e.alpha)); } })))); 20 | }); 21 | //# sourceMappingURL=Line.js.map -------------------------------------------------------------------------------- /src/containers/sidebar/Property/Group.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | import AnimateHeight from 'react-animate-height'; 4 | 5 | class Group extends React.Component { 6 | 7 | state: IGroupState = { 8 | height: 'auto', 9 | expand: true, 10 | } 11 | 12 | toggle = () => { 13 | if (this.state.expand) { 14 | this.setState({ height: 0, expand: false }); 15 | } else { 16 | this.setState({ height: 'auto', expand: true }); 17 | } 18 | } 19 | 20 | render() { 21 | const { title, children, className } = this.props; 22 | return

    23 |
    24 |
    25 |
    {title}
    26 |
    27 | 28 |
    29 |
    30 |
    31 | 35 |
    36 | {children} 37 |
    38 |
    39 |
    ; 40 | } 41 | } 42 | 43 | interface IGroupProps { 44 | title?: string; 45 | className?: string; 46 | } 47 | 48 | interface IGroupState { 49 | height: 'auto' | number; 50 | expand: boolean; 51 | } 52 | 53 | 54 | export default Group; -------------------------------------------------------------------------------- /src/sources/icons/import.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/sources/icons/export.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/components/tinymce/autocomplete.ts: -------------------------------------------------------------------------------- 1 | 2 | export default class AutoComplete { 3 | 4 | private editor: any = null; 5 | private matchReg: RegExp = null; 6 | private callback: Function = null; 7 | 8 | public on(editor: any, matchReg: RegExp, callback: Function = () => { }) { 9 | if (!editor || !matchReg) { 10 | throw new Error('please provide editor or match RegExp argument'); 11 | } 12 | if (this.editor) { 13 | return; 14 | } 15 | this.editor = editor; 16 | this.matchReg = matchReg; 17 | this.callback = callback; 18 | editor.on('Input', this.onInput); 19 | } 20 | 21 | private onInput = () => { 22 | const offset = this.editor.selection.getRng().endOffset; 23 | const text = this.editor.selection.getSel().anchorNode.data; 24 | if (!text) { 25 | return; 26 | } 27 | const match = text.slice(0, offset) 28 | .match(this.matchReg); 29 | if (match) { 30 | const rect = this.editor.selection.getBoundingClientRect(); 31 | this.callback({ 32 | match: true, 33 | query: match[1] || '', 34 | position: { 35 | x: rect.left, 36 | y: rect.top 37 | } 38 | }); 39 | } else { 40 | this.callback({ 41 | match: false, 42 | }); 43 | } 44 | } 45 | 46 | public off() { 47 | if (!this.editor) { 48 | return; 49 | } 50 | try { 51 | this.editor.off('Input'); 52 | } catch (e) { 53 | 54 | } 55 | this.editor = null; 56 | this.matchReg = null; 57 | this.callback = null; 58 | } 59 | } -------------------------------------------------------------------------------- /lib/lib/enum.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/lib/enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,uBAAW,CAAA;IACX,yBAAa,CAAA;AACf,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB;AAED,MAAM,CAAN,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;AACrB,CAAC,EARW,WAAW,KAAX,WAAW,QAQtB;AAED,MAAM,CAAN,IAAY,OAWX;AAXD,WAAY,OAAO;IACjB,4BAAiB,CAAA;IACjB,4BAAiB,CAAA;IACjB,0BAAe,CAAA;IACf,wBAAa,CAAA;IACb,wBAAa,CAAA;IACb,4BAAiB,CAAA;IACjB,4BAAiB,CAAA;IACjB,wCAA6B,CAAA;IAC7B,wCAA6B,CAAA;IAC7B,oCAAyB,CAAA;AAC3B,CAAC,EAXW,OAAO,KAAP,OAAO,QAWlB;AAED,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,qDAAU,CAAA;IACV,iDAAQ,CAAA;IACR,qDAAU,CAAA;IACV,iDAAQ,CAAA;AACV,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,6BAAe,CAAA;IACf,2BAAa,CAAA;IACb,iCAAmB,CAAA;IACnB,mCAAqB,CAAA;AACvB,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAED,MAAM,CAAC,IAAM,KAAK,GAAG;IACnB,iBAAiB,EAAE,iBAAiB;IACpC,cAAc,EAAE,yBAAyB;IACzC,YAAY,EAAE,qBAAqB;IACnC,iBAAiB,EAAE,+BAA+B;IAClD,kBAAkB,EAAE,gCAAgC;IACpD,OAAO,EAAE,uBAAuB;IAChC,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,kBAAkB;IACzB,qBAAqB,EAAE,mCAAmC;IAC1D,MAAM,EAAE,sBAAsB;IAC9B,OAAO,EAAE,uBAAuB;IAChC,eAAe,EAAE,wBAAwB;IACzC,uBAAuB,EAAE,kCAAkC;CAC5D,CAAC;AAEF,MAAM,CAAC,IAAM,KAAK,GAAG;IACnB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,CAAC,IAAM,QAAQ,GAAG;IACtB,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;CACT,CAAC;AAEF,MAAM,CAAC,IAAM,qBAAqB,GAAG,SAAS,CAAC"} -------------------------------------------------------------------------------- /src/components/tabs/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | class Tabs extends React.Component { 5 | 6 | state: ITabsState = { 7 | selectedIndex: 0 8 | } 9 | 10 | static Tab: typeof Tab; 11 | 12 | render() { 13 | const { children, onClick } = this.props; 14 | return 15 | 27 |
    28 | {React.Children.toArray(children)[this.state.selectedIndex]} 29 |
    30 |
    ; 31 | } 32 | } 33 | 34 | interface ITabsProps { 35 | onClick?: (event: React.MouseEvent) => void; 36 | } 37 | 38 | interface ITabsState { 39 | selectedIndex: number; 40 | } 41 | 42 | class Tab extends React.Component { 43 | render() { 44 | const { children } = this.props; 45 | return
    {children}
    ; 46 | } 47 | } 48 | 49 | interface ITabProps { 50 | icon?: string; 51 | tab?: string; 52 | } 53 | 54 | Tabs.Tab = Tab; 55 | 56 | export default Tabs; -------------------------------------------------------------------------------- /src/sources/icons/youtube2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 11 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/containers/sidebar/Property/RowProperty.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Group from './Group'; 3 | import { Color, Switch, Space, ImageEditor } from './items'; 4 | var RowProperty = function (_a) { 5 | var columnsBackgroundColor = _a.columnsBackgroundColor, backgroundColor = _a.backgroundColor, backgroundImage = _a.backgroundImage, noStackMobile = _a.noStackMobile, padding = _a.padding, fullWidth = _a.fullWidth, repeat = _a.repeat, center = _a.center, _meta = _a._meta, onUpdate = _a.onUpdate; 6 | return React.createElement(React.Fragment, null, 7 | React.createElement(Group, { title: "GENERAL" }, 8 | React.createElement(Color, { title: "Background Color", value: backgroundColor, attribute: "backgroundColor", onUpdate: onUpdate }), 9 | React.createElement(ImageEditor, { key: _meta.guid, attribute: "backgroundImage", url: backgroundImage, fullWidth: fullWidth, repeat: repeat, center: center, options: true, onUpdate: onUpdate }), 10 | React.createElement(Space, { title: "Padding", value: padding, attribute: "padding", onUpdate: onUpdate })), 11 | React.createElement(Group, { title: "MOBILE" }, 12 | React.createElement(Switch, { title: "Do Not Stack on Mobile", checked: noStackMobile, attribute: "noStackMobile", onUpdate: onUpdate })), 13 | React.createElement(Group, { title: "CONTENT" }, 14 | React.createElement(Color, { title: "Columns Background", value: columnsBackgroundColor, attribute: "columnsBackgroundColor", onUpdate: onUpdate }))); 15 | }; 16 | export default RowProperty; 17 | //# sourceMappingURL=RowProperty.js.map -------------------------------------------------------------------------------- /src/containers/common/Selector.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classnames from 'classnames'; 3 | 4 | class Selector extends React.Component { 5 | 6 | dragDom: HTMLDivElement; 7 | 8 | componentDidMount() { 9 | const { onRef = () => { } } = this.props; 10 | if (this.dragDom) { 11 | onRef(this.dragDom); 12 | } 13 | } 14 | render() { 15 | const { placeholder = "Row", type = "row", onDelete = () => { }, onCopy = () => { } } = this.props; 16 | return
    17 |
    {placeholder}
    18 |
    { this.dragDom = dom; }} 20 | className={classnames("ds-layer-drag", type === 'row' ? 'ds-layer-drag-rows' : 'ds-layer-drag-contents')} 21 | > 22 | 23 |
    24 |
    25 |
    26 | 27 | 28 | 29 |
    30 |
    31 | 32 | 33 | 34 |
    35 |
    36 |
    ; 37 | } 38 | } 39 | 40 | interface ISelectorProps { 41 | placeholder?: string; 42 | type?: string; 43 | onDelete?: () => void; 44 | onCopy?: () => void; 45 | onRef?: (dragDom: HTMLDivElement) => void; 46 | } 47 | 48 | export default Selector; -------------------------------------------------------------------------------- /src/style/reset.css: -------------------------------------------------------------------------------- 1 | 2 | html, body, div, span, applet, object, iframe, 3 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 4 | a, abbr, acronym, address, big, cite, code, 5 | del, dfn, em, img, ins, kbd, q, s, samp, 6 | small, strike, strong, sub, sup, tt, var, 7 | b, u, i, center, 8 | dl, dt, dd, ol, ul, li, 9 | fieldset, form, label, legend, 10 | table, caption, tbody, tfoot, thead, tr, th, td, 11 | article, aside, canvas, details, embed, 12 | figure, figcaption, footer, header, hgroup, 13 | menu, nav, output, ruby, section, summary, 14 | time, mark, audio, video { 15 | margin: 0; 16 | padding: 0; 17 | border: 0; 18 | vertical-align: baseline; 19 | } 20 | /* HTML5 display-role reset for older browsers */ 21 | article, aside, details, figcaption, figure, 22 | footer, header, hgroup, menu, nav, section { 23 | display: block; 24 | } 25 | body { 26 | line-height: 1; 27 | } 28 | ol, ul { 29 | list-style: none; 30 | } 31 | blockquote, q { 32 | quotes: none; 33 | } 34 | blockquote:before, blockquote:after, 35 | q:before, q:after { 36 | content: ''; 37 | content: none; 38 | } 39 | table { 40 | border-collapse: collapse; 41 | border-spacing: 0; 42 | } 43 | 44 | ::-webkit-scrollbar { 45 | width: 5px; 46 | } 47 | 48 | 49 | /*滑块*/ 50 | ::-webkit-scrollbar-thumb { 51 | background-color: #D3D3D3; 52 | border-radius: 10px; 53 | } 54 | 55 | ::-webkit-scrollbar-thumb:hover { 56 | background-color: #B1B1B1; 57 | } 58 | 59 | 60 | /*滑道*/ 61 | ::-webkit-scrollbar-track { 62 | background: transparent; 63 | } 64 | 65 | .rtf--mb__c{ 66 | pointer-events: none; 67 | } 68 | .rtf--mb__c *{ 69 | pointer-events: auto; 70 | } -------------------------------------------------------------------------------- /src/containers/SideBar.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { inject, observer } from 'mobx-react'; 3 | import Content from './Content'; 4 | import Row from './Row'; 5 | import { Tabs } from '../components'; 6 | import Property from './sidebar/Property/Property'; 7 | import BodyProperty from './sidebar/Property/BodyProperty'; 8 | 9 | @inject('rootStore') 10 | @observer 11 | class SideBar extends React.Component { 12 | state = { 13 | active: 0 14 | } 15 | 16 | onUpdate = (key, value) => { 17 | const { rootStore: { DesignState } } = this.props; 18 | DesignState.updateBodyAttribute(key, value); 19 | } 20 | 21 | onTabClick = () => { 22 | const { rootStore: { DesignState } } = this.props; 23 | DesignState.setSelected(null); 24 | } 25 | render() { 26 | const { rootStore: { DesignState } } = this.props; 27 | const body = DesignState.data.body.values; 28 | return
    29 | 30 | 31 | 32 | 33 |
    34 | 35 |
    36 |
    37 |
    38 | 39 |
    ; 40 | } 41 | } 42 | 43 | interface ISideBarProps { 44 | rootStore?: any; 45 | } 46 | 47 | export default SideBar; -------------------------------------------------------------------------------- /src/containers/sidebar/Property/RowProperty.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Group from './Group'; 3 | import { Color, Switch, Space, ImageEditor } from './items'; 4 | 5 | const RowProperty = ({ columnsBackgroundColor, 6 | backgroundColor, backgroundImage, 7 | noStackMobile, padding, fullWidth, repeat, 8 | center, _meta, onUpdate }: IRowPropertyProps) => 9 | 10 | 11 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | ; 30 | 31 | interface IRowPropertyProps { 32 | columnsBackgroundColor?: string; 33 | backgroundColor?: string; 34 | backgroundImage?: string; 35 | noStackMobile?: boolean; 36 | padding?: string; 37 | fullWidth?: boolean; 38 | repeat?: boolean; 39 | center?: boolean; 40 | _meta?: { guid: string }; 41 | onUpdate?: onUpdate; 42 | } 43 | 44 | export default RowProperty; -------------------------------------------------------------------------------- /lib/components/tinymce/autocomplete.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["../../../src/components/tinymce/autocomplete.ts"],"names":[],"mappings":"AACA;IAAA;QAAA,iBAyDC;QAvDS,WAAM,GAAQ,IAAI,CAAC;QACnB,aAAQ,GAAW,IAAI,CAAC;QACxB,aAAQ,GAAa,IAAI,CAAC;QAe1B,YAAO,GAAG;YAChB,IAAM,MAAM,GAAG,KAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC;YACxD,IAAM,IAAI,GAAG,KAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;YAC5D,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO;aACR;YACD,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC;iBAChC,KAAK,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;YACxB,IAAI,KAAK,EAAE;gBACT,IAAM,IAAI,GAAG,KAAI,CAAC,MAAM,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC;gBAC3D,KAAI,CAAC,QAAQ,CAAC;oBACZ,KAAK,EAAE,IAAI;oBACX,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;oBACrB,QAAQ,EAAE;wBACR,CAAC,EAAE,IAAI,CAAC,IAAI;wBACZ,CAAC,EAAE,IAAI,CAAC,GAAG;qBACZ;iBACF,CAAC,CAAC;aACJ;iBAAM;gBACL,KAAI,CAAC,QAAQ,CAAC;oBACZ,KAAK,EAAE,KAAK;iBACb,CAAC,CAAC;aACJ;QACH,CAAC,CAAA;IAeH,CAAC;IAnDQ,yBAAE,GAAT,UAAU,MAAW,EAAE,QAAgB,EAAE,QAA8B;QAA9B,yBAAA,EAAA,yBAA6B,CAAC;QACrE,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;SACnE;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO;SACR;QACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IA2BM,0BAAG,GAAV;QACE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,OAAO;SACR;QACD,IAAI;YACF,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SAC1B;QAAC,OAAO,CAAC,EAAE;SAEX;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IACH,mBAAC;AAAD,CAAC,AAzDD,IAyDC"} -------------------------------------------------------------------------------- /src/components/button/index.less: -------------------------------------------------------------------------------- 1 | .button { 2 | background-image: none; 3 | border: 1px solid transparent; 4 | background: #3071d4; 5 | color: #fff; 6 | line-height:1.4; 7 | height:32px; 8 | vertical-align:middle; 9 | display: inline-block; 10 | font-weight: 400; 11 | text-align: center; 12 | border-radius: 4px; 13 | white-space: nowrap; 14 | padding: 0 15px; 15 | font-size: 14px; 16 | user-select: none; 17 | transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); 18 | position: relative; 19 | outline: 0; 20 | cursor:pointer; 21 | &.icon { 22 | padding-left: 10px; 23 | } 24 | &:hover{ 25 | filter: brightness(120%); 26 | } 27 | >i{ 28 | color: #fff; 29 | margin-right:10px; 30 | } 31 | >.loading{ 32 | height: 14px; 33 | display: inline-block; 34 | width: 14px; 35 | border: 2px solid #fff; 36 | border-radius: 50%; 37 | border-top-color:transparent; 38 | border-right-color:transparent; 39 | animation:loading 1s linear infinite; 40 | } 41 | } 42 | @keyframes loading 43 | { 44 | from {transform: rotate(0deg);} 45 | to {transform: rotate(360deg);} 46 | } 47 | 48 | @-webkit-keyframes loading /*Safari and Chrome*/ 49 | { 50 | from {transform: rotate(0deg);} 51 | to {transform: rotate(360deg);} 52 | } 53 | .buttonGroup { 54 | button{ 55 | border-radius:0; 56 | border-left-color: #518be3; 57 | } 58 | button:first-child{ 59 | border-top-left-radius: 4px; 60 | border-bottom-left-radius: 4px; 61 | border-left-color: transparent; 62 | } 63 | button:last-child{ 64 | border-top-right-radius: 4px; 65 | border-bottom-right-radius: 4px; 66 | } 67 | } -------------------------------------------------------------------------------- /lib/components/utils/util.js: -------------------------------------------------------------------------------- 1 | var targetMapping = []; 2 | var _onDocumentClick = function (e) { 3 | targetMapping.forEach(function (obj) { 4 | if (e.target === obj.target || Util.isParent(e.target, obj.target)) 5 | return; 6 | obj.callbacks.forEach(function (callback) { return callback(); }); 7 | }); 8 | }; 9 | window.document.body.addEventListener('click', _onDocumentClick); 10 | var Util = { 11 | isParent: function (obj, parentObj) { 12 | while (obj !== undefined && obj != null && obj.tagName && obj.tagName.toUpperCase() !== 'BODY') { 13 | if (obj === parentObj) { 14 | return true; 15 | } 16 | // eslint-disable-next-line no-param-reassign 17 | obj = obj.parentNode; 18 | } 19 | return false; 20 | }, 21 | outClick: function (target, callback) { 22 | var callbacks = targetMapping.filter(function (item) { return item.target === target; }); 23 | if (callbacks.length > 0) { 24 | callbacks[0].callbacks.push(callback); 25 | } 26 | else { 27 | targetMapping.push({ 28 | target: target, 29 | callbacks: [callback], 30 | }); 31 | } 32 | return { 33 | cancel: function () { 34 | targetMapping = targetMapping.filter(function (item) { return item.target !== target; }); 35 | } 36 | }; 37 | }, 38 | canceloutClick: function (target) { 39 | targetMapping = targetMapping.filter(function (item) { return item.target !== target; }); 40 | } 41 | }; 42 | export default Util; 43 | //# sourceMappingURL=util.js.map -------------------------------------------------------------------------------- /src/sources/icons/linkedin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /lib/lib/enum.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum DragType { 2 | CONTENT = "content", 3 | ROW = "row", 4 | BODY = "body" 5 | } 6 | export declare enum ContentType { 7 | BUTTON = "button", 8 | DIVIDER = "divider", 9 | HTML = "html", 10 | IMAGE = "image", 11 | TEXT = "text", 12 | SOCIAL = "social", 13 | UNKNOWN = "unknown" 14 | } 15 | export declare enum RowType { 16 | SINGLE = "single", 17 | DOUBLE = "double", 18 | THREE = "three", 19 | FOUR = "four", 20 | FIVE = "five", 21 | ONETWO = "onetwo", 22 | TWOONE = "twoone", 23 | ONETWOONETWO = "onetwoonetwo", 24 | TWOONETWOONE = "twoonetwoone", 25 | ONEFOURONE = "onefourone" 26 | } 27 | export declare enum OperationMode { 28 | INSERT = 1, 29 | MOVE = 2, 30 | REMOVE = 3, 31 | COPY = 4 32 | } 33 | export declare enum DesignType { 34 | BODY = "u_body", 35 | ROW = "u_row", 36 | COLUMN = "u_column", 37 | CONTENT = "u_content" 38 | } 39 | export declare const Fonts: { 40 | "MicroSoft Yahei": string; 41 | 'ZCOOL KuaiLe': string; 42 | 'Slabo 27px': string; 43 | 'Source Sans Pro': string; 44 | 'Roboto Condensed': string; 45 | Sarabun: string; 46 | Oswald: string; 47 | Charm: string; 48 | 'Open Sans Condensed': string; 49 | Ubuntu: string; 50 | Poppins: string; 51 | 'ZCOOL XiaoWei': string; 52 | 'ZCOOL QingKe HuangYou': string; 53 | }; 54 | export declare const Types: { 55 | Number: string; 56 | String: string; 57 | Boolean: string; 58 | Object: string; 59 | Array: string; 60 | Function: string; 61 | }; 62 | export declare const Position: { 63 | BEFORE: number; 64 | AFTER: number; 65 | }; 66 | export declare const ExtensionGroupGeneral = "General"; 67 | -------------------------------------------------------------------------------- /src/sources/icons/twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/sources/icons/trash.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | --------------------------------------------------------------------------------