Juro Oravec
b90961b4a7
feat: dynamic slots, fills, and provides ( #609 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-25 22:35:10 +02:00
Juro Oravec
899b9a2738
refactor: move kwargs resolution to render-time + cleanup ( #594 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-23 18:15:28 +02:00
Juro Oravec
efd05d6150
feat: Typing for component inputs and access inputs during render ( #585 )
2024-08-22 23:42:34 +02:00
Juro Oravec
71d8679e8d
feat: TagFormatter - Allow users to customize component template tags ( #572 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-18 16:58:56 +02:00
Juro Oravec
b8e92dac37
fix: Set Context.template
for components to work with include ( #582 )
2024-08-16 23:31:00 +02:00
Juro Oravec
e771a0aaaf
refactor: Use top-level exports as public API ( #562 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-03 08:30:39 +02:00
Juro Oravec
2953ca4dba
fix: do not monkeypatch already patched templates ( #543 )
2024-07-08 11:02:50 +02:00
Juro Oravec
2684b41c07
fix: various fixes for inject/provide and html_attrs ( #541 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-08 10:25:38 +02:00
Juro Oravec
3c5a7ad823
feat: paths as objects + user-provided Media cls + handle static ( #526 )
...
Co-authored-by: Emil Stenström <emil@emilstenstrom.se>
2024-06-21 19:36:53 +02:00
Juro Oravec
36cd6e3f06
refactor: compat with comp as view by reusing comp instance
2024-06-11 21:41:56 +02:00
Juro Oravec
7c52acf411
refactor: linter fixes
2024-06-11 15:08:02 +02:00
Juro Oravec
c6e3c0a213
refactor: update Component.render docstring
2024-06-11 15:06:14 +02:00
Juro Oravec
5c89d4dbeb
refactor: pass slot data and slot default to slot render fn and rename LazySlot to SlotRef
2024-06-11 14:34:04 +02:00
pre-commit-ci[bot]
a5a0c74d31
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-06-02 14:23:56 +00:00
Juro Oravec
fee26ec1d8
feat: refactor render fn and allow slots as functions
2024-06-02 16:22:38 +02:00
Juro Oravec
8ca2814ee3
feat: dependency injection with inject/provide ( #506 )
2024-06-01 10:51:21 +02:00
Juro Oravec
b8ff610a48
fix: compat with block tag in django mode ( #511 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-30 08:34:58 +02:00
Juro Oravec
edb2f347f2
refactor: change fill alias from "as var" to default=var ( #504 )
2024-05-23 20:25:16 +02:00
Juro Oravec
b1b66fd751
feat: Scoped slots + Updated docs ( #495 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-23 07:08:10 +02:00
Michał Kuczaj
1817edd391
feat: alias component_registry imports for mypy ( #499 )
2024-05-19 09:56:48 +02:00
Juro Oravec
610475353f
feat: Support for HTML attributes and html_attrs
tag ( #491 )
2024-05-12 11:21:34 +02:00
Juro Oravec
e566d8ecbb
fix: loader tags compatibility ( #468 )
2024-05-02 22:24:49 +02:00
Juro Oravec
3fc90e4956
feat: merge context settings, replace if_filled tag with var
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-01 20:55:09 +02:00
Juro Oravec
29c931f150
refactor: fix slot fills for components nested in themselves ( #456 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-25 20:36:05 +02:00
Juro Oravec
ae22eff8af
refactor: fix context vars missing in isolated slot ( #455 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-25 12:08:20 +02:00
Juro Oravec
3ad0dd8677
refactor: fix slot context behavior ( #445 )
2024-04-23 21:35:45 +02:00
Juro Oravec
091a692993
refactor: remove extra type: ignore
2024-04-16 23:25:13 +02:00
Juro Oravec
3e75db59ae
refactor: replace Sequence with List
2024-04-16 23:25:13 +02:00
Juro Oravec
623a5fe365
refactor: fix types for render and render_to_response
2024-04-16 23:25:13 +02:00
pre-commit-ci[bot]
ab7f3e0cdb
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-04-16 23:25:13 +02:00
Juro Oravec
ce5b5c40d8
refactor: use component IDs as keys for slot fill llokup
2024-04-16 23:25:13 +02:00
Juro Oravec
c1369ab2c7
feat: add tracing logger statements
2024-04-16 23:25:13 +02:00
Juro Oravec
1dd492314a
refactor: use component_id instead of Template as slot fill cache key
2024-04-16 23:25:13 +02:00
Juro Oravec
390b16f764
refactor: fix minor errors
2024-04-16 23:25:12 +02:00
pre-commit-ci[bot]
7fbccbf009
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-04-16 23:25:12 +02:00
Juro Oravec
9d9462162a
refactor: merge Base, Implicit and Named FillNodes into FillNode
2024-04-16 23:25:12 +02:00
pre-commit-ci[bot]
c0c9e145a9
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-04-16 23:25:12 +02:00
Juro Oravec
ec12a3bcb8
feat: capture root context
2024-04-16 23:25:12 +02:00
Juro Oravec
8d3a2ba8db
refactor: simplify slot intermediate slot types
2024-04-16 23:25:12 +02:00
Juro Oravec
003c8ba4d5
refactor: fix clash with autodiscovery
2024-04-13 21:34:43 +02:00
Juro Oravec
3f8abc7388
refactor: use sys.modules to get component file path
2024-04-11 23:22:48 +02:00
Juro Oravec
9aa446acc8
refactor: move slots logic to own file ( #416 )
...
* refactor: move slots logic to own file
* docs: add readme section for how slots work
* chore: isort
* refactor: fix type alias
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: fix isort issues again
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 22:55:27 +01:00
Juro Oravec
2c8fc6c3a2
fix: avoid nested django contexts when rendering ( #415 )
...
* fix: avoid nested django contexts when rendering
* refactor: make input for slot context processing more specific
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-30 09:17:55 +01:00
Gabriel Dugny
b9f4e596a4
feat: add type hints everywhere
2024-03-29 08:51:58 +01:00
Gabriel Dugny
a7901c7c17
chore: use src layout
2024-03-29 07:50:10 +01:00