json-object-editor 0.10.425 → 0.10.430
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 +1 -0
- package/capp/capp.css +8 -1
- package/capp/capp.js +12 -5
- package/css/joe-ai.css +172 -0
- package/css/joe-styles.css +15 -1
- package/css/joe.css +15 -7
- package/js/JsonObjectEditor.jquery.craydent.js +4 -1
- package/js/joe-ai copy.js +517 -0
- package/js/joe-ai.js +281 -158
- package/js/joe-full.js +4 -1
- package/js/joe.js +4 -7
- package/package.json +1 -1
- package/pages/template.html +2 -1
- package/server/app-config.js +1 -1
- package/server/init.js +1 -1
- package/server/modules/Apps.js +2 -1
- package/server/modules/Server.js +29 -5
- package/server/modules/UniversalShorthand.js +1 -2
- package/server/modules/Utils.js +62 -0
- package/server/schemas/ai_conversation.js +23 -14
- package/server/schemas/ai_tool.js +84 -0
package/CHANGELOG.md
CHANGED
package/capp/capp.css
CHANGED
|
@@ -462,12 +462,19 @@ html.no-touch .capp-retro capp-menu-option:hover{
|
|
|
462
462
|
|
|
463
463
|
|
|
464
464
|
capp-menu-option-bonus{
|
|
465
|
-
display:block;
|
|
465
|
+
/* display:block;
|
|
466
466
|
float:right;
|
|
467
467
|
cursor:pointer;
|
|
468
468
|
margin-right: -5px;
|
|
469
469
|
line-height: 1;
|
|
470
|
+
box-sizing: border-box; */
|
|
471
|
+
display:block;
|
|
472
|
+
float:right;
|
|
473
|
+
cursor:pointer;
|
|
474
|
+
margin-right: -15px;
|
|
475
|
+
line-height: 1;
|
|
470
476
|
box-sizing: border-box;
|
|
477
|
+
margin-left: -5px;
|
|
471
478
|
}
|
|
472
479
|
|
|
473
480
|
.capp-retro capp-menu-option.selected {
|
package/capp/capp.js
CHANGED
|
@@ -213,7 +213,7 @@ function CraydentApp(specs,render){
|
|
|
213
213
|
}
|
|
214
214
|
this.Button.addFromSchema = function(schema,specs){
|
|
215
215
|
var specs = $.extend({container:'capp-panel'},specs);
|
|
216
|
-
var icon = schema.name;
|
|
216
|
+
var icon = schema.display||schema.name;
|
|
217
217
|
if(schema.menuicon||schema.icon){
|
|
218
218
|
icon = (schema.menuicon||schema.icon)+'<svg-label>'+(schema.display || schema.name)+'</svg-label>';
|
|
219
219
|
}
|
|
@@ -243,7 +243,7 @@ function CraydentApp(specs,render){
|
|
|
243
243
|
specs = label.specs;
|
|
244
244
|
cssclass = label.cssclass;
|
|
245
245
|
}
|
|
246
|
-
var temp = '<capp-menu-option class="${cssclass}" onclick="${action}">${name}</capp-menu-option>';
|
|
246
|
+
var temp = '<capp-menu-option class="${cssclass}" title="${title}" onclick="${action}">${name}</capp-menu-option>';
|
|
247
247
|
|
|
248
248
|
function renderBonus(side,content){
|
|
249
249
|
|
|
@@ -270,17 +270,24 @@ function CraydentApp(specs,render){
|
|
|
270
270
|
};
|
|
271
271
|
this.Menu.addFromApps = function(apps,label,cssclass){
|
|
272
272
|
var app_items=[],link,appname;
|
|
273
|
-
apps.map(function(
|
|
273
|
+
apps.map(function(aa){
|
|
274
|
+
let a = aa,title='',description='';
|
|
275
|
+
if(aa.name){
|
|
276
|
+
a = aa.name;
|
|
277
|
+
title= aa.title;
|
|
278
|
+
description=aa.description||'';
|
|
279
|
+
}
|
|
274
280
|
var cssclass= (location.pathname.indexOf(a)!= -1)?"selected":'';
|
|
275
281
|
var link = a+location.search;
|
|
276
|
-
appname = a;
|
|
282
|
+
appname = title||a;
|
|
277
283
|
//TODO allow appname to use app title or display
|
|
278
284
|
app_items.push({
|
|
279
285
|
name:appname+'<capp-menu-option-bonus title="open in new window" onclick="window.open(\''+link+'\'); window.event.stopPropagation();">'
|
|
280
286
|
+self.svgs.newwindow
|
|
281
287
|
+'</capp-menu-option-bonus>',
|
|
282
288
|
action:'window.location=\'/JOE/'+link+'\'',
|
|
283
|
-
cssclass:cssclass
|
|
289
|
+
cssclass:cssclass,
|
|
290
|
+
title:description
|
|
284
291
|
});
|
|
285
292
|
});
|
|
286
293
|
|
package/css/joe-ai.css
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
joe-ai-chatbox{
|
|
2
|
+
top:50px;
|
|
3
|
+
}
|
|
4
|
+
chatbox-wrapper {
|
|
5
|
+
padding: 5px;
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
chat-footer,
|
|
14
|
+
chat-header
|
|
15
|
+
chat-content{
|
|
16
|
+
position: absolute;
|
|
17
|
+
left: 0;
|
|
18
|
+
right: 0;
|
|
19
|
+
display: block;
|
|
20
|
+
border:1px solid blue
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
chat-header {
|
|
24
|
+
top: 0;
|
|
25
|
+
}
|
|
26
|
+
chat-content {
|
|
27
|
+
display: block;;
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 80px;
|
|
30
|
+
bottom: 70px;
|
|
31
|
+
left: 0;
|
|
32
|
+
right: 0;
|
|
33
|
+
overflow: auto;
|
|
34
|
+
/* margin-bottom: 10px; */
|
|
35
|
+
background: #fff;
|
|
36
|
+
border: 1px solid #ccc;
|
|
37
|
+
margin: 5px;
|
|
38
|
+
overflow-x: clip;
|
|
39
|
+
}
|
|
40
|
+
chat-footer {
|
|
41
|
+
bottom: 0;
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
.close-btn {
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: 8px;
|
|
49
|
+
right: 8px;
|
|
50
|
+
width: 24px;
|
|
51
|
+
height: 24px;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
}
|
|
54
|
+
.close-btn svg {
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
chat-title{
|
|
60
|
+
margin: 0;
|
|
61
|
+
font-size: 18px;
|
|
62
|
+
display:block;
|
|
63
|
+
font-weight: bold;
|
|
64
|
+
}
|
|
65
|
+
chat-header p {
|
|
66
|
+
margin: 4px 0 0 0;
|
|
67
|
+
font-size: 12px;
|
|
68
|
+
color: #666;
|
|
69
|
+
}
|
|
70
|
+
chat-header svg {
|
|
71
|
+
width: 36px;
|
|
72
|
+
height: 36px;
|
|
73
|
+
}
|
|
74
|
+
label-select-wrapper {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: 8px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.thinking-message {
|
|
81
|
+
font-size: 13px;
|
|
82
|
+
color: #888;
|
|
83
|
+
font-style: italic;
|
|
84
|
+
margin: 10px 0;
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
87
|
+
.meta {
|
|
88
|
+
font-size: 14px;
|
|
89
|
+
font-weight: bold;
|
|
90
|
+
margin-bottom: 2px;
|
|
91
|
+
/* display: flex
|
|
92
|
+
; */
|
|
93
|
+
align-items: center;
|
|
94
|
+
gap: 8px;
|
|
95
|
+
color: #99999999;
|
|
96
|
+
}
|
|
97
|
+
.content {
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
white-space: pre-wrap;
|
|
100
|
+
line-height: 1.4em;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
input[type="text"] {
|
|
104
|
+
flex: 1;
|
|
105
|
+
padding: 8px;
|
|
106
|
+
border-radius: 4px;
|
|
107
|
+
border: 1px solid #ccc;
|
|
108
|
+
}
|
|
109
|
+
button {
|
|
110
|
+
padding: 8px 12px;
|
|
111
|
+
background: #007bff;
|
|
112
|
+
color: white;
|
|
113
|
+
border: none;
|
|
114
|
+
border-radius: 4px;
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
position: absolute;
|
|
117
|
+
bottom: 20px;
|
|
118
|
+
right: 10px;
|
|
119
|
+
}
|
|
120
|
+
button:disabled {
|
|
121
|
+
opacity: 0.5;
|
|
122
|
+
cursor: default;
|
|
123
|
+
}
|
|
124
|
+
participant-name{
|
|
125
|
+
color:#20202099
|
|
126
|
+
}
|
|
127
|
+
.message {
|
|
128
|
+
margin-bottom: 10px;
|
|
129
|
+
padding: 8px;
|
|
130
|
+
background: #f5f5f5;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.message.user{
|
|
134
|
+
text-align:right;
|
|
135
|
+
margin-left: 30px;
|
|
136
|
+
border-radius: 10px 0 0 10px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.message.system {
|
|
140
|
+
background: #fee;
|
|
141
|
+
}
|
|
142
|
+
.message.assistant{
|
|
143
|
+
background: #00666633;
|
|
144
|
+
margin-right: 30px;
|
|
145
|
+
border-radius: 0px 10px 10px 0px;
|
|
146
|
+
}
|
|
147
|
+
#chat-input {
|
|
148
|
+
width: calc(100% - 100px);
|
|
149
|
+
margin: 5px;
|
|
150
|
+
min-height: 50px;
|
|
151
|
+
/* border-radius: 0px 0px 0px 8px; */
|
|
152
|
+
bottom: 0;
|
|
153
|
+
position: absolute;
|
|
154
|
+
/* overflow: visible; */
|
|
155
|
+
padding: 5px;
|
|
156
|
+
resize: vertical;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
joe-object {
|
|
160
|
+
display: block;
|
|
161
|
+
margin: 0 auto;
|
|
162
|
+
/* width: 100%; */
|
|
163
|
+
/* height: 100%; */
|
|
164
|
+
padding:5px;
|
|
165
|
+
background: #fff;
|
|
166
|
+
margin: 10px;
|
|
167
|
+
padding: 10px;
|
|
168
|
+
text-align: center;
|
|
169
|
+
box-shadow: 1px 1px 10px #20202020;
|
|
170
|
+
border: 1px solid #00666699;
|
|
171
|
+
cursor: pointer;
|
|
172
|
+
}
|
package/css/joe-styles.css
CHANGED
|
@@ -1927,9 +1927,17 @@ joe-card{
|
|
|
1927
1927
|
|
|
1928
1928
|
.joe-content-sidebar .joe-field-item-content {
|
|
1929
1929
|
padding:5px;
|
|
1930
|
-
font-size:
|
|
1930
|
+
font-size:16px;
|
|
1931
1931
|
line-height: 1.1em;
|
|
1932
1932
|
}
|
|
1933
|
+
/* .joe-content-sidebar .joe-field-item-content {
|
|
1934
|
+
padding:6px;
|
|
1935
|
+
font-size: 16px;
|
|
1936
|
+
line-height: 1.1em;
|
|
1937
|
+
border: 1px solid #00666644;
|
|
1938
|
+
box-shadow:0 1px 4px #0002;
|
|
1939
|
+
margin:5px;
|
|
1940
|
+
} */
|
|
1933
1941
|
/*-------------------------
|
|
1934
1942
|
List Option Buttons
|
|
1935
1943
|
-------------------------*/
|
|
@@ -2020,6 +2028,12 @@ joe-list-item.deletable {
|
|
|
2020
2028
|
padding: 10px;
|
|
2021
2029
|
margin: 10px 0;
|
|
2022
2030
|
}
|
|
2031
|
+
.joe-content-sidebar joe-list-item {
|
|
2032
|
+
padding: 5px;
|
|
2033
|
+
margin: 5px 0;
|
|
2034
|
+
border: 1px solid #00666633;
|
|
2035
|
+
box-shadow: 0 1px 4px #0002;
|
|
2036
|
+
}
|
|
2023
2037
|
swipe-option{
|
|
2024
2038
|
position:absolute;
|
|
2025
2039
|
top:0;
|
package/css/joe.css
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/* --------------------------------------------------------
|
|
2
|
-
*
|
|
3
|
-
* JOE - v1.5.0
|
|
4
|
-
* Created by: Corey Hadden
|
|
5
|
-
*
|
|
6
|
-
* -------------------------------------------------------- */
|
|
7
1
|
/* --------------------------------------------------------
|
|
8
2
|
*
|
|
9
3
|
* JOE - v1.5.0
|
|
@@ -2419,9 +2413,17 @@ joe-card{
|
|
|
2419
2413
|
|
|
2420
2414
|
.joe-content-sidebar .joe-field-item-content {
|
|
2421
2415
|
padding:5px;
|
|
2422
|
-
font-size:
|
|
2416
|
+
font-size:16px;
|
|
2423
2417
|
line-height: 1.1em;
|
|
2424
2418
|
}
|
|
2419
|
+
/* .joe-content-sidebar .joe-field-item-content {
|
|
2420
|
+
padding:6px;
|
|
2421
|
+
font-size: 16px;
|
|
2422
|
+
line-height: 1.1em;
|
|
2423
|
+
border: 1px solid #00666644;
|
|
2424
|
+
box-shadow:0 1px 4px #0002;
|
|
2425
|
+
margin:5px;
|
|
2426
|
+
} */
|
|
2425
2427
|
/*-------------------------
|
|
2426
2428
|
List Option Buttons
|
|
2427
2429
|
-------------------------*/
|
|
@@ -2512,6 +2514,12 @@ joe-list-item.deletable {
|
|
|
2512
2514
|
padding: 10px;
|
|
2513
2515
|
margin: 10px 0;
|
|
2514
2516
|
}
|
|
2517
|
+
.joe-content-sidebar joe-list-item {
|
|
2518
|
+
padding: 5px;
|
|
2519
|
+
margin: 5px 0;
|
|
2520
|
+
border: 1px solid #00666633;
|
|
2521
|
+
box-shadow: 0 1px 4px #0002;
|
|
2522
|
+
}
|
|
2515
2523
|
swipe-option{
|
|
2516
2524
|
position:absolute;
|
|
2517
2525
|
top:0;
|
|
@@ -8280,7 +8280,10 @@ Field Rendering Helpers
|
|
|
8280
8280
|
|
|
8281
8281
|
for (const [field, val] of Object.entries(object)) {
|
|
8282
8282
|
if (val === undefined || val === null) continue;
|
|
8283
|
-
if (field == '_id')
|
|
8283
|
+
if (field == '_id'){
|
|
8284
|
+
flattened[field] = val;
|
|
8285
|
+
continue;
|
|
8286
|
+
}
|
|
8284
8287
|
|
|
8285
8288
|
if (typeof val === 'string' && $c.isCuid(val) && recursive && depth > 0) {
|
|
8286
8289
|
if (!visited.has(val)) {
|