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.
- lino_react/__init__.py +11 -0
- lino_react/react/__init__.py +130 -0
- lino_react/react/components/ActionHandler.tsx +943 -0
- lino_react/react/components/App.css +36 -0
- lino_react/react/components/App.jsx +679 -0
- lino_react/react/components/AppCSS.js +14 -0
- lino_react/react/components/AppInlineProfile.jsx +224 -0
- lino_react/react/components/AppMenu.css +9 -0
- lino_react/react/components/AppMenu.jsx +377 -0
- lino_react/react/components/AppTopBar.css +5 -0
- lino_react/react/components/AppTopbar.jsx +85 -0
- lino_react/react/components/AutoComplete.tsx +271 -0
- lino_react/react/components/Base.ts +209 -0
- lino_react/react/components/DashboardItems.jsx +111 -0
- lino_react/react/components/DataProvider.jsx +115 -0
- lino_react/react/components/ForeignKeyElement.jsx +155 -0
- lino_react/react/components/GridElement.css +44 -0
- lino_react/react/components/GridElement.jsx +792 -0
- lino_react/react/components/LinoBbar.css +44 -0
- lino_react/react/components/LinoBbar.jsx +165 -0
- lino_react/react/components/LinoBody.css +74 -0
- lino_react/react/components/LinoBody.jsx +349 -0
- lino_react/react/components/LinoChatter/ConversationList.css +4 -0
- lino_react/react/components/LinoChatter/ConversationListItem.css +31 -0
- lino_react/react/components/LinoChatter/Conversations.css +6 -0
- lino_react/react/components/LinoChatter/GroupChatChooser.js +63 -0
- lino_react/react/components/LinoChatter/LinoChats.js +150 -0
- lino_react/react/components/LinoChatter/LinoChatter.js +246 -0
- lino_react/react/components/LinoChatter/Messenger.css +38 -0
- lino_react/react/components/LinoComponentUtils.jsx +499 -0
- lino_react/react/components/LinoComponents.css +10 -0
- lino_react/react/components/LinoComponents.jsx +643 -0
- lino_react/react/components/LinoDataView.css +4 -0
- lino_react/react/components/LinoDataView.jsx +147 -0
- lino_react/react/components/LinoDetail.jsx +97 -0
- lino_react/react/components/LinoDialog.jsx +475 -0
- lino_react/react/components/LinoEditor.jsx +66 -0
- lino_react/react/components/LinoPaginator.jsx +72 -0
- lino_react/react/components/LinoParamsPanel.jsx +27 -0
- lino_react/react/components/LinoToolbar.css +11 -0
- lino_react/react/components/LinoToolbar.jsx +422 -0
- lino_react/react/components/LinoUtils.js +116 -0
- lino_react/react/components/LinoWebCam.tsx +241 -0
- lino_react/react/components/LoadingMask.jsx +90 -0
- lino_react/react/components/NavigationControl.js +814 -0
- lino_react/react/components/SiteContext.jsx +371 -0
- lino_react/react/components/TODOS.txt +5 -0
- lino_react/react/components/TextFieldElement.css +27 -0
- lino_react/react/components/TextFieldElement.jsx +192 -0
- lino_react/react/components/__tests__/cloneUI.ts +57 -0
- lino_react/react/components/__tests__/integrity.ts +28 -0
- lino_react/react/components/__tests__/testParamChanges.ts +46 -0
- lino_react/react/components/constants.js +132 -0
- lino_react/react/components/current_commit_msg.txt +0 -0
- lino_react/react/components/custom-service-worker.js +72 -0
- lino_react/react/components/custom_hooks.js +18 -0
- lino_react/react/components/datetime.jsx +159 -0
- lino_react/react/components/i18n.js +53 -0
- lino_react/react/components/index.html +67 -0
- lino_react/react/components/layout/layout.css +1882 -0
- lino_react/react/components/layout/layout.scss +48 -0
- lino_react/react/components/layout/sass/_calander.scss +137 -0
- lino_react/react/components/layout/sass/_dashboard.scss +206 -0
- lino_react/react/components/layout/sass/_editor.scss +797 -0
- lino_react/react/components/layout/sass/_layout.scss +7 -0
- lino_react/react/components/layout/sass/_main.scss +1066 -0
- lino_react/react/components/layout/sass/_mixins.scss +120 -0
- lino_react/react/components/layout/sass/_splash.scss +52 -0
- lino_react/react/components/layout/sass/_utils.scss +38 -0
- lino_react/react/components/preprocessors.ts +21 -0
- lino_react/react/components/quillmodules.jsx +171 -0
- lino_react/react/components/serviceWorker.js +135 -0
- lino_react/react/components/types.ts +281 -0
- lino_react/react/config/react/linoweb.json +0 -0
- lino_react/react/config/react/main.html +74 -0
- lino_react/react/config/react/service-worker.js +2 -0
- lino_react/react/config/react/service-worker.js.LICENSE.txt +1 -0
- lino_react/react/config/react/service-worker.js.map +1 -0
- lino_react/react/icons.py +230 -0
- lino_react/react/index.js +1 -0
- lino_react/react/models.py +0 -0
- lino_react/react/renderer.py +756 -0
- lino_react/react/sphinxconf.py +4 -0
- lino_react/react/static/media/javascript,__webpack_public_path__ = __webpack_base_uri__ = htmlWebpackPluginPublicPath;.1feff74f.bin +1 -0
- lino_react/react/static/media/primeicons.6ed59f96.svg +345 -0
- lino_react/react/static/media/primeicons.e1441b13.svg +292 -0
- lino_react/react/static/react/024b32cc7bf399b1a847.woff2 +0 -0
- lino_react/react/static/react/8931fda1930c3bd21e96.woff +0 -0
- lino_react/react/static/react/a5c2a53d1ff7a9ff5933.ttf +0 -0
- lino_react/react/static/react/af84cba1cef5b79f2489.svg +1 -0
- lino_react/react/static/react/ff0c4cd79b2ffca2de54.eot +0 -0
- lino_react/react/static/react/locales/bn/translation.json +53 -0
- lino_react/react/static/react/locales/de/translation.json +53 -0
- lino_react/react/static/react/locales/en/translation.json +53 -0
- lino_react/react/static/react/locales/et/translation.json +53 -0
- lino_react/react/static/react/locales/fr/translation.json +53 -0
- lino_react/react/static/react/main.2395.9f33b89eeeec9b03d310.js +2 -0
- lino_react/react/static/react/main.2395.9f33b89eeeec9b03d310.js.map +1 -0
- lino_react/react/static/react/main.2617.c9388796830b15988918.js +2 -0
- lino_react/react/static/react/main.2617.c9388796830b15988918.js.map +1 -0
- lino_react/react/static/react/main.3454.1228f6e94e7cba08e0e7.js +2 -0
- lino_react/react/static/react/main.3454.1228f6e94e7cba08e0e7.js.map +1 -0
- lino_react/react/static/react/main.4292.f642ad07f7cf4ed64d6f.js +2 -0
- lino_react/react/static/react/main.4292.f642ad07f7cf4ed64d6f.js.map +1 -0
- lino_react/react/static/react/main.4600.25d1bd59e81c3e7d5e13.js +2 -0
- lino_react/react/static/react/main.4600.25d1bd59e81c3e7d5e13.js.map +1 -0
- lino_react/react/static/react/main.4703.2d782c4563e671b153e9.js +3 -0
- lino_react/react/static/react/main.4703.2d782c4563e671b153e9.js.LICENSE.txt +13 -0
- lino_react/react/static/react/main.4703.2d782c4563e671b153e9.js.map +1 -0
- lino_react/react/static/react/main.51d394fd7f8a978d5ad9.js +3 -0
- lino_react/react/static/react/main.51d394fd7f8a978d5ad9.js.LICENSE.txt +19 -0
- lino_react/react/static/react/main.51d394fd7f8a978d5ad9.js.map +1 -0
- lino_react/react/static/react/main.644.6034fffa4ccfff36e563.js +2 -0
- lino_react/react/static/react/main.644.6034fffa4ccfff36e563.js.map +1 -0
- lino_react/react/static/react/main.7031.0006d03534b6c188b178.js +2 -0
- lino_react/react/static/react/main.7031.0006d03534b6c188b178.js.map +1 -0
- lino_react/react/static/react/main.711.90597fd8540926524aee.js +2 -0
- lino_react/react/static/react/main.711.90597fd8540926524aee.js.map +1 -0
- lino_react/react/static/react/main.7236.331400feb5dcbee537bd.js +3 -0
- lino_react/react/static/react/main.7236.331400feb5dcbee537bd.js.LICENSE.txt +19 -0
- lino_react/react/static/react/main.7236.331400feb5dcbee537bd.js.map +1 -0
- lino_react/react/static/react/main.AppCSS.76a3a3129d29673a42d8.js +2 -0
- lino_react/react/static/react/main.AppCSS.76a3a3129d29673a42d8.js.map +1 -0
- lino_react/react/static/react/main.AutoComplete_LinoToolbar.0380eeffa603bcbffbe7.js +2 -0
- lino_react/react/static/react/main.AutoComplete_LinoToolbar.0380eeffa603bcbffbe7.js.map +1 -0
- lino_react/react/static/react/main.DashboardItems_SiteContext.eb3655a7c24eca38f375.js +2 -0
- lino_react/react/static/react/main.DashboardItems_SiteContext.eb3655a7c24eca38f375.js.map +1 -0
- lino_react/react/static/react/main.LinoBody_SiteContext.e7c0abb187fde3a7908f.js +2 -0
- lino_react/react/static/react/main.LinoBody_SiteContext.e7c0abb187fde3a7908f.js.map +1 -0
- lino_react/react/static/react/main.LinoComponents_LinoDetail.2cfe16da4926e14ad8b5.js +2 -0
- lino_react/react/static/react/main.LinoComponents_LinoDetail.2cfe16da4926e14ad8b5.js.map +1 -0
- lino_react/react/static/react/main.LinoToolbar_LinoComponents.aba36903345ef1c963d5.js +2 -0
- lino_react/react/static/react/main.LinoToolbar_LinoComponents.aba36903345ef1c963d5.js.map +1 -0
- lino_react/react/static/react/main.LinoWebCam_LinoDialog.864ed061cdf8e146f737.js +2 -0
- lino_react/react/static/react/main.LinoWebCam_LinoDialog.864ed061cdf8e146f737.js.map +1 -0
- lino_react/react/static/react/main.NavigationControl_App.71e05fb9d3f958420dcc.js +2 -0
- lino_react/react/static/react/main.NavigationControl_App.71e05fb9d3f958420dcc.js.map +1 -0
- lino_react/react/static/react/main.SiteContext_App.d3fef7f50a2498d7ed06.js +2 -0
- lino_react/react/static/react/main.SiteContext_App.d3fef7f50a2498d7ed06.js.map +1 -0
- lino_react/react/static/react/main.datetime_GridElement.82e594cad82a564ecb5b.js +2 -0
- lino_react/react/static/react/main.datetime_GridElement.82e594cad82a564ecb5b.js.map +1 -0
- lino_react/react/static/react/main.i18n_App.721fb060bb9a171f4b63.js +2 -0
- lino_react/react/static/react/main.i18n_App.721fb060bb9a171f4b63.js.map +1 -0
- lino_react/react/static/react/main.lodash_LinoBbar.c3ea083500b68bf428ee.js +3 -0
- lino_react/react/static/react/main.lodash_LinoBbar.c3ea083500b68bf428ee.js.LICENSE.txt +8 -0
- lino_react/react/static/react/main.lodash_LinoBbar.c3ea083500b68bf428ee.js.map +1 -0
- lino_react/react/static/react/main.prAppRequire.86f0f1dff64fefe5627c.js +2 -0
- lino_react/react/static/react/main.prAppRequire.86f0f1dff64fefe5627c.js.map +1 -0
- lino_react/react/static/react/main.prButton_App.2b9c3212bfa2ea814419.js +2 -0
- lino_react/react/static/react/main.prButton_App.2b9c3212bfa2ea814419.js.map +1 -0
- lino_react/react/static/react/main.prCalendar_datetime.fbe701e8156bb7871ece.js +2 -0
- lino_react/react/static/react/main.prCalendar_datetime.fbe701e8156bb7871ece.js.map +1 -0
- lino_react/react/static/react/main.prCard_LinoDataView.711c333b9152c3574045.js +2 -0
- lino_react/react/static/react/main.prCard_LinoDataView.711c333b9152c3574045.js.map +1 -0
- lino_react/react/static/react/main.prCheckbox_LinoComponents.edd78d27958aa4fa7f05.js +2 -0
- lino_react/react/static/react/main.prCheckbox_LinoComponents.edd78d27958aa4fa7f05.js.map +1 -0
- lino_react/react/static/react/main.prDataTable_GridElement.fc38d469f948e234ef2f.js +2 -0
- lino_react/react/static/react/main.prDataTable_GridElement.fc38d469f948e234ef2f.js.map +1 -0
- lino_react/react/static/react/main.prDataView_LinoDataView.498f16e027b1ef684a83.js +2 -0
- lino_react/react/static/react/main.prDataView_LinoDataView.498f16e027b1ef684a83.js.map +1 -0
- lino_react/react/static/react/main.prDialog_LinoDialog.b4964b2a322aebf3153a.js +2 -0
- lino_react/react/static/react/main.prDialog_LinoDialog.b4964b2a322aebf3153a.js.map +1 -0
- lino_react/react/static/react/main.prDialog_LinoEditor.26ccf685fbaddf9720f9.js +2 -0
- lino_react/react/static/react/main.prDialog_LinoEditor.26ccf685fbaddf9720f9.js.map +1 -0
- lino_react/react/static/react/main.prDropDown_LinoPaginator.1e2dc120a4093569db04.js +2 -0
- lino_react/react/static/react/main.prDropDown_LinoPaginator.1e2dc120a4093569db04.js.map +1 -0
- lino_react/react/static/react/main.prFieldset_LinoComponents.832c0eb3a21cfbb7c696.js +2 -0
- lino_react/react/static/react/main.prFieldset_LinoComponents.832c0eb3a21cfbb7c696.js.map +1 -0
- lino_react/react/static/react/main.prFileUpload_LinoComponents.06838c6a87f934bffd2d.js +2 -0
- lino_react/react/static/react/main.prFileUpload_LinoComponents.06838c6a87f934bffd2d.js.map +1 -0
- lino_react/react/static/react/main.prFlex_AppCSS.af05d1a6fd85d1fb9b8c.js +2 -0
- lino_react/react/static/react/main.prFlex_AppCSS.af05d1a6fd85d1fb9b8c.js.map +1 -0
- lino_react/react/static/react/main.prGalleria_LinoDataView.f47d707fb395fdf8e896.js +2 -0
- lino_react/react/static/react/main.prGalleria_LinoDataView.f47d707fb395fdf8e896.js.map +1 -0
- lino_react/react/static/react/main.prInputNumber_GridElement.53ab36b3f6705ca23dc8.js +2 -0
- lino_react/react/static/react/main.prInputNumber_GridElement.53ab36b3f6705ca23dc8.js.map +1 -0
- lino_react/react/static/react/main.prInputText_GridElement.e5d133a78f0f86d3347c.js +2 -0
- lino_react/react/static/react/main.prInputText_GridElement.e5d133a78f0f86d3347c.js.map +1 -0
- lino_react/react/static/react/main.prLinoBodyRequire.084fa4036bd106262709.js +2 -0
- lino_react/react/static/react/main.prLinoBodyRequire.084fa4036bd106262709.js.map +1 -0
- lino_react/react/static/react/main.prLinoBodyRequireChunk2.a91aa1dbfb6c335aa27c.js +2 -0
- lino_react/react/static/react/main.prLinoBodyRequireChunk2.a91aa1dbfb6c335aa27c.js.map +1 -0
- lino_react/react/static/react/main.prLinoComponentsRequire.de9d155adb67b89d97b3.js +2 -0
- lino_react/react/static/react/main.prLinoComponentsRequire.de9d155adb67b89d97b3.js.map +1 -0
- lino_react/react/static/react/main.prMultiSelect_GridElement.6f79423a4955fb598fd1.js +2 -0
- lino_react/react/static/react/main.prMultiSelect_GridElement.6f79423a4955fb598fd1.js.map +1 -0
- lino_react/react/static/react/main.prOverlayPanel_GridElement.4d9a2e71e76aa64641d4.js +2 -0
- lino_react/react/static/react/main.prOverlayPanel_GridElement.4d9a2e71e76aa64641d4.js.map +1 -0
- lino_react/react/static/react/main.prPaginator_LinoPaginator.2a9729760680751de84b.js +2 -0
- lino_react/react/static/react/main.prPaginator_LinoPaginator.2a9729760680751de84b.js.map +1 -0
- lino_react/react/static/react/main.prPanel_LinoComponents.48a90e6e59987b8d417a.js +2 -0
- lino_react/react/static/react/main.prPanel_LinoComponents.48a90e6e59987b8d417a.js.map +1 -0
- lino_react/react/static/react/main.prPassword_LinoComponents.132d976ac17731cee798.js +2 -0
- lino_react/react/static/react/main.prPassword_LinoComponents.132d976ac17731cee798.js.map +1 -0
- lino_react/react/static/react/main.prRhea_AppCSS.9eec661d43988198b534.js +2 -0
- lino_react/react/static/react/main.prRhea_AppCSS.9eec661d43988198b534.js.map +1 -0
- lino_react/react/static/react/main.prSelectButton_GridElement.515250a432fb612e463f.js +2 -0
- lino_react/react/static/react/main.prSelectButton_GridElement.515250a432fb612e463f.js.map +1 -0
- lino_react/react/static/react/main.prSiteContextRequire.9ec4c82c77903d0a38fb.js +2 -0
- lino_react/react/static/react/main.prSiteContextRequire.9ec4c82c77903d0a38fb.js.map +1 -0
- lino_react/react/static/react/main.prSplitButton_LinoBbar.82050e3a2afc392ec7d4.js +2 -0
- lino_react/react/static/react/main.prSplitButton_LinoBbar.82050e3a2afc392ec7d4.js.map +1 -0
- lino_react/react/static/react/main.prTabView_LinoComponents.9b475aade60d991dd309.js +2 -0
- lino_react/react/static/react/main.prTabView_LinoComponents.9b475aade60d991dd309.js.map +1 -0
- lino_react/react/static/react/main.prToast_App.d9fbac1515513b0ee31b.js +2 -0
- lino_react/react/static/react/main.prToast_App.d9fbac1515513b0ee31b.js.map +1 -0
- lino_react/react/static/react/main.prToggleButton_LinoToolbar.b36b36ba92d4837cc0d4.js +2 -0
- lino_react/react/static/react/main.prToggleButton_LinoToolbar.b36b36ba92d4837cc0d4.js.map +1 -0
- lino_react/react/static/react/main.prTriStateCheckbox_GridElement.4904979154a24d836c85.js +2 -0
- lino_react/react/static/react/main.prTriStateCheckbox_GridElement.4904979154a24d836c85.js.map +1 -0
- lino_react/react/static/react/main.queryString_App.1df0f8f3de20b5c16c21.js +2 -0
- lino_react/react/static/react/main.queryString_App.1df0f8f3de20b5c16c21.js.map +1 -0
- lino_react/react/static/react/main.quill.e365e7ab68c2f28b2037.js +2 -0
- lino_react/react/static/react/main.quill.e365e7ab68c2f28b2037.js.map +1 -0
- lino_react/react/static/react/main.reactDom_App.67ee00ac5f328a35045c.js +2 -0
- lino_react/react/static/react/main.reactDom_App.67ee00ac5f328a35045c.js.map +1 -0
- lino_react/react/static/react/main.reactI18n_SiteContext.00fdaddd40eff5115340.js +2 -0
- lino_react/react/static/react/main.reactI18n_SiteContext.00fdaddd40eff5115340.js.map +1 -0
- lino_react/react/static/react/main.reactRouterDom_App.ce1fb39384f58d88934a.js +3 -0
- lino_react/react/static/react/main.reactRouterDom_App.ce1fb39384f58d88934a.js.LICENSE.txt +21 -0
- lino_react/react/static/react/main.reactRouterDom_App.ce1fb39384f58d88934a.js.map +1 -0
- lino_react/react/static/react/main.runtime.91f1e002eee7924af2f1.js +2 -0
- lino_react/react/static/react/main.runtime.91f1e002eee7924af2f1.js.map +1 -0
- lino_react/react/static/react/main.tpdep.e475da1ae17c0f260543.js +3 -0
- lino_react/react/static/react/main.tpdep.e475da1ae17c0f260543.js.LICENSE.txt +20 -0
- lino_react/react/static/react/main.tpdep.e475da1ae17c0f260543.js.map +1 -0
- lino_react/react/testSetup/setupJEST.js +24 -0
- lino_react/react/testSetup/setupTests.ts +114 -0
- lino_react/react/testSetup/teardownJEST.js +13 -0
- lino_react/react/testSetup/testEnvironment.js +37 -0
- lino_react/react/views.py +789 -0
- lino_react/translations/i18n-scan.js +24 -0
- lino_react-25.1.2.dist-info/METADATA +704 -0
- lino_react-25.1.2.dist-info/RECORD +236 -0
- lino_react-25.1.2.dist-info/WHEEL +4 -0
- 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'
|