Skip to content

Commit ae0e871

Browse files
committed
clean tree
1 parent 5940f5f commit ae0e871

10 files changed

Lines changed: 936 additions & 14625 deletions

File tree

babel

Whitespace-only changes.

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<!-- CoCreate CSS -->
1515
<link rel="stylesheet" href="https://cdn.cocreate.app/latest/CoCreate.min.css" type="text/css"/>
16-
<link rel="stylesheet" href="/docs/index.css" data-collection="files" data-document_id="60888216117c640e7596303f" name="src" type="text/css" data-save="true"/>
16+
<link rel="stylesheet" href="https://ws.cocreate.app/docs/index.css" data-collection="files" data-document_id="60888216117c640e7596303f" name="src" type="text/css" data-save="true"/>
1717
</head>
1818

1919
<body>
@@ -43,7 +43,7 @@ <h3 class="padding-top:10px">Micro Service Archeticture</h3>
4343
</section>
4444

4545
<section class="padding:10px" id="getting_started">
46-
<div id="introduction" class="margin-top:50px" data-scroll data-scroll_intersect="color:dodgerblue" data-scroll_target="/docs/#getting-started">
46+
<div id="introduction" class="margin-top:50px" data-scroll data-scroll_intersect="color:dodgerblue" data-scroll_target="">
4747
<span class="display:flex align-items:center width:fit-content" data-hover="display:block!important" data-hover_target='[href="#getting-started"]'>
4848
<h2 class="padding:5px_0px">Getting Started</h2>
4949
<a class="margin-left:10px display:none" href="#getting-started"><i class="fas fa-link"></i></a>

docs/objects.html

Lines changed: 45 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ <h4><span>metaData</span> <span class="cocreate-badge success">string</span> <sp
9191
<pre>
9292
<code class="language-js">
9393
crud.createDocument({
94-
namespace:'',
95-
room:'',
96-
broadcast: true|false, (default=ture)
97-
broadcast_sender: true/false, //default to true)
94+
namespace:'string',
95+
room:'string',
96+
broadcast: true|false, //default to true
97+
broadcast_sender: true|false, //default to true
9898

99-
collection: "test123",
99+
collection: "string",
100100
data:{
101-
name1:hello”,
102-
name2: hello1
101+
name1: "hello"
102+
name2: "hello1"
103103
},
104104
async: true|false, //defaults to false
105105
event: eventName,
@@ -130,16 +130,12 @@ <h4><span>document_id</span> <span class="cocreate-badge success">_id</span> <sp
130130
<p>document_id to read from</p>
131131
</li>
132132
<li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
133-
<h4><span>data</span> <span class="cocreate-badge success">object</span> <span class="cocreate-badge warning">optional</span></h4>
134-
<p>data to save</p>
135-
</li>
136-
<li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
137-
<h4><span>element</span> <span class="cocreate-badge success">boolean</span> <span class="cocreate-badge warning">optional</span></h4>
138-
<p>Save data onChange/submitBtn. If attribute is empty or not used Default's to true.</p>
133+
<h4><span>name</span> <span class="cocreate-badge success">array</span> <span class="cocreate-badge warning">optional</span></h4>
134+
<p>names of values to from CMS. If not used whole document will be fetched</p>
139135
</li>
140136
<li class="padding:15px_0px">
141137
<h4><span>metaData</span> <span class="cocreate-badge success">string</span> <span class="cocreate-badge success">array</span> <span class="cocreate-badge success">object</span> <span class="cocreate-badge warning">optional</span></h4>
142-
<p>Additonal data in the form of a string , array or object </p>
138+
<p>Additonal data in the form of a string ,array or object</p>
143139
</li>
144140
</ul>
145141
</div>
@@ -149,6 +145,7 @@ <h4><span>metaData</span> <span class="cocreate-badge success">string</span> <sp
149145
crud.readDocument({
150146
collection: "module",
151147
document_id: "",
148+
name: [],
152149
event: eventName,
153150
metaData: "xxxx"
154151
}),
@@ -210,17 +207,18 @@ <h4><span>metaData</span> <span class="cocreate-badge success">string</span> <sp
210207
crud.updateDocument({
211208
namespace: '',
212209
room: '',
213-
broadcast: true/false,
214-
broadcast_sender: true/false,
210+
broadcast: true|false, //default to true
211+
broadcast_sender: true|false, //default to true
215212

216213
collection: "test123",
217214
document_id: "document_id",
215+
upsert: true|false, //default to true
218216
data:{
219-
name1:hello,
220-
name2: hello1
217+
name1: "hello",
218+
name2: "hello1"
221219
},
222-
async: true|false,
223-
delete_fields:["name3", "name4"],
220+
delete_fields: ["name3", "name4"],
221+
async: true|false, //default to true
224222
metaData: "xxxx"
225223
}),
226224
</code>
@@ -280,13 +278,14 @@ <h4><span>metaData</span> <span class="cocreate-badge success">string</span> <sp
280278
crud.deleteDocument({
281279
namespace: '',
282280
room: '',
283-
broadcast: true/false,
284-
broadcast_sender: true/false,
281+
broadcast: true|false, //default to true
282+
broadcast_sender: true|false, //default to true
285283

286284
collection: "module",
287285
document_id: "",
288-
metadata: "xxxx"
286+
async: true|false, //default to true
289287
event: "xxxx"
288+
metadata: "xxxx"
290289
}),
291290
</code>
292291
</pre>
@@ -401,35 +400,33 @@ <h4><span>created_ids</span> <span class="cocreate-badge success">array</span> <
401400
collection: "modules",
402401
event: eventName,
403402
metadata: "",
403+
404404
operator: {
405-
fetch: {
406-
name: 'xxxx',
407-
value: 'xxxxx'
408-
},
409-
filters: [{
410-
name: 'field1',
411-
operator: "$contain | $range | $eq | $ne | $lt | $lte | $gt | $gte | $in | $nin | $geoWithin",
412-
value: [v1, v2, ...]
413-
}, {
414-
name: "_id",
415-
opreator: "in",
416-
value: ["id1"]
417-
}],
418-
orders: [{
419-
name: 'field-x',
420-
type: 1 | -1
421-
}],
422-
search: {
423-
type: 'or | and',
424-
value: [value1, value2]
425-
},
426-
427-
startIndex: 0 (integer),
428-
count: 0 (integer)
405+
filters: [{
406+
name: 'field1',
407+
operator: "$contain | $range | $eq | $ne | $lt | $lte | $gt | $gte | $in | $nin | $geoWithin",
408+
value: [v1, v2, ...]
409+
}, {
410+
name: "_id",
411+
opreator: "in",
412+
value: ["id1"]
413+
}
414+
],
415+
orders: [{
416+
name: 'field-x',
417+
type: 1 | -1
418+
}],
419+
search: {
420+
type: 'or | and',
421+
value: [value1, value2]
422+
},
423+
424+
startIndex: 0 (integer),
425+
count: 0 (integer)
429426
},
430427

431428
is_collection: true | false,
432-
//. case fetch document case
429+
// case fetch document case
433430
created_ids : [id1, id2, ...],
434431
export: true | false
435432

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"babel-loader": "^8.1.0",
5353
"clean-webpack-plugin": "^3.0.0",
5454
"css-loader": "^5.1.2",
55-
"css-minimizer-webpack-plugin": "^2.0.0",
55+
"css-minimizer-webpack-plugin": "^3.0.0",
5656
"file-loader": "^6.2.0",
5757
"html-webpack-inline-source-plugin": "^0.0.10",
5858
"html-webpack-plugin": "^5.3.1",
@@ -79,9 +79,9 @@
7979
"@cocreate/codemirror": "^1.0.15",
8080
"@cocreate/conditional-logic": "^1.0.0",
8181
"@cocreate/contenteditable": "^1.0.0",
82-
"@cocreate/crdt": "^1.1.1",
82+
"@cocreate/crdt": "^1.1.2",
8383
"@cocreate/croppie": "^1.0.0",
84-
"@cocreate/crud-client": "^1.0.0",
84+
"@cocreate/crud-client": "^1.0.9",
8585
"@cocreate/cursors": "^1.0.0",
8686
"@cocreate/dnd": "^0.10.0",
8787
"@cocreate/docs": "^1.0.0",
@@ -112,7 +112,7 @@
112112
"@cocreate/pinterest": "^1.0.0",
113113
"@cocreate/plaid": "^1.0.0",
114114
"@cocreate/prism": "^1.0.0",
115-
"@cocreate/progress": "^1.0.0",
115+
"@cocreate/progress": "^1.0.5",
116116
"@cocreate/progress-bar": "^1.0.0",
117117
"@cocreate/quill": "^1.0.0",
118118
"@cocreate/random-color": "^1.0.0",
@@ -141,6 +141,7 @@
141141
"@cocreate/users": "^1.0.0",
142142
"@cocreate/utils": "^1.0.0",
143143
"@cocreate/uuid": "^1.0.0",
144-
"@cocreate/vdom": "^1.0.0"
144+
"@cocreate/vdom": "^1.0.0",
145+
"twilio-client": "^1.14.0"
145146
}
146147
}

result.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/components.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { addLazily, addDependency } from './lazy-loader';
22

33
// Dependencies
4+
// addDependency('observer', import (/*webpackChunkName: "observer-chunk"*/ '@cocreate/observer'));
45
addDependency('utils', import (/*webpackChunkName: "utils-chunk"*/ '@cocreate/utils'));
56
addDependency('socket', import (/*webpackChunkName: "socket-chunk"*/ '@cocreate/socket-client'));
67
addDependency('common-fun', import (/*webpackChunkName: "common-fun-chunk"*/ '@cocreate/socket-client/src/common-fun.js'));
@@ -13,6 +14,7 @@ addDependency('filter', import (/*webpackChunkName: "filter-chunk"*/ '@cocreate/
1314
addDependency('form', import (/*webpackChunkName: "form-chunk"*/ '@cocreate/form'));
1415

1516
// Core Components
17+
addLazily('cssParse', '[data-parse]', ()=> import (/*webpackChunkName: "css-chunk"*/ '@cocreate/cocreatecss'))
1618
addLazily('cssSave', '[data-save]', ()=> import (/*webpackChunkName: "css-save-chunk"*/ '@cocreate/cocreatecss/src/save.js'))
1719
addLazily('action', '[data-actions]', ()=> import (/*webpackChunkName: "action-chunk"*/ '@cocreate/action'))
1820
addLazily('room', '[data-room]', ()=> import (/*webpackChunkName: "room-chunk"*/ '@cocreate/room'))
@@ -28,7 +30,7 @@ addLazily('toggle', '[data-toogle], [data-hover]', ()=> import (/*webpackChunkNa
2830
addLazily('selected', '[data-selected]', ()=> import (/*webpackChunkName: "selected-chunk"*/ '@cocreate/selected'))
2931
addLazily('scroll', '[data-scroll]', ()=> import (/*webpackChunkName: "scroll-chunk"*/ '@cocreate/scroll'))
3032
addLazily('resize', '[data-resize]', ()=>import(/*webpackChunkName: "resize-chunk"*/ '@cocreate/resize'))
31-
addLazily('attributes', '[data-attributes]', ()=>import(/*webpackChunkName: "attributes-chunk"*/ '@cocreate/attributes'))
33+
addLazily('attributes', '[data-attributes], [data-style]', ()=>import(/*webpackChunkName: "attributes-chunk"*/ '@cocreate/attributes'))
3234
addLazily('users', '[data-permissions], [data-actions*="createUser"], [data-actions*="loginBtn"]', ()=> import (/*webpackChunkName: "users-chunk"*/ '@cocreate/users'))
3335
addLazily('organizations', '[data-actions*="createOrg"]', ()=> import (/*webpackChunkName: "organizations-chunk"*/ '@cocreate/organizations'))
3436
addLazily('industry', '[data-actions*="runIndustry"]', ()=> import (/*webpackChunkName: "industry-chunk"*/ '@cocreate/industry'))
@@ -74,12 +76,11 @@ addLazily('pickr', '.color-pickr', ()=> import (/*webpackChunkName: "pickr-chunk
7476
addLazily('pinterest', '[data-pinterest]', ()=> import (/*webpackChunkName: "pinterest-chunk"*/ '@cocreate/pinterest'))
7577
addLazily('plaid', '[data-plaid]', ()=> import (/*webpackChunkName: "plaid-chunk"*/ '@cocreate/plaid'))
7678
addLazily('prism', '.language-html, .language-css, .language-js, .language-shell, .language-json', ()=> import (/*webpackChunkName: "prism-chunk"*/ '@cocreate/prism'))
77-
//addLazily('progressbar', '[data-progressbar]', ()=> import (/*webpackChunkName: "progressbar-chunk"*/ '@cocreate/progressbar'))
7879
//addLazily('quill', '.quill', ()=> import (/*webpackChunkName: "quill-chunk"*/ '@cocreate/quill'))
7980
addLazily('sendgrid', '[data-sendgrid]', ()=> import (/*webpackChunkName: "sendgrid-chunk"*/ '@cocreate/sendgrid'))
8081
addLazily('shipengine', '[data-shipengine]', ()=> import (/*webpackChunkName: "shipengine-chunk"*/ '@cocreate/shipengine'))
8182
addLazily('stripe', '[data-stripe]', ()=> import (/*webpackChunkName: "stripe-chunk"*/ '@cocreate/stripe'))
82-
// addLazily('twilio', '[data-twilio]', ()=> import (/*webpackChunkName: "twilio-chunk"*/ '@cocreate/twilio'))
83+
addLazily('twilio', '[data-twilio]', ()=> import (/*webpackChunkName: "twilio-chunk"*/ '@cocreate/twilio'))
8384
addLazily('twitter', '[data-twitter]', ()=> import (/*webpackChunkName: "twitter-chunk"*/ '@cocreate/twitter'))
8485
addLazily('uppy', '.uppy', ()=> import (/*webpackChunkName: "uppy-chunk"*/ '@cocreate/uppy'))
8586

src/core.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
// *********** define variables end ***************** ///
22
import CoCreateSocket from "@cocreate/socket-client"
33

4-
let socket = new CoCreateSocket('ws');
4+
let socket = window.CoCreateCrudSocket;
5+
6+
if (!socket) {
7+
socket = new CoCreateSocket('ws');
8+
window.CoCreateCrudSocket = socket;
9+
}
10+
11+
// let socket = new CoCreateSocket('ws');
512

613
const CoCreateCore = {
714
socketInitFuncs: [],

src/index.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
// core components
22
import core from "./core.js"
33
import observer from '@cocreate/observer';
4-
import css from '@cocreate/cocreatecss';
4+
// import css from '@cocreate/cocreatecss';
55
import './components.js'
66

77
// (async function() {
88

9-
// // preload - downloads with main chunk but does not execute until main chunk complete. Priority using 1, -1 true=0
109
// let importObj = await
11-
// import (
12-
// /* webpackChunkName: "components-chunk", webpackPreload: true */
13-
// "./components.js");
14-
// Object.assign(window.CoCreate, {components: importObj.default})
10+
11+
// // preload - downloads with main chunk but does not execute until main chunk complete. Priority using 1, -1 true=0
12+
// import (/* webpackChunkName: "components-chunk", webpackPreload: true */ "./components.js");
13+
// Object.assign(window.CoCreate, {components: importObj.default}
14+
// )
1515

1616

17+
// // prefetched - downloads after main chunk has complete and in idle mode. If no longer idle will pause then resume when not idle. Priority using 1, -1 true=0
18+
// import ( /* webpackChunkName: "htmltags-chunk", webpackPrefetch: true */ "../CoCreate-components/CoCreate-htmltags/src/index.js");
19+
// Object.assign(window.CoCreate, {htmltags: importObj.default}
20+
// )
1721

1822
// })()
1923

@@ -28,4 +32,4 @@ function removeComponent(key) {
2832
}
2933
}
3034

31-
export default { css, core, addComponent, removeComponent}
35+
export default { core, addComponent, removeComponent}

0 commit comments

Comments
 (0)