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.
- lino_react/__init__.py +14 -0
- lino_react/react/__init__.py +140 -0
- lino_react/react/components/ActionHandler.tsx +928 -0
- lino_react/react/components/App.css +36 -0
- lino_react/react/components/App.jsx +675 -0
- lino_react/react/components/AppCSS.js +14 -0
- lino_react/react/components/AppInlineProfile.jsx +235 -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 +90 -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 +152 -0
- lino_react/react/components/GridElement.css +44 -0
- lino_react/react/components/GridElement.jsx +778 -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 +347 -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 +641 -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 +411 -0
- lino_react/react/components/LinoUtils.js +114 -0
- lino_react/react/components/LinoWebCam.tsx +241 -0
- lino_react/react/components/LoadingMask.jsx +90 -0
- lino_react/react/components/NavigationControl.js +798 -0
- lino_react/react/components/SiteContext.jsx +371 -0
- lino_react/react/components/TextFieldElement.css +27 -0
- lino_react/react/components/TextFieldElement.jsx +183 -0
- lino_react/react/components/__tests__/cloneUI.ts +57 -0
- lino_react/react/components/__tests__/integrity.ts +27 -0
- lino_react/react/components/constants.js +132 -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 +157 -0
- lino_react/react/components/i18n.js +53 -0
- lino_react/react/components/index.html +66 -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 +105 -0
- lino_react/react/components/serviceWorker.js +135 -0
- lino_react/react/components/setupTests.ts +64 -0
- lino_react/react/components/types.ts +280 -0
- lino_react/react/config/react/linoweb.json +0 -0
- lino_react/react/config/react/main.html +73 -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 +750 -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/main.2395.b28b68947deb01810454.js +2 -0
- lino_react/react/static/react/main.2395.b28b68947deb01810454.js.map +1 -0
- lino_react/react/static/react/main.2617.b36ca307d8c44248566e.js +2 -0
- lino_react/react/static/react/main.2617.b36ca307d8c44248566e.js.map +1 -0
- lino_react/react/static/react/main.3454.b746ac02627435c7eb8d.js +2 -0
- lino_react/react/static/react/main.3454.b746ac02627435c7eb8d.js.map +1 -0
- lino_react/react/static/react/main.4292.7a4a9bc2e6bc81784968.js +2 -0
- lino_react/react/static/react/main.4292.7a4a9bc2e6bc81784968.js.map +1 -0
- lino_react/react/static/react/main.4600.37d0f054adc839cda4a2.js +2 -0
- lino_react/react/static/react/main.4600.37d0f054adc839cda4a2.js.map +1 -0
- lino_react/react/static/react/main.4703.4cc9f3b04beb59414ac0.js +3 -0
- lino_react/react/static/react/main.4703.4cc9f3b04beb59414ac0.js.LICENSE.txt +13 -0
- lino_react/react/static/react/main.4703.4cc9f3b04beb59414ac0.js.map +1 -0
- lino_react/react/static/react/main.5636.42bd10dd42f54c458e91.js +2 -0
- lino_react/react/static/react/main.5636.42bd10dd42f54c458e91.js.map +1 -0
- lino_react/react/static/react/main.644.96472a3bf7dd1aba330c.js +2 -0
- lino_react/react/static/react/main.644.96472a3bf7dd1aba330c.js.map +1 -0
- lino_react/react/static/react/main.711.63f5d09fa4393e646ab2.js +2 -0
- lino_react/react/static/react/main.711.63f5d09fa4393e646ab2.js.map +1 -0
- lino_react/react/static/react/main.7236.ec2709cf8f468ec5db78.js +3 -0
- lino_react/react/static/react/main.7236.ec2709cf8f468ec5db78.js.LICENSE.txt +19 -0
- lino_react/react/static/react/main.7236.ec2709cf8f468ec5db78.js.map +1 -0
- lino_react/react/static/react/main.AppCSS.e5dea9a99d998b1e8e0c.js +2 -0
- lino_react/react/static/react/main.AppCSS.e5dea9a99d998b1e8e0c.js.map +1 -0
- lino_react/react/static/react/main.AutoComplete_LinoToolbar.2319b69de37e2707d8db.js +2 -0
- lino_react/react/static/react/main.AutoComplete_LinoToolbar.2319b69de37e2707d8db.js.map +1 -0
- lino_react/react/static/react/main.DashboardItems_SiteContext.c481a67fcfbbb979ad75.js +2 -0
- lino_react/react/static/react/main.DashboardItems_SiteContext.c481a67fcfbbb979ad75.js.map +1 -0
- lino_react/react/static/react/main.LinoBody_SiteContext.de245a0a03f80d3899b1.js +2 -0
- lino_react/react/static/react/main.LinoBody_SiteContext.de245a0a03f80d3899b1.js.map +1 -0
- lino_react/react/static/react/main.LinoComponents_LinoDetail.6acd0e3ccae181744860.js +2 -0
- lino_react/react/static/react/main.LinoComponents_LinoDetail.6acd0e3ccae181744860.js.map +1 -0
- lino_react/react/static/react/main.LinoToolbar_LinoComponents.a65657fe06535a107ad2.js +2 -0
- lino_react/react/static/react/main.LinoToolbar_LinoComponents.a65657fe06535a107ad2.js.map +1 -0
- lino_react/react/static/react/main.LinoWebCam_LinoDialog.0a848f8b2866f02c006c.js +2 -0
- lino_react/react/static/react/main.LinoWebCam_LinoDialog.0a848f8b2866f02c006c.js.map +1 -0
- lino_react/react/static/react/main.NavigationControl_App.020236a93cd2c9452ea3.js +2 -0
- lino_react/react/static/react/main.NavigationControl_App.020236a93cd2c9452ea3.js.map +1 -0
- lino_react/react/static/react/main.SiteContext_App.affe8e1b465480e0371d.js +2 -0
- lino_react/react/static/react/main.SiteContext_App.affe8e1b465480e0371d.js.map +1 -0
- lino_react/react/static/react/main.datetime_GridElement.32d2e12503048ce74fe4.js +2 -0
- lino_react/react/static/react/main.datetime_GridElement.32d2e12503048ce74fe4.js.map +1 -0
- lino_react/react/static/react/main.f77cd9c2b82a6eb7c43a.js +3 -0
- lino_react/react/static/react/main.f77cd9c2b82a6eb7c43a.js.LICENSE.txt +19 -0
- lino_react/react/static/react/main.f77cd9c2b82a6eb7c43a.js.map +1 -0
- lino_react/react/static/react/main.i18n_App.694f7bda2798fb7f0dca.js +2 -0
- lino_react/react/static/react/main.i18n_App.694f7bda2798fb7f0dca.js.map +1 -0
- lino_react/react/static/react/main.lodash_LinoBbar.0f3eddd8b64a57ea9b1d.js +3 -0
- lino_react/react/static/react/main.lodash_LinoBbar.0f3eddd8b64a57ea9b1d.js.LICENSE.txt +8 -0
- lino_react/react/static/react/main.lodash_LinoBbar.0f3eddd8b64a57ea9b1d.js.map +1 -0
- lino_react/react/static/react/main.prAppRequire.d83b44bcd5ed872e12b6.js +2 -0
- lino_react/react/static/react/main.prAppRequire.d83b44bcd5ed872e12b6.js.map +1 -0
- lino_react/react/static/react/main.prButton_App.0486a258c6757e2b804d.js +2 -0
- lino_react/react/static/react/main.prButton_App.0486a258c6757e2b804d.js.map +1 -0
- lino_react/react/static/react/main.prCalendar_datetime.86f6b3293edc5adf5af7.js +2 -0
- lino_react/react/static/react/main.prCalendar_datetime.86f6b3293edc5adf5af7.js.map +1 -0
- lino_react/react/static/react/main.prCard_LinoDataView.0a562a11a1715c394504.js +2 -0
- lino_react/react/static/react/main.prCard_LinoDataView.0a562a11a1715c394504.js.map +1 -0
- lino_react/react/static/react/main.prCheckbox_LinoComponents.069a1dce15a3a88291b3.js +2 -0
- lino_react/react/static/react/main.prCheckbox_LinoComponents.069a1dce15a3a88291b3.js.map +1 -0
- lino_react/react/static/react/main.prDataTable_GridElement.00ee6a2bf670152ce51d.js +2 -0
- lino_react/react/static/react/main.prDataTable_GridElement.00ee6a2bf670152ce51d.js.map +1 -0
- lino_react/react/static/react/main.prDataView_LinoDataView.39b821a246d43a45cc49.js +2 -0
- lino_react/react/static/react/main.prDataView_LinoDataView.39b821a246d43a45cc49.js.map +1 -0
- lino_react/react/static/react/main.prDialog_LinoDialog.886931e456cf153cfb9f.js +2 -0
- lino_react/react/static/react/main.prDialog_LinoDialog.886931e456cf153cfb9f.js.map +1 -0
- lino_react/react/static/react/main.prDialog_LinoEditor.8da8c5b8734d61165cd5.js +2 -0
- lino_react/react/static/react/main.prDialog_LinoEditor.8da8c5b8734d61165cd5.js.map +1 -0
- lino_react/react/static/react/main.prDropDown_LinoPaginator.2e5060a4740f3341f63e.js +2 -0
- lino_react/react/static/react/main.prDropDown_LinoPaginator.2e5060a4740f3341f63e.js.map +1 -0
- lino_react/react/static/react/main.prFieldset_LinoComponents.e4f63e83f27343edc61c.js +2 -0
- lino_react/react/static/react/main.prFieldset_LinoComponents.e4f63e83f27343edc61c.js.map +1 -0
- lino_react/react/static/react/main.prFileUpload_LinoComponents.fd4dcc59411d4f30ce44.js +2 -0
- lino_react/react/static/react/main.prFileUpload_LinoComponents.fd4dcc59411d4f30ce44.js.map +1 -0
- lino_react/react/static/react/main.prFlex_AppCSS.fa6130881ede09cdec3c.js +2 -0
- lino_react/react/static/react/main.prFlex_AppCSS.fa6130881ede09cdec3c.js.map +1 -0
- lino_react/react/static/react/main.prGalleria_LinoDataView.95e6cbe67e576d213ccc.js +2 -0
- lino_react/react/static/react/main.prGalleria_LinoDataView.95e6cbe67e576d213ccc.js.map +1 -0
- lino_react/react/static/react/main.prInputNumber_GridElement.cbbfc906eb7a1aa8f156.js +2 -0
- lino_react/react/static/react/main.prInputNumber_GridElement.cbbfc906eb7a1aa8f156.js.map +1 -0
- lino_react/react/static/react/main.prInputText_GridElement.7c9df8f8bf9a4ec2da54.js +2 -0
- lino_react/react/static/react/main.prInputText_GridElement.7c9df8f8bf9a4ec2da54.js.map +1 -0
- lino_react/react/static/react/main.prLinoBodyRequire.e85203e75c853a3a28a3.js +2 -0
- lino_react/react/static/react/main.prLinoBodyRequire.e85203e75c853a3a28a3.js.map +1 -0
- lino_react/react/static/react/main.prLinoBodyRequireChunk2.adbf631ecf19c47e2b81.js +2 -0
- lino_react/react/static/react/main.prLinoBodyRequireChunk2.adbf631ecf19c47e2b81.js.map +1 -0
- lino_react/react/static/react/main.prLinoComponentsRequire.514afdde432eb8d81fed.js +2 -0
- lino_react/react/static/react/main.prLinoComponentsRequire.514afdde432eb8d81fed.js.map +1 -0
- lino_react/react/static/react/main.prMultiSelect_GridElement.fcc21baa73eca34559b3.js +2 -0
- lino_react/react/static/react/main.prMultiSelect_GridElement.fcc21baa73eca34559b3.js.map +1 -0
- lino_react/react/static/react/main.prOverlayPanel_GridElement.8f5b663d1eb6b1dd38a3.js +2 -0
- lino_react/react/static/react/main.prOverlayPanel_GridElement.8f5b663d1eb6b1dd38a3.js.map +1 -0
- lino_react/react/static/react/main.prPaginator_LinoPaginator.c863944483f4cd55f1ed.js +2 -0
- lino_react/react/static/react/main.prPaginator_LinoPaginator.c863944483f4cd55f1ed.js.map +1 -0
- lino_react/react/static/react/main.prPanel_LinoComponents.4d6ad650177c4d7814af.js +2 -0
- lino_react/react/static/react/main.prPanel_LinoComponents.4d6ad650177c4d7814af.js.map +1 -0
- lino_react/react/static/react/main.prPassword_LinoComponents.7599b5120d8f9cafd72a.js +2 -0
- lino_react/react/static/react/main.prPassword_LinoComponents.7599b5120d8f9cafd72a.js.map +1 -0
- lino_react/react/static/react/main.prRhea_AppCSS.ea10c28c5d2ea1998aa1.js +2 -0
- lino_react/react/static/react/main.prRhea_AppCSS.ea10c28c5d2ea1998aa1.js.map +1 -0
- lino_react/react/static/react/main.prSelectButton_GridElement.633d2217223f534ccffd.js +2 -0
- lino_react/react/static/react/main.prSelectButton_GridElement.633d2217223f534ccffd.js.map +1 -0
- lino_react/react/static/react/main.prSiteContextRequire.98dc049d4071c62e7fb7.js +2 -0
- lino_react/react/static/react/main.prSiteContextRequire.98dc049d4071c62e7fb7.js.map +1 -0
- lino_react/react/static/react/main.prSplitButton_LinoBbar.e05ce5134499104a3a39.js +2 -0
- lino_react/react/static/react/main.prSplitButton_LinoBbar.e05ce5134499104a3a39.js.map +1 -0
- lino_react/react/static/react/main.prTabView_LinoComponents.d743f6cd16abca8ced30.js +2 -0
- lino_react/react/static/react/main.prTabView_LinoComponents.d743f6cd16abca8ced30.js.map +1 -0
- lino_react/react/static/react/main.prToast_App.34c3ec5ce66e48b743e2.js +2 -0
- lino_react/react/static/react/main.prToast_App.34c3ec5ce66e48b743e2.js.map +1 -0
- lino_react/react/static/react/main.prToggleButton_LinoToolbar.8fe0d07ba354203cbb7a.js +2 -0
- lino_react/react/static/react/main.prToggleButton_LinoToolbar.8fe0d07ba354203cbb7a.js.map +1 -0
- lino_react/react/static/react/main.prTriStateCheckbox_GridElement.e3aec6e50d98fc089595.js +2 -0
- lino_react/react/static/react/main.prTriStateCheckbox_GridElement.e3aec6e50d98fc089595.js.map +1 -0
- lino_react/react/static/react/main.queryString_App.33598aa7a039c5ed5ccd.js +2 -0
- lino_react/react/static/react/main.queryString_App.33598aa7a039c5ed5ccd.js.map +1 -0
- lino_react/react/static/react/main.quill.f87352cafdb60392df4c.js +2 -0
- lino_react/react/static/react/main.quill.f87352cafdb60392df4c.js.map +1 -0
- lino_react/react/static/react/main.reactDom_App.db5e413fed3c5e8fb327.js +2 -0
- lino_react/react/static/react/main.reactDom_App.db5e413fed3c5e8fb327.js.map +1 -0
- lino_react/react/static/react/main.reactI18n_SiteContext.815631b5d8e41256d9ba.js +2 -0
- lino_react/react/static/react/main.reactI18n_SiteContext.815631b5d8e41256d9ba.js.map +1 -0
- lino_react/react/static/react/main.reactRouterDom_App.c451be284c79af924afd.js +3 -0
- lino_react/react/static/react/main.reactRouterDom_App.c451be284c79af924afd.js.LICENSE.txt +32 -0
- lino_react/react/static/react/main.reactRouterDom_App.c451be284c79af924afd.js.map +1 -0
- lino_react/react/static/react/main.runtime.1b037ddc1d1b089893ea.js +2 -0
- lino_react/react/static/react/main.runtime.1b037ddc1d1b089893ea.js.map +1 -0
- lino_react/react/static/react/main.tpdep.cc4a9ab2067560b65574.js +3 -0
- lino_react/react/static/react/main.tpdep.cc4a9ab2067560b65574.js.LICENSE.txt +20 -0
- lino_react/react/static/react/main.tpdep.cc4a9ab2067560b65574.js.map +1 -0
- lino_react/react/views.py +774 -0
- lino_react/translations/extracts/i18n/bn/translation.json +53 -0
- lino_react/translations/extracts/i18n/de/translation.json +53 -0
- lino_react/translations/extracts/i18n/en/translation.json +53 -0
- lino_react/translations/extracts/i18n/et/translation.json +53 -0
- lino_react/translations/extracts/i18n/fr/translation.json +53 -0
- lino_react/translations/i18n-scan.js +24 -0
- lino_react-24.9.4.dist-info/METADATA +704 -0
- lino_react-24.9.4.dist-info/RECORD +230 -0
- lino_react-24.9.4.dist-info/WHEEL +4 -0
- 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'
|