@hpcc-js/form 3.4.4 → 3.4.5
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/LICENSE +43 -43
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +5 -5
- package/src/Button.ts +52 -52
- package/src/CheckBox.ts +103 -103
- package/src/ColorInput.ts +81 -81
- package/src/FieldForm.ts +49 -49
- package/src/Form.css +90 -90
- package/src/Form.ts +337 -337
- package/src/Input.css +42 -42
- package/src/Input.ts +136 -136
- package/src/InputRange.ts +95 -95
- package/src/OnOff.css +74 -74
- package/src/OnOff.ts +159 -159
- package/src/Radio.ts +83 -83
- package/src/Range.ts +116 -116
- package/src/Select.ts +89 -89
- package/src/Slider.css +40 -40
- package/src/Slider.ts +385 -385
- package/src/TextArea.ts +55 -55
- package/src/__package__.ts +3 -3
- package/src/index.ts +14 -14
package/src/TextArea.ts
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { Input } from "./Input.ts";
|
|
2
|
-
|
|
3
|
-
export class TextArea extends Input {
|
|
4
|
-
constructor() {
|
|
5
|
-
super();
|
|
6
|
-
|
|
7
|
-
this._tag = "div";
|
|
8
|
-
this.type("textarea");
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
enter(domNode, element) {
|
|
12
|
-
super.enter(domNode, element);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
calcHeight() {
|
|
16
|
-
return Math.max(this.minHeight_exists() ? this.minHeight() : 0, this.height());
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
update(domNode, element) {
|
|
20
|
-
super.update(domNode, element);
|
|
21
|
-
this._inputElement[0]
|
|
22
|
-
.attr("rows", this.rows())
|
|
23
|
-
.attr("cols", this.cols())
|
|
24
|
-
.attr("wrap", this.wrap())
|
|
25
|
-
.attr("spellcheck", this.spellcheck())
|
|
26
|
-
.style("height", this.calcHeight() + "px")
|
|
27
|
-
;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
TextArea.prototype._class += " form_TextArea";
|
|
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
|
-
|
|
51
|
-
TextArea.prototype.publish("rows", null, "number", "Rows", null, { optional: true });
|
|
52
|
-
TextArea.prototype.publish("cols", null, "number", "Columns", null, { optional: true });
|
|
53
|
-
TextArea.prototype.publish("wrap", "off", "set", "Wrap", ["off", "on"]);
|
|
54
|
-
TextArea.prototype.publish("minHeight", null, "number", "Minimum Height", null, { optional: true });
|
|
55
|
-
TextArea.prototype.publish("spellcheck", null, "boolean", "Input spell checking", { optional: true });
|
|
1
|
+
import { Input } from "./Input.ts";
|
|
2
|
+
|
|
3
|
+
export class TextArea extends Input {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
|
|
7
|
+
this._tag = "div";
|
|
8
|
+
this.type("textarea");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
enter(domNode, element) {
|
|
12
|
+
super.enter(domNode, element);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
calcHeight() {
|
|
16
|
+
return Math.max(this.minHeight_exists() ? this.minHeight() : 0, this.height());
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
update(domNode, element) {
|
|
20
|
+
super.update(domNode, element);
|
|
21
|
+
this._inputElement[0]
|
|
22
|
+
.attr("rows", this.rows())
|
|
23
|
+
.attr("cols", this.cols())
|
|
24
|
+
.attr("wrap", this.wrap())
|
|
25
|
+
.attr("spellcheck", this.spellcheck())
|
|
26
|
+
.style("height", this.calcHeight() + "px")
|
|
27
|
+
;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
TextArea.prototype._class += " form_TextArea";
|
|
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
|
+
|
|
51
|
+
TextArea.prototype.publish("rows", null, "number", "Rows", null, { optional: true });
|
|
52
|
+
TextArea.prototype.publish("cols", null, "number", "Columns", null, { optional: true });
|
|
53
|
+
TextArea.prototype.publish("wrap", "off", "set", "Wrap", ["off", "on"]);
|
|
54
|
+
TextArea.prototype.publish("minHeight", null, "number", "Minimum Height", null, { optional: true });
|
|
55
|
+
TextArea.prototype.publish("spellcheck", null, "boolean", "Input spell checking", { optional: true });
|
package/src/__package__.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const PKG_NAME = "__PACKAGE_NAME__";
|
|
2
|
-
export const PKG_VERSION = "__PACKAGE_VERSION__";
|
|
3
|
-
export const BUILD_VERSION = "__BUILD_VERSION__";
|
|
1
|
+
export const PKG_NAME = "__PACKAGE_NAME__";
|
|
2
|
+
export const PKG_VERSION = "__PACKAGE_VERSION__";
|
|
3
|
+
export const BUILD_VERSION = "__BUILD_VERSION__";
|
package/src/index.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export * from "./__package__.ts";
|
|
2
|
-
export * from "./Button.ts";
|
|
3
|
-
export * from "./CheckBox.ts";
|
|
4
|
-
export * from "./ColorInput.ts";
|
|
5
|
-
export * from "./Form.ts";
|
|
6
|
-
export * from "./FieldForm.ts";
|
|
7
|
-
export * from "./Input.ts";
|
|
8
|
-
export * from "./InputRange.ts";
|
|
9
|
-
export * from "./OnOff.ts";
|
|
10
|
-
export * from "./Radio.ts";
|
|
11
|
-
export * from "./Range.ts";
|
|
12
|
-
export * from "./Select.ts";
|
|
13
|
-
export * from "./Slider.ts";
|
|
14
|
-
export * from "./TextArea.ts";
|
|
1
|
+
export * from "./__package__.ts";
|
|
2
|
+
export * from "./Button.ts";
|
|
3
|
+
export * from "./CheckBox.ts";
|
|
4
|
+
export * from "./ColorInput.ts";
|
|
5
|
+
export * from "./Form.ts";
|
|
6
|
+
export * from "./FieldForm.ts";
|
|
7
|
+
export * from "./Input.ts";
|
|
8
|
+
export * from "./InputRange.ts";
|
|
9
|
+
export * from "./OnOff.ts";
|
|
10
|
+
export * from "./Radio.ts";
|
|
11
|
+
export * from "./Range.ts";
|
|
12
|
+
export * from "./Select.ts";
|
|
13
|
+
export * from "./Slider.ts";
|
|
14
|
+
export * from "./TextArea.ts";
|