flask-construct-ui 0.14.0__tar.gz → 0.16.0__tar.gz
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.
- flask_construct_ui-0.16.0/.gitea/workflows/publish.yml +50 -0
- flask_construct_ui-0.16.0/.gitignore +133 -0
- flask_construct_ui-0.16.0/.gitlab/ci/release.gitlab-ci.yml +77 -0
- flask_construct_ui-0.16.0/.gitlab/ci/sbom-audit.gitlab-ci.yml +13 -0
- flask_construct_ui-0.16.0/.gitlab/ci/security-scans.gitlab-ci.yml +8 -0
- flask_construct_ui-0.16.0/.gitlab-ci.yml +34 -0
- flask_construct_ui-0.16.0/.semgrepignore +8 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/PKG-INFO +1 -1
- flask_construct_ui-0.16.0/auth_example/__init__.py +128 -0
- flask_construct_ui-0.16.0/auth_example/menu.py +126 -0
- flask_construct_ui-0.16.0/auth_example/navbar_features.py +68 -0
- flask_construct_ui-0.16.0/auth_example/pages.py +188 -0
- flask_construct_ui-0.16.0/behave.ini +4 -0
- flask_construct_ui-0.16.0/dev/audit_report.py +192 -0
- flask_construct_ui-0.16.0/dev/check_contrast.py +61 -0
- flask_construct_ui-0.16.0/dev/docker-compose.yml +40 -0
- flask_construct_ui-0.16.0/dev/dump_pages.py +172 -0
- flask_construct_ui-0.16.0/dev/material_symbol_names.py +52 -0
- flask_construct_ui-0.16.0/dev/oidc-mock-login.html +75 -0
- flask_construct_ui-0.16.0/dev/run_behave.py +166 -0
- flask_construct_ui-0.16.0/examples/__init__.py +436 -0
- flask_construct_ui-0.16.0/examples/advanced_crud_demo.py +206 -0
- flask_construct_ui-0.16.0/examples/attachments_demo.py +68 -0
- flask_construct_ui-0.16.0/examples/child_crud_demo.py +159 -0
- flask_construct_ui-0.16.0/examples/config_demo.py +251 -0
- flask_construct_ui-0.16.0/examples/dynamic_crud_demo.py +81 -0
- flask_construct_ui-0.16.0/examples/dynamic_menu_demo.py +344 -0
- flask_construct_ui-0.16.0/examples/form_scripts_demo.py +217 -0
- flask_construct_ui-0.16.0/examples/grid_demo.py +214 -0
- flask_construct_ui-0.16.0/examples/kanban_demo.py +280 -0
- flask_construct_ui-0.16.0/examples/live_demo.py +209 -0
- flask_construct_ui-0.16.0/examples/navbar_features.py +101 -0
- flask_construct_ui-0.16.0/examples/planning_demo.py +637 -0
- flask_construct_ui-0.16.0/examples/relations_demo.py +228 -0
- flask_construct_ui-0.16.0/examples/side_panel_demo.py +228 -0
- flask_construct_ui-0.16.0/examples/validation_demo.py +93 -0
- flask_construct_ui-0.16.0/flake.lock +27 -0
- flask_construct_ui-0.16.0/flake.nix +189 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/__init__.py +4 -0
- flask_construct_ui-0.16.0/flask_construct_ui/_version.py +12 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/app_hooks.py +30 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/audit.py +83 -6
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/base.py +203 -5
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/__init__.py +24 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/content.py +96 -2
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/core.py +6 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/dashboard.py +51 -5
- flask_construct_ui-0.16.0/flask_construct_ui/components/filter_bar.py +288 -0
- flask_construct_ui-0.16.0/flask_construct_ui/components/kanban.py +364 -0
- flask_construct_ui-0.16.0/flask_construct_ui/components/legend.py +111 -0
- flask_construct_ui-0.16.0/flask_construct_ui/components/page_header.py +78 -0
- flask_construct_ui-0.16.0/flask_construct_ui/components/segmented.py +108 -0
- flask_construct_ui-0.16.0/flask_construct_ui/components/side_panel.py +125 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/contrast.py +54 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/crud.py +532 -25
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/data.py +11 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/data_sqlalchemy.py +13 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/forms.py +35 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/icons.py +7 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/l10n/en/main.flt +39 -1
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/l10n/sv/main.flt +38 -2
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/language.py +38 -0
- flask_construct_ui-0.16.0/flask_construct_ui/list_rows.py +106 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/localized.py +192 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/menu.py +91 -7
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/rcrud.py +42 -2
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/schema.py +248 -11
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/css/whitelabel.css +1822 -50
- flask_construct_ui-0.16.0/flask_construct_ui/static/js/construct-core.min.js +2 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/js/kanban-dnd.js +63 -4
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/audit/page.html +2 -3
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/_alert.html +41 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/_badge.html +21 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/_empty_state.html +22 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/_form_actions.html +24 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/_legend.html +36 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/_page_header.html +38 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/_progress.html +62 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/_segmented.html +28 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/_stat.html +65 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/alert.html +6 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/badge.html +4 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/chart_native.html +1 -1
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/empty_state.html +5 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/filter_bar.html +61 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/form.html +11 -12
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/kanban.html +189 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/legend.html +4 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/live.html +8 -9
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/main.html +7 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/page_header.html +6 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/period_nav.html +2 -10
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/progress.html +5 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/segmented.html +4 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/side_panel.html +24 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/stat.html +6 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/components/table.html +54 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/crud/_actions.html +185 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/crud/_macros.html +390 -303
- flask_construct_ui-0.16.0/flask_construct_ui/templates/crud/_panel_form.html +38 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/crud/create.html +7 -14
- flask_construct_ui-0.16.0/flask_construct_ui/templates/crud/edit.html +60 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/crud/listindex.html +385 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/crud/related_crud_tab_form.html +4 -2
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/crud/related_crud_tab_list.html +92 -77
- flask_construct_ui-0.16.0/flask_construct_ui/templates/crud/tab_view.html +19 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/crud/trash.html +12 -0
- flask_construct_ui-0.16.0/flask_construct_ui/templates/crud/view.html +52 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/navbar/language.html +1 -1
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/navbar/search_results.html +2 -6
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/style/base_full.html +39 -13
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/style/base_partial.html +7 -1
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui.egg-info/PKG-INFO +1 -1
- flask_construct_ui-0.16.0/flask_construct_ui.egg-info/SOURCES.txt +467 -0
- flask_construct_ui-0.16.0/flask_construct_ui.egg-info/scm_file_list.json +465 -0
- flask_construct_ui-0.16.0/frontend/eslint.config.js +36 -0
- flask_construct_ui-0.16.0/frontend/package-lock.json +2097 -0
- flask_construct_ui-0.16.0/frontend/package.json +40 -0
- flask_construct_ui-0.16.0/frontend/src/core.js +2668 -0
- flask_construct_ui-0.16.0/frontend/src/dragdrop.js +246 -0
- flask_construct_ui-0.16.0/frontend/src/editor.js +187 -0
- flask_construct_ui-0.16.0/frontend/src/grid/api.js +74 -0
- flask_construct_ui-0.16.0/frontend/src/grid/cells.js +111 -0
- flask_construct_ui-0.16.0/frontend/src/grid/grid.js +565 -0
- flask_construct_ui-0.16.0/frontend/src/grid.js +30 -0
- flask_construct_ui-0.16.0/frontend/src/tips.js +198 -0
- flask_construct_ui-0.16.0/frontend/test/auth_guard.test.js +250 -0
- flask_construct_ui-0.16.0/frontend/test/axe.test.js +167 -0
- flask_construct_ui-0.16.0/frontend/test/committed_bundle.test.js +88 -0
- flask_construct_ui-0.16.0/frontend/test/core.test.js +448 -0
- flask_construct_ui-0.16.0/frontend/test/editor.test.js +113 -0
- flask_construct_ui-0.16.0/frontend/test/fixtures/live_app.py +195 -0
- flask_construct_ui-0.16.0/frontend/test/fixtures/real_forms_app.py +566 -0
- flask_construct_ui-0.16.0/frontend/test/fixtures/row_menu_app.py +75 -0
- flask_construct_ui-0.16.0/frontend/test/fixtures/side_panel_app.py +104 -0
- flask_construct_ui-0.16.0/frontend/test/grid.test.js +589 -0
- flask_construct_ui-0.16.0/frontend/test/grid_harness.js +348 -0
- flask_construct_ui-0.16.0/frontend/test/live_refresh.test.js +587 -0
- flask_construct_ui-0.16.0/frontend/test/menu_current.test.js +198 -0
- flask_construct_ui-0.16.0/frontend/test/menu_state.test.js +382 -0
- flask_construct_ui-0.16.0/frontend/test/picker.test.js +282 -0
- flask_construct_ui-0.16.0/frontend/test/real_forms.test.js +963 -0
- flask_construct_ui-0.16.0/frontend/test/reflow.test.js +385 -0
- flask_construct_ui-0.16.0/frontend/test/row_menu.test.js +245 -0
- flask_construct_ui-0.16.0/frontend/test/side_panel.test.js +301 -0
- flask_construct_ui-0.16.0/l10n/en/main.flt +205 -0
- flask_construct_ui-0.16.0/l10n/sv/main.flt +205 -0
- flask_construct_ui-0.16.0/manual/accessibility.org +628 -0
- flask_construct_ui-0.16.0/manual/architecture.png +0 -0
- flask_construct_ui-0.16.0/manual/audit.org +438 -0
- flask_construct_ui-0.16.0/manual/component_tree.png +0 -0
- flask_construct_ui-0.16.0/manual/components.org +1108 -0
- flask_construct_ui-0.16.0/manual/customization.org +352 -0
- flask_construct_ui-0.16.0/manual/data.org +687 -0
- flask_construct_ui-0.16.0/manual/examples.org +113 -0
- flask_construct_ui-0.16.0/manual/extensions.org +262 -0
- flask_construct_ui-0.16.0/manual/getting-started.org +777 -0
- flask_construct_ui-0.16.0/manual/grid.org +223 -0
- flask_construct_ui-0.16.0/manual/headless.org +249 -0
- flask_construct_ui-0.16.0/manual/index.org +26 -0
- flask_construct_ui-0.16.0/manual/kanban.org +324 -0
- flask_construct_ui-0.16.0/manual/l10n.org +354 -0
- flask_construct_ui-0.16.0/manual/menu.org +295 -0
- flask_construct_ui-0.16.0/manual/navbar.org +218 -0
- flask_construct_ui-0.16.0/manual/pages.org +1803 -0
- flask_construct_ui-0.16.0/manual/pivot.org +286 -0
- flask_construct_ui-0.16.0/manual/presence.org +152 -0
- flask_construct_ui-0.16.0/manual/validation_rules.org +95 -0
- flask_construct_ui-0.16.0/manual/whitelabel.org +511 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/pyproject.toml +10 -2
- flask_construct_ui-0.16.0/sbom.cdx.json +3132 -0
- flask_construct_ui-0.16.0/security_todo.org +404 -0
- flask_construct_ui-0.16.0/technical/architecture.org +1599 -0
- flask_construct_ui-0.16.0/technical/container_diagram.png +0 -0
- flask_construct_ui-0.16.0/technical/data_flow.png +0 -0
- flask_construct_ui-0.16.0/technical/live_sequence.png +0 -0
- flask_construct_ui-0.16.0/technical/page_hierarchy.png +0 -0
- flask_construct_ui-0.16.0/technical/system_context.png +0 -0
- flask_construct_ui-0.16.0/technical/template_flow.png +0 -0
- flask_construct_ui-0.16.0/tests/bdd/environment.py +55 -0
- flask_construct_ui-0.16.0/tests/bdd/features/accessibility.feature +129 -0
- flask_construct_ui-0.16.0/tests/bdd/features/app_l10n_dir.feature +48 -0
- flask_construct_ui-0.16.0/tests/bdd/features/audit_history.feature +535 -0
- flask_construct_ui-0.16.0/tests/bdd/features/auth.feature +113 -0
- flask_construct_ui-0.16.0/tests/bdd/features/auth_providers.feature +96 -0
- flask_construct_ui-0.16.0/tests/bdd/features/back_button.feature +88 -0
- flask_construct_ui-0.16.0/tests/bdd/features/base_pages.feature +131 -0
- flask_construct_ui-0.16.0/tests/bdd/features/bulk_actions.feature +147 -0
- flask_construct_ui-0.16.0/tests/bdd/features/chart_native.feature +73 -0
- flask_construct_ui-0.16.0/tests/bdd/features/components.feature +161 -0
- flask_construct_ui-0.16.0/tests/bdd/features/components_coverage.feature +777 -0
- flask_construct_ui-0.16.0/tests/bdd/features/components_dict.feature +76 -0
- flask_construct_ui-0.16.0/tests/bdd/features/confirm.feature +170 -0
- flask_construct_ui-0.16.0/tests/bdd/features/crud.feature +268 -0
- flask_construct_ui-0.16.0/tests/bdd/features/crud_capabilities.feature +243 -0
- flask_construct_ui-0.16.0/tests/bdd/features/crud_form_parsing.feature +105 -0
- flask_construct_ui-0.16.0/tests/bdd/features/crud_header.feature +98 -0
- flask_construct_ui-0.16.0/tests/bdd/features/crud_panel.feature +129 -0
- flask_construct_ui-0.16.0/tests/bdd/features/crud_row_options.feature +220 -0
- flask_construct_ui-0.16.0/tests/bdd/features/csrf.feature +38 -0
- flask_construct_ui-0.16.0/tests/bdd/features/dashboard_components.feature +420 -0
- flask_construct_ui-0.16.0/tests/bdd/features/data.feature +97 -0
- flask_construct_ui-0.16.0/tests/bdd/features/data_sqlalchemy.feature +68 -0
- flask_construct_ui-0.16.0/tests/bdd/features/date_fields.feature +56 -0
- flask_construct_ui-0.16.0/tests/bdd/features/display_filter.feature +55 -0
- flask_construct_ui-0.16.0/tests/bdd/features/drag_drop.feature +49 -0
- flask_construct_ui-0.16.0/tests/bdd/features/dynamic_crud.feature +91 -0
- flask_construct_ui-0.16.0/tests/bdd/features/dynamic_menu.feature +167 -0
- flask_construct_ui-0.16.0/tests/bdd/features/enum_icons.feature +40 -0
- flask_construct_ui-0.16.0/tests/bdd/features/error_statuses.feature +62 -0
- flask_construct_ui-0.16.0/tests/bdd/features/extensions.feature +61 -0
- flask_construct_ui-0.16.0/tests/bdd/features/field_defaults.feature +71 -0
- flask_construct_ui-0.16.0/tests/bdd/features/field_flags.feature +64 -0
- flask_construct_ui-0.16.0/tests/bdd/features/field_help.feature +148 -0
- flask_construct_ui-0.16.0/tests/bdd/features/field_types.feature +130 -0
- flask_construct_ui-0.16.0/tests/bdd/features/file_fields.feature +209 -0
- flask_construct_ui-0.16.0/tests/bdd/features/filter_bar.feature +88 -0
- flask_construct_ui-0.16.0/tests/bdd/features/filter_security.feature +84 -0
- flask_construct_ui-0.16.0/tests/bdd/features/flashes.feature +53 -0
- flask_construct_ui-0.16.0/tests/bdd/features/footer.feature +108 -0
- flask_construct_ui-0.16.0/tests/bdd/features/form_actions.feature +35 -0
- flask_construct_ui-0.16.0/tests/bdd/features/form_layout.feature +119 -0
- flask_construct_ui-0.16.0/tests/bdd/features/grid.feature +229 -0
- flask_construct_ui-0.16.0/tests/bdd/features/headless.feature +79 -0
- flask_construct_ui-0.16.0/tests/bdd/features/icons.feature +152 -0
- flask_construct_ui-0.16.0/tests/bdd/features/inline_styles.feature +40 -0
- flask_construct_ui-0.16.0/tests/bdd/features/kanban.feature +185 -0
- flask_construct_ui-0.16.0/tests/bdd/features/l10n.feature +83 -0
- flask_construct_ui-0.16.0/tests/bdd/features/l10n_enum.feature +41 -0
- flask_construct_ui-0.16.0/tests/bdd/features/l10n_labels.feature +85 -0
- flask_construct_ui-0.16.0/tests/bdd/features/language_choice.feature +98 -0
- flask_construct_ui-0.16.0/tests/bdd/features/legend.feature +42 -0
- flask_construct_ui-0.16.0/tests/bdd/features/list_query.feature +39 -0
- flask_construct_ui-0.16.0/tests/bdd/features/list_sort.feature +126 -0
- flask_construct_ui-0.16.0/tests/bdd/features/live.feature +305 -0
- flask_construct_ui-0.16.0/tests/bdd/features/live_broker_clients.feature +97 -0
- flask_construct_ui-0.16.0/tests/bdd/features/live_refresh.feature +334 -0
- flask_construct_ui-0.16.0/tests/bdd/features/live_topics.feature +168 -0
- flask_construct_ui-0.16.0/tests/bdd/features/localized_display.feature +144 -0
- flask_construct_ui-0.16.0/tests/bdd/features/login_return.feature +430 -0
- flask_construct_ui-0.16.0/tests/bdd/features/lost_update.feature +154 -0
- flask_construct_ui-0.16.0/tests/bdd/features/many_related_create.feature +131 -0
- flask_construct_ui-0.16.0/tests/bdd/features/menu_current.feature +66 -0
- flask_construct_ui-0.16.0/tests/bdd/features/menu_sections.feature +23 -0
- flask_construct_ui-0.16.0/tests/bdd/features/navbar_features.feature +73 -0
- flask_construct_ui-0.16.0/tests/bdd/features/next_redirect.feature +173 -0
- flask_construct_ui-0.16.0/tests/bdd/features/page_actions.feature +101 -0
- flask_construct_ui-0.16.0/tests/bdd/features/page_header.feature +71 -0
- flask_construct_ui-0.16.0/tests/bdd/features/pagination.feature +166 -0
- flask_construct_ui-0.16.0/tests/bdd/features/parent_scoping.feature +103 -0
- flask_construct_ui-0.16.0/tests/bdd/features/period_nav.feature +67 -0
- flask_construct_ui-0.16.0/tests/bdd/features/pivot_form.feature +139 -0
- flask_construct_ui-0.16.0/tests/bdd/features/post_actions.feature +109 -0
- flask_construct_ui-0.16.0/tests/bdd/features/presence.feature +157 -0
- flask_construct_ui-0.16.0/tests/bdd/features/qbe.feature +143 -0
- flask_construct_ui-0.16.0/tests/bdd/features/query_string_helpers.feature +81 -0
- flask_construct_ui-0.16.0/tests/bdd/features/rcrud_actions.feature +147 -0
- flask_construct_ui-0.16.0/tests/bdd/features/rcrud_form_fields.feature +181 -0
- flask_construct_ui-0.16.0/tests/bdd/features/rcrud_parent_scope.feature +36 -0
- flask_construct_ui-0.16.0/tests/bdd/features/rcrud_search_filter.feature +83 -0
- flask_construct_ui-0.16.0/tests/bdd/features/rcrud_tab_capabilities.feature +191 -0
- flask_construct_ui-0.16.0/tests/bdd/features/readonly_related.feature +97 -0
- flask_construct_ui-0.16.0/tests/bdd/features/related_form_value.feature +83 -0
- flask_construct_ui-0.16.0/tests/bdd/features/related_joins.feature +35 -0
- flask_construct_ui-0.16.0/tests/bdd/features/reorder.feature +255 -0
- flask_construct_ui-0.16.0/tests/bdd/features/route_capabilities.feature +142 -0
- flask_construct_ui-0.16.0/tests/bdd/features/segmented_control.feature +60 -0
- flask_construct_ui-0.16.0/tests/bdd/features/shell_options.feature +51 -0
- flask_construct_ui-0.16.0/tests/bdd/features/side_panel.feature +85 -0
- flask_construct_ui-0.16.0/tests/bdd/features/submenu.feature +51 -0
- flask_construct_ui-0.16.0/tests/bdd/features/table.feature +111 -0
- flask_construct_ui-0.16.0/tests/bdd/features/timezones.feature +97 -0
- flask_construct_ui-0.16.0/tests/bdd/features/trailing_slash.feature +34 -0
- flask_construct_ui-0.16.0/tests/bdd/features/url_helpers.feature +39 -0
- flask_construct_ui-0.16.0/tests/bdd/features/validation.feature +410 -0
- flask_construct_ui-0.16.0/tests/bdd/features/visibility.feature +76 -0
- flask_construct_ui-0.16.0/tests/bdd/features/whitelabel_design.feature +175 -0
- flask_construct_ui-0.16.0/tests/bdd/features/xss.feature +76 -0
- flask_construct_ui-0.16.0/tests/bdd/fixtures/__init__.py +0 -0
- flask_construct_ui-0.16.0/tests/bdd/fixtures/factory.py +2837 -0
- flask_construct_ui-0.16.0/tests/bdd/fixtures/models.py +972 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/__init__.py +0 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/a11y_steps.py +466 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/app_l10n_dir_steps.py +125 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/audit_history_steps.py +1303 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/auth_steps.py +535 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/base_page_steps.py +768 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/bulk_action_steps.py +260 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/capability_steps.py +81 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/chart_native_steps.py +198 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/component_steps.py +760 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/confirm_steps.py +135 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/crud_form_parsing_steps.py +69 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/crud_header_steps.py +79 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/crud_panel_steps.py +29 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/crud_steps.py +617 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/csrf_steps.py +101 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/dashboard_steps.py +143 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/data_sqlalchemy_steps.py +342 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/data_steps.py +304 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/date_field_steps.py +201 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/design_steps.py +176 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/display_filter_steps.py +193 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/drag_drop_steps.py +49 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/dynamic_menu_steps.py +197 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/enum_icons_steps.py +191 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/error_status_steps.py +113 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/extension_steps.py +267 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/field_help_steps.py +83 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/field_type_steps.py +365 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/file_field_steps.py +681 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/filter_bar_steps.py +173 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/flashes_steps.py +131 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/footer_steps.py +191 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/form_actions_steps.py +67 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/grid_steps.py +382 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/headless_steps.py +146 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/icon_steps.py +270 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/inline_style_steps.py +50 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/kanban_steps.py +301 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/l10n_labels_steps.py +321 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/l10n_steps.py +188 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/language_choice_steps.py +217 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/layout_steps.py +163 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/legend_steps.py +49 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/list_query_steps.py +186 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/list_sort_steps.py +149 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/live_broker_client_steps.py +236 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/live_refresh_steps.py +962 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/live_steps.py +188 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/live_topics_steps.py +324 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/localized_steps.py +237 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/login_return_steps.py +535 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/lost_update_steps.py +349 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/many_related_create_steps.py +295 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/menu_current_steps.py +78 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/menu_sections_steps.py +77 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/next_redirect_steps.py +47 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/page_action_steps.py +85 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/page_header_steps.py +104 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/pagination_steps.py +139 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/period_nav_steps.py +137 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/pivot_form_steps.py +338 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/post_action_steps.py +162 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/presence_steps.py +307 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/qbe_steps.py +154 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/query_string_steps.py +15 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/rcrud_parent_scope_steps.py +106 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/rcrud_search_filter_steps.py +29 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/rcrud_tab_capabilities_steps.py +132 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/related_form_steps.py +284 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/related_join_steps.py +119 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/reorder_steps.py +243 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/route_capability_steps.py +117 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/row_options_steps.py +81 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/segmented_steps.py +175 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/shell_options_steps.py +128 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/side_panel_steps.py +153 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/timezone_steps.py +269 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/trailing_slash_steps.py +76 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/validation_steps.py +549 -0
- flask_construct_ui-0.16.0/tests/bdd/steps/xss_steps.py +221 -0
- flask_construct_ui-0.16.0/theme_example/__init__.py +131 -0
- flask_construct_ui-0.16.0/theme_example/navbar_features.py +68 -0
- flask_construct_ui-0.16.0/theme_example/pages.py +1134 -0
- flask_construct_ui-0.16.0/theme_example/static/designs/aurora.css +105 -0
- flask_construct_ui-0.16.0/theme_example/static/designs/bloom.css +98 -0
- flask_construct_ui-0.16.0/theme_example/static/designs/ledger.css +115 -0
- flask_construct_ui-0.16.0/theme_example/templates/structure/base.html +82 -0
- flask_construct_ui-0.16.0/tox.ini +20 -0
- flask_construct_ui-0.16.0/uv.lock +1928 -0
- flask_construct_ui-0.14.0/flask_construct_ui/components/kanban.py +0 -212
- flask_construct_ui-0.14.0/flask_construct_ui/static/js/construct-core.min.js +0 -2
- flask_construct_ui-0.14.0/flask_construct_ui/templates/components/alert.html +0 -24
- flask_construct_ui-0.14.0/flask_construct_ui/templates/components/badge.html +0 -5
- flask_construct_ui-0.14.0/flask_construct_ui/templates/components/empty_state.html +0 -9
- flask_construct_ui-0.14.0/flask_construct_ui/templates/components/kanban.html +0 -126
- flask_construct_ui-0.14.0/flask_construct_ui/templates/components/main.html +0 -4
- flask_construct_ui-0.14.0/flask_construct_ui/templates/components/progress.html +0 -30
- flask_construct_ui-0.14.0/flask_construct_ui/templates/components/stat.html +0 -30
- flask_construct_ui-0.14.0/flask_construct_ui/templates/components/table.html +0 -30
- flask_construct_ui-0.14.0/flask_construct_ui/templates/crud/_actions.html +0 -92
- flask_construct_ui-0.14.0/flask_construct_ui/templates/crud/edit.html +0 -122
- flask_construct_ui-0.14.0/flask_construct_ui/templates/crud/listindex.html +0 -330
- flask_construct_ui-0.14.0/flask_construct_ui/templates/crud/tab_view.html +0 -41
- flask_construct_ui-0.14.0/flask_construct_ui/templates/crud/trash.html +0 -19
- flask_construct_ui-0.14.0/flask_construct_ui/templates/crud/view.html +0 -61
- flask_construct_ui-0.14.0/flask_construct_ui.egg-info/SOURCES.txt +0 -152
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/LICENSE +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/README.md +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/audit_display.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/audit_page.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/auth.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/bulk.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/capabilities.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/cli.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/calendar.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/chart.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/chart_native.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/grid.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/layout.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/live.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/period.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/pivot.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/components/timeline.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/confirm.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/crud_forms.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/csrf.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/dragdrop.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/errors.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/files.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/flashes.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/grid.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/headless.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/layout.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/list_sort.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/live.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/navbar.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/navigation.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/orgmode.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/pagination.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/presence.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/py.typed +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/resume.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/sanitize.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/css/grid.css +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/css/prosemirror-bundle.min.css +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/css/unpoly.min.css +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/designs/adminlte.css +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/designs/sandstone.css +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/fonts/bootstrap-icons/LICENSE.txt +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/fonts/bootstrap-icons/bootstrap-icons.min.css +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/fonts/bootstrap-icons/fonts/bootstrap-icons.woff +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/fonts/bootstrap-icons/fonts/bootstrap-icons.woff2 +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/fonts/material-symbols/LICENSE.txt +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/fonts/material-symbols/material-symbols-outlined.woff2 +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/fonts/material-symbols/material-symbols.css +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/fonts/material-symbols/names.txt +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/js/construct-grid.min.js +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/js/prosemirror-bundle.min.js +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/static/js/unpoly.min.js +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/_form_field.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/_presence_body.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/button.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/calendar.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/calendarmini.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/card.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/chart.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/grid.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/grid_layout.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/grid_notice.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/horizontal_layout.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/live_refresh.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/markup.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/pivot_form.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/presence.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/rich_text.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/tabs.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/text.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/timeline.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/components/vertical_layout.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/confirm/_form.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/confirm/interstitial.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/crud/_audit_changes.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/crud/_many_related_options.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/crud/_related_options.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/crud/_restore_form.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/crud/history.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/crud/history_version.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/errors/error.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/errors/forbidden.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/navbar/notifications.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/structure/base.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/structure/public.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/style/_flashes.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/style/_footer.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/templates/style/_menu.html +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/testing.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/timezones.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/urls.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/validation.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui/versioning.py +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui.egg-info/dependency_links.txt +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui.egg-info/requires.txt +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/flask_construct_ui.egg-info/top_level.txt +0 -0
- {flask_construct_ui-0.14.0 → flask_construct_ui-0.16.0}/setup.cfg +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Publish package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: 22
|
|
17
|
+
|
|
18
|
+
- name: Build frontend assets
|
|
19
|
+
working-directory: frontend
|
|
20
|
+
run: |
|
|
21
|
+
npm ci
|
|
22
|
+
npm run build
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@v6
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
|
|
29
|
+
# The version is the tag. Pinning it (instead of letting setuptools-scm
|
|
30
|
+
# read git) keeps it exact even though the frontend build rewrote
|
|
31
|
+
# tracked files under static/ and left the tree "dirty".
|
|
32
|
+
- name: Build sdist and wheel
|
|
33
|
+
env:
|
|
34
|
+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.ref_name }}
|
|
35
|
+
run: |
|
|
36
|
+
uv build
|
|
37
|
+
VERSION="${GITHUB_REF_NAME#v}"
|
|
38
|
+
if ! ls dist/ | grep -q "^flask_construct_ui-${VERSION}-"; then
|
|
39
|
+
echo "Built package version does not match tag $GITHUB_REF_NAME:" >&2
|
|
40
|
+
ls dist/ >&2
|
|
41
|
+
exit 1
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
- name: Publish to Gitea package registry
|
|
45
|
+
env:
|
|
46
|
+
UV_PUBLISH_URL: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/pypi
|
|
47
|
+
UV_PUBLISH_CHECK_URL: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/pypi/simple/
|
|
48
|
+
UV_PUBLISH_USERNAME: ${{ github.actor }}
|
|
49
|
+
UV_PUBLISH_PASSWORD: ${{ secrets.PUBLISHPACKAGETOKEN }}
|
|
50
|
+
run: uv publish
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install different versions of packages depending
|
|
91
|
+
# on the platform. Pipfile.lock may vary on different platforms.
|
|
92
|
+
# In such cases, it may be desirable to ignore Pipfile.lock since it is platform-specific.
|
|
93
|
+
# Pipfile.lock
|
|
94
|
+
|
|
95
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
96
|
+
__pypackages__/
|
|
97
|
+
|
|
98
|
+
# Celery stuff
|
|
99
|
+
celerybeat-schedule
|
|
100
|
+
celerybeat.pid
|
|
101
|
+
|
|
102
|
+
# SageMath parsed files
|
|
103
|
+
*.sage.py
|
|
104
|
+
|
|
105
|
+
# Environments
|
|
106
|
+
.env
|
|
107
|
+
.venv
|
|
108
|
+
env/
|
|
109
|
+
venv/
|
|
110
|
+
ENV/
|
|
111
|
+
env.bak/
|
|
112
|
+
venv.bak/
|
|
113
|
+
|
|
114
|
+
# Spyder project settings
|
|
115
|
+
.spyderproject
|
|
116
|
+
.spyproject
|
|
117
|
+
|
|
118
|
+
# Rope project settings
|
|
119
|
+
.ropeproject
|
|
120
|
+
|
|
121
|
+
# mkdocs documentation
|
|
122
|
+
/site
|
|
123
|
+
|
|
124
|
+
# mypy
|
|
125
|
+
.mypy_cache/
|
|
126
|
+
.dmypy.json
|
|
127
|
+
dmypy.json
|
|
128
|
+
|
|
129
|
+
# Pyre type checker
|
|
130
|
+
.pyre/
|
|
131
|
+
/frontend/node_modules/
|
|
132
|
+
/examples.db
|
|
133
|
+
/advanced_examples.db
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Case 2: release on a vX.Y.Z tag pointing at the release branch — build
|
|
2
|
+
# frontend assets, then build and publish the package to PyPI with a
|
|
3
|
+
# project-scoped API token (see note on publish-pypi for why not OIDC).
|
|
4
|
+
#
|
|
5
|
+
# Tag pipelines are branch-detached in GitLab, so "tagged on the release
|
|
6
|
+
# branch" is enforced by check-release-branch: the tagged commit must be an
|
|
7
|
+
# ancestor of origin/release. A vX.Y.Z tag on any other branch fails there
|
|
8
|
+
# and nothing is published.
|
|
9
|
+
|
|
10
|
+
check-release-branch:
|
|
11
|
+
stage: test
|
|
12
|
+
image:
|
|
13
|
+
name: alpine/git:latest
|
|
14
|
+
entrypoint: [""]
|
|
15
|
+
variables:
|
|
16
|
+
GIT_DEPTH: "0" # full clone; ancestry checks need real history
|
|
17
|
+
rules:
|
|
18
|
+
- if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/'
|
|
19
|
+
script:
|
|
20
|
+
- git fetch origin release
|
|
21
|
+
- |
|
|
22
|
+
if ! git merge-base --is-ancestor "$CI_COMMIT_SHA" origin/release; then
|
|
23
|
+
echo "Tag $CI_COMMIT_TAG ($CI_COMMIT_SHA) is not on the release branch; refusing to release." >&2
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
frontend-assets:
|
|
28
|
+
stage: release
|
|
29
|
+
image: node:22
|
|
30
|
+
rules:
|
|
31
|
+
- if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/'
|
|
32
|
+
needs:
|
|
33
|
+
- check-release-branch
|
|
34
|
+
script:
|
|
35
|
+
- cd frontend
|
|
36
|
+
- npm ci
|
|
37
|
+
- npm run build
|
|
38
|
+
artifacts:
|
|
39
|
+
paths:
|
|
40
|
+
- flask_construct_ui/static/
|
|
41
|
+
expire_in: 1 hour
|
|
42
|
+
|
|
43
|
+
publish-pypi:
|
|
44
|
+
stage: release
|
|
45
|
+
image: ghcr.io/astral-sh/uv:python3.12-bookworm
|
|
46
|
+
rules:
|
|
47
|
+
- if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/'
|
|
48
|
+
needs:
|
|
49
|
+
- check-release-branch
|
|
50
|
+
- frontend-assets
|
|
51
|
+
# Trusted publishing (OIDC) is unavailable here: this project path was
|
|
52
|
+
# previously used by a different project, so GitLab only issues ID tokens
|
|
53
|
+
# whose `sub` starts with `project_id`, while PyPI requires it to start
|
|
54
|
+
# with `project_path` (warehouse/oidc/models/gitlab.py::_check_sub).
|
|
55
|
+
# Publish with a project-scoped PyPI API token instead: masked + protected
|
|
56
|
+
# CI/CD variable PYPI_API_TOKEN, plus a protected-tag rule for v*.
|
|
57
|
+
variables:
|
|
58
|
+
UV_PUBLISH_TOKEN: $PYPI_API_TOKEN
|
|
59
|
+
# The version is the tag. Pinning it here (instead of letting
|
|
60
|
+
# setuptools-scm read git) keeps it exact even though frontend-assets
|
|
61
|
+
# rebuilt tracked files under static/ and left the tree "dirty".
|
|
62
|
+
SETUPTOOLS_SCM_PRETEND_VERSION: $CI_COMMIT_TAG
|
|
63
|
+
script:
|
|
64
|
+
- uv build
|
|
65
|
+
- uvx twine check dist/*
|
|
66
|
+
- |
|
|
67
|
+
VERSION="${CI_COMMIT_TAG#v}"
|
|
68
|
+
if ! ls dist/ | grep -q "^flask_construct_ui-${VERSION}-"; then
|
|
69
|
+
echo "Built package version does not match tag $CI_COMMIT_TAG:" >&2
|
|
70
|
+
ls dist/ >&2
|
|
71
|
+
exit 1
|
|
72
|
+
fi
|
|
73
|
+
- uv publish
|
|
74
|
+
artifacts:
|
|
75
|
+
paths:
|
|
76
|
+
- dist/
|
|
77
|
+
expire_in: 1 week
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Case 3: scheduled (daily) audit of the committed CycloneDX SBOM
|
|
2
|
+
# (sbom.cdx.json, regenerated by `prj upgrade` / `prj sbom`) for newly
|
|
3
|
+
# published vulnerabilities. Runs ONLY on a pipeline schedule.
|
|
4
|
+
|
|
5
|
+
sbom-audit:
|
|
6
|
+
stage: audit
|
|
7
|
+
image:
|
|
8
|
+
name: aquasec/trivy:latest
|
|
9
|
+
entrypoint: [""]
|
|
10
|
+
rules:
|
|
11
|
+
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
12
|
+
script:
|
|
13
|
+
- trivy sbom --exit-code 1 sbom.cdx.json
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Case 1: master pushes — GitLab's standard SAST + secret detection templates.
|
|
2
|
+
# The workflow rules in .gitlab-ci.yml only allow branch pipelines on the
|
|
3
|
+
# default branch, so these run there and nowhere else; scheduled pipelines set
|
|
4
|
+
# SAST_DISABLED / SECRET_DETECTION_DISABLED.
|
|
5
|
+
|
|
6
|
+
include:
|
|
7
|
+
- template: Jobs/SAST.gitlab-ci.yml
|
|
8
|
+
- template: Jobs/Secret-Detection.gitlab-ci.yml
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Entry point for GitLab CI on the public mirror
|
|
2
|
+
# (https://gitlab.com/Resample2545/flask-construct-ui).
|
|
3
|
+
#
|
|
4
|
+
# GitLab has a single pipeline definition (no per-workflow files like
|
|
5
|
+
# .gitea/workflows/); the three run flavours live as local includes under
|
|
6
|
+
# .gitlab/ci/ and are gated by their own `rules:`:
|
|
7
|
+
#
|
|
8
|
+
# 1. Master pushes ... security-scans.gitlab-ci.yml (SAST + secret detection)
|
|
9
|
+
# 2. Tag vX.Y.Z ...... release.gitlab-ci.yml (build assets, publish to PyPI;
|
|
10
|
+
# the tagged commit must be on the release branch)
|
|
11
|
+
# 3. Schedule ........ sbom-audit.gitlab-ci.yml (CycloneDX vulnerability audit;
|
|
12
|
+
# configure a daily schedule in CI/CD -> Pipeline schedules)
|
|
13
|
+
|
|
14
|
+
stages:
|
|
15
|
+
- test
|
|
16
|
+
- audit
|
|
17
|
+
- release
|
|
18
|
+
|
|
19
|
+
include:
|
|
20
|
+
- local: .gitlab/ci/security-scans.gitlab-ci.yml
|
|
21
|
+
- local: .gitlab/ci/release.gitlab-ci.yml
|
|
22
|
+
- local: .gitlab/ci/sbom-audit.gitlab-ci.yml
|
|
23
|
+
|
|
24
|
+
workflow:
|
|
25
|
+
rules:
|
|
26
|
+
# Scheduled pipelines run only the SBOM audit; disable the scan templates there.
|
|
27
|
+
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
28
|
+
variables:
|
|
29
|
+
SAST_DISABLED: "true"
|
|
30
|
+
SECRET_DETECTION_DISABLED: "true"
|
|
31
|
+
- if: $CI_COMMIT_TAG
|
|
32
|
+
# Branch pipelines (SAST + secret detection) only on the default branch;
|
|
33
|
+
# pushes to release/feature branches create no pipeline at all.
|
|
34
|
+
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
dev/
|
|
2
|
+
examples/
|
|
3
|
+
tests/
|
|
4
|
+
|
|
5
|
+
# Minified build artifacts and vendored libraries — scan the source in
|
|
6
|
+
# frontend/src/ instead (construct-core.min.js is built from core.js;
|
|
7
|
+
# unpoly.min.js and prosemirror-bundle.min.js are third-party bundles).
|
|
8
|
+
flask_construct_ui/static/js/*.min.js
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"""Authentication example app.
|
|
2
|
+
|
|
3
|
+
A small runnable app that wires Flask-Construct-UI's fail-closed route guard to
|
|
4
|
+
a real OpenID Connect provider via Flask-OIDC. It demonstrates the three things
|
|
5
|
+
an application developer needs:
|
|
6
|
+
|
|
7
|
+
* passing an :class:`~flask_construct_ui.AuthProvider` to ``FlaskConstructUI``
|
|
8
|
+
so every construct route requires login by default,
|
|
9
|
+
* a public page that opts out with ``login_required = False``,
|
|
10
|
+
* a page gated on a group claim with ``required_groups`` — which also hides
|
|
11
|
+
that page's own menu entry from anyone outside the group,
|
|
12
|
+
* menu entries generated per request from the groups a user actually holds
|
|
13
|
+
(see ``menu.py``),
|
|
14
|
+
* a server-side session store, which an OIDC app needs (see below).
|
|
15
|
+
|
|
16
|
+
The provider is a local mock served by docker-compose (no real IdP needed).
|
|
17
|
+
Run it with::
|
|
18
|
+
|
|
19
|
+
docker compose -f dev/docker-compose.yml up # start the mock IdP
|
|
20
|
+
nix develop --command prj auth-demo # then start this app
|
|
21
|
+
# or, without nix:
|
|
22
|
+
uv run flask --app auth_example run --debug
|
|
23
|
+
|
|
24
|
+
Then open http://localhost:5000/ and click a "Secured" menu item. On the mock
|
|
25
|
+
login page, set ``{"groups": ["admin"]}`` to also reach the Admin page.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
import os
|
|
29
|
+
import tempfile
|
|
30
|
+
|
|
31
|
+
from flask import Flask
|
|
32
|
+
from flask_oidc import OpenIDConnect
|
|
33
|
+
from flask_session import Session
|
|
34
|
+
|
|
35
|
+
from flask_construct_ui import FlaskConstructUI, FlaskOIDCAuth
|
|
36
|
+
|
|
37
|
+
from .menu import TeamToolsPage, register_menu
|
|
38
|
+
from .navbar_features import AuthDemoSearch, AuthDemoNotifications
|
|
39
|
+
from .pages import (
|
|
40
|
+
AdminPage,
|
|
41
|
+
DashboardPage,
|
|
42
|
+
HomePage,
|
|
43
|
+
ProfilePage,
|
|
44
|
+
ReportsPage,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
# Keep this in sync with the port published in dev/docker-compose.yml. It is a
|
|
48
|
+
# deliberately unusual port so it is unlikely to collide with anything else.
|
|
49
|
+
OIDC_PORT = int(os.environ.get("OIDC_PORT", "45980"))
|
|
50
|
+
ISSUER = f"http://localhost:{OIDC_PORT}/default"
|
|
51
|
+
|
|
52
|
+
app = Flask("auth_example")
|
|
53
|
+
# Example-only key. A real deployment must load a CSPRNG-generated secret from
|
|
54
|
+
# the environment -- see manual/getting-started.org, "Hardening a deployment".
|
|
55
|
+
app.secret_key = "development-key"
|
|
56
|
+
|
|
57
|
+
# Flask-OIDC discovers the provider's endpoints from the issuer's
|
|
58
|
+
# .well-known/openid-configuration. The mock server accepts any client and does
|
|
59
|
+
# not validate redirect URIs, so these values only have to be internally
|
|
60
|
+
# consistent.
|
|
61
|
+
app.config.update(
|
|
62
|
+
OIDC_CLIENT_SECRETS={
|
|
63
|
+
"web": {
|
|
64
|
+
"client_id": "flask-construct-ui",
|
|
65
|
+
"client_secret": "flask-construct-ui-secret",
|
|
66
|
+
"issuer": ISSUER,
|
|
67
|
+
"redirect_uris": ["http://localhost:5000/oidc/authorize"],
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
OIDC_SCOPES="openid email profile",
|
|
71
|
+
OIDC_USER_INFO_ENABLED=True,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Store the session server-side. This is not optional in an OIDC app: by
|
|
75
|
+
# default Flask signs the whole session into a cookie, and Flask-OIDC keeps
|
|
76
|
+
# the access, id and refresh tokens plus the userinfo profile there. Those
|
|
77
|
+
# JWTs do not compress and the group list grows with the user's memberships,
|
|
78
|
+
# so the 4093-byte cookie budget is spent by the login itself — and a browser
|
|
79
|
+
# that is handed an oversized cookie discards it *whole*, logging the user
|
|
80
|
+
# straight back out with no error in sight.
|
|
81
|
+
#
|
|
82
|
+
# The filesystem backend below suits a demo and a single host. Use Redis
|
|
83
|
+
# (SESSION_TYPE="redis", SESSION_REDIS=...) across more than one, since every
|
|
84
|
+
# worker must read the same store. See manual/getting-started.org.
|
|
85
|
+
app.config.update(
|
|
86
|
+
SESSION_TYPE="filesystem",
|
|
87
|
+
SESSION_FILE_DIR=os.path.join(tempfile.gettempdir(), "auth_example_sessions"),
|
|
88
|
+
)
|
|
89
|
+
Session(app)
|
|
90
|
+
|
|
91
|
+
# Routes land at /oidc/login, /oidc/authorize, /oidc/logout (endpoints
|
|
92
|
+
# oidc_auth.login / .authorize / .logout).
|
|
93
|
+
oidc = OpenIDConnect(app, prefix="/oidc")
|
|
94
|
+
|
|
95
|
+
theme = os.environ.get("CONSTRUCT_THEME") or None
|
|
96
|
+
# Follow the OS light/dark setting; CONSTRUCT_DARK_MODE=light or =dark pins it.
|
|
97
|
+
dark_mode = os.environ.get("CONSTRUCT_DARK_MODE") or "auto"
|
|
98
|
+
fcu = FlaskConstructUI(
|
|
99
|
+
url="/",
|
|
100
|
+
title="Auth Demo",
|
|
101
|
+
# The demos share the repo-root catalog, one level above the package.
|
|
102
|
+
app_l10n_dir="../l10n",
|
|
103
|
+
index_view_class=HomePage,
|
|
104
|
+
theme=theme,
|
|
105
|
+
dark_mode=dark_mode,
|
|
106
|
+
# Passing auth=... turns the guard on (fail-closed). groups_claim names the
|
|
107
|
+
# userinfo claim carrying the user's groups; the default login_endpoint
|
|
108
|
+
# ("oidc_auth.login") already matches Flask-OIDC 2.x's blueprint.
|
|
109
|
+
auth=FlaskOIDCAuth(oidc, groups_claim="groups"),
|
|
110
|
+
search=AuthDemoSearch(),
|
|
111
|
+
notifications=AuthDemoNotifications(),
|
|
112
|
+
)
|
|
113
|
+
fcu.init_app(app)
|
|
114
|
+
|
|
115
|
+
# Every page below is mounted under the same "Secured" submenu and, since the
|
|
116
|
+
# guard defaults to login-required, is login-protected.
|
|
117
|
+
fcu.add_page(DashboardPage(), submenu="Secured", submenu_icon="bi-shield-lock")
|
|
118
|
+
fcu.add_page(ProfilePage(), submenu="Secured")
|
|
119
|
+
fcu.add_page(ReportsPage(), submenu="Secured")
|
|
120
|
+
# AdminPage carries required_groups=["admin"], which gates its routes *and*
|
|
121
|
+
# keeps its menu entry out of the sidebar for everyone else. Sign in without
|
|
122
|
+
# that group and the item is not there; add it and the item appears.
|
|
123
|
+
fcu.add_page(AdminPage(), submenu="Secured")
|
|
124
|
+
|
|
125
|
+
# Reached only through the entries the provider generates, one per group the
|
|
126
|
+
# signed-in user holds — so it declares no menu entry of its own.
|
|
127
|
+
fcu.add_page(TeamToolsPage())
|
|
128
|
+
register_menu(fcu)
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"""Menu entries that follow who you are.
|
|
2
|
+
|
|
3
|
+
The other half of the dynamic-menu feature. ``examples/dynamic_menu_demo.py``
|
|
4
|
+
shows entries built from a *feed*; this shows entries built from the signed-in
|
|
5
|
+
user's group claims, against a real identity provider.
|
|
6
|
+
|
|
7
|
+
Two mechanisms, in increasing order of effort:
|
|
8
|
+
|
|
9
|
+
1. :class:`~auth_example.pages.AdminPage` declares ``required_groups``, and
|
|
10
|
+
that alone hides its menu entry from anyone outside the group. No provider,
|
|
11
|
+
no argument to ``add_page`` — a page that gates its routes stops
|
|
12
|
+
advertising itself. Log in without the ``admin`` group and the Admin item
|
|
13
|
+
is simply not in the sidebar.
|
|
14
|
+
|
|
15
|
+
2. The provider below adds one entry per group the user actually holds, which
|
|
16
|
+
no amount of static registration could do: the set of groups is not known
|
|
17
|
+
until someone signs in, and differs per person.
|
|
18
|
+
|
|
19
|
+
The rule both obey: hiding an entry is presentation, never protection. The
|
|
20
|
+
route behind each entry here checks membership itself, and so does the page in
|
|
21
|
+
(1). A user who types the URL of a tool for a group they left gets the themed
|
|
22
|
+
403, not the tool.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
from flask import url_for
|
|
26
|
+
|
|
27
|
+
from flask_construct_ui import expose
|
|
28
|
+
from flask_construct_ui.base import ComponentPageBase
|
|
29
|
+
from flask_construct_ui.components import components
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def register_menu(fcu):
|
|
33
|
+
"""Add one "Team tools" entry per group the signed-in user holds.
|
|
34
|
+
|
|
35
|
+
Registered after the pages, so these entries join a menu the registered
|
|
36
|
+
pages have already shaped.
|
|
37
|
+
|
|
38
|
+
No ``key=`` here: the provider reads the auth state, which the menu stamp
|
|
39
|
+
already folds in, and it does no work worth avoiding. A provider that
|
|
40
|
+
queried a directory service for the group list would want one.
|
|
41
|
+
|
|
42
|
+
Titles are plain strings, as everywhere else in this app. They still pass
|
|
43
|
+
through the translator when rendered — an unknown key comes back unchanged
|
|
44
|
+
— so an app that localises its menu simply returns l10n keys here instead.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def team_tools(construct):
|
|
48
|
+
auth = construct.auth
|
|
49
|
+
if auth is None or not auth.is_authenticated():
|
|
50
|
+
# Nothing to add for a logged-out visitor. The public landing page
|
|
51
|
+
# still renders, with a menu that simply has no team tools in it.
|
|
52
|
+
return []
|
|
53
|
+
return [
|
|
54
|
+
{
|
|
55
|
+
"title": f"{group} tools",
|
|
56
|
+
"icon": "folder",
|
|
57
|
+
"link": url_for("team_tools.tool", group=group),
|
|
58
|
+
"submenu": "Team tools",
|
|
59
|
+
"submenu_icon": "settings",
|
|
60
|
+
}
|
|
61
|
+
for group in sorted(auth.current_groups())
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
fcu.add_menu_provider(team_tools)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class TeamToolsPage(ComponentPageBase):
|
|
68
|
+
"""The page those generated entries point at.
|
|
69
|
+
|
|
70
|
+
``menu = False``: this page has no fixed entry of its own — every way in
|
|
71
|
+
comes from the provider above, one per group. It is still an ordinary
|
|
72
|
+
guarded construct route, and it re-checks the group in the URL, because the
|
|
73
|
+
provider only decided what to *show*.
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
endpoint = "team_tools"
|
|
77
|
+
icon = "bi-tools"
|
|
78
|
+
menu = False
|
|
79
|
+
|
|
80
|
+
def definition(self):
|
|
81
|
+
# Reached without a group in the path; send the reader somewhere useful.
|
|
82
|
+
return components.VerticalLayout(
|
|
83
|
+
spacing="2rem",
|
|
84
|
+
components=[
|
|
85
|
+
components.PageHeader(title="Team tools"),
|
|
86
|
+
components.Text(
|
|
87
|
+
tag="p",
|
|
88
|
+
content=(
|
|
89
|
+
"Pick one of the team tools in the sidebar. There is "
|
|
90
|
+
"one for each group your token carries, generated per "
|
|
91
|
+
"request — sign in with different groups on the mock "
|
|
92
|
+
"login page and the list changes with you."
|
|
93
|
+
),
|
|
94
|
+
),
|
|
95
|
+
],
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
@expose("/<string:group>/")
|
|
99
|
+
def tool(self, group):
|
|
100
|
+
auth = self.construct.auth
|
|
101
|
+
if not auth.has_groups([group]):
|
|
102
|
+
# The entry is hidden for this user, but hidden is not checked:
|
|
103
|
+
# the URL is guessable and the answer has to be no here too.
|
|
104
|
+
return auth.on_forbidden()
|
|
105
|
+
return self.render_component(
|
|
106
|
+
components.VerticalLayout(
|
|
107
|
+
spacing="2rem",
|
|
108
|
+
components=[
|
|
109
|
+
components.PageHeader(title=f"{group} tools"),
|
|
110
|
+
components.Card(
|
|
111
|
+
components=[
|
|
112
|
+
components.Text(
|
|
113
|
+
tag="p",
|
|
114
|
+
content=(
|
|
115
|
+
f"You reached this because your token "
|
|
116
|
+
f"carries the '{group}' group. The menu "
|
|
117
|
+
"entry that brought you here was generated "
|
|
118
|
+
"for that group, and the route checked it "
|
|
119
|
+
"again on the way in."
|
|
120
|
+
),
|
|
121
|
+
)
|
|
122
|
+
],
|
|
123
|
+
),
|
|
124
|
+
],
|
|
125
|
+
)
|
|
126
|
+
)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
from flask import g, current_app, url_for
|
|
2
|
+
from flask_construct_ui import GlobalSearch, SearchResult, Notifications, Notice
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class AuthDemoNotifications(Notifications):
|
|
6
|
+
def get_notices(self) -> list[Notice]:
|
|
7
|
+
# Icon strings follow the active icon mode (bootstrap vs material).
|
|
8
|
+
construct = getattr(g, "construct", None)
|
|
9
|
+
is_bootstrap = bool(construct and construct.icon_mode == "bootstrap")
|
|
10
|
+
|
|
11
|
+
return [
|
|
12
|
+
Notice(
|
|
13
|
+
title="Security Scan Passed",
|
|
14
|
+
message="All dependency checks passed.",
|
|
15
|
+
url="#",
|
|
16
|
+
icon="bi-shield-check" if is_bootstrap else "shield",
|
|
17
|
+
read=False,
|
|
18
|
+
),
|
|
19
|
+
Notice(
|
|
20
|
+
title="Welcome to Auth Demo",
|
|
21
|
+
message="Explore login-gated pages.",
|
|
22
|
+
url=url_for("home.index"),
|
|
23
|
+
icon="bi-info-circle" if is_bootstrap else "info",
|
|
24
|
+
read=False,
|
|
25
|
+
),
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class AuthDemoSearch(GlobalSearch):
|
|
30
|
+
def search(self, query: str) -> list[SearchResult]:
|
|
31
|
+
if not query:
|
|
32
|
+
return []
|
|
33
|
+
|
|
34
|
+
results = []
|
|
35
|
+
construct = getattr(g, "construct", None)
|
|
36
|
+
is_bootstrap = bool(construct and construct.icon_mode == "bootstrap")
|
|
37
|
+
q = query.lower()
|
|
38
|
+
|
|
39
|
+
# Search page menu items dynamically
|
|
40
|
+
fcu = current_app.extensions.get("flask_construct_ui")
|
|
41
|
+
if fcu:
|
|
42
|
+
for topitem in fcu.menu:
|
|
43
|
+
if topitem.type == "item":
|
|
44
|
+
if q in topitem.title.lower():
|
|
45
|
+
results.append(
|
|
46
|
+
SearchResult(
|
|
47
|
+
title=topitem.title,
|
|
48
|
+
url=topitem.link,
|
|
49
|
+
description="Application Page",
|
|
50
|
+
icon="bi-file-earmark"
|
|
51
|
+
if is_bootstrap
|
|
52
|
+
else "description",
|
|
53
|
+
)
|
|
54
|
+
)
|
|
55
|
+
elif topitem.type == "submenu":
|
|
56
|
+
for subitem in topitem.subitems:
|
|
57
|
+
if q in subitem.title.lower():
|
|
58
|
+
results.append(
|
|
59
|
+
SearchResult(
|
|
60
|
+
title=subitem.title,
|
|
61
|
+
url=subitem.link,
|
|
62
|
+
description=f"Page in {topitem.title}",
|
|
63
|
+
icon="bi-file-earmark"
|
|
64
|
+
if is_bootstrap
|
|
65
|
+
else "description",
|
|
66
|
+
)
|
|
67
|
+
)
|
|
68
|
+
return results
|