@5minds/node-red-dashboard-2-processcube-chat 0.3.0-develop-f50f16-mff4qor8 → 0.3.0
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/nodes/ui-deepchat.html
CHANGED
|
@@ -6,8 +6,18 @@
|
|
|
6
6
|
group: { type: 'ui-group', required: true },
|
|
7
7
|
name: { value: '' },
|
|
8
8
|
order: { value: 0 },
|
|
9
|
-
width: {
|
|
10
|
-
|
|
9
|
+
width: {
|
|
10
|
+
value: 0,
|
|
11
|
+
validate: function (v) {
|
|
12
|
+
const width = v || 0;
|
|
13
|
+
const currentGroup = $('#node-input-group').val() || this.group;
|
|
14
|
+
const groupNode = RED.nodes.node(currentGroup);
|
|
15
|
+
const valid = !groupNode || +width <= +groupNode.width;
|
|
16
|
+
$('#node-input-size').toggleClass('input-error', !valid);
|
|
17
|
+
return valid;
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
height: { value: 0 },
|
|
11
21
|
// Deep Chat Konfiguration
|
|
12
22
|
introMessage: { value: 'Hello! How can I help you today?' },
|
|
13
23
|
placeholder: { value: 'Type a message...' },
|
|
@@ -33,15 +43,10 @@
|
|
|
33
43
|
return this.name ? 'node_label_italic' : '';
|
|
34
44
|
},
|
|
35
45
|
oneditprepare: function () {
|
|
36
|
-
$('#node-input-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
$('#node-input-height').typedInput({
|
|
42
|
-
type: 'num',
|
|
43
|
-
types: ['num'],
|
|
44
|
-
typeField: '#node-input-height-type',
|
|
46
|
+
$('#node-input-size').elementSizer({
|
|
47
|
+
width: '#node-input-width',
|
|
48
|
+
height: '#node-input-height',
|
|
49
|
+
group: '#node-input-group',
|
|
45
50
|
});
|
|
46
51
|
},
|
|
47
52
|
});
|
|
@@ -53,26 +58,22 @@
|
|
|
53
58
|
<input type="text" id="node-input-group" />
|
|
54
59
|
</div>
|
|
55
60
|
|
|
56
|
-
<div class="form-row">
|
|
57
|
-
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
58
|
-
<input type="text" id="node-input-name" placeholder="Deep Chat" />
|
|
59
|
-
</div>
|
|
60
61
|
|
|
61
62
|
<div class="form-row">
|
|
62
|
-
<label
|
|
63
|
-
<input type="
|
|
63
|
+
<label><i class="fa fa-object-group"></i> <span data-i18n="ui-deepchat.label.size"></label>
|
|
64
|
+
<input type="hidden" id="node-input-width">
|
|
65
|
+
<input type="hidden" id="node-input-height">
|
|
66
|
+
<button class="editor-button" id="node-input-size"></button>
|
|
64
67
|
</div>
|
|
65
68
|
|
|
66
69
|
<div class="form-row">
|
|
67
|
-
<label for="node-input-
|
|
68
|
-
<input type="
|
|
69
|
-
<input type="text" id="node-input-width" placeholder="6" />
|
|
70
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
71
|
+
<input type="text" id="node-input-name" placeholder="Deep Chat" />
|
|
70
72
|
</div>
|
|
71
73
|
|
|
72
74
|
<div class="form-row">
|
|
73
|
-
<label for="node-input-
|
|
74
|
-
<input type="
|
|
75
|
-
<input type="text" id="node-input-height" placeholder="8" />
|
|
75
|
+
<label for="node-input-order"><i class="fa fa-sort"></i> Order</label>
|
|
76
|
+
<input type="number" id="node-input-order" placeholder="0" min="0" />
|
|
76
77
|
</div>
|
|
77
78
|
|
|
78
79
|
<hr />
|