lino-react 25.1.2__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 (236) hide show
  1. lino_react/__init__.py +11 -0
  2. lino_react/react/__init__.py +130 -0
  3. lino_react/react/components/ActionHandler.tsx +943 -0
  4. lino_react/react/components/App.css +36 -0
  5. lino_react/react/components/App.jsx +679 -0
  6. lino_react/react/components/AppCSS.js +14 -0
  7. lino_react/react/components/AppInlineProfile.jsx +224 -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 +85 -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 +155 -0
  17. lino_react/react/components/GridElement.css +44 -0
  18. lino_react/react/components/GridElement.jsx +792 -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 +349 -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 +643 -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 +422 -0
  42. lino_react/react/components/LinoUtils.js +116 -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 +814 -0
  46. lino_react/react/components/SiteContext.jsx +371 -0
  47. lino_react/react/components/TODOS.txt +5 -0
  48. lino_react/react/components/TextFieldElement.css +27 -0
  49. lino_react/react/components/TextFieldElement.jsx +192 -0
  50. lino_react/react/components/__tests__/cloneUI.ts +57 -0
  51. lino_react/react/components/__tests__/integrity.ts +28 -0
  52. lino_react/react/components/__tests__/testParamChanges.ts +46 -0
  53. lino_react/react/components/constants.js +132 -0
  54. lino_react/react/components/current_commit_msg.txt +0 -0
  55. lino_react/react/components/custom-service-worker.js +72 -0
  56. lino_react/react/components/custom_hooks.js +18 -0
  57. lino_react/react/components/datetime.jsx +159 -0
  58. lino_react/react/components/i18n.js +53 -0
  59. lino_react/react/components/index.html +67 -0
  60. lino_react/react/components/layout/layout.css +1882 -0
  61. lino_react/react/components/layout/layout.scss +48 -0
  62. lino_react/react/components/layout/sass/_calander.scss +137 -0
  63. lino_react/react/components/layout/sass/_dashboard.scss +206 -0
  64. lino_react/react/components/layout/sass/_editor.scss +797 -0
  65. lino_react/react/components/layout/sass/_layout.scss +7 -0
  66. lino_react/react/components/layout/sass/_main.scss +1066 -0
  67. lino_react/react/components/layout/sass/_mixins.scss +120 -0
  68. lino_react/react/components/layout/sass/_splash.scss +52 -0
  69. lino_react/react/components/layout/sass/_utils.scss +38 -0
  70. lino_react/react/components/preprocessors.ts +21 -0
  71. lino_react/react/components/quillmodules.jsx +171 -0
  72. lino_react/react/components/serviceWorker.js +135 -0
  73. lino_react/react/components/types.ts +281 -0
  74. lino_react/react/config/react/linoweb.json +0 -0
  75. lino_react/react/config/react/main.html +74 -0
  76. lino_react/react/config/react/service-worker.js +2 -0
  77. lino_react/react/config/react/service-worker.js.LICENSE.txt +1 -0
  78. lino_react/react/config/react/service-worker.js.map +1 -0
  79. lino_react/react/icons.py +230 -0
  80. lino_react/react/index.js +1 -0
  81. lino_react/react/models.py +0 -0
  82. lino_react/react/renderer.py +756 -0
  83. lino_react/react/sphinxconf.py +4 -0
  84. lino_react/react/static/media/javascript,__webpack_public_path__ = __webpack_base_uri__ = htmlWebpackPluginPublicPath;.1feff74f.bin +1 -0
  85. lino_react/react/static/media/primeicons.6ed59f96.svg +345 -0
  86. lino_react/react/static/media/primeicons.e1441b13.svg +292 -0
  87. lino_react/react/static/react/024b32cc7bf399b1a847.woff2 +0 -0
  88. lino_react/react/static/react/8931fda1930c3bd21e96.woff +0 -0
  89. lino_react/react/static/react/a5c2a53d1ff7a9ff5933.ttf +0 -0
  90. lino_react/react/static/react/af84cba1cef5b79f2489.svg +1 -0
  91. lino_react/react/static/react/ff0c4cd79b2ffca2de54.eot +0 -0
  92. lino_react/react/static/react/locales/bn/translation.json +53 -0
  93. lino_react/react/static/react/locales/de/translation.json +53 -0
  94. lino_react/react/static/react/locales/en/translation.json +53 -0
  95. lino_react/react/static/react/locales/et/translation.json +53 -0
  96. lino_react/react/static/react/locales/fr/translation.json +53 -0
  97. lino_react/react/static/react/main.2395.9f33b89eeeec9b03d310.js +2 -0
  98. lino_react/react/static/react/main.2395.9f33b89eeeec9b03d310.js.map +1 -0
  99. lino_react/react/static/react/main.2617.c9388796830b15988918.js +2 -0
  100. lino_react/react/static/react/main.2617.c9388796830b15988918.js.map +1 -0
  101. lino_react/react/static/react/main.3454.1228f6e94e7cba08e0e7.js +2 -0
  102. lino_react/react/static/react/main.3454.1228f6e94e7cba08e0e7.js.map +1 -0
  103. lino_react/react/static/react/main.4292.f642ad07f7cf4ed64d6f.js +2 -0
  104. lino_react/react/static/react/main.4292.f642ad07f7cf4ed64d6f.js.map +1 -0
  105. lino_react/react/static/react/main.4600.25d1bd59e81c3e7d5e13.js +2 -0
  106. lino_react/react/static/react/main.4600.25d1bd59e81c3e7d5e13.js.map +1 -0
  107. lino_react/react/static/react/main.4703.2d782c4563e671b153e9.js +3 -0
  108. lino_react/react/static/react/main.4703.2d782c4563e671b153e9.js.LICENSE.txt +13 -0
  109. lino_react/react/static/react/main.4703.2d782c4563e671b153e9.js.map +1 -0
  110. lino_react/react/static/react/main.51d394fd7f8a978d5ad9.js +3 -0
  111. lino_react/react/static/react/main.51d394fd7f8a978d5ad9.js.LICENSE.txt +19 -0
  112. lino_react/react/static/react/main.51d394fd7f8a978d5ad9.js.map +1 -0
  113. lino_react/react/static/react/main.644.6034fffa4ccfff36e563.js +2 -0
  114. lino_react/react/static/react/main.644.6034fffa4ccfff36e563.js.map +1 -0
  115. lino_react/react/static/react/main.7031.0006d03534b6c188b178.js +2 -0
  116. lino_react/react/static/react/main.7031.0006d03534b6c188b178.js.map +1 -0
  117. lino_react/react/static/react/main.711.90597fd8540926524aee.js +2 -0
  118. lino_react/react/static/react/main.711.90597fd8540926524aee.js.map +1 -0
  119. lino_react/react/static/react/main.7236.331400feb5dcbee537bd.js +3 -0
  120. lino_react/react/static/react/main.7236.331400feb5dcbee537bd.js.LICENSE.txt +19 -0
  121. lino_react/react/static/react/main.7236.331400feb5dcbee537bd.js.map +1 -0
  122. lino_react/react/static/react/main.AppCSS.76a3a3129d29673a42d8.js +2 -0
  123. lino_react/react/static/react/main.AppCSS.76a3a3129d29673a42d8.js.map +1 -0
  124. lino_react/react/static/react/main.AutoComplete_LinoToolbar.0380eeffa603bcbffbe7.js +2 -0
  125. lino_react/react/static/react/main.AutoComplete_LinoToolbar.0380eeffa603bcbffbe7.js.map +1 -0
  126. lino_react/react/static/react/main.DashboardItems_SiteContext.eb3655a7c24eca38f375.js +2 -0
  127. lino_react/react/static/react/main.DashboardItems_SiteContext.eb3655a7c24eca38f375.js.map +1 -0
  128. lino_react/react/static/react/main.LinoBody_SiteContext.e7c0abb187fde3a7908f.js +2 -0
  129. lino_react/react/static/react/main.LinoBody_SiteContext.e7c0abb187fde3a7908f.js.map +1 -0
  130. lino_react/react/static/react/main.LinoComponents_LinoDetail.2cfe16da4926e14ad8b5.js +2 -0
  131. lino_react/react/static/react/main.LinoComponents_LinoDetail.2cfe16da4926e14ad8b5.js.map +1 -0
  132. lino_react/react/static/react/main.LinoToolbar_LinoComponents.aba36903345ef1c963d5.js +2 -0
  133. lino_react/react/static/react/main.LinoToolbar_LinoComponents.aba36903345ef1c963d5.js.map +1 -0
  134. lino_react/react/static/react/main.LinoWebCam_LinoDialog.864ed061cdf8e146f737.js +2 -0
  135. lino_react/react/static/react/main.LinoWebCam_LinoDialog.864ed061cdf8e146f737.js.map +1 -0
  136. lino_react/react/static/react/main.NavigationControl_App.71e05fb9d3f958420dcc.js +2 -0
  137. lino_react/react/static/react/main.NavigationControl_App.71e05fb9d3f958420dcc.js.map +1 -0
  138. lino_react/react/static/react/main.SiteContext_App.d3fef7f50a2498d7ed06.js +2 -0
  139. lino_react/react/static/react/main.SiteContext_App.d3fef7f50a2498d7ed06.js.map +1 -0
  140. lino_react/react/static/react/main.datetime_GridElement.82e594cad82a564ecb5b.js +2 -0
  141. lino_react/react/static/react/main.datetime_GridElement.82e594cad82a564ecb5b.js.map +1 -0
  142. lino_react/react/static/react/main.i18n_App.721fb060bb9a171f4b63.js +2 -0
  143. lino_react/react/static/react/main.i18n_App.721fb060bb9a171f4b63.js.map +1 -0
  144. lino_react/react/static/react/main.lodash_LinoBbar.c3ea083500b68bf428ee.js +3 -0
  145. lino_react/react/static/react/main.lodash_LinoBbar.c3ea083500b68bf428ee.js.LICENSE.txt +8 -0
  146. lino_react/react/static/react/main.lodash_LinoBbar.c3ea083500b68bf428ee.js.map +1 -0
  147. lino_react/react/static/react/main.prAppRequire.86f0f1dff64fefe5627c.js +2 -0
  148. lino_react/react/static/react/main.prAppRequire.86f0f1dff64fefe5627c.js.map +1 -0
  149. lino_react/react/static/react/main.prButton_App.2b9c3212bfa2ea814419.js +2 -0
  150. lino_react/react/static/react/main.prButton_App.2b9c3212bfa2ea814419.js.map +1 -0
  151. lino_react/react/static/react/main.prCalendar_datetime.fbe701e8156bb7871ece.js +2 -0
  152. lino_react/react/static/react/main.prCalendar_datetime.fbe701e8156bb7871ece.js.map +1 -0
  153. lino_react/react/static/react/main.prCard_LinoDataView.711c333b9152c3574045.js +2 -0
  154. lino_react/react/static/react/main.prCard_LinoDataView.711c333b9152c3574045.js.map +1 -0
  155. lino_react/react/static/react/main.prCheckbox_LinoComponents.edd78d27958aa4fa7f05.js +2 -0
  156. lino_react/react/static/react/main.prCheckbox_LinoComponents.edd78d27958aa4fa7f05.js.map +1 -0
  157. lino_react/react/static/react/main.prDataTable_GridElement.fc38d469f948e234ef2f.js +2 -0
  158. lino_react/react/static/react/main.prDataTable_GridElement.fc38d469f948e234ef2f.js.map +1 -0
  159. lino_react/react/static/react/main.prDataView_LinoDataView.498f16e027b1ef684a83.js +2 -0
  160. lino_react/react/static/react/main.prDataView_LinoDataView.498f16e027b1ef684a83.js.map +1 -0
  161. lino_react/react/static/react/main.prDialog_LinoDialog.b4964b2a322aebf3153a.js +2 -0
  162. lino_react/react/static/react/main.prDialog_LinoDialog.b4964b2a322aebf3153a.js.map +1 -0
  163. lino_react/react/static/react/main.prDialog_LinoEditor.26ccf685fbaddf9720f9.js +2 -0
  164. lino_react/react/static/react/main.prDialog_LinoEditor.26ccf685fbaddf9720f9.js.map +1 -0
  165. lino_react/react/static/react/main.prDropDown_LinoPaginator.1e2dc120a4093569db04.js +2 -0
  166. lino_react/react/static/react/main.prDropDown_LinoPaginator.1e2dc120a4093569db04.js.map +1 -0
  167. lino_react/react/static/react/main.prFieldset_LinoComponents.832c0eb3a21cfbb7c696.js +2 -0
  168. lino_react/react/static/react/main.prFieldset_LinoComponents.832c0eb3a21cfbb7c696.js.map +1 -0
  169. lino_react/react/static/react/main.prFileUpload_LinoComponents.06838c6a87f934bffd2d.js +2 -0
  170. lino_react/react/static/react/main.prFileUpload_LinoComponents.06838c6a87f934bffd2d.js.map +1 -0
  171. lino_react/react/static/react/main.prFlex_AppCSS.af05d1a6fd85d1fb9b8c.js +2 -0
  172. lino_react/react/static/react/main.prFlex_AppCSS.af05d1a6fd85d1fb9b8c.js.map +1 -0
  173. lino_react/react/static/react/main.prGalleria_LinoDataView.f47d707fb395fdf8e896.js +2 -0
  174. lino_react/react/static/react/main.prGalleria_LinoDataView.f47d707fb395fdf8e896.js.map +1 -0
  175. lino_react/react/static/react/main.prInputNumber_GridElement.53ab36b3f6705ca23dc8.js +2 -0
  176. lino_react/react/static/react/main.prInputNumber_GridElement.53ab36b3f6705ca23dc8.js.map +1 -0
  177. lino_react/react/static/react/main.prInputText_GridElement.e5d133a78f0f86d3347c.js +2 -0
  178. lino_react/react/static/react/main.prInputText_GridElement.e5d133a78f0f86d3347c.js.map +1 -0
  179. lino_react/react/static/react/main.prLinoBodyRequire.084fa4036bd106262709.js +2 -0
  180. lino_react/react/static/react/main.prLinoBodyRequire.084fa4036bd106262709.js.map +1 -0
  181. lino_react/react/static/react/main.prLinoBodyRequireChunk2.a91aa1dbfb6c335aa27c.js +2 -0
  182. lino_react/react/static/react/main.prLinoBodyRequireChunk2.a91aa1dbfb6c335aa27c.js.map +1 -0
  183. lino_react/react/static/react/main.prLinoComponentsRequire.de9d155adb67b89d97b3.js +2 -0
  184. lino_react/react/static/react/main.prLinoComponentsRequire.de9d155adb67b89d97b3.js.map +1 -0
  185. lino_react/react/static/react/main.prMultiSelect_GridElement.6f79423a4955fb598fd1.js +2 -0
  186. lino_react/react/static/react/main.prMultiSelect_GridElement.6f79423a4955fb598fd1.js.map +1 -0
  187. lino_react/react/static/react/main.prOverlayPanel_GridElement.4d9a2e71e76aa64641d4.js +2 -0
  188. lino_react/react/static/react/main.prOverlayPanel_GridElement.4d9a2e71e76aa64641d4.js.map +1 -0
  189. lino_react/react/static/react/main.prPaginator_LinoPaginator.2a9729760680751de84b.js +2 -0
  190. lino_react/react/static/react/main.prPaginator_LinoPaginator.2a9729760680751de84b.js.map +1 -0
  191. lino_react/react/static/react/main.prPanel_LinoComponents.48a90e6e59987b8d417a.js +2 -0
  192. lino_react/react/static/react/main.prPanel_LinoComponents.48a90e6e59987b8d417a.js.map +1 -0
  193. lino_react/react/static/react/main.prPassword_LinoComponents.132d976ac17731cee798.js +2 -0
  194. lino_react/react/static/react/main.prPassword_LinoComponents.132d976ac17731cee798.js.map +1 -0
  195. lino_react/react/static/react/main.prRhea_AppCSS.9eec661d43988198b534.js +2 -0
  196. lino_react/react/static/react/main.prRhea_AppCSS.9eec661d43988198b534.js.map +1 -0
  197. lino_react/react/static/react/main.prSelectButton_GridElement.515250a432fb612e463f.js +2 -0
  198. lino_react/react/static/react/main.prSelectButton_GridElement.515250a432fb612e463f.js.map +1 -0
  199. lino_react/react/static/react/main.prSiteContextRequire.9ec4c82c77903d0a38fb.js +2 -0
  200. lino_react/react/static/react/main.prSiteContextRequire.9ec4c82c77903d0a38fb.js.map +1 -0
  201. lino_react/react/static/react/main.prSplitButton_LinoBbar.82050e3a2afc392ec7d4.js +2 -0
  202. lino_react/react/static/react/main.prSplitButton_LinoBbar.82050e3a2afc392ec7d4.js.map +1 -0
  203. lino_react/react/static/react/main.prTabView_LinoComponents.9b475aade60d991dd309.js +2 -0
  204. lino_react/react/static/react/main.prTabView_LinoComponents.9b475aade60d991dd309.js.map +1 -0
  205. lino_react/react/static/react/main.prToast_App.d9fbac1515513b0ee31b.js +2 -0
  206. lino_react/react/static/react/main.prToast_App.d9fbac1515513b0ee31b.js.map +1 -0
  207. lino_react/react/static/react/main.prToggleButton_LinoToolbar.b36b36ba92d4837cc0d4.js +2 -0
  208. lino_react/react/static/react/main.prToggleButton_LinoToolbar.b36b36ba92d4837cc0d4.js.map +1 -0
  209. lino_react/react/static/react/main.prTriStateCheckbox_GridElement.4904979154a24d836c85.js +2 -0
  210. lino_react/react/static/react/main.prTriStateCheckbox_GridElement.4904979154a24d836c85.js.map +1 -0
  211. lino_react/react/static/react/main.queryString_App.1df0f8f3de20b5c16c21.js +2 -0
  212. lino_react/react/static/react/main.queryString_App.1df0f8f3de20b5c16c21.js.map +1 -0
  213. lino_react/react/static/react/main.quill.e365e7ab68c2f28b2037.js +2 -0
  214. lino_react/react/static/react/main.quill.e365e7ab68c2f28b2037.js.map +1 -0
  215. lino_react/react/static/react/main.reactDom_App.67ee00ac5f328a35045c.js +2 -0
  216. lino_react/react/static/react/main.reactDom_App.67ee00ac5f328a35045c.js.map +1 -0
  217. lino_react/react/static/react/main.reactI18n_SiteContext.00fdaddd40eff5115340.js +2 -0
  218. lino_react/react/static/react/main.reactI18n_SiteContext.00fdaddd40eff5115340.js.map +1 -0
  219. lino_react/react/static/react/main.reactRouterDom_App.ce1fb39384f58d88934a.js +3 -0
  220. lino_react/react/static/react/main.reactRouterDom_App.ce1fb39384f58d88934a.js.LICENSE.txt +21 -0
  221. lino_react/react/static/react/main.reactRouterDom_App.ce1fb39384f58d88934a.js.map +1 -0
  222. lino_react/react/static/react/main.runtime.91f1e002eee7924af2f1.js +2 -0
  223. lino_react/react/static/react/main.runtime.91f1e002eee7924af2f1.js.map +1 -0
  224. lino_react/react/static/react/main.tpdep.e475da1ae17c0f260543.js +3 -0
  225. lino_react/react/static/react/main.tpdep.e475da1ae17c0f260543.js.LICENSE.txt +20 -0
  226. lino_react/react/static/react/main.tpdep.e475da1ae17c0f260543.js.map +1 -0
  227. lino_react/react/testSetup/setupJEST.js +24 -0
  228. lino_react/react/testSetup/setupTests.ts +114 -0
  229. lino_react/react/testSetup/teardownJEST.js +13 -0
  230. lino_react/react/testSetup/testEnvironment.js +37 -0
  231. lino_react/react/views.py +789 -0
  232. lino_react/translations/i18n-scan.js +24 -0
  233. lino_react-25.1.2.dist-info/METADATA +704 -0
  234. lino_react-25.1.2.dist-info/RECORD +236 -0
  235. lino_react-25.1.2.dist-info/WHEEL +4 -0
  236. lino_react-25.1.2.dist-info/licenses/COPYING +661 -0
lino_react/__init__.py ADDED
@@ -0,0 +1,11 @@
1
+ # -*- coding: UTF-8 -*-
2
+ # Copyright 2018-2024 Rumma & Ko Ltd
3
+ # License: GNU Affero General Public License v3 (see file COPYING for details)
4
+ # Source documentation see https://react.lino-framework.org/dev
5
+
6
+ __version__ = '25.1.2'
7
+
8
+ srcref_url = 'https://gitlab.com/lino-framework/react/blob/master/%s'
9
+ # doc_trees = []
10
+ # intersphinx_urls = dict(docs="https://lino-framework.gitlab.io/react/")
11
+ intersphinx_urls = dict(docs="https://react.lino-framework.org/")
@@ -0,0 +1,130 @@
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
+ # Source documentation see https://react.lino-framework.org/dev
5
+
6
+
7
+ from django.utils import translation
8
+ from lino.core import constants
9
+ from lino.api.ad import Plugin
10
+
11
+
12
+ class Plugin(Plugin):
13
+ # ui_label = _("React")
14
+ ui_handle_attr_name = 'react_handle'
15
+
16
+ # needs_plugins = ['lino.modlib.jinja', 'lino.modlib.memo']
17
+ # needs_plugins = ['lino.modlib.system', 'lino.modlib.jinja']
18
+ needs_plugins = ['lino.modlib.jinja']
19
+ # disables_plugins = ['tinymce', 'extensible']
20
+
21
+ url_prefix = 'react'
22
+
23
+ media_name = 'react'
24
+ support_async = True
25
+ top_paginator = True
26
+
27
+ # resizable_panel = False
28
+ resizable_panel = True
29
+
30
+ # media_base_url = "http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/"
31
+
32
+ def on_ui_init(self, kernel):
33
+ from .renderer import Renderer
34
+ self.renderer = Renderer(self)
35
+ # ui.bs3_renderer = self.renderer
36
+ # removed 20230613 kernel.extjs_renderer = self.renderer
37
+
38
+ def load_site_js_snippets(self, settings):
39
+ context = dict(
40
+ extjs_renderer=self.renderer,
41
+ site=self.site,
42
+ settings=settings,
43
+ lino=self.site.plugins.lino,
44
+ language=translation.get_language(),
45
+ constants=constants,
46
+ extjs=None, # 20230613 used in sepa/config/iban/uppercasetextfield.js
47
+ )
48
+
49
+ js = ""
50
+ env = self.site.plugins.jinja.renderer.jinja_env
51
+
52
+ for p in self.site.sorted_plugins:
53
+ for snippet in p.site_js_snippets:
54
+ template = env.get_template(snippet)
55
+ js += f"<script>{template.render(**context)}</script>"
56
+
57
+ return js
58
+
59
+ def get_patterns(self):
60
+ # this is called once after startup.
61
+ # print("20221102 get_patterns()")
62
+ from django.urls import re_path as url
63
+ from django.urls import path
64
+ from . import views
65
+
66
+ rx = '^'
67
+
68
+ # if self.site.developer_site_cache:
69
+ # self.renderer.build_site_cache()
70
+
71
+ urls = [
72
+ url(rx + r'$', views.Index.as_view()),
73
+ url(rx + r'user/settings', views.UserSettings.as_view()),
74
+ url(rx + r'auth$', views.Authenticate.as_view()),
75
+ url(rx + r"null/", views.Null.as_view()),
76
+
77
+ url(rx + r'(?P<workbox>workbox-[a-zA-Z0-9]*.js)$',
78
+ views.WBView.as_view()),
79
+ url(r'service-worker.js', views.SWView.as_view()),
80
+
81
+ url(rx + r'api/main_html$', views.MainHtml.as_view()),
82
+
83
+ path('dashboard/<int:index>', views.DashboardItem.as_view()),
84
+
85
+ # To be fased out
86
+ url(rx + r'restful/(?P<app_label>\w+)/(?P<actor>\w+)$',
87
+ views.ApiList.as_view()),
88
+ url(rx + r'restful/(?P<app_label>\w+)/(?P<actor>\w+)/(?P<pk>.+)$',
89
+ views.ApiElement.as_view()),
90
+ # From extjs
91
+ url(rx + r'api/(?P<app_label>\w+)/(?P<actor>\w+)$',
92
+ views.ApiList.as_view()),
93
+ url(rx + r'api/(?P<app_label>\w+)/(?P<actor>\w+)/(?P<pk>[^/]+)$',
94
+ views.ApiElement.as_view()),
95
+ # url(rx + r'api/(?P<app_label>\w+)/(?P<actor>\w+)/(?P<pk>[^/]+)/(?P<field>\w+)/suggestions$',
96
+ # views.Suggestions.as_view()),
97
+ url(rx + r'values/(?P<app_label>\w+)/(?P<actor>\w+)/(?P<pk>.+)/(?P<field>.+)$',
98
+ views.DelayedValue.as_view()),
99
+ url(rx + r'choices/(?P<app_label>\w+)/(?P<actor>\w+)$',
100
+ views.Choices.as_view()),
101
+ url(rx + r'choices/(?P<app_label>\w+)/(?P<actor>\w+)/'
102
+ '(?P<field>\w+)$',
103
+ views.Choices.as_view()),
104
+ url(rx + r'apchoices/(?P<app_label>\w+)/(?P<actor>\w+)/'
105
+ '(?P<an>\w+)/(?P<field>\w+)$',
106
+ views.ActionParamChoices.as_view()),
107
+ # For generating views
108
+ # url(rx + r'callbacks/(?P<thread_id>[\-0-9a-zA-Z]+)/'
109
+ # '(?P<button_id>\w+)$',
110
+ # views.Callbacks.as_view()),
111
+ #
112
+ url(rx+ r'choicelists/',
113
+ views.ChoiceListModel.as_view()),
114
+
115
+ ]
116
+ return urls
117
+
118
+ def get_detail_url(self, ar, actor, pk, *args, **kw):
119
+ return self.build_plain_url(
120
+ "#",
121
+ "api",
122
+ actor.actor_id.replace(".", "/"),
123
+ str(pk), *args, **kw)
124
+
125
+ def get_used_libs(self, html=False):
126
+ if html is not None:
127
+ yield ("React", '18.3.1', "https://reactjs.org/")
128
+
129
+ def get_requirements(self, site):
130
+ yield 'lino_react'