GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — asta4js/src/formatDesc.json at master · astamuse/asta4js

Expand file tree

/

formatDesc.json

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
455 lines (429 loc) · 10.6 KB
/

formatDesc.json

Copy path

File metadata and controls

455 lines (429 loc) · 10.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
//observer meta
{
a : function(newValue, oldValue){},
b : [
function(newValue, oldValue){},
...
], //can be array
c : [
function(newValue, oldValue){},
{
c_1 : function(newValue, oldValue)
}
],
d : {
_value : function(newArray, oldArray){}, //array assign(common path observer)
_item : {
_value : function(newItem, oldItem){}, //for array item assigned(by index),
_splice: function(splices){}, //for splice
d_1 : function(newValue, oldValue){}
}
}
} ==> {
a : {
_value : [function(newValue, oldValue){}]
}
b : {
_value : [
function(newValue, oldValue){},
...
]
}, //can be array
c : {
_value : [function(newValue, oldValue){}],
c_1 : {
_value : [function(newValue, oldValue){}]
}
},
d : {
_value : [function(newArray, oldArray){}], //array assign(common path observer)
_item : {
_value : [function(newItem, oldItem){}], //array item assigned(by index),
_splice: [function(splices){}], //for splice
d_1 : {
_value : [function(newValue, oldValue){}]
}
}
} ==> {
_meta_type : "_root",
_meta_id : "", //generated or specified
_value : [], //must be array
_prop : { //must be normal object
_meta_type : "_prop",
a : {
_meta_type : "_root",
_meta_id : "", //specified or extended from parent
_value : [
{
_meta_type : "_value",
_target_path: "a",
_on_change: function(newValue, oldValue){},
_register_on_change: function(){}, //default built-in, can be overridden
_post_register: undefined //can be specified
}
]
}
b : {
_meta_type : "_root",
_value : [
{
_meta_type: "_value",
_on_change: function(newValue, oldValue){},
_register_on_change: function(){},
_post_register: undefined
}
...
]
}, //can be array
c : {
_meta_type : "_root",
_value : [
{
_meta_type: "_value",
_on_change: function(newValue, oldValue){},
_register_on_change: function(){},
_post_register: undefined
}
...
],
_prop : {
_meta_type : "_prop",
c_1 : {
_meta_type : "_root",
_value : [
{
_meta_type: "_value",
_on_change: function(newValue, oldValue){},
_register_on_change: function(){},
_post_register: undefined
}
]
}
}
},
d : {
_meta_type : "_root",
_value : [
{
_meta_type: "_value",
_on_change: function(newArray, oldArray){},
_register_on_change: function(){},
_post_register: undefined
},
//_item can be treated as single binding in _value array or
//be treated as a part of existing _value binding
{
_meta_type: "_value",
_item : {
_meta_type: "_root",
_target_path: "d[?]", // ? will be replaced by real index at runtime
_value : [
{
_meta_type: "_value",
_on_change: function(newItem, oldItem){},
_register_on_change: function(){},
_post_register: undefined
}
],
_splice : [
{
_meta_type: "_splice",
_on_change: function(splices){},
_register_on_change: function(){},
_post_register: undefined
}
],
_prop:{
d_1 : {
meta_type : "_root",
_value : [
{
_meta_type: "_value",
_on_change: function(newArray, oldArray){},
_register_on_change: function(){},
_post_register: undefined
}
],
_prop:{
_meta_type: "_prop",
}
}
}
}
}
], //array assign(common path observer)
_prop: {
_meta_type: "_prop",
}
}
}
}
//basic binding
"#x-xxx" ==> {
_selector: "#x-xxx",
_render: function(){},
_assign: function(){},
_register_render: function(){},
_register_assign: function(){},
a : "",
b : ""
} ==> {
_meta_type : "_root",
_meta_id : "", //optional
_value: {
_meta_type: "_value"
_selector: "",
_render: function(){},
_assign: function(){},
_register_render: function(){},
_register_assign: function(){}
},
_prop: {
_meta_type : "_prop"
a : {
_meta_type : "_root"
...
},
b : {
_meta_type : "_root"
...
},
}
}
//recursive fields binding
{
propa:{
_selector: ""
},
propb:{
_value: {
_selector: ""
}
subofb:{
_selector:""
}
}
} ==> {
_meta_type: "_root",
_prop:{
_meta_type: "_prop"
propa:{
_value :{
_selector: ""
}
},
propb:{
_meta_type: "_root"
_value: {
_meta_type: "_value"
_selector: ""
},
_prop:{
subofb:{
_meta_type: "_root"
_value:{
_selector:""
}
}
}//_prop
}// propb
}// _prop
}
//array binding
{
_duplicator: ""
_item:{
_selector : "",
_index: ""
a: {},
b: {}
},
length : ""
} ==> {
_meta_type: "_root"
_value:{ // the array itself
_meta_type: "_value"
_duplicator: ""
_item : { // the element of the array
_meta_type: "_root",
// if stored, the index change can be watched, but this would be supported later, not now
_store_index: false,
_value:{
_meta_type: "_value",
_target_path: "xxx[?]", // ? will be replaced by real index at runtime
_selector : ""
},
_prop: {
_meta_type: "_prop",
// NOTE: the index can be rendered even not stored, maybe we need to clarify it more.
_index: {},
a: {},
b: {}
}
},
},
_prop : {
_meta_type : "_prop"
length : ""
}
}
//attr operations(1-way only),@> to suggest an operation of attribution
border: "#target-table@>[border=]", //assign value to the target attribution
width: "#target-table@>[style:width=]", //assign value to the target style property
color: "#target-table@>[class:(blue|red)?]", // switch the class in declared list by given value(must contained in the list)
height: "#target-table@>[class:height40?]", // add/remove target class by given value(treated as boolean)
checked: "#check-box@>[checked?]" // add/remove target attribution by given value(treated as boolean)
"#target-table@>[border=]" ==> {
_selector: "#target-table",
_attr_op: "[border=]"
} => {
_selector: "#target-table",
_render: function(){...}, //default implementaion
_assign: function(){}, //should be empty
_register_render: function(){...}, //default implementation
_register_assign: function(){}, //should be empty
}
// form element 2w binding
{
name: {
_form: {} // name can be ignored , the leaf property name will be treated as name of form element
}
} ==>
{
name: {
_form: "name",
_single_check: true/false //optional for single checkbox/radio without option list. default false.
}
} ==> {
name: {
_form:{
_name: "name",
_default_change_event: "blur", //set to null to disable default change event
_extra_change_events: ["keyup"] //optional, default is undefined
_option: undefined // for building option list
}
}
} == > {
_selector: "[name=name]",
_render: function(){},
_assign: function(){},
_register_render: function(){},
_register_assign: function(){},
}
//form option bind
_option: Aj.optionBind($scope.dataOption,"bloodTypes") ==>
{
bloodTypes: {}
} ==> {
bloodTypes: {
_duplicator: "", // if necessary
_value: function(v){return v;},
_text: function(v){return v}
}
} ==> {
bloodTypes: {
_item: {
_value: function(v){return v;},
_text: function(v){return v}
}
}
} ==> { // in this step, it will be treated as normal array binding
bloodTypes: {
_duplicator: "",
_item: {
_selector: "",
_render: function(){ (_value, _text) }, // _value, _text will be used as default rendering
_assign: function(){}, //should do nothing
_register_render: function(){},
_register_assign: function(){}, //should do nothing
}
}
}
//select optgroup support(we will support it in furture)
_option: Aj.optionBind($scope.dataOption,{
bloodTypes: {
groupName: {
_group_label: {}
},
list:{
_sub_option: {},
}
}
}) ==> {
bloodTypes: {
groupName: {
_group_label: {
_label: function(v){return v;}
}
},
list: {
_sub_option:{
_value: function(v){return v;},
_text: function(v){return v}
}
}
}
} ==> { // in this step, it will be treated as normal array binding
bloodTypes: {
_duplicator: "optgroup",
_item: {
groupName:{
_selector: "optgroup@>[label=]",
_render: function(){}, // default attr op render
_assign: function(){}, //should do nothing
_register_render: function(){}, //
_register_assign: function(){}, //should do nothing,
},
list: {
_duplicator: "option"
_item: {
_selector: "option",
_render: function(){ (_value, _text) }, // _value, _text will be used as default rendering
_assign: function(){}, //should do nothing
_register_render: function(){},
_register_assign: function(){}, //should do nothing,
}
}
}
}
}
//watch same/lower layer field
{
_selector: "",
_watch: {
_fields: ["a", "b"],
//optional, default is false, the calculated value will be stored implicitly rather
//than being exposed as a property; true will add a property to the holder object.
_store: true/false,
//optional, can be ignored, default will pass the new array value
//as calculated value
_cal: function(a, b){
return a+b;
}
}
} ==> {
_selector: "#x-xxx",
_render: function(){
//default by selector
},
_assign: function(){
//assign to current object or internal map
},
_register_render: function(){
//observer what?
},
_register_assign: function(){
//observer _watch._fields
//get value by _watch._cal
},
}
//watch full path from scope
{
_selector: "",
_watch: {
_fields: ["@:data.a", "@:data.b"],
_cal: function(a, b){
return a + b;
}
}
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.