Package cleanup & transition to latest apollo.

This commit is contained in:
Patrick Fic
2021-02-24 08:48:55 -08:00
parent 359edea97c
commit 46014261d6
202 changed files with 31740 additions and 1174 deletions

View File

@@ -1,14 +1,11 @@
import "codemirror-graphql/hint";
import "codemirror-graphql/lint";
import "codemirror-graphql/mode";
import "codemirror/addon/hint/show-hint";
import "codemirror/addon/lint/lint";
import "codemirror/lib/codemirror.css";
import "codemirror/theme/material.css";
// import "codemirror-graphql/hint";
// import "codemirror-graphql/lint";
// import "codemirror-graphql/mode";
// import "codemirror/addon/hint/show-hint";
// import "codemirror/addon/lint/lint";
// import "codemirror/lib/codemirror.css";
// import "codemirror/theme/material.css";
import React, { useEffect, useRef, useState } from "react";
import { Controlled as CmEditor } from "react-codemirror2";
import EmailEditor from "react-email-editor";
import GqlSchema from "../../graphql/schema";
import ShopTemplateEditorSaveButton from "../shop-template-editor-save-button/shop-template-editor-save-button.component";
import ShopTemplateTestRender from "../shop-template-test-render/shop-template-test-render.component";
@@ -38,44 +35,49 @@ export default function ShopTemplateEditorComponent({
return (
<div>
<EmailEditor
style={{ width: "100%" }}
ref={emailEditorRef}
minHeight="700px"
onLoad={() => setEditorLoaded(true)}
options={{
// customCSS: [
// window.location.protocol +
// "//" +
// window.location.host +
// "/render-styles.css",
// ],
customJS: [
window.location.protocol +
"//" +
window.location.host +
"/editor.js",
],
}}
/>
{
// <EmailEditor
// style={{ width: "100%" }}
// ref={emailEditorRef}
// minHeight="700px"
// onLoad={() => setEditorLoaded(true)}
// options={{
// // customCSS: [
// // window.location.protocol +
// // "//" +
// // window.location.host +
// // "/render-styles.css",
// // ],
// customJS: [
// window.location.protocol +
// "//" +
// window.location.host +
// "/editor.js",
// ],
// }}
// />
}
<div style={{ display: "flex", width: "90vw", margin: "2rem" }}>
<CmEditor
style={{ flex: 1 }}
value={editorContent.gql}
options={{
mode: "graphql",
lint: {
schema: GqlSchema,
},
hintOptions: {
schema: GqlSchema,
},
lineNumbers: true,
}}
onBeforeChange={(editor, data, value) => {
seteditorContent({ ...editorContent, gql: value });
}}
/>
{
// <CmEditor
// style={{ flex: 1 }}
// value={editorContent.gql}
// options={{
// mode: "graphql",
// lint: {
// schema: GqlSchema,
// },
// hintOptions: {
// schema: GqlSchema,
// },
// lineNumbers: true,
// }}
// onBeforeChange={(editor, data, value) => {
// seteditorContent({ ...editorContent, gql: value });
// }}
// />
}
<ShopTemplateTestRender
style={{ flex: 1 }}
query={editorContent.gql}