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.
Files changed (184) hide show
  1. package/LICENSE +7 -7
  2. package/README.md +32 -32
  3. package/dist/lib/builder.d.ts +166 -162
  4. package/dist/lib/builder.d.ts.map +1 -1
  5. package/dist/lib/builder.js +250 -0
  6. package/dist/lib/builder.js.map +1 -0
  7. package/dist/lib/color-formats/array-format.d.ts +8 -8
  8. package/dist/lib/color-formats/array-format.js +18 -0
  9. package/dist/lib/color-formats/array-format.js.map +1 -0
  10. package/dist/lib/color-formats/converter.d.ts +18 -18
  11. package/dist/lib/color-formats/converter.js +85 -0
  12. package/dist/lib/color-formats/converter.js.map +1 -0
  13. package/dist/lib/color-formats/css-string-format.d.ts +7 -7
  14. package/dist/lib/color-formats/css-string-format.js +28 -0
  15. package/dist/lib/color-formats/css-string-format.js.map +1 -0
  16. package/dist/lib/color-formats/formatter.d.ts +8 -8
  17. package/dist/lib/color-formats/formatter.js +35 -0
  18. package/dist/lib/color-formats/formatter.js.map +1 -0
  19. package/dist/lib/color-formats/hex-string-format.d.ts +7 -7
  20. package/dist/lib/color-formats/hex-string-format.js +28 -0
  21. package/dist/lib/color-formats/hex-string-format.js.map +1 -0
  22. package/dist/lib/color-formats/index.d.ts +3 -3
  23. package/dist/lib/color-formats/index.js +4 -0
  24. package/dist/lib/color-formats/index.js.map +1 -0
  25. package/dist/lib/color-formats/number-format.d.ts +8 -8
  26. package/dist/lib/color-formats/number-format.js +23 -0
  27. package/dist/lib/color-formats/number-format.js.map +1 -0
  28. package/dist/lib/color-formats/object-format.d.ts +14 -14
  29. package/dist/lib/color-formats/object-format.js +23 -0
  30. package/dist/lib/color-formats/object-format.js.map +1 -0
  31. package/dist/lib/color-formats/types.d.ts +101 -101
  32. package/dist/lib/color-formats/types.js +2 -0
  33. package/dist/lib/color-formats/types.js.map +1 -0
  34. package/dist/lib/components/button.d.ts +28 -28
  35. package/dist/lib/components/button.d.ts.map +1 -1
  36. package/dist/lib/components/button.js +15 -0
  37. package/dist/lib/components/button.js.map +1 -0
  38. package/dist/lib/components/content.d.ts +21 -21
  39. package/dist/lib/components/content.d.ts.map +1 -1
  40. package/dist/lib/components/content.js +10 -0
  41. package/dist/lib/components/content.js.map +1 -0
  42. package/dist/lib/components/controls/angle.d.ts +51 -51
  43. package/dist/lib/components/controls/angle.d.ts.map +1 -1
  44. package/dist/lib/components/controls/angle.js +201 -0
  45. package/dist/lib/components/controls/angle.js.map +1 -0
  46. package/dist/lib/components/controls/checkbox.d.ts +28 -28
  47. package/dist/lib/components/controls/checkbox.d.ts.map +1 -1
  48. package/dist/lib/components/controls/checkbox.js +31 -0
  49. package/dist/lib/components/controls/checkbox.js.map +1 -0
  50. package/dist/lib/components/controls/color-picker.d.ts +56 -56
  51. package/dist/lib/components/controls/color-picker.d.ts.map +1 -1
  52. package/dist/lib/components/controls/color-picker.js +267 -0
  53. package/dist/lib/components/controls/color-picker.js.map +1 -0
  54. package/dist/lib/components/controls/color.d.ts +51 -51
  55. package/dist/lib/components/controls/color.d.ts.map +1 -1
  56. package/dist/lib/components/controls/color.js +77 -0
  57. package/dist/lib/components/controls/color.js.map +1 -0
  58. package/dist/lib/components/controls/index.d.ts +10 -10
  59. package/dist/lib/components/controls/index.js +11 -0
  60. package/dist/lib/components/controls/index.js.map +1 -0
  61. package/dist/lib/components/controls/number.d.ts +47 -47
  62. package/dist/lib/components/controls/number.d.ts.map +1 -1
  63. package/dist/lib/components/controls/number.js +142 -0
  64. package/dist/lib/components/controls/number.js.map +1 -0
  65. package/dist/lib/components/controls/point.d.ts +47 -47
  66. package/dist/lib/components/controls/point.d.ts.map +1 -1
  67. package/dist/lib/components/controls/point.js +137 -0
  68. package/dist/lib/components/controls/point.js.map +1 -0
  69. package/dist/lib/components/controls/position.d.ts +55 -55
  70. package/dist/lib/components/controls/position.d.ts.map +1 -1
  71. package/dist/lib/components/controls/position.js +36 -0
  72. package/dist/lib/components/controls/position.js.map +1 -0
  73. package/dist/lib/components/controls/select.d.ts +59 -59
  74. package/dist/lib/components/controls/select.d.ts.map +1 -1
  75. package/dist/lib/components/controls/select.js +132 -0
  76. package/dist/lib/components/controls/select.js.map +1 -0
  77. package/dist/lib/components/controls/spherical.d.ts +74 -74
  78. package/dist/lib/components/controls/spherical.d.ts.map +1 -1
  79. package/dist/lib/components/controls/spherical.js +302 -0
  80. package/dist/lib/components/controls/spherical.js.map +1 -0
  81. package/dist/lib/components/controls/text.d.ts +35 -35
  82. package/dist/lib/components/controls/text.d.ts.map +1 -1
  83. package/dist/lib/components/controls/text.js +24 -0
  84. package/dist/lib/components/controls/text.js.map +1 -0
  85. package/dist/lib/components/groups/accordion.d.ts +21 -21
  86. package/dist/lib/components/groups/accordion.d.ts.map +1 -1
  87. package/dist/lib/components/groups/accordion.js +34 -0
  88. package/dist/lib/components/groups/accordion.js.map +1 -0
  89. package/dist/lib/components/groups/container.d.ts +24 -24
  90. package/dist/lib/components/groups/container.d.ts.map +1 -1
  91. package/dist/lib/components/groups/container.js +19 -0
  92. package/dist/lib/components/groups/container.js.map +1 -0
  93. package/dist/lib/components/groups/group.d.ts +48 -48
  94. package/dist/lib/components/groups/group.d.ts.map +1 -1
  95. package/dist/lib/components/groups/group.js +50 -0
  96. package/dist/lib/components/groups/group.js.map +1 -0
  97. package/dist/lib/components/groups/index.d.ts +4 -4
  98. package/dist/lib/components/groups/index.js +5 -0
  99. package/dist/lib/components/groups/index.js.map +1 -0
  100. package/dist/lib/components/groups/tabs.d.ts +21 -21
  101. package/dist/lib/components/groups/tabs.d.ts.map +1 -1
  102. package/dist/lib/components/groups/tabs.js +31 -0
  103. package/dist/lib/components/groups/tabs.js.map +1 -0
  104. package/dist/lib/components/image.d.ts +36 -36
  105. package/dist/lib/components/image.d.ts.map +1 -1
  106. package/dist/lib/components/image.js +46 -0
  107. package/dist/lib/components/image.js.map +1 -0
  108. package/dist/lib/components/index.d.ts +5 -5
  109. package/dist/lib/components/index.js +6 -0
  110. package/dist/lib/components/index.js.map +1 -0
  111. package/dist/lib/core/index.d.ts +4 -4
  112. package/dist/lib/core/index.js +5 -0
  113. package/dist/lib/core/index.js.map +1 -0
  114. package/dist/lib/core/registry.d.ts +17 -17
  115. package/dist/lib/core/registry.js +30 -0
  116. package/dist/lib/core/registry.js.map +1 -0
  117. package/dist/lib/core/render.d.ts +9 -9
  118. package/dist/lib/core/render.d.ts.map +1 -1
  119. package/dist/lib/core/render.js +19 -0
  120. package/dist/lib/core/render.js.map +1 -0
  121. package/dist/lib/core/types.d.ts +87 -87
  122. package/dist/lib/core/types.d.ts.map +1 -1
  123. package/dist/lib/core/types.js +2 -0
  124. package/dist/lib/core/types.js.map +1 -0
  125. package/dist/lib/core/utils.d.ts +93 -93
  126. package/dist/lib/core/utils.d.ts.map +1 -1
  127. package/dist/lib/core/utils.js +193 -0
  128. package/dist/lib/core/utils.js.map +1 -0
  129. package/dist/lib/core/value-accessor.d.ts +17 -17
  130. package/dist/lib/core/value-accessor.js +52 -0
  131. package/dist/lib/core/value-accessor.js.map +1 -0
  132. package/dist/lib/index.d.ts +21 -27
  133. package/dist/lib/index.d.ts.map +1 -1
  134. package/dist/lib/index.js +29 -0
  135. package/dist/lib/index.js.map +1 -0
  136. package/dist/lib/mount.d.ts +45 -45
  137. package/dist/lib/mount.js +85 -0
  138. package/dist/lib/mount.js.map +1 -0
  139. package/dist/tweak-ui.css +133 -138
  140. package/dist/tweak-ui.css.map +1 -1
  141. package/dist/tweak-ui.min.css +1 -1
  142. package/dist/tweak-ui.min.css.map +1 -1
  143. package/dist/tweak-ui.module.js +2733 -2380
  144. package/dist/tweak-ui.module.js.map +1 -1
  145. package/dist/tweak-ui.umd.js +1 -4403
  146. package/dist/tweak-ui.umd.js.map +1 -1
  147. package/package.json +25 -42
  148. package/dist/index.html +0 -1061
  149. package/dist/lib/color-formats/array-format.spec.d.ts +0 -2
  150. package/dist/lib/color-formats/array-format.spec.d.ts.map +0 -1
  151. package/dist/lib/color-formats/converter.spec.d.ts +0 -2
  152. package/dist/lib/color-formats/converter.spec.d.ts.map +0 -1
  153. package/dist/lib/color-formats/css-string-format.spec.d.ts +0 -2
  154. package/dist/lib/color-formats/css-string-format.spec.d.ts.map +0 -1
  155. package/dist/lib/color-formats/formatter.spec.d.ts +0 -2
  156. package/dist/lib/color-formats/formatter.spec.d.ts.map +0 -1
  157. package/dist/lib/color-formats/hex-string-format.spec.d.ts +0 -2
  158. package/dist/lib/color-formats/hex-string-format.spec.d.ts.map +0 -1
  159. package/dist/lib/color-formats/number-format.spec.d.ts +0 -2
  160. package/dist/lib/color-formats/number-format.spec.d.ts.map +0 -1
  161. package/dist/lib/color-formats/object-format.spec.d.ts +0 -2
  162. package/dist/lib/color-formats/object-format.spec.d.ts.map +0 -1
  163. package/dist/scss/_style.scss +0 -120
  164. package/dist/scss/_themes.scss +0 -23
  165. package/dist/scss/_utils.scss +0 -24
  166. package/dist/scss/_variables.scss +0 -30
  167. package/dist/scss/controls/_angle.scss +0 -64
  168. package/dist/scss/controls/_button.scss +0 -0
  169. package/dist/scss/controls/_checkbox.scss +0 -19
  170. package/dist/scss/controls/_color-picker.scss +0 -124
  171. package/dist/scss/controls/_color.scss +0 -14
  172. package/dist/scss/controls/_container.scss +0 -13
  173. package/dist/scss/controls/_group.scss +0 -69
  174. package/dist/scss/controls/_image.scss +0 -27
  175. package/dist/scss/controls/_number.scss +0 -38
  176. package/dist/scss/controls/_point.scss +0 -36
  177. package/dist/scss/controls/_position.scss +0 -9
  178. package/dist/scss/controls/_select.scss +0 -0
  179. package/dist/scss/controls/_spherical.scss +0 -87
  180. package/dist/scss/controls/_tabs.scss +0 -38
  181. package/dist/scss/controls/_text.scss +0 -0
  182. package/dist/scss/index.scss +0 -21
  183. package/dist/tweak-ui.umd.min.js +0 -17
  184. 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 declare type SelectOption = {
6
- label: string;
7
- value: unknown;
8
- disabled?: boolean;
9
- };
10
- /**
11
- * @public
12
- */
13
- export declare type SelectOptionArray = Array<SelectOption | SelectOptionGroup | string | number>;
14
- /**
15
- * @public
16
- */
17
- export declare type SelectOptionsObject = {
18
- [key: string]: unknown;
19
- };
20
- /**
21
- * @public
22
- */
23
- export declare 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 declare type SelectModelOptions = SelectOptionArray | SelectOptionsObject;
33
- /**
34
- * Select component attributes
35
- * @public
36
- */
37
- export declare 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
- }
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,oBAAY,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AACD;;GAEG;AACH,oBAAY,iBAAiB,GAAG,KAAK,CACnC,YAAY,GAAG,iBAAiB,GAAG,MAAM,GAAG,MAAM,CACnD,CAAA;AACD;;GAEG;AACH,oBAAY,mBAAmB,GAAG;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AACD;;GAEG;AACH,oBAAY,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,oBAAY,kBAAkB,GAAG,iBAAiB,GAAG,mBAAmB,CAAA;AAExE;;;GAGG;AACH,oBAAY,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"}
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 @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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 declare type SphericalValue = number[] | {
6
- [key: string]: number;
7
- } | {
8
- [key: number]: number;
9
- };
10
- /**
11
- * Spherical component attributes
12
- * @public
13
- */
14
- export declare 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 declare 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
- }>;
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,oBAAY,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,oBAAY,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,CAAA;AAE3D;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,OAAO,CACzC,SAAQ,cAAc,EACpB,WAAW,CAAC,CAAC,EAAE,cAAc,CAAC;IAChC;;OAEG;IACH,IAAI,EAAE,WAAW,CAAA;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CA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