django-spire 0.18.3__py3-none-any.whl → 0.19.1__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 (246) hide show
  1. django_spire/ai/admin.py +1 -0
  2. django_spire/ai/chat/apps.py +1 -8
  3. django_spire/ai/chat/intelligence/decoders/tools.py +29 -0
  4. django_spire/ai/chat/intelligence/prompts.py +13 -7
  5. django_spire/ai/chat/intelligence/workflows/chat_workflow.py +55 -57
  6. django_spire/ai/chat/models.py +2 -1
  7. django_spire/ai/chat/querysets.py +1 -3
  8. django_spire/ai/chat/responses.py +5 -0
  9. django_spire/ai/chat/templates/django_spire/ai/chat/card/chat_card.html +2 -2
  10. django_spire/ai/chat/templates/django_spire/ai/chat/dropdown/ellipsis_dropdown.html +1 -1
  11. django_spire/ai/chat/templates/django_spire/ai/chat/element/recent_chat_select_element.html +82 -44
  12. django_spire/ai/chat/templates/django_spire/ai/chat/message/loading_response_message.html +9 -4
  13. django_spire/ai/chat/templates/django_spire/ai/chat/message/message.html +33 -33
  14. django_spire/ai/chat/templates/django_spire/ai/chat/message/request_message.html +5 -8
  15. django_spire/ai/chat/templates/django_spire/ai/chat/message/response_message.html +14 -10
  16. django_spire/ai/chat/templates/django_spire/ai/chat/page/chat_page.html +35 -0
  17. django_spire/ai/chat/templates/django_spire/ai/chat/widget/dialog_widget.html +72 -24
  18. django_spire/ai/chat/templates/django_spire/ai/chat/widget/selection_widget.html +42 -0
  19. django_spire/ai/chat/tests/test_urls/test_json_urls.py +4 -2
  20. django_spire/ai/chat/urls/__init__.py +1 -1
  21. django_spire/ai/chat/urls/json_urls.py +1 -1
  22. django_spire/ai/chat/urls/page_urls.py +1 -1
  23. django_spire/ai/chat/urls/{template_urls.py → template/template_urls.py} +1 -1
  24. django_spire/ai/chat/views/json_views.py +4 -3
  25. django_spire/ai/chat/views/message_request_views.py +32 -14
  26. django_spire/ai/chat/views/message_response_views.py +14 -11
  27. django_spire/ai/chat/views/message_views.py +7 -1
  28. django_spire/ai/chat/views/page_views.py +2 -2
  29. django_spire/ai/chat/views/{template_views.py → template/template_views.py} +1 -7
  30. django_spire/ai/context/__init__.py +0 -0
  31. django_spire/ai/context/admin.py +15 -0
  32. django_spire/ai/context/apps.py +16 -0
  33. django_spire/ai/context/choices.py +11 -0
  34. django_spire/ai/context/intelligence/__init__.py +0 -0
  35. django_spire/ai/context/intelligence/prompts/__init__.py +0 -0
  36. django_spire/ai/context/intelligence/prompts/organization_prompts.py +19 -0
  37. django_spire/ai/context/migrations/0001_initial.py +67 -0
  38. django_spire/ai/context/migrations/__init__.py +0 -0
  39. django_spire/ai/context/models.py +67 -0
  40. django_spire/ai/context/querysets.py +15 -0
  41. django_spire/ai/context/seeding/__init__.py +0 -0
  42. django_spire/ai/context/seeding/seed.py +24 -0
  43. django_spire/ai/prompt/system/bots.py +3 -5
  44. django_spire/ai/prompt/tuning/bots.py +5 -10
  45. django_spire/ai/sms/admin.py +2 -0
  46. django_spire/ai/sms/apps.py +2 -7
  47. django_spire/ai/sms/decorators.py +2 -2
  48. django_spire/ai/sms/intelligence/workflows/sms_conversation_workflow.py +18 -18
  49. django_spire/ai/sms/tests/test_webhook.py +5 -4
  50. django_spire/ai/sms/urls.py +3 -0
  51. django_spire/ai/sms/views.py +3 -5
  52. django_spire/ai/urls.py +2 -0
  53. django_spire/auth/templates/django_spire/auth/form/login_form.html +25 -0
  54. django_spire/auth/templates/django_spire/auth/page/auth_page.html +2 -3
  55. django_spire/auth/templates/django_spire/auth/page/login_page.html +1 -25
  56. django_spire/conf.py +1 -3
  57. django_spire/consts.py +1 -7
  58. django_spire/contrib/seeding/intelligence/bots/seeder_generator_bot.py +3 -2
  59. django_spire/contrib/utils.py +2 -0
  60. django_spire/core/management/commands/spire_startapp_pkg/__init__.py +4 -20
  61. django_spire/core/management/commands/spire_startapp_pkg/builder.py +2 -2
  62. django_spire/core/management/commands/spire_startapp_pkg/config.py +2 -2
  63. django_spire/core/management/commands/spire_startapp_pkg/filesystem.py +1 -19
  64. django_spire/core/management/commands/spire_startapp_pkg/generator.py +8 -8
  65. django_spire/core/management/commands/spire_startapp_pkg/processor.py +3 -3
  66. django_spire/core/management/commands/spire_startapp_pkg/registry.py +0 -16
  67. django_spire/core/management/commands/spire_startapp_pkg/reporter.py +1 -21
  68. django_spire/core/management/commands/spire_startapp_pkg/resolver.py +0 -15
  69. django_spire/core/management/commands/spire_startapp_pkg/template/app/views/form_views.py.template +2 -2
  70. django_spire/core/management/commands/spire_startapp_pkg/template/app/views/page_views.py.template +2 -2
  71. django_spire/core/management/commands/spire_startapp_pkg/validator.py +9 -9
  72. django_spire/core/static/django_spire/css/app-button.css +11 -1
  73. django_spire/core/static/django_spire/css/app-import.css +2 -0
  74. django_spire/core/static/django_spire/css/app-layout.css +15 -0
  75. django_spire/core/static/django_spire/css/app-navigation.css +24 -2
  76. django_spire/core/static/django_spire/css/app-page.css +8 -0
  77. django_spire/core/static/django_spire/css/app-side-panel.css +102 -0
  78. django_spire/core/static/django_spire/css/app-text.css +19 -1
  79. django_spire/core/static/django_spire/css/bootstrap-extension.css +128 -7
  80. django_spire/core/static/django_spire/css/bootstrap-override.css +161 -111
  81. django_spire/core/static/django_spire/css/themes/ayu/app-dark.css +0 -4
  82. django_spire/core/static/django_spire/css/themes/ayu/app-light.css +0 -4
  83. django_spire/core/static/django_spire/css/themes/catppuccin/app-dark.css +0 -4
  84. django_spire/core/static/django_spire/css/themes/catppuccin/app-light.css +0 -4
  85. django_spire/core/static/django_spire/css/themes/default/app-dark.css +0 -4
  86. django_spire/core/static/django_spire/css/themes/default/app-light.css +0 -4
  87. django_spire/core/static/django_spire/css/themes/dracula/app-dark.css +0 -4
  88. django_spire/core/static/django_spire/css/themes/dracula/app-light.css +0 -4
  89. django_spire/core/static/django_spire/css/themes/gruvbox/app-dark.css +0 -4
  90. django_spire/core/static/django_spire/css/themes/gruvbox/app-light.css +0 -4
  91. django_spire/core/static/django_spire/css/themes/material/app-dark.css +0 -4
  92. django_spire/core/static/django_spire/css/themes/material/app-light.css +0 -4
  93. django_spire/core/static/django_spire/css/themes/nord/app-dark.css +0 -4
  94. django_spire/core/static/django_spire/css/themes/nord/app-light.css +0 -4
  95. django_spire/core/static/django_spire/css/themes/oceanic-next/app-dark.css +0 -4
  96. django_spire/core/static/django_spire/css/themes/oceanic-next/app-light.css +0 -4
  97. django_spire/core/static/django_spire/css/themes/one-dark/app-dark.css +0 -4
  98. django_spire/core/static/django_spire/css/themes/one-dark/app-light.css +0 -4
  99. django_spire/core/static/django_spire/css/themes/palenight/app-dark.css +0 -4
  100. django_spire/core/static/django_spire/css/themes/palenight/app-light.css +0 -4
  101. django_spire/core/static/django_spire/css/themes/rose-pine/app-dark.css +0 -4
  102. django_spire/core/static/django_spire/css/themes/rose-pine/app-light.css +0 -4
  103. django_spire/core/static/django_spire/css/themes/synthwave/app-dark.css +0 -4
  104. django_spire/core/static/django_spire/css/themes/synthwave/app-light.css +0 -4
  105. django_spire/core/static/django_spire/css/themes/tokyo-night/app-dark.css +0 -4
  106. django_spire/core/static/django_spire/css/themes/tokyo-night/app-light.css +0 -4
  107. django_spire/core/static/django_spire/font/Poppins-Black.ttf +0 -0
  108. django_spire/core/static/django_spire/font/Poppins-BlackItalic.ttf +0 -0
  109. django_spire/core/static/django_spire/font/Poppins-Bold.ttf +0 -0
  110. django_spire/core/static/django_spire/font/Poppins-BoldItalic.ttf +0 -0
  111. django_spire/core/static/django_spire/font/Poppins-ExtraBold.ttf +0 -0
  112. django_spire/core/static/django_spire/font/Poppins-ExtraBoldItalic.ttf +0 -0
  113. django_spire/core/static/django_spire/font/Poppins-ExtraLight.ttf +0 -0
  114. django_spire/core/static/django_spire/font/Poppins-ExtraLightItalic.ttf +0 -0
  115. django_spire/core/static/django_spire/font/Poppins-Italic.ttf +0 -0
  116. django_spire/core/static/django_spire/font/Poppins-Light.ttf +0 -0
  117. django_spire/core/static/django_spire/font/Poppins-LightItalic.ttf +0 -0
  118. django_spire/core/static/django_spire/font/Poppins-Medium.ttf +0 -0
  119. django_spire/core/static/django_spire/font/Poppins-MediumItalic.ttf +0 -0
  120. django_spire/core/static/django_spire/font/Poppins-SemiBold.ttf +0 -0
  121. django_spire/core/static/django_spire/font/Poppins-SemiBoldItalic.ttf +0 -0
  122. django_spire/core/static/django_spire/font/Poppins-Thin.ttf +0 -0
  123. django_spire/core/static/django_spire/font/Poppins-ThinItalic.ttf +0 -0
  124. django_spire/core/static/django_spire/js/ui.js +12 -0
  125. django_spire/core/templates/django_spire/button/base_button.html +1 -1
  126. django_spire/core/templates/django_spire/button/primary_dark_outlined_button.html +3 -0
  127. django_spire/core/templates/django_spire/dropdown/element/dropdown_link_element.html +12 -8
  128. django_spire/core/templates/django_spire/dropdown/element/ellipsis_dropdown_modal_link_element.html +2 -1
  129. django_spire/core/templates/django_spire/dropdown/ellipsis_dropdown.html +2 -1
  130. django_spire/core/templates/django_spire/navigation/accordion/nav_accordion.html +1 -1
  131. django_spire/core/templates/django_spire/navigation/elements/nav_link.html +1 -1
  132. django_spire/core/templates/django_spire/navigation/elements/nav_title_divider.html +1 -1
  133. django_spire/core/templates/django_spire/navigation/side_navigation.html +52 -8
  134. django_spire/core/templates/django_spire/navigation/top_navigation.html +8 -2
  135. django_spire/core/templates/django_spire/page/full_page.html +223 -11
  136. django_spire/core/utils.py +26 -2
  137. django_spire/knowledge/collection/models.py +24 -0
  138. django_spire/knowledge/collection/services/transformation_service.py +2 -1
  139. django_spire/knowledge/collection/tests/test_services/test_transformation_service.py +44 -42
  140. django_spire/knowledge/collection/urls/form_urls.py +1 -0
  141. django_spire/knowledge/collection/urls/page_urls.py +1 -0
  142. django_spire/knowledge/collection/views/form_views.py +13 -2
  143. django_spire/knowledge/collection/views/page_views.py +36 -4
  144. django_spire/knowledge/entry/models.py +32 -0
  145. django_spire/knowledge/entry/services/transformation_services.py +10 -10
  146. django_spire/knowledge/entry/version/block/data/data.py +2 -1
  147. django_spire/knowledge/entry/version/block/data/heading_data.py +2 -2
  148. django_spire/knowledge/entry/version/block/data/list/data.py +3 -4
  149. django_spire/knowledge/entry/version/block/data/maps.py +3 -5
  150. django_spire/knowledge/entry/version/block/data/text_data.py +2 -2
  151. django_spire/knowledge/entry/version/block/models.py +10 -7
  152. django_spire/knowledge/entry/version/block/services/factory_service.py +11 -10
  153. django_spire/knowledge/entry/version/block/tests/factories.py +6 -5
  154. django_spire/knowledge/entry/version/converters/docx_converter.py +1 -1
  155. django_spire/knowledge/entry/version/intelligence/bots/markdown_format_llm_bot.py +14 -12
  156. django_spire/knowledge/entry/version/seeding/seeder.py +3 -3
  157. django_spire/knowledge/entry/version/services/processor_service.py +36 -10
  158. django_spire/knowledge/entry/version/tests/test_converters/test_docx_converter.py +1 -1
  159. django_spire/knowledge/entry/version/tests/test_urls/test_page_urls.py +1 -1
  160. django_spire/knowledge/entry/version/urls/page_urls.py +1 -1
  161. django_spire/knowledge/entry/version/views/json_views.py +5 -3
  162. django_spire/knowledge/entry/version/views/page_views.py +11 -12
  163. django_spire/knowledge/entry/version/views/redirect_views.py +1 -1
  164. django_spire/knowledge/entry/views/form_views.py +1 -1
  165. django_spire/knowledge/intelligence/bots/entry_search_llm_bot.py +33 -11
  166. django_spire/knowledge/intelligence/decoders/__init__.py +0 -0
  167. django_spire/knowledge/intelligence/{maps/collection_map.py → decoders/collection_decoder.py} +5 -5
  168. django_spire/knowledge/intelligence/{maps/entry_map.py → decoders/entry_decoder.py} +3 -3
  169. django_spire/knowledge/intelligence/intel/collection_intel.py +1 -0
  170. django_spire/knowledge/intelligence/intel/entry_intel.py +5 -2
  171. django_spire/knowledge/intelligence/intel/message_intel.py +2 -0
  172. django_spire/knowledge/intelligence/workflows/knowledge_workflow.py +43 -51
  173. django_spire/knowledge/migrations/0007_alter_collection_options.py +17 -0
  174. django_spire/knowledge/static/django_spire/knowledge/entry/version/js/editor.js +24 -5
  175. django_spire/knowledge/templates/django_spire/knowledge/collection/card/top_level_list_card.html +21 -0
  176. django_spire/knowledge/templates/django_spire/knowledge/collection/component/x_collection_navigation.html +15 -6
  177. django_spire/knowledge/templates/django_spire/knowledge/collection/element/ellipsis_dropdown.html +22 -0
  178. django_spire/knowledge/templates/django_spire/knowledge/collection/form/form.html +21 -9
  179. django_spire/knowledge/templates/django_spire/knowledge/collection/item/collection_item.html +19 -0
  180. django_spire/knowledge/templates/django_spire/knowledge/collection/page/display_page.html +49 -0
  181. django_spire/knowledge/templates/django_spire/knowledge/collection/page/form_page.html +1 -1
  182. django_spire/knowledge/templates/django_spire/knowledge/container/container.html +33 -0
  183. django_spire/knowledge/templates/django_spire/knowledge/entry/file/page/list_page.html +1 -1
  184. django_spire/knowledge/templates/django_spire/knowledge/entry/item/list_item.html +2 -2
  185. django_spire/knowledge/templates/django_spire/knowledge/entry/page/form_page.html +1 -1
  186. django_spire/knowledge/templates/django_spire/knowledge/entry/page/import_form_page.html +1 -1
  187. django_spire/knowledge/templates/django_spire/knowledge/entry/version/container/detail_container.html +51 -45
  188. django_spire/knowledge/templates/django_spire/knowledge/entry/version/page/editor_page.html +54 -0
  189. django_spire/knowledge/templates/django_spire/knowledge/entry/version/page/form_page.html +1 -1
  190. django_spire/knowledge/templates/django_spire/knowledge/message/knowledge_message_intel.html +18 -1
  191. django_spire/knowledge/templates/django_spire/knowledge/page/full_page.html +37 -0
  192. django_spire/knowledge/templates/django_spire/knowledge/page/home_page.html +2 -2
  193. django_spire/knowledge/templates/django_spire/knowledge/sub_navigation/item/collection_sub_navigation_item.html +29 -0
  194. django_spire/knowledge/templates/django_spire/knowledge/sub_navigation/item/entry_sub_navigation_item.html +20 -0
  195. django_spire/knowledge/templates/django_spire/knowledge/{navigation/content/navigation_content.html → sub_navigation/widget/collection_entry_sub_navigation_widget.html} +42 -19
  196. django_spire/knowledge/views/page_views.py +4 -4
  197. django_spire/settings.py +3 -3
  198. django_spire/theme/templates/django_spire/theme/card/badges_preview_card.html +0 -1
  199. django_spire/theme/templates/django_spire/theme/card/base_preview_card.html +1 -0
  200. django_spire/theme/templates/django_spire/theme/card/typography_preview_card.html +1 -1
  201. django_spire/theme/templates/django_spire/theme/example/form/example_form.html +2 -0
  202. django_spire/theme/templates/django_spire/theme/example/form/example_form_card.html +5 -0
  203. django_spire/theme/templates/django_spire/theme/page/badges_page.html +7 -9
  204. django_spire/theme/templates/django_spire/theme/page/borders_page.html +6 -9
  205. django_spire/theme/templates/django_spire/theme/page/buttons_page.html +6 -9
  206. django_spire/theme/templates/django_spire/theme/page/colors_page.html +6 -6
  207. django_spire/theme/templates/django_spire/theme/page/dashboard_page.html +57 -0
  208. django_spire/theme/templates/django_spire/theme/page/django_glue_page.html +7 -9
  209. django_spire/theme/templates/django_spire/theme/page/theme_page.html +24 -0
  210. django_spire/theme/templates/django_spire/theme/page/typography_page.html +6 -9
  211. django_spire/theme/templates/django_spire/theme/section/badge_section_card.html +5 -0
  212. django_spire/theme/templates/django_spire/theme/section/border_section_card.html +5 -0
  213. django_spire/theme/templates/django_spire/theme/section/button_section.html +1 -0
  214. django_spire/theme/templates/django_spire/theme/section/button_section_card.html +5 -0
  215. django_spire/theme/templates/django_spire/theme/section/color_section.html +10 -10
  216. django_spire/theme/templates/django_spire/theme/section/color_section_card.html +5 -0
  217. django_spire/theme/templates/django_spire/theme/section/typography_section.html +41 -1
  218. django_spire/theme/templates/django_spire/theme/section/typography_section_card.html +5 -0
  219. {django_spire-0.18.3.dist-info → django_spire-0.19.1.dist-info}/METADATA +3 -3
  220. {django_spire-0.18.3.dist-info → django_spire-0.19.1.dist-info}/RECORD +229 -190
  221. django_spire/ai/chat/intelligence/bots/chat_bot.py +0 -8
  222. django_spire/ai/chat/intelligence/maps/intent_llm_map.py +0 -10
  223. django_spire/ai/chat/templates/django_spire/ai/chat/page/home_page.html +0 -9
  224. django_spire/ai/chat/templates/django_spire/ai/chat/widget/chat_widget.html +0 -64
  225. django_spire/ai/chat/templates/django_spire/ai/chat/widget/search_chat_results_widget.html +0 -25
  226. django_spire/ai/chat/templates/django_spire/ai/chat/widget/search_chat_widget.html +0 -39
  227. django_spire/ai/chat/templates/django_spire/ai/chat/widget/select_chat_widget.html +0 -24
  228. django_spire/ai/chat/tools.py +0 -57
  229. django_spire/ai/sms/tools.py +0 -57
  230. django_spire/core/static/django_spire/font/Karla-Bold.ttf +0 -0
  231. django_spire/core/static/django_spire/font/Merriweather.ttf +0 -0
  232. django_spire/knowledge/context_processors.py +0 -18
  233. django_spire/knowledge/templates/django_spire/knowledge/entry/version/page/detail_page.html +0 -25
  234. django_spire/knowledge/templates/django_spire/knowledge/navigation/card/navigation_card.html +0 -9
  235. django_spire/knowledge/templates/django_spire/knowledge/navigation/item/collection/collection_item.html +0 -29
  236. django_spire/knowledge/templates/django_spire/knowledge/navigation/item/entry/entry_item.html +0 -18
  237. django_spire/knowledge/templates/django_spire/knowledge/navigation/page/full_page.html +0 -90
  238. /django_spire/ai/chat/intelligence/{bots → decoders}/__init__.py +0 -0
  239. /django_spire/ai/chat/{intelligence/maps → urls/template}/__init__.py +0 -0
  240. /django_spire/{knowledge/intelligence/maps → ai/chat/views/template}/__init__.py +0 -0
  241. /django_spire/knowledge/entry/version/{constants.py → consts.py} +0 -0
  242. /django_spire/knowledge/templates/django_spire/knowledge/{navigation/item/collection/dropdown/navigation_ellipsis_dropdown.html → sub_navigation/element/collection_sub_navigation_ellipsis_dropdown.html} +0 -0
  243. /django_spire/knowledge/templates/django_spire/knowledge/{navigation/item/entry/dropdown/navigation_ellipsis_dropdown.html → sub_navigation/element/entry_sub_navigation_ellipsis_dropdown.html} +0 -0
  244. {django_spire-0.18.3.dist-info → django_spire-0.19.1.dist-info}/WHEEL +0 -0
  245. {django_spire-0.18.3.dist-info → django_spire-0.19.1.dist-info}/licenses/LICENSE.md +0 -0
  246. {django_spire-0.18.3.dist-info → django_spire-0.19.1.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- {% extends 'django_spire/knowledge/navigation/page/full_page.html' %}
1
+ {% extends 'django_spire/knowledge/page/full_page.html' %}
2
2
 
3
3
  {% load static %}
4
4
 
@@ -1,5 +1,22 @@
1
1
  {% extends 'django_spire/ai/chat/message/message.html' %}
2
2
 
3
3
  {% block message_content %}
4
- {{ message_intel.body }}
4
+ {% for entry_intel in message_intel.entries_intel %}
5
+
6
+ <div class="row">
7
+ <div class="col pt-2">
8
+ <a href="{% url 'django_spire:knowledge:entry:version:page:editor' pk=entry_intel.entry_id %}?show_sub_nav=false&block_id={{ entry_intel.relevant_block_id }}" target="_blank">
9
+ {{ entry_intel.relevant_heading_text }}
10
+ </a>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="row">
15
+ <div class="col pb-2">
16
+ {{ entry_intel.relevant_subject_text }}
17
+ </div>
18
+ </div>
19
+
20
+ {% endfor %}
21
+
5
22
  {% endblock %}
@@ -0,0 +1,37 @@
1
+ {% extends 'django_spire/page/full_page.html' %}
2
+
3
+ {% load static %}
4
+
5
+ {% block base_head_additional_css %}
6
+ <link href="{% static 'django_spire/knowledge/css/navigation_items.css' %}?v={{ DJANGO_SPIRE_VERSION }}" rel="stylesheet">
7
+ {% endblock %}
8
+
9
+ {% block base_body_top_js %}
10
+ <script src="{% static 'django_spire/knowledge/collection/js/managers.js' %}?v={{ DJANGO_SPIRE_VERSION }}" type="application/javascript"></script>
11
+ {% endblock %}
12
+
13
+ {% block full_page_sub_navigation_title %}
14
+ {{ collection.name_short }}
15
+ {% endblock %}
16
+
17
+ {% block full_page_sub_navigation_buttons %}
18
+ {% if AuthController.knowledge.can_add %}
19
+ {% url 'django_spire:knowledge:collection:form:create' as create_url %}
20
+ {% include 'django_spire/button/primary_button.html' with button_text='Add' button_href=create_url button_icon="bi bi-plus" %}
21
+ {% endif %}
22
+ {% endblock %}
23
+
24
+ {% block full_page_info_navigation_title %}
25
+ More Info
26
+ {% endblock %}
27
+
28
+ {% block full_page_content %}
29
+ <div class="main-content-with-panels">
30
+ {% block knowledge_full_page_content %}
31
+ {% endblock %}
32
+ </div>
33
+ {% endblock %}
34
+
35
+ {% block base_body_additional_bottom_js %}
36
+ <script src="{% static 'django_spire/knowledge/collection/js/x_component.js' %}?v={{ DJANGO_SPIRE_VERSION }}" type="application/javascript"></script>
37
+ {% endblock %}
@@ -1,11 +1,11 @@
1
- {% extends 'django_spire/knowledge/navigation/page/full_page.html' %}
1
+ {% extends 'django_spire/knowledge/page/full_page.html' %}
2
2
 
3
3
  {% load static %}
4
4
 
5
5
  {% block full_page_content %}
6
6
  <div class="row">
7
7
  <div class="col-12">
8
- {% include 'django_spire/knowledge/navigation/card/navigation_card.html' %}
8
+ {% include 'django_spire/knowledge/collection/card/top_level_list_card.html' %}
9
9
  </div>
10
10
  </div>
11
11
  {% endblock %}
@@ -0,0 +1,29 @@
1
+ <div
2
+ class="knowledge-nav-item cursor-pointer row pt-2 pb-1 fs-7"
3
+ :class="collection.id === current_collection_id && !current_version_id ? 'bg-app-primary-soft rounded-2' : ''"
4
+ >
5
+ <div
6
+ class="col d-flex align-items-center overflow-hidden"
7
+ @click="toggle_expand(collection.id)"
8
+ >
9
+ <i
10
+ :class="is_expanded(collection.id) ? 'bi bi-chevron-down' : 'bi bi-chevron-right'"
11
+ class="flex-shrink-0"
12
+ {% if hide_chevron %}
13
+ style="visibility: hidden"
14
+ {% else %}
15
+ :style="{visibility: (collection.has_child_collections() || collection.has_entries()) ? 'visible' : 'hidden'}"
16
+ {% endif %}
17
+ ></i>
18
+ <i
19
+ :class="is_expanded(collection.id) ? 'bi-folder2-open' : 'bi-folder2'"
20
+ class="bi flex-shrink-0 ms-1"
21
+ ></i>
22
+ <span class="text-truncate ms-1" x-text="collection.name"></span>
23
+ </div>
24
+ {% if AuthController.knowledge.can_view %}
25
+ <div class="col-auto">
26
+ {% include 'django_spire/knowledge/sub_navigation/element/collection_sub_navigation_ellipsis_dropdown.html' %}
27
+ </div>
28
+ {% endif %}
29
+ </div>
@@ -0,0 +1,20 @@
1
+ <div
2
+ class="row ms-2 pt-2 pb-1 knowledge-nav-item cursor-pointer fs-7"
3
+ :class="entry.version_id === current_version_id ? 'bg-app-primary-soft rounded-2' : ''"
4
+ >
5
+ <a
6
+ class="col d-flex align-items-center overflow-hidden text-decoration-none text-app-default-text-color"
7
+ {% if AuthController.knowledge.can_view %}
8
+ :href="'{% url "django_spire:knowledge:entry:version:page:editor" pk=0 %}'.replace(0, entry.version_id)"
9
+ {% endif %}
10
+ >
11
+ <i class="bi bi-file-earmark-text flex-shrink-0"></i>
12
+ <span class="text-truncate ms-1" x-text="entry.name"></span>
13
+ </a>
14
+
15
+ {% if AuthController.knowledge.can_view %}
16
+ <div class="col-auto">
17
+ {% include 'django_spire/knowledge/sub_navigation/element/entry_sub_navigation_ellipsis_dropdown.html' %}
18
+ </div>
19
+ {% endif %}
20
+ </div>
@@ -2,16 +2,44 @@
2
2
  x-data="{
3
3
  user_search: '',
4
4
  found_items: new Map(),
5
- focused_object: {},
6
- focused_type: '',
7
- title: '',
8
5
  manager: new CollectionManager({{ collection_tree_json }}),
9
6
  is_dragging: false,
7
+ current_collection_id: {{ current_collection_id|default:'null' }},
8
+ current_version_id: {{ current_version_id|default:'null' }},
9
+ top_level_collection_id: {{ collection.id }},
10
+ expanded_ids: [],
10
11
 
11
12
  init() {
12
- {% if collection.id %}
13
- this.manager.open_path_to({collection_id: {{ collection.id }}})
14
- {% endif %}
13
+ if (this.current_collection_id) {
14
+ this.expand_path_to(this.current_collection_id)
15
+ }
16
+ },
17
+
18
+ expand_path_to(collection_id) {
19
+ const collection = this.manager.collection_lookup_map.get(collection_id)
20
+ if (!collection) return
21
+
22
+ let current = collection
23
+ let ids_to_expand = []
24
+
25
+ while (current && current.id !== -1) {
26
+ ids_to_expand.push(current.id)
27
+ current = current.parent
28
+ }
29
+
30
+ this.expanded_ids = ids_to_expand
31
+ },
32
+
33
+ is_expanded(collection_id) {
34
+ return this.expanded_ids.includes(collection_id)
35
+ },
36
+
37
+ toggle_expand(collection_id) {
38
+ if (this.is_expanded(collection_id)) {
39
+ this.expanded_ids = this.expanded_ids.filter(id => id !== collection_id)
40
+ } else {
41
+ this.expanded_ids.push(collection_id)
42
+ }
15
43
  },
16
44
 
17
45
  toggle_dragging(value) {
@@ -20,6 +48,9 @@
20
48
 
21
49
  async move_collection({collection, order, new_parent}) {
22
50
  let response = null
51
+ if (new_parent === null) {
52
+ new_parent = this.top_level_collection_id
53
+ }
23
54
  try {
24
55
  response = await django_glue_fetch(
25
56
  '{% url "django_spire:knowledge:collection:json:reorder" %}',
@@ -83,16 +114,7 @@
83
114
  }"
84
115
  >
85
116
  <div class="container-fluid">
86
- <div class="row align-items-center border-bottom mx-1 pb-2">
87
- <div class="col px-0 text-uppercase pb-2 d-flex align-items-center">
88
- Collections
89
- </div>
90
- <div class="col-auto px-0 pb-2">
91
- {% if AuthController.knowledge.can_add %}
92
- {% url 'django_spire:knowledge:collection:form:create' as create_url %}
93
- {% include 'django_spire/button/primary_button.html' with button_text='Add' button_href=create_url button_icon="bi bi-plus" %}
94
- {% endif %}
95
- </div>
117
+ <div class="row align-items-center mx-1 pb-2">
96
118
  <div class="col-12 px-0">
97
119
  <input
98
120
  class="rounded-2 p-1 form-control"
@@ -105,7 +127,7 @@
105
127
  </div>
106
128
  </div>
107
129
  <div
108
- class="user-select-none pe-3"
130
+ class="user-select-none px-2"
109
131
  x-sort:config="{
110
132
  handle: '[x-sort\\:handle]',
111
133
  distance: 20,
@@ -117,6 +139,7 @@
117
139
  <div class="navigation-items">
118
140
  <x-collection-navigation :data="{items: manager.collection_map, id: null}"></x-collection-navigation>
119
141
  </div>
142
+
120
143
  <div class="search-items">
121
144
  <template x-for="(item, index) in Array.from(found_items.values())" :key="index">
122
145
  <div>
@@ -126,7 +149,7 @@
126
149
  collection: item
127
150
  }"
128
151
  >
129
- {% include 'django_spire/knowledge/navigation/item/collection/collection_item.html' with hide_chevron=True %}
152
+ {% include 'django_spire/knowledge/sub_navigation/item/collection_sub_navigation_item.html' with hide_chevron=True %}
130
153
  </div>
131
154
  </template>
132
155
  <template x-if="item?.constructor.name === 'Entry'">
@@ -135,7 +158,7 @@
135
158
  entry: item
136
159
  }"
137
160
  >
138
- {% include 'django_spire/knowledge/navigation/item/entry/entry_item.html' %}
161
+ {% include 'django_spire/knowledge/sub_navigation/item/entry_sub_navigation_item.html' %}
139
162
  </div>
140
163
  </template>
141
164
  </div>
@@ -2,10 +2,8 @@ from __future__ import annotations
2
2
 
3
3
  from django.core.handlers.wsgi import WSGIRequest
4
4
  from django.template.response import TemplateResponse
5
- from django.urls.base import reverse
6
5
 
7
6
  from django_spire.auth.controller.controller import AppAuthController
8
- from django_spire.contrib import Breadcrumbs
9
7
  from django_spire.contrib.generic_views import portal_views
10
8
  from django_spire.knowledge.collection.models import Collection
11
9
 
@@ -19,6 +17,8 @@ def home_view(request: WSGIRequest) -> TemplateResponse:
19
17
  request,
20
18
  model=Collection,
21
19
  breadcrumbs_func=breadcrumbs_func,
22
- context_data={},
23
- template='django_spire/knowledge/page/home_page.html'
20
+ context_data={
21
+ 'collections': Collection.objects.active().parentless().request_user_has_access(request),
22
+ },
23
+ template='django_spire/knowledge/page/home_page.html',
24
24
  )
django_spire/settings.py CHANGED
@@ -5,9 +5,9 @@ DJANGO_SPIRE_AUTH_CONTROLLERS = {
5
5
  }
6
6
 
7
7
  # AI Settings
8
- AI_CHAT_WORKFLOW_NAME = 'AI Assistant'
9
- AI_CHAT_WORKFLOW_CLASS = 'django_spire.ai.chat.intelligence.workflows.chat_workflow.ChatWorkflow'
10
- AI_SMS_CONVERSATION_WORKFLOW_CLASS = 'django_spire.ai.sms.intelligence.workflows.sms_conversation_workflow.SmsConversationWorkflow'
8
+ AI_PERSONA_NAME = 'AI Assistant'
9
+ AI_CHAT_DEFAULT_CALLABLE = None
10
+ AI_SMS_CONVERSATION_DEFAULT_CALLABLE = None
11
11
 
12
12
  ORGANIZATION_NAME = 'No Organization Provided'
13
13
  ORGANIZATION_DESCRIPTION = 'No Description Provided'
@@ -2,7 +2,6 @@
2
2
 
3
3
  {% block card_title %}Badges{% endblock %}
4
4
 
5
-
6
5
  {% block card_button %}
7
6
  {% url 'django_spire:theme:page:badges' as badges_url %}
8
7
  {% include 'django_spire/button/primary_button.html' with button_text='Full Preview' button_href=badges_url %}
@@ -1,5 +1,6 @@
1
1
  {% extends 'django_spire/card/title_card.html' %}
2
2
 
3
+ {% block card_class %}h-100{% endblock %}
3
4
 
4
5
  {% block card_title_content %}
5
6
  <div class="text-center py-3">
@@ -20,7 +20,7 @@
20
20
 
21
21
  {% block preview_card_content %}
22
22
  <div class="preview-sample d-flex justify-content-center">
23
- <div class="col-4 text-start">
23
+ <div class="col text-start">
24
24
  <div class="fs-4">Heading</div>
25
25
  <div class="fs-6">Subheading</div>
26
26
  <div class="fs--1">Small text</div>
@@ -1,3 +1,5 @@
1
+ <h2 class="mb-4">Forms</h2>
2
+
1
3
  <div
2
4
  class="row"
3
5
  x-data="{
@@ -0,0 +1,5 @@
1
+ {% extends 'django_spire/card/card.html' %}
2
+
3
+ {% block card_content %}
4
+ {% include 'django_spire/theme/example/form/example_form.html' %}
5
+ {% endblock %}
@@ -1,12 +1,10 @@
1
- {% extends 'django_spire/page/full_page.html' %}
1
+ {% extends 'django_spire/theme/page/theme_page.html' %}
2
2
 
3
- {% block full_page_content %}
4
- <div class="container">
5
- <div class="mb-4">
6
- {% url 'django_spire:theme:page:dashboard' as dashboard_url %}
7
- {% include 'django_spire/button/primary_outlined_button.html' with button_text="Back to Dashboard" button_icon="bi bi-arrow-left" button_href=dashboard_url %}
8
- </div>
3
+ {% block theme_content %}
4
+ {% include 'django_spire/theme/section/badge_section.html' %}
5
+ {% endblock %}
9
6
 
10
- {% include 'django_spire/theme/section/badge_section.html' %}
11
- </div>
7
+ {% block theme_on_card_content %}
8
+ {% include 'django_spire/theme/section/badge_section_card.html' %}
12
9
  {% endblock %}
10
+
@@ -1,12 +1,9 @@
1
- {% extends 'django_spire/page/full_page.html' %}
1
+ {% extends 'django_spire/theme/page/theme_page.html' %}
2
2
 
3
- {% block full_page_content %}
4
- <div class="container">
5
- <div class="mb-4">
6
- {% url 'django_spire:theme:page:dashboard' as dashboard_url %}
7
- {% include 'django_spire/button/primary_outlined_button.html' with button_text="Back to Dashboard" button_icon="bi bi-arrow-left" button_href=dashboard_url %}
8
- </div>
3
+ {% block theme_content %}
4
+ {% include 'django_spire/theme/section/border_section.html' %}
5
+ {% endblock %}
9
6
 
10
- {% include 'django_spire/theme/section/border_section.html' %}
11
- </div>
7
+ {% block theme_on_card_content %}
8
+ {% include 'django_spire/theme/section/border_section_card.html' %}
12
9
  {% endblock %}
@@ -1,12 +1,9 @@
1
- {% extends 'django_spire/page/full_page.html' %}
1
+ {% extends 'django_spire/theme/page/theme_page.html' %}
2
2
 
3
- {% block full_page_content %}
4
- <div class="container">
5
- <div class="mb-4">
6
- {% url 'django_spire:theme:page:dashboard' as dashboard_url %}
7
- {% include 'django_spire/button/primary_outlined_button.html' with button_text="Back to Dashboard" button_icon="bi bi-arrow-left" button_href=dashboard_url %}
8
- </div>
3
+ {% block theme_content %}
4
+ {% include 'django_spire/theme/section/button_section.html' %}
5
+ {% endblock %}
9
6
 
10
- {% include 'django_spire/theme/section/button_section.html' %}
11
- </div>
7
+ {% block theme_on_card_content %}
8
+ {% include 'django_spire/theme/section/button_section_card.html' %}
12
9
  {% endblock %}
@@ -1,9 +1,9 @@
1
- {% extends 'django_spire/page/full_page.html' %}
1
+ {% extends 'django_spire/theme/page/theme_page.html' %}
2
2
 
3
- {% block full_page_content %}
4
- <div class="mb-4">
5
- {% url 'django_spire:theme:page:dashboard' as dashboard_url %}
6
- {% include 'django_spire/button/primary_outlined_button.html' with button_text="Back to Dashboard" button_icon="bi bi-arrow-left" button_href=dashboard_url %}
7
- </div>
3
+ {% block theme_content %}
8
4
  {% include 'django_spire/theme/section/color_section.html' %}
9
5
  {% endblock %}
6
+
7
+ {% block theme_on_card_content %}
8
+ {% include 'django_spire/theme/section/color_section_card.html' %}
9
+ {% endblock %}
@@ -1,5 +1,54 @@
1
1
  {% extends 'django_spire/page/full_page.html' %}
2
2
 
3
+ {% block full_page_sub_navigation_title %}
4
+ Sub Navigation
5
+ {% endblock %}
6
+
7
+ {% block full_page_sub_navigation %}
8
+ as
9
+ sa
10
+ sa
11
+ s
12
+ a
13
+ sa
14
+ as
15
+ sa
16
+ as
17
+ as
18
+ as
19
+ as
20
+ <br>
21
+ as
22
+ sa
23
+ sa
24
+ as
25
+ as
26
+ a
27
+ <br>
28
+ sa
29
+ sa
30
+ s
31
+ a
32
+ s
33
+ a
34
+ a
35
+ <br>
36
+ as
37
+ as
38
+ a
39
+ s
40
+ as
41
+ a
42
+ sa
43
+ <br>
44
+ s
45
+ <br>
46
+ a
47
+ sa
48
+ sa
49
+
50
+ {% endblock %}
51
+
3
52
  {% block full_page_content %}
4
53
  <h2 class="mb-4">Theme Overview</h2>
5
54
  <div class="row">
@@ -26,3 +75,11 @@
26
75
  </div>
27
76
  </div>
28
77
  {% endblock %}
78
+
79
+ {% block full_page_info_navigation_title %}
80
+ Info Navigation
81
+ {% endblock %}
82
+
83
+ {% block full_page_info_navigation %}
84
+ INFORMATION NAV
85
+ {% endblock %}
@@ -1,12 +1,10 @@
1
- {% extends 'django_spire/page/full_page.html' %}
1
+ {% extends 'django_spire/theme/page/theme_page.html' %}
2
2
 
3
- {% block full_page_content %}
4
- <div class="container">
5
- <div class="mb-4">
6
- {% url 'django_spire:theme:page:dashboard' as dashboard_url %}
7
- {% include 'django_spire/button/primary_outlined_button.html' with button_text="Back to Dashboard" button_icon="bi bi-arrow-left" button_href=dashboard_url %}
8
- </div>
3
+ {% block theme_content %}
4
+ {% include 'django_spire/theme/example/form/example_form.html' %}
5
+ {% endblock %}
9
6
 
10
- {% include 'django_spire/theme/example/form/example_form.html' %}
11
- </div>
7
+ {% block theme_on_card_content %}
8
+ {% include 'django_spire/theme/example/form/example_form_card.html' %}
12
9
  {% endblock %}
10
+
@@ -0,0 +1,24 @@
1
+ {% extends 'django_spire/page/full_page.html' %}
2
+
3
+ {% block full_page_content %}
4
+ <div class="container">
5
+ <div class="mb-4">
6
+ {% url 'django_spire:theme:page:dashboard' as dashboard_url %}
7
+ {% include 'django_spire/button/primary_outlined_button.html' with button_text="Back to Dashboard" button_icon="bi bi-arrow-left" button_href=dashboard_url %}
8
+ </div>
9
+ <div class="row">
10
+ <div class="col-12 col-lg-6 pt-3">
11
+ {% block theme_content %}
12
+
13
+ {% endblock %}
14
+ </div>
15
+ <div class="col-12 col-lg-6">
16
+ {% block theme_on_card_content %}
17
+
18
+ {% endblock %}
19
+ </div>
20
+ </div>
21
+
22
+ </div>
23
+ {% endblock %}
24
+
@@ -1,12 +1,9 @@
1
- {% extends 'django_spire/page/full_page.html' %}
1
+ {% extends 'django_spire/theme/page/theme_page.html' %}
2
2
 
3
- {% block full_page_content %}
4
- <div class="container">
5
- <div class="mb-4">
6
- {% url 'django_spire:theme:page:dashboard' as dashboard_url %}
7
- {% include 'django_spire/button/primary_outlined_button.html' with button_text="Back to Dashboard" button_icon="bi bi-arrow-left" button_href=dashboard_url %}
8
- </div>
3
+ {% block theme_content %}
4
+ {% include 'django_spire/theme/section/typography_section.html' %}
5
+ {% endblock %}
9
6
 
10
- {% include 'django_spire/theme/section/typography_section.html' %}
11
- </div>
7
+ {% block theme_on_card_content %}
8
+ {% include 'django_spire/theme/section/typography_section_card.html' %}
12
9
  {% endblock %}
@@ -0,0 +1,5 @@
1
+ {% extends 'django_spire/card/card.html' %}
2
+
3
+ {% block card_content %}
4
+ {% include 'django_spire/theme/section/badge_section.html' %}
5
+ {% endblock %}
@@ -0,0 +1,5 @@
1
+ {% extends 'django_spire/card/card.html' %}
2
+
3
+ {% block card_content %}
4
+ {% include 'django_spire/theme/section/border_section.html' %}
5
+ {% endblock %}
@@ -23,6 +23,7 @@
23
23
  <div class="col-6">
24
24
  <h5>Outlined Buttons</h5>
25
25
  <div class="mb-2">{% include 'django_spire/button/primary_outlined_button.html' with button_text='Primary Outlined' %}</div>
26
+ <div class="mb-2">{% include 'django_spire/button/primary_dark_outlined_button.html' with button_text='Primary Dark Outlined' %}</div>
26
27
  <div class="mb-2">{% include 'django_spire/button/secondary_outlined_button.html' with button_text='Secondary Outlined' %}</div>
27
28
  <div class="mb-2">{% include 'django_spire/button/accent_outlined_button.html' with button_text='Accent Outlined' %}</div>
28
29
  <div class="pt-2 mb-2">{% include 'django_spire/button/success_outlined_button.html' with button_text='Success Outlined' %}</div>
@@ -0,0 +1,5 @@
1
+ {% extends 'django_spire/card/card.html' %}
2
+
3
+ {% block card_content %}
4
+ {% include 'django_spire/theme/section/button_section.html' %}
5
+ {% endblock %}
@@ -1,40 +1,42 @@
1
1
  <h2 class="mb-4">Colour Palette</h2>
2
2
 
3
3
  <div class="row mb-5">
4
- <div class="col-4">
4
+ <div class="col-6">
5
5
  <h5>Primary Colors</h5>
6
6
  <div class="mb-3 p-3 bg-app-primary">--app-primary</div>
7
7
  <div class="mb-3 p-3 bg-app-primary-soft">--app-primary-soft</div>
8
8
  <div class="mb-3 p-3 bg-app-primary-dark">--app-primary-dark</div>
9
9
  </div>
10
- <div class="col-4">
10
+ <div class="col-6">
11
11
  <h5>Secondary Colors</h5>
12
12
  <div class="mb-3 p-3 bg-app-secondary">--app-secondary</div>
13
13
  <div class="mb-3 p-3 bg-app-secondary-soft">--app-secondary-soft</div>
14
14
  <div class="mb-3 p-3 bg-app-secondary-dark">--app-secondary-dark</div>
15
15
  </div>
16
- <div class="col-4">
16
+ </div>
17
+ <div class="row mb-5">
18
+ <div class="col-6">
17
19
  <h5>Accent Colors</h5>
18
20
  <div class="mb-3 p-3 bg-app-accent">--app-accent</div>
19
21
  <div class="mb-3 p-3 bg-app-accent-soft">--app-accent-soft</div>
20
22
  <div class="mb-3 p-3 bg-app-accent-dark">--app-accent-dark</div>
21
23
  </div>
22
- </div>
23
24
 
24
- <div class="row mb-5">
25
- <div class="col-4">
25
+ <div class="col-6">
26
26
  <h5>Success Colors</h5>
27
27
  <div class="mb-3 p-3 bg-app-success">--app-success</div>
28
28
  <div class="mb-3 p-3 bg-app-success-soft">--app-success-soft</div>
29
29
  <div class="mb-3 p-3 bg-app-success-dark">--app-success-dark</div>
30
30
  </div>
31
- <div class="col-4">
31
+ </div>
32
+ <div class="row mb-5">
33
+ <div class="col-6">
32
34
  <h5>Warning Colors</h5>
33
35
  <div class="mb-3 p-3 bg-app-warning">--app-warning</div>
34
36
  <div class="mb-3 p-3 bg-app-warning-soft">--app-warning-soft</div>
35
37
  <div class="mb-3 p-3 bg-app-warning-dark">--app-warning-dark</div>
36
38
  </div>
37
- <div class="col-4">
39
+ <div class="col-6">
38
40
  <h5>Danger Colors</h5>
39
41
  <div class="mb-3 p-3 bg-app-danger">--app-danger</div>
40
42
  <div class="mb-3 p-3 bg-app-danger-soft">--app-danger-soft</div>
@@ -73,8 +75,6 @@
73
75
  </div>
74
76
  </div>
75
77
 
76
- <div class="row mb-5">
77
-
78
78
  <div class="row mb-5">
79
79
  <h5>Complete Color Palette</h5>
80
80
  <div class="d-flex flex-wrap">
@@ -0,0 +1,5 @@
1
+ {% extends 'django_spire/card/card.html' %}
2
+
3
+ {% block card_content %}
4
+ {% include 'django_spire/theme/section/color_section.html' %}
5
+ {% endblock %}