iobroker.javascript 7.0.5 → 7.0.8

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.
Files changed (46) hide show
  1. package/README.md +7 -8
  2. package/admin/asset-manifest.json +5 -5
  3. package/admin/google-blockly/blockly_compressed.js +1469 -1704
  4. package/admin/google-blockly/blocks_compressed.js +164 -218
  5. package/admin/google-blockly/javascript_compressed.js +100 -328
  6. package/admin/google-blockly/msg/js/de.js +64 -70
  7. package/admin/google-blockly/msg/js/en.js +14 -20
  8. package/admin/google-blockly/msg/js/es.js +39 -45
  9. package/admin/google-blockly/msg/js/fr.js +59 -65
  10. package/admin/google-blockly/msg/js/it.js +19 -25
  11. package/admin/google-blockly/msg/js/nl.js +55 -61
  12. package/admin/google-blockly/msg/js/pl.js +46 -52
  13. package/admin/google-blockly/msg/js/pt.js +30 -36
  14. package/admin/google-blockly/msg/js/ru.js +41 -47
  15. package/admin/google-blockly/msg/js/uk.js +13 -17
  16. package/admin/google-blockly/msg/js/zh-cn.js +86 -92
  17. package/admin/google-blockly/own/blocks_action.js +4 -4
  18. package/admin/google-blockly/own/blocks_other.js +103 -0
  19. package/admin/google-blockly/own/blocks_procedures.js +63 -62
  20. package/admin/google-blockly/own/blocks_sendto.js +62 -60
  21. package/admin/google-blockly/own/blocks_switch.js +40 -29
  22. package/admin/google-blockly/own/blocks_system.js +113 -170
  23. package/admin/google-blockly/own/blocks_time.js +35 -35
  24. package/admin/google-blockly/own/blocks_timeout.js +42 -42
  25. package/admin/google-blockly/own/blocks_trigger.js +47 -62
  26. package/admin/google-blockly/own/blocks_words.js +8 -9
  27. package/admin/google-blockly/own/field_cron.js +189 -139
  28. package/admin/google-blockly/own/field_oid.js +250 -170
  29. package/admin/google-blockly/own/field_script.js +16 -16
  30. package/admin/static/js/759.7f25ba6c.chunk.js.map +1 -1
  31. package/admin/static/js/98.bf3dfa2b.chunk.js +2 -0
  32. package/admin/static/js/98.bf3dfa2b.chunk.js.map +1 -0
  33. package/admin/static/js/{main.eee05982.js → main.d9e7d255.js} +2 -2
  34. package/admin/static/js/{main.eee05982.js.map → main.d9e7d255.js.map} +1 -1
  35. package/admin/tab.html +1 -1
  36. package/admin/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  37. package/admin-config/vsFont/codicon.json +1 -1
  38. package/io-package.json +40 -40
  39. package/lib/typescriptTools.js +29 -30
  40. package/main.js +4 -4
  41. package/package.json +3 -3
  42. package/admin/google-blockly/own/blocks_logic.js +0 -64
  43. package/admin/google-blockly/own/blocks_number.js +0 -25
  44. package/admin/google-blockly/own/blocks_text.js +0 -23
  45. package/admin/static/js/98.3bc0a67c.chunk.js +0 -2
  46. package/admin/static/js/98.3bc0a67c.chunk.js.map +0 -1
@@ -1,3 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Visual Blocks Editor
4
+ *
5
+ * Copyright 2012 Google Inc.
6
+ * https://developers.google.com/blockly/
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+
21
+ /**
22
+ * @fileoverview Text input field.
23
+ * @author fraser@google.com (Neil Fraser)
24
+ */
1
25
  'use strict';
2
26
 
3
27
  if (typeof goog !== 'undefined') {
@@ -10,150 +34,176 @@ if (typeof goog !== 'undefined') {
10
34
  goog.require('goog.userAgent');
11
35
  }
12
36
 
13
- class FieldCRON extends Blockly.Field {
14
-
15
- constructor(value, type) {
16
- super(value);
17
-
18
- this.FONTSIZE = 11;
19
- this.CURSOR = 'pointer';
20
- this.spellcheck_ = false;
21
- }
37
+ /**
38
+ * Class for an editable text field.
39
+ * @param {string} text The initial content of the field.
40
+ * @param {Function=} opt_validator An optional function that is called
41
+ * to validate any constraints on what the user entered. Takes the new
42
+ * text as an argument and returns either the accepted text, a replacement
43
+ * text, or null to abort the change.
44
+ * @extends {Blockly.Field}
45
+ * @constructor
46
+ */
47
+ Blockly.FieldCRON = function(text) {
48
+ Blockly.FieldCRON.superClass_.constructor.call(this, text);
49
+ };
50
+ if (typeof goog !== 'undefined') {
51
+ goog.inherits(Blockly.FieldCRON, Blockly.Field);
52
+ } else {
53
+ Blockly.utils.object.inherits(Blockly.FieldCRON, Blockly.Field);
54
+ }
22
55
 
23
- dispose() {
24
- Blockly.WidgetDiv.hideIfOwner(this);
25
- super.dispose();
56
+ /**
57
+ * Point size of text. Should match blocklyText's font-size in CSS.
58
+ */
59
+ Blockly.FieldCRON.FONTSIZE = 11;
60
+
61
+ /**
62
+ * Mouse cursor style when over the hotspot that initiates the editor.
63
+ */
64
+ Blockly.FieldCRON.prototype.CURSOR = 'pointer';
65
+
66
+ /**
67
+ * Allow browser to spellcheck this field.
68
+ * @private
69
+ */
70
+ Blockly.FieldCRON.prototype.spellcheck_ = false;
71
+
72
+ /**
73
+ * Close the input widget if this input is being deleted.
74
+ */
75
+ Blockly.FieldCRON.prototype.dispose = function() {
76
+ Blockly.WidgetDiv.hideIfOwner(this);
77
+ Blockly.FieldCRON.superClass_.dispose.call(this);
78
+ };
79
+
80
+ /**
81
+ * Set the text in this field.
82
+ * @param {?string} text New text.
83
+ * @override
84
+ */
85
+ Blockly.FieldCRON.prototype.setValue = function(text) {
86
+ if (text === null) {
87
+ return; // No change if null.
26
88
  }
27
-
28
- /**
29
- * Set the text in this field.
30
- * @param {?string} text New text.
31
- * @override
32
- */
33
- setValue(text) {
34
- if (text === null) {
35
- return; // No change if null.
89
+
90
+ Blockly.Field.prototype.setValue.call(this, text);
91
+ };
92
+
93
+ /**
94
+ * Show the inline free-text editor on top of the text.
95
+ * @param {boolean=} opt_quietInput True if editor should be created without
96
+ * focus. Defaults to false.
97
+ * @private
98
+ */
99
+ Blockly.FieldCRON.prototype.showEditor_ = function(opt_quietInput) {
100
+ this.workspace_ = this.sourceBlock_.workspace;
101
+ const that = this;
102
+ main.cronDialog(that.getValue(), function (newId) {
103
+ if (newId !== undefined && newId !== null) {
104
+ that.setValue(newId);
36
105
  }
37
-
38
- super.setValue(text);
106
+ });
107
+ };
108
+
109
+ /**
110
+ * Handle a change to the editor.
111
+ * @param {!Event} e Keyboard event.
112
+ * @private
113
+ */
114
+ Blockly.FieldCRON.prototype.onHtmlInputChange_ = function(e) {
115
+ const htmlInput = Blockly.FieldCRON.htmlInput_;
116
+ // Update source block.
117
+ const text = htmlInput.value;
118
+ if (text !== htmlInput.oldValue_) {
119
+ htmlInput.oldValue_ = text;
120
+ this.setValue(text);
121
+ this.validate_();
122
+ } else if (goog.userAgent.WEBKIT) {
123
+ // Cursor key. Render the source block to show the caret moving.
124
+ // Chrome only (version 26, OS X).
125
+ this.sourceBlock_.render();
39
126
  }
40
-
41
- /**
42
- * Show the inline free-text editor on top of the text.
43
- * @param {boolean=} opt_quietInput True if editor should be created without
44
- * focus. Defaults to false.
45
- * @private
46
- */
47
- showEditor_(opt_quietInput) {
48
- this.workspace_ = this.sourceBlock_.workspace;
49
- window.main.cronDialog(this.getValue(), (newId) => {
50
- if (newId !== undefined && newId !== null) this.setValue(newId);
51
- });
127
+ this.resizeEditor_();
128
+ Blockly.svgResize(this.sourceBlock_.workspace);
129
+ };
130
+
131
+ /**
132
+ * Check to see if the contents of the editor validates.
133
+ * Style the editor accordingly.
134
+ * @private
135
+ */
136
+ Blockly.FieldCRON.prototype.validate_ = function() {
137
+ goog.asserts.assertObject(Blockly.FieldCRON.htmlInput_);
138
+
139
+ const htmlInput = Blockly.FieldCRON.htmlInput_;
140
+
141
+ if (htmlInput.value) {
142
+ Blockly.addClass_(htmlInput, 'blocklyInvalidInput');
143
+ } else {
144
+ Blockly.removeClass_(htmlInput, 'blocklyInvalidInput');
52
145
  }
53
-
54
- /**
55
- * Handle a change to the editor.
56
- * @param {!Event} e Keyboard event.
57
- * @private
58
- */
59
- onHtmlInputChange_(e) {
60
- var htmlInput = this.htmlInput_;
61
- // Update source block.
62
- var text = htmlInput.value;
63
- if (text !== htmlInput.oldValue_) {
64
- htmlInput.oldValue_ = text;
65
- this.setValue(text);
66
- this.validate_();
67
- } else if (goog.userAgent.WEBKIT) {
68
- // Cursor key. Render the source block to show the caret moving.
69
- // Chrome only (version 26, OS X).
70
- this.sourceBlock_.render();
71
- }
72
- this.resizeEditor_();
73
- Blockly.svgResize(this.sourceBlock_.workspace);
74
- }
75
-
76
- /**
77
- * Check to see if the contents of the editor validates.
78
- * Style the editor accordingly.
79
- * @private
80
- */
81
- validate_() {
82
- goog.asserts.assertObject(Blockly.FieldCRON.htmlInput_);
83
-
84
- var htmlInput = Blockly.FieldCRON.htmlInput_;
85
-
86
- if (htmlInput.value) {
87
- Blockly.addClass_(htmlInput, 'blocklyInvalidInput');
88
- } else {
89
- Blockly.removeClass_(htmlInput, 'blocklyInvalidInput');
90
- }
146
+ };
147
+
148
+ /**
149
+ * Resize the editor and the underlying block to fit the text.
150
+ * @private
151
+ */
152
+ Blockly.FieldCRON.prototype.resizeEditor_ = function() {
153
+ const div = Blockly.WidgetDiv.DIV;
154
+ const bBox = this.fieldGroup_.getBBox();
155
+ div.style.width = bBox.width * this.workspace_.scale + 'px';
156
+ div.style.height = bBox.height * this.workspace_.scale + 'px';
157
+ const xy = this.getAbsoluteXY_();
158
+ // In RTL mode block fields and LTR input fields the left edge moves,
159
+ // whereas the right edge is fixed. Reposition the editor.
160
+ if (this.sourceBlock_.RTL) {
161
+ const borderBBox = this.getScaledBBox_();
162
+ xy.x += borderBBox.width;
163
+ xy.x -= div.offsetWidth;
91
164
  }
92
-
93
- /**
94
- * Resize the editor and the underlying block to fit the text.
95
- * @private
96
- */
97
- resizeEditor_() {
98
- var div = Blockly.WidgetDiv.DIV;
99
- var bBox = this.fieldGroup_.getBBox();
100
- div.style.width = bBox.width * this.workspace_.scale + 'px';
101
- div.style.height = bBox.height * this.workspace_.scale + 'px';
102
- var xy = this.getAbsoluteXY_();
103
- // In RTL mode block fields and LTR input fields the left edge moves,
104
- // whereas the right edge is fixed. Reposition the editor.
105
- if (this.sourceBlock_.RTL) {
106
- var borderBBox = this.getScaledBBox_();
107
- xy.x += borderBBox.width;
108
- xy.x -= div.offsetWidth;
109
- }
110
- // Shift by a few pixels to line up exactly.
111
- xy.y += 1;
112
- if (goog.userAgent.GECKO && Blockly.WidgetDiv.DIV.style.top) {
113
- // Firefox mis-reports the location of the border by a pixel
114
- // once the WidgetDiv is moved into position.
115
- xy.x -= 1;
116
- xy.y -= 1;
117
- }
118
- if (goog.userAgent.WEBKIT) {
119
- xy.y -= 3;
120
- }
121
- div.style.left = xy.x + 'px';
122
- div.style.top = xy.y + 'px';
165
+ // Shift by a few pixels to line up exactly.
166
+ xy.y += 1;
167
+ if (goog.userAgent.GECKO && Blockly.WidgetDiv.DIV.style.top) {
168
+ // Firefox mis-reports the location of the border by a pixel
169
+ // once the WidgetDiv is moved into position.
170
+ xy.x -= 1;
171
+ xy.y -= 1;
123
172
  }
124
-
125
- /**
126
- * Close the editor, save the results, and dispose of the editable
127
- * text field's elements.
128
- * @return {!Function} Closure to call on destruction of the WidgetDiv.
129
- * @private
130
- */
131
- widgetDispose_() {
132
- var thisField = this;
133
- return function() {
134
- var htmlInput = Blockly.FieldCRON.htmlInput_;
135
- // Save the edit (if it validates).
136
- var text = htmlInput.value;
137
- thisField.setValue(text);
138
- thisField.sourceBlock_.rendered && thisField.sourceBlock_.render();
139
- Blockly.unbindEvent_(htmlInput.onKeyDownWrapper_);
140
- Blockly.unbindEvent_(htmlInput.onKeyUpWrapper_);
141
- Blockly.unbindEvent_(htmlInput.onKeyPressWrapper_);
142
-
143
- thisField.workspace_.removeChangeListener(
144
- htmlInput.onWorkspaceChangeWrapper_);
145
-
146
- Blockly.FieldCRON.htmlInput_ = null;
147
-
148
- // Delete style properties.
149
- var style = Blockly.WidgetDiv.DIV.style;
150
- style.width = 'auto';
151
- style.height = 'auto';
152
- style.fontSize = '';
153
- };
173
+ if (goog.userAgent.WEBKIT) {
174
+ xy.y -= 3;
154
175
  }
155
- }
156
-
157
- Blockly.FieldCRON = FieldCRON;
158
-
159
- // Blockly.fieldRegistry.register('field_cron', FieldCRON);
176
+ div.style.left = xy.x + 'px';
177
+ div.style.top = xy.y + 'px';
178
+ };
179
+
180
+ /**
181
+ * Close the editor, save the results, and dispose of the editable
182
+ * text field's elements.
183
+ * @return {!Function} Closure to call on destruction of the WidgetDiv.
184
+ * @private
185
+ */
186
+ Blockly.FieldCRON.prototype.widgetDispose_ = function() {
187
+ const thisField = this;
188
+ return function() {
189
+ const htmlInput = Blockly.FieldCRON.htmlInput_;
190
+ // Save the edit (if it validates).
191
+ const text = htmlInput.value;
192
+ thisField.setValue(text);
193
+ thisField.sourceBlock_.rendered && thisField.sourceBlock_.render();
194
+ Blockly.unbindEvent_(htmlInput.onKeyDownWrapper_);
195
+ Blockly.unbindEvent_(htmlInput.onKeyUpWrapper_);
196
+ Blockly.unbindEvent_(htmlInput.onKeyPressWrapper_);
197
+
198
+ thisField.workspace_.removeChangeListener(
199
+ htmlInput.onWorkspaceChangeWrapper_);
200
+
201
+ Blockly.FieldCRON.htmlInput_ = null;
202
+
203
+ // Delete style properties.
204
+ const style = Blockly.WidgetDiv.DIV.style;
205
+ style.width = 'auto';
206
+ style.height = 'auto';
207
+ style.fontSize = '';
208
+ };
209
+ };