node-red-contrib-mobius-flow-base 2.5.86-beta.71 → 2.5.86-beta.75

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.
@@ -3,25 +3,32 @@
3
3
  * @param mobiusSrvc - Connection to Mobius
4
4
  * @param {object} opts - Options object, field explained below
5
5
 
6
- OPTS OBJECT (opts.)
7
- ALL CASES
8
- htmlElementId - The id of the HTML element that mobsearch will inject into
9
- NON-LISTED ONLY
10
- uriFieldName - The id of the URI HTML field, mobsearch will set the value of this field to be the result
11
- LISTED ONLY (Uses editable list)
12
- list - Array containing current list items in object form
13
- containerRowName - The id of the row containing the HTML container
14
- containerName - The id of the HTML container
15
- containerSecondFieldName - The id of the secondary field (Not URI field) within HTML container
16
-
17
- EXAMPLE OPTS OBJECT - context of getMultiResource
6
+ OPTS OBJECT (opts.)
7
+ ALL CASES
8
+ htmlElementId - The id of the HTML element that mobsearch will inject into
9
+ NON-LISTED ONLY
10
+ uriFieldName - The id of the URI HTML field, mobsearch will set the value of this field to be the result
11
+ inputRowId - The id of the main input, mobsearch will add the search button to this row
12
+ LISTED ONLY (Uses editable list)
13
+ list - Array containing current list items in object form
14
+ containerRowName - The id of the row containing the HTML container
15
+ containerName - The id of the HTML container
16
+ containerSecondFieldName - The id of the secondary field (Not URI field) within HTML container
17
+
18
+ EXAMPLE OPTS OBJECT - context of getMultiResource (node using editable list)
18
19
  opts = {
19
20
  htmlElementId: 'mobsearch',
20
21
  list: node.resources,
21
22
  containerRowName: 'node-input-resources-container-row',
22
23
  containerName: 'node-input-resources-container',
23
24
  containerSecondFieldName: 'node-input-resources-comment',
24
- }
25
+ };
26
+ EXAMPLE OPTS OBJECT - context of getResource (standard node, not using editable list)
27
+ opts = {
28
+ htmlElementId: 'mobsearch',
29
+ uriFieldName: 'node-input-resource',
30
+ inputRowId: 'input-row',
31
+ };
25
32
  *
26
33
  *
27
34
  *
@@ -85,8 +92,6 @@ function getMobsearch(mobiusSrvc, useRid, listed, opts) {
85
92
  uriFieldValue = $(`#${opts.uriFieldName}`).val();
86
93
  }
87
94
 
88
- console.log(opts.htmlElementId);
89
-
90
95
  // * HTML INJECTION * //
91
96
 
92
97
  const resourceHtml = `
@@ -128,7 +133,7 @@ function getMobsearch(mobiusSrvc, useRid, listed, opts) {
128
133
 
129
134
  if (!listed) {
130
135
  //Add search button
131
- document.getElementById('input-row').innerHTML += `
136
+ document.getElementById(opts.inputRowId).innerHTML += `
132
137
  <a id="node-lookup-instance" class="searchbutton" style="vertical-align: middle"><i id="node-lookup-instance-icon" class="fa fa-search"></i></a>
133
138
  `;
134
139
  }
@@ -33,10 +33,9 @@ POSSIBILITY OF SUCH DAMAGE.
33
33
  <hr>
34
34
 
35
35
  <div id="instance-row">
36
- <div class="form-row">
36
+ <div class="form-row" id="input-row">
37
37
  <label for="node-input-resource"><i class="fa fa-tasks"></i> URI</label>
38
38
  <input type="text" id="node-input-resource" style="width:61%;" placeholder="HID/SID/PID/INS/RID">
39
- <a id="node-lookup-instance" class="searchbutton" style="vertical-align: middle"><i id="node-lookup-instance-icon" class="fa fa-search"></i></a>
40
39
  </div>
41
40
  </div>
42
41
  <div id="mobsearch"></div>
@@ -106,7 +105,8 @@ POSSIBILITY OF SUCH DAMAGE.
106
105
 
107
106
  opts = {
108
107
  htmlElementId: 'mobsearch',
109
- uriFieldName: 'node-input-resource'
108
+ uriFieldName: 'node-input-resource',
109
+ inputRowId: 'input-row',
110
110
  };
111
111
  initMobsearch.toRid(mobiusSrvc, opts);
112
112
  },
@@ -108,7 +108,8 @@ POSSIBILITY OF SUCH DAMAGE.
108
108
 
109
109
  opts = {
110
110
  htmlElementId: 'mobsearch',
111
- uriFieldName: 'node-input-instance '
111
+ uriFieldName: 'node-input-instance ',
112
+ inputRowId: 'input-row',
112
113
  };
113
114
  initMobsearch.toIns(mobiusSrvc, opts);
114
115
  },
@@ -101,7 +101,8 @@ POSSIBILITY OF SUCH DAMAGE.
101
101
 
102
102
  opts = {
103
103
  htmlElementId: 'mobsearch',
104
- uriFieldName: 'node-input-resource'
104
+ uriFieldName: 'node-input-resource',
105
+ inputRowId: 'input-row',
105
106
  };
106
107
  initMobsearch.toRid(mobiusSrvc, opts);
107
108
 
@@ -33,10 +33,9 @@ POSSIBILITY OF SUCH DAMAGE.
33
33
  <hr>
34
34
 
35
35
  <div id="instance-row">
36
- <div class="form-row">
36
+ <div class="form-row" id="input-row">
37
37
  <label for="node-input-instance"><i class="fa fa-tasks"></i> URI</label>
38
38
  <input type="text" id="node-input-instance" style="width:61%;" placeholder="HID/SID/PID/INS (optional name)">
39
- <a id="node-lookup-instance" class="searchbutton" style="vertical-align: middle"><i id="node-lookup-instance-icon" class="fa fa-search"></i></a>
40
39
  </div>
41
40
  </div>
42
41
  <div id="mobsearch"></div>
@@ -117,7 +116,8 @@ POSSIBILITY OF SUCH DAMAGE.
117
116
 
118
117
  opts = {
119
118
  htmlElementId: 'mobsearch',
120
- uriFieldName: 'node-input-instance'
119
+ uriFieldName: 'node-input-instance',
120
+ inputRowId: 'input-row',
121
121
  };
122
122
  initMobsearch.toIns(mobiusSrvc, opts);
123
123
  },
@@ -33,10 +33,9 @@ POSSIBILITY OF SUCH DAMAGE.
33
33
  <hr>
34
34
 
35
35
  <div id="instance-row">
36
- <div class="form-row">
36
+ <div class="form-row" id="input-row">
37
37
  <label for="node-input-resource"><i class="fa fa-tasks"></i> URI</label>
38
38
  <input type="text" id="node-input-resource" style="width:61%;" placeholder="HID/SID/PID/INS/RID">
39
- <a id="node-lookup-instance" class="searchbutton" style="vertical-align: middle"><i id="node-lookup-instance-icon" class="fa fa-search"></i></a>
40
39
  </div>
41
40
  </div>
42
41
  <div id="mobsearch"></div>
@@ -101,7 +100,8 @@ POSSIBILITY OF SUCH DAMAGE.
101
100
 
102
101
  opts = {
103
102
  htmlElementId: 'mobsearch',
104
- uriFieldName: 'node-input-resource'
103
+ uriFieldName: 'node-input-resource',
104
+ inputRowId: 'input-row',
105
105
  };
106
106
  initMobsearch.toRid(mobiusSrvc, opts);
107
107
  },
@@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
33
33
  <hr>
34
34
 
35
35
  <div id="instance-row">
36
- <div class="form-row">
36
+ <div class="form-row" id="input-row">
37
37
  <label for="node-input-instance"><i class="fa fa-tasks"></i> URI</label>
38
38
  <input type="text" id="node-input-instance" style="width:61%;" placeholder="HID/SID/PID/INS (optional name)">
39
39
  <a id="node-lookup-instance" class="searchbutton" style="vertical-align: middle"><i id="node-lookup-instance-icon" class="fa fa-search"></i></a>
@@ -98,7 +98,8 @@ POSSIBILITY OF SUCH DAMAGE.
98
98
 
99
99
  opts = {
100
100
  htmlElementId: 'mobsearch',
101
- uriFieldName: 'node-input-instance'
101
+ uriFieldName: 'node-input-instance',
102
+ inputRowId: 'input-row',
102
103
  };
103
104
  initMobsearch.toIns(mobiusSrvc, opts);
104
105
  },
@@ -33,10 +33,9 @@ POSSIBILITY OF SUCH DAMAGE.
33
33
  <hr>
34
34
 
35
35
  <div id="instance-row">
36
- <div class="form-row">
36
+ <div class="form-row" id="input-row">
37
37
  <label for="node-input-resource"><i class="fa fa-tasks"></i> URI</label>
38
38
  <input type="text" id="node-input-resource" style="width:61%;" placeholder="HID/SID/PID/INS/RID">
39
- <a id="node-lookup-instance" class="searchbutton" style="vertical-align: middle"><i id="node-lookup-instance-icon" class="fa fa-search"></i></a>
40
39
  </div>
41
40
  </div>
42
41
 
@@ -107,7 +106,8 @@ POSSIBILITY OF SUCH DAMAGE.
107
106
 
108
107
  opts = {
109
108
  htmlElementId: 'mobsearch',
110
- uriFieldName: 'node-input-resource'
109
+ uriFieldName: 'node-input-resource',
110
+ inputRowId: 'input-row',
111
111
  };
112
112
  initMobsearch.toRid(mobiusSrvc, opts);
113
113
  },
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "node-red-contrib-mobius-flow-base",
3
- "version": "2.5.86-beta.71",
3
+ "version": "2.5.86-beta.75",
4
4
  "description": "Node-RED base nodes for Mobius Flow",
5
5
  "main": "index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "test": "echo \"Error: no test specified\" && exit 1",
9
- "build": "mkdir -p dist/nodes && cp src/nodes/*.js dist/nodes/ && cp src/nodes/*.html dist/nodes/ && cp -r src/nodes/icons dist/nodes/ && mkdir -p dist/nodes/common && cp src/nodes/common/*.js dist/nodes/common/"
9
+ "build": "mkdir -p dist/nodes && cp src/nodes/*.js dist/nodes/ && cp src/nodes/*.html dist/nodes/ && cp -r src/nodes/icons dist/nodes/"
10
10
  },
11
11
  "repository": "bitbucket:interiorautomation/node-red-contrib-mobius-flow-base",
12
12
  "node-red": {