@iebh/tera-fy 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/api.md +445 -431
- package/dist/terafy.js +2 -2
- package/dist/terafy.js.map +4 -4
- package/docs/assets/anchor.js +350 -0
- package/docs/assets/bass-addons.css +12 -0
- package/docs/assets/bass.css +544 -0
- package/docs/assets/fonts/EOT/SourceCodePro-Bold.eot +0 -0
- package/docs/assets/fonts/EOT/SourceCodePro-Regular.eot +0 -0
- package/docs/assets/fonts/LICENSE.txt +93 -0
- package/docs/assets/fonts/OTF/SourceCodePro-Bold.otf +0 -0
- package/docs/assets/fonts/OTF/SourceCodePro-Regular.otf +0 -0
- package/docs/assets/fonts/TTF/SourceCodePro-Bold.ttf +0 -0
- package/docs/assets/fonts/TTF/SourceCodePro-Regular.ttf +0 -0
- package/docs/assets/fonts/WOFF/OTF/SourceCodePro-Bold.otf.woff +0 -0
- package/docs/assets/fonts/WOFF/OTF/SourceCodePro-Regular.otf.woff +0 -0
- package/docs/assets/fonts/WOFF/TTF/SourceCodePro-Bold.ttf.woff +0 -0
- package/docs/assets/fonts/WOFF/TTF/SourceCodePro-Regular.ttf.woff +0 -0
- package/docs/assets/fonts/WOFF2/OTF/SourceCodePro-Bold.otf.woff2 +0 -0
- package/docs/assets/fonts/WOFF2/OTF/SourceCodePro-Regular.otf.woff2 +0 -0
- package/docs/assets/fonts/WOFF2/TTF/SourceCodePro-Bold.ttf.woff2 +0 -0
- package/docs/assets/fonts/WOFF2/TTF/SourceCodePro-Regular.ttf.woff2 +0 -0
- package/docs/assets/fonts/source-code-pro.css +23 -0
- package/docs/assets/github.css +123 -0
- package/docs/assets/site.js +168 -0
- package/docs/assets/split.css +15 -0
- package/docs/assets/split.js +782 -0
- package/docs/assets/style.css +147 -0
- package/docs/index.html +3636 -0
- package/{index.html → docs/playground.html} +48 -12
- package/documentation.yml +12 -0
- package/lib/terafy.client.js +230 -6
- package/lib/terafy.server.js +192 -10
- package/package.json +7 -6
- package/plugins/vue2.js +173 -0
- package/plugins/{vue.js → vue3.js} +20 -11
package/docs/index.html
ADDED
|
@@ -0,0 +1,3636 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset='utf-8'>
|
|
5
|
+
<title>@iebh/tera-fy 1.0.9 | Documentation</title>
|
|
6
|
+
<meta name='description' content='TERA website worker'>
|
|
7
|
+
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
|
8
|
+
<link href='assets/bass.css' rel='stylesheet'>
|
|
9
|
+
<link href='assets/style.css' rel='stylesheet'>
|
|
10
|
+
<link href='assets/github.css' rel='stylesheet'>
|
|
11
|
+
<link href='assets/split.css' rel='stylesheet'>
|
|
12
|
+
</head>
|
|
13
|
+
<body class='documentation m0'>
|
|
14
|
+
<div class='flex'>
|
|
15
|
+
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
|
|
16
|
+
<div class='py1 px2'>
|
|
17
|
+
<h3 class='mb0 no-anchor'>@iebh/tera-fy</h3>
|
|
18
|
+
<div class='mb1'><code>1.0.9</code></div>
|
|
19
|
+
<input
|
|
20
|
+
placeholder='Filter'
|
|
21
|
+
id='filter-input'
|
|
22
|
+
class='col12 block input'
|
|
23
|
+
spellcheck='false'
|
|
24
|
+
autocapitalize='off'
|
|
25
|
+
autocorrect='off'
|
|
26
|
+
type='text' />
|
|
27
|
+
<div id='toc'>
|
|
28
|
+
<ul class='list-reset h5 py1-ul'>
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
<li><a
|
|
32
|
+
href='#terafy-playground'
|
|
33
|
+
class="h5 bold black caps">
|
|
34
|
+
TeraFy Playground
|
|
35
|
+
|
|
36
|
+
</a>
|
|
37
|
+
|
|
38
|
+
</li>
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
<li><a
|
|
42
|
+
href='#data-entities'
|
|
43
|
+
class="h5 bold black caps toggle-sibling">
|
|
44
|
+
Data entities
|
|
45
|
+
<span class='icon'>▸</span>
|
|
46
|
+
</a>
|
|
47
|
+
|
|
48
|
+
<div class='toggle-target display-none'>
|
|
49
|
+
|
|
50
|
+
<ul class='list-reset py1-ul pl1'>
|
|
51
|
+
<li class='h5'><span>Static members</span></li>
|
|
52
|
+
|
|
53
|
+
<li><a
|
|
54
|
+
href='#user'
|
|
55
|
+
class='regular pre-open'>
|
|
56
|
+
.User
|
|
57
|
+
</a></li>
|
|
58
|
+
|
|
59
|
+
<li><a
|
|
60
|
+
href='#project'
|
|
61
|
+
class='regular pre-open'>
|
|
62
|
+
.Project
|
|
63
|
+
</a></li>
|
|
64
|
+
|
|
65
|
+
<li><a
|
|
66
|
+
href='#projectfile'
|
|
67
|
+
class='regular pre-open'>
|
|
68
|
+
.ProjectFile
|
|
69
|
+
</a></li>
|
|
70
|
+
|
|
71
|
+
</ul>
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
</li>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<li><a
|
|
82
|
+
href='#terafy'
|
|
83
|
+
class="h5 bold black caps toggle-sibling">
|
|
84
|
+
TeraFy
|
|
85
|
+
<span class='icon'>▸</span>
|
|
86
|
+
</a>
|
|
87
|
+
|
|
88
|
+
<div class='toggle-target display-none'>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
<ul class='list-reset py1-ul pl1'>
|
|
92
|
+
<li class='h5'><span>Instance members</span></li>
|
|
93
|
+
|
|
94
|
+
<li><a
|
|
95
|
+
href='#settings'
|
|
96
|
+
class='regular pre-open'>
|
|
97
|
+
#settings
|
|
98
|
+
</a></li>
|
|
99
|
+
|
|
100
|
+
<li><a
|
|
101
|
+
href='#dom'
|
|
102
|
+
class='regular pre-open'>
|
|
103
|
+
#dom
|
|
104
|
+
</a></li>
|
|
105
|
+
|
|
106
|
+
<li><a
|
|
107
|
+
href='#methods'
|
|
108
|
+
class='regular pre-open'>
|
|
109
|
+
#methods
|
|
110
|
+
</a></li>
|
|
111
|
+
|
|
112
|
+
<li><a
|
|
113
|
+
href='#plugins'
|
|
114
|
+
class='regular pre-open'>
|
|
115
|
+
#plugins
|
|
116
|
+
</a></li>
|
|
117
|
+
|
|
118
|
+
<li><a
|
|
119
|
+
href='#send'
|
|
120
|
+
class='regular pre-open'>
|
|
121
|
+
#send
|
|
122
|
+
</a></li>
|
|
123
|
+
|
|
124
|
+
<li><a
|
|
125
|
+
href='#sendraw'
|
|
126
|
+
class='regular pre-open'>
|
|
127
|
+
#sendRaw
|
|
128
|
+
</a></li>
|
|
129
|
+
|
|
130
|
+
<li><a
|
|
131
|
+
href='#rpc'
|
|
132
|
+
class='regular pre-open'>
|
|
133
|
+
#rpc
|
|
134
|
+
</a></li>
|
|
135
|
+
|
|
136
|
+
<li><a
|
|
137
|
+
href='#acceptmessage'
|
|
138
|
+
class='regular pre-open'>
|
|
139
|
+
#acceptMessage
|
|
140
|
+
</a></li>
|
|
141
|
+
|
|
142
|
+
<li><a
|
|
143
|
+
href='#acceptpostboxes'
|
|
144
|
+
class='regular pre-open'>
|
|
145
|
+
#acceptPostboxes
|
|
146
|
+
</a></li>
|
|
147
|
+
|
|
148
|
+
<li><a
|
|
149
|
+
href='#createprojectstatepatch'
|
|
150
|
+
class='regular pre-open'>
|
|
151
|
+
#createProjectStatePatch
|
|
152
|
+
</a></li>
|
|
153
|
+
|
|
154
|
+
<li><a
|
|
155
|
+
href='#applyprojectstatepatchlocal'
|
|
156
|
+
class='regular pre-open'>
|
|
157
|
+
#applyProjectStatePatchLocal
|
|
158
|
+
</a></li>
|
|
159
|
+
|
|
160
|
+
<li><a
|
|
161
|
+
href='#init'
|
|
162
|
+
class='regular pre-open'>
|
|
163
|
+
#init
|
|
164
|
+
</a></li>
|
|
165
|
+
|
|
166
|
+
<li><a
|
|
167
|
+
href='#detectmode'
|
|
168
|
+
class='regular pre-open'>
|
|
169
|
+
#detectMode
|
|
170
|
+
</a></li>
|
|
171
|
+
|
|
172
|
+
<li><a
|
|
173
|
+
href='#injectcomms'
|
|
174
|
+
class='regular pre-open'>
|
|
175
|
+
#injectComms
|
|
176
|
+
</a></li>
|
|
177
|
+
|
|
178
|
+
<li><a
|
|
179
|
+
href='#injectstylesheet'
|
|
180
|
+
class='regular pre-open'>
|
|
181
|
+
#injectStylesheet
|
|
182
|
+
</a></li>
|
|
183
|
+
|
|
184
|
+
<li><a
|
|
185
|
+
href='#injectmethods'
|
|
186
|
+
class='regular pre-open'>
|
|
187
|
+
#injectMethods
|
|
188
|
+
</a></li>
|
|
189
|
+
|
|
190
|
+
<li><a
|
|
191
|
+
href='#debug'
|
|
192
|
+
class='regular pre-open'>
|
|
193
|
+
#debug
|
|
194
|
+
</a></li>
|
|
195
|
+
|
|
196
|
+
<li><a
|
|
197
|
+
href='#set'
|
|
198
|
+
class='regular pre-open'>
|
|
199
|
+
#set
|
|
200
|
+
</a></li>
|
|
201
|
+
|
|
202
|
+
<li><a
|
|
203
|
+
href='#use'
|
|
204
|
+
class='regular pre-open'>
|
|
205
|
+
#use
|
|
206
|
+
</a></li>
|
|
207
|
+
|
|
208
|
+
<li><a
|
|
209
|
+
href='#mixin'
|
|
210
|
+
class='regular pre-open'>
|
|
211
|
+
#mixin
|
|
212
|
+
</a></li>
|
|
213
|
+
|
|
214
|
+
<li><a
|
|
215
|
+
href='#toggledevmode'
|
|
216
|
+
class='regular pre-open'>
|
|
217
|
+
#toggleDevMode
|
|
218
|
+
</a></li>
|
|
219
|
+
|
|
220
|
+
<li><a
|
|
221
|
+
href='#togglefocus'
|
|
222
|
+
class='regular pre-open'>
|
|
223
|
+
#toggleFocus
|
|
224
|
+
</a></li>
|
|
225
|
+
|
|
226
|
+
</ul>
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
</li>
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
<li><a
|
|
236
|
+
href='#terafy'
|
|
237
|
+
class=" toggle-sibling">
|
|
238
|
+
TeraFy
|
|
239
|
+
<span class='icon'>▸</span>
|
|
240
|
+
</a>
|
|
241
|
+
|
|
242
|
+
<div class='toggle-target display-none'>
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
<ul class='list-reset py1-ul pl1'>
|
|
246
|
+
<li class='h5'><span>Instance members</span></li>
|
|
247
|
+
|
|
248
|
+
<li><a
|
|
249
|
+
href='#settings'
|
|
250
|
+
class='regular pre-open'>
|
|
251
|
+
#settings
|
|
252
|
+
</a></li>
|
|
253
|
+
|
|
254
|
+
<li><a
|
|
255
|
+
href='#dom'
|
|
256
|
+
class='regular pre-open'>
|
|
257
|
+
#dom
|
|
258
|
+
</a></li>
|
|
259
|
+
|
|
260
|
+
<li><a
|
|
261
|
+
href='#methods'
|
|
262
|
+
class='regular pre-open'>
|
|
263
|
+
#methods
|
|
264
|
+
</a></li>
|
|
265
|
+
|
|
266
|
+
<li><a
|
|
267
|
+
href='#plugins'
|
|
268
|
+
class='regular pre-open'>
|
|
269
|
+
#plugins
|
|
270
|
+
</a></li>
|
|
271
|
+
|
|
272
|
+
<li><a
|
|
273
|
+
href='#send'
|
|
274
|
+
class='regular pre-open'>
|
|
275
|
+
#send
|
|
276
|
+
</a></li>
|
|
277
|
+
|
|
278
|
+
<li><a
|
|
279
|
+
href='#sendraw'
|
|
280
|
+
class='regular pre-open'>
|
|
281
|
+
#sendRaw
|
|
282
|
+
</a></li>
|
|
283
|
+
|
|
284
|
+
<li><a
|
|
285
|
+
href='#rpc'
|
|
286
|
+
class='regular pre-open'>
|
|
287
|
+
#rpc
|
|
288
|
+
</a></li>
|
|
289
|
+
|
|
290
|
+
<li><a
|
|
291
|
+
href='#acceptmessage'
|
|
292
|
+
class='regular pre-open'>
|
|
293
|
+
#acceptMessage
|
|
294
|
+
</a></li>
|
|
295
|
+
|
|
296
|
+
<li><a
|
|
297
|
+
href='#acceptpostboxes'
|
|
298
|
+
class='regular pre-open'>
|
|
299
|
+
#acceptPostboxes
|
|
300
|
+
</a></li>
|
|
301
|
+
|
|
302
|
+
<li><a
|
|
303
|
+
href='#createprojectstatepatch'
|
|
304
|
+
class='regular pre-open'>
|
|
305
|
+
#createProjectStatePatch
|
|
306
|
+
</a></li>
|
|
307
|
+
|
|
308
|
+
<li><a
|
|
309
|
+
href='#applyprojectstatepatchlocal'
|
|
310
|
+
class='regular pre-open'>
|
|
311
|
+
#applyProjectStatePatchLocal
|
|
312
|
+
</a></li>
|
|
313
|
+
|
|
314
|
+
<li><a
|
|
315
|
+
href='#init'
|
|
316
|
+
class='regular pre-open'>
|
|
317
|
+
#init
|
|
318
|
+
</a></li>
|
|
319
|
+
|
|
320
|
+
<li><a
|
|
321
|
+
href='#detectmode'
|
|
322
|
+
class='regular pre-open'>
|
|
323
|
+
#detectMode
|
|
324
|
+
</a></li>
|
|
325
|
+
|
|
326
|
+
<li><a
|
|
327
|
+
href='#injectcomms'
|
|
328
|
+
class='regular pre-open'>
|
|
329
|
+
#injectComms
|
|
330
|
+
</a></li>
|
|
331
|
+
|
|
332
|
+
<li><a
|
|
333
|
+
href='#injectstylesheet'
|
|
334
|
+
class='regular pre-open'>
|
|
335
|
+
#injectStylesheet
|
|
336
|
+
</a></li>
|
|
337
|
+
|
|
338
|
+
<li><a
|
|
339
|
+
href='#injectmethods'
|
|
340
|
+
class='regular pre-open'>
|
|
341
|
+
#injectMethods
|
|
342
|
+
</a></li>
|
|
343
|
+
|
|
344
|
+
<li><a
|
|
345
|
+
href='#debug'
|
|
346
|
+
class='regular pre-open'>
|
|
347
|
+
#debug
|
|
348
|
+
</a></li>
|
|
349
|
+
|
|
350
|
+
<li><a
|
|
351
|
+
href='#set'
|
|
352
|
+
class='regular pre-open'>
|
|
353
|
+
#set
|
|
354
|
+
</a></li>
|
|
355
|
+
|
|
356
|
+
<li><a
|
|
357
|
+
href='#use'
|
|
358
|
+
class='regular pre-open'>
|
|
359
|
+
#use
|
|
360
|
+
</a></li>
|
|
361
|
+
|
|
362
|
+
<li><a
|
|
363
|
+
href='#mixin'
|
|
364
|
+
class='regular pre-open'>
|
|
365
|
+
#mixin
|
|
366
|
+
</a></li>
|
|
367
|
+
|
|
368
|
+
<li><a
|
|
369
|
+
href='#toggledevmode'
|
|
370
|
+
class='regular pre-open'>
|
|
371
|
+
#toggleDevMode
|
|
372
|
+
</a></li>
|
|
373
|
+
|
|
374
|
+
<li><a
|
|
375
|
+
href='#togglefocus'
|
|
376
|
+
class='regular pre-open'>
|
|
377
|
+
#toggleFocus
|
|
378
|
+
</a></li>
|
|
379
|
+
|
|
380
|
+
</ul>
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
</div>
|
|
385
|
+
|
|
386
|
+
</li>
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
<li><a
|
|
390
|
+
href='#handshake'
|
|
391
|
+
class="">
|
|
392
|
+
handshake
|
|
393
|
+
|
|
394
|
+
</a>
|
|
395
|
+
|
|
396
|
+
</li>
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
<li><a
|
|
400
|
+
href='#getuser'
|
|
401
|
+
class="">
|
|
402
|
+
getUser
|
|
403
|
+
|
|
404
|
+
</a>
|
|
405
|
+
|
|
406
|
+
</li>
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
<li><a
|
|
410
|
+
href='#getproject'
|
|
411
|
+
class="">
|
|
412
|
+
getProject
|
|
413
|
+
|
|
414
|
+
</a>
|
|
415
|
+
|
|
416
|
+
</li>
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
<li><a
|
|
420
|
+
href='#getprojects'
|
|
421
|
+
class="">
|
|
422
|
+
getProjects
|
|
423
|
+
|
|
424
|
+
</a>
|
|
425
|
+
|
|
426
|
+
</li>
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
<li><a
|
|
430
|
+
href='#setactiveproject'
|
|
431
|
+
class="">
|
|
432
|
+
setActiveProject
|
|
433
|
+
|
|
434
|
+
</a>
|
|
435
|
+
|
|
436
|
+
</li>
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
<li><a
|
|
440
|
+
href='#requireproject'
|
|
441
|
+
class="">
|
|
442
|
+
requireProject
|
|
443
|
+
|
|
444
|
+
</a>
|
|
445
|
+
|
|
446
|
+
</li>
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
<li><a
|
|
450
|
+
href='#selectproject'
|
|
451
|
+
class="">
|
|
452
|
+
selectProject
|
|
453
|
+
|
|
454
|
+
</a>
|
|
455
|
+
|
|
456
|
+
</li>
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
<li><a
|
|
460
|
+
href='#getprojectstate'
|
|
461
|
+
class="">
|
|
462
|
+
getProjectState
|
|
463
|
+
|
|
464
|
+
</a>
|
|
465
|
+
|
|
466
|
+
</li>
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
<li><a
|
|
470
|
+
href='#applyprojectstatepatch'
|
|
471
|
+
class="">
|
|
472
|
+
applyProjectStatePatch
|
|
473
|
+
|
|
474
|
+
</a>
|
|
475
|
+
|
|
476
|
+
</li>
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
<li><a
|
|
480
|
+
href='#subscribeprojectstate'
|
|
481
|
+
class="">
|
|
482
|
+
subscribeProjectState
|
|
483
|
+
|
|
484
|
+
</a>
|
|
485
|
+
|
|
486
|
+
</li>
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
<li><a
|
|
490
|
+
href='#getprojectfiles'
|
|
491
|
+
class="">
|
|
492
|
+
getProjectFiles
|
|
493
|
+
|
|
494
|
+
</a>
|
|
495
|
+
|
|
496
|
+
</li>
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
<li><a
|
|
500
|
+
href='#getprojectlibrary'
|
|
501
|
+
class="">
|
|
502
|
+
getProjectLibrary
|
|
503
|
+
|
|
504
|
+
</a>
|
|
505
|
+
|
|
506
|
+
</li>
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
<li><a
|
|
510
|
+
href='#setprojectlibrary'
|
|
511
|
+
class="">
|
|
512
|
+
setProjectLibrary
|
|
513
|
+
|
|
514
|
+
</a>
|
|
515
|
+
|
|
516
|
+
</li>
|
|
517
|
+
|
|
518
|
+
</ul>
|
|
519
|
+
</div>
|
|
520
|
+
<div class='mt1 h6 quiet'>
|
|
521
|
+
<a href='https://documentation.js.org/reading-documentation.html'>Need help reading this?</a>
|
|
522
|
+
</div>
|
|
523
|
+
</div>
|
|
524
|
+
</div>
|
|
525
|
+
<div id='split-right' class='relative overflow-auto height-viewport-100'>
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
<div class='keyline-top-not py2'><section class='py2 clearfix'>
|
|
529
|
+
|
|
530
|
+
<h2 id='terafy-playground' class='mt0'>
|
|
531
|
+
TeraFy Playground
|
|
532
|
+
</h2>
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
<p>See <a href="./playground.html">the TeraFy Playground</a> to expriment with the various TeraFy API calls.</p>
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
</section></div>
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
<div class='clearfix'>
|
|
546
|
+
|
|
547
|
+
<h3 class='fl m0' id='data-entities'>
|
|
548
|
+
Data entities
|
|
549
|
+
</h3>
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
</div>
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
<div class='pre p1 fill-light mt0'>Data entities</div>
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
<div class='py1 quiet mt1 prose-big'>Static Members</div>
|
|
581
|
+
<div class="clearfix">
|
|
582
|
+
|
|
583
|
+
<div class='border-bottom' id='user'>
|
|
584
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
585
|
+
<div class="py1 contain">
|
|
586
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
587
|
+
<span class='code strong strong truncate'>User</span>
|
|
588
|
+
</div>
|
|
589
|
+
</div>
|
|
590
|
+
<div class="clearfix display-none toggle-target">
|
|
591
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
<p>User / active session within TERA</p>
|
|
596
|
+
|
|
597
|
+
<div class='pre p1 fill-light mt0'>User</div>
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
<div class='py1 quiet mt1 prose-big'>Properties</div>
|
|
612
|
+
<div>
|
|
613
|
+
|
|
614
|
+
<div class='space-bottom0'>
|
|
615
|
+
<span class='code bold'>id</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
|
|
616
|
+
: Unique identifier of the user
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
</div>
|
|
620
|
+
|
|
621
|
+
<div class='space-bottom0'>
|
|
622
|
+
<span class='code bold'>email</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
|
|
623
|
+
: The email address of the current user
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
</div>
|
|
627
|
+
|
|
628
|
+
<div class='space-bottom0'>
|
|
629
|
+
<span class='code bold'>name</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
|
|
630
|
+
: The provided full name of the user
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
</div>
|
|
634
|
+
|
|
635
|
+
<div class='space-bottom0'>
|
|
636
|
+
<span class='code bold'>isSubscribed</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>)</code>
|
|
637
|
+
: Whether the active user has a TERA subscription
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
</div>
|
|
641
|
+
|
|
642
|
+
</div>
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
</section>
|
|
661
|
+
|
|
662
|
+
</div>
|
|
663
|
+
</div>
|
|
664
|
+
|
|
665
|
+
<div class='border-bottom' id='project'>
|
|
666
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
667
|
+
<div class="py1 contain">
|
|
668
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
669
|
+
<span class='code strong strong truncate'>Project</span>
|
|
670
|
+
</div>
|
|
671
|
+
</div>
|
|
672
|
+
<div class="clearfix display-none toggle-target">
|
|
673
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
<p>Project entry within TERA</p>
|
|
678
|
+
|
|
679
|
+
<div class='pre p1 fill-light mt0'>Project</div>
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
</section>
|
|
710
|
+
|
|
711
|
+
</div>
|
|
712
|
+
</div>
|
|
713
|
+
|
|
714
|
+
<div class='border-bottom' id='projectfile'>
|
|
715
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
716
|
+
<div class="py1 contain">
|
|
717
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
718
|
+
<span class='code strong strong truncate'>ProjectFile</span>
|
|
719
|
+
</div>
|
|
720
|
+
</div>
|
|
721
|
+
<div class="clearfix display-none toggle-target">
|
|
722
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
<p>Data structure for a project file</p>
|
|
727
|
+
|
|
728
|
+
<div class='pre p1 fill-light mt0'>ProjectFile</div>
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
<div class='py1 quiet mt1 prose-big'>Properties</div>
|
|
743
|
+
<div>
|
|
744
|
+
|
|
745
|
+
<div class='space-bottom0'>
|
|
746
|
+
<span class='code bold'>id</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
|
|
747
|
+
: A UUID string representing the unique ID of the file
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
</div>
|
|
751
|
+
|
|
752
|
+
<div class='space-bottom0'>
|
|
753
|
+
<span class='code bold'>name</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
|
|
754
|
+
: Relative name path (can contain prefix directories) for the human readable file name
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
</div>
|
|
758
|
+
|
|
759
|
+
<div class='space-bottom0'>
|
|
760
|
+
<span class='code bold'>parsedName</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code>
|
|
761
|
+
: An object representing meta file parts of a file name
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
<ul>
|
|
765
|
+
|
|
766
|
+
<li><code>parsedName.basename</code> <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>
|
|
767
|
+
|
|
768
|
+
<p>The filename + extention (i.e. everything without directory name)</p>
|
|
769
|
+
</li>
|
|
770
|
+
|
|
771
|
+
<li><code>parsedName.filename</code> <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>
|
|
772
|
+
|
|
773
|
+
<p>The file portion of the name (basename without the extension)</p>
|
|
774
|
+
</li>
|
|
775
|
+
|
|
776
|
+
<li><code>parsedName.ext</code> <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>
|
|
777
|
+
|
|
778
|
+
<p>The extension portion of the name (always lower case)</p>
|
|
779
|
+
</li>
|
|
780
|
+
|
|
781
|
+
<li><code>parsedName.dirName</code> <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>
|
|
782
|
+
|
|
783
|
+
<p>The directory path portion of the name</p>
|
|
784
|
+
</li>
|
|
785
|
+
|
|
786
|
+
</ul>
|
|
787
|
+
|
|
788
|
+
</div>
|
|
789
|
+
|
|
790
|
+
<div class='space-bottom0'>
|
|
791
|
+
<span class='code bold'>created</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date">Date</a>)</code>
|
|
792
|
+
: A date representing when the file was created
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
</div>
|
|
796
|
+
|
|
797
|
+
<div class='space-bottom0'>
|
|
798
|
+
<span class='code bold'>modified</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date">Date</a>)</code>
|
|
799
|
+
: A date representing when the file was created
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
</div>
|
|
803
|
+
|
|
804
|
+
<div class='space-bottom0'>
|
|
805
|
+
<span class='code bold'>accessed</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date">Date</a>)</code>
|
|
806
|
+
: A date representing when the file was last accessed
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
</div>
|
|
810
|
+
|
|
811
|
+
<div class='space-bottom0'>
|
|
812
|
+
<span class='code bold'>size</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)</code>
|
|
813
|
+
: Size, in bytes, of the file
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
</div>
|
|
817
|
+
|
|
818
|
+
<div class='space-bottom0'>
|
|
819
|
+
<span class='code bold'>mime</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
|
|
820
|
+
: The associated mime type for the file
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
</div>
|
|
824
|
+
|
|
825
|
+
</div>
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
</section>
|
|
844
|
+
|
|
845
|
+
</div>
|
|
846
|
+
</div>
|
|
847
|
+
|
|
848
|
+
</div>
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
</section>
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
<div class='keyline-top-not py2'><section class='py2 clearfix'>
|
|
863
|
+
|
|
864
|
+
<h2 id='terafy' class='mt0'>
|
|
865
|
+
TeraFy
|
|
866
|
+
</h2>
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
<p>API reference for all methods exposed by the TeraFy client library.</p>
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
</section></div>
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
<div class='clearfix'>
|
|
880
|
+
|
|
881
|
+
<h3 class='fl m0' id='terafy'>
|
|
882
|
+
TeraFy
|
|
883
|
+
</h3>
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
</div>
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
<p>Main Tera-Fy Client (class singleton) to be used in a frontend browser</p>
|
|
890
|
+
|
|
891
|
+
<div class='pre p1 fill-light mt0'>new TeraFy()</div>
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
<div class='py1 quiet mt1 prose-big'>Instance Members</div>
|
|
918
|
+
<div class="clearfix">
|
|
919
|
+
|
|
920
|
+
<div class='border-bottom' id='settings'>
|
|
921
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
922
|
+
<div class="py1 contain">
|
|
923
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
924
|
+
<span class='code strong strong truncate'>settings</span>
|
|
925
|
+
</div>
|
|
926
|
+
</div>
|
|
927
|
+
<div class="clearfix display-none toggle-target">
|
|
928
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
<p>Various settings to configure behaviour</p>
|
|
933
|
+
|
|
934
|
+
<div class='pre p1 fill-light mt0'>settings</div>
|
|
935
|
+
|
|
936
|
+
<p>
|
|
937
|
+
Type:
|
|
938
|
+
<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>
|
|
939
|
+
</p>
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
<div class='py1 quiet mt1 prose-big'>Properties</div>
|
|
954
|
+
<div>
|
|
955
|
+
|
|
956
|
+
<div class='space-bottom0'>
|
|
957
|
+
<span class='code bold'>devMode</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>)</code>
|
|
958
|
+
: Operate in devMode - i.e. force outer refresh when encountering an existing TeraFy instance
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
</div>
|
|
962
|
+
|
|
963
|
+
<div class='space-bottom0'>
|
|
964
|
+
<span class='code bold'>How</span> <code class='quiet'>((<code>"detect"</code> | <code>"parent"</code> | <code>"child"</code>))</code>
|
|
965
|
+
: to communicate with TERA. 'parent' assumes that the parent of the current document is TERA, 'child' spawns an iFrame and uses TERA there, 'detect' tries parent and fallsback to 'child'
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
</div>
|
|
969
|
+
|
|
970
|
+
<div class='space-bottom0'>
|
|
971
|
+
<span class='code bold'>modeTimeout</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)</code>
|
|
972
|
+
: How long entities have in 'detect' mode to identify themselves
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
</div>
|
|
976
|
+
|
|
977
|
+
<div class='space-bottom0'>
|
|
978
|
+
<span class='code bold'>siteUrl</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
|
|
979
|
+
: The TERA URL to connect to
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
</div>
|
|
983
|
+
|
|
984
|
+
<div class='space-bottom0'>
|
|
985
|
+
<span class='code bold'>restrictOrigin</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
|
|
986
|
+
: URL to restrict communications to
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
</div>
|
|
990
|
+
|
|
991
|
+
</div>
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
</section>
|
|
1010
|
+
|
|
1011
|
+
</div>
|
|
1012
|
+
</div>
|
|
1013
|
+
|
|
1014
|
+
<div class='border-bottom' id='dom'>
|
|
1015
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1016
|
+
<div class="py1 contain">
|
|
1017
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1018
|
+
<span class='code strong strong truncate'>dom</span>
|
|
1019
|
+
</div>
|
|
1020
|
+
</div>
|
|
1021
|
+
<div class="clearfix display-none toggle-target">
|
|
1022
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
<p>DOMElements for this TeraFy instance</p>
|
|
1027
|
+
|
|
1028
|
+
<div class='pre p1 fill-light mt0'>dom</div>
|
|
1029
|
+
|
|
1030
|
+
<p>
|
|
1031
|
+
Type:
|
|
1032
|
+
<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>
|
|
1033
|
+
</p>
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
<div class='py1 quiet mt1 prose-big'>Properties</div>
|
|
1048
|
+
<div>
|
|
1049
|
+
|
|
1050
|
+
<div class='space-bottom0'>
|
|
1051
|
+
<span class='code bold'>el</span> <code class='quiet'>(DOMElement)</code>
|
|
1052
|
+
: The main tera-fy div wrapper
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
</div>
|
|
1056
|
+
|
|
1057
|
+
<div class='space-bottom0'>
|
|
1058
|
+
<span class='code bold'>iframe</span> <code class='quiet'>(DOMElement)</code>
|
|
1059
|
+
: The internal iFrame element
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
</div>
|
|
1063
|
+
|
|
1064
|
+
<div class='space-bottom0'>
|
|
1065
|
+
<span class='code bold'>stylesheet</span> <code class='quiet'>(DOMElement)</code>
|
|
1066
|
+
: The corresponding stylesheet
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
</div>
|
|
1070
|
+
|
|
1071
|
+
</div>
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
</section>
|
|
1090
|
+
|
|
1091
|
+
</div>
|
|
1092
|
+
</div>
|
|
1093
|
+
|
|
1094
|
+
<div class='border-bottom' id='methods'>
|
|
1095
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1096
|
+
<div class="py1 contain">
|
|
1097
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1098
|
+
<span class='code strong strong truncate'>methods</span>
|
|
1099
|
+
</div>
|
|
1100
|
+
</div>
|
|
1101
|
+
<div class="clearfix display-none toggle-target">
|
|
1102
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
<p>List of function stubs mapped here from the server
|
|
1107
|
+
This array is forms the reference of <code>TeraFy.METHOD()</code> objects to provide locally which will be mapped via <code>TeraFy.rpc(METHOD, ...args)</code></p>
|
|
1108
|
+
|
|
1109
|
+
<div class='pre p1 fill-light mt0'>methods</div>
|
|
1110
|
+
|
|
1111
|
+
<p>
|
|
1112
|
+
Type:
|
|
1113
|
+
<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>>
|
|
1114
|
+
</p>
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
</section>
|
|
1145
|
+
|
|
1146
|
+
</div>
|
|
1147
|
+
</div>
|
|
1148
|
+
|
|
1149
|
+
<div class='border-bottom' id='plugins'>
|
|
1150
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1151
|
+
<div class="py1 contain">
|
|
1152
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1153
|
+
<span class='code strong strong truncate'>plugins</span>
|
|
1154
|
+
</div>
|
|
1155
|
+
</div>
|
|
1156
|
+
<div class="clearfix display-none toggle-target">
|
|
1157
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
<p>Loaded plugins via Use()</p>
|
|
1162
|
+
|
|
1163
|
+
<div class='pre p1 fill-light mt0'>plugins</div>
|
|
1164
|
+
|
|
1165
|
+
<p>
|
|
1166
|
+
Type:
|
|
1167
|
+
<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><TeraFyPlugin>
|
|
1168
|
+
</p>
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
</section>
|
|
1199
|
+
|
|
1200
|
+
</div>
|
|
1201
|
+
</div>
|
|
1202
|
+
|
|
1203
|
+
<div class='border-bottom' id='send'>
|
|
1204
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1205
|
+
<div class="py1 contain">
|
|
1206
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1207
|
+
<span class='code strong strong truncate'>send(message)</span>
|
|
1208
|
+
</div>
|
|
1209
|
+
</div>
|
|
1210
|
+
<div class="clearfix display-none toggle-target">
|
|
1211
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
<p>Send a message + wait for a response object</p>
|
|
1216
|
+
|
|
1217
|
+
<div class='pre p1 fill-light mt0'>send(message: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><any></div>
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
1230
|
+
<div class='prose'>
|
|
1231
|
+
|
|
1232
|
+
<div class='space-bottom0'>
|
|
1233
|
+
<div>
|
|
1234
|
+
<span class='code bold'>message</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code>
|
|
1235
|
+
Message object to send
|
|
1236
|
+
|
|
1237
|
+
</div>
|
|
1238
|
+
|
|
1239
|
+
</div>
|
|
1240
|
+
|
|
1241
|
+
</div>
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
1249
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><any></code>:
|
|
1250
|
+
A promise which resolves when the operation has completed with the remote reply
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
</section>
|
|
1270
|
+
|
|
1271
|
+
</div>
|
|
1272
|
+
</div>
|
|
1273
|
+
|
|
1274
|
+
<div class='border-bottom' id='sendraw'>
|
|
1275
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1276
|
+
<div class="py1 contain">
|
|
1277
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1278
|
+
<span class='code strong strong truncate'>sendRaw(message)</span>
|
|
1279
|
+
</div>
|
|
1280
|
+
</div>
|
|
1281
|
+
<div class="clearfix display-none toggle-target">
|
|
1282
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
<p>Send raw message content to the server
|
|
1287
|
+
This function does not return or wait for a reply - use <code>send()</code> for that</p>
|
|
1288
|
+
|
|
1289
|
+
<div class='pre p1 fill-light mt0'>sendRaw(message: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</div>
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
1302
|
+
<div class='prose'>
|
|
1303
|
+
|
|
1304
|
+
<div class='space-bottom0'>
|
|
1305
|
+
<div>
|
|
1306
|
+
<span class='code bold'>message</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code>
|
|
1307
|
+
Message object to send
|
|
1308
|
+
|
|
1309
|
+
</div>
|
|
1310
|
+
|
|
1311
|
+
</div>
|
|
1312
|
+
|
|
1313
|
+
</div>
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
|
|
1332
|
+
|
|
1333
|
+
</section>
|
|
1334
|
+
|
|
1335
|
+
</div>
|
|
1336
|
+
</div>
|
|
1337
|
+
|
|
1338
|
+
<div class='border-bottom' id='rpc'>
|
|
1339
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1340
|
+
<div class="py1 contain">
|
|
1341
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1342
|
+
<span class='code strong strong truncate'>rpc(method, args)</span>
|
|
1343
|
+
</div>
|
|
1344
|
+
</div>
|
|
1345
|
+
<div class="clearfix display-none toggle-target">
|
|
1346
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
<p>Call an RPC function in the server instance</p>
|
|
1351
|
+
|
|
1352
|
+
<div class='pre p1 fill-light mt0'>rpc(method: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, args: ...any): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><any></div>
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
1365
|
+
<div class='prose'>
|
|
1366
|
+
|
|
1367
|
+
<div class='space-bottom0'>
|
|
1368
|
+
<div>
|
|
1369
|
+
<span class='code bold'>method</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
|
|
1370
|
+
The method name to call
|
|
1371
|
+
|
|
1372
|
+
</div>
|
|
1373
|
+
|
|
1374
|
+
</div>
|
|
1375
|
+
|
|
1376
|
+
<div class='space-bottom0'>
|
|
1377
|
+
<div>
|
|
1378
|
+
<span class='code bold'>args</span> <code class='quiet'>(...any)</code>
|
|
1379
|
+
|
|
1380
|
+
</div>
|
|
1381
|
+
|
|
1382
|
+
</div>
|
|
1383
|
+
|
|
1384
|
+
</div>
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
|
|
1391
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
1392
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><any></code>:
|
|
1393
|
+
The resolved output of the server function
|
|
1394
|
+
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
</section>
|
|
1413
|
+
|
|
1414
|
+
</div>
|
|
1415
|
+
</div>
|
|
1416
|
+
|
|
1417
|
+
<div class='border-bottom' id='acceptmessage'>
|
|
1418
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1419
|
+
<div class="py1 contain">
|
|
1420
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1421
|
+
<span class='code strong strong truncate'>acceptMessage(rawMessage, Raw)</span>
|
|
1422
|
+
</div>
|
|
1423
|
+
</div>
|
|
1424
|
+
<div class="clearfix display-none toggle-target">
|
|
1425
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
<p>Accept an incoming message</p>
|
|
1430
|
+
|
|
1431
|
+
<div class='pre p1 fill-light mt0'>acceptMessage(rawMessage: any, Raw: <a href="https://developer.mozilla.org/docs/Web/API/MessageEvent">MessageEvent</a>)</div>
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
|
|
1443
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
1444
|
+
<div class='prose'>
|
|
1445
|
+
|
|
1446
|
+
<div class='space-bottom0'>
|
|
1447
|
+
<div>
|
|
1448
|
+
<span class='code bold'>rawMessage</span> <code class='quiet'>(any)</code>
|
|
1449
|
+
|
|
1450
|
+
</div>
|
|
1451
|
+
|
|
1452
|
+
</div>
|
|
1453
|
+
|
|
1454
|
+
<div class='space-bottom0'>
|
|
1455
|
+
<div>
|
|
1456
|
+
<span class='code bold'>Raw</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/API/MessageEvent">MessageEvent</a>)</code>
|
|
1457
|
+
message event to process
|
|
1458
|
+
|
|
1459
|
+
</div>
|
|
1460
|
+
|
|
1461
|
+
</div>
|
|
1462
|
+
|
|
1463
|
+
</div>
|
|
1464
|
+
|
|
1465
|
+
|
|
1466
|
+
|
|
1467
|
+
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
</section>
|
|
1484
|
+
|
|
1485
|
+
</div>
|
|
1486
|
+
</div>
|
|
1487
|
+
|
|
1488
|
+
<div class='border-bottom' id='acceptpostboxes'>
|
|
1489
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1490
|
+
<div class="py1 contain">
|
|
1491
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1492
|
+
<span class='code strong strong truncate'>acceptPostboxes</span>
|
|
1493
|
+
</div>
|
|
1494
|
+
</div>
|
|
1495
|
+
<div class="clearfix display-none toggle-target">
|
|
1496
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1497
|
+
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
<p>Listening postboxes, these correspond to outgoing message IDs that expect a response</p>
|
|
1501
|
+
|
|
1502
|
+
<div class='pre p1 fill-light mt0'>acceptPostboxes</div>
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
|
|
1532
|
+
</section>
|
|
1533
|
+
|
|
1534
|
+
</div>
|
|
1535
|
+
</div>
|
|
1536
|
+
|
|
1537
|
+
<div class='border-bottom' id='createprojectstatepatch'>
|
|
1538
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1539
|
+
<div class="py1 contain">
|
|
1540
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1541
|
+
<span class='code strong strong truncate'>createProjectStatePatch(newState, oldState)</span>
|
|
1542
|
+
</div>
|
|
1543
|
+
</div>
|
|
1544
|
+
<div class="clearfix display-none toggle-target">
|
|
1545
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
|
|
1549
|
+
<p>Create + transmit a new project state patch base on the current and previous states
|
|
1550
|
+
The transmitted patch follows the <a href="http://jsonpatch.com">JSPatch</a> standard
|
|
1551
|
+
This function accepts an entire projectState instance, computes the delta and transmits that to the server for merging</p>
|
|
1552
|
+
|
|
1553
|
+
<div class='pre p1 fill-light mt0'>createProjectStatePatch(newState: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>, oldState: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></div>
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
1566
|
+
<div class='prose'>
|
|
1567
|
+
|
|
1568
|
+
<div class='space-bottom0'>
|
|
1569
|
+
<div>
|
|
1570
|
+
<span class='code bold'>newState</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code>
|
|
1571
|
+
The local projectState to accept
|
|
1572
|
+
|
|
1573
|
+
</div>
|
|
1574
|
+
|
|
1575
|
+
</div>
|
|
1576
|
+
|
|
1577
|
+
<div class='space-bottom0'>
|
|
1578
|
+
<div>
|
|
1579
|
+
<span class='code bold'>oldState</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code>
|
|
1580
|
+
The previous projectState to examine against
|
|
1581
|
+
|
|
1582
|
+
</div>
|
|
1583
|
+
|
|
1584
|
+
</div>
|
|
1585
|
+
|
|
1586
|
+
</div>
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
|
|
1593
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
1594
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></code>:
|
|
1595
|
+
A promise which will resolve when the operation has completed
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
|
|
1604
|
+
|
|
1605
|
+
|
|
1606
|
+
|
|
1607
|
+
|
|
1608
|
+
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
</section>
|
|
1615
|
+
|
|
1616
|
+
</div>
|
|
1617
|
+
</div>
|
|
1618
|
+
|
|
1619
|
+
<div class='border-bottom' id='applyprojectstatepatchlocal'>
|
|
1620
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1621
|
+
<div class="py1 contain">
|
|
1622
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1623
|
+
<span class='code strong strong truncate'>applyProjectStatePatchLocal(patch)</span>
|
|
1624
|
+
</div>
|
|
1625
|
+
</div>
|
|
1626
|
+
<div class="clearfix display-none toggle-target">
|
|
1627
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
<p>Client function which accepts a patch from the server and applies it to local project state
|
|
1632
|
+
The patch should follow the <a href="http://jsonpatch.com">JSPatch</a> standard
|
|
1633
|
+
This function is expected to be sub-classed by a plugin</p>
|
|
1634
|
+
|
|
1635
|
+
<div class='pre p1 fill-light mt0'>applyProjectStatePatchLocal(patch: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></div>
|
|
1636
|
+
|
|
1637
|
+
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
|
|
1641
|
+
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
1648
|
+
<div class='prose'>
|
|
1649
|
+
|
|
1650
|
+
<div class='space-bottom0'>
|
|
1651
|
+
<div>
|
|
1652
|
+
<span class='code bold'>patch</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)</code>
|
|
1653
|
+
A JSPatch patch to apply
|
|
1654
|
+
|
|
1655
|
+
</div>
|
|
1656
|
+
|
|
1657
|
+
</div>
|
|
1658
|
+
|
|
1659
|
+
</div>
|
|
1660
|
+
|
|
1661
|
+
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
1667
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></code>:
|
|
1668
|
+
A promise which will resolve when the operation has completed
|
|
1669
|
+
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
|
|
1685
|
+
|
|
1686
|
+
|
|
1687
|
+
</section>
|
|
1688
|
+
|
|
1689
|
+
</div>
|
|
1690
|
+
</div>
|
|
1691
|
+
|
|
1692
|
+
<div class='border-bottom' id='init'>
|
|
1693
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1694
|
+
<div class="py1 contain">
|
|
1695
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1696
|
+
<span class='code strong strong truncate'>init(options?)</span>
|
|
1697
|
+
</div>
|
|
1698
|
+
</div>
|
|
1699
|
+
<div class="clearfix display-none toggle-target">
|
|
1700
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1701
|
+
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
<p>Initalize the TERA client singleton
|
|
1705
|
+
This function can only be called once and will return the existing init() worker Promise if its called againt</p>
|
|
1706
|
+
|
|
1707
|
+
<div class='pre p1 fill-light mt0'>init(options: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="#terafy">TeraFy</a>></div>
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
1720
|
+
<div class='prose'>
|
|
1721
|
+
|
|
1722
|
+
<div class='space-bottom0'>
|
|
1723
|
+
<div>
|
|
1724
|
+
<span class='code bold'>options</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?)</code>
|
|
1725
|
+
Additional options to merge into
|
|
1726
|
+
<code>settings</code>
|
|
1727
|
+
via
|
|
1728
|
+
<code>set</code>
|
|
1729
|
+
|
|
1730
|
+
</div>
|
|
1731
|
+
|
|
1732
|
+
</div>
|
|
1733
|
+
|
|
1734
|
+
</div>
|
|
1735
|
+
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
|
|
1741
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
1742
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="#terafy">TeraFy</a>></code>:
|
|
1743
|
+
An eventual promise which will resovle with this terafy instance
|
|
1744
|
+
|
|
1745
|
+
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
</section>
|
|
1763
|
+
|
|
1764
|
+
</div>
|
|
1765
|
+
</div>
|
|
1766
|
+
|
|
1767
|
+
<div class='border-bottom' id='detectmode'>
|
|
1768
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1769
|
+
<div class="py1 contain">
|
|
1770
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1771
|
+
<span class='code strong strong truncate'>detectMode()</span>
|
|
1772
|
+
</div>
|
|
1773
|
+
</div>
|
|
1774
|
+
<div class="clearfix display-none toggle-target">
|
|
1775
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1776
|
+
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
<p>Populate <code>settings.mode</code>
|
|
1780
|
+
Try to communicate with a parent frame, if none assume we need to fallback to child mode</p>
|
|
1781
|
+
|
|
1782
|
+
<div class='pre p1 fill-light mt0'>detectMode(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>></div>
|
|
1783
|
+
|
|
1784
|
+
|
|
1785
|
+
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
|
|
1792
|
+
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
|
|
1796
|
+
|
|
1797
|
+
|
|
1798
|
+
|
|
1799
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
1800
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>></code>:
|
|
1801
|
+
A promise which will resolve with the detected mode to use
|
|
1802
|
+
|
|
1803
|
+
|
|
1804
|
+
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
|
|
1809
|
+
|
|
1810
|
+
|
|
1811
|
+
|
|
1812
|
+
|
|
1813
|
+
|
|
1814
|
+
|
|
1815
|
+
|
|
1816
|
+
|
|
1817
|
+
|
|
1818
|
+
|
|
1819
|
+
|
|
1820
|
+
</section>
|
|
1821
|
+
|
|
1822
|
+
</div>
|
|
1823
|
+
</div>
|
|
1824
|
+
|
|
1825
|
+
<div class='border-bottom' id='injectcomms'>
|
|
1826
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1827
|
+
<div class="py1 contain">
|
|
1828
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1829
|
+
<span class='code strong strong truncate'>injectComms()</span>
|
|
1830
|
+
</div>
|
|
1831
|
+
</div>
|
|
1832
|
+
<div class="clearfix display-none toggle-target">
|
|
1833
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
|
|
1837
|
+
<p>Find an existing active TERA server OR initalize one</p>
|
|
1838
|
+
|
|
1839
|
+
<div class='pre p1 fill-light mt0'>injectComms(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></div>
|
|
1840
|
+
|
|
1841
|
+
|
|
1842
|
+
|
|
1843
|
+
|
|
1844
|
+
|
|
1845
|
+
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
1857
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></code>:
|
|
1858
|
+
A promise which will resolve when the loading has completed and we have found a parent TERA instance or initiallized a child
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
|
|
1862
|
+
|
|
1863
|
+
|
|
1864
|
+
|
|
1865
|
+
|
|
1866
|
+
|
|
1867
|
+
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
|
|
1871
|
+
|
|
1872
|
+
|
|
1873
|
+
|
|
1874
|
+
|
|
1875
|
+
|
|
1876
|
+
|
|
1877
|
+
</section>
|
|
1878
|
+
|
|
1879
|
+
</div>
|
|
1880
|
+
</div>
|
|
1881
|
+
|
|
1882
|
+
<div class='border-bottom' id='injectstylesheet'>
|
|
1883
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1884
|
+
<div class="py1 contain">
|
|
1885
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1886
|
+
<span class='code strong strong truncate'>injectStylesheet()</span>
|
|
1887
|
+
</div>
|
|
1888
|
+
</div>
|
|
1889
|
+
<div class="clearfix display-none toggle-target">
|
|
1890
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1891
|
+
|
|
1892
|
+
|
|
1893
|
+
|
|
1894
|
+
<p>Inject a local stylesheet to handle TERA server functionality</p>
|
|
1895
|
+
|
|
1896
|
+
<div class='pre p1 fill-light mt0'>injectStylesheet()</div>
|
|
1897
|
+
|
|
1898
|
+
|
|
1899
|
+
|
|
1900
|
+
|
|
1901
|
+
|
|
1902
|
+
|
|
1903
|
+
|
|
1904
|
+
|
|
1905
|
+
|
|
1906
|
+
|
|
1907
|
+
|
|
1908
|
+
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
|
|
1920
|
+
|
|
1921
|
+
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
|
|
1925
|
+
|
|
1926
|
+
</section>
|
|
1927
|
+
|
|
1928
|
+
</div>
|
|
1929
|
+
</div>
|
|
1930
|
+
|
|
1931
|
+
<div class='border-bottom' id='injectmethods'>
|
|
1932
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1933
|
+
<div class="py1 contain">
|
|
1934
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1935
|
+
<span class='code strong strong truncate'>injectMethods()</span>
|
|
1936
|
+
</div>
|
|
1937
|
+
</div>
|
|
1938
|
+
<div class="clearfix display-none toggle-target">
|
|
1939
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1940
|
+
|
|
1941
|
+
|
|
1942
|
+
|
|
1943
|
+
<p>Inject all server methods defined in <code>methods</code> as local functions wrapped in the <code>rpc</code> function</p>
|
|
1944
|
+
|
|
1945
|
+
<div class='pre p1 fill-light mt0'>injectMethods()</div>
|
|
1946
|
+
|
|
1947
|
+
|
|
1948
|
+
|
|
1949
|
+
|
|
1950
|
+
|
|
1951
|
+
|
|
1952
|
+
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
|
|
1963
|
+
|
|
1964
|
+
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
|
|
1972
|
+
|
|
1973
|
+
|
|
1974
|
+
|
|
1975
|
+
</section>
|
|
1976
|
+
|
|
1977
|
+
</div>
|
|
1978
|
+
</div>
|
|
1979
|
+
|
|
1980
|
+
<div class='border-bottom' id='debug'>
|
|
1981
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
1982
|
+
<div class="py1 contain">
|
|
1983
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
1984
|
+
<span class='code strong strong truncate'>debug(msg, status?)</span>
|
|
1985
|
+
</div>
|
|
1986
|
+
</div>
|
|
1987
|
+
<div class="clearfix display-none toggle-target">
|
|
1988
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
1989
|
+
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
<p>Debugging output function
|
|
1993
|
+
This function will only act if <code>settings.devMode</code> is truthy</p>
|
|
1994
|
+
|
|
1995
|
+
<div class='pre p1 fill-light mt0'>debug(msg: ...any, status: (<code>"VERBOSE"</code> | <code>"INFO"</code> | <code>"LOG"</code> | <code>"WARN"</code> | <code>"ERROR"</code>)?)</div>
|
|
1996
|
+
|
|
1997
|
+
|
|
1998
|
+
|
|
1999
|
+
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
|
|
2003
|
+
|
|
2004
|
+
|
|
2005
|
+
|
|
2006
|
+
|
|
2007
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
2008
|
+
<div class='prose'>
|
|
2009
|
+
|
|
2010
|
+
<div class='space-bottom0'>
|
|
2011
|
+
<div>
|
|
2012
|
+
<span class='code bold'>msg</span> <code class='quiet'>(...any)</code>
|
|
2013
|
+
|
|
2014
|
+
</div>
|
|
2015
|
+
|
|
2016
|
+
</div>
|
|
2017
|
+
|
|
2018
|
+
<div class='space-bottom0'>
|
|
2019
|
+
<div>
|
|
2020
|
+
<span class='code bold'>status</span> <code class='quiet'>((<code>"VERBOSE"</code> | <code>"INFO"</code> | <code>"LOG"</code> | <code>"WARN"</code> | <code>"ERROR"</code>)?)</code>
|
|
2021
|
+
Optional prefixing level to mark the message as. 'WARN' and 'ERROR' will always show reguardless of devMode being enabled
|
|
2022
|
+
|
|
2023
|
+
</div>
|
|
2024
|
+
|
|
2025
|
+
</div>
|
|
2026
|
+
|
|
2027
|
+
</div>
|
|
2028
|
+
|
|
2029
|
+
|
|
2030
|
+
|
|
2031
|
+
|
|
2032
|
+
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+
|
|
2036
|
+
|
|
2037
|
+
|
|
2038
|
+
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
|
|
2042
|
+
|
|
2043
|
+
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
|
|
2047
|
+
</section>
|
|
2048
|
+
|
|
2049
|
+
</div>
|
|
2050
|
+
</div>
|
|
2051
|
+
|
|
2052
|
+
<div class='border-bottom' id='set'>
|
|
2053
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
2054
|
+
<div class="py1 contain">
|
|
2055
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
2056
|
+
<span class='code strong strong truncate'>set(key, value)</span>
|
|
2057
|
+
</div>
|
|
2058
|
+
</div>
|
|
2059
|
+
<div class="clearfix display-none toggle-target">
|
|
2060
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2061
|
+
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
<p>Set or merge settings
|
|
2065
|
+
This function also routes 'special' keys like <code>devMode</code> to their internal handlers</p>
|
|
2066
|
+
|
|
2067
|
+
<div class='pre p1 fill-light mt0'>set(key: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>), value: any): <a href="#terafy">TeraFy</a></div>
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
|
|
2071
|
+
|
|
2072
|
+
|
|
2073
|
+
|
|
2074
|
+
|
|
2075
|
+
|
|
2076
|
+
|
|
2077
|
+
|
|
2078
|
+
|
|
2079
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
2080
|
+
<div class='prose'>
|
|
2081
|
+
|
|
2082
|
+
<div class='space-bottom0'>
|
|
2083
|
+
<div>
|
|
2084
|
+
<span class='code bold'>key</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>))</code>
|
|
2085
|
+
Either a single setting key to set or an object to merge
|
|
2086
|
+
|
|
2087
|
+
</div>
|
|
2088
|
+
|
|
2089
|
+
</div>
|
|
2090
|
+
|
|
2091
|
+
<div class='space-bottom0'>
|
|
2092
|
+
<div>
|
|
2093
|
+
<span class='code bold'>value</span> <code class='quiet'>(any)</code>
|
|
2094
|
+
The value to set if
|
|
2095
|
+
<code>key</code>
|
|
2096
|
+
is a string
|
|
2097
|
+
|
|
2098
|
+
</div>
|
|
2099
|
+
|
|
2100
|
+
</div>
|
|
2101
|
+
|
|
2102
|
+
</div>
|
|
2103
|
+
|
|
2104
|
+
|
|
2105
|
+
|
|
2106
|
+
|
|
2107
|
+
|
|
2108
|
+
|
|
2109
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
2110
|
+
<code><a href="#terafy">TeraFy</a></code>:
|
|
2111
|
+
This chainable terafy instance
|
|
2112
|
+
|
|
2113
|
+
|
|
2114
|
+
|
|
2115
|
+
|
|
2116
|
+
|
|
2117
|
+
|
|
2118
|
+
|
|
2119
|
+
|
|
2120
|
+
|
|
2121
|
+
|
|
2122
|
+
|
|
2123
|
+
|
|
2124
|
+
|
|
2125
|
+
|
|
2126
|
+
|
|
2127
|
+
|
|
2128
|
+
|
|
2129
|
+
|
|
2130
|
+
</section>
|
|
2131
|
+
|
|
2132
|
+
</div>
|
|
2133
|
+
</div>
|
|
2134
|
+
|
|
2135
|
+
<div class='border-bottom' id='use'>
|
|
2136
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
2137
|
+
<div class="py1 contain">
|
|
2138
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
2139
|
+
<span class='code strong strong truncate'>use(mod, options?, The)</span>
|
|
2140
|
+
</div>
|
|
2141
|
+
</div>
|
|
2142
|
+
<div class="clearfix display-none toggle-target">
|
|
2143
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2144
|
+
|
|
2145
|
+
|
|
2146
|
+
|
|
2147
|
+
<p>Include a TeraFy client plugin</p>
|
|
2148
|
+
|
|
2149
|
+
<div class='pre p1 fill-light mt0'>use(mod: any, options: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?, The: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>): <a href="#terafy">TeraFy</a></div>
|
|
2150
|
+
|
|
2151
|
+
|
|
2152
|
+
|
|
2153
|
+
|
|
2154
|
+
|
|
2155
|
+
|
|
2156
|
+
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
|
|
2161
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
2162
|
+
<div class='prose'>
|
|
2163
|
+
|
|
2164
|
+
<div class='space-bottom0'>
|
|
2165
|
+
<div>
|
|
2166
|
+
<span class='code bold'>mod</span> <code class='quiet'>(any)</code>
|
|
2167
|
+
|
|
2168
|
+
</div>
|
|
2169
|
+
|
|
2170
|
+
</div>
|
|
2171
|
+
|
|
2172
|
+
<div class='space-bottom0'>
|
|
2173
|
+
<div>
|
|
2174
|
+
<span class='code bold'>options</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?)</code>
|
|
2175
|
+
Additional options to mutate behaviour
|
|
2176
|
+
|
|
2177
|
+
</div>
|
|
2178
|
+
|
|
2179
|
+
</div>
|
|
2180
|
+
|
|
2181
|
+
<div class='space-bottom0'>
|
|
2182
|
+
<div>
|
|
2183
|
+
<span class='code bold'>The</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code>
|
|
2184
|
+
module function to include. Invoked as
|
|
2185
|
+
<code>(teraClient:TeraFy, options:Object)</code>
|
|
2186
|
+
|
|
2187
|
+
</div>
|
|
2188
|
+
|
|
2189
|
+
</div>
|
|
2190
|
+
|
|
2191
|
+
</div>
|
|
2192
|
+
|
|
2193
|
+
|
|
2194
|
+
|
|
2195
|
+
|
|
2196
|
+
|
|
2197
|
+
|
|
2198
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
2199
|
+
<code><a href="#terafy">TeraFy</a></code>:
|
|
2200
|
+
This chainable terafy instance
|
|
2201
|
+
|
|
2202
|
+
|
|
2203
|
+
|
|
2204
|
+
|
|
2205
|
+
|
|
2206
|
+
|
|
2207
|
+
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
|
|
2211
|
+
|
|
2212
|
+
|
|
2213
|
+
|
|
2214
|
+
|
|
2215
|
+
|
|
2216
|
+
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
</section>
|
|
2220
|
+
|
|
2221
|
+
</div>
|
|
2222
|
+
</div>
|
|
2223
|
+
|
|
2224
|
+
<div class='border-bottom' id='mixin'>
|
|
2225
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
2226
|
+
<div class="py1 contain">
|
|
2227
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
2228
|
+
<span class='code strong strong truncate'>mixin(target, source)</span>
|
|
2229
|
+
</div>
|
|
2230
|
+
</div>
|
|
2231
|
+
<div class="clearfix display-none toggle-target">
|
|
2232
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2233
|
+
|
|
2234
|
+
|
|
2235
|
+
|
|
2236
|
+
<p>Internal function used by use() to merge an external declared singleton against this object</p>
|
|
2237
|
+
|
|
2238
|
+
<div class='pre p1 fill-light mt0'>mixin(target: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>, source: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</div>
|
|
2239
|
+
|
|
2240
|
+
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
|
|
2244
|
+
|
|
2245
|
+
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
|
|
2250
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
2251
|
+
<div class='prose'>
|
|
2252
|
+
|
|
2253
|
+
<div class='space-bottom0'>
|
|
2254
|
+
<div>
|
|
2255
|
+
<span class='code bold'>target</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code>
|
|
2256
|
+
Initalied class instance to extend
|
|
2257
|
+
|
|
2258
|
+
</div>
|
|
2259
|
+
|
|
2260
|
+
</div>
|
|
2261
|
+
|
|
2262
|
+
<div class='space-bottom0'>
|
|
2263
|
+
<div>
|
|
2264
|
+
<span class='code bold'>source</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code>
|
|
2265
|
+
Initalized source object to extend from
|
|
2266
|
+
|
|
2267
|
+
</div>
|
|
2268
|
+
|
|
2269
|
+
</div>
|
|
2270
|
+
|
|
2271
|
+
</div>
|
|
2272
|
+
|
|
2273
|
+
|
|
2274
|
+
|
|
2275
|
+
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
|
|
2280
|
+
|
|
2281
|
+
|
|
2282
|
+
|
|
2283
|
+
|
|
2284
|
+
|
|
2285
|
+
|
|
2286
|
+
|
|
2287
|
+
|
|
2288
|
+
|
|
2289
|
+
|
|
2290
|
+
|
|
2291
|
+
</section>
|
|
2292
|
+
|
|
2293
|
+
</div>
|
|
2294
|
+
</div>
|
|
2295
|
+
|
|
2296
|
+
<div class='border-bottom' id='toggledevmode'>
|
|
2297
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
2298
|
+
<div class="py1 contain">
|
|
2299
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
2300
|
+
<span class='code strong strong truncate'>toggleDevMode(devModeEnabled)</span>
|
|
2301
|
+
</div>
|
|
2302
|
+
</div>
|
|
2303
|
+
<div class="clearfix display-none toggle-target">
|
|
2304
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2305
|
+
|
|
2306
|
+
|
|
2307
|
+
|
|
2308
|
+
<p>Set or toggle devMode</p>
|
|
2309
|
+
|
|
2310
|
+
<div class='pre p1 fill-light mt0'>toggleDevMode(devModeEnabled: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>)): <a href="#terafy">TeraFy</a></div>
|
|
2311
|
+
|
|
2312
|
+
|
|
2313
|
+
|
|
2314
|
+
|
|
2315
|
+
|
|
2316
|
+
|
|
2317
|
+
|
|
2318
|
+
|
|
2319
|
+
|
|
2320
|
+
|
|
2321
|
+
|
|
2322
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
2323
|
+
<div class='prose'>
|
|
2324
|
+
|
|
2325
|
+
<div class='space-bottom0'>
|
|
2326
|
+
<div>
|
|
2327
|
+
<span class='code bold'>devModeEnabled</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>)
|
|
2328
|
+
= <code>'toggle'</code>)</code>
|
|
2329
|
+
Optional boolean to force dev mode
|
|
2330
|
+
|
|
2331
|
+
</div>
|
|
2332
|
+
|
|
2333
|
+
</div>
|
|
2334
|
+
|
|
2335
|
+
</div>
|
|
2336
|
+
|
|
2337
|
+
|
|
2338
|
+
|
|
2339
|
+
|
|
2340
|
+
|
|
2341
|
+
|
|
2342
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
2343
|
+
<code><a href="#terafy">TeraFy</a></code>:
|
|
2344
|
+
This chainable terafy instance
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
|
|
2348
|
+
|
|
2349
|
+
|
|
2350
|
+
|
|
2351
|
+
|
|
2352
|
+
|
|
2353
|
+
|
|
2354
|
+
|
|
2355
|
+
|
|
2356
|
+
|
|
2357
|
+
|
|
2358
|
+
|
|
2359
|
+
|
|
2360
|
+
|
|
2361
|
+
|
|
2362
|
+
|
|
2363
|
+
</section>
|
|
2364
|
+
|
|
2365
|
+
</div>
|
|
2366
|
+
</div>
|
|
2367
|
+
|
|
2368
|
+
<div class='border-bottom' id='togglefocus'>
|
|
2369
|
+
<div class="clearfix small pointer toggle-sibling">
|
|
2370
|
+
<div class="py1 contain">
|
|
2371
|
+
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
|
2372
|
+
<span class='code strong strong truncate'>toggleFocus(isFocused)</span>
|
|
2373
|
+
</div>
|
|
2374
|
+
</div>
|
|
2375
|
+
<div class="clearfix display-none toggle-target">
|
|
2376
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2377
|
+
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
<p>Fit the nested TERA server to a full-screen
|
|
2381
|
+
This is usually because the server component wants to perform some user activity like calling $prompt</p>
|
|
2382
|
+
|
|
2383
|
+
<div class='pre p1 fill-light mt0'>toggleFocus(isFocused: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>))</div>
|
|
2384
|
+
|
|
2385
|
+
|
|
2386
|
+
|
|
2387
|
+
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
|
|
2395
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
2396
|
+
<div class='prose'>
|
|
2397
|
+
|
|
2398
|
+
<div class='space-bottom0'>
|
|
2399
|
+
<div>
|
|
2400
|
+
<span class='code bold'>isFocused</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>)
|
|
2401
|
+
= <code>'toggle'</code>)</code>
|
|
2402
|
+
Whether to fullscreen the embedded component
|
|
2403
|
+
|
|
2404
|
+
</div>
|
|
2405
|
+
|
|
2406
|
+
</div>
|
|
2407
|
+
|
|
2408
|
+
</div>
|
|
2409
|
+
|
|
2410
|
+
|
|
2411
|
+
|
|
2412
|
+
|
|
2413
|
+
|
|
2414
|
+
|
|
2415
|
+
|
|
2416
|
+
|
|
2417
|
+
|
|
2418
|
+
|
|
2419
|
+
|
|
2420
|
+
|
|
2421
|
+
|
|
2422
|
+
|
|
2423
|
+
|
|
2424
|
+
|
|
2425
|
+
|
|
2426
|
+
|
|
2427
|
+
|
|
2428
|
+
</section>
|
|
2429
|
+
|
|
2430
|
+
</div>
|
|
2431
|
+
</div>
|
|
2432
|
+
|
|
2433
|
+
</div>
|
|
2434
|
+
|
|
2435
|
+
|
|
2436
|
+
|
|
2437
|
+
|
|
2438
|
+
|
|
2439
|
+
|
|
2440
|
+
</section>
|
|
2441
|
+
|
|
2442
|
+
|
|
2443
|
+
|
|
2444
|
+
|
|
2445
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2446
|
+
|
|
2447
|
+
|
|
2448
|
+
<div class='clearfix'>
|
|
2449
|
+
|
|
2450
|
+
<h3 class='fl m0' id='handshake'>
|
|
2451
|
+
handshake
|
|
2452
|
+
</h3>
|
|
2453
|
+
|
|
2454
|
+
|
|
2455
|
+
</div>
|
|
2456
|
+
|
|
2457
|
+
|
|
2458
|
+
<p>Return basic server information as a form of validation</p>
|
|
2459
|
+
|
|
2460
|
+
<div class='pre p1 fill-light mt0'>handshake(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>></div>
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
|
|
2464
|
+
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
|
|
2468
|
+
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
|
|
2472
|
+
|
|
2473
|
+
|
|
2474
|
+
<div class='py1 quiet mt1 prose-big'>Properties</div>
|
|
2475
|
+
<div>
|
|
2476
|
+
|
|
2477
|
+
<div class='space-bottom0'>
|
|
2478
|
+
<span class='code bold'>date</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date">Date</a>)</code>
|
|
2479
|
+
: Server date
|
|
2480
|
+
|
|
2481
|
+
|
|
2482
|
+
</div>
|
|
2483
|
+
|
|
2484
|
+
</div>
|
|
2485
|
+
|
|
2486
|
+
|
|
2487
|
+
|
|
2488
|
+
|
|
2489
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
2490
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>></code>:
|
|
2491
|
+
Basic promise result
|
|
2492
|
+
|
|
2493
|
+
|
|
2494
|
+
|
|
2495
|
+
|
|
2496
|
+
|
|
2497
|
+
|
|
2498
|
+
|
|
2499
|
+
|
|
2500
|
+
|
|
2501
|
+
|
|
2502
|
+
|
|
2503
|
+
|
|
2504
|
+
|
|
2505
|
+
|
|
2506
|
+
|
|
2507
|
+
|
|
2508
|
+
|
|
2509
|
+
|
|
2510
|
+
</section>
|
|
2511
|
+
|
|
2512
|
+
|
|
2513
|
+
|
|
2514
|
+
|
|
2515
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2516
|
+
|
|
2517
|
+
|
|
2518
|
+
<div class='clearfix'>
|
|
2519
|
+
|
|
2520
|
+
<h3 class='fl m0' id='getuser'>
|
|
2521
|
+
getUser
|
|
2522
|
+
</h3>
|
|
2523
|
+
|
|
2524
|
+
|
|
2525
|
+
</div>
|
|
2526
|
+
|
|
2527
|
+
|
|
2528
|
+
<p>Fetch the current session user</p>
|
|
2529
|
+
|
|
2530
|
+
<div class='pre p1 fill-light mt0'>getUser(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="#user">User</a>></div>
|
|
2531
|
+
|
|
2532
|
+
|
|
2533
|
+
|
|
2534
|
+
|
|
2535
|
+
|
|
2536
|
+
|
|
2537
|
+
|
|
2538
|
+
|
|
2539
|
+
|
|
2540
|
+
|
|
2541
|
+
|
|
2542
|
+
|
|
2543
|
+
|
|
2544
|
+
|
|
2545
|
+
|
|
2546
|
+
|
|
2547
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
2548
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="#user">User</a>></code>:
|
|
2549
|
+
The current logged in user or null if none
|
|
2550
|
+
|
|
2551
|
+
|
|
2552
|
+
|
|
2553
|
+
|
|
2554
|
+
|
|
2555
|
+
|
|
2556
|
+
|
|
2557
|
+
|
|
2558
|
+
|
|
2559
|
+
|
|
2560
|
+
|
|
2561
|
+
|
|
2562
|
+
|
|
2563
|
+
|
|
2564
|
+
|
|
2565
|
+
|
|
2566
|
+
|
|
2567
|
+
|
|
2568
|
+
</section>
|
|
2569
|
+
|
|
2570
|
+
|
|
2571
|
+
|
|
2572
|
+
|
|
2573
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2574
|
+
|
|
2575
|
+
|
|
2576
|
+
<div class='clearfix'>
|
|
2577
|
+
|
|
2578
|
+
<h3 class='fl m0' id='getproject'>
|
|
2579
|
+
getProject
|
|
2580
|
+
</h3>
|
|
2581
|
+
|
|
2582
|
+
|
|
2583
|
+
</div>
|
|
2584
|
+
|
|
2585
|
+
|
|
2586
|
+
<p>Get the currently active project, if any</p>
|
|
2587
|
+
|
|
2588
|
+
<div class='pre p1 fill-light mt0'>getProject(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><(<a href="#project">Project</a> | null)></div>
|
|
2589
|
+
|
|
2590
|
+
|
|
2591
|
+
|
|
2592
|
+
|
|
2593
|
+
|
|
2594
|
+
|
|
2595
|
+
|
|
2596
|
+
|
|
2597
|
+
|
|
2598
|
+
|
|
2599
|
+
|
|
2600
|
+
|
|
2601
|
+
|
|
2602
|
+
|
|
2603
|
+
|
|
2604
|
+
|
|
2605
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
2606
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><(<a href="#project">Project</a> | null)></code>:
|
|
2607
|
+
The currently active project, if any
|
|
2608
|
+
|
|
2609
|
+
|
|
2610
|
+
|
|
2611
|
+
|
|
2612
|
+
|
|
2613
|
+
|
|
2614
|
+
|
|
2615
|
+
|
|
2616
|
+
|
|
2617
|
+
|
|
2618
|
+
|
|
2619
|
+
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
|
|
2623
|
+
|
|
2624
|
+
|
|
2625
|
+
|
|
2626
|
+
</section>
|
|
2627
|
+
|
|
2628
|
+
|
|
2629
|
+
|
|
2630
|
+
|
|
2631
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2632
|
+
|
|
2633
|
+
|
|
2634
|
+
<div class='clearfix'>
|
|
2635
|
+
|
|
2636
|
+
<h3 class='fl m0' id='getprojects'>
|
|
2637
|
+
getProjects
|
|
2638
|
+
</h3>
|
|
2639
|
+
|
|
2640
|
+
|
|
2641
|
+
</div>
|
|
2642
|
+
|
|
2643
|
+
|
|
2644
|
+
<p>Get a list of projects the current session user has access to</p>
|
|
2645
|
+
|
|
2646
|
+
<div class='pre p1 fill-light mt0'>getProjects(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#project">Project</a>>></div>
|
|
2647
|
+
|
|
2648
|
+
|
|
2649
|
+
|
|
2650
|
+
|
|
2651
|
+
|
|
2652
|
+
|
|
2653
|
+
|
|
2654
|
+
|
|
2655
|
+
|
|
2656
|
+
|
|
2657
|
+
|
|
2658
|
+
|
|
2659
|
+
|
|
2660
|
+
|
|
2661
|
+
|
|
2662
|
+
|
|
2663
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
2664
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#project">Project</a>>></code>:
|
|
2665
|
+
Collection of projects the user has access to
|
|
2666
|
+
|
|
2667
|
+
|
|
2668
|
+
|
|
2669
|
+
|
|
2670
|
+
|
|
2671
|
+
|
|
2672
|
+
|
|
2673
|
+
|
|
2674
|
+
|
|
2675
|
+
|
|
2676
|
+
|
|
2677
|
+
|
|
2678
|
+
|
|
2679
|
+
|
|
2680
|
+
|
|
2681
|
+
|
|
2682
|
+
|
|
2683
|
+
|
|
2684
|
+
</section>
|
|
2685
|
+
|
|
2686
|
+
|
|
2687
|
+
|
|
2688
|
+
|
|
2689
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2690
|
+
|
|
2691
|
+
|
|
2692
|
+
<div class='clearfix'>
|
|
2693
|
+
|
|
2694
|
+
<h3 class='fl m0' id='setactiveproject'>
|
|
2695
|
+
setActiveProject
|
|
2696
|
+
</h3>
|
|
2697
|
+
|
|
2698
|
+
|
|
2699
|
+
</div>
|
|
2700
|
+
|
|
2701
|
+
|
|
2702
|
+
<p>Set the currently active project within TERA</p>
|
|
2703
|
+
|
|
2704
|
+
<div class='pre p1 fill-light mt0'>setActiveProject(project: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>))</div>
|
|
2705
|
+
|
|
2706
|
+
|
|
2707
|
+
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
|
|
2711
|
+
|
|
2712
|
+
|
|
2713
|
+
|
|
2714
|
+
|
|
2715
|
+
|
|
2716
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
2717
|
+
<div class='prose'>
|
|
2718
|
+
|
|
2719
|
+
<div class='space-bottom0'>
|
|
2720
|
+
<div>
|
|
2721
|
+
<span class='code bold'>project</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>))</code>
|
|
2722
|
+
The project to set as active - either the full Project object or its ID
|
|
2723
|
+
|
|
2724
|
+
</div>
|
|
2725
|
+
|
|
2726
|
+
</div>
|
|
2727
|
+
|
|
2728
|
+
</div>
|
|
2729
|
+
|
|
2730
|
+
|
|
2731
|
+
|
|
2732
|
+
|
|
2733
|
+
|
|
2734
|
+
|
|
2735
|
+
|
|
2736
|
+
|
|
2737
|
+
|
|
2738
|
+
|
|
2739
|
+
|
|
2740
|
+
|
|
2741
|
+
|
|
2742
|
+
|
|
2743
|
+
|
|
2744
|
+
|
|
2745
|
+
|
|
2746
|
+
|
|
2747
|
+
|
|
2748
|
+
</section>
|
|
2749
|
+
|
|
2750
|
+
|
|
2751
|
+
|
|
2752
|
+
|
|
2753
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2754
|
+
|
|
2755
|
+
|
|
2756
|
+
<div class='clearfix'>
|
|
2757
|
+
|
|
2758
|
+
<h3 class='fl m0' id='requireproject'>
|
|
2759
|
+
requireProject
|
|
2760
|
+
</h3>
|
|
2761
|
+
|
|
2762
|
+
|
|
2763
|
+
</div>
|
|
2764
|
+
|
|
2765
|
+
|
|
2766
|
+
<p>Ask the user to select a project from those available - if one isn't already active
|
|
2767
|
+
Note that this function will percist in asking the uesr even if they try to cancel</p>
|
|
2768
|
+
|
|
2769
|
+
<div class='pre p1 fill-light mt0'>requireProject(options: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="#project">Project</a>></div>
|
|
2770
|
+
|
|
2771
|
+
|
|
2772
|
+
|
|
2773
|
+
|
|
2774
|
+
|
|
2775
|
+
|
|
2776
|
+
|
|
2777
|
+
|
|
2778
|
+
|
|
2779
|
+
|
|
2780
|
+
|
|
2781
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
2782
|
+
<div class='prose'>
|
|
2783
|
+
|
|
2784
|
+
<div class='space-bottom0'>
|
|
2785
|
+
<div>
|
|
2786
|
+
<span class='code bold'>options</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?)</code>
|
|
2787
|
+
Additional options to mutate behaviour
|
|
2788
|
+
|
|
2789
|
+
</div>
|
|
2790
|
+
|
|
2791
|
+
<table class='mt1 mb2 fixed-table h5 col-12'>
|
|
2792
|
+
<colgroup>
|
|
2793
|
+
<col width='30%' />
|
|
2794
|
+
<col width='70%' />
|
|
2795
|
+
</colgroup>
|
|
2796
|
+
<thead>
|
|
2797
|
+
<tr class='bold fill-light'>
|
|
2798
|
+
<th>Name</th>
|
|
2799
|
+
<th>Description</th>
|
|
2800
|
+
</tr>
|
|
2801
|
+
</thead>
|
|
2802
|
+
<tbody class='mt1'>
|
|
2803
|
+
|
|
2804
|
+
<tr>
|
|
2805
|
+
<td class='break-word'><span class='code bold'>options.autoSetActiveProject</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code>
|
|
2806
|
+
|
|
2807
|
+
(default <code>true</code>)
|
|
2808
|
+
</td>
|
|
2809
|
+
<td class='break-word'><span>After selecting a project set that project as active in TERA
|
|
2810
|
+
</span></td>
|
|
2811
|
+
</tr>
|
|
2812
|
+
|
|
2813
|
+
|
|
2814
|
+
|
|
2815
|
+
<tr>
|
|
2816
|
+
<td class='break-word'><span class='code bold'>options.title</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>
|
|
2817
|
+
|
|
2818
|
+
(default <code>"Select a project to work with"</code>)
|
|
2819
|
+
</td>
|
|
2820
|
+
<td class='break-word'><span>The title of the dialog to display
|
|
2821
|
+
</span></td>
|
|
2822
|
+
</tr>
|
|
2823
|
+
|
|
2824
|
+
|
|
2825
|
+
|
|
2826
|
+
<tr>
|
|
2827
|
+
<td class='break-word'><span class='code bold'>options.noSelectTitle</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>
|
|
2828
|
+
|
|
2829
|
+
(default <code>'Select project'</code>)
|
|
2830
|
+
</td>
|
|
2831
|
+
<td class='break-word'><span>Dialog title when warning the user they need to select something
|
|
2832
|
+
</span></td>
|
|
2833
|
+
</tr>
|
|
2834
|
+
|
|
2835
|
+
|
|
2836
|
+
|
|
2837
|
+
<tr>
|
|
2838
|
+
<td class='break-word'><span class='code bold'>options.noSelectBody</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>
|
|
2839
|
+
|
|
2840
|
+
(default <code>'A project needs to be selected to continue'</code>)
|
|
2841
|
+
</td>
|
|
2842
|
+
<td class='break-word'><span>Dialog body when warning the user they need to select something
|
|
2843
|
+
</span></td>
|
|
2844
|
+
</tr>
|
|
2845
|
+
|
|
2846
|
+
|
|
2847
|
+
|
|
2848
|
+
</tbody>
|
|
2849
|
+
</table>
|
|
2850
|
+
|
|
2851
|
+
</div>
|
|
2852
|
+
|
|
2853
|
+
</div>
|
|
2854
|
+
|
|
2855
|
+
|
|
2856
|
+
|
|
2857
|
+
|
|
2858
|
+
|
|
2859
|
+
|
|
2860
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
2861
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="#project">Project</a>></code>:
|
|
2862
|
+
The active project
|
|
2863
|
+
|
|
2864
|
+
|
|
2865
|
+
|
|
2866
|
+
|
|
2867
|
+
|
|
2868
|
+
|
|
2869
|
+
|
|
2870
|
+
|
|
2871
|
+
|
|
2872
|
+
|
|
2873
|
+
|
|
2874
|
+
|
|
2875
|
+
|
|
2876
|
+
|
|
2877
|
+
|
|
2878
|
+
|
|
2879
|
+
|
|
2880
|
+
|
|
2881
|
+
</section>
|
|
2882
|
+
|
|
2883
|
+
|
|
2884
|
+
|
|
2885
|
+
|
|
2886
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
2887
|
+
|
|
2888
|
+
|
|
2889
|
+
<div class='clearfix'>
|
|
2890
|
+
|
|
2891
|
+
<h3 class='fl m0' id='selectproject'>
|
|
2892
|
+
selectProject
|
|
2893
|
+
</h3>
|
|
2894
|
+
|
|
2895
|
+
|
|
2896
|
+
</div>
|
|
2897
|
+
|
|
2898
|
+
|
|
2899
|
+
<p>Prompt the user to select a project from those available</p>
|
|
2900
|
+
|
|
2901
|
+
<div class='pre p1 fill-light mt0'>selectProject(options: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="#project">Project</a>></div>
|
|
2902
|
+
|
|
2903
|
+
|
|
2904
|
+
|
|
2905
|
+
|
|
2906
|
+
|
|
2907
|
+
|
|
2908
|
+
|
|
2909
|
+
|
|
2910
|
+
|
|
2911
|
+
|
|
2912
|
+
|
|
2913
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
2914
|
+
<div class='prose'>
|
|
2915
|
+
|
|
2916
|
+
<div class='space-bottom0'>
|
|
2917
|
+
<div>
|
|
2918
|
+
<span class='code bold'>options</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?)</code>
|
|
2919
|
+
Additional options to mutate behaviour
|
|
2920
|
+
|
|
2921
|
+
</div>
|
|
2922
|
+
|
|
2923
|
+
<table class='mt1 mb2 fixed-table h5 col-12'>
|
|
2924
|
+
<colgroup>
|
|
2925
|
+
<col width='30%' />
|
|
2926
|
+
<col width='70%' />
|
|
2927
|
+
</colgroup>
|
|
2928
|
+
<thead>
|
|
2929
|
+
<tr class='bold fill-light'>
|
|
2930
|
+
<th>Name</th>
|
|
2931
|
+
<th>Description</th>
|
|
2932
|
+
</tr>
|
|
2933
|
+
</thead>
|
|
2934
|
+
<tbody class='mt1'>
|
|
2935
|
+
|
|
2936
|
+
<tr>
|
|
2937
|
+
<td class='break-word'><span class='code bold'>options.title</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>
|
|
2938
|
+
|
|
2939
|
+
(default <code>"Select a project to work with"</code>)
|
|
2940
|
+
</td>
|
|
2941
|
+
<td class='break-word'><span>The title of the dialog to display
|
|
2942
|
+
</span></td>
|
|
2943
|
+
</tr>
|
|
2944
|
+
|
|
2945
|
+
|
|
2946
|
+
|
|
2947
|
+
<tr>
|
|
2948
|
+
<td class='break-word'><span class='code bold'>options.allowCancel</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code>
|
|
2949
|
+
|
|
2950
|
+
(default <code>true</code>)
|
|
2951
|
+
</td>
|
|
2952
|
+
<td class='break-word'><span>Advertise cancelling the operation, the dialog can still be cancelled by closing it
|
|
2953
|
+
</span></td>
|
|
2954
|
+
</tr>
|
|
2955
|
+
|
|
2956
|
+
|
|
2957
|
+
|
|
2958
|
+
<tr>
|
|
2959
|
+
<td class='break-word'><span class='code bold'>options.setActive</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code>
|
|
2960
|
+
|
|
2961
|
+
(default <code>false</code>)
|
|
2962
|
+
</td>
|
|
2963
|
+
<td class='break-word'><span>Also set the project as active when selected
|
|
2964
|
+
</span></td>
|
|
2965
|
+
</tr>
|
|
2966
|
+
|
|
2967
|
+
|
|
2968
|
+
|
|
2969
|
+
</tbody>
|
|
2970
|
+
</table>
|
|
2971
|
+
|
|
2972
|
+
</div>
|
|
2973
|
+
|
|
2974
|
+
</div>
|
|
2975
|
+
|
|
2976
|
+
|
|
2977
|
+
|
|
2978
|
+
|
|
2979
|
+
|
|
2980
|
+
|
|
2981
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
2982
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="#project">Project</a>></code>:
|
|
2983
|
+
The active project
|
|
2984
|
+
|
|
2985
|
+
|
|
2986
|
+
|
|
2987
|
+
|
|
2988
|
+
|
|
2989
|
+
|
|
2990
|
+
|
|
2991
|
+
|
|
2992
|
+
|
|
2993
|
+
|
|
2994
|
+
|
|
2995
|
+
|
|
2996
|
+
|
|
2997
|
+
|
|
2998
|
+
|
|
2999
|
+
|
|
3000
|
+
|
|
3001
|
+
|
|
3002
|
+
</section>
|
|
3003
|
+
|
|
3004
|
+
|
|
3005
|
+
|
|
3006
|
+
|
|
3007
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
3008
|
+
|
|
3009
|
+
|
|
3010
|
+
<div class='clearfix'>
|
|
3011
|
+
|
|
3012
|
+
<h3 class='fl m0' id='getprojectstate'>
|
|
3013
|
+
getProjectState
|
|
3014
|
+
</h3>
|
|
3015
|
+
|
|
3016
|
+
|
|
3017
|
+
</div>
|
|
3018
|
+
|
|
3019
|
+
|
|
3020
|
+
<p>Return the current, full snapshot state of the active project</p>
|
|
3021
|
+
|
|
3022
|
+
<div class='pre p1 fill-light mt0'>getProjectState(options: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?, Paths: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>></div>
|
|
3023
|
+
|
|
3024
|
+
|
|
3025
|
+
|
|
3026
|
+
|
|
3027
|
+
|
|
3028
|
+
|
|
3029
|
+
|
|
3030
|
+
|
|
3031
|
+
|
|
3032
|
+
|
|
3033
|
+
|
|
3034
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
3035
|
+
<div class='prose'>
|
|
3036
|
+
|
|
3037
|
+
<div class='space-bottom0'>
|
|
3038
|
+
<div>
|
|
3039
|
+
<span class='code bold'>options</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?)</code>
|
|
3040
|
+
Additional options to mutate behaviour
|
|
3041
|
+
|
|
3042
|
+
</div>
|
|
3043
|
+
|
|
3044
|
+
<table class='mt1 mb2 fixed-table h5 col-12'>
|
|
3045
|
+
<colgroup>
|
|
3046
|
+
<col width='30%' />
|
|
3047
|
+
<col width='70%' />
|
|
3048
|
+
</colgroup>
|
|
3049
|
+
<thead>
|
|
3050
|
+
<tr class='bold fill-light'>
|
|
3051
|
+
<th>Name</th>
|
|
3052
|
+
<th>Description</th>
|
|
3053
|
+
</tr>
|
|
3054
|
+
</thead>
|
|
3055
|
+
<tbody class='mt1'>
|
|
3056
|
+
|
|
3057
|
+
<tr>
|
|
3058
|
+
<td class='break-word'><span class='code bold'>options.autoRequire</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code>
|
|
3059
|
+
|
|
3060
|
+
(default <code>true</code>)
|
|
3061
|
+
</td>
|
|
3062
|
+
<td class='break-word'><span>Run
|
|
3063
|
+
<code>requireProject()</code>
|
|
3064
|
+
automatically before continuing
|
|
3065
|
+
</span></td>
|
|
3066
|
+
</tr>
|
|
3067
|
+
|
|
3068
|
+
|
|
3069
|
+
|
|
3070
|
+
</tbody>
|
|
3071
|
+
</table>
|
|
3072
|
+
|
|
3073
|
+
</div>
|
|
3074
|
+
|
|
3075
|
+
<div class='space-bottom0'>
|
|
3076
|
+
<div>
|
|
3077
|
+
<span class='code bold'>Paths</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>>)</code>
|
|
3078
|
+
to subscribe to e.g. ['/users/'],
|
|
3079
|
+
|
|
3080
|
+
</div>
|
|
3081
|
+
|
|
3082
|
+
</div>
|
|
3083
|
+
|
|
3084
|
+
</div>
|
|
3085
|
+
|
|
3086
|
+
|
|
3087
|
+
|
|
3088
|
+
|
|
3089
|
+
|
|
3090
|
+
|
|
3091
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
3092
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>></code>:
|
|
3093
|
+
The current project state snapshot
|
|
3094
|
+
|
|
3095
|
+
|
|
3096
|
+
|
|
3097
|
+
|
|
3098
|
+
|
|
3099
|
+
|
|
3100
|
+
|
|
3101
|
+
|
|
3102
|
+
|
|
3103
|
+
|
|
3104
|
+
|
|
3105
|
+
|
|
3106
|
+
|
|
3107
|
+
|
|
3108
|
+
|
|
3109
|
+
|
|
3110
|
+
|
|
3111
|
+
|
|
3112
|
+
</section>
|
|
3113
|
+
|
|
3114
|
+
|
|
3115
|
+
|
|
3116
|
+
|
|
3117
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
3118
|
+
|
|
3119
|
+
|
|
3120
|
+
<div class='clearfix'>
|
|
3121
|
+
|
|
3122
|
+
<h3 class='fl m0' id='applyprojectstatepatch'>
|
|
3123
|
+
applyProjectStatePatch
|
|
3124
|
+
</h3>
|
|
3125
|
+
|
|
3126
|
+
|
|
3127
|
+
</div>
|
|
3128
|
+
|
|
3129
|
+
|
|
3130
|
+
<p>Apply a computed <code>just-diff</code> patch to the current project state</p>
|
|
3131
|
+
|
|
3132
|
+
<div class='pre p1 fill-light mt0'>applyProjectStatePatch(Patch: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></div>
|
|
3133
|
+
|
|
3134
|
+
|
|
3135
|
+
|
|
3136
|
+
|
|
3137
|
+
|
|
3138
|
+
|
|
3139
|
+
|
|
3140
|
+
|
|
3141
|
+
|
|
3142
|
+
|
|
3143
|
+
|
|
3144
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
3145
|
+
<div class='prose'>
|
|
3146
|
+
|
|
3147
|
+
<div class='space-bottom0'>
|
|
3148
|
+
<div>
|
|
3149
|
+
<span class='code bold'>Patch</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code>
|
|
3150
|
+
to apply
|
|
3151
|
+
|
|
3152
|
+
</div>
|
|
3153
|
+
|
|
3154
|
+
</div>
|
|
3155
|
+
|
|
3156
|
+
</div>
|
|
3157
|
+
|
|
3158
|
+
|
|
3159
|
+
|
|
3160
|
+
|
|
3161
|
+
|
|
3162
|
+
|
|
3163
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
3164
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></code>:
|
|
3165
|
+
A promise which resolves when the operation has completed
|
|
3166
|
+
|
|
3167
|
+
|
|
3168
|
+
|
|
3169
|
+
|
|
3170
|
+
|
|
3171
|
+
|
|
3172
|
+
|
|
3173
|
+
|
|
3174
|
+
|
|
3175
|
+
|
|
3176
|
+
|
|
3177
|
+
|
|
3178
|
+
|
|
3179
|
+
|
|
3180
|
+
|
|
3181
|
+
|
|
3182
|
+
|
|
3183
|
+
|
|
3184
|
+
</section>
|
|
3185
|
+
|
|
3186
|
+
|
|
3187
|
+
|
|
3188
|
+
|
|
3189
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
3190
|
+
|
|
3191
|
+
|
|
3192
|
+
<div class='clearfix'>
|
|
3193
|
+
|
|
3194
|
+
<h3 class='fl m0' id='subscribeprojectstate'>
|
|
3195
|
+
subscribeProjectState
|
|
3196
|
+
</h3>
|
|
3197
|
+
|
|
3198
|
+
|
|
3199
|
+
</div>
|
|
3200
|
+
|
|
3201
|
+
|
|
3202
|
+
<p>Subscribe to project state changes
|
|
3203
|
+
This will dispatch an RPC call to the source object <code>applyProjectStatePatchLocal()</code> function with the patch
|
|
3204
|
+
If the above call fails the subscriber is assumed as dead and unsubscribed from the polling list</p>
|
|
3205
|
+
|
|
3206
|
+
<div class='pre p1 fill-light mt0'>subscribeProjectState(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a>></div>
|
|
3207
|
+
|
|
3208
|
+
|
|
3209
|
+
|
|
3210
|
+
|
|
3211
|
+
|
|
3212
|
+
|
|
3213
|
+
|
|
3214
|
+
|
|
3215
|
+
|
|
3216
|
+
|
|
3217
|
+
|
|
3218
|
+
|
|
3219
|
+
|
|
3220
|
+
|
|
3221
|
+
|
|
3222
|
+
|
|
3223
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
3224
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a>></code>:
|
|
3225
|
+
A promise which resolves when a subscription has been created, call the resulting function to unsubscribe
|
|
3226
|
+
|
|
3227
|
+
|
|
3228
|
+
|
|
3229
|
+
|
|
3230
|
+
|
|
3231
|
+
|
|
3232
|
+
|
|
3233
|
+
|
|
3234
|
+
|
|
3235
|
+
|
|
3236
|
+
|
|
3237
|
+
|
|
3238
|
+
|
|
3239
|
+
|
|
3240
|
+
|
|
3241
|
+
|
|
3242
|
+
|
|
3243
|
+
|
|
3244
|
+
</section>
|
|
3245
|
+
|
|
3246
|
+
|
|
3247
|
+
|
|
3248
|
+
|
|
3249
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
3250
|
+
|
|
3251
|
+
|
|
3252
|
+
<div class='clearfix'>
|
|
3253
|
+
|
|
3254
|
+
<h3 class='fl m0' id='getprojectfiles'>
|
|
3255
|
+
getProjectFiles
|
|
3256
|
+
</h3>
|
|
3257
|
+
|
|
3258
|
+
|
|
3259
|
+
</div>
|
|
3260
|
+
|
|
3261
|
+
|
|
3262
|
+
<p>Fetch the files associated with a given project</p>
|
|
3263
|
+
|
|
3264
|
+
<div class='pre p1 fill-light mt0'>getProjectFiles(options: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="#projectfile">ProjectFile</a>></div>
|
|
3265
|
+
|
|
3266
|
+
|
|
3267
|
+
|
|
3268
|
+
|
|
3269
|
+
|
|
3270
|
+
|
|
3271
|
+
|
|
3272
|
+
|
|
3273
|
+
|
|
3274
|
+
|
|
3275
|
+
|
|
3276
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
3277
|
+
<div class='prose'>
|
|
3278
|
+
|
|
3279
|
+
<div class='space-bottom0'>
|
|
3280
|
+
<div>
|
|
3281
|
+
<span class='code bold'>options</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code>
|
|
3282
|
+
Options which mutate behaviour
|
|
3283
|
+
|
|
3284
|
+
</div>
|
|
3285
|
+
|
|
3286
|
+
<table class='mt1 mb2 fixed-table h5 col-12'>
|
|
3287
|
+
<colgroup>
|
|
3288
|
+
<col width='30%' />
|
|
3289
|
+
<col width='70%' />
|
|
3290
|
+
</colgroup>
|
|
3291
|
+
<thead>
|
|
3292
|
+
<tr class='bold fill-light'>
|
|
3293
|
+
<th>Name</th>
|
|
3294
|
+
<th>Description</th>
|
|
3295
|
+
</tr>
|
|
3296
|
+
</thead>
|
|
3297
|
+
<tbody class='mt1'>
|
|
3298
|
+
|
|
3299
|
+
<tr>
|
|
3300
|
+
<td class='break-word'><span class='code bold'>options.autoRequire</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code>
|
|
3301
|
+
|
|
3302
|
+
(default <code>true</code>)
|
|
3303
|
+
</td>
|
|
3304
|
+
<td class='break-word'><span>Run
|
|
3305
|
+
<code>requireProject()</code>
|
|
3306
|
+
automatically before continuing
|
|
3307
|
+
</span></td>
|
|
3308
|
+
</tr>
|
|
3309
|
+
|
|
3310
|
+
|
|
3311
|
+
|
|
3312
|
+
<tr>
|
|
3313
|
+
<td class='break-word'><span class='code bold'>options.meta</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code>
|
|
3314
|
+
|
|
3315
|
+
(default <code>true</code>)
|
|
3316
|
+
</td>
|
|
3317
|
+
<td class='break-word'><span>Pull meta information for each file entity
|
|
3318
|
+
</span></td>
|
|
3319
|
+
</tr>
|
|
3320
|
+
|
|
3321
|
+
|
|
3322
|
+
|
|
3323
|
+
</tbody>
|
|
3324
|
+
</table>
|
|
3325
|
+
|
|
3326
|
+
</div>
|
|
3327
|
+
|
|
3328
|
+
</div>
|
|
3329
|
+
|
|
3330
|
+
|
|
3331
|
+
|
|
3332
|
+
|
|
3333
|
+
|
|
3334
|
+
|
|
3335
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
3336
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="#projectfile">ProjectFile</a>></code>:
|
|
3337
|
+
A collection of project files for the given project
|
|
3338
|
+
|
|
3339
|
+
|
|
3340
|
+
|
|
3341
|
+
|
|
3342
|
+
|
|
3343
|
+
|
|
3344
|
+
|
|
3345
|
+
|
|
3346
|
+
|
|
3347
|
+
|
|
3348
|
+
|
|
3349
|
+
|
|
3350
|
+
|
|
3351
|
+
|
|
3352
|
+
|
|
3353
|
+
|
|
3354
|
+
|
|
3355
|
+
|
|
3356
|
+
</section>
|
|
3357
|
+
|
|
3358
|
+
|
|
3359
|
+
|
|
3360
|
+
|
|
3361
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
3362
|
+
|
|
3363
|
+
|
|
3364
|
+
<div class='clearfix'>
|
|
3365
|
+
|
|
3366
|
+
<h3 class='fl m0' id='getprojectlibrary'>
|
|
3367
|
+
getProjectLibrary
|
|
3368
|
+
</h3>
|
|
3369
|
+
|
|
3370
|
+
|
|
3371
|
+
</div>
|
|
3372
|
+
|
|
3373
|
+
|
|
3374
|
+
<p>Fetch the active projects citation library</p>
|
|
3375
|
+
|
|
3376
|
+
<div class='pre p1 fill-light mt0'>getProjectLibrary(path: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>?, options: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#projectfile">ProjectFile</a>>></div>
|
|
3377
|
+
|
|
3378
|
+
|
|
3379
|
+
|
|
3380
|
+
|
|
3381
|
+
|
|
3382
|
+
|
|
3383
|
+
|
|
3384
|
+
|
|
3385
|
+
|
|
3386
|
+
|
|
3387
|
+
|
|
3388
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
3389
|
+
<div class='prose'>
|
|
3390
|
+
|
|
3391
|
+
<div class='space-bottom0'>
|
|
3392
|
+
<div>
|
|
3393
|
+
<span class='code bold'>path</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>?)</code>
|
|
3394
|
+
Optional file path to use, if omitted the contents of
|
|
3395
|
+
<code>options</code>
|
|
3396
|
+
are used to guess at a suitable file
|
|
3397
|
+
|
|
3398
|
+
</div>
|
|
3399
|
+
|
|
3400
|
+
</div>
|
|
3401
|
+
|
|
3402
|
+
<div class='space-bottom0'>
|
|
3403
|
+
<div>
|
|
3404
|
+
<span class='code bold'>options</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?)</code>
|
|
3405
|
+
Additional options to mutate behaviour
|
|
3406
|
+
|
|
3407
|
+
</div>
|
|
3408
|
+
|
|
3409
|
+
<table class='mt1 mb2 fixed-table h5 col-12'>
|
|
3410
|
+
<colgroup>
|
|
3411
|
+
<col width='30%' />
|
|
3412
|
+
<col width='70%' />
|
|
3413
|
+
</colgroup>
|
|
3414
|
+
<thead>
|
|
3415
|
+
<tr class='bold fill-light'>
|
|
3416
|
+
<th>Name</th>
|
|
3417
|
+
<th>Description</th>
|
|
3418
|
+
</tr>
|
|
3419
|
+
</thead>
|
|
3420
|
+
<tbody class='mt1'>
|
|
3421
|
+
|
|
3422
|
+
<tr>
|
|
3423
|
+
<td class='break-word'><span class='code bold'>options.autoRequire</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code>
|
|
3424
|
+
|
|
3425
|
+
(default <code>true</code>)
|
|
3426
|
+
</td>
|
|
3427
|
+
<td class='break-word'><span>Run
|
|
3428
|
+
<code>requireProject()</code>
|
|
3429
|
+
automatically before continuing
|
|
3430
|
+
</span></td>
|
|
3431
|
+
</tr>
|
|
3432
|
+
|
|
3433
|
+
|
|
3434
|
+
|
|
3435
|
+
<tr>
|
|
3436
|
+
<td class='break-word'><span class='code bold'>options.multiple</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code>
|
|
3437
|
+
|
|
3438
|
+
(default <code>false</code>)
|
|
3439
|
+
</td>
|
|
3440
|
+
<td class='break-word'><span>Allow selection of multiple libraries
|
|
3441
|
+
</span></td>
|
|
3442
|
+
</tr>
|
|
3443
|
+
|
|
3444
|
+
|
|
3445
|
+
|
|
3446
|
+
<tr>
|
|
3447
|
+
<td class='break-word'><span class='code bold'>options.filter</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a>?</code>
|
|
3448
|
+
</td>
|
|
3449
|
+
<td class='break-word'><span>Optional async file filter, called each time as
|
|
3450
|
+
<code>(File:ProjectFile)</code>
|
|
3451
|
+
</span></td>
|
|
3452
|
+
</tr>
|
|
3453
|
+
|
|
3454
|
+
|
|
3455
|
+
|
|
3456
|
+
<tr>
|
|
3457
|
+
<td class='break-word'><span class='code bold'>options.find</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a>?</code>
|
|
3458
|
+
</td>
|
|
3459
|
+
<td class='break-word'><span>Optional async final stage file filter to reduce all candidates down to one subject file
|
|
3460
|
+
</span></td>
|
|
3461
|
+
</tr>
|
|
3462
|
+
|
|
3463
|
+
|
|
3464
|
+
|
|
3465
|
+
<tr>
|
|
3466
|
+
<td class='break-word'><span class='code bold'>options.hint</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>>)?</code>
|
|
3467
|
+
</td>
|
|
3468
|
+
<td class='break-word'><span>Hints to identify the library to select in array order of preference. Generally corresponds to the previous stage - e.g. 'deduped', 'review1', 'review2', 'dedisputed'
|
|
3469
|
+
</span></td>
|
|
3470
|
+
</tr>
|
|
3471
|
+
|
|
3472
|
+
|
|
3473
|
+
|
|
3474
|
+
</tbody>
|
|
3475
|
+
</table>
|
|
3476
|
+
|
|
3477
|
+
</div>
|
|
3478
|
+
|
|
3479
|
+
</div>
|
|
3480
|
+
|
|
3481
|
+
|
|
3482
|
+
|
|
3483
|
+
|
|
3484
|
+
|
|
3485
|
+
|
|
3486
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
3487
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#projectfile">ProjectFile</a>>></code>:
|
|
3488
|
+
Collection of references for the selected library matching the given hint + filter, this could be a zero length array
|
|
3489
|
+
|
|
3490
|
+
|
|
3491
|
+
|
|
3492
|
+
|
|
3493
|
+
|
|
3494
|
+
|
|
3495
|
+
|
|
3496
|
+
|
|
3497
|
+
|
|
3498
|
+
|
|
3499
|
+
|
|
3500
|
+
|
|
3501
|
+
|
|
3502
|
+
|
|
3503
|
+
|
|
3504
|
+
|
|
3505
|
+
|
|
3506
|
+
|
|
3507
|
+
</section>
|
|
3508
|
+
|
|
3509
|
+
|
|
3510
|
+
|
|
3511
|
+
|
|
3512
|
+
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
3513
|
+
|
|
3514
|
+
|
|
3515
|
+
<div class='clearfix'>
|
|
3516
|
+
|
|
3517
|
+
<h3 class='fl m0' id='setprojectlibrary'>
|
|
3518
|
+
setProjectLibrary
|
|
3519
|
+
</h3>
|
|
3520
|
+
|
|
3521
|
+
|
|
3522
|
+
</div>
|
|
3523
|
+
|
|
3524
|
+
|
|
3525
|
+
<p>Save back a projects citation library</p>
|
|
3526
|
+
|
|
3527
|
+
<div class='pre p1 fill-light mt0'>setProjectLibrary(Collection: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><RefLibRef>, options: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></div>
|
|
3528
|
+
|
|
3529
|
+
|
|
3530
|
+
|
|
3531
|
+
|
|
3532
|
+
|
|
3533
|
+
|
|
3534
|
+
|
|
3535
|
+
|
|
3536
|
+
|
|
3537
|
+
|
|
3538
|
+
|
|
3539
|
+
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
3540
|
+
<div class='prose'>
|
|
3541
|
+
|
|
3542
|
+
<div class='space-bottom0'>
|
|
3543
|
+
<div>
|
|
3544
|
+
<span class='code bold'>Collection</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><RefLibRef>)</code>
|
|
3545
|
+
of references for the selected library
|
|
3546
|
+
|
|
3547
|
+
</div>
|
|
3548
|
+
|
|
3549
|
+
</div>
|
|
3550
|
+
|
|
3551
|
+
<div class='space-bottom0'>
|
|
3552
|
+
<div>
|
|
3553
|
+
<span class='code bold'>options</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?)</code>
|
|
3554
|
+
Additional options to mutate behaviour
|
|
3555
|
+
|
|
3556
|
+
</div>
|
|
3557
|
+
|
|
3558
|
+
<table class='mt1 mb2 fixed-table h5 col-12'>
|
|
3559
|
+
<colgroup>
|
|
3560
|
+
<col width='30%' />
|
|
3561
|
+
<col width='70%' />
|
|
3562
|
+
</colgroup>
|
|
3563
|
+
<thead>
|
|
3564
|
+
<tr class='bold fill-light'>
|
|
3565
|
+
<th>Name</th>
|
|
3566
|
+
<th>Description</th>
|
|
3567
|
+
</tr>
|
|
3568
|
+
</thead>
|
|
3569
|
+
<tbody class='mt1'>
|
|
3570
|
+
|
|
3571
|
+
<tr>
|
|
3572
|
+
<td class='break-word'><span class='code bold'>options.autoRequire</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code>
|
|
3573
|
+
|
|
3574
|
+
(default <code>true</code>)
|
|
3575
|
+
</td>
|
|
3576
|
+
<td class='break-word'><span>Run
|
|
3577
|
+
<code>requireProject()</code>
|
|
3578
|
+
automatically before continuing
|
|
3579
|
+
</span></td>
|
|
3580
|
+
</tr>
|
|
3581
|
+
|
|
3582
|
+
|
|
3583
|
+
|
|
3584
|
+
<tr>
|
|
3585
|
+
<td class='break-word'><span class='code bold'>options.hint</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>?</code>
|
|
3586
|
+
</td>
|
|
3587
|
+
<td class='break-word'><span>Hint to store against the library. Generally corresponds to the current operation being performed - e.g. 'deduped'
|
|
3588
|
+
</span></td>
|
|
3589
|
+
</tr>
|
|
3590
|
+
|
|
3591
|
+
|
|
3592
|
+
|
|
3593
|
+
</tbody>
|
|
3594
|
+
</table>
|
|
3595
|
+
|
|
3596
|
+
</div>
|
|
3597
|
+
|
|
3598
|
+
</div>
|
|
3599
|
+
|
|
3600
|
+
|
|
3601
|
+
|
|
3602
|
+
|
|
3603
|
+
|
|
3604
|
+
|
|
3605
|
+
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
3606
|
+
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></code>:
|
|
3607
|
+
A promise which resolves when the save operation has completed
|
|
3608
|
+
|
|
3609
|
+
|
|
3610
|
+
|
|
3611
|
+
|
|
3612
|
+
|
|
3613
|
+
|
|
3614
|
+
|
|
3615
|
+
|
|
3616
|
+
|
|
3617
|
+
|
|
3618
|
+
|
|
3619
|
+
|
|
3620
|
+
|
|
3621
|
+
|
|
3622
|
+
|
|
3623
|
+
|
|
3624
|
+
|
|
3625
|
+
|
|
3626
|
+
</section>
|
|
3627
|
+
|
|
3628
|
+
|
|
3629
|
+
|
|
3630
|
+
</div>
|
|
3631
|
+
</div>
|
|
3632
|
+
<script src='assets/anchor.js'></script>
|
|
3633
|
+
<script src='assets/split.js'></script>
|
|
3634
|
+
<script src='assets/site.js'></script>
|
|
3635
|
+
</body>
|
|
3636
|
+
</html>
|