@hpcc-js/form 3.2.9 → 3.2.10

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/dist/index.js CHANGED
@@ -1,16 +1,14 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
3
2
  var __name = (target, value2) => __defProp(target, "name", { value: value2, configurable: true });
4
- var __publicField = (obj, key, value2) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value2);
5
3
  import { IInput } from "@hpcc-js/api";
6
4
  import { HTMLWidget, rgb, WidgetArray, d3Event, select, SVGWidget, scaleLinear, timeParse, drag, timeFormat, format } from "@hpcc-js/common";
7
5
  const PKG_NAME = "@hpcc-js/form";
8
6
  const PKG_VERSION = "3.1.0";
9
7
  const BUILD_VERSION = "3.2.1";
10
8
  const _Button = class _Button extends HTMLWidget {
9
+ _inputElement = [];
11
10
  constructor() {
12
11
  super();
13
- __publicField(this, "_inputElement", []);
14
12
  IInput.call(this);
15
13
  this._tag = "div";
16
14
  }
@@ -36,9 +34,9 @@ let Button = _Button;
36
34
  Button.prototype._class += " form_Button";
37
35
  Button.prototype.implements(IInput.prototype);
38
36
  const _CheckBox = class _CheckBox extends HTMLWidget {
37
+ _inputElement = [];
39
38
  constructor() {
40
39
  super();
41
- __publicField(this, "_inputElement", []);
42
40
  IInput.call(this);
43
41
  this._tag = "div";
44
42
  }
@@ -105,9 +103,9 @@ CheckBox.prototype._class += " form_CheckBox";
105
103
  CheckBox.prototype.implements(IInput.prototype);
106
104
  CheckBox.prototype.publish("selectOptions", [], "array", "Array of options used to fill a dropdown list");
107
105
  const _ColorInput = class _ColorInput extends HTMLWidget {
106
+ _inputElement = [];
108
107
  constructor() {
109
108
  super();
110
- __publicField(this, "_inputElement", []);
111
109
  IInput.call(this);
112
110
  this._tag = "div";
113
111
  }
@@ -155,13 +153,13 @@ let ColorInput = _ColorInput;
155
153
  ColorInput.prototype._class += " form_ColorInput";
156
154
  ColorInput.prototype.implements(IInput.prototype);
157
155
  const _Form = class _Form extends HTMLWidget {
156
+ tbody;
157
+ tfoot;
158
+ btntd;
159
+ _controls;
160
+ _maxCols;
158
161
  constructor() {
159
162
  super();
160
- __publicField(this, "tbody");
161
- __publicField(this, "tfoot");
162
- __publicField(this, "btntd");
163
- __publicField(this, "_controls");
164
- __publicField(this, "_maxCols");
165
163
  this._tag = "form";
166
164
  }
167
165
  data(_) {
@@ -407,10 +405,10 @@ Form.prototype.publish("showSubmit", true, "boolean", "Show Submit/Cancel Contro
407
405
  Form.prototype.publish("omitBlank", false, "boolean", "Drop Blank Fields From Submit");
408
406
  Form.prototype.publish("allowEmptyRequest", false, "boolean", "Allow Blank Form to be Submitted");
409
407
  const _Input = class _Input extends HTMLWidget {
408
+ _inputElement = [];
409
+ _labelElement = [];
410
410
  constructor() {
411
411
  super();
412
- __publicField(this, "_inputElement", []);
413
- __publicField(this, "_labelElement", []);
414
412
  IInput.call(this);
415
413
  this._tag = "div";
416
414
  }
@@ -524,11 +522,11 @@ __name(_FieldForm, "FieldForm");
524
522
  let FieldForm = _FieldForm;
525
523
  FieldForm.prototype._class += " form_FieldForm";
526
524
  const _InputRange = class _InputRange extends HTMLWidget {
525
+ _inputElement = [];
526
+ _labelElement = [];
527
+ _rangeData = [];
527
528
  constructor() {
528
529
  super();
529
- __publicField(this, "_inputElement", []);
530
- __publicField(this, "_labelElement", []);
531
- __publicField(this, "_rangeData", []);
532
530
  IInput.call(this);
533
531
  this._tag = "div";
534
532
  }
@@ -570,10 +568,10 @@ InputRange.prototype.publish("type", "text", "set", "InputRange type", ["number"
570
568
  InputRange.prototype.publish("inlineLabel", null, "string", "InputRange Label", null, { optional: true });
571
569
  InputRange.prototype.publish("value", ["", ""], "array", "Input Current Value", null, { override: true });
572
570
  const _OnOff = class _OnOff extends HTMLWidget {
571
+ _inputElement = [];
572
+ _input;
573
573
  constructor() {
574
574
  super();
575
- __publicField(this, "_inputElement", []);
576
- __publicField(this, "_input");
577
575
  IInput.call(this);
578
576
  this._tag = "div";
579
577
  }
@@ -631,9 +629,9 @@ OnOff.prototype.publish("offColor", "#ecf0f1", "html-color", "Background color w
631
629
  OnOff.prototype.publish("onFontColor", "#2c3e50", "html-color", "Font color when 'ON'");
632
630
  OnOff.prototype.publish("offFontColor", "#7f8c8d", "html-color", "Font color when 'OFF'");
633
631
  const _Radio = class _Radio extends HTMLWidget {
632
+ _inputElement = [];
634
633
  constructor() {
635
634
  super();
636
- __publicField(this, "_inputElement", []);
637
635
  IInput.call(this);
638
636
  this._tag = "div";
639
637
  }
@@ -681,9 +679,9 @@ Radio.prototype._class += " form_Radio";
681
679
  Radio.prototype.implements(IInput.prototype);
682
680
  Radio.prototype.publish("selectOptions", [], "array", "Array of options used to fill a dropdown list");
683
681
  const _Range = class _Range extends HTMLWidget {
682
+ _inputElement = [];
684
683
  constructor() {
685
684
  super();
686
- __publicField(this, "_inputElement", []);
687
685
  IInput.call(this);
688
686
  this._tag = "div";
689
687
  }
@@ -749,9 +747,9 @@ Range.prototype.publish("low", null, "number", "Minimum value for Range input");
749
747
  Range.prototype.publish("high", null, "number", "Maximum value for Range input");
750
748
  Range.prototype.publish("step", null, "number", "Step value for Range input");
751
749
  const _Select = class _Select extends HTMLWidget {
750
+ _inputElement = [];
752
751
  constructor() {
753
752
  super();
754
- __publicField(this, "_inputElement", []);
755
753
  IInput.call(this);
756
754
  this._tag = "div";
757
755
  }
@@ -793,32 +791,19 @@ Select.prototype.implements(IInput.prototype);
793
791
  Select.prototype.publish("selectOptions", [], "array", "Array of options used to fill a dropdown list");
794
792
  Select.prototype.publish("maxWidth", 120, "number", "Width", null, { optional: true });
795
793
  const _Slider = class _Slider extends SVGWidget {
794
+ xScale;
795
+ moveMode;
796
+ moveStartPos;
797
+ prevValue;
798
+ slider;
799
+ handleLeft;
800
+ handleLeftPos = 0;
801
+ handleLeftStartPos;
802
+ handleRight;
803
+ handleRightPos = 0;
804
+ handleRightStartPos;
796
805
  constructor() {
797
806
  super();
798
- __publicField(this, "xScale");
799
- __publicField(this, "moveMode");
800
- __publicField(this, "moveStartPos");
801
- __publicField(this, "prevValue");
802
- __publicField(this, "slider");
803
- __publicField(this, "handleLeft");
804
- __publicField(this, "handleLeftPos", 0);
805
- __publicField(this, "handleLeftStartPos");
806
- __publicField(this, "handleRight");
807
- __publicField(this, "handleRightPos", 0);
808
- __publicField(this, "handleRightStartPos");
809
- __publicField(this, "handlePath", /* @__PURE__ */ __name(function(d) {
810
- const e = +(d === "r");
811
- const x = e ? 1 : -1;
812
- const xOffset = this.allowRange() ? 0.5 : 0;
813
- const y = 18;
814
- let retVal = "M" + xOffset * x + "," + y + "A6,6 0 0 " + e + " " + 6.5 * x + "," + (y + 6) + "V" + (2 * y - 6) + "A6,6 0 0 " + e + " " + xOffset * x + "," + 2 * y;
815
- if (this.allowRange()) {
816
- retVal += "ZM" + 2.5 * x + "," + (y + 8) + "V" + (2 * y - 8) + "M" + 4.5 * x + "," + (y + 8) + "V" + (2 * y - 8);
817
- } else {
818
- retVal += "M" + 1 * x + "," + (y + 8) + "V" + (2 * y - 8);
819
- }
820
- return retVal;
821
- }, "handlePath"));
822
807
  IInput.call(this);
823
808
  }
824
809
  enter(domNode, element) {
@@ -970,6 +955,19 @@ const _Slider = class _Slider extends SVGWidget {
970
955
  const value2 = this.xScale.invert(pos);
971
956
  return this.xScale(this.low() + Math.round((value2 - this.low()) / this.step()) * this.step());
972
957
  }
958
+ handlePath = /* @__PURE__ */ __name(function(d) {
959
+ const e = +(d === "r");
960
+ const x = e ? 1 : -1;
961
+ const xOffset = this.allowRange() ? 0.5 : 0;
962
+ const y = 18;
963
+ let retVal = "M" + xOffset * x + "," + y + "A6,6 0 0 " + e + " " + 6.5 * x + "," + (y + 6) + "V" + (2 * y - 6) + "A6,6 0 0 " + e + " " + xOffset * x + "," + 2 * y;
964
+ if (this.allowRange()) {
965
+ retVal += "ZM" + 2.5 * x + "," + (y + 8) + "V" + (2 * y - 8) + "M" + 4.5 * x + "," + (y + 8) + "V" + (2 * y - 8);
966
+ } else {
967
+ retVal += "M" + 1 * x + "," + (y + 8) + "V" + (2 * y - 8);
968
+ }
969
+ return retVal;
970
+ }, "handlePath");
973
971
  };
974
972
  __name(_Slider, "Slider");
975
973
  let Slider = _Slider;
@@ -1058,4 +1056,4 @@ export {
1058
1056
  TextArea
1059
1057
  };
1060
1058
  //# sourceMappingURL=index.js.map
1061
- !function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode(".form_Input input,.form_Input select,.form_Input button,.form_Input textarea{padding:2px}.form_Input button{cursor:pointer}.form_Input input.color-text{width:120px}.form_Input input.color-text+input{width:57px;position:absolute}.form_Input textarea,.form_Input input[type=textbox]{width:100%;box-sizing:border-box;display:block}.form_Input ul{list-style-type:none;float:left;padding:0;margin:0}.form_Input li{float:left;list-style-position:inside}.form_Form{color:#404040}.form_Form tbody td{white-space:nowrap;border:1px solid #E5E5E5}.form_Form td.prompt{padding:2px;vertical-align:middle;background-color:#e5e5e5}.form_Form td.input{padding:2px;width:100%;vertical-align:middle}.form_Form td.input .common_HTMLWidget ul{margin:0}.form_Form tfoot button{margin:5px}.form_Form tbody tr:hover{background-color:#fafafa}.form_Form .form_Button button{background-position:-1px -1px;bottom:0;box-sizing:border-box;color:#24292e;cursor:pointer;height:28px;left:0;overflow-wrap:break-word;position:relative;right:0;text-decoration:none solid rgb(36,41,46);top:0;vertical-align:middle;white-space:nowrap;word-wrap:break-word;column-rule-color:#24292e;perspective-origin:57.2938px 14px;transform-origin:57.2938px 14px;-webkit-user-select:none;user-select:none;background:#eff3f6 linear-gradient(-180deg,#fafbfc,#eff3f6 90%) repeat-x scroll -1px -1px / 110% 110% padding-box border-box;border:1px solid rgba(27,31,35,.2);border-radius:3px;outline:rgb(36,41,46) none 0px;padding:3px 10px}.form_Form .form_Button button[disabled=disabled]{background:#dbdfe2}.form_Form .form_Button button:focus{box-shadow:0 0 0 .2em #0366d64d}.form_Form .form_Button button:hover{background:#dbdfe2}.form_Form .form_Button.default button{color:#fff;text-decoration:none solid rgb(255,255,255);word-wrap:break-word;column-rule-color:#fff;perspective-origin:44.975px 17px;transform-origin:44.975px 17px;background:#28a745 linear-gradient(-180deg,#34d058,#28a745 90%) repeat-x scroll -1px -1px / 110% 110% padding-box border-box;outline:rgb(255,255,255) none 0px}.form_Form .form_Button.default button[disabled=disabled],.form_Form .form_Button.default button[disabled=disabled]:hover{background:#dbdfe2}.form_Form .form_Button.default button:hover{background:#149331}.onoffswitch-checkbox{display:none}.onoffswitch{position:relative;height:20px;width:100px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:1px solid #999999;height:20px}.onoffswitch-inner{position:relative;display:block;transition:margin .3s ease-in 0s}.onoffswitch-inner>.onoffswitch-offText,.onoffswitch-inner>.onoffswitch-onText{height:100%}.onoffswitch-inner>.onoffswitch-offText{font-weight:700;position:absolute;right:0;transition:all .3s ease-in 0s;width:100%;text-align:right}.onoffswitch-inner>.onoffswitch-onText{font-weight:700;position:absolute;left:-100%;transition:all .3s ease-in 0s;width:100%;text-align:left}.onoffswitch-switch{display:block;width:20px;margin:-1px;background:#fff;position:absolute;top:0;bottom:0;right:78px;border:1px solid #999999;transition:all .3s ease-in 0s;left:4px}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner>.onoffswitch-offText{right:-100%}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner>.onoffswitch-onText{left:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{left:calc(100% - 20px)}.form_Slider .ticks{font:10px sans-serif}.form_Slider .track,.form_Slider .track-inset,.form_Slider .track-overlay{stroke-linecap:round}.form_Slider .track{stroke:#000;stroke-opacity:.3;stroke-width:10px}.form_Slider .track-inset{stroke:#ddd;stroke-width:8px}.form_Slider .track-overlay{pointer-events:stroke;stroke-width:50px;stroke:transparent;cursor:crosshair}.form_Slider .handle{fill:#fff;stroke:#000;stroke-opacity:.5;stroke-width:1.25px}.form_Slider .tick-line{stroke:#000;stroke-opacity:.5;stroke-width:1px;shape-rendering:crispEdges}")),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
1059
+ !function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode(".form_Input input,.form_Input select,.form_Input button,.form_Input textarea{padding:2px}.form_Input button{cursor:pointer}.form_Input input.color-text{width:120px}.form_Input input.color-text+input{width:57px;position:absolute}.form_Input textarea,.form_Input input[type=textbox]{width:100%;box-sizing:border-box;display:block}.form_Input ul{list-style-type:none;float:left;padding:0;margin:0}.form_Input li{float:left;list-style-position:inside}.form_Form{color:#404040}.form_Form tbody td{white-space:nowrap;border:1px solid #E5E5E5}.form_Form td.prompt{padding:2px;vertical-align:middle;background-color:#e5e5e5}.form_Form td.input{padding:2px;width:100%;vertical-align:middle}.form_Form td.input .common_HTMLWidget ul{margin:0}.form_Form tfoot button{margin:5px}.form_Form tbody tr:hover{background-color:#fafafa}.form_Form .form_Button button{background-position:-1px -1px;box-sizing:border-box;color:#24292e;cursor:pointer;height:28px;inset:0;overflow-wrap:break-word;position:relative;text-decoration:none solid rgb(36,41,46);vertical-align:middle;white-space:nowrap;word-wrap:break-word;column-rule-color:#24292e;perspective-origin:57.2938px 14px;transform-origin:57.2938px 14px;-webkit-user-select:none;user-select:none;background:#eff3f6 linear-gradient(-180deg,#fafbfc,#eff3f6 90%) repeat-x scroll -1px -1px / 110% 110% padding-box border-box;border:1px solid rgba(27,31,35,.2);border-radius:3px;outline:rgb(36,41,46) none 0px;padding:3px 10px}.form_Form .form_Button button[disabled=disabled]{background:#dbdfe2}.form_Form .form_Button button:focus{box-shadow:0 0 0 .2em #0366d64d}.form_Form .form_Button button:hover{background:#dbdfe2}.form_Form .form_Button.default button{color:#fff;text-decoration:none solid rgb(255,255,255);word-wrap:break-word;column-rule-color:#fff;perspective-origin:44.975px 17px;transform-origin:44.975px 17px;background:#28a745 linear-gradient(-180deg,#34d058,#28a745 90%) repeat-x scroll -1px -1px / 110% 110% padding-box border-box;outline:rgb(255,255,255) none 0px}.form_Form .form_Button.default button[disabled=disabled],.form_Form .form_Button.default button[disabled=disabled]:hover{background:#dbdfe2}.form_Form .form_Button.default button:hover{background:#149331}.onoffswitch-checkbox{display:none}.onoffswitch{position:relative;height:20px;width:100px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:1px solid #999999;height:20px}.onoffswitch-inner{position:relative;display:block;transition:margin .3s ease-in 0s}.onoffswitch-inner>.onoffswitch-offText,.onoffswitch-inner>.onoffswitch-onText{height:100%}.onoffswitch-inner>.onoffswitch-offText{font-weight:700;position:absolute;right:0;transition:all .3s ease-in 0s;width:100%;text-align:right}.onoffswitch-inner>.onoffswitch-onText{font-weight:700;position:absolute;left:-100%;transition:all .3s ease-in 0s;width:100%;text-align:left}.onoffswitch-switch{display:block;width:20px;margin:-1px;background:#fff;position:absolute;border:1px solid #999999;transition:all .3s ease-in 0s;inset:0 78px 0 4px}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner>.onoffswitch-offText{right:-100%}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner>.onoffswitch-onText{left:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{left:calc(100% - 20px)}.form_Slider .ticks{font:10px sans-serif}.form_Slider .track,.form_Slider .track-inset,.form_Slider .track-overlay{stroke-linecap:round}.form_Slider .track{stroke:#000;stroke-opacity:.3;stroke-width:10px}.form_Slider .track-inset{stroke:#ddd;stroke-width:8px}.form_Slider .track-overlay{pointer-events:stroke;stroke-width:50px;stroke:transparent;cursor:crosshair}.form_Slider .handle{fill:#fff;stroke:#000;stroke-opacity:.5;stroke-width:1.25px}.form_Slider .tick-line{stroke:#000;stroke-opacity:.5;stroke-width:1px;shape-rendering:crispEdges}")),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();