@j2inn/fin5-ui-utils 8.2.0 → 9.0.0-beta.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 (243) hide show
  1. package/dist/fantomProps/createFin5Props/index.d.ts +12 -12
  2. package/dist/fantomProps/createFin5Props/index.js +146 -146
  3. package/dist/fantomProps/createFin5Props/index.js.map +1 -1
  4. package/dist/fantomProps/createFin5Props/runCreateFin5Props.d.ts +2 -2
  5. package/dist/fantomProps/createFin5Props/runCreateFin5Props.js +20 -20
  6. package/dist/fantomProps/createFin5Props/runCreateFin5Props.js.map +1 -1
  7. package/dist/fantomProps/fantomPropsToObject.d.ts +8 -8
  8. package/dist/fantomProps/fantomPropsToObject.js +182 -183
  9. package/dist/fantomProps/fantomPropsToObject.js.map +1 -1
  10. package/dist/fantomProps/generateJsonFromFantomPropsFile.d.ts +4 -4
  11. package/dist/fantomProps/generateJsonFromFantomPropsFile.js +51 -41
  12. package/dist/fantomProps/generateJsonFromFantomPropsFile.js.map +1 -1
  13. package/dist/fantomProps/localePropsToJson.d.ts +1 -1
  14. package/dist/fantomProps/localePropsToJson.js +60 -50
  15. package/dist/fantomProps/localePropsToJson.js.map +1 -1
  16. package/dist/fantomProps/readFantomPropsFile.d.ts +5 -5
  17. package/dist/fantomProps/readFantomPropsFile.js +74 -65
  18. package/dist/fantomProps/readFantomPropsFile.js.map +1 -1
  19. package/dist/fin5Top/fin5FileUpload.d.ts +24 -24
  20. package/dist/fin5Top/fin5FileUpload.js +51 -51
  21. package/dist/fin5Top/fin5FileUpload.js.map +1 -1
  22. package/dist/fin5Top/fin5Top.d.ts +188 -188
  23. package/dist/fin5Top/fin5Top.js +86 -86
  24. package/dist/fin5Top/fin5Top.js.map +1 -1
  25. package/dist/fin5Top/finEdge2Cloud.d.ts +6 -6
  26. package/dist/fin5Top/finEdge2Cloud.js +15 -15
  27. package/dist/fin5Top/getFin5BinUrl.d.ts +2 -2
  28. package/dist/fin5Top/getFin5BinUrl.js +9 -9
  29. package/dist/fin5Top/openFin5Alarm.d.ts +22 -22
  30. package/dist/fin5Top/openFin5Alarm.js +23 -23
  31. package/dist/fin5Top/openFin5Alarm.js.map +1 -1
  32. package/dist/fin5Top/openFin5Historian.d.ts +3 -3
  33. package/dist/fin5Top/openFin5Historian.js +19 -19
  34. package/dist/fin5Top/openFin5Historian.js.map +1 -1
  35. package/dist/fin5Top/useFin5AppURLHashParameter.d.ts +18 -18
  36. package/dist/fin5Top/useFin5AppURLHashParameter.js +133 -133
  37. package/dist/fin5Top/useFin5AppURLHashParameter.js.map +1 -1
  38. package/dist/index.d.ts +35 -35
  39. package/dist/index.js +69 -69
  40. package/dist/jobs/jobUtils.d.ts +14 -14
  41. package/dist/jobs/jobUtils.js +15 -15
  42. package/dist/jobs/jobUtils.js.map +1 -1
  43. package/dist/react/app/Fin5AppContainer.d.ts +36 -36
  44. package/dist/react/app/Fin5AppContainer.js +171 -161
  45. package/dist/react/app/Fin5AppContainer.js.map +1 -1
  46. package/dist/react/app/Fin5AppRootStore.d.ts +42 -42
  47. package/dist/react/app/Fin5AppRootStore.js +114 -114
  48. package/dist/react/app/Fin5AppRootStore.js.map +1 -1
  49. package/dist/react/components/ErrorBoundary.d.ts +57 -57
  50. package/dist/react/components/ErrorBoundary.js +160 -150
  51. package/dist/react/components/ErrorBoundary.js.map +1 -1
  52. package/dist/react/components/ErrorDisplayer.d.ts +19 -19
  53. package/dist/react/components/ErrorDisplayer.js +36 -36
  54. package/dist/react/components/ErrorDisplayer.js.map +1 -1
  55. package/dist/react/components/Loader.d.ts +9 -9
  56. package/dist/react/components/Loader.js +17 -17
  57. package/dist/react/components/LoadingSpinner.d.ts +2 -2
  58. package/dist/react/components/LoadingSpinner.js +27 -27
  59. package/dist/react/components/RecordImage.d.ts +20 -20
  60. package/dist/react/components/RecordImage.js +61 -51
  61. package/dist/react/components/RecordImage.js.map +1 -1
  62. package/dist/react/components/charts/QRCode.d.ts +25 -25
  63. package/dist/react/components/charts/QRCode.js +92 -82
  64. package/dist/react/components/charts/QRCode.js.map +1 -1
  65. package/dist/react/components/charts/line-bar/Chart.d.ts +166 -166
  66. package/dist/react/components/charts/line-bar/Chart.js +452 -442
  67. package/dist/react/components/charts/line-bar/Chart.js.map +1 -1
  68. package/dist/react/components/charts/line-bar/HGridChart.d.ts +58 -58
  69. package/dist/react/components/charts/line-bar/HGridChart.js +295 -285
  70. package/dist/react/components/charts/line-bar/HGridChart.js.map +1 -1
  71. package/dist/react/components/charts/pie/PieChart.d.ts +94 -94
  72. package/dist/react/components/charts/pie/PieChart.js +214 -204
  73. package/dist/react/components/charts/pie/PieChart.js.map +1 -1
  74. package/dist/react/components/charts/pie/SimplePieChart.d.ts +21 -21
  75. package/dist/react/components/charts/pie/SimplePieChart.js +65 -55
  76. package/dist/react/components/charts/pie/SimplePieChart.js.map +1 -1
  77. package/dist/react/components/graphics/GraphicViewer.d.ts +10 -10
  78. package/dist/react/components/graphics/GraphicViewer.js +29 -29
  79. package/dist/react/components/graphics/GraphicsTabViewer.d.ts +17 -17
  80. package/dist/react/components/graphics/GraphicsTabViewer.js +100 -90
  81. package/dist/react/components/graphics/GraphicsTabViewer.js.map +1 -1
  82. package/dist/react/components/makeCustomElement.d.ts +16 -16
  83. package/dist/react/components/makeCustomElement.js +150 -150
  84. package/dist/react/components/makeCustomElement.js.map +1 -1
  85. package/dist/react/components/navigation/BasicLayout.d.ts +41 -41
  86. package/dist/react/components/navigation/BasicLayout.js +165 -155
  87. package/dist/react/components/navigation/BasicLayout.js.map +1 -1
  88. package/dist/react/components/navigation/HeaderSiderLayout.d.ts +13 -13
  89. package/dist/react/components/navigation/HeaderSiderLayout.js +119 -110
  90. package/dist/react/components/navigation/HeaderSiderLayout.js.map +1 -1
  91. package/dist/react/components/navigation/MenuPage.d.ts +37 -37
  92. package/dist/react/components/navigation/MenuPage.js +35 -36
  93. package/dist/react/components/navigation/MenuPage.js.map +1 -1
  94. package/dist/react/components/navigation/MenuTrigger.d.ts +9 -9
  95. package/dist/react/components/navigation/MenuTrigger.js +33 -33
  96. package/dist/react/components/navigation/ReactRouterHeaderSiderLayout.d.ts +11 -11
  97. package/dist/react/components/navigation/ReactRouterHeaderSiderLayout.js +25 -25
  98. package/dist/react/components/navigation/ReactRouterHeaderSiderLayout.js.map +1 -1
  99. package/dist/react/components/navigation/ReactRouterLayout.d.ts +45 -46
  100. package/dist/react/components/navigation/ReactRouterLayout.js +142 -132
  101. package/dist/react/components/navigation/ReactRouterLayout.js.map +1 -1
  102. package/dist/react/components/navigation/customRouting/Router.d.ts +12 -12
  103. package/dist/react/components/navigation/customRouting/Router.js +54 -45
  104. package/dist/react/components/navigation/customRouting/Router.js.map +1 -1
  105. package/dist/react/components/navigation/customRouting/RouterLayout.d.ts +11 -11
  106. package/dist/react/components/navigation/customRouting/RouterLayout.js +71 -61
  107. package/dist/react/components/navigation/customRouting/RouterLayout.js.map +1 -1
  108. package/dist/react/components/resolvable/configurationForm/ConfigurationForm.d.ts +26 -27
  109. package/dist/react/components/resolvable/configurationForm/ConfigurationForm.js +105 -95
  110. package/dist/react/components/resolvable/configurationForm/ConfigurationForm.js.map +1 -1
  111. package/dist/react/components/resolvable/configurationForm/ConfigurationFormEntry.d.ts +15 -16
  112. package/dist/react/components/resolvable/configurationForm/ConfigurationFormEntry.js +98 -88
  113. package/dist/react/components/resolvable/configurationForm/ConfigurationFormEntry.js.map +1 -1
  114. package/dist/react/components/resolvable/configurationForm/getSectionDefault.d.ts +16 -16
  115. package/dist/react/components/resolvable/configurationForm/getSectionDefault.js +99 -99
  116. package/dist/react/components/resolvable/configurationForm/getSectionDefault.js.map +1 -1
  117. package/dist/react/hooks/useFin5BinUrl.d.ts +6 -6
  118. package/dist/react/hooks/useFin5BinUrl.js +15 -15
  119. package/dist/react/hooks/useFin5ColorScheme.d.ts +2 -2
  120. package/dist/react/hooks/useFin5ColorScheme.js +55 -56
  121. package/dist/react/hooks/useFin5ColorScheme.js.map +1 -1
  122. package/dist/react/hooks/useScreenSize.d.ts +7 -7
  123. package/dist/react/hooks/useScreenSize.js +31 -31
  124. package/dist_es/fantomProps/createFin5Props/index.d.ts +12 -12
  125. package/dist_es/fantomProps/createFin5Props/index.js +140 -140
  126. package/dist_es/fantomProps/createFin5Props/index.js.map +1 -1
  127. package/dist_es/fantomProps/createFin5Props/runCreateFin5Props.d.ts +2 -2
  128. package/dist_es/fantomProps/createFin5Props/runCreateFin5Props.js +15 -15
  129. package/dist_es/fantomProps/createFin5Props/runCreateFin5Props.js.map +1 -1
  130. package/dist_es/fantomProps/fantomPropsToObject.d.ts +8 -8
  131. package/dist_es/fantomProps/fantomPropsToObject.js +178 -178
  132. package/dist_es/fantomProps/fantomPropsToObject.js.map +1 -1
  133. package/dist_es/fantomProps/generateJsonFromFantomPropsFile.d.ts +4 -4
  134. package/dist_es/fantomProps/generateJsonFromFantomPropsFile.js +12 -12
  135. package/dist_es/fantomProps/localePropsToJson.d.ts +1 -1
  136. package/dist_es/fantomProps/localePropsToJson.js +21 -21
  137. package/dist_es/fantomProps/localePropsToJson.js.map +1 -1
  138. package/dist_es/fantomProps/readFantomPropsFile.d.ts +5 -5
  139. package/dist_es/fantomProps/readFantomPropsFile.js +38 -39
  140. package/dist_es/fantomProps/readFantomPropsFile.js.map +1 -1
  141. package/dist_es/fin5Top/fin5FileUpload.d.ts +24 -24
  142. package/dist_es/fin5Top/fin5FileUpload.js +47 -47
  143. package/dist_es/fin5Top/fin5FileUpload.js.map +1 -1
  144. package/dist_es/fin5Top/fin5Top.d.ts +188 -188
  145. package/dist_es/fin5Top/fin5Top.js +81 -81
  146. package/dist_es/fin5Top/fin5Top.js.map +1 -1
  147. package/dist_es/fin5Top/finEdge2Cloud.d.ts +6 -6
  148. package/dist_es/fin5Top/finEdge2Cloud.js +11 -11
  149. package/dist_es/fin5Top/getFin5BinUrl.d.ts +2 -2
  150. package/dist_es/fin5Top/getFin5BinUrl.js +5 -5
  151. package/dist_es/fin5Top/openFin5Alarm.d.ts +22 -22
  152. package/dist_es/fin5Top/openFin5Alarm.js +19 -19
  153. package/dist_es/fin5Top/openFin5Alarm.js.map +1 -1
  154. package/dist_es/fin5Top/openFin5Historian.d.ts +3 -3
  155. package/dist_es/fin5Top/openFin5Historian.js +15 -15
  156. package/dist_es/fin5Top/openFin5Historian.js.map +1 -1
  157. package/dist_es/fin5Top/useFin5AppURLHashParameter.d.ts +18 -18
  158. package/dist_es/fin5Top/useFin5AppURLHashParameter.js +124 -124
  159. package/dist_es/fin5Top/useFin5AppURLHashParameter.js.map +1 -1
  160. package/dist_es/index.d.ts +35 -35
  161. package/dist_es/index.js +53 -53
  162. package/dist_es/jobs/jobUtils.d.ts +14 -14
  163. package/dist_es/jobs/jobUtils.js +9 -9
  164. package/dist_es/react/app/Fin5AppContainer.d.ts +36 -36
  165. package/dist_es/react/app/Fin5AppContainer.js +132 -132
  166. package/dist_es/react/app/Fin5AppContainer.js.map +1 -1
  167. package/dist_es/react/app/Fin5AppRootStore.d.ts +42 -42
  168. package/dist_es/react/app/Fin5AppRootStore.js +110 -110
  169. package/dist_es/react/app/Fin5AppRootStore.js.map +1 -1
  170. package/dist_es/react/components/ErrorBoundary.d.ts +57 -57
  171. package/dist_es/react/components/ErrorBoundary.js +123 -123
  172. package/dist_es/react/components/ErrorDisplayer.d.ts +19 -19
  173. package/dist_es/react/components/ErrorDisplayer.js +28 -28
  174. package/dist_es/react/components/ErrorDisplayer.js.map +1 -1
  175. package/dist_es/react/components/Loader.d.ts +9 -9
  176. package/dist_es/react/components/Loader.js +12 -12
  177. package/dist_es/react/components/LoadingSpinner.d.ts +2 -2
  178. package/dist_es/react/components/LoadingSpinner.js +20 -20
  179. package/dist_es/react/components/RecordImage.d.ts +20 -20
  180. package/dist_es/react/components/RecordImage.js +24 -24
  181. package/dist_es/react/components/RecordImage.js.map +1 -1
  182. package/dist_es/react/components/charts/QRCode.d.ts +25 -25
  183. package/dist_es/react/components/charts/QRCode.js +52 -52
  184. package/dist_es/react/components/charts/QRCode.js.map +1 -1
  185. package/dist_es/react/components/charts/line-bar/Chart.d.ts +166 -166
  186. package/dist_es/react/components/charts/line-bar/Chart.js +415 -415
  187. package/dist_es/react/components/charts/line-bar/Chart.js.map +1 -1
  188. package/dist_es/react/components/charts/line-bar/HGridChart.d.ts +58 -58
  189. package/dist_es/react/components/charts/line-bar/HGridChart.js +250 -250
  190. package/dist_es/react/components/charts/line-bar/HGridChart.js.map +1 -1
  191. package/dist_es/react/components/charts/pie/PieChart.d.ts +94 -94
  192. package/dist_es/react/components/charts/pie/PieChart.js +177 -177
  193. package/dist_es/react/components/charts/pie/PieChart.js.map +1 -1
  194. package/dist_es/react/components/charts/pie/SimplePieChart.d.ts +21 -21
  195. package/dist_es/react/components/charts/pie/SimplePieChart.js +25 -25
  196. package/dist_es/react/components/graphics/GraphicViewer.d.ts +10 -10
  197. package/dist_es/react/components/graphics/GraphicViewer.js +22 -22
  198. package/dist_es/react/components/graphics/GraphicsTabViewer.d.ts +17 -17
  199. package/dist_es/react/components/graphics/GraphicsTabViewer.js +60 -60
  200. package/dist_es/react/components/graphics/GraphicsTabViewer.js.map +1 -1
  201. package/dist_es/react/components/makeCustomElement.d.ts +16 -16
  202. package/dist_es/react/components/makeCustomElement.js +142 -142
  203. package/dist_es/react/components/makeCustomElement.js.map +1 -1
  204. package/dist_es/react/components/navigation/BasicLayout.d.ts +41 -41
  205. package/dist_es/react/components/navigation/BasicLayout.js +124 -124
  206. package/dist_es/react/components/navigation/BasicLayout.js.map +1 -1
  207. package/dist_es/react/components/navigation/HeaderSiderLayout.d.ts +13 -13
  208. package/dist_es/react/components/navigation/HeaderSiderLayout.js +80 -80
  209. package/dist_es/react/components/navigation/HeaderSiderLayout.js.map +1 -1
  210. package/dist_es/react/components/navigation/MenuPage.d.ts +37 -37
  211. package/dist_es/react/components/navigation/MenuPage.js +30 -30
  212. package/dist_es/react/components/navigation/MenuPage.js.map +1 -1
  213. package/dist_es/react/components/navigation/MenuTrigger.d.ts +9 -9
  214. package/dist_es/react/components/navigation/MenuTrigger.js +28 -28
  215. package/dist_es/react/components/navigation/ReactRouterHeaderSiderLayout.d.ts +11 -11
  216. package/dist_es/react/components/navigation/ReactRouterHeaderSiderLayout.js +18 -18
  217. package/dist_es/react/components/navigation/ReactRouterHeaderSiderLayout.js.map +1 -1
  218. package/dist_es/react/components/navigation/ReactRouterLayout.d.ts +45 -46
  219. package/dist_es/react/components/navigation/ReactRouterLayout.js +99 -99
  220. package/dist_es/react/components/navigation/ReactRouterLayout.js.map +1 -1
  221. package/dist_es/react/components/navigation/customRouting/Router.d.ts +12 -12
  222. package/dist_es/react/components/navigation/customRouting/Router.js +18 -18
  223. package/dist_es/react/components/navigation/customRouting/Router.js.map +1 -1
  224. package/dist_es/react/components/navigation/customRouting/RouterLayout.d.ts +11 -11
  225. package/dist_es/react/components/navigation/customRouting/RouterLayout.js +34 -34
  226. package/dist_es/react/components/navigation/customRouting/RouterLayout.js.map +1 -1
  227. package/dist_es/react/components/resolvable/configurationForm/ConfigurationForm.d.ts +26 -27
  228. package/dist_es/react/components/resolvable/configurationForm/ConfigurationForm.js +64 -64
  229. package/dist_es/react/components/resolvable/configurationForm/ConfigurationForm.js.map +1 -1
  230. package/dist_es/react/components/resolvable/configurationForm/ConfigurationFormEntry.d.ts +15 -16
  231. package/dist_es/react/components/resolvable/configurationForm/ConfigurationFormEntry.js +58 -58
  232. package/dist_es/react/components/resolvable/configurationForm/ConfigurationFormEntry.js.map +1 -1
  233. package/dist_es/react/components/resolvable/configurationForm/getSectionDefault.d.ts +16 -16
  234. package/dist_es/react/components/resolvable/configurationForm/getSectionDefault.js +94 -94
  235. package/dist_es/react/components/resolvable/configurationForm/getSectionDefault.js.map +1 -1
  236. package/dist_es/react/hooks/useFin5BinUrl.d.ts +6 -6
  237. package/dist_es/react/hooks/useFin5BinUrl.js +11 -11
  238. package/dist_es/react/hooks/useFin5ColorScheme.d.ts +2 -2
  239. package/dist_es/react/hooks/useFin5ColorScheme.js +52 -52
  240. package/dist_es/react/hooks/useFin5ColorScheme.js.map +1 -1
  241. package/dist_es/react/hooks/useScreenSize.d.ts +7 -7
  242. package/dist_es/react/hooks/useScreenSize.js +27 -27
  243. package/package.json +26 -49
@@ -1,100 +1,100 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2023, J2 Innovations. All Rights Reserved
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getDefaultHVal = exports.getSectionDefault = void 0;
7
- const haystack_core_1 = require("haystack-core");
8
- /**
9
- * Get default values for all elements that should resolve into an HVal.
10
- * @param section a section element
11
- * @returns an object containing as key the section element name and as value the default HVal.
12
- */
13
- const getSectionDefault = (section) => {
14
- const result = {};
15
- Object.entries(section).forEach(([key, element]) => {
16
- const elementData = element;
17
- const defaultValue = (0, exports.getDefaultHVal)(elementData?._meta?.resolvedType);
18
- if (defaultValue) {
19
- result[key] = defaultValue;
20
- }
21
- });
22
- return result;
23
- };
24
- exports.getSectionDefault = getSectionDefault;
25
- /**
26
- * Get a default for a specific kind of HVal.
27
- * @param kind can be expressed as new or old Hayson, or alternatively the haystack-core type name
28
- * @returns
29
- */
30
- const getDefaultHVal = (kind) => {
31
- switch (kind) {
32
- case haystack_core_1.Kind.Marker:
33
- case 'Marker':
34
- case 'HMarker':
35
- return haystack_core_1.HMarker.make();
36
- case haystack_core_1.Kind.Remove:
37
- case 'Remove':
38
- case 'HRemove':
39
- return haystack_core_1.HRemove.make();
40
- case haystack_core_1.Kind.NA:
41
- case 'NA':
42
- case 'HNa':
43
- return haystack_core_1.HNa.make();
44
- case haystack_core_1.Kind.Coord:
45
- case 'Coord':
46
- case 'HCoord':
47
- return haystack_core_1.HCoord.make({ latitude: 0, longitude: 0 });
48
- case haystack_core_1.Kind.XStr:
49
- case 'XStr':
50
- case 'HXStr':
51
- return haystack_core_1.HXStr.make('');
52
- case haystack_core_1.Kind.Date:
53
- case 'Date':
54
- case 'HDate':
55
- return haystack_core_1.HDate.make(new Date());
56
- case haystack_core_1.Kind.DateTime:
57
- case 'DateTime':
58
- case 'HDateTime':
59
- return haystack_core_1.HDateTime.make(new Date());
60
- case haystack_core_1.Kind.Number:
61
- case 'Number':
62
- case 'HNum':
63
- return haystack_core_1.HNum.make(0);
64
- case haystack_core_1.Kind.Bool:
65
- case 'Bool':
66
- case 'HBool':
67
- return haystack_core_1.HBool.make(false);
68
- case 'Str':
69
- case 'HStr':
70
- return haystack_core_1.HStr.make('');
71
- case haystack_core_1.Kind.Ref:
72
- case 'Ref':
73
- case 'HRef':
74
- return haystack_core_1.HRef.make('');
75
- case haystack_core_1.Kind.Symbol:
76
- case 'Symbol':
77
- case 'HSymbol':
78
- return haystack_core_1.HSymbol.make('');
79
- case haystack_core_1.Kind.Time:
80
- case 'Time':
81
- case 'HTime':
82
- return haystack_core_1.HTime.make(new Date());
83
- case haystack_core_1.Kind.Uri:
84
- case 'Uri':
85
- case 'HUri':
86
- return haystack_core_1.HUri.make('');
87
- case haystack_core_1.Kind.Dict:
88
- case 'Dict':
89
- case 'HDict':
90
- return haystack_core_1.HDict.make();
91
- case haystack_core_1.Kind.Grid:
92
- case 'Grid':
93
- case 'HGrid':
94
- return haystack_core_1.HGrid.make();
95
- default:
96
- return undefined;
97
- }
98
- };
99
- exports.getDefaultHVal = getDefaultHVal;
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2023, J2 Innovations. All Rights Reserved
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getDefaultHVal = exports.getSectionDefault = void 0;
7
+ const haystack_core_1 = require("haystack-core");
8
+ /**
9
+ * Get default values for all elements that should resolve into an HVal.
10
+ * @param section a section element
11
+ * @returns an object containing as key the section element name and as value the default HVal.
12
+ */
13
+ const getSectionDefault = (section) => {
14
+ const result = {};
15
+ Object.entries(section).forEach(([key, element]) => {
16
+ const elementData = element;
17
+ const defaultValue = (0, exports.getDefaultHVal)(elementData?._meta?.resolvedType);
18
+ if (defaultValue) {
19
+ result[key] = defaultValue;
20
+ }
21
+ });
22
+ return result;
23
+ };
24
+ exports.getSectionDefault = getSectionDefault;
25
+ /**
26
+ * Get a default for a specific kind of HVal.
27
+ * @param kind can be expressed as new or old Hayson, or alternatively the haystack-core type name
28
+ * @returns
29
+ */
30
+ const getDefaultHVal = (kind) => {
31
+ switch (kind) {
32
+ case haystack_core_1.Kind.Marker:
33
+ case 'Marker':
34
+ case 'HMarker':
35
+ return haystack_core_1.HMarker.make();
36
+ case haystack_core_1.Kind.Remove:
37
+ case 'Remove':
38
+ case 'HRemove':
39
+ return haystack_core_1.HRemove.make();
40
+ case haystack_core_1.Kind.NA:
41
+ case 'NA':
42
+ case 'HNa':
43
+ return haystack_core_1.HNa.make();
44
+ case haystack_core_1.Kind.Coord:
45
+ case 'Coord':
46
+ case 'HCoord':
47
+ return haystack_core_1.HCoord.make({ latitude: 0, longitude: 0 });
48
+ case haystack_core_1.Kind.XStr:
49
+ case 'XStr':
50
+ case 'HXStr':
51
+ return haystack_core_1.HXStr.make('');
52
+ case haystack_core_1.Kind.Date:
53
+ case 'Date':
54
+ case 'HDate':
55
+ return haystack_core_1.HDate.make(new Date());
56
+ case haystack_core_1.Kind.DateTime:
57
+ case 'DateTime':
58
+ case 'HDateTime':
59
+ return haystack_core_1.HDateTime.make(new Date());
60
+ case haystack_core_1.Kind.Number:
61
+ case 'Number':
62
+ case 'HNum':
63
+ return haystack_core_1.HNum.make(0);
64
+ case haystack_core_1.Kind.Bool:
65
+ case 'Bool':
66
+ case 'HBool':
67
+ return haystack_core_1.HBool.make(false);
68
+ case 'Str':
69
+ case 'HStr':
70
+ return haystack_core_1.HStr.make('');
71
+ case haystack_core_1.Kind.Ref:
72
+ case 'Ref':
73
+ case 'HRef':
74
+ return haystack_core_1.HRef.make('');
75
+ case haystack_core_1.Kind.Symbol:
76
+ case 'Symbol':
77
+ case 'HSymbol':
78
+ return haystack_core_1.HSymbol.make('');
79
+ case haystack_core_1.Kind.Time:
80
+ case 'Time':
81
+ case 'HTime':
82
+ return haystack_core_1.HTime.make(new Date());
83
+ case haystack_core_1.Kind.Uri:
84
+ case 'Uri':
85
+ case 'HUri':
86
+ return haystack_core_1.HUri.make('');
87
+ case haystack_core_1.Kind.Dict:
88
+ case 'Dict':
89
+ case 'HDict':
90
+ return haystack_core_1.HDict.make();
91
+ case haystack_core_1.Kind.Grid:
92
+ case 'Grid':
93
+ case 'HGrid':
94
+ return haystack_core_1.HGrid.make();
95
+ default:
96
+ return undefined;
97
+ }
98
+ };
99
+ exports.getDefaultHVal = getDefaultHVal;
100
100
  //# sourceMappingURL=getSectionDefault.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSectionDefault.js","sourceRoot":"","sources":["../../../../../src/react/components/resolvable/configurationForm/getSectionDefault.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIH,iDAmBsB;AAEtB;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,CAChC,OAAsB,EACI,EAAE;IAC5B,MAAM,MAAM,GAA4B,EAAE,CAAA;IAC1C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE;QAClD,MAAM,WAAW,GAAG,OAAoD,CAAA;QACxE,MAAM,YAAY,GAAG,IAAA,sBAAc,EAAC,WAAW,EAAE,KAAK,EAAE,YAAY,CAAC,CAAA;QAErE,IAAI,YAAY,EAAE;YACjB,MAAM,CAAC,GAAG,CAAC,GAAG,YAAY,CAAA;SAC1B;IACF,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACd,CAAC,CAAA;AAdY,QAAA,iBAAiB,qBAc7B;AAED;;;;GAIG;AACI,MAAM,cAAc,GAAG,CAAC,IAAa,EAAoB,EAAE;IACjE,QAAQ,IAAI,EAAE;QACb,KAAK,oBAAI,CAAC,MAAM,CAAC;QACjB,KAAK,QAAQ,CAAC;QACd,KAAK,SAAS;YACb,OAAO,uBAAO,CAAC,IAAI,EAAE,CAAA;QAC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,GAAG,CAAC;QACd,KAAK,KAAK,CAAC;QACX,KAAK,MAAM;YACV,OAAO,oBAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACrB,KAAK,oBAAI,CAAC,MAAM,CAAC;QACjB,KAAK,QAAQ,CAAC;QACd,KAAK,SAAS;YACb,OAAO,uBAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACxB,KAAK,oBAAI,CAAC,IAAI,CAAC;QACf,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO;YACX,OAAO,qBAAK,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;QAC9B,KAAK,oBAAI,CAAC,GAAG,CAAC;QACd,KAAK,KAAK,CAAC;QACX,KAAK,MAAM;YACV,OAAO,oBAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACrB,KAAK,oBAAI,CAAC,IAAI,CAAC;QACf,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO;YACX,OAAO,qBAAK,CAAC,IAAI,EAAE,CAAA;QACpB,KAAK,oBAAI,CAAC,IAAI,CAAC;QACf,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO;YACX,OAAO,qBAAK,CAAC,IAAI,EAAE,CAAA;QACpB;YACC,OAAO,SAAS,CAAA;KACjB;AACF,CAAC,CAAA;AApEY,QAAA,cAAc,kBAoE1B"}
1
+ {"version":3,"file":"getSectionDefault.js","sourceRoot":"","sources":["../../../../../src/react/components/resolvable/configurationForm/getSectionDefault.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIH,iDAmBsB;AAEtB;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,CAChC,OAAsB,EACI,EAAE;IAC5B,MAAM,MAAM,GAA4B,EAAE,CAAA;IAC1C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE;QAClD,MAAM,WAAW,GAAG,OAAoD,CAAA;QACxE,MAAM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;QACpB;YACC,OAAO,SAAS,CAAA;IAClB,CAAC;AACF,CAAC,CAAA;AApEY,QAAA,cAAc,kBAoE1B"}
@@ -1,6 +1,6 @@
1
- import { HRef } from 'haystack-core';
2
- /**
3
- * Retrieves the url of a Fin 5 bin based on the file record id, or undefined if the url couldn't be retrieved.
4
- * Uses haystack-nclient to retrieve the projectName from context.
5
- */
6
- export declare const useFin5BinUrl: (fileId?: HRef) => string | undefined;
1
+ import { HRef } from 'haystack-core';
2
+ /**
3
+ * Retrieves the url of a Fin 5 bin based on the file record id, or undefined if the url couldn't be retrieved.
4
+ * Uses haystack-nclient to retrieve the projectName from context.
5
+ */
6
+ export declare const useFin5BinUrl: (fileId?: HRef) => string | undefined;
@@ -1,16 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useFin5BinUrl = void 0;
4
- const haystack_react_1 = require("haystack-react");
5
- const react_1 = require("react");
6
- const getFin5BinUrl_1 = require("../../fin5Top/getFin5BinUrl");
7
- /**
8
- * Retrieves the url of a Fin 5 bin based on the file record id, or undefined if the url couldn't be retrieved.
9
- * Uses haystack-nclient to retrieve the projectName from context.
10
- */
11
- const useFin5BinUrl = (fileId) => {
12
- const projectName = (0, haystack_react_1.useClient)().project;
13
- return (0, react_1.useMemo)(() => (fileId ? (0, getFin5BinUrl_1.getFin5BinUrl)(fileId, projectName) : undefined), [fileId, projectName]);
14
- };
15
- exports.useFin5BinUrl = useFin5BinUrl;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useFin5BinUrl = void 0;
4
+ const haystack_react_1 = require("haystack-react");
5
+ const react_1 = require("react");
6
+ const getFin5BinUrl_1 = require("../../fin5Top/getFin5BinUrl");
7
+ /**
8
+ * Retrieves the url of a Fin 5 bin based on the file record id, or undefined if the url couldn't be retrieved.
9
+ * Uses haystack-nclient to retrieve the projectName from context.
10
+ */
11
+ const useFin5BinUrl = (fileId) => {
12
+ const projectName = (0, haystack_react_1.useClient)().project;
13
+ return (0, react_1.useMemo)(() => (fileId ? (0, getFin5BinUrl_1.getFin5BinUrl)(fileId, projectName) : undefined), [fileId, projectName]);
14
+ };
15
+ exports.useFin5BinUrl = useFin5BinUrl;
16
16
  //# sourceMappingURL=useFin5BinUrl.js.map
@@ -1,2 +1,2 @@
1
- import { ThemeDef } from '@j2inn/ui';
2
- export declare function useFin5ColorScheme(): ThemeDef;
1
+ import { ThemeDef } from '@j2inn/ui';
2
+ export declare function useFin5ColorScheme(): ThemeDef;
@@ -1,57 +1,56 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2025, J2 Innovations. All Rights Reserved
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useFin5ColorScheme = void 0;
7
- const ui_1 = require("@j2inn/ui");
8
- const react_jss_1 = require("react-jss");
9
- const fin5Top_1 = require("../../fin5Top/fin5Top");
10
- const react_1 = require("react");
11
- function useFin5ColorScheme() {
12
- const theme = (0, react_jss_1.useTheme)();
13
- const fin5 = (0, fin5Top_1.getFin5top)();
14
- const colorScheme = fin5?.app.GetColorScheme?.();
15
- const currentTheme = fin5?.app.get('currentTheme');
16
- const isDarkMode = currentTheme === 'dark';
17
- const brandedTheme = (0, react_1.useMemo)(() => {
18
- if (!colorScheme) {
19
- return undefined;
20
- }
21
- return (0, ui_1.GenerateTheme)({
22
- light: {
23
- ...ui_1.DEFAULT_THEME.light,
24
- bodyBg: colorScheme.bodyBackground,
25
- bgColor: (0, ui_1.lighten)(colorScheme.bodyBackground, 5),
26
- },
27
- dark: {
28
- ...ui_1.DEFAULT_THEME.dark,
29
- textColor: (0, ui_1.tint)(colorScheme.bodyBackground, 100),
30
- popupBgColor: colorScheme.bodyBackground,
31
- bodyBg: colorScheme.bodyBackground,
32
- bgColor: (0, ui_1.lighten)(colorScheme.bodyBackground, 5),
33
- },
34
- palette: {
35
- ...ui_1.DEFAULT_THEME.palette,
36
- primary: colorScheme.primary,
37
- secondary: (0, ui_1.tint)(colorScheme.primary, 20),
38
- accent: (0, ui_1.shade)(colorScheme.primary, 20),
39
- },
40
- });
41
- }, [
42
- colorScheme?.primary,
43
- colorScheme?.bodyBackground,
44
- colorScheme?.sidebarBackground,
45
- ]);
46
- if (!brandedTheme) {
47
- return theme;
48
- }
49
- if (isDarkMode) {
50
- return brandedTheme.dark;
51
- }
52
- else {
53
- return brandedTheme.light;
54
- }
55
- }
56
- exports.useFin5ColorScheme = useFin5ColorScheme;
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2025, J2 Innovations. All Rights Reserved
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useFin5ColorScheme = useFin5ColorScheme;
7
+ const ui_1 = require("@j2inn/ui");
8
+ const react_jss_1 = require("react-jss");
9
+ const fin5Top_1 = require("../../fin5Top/fin5Top");
10
+ const react_1 = require("react");
11
+ function useFin5ColorScheme() {
12
+ const theme = (0, react_jss_1.useTheme)();
13
+ const fin5 = (0, fin5Top_1.getFin5top)();
14
+ const colorScheme = fin5?.app.GetColorScheme?.();
15
+ const currentTheme = fin5?.app.get('currentTheme');
16
+ const isDarkMode = currentTheme === 'dark';
17
+ const brandedTheme = (0, react_1.useMemo)(() => {
18
+ if (!colorScheme) {
19
+ return undefined;
20
+ }
21
+ return (0, ui_1.GenerateTheme)({
22
+ light: {
23
+ ...ui_1.DEFAULT_THEME.light,
24
+ bodyBg: colorScheme.bodyBackground,
25
+ bgColor: (0, ui_1.lighten)(colorScheme.bodyBackground, 5),
26
+ },
27
+ dark: {
28
+ ...ui_1.DEFAULT_THEME.dark,
29
+ textColor: (0, ui_1.tint)(colorScheme.bodyBackground, 100),
30
+ popupBgColor: colorScheme.bodyBackground,
31
+ bodyBg: colorScheme.bodyBackground,
32
+ bgColor: (0, ui_1.lighten)(colorScheme.bodyBackground, 5),
33
+ },
34
+ palette: {
35
+ ...ui_1.DEFAULT_THEME.palette,
36
+ primary: colorScheme.primary,
37
+ secondary: (0, ui_1.tint)(colorScheme.primary, 20),
38
+ accent: (0, ui_1.shade)(colorScheme.primary, 20),
39
+ },
40
+ });
41
+ }, [
42
+ colorScheme?.primary,
43
+ colorScheme?.bodyBackground,
44
+ colorScheme?.sidebarBackground,
45
+ ]);
46
+ if (!brandedTheme) {
47
+ return theme;
48
+ }
49
+ if (isDarkMode) {
50
+ return brandedTheme.dark;
51
+ }
52
+ else {
53
+ return brandedTheme.light;
54
+ }
55
+ }
57
56
  //# sourceMappingURL=useFin5ColorScheme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFin5ColorScheme.js","sourceRoot":"","sources":["../../../src/react/hooks/useFin5ColorScheme.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kCAOkB;AAClB,yCAAoC;AACpC,mDAAkD;AAClD,iCAA+B;AAE/B,SAAgB,kBAAkB;IACjC,MAAM,KAAK,GAAG,IAAA,oBAAQ,GAAY,CAAA;IAClC,MAAM,IAAI,GAAG,IAAA,oBAAU,GAAE,CAAA;IACzB,MAAM,WAAW,GAAG,IAAI,EAAE,GAAG,CAAC,cAAc,EAAE,EAAE,CAAA;IAChD,MAAM,YAAY,GAAG,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,cAAc,CAAsB,CAAA;IACvE,MAAM,UAAU,GAAG,YAAY,KAAK,MAAM,CAAA;IAE1C,MAAM,YAAY,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QACjC,IAAI,CAAC,WAAW,EAAE;YACjB,OAAO,SAAS,CAAA;SAChB;QAED,OAAO,IAAA,kBAAa,EAAC;YACpB,KAAK,EAAE;gBACN,GAAG,kBAAa,CAAC,KAAK;gBACtB,MAAM,EAAE,WAAW,CAAC,cAAc;gBAClC,OAAO,EAAE,IAAA,YAAO,EAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC;aAC/C;YACD,IAAI,EAAE;gBACL,GAAG,kBAAa,CAAC,IAAI;gBACrB,SAAS,EAAE,IAAA,SAAI,EAAC,WAAW,CAAC,cAAc,EAAE,GAA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3
- */
4
- export declare const useScreenSize: () => {
5
- width: number;
6
- height: number;
7
- };
1
+ /**
2
+ * Observe screen size.
3
+ */
4
+ export declare const useScreenSize: () => {
5
+ width: number;
6
+ height: number;
7
+ };
@@ -1,32 +1,32 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2025, J2 Innovations. All Rights Reserved
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useScreenSize = void 0;
7
- const react_1 = require("react");
8
- /**
9
- * Observe screen size.
10
- */
11
- const useScreenSize = () => {
12
- const [screenSize, setScreenSize] = (0, react_1.useState)({
13
- width: window.innerWidth,
14
- height: window.innerHeight,
15
- });
16
- (0, react_1.useEffect)(() => {
17
- const handleResize = () => {
18
- setScreenSize({
19
- width: window.innerWidth,
20
- height: window.innerHeight,
21
- });
22
- };
23
- window.addEventListener('resize', handleResize);
24
- // Clean up the event listener when the component unmounts
25
- return () => {
26
- window.removeEventListener('resize', handleResize);
27
- };
28
- }, []);
29
- return screenSize;
30
- };
31
- exports.useScreenSize = useScreenSize;
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2025, J2 Innovations. All Rights Reserved
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useScreenSize = void 0;
7
+ const react_1 = require("react");
8
+ /**
9
+ * Observe screen size.
10
+ */
11
+ const useScreenSize = () => {
12
+ const [screenSize, setScreenSize] = (0, react_1.useState)({
13
+ width: window.innerWidth,
14
+ height: window.innerHeight,
15
+ });
16
+ (0, react_1.useEffect)(() => {
17
+ const handleResize = () => {
18
+ setScreenSize({
19
+ width: window.innerWidth,
20
+ height: window.innerHeight,
21
+ });
22
+ };
23
+ window.addEventListener('resize', handleResize);
24
+ // Clean up the event listener when the component unmounts
25
+ return () => {
26
+ window.removeEventListener('resize', handleResize);
27
+ };
28
+ }, []);
29
+ return screenSize;
30
+ };
31
+ exports.useScreenSize = useScreenSize;
32
32
  //# sourceMappingURL=useScreenSize.js.map
@@ -1,12 +1,12 @@
1
- /**
2
- * Create the FIN5 language prop files from the locale JSON files.
3
- *
4
- * This function assumes the app directory has a sub-directory named `locale` that contains
5
- * the language files in a JSON format (i.e. `en.json`). It also assumes there's a `lib` directory
6
- * containing the defs for the app. This is used to look up the app name that's used to prefix the
7
- * entries in the properties file.
8
- *
9
- * @param appDir The directory that contains the application.
10
- * @param propsDir The directory the properties file will output too.
11
- */
12
- export default function createFin5Props(appDir: string, propsDir: string): Promise<void>;
1
+ /**
2
+ * Create the FIN5 language prop files from the locale JSON files.
3
+ *
4
+ * This function assumes the app directory has a sub-directory named `locale` that contains
5
+ * the language files in a JSON format (i.e. `en.json`). It also assumes there's a `lib` directory
6
+ * containing the defs for the app. This is used to look up the app name that's used to prefix the
7
+ * entries in the properties file.
8
+ *
9
+ * @param appDir The directory that contains the application.
10
+ * @param propsDir The directory the properties file will output too.
11
+ */
12
+ export default function createFin5Props(appDir: string, propsDir: string): Promise<void>;