json-object-editor 0.10.434 → 0.10.436

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/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
1
  ## CHANGELOG
2
2
 
3
3
  ### 0.10.400
4
+ 436 - tags listRender
5
+ 435 - and add user-select property to capp-menu-label
4
6
  433 - dynamic sites update
5
7
  432 - minimal updates
6
8
  431 - reloadable, plugin-utils, ai chat beta
package/capp/capp.css CHANGED
@@ -381,6 +381,7 @@ capp-menu-label{
381
381
  height: 50px;
382
382
  min-width: 50px;
383
383
  text-align: center;
384
+ user-select: none;
384
385
  }
385
386
 
386
387
  capp-header > capp-menu > capp-menu-label {
@@ -344,6 +344,8 @@ html.no-touch .joe-button.joe-orangegrey-button:hover{background-color:#ff8804 !
344
344
  .joe-blue-button, .joe-preview-button{background-color:#336699; color:#ddd;}
345
345
  html.no-touch .joe-button.joe-blue-button:hover,html.no-touch .joe-button.joe-preview-button:hover{background-color:#447799;color: #fff;}
346
346
 
347
+ .joe-ai-button{background-color:#88aaff; color:#ddd;}
348
+
347
349
  .joe-red-button{background-color:#Bb6655;}
348
350
  html.no-touch .joe-button.joe-red-button:hover{background-color:#ff7755;color: #fff;}
349
351
 
@@ -479,6 +481,12 @@ joe-button > svg {
479
481
  box-shadow: 0px 1px 3px 0px rgba(0,0,0,.4);
480
482
  border-radius: 4px;
481
483
  }
484
+
485
+ joe-button-wrapper.bottom joe-button.joe-button {
486
+ border-radius: 0;
487
+ margin: 10px -10px -10px -10px;
488
+ box-shadow:none;
489
+ }
482
490
  /*.joe-sidebar_right-button{background-image: url("../img/btns/sidebar-right.png"); }
483
491
  .joe-sidebar_left-button{background-image: url("../img/btns/sidebar-left.png"); }*/
484
492
  /* ------------------------- END JOE-BUTTON ---------------------*/
@@ -3476,6 +3484,19 @@ th.joe-objectlist-object-row-template-header {
3476
3484
  display: inline-block;
3477
3485
  position: relative;
3478
3486
  }
3487
+ joe-tags{
3488
+ display:block;
3489
+ position:relative;
3490
+ font-size:12px;
3491
+ /* padding:3px; */
3492
+ }
3493
+ joe-tag{
3494
+ display: inline-block;
3495
+ padding:2px 4px;
3496
+ background: #eee;
3497
+ color:#202020;
3498
+ margin:3px;
3499
+ }
3479
3500
 
3480
3501
  /*-------------------------
3481
3502
  V: Preview
package/css/joe.css CHANGED
@@ -830,6 +830,8 @@ html.no-touch .joe-button.joe-orangegrey-button:hover{background-color:#ff8804 !
830
830
  .joe-blue-button, .joe-preview-button{background-color:#336699; color:#ddd;}
831
831
  html.no-touch .joe-button.joe-blue-button:hover,html.no-touch .joe-button.joe-preview-button:hover{background-color:#447799;color: #fff;}
832
832
 
833
+ .joe-ai-button{background-color:#88aaff; color:#ddd;}
834
+
833
835
  .joe-red-button{background-color:#Bb6655;}
834
836
  html.no-touch .joe-button.joe-red-button:hover{background-color:#ff7755;color: #fff;}
835
837
 
@@ -965,6 +967,12 @@ joe-button > svg {
965
967
  box-shadow: 0px 1px 3px 0px rgba(0,0,0,.4);
966
968
  border-radius: 4px;
967
969
  }
970
+
971
+ joe-button-wrapper.bottom joe-button.joe-button {
972
+ border-radius: 0;
973
+ margin: 10px -10px -10px -10px;
974
+ box-shadow:none;
975
+ }
968
976
  /*.joe-sidebar_right-button{background-image: url("../img/btns/sidebar-right.png"); }
969
977
  .joe-sidebar_left-button{background-image: url("../img/btns/sidebar-left.png"); }*/
970
978
  /* ------------------------- END JOE-BUTTON ---------------------*/
@@ -3962,6 +3970,19 @@ th.joe-objectlist-object-row-template-header {
3962
3970
  display: inline-block;
3963
3971
  position: relative;
3964
3972
  }
3973
+ joe-tags{
3974
+ display:block;
3975
+ position:relative;
3976
+ font-size:12px;
3977
+ /* padding:3px; */
3978
+ }
3979
+ joe-tag{
3980
+ display: inline-block;
3981
+ padding:2px 4px;
3982
+ background: #eee;
3983
+ color:#202020;
3984
+ margin:3px;
3985
+ }
3965
3986
 
3966
3987
  /*-------------------------
3967
3988
  V: Preview
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-object-editor",
3
- "version": "0.10.434",
3
+ "version": "0.10.436",
4
4
  "description": "JOE the Json Object Editor | Platform Edition",
5
5
  "main": "app.js",
6
6
  "scripts": {
@@ -6,11 +6,14 @@ var tag ={
6
6
  default_schema:true,
7
7
  fields:[
8
8
  'name',
9
- {name:'tag_id',display:'Tag ID',comment:'a memorable ID for this parent tag'},
10
- {name:'parent_tag',type:'select',values:'tag',idprop:'_id',blank:true},
11
9
  'info',
10
+ {name:'parent_tag',display:"Parent Tag", comment:'used for organizing tags',type:'select',values:'tag',idprop:'_id',blank:true, width:'50%'},
11
+ {name:'tag_id',display:'Tag ID',comment:'a memorable ID for this parent tag', width:'50%'},
12
+
13
+
12
14
  'datasets',
13
- {section_start:'usage',collapsed:true},
15
+ {sidebar_start:'right'},
16
+ {section_start:'usage',collapsed:false},
14
17
  {name:'usages',label:false,type:'content',
15
18
  run:function(item){
16
19
  var usages = _joe.search({tags:{$in:[item._id]}})
@@ -33,6 +36,7 @@ var tag ={
33
36
  return html;
34
37
  }},
35
38
  {section_end:'usage'},
39
+ {sidebar_end:'right'},
36
40
  '_id','created','itemtype'
37
41
  ],
38
42
  idprop: '_id',
@@ -50,7 +54,15 @@ var tag ={
50
54
  (new Set(schemas)).map(function(schema){
51
55
  subs.push({name:schema,filter:{datasets:{$in:[schema]}}})
52
56
  });
53
- return subs.sortBy('name');
57
+
58
+ subs = subs.sortBy('name');
59
+
60
+ // subs = subs.concat(_joe.Filter.Options.getDatasetPropertyValues('tag','parent_tag',{
61
+ // group:'by parent tag',
62
+ // display:'${name}',
63
+ // }));
64
+ return subs;
65
+
54
66
  },
55
67
  menuicon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="-200 -200 900 900"><rect x="101.7" y="183.8" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 264.6132 638.825)" width="325.9" height="161.6" class="a"/><path d="M491.2 310.4L309.1 128.3l-41.9-42 -50.8-50.8L7.4 0.2c-9.4-1.6-7.2 7.2-7.2 7.2l35.3 209 50.8 50.8 42 42 182.1 182.1c11.7 11.7 30.8 11.7 42.4 0L491.3 352.8C502.9 341.2 502.9 322.1 491.2 310.4zM53.7 73.2c-10.7 0-19.5-8.7-19.5-19.5C34.2 42.9 43 34.2 53.7 34.2 64.5 34.2 73.2 42.9 73.2 53.7 73.2 64.5 64.5 73.2 53.7 73.2zM322.7 456.9L72.4 206.5 206.5 72.4l250.3 250.3L322.7 456.9z" /></svg>',
56
68
  listView:{
@@ -62,6 +74,31 @@ var tag ={
62
74
  //+(datasets||'');
63
75
  },
64
76
  listWindowTitle: 'Tags'
77
+ },
78
+ methods:{
79
+ renderTags:function(tags,specs){
80
+ var html = ''
81
+ var specs = specs || {};
82
+ if (typeof specs == 'string'){
83
+ specs = {cssclass:specs};
84
+ }
85
+ //list the tags of an object, if array, use array if object, use the tags property
86
+ //if no tags, return empty string
87
+ var tags = tags.tags || tags;
88
+ if(!tags || tags.length == 0){
89
+ return '';
90
+ }
91
+ html += `<joe-tags class="${specs.cssclass||''}">`;
92
+ tags.map(function(tag){
93
+ let tagObj = $J.get(tag);
94
+ if(tagObj){
95
+ html+= `<joe-tag data-id="${tagObj._id}" title="${tagObj.info}" style="${tagObj.color && (`background:'${tagObj.color}'`)}">${tagObj.name}</joe-tag>`;
96
+ }
97
+ })
98
+ html+= '</joe-tags>';
99
+ return html;
100
+
101
+ }
65
102
  }
66
103
  };
67
104