@hpcc-js/form 2.11.2 → 3.1.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/dist/index.js +227 -1288
- package/dist/index.js.map +7 -1
- package/package.json +31 -34
- package/src/Button.ts +11 -10
- package/src/CheckBox.ts +21 -13
- package/src/ColorInput.ts +16 -10
- package/src/FieldForm.ts +2 -2
- package/src/Form.ts +20 -13
- package/src/Input.ts +39 -24
- package/src/InputRange.ts +24 -15
- package/src/OnOff.ts +15 -10
- package/src/Radio.ts +21 -13
- package/src/Range.ts +33 -21
- package/src/Select.ts +24 -15
- package/src/Slider.ts +7 -3
- package/src/TextArea.ts +19 -12
- package/src/__package__.ts +2 -2
- package/src/index.ts +14 -14
- package/types/Button.d.ts +10 -21
- package/types/CheckBox.d.ts +17 -26
- package/types/ColorInput.d.ts +14 -21
- package/types/FieldForm.d.ts +1 -2
- package/types/Form.d.ts +18 -27
- package/types/Input.d.ts +28 -42
- package/types/InputRange.d.ts +20 -31
- package/types/OnOff.d.ts +12 -21
- package/types/Radio.d.ts +17 -26
- package/types/Range.d.ts +29 -46
- package/types/Select.d.ts +20 -31
- package/types/Slider.d.ts +3 -3
- package/types/TextArea.d.ts +18 -31
- package/types/__package__.d.ts +2 -3
- package/types/index.d.ts +14 -15
- package/dist/index.es6.js +0 -1271
- package/dist/index.es6.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/types/Button.d.ts.map +0 -1
- package/types/CheckBox.d.ts.map +0 -1
- package/types/ColorInput.d.ts.map +0 -1
- package/types/FieldForm.d.ts.map +0 -1
- package/types/Form.d.ts.map +0 -1
- package/types/Input.d.ts.map +0 -1
- package/types/InputRange.d.ts.map +0 -1
- package/types/OnOff.d.ts.map +0 -1
- package/types/Radio.d.ts.map +0 -1
- package/types/Range.d.ts.map +0 -1
- package/types/Select.d.ts.map +0 -1
- package/types/Slider.d.ts.map +0 -1
- package/types/TextArea.d.ts.map +0 -1
- package/types/__package__.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types-3.4/Button.d.ts +0 -29
- package/types-3.4/CheckBox.d.ts +0 -35
- package/types-3.4/ColorInput.d.ts +0 -29
- package/types-3.4/FieldForm.d.ts +0 -11
- package/types-3.4/Form.d.ts +0 -53
- package/types-3.4/Input.d.ts +0 -51
- package/types-3.4/InputRange.d.ts +0 -41
- package/types-3.4/OnOff.d.ts +0 -58
- package/types-3.4/Radio.d.ts +0 -34
- package/types-3.4/Range.d.ts +0 -55
- package/types-3.4/Select.d.ts +0 -40
- package/types-3.4/Slider.d.ts +0 -86
- package/types-3.4/TextArea.d.ts +0 -37
- package/types-3.4/__package__.d.ts +0 -4
- package/types-3.4/index.d.ts +0 -15
package/package.json
CHANGED
|
@@ -1,55 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/form",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "hpcc-js - Viz Form",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"*": [
|
|
13
|
-
"types-3.4/index.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"default": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./dist/*": "./dist/*"
|
|
16
12
|
},
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"browser": "./dist/index.js",
|
|
15
|
+
"types": "./types/index.d.ts",
|
|
17
16
|
"files": [
|
|
18
17
|
"dist/*",
|
|
18
|
+
"src/*",
|
|
19
19
|
"types/*",
|
|
20
|
-
"
|
|
21
|
-
"src/*"
|
|
20
|
+
"font-awesome/**/*"
|
|
22
21
|
],
|
|
23
22
|
"scripts": {
|
|
24
|
-
"clean": "rimraf --glob lib* types dist *.tsbuildinfo",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"bundle-watch": "npm run bundle -- -w",
|
|
31
|
-
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
|
|
32
|
-
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
|
|
33
|
-
"build": "npm run compile-es6 && npm run bundle",
|
|
34
|
-
"watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch",
|
|
35
|
-
"stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js",
|
|
23
|
+
"clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo",
|
|
24
|
+
"bundle": "node esbuild.js",
|
|
25
|
+
"bundle-watch": "npm run bundle -- --development --watch",
|
|
26
|
+
"gen-types": "tsc --project tsconfig.json",
|
|
27
|
+
"gen-types-watch": "npm run gen-types -- --watch",
|
|
28
|
+
"build": "run-p gen-types bundle",
|
|
36
29
|
"lint": "eslint ./src",
|
|
30
|
+
"lint-fix": "eslint --fix src/**/*.ts",
|
|
37
31
|
"docs": "typedoc --options tdoptions.json .",
|
|
38
|
-
"
|
|
32
|
+
"test-browser": "vitest run --project browser",
|
|
33
|
+
"test": "vitest run",
|
|
34
|
+
"coverage": "vitest run --coverage",
|
|
35
|
+
"update": "npx --yes npm-check-updates -u -t minor",
|
|
36
|
+
"update-major": "npx --yes npm-check-updates -u"
|
|
39
37
|
},
|
|
40
38
|
"dependencies": {
|
|
41
|
-
"@hpcc-js/api": "^2.
|
|
42
|
-
"@hpcc-js/chart": "^2.
|
|
43
|
-
"@hpcc-js/common": "^2.
|
|
39
|
+
"@hpcc-js/api": "^3.2.0",
|
|
40
|
+
"@hpcc-js/chart": "^3.2.0",
|
|
41
|
+
"@hpcc-js/common": "^3.2.0"
|
|
44
42
|
},
|
|
45
43
|
"devDependencies": {
|
|
46
|
-
"@hpcc-js/
|
|
44
|
+
"@hpcc-js/esbuild-plugins": "^1.3.0",
|
|
47
45
|
"d3-brush": "^1",
|
|
48
46
|
"d3-color": "3.1.0",
|
|
49
47
|
"d3-drag": "^1",
|
|
50
48
|
"d3-scale": "^1",
|
|
51
|
-
"d3-selection": "^1"
|
|
52
|
-
"tslib": "2.6.3"
|
|
49
|
+
"d3-selection": "^1"
|
|
53
50
|
},
|
|
54
51
|
"repository": {
|
|
55
52
|
"type": "git",
|
|
@@ -62,5 +59,5 @@
|
|
|
62
59
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
63
60
|
},
|
|
64
61
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
65
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "658c50fd965a7744ba8db675ba6878607c44d5e2"
|
|
66
63
|
}
|
package/src/Button.ts
CHANGED
|
@@ -36,16 +36,17 @@ export class Button extends HTMLWidget {
|
|
|
36
36
|
|
|
37
37
|
this._inputElement[0].text(this.value());
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
// IInput ---
|
|
41
|
-
name: { (): string; (_: string): Button };
|
|
42
|
-
name_exists: () => boolean;
|
|
43
|
-
label: { (): string; (_: string): Button };
|
|
44
|
-
label_exists: () => boolean;
|
|
45
|
-
value: { (): any; (_: any): Button };
|
|
46
|
-
value_exists: () => boolean;
|
|
47
|
-
validate: { (): string; (_: string): Button };
|
|
48
|
-
validate_exists: () => boolean;
|
|
49
39
|
}
|
|
50
40
|
Button.prototype._class += " form_Button";
|
|
51
41
|
Button.prototype.implements(IInput.prototype);
|
|
42
|
+
|
|
43
|
+
export interface Button {
|
|
44
|
+
name(): string;
|
|
45
|
+
name(_: string): Button;
|
|
46
|
+
label(): string;
|
|
47
|
+
label(_: string): Button;
|
|
48
|
+
value(): any;
|
|
49
|
+
value(_: any): Button;
|
|
50
|
+
validate(): string;
|
|
51
|
+
validate(_: string): Button;
|
|
52
|
+
}
|
package/src/CheckBox.ts
CHANGED
|
@@ -75,21 +75,29 @@ export class CheckBox extends HTMLWidget {
|
|
|
75
75
|
}
|
|
76
76
|
this._inputElement[0].html(optionHTML);
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
selectOptions: { (): any[]; (_: any[]): CheckBox };
|
|
80
|
-
selectOptions_exists: () => boolean;
|
|
81
|
-
|
|
82
|
-
// IInput ---
|
|
83
|
-
name: { (): string; (_: string): CheckBox };
|
|
84
|
-
name_exists: () => boolean;
|
|
85
|
-
label: { (): string; (_: string): CheckBox };
|
|
86
|
-
label_exists: () => boolean;
|
|
87
|
-
value: { (): any; (_: any): CheckBox };
|
|
88
|
-
value_exists: () => boolean;
|
|
89
|
-
validate: { (): string; (_: string): CheckBox };
|
|
90
|
-
validate_exists: () => boolean;
|
|
91
78
|
}
|
|
92
79
|
CheckBox.prototype._class += " form_CheckBox";
|
|
93
80
|
CheckBox.prototype.implements(IInput.prototype);
|
|
94
81
|
|
|
82
|
+
export interface CheckBox {
|
|
83
|
+
// IInput ---
|
|
84
|
+
name(): string;
|
|
85
|
+
name(_: string): this;
|
|
86
|
+
name_exists(): boolean;
|
|
87
|
+
label(): string;
|
|
88
|
+
label(_: string): this;
|
|
89
|
+
label_exists(): boolean;
|
|
90
|
+
value(): any;
|
|
91
|
+
value(_: any): this;
|
|
92
|
+
value_exists(): boolean;
|
|
93
|
+
validate(): string;
|
|
94
|
+
validate(_: string): this;
|
|
95
|
+
validate_exists(): boolean;
|
|
96
|
+
|
|
97
|
+
// Properties ---
|
|
98
|
+
selectOptions(): any[];
|
|
99
|
+
selectOptions(_: any[]): this;
|
|
100
|
+
selectOptions_exists(): boolean;
|
|
101
|
+
}
|
|
102
|
+
|
|
95
103
|
CheckBox.prototype.publish("selectOptions", [], "array", "Array of options used to fill a dropdown list");
|
package/src/ColorInput.ts
CHANGED
|
@@ -60,16 +60,22 @@ export class ColorInput extends HTMLWidget {
|
|
|
60
60
|
this._inputElement[1].style("height", (bbox.height - 2) + "px");
|
|
61
61
|
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
// IInput ---
|
|
65
|
-
name: { (): string; (_: string): ColorInput };
|
|
66
|
-
name_exists: () => boolean;
|
|
67
|
-
label: { (): string; (_: string): ColorInput };
|
|
68
|
-
label_exists: () => boolean;
|
|
69
|
-
value: { (): any; (_: any): ColorInput };
|
|
70
|
-
value_exists: () => boolean;
|
|
71
|
-
validate: { (): string; (_: string): ColorInput };
|
|
72
|
-
validate_exists: () => boolean;
|
|
73
63
|
}
|
|
74
64
|
ColorInput.prototype._class += " form_ColorInput";
|
|
75
65
|
ColorInput.prototype.implements(IInput.prototype);
|
|
66
|
+
|
|
67
|
+
export interface ColorInput {
|
|
68
|
+
// IInput ---
|
|
69
|
+
name(): string;
|
|
70
|
+
name(_: string): this;
|
|
71
|
+
name_exists(): boolean;
|
|
72
|
+
label(): string;
|
|
73
|
+
label(_: string): this;
|
|
74
|
+
label_exists(): boolean;
|
|
75
|
+
value(): any;
|
|
76
|
+
value(_: any): this;
|
|
77
|
+
value_exists(): boolean;
|
|
78
|
+
validate(): string;
|
|
79
|
+
validate(_: string): this;
|
|
80
|
+
validate_exists(): boolean;
|
|
81
|
+
}
|
package/src/FieldForm.ts
CHANGED
package/src/Form.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d3Event, HTMLWidget, select as d3Select, SVGWidget, Widget, WidgetArray } from "@hpcc-js/common";
|
|
2
|
-
import { Button } from "./Button";
|
|
2
|
+
import { Button } from "./Button.ts";
|
|
3
3
|
|
|
4
4
|
import "../src/Form.css";
|
|
5
5
|
|
|
@@ -308,21 +308,28 @@ export class Form extends HTMLWidget {
|
|
|
308
308
|
|
|
309
309
|
click(row, col, sel) {
|
|
310
310
|
}
|
|
311
|
-
|
|
312
|
-
validate: { (): boolean; (_: boolean): Form };
|
|
313
|
-
validate_exists: () => boolean;
|
|
314
|
-
inputs: { (): any[]; (_: any[]): Form };
|
|
315
|
-
inputs_exists: () => boolean;
|
|
316
|
-
inputs_reset: () => void;
|
|
317
|
-
showSubmit: { (): boolean; (_: boolean): Form };
|
|
318
|
-
showSubmit_exists: () => boolean;
|
|
319
|
-
omitBlank: { (): boolean; (_: boolean): Form };
|
|
320
|
-
omitBlank_exists: () => boolean;
|
|
321
|
-
allowEmptyRequest: { (): boolean; (_: boolean): Form };
|
|
322
|
-
allowEmptyRequest_exists: () => boolean;
|
|
323
311
|
}
|
|
324
312
|
Form.prototype._class += " form_Form";
|
|
325
313
|
|
|
314
|
+
export interface Form {
|
|
315
|
+
validate(): boolean;
|
|
316
|
+
validate(_: boolean): this;
|
|
317
|
+
validate_exists(): boolean;
|
|
318
|
+
inputs(): any[];
|
|
319
|
+
inputs(_: any[]): this;
|
|
320
|
+
inputs_exists(): boolean;
|
|
321
|
+
inputs_reset(): void;
|
|
322
|
+
showSubmit(): boolean;
|
|
323
|
+
showSubmit(_: boolean): this;
|
|
324
|
+
showSubmit_exists(): boolean;
|
|
325
|
+
omitBlank(): boolean;
|
|
326
|
+
omitBlank(_: boolean): this;
|
|
327
|
+
omitBlank_exists(): boolean;
|
|
328
|
+
allowEmptyRequest(): boolean;
|
|
329
|
+
allowEmptyRequest(_: boolean): this;
|
|
330
|
+
allowEmptyRequest_exists(): boolean;
|
|
331
|
+
}
|
|
332
|
+
|
|
326
333
|
Form.prototype.publish("validate", true, "boolean", "Enable/Disable input validation");
|
|
327
334
|
Form.prototype.publish("inputs", [], "widgetArray", "Array of input widgets", null, { render: false });
|
|
328
335
|
Form.prototype.publish("showSubmit", true, "boolean", "Show Submit/Cancel Controls");
|
package/src/Input.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IInput } from "@hpcc-js/api";
|
|
2
|
-
import { HTMLWidget } from "@hpcc-js/common";
|
|
2
|
+
import { Database, HTMLWidget } from "@hpcc-js/common";
|
|
3
3
|
|
|
4
4
|
import "../src/Input.css";
|
|
5
5
|
|
|
@@ -90,32 +90,47 @@ export class Input extends HTMLWidget {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
type: { (): string; (_: string): Input };
|
|
94
|
-
type_exists: () => boolean;
|
|
95
|
-
type_default: { (): string; (_: string): Input };
|
|
96
|
-
inlineLabel: { (): string; (_: string): Input };
|
|
97
|
-
inlineLabel_exists: () => boolean;
|
|
98
|
-
|
|
99
|
-
// IInput ---
|
|
100
|
-
name: { (): string; (_: string): Input };
|
|
101
|
-
name_exists: () => boolean;
|
|
102
|
-
label: { (): string; (_: string): Input };
|
|
103
|
-
label_exists: () => boolean;
|
|
104
|
-
value: { (): any; (_: any): Input };
|
|
105
|
-
value_exists: () => boolean;
|
|
106
|
-
validate: { (): string; (_: string): Input };
|
|
107
|
-
validate_exists: () => boolean;
|
|
108
|
-
|
|
109
93
|
// IInput Events ---
|
|
110
|
-
blur
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
94
|
+
blur(w: Input) {
|
|
95
|
+
}
|
|
96
|
+
keyup(w: Input) {
|
|
97
|
+
}
|
|
98
|
+
focus(w: Input) {
|
|
99
|
+
}
|
|
100
|
+
click(w: Input) {
|
|
101
|
+
}
|
|
102
|
+
dblclick(w: Input) {
|
|
103
|
+
}
|
|
104
|
+
change(w: Input, complete: boolean) {
|
|
105
|
+
}
|
|
116
106
|
}
|
|
117
107
|
Input.prototype._class += " form_Input";
|
|
118
108
|
Input.prototype.implements(IInput.prototype);
|
|
119
109
|
|
|
120
|
-
|
|
110
|
+
export interface Input {
|
|
111
|
+
// IInput ---
|
|
112
|
+
name(): string;
|
|
113
|
+
name(_: string): this;
|
|
114
|
+
name_exists(): boolean;
|
|
115
|
+
label(): string;
|
|
116
|
+
label(_: string): this;
|
|
117
|
+
label_exists(): boolean;
|
|
118
|
+
value(): any;
|
|
119
|
+
value(_: any): this;
|
|
120
|
+
value_exists(): boolean;
|
|
121
|
+
validate(): string;
|
|
122
|
+
validate(_: string): this;
|
|
123
|
+
validate_exists(): boolean;
|
|
124
|
+
|
|
125
|
+
// Properties ---
|
|
126
|
+
type(): Database.FieldType | "button" | "checkbox" | "text" | "textarea" | "search" | "email" | "datetime";
|
|
127
|
+
type(_: Database.FieldType | "button" | "checkbox" | "text" | "textarea" | "search" | "email" | "datetime"): this;
|
|
128
|
+
type_exists(): boolean;
|
|
129
|
+
type_default(): string;
|
|
130
|
+
inlineLabel(): string;
|
|
131
|
+
inlineLabel(_: string): this;
|
|
132
|
+
inlineLabel_exists(): boolean;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
Input.prototype.publish("type", "text", "set", "Input type", ["string", "number", "boolean", "date", "time", "hidden", "nested", "button", "checkbox", "text", "textarea", "search", "email", "datetime"]);
|
|
121
136
|
Input.prototype.publish("inlineLabel", null, "string", "Input Label", null, { optional: true });
|
package/src/InputRange.ts
CHANGED
|
@@ -62,25 +62,34 @@ export class InputRange extends HTMLWidget {
|
|
|
62
62
|
.property("value", this._rangeData.length > idx ? this._rangeData[idx] : "");
|
|
63
63
|
}, this);
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
type: { (): string; (_: string): InputRange };
|
|
67
|
-
type_exists: () => boolean;
|
|
68
|
-
inlineLabel: { (): string; (_: string): InputRange };
|
|
69
|
-
inlineLabel_exists: () => boolean;
|
|
70
|
-
value: { (): any[]; (_: any[]): InputRange };
|
|
71
|
-
value_exists: () => boolean;
|
|
72
|
-
|
|
73
|
-
// IInput ---
|
|
74
|
-
name: { (): string; (_: string): InputRange };
|
|
75
|
-
name_exists: () => boolean;
|
|
76
|
-
label: { (): string; (_: string): InputRange };
|
|
77
|
-
label_exists: () => boolean;
|
|
78
|
-
validate: { (): string; (_: string): InputRange };
|
|
79
|
-
validate_exists: () => boolean;
|
|
80
65
|
}
|
|
81
66
|
InputRange.prototype._class += " form_InputRange";
|
|
82
67
|
InputRange.prototype.implements(IInput.prototype);
|
|
83
68
|
|
|
69
|
+
export interface InputRange {
|
|
70
|
+
// IInput ---
|
|
71
|
+
name(): string;
|
|
72
|
+
name(_: string): this;
|
|
73
|
+
name_exists(): boolean;
|
|
74
|
+
label(): string;
|
|
75
|
+
label(_: string): this;
|
|
76
|
+
label_exists(): boolean;
|
|
77
|
+
value(): any[];
|
|
78
|
+
value(_: any[]): this;
|
|
79
|
+
value_exists(): boolean;
|
|
80
|
+
validate(): string;
|
|
81
|
+
validate(_: string): this;
|
|
82
|
+
validate_exists(): boolean;
|
|
83
|
+
|
|
84
|
+
// Properties ---
|
|
85
|
+
type(): string;
|
|
86
|
+
type(_: string): this;
|
|
87
|
+
type_exists(): boolean;
|
|
88
|
+
inlineLabel(): string;
|
|
89
|
+
inlineLabel(_: string): this;
|
|
90
|
+
inlineLabel_exists(): boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
84
93
|
InputRange.prototype.publish("type", "text", "set", "InputRange type", ["number", "date", "text", "time", "datetime", "hidden"]);
|
|
85
94
|
InputRange.prototype.publish("inlineLabel", null, "string", "InputRange Label", null, { optional: true });
|
|
86
95
|
InputRange.prototype.publish("value", ["", ""], "array", "Input Current Value", null, { override: true });
|
package/src/OnOff.ts
CHANGED
|
@@ -96,19 +96,24 @@ export class OnOff extends HTMLWidget {
|
|
|
96
96
|
.style("background-color", this.onColor())
|
|
97
97
|
;
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
// IInput ---
|
|
101
|
-
name: { (): string; (_: string): OnOff };
|
|
102
|
-
name_exists: () => boolean;
|
|
103
|
-
label: { (): string; (_: string): OnOff };
|
|
104
|
-
label_exists: () => boolean;
|
|
105
|
-
value: { (): any; (_: any): OnOff };
|
|
106
|
-
value_exists: () => boolean;
|
|
107
|
-
validate: { (): string; (_: string): OnOff };
|
|
108
|
-
validate_exists: () => boolean;
|
|
109
99
|
}
|
|
110
100
|
OnOff.prototype._class += " form_OnOff";
|
|
111
101
|
export interface OnOff {
|
|
102
|
+
// IInput ---
|
|
103
|
+
name(): string;
|
|
104
|
+
name(_: string): this;
|
|
105
|
+
name_exists(): boolean;
|
|
106
|
+
label(): string;
|
|
107
|
+
label(_: string): this;
|
|
108
|
+
label_exists(): boolean;
|
|
109
|
+
value(): any;
|
|
110
|
+
value(_: any): this;
|
|
111
|
+
value_exists(): boolean;
|
|
112
|
+
validate(): string;
|
|
113
|
+
validate(_: string): this;
|
|
114
|
+
validate_exists(): boolean;
|
|
115
|
+
|
|
116
|
+
// Properties ---
|
|
112
117
|
marginLeft(): number;
|
|
113
118
|
marginLeft(_: number): this;
|
|
114
119
|
marginBottom(): number;
|
package/src/Radio.ts
CHANGED
|
@@ -55,21 +55,29 @@ export class Radio extends HTMLWidget {
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
selectOptions: { (): any[]; (_: any[]): Radio };
|
|
60
|
-
selectOptions_exists: () => boolean;
|
|
61
|
-
|
|
62
|
-
// IInput ---
|
|
63
|
-
name: { (): string; (_: string): Radio };
|
|
64
|
-
name_exists: () => boolean;
|
|
65
|
-
label: { (): string; (_: string): Radio };
|
|
66
|
-
label_exists: () => boolean;
|
|
67
|
-
value: { (): any; (_: any): Radio };
|
|
68
|
-
value_exists: () => boolean;
|
|
69
|
-
validate: { (): string; (_: string): Radio };
|
|
70
|
-
validate_exists: () => boolean;
|
|
71
58
|
}
|
|
72
59
|
Radio.prototype._class += " form_Radio";
|
|
73
60
|
Radio.prototype.implements(IInput.prototype);
|
|
74
61
|
|
|
62
|
+
export interface Radio {
|
|
63
|
+
// IInput ---
|
|
64
|
+
name(): string;
|
|
65
|
+
name(_: string): this;
|
|
66
|
+
name_exists(): boolean;
|
|
67
|
+
label(): string;
|
|
68
|
+
label(_: string): this;
|
|
69
|
+
label_exists(): boolean;
|
|
70
|
+
value(): any;
|
|
71
|
+
value(_: any): this;
|
|
72
|
+
value_exists(): boolean;
|
|
73
|
+
validate(): string;
|
|
74
|
+
validate(_: string): this;
|
|
75
|
+
validate_exists(): boolean;
|
|
76
|
+
|
|
77
|
+
// Properties ---
|
|
78
|
+
selectOptions(): any[];
|
|
79
|
+
selectOptions(_: any[]): this;
|
|
80
|
+
selectOptions_exists(): boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
75
83
|
Radio.prototype.publish("selectOptions", [], "array", "Array of options used to fill a dropdown list");
|
package/src/Range.ts
CHANGED
|
@@ -72,31 +72,43 @@ export class Range extends HTMLWidget {
|
|
|
72
72
|
}
|
|
73
73
|
this._inputElement[0].html(optionHTML);
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
type: { (): string; (_: string): Range };
|
|
77
|
-
type_exists: () => boolean;
|
|
78
|
-
selectOptions: { (): any[]; (_: any[]): Range };
|
|
79
|
-
selectOptions_exists: () => boolean;
|
|
80
|
-
low: { (): number; (_: number): Range };
|
|
81
|
-
low_exists: () => boolean;
|
|
82
|
-
high: { (): number; (_: number): Range };
|
|
83
|
-
high_exists: () => boolean;
|
|
84
|
-
step: { (): number; (_: number): Range };
|
|
85
|
-
step_exists: () => boolean;
|
|
86
|
-
|
|
87
|
-
// IInput ---
|
|
88
|
-
name: { (): string; (_: string): Range };
|
|
89
|
-
name_exists: () => boolean;
|
|
90
|
-
label: { (): string; (_: string): Range };
|
|
91
|
-
label_exists: () => boolean;
|
|
92
|
-
value: { (): any; (_: any): Range };
|
|
93
|
-
value_exists: () => boolean;
|
|
94
|
-
validate: { (): string; (_: string): Range };
|
|
95
|
-
validate_exists: () => boolean;
|
|
96
75
|
}
|
|
97
76
|
Range.prototype._class += " form_Range";
|
|
98
77
|
Range.prototype.implements(IInput.prototype);
|
|
99
78
|
|
|
79
|
+
export interface Range {
|
|
80
|
+
// IInput ---
|
|
81
|
+
name(): string;
|
|
82
|
+
name(_: string): this;
|
|
83
|
+
name_exists(): boolean;
|
|
84
|
+
label(): string;
|
|
85
|
+
label(_: string): this;
|
|
86
|
+
label_exists(): boolean;
|
|
87
|
+
value(): any;
|
|
88
|
+
value(_: any): this;
|
|
89
|
+
value_exists(): boolean;
|
|
90
|
+
validate(): string;
|
|
91
|
+
validate(_: string): this;
|
|
92
|
+
validate_exists(): boolean;
|
|
93
|
+
|
|
94
|
+
// Properties ---
|
|
95
|
+
type(): string;
|
|
96
|
+
type(_: string): this;
|
|
97
|
+
type_exists(): boolean;
|
|
98
|
+
selectOptions(): any[];
|
|
99
|
+
selectOptions(_: any[]): this;
|
|
100
|
+
selectOptions_exists(): boolean;
|
|
101
|
+
low(): number;
|
|
102
|
+
low(_: number): this;
|
|
103
|
+
low_exists(): boolean;
|
|
104
|
+
high(): number;
|
|
105
|
+
high(_: number): this;
|
|
106
|
+
high_exists(): boolean;
|
|
107
|
+
step(): number;
|
|
108
|
+
step(_: number): this;
|
|
109
|
+
step_exists(): boolean;
|
|
110
|
+
}
|
|
111
|
+
|
|
100
112
|
Range.prototype.publish("type", "text", "set", "Input type", ["html-color", "number", "checkbox", "button", "select", "textarea", "date", "text", "range", "search", "email", "time", "datetime"]);
|
|
101
113
|
Range.prototype.publish("selectOptions", [], "array", "Array of options used to fill a dropdown list");
|
|
102
114
|
Range.prototype.publish("low", null, "number", "Minimum value for Range input");
|
package/src/Select.ts
CHANGED
|
@@ -57,24 +57,33 @@ export class Select extends HTMLWidget {
|
|
|
57
57
|
}
|
|
58
58
|
this._inputElement[0].html(optionHTML);
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
selectOptions: { (): any[]; (_: any[]): Select };
|
|
62
|
-
selectOptions_exists: () => boolean;
|
|
63
|
-
maxWidth: { (): number; (_: number): Select };
|
|
64
|
-
maxWidth_exists: () => boolean;
|
|
65
|
-
|
|
66
|
-
// IInput ---
|
|
67
|
-
name: { (): string; (_: string): Select };
|
|
68
|
-
name_exists: () => boolean;
|
|
69
|
-
label: { (): string; (_: string): Select };
|
|
70
|
-
label_exists: () => boolean;
|
|
71
|
-
value: { (): any; (_: any): Select };
|
|
72
|
-
value_exists: () => boolean;
|
|
73
|
-
validate: { (): string; (_: string): Select };
|
|
74
|
-
validate_exists: () => boolean;
|
|
75
60
|
}
|
|
76
61
|
Select.prototype._class += " form_Select";
|
|
77
62
|
Select.prototype.implements(IInput.prototype);
|
|
78
63
|
|
|
64
|
+
export interface Select {
|
|
65
|
+
// IInput ---
|
|
66
|
+
name(): string;
|
|
67
|
+
name(_: string): this;
|
|
68
|
+
name_exists(): boolean;
|
|
69
|
+
label(): string;
|
|
70
|
+
label(_: string): this;
|
|
71
|
+
label_exists(): boolean;
|
|
72
|
+
value(): any;
|
|
73
|
+
value(_: any): this;
|
|
74
|
+
value_exists(): boolean;
|
|
75
|
+
validate(): string;
|
|
76
|
+
validate(_: string): this;
|
|
77
|
+
validate_exists(): boolean;
|
|
78
|
+
|
|
79
|
+
// Properties ---
|
|
80
|
+
selectOptions(): any[];
|
|
81
|
+
selectOptions(_: any[]): this;
|
|
82
|
+
selectOptions_exists(): boolean;
|
|
83
|
+
maxWidth(): number;
|
|
84
|
+
maxWidth(_: number): this;
|
|
85
|
+
maxWidth_exists(): boolean;
|
|
86
|
+
}
|
|
87
|
+
|
|
79
88
|
Select.prototype.publish("selectOptions", [], "array", "Array of options used to fill a dropdown list");
|
|
80
89
|
Select.prototype.publish("maxWidth", 120, "number", "Width", null, { optional: true });
|
package/src/Slider.ts
CHANGED
|
@@ -270,13 +270,17 @@ export class Slider extends SVGWidget {
|
|
|
270
270
|
return retVal;
|
|
271
271
|
};
|
|
272
272
|
|
|
273
|
-
name: (_?: string) => string | this;
|
|
274
|
-
change: (_: Slider) => void;
|
|
275
273
|
}
|
|
276
274
|
Slider.prototype._class += " form_Slider";
|
|
277
275
|
Slider.prototype.implements(IInput.prototype);
|
|
278
276
|
|
|
279
277
|
export interface Slider {
|
|
278
|
+
// IInput ---
|
|
279
|
+
name(): string;
|
|
280
|
+
name(_: string): this;
|
|
281
|
+
change(_: Slider): void;
|
|
282
|
+
|
|
283
|
+
// Properties ---
|
|
280
284
|
padding(): number;
|
|
281
285
|
padding(_: number): this;
|
|
282
286
|
fontSize(): number;
|
|
@@ -357,7 +361,7 @@ Slider.prototype.publish("tickDateFormat", null, "string");
|
|
|
357
361
|
Slider.prototype.publish("tickValueFormat", ",.0f", "string");
|
|
358
362
|
|
|
359
363
|
const name = Slider.prototype.name;
|
|
360
|
-
Slider.prototype.name = function (_
|
|
364
|
+
Slider.prototype.name = function (_?: any): any {
|
|
361
365
|
const retVal = name.apply(this, arguments);
|
|
362
366
|
if (arguments.length) {
|
|
363
367
|
const val = _ instanceof Array ? _ : [_];
|
package/src/TextArea.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Input } from "./Input";
|
|
1
|
+
import { Input } from "./Input.ts";
|
|
2
2
|
|
|
3
3
|
export class TextArea extends Input {
|
|
4
4
|
constructor() {
|
|
@@ -27,20 +27,27 @@ export class TextArea extends Input {
|
|
|
27
27
|
;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
rows: { (): number; (_: number): TextArea };
|
|
31
|
-
rows_exists: () => boolean;
|
|
32
|
-
cols: { (): number; (_: number): TextArea };
|
|
33
|
-
cols_exists: () => boolean;
|
|
34
|
-
wrap: { (): string; (_: string): TextArea };
|
|
35
|
-
wrap_exists: () => boolean;
|
|
36
|
-
minHeight: { (): number; (_: number): TextArea };
|
|
37
|
-
minHeight_exists: () => boolean;
|
|
38
|
-
spellcheck: { (): boolean; (_: boolean): TextArea };
|
|
39
|
-
spellcheck_exists: () => boolean;
|
|
40
|
-
value: { (): any; (_: any): TextArea };
|
|
41
30
|
}
|
|
42
31
|
TextArea.prototype._class += " form_TextArea";
|
|
43
32
|
|
|
33
|
+
export interface TextArea {
|
|
34
|
+
rows(): number;
|
|
35
|
+
rows(_: number): this;
|
|
36
|
+
rows_exists(): boolean;
|
|
37
|
+
cols(): number;
|
|
38
|
+
cols(_: number): this;
|
|
39
|
+
cols_exists(): boolean;
|
|
40
|
+
wrap(): string;
|
|
41
|
+
wrap(_: string): this;
|
|
42
|
+
wrap_exists(): boolean;
|
|
43
|
+
minHeight(): number;
|
|
44
|
+
minHeight(_: number): this;
|
|
45
|
+
minHeight_exists(): boolean;
|
|
46
|
+
spellcheck(): boolean;
|
|
47
|
+
spellcheck(_: boolean): this;
|
|
48
|
+
spellcheck_exists(): boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
44
51
|
TextArea.prototype.publish("rows", null, "number", "Rows", null, { optional: true });
|
|
45
52
|
TextArea.prototype.publish("cols", null, "number", "Columns", null, { optional: true });
|
|
46
53
|
TextArea.prototype.publish("wrap", "off", "set", "Wrap", ["off", "on"]);
|
package/src/__package__.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export const PKG_NAME = "@hpcc-js/form";
|
|
2
|
-
export const PKG_VERSION = "
|
|
3
|
-
export const BUILD_VERSION = "2.
|
|
2
|
+
export const PKG_VERSION = "3.1.0";
|
|
3
|
+
export const BUILD_VERSION = "3.2.0";
|