lino-react 24.9.4__py3-none-any.whl

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 (230) hide show
  1. lino_react/__init__.py +14 -0
  2. lino_react/react/__init__.py +140 -0
  3. lino_react/react/components/ActionHandler.tsx +928 -0
  4. lino_react/react/components/App.css +36 -0
  5. lino_react/react/components/App.jsx +675 -0
  6. lino_react/react/components/AppCSS.js +14 -0
  7. lino_react/react/components/AppInlineProfile.jsx +235 -0
  8. lino_react/react/components/AppMenu.css +9 -0
  9. lino_react/react/components/AppMenu.jsx +377 -0
  10. lino_react/react/components/AppTopBar.css +5 -0
  11. lino_react/react/components/AppTopbar.jsx +90 -0
  12. lino_react/react/components/AutoComplete.tsx +271 -0
  13. lino_react/react/components/Base.ts +209 -0
  14. lino_react/react/components/DashboardItems.jsx +111 -0
  15. lino_react/react/components/DataProvider.jsx +115 -0
  16. lino_react/react/components/ForeignKeyElement.jsx +152 -0
  17. lino_react/react/components/GridElement.css +44 -0
  18. lino_react/react/components/GridElement.jsx +778 -0
  19. lino_react/react/components/LinoBbar.css +44 -0
  20. lino_react/react/components/LinoBbar.jsx +165 -0
  21. lino_react/react/components/LinoBody.css +74 -0
  22. lino_react/react/components/LinoBody.jsx +347 -0
  23. lino_react/react/components/LinoChatter/ConversationList.css +4 -0
  24. lino_react/react/components/LinoChatter/ConversationListItem.css +31 -0
  25. lino_react/react/components/LinoChatter/Conversations.css +6 -0
  26. lino_react/react/components/LinoChatter/GroupChatChooser.js +63 -0
  27. lino_react/react/components/LinoChatter/LinoChats.js +150 -0
  28. lino_react/react/components/LinoChatter/LinoChatter.js +246 -0
  29. lino_react/react/components/LinoChatter/Messenger.css +38 -0
  30. lino_react/react/components/LinoComponentUtils.jsx +499 -0
  31. lino_react/react/components/LinoComponents.css +10 -0
  32. lino_react/react/components/LinoComponents.jsx +641 -0
  33. lino_react/react/components/LinoDataView.css +4 -0
  34. lino_react/react/components/LinoDataView.jsx +147 -0
  35. lino_react/react/components/LinoDetail.jsx +97 -0
  36. lino_react/react/components/LinoDialog.jsx +475 -0
  37. lino_react/react/components/LinoEditor.jsx +66 -0
  38. lino_react/react/components/LinoPaginator.jsx +72 -0
  39. lino_react/react/components/LinoParamsPanel.jsx +27 -0
  40. lino_react/react/components/LinoToolbar.css +11 -0
  41. lino_react/react/components/LinoToolbar.jsx +411 -0
  42. lino_react/react/components/LinoUtils.js +114 -0
  43. lino_react/react/components/LinoWebCam.tsx +241 -0
  44. lino_react/react/components/LoadingMask.jsx +90 -0
  45. lino_react/react/components/NavigationControl.js +798 -0
  46. lino_react/react/components/SiteContext.jsx +371 -0
  47. lino_react/react/components/TextFieldElement.css +27 -0
  48. lino_react/react/components/TextFieldElement.jsx +183 -0
  49. lino_react/react/components/__tests__/cloneUI.ts +57 -0
  50. lino_react/react/components/__tests__/integrity.ts +27 -0
  51. lino_react/react/components/constants.js +132 -0
  52. lino_react/react/components/custom-service-worker.js +72 -0
  53. lino_react/react/components/custom_hooks.js +18 -0
  54. lino_react/react/components/datetime.jsx +157 -0
  55. lino_react/react/components/i18n.js +53 -0
  56. lino_react/react/components/index.html +66 -0
  57. lino_react/react/components/layout/layout.css +1882 -0
  58. lino_react/react/components/layout/layout.scss +48 -0
  59. lino_react/react/components/layout/sass/_calander.scss +137 -0
  60. lino_react/react/components/layout/sass/_dashboard.scss +206 -0
  61. lino_react/react/components/layout/sass/_editor.scss +797 -0
  62. lino_react/react/components/layout/sass/_layout.scss +7 -0
  63. lino_react/react/components/layout/sass/_main.scss +1066 -0
  64. lino_react/react/components/layout/sass/_mixins.scss +120 -0
  65. lino_react/react/components/layout/sass/_splash.scss +52 -0
  66. lino_react/react/components/layout/sass/_utils.scss +38 -0
  67. lino_react/react/components/preprocessors.ts +21 -0
  68. lino_react/react/components/quillmodules.jsx +105 -0
  69. lino_react/react/components/serviceWorker.js +135 -0
  70. lino_react/react/components/setupTests.ts +64 -0
  71. lino_react/react/components/types.ts +280 -0
  72. lino_react/react/config/react/linoweb.json +0 -0
  73. lino_react/react/config/react/main.html +73 -0
  74. lino_react/react/config/react/service-worker.js +2 -0
  75. lino_react/react/config/react/service-worker.js.LICENSE.txt +1 -0
  76. lino_react/react/config/react/service-worker.js.map +1 -0
  77. lino_react/react/icons.py +230 -0
  78. lino_react/react/index.js +1 -0
  79. lino_react/react/models.py +0 -0
  80. lino_react/react/renderer.py +750 -0
  81. lino_react/react/sphinxconf.py +4 -0
  82. lino_react/react/static/media/javascript,__webpack_public_path__ = __webpack_base_uri__ = htmlWebpackPluginPublicPath;.1feff74f.bin +1 -0
  83. lino_react/react/static/media/primeicons.6ed59f96.svg +345 -0
  84. lino_react/react/static/media/primeicons.e1441b13.svg +292 -0
  85. lino_react/react/static/react/024b32cc7bf399b1a847.woff2 +0 -0
  86. lino_react/react/static/react/8931fda1930c3bd21e96.woff +0 -0
  87. lino_react/react/static/react/a5c2a53d1ff7a9ff5933.ttf +0 -0
  88. lino_react/react/static/react/af84cba1cef5b79f2489.svg +1 -0
  89. lino_react/react/static/react/ff0c4cd79b2ffca2de54.eot +0 -0
  90. lino_react/react/static/react/main.2395.b28b68947deb01810454.js +2 -0
  91. lino_react/react/static/react/main.2395.b28b68947deb01810454.js.map +1 -0
  92. lino_react/react/static/react/main.2617.b36ca307d8c44248566e.js +2 -0
  93. lino_react/react/static/react/main.2617.b36ca307d8c44248566e.js.map +1 -0
  94. lino_react/react/static/react/main.3454.b746ac02627435c7eb8d.js +2 -0
  95. lino_react/react/static/react/main.3454.b746ac02627435c7eb8d.js.map +1 -0
  96. lino_react/react/static/react/main.4292.7a4a9bc2e6bc81784968.js +2 -0
  97. lino_react/react/static/react/main.4292.7a4a9bc2e6bc81784968.js.map +1 -0
  98. lino_react/react/static/react/main.4600.37d0f054adc839cda4a2.js +2 -0
  99. lino_react/react/static/react/main.4600.37d0f054adc839cda4a2.js.map +1 -0
  100. lino_react/react/static/react/main.4703.4cc9f3b04beb59414ac0.js +3 -0
  101. lino_react/react/static/react/main.4703.4cc9f3b04beb59414ac0.js.LICENSE.txt +13 -0
  102. lino_react/react/static/react/main.4703.4cc9f3b04beb59414ac0.js.map +1 -0
  103. lino_react/react/static/react/main.5636.42bd10dd42f54c458e91.js +2 -0
  104. lino_react/react/static/react/main.5636.42bd10dd42f54c458e91.js.map +1 -0
  105. lino_react/react/static/react/main.644.96472a3bf7dd1aba330c.js +2 -0
  106. lino_react/react/static/react/main.644.96472a3bf7dd1aba330c.js.map +1 -0
  107. lino_react/react/static/react/main.711.63f5d09fa4393e646ab2.js +2 -0
  108. lino_react/react/static/react/main.711.63f5d09fa4393e646ab2.js.map +1 -0
  109. lino_react/react/static/react/main.7236.ec2709cf8f468ec5db78.js +3 -0
  110. lino_react/react/static/react/main.7236.ec2709cf8f468ec5db78.js.LICENSE.txt +19 -0
  111. lino_react/react/static/react/main.7236.ec2709cf8f468ec5db78.js.map +1 -0
  112. lino_react/react/static/react/main.AppCSS.e5dea9a99d998b1e8e0c.js +2 -0
  113. lino_react/react/static/react/main.AppCSS.e5dea9a99d998b1e8e0c.js.map +1 -0
  114. lino_react/react/static/react/main.AutoComplete_LinoToolbar.2319b69de37e2707d8db.js +2 -0
  115. lino_react/react/static/react/main.AutoComplete_LinoToolbar.2319b69de37e2707d8db.js.map +1 -0
  116. lino_react/react/static/react/main.DashboardItems_SiteContext.c481a67fcfbbb979ad75.js +2 -0
  117. lino_react/react/static/react/main.DashboardItems_SiteContext.c481a67fcfbbb979ad75.js.map +1 -0
  118. lino_react/react/static/react/main.LinoBody_SiteContext.de245a0a03f80d3899b1.js +2 -0
  119. lino_react/react/static/react/main.LinoBody_SiteContext.de245a0a03f80d3899b1.js.map +1 -0
  120. lino_react/react/static/react/main.LinoComponents_LinoDetail.6acd0e3ccae181744860.js +2 -0
  121. lino_react/react/static/react/main.LinoComponents_LinoDetail.6acd0e3ccae181744860.js.map +1 -0
  122. lino_react/react/static/react/main.LinoToolbar_LinoComponents.a65657fe06535a107ad2.js +2 -0
  123. lino_react/react/static/react/main.LinoToolbar_LinoComponents.a65657fe06535a107ad2.js.map +1 -0
  124. lino_react/react/static/react/main.LinoWebCam_LinoDialog.0a848f8b2866f02c006c.js +2 -0
  125. lino_react/react/static/react/main.LinoWebCam_LinoDialog.0a848f8b2866f02c006c.js.map +1 -0
  126. lino_react/react/static/react/main.NavigationControl_App.020236a93cd2c9452ea3.js +2 -0
  127. lino_react/react/static/react/main.NavigationControl_App.020236a93cd2c9452ea3.js.map +1 -0
  128. lino_react/react/static/react/main.SiteContext_App.affe8e1b465480e0371d.js +2 -0
  129. lino_react/react/static/react/main.SiteContext_App.affe8e1b465480e0371d.js.map +1 -0
  130. lino_react/react/static/react/main.datetime_GridElement.32d2e12503048ce74fe4.js +2 -0
  131. lino_react/react/static/react/main.datetime_GridElement.32d2e12503048ce74fe4.js.map +1 -0
  132. lino_react/react/static/react/main.f77cd9c2b82a6eb7c43a.js +3 -0
  133. lino_react/react/static/react/main.f77cd9c2b82a6eb7c43a.js.LICENSE.txt +19 -0
  134. lino_react/react/static/react/main.f77cd9c2b82a6eb7c43a.js.map +1 -0
  135. lino_react/react/static/react/main.i18n_App.694f7bda2798fb7f0dca.js +2 -0
  136. lino_react/react/static/react/main.i18n_App.694f7bda2798fb7f0dca.js.map +1 -0
  137. lino_react/react/static/react/main.lodash_LinoBbar.0f3eddd8b64a57ea9b1d.js +3 -0
  138. lino_react/react/static/react/main.lodash_LinoBbar.0f3eddd8b64a57ea9b1d.js.LICENSE.txt +8 -0
  139. lino_react/react/static/react/main.lodash_LinoBbar.0f3eddd8b64a57ea9b1d.js.map +1 -0
  140. lino_react/react/static/react/main.prAppRequire.d83b44bcd5ed872e12b6.js +2 -0
  141. lino_react/react/static/react/main.prAppRequire.d83b44bcd5ed872e12b6.js.map +1 -0
  142. lino_react/react/static/react/main.prButton_App.0486a258c6757e2b804d.js +2 -0
  143. lino_react/react/static/react/main.prButton_App.0486a258c6757e2b804d.js.map +1 -0
  144. lino_react/react/static/react/main.prCalendar_datetime.86f6b3293edc5adf5af7.js +2 -0
  145. lino_react/react/static/react/main.prCalendar_datetime.86f6b3293edc5adf5af7.js.map +1 -0
  146. lino_react/react/static/react/main.prCard_LinoDataView.0a562a11a1715c394504.js +2 -0
  147. lino_react/react/static/react/main.prCard_LinoDataView.0a562a11a1715c394504.js.map +1 -0
  148. lino_react/react/static/react/main.prCheckbox_LinoComponents.069a1dce15a3a88291b3.js +2 -0
  149. lino_react/react/static/react/main.prCheckbox_LinoComponents.069a1dce15a3a88291b3.js.map +1 -0
  150. lino_react/react/static/react/main.prDataTable_GridElement.00ee6a2bf670152ce51d.js +2 -0
  151. lino_react/react/static/react/main.prDataTable_GridElement.00ee6a2bf670152ce51d.js.map +1 -0
  152. lino_react/react/static/react/main.prDataView_LinoDataView.39b821a246d43a45cc49.js +2 -0
  153. lino_react/react/static/react/main.prDataView_LinoDataView.39b821a246d43a45cc49.js.map +1 -0
  154. lino_react/react/static/react/main.prDialog_LinoDialog.886931e456cf153cfb9f.js +2 -0
  155. lino_react/react/static/react/main.prDialog_LinoDialog.886931e456cf153cfb9f.js.map +1 -0
  156. lino_react/react/static/react/main.prDialog_LinoEditor.8da8c5b8734d61165cd5.js +2 -0
  157. lino_react/react/static/react/main.prDialog_LinoEditor.8da8c5b8734d61165cd5.js.map +1 -0
  158. lino_react/react/static/react/main.prDropDown_LinoPaginator.2e5060a4740f3341f63e.js +2 -0
  159. lino_react/react/static/react/main.prDropDown_LinoPaginator.2e5060a4740f3341f63e.js.map +1 -0
  160. lino_react/react/static/react/main.prFieldset_LinoComponents.e4f63e83f27343edc61c.js +2 -0
  161. lino_react/react/static/react/main.prFieldset_LinoComponents.e4f63e83f27343edc61c.js.map +1 -0
  162. lino_react/react/static/react/main.prFileUpload_LinoComponents.fd4dcc59411d4f30ce44.js +2 -0
  163. lino_react/react/static/react/main.prFileUpload_LinoComponents.fd4dcc59411d4f30ce44.js.map +1 -0
  164. lino_react/react/static/react/main.prFlex_AppCSS.fa6130881ede09cdec3c.js +2 -0
  165. lino_react/react/static/react/main.prFlex_AppCSS.fa6130881ede09cdec3c.js.map +1 -0
  166. lino_react/react/static/react/main.prGalleria_LinoDataView.95e6cbe67e576d213ccc.js +2 -0
  167. lino_react/react/static/react/main.prGalleria_LinoDataView.95e6cbe67e576d213ccc.js.map +1 -0
  168. lino_react/react/static/react/main.prInputNumber_GridElement.cbbfc906eb7a1aa8f156.js +2 -0
  169. lino_react/react/static/react/main.prInputNumber_GridElement.cbbfc906eb7a1aa8f156.js.map +1 -0
  170. lino_react/react/static/react/main.prInputText_GridElement.7c9df8f8bf9a4ec2da54.js +2 -0
  171. lino_react/react/static/react/main.prInputText_GridElement.7c9df8f8bf9a4ec2da54.js.map +1 -0
  172. lino_react/react/static/react/main.prLinoBodyRequire.e85203e75c853a3a28a3.js +2 -0
  173. lino_react/react/static/react/main.prLinoBodyRequire.e85203e75c853a3a28a3.js.map +1 -0
  174. lino_react/react/static/react/main.prLinoBodyRequireChunk2.adbf631ecf19c47e2b81.js +2 -0
  175. lino_react/react/static/react/main.prLinoBodyRequireChunk2.adbf631ecf19c47e2b81.js.map +1 -0
  176. lino_react/react/static/react/main.prLinoComponentsRequire.514afdde432eb8d81fed.js +2 -0
  177. lino_react/react/static/react/main.prLinoComponentsRequire.514afdde432eb8d81fed.js.map +1 -0
  178. lino_react/react/static/react/main.prMultiSelect_GridElement.fcc21baa73eca34559b3.js +2 -0
  179. lino_react/react/static/react/main.prMultiSelect_GridElement.fcc21baa73eca34559b3.js.map +1 -0
  180. lino_react/react/static/react/main.prOverlayPanel_GridElement.8f5b663d1eb6b1dd38a3.js +2 -0
  181. lino_react/react/static/react/main.prOverlayPanel_GridElement.8f5b663d1eb6b1dd38a3.js.map +1 -0
  182. lino_react/react/static/react/main.prPaginator_LinoPaginator.c863944483f4cd55f1ed.js +2 -0
  183. lino_react/react/static/react/main.prPaginator_LinoPaginator.c863944483f4cd55f1ed.js.map +1 -0
  184. lino_react/react/static/react/main.prPanel_LinoComponents.4d6ad650177c4d7814af.js +2 -0
  185. lino_react/react/static/react/main.prPanel_LinoComponents.4d6ad650177c4d7814af.js.map +1 -0
  186. lino_react/react/static/react/main.prPassword_LinoComponents.7599b5120d8f9cafd72a.js +2 -0
  187. lino_react/react/static/react/main.prPassword_LinoComponents.7599b5120d8f9cafd72a.js.map +1 -0
  188. lino_react/react/static/react/main.prRhea_AppCSS.ea10c28c5d2ea1998aa1.js +2 -0
  189. lino_react/react/static/react/main.prRhea_AppCSS.ea10c28c5d2ea1998aa1.js.map +1 -0
  190. lino_react/react/static/react/main.prSelectButton_GridElement.633d2217223f534ccffd.js +2 -0
  191. lino_react/react/static/react/main.prSelectButton_GridElement.633d2217223f534ccffd.js.map +1 -0
  192. lino_react/react/static/react/main.prSiteContextRequire.98dc049d4071c62e7fb7.js +2 -0
  193. lino_react/react/static/react/main.prSiteContextRequire.98dc049d4071c62e7fb7.js.map +1 -0
  194. lino_react/react/static/react/main.prSplitButton_LinoBbar.e05ce5134499104a3a39.js +2 -0
  195. lino_react/react/static/react/main.prSplitButton_LinoBbar.e05ce5134499104a3a39.js.map +1 -0
  196. lino_react/react/static/react/main.prTabView_LinoComponents.d743f6cd16abca8ced30.js +2 -0
  197. lino_react/react/static/react/main.prTabView_LinoComponents.d743f6cd16abca8ced30.js.map +1 -0
  198. lino_react/react/static/react/main.prToast_App.34c3ec5ce66e48b743e2.js +2 -0
  199. lino_react/react/static/react/main.prToast_App.34c3ec5ce66e48b743e2.js.map +1 -0
  200. lino_react/react/static/react/main.prToggleButton_LinoToolbar.8fe0d07ba354203cbb7a.js +2 -0
  201. lino_react/react/static/react/main.prToggleButton_LinoToolbar.8fe0d07ba354203cbb7a.js.map +1 -0
  202. lino_react/react/static/react/main.prTriStateCheckbox_GridElement.e3aec6e50d98fc089595.js +2 -0
  203. lino_react/react/static/react/main.prTriStateCheckbox_GridElement.e3aec6e50d98fc089595.js.map +1 -0
  204. lino_react/react/static/react/main.queryString_App.33598aa7a039c5ed5ccd.js +2 -0
  205. lino_react/react/static/react/main.queryString_App.33598aa7a039c5ed5ccd.js.map +1 -0
  206. lino_react/react/static/react/main.quill.f87352cafdb60392df4c.js +2 -0
  207. lino_react/react/static/react/main.quill.f87352cafdb60392df4c.js.map +1 -0
  208. lino_react/react/static/react/main.reactDom_App.db5e413fed3c5e8fb327.js +2 -0
  209. lino_react/react/static/react/main.reactDom_App.db5e413fed3c5e8fb327.js.map +1 -0
  210. lino_react/react/static/react/main.reactI18n_SiteContext.815631b5d8e41256d9ba.js +2 -0
  211. lino_react/react/static/react/main.reactI18n_SiteContext.815631b5d8e41256d9ba.js.map +1 -0
  212. lino_react/react/static/react/main.reactRouterDom_App.c451be284c79af924afd.js +3 -0
  213. lino_react/react/static/react/main.reactRouterDom_App.c451be284c79af924afd.js.LICENSE.txt +32 -0
  214. lino_react/react/static/react/main.reactRouterDom_App.c451be284c79af924afd.js.map +1 -0
  215. lino_react/react/static/react/main.runtime.1b037ddc1d1b089893ea.js +2 -0
  216. lino_react/react/static/react/main.runtime.1b037ddc1d1b089893ea.js.map +1 -0
  217. lino_react/react/static/react/main.tpdep.cc4a9ab2067560b65574.js +3 -0
  218. lino_react/react/static/react/main.tpdep.cc4a9ab2067560b65574.js.LICENSE.txt +20 -0
  219. lino_react/react/static/react/main.tpdep.cc4a9ab2067560b65574.js.map +1 -0
  220. lino_react/react/views.py +774 -0
  221. lino_react/translations/extracts/i18n/bn/translation.json +53 -0
  222. lino_react/translations/extracts/i18n/de/translation.json +53 -0
  223. lino_react/translations/extracts/i18n/en/translation.json +53 -0
  224. lino_react/translations/extracts/i18n/et/translation.json +53 -0
  225. lino_react/translations/extracts/i18n/fr/translation.json +53 -0
  226. lino_react/translations/i18n-scan.js +24 -0
  227. lino_react-24.9.4.dist-info/METADATA +704 -0
  228. lino_react-24.9.4.dist-info/RECORD +230 -0
  229. lino_react-24.9.4.dist-info/WHEEL +4 -0
  230. lino_react-24.9.4.dist-info/licenses/COPYING +661 -0
lino_react/__init__.py ADDED
@@ -0,0 +1,14 @@
1
+ """
2
+ .. autosummary::
3
+ :toctree:
4
+
5
+ react
6
+
7
+ """
8
+
9
+
10
+ __version__ = '24.9.4'
11
+
12
+ srcref_url = 'https://gitlab.com/lino-framework/react/blob/master/%s'
13
+ # doc_trees = []
14
+ intersphinx_urls = dict(docs="https://lino-framework.gitlab.io/react/")
@@ -0,0 +1,140 @@
1
+ # -*- coding: UTF-8 -*-
2
+ # Copyright 2018-2021 Rumma & Ko Ltd
3
+ # License: GNU Affero General Public License v3 (see file COPYING for details)
4
+
5
+ """
6
+ A user interface for Lino applications that uses FaceBooks React JS framework.
7
+
8
+
9
+ .. autosummary::
10
+ :toctree:
11
+
12
+ views
13
+ renderer
14
+ models
15
+ """
16
+
17
+ from django.utils import translation
18
+ from lino.core import constants
19
+ from lino.api.ad import Plugin
20
+
21
+
22
+ class Plugin(Plugin):
23
+ # ui_label = _("React")
24
+ ui_handle_attr_name = 'react_handle'
25
+
26
+ # needs_plugins = ['lino.modlib.jinja', 'lino.modlib.memo']
27
+ # needs_plugins = ['lino.modlib.system', 'lino.modlib.jinja']
28
+ needs_plugins = ['lino.modlib.jinja']
29
+ # disables_plugins = ['tinymce', 'extensible']
30
+
31
+ url_prefix = 'react'
32
+
33
+ media_name = 'react'
34
+ support_async = True
35
+ top_paginator = True
36
+
37
+ # resizable_panel = False
38
+ resizable_panel = True
39
+
40
+ # media_base_url = "http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/"
41
+
42
+ def on_ui_init(self, kernel):
43
+ from .renderer import Renderer
44
+ self.renderer = Renderer(self)
45
+ # ui.bs3_renderer = self.renderer
46
+ # removed 20230613 kernel.extjs_renderer = self.renderer
47
+
48
+ def load_site_js_snippets(self, settings):
49
+ context = dict(
50
+ extjs_renderer=self.renderer,
51
+ site=self.site,
52
+ settings=settings,
53
+ lino=self.site.plugins.lino,
54
+ language=translation.get_language(),
55
+ constants=constants,
56
+ extjs=None, # 20230613 used in sepa/config/iban/uppercasetextfield.js
57
+ )
58
+
59
+ js = ""
60
+ env = self.site.plugins.jinja.renderer.jinja_env
61
+
62
+ for p in self.site.sorted_plugins:
63
+ for snippet in p.site_js_snippets:
64
+ template = env.get_template(snippet)
65
+ js += f"<script>{template.render(**context)}</script>"
66
+
67
+ return js
68
+
69
+ def get_patterns(self):
70
+ # this is called once after startup.
71
+ # print("20221102 get_patterns()")
72
+ from django.urls import re_path as url
73
+ from django.urls import path
74
+ from . import views
75
+
76
+ rx = '^'
77
+
78
+ # if self.site.developer_site_cache:
79
+ # self.renderer.build_site_cache()
80
+
81
+ urls = [
82
+ url(rx + r'$', views.Index.as_view()),
83
+ url(rx + r'user/settings', views.UserSettings.as_view()),
84
+ url(rx + r'auth$', views.Authenticate.as_view()),
85
+ url(rx + r"null/", views.Null.as_view()),
86
+
87
+ url(rx + r'(?P<workbox>workbox-[a-zA-Z0-9]*.js)$',
88
+ views.WBView.as_view()),
89
+ url(r'service-worker.js', views.SWView.as_view()),
90
+
91
+ url(rx + r'api/main_html$', views.MainHtml.as_view()),
92
+
93
+ path('dashboard/<int:index>', views.DashboardItem.as_view()),
94
+
95
+ # To be fased out
96
+ url(rx + r'restful/(?P<app_label>\w+)/(?P<actor>\w+)$',
97
+ views.ApiList.as_view()),
98
+ url(rx + r'restful/(?P<app_label>\w+)/(?P<actor>\w+)/(?P<pk>.+)$',
99
+ views.ApiElement.as_view()),
100
+ # From extjs
101
+ url(rx + r'api/(?P<app_label>\w+)/(?P<actor>\w+)$',
102
+ views.ApiList.as_view()),
103
+ url(rx + r'api/(?P<app_label>\w+)/(?P<actor>\w+)/(?P<pk>[^/]+)$',
104
+ views.ApiElement.as_view()),
105
+ # url(rx + r'api/(?P<app_label>\w+)/(?P<actor>\w+)/(?P<pk>[^/]+)/(?P<field>\w+)/suggestions$',
106
+ # views.Suggestions.as_view()),
107
+ url(rx + r'values/(?P<app_label>\w+)/(?P<actor>\w+)/(?P<pk>.+)/(?P<field>.+)$',
108
+ views.DelayedValue.as_view()),
109
+ url(rx + r'choices/(?P<app_label>\w+)/(?P<actor>\w+)$',
110
+ views.Choices.as_view()),
111
+ url(rx + r'choices/(?P<app_label>\w+)/(?P<actor>\w+)/'
112
+ '(?P<field>\w+)$',
113
+ views.Choices.as_view()),
114
+ url(rx + r'apchoices/(?P<app_label>\w+)/(?P<actor>\w+)/'
115
+ '(?P<an>\w+)/(?P<field>\w+)$',
116
+ views.ActionParamChoices.as_view()),
117
+ # For generating views
118
+ # url(rx + r'callbacks/(?P<thread_id>[\-0-9a-zA-Z]+)/'
119
+ # '(?P<button_id>\w+)$',
120
+ # views.Callbacks.as_view()),
121
+ #
122
+ url(rx+ r'choicelists/',
123
+ views.ChoiceListModel.as_view()),
124
+
125
+ ]
126
+ return urls
127
+
128
+ def get_detail_url(self, ar, actor, pk, *args, **kw):
129
+ return self.build_plain_url(
130
+ "#",
131
+ "api",
132
+ actor.actor_id.replace(".", "/"),
133
+ str(pk), *args, **kw)
134
+
135
+ def get_used_libs(self, html=False):
136
+ if html is not None:
137
+ yield ("React", '18.2', "https://reactjs.org/")
138
+
139
+ # def get_requirements(self, site):
140
+ # yield 'lino_react'