@theotherwillembotha/node-red-whatsapp 0.3.0 → 0.4.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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=GenerateNodes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenerateNodes.d.ts","sourceRoot":"","sources":["../src/GenerateNodes.ts"],"names":[],"mappings":""}
package/build/Nodes.html CHANGED
@@ -1299,7 +1299,20 @@ Click **Create New Group** to create a new WhatsApp group from within Node-RED.
1299
1299
  let metricsSection = $("#section_metricsconfig");
1300
1300
  let metricsContainer = metricsEnabled.closest(".editorgroupborder");
1301
1301
  let metricsEnabledSection = metricsContainer.find("#section_metricsEnabled");
1302
+ let metricsEnableCheck = metricsContainer.find(".metricsEnableCheck");
1302
1303
  metricsSection.hide();
1304
+ if (templateConfig.showBorder === false) {
1305
+ metricsSection.find(".editorsectionheading").hide();
1306
+ metricsSection.find(".editorgroupborder").css({
1307
+ border: "none",
1308
+ padding: 0,
1309
+ margin: 0
1310
+ });
1311
+ }
1312
+ if (templateConfig.showEnable === false) {
1313
+ metricsEnableCheck.hide();
1314
+ metricsEnabledSection.show();
1315
+ }
1303
1316
  let getMetricsProviderTypes = async function() {
1304
1317
  let types = [];
1305
1318
  await $.ajax({
@@ -1452,6 +1465,9 @@ Click **Create New Group** to create a new WhatsApp group from within Node-RED.
1452
1465
  node = this;
1453
1466
  var selectedProvider = $("#metrics-selector").val();
1454
1467
  node.metricsReference = (selectedProvider && selectedProvider !== "_ADD_") ? selectedProvider : '';
1468
+ if (templateConfig.showEnable === false) {
1469
+ node.metricsEnabled = !!node.metricsReference;
1470
+ }
1455
1471
  }
1456
1472
  },
1457
1473
  oneditcancel: function() {},
@@ -1493,13 +1509,14 @@ Click **Create New Group** to create a new WhatsApp group from within Node-RED.
1493
1509
  </div>
1494
1510
  <div class="editorgroupborder">
1495
1511
  <div class="form-row nomargin logEnableCheck">
1496
- <input type="checkbox" id="node-input-logEnabled" placeholder="logEnabled" value="false" style="margin:8px 0 10px 102px; width:20px;">
1497
- <label style="width:auto" for="node-input-logEnabled"><span>Enable Logging</span></label>
1512
+ <label class="towb_editorlabel">&nbsp;</label>
1513
+ <input class="towb_checkbox" type="checkbox" id="node-input-logEnabled" placeholder="logEnabled" value="false">
1514
+ <label class="towb_checkboxlabel" for="node-input-logEnabled"><span>Enable Logging</span></label>
1498
1515
  </div>
1499
1516
 
1500
1517
  <div id="section_logEnabled">
1501
1518
  <div class="form-row nomargin">
1502
- <label for="logger-selector">Logger</label>
1519
+ <label class="towb_editorlabel" for="logger-selector">Logger</label>
1503
1520
  <div style="width: 70%; display: inline-flex;">
1504
1521
  <select id="logger-selector" style="flex-grow: 1;" class="">
1505
1522
  <option value="_ADD_">none</option>
@@ -1514,8 +1531,9 @@ Click **Create New Group** to create a new WhatsApp group from within Node-RED.
1514
1531
  </div>
1515
1532
 
1516
1533
  <div class="form-row nomargin">
1517
- <input type="checkbox" id="node-input-logTemplateOverrideEnabled" placeholder="" value="false" style="margin:8px 0 10px 102px; width:20px;">
1518
- <label style="width:auto" for="node-input-logTemplateOverrideEnabled"><span>Override Template</span></label>
1534
+ <label class="towb_editorlabel">&nbsp;</label>
1535
+ <input class="towb_checkbox" type="checkbox" id="node-input-logTemplateOverrideEnabled" placeholder="" value="false">
1536
+ <label class="towb_checkboxlabel" for="node-input-logTemplateOverrideEnabled"><span>Override Template</span></label>
1519
1537
  </div>
1520
1538
 
1521
1539
  <div id="section_logTemplateOverrideEnabled">
@@ -1537,8 +1555,9 @@ Click **Create New Group** to create a new WhatsApp group from within Node-RED.
1537
1555
  </div>
1538
1556
  <div class="editorgroupborder">
1539
1557
  <div class="form-row nomargin metricsEnableCheck">
1540
- <input type="checkbox" id="node-input-metricsEnabled" value="false" style="margin:8px 0 10px 102px; width:20px;" />
1541
- <label style="width:auto" for="node-input-metricsEnabled"><span>Enable Metrics</span></label>
1558
+ <label class="towb_editorlabel">&nbsp;</label>
1559
+ <input class="towb_checkbox" type="checkbox" id="node-input-metricsEnabled" value="false" />
1560
+ <label class="towb_checkboxlabel" for="node-input-metricsEnabled"><span>Enable Metrics</span></label>
1542
1561
  </div>
1543
1562
 
1544
1563
  <div id="section_metricsEnabled">
@@ -1891,7 +1910,20 @@ Select the message type from the dropdown, then fill in the value fields:
1891
1910
  let metricsSection = $("#section_metricsconfig");
1892
1911
  let metricsContainer = metricsEnabled.closest(".editorgroupborder");
1893
1912
  let metricsEnabledSection = metricsContainer.find("#section_metricsEnabled");
1913
+ let metricsEnableCheck = metricsContainer.find(".metricsEnableCheck");
1894
1914
  metricsSection.hide();
1915
+ if (templateConfig.showBorder === false) {
1916
+ metricsSection.find(".editorsectionheading").hide();
1917
+ metricsSection.find(".editorgroupborder").css({
1918
+ border: "none",
1919
+ padding: 0,
1920
+ margin: 0
1921
+ });
1922
+ }
1923
+ if (templateConfig.showEnable === false) {
1924
+ metricsEnableCheck.hide();
1925
+ metricsEnabledSection.show();
1926
+ }
1895
1927
  let getMetricsProviderTypes = async function() {
1896
1928
  let types = [];
1897
1929
  await $.ajax({
@@ -2044,6 +2076,9 @@ Select the message type from the dropdown, then fill in the value fields:
2044
2076
  node = this;
2045
2077
  var selectedProvider = $("#metrics-selector").val();
2046
2078
  node.metricsReference = (selectedProvider && selectedProvider !== "_ADD_") ? selectedProvider : '';
2079
+ if (templateConfig.showEnable === false) {
2080
+ node.metricsEnabled = !!node.metricsReference;
2081
+ }
2047
2082
  }
2048
2083
  },
2049
2084
  oneditcancel: function() {},
@@ -2097,13 +2132,14 @@ Select the message type from the dropdown, then fill in the value fields:
2097
2132
  </div>
2098
2133
  <div class="editorgroupborder">
2099
2134
  <div class="form-row nomargin logEnableCheck">
2100
- <input type="checkbox" id="node-input-logEnabled" placeholder="logEnabled" value="false" style="margin:8px 0 10px 102px; width:20px;">
2101
- <label style="width:auto" for="node-input-logEnabled"><span>Enable Logging</span></label>
2135
+ <label class="towb_editorlabel">&nbsp;</label>
2136
+ <input class="towb_checkbox" type="checkbox" id="node-input-logEnabled" placeholder="logEnabled" value="false">
2137
+ <label class="towb_checkboxlabel" for="node-input-logEnabled"><span>Enable Logging</span></label>
2102
2138
  </div>
2103
2139
 
2104
2140
  <div id="section_logEnabled">
2105
2141
  <div class="form-row nomargin">
2106
- <label for="logger-selector">Logger</label>
2142
+ <label class="towb_editorlabel" for="logger-selector">Logger</label>
2107
2143
  <div style="width: 70%; display: inline-flex;">
2108
2144
  <select id="logger-selector" style="flex-grow: 1;" class="">
2109
2145
  <option value="_ADD_">none</option>
@@ -2118,8 +2154,9 @@ Select the message type from the dropdown, then fill in the value fields:
2118
2154
  </div>
2119
2155
 
2120
2156
  <div class="form-row nomargin">
2121
- <input type="checkbox" id="node-input-logTemplateOverrideEnabled" placeholder="" value="false" style="margin:8px 0 10px 102px; width:20px;">
2122
- <label style="width:auto" for="node-input-logTemplateOverrideEnabled"><span>Override Template</span></label>
2157
+ <label class="towb_editorlabel">&nbsp;</label>
2158
+ <input class="towb_checkbox" type="checkbox" id="node-input-logTemplateOverrideEnabled" placeholder="" value="false">
2159
+ <label class="towb_checkboxlabel" for="node-input-logTemplateOverrideEnabled"><span>Override Template</span></label>
2123
2160
  </div>
2124
2161
 
2125
2162
  <div id="section_logTemplateOverrideEnabled">
@@ -2141,8 +2178,9 @@ Select the message type from the dropdown, then fill in the value fields:
2141
2178
  </div>
2142
2179
  <div class="editorgroupborder">
2143
2180
  <div class="form-row nomargin metricsEnableCheck">
2144
- <input type="checkbox" id="node-input-metricsEnabled" value="false" style="margin:8px 0 10px 102px; width:20px;" />
2145
- <label style="width:auto" for="node-input-metricsEnabled"><span>Enable Metrics</span></label>
2181
+ <label class="towb_editorlabel">&nbsp;</label>
2182
+ <input class="towb_checkbox" type="checkbox" id="node-input-metricsEnabled" value="false" />
2183
+ <label class="towb_checkboxlabel" for="node-input-metricsEnabled"><span>Enable Metrics</span></label>
2146
2184
  </div>
2147
2185
 
2148
2186
  <div id="section_metricsEnabled">
@@ -2438,7 +2476,20 @@ Each row in the **Messages** list is sent as a separate WhatsApp message, in ord
2438
2476
  let metricsSection = $("#section_metricsconfig");
2439
2477
  let metricsContainer = metricsEnabled.closest(".editorgroupborder");
2440
2478
  let metricsEnabledSection = metricsContainer.find("#section_metricsEnabled");
2479
+ let metricsEnableCheck = metricsContainer.find(".metricsEnableCheck");
2441
2480
  metricsSection.hide();
2481
+ if (templateConfig.showBorder === false) {
2482
+ metricsSection.find(".editorsectionheading").hide();
2483
+ metricsSection.find(".editorgroupborder").css({
2484
+ border: "none",
2485
+ padding: 0,
2486
+ margin: 0
2487
+ });
2488
+ }
2489
+ if (templateConfig.showEnable === false) {
2490
+ metricsEnableCheck.hide();
2491
+ metricsEnabledSection.show();
2492
+ }
2442
2493
  let getMetricsProviderTypes = async function() {
2443
2494
  let types = [];
2444
2495
  await $.ajax({
@@ -2579,6 +2630,9 @@ Each row in the **Messages** list is sent as a separate WhatsApp message, in ord
2579
2630
  node = this;
2580
2631
  var selectedProvider = $("#metrics-selector").val();
2581
2632
  node.metricsReference = (selectedProvider && selectedProvider !== "_ADD_") ? selectedProvider : '';
2633
+ if (templateConfig.showEnable === false) {
2634
+ node.metricsEnabled = !!node.metricsReference;
2635
+ }
2582
2636
  }
2583
2637
  },
2584
2638
  oneditcancel: function() {},
@@ -2638,13 +2692,14 @@ Each row in the **Messages** list is sent as a separate WhatsApp message, in ord
2638
2692
  </div>
2639
2693
  <div class="editorgroupborder">
2640
2694
  <div class="form-row nomargin logEnableCheck">
2641
- <input type="checkbox" id="node-input-logEnabled" placeholder="logEnabled" value="false" style="margin:8px 0 10px 102px; width:20px;">
2642
- <label style="width:auto" for="node-input-logEnabled"><span>Enable Logging</span></label>
2695
+ <label class="towb_editorlabel">&nbsp;</label>
2696
+ <input class="towb_checkbox" type="checkbox" id="node-input-logEnabled" placeholder="logEnabled" value="false">
2697
+ <label class="towb_checkboxlabel" for="node-input-logEnabled"><span>Enable Logging</span></label>
2643
2698
  </div>
2644
2699
 
2645
2700
  <div id="section_logEnabled">
2646
2701
  <div class="form-row nomargin">
2647
- <label for="logger-selector">Logger</label>
2702
+ <label class="towb_editorlabel" for="logger-selector">Logger</label>
2648
2703
  <div style="width: 70%; display: inline-flex;">
2649
2704
  <select id="logger-selector" style="flex-grow: 1;" class="">
2650
2705
  <option value="_ADD_">none</option>
@@ -2659,8 +2714,9 @@ Each row in the **Messages** list is sent as a separate WhatsApp message, in ord
2659
2714
  </div>
2660
2715
 
2661
2716
  <div class="form-row nomargin">
2662
- <input type="checkbox" id="node-input-logTemplateOverrideEnabled" placeholder="" value="false" style="margin:8px 0 10px 102px; width:20px;">
2663
- <label style="width:auto" for="node-input-logTemplateOverrideEnabled"><span>Override Template</span></label>
2717
+ <label class="towb_editorlabel">&nbsp;</label>
2718
+ <input class="towb_checkbox" type="checkbox" id="node-input-logTemplateOverrideEnabled" placeholder="" value="false">
2719
+ <label class="towb_checkboxlabel" for="node-input-logTemplateOverrideEnabled"><span>Override Template</span></label>
2664
2720
  </div>
2665
2721
 
2666
2722
  <div id="section_logTemplateOverrideEnabled">
@@ -2682,8 +2738,9 @@ Each row in the **Messages** list is sent as a separate WhatsApp message, in ord
2682
2738
  </div>
2683
2739
  <div class="editorgroupborder">
2684
2740
  <div class="form-row nomargin metricsEnableCheck">
2685
- <input type="checkbox" id="node-input-metricsEnabled" value="false" style="margin:8px 0 10px 102px; width:20px;" />
2686
- <label style="width:auto" for="node-input-metricsEnabled"><span>Enable Metrics</span></label>
2741
+ <label class="towb_editorlabel">&nbsp;</label>
2742
+ <input class="towb_checkbox" type="checkbox" id="node-input-metricsEnabled" value="false" />
2743
+ <label class="towb_checkboxlabel" for="node-input-metricsEnabled"><span>Enable Metrics</span></label>
2687
2744
  </div>
2688
2745
 
2689
2746
  <div id="section_metricsEnabled">