tweak-ui 0.4.2 → 0.5.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/LICENSE +7 -7
- package/README.md +32 -32
- package/dist/lib/builder.d.ts +166 -162
- package/dist/lib/builder.d.ts.map +1 -1
- package/dist/lib/builder.js +250 -0
- package/dist/lib/builder.js.map +1 -0
- package/dist/lib/color-formats/array-format.d.ts +8 -8
- package/dist/lib/color-formats/array-format.js +18 -0
- package/dist/lib/color-formats/array-format.js.map +1 -0
- package/dist/lib/color-formats/converter.d.ts +18 -18
- package/dist/lib/color-formats/converter.js +85 -0
- package/dist/lib/color-formats/converter.js.map +1 -0
- package/dist/lib/color-formats/css-string-format.d.ts +7 -7
- package/dist/lib/color-formats/css-string-format.js +28 -0
- package/dist/lib/color-formats/css-string-format.js.map +1 -0
- package/dist/lib/color-formats/formatter.d.ts +8 -8
- package/dist/lib/color-formats/formatter.js +35 -0
- package/dist/lib/color-formats/formatter.js.map +1 -0
- package/dist/lib/color-formats/hex-string-format.d.ts +7 -7
- package/dist/lib/color-formats/hex-string-format.js +28 -0
- package/dist/lib/color-formats/hex-string-format.js.map +1 -0
- package/dist/lib/color-formats/index.d.ts +3 -3
- package/dist/lib/color-formats/index.js +4 -0
- package/dist/lib/color-formats/index.js.map +1 -0
- package/dist/lib/color-formats/number-format.d.ts +8 -8
- package/dist/lib/color-formats/number-format.js +23 -0
- package/dist/lib/color-formats/number-format.js.map +1 -0
- package/dist/lib/color-formats/object-format.d.ts +14 -14
- package/dist/lib/color-formats/object-format.js +23 -0
- package/dist/lib/color-formats/object-format.js.map +1 -0
- package/dist/lib/color-formats/types.d.ts +101 -101
- package/dist/lib/color-formats/types.js +2 -0
- package/dist/lib/color-formats/types.js.map +1 -0
- package/dist/lib/components/button.d.ts +28 -28
- package/dist/lib/components/button.d.ts.map +1 -1
- package/dist/lib/components/button.js +15 -0
- package/dist/lib/components/button.js.map +1 -0
- package/dist/lib/components/content.d.ts +21 -21
- package/dist/lib/components/content.d.ts.map +1 -1
- package/dist/lib/components/content.js +10 -0
- package/dist/lib/components/content.js.map +1 -0
- package/dist/lib/components/controls/angle.d.ts +51 -51
- package/dist/lib/components/controls/angle.d.ts.map +1 -1
- package/dist/lib/components/controls/angle.js +201 -0
- package/dist/lib/components/controls/angle.js.map +1 -0
- package/dist/lib/components/controls/checkbox.d.ts +28 -28
- package/dist/lib/components/controls/checkbox.d.ts.map +1 -1
- package/dist/lib/components/controls/checkbox.js +31 -0
- package/dist/lib/components/controls/checkbox.js.map +1 -0
- package/dist/lib/components/controls/color-picker.d.ts +56 -56
- package/dist/lib/components/controls/color-picker.d.ts.map +1 -1
- package/dist/lib/components/controls/color-picker.js +267 -0
- package/dist/lib/components/controls/color-picker.js.map +1 -0
- package/dist/lib/components/controls/color.d.ts +51 -51
- package/dist/lib/components/controls/color.d.ts.map +1 -1
- package/dist/lib/components/controls/color.js +77 -0
- package/dist/lib/components/controls/color.js.map +1 -0
- package/dist/lib/components/controls/index.d.ts +10 -10
- package/dist/lib/components/controls/index.js +11 -0
- package/dist/lib/components/controls/index.js.map +1 -0
- package/dist/lib/components/controls/number.d.ts +47 -47
- package/dist/lib/components/controls/number.d.ts.map +1 -1
- package/dist/lib/components/controls/number.js +142 -0
- package/dist/lib/components/controls/number.js.map +1 -0
- package/dist/lib/components/controls/point.d.ts +47 -47
- package/dist/lib/components/controls/point.d.ts.map +1 -1
- package/dist/lib/components/controls/point.js +137 -0
- package/dist/lib/components/controls/point.js.map +1 -0
- package/dist/lib/components/controls/position.d.ts +55 -55
- package/dist/lib/components/controls/position.d.ts.map +1 -1
- package/dist/lib/components/controls/position.js +36 -0
- package/dist/lib/components/controls/position.js.map +1 -0
- package/dist/lib/components/controls/select.d.ts +59 -59
- package/dist/lib/components/controls/select.d.ts.map +1 -1
- package/dist/lib/components/controls/select.js +132 -0
- package/dist/lib/components/controls/select.js.map +1 -0
- package/dist/lib/components/controls/spherical.d.ts +74 -74
- package/dist/lib/components/controls/spherical.d.ts.map +1 -1
- package/dist/lib/components/controls/spherical.js +302 -0
- package/dist/lib/components/controls/spherical.js.map +1 -0
- package/dist/lib/components/controls/text.d.ts +35 -35
- package/dist/lib/components/controls/text.d.ts.map +1 -1
- package/dist/lib/components/controls/text.js +24 -0
- package/dist/lib/components/controls/text.js.map +1 -0
- package/dist/lib/components/groups/accordion.d.ts +21 -21
- package/dist/lib/components/groups/accordion.d.ts.map +1 -1
- package/dist/lib/components/groups/accordion.js +34 -0
- package/dist/lib/components/groups/accordion.js.map +1 -0
- package/dist/lib/components/groups/container.d.ts +24 -24
- package/dist/lib/components/groups/container.d.ts.map +1 -1
- package/dist/lib/components/groups/container.js +19 -0
- package/dist/lib/components/groups/container.js.map +1 -0
- package/dist/lib/components/groups/group.d.ts +48 -48
- package/dist/lib/components/groups/group.d.ts.map +1 -1
- package/dist/lib/components/groups/group.js +50 -0
- package/dist/lib/components/groups/group.js.map +1 -0
- package/dist/lib/components/groups/index.d.ts +4 -4
- package/dist/lib/components/groups/index.js +5 -0
- package/dist/lib/components/groups/index.js.map +1 -0
- package/dist/lib/components/groups/tabs.d.ts +21 -21
- package/dist/lib/components/groups/tabs.d.ts.map +1 -1
- package/dist/lib/components/groups/tabs.js +31 -0
- package/dist/lib/components/groups/tabs.js.map +1 -0
- package/dist/lib/components/image.d.ts +36 -36
- package/dist/lib/components/image.d.ts.map +1 -1
- package/dist/lib/components/image.js +46 -0
- package/dist/lib/components/image.js.map +1 -0
- package/dist/lib/components/index.d.ts +5 -5
- package/dist/lib/components/index.js +6 -0
- package/dist/lib/components/index.js.map +1 -0
- package/dist/lib/core/index.d.ts +4 -4
- package/dist/lib/core/index.js +5 -0
- package/dist/lib/core/index.js.map +1 -0
- package/dist/lib/core/registry.d.ts +17 -17
- package/dist/lib/core/registry.js +30 -0
- package/dist/lib/core/registry.js.map +1 -0
- package/dist/lib/core/render.d.ts +9 -9
- package/dist/lib/core/render.d.ts.map +1 -1
- package/dist/lib/core/render.js +19 -0
- package/dist/lib/core/render.js.map +1 -0
- package/dist/lib/core/types.d.ts +87 -87
- package/dist/lib/core/types.d.ts.map +1 -1
- package/dist/lib/core/types.js +2 -0
- package/dist/lib/core/types.js.map +1 -0
- package/dist/lib/core/utils.d.ts +93 -93
- package/dist/lib/core/utils.d.ts.map +1 -1
- package/dist/lib/core/utils.js +193 -0
- package/dist/lib/core/utils.js.map +1 -0
- package/dist/lib/core/value-accessor.d.ts +17 -17
- package/dist/lib/core/value-accessor.js +52 -0
- package/dist/lib/core/value-accessor.js.map +1 -0
- package/dist/lib/index.d.ts +21 -27
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +29 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/mount.d.ts +45 -45
- package/dist/lib/mount.js +85 -0
- package/dist/lib/mount.js.map +1 -0
- package/dist/tweak-ui.css +133 -138
- package/dist/tweak-ui.css.map +1 -1
- package/dist/tweak-ui.min.css +1 -1
- package/dist/tweak-ui.min.css.map +1 -1
- package/dist/tweak-ui.module.js +2733 -2380
- package/dist/tweak-ui.module.js.map +1 -1
- package/dist/tweak-ui.umd.js +1 -4403
- package/dist/tweak-ui.umd.js.map +1 -1
- package/package.json +25 -42
- package/dist/index.html +0 -1061
- package/dist/lib/color-formats/array-format.spec.d.ts +0 -2
- package/dist/lib/color-formats/array-format.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/converter.spec.d.ts +0 -2
- package/dist/lib/color-formats/converter.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/css-string-format.spec.d.ts +0 -2
- package/dist/lib/color-formats/css-string-format.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/formatter.spec.d.ts +0 -2
- package/dist/lib/color-formats/formatter.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/hex-string-format.spec.d.ts +0 -2
- package/dist/lib/color-formats/hex-string-format.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/number-format.spec.d.ts +0 -2
- package/dist/lib/color-formats/number-format.spec.d.ts.map +0 -1
- package/dist/lib/color-formats/object-format.spec.d.ts +0 -2
- package/dist/lib/color-formats/object-format.spec.d.ts.map +0 -1
- package/dist/scss/_style.scss +0 -120
- package/dist/scss/_themes.scss +0 -23
- package/dist/scss/_utils.scss +0 -24
- package/dist/scss/_variables.scss +0 -30
- package/dist/scss/controls/_angle.scss +0 -64
- package/dist/scss/controls/_button.scss +0 -0
- package/dist/scss/controls/_checkbox.scss +0 -19
- package/dist/scss/controls/_color-picker.scss +0 -124
- package/dist/scss/controls/_color.scss +0 -14
- package/dist/scss/controls/_container.scss +0 -13
- package/dist/scss/controls/_group.scss +0 -69
- package/dist/scss/controls/_image.scss +0 -27
- package/dist/scss/controls/_number.scss +0 -38
- package/dist/scss/controls/_point.scss +0 -36
- package/dist/scss/controls/_position.scss +0 -9
- package/dist/scss/controls/_select.scss +0 -0
- package/dist/scss/controls/_spherical.scss +0 -87
- package/dist/scss/controls/_tabs.scss +0 -38
- package/dist/scss/controls/_text.scss +0 -0
- package/dist/scss/index.scss +0 -21
- package/dist/tweak-ui.umd.min.js +0 -17
- package/dist/tweak-ui.umd.min.js.map +0 -1
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { ComponentModel, ValueSource, ComponentAttrs } from '../../core';
|
|
2
|
-
/**
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
export
|
|
6
|
-
label: string;
|
|
7
|
-
value: unknown;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
export
|
|
14
|
-
/**
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
export
|
|
18
|
-
[key: string]: unknown;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
export
|
|
24
|
-
label: string;
|
|
25
|
-
options: T;
|
|
26
|
-
disabled?: boolean;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Select component select options
|
|
30
|
-
* @public
|
|
31
|
-
*/
|
|
32
|
-
export
|
|
33
|
-
/**
|
|
34
|
-
* Select component attributes
|
|
35
|
-
* @public
|
|
36
|
-
*/
|
|
37
|
-
export
|
|
38
|
-
/**
|
|
39
|
-
* Select component model
|
|
40
|
-
* @public
|
|
41
|
-
*/
|
|
42
|
-
export interface SelectModel<T = unknown, V = any> extends ComponentModel, ValueSource<T, V> {
|
|
43
|
-
/**
|
|
44
|
-
* The type name of the control
|
|
45
|
-
*/
|
|
46
|
-
type: 'select';
|
|
47
|
-
/**
|
|
48
|
-
* The select options
|
|
49
|
-
*/
|
|
50
|
-
options?: SelectModelOptions;
|
|
51
|
-
/**
|
|
52
|
-
* This is called once the control value is committed by the user.
|
|
53
|
-
*/
|
|
54
|
-
onChange?: (model: SelectModel<T>, value: unknown) => void;
|
|
55
|
-
/**
|
|
56
|
-
* Disables the control input
|
|
57
|
-
*/
|
|
58
|
-
disabled?: boolean;
|
|
59
|
-
}
|
|
1
|
+
import { ComponentModel, ValueSource, ComponentAttrs } from '../../core';
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export type SelectOption = {
|
|
6
|
+
label: string;
|
|
7
|
+
value: unknown;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export type SelectOptionArray = Array<SelectOption | SelectOptionGroup | string | number>;
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export type SelectOptionsObject = {
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export type SelectOptionGroup<T = SelectOptionArray | SelectOptionsObject> = {
|
|
24
|
+
label: string;
|
|
25
|
+
options: T;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Select component select options
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
export type SelectModelOptions = SelectOptionArray | SelectOptionsObject;
|
|
33
|
+
/**
|
|
34
|
+
* Select component attributes
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export type SelectAttrs = ComponentAttrs<SelectModel>;
|
|
38
|
+
/**
|
|
39
|
+
* Select component model
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export interface SelectModel<T = unknown, V = any> extends ComponentModel, ValueSource<T, V> {
|
|
43
|
+
/**
|
|
44
|
+
* The type name of the control
|
|
45
|
+
*/
|
|
46
|
+
type: 'select';
|
|
47
|
+
/**
|
|
48
|
+
* The select options
|
|
49
|
+
*/
|
|
50
|
+
options?: SelectModelOptions;
|
|
51
|
+
/**
|
|
52
|
+
* This is called once the control value is committed by the user.
|
|
53
|
+
*/
|
|
54
|
+
onChange?: (model: SelectModel<T>, value: unknown) => void;
|
|
55
|
+
/**
|
|
56
|
+
* Disables the control input
|
|
57
|
+
*/
|
|
58
|
+
disabled?: boolean;
|
|
59
|
+
}
|
|
60
60
|
//# sourceMappingURL=select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/select.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,cAAc,EACd,WAAW,EACX,cAAc,EACf,MAAM,YAAY,CAAA;AAKnB;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/select.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,cAAc,EACd,WAAW,EACX,cAAc,EACf,MAAM,YAAY,CAAA;AAKnB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AACD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CACnC,YAAY,GAAG,iBAAiB,GAAG,MAAM,GAAG,MAAM,CACnD,CAAA;AACD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AACD;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,iBAAiB,GAAG,mBAAmB,IAAI;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,CAAC,CAAA;IACV,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,mBAAmB,CAAA;AAExE;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CAAA;AAErD;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,GAAG,CAC/C,SAAQ,cAAc,EACpB,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAA;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAC1D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import m from 'mithril';
|
|
2
|
+
import { getValue, component, setValue, } from '../../core';
|
|
3
|
+
import { call, isNumber, isString, twuiClass, viewFn } from '../../core/utils';
|
|
4
|
+
const emptyArray = [];
|
|
5
|
+
function optionsFromFlatArray(arr) {
|
|
6
|
+
const res = [];
|
|
7
|
+
for (const it of arr) {
|
|
8
|
+
if (isString(it) || isNumber(it)) {
|
|
9
|
+
res.push({ value: it, label: String(it) });
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
if ('value' in it) {
|
|
13
|
+
res.push(it);
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return res;
|
|
18
|
+
}
|
|
19
|
+
function optionsFromArray(arr) {
|
|
20
|
+
const res = [];
|
|
21
|
+
for (const it of arr) {
|
|
22
|
+
if (isString(it) || isNumber(it) || it == null) {
|
|
23
|
+
res.push({ value: it, label: String(it) });
|
|
24
|
+
}
|
|
25
|
+
else if ('value' in it) {
|
|
26
|
+
res.push(it);
|
|
27
|
+
}
|
|
28
|
+
else if ('options' in it) {
|
|
29
|
+
res.push({
|
|
30
|
+
label: it.label,
|
|
31
|
+
disabled: it.disabled,
|
|
32
|
+
options: Array.isArray(it.options)
|
|
33
|
+
? optionsFromFlatArray(it.options)
|
|
34
|
+
: optionsFromObject(it.options),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return res;
|
|
39
|
+
}
|
|
40
|
+
function optionsFromObject(obj) {
|
|
41
|
+
return Object.keys(obj)
|
|
42
|
+
.sort()
|
|
43
|
+
.map((key) => ({ value: obj[key], label: key }));
|
|
44
|
+
}
|
|
45
|
+
function getOptions(node) {
|
|
46
|
+
const options = node.attrs.data.options;
|
|
47
|
+
if (!options) {
|
|
48
|
+
return emptyArray;
|
|
49
|
+
}
|
|
50
|
+
if (Array.isArray(options)) {
|
|
51
|
+
return optionsFromArray(options);
|
|
52
|
+
}
|
|
53
|
+
return optionsFromObject(options);
|
|
54
|
+
}
|
|
55
|
+
component('select', (node) => {
|
|
56
|
+
let options;
|
|
57
|
+
function getSelectedIndex() {
|
|
58
|
+
const data = node.attrs.data;
|
|
59
|
+
const value = getValue(data);
|
|
60
|
+
let i = 0;
|
|
61
|
+
for (const o0 of options) {
|
|
62
|
+
if ('options' in o0) {
|
|
63
|
+
for (const o1 of o0.options) {
|
|
64
|
+
if (o1.value === value) {
|
|
65
|
+
return i;
|
|
66
|
+
}
|
|
67
|
+
i++;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
if (o0.value === value) {
|
|
72
|
+
return i;
|
|
73
|
+
}
|
|
74
|
+
i++;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function getSelectionAt(index) {
|
|
79
|
+
let i = 0;
|
|
80
|
+
for (const o0 of options) {
|
|
81
|
+
if ('options' in o0) {
|
|
82
|
+
for (const o1 of o0.options) {
|
|
83
|
+
if (i === index) {
|
|
84
|
+
return o1.value;
|
|
85
|
+
}
|
|
86
|
+
i += 1;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
if (i === index) {
|
|
91
|
+
return o0.value;
|
|
92
|
+
}
|
|
93
|
+
i += 1;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
function onChange(e) {
|
|
99
|
+
const el = e.target;
|
|
100
|
+
const data = node.attrs.data;
|
|
101
|
+
const value = getSelectionAt(el.selectedIndex);
|
|
102
|
+
const written = setValue(data, value);
|
|
103
|
+
call(data.onChange, data, written);
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
view: viewFn((data) => {
|
|
107
|
+
options = getOptions(node);
|
|
108
|
+
return m('select', {
|
|
109
|
+
class: twuiClass(data.type),
|
|
110
|
+
selectedIndex: getSelectedIndex(),
|
|
111
|
+
onchange: onChange,
|
|
112
|
+
disabled: data.disabled,
|
|
113
|
+
}, options.map((it) => {
|
|
114
|
+
if ('options' in it) {
|
|
115
|
+
return m('optgroup', {
|
|
116
|
+
disabled: !!it.disabled,
|
|
117
|
+
label: it.label || '',
|
|
118
|
+
}, it.options.map(option));
|
|
119
|
+
}
|
|
120
|
+
return option(it);
|
|
121
|
+
}));
|
|
122
|
+
}),
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
function option(it) {
|
|
126
|
+
return m('option', {
|
|
127
|
+
value: it.value,
|
|
128
|
+
label: it.label,
|
|
129
|
+
disabled: !!it.disabled,
|
|
130
|
+
}, it.label || '');
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../../src/lib/components/controls/select.ts"],"names":[],"mappings":"AAAA,OAAO,CAAY,MAAM,SAAS,CAAA;AAElC,OAAO,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,GAIT,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAE9E,MAAM,UAAU,GAAU,EAAE,CAAA;AAoE5B,SAAS,oBAAoB,CAAC,GAAsB;IAClD,MAAM,GAAG,GAAmB,EAAE,CAAA;IAC9B,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;QACrB,IAAI,QAAQ,CAAC,EAAE,CAAC,IAAI,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;YACjC,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;YAC1C,SAAQ;QACV,CAAC;QACD,IAAI,OAAO,IAAI,EAAE,EAAE,CAAC;YAClB,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACZ,SAAQ;QACV,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,SAAS,gBAAgB,CACvB,GAAsB;IAEtB,MAAM,GAAG,GAA4D,EAAE,CAAA;IACvE,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;QACrB,IAAI,QAAQ,CAAC,EAAE,CAAC,IAAI,QAAQ,C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C9B,OAAO,CAAC,CACN,QAAQ,EACR;QACE,KAAK,EAAE,EAAE,CAAC,KAAK;QACf,KAAK,EAAE,EAAE,CAAC,KAAK;QACf,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ;KACxB,EACD,EAAE,CAAC,KAAK,IAAI,EAAE,CACf,CAAA;AACH,CAAC","sourcesContent":["import m, { Child } from 'mithril'\r\n\r\nimport {\r\n getValue,\r\n component,\r\n setValue,\r\n ComponentModel,\r\n ValueSource,\r\n ComponentAttrs,\r\n} from '../../core'\r\nimport { call, isNumber, isString, twuiClass, viewFn } from '../../core/utils'\r\n\r\nconst emptyArray: any[] = []\r\n\r\n/**\r\n * @public\r\n */\r\nexport type SelectOption = {\r\n label: string\r\n value: unknown\r\n disabled?: boolean\r\n}\r\n/**\r\n * @public\r\n */\r\nexport type SelectOptionArray = Array<\r\n SelectOption | SelectOptionGroup | string | number\r\n>\r\n/**\r\n * @public\r\n */\r\nexport type SelectOptionsObject = {\r\n [key: string]: unknown\r\n}\r\n/**\r\n * @public\r\n */\r\nexport type SelectOptionGroup<T = SelectOptionArray | SelectOptionsObject> = {\r\n label: string\r\n options: T\r\n disabled?: boolean\r\n}\r\n\r\n/**\r\n * Select component select options\r\n * @public\r\n */\r\nexport type SelectModelOptions = SelectOptionArray | SelectOptionsObject\r\n\r\n/**\r\n * Select component attributes\r\n * @public\r\n */\r\nexport type SelectAttrs = ComponentAttrs<SelectModel>\r\n\r\n/**\r\n * Select component model\r\n * @public\r\n */\r\nexport interface SelectModel<T = unknown, V = any>\r\n extends ComponentModel,\r\n ValueSource<T, V> {\r\n /**\r\n * The type name of the control\r\n */\r\n type: 'select'\r\n /**\r\n * The select options\r\n */\r\n options?: SelectModelOptions\r\n /**\r\n * This is called once the control value is committed by the user.\r\n */\r\n onChange?: (model: SelectModel<T>, value: unknown) => void\r\n /**\r\n * Disables the control input\r\n */\r\n disabled?: boolean\r\n}\r\n\r\nfunction optionsFromFlatArray(arr: SelectOptionArray): SelectOption[] {\r\n const res: SelectOption[] = []\r\n for (const it of arr) {\r\n if (isString(it) || isNumber(it)) {\r\n res.push({ value: it, label: String(it) })\r\n continue\r\n }\r\n if ('value' in it) {\r\n res.push(it)\r\n continue\r\n }\r\n }\r\n return res\r\n}\r\n\r\nfunction optionsFromArray(\r\n arr: SelectOptionArray,\r\n): Array<SelectOption | SelectOptionGroup<SelectOption[]>> {\r\n const res: Array<SelectOption | SelectOptionGroup<SelectOption[]>> = []\r\n for (const it of arr) {\r\n if (isString(it) || isNumber(it) || it == null) {\r\n res.push({ value: it, label: String(it) })\r\n } else if ('value' in it) {\r\n res.push(it)\r\n } else if ('options' in it) {\r\n res.push({\r\n label: it.label,\r\n disabled: it.disabled,\r\n options: Array.isArray(it.options)\r\n ? optionsFromFlatArray(it.options)\r\n : optionsFromObject(it.options),\r\n })\r\n }\r\n }\r\n return res\r\n}\r\n\r\nfunction optionsFromObject(obj: SelectOptionsObject): Array<SelectOption> {\r\n return Object.keys(obj)\r\n .sort()\r\n .map((key) => ({ value: obj[key], label: key }))\r\n}\r\n\r\nfunction getOptions(\r\n node: m.Vnode<SelectAttrs>,\r\n): Array<SelectOption | SelectOptionGroup<SelectOption[]>> {\r\n const options = node.attrs.data.options\r\n\r\n if (!options) {\r\n return emptyArray\r\n }\r\n\r\n if (Array.isArray(options)) {\r\n return optionsFromArray(options)\r\n }\r\n return optionsFromObject(options)\r\n}\r\n\r\ncomponent<SelectAttrs>('select', (node) => {\r\n let options: Array<SelectOption | SelectOptionGroup<SelectOption[]>>\r\n\r\n function getSelectedIndex() {\r\n const data = node.attrs.data\r\n const value = getValue(data)\r\n let i = 0\r\n for (const o0 of options) {\r\n if ('options' in o0) {\r\n for (const o1 of o0.options) {\r\n if (o1.value === value) {\r\n return i\r\n }\r\n i++\r\n }\r\n } else {\r\n if (o0.value === value) {\r\n return i\r\n }\r\n i++\r\n }\r\n }\r\n }\r\n\r\n function getSelectionAt(index: number) {\r\n let i = 0\r\n for (const o0 of options) {\r\n if ('options' in o0) {\r\n for (const o1 of o0.options) {\r\n if (i === index) {\r\n return o1.value\r\n }\r\n i += 1\r\n }\r\n } else {\r\n if (i === index) {\r\n return o0.value\r\n }\r\n i += 1\r\n }\r\n }\r\n return null\r\n }\r\n\r\n function onChange(e: Event) {\r\n const el = e.target as HTMLSelectElement\r\n const data = node.attrs.data\r\n const value = getSelectionAt(el.selectedIndex)\r\n const written = setValue(data, value)\r\n call(data.onChange, data, written)\r\n }\r\n\r\n return {\r\n view: viewFn((data) => {\r\n options = getOptions(node)\r\n return m(\r\n 'select',\r\n {\r\n class: twuiClass(data.type),\r\n selectedIndex: getSelectedIndex(),\r\n onchange: onChange,\r\n disabled: data.disabled,\r\n },\r\n options.map((it) => {\r\n if ('options' in it) {\r\n return m(\r\n 'optgroup',\r\n {\r\n disabled: !!it.disabled,\r\n label: it.label || '',\r\n },\r\n it.options.map(option),\r\n )\r\n }\r\n return option(it)\r\n }),\r\n )\r\n }),\r\n }\r\n})\r\n\r\nfunction option(it: SelectOption) {\r\n return m(\r\n 'option',\r\n {\r\n value: it.value,\r\n label: it.label,\r\n disabled: !!it.disabled,\r\n },\r\n it.label || '',\r\n )\r\n}\r\n"]}
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { ComponentModel, ValueSource, ComponentAttrs, ValueCodec } from '../../core';
|
|
2
|
-
/**
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
export
|
|
6
|
-
[key: string]: number;
|
|
7
|
-
} | {
|
|
8
|
-
[key: number]: number;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Spherical component attributes
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
export
|
|
15
|
-
/**
|
|
16
|
-
* Spherical component model
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
export interface SphericalModel<T = unknown> extends ComponentModel, ValueSource<T, SphericalValue> {
|
|
20
|
-
/**
|
|
21
|
-
* The type name of the control
|
|
22
|
-
*/
|
|
23
|
-
type: 'spherical';
|
|
24
|
-
/**
|
|
25
|
-
* The object field names. Defaults to `['phi', 'theta']`
|
|
26
|
-
*/
|
|
27
|
-
keys?: Array<string | number>;
|
|
28
|
-
/**
|
|
29
|
-
* Whether to use degrees instead of radians
|
|
30
|
-
*/
|
|
31
|
-
degree?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* This is called when the control value has been changed.
|
|
34
|
-
*/
|
|
35
|
-
onInput?: (model: SphericalModel<T>, value: unknown) => void;
|
|
36
|
-
/**
|
|
37
|
-
* This is called once the control value is committed by the user.
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
41
|
-
*/
|
|
42
|
-
onChange?: (model: SphericalModel<T>, value: unknown) => void;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Direction name
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
export
|
|
49
|
-
export interface SphericalCodecOptions<T> {
|
|
50
|
-
/**
|
|
51
|
-
* Maps object keys to cartesian axes. Defaults to `{ x: 'right', y: 'up', z: 'back' }`
|
|
52
|
-
*/
|
|
53
|
-
axes?: Record<string | number, Direction>;
|
|
54
|
-
/**
|
|
55
|
-
* The vector length (sphere radius). Defaults to `1`
|
|
56
|
-
*/
|
|
57
|
-
length?: number | (() => number);
|
|
58
|
-
/**
|
|
59
|
-
* Gets the objec where the result should be stored. May return a new instance.
|
|
60
|
-
*/
|
|
61
|
-
result?: () => T;
|
|
62
|
-
}
|
|
63
|
-
export declare function sphericalCodec(): ValueCodec<{
|
|
64
|
-
x: number;
|
|
65
|
-
y: number;
|
|
66
|
-
z: number;
|
|
67
|
-
}, {
|
|
68
|
-
phi: number;
|
|
69
|
-
theta: number;
|
|
70
|
-
}>;
|
|
71
|
-
export declare function sphericalCodec<T>(options: SphericalCodecOptions<T>): ValueCodec<T, {
|
|
72
|
-
phi: number;
|
|
73
|
-
theta: number;
|
|
74
|
-
}>;
|
|
1
|
+
import { ComponentModel, ValueSource, ComponentAttrs, ValueCodec } from '../../core';
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export type SphericalValue = number[] | {
|
|
6
|
+
[key: string]: number;
|
|
7
|
+
} | {
|
|
8
|
+
[key: number]: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Spherical component attributes
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export type SphericalAttrs = ComponentAttrs<SphericalModel>;
|
|
15
|
+
/**
|
|
16
|
+
* Spherical component model
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export interface SphericalModel<T = unknown> extends ComponentModel, ValueSource<T, SphericalValue> {
|
|
20
|
+
/**
|
|
21
|
+
* The type name of the control
|
|
22
|
+
*/
|
|
23
|
+
type: 'spherical';
|
|
24
|
+
/**
|
|
25
|
+
* The object field names. Defaults to `['phi', 'theta']`
|
|
26
|
+
*/
|
|
27
|
+
keys?: Array<string | number>;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to use degrees instead of radians
|
|
30
|
+
*/
|
|
31
|
+
degree?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* This is called when the control value has been changed.
|
|
34
|
+
*/
|
|
35
|
+
onInput?: (model: SphericalModel<T>, value: unknown) => void;
|
|
36
|
+
/**
|
|
37
|
+
* This is called once the control value is committed by the user.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Unlike the `onInput` callback, this is not necessarily called for each value change.
|
|
41
|
+
*/
|
|
42
|
+
onChange?: (model: SphericalModel<T>, value: unknown) => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Direction name
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
export type Direction = 'right' | 'left' | 'up' | 'down' | 'front' | 'back';
|
|
49
|
+
export interface SphericalCodecOptions<T> {
|
|
50
|
+
/**
|
|
51
|
+
* Maps object keys to cartesian axes. Defaults to `{ x: 'right', y: 'up', z: 'back' }`
|
|
52
|
+
*/
|
|
53
|
+
axes?: Record<string | number, Direction>;
|
|
54
|
+
/**
|
|
55
|
+
* The vector length (sphere radius). Defaults to `1`
|
|
56
|
+
*/
|
|
57
|
+
length?: number | (() => number);
|
|
58
|
+
/**
|
|
59
|
+
* Gets the objec where the result should be stored. May return a new instance.
|
|
60
|
+
*/
|
|
61
|
+
result?: () => T;
|
|
62
|
+
}
|
|
63
|
+
export declare function sphericalCodec(): ValueCodec<{
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
z: number;
|
|
67
|
+
}, {
|
|
68
|
+
phi: number;
|
|
69
|
+
theta: number;
|
|
70
|
+
}>;
|
|
71
|
+
export declare function sphericalCodec<T>(options: SphericalCodecOptions<T>): ValueCodec<T, {
|
|
72
|
+
phi: number;
|
|
73
|
+
theta: number;
|
|
74
|
+
}>;
|
|
75
75
|
//# sourceMappingURL=spherical.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spherical.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/spherical.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,cAAc,EACd,WAAW,EACX,cAAc,EAEd,UAAU,EACX,MAAM,YAAY,CAAA;AAKnB;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"spherical.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/controls/spherical.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,cAAc,EACd,WAAW,EACX,cAAc,EAEd,UAAU,EACX,MAAM,YAAY,CAAA;AAKnB;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAA;AAE7F;;;GAGG;AACH,MAAM,MAAM,cAAc,G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