jsgui3-server 0.0.121 → 0.0.123

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 (282) hide show
  1. package/.vscode/settings.json +6 -0
  2. package/README.md +10 -10
  3. package/controls/Active_HTML_Document.js +116 -116
  4. package/controls/README.md +7 -7
  5. package/controls/page/admin.js +74 -74
  6. package/controls/panel/admin.js +11 -11
  7. package/examples/_css/basic.css +913 -913
  8. package/examples/_css/database-control.css +51 -51
  9. package/examples/_css/jsgui.css +66 -66
  10. package/examples/_css/multi-layout.css +23 -23
  11. package/examples/_css/style.css +1669 -1669
  12. package/examples/_css/top-and-bottom-bars.css +54 -54
  13. package/examples/box/1) square box/client.js +188 -188
  14. package/examples/box/1) square box/server.js +112 -112
  15. package/examples/box/2) twenty square boxes/css flex wrap/client.js +112 -248
  16. package/examples/box/2) twenty square boxes/css flex wrap/server.js +39 -112
  17. package/examples/box/3) twenty selectable square boxes/css flex wrap/client.js +129 -0
  18. package/examples/{controls/15) window, text field → box/3) twenty selectable square boxes/css flex wrap}/server.js +38 -38
  19. package/examples/boxes/square_boxes.js +45 -48
  20. package/examples/boxes/square_boxes_client.js +132 -136
  21. package/examples/client-side-popup-menu-button.html +93 -93
  22. package/examples/color_palette.js +51 -51
  23. package/examples/color_palette_client.js +95 -95
  24. package/examples/controls/1) window/client.js +186 -186
  25. package/examples/controls/1) window/server.js +117 -117
  26. package/examples/controls/10) window, mirrored text inputs/client.js +118 -320
  27. package/examples/controls/10) window, mirrored text inputs/server.js +37 -117
  28. package/examples/controls/11) window, mirrored text fields/client.js +493 -251
  29. package/examples/controls/11) window, mirrored text fields/server.js +117 -117
  30. package/examples/controls/11b) window, shared Data_Object model mirrored text fields/client.js +613 -331
  31. package/examples/controls/11b) window, shared Data_Object model mirrored text fields/server.js +117 -117
  32. package/examples/controls/11c) window, shared Data_Value model mirrored text fields/client.js +617 -617
  33. package/examples/controls/11c) window, shared Data_Value model mirrored text fields/server.js +117 -117
  34. package/examples/controls/11d) window, shared model mirrored integer text fields/client.js +611 -280
  35. package/examples/controls/11d) window, shared model mirrored integer text fields/server.js +134 -22
  36. package/examples/controls/12) window, Select_Options control/client.js +66 -452
  37. package/examples/controls/12) window, Select_Options control/server.js +19 -117
  38. package/examples/controls/13) window, Dropdown_Menu control/client.js +66 -0
  39. package/examples/controls/13) window, Dropdown_Menu control/server.js +20 -0
  40. package/examples/controls/2) two windows/client.js +193 -193
  41. package/examples/controls/2) two windows/server.js +113 -113
  42. package/examples/controls/3) five windows/client.js +217 -217
  43. package/examples/controls/3) five windows/server.js +116 -115
  44. package/examples/controls/4) window, tabbed panel/client.js +54 -225
  45. package/examples/controls/4) window, tabbed panel/server.js +17 -117
  46. package/examples/controls/5) window, grid/client.js +204 -484
  47. package/examples/controls/5) window, grid/server.js +117 -119
  48. package/examples/controls/6) window, color_palette/client.js +68 -204
  49. package/examples/controls/6) window, color_palette/server.js +117 -117
  50. package/examples/controls/7) window, month_view/client.js +40 -231
  51. package/examples/controls/7) window, month_view/server.js +117 -117
  52. package/examples/controls/8) window, checkbox/client.js +33 -209
  53. package/examples/controls/8) window, checkbox/server.js +117 -117
  54. package/examples/controls/9) window, date picker/client.js +76 -303
  55. package/examples/controls/9) window, date picker/server.js +117 -117
  56. package/examples/controls/9b) window, shared data.model mirrored date pickers/README.md +51 -0
  57. package/examples/controls/9b) window, shared data.model mirrored date pickers/client.js +83 -398
  58. package/examples/controls/9b) window, shared data.model mirrored date pickers/server.js +117 -117
  59. package/examples/controls/__old/_html-server-color-palette.js +114 -114
  60. package/examples/controls/__old/html-server-combo-box.js +104 -104
  61. package/examples/controls/__old/html-server-list.js +98 -98
  62. package/examples/controls/__old/html-server-popup-menu-button.js +114 -114
  63. package/examples/controls/__old/html-server-start-stop-toggle-button.js +146 -146
  64. package/examples/controls/__old/scs-arrow-button.js +36 -36
  65. package/examples/controls/__old/scs-date-picker.js +157 -157
  66. package/examples/controls/__old/scs-file-browser.js +82 -82
  67. package/examples/controls/__old/scs-item.js +159 -159
  68. package/examples/controls/__old/scs-month-arrow-selector.js +126 -126
  69. package/examples/controls/__old/scs-month-view.js +94 -94
  70. package/examples/controls/__old/scs-start-stop-toggle-button.js +40 -40
  71. package/examples/controls/__old/scs-tree.js +49 -49
  72. package/examples/controls/__old/scs-year-arrow-selector.js +127 -127
  73. package/examples/demos/date-picker.js +119 -119
  74. package/examples/demos/explain-encapsulation.js +9 -9
  75. package/examples/demos/resizing.js +35 -35
  76. package/examples/demos/server_time.js +6 -6
  77. package/examples/grids/grid_1.js +45 -45
  78. package/examples/grids/grid_1_client.js +329 -329
  79. package/examples/html-rendering.js +20 -20
  80. package/examples/html-server.js +105 -105
  81. package/examples/introducing jsgui3/server.js +110 -110
  82. package/examples/mx_display/mx_display_1.js +45 -45
  83. package/examples/mx_display/mx_display_1_client.js +444 -444
  84. package/fs2.js +1836 -1836
  85. package/http/responders/HTTP_Responder.js +15 -15
  86. package/http/responders/static/Static_Route_HTTP_Responder.js +105 -105
  87. package/module.js +34 -34
  88. package/old/_single-control-server.js +418 -418
  89. package/old/single-control-server.js +368 -368
  90. package/old/single-page-app.js +131 -131
  91. package/package.json +42 -42
  92. package/page-context.js +92 -92
  93. package/publishers/helpers/assigners/Assigner.js +10 -10
  94. package/publishers/helpers/assigners/static-compressed-response-buffers/Single_Control_Webpage_Server_Static_Compressed_Response_Buffers_Assigner.js +150 -150
  95. package/publishers/helpers/assigners/static-headers/Single_Control_Webpage_Server_Static_Headers_Assigner.js +109 -109
  96. package/publishers/helpers/assigners/static-routes/Single_Control_Webpage_Server_Static_Routes_Assigner.js +91 -91
  97. package/publishers/helpers/assigners/static-uncompressed-response-buffers/Single_Control_Webpage_Server_Static_Uncompressed_Response_Buffers_Assigner.js +104 -104
  98. package/publishers/helpers/preparers/static/bundle/Ready_To_Serve_Preparer.js +18 -18
  99. package/publishers/helpers/preparers/static/bundle/Static_Routes_Responses_Webpage_Bundle_Preparer.js +44 -44
  100. package/publishers/http-function-publisher.js +212 -212
  101. package/publishers/http-html-page-publisher.js +5 -5
  102. package/publishers/http-html-publisher.js +24 -24
  103. package/publishers/http-js-publisher.js +135 -135
  104. package/publishers/http-observable-publisher.js +124 -124
  105. package/publishers/http-publisher.js +53 -53
  106. package/publishers/http-resource-publisher.js +325 -325
  107. package/publishers/http-webpage-publisher.js +659 -658
  108. package/publishers/http-webpageorsite-publisher.js +343 -343
  109. package/publishers/http-website-publisher.js +640 -640
  110. package/publishers/notes.md +9 -9
  111. package/resources/README.md +16 -16
  112. package/resources/_old_website-javascript-resource.js +994 -994
  113. package/resources/_old_website-resource.js +507 -507
  114. package/resources/compile/server-resource-compilation.js +43 -43
  115. package/resources/data-resource.js +118 -118
  116. package/resources/fs-resource.js +146 -146
  117. package/resources/jsbuilder/Abstract_Single_Declaration.js +105 -105
  118. package/resources/jsbuilder/Abstract_Single_Declaration_Sequence.js +42 -42
  119. package/resources/jsbuilder/JS_AST/JS_AST_Abstract_Node.js +61 -61
  120. package/resources/jsbuilder/JS_AST/JS_AST_Abstract_Node_Group.js +41 -41
  121. package/resources/jsbuilder/JS_AST/JS_AST_Group_Shared.js +61 -61
  122. package/resources/jsbuilder/JS_AST/JS_AST_Node.js +93 -93
  123. package/resources/jsbuilder/JS_AST/JS_AST_Node_0-Core.js +253 -253
  124. package/resources/jsbuilder/JS_AST/JS_AST_Node_1-Babel.js +337 -337
  125. package/resources/jsbuilder/JS_AST/JS_AST_Node_10-Changing.js +39 -39
  126. package/resources/jsbuilder/JS_AST/JS_AST_Node_2.1.1-Child.js +96 -96
  127. package/resources/jsbuilder/JS_AST/JS_AST_Node_2.1.2-Parent.js +37 -37
  128. package/resources/jsbuilder/JS_AST/JS_AST_Node_2.1.3-Ancestor.js +61 -61
  129. package/resources/jsbuilder/JS_AST/JS_AST_Node_2.2-Inner.js +43 -43
  130. package/resources/jsbuilder/JS_AST/JS_AST_Node_2.3-All.js +72 -72
  131. package/resources/jsbuilder/JS_AST/JS_AST_Node_2.4-Sibling.js +92 -92
  132. package/resources/jsbuilder/JS_AST/JS_AST_Node_2.5-Available_In_Scope.js +29 -29
  133. package/resources/jsbuilder/JS_AST/JS_AST_Node_2.9-Signature.js +116 -116
  134. package/resources/jsbuilder/JS_AST/JS_AST_Node_3-Basics.js +159 -159
  135. package/resources/jsbuilder/JS_AST/JS_AST_Node_3.0.0-Basics_First.js +178 -178
  136. package/resources/jsbuilder/JS_AST/JS_AST_Node_3.0.1-Basics_Second.js +87 -87
  137. package/resources/jsbuilder/JS_AST/JS_AST_Node_3.0.99-Basics_Last.js +91 -91
  138. package/resources/jsbuilder/JS_AST/JS_AST_Node_3.1-Basics_Each.js +136 -136
  139. package/resources/jsbuilder/JS_AST/JS_AST_Node_3.1.5-Basics_Count.js +73 -73
  140. package/resources/jsbuilder/JS_AST/JS_AST_Node_3.2-Basics_Filter.js +39 -39
  141. package/resources/jsbuilder/JS_AST/JS_AST_Node_3.3-Basics_Collect.js +85 -85
  142. package/resources/jsbuilder/JS_AST/JS_AST_Node_3.4-Basics_Select.js +42 -42
  143. package/resources/jsbuilder/JS_AST/JS_AST_Node_3.5-Basics_Find.js +40 -40
  144. package/resources/jsbuilder/JS_AST/JS_AST_Node_3.6-Basics_Callmap.js +54 -54
  145. package/resources/jsbuilder/JS_AST/JS_AST_Node_4.0-Index_Indexes.js +45 -45
  146. package/resources/jsbuilder/JS_AST/JS_AST_Node_4.1-Index.js +343 -343
  147. package/resources/jsbuilder/JS_AST/JS_AST_Node_5.0-Category.js +38 -38
  148. package/resources/jsbuilder/JS_AST/JS_AST_Node_5.1-Category_Identifier.js +30 -30
  149. package/resources/jsbuilder/JS_AST/JS_AST_Node_5.2-Category_Literal.js +28 -28
  150. package/resources/jsbuilder/JS_AST/JS_AST_Node_5.3-Category_Expression.js +26 -26
  151. package/resources/jsbuilder/JS_AST/JS_AST_Node_5.4-Category_Pattern.js +8 -8
  152. package/resources/jsbuilder/JS_AST/JS_AST_Node_5.5-Category_Declaration.js +43 -43
  153. package/resources/jsbuilder/JS_AST/JS_AST_Node_5.6-Category_Statement.js +21 -21
  154. package/resources/jsbuilder/JS_AST/JS_AST_Node_6.0-Type.js +89 -89
  155. package/resources/jsbuilder/JS_AST/JS_AST_Node_6.1-Type_Class_Declaration.js +8 -8
  156. package/resources/jsbuilder/JS_AST/JS_AST_Node_6.2-Type_Variable_Declaration.js +27 -27
  157. package/resources/jsbuilder/JS_AST/JS_AST_Node_6.3-Type_Variable_Declarator.js +28 -28
  158. package/resources/jsbuilder/JS_AST/JS_AST_Node_7-Query.js +736 -736
  159. package/resources/jsbuilder/JS_AST/JS_AST_Node_8-Features.js +64 -64
  160. package/resources/jsbuilder/JS_AST/JS_AST_Node_9-Planning.js +31 -31
  161. package/resources/jsbuilder/JS_AST/JS_AST_Node_Arrangement.js +15 -15
  162. package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Node_Declared_Object.js +305 -305
  163. package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Node_Feature.js +77 -77
  164. package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Node_Feature_Declaration.js +248 -248
  165. package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Node_Feature_Declarator.js +138 -138
  166. package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Root_Node_Feature/JS_AST_Root_Node_Feature.js +10 -10
  167. package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Root_Node_Feature/JS_AST_Root_Node_Feature_Exported.js +100 -100
  168. package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Root_Node_Feature/JS_AST_Root_Node_Feature_Exports.js +60 -60
  169. package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Root_Node_Feature/JS_AST_Root_Node_Interpreted.js +179 -179
  170. package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Root_Node_Feature/_JSGUI_Root_Node_Interpreted.js +43 -43
  171. package/resources/jsbuilder/JS_AST/JS_AST_Node_Feature/JS_AST_Root_Node_Feature/special_case_objectassign_to_object.js +12 -12
  172. package/resources/jsbuilder/JS_AST/JS_AST_Node_Group.js +35 -35
  173. package/resources/jsbuilder/JS_AST/JS_AST_Operation.js +11 -11
  174. package/resources/jsbuilder/JS_AST/JS_AST_Operation_On_Relationship.js +31 -31
  175. package/resources/jsbuilder/JS_AST/JS_AST_Ordered_Relationship_Node_To_Group.js +37 -37
  176. package/resources/jsbuilder/JS_AST/JS_AST_Ordinal.js +39 -39
  177. package/resources/jsbuilder/JS_AST/JS_AST_Ordinal_Relationship.js +25 -25
  178. package/resources/jsbuilder/JS_AST/JS_AST_Relationship_Node_To_Group.js +200 -200
  179. package/resources/jsbuilder/JS_AST/JS_AST_Relationship_Node_Within_Group_To_Node.js +43 -43
  180. package/resources/jsbuilder/JS_AST/_JS_AST_Node_3.8-Query_Features.js +76 -76
  181. package/resources/jsbuilder/JS_AST/query/enable_array_as_queryable.js +227 -227
  182. package/resources/jsbuilder/JS_AST/query/find_object_keys.js +404 -404
  183. package/resources/jsbuilder/JS_AST/query/node_queries.js +8 -8
  184. package/resources/jsbuilder/JS_AST/query/root_query_identidy.js +11 -11
  185. package/resources/jsbuilder/JS_AST_Node_Extended/JSGUI_Singular_Declaration.js +85 -85
  186. package/resources/jsbuilder/JS_AST_Node_Extended/JS_AST_Node_Declaration.js +123 -123
  187. package/resources/jsbuilder/JS_AST_Node_Extended/JS_AST_Node_Extended.js +87 -87
  188. package/resources/jsbuilder/JS_AST_Node_Extended/JS_AST_Node_Extended_0-Core.js +10 -10
  189. package/resources/jsbuilder/JS_Builder.js +10 -10
  190. package/resources/jsbuilder/JS_File/Feature/JS_File_Declared_Object.js +31 -31
  191. package/resources/jsbuilder/JS_File/Feature/JS_File_Exported_Object_Info.js +25 -25
  192. package/resources/jsbuilder/JS_File/Feature/JS_File_Exports.js +78 -78
  193. package/resources/jsbuilder/JS_File/Feature/JS_File_Feature.js +17 -17
  194. package/resources/jsbuilder/JS_File/Feature/JS_File_Imported_Object_Info.js +25 -25
  195. package/resources/jsbuilder/JS_File/Feature/JS_File_Imports.js +8 -8
  196. package/resources/jsbuilder/JS_File/JS_File.js +12 -12
  197. package/resources/jsbuilder/JS_File/JS_File_0-Core.js +202 -202
  198. package/resources/jsbuilder/JS_File/JS_File_1-Early_Parse.js +175 -175
  199. package/resources/jsbuilder/JS_File/JS_File_2-Babel.js +81 -81
  200. package/resources/jsbuilder/JS_File/JS_File_3-JS_AST_Node.js +86 -86
  201. package/resources/jsbuilder/JS_File/JS_File_4-Query.js +413 -413
  202. package/resources/jsbuilder/JS_File/JS_File_4.1-Query_Features.js +414 -414
  203. package/resources/jsbuilder/JS_File/JS_File_5-Planning.js +59 -59
  204. package/resources/jsbuilder/JS_File/JS_File_6-Changing.js +24 -24
  205. package/resources/jsbuilder/JS_File/JS_File_Export_Reference.js +12 -12
  206. package/resources/jsbuilder/JS_File/JS_File_Import_Reference.js +23 -23
  207. package/resources/jsbuilder/JS_File/JS_File_Import_References.js +31 -31
  208. package/resources/jsbuilder/JS_File/JS_File_Processor.js +16 -16
  209. package/resources/jsbuilder/JS_File/JS_Files.js +15 -15
  210. package/resources/jsbuilder/Module.js +14 -14
  211. package/resources/jsbuilder/Platform.js +13 -13
  212. package/resources/jsbuilder/Platforms.js +69 -69
  213. package/resources/jsbuilder/Project.js +109 -109
  214. package/resources/jsbuilder/Reference.js +1 -1
  215. package/resources/jsbuilder/Reference_Sequence.js +16 -16
  216. package/resources/jsbuilder/Scope.js +29 -29
  217. package/resources/jsbuilder/Variable_Name_Provider.js +42 -42
  218. package/resources/jsbuilder/_JS_File.js +225 -225
  219. package/resources/jsbuilder/ast_query.js +20 -20
  220. package/resources/jsbuilder/babel/babel_consts.js +162 -162
  221. package/resources/jsbuilder/babel/babel_node_tools.js +541 -541
  222. package/resources/jsbuilder/babel/deep_iterate/deep_iterate_babel.js +923 -904
  223. package/resources/jsbuilder/build.js +16 -16
  224. package/resources/jsbuilder/platform_notes.md +66 -66
  225. package/resources/jsbuilder/test/test_ast_node.js +381 -381
  226. package/resources/jsbuilder/test/test_js_file.js +303 -303
  227. package/resources/jsbuilder/test/test_project.js +157 -157
  228. package/resources/local-server-info-resource.js +96 -96
  229. package/resources/notes.txt +10 -10
  230. package/resources/old/website-image-resource.js +1185 -1185
  231. package/resources/process-js.js +498 -498
  232. package/resources/processors/bundlers/bundle.js +29 -29
  233. package/resources/processors/bundlers/bundler.js +23 -23
  234. package/resources/processors/bundlers/css-bundler.js +234 -234
  235. package/resources/processors/bundlers/js/JS_Bundler.js +51 -51
  236. package/resources/processors/bundlers/js/esbuild/Advanced_JS_Bundler_Using_ESBuild.js +388 -391
  237. package/resources/processors/bundlers/js/esbuild/Bundler_Using_ESBuild.js +8 -8
  238. package/resources/processors/bundlers/js/esbuild/Core_JS_Non_Minifying_Bundler_Using_ESBuild.js +188 -188
  239. package/resources/processors/bundlers/js/esbuild/Core_JS_Single_File_Minifying_Bundler_Using_ESBuild.js +191 -192
  240. package/resources/processors/bundlers/js/esbuild/_Old_CSS_Extractor.js +239 -239
  241. package/resources/processors/bundlers/js-bundler.js +263 -263
  242. package/resources/processors/bundlers/test_ast.js +73 -73
  243. package/resources/processors/bundlers/webpage-bundler.js +404 -404
  244. package/resources/processors/bundlers/website-bundler.js +22 -22
  245. package/resources/processors/extractors/Extractor.js +9 -11
  246. package/resources/processors/extractors/js/css_and_js/AST_Node/CSS_And_JS_From_JS_String_Using_AST_Node_Extractor.js +239 -254
  247. package/resources/processors/extractors/js/css_and_js/CSS_And_JS_From_JS_String_Extractor.js +3 -3
  248. package/resources/processors/extractors/string/Pos_Span_String_Extractor.js +93 -93
  249. package/resources/server-installed-tools.js +28 -28
  250. package/resources/server-resource-pool.js +41 -41
  251. package/resources/website-audio-resource.js +735 -735
  252. package/resources/website-css-resource.js +411 -411
  253. package/resources/website-image-resource.js +412 -412
  254. package/resources/website-javascript-resource-processor.js +908 -908
  255. package/resources/website-javascript-resource.js +874 -874
  256. package/resources/website-resource-processor.js +10 -10
  257. package/resources/website-resource.js +164 -164
  258. package/resources/website-static-html-resource.js +199 -199
  259. package/resources/website-template-html-resource.js +231 -231
  260. package/roadmap.md +75 -75
  261. package/server.js +609 -573
  262. package/static-page-context.js +13 -13
  263. package/website/webpage.js +81 -81
  264. package/website/website-group.js +15 -15
  265. package/website/website.js +260 -260
  266. package/examples/controls/11d) window, shared model mirrored integer text fields/both.js +0 -17
  267. package/examples/controls/13) window, shared model mirrored lat_long/client.js +0 -933
  268. package/examples/controls/13) window, shared model mirrored lat_long/server.js +0 -50
  269. package/examples/controls/14) window, control compositional model/client.js +0 -328
  270. package/examples/controls/14) window, control compositional model/server.js +0 -118
  271. package/examples/controls/14a) window, control spec has compositional model/client.js +0 -440
  272. package/examples/controls/14a) window, control spec has compositional model/server.js +0 -118
  273. package/examples/controls/15) window, text field/client.js +0 -256
  274. package/examples/controls/16) Window([Text_Input])/client.js +0 -266
  275. package/examples/controls/16) Window([Text_Input])/server.js +0 -109
  276. package/examples/controls/16a) Window([Text_Input]) Integer data.model.data_type/client.js +0 -494
  277. package/examples/controls/16a) Window([Text_Input]) Integer data.model.data_type/isomorphic.js +0 -24
  278. package/examples/controls/16a) Window([Text_Input]) Integer data.model.data_type/server.js +0 -73
  279. package/examples/controls/2b) two window, context menus/client.js +0 -193
  280. package/examples/controls/2b) two window, context menus/server.js +0 -114
  281. package/examples/controls/4a) window, tabbed panel with various controls inside/client.js +0 -233
  282. package/examples/controls/4a) window, tabbed panel with various controls inside/server.js +0 -118
@@ -1,933 +0,0 @@
1
- const jsgui = require('jsgui3-client');
2
- const {equals, controls, Control, mixins, Data_Object, Data_Value, Functional_Data_Type, field, Control_Data, Control_View} = jsgui;
3
-
4
-
5
-
6
- const {Checkbox, Date_Picker, Text_Input, Text_Field} = controls;
7
-
8
- const Active_HTML_Document = require('../../../controls/Active_HTML_Document');
9
-
10
- // To get this working, looks like it's worth making more examples.
11
- // Possibly showing validation status as well.
12
-
13
- // Data_Model and Data_Value ease of use on both the client and the server.
14
-
15
-
16
-
17
- // Would be nice to make other things like this that are more advanced.
18
- // Could handle parsing text to multiple values in an array, eg [lat, long]
19
-
20
-
21
- // Want to support convenient high and mid level code, where the format of data gets described concisely.
22
-
23
- // Functional_Data_Type lat_long perhaps???
24
- // it could be an array internally even.
25
-
26
- // Or make classes that can handle this stuff too...?
27
- // Standardise a simple API for data types / allow multiple APIs / ways of expressing them.
28
-
29
- // Also other validation functions and properties.
30
- // eg string between 4 and 32 characters long.
31
- // failing validation with a reason as well.
32
- // Maybe programatically expressed and then can render messages to different languages in an extendable way.
33
-
34
- // Working on making the lower level supports for data types could be very useful.
35
- // Controls could use a lower level API to better interact with (shared) data.
36
-
37
- // Controls, such as Text_Field, should have a Validation_Status_Display or similar.
38
- // Role assignment of controls?
39
- // So some kind of icon / message display control could be given the role of validation status display / view.
40
- // Or it's data.model could be the validation status.
41
-
42
- // Does seem like it would make for (very) good linking without having to write the wiring / plumbing code on the highest level.
43
-
44
-
45
- // Will make Date_Picker use progressive enhancement.
46
- // On activation would create a new element? Create a new sibling?
47
- // May want code that checks for .el being changed.
48
-
49
-
50
-
51
- // Want the data sharing to be really simple and intuitive to set up.
52
- // But not so simple the comlexities of data flow can't be expressed when needed.
53
-
54
-
55
- // Make it so sharing a data model is very easy.
56
- // Sharing a single value, or referring to different values within it.
57
-
58
- // Be able to handle errors when the view model can't update the data_model for some reason(s).
59
-
60
-
61
-
62
- // Want to see about latitude and longitude UI components, and linking the components with a data model.
63
- // Have the view data model and the data model working together properly.
64
-
65
- // control.view.data.model and control.data.model together seem very effective.
66
- // May be worth integrating on a lower level.
67
-
68
- // Also want to get the color palette data model working properly.
69
- // Could be a bit more complex. Array of colors. Colors defined in some detail, or dealt with in a functional way for the moment.
70
-
71
-
72
-
73
- // Want to see about rendering controls that are automatically composed according to their data.model
74
- // or view.data.model
75
-
76
-
77
- // Want some kind of flexible property or data editor?
78
- // Maybe later, but let's make it easy to build and use specific controls to edit specific data.
79
-
80
- // Could have mirrored lat_long_coords control.
81
-
82
-
83
- // Need the Lat_Long control here.
84
-
85
- // Would contain two text fields.
86
- // Then could make lower / mid level abstraction(s) that automatically create it from the Data_Type or Data_Type_Definition
87
- // perhaps.
88
-
89
- // Definitional_Data_Type possibly.
90
- // Definitional_And_Functional_Data_Type ????
91
-
92
- // Presentational_Data_Type possibly???
93
-
94
- // Data_Type_Presentation???
95
- // Data_Type_Representation ???
96
- // And that gets closer to the control.ui.data.model
97
- // ctrl.presentation.data.model ???
98
-
99
- // .ui will make sense when that time comes.
100
-
101
-
102
- // This codebase here should have a bit more than the essentials to get it to work.
103
- // Want to work on some lower level things to get it to work more effectively.
104
-
105
- // A Properties_Editor type of Control could be a very effective one for the moment, to get everything working nicely
106
- // and because it would be a useful control in itself.
107
- // Could easily be within jsgui3-html, as one of the more advanced / standard / non-core controls.
108
- // Though make it simple and idiomatic, it could be in the core more easily.
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
- const fdt_latitude = new Functional_Data_Type({
117
- name: 'latitude',
118
- value_js_type: Number,
119
- validate: x => {
120
- const tx = tof(x);
121
- //console.log('latitude tx', tx);
122
- // or get the sig.
123
- const sig_x = get_item_sig(x);
124
- //console.log('latitude sig_x', sig_x);
125
- if (sig_x === 'n') {
126
- // then are the within the right ranges...?
127
- // Latitude is specified in degrees within the range [-90, 90]. Longitude is specified in degrees within the range [-180, 180).
128
- if (x >= -90 && x <= 90) {
129
- return true;
130
- }
131
- }
132
- return false;
133
- }
134
- });
135
-
136
-
137
- // Something to say it's a number / integer???
138
-
139
- const fdt_longitude = new Functional_Data_Type({
140
- name: 'longitude',
141
- value_js_type: Number,
142
- validate: x => {
143
- const tx = tof(x);
144
- // or get the sig.
145
- //console.log('longitude tx', tx);
146
- const sig_x = get_item_sig(x);
147
- //console.log('longitude sig_x', sig_x);
148
- if (sig_x === 'n') {
149
- // then are the within the right ranges...?
150
- // Latitude is specified in degrees within the range [-90, 90]. Longitude is specified in degrees within the range [-180, 180).
151
- if (x >= -180 && x <= 180) {
152
- return true;
153
- }
154
- }
155
- return false;
156
- }
157
- });
158
-
159
-
160
- const fdt_lat_long = new Functional_Data_Type({
161
- name: '[latitude, longitude]',
162
- value_js_type: Array,
163
- named_property_access: true,
164
- property_names: ['latitude', 'longitude'],
165
- property_data_types: [fdt_latitude, fdt_longitude],
166
- // And the property types as well being the same in this case?
167
- abbreviated_property_names: ['lat', 'long'],
168
- numbered_property_access: true, // Maybe that's good enough to make it like an array when there are 2 properties.
169
-
170
- // wrap_value property??? maybe not because the Data_Value with this Data_Type does wrap that value already.
171
-
172
-
173
- // so if it's an array it wraps that?
174
- // wrap_properties - does make sense, as properties may need to be their own Data_Value of that Data_Type.
175
- wrap_properties: true,
176
- wrap_value_inner_values: true,
177
-
178
- // wrap_value_inner_values???
179
-
180
-
181
-
182
-
183
- // zero_indexed_numbered_property_access perhaps???
184
-
185
- // something to say it's an array pair?
186
- // maybe the 'sig'???
187
- // Here focus more on getting the validation working than using the definition.
188
- // However, providing the definition / description could help.
189
-
190
- validate: x => {
191
- const sig_x = get_a_sig(x);
192
- if (sig_x === '[n,n]') {
193
- const [lat, long] = x;
194
- return fdt_latitude.validate(lat) && fdt_longitude.validate(long);
195
- }
196
- return false;
197
- }
198
- });
199
-
200
- // Then the control to represent them both....
201
-
202
-
203
- // This could indeed have base functionality to get the data.model and view.data.model set up.
204
- // Maybe even define some control.view.ui.composition.model.content which would take the place of control.content
205
-
206
- // Getting much more explicit with names for parts of control functionality will help. The point will be to avoid confusion.
207
- // Often when using controls we would not need to be so explicit, the app will know which explicit thing to use on a lower level.
208
-
209
-
210
-
211
-
212
- // Classes for controls that inherently have some kind(s) of data...?
213
-
214
-
215
- // Late 2023 - Does seem best right now not to make breaking changes, or try them, when it comes to control compositional model.
216
- // May be worth isolating the code where possible so those breaking changes could be attempted and switched in / out.
217
-
218
-
219
-
220
- // Controls where the compositional model follows the data model.
221
-
222
- // Need to be able to talk to, and talk about, controls on different levels.
223
-
224
- // What they represent (both what they are showing now, and the assigned and accepted model that the app is using). How they represent it.
225
- // Data_Type or data.model.data_type seems very important. Maybe just access it as data.type.
226
- // data.model would be the instance. It may have a .data_type property.
227
-
228
- // But control.data.type makes sense.
229
- // And give it a functional data type, or maybe a different sort, maybe have functional data types
230
- // created from definitions.
231
-
232
-
233
- // Data_Type definitely seems useful / important.
234
- // Definitional_Data_Type ???
235
- // Grammar_Data_Type ??? Grammar_Specified_Data_Type ???
236
-
237
-
238
- // Would like Data_Type to be fairly simple and to-the-point where possible.
239
- // Focusing on making it work as a schema for data that's made out of JS objects and easy to turn into JSON would help.
240
- // Be able to keep some of the hard work / complexity behind the scenes.
241
-
242
- // Will work towards simpler component specification and use where it's according to / editing / viewing specific data types.
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
- class Base_Lat_Long extends Control {
262
-
263
-
264
- constructor(spec) {
265
- super(spec);
266
-
267
-
268
-
269
- }
270
-
271
-
272
- }
273
-
274
-
275
-
276
- // Want creation of a control to interact with data to be easy to make.
277
- // Could make use of sensible defaults on a lower and mid level.
278
-
279
- // A somewhat basic control that represents a Data_Value that itself contains a pair of Data_Values...?
280
- // And specify which controls it uses internally as the view for those values...?
281
-
282
-
283
- // Definitely need to simplify making the controls that avt as a view for a Data_Value.
284
- // Basically controls that represent a value.
285
-
286
- // The compositional model.
287
- // Then how to compositional model relates to the data model?
288
- // Or include info on what data the various parts have access to (and specifically edit) within the composition model?
289
-
290
- // Maybe some new kind of 'model' or object that represents how the data in the data / view model gets represented in terms of
291
- // the compositional model?
292
-
293
- // Ie the data representation model?
294
- // data.view.model even????
295
-
296
- // Do want to get the high level code to be both very concise and explicit.
297
- // Unambiguous, yet also not many words used to express it.
298
- // Though a small number of words that describe it explicitly is fine.
299
-
300
- // view.ui.composition.model
301
- // view.ui.data.representation.model
302
- // does make sense for defining how data (referencing the data model and view data model) gets represented.
303
-
304
- // data.representation.model
305
- // does make a lot of sense to have this thing.
306
- // want to be able to approach it in a declarative kind of way.
307
-
308
- // composition and representation together....?
309
- // could be possible.
310
-
311
- // maybe call it a 'view definition'.
312
- // or a 'combined representation model'?
313
- // or a 'composition and representation model'?
314
-
315
- // The two things are closely related, maybe ok giving info about how the data gets represented inside the composition model.
316
- // However, explicitly giving both makes a lot of sense.
317
-
318
- // Defining the control composition model(s) would be very helpful.
319
- // It mean the normal compose() functions will no longer be needed, many will be able to be expressed much more concisely.
320
-
321
- // The data composition???
322
- // The data.representation makes most sense.
323
- // How, within the composition, is the data represented.
324
-
325
- // eg which control, by name, operates on which property of a Data_Model?
326
-
327
- // Anyway, need to set up the control.view.ui.composition.model
328
- // A composition model could extend Data_Value, and have an underlying array.
329
- // Makes sense that way.
330
-
331
- // Composition models in cases where things get repeated (by some number maybe from the data.model, view.data.model, view.ui.composition.data.model)
332
-
333
- // both composition model, and the composition data model???
334
- // not so sure about yet another data model, being the compositional data model.
335
- // But it could make sense for the data that's directly got to do with how the control gets composed.
336
- //
337
-
338
- // For the moment, extend these capabilities to all controls.
339
- // Need to be careful though about slowing down controls in general.
340
- // Not every control would have / need a compositional model (I currently assume)
341
- // Though it may make sense as where what's inside that control, and tagName, or other info, get stored.
342
- // Eg store the fact that it's composed as a DOM node, then the fact it's composed as an element.
343
- // Compositions which include text nodes too....
344
-
345
- // It seems worth working on some simpler controls to implement and use the compositional model system.
346
- // Text_Field, maybe Text_Input too...?
347
-
348
- // Maybe the compositional model would help with things like inserting a label inside the Text_Input control.
349
-
350
-
351
- // The compositional model will be a really quick way to express what the control is made out of.
352
- // (other controls).
353
- // Also would specify internal spaces.
354
-
355
- // Perhaps sometimes derive the data representational model?
356
- // data-representation-composition???
357
-
358
- // model_that_defines_how_the_data_model_corresponds_to_the_compositional_model
359
- // data_model_compositional_model_correspondance????
360
-
361
- // Do need to be able to go into a lot of (necessary) detail about controls.
362
- // The lower level parts of it seem essential when it comes to expressing things really concisely and explicitly on a high level.
363
-
364
- // ctrl.view.ui.data.compositional.model
365
- // That may make sense as to where some model of how the data from the data model gets composed into the controls in the
366
- // ctrl.view.ui.compositional.model
367
-
368
-
369
- // Late 2023 - does seem worth introducting these things as new features that work alongside with what already exists.
370
- // For the moment, don't change control.content
371
- // deep descriptive namespaces will help the high and mid level code avoid ambiguity.
372
-
373
- // Seems like integrating this into the core of control makes sense.
374
- // Or maybe implementing it all as a mixin for the moment???
375
-
376
- // Data_Features?
377
- // Control_Multi_Modal_System???
378
-
379
- // MVVMMM??
380
-
381
- // the xM system perhaps?
382
- // xMVM
383
- // view_and_models???
384
-
385
- // view_and_data_and_composition_models
386
-
387
- // model_view_data_composition_representation
388
-
389
- // DMVDMVCMVDRM
390
-
391
- // Doing this all in a mixin could make sense.
392
- //
393
-
394
-
395
-
396
-
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
-
411
-
412
-
413
-
414
-
415
-
416
-
417
-
418
-
419
-
420
-
421
-
422
-
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
-
431
-
432
-
433
-
434
-
435
-
436
-
437
-
438
-
439
-
440
-
441
-
442
-
443
-
444
-
445
-
446
-
447
-
448
-
449
-
450
-
451
-
452
-
453
-
454
-
455
-
456
-
457
-
458
-
459
-
460
-
461
-
462
-
463
-
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
-
472
-
473
-
474
-
475
-
476
-
477
-
478
-
479
-
480
-
481
-
482
-
483
-
484
-
485
-
486
-
487
-
488
-
489
-
490
-
491
-
492
-
493
-
494
- class Simple_Lat_Long extends Base_Lat_Long {
495
- constructor(spec) {
496
- super(spec);
497
-
498
- this.__type_name = 'simple_lat_long';
499
-
500
- // But also define the data types of those fields...?
501
-
502
- // Though likely these fields would not need to be specified as it's part of the Data_Model.
503
- // But possibly we really do need a Data_Type to give to the control.data.model
504
-
505
-
506
-
507
- field(this, 'lat', fdt_latitude);
508
- field(this, 'long', fdt_longitude);
509
-
510
- const {context} = this;
511
- const construct_synchronised_data_and_view_models = () => {
512
- this.data = new Control_Data({context})
513
- if (spec.data && spec.data.model) {
514
- this.data.model = spec.data.model;
515
- } else {
516
- this.data.model = new Data_Object({context});
517
- field(this.data.model, 'value');
518
- }
519
- this.view = new Control_View({context})
520
- if (spec.view && spec.view.data.model) {
521
- this.view.data.model = spec.view.data.model;
522
- } else {
523
- this.view.data.model = new Data_Object({context});
524
- field(this.view.data.model, 'value');
525
- }
526
- //
527
-
528
- this.data.model.on('change', e => {
529
- const {name, value, old} = e;
530
- if (name === 'value') {
531
- if (!equals(value, old)) {
532
- this.view.data.model.value = value;
533
- }
534
- }
535
- });
536
- this.view.data.model.on('change', e => {
537
- const {name, value, old} = e;
538
- if (name === 'value') {
539
- if (!equals(value, old)) {
540
- this.data.model.value = value;
541
-
542
- /*
543
-
544
- if (this.dom.el) {
545
- this.dom.el.value = value;
546
- }
547
-
548
- */
549
-
550
-
551
- }
552
- }
553
- });
554
- }
555
- construct_synchronised_data_and_view_models();
556
-
557
-
558
- // and specify the Data_Type for the Text_Field control too.
559
- // Want to introduce powerful features into core / easy to access and use controls.
560
- // Maybe not just on composition...?
561
- // Be able to have the text field know its data-jsgui-data-type
562
- // and these data-types would be registered or available somehow within jsgui.
563
-
564
- // Where possible, want the high level API not to need mention of data models, but they work well in the background.
565
-
566
- // May be worth completely redoing / majorly refactoring this lat/long example.
567
- // Possibly defining a 'compositional model' would help.
568
- // Would itself be a Data_Value probably.
569
-
570
-
571
-
572
-
573
-
574
-
575
-
576
- const compose = () => {
577
- const {context} = this;
578
- const tf_lat = new Text_Field({
579
- context,
580
- name: 'Latitude',
581
- text: 'Latitude'
582
- });
583
-
584
- const tf_long = new Text_Field({
585
- context,
586
- name: 'Longitude',
587
- text: 'Longitude'
588
- });
589
-
590
- this.add(tf_lat);
591
- this.add(tf_long);
592
-
593
- this.tf_lat = tf_lat;
594
- this.tf_long = tf_long;
595
-
596
- this._ctrl_fields = this._ctrl_fields || {};
597
-
598
- this._ctrl_fields.tf_lat = tf_lat;
599
- this._ctrl_fields.tf_long = tf_long;
600
-
601
- }
602
- if (!spec.el) compose();
603
- }
604
-
605
- activate() {
606
-
607
- if (!this.__active) {
608
-
609
-
610
- // Want to get concise and efficient data model and view model access idioms set up.
611
- // However, for the moment, be very explicit about what it's doing before making idioms.
612
-
613
-
614
-
615
-
616
- super.activate();
617
-
618
-
619
- // Just listening to the changes here for debug purposes.
620
-
621
- this.tf_lat.on('change', e => {
622
-
623
- // Need the more advanced Data_Value / Data_Model equals(supporting?) function.
624
-
625
-
626
-
627
- if (!equals(e.value, e.old)) {
628
-
629
-
630
- console.log('tf_lat change e', e);
631
- }
632
-
633
- })
634
-
635
- this.tf_long.on('change', e => {
636
- //console.log('Simple_Lat_Long tf_long change e', e);
637
-
638
- if (!equals(e.value, e.old)) {
639
- //this.long = e.value;
640
-
641
- console.log('tf_long change e', e);
642
-
643
- }
644
- });
645
-
646
- // Maybe look more specifically at this.data.model.change, this.view.data.model.change.
647
-
648
- // Though will want to set up shortcut access on the control to what's in the data.model.
649
- // Generally referring to the data.model will be best, however confusion will be avoided by having and using both
650
- // data.model and view.data.model.
651
-
652
- // Will be easy enough eventually.
653
- // The subtleties must be made to work on a lower level.
654
-
655
-
656
-
657
- /*
658
-
659
- this.on('change', e => {
660
- const {name, value} = e;
661
-
662
- //console.log('Simple_Lat_Long change e', e);
663
- //console.log('[name, value]', [name, value]);
664
-
665
- // text_field.value should work.
666
-
667
- if (name === 'lat') {
668
- // then change it in the ui / the view????
669
- // .view.ui ????
670
-
671
- this.tf_lat.value = value + '';
672
-
673
- } else if (name === 'long') {
674
- this.tf_long.value = value + '';
675
- }
676
- });
677
-
678
- */
679
- }
680
-
681
- }
682
- }
683
-
684
- controls.Simple_Lat_Long = Simple_Lat_Long;
685
-
686
- //jsgui.controls.register(Simple_Lat_Long);
687
-
688
-
689
-
690
-
691
-
692
-
693
-
694
-
695
- class Demo_UI extends Active_HTML_Document {
696
-
697
- constructor(spec = {}) {
698
- spec.__type_name = spec.__type_name || 'demo_ui';
699
- super(spec);
700
- const {context} = this;
701
-
702
- const setup_demo_ui_data_model = () => {
703
- this.data = {
704
- model: new Data_Value({
705
- context,
706
- data_type: fdt_lat_long
707
- })
708
- }
709
- //field(this.data.model, 'value');
710
- context.register_control(this.data.model);
711
- }
712
- setup_demo_ui_data_model();
713
-
714
-
715
- if (typeof this.body.add_class === 'function') {
716
- this.body.add_class('demo-ui');
717
- }
718
-
719
- //console.log('this.body', this.body);
720
- //console.log('this.body.add_class', this.body.add_class);
721
-
722
- const compose = () => {
723
-
724
- const window = new controls.Window({
725
- context: context,
726
- title: 'jsgui3-html Shared data.model integer Mirrored Text_Input controls',
727
- pos: [5, 5]
728
- });
729
-
730
- window.size = [480, 160];
731
-
732
- const ti1 = new Simple_Lat_Long({
733
- context,
734
- data: {
735
- model: this.data.model
736
- }
737
- })
738
- window.inner.add(ti1);
739
-
740
- // Though not sure they get reconstructed with that data model?
741
-
742
- // Want to make this easy for the app programmer to get right in particular.
743
-
744
- // May need (much) more work on persisting the data model to the client.
745
- // Or defining it in a way / place so it can be started isomorphically.
746
- // Though it may make sense to do more to transfer models from the server to the client, with their data.
747
- // However, reconstructing models from the (values in) the DOM could make a lot of sense.
748
- // Having it read the DOM to create its DOM model, then from that its view.data model, then its data model.
749
-
750
-
751
-
752
-
753
-
754
-
755
-
756
-
757
- const ti2 = new Simple_Lat_Long({
758
- context,
759
- data: {
760
- model: this.data.model
761
- }
762
- })
763
- window.inner.add(ti2);
764
- this.body.add(window);
765
-
766
-
767
-
768
- // ._ctrl_fields should automatically be set up.
769
- // Also make it so when there are 0 entries in there it won't render the DOM attribute.
770
-
771
- // First get the MVC properly and explicitly working accross some more controls.
772
- // If any abstractions come really easily then do that.
773
- // Maybe a DMVM_Control could be very effective soon.
774
-
775
- // An 'adjuster' control could possibly have no 'data model' of its own.
776
- // It could be set up to adjust either a data model, or a view model.
777
-
778
-
779
-
780
-
781
- this._ctrl_fields = this._ctrl_fields || {};
782
- this._ctrl_fields.ti1 = ti1;
783
- this._ctrl_fields.ti2 = ti2;
784
-
785
-
786
- }
787
- if (!spec.el) {
788
- compose();
789
- }
790
- }
791
- activate() {
792
- if (!this.__active) {
793
- super.activate();
794
- const {context, ti1, ti2} = this;
795
-
796
- console.log('activate Demo_UI');
797
-
798
-
799
- // Reconstructing the
800
-
801
- const activate_demo_ui_data_model = () => {
802
-
803
-
804
-
805
- //
806
-
807
- if (ti1.data && ti2.data) {
808
-
809
- console.log('ti1.data.model === ti2.data.model', ti1.data.model === ti2.data.model);
810
-
811
- if (ti1.data.model === ti2.data.model) {
812
- // This is really the way it should be. Can see about fixing it on a lower level.
813
-
814
- } else {
815
-
816
- // Should not need this code.
817
- // Want decent low/mid level code to send the info to the client so the client can automatically reconstruct it.
818
- /// Maybe a different function as standard to assign isomorphic things.
819
-
820
-
821
-
822
-
823
- const dm = new Data_Value({context,
824
- data_type: Functional_Data_Type.integer});
825
-
826
- // Should be enough here....
827
-
828
- //field(dm, 'value');
829
- ti1.data.model = dm;
830
- ti2.data.model = dm;
831
-
832
- // But then need to get them to reassign their data model change listeners....?
833
- // value change even....
834
-
835
- //ti1.assign_data_model_value_change_handler();
836
- //ti2.assign_data_model_value_change_handler();
837
-
838
-
839
- }
840
-
841
- } else {
842
- console.log('missing ti1.data && ti2.data');
843
- }
844
-
845
-
846
- }
847
-
848
- activate_demo_ui_data_model();
849
- context.on('window-resize', e_resize => {});
850
-
851
- }
852
- }
853
- }
854
-
855
- // Include this in bundling.
856
- // Want CSS bundling so that styles are read out from the JS document and compiled to a stylesheet.
857
-
858
- //controls.Demo_UI = Demo_UI;
859
-
860
- // A css file may be an easier way to get started...?
861
- // Want to support but not require css in js.
862
-
863
- // But need to set up the serving of the CSS both on the server, and on the client.
864
- // Ofc setting it up on the server first is important - then can that stage set it up in the doc sent to the client?
865
-
866
- // Including the CSS from the JS like before.
867
- // Needs to extract the CSS and serve it as a separate CSS file.
868
- // Should also have end-to-end regression tests so this does not break again in the future.
869
- // The code was kind of clunky and got refactored away.
870
- //
871
-
872
- // Would need to parse the JS files to extract the CSS.
873
- // Maybe could do it an easier way??? Now that it's easy, want a faster way.
874
-
875
-
876
- Demo_UI.css = `
877
-
878
- * {
879
- margin: 0;
880
- padding: 0;
881
- }
882
-
883
- body {
884
- overflow-x: hidden;
885
- overflow-y: hidden;
886
- background-color: #E0E0E0;
887
- }
888
-
889
- .demo-ui {
890
-
891
- /*
892
-
893
- display: flex;
894
- flex-wrap: wrap;
895
-
896
- flex-direction: column;
897
- justify-content: center;
898
- align-items: center;
899
- text-align: center;
900
- min-height: 100vh;
901
- */
902
-
903
- }
904
- `;
905
-
906
- // But may want to remove them from that flex upon picking up / dropping them.
907
- // Maybe best upon drop.
908
-
909
- // Maybe want other examples that use absolute positioning to position the items at the start?
910
- //
911
-
912
-
913
-
914
- //controls.Square_Box = Square_Box;
915
- // could export jsgui with the updated controls....
916
- // so that they are in the correct Page Context.?
917
-
918
-
919
- controls.Demo_UI = Demo_UI;
920
-
921
- module.exports = jsgui;
922
-
923
- /*
924
- module.exports = {
925
- Square_Box: Square_Box,
926
- Demo_UI: Demo_UI
927
- }
928
- */
929
-
930
- // Then if window...?
931
-
932
- // Need to add the Square_Box control to the context or original map of controls...
933
-