@supersoniks/concorde 4.9.0 → 4.9.2
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.
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +195 -195
- package/concorde-core.es.js +3390 -3370
- package/dist/concorde-core.bundle.js +195 -195
- package/dist/concorde-core.es.js +3390 -3370
- package/dist/docs-mock-api-sw.js +3 -1
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/dist/js/core/decorators/api.js +64 -12
- package/dist/js/core/decorators/api.js.map +1 -1
- package/dist/js/core/utils/HTML.js +4 -5
- package/dist/js/core/utils/HTML.js.map +1 -1
- package/dist/robots.txt +15 -1
- package/dist/types/core/decorators/api.d.ts +14 -1
- package/dist/types/core/decorators/api.d.ts.map +1 -1
- package/dist/types/core/utils/HTML.d.ts.map +1 -1
- package/docs/assets/{index-t0-i22oI.css → index-Bnp7gVaA.css} +1 -1
- package/docs/assets/{index-BEgZEIbv.js → index-hElUgV9_.js} +894 -552
- package/docs/crawl/core/components/functional/date/date.html +190 -0
- package/docs/crawl/core/components/functional/fetch/fetch.html +109 -0
- package/docs/crawl/core/components/functional/if/if.html +27 -0
- package/docs/crawl/core/components/functional/list/list.html +70 -0
- package/docs/crawl/core/components/functional/mix/mix.html +45 -0
- package/docs/crawl/core/components/functional/queue/queue.html +96 -0
- package/docs/crawl/core/components/functional/router/router.html +106 -0
- package/docs/crawl/core/components/functional/sdui/sdui.html +269 -0
- package/docs/crawl/core/components/functional/states/states.html +66 -0
- package/docs/crawl/core/components/functional/submit/submit.html +160 -0
- package/docs/crawl/core/components/functional/subscriber/subscriber.html +67 -0
- package/docs/crawl/core/components/functional/value/value.html +51 -0
- package/docs/crawl/core/components/ui/alert/alert.html +110 -0
- package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +23 -0
- package/docs/crawl/core/components/ui/badge/badge.html +119 -0
- package/docs/crawl/core/components/ui/button/button.html +149 -0
- package/docs/crawl/core/components/ui/captcha/captcha.html +30 -0
- package/docs/crawl/core/components/ui/card/card.html +99 -0
- package/docs/crawl/core/components/ui/divider/divider.html +58 -0
- package/docs/crawl/core/components/ui/form/checkbox/checkbox.html +73 -0
- package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +135 -0
- package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +79 -0
- package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +62 -0
- package/docs/crawl/core/components/ui/form/input/input.html +109 -0
- package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +106 -0
- package/docs/crawl/core/components/ui/form/radio/radio.html +56 -0
- package/docs/crawl/core/components/ui/form/select/select.html +73 -0
- package/docs/crawl/core/components/ui/form/switch/switch.html +56 -0
- package/docs/crawl/core/components/ui/form/textarea/textarea.html +59 -0
- package/docs/crawl/core/components/ui/group/group.html +82 -0
- package/docs/crawl/core/components/ui/icon/icon.html +133 -0
- package/docs/crawl/core/components/ui/image/image.html +110 -0
- package/docs/crawl/core/components/ui/link/link.html +42 -0
- package/docs/crawl/core/components/ui/loader/loader.html +50 -0
- package/docs/crawl/core/components/ui/menu/menu.html +322 -0
- package/docs/crawl/core/components/ui/modal/modal.html +117 -0
- package/docs/crawl/core/components/ui/pop/pop.html +102 -0
- package/docs/crawl/core/components/ui/progress/progress.html +58 -0
- package/docs/crawl/core/components/ui/table/table.html +413 -0
- package/docs/crawl/core/components/ui/toast/toast.html +122 -0
- package/docs/crawl/core/components/ui/tooltip/tooltip.html +79 -0
- package/docs/crawl/docs/_core-concept/dataFlow.html +166 -0
- package/docs/crawl/docs/_core-concept/overview.html +66 -0
- package/docs/crawl/docs/_core-concept/subscriber.html +75 -0
- package/docs/crawl/docs/_decorators/ancestor-attribute.html +116 -0
- package/docs/crawl/docs/_decorators/auto-subscribe.html +202 -0
- package/docs/crawl/docs/_decorators/bind.html +141 -0
- package/docs/crawl/docs/_decorators/get.html +120 -0
- package/docs/crawl/docs/_decorators/handle.html +165 -0
- package/docs/crawl/docs/_decorators/on-assign.html +355 -0
- package/docs/crawl/docs/_decorators/patch.html +52 -0
- package/docs/crawl/docs/_decorators/post.html +102 -0
- package/docs/crawl/docs/_decorators/publish.html +61 -0
- package/docs/crawl/docs/_decorators/put.html +49 -0
- package/docs/crawl/docs/_decorators/subscribe.html +109 -0
- package/docs/crawl/docs/_decorators/wait-for-ancestors.html +137 -0
- package/docs/crawl/docs/_directives/sub.html +93 -0
- package/docs/crawl/docs/_getting-started/ai-agents.html +134 -0
- package/docs/crawl/docs/_getting-started/concorde-manual-install.html +100 -0
- package/docs/crawl/docs/_getting-started/concorde-outside.html +58 -0
- package/docs/crawl/docs/_getting-started/create-a-component.html +111 -0
- package/docs/crawl/docs/_getting-started/my-first-component.html +189 -0
- package/docs/crawl/docs/_getting-started/my-first-subscriber.html +110 -0
- package/docs/crawl/docs/_getting-started/pubsub.html +62 -0
- package/docs/crawl/docs/_getting-started/start.html +76 -0
- package/docs/crawl/docs/_getting-started/theming.html +85 -0
- package/docs/crawl/docs/_misc/api-configuration.html +149 -0
- package/docs/crawl/docs/_misc/dataProviderKey.html +135 -0
- package/docs/crawl/docs/_misc/docs-mock-api.html +146 -0
- package/docs/crawl/docs/_misc/dynamic-path.html +180 -0
- package/docs/crawl/docs/_misc/endpoint.html +50 -0
- package/docs/crawl/docs/_misc/html-integration.html +47 -0
- package/docs/crawl/hubs/decorators.html +467 -0
- package/docs/crawl/hubs/form-components.html +357 -0
- package/docs/crawl/hubs/remote-data.html +374 -0
- package/docs/crawl/index.html +99 -0
- package/docs/docs-mock-api-sw.js +3 -1
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +3 -3
- package/docs/llms-full.txt +5423 -0
- package/docs/llms.txt +102 -0
- package/docs/robots.txt +15 -1
- package/docs/sitemap.xml +231 -0
- package/docs/src/docs/_decorators/ancestor-attribute.md +56 -8
- package/docs/src/docs/_decorators/get.md +47 -1
- package/docs/src/docs/search/docs-search.json +92 -2
- package/docs/src/tsconfig.declarations.json +22 -0
- package/docs/src/tsconfig.emit.json +23 -0
- package/docs/src/tsconfig.json +3 -285
- package/index.html +1 -0
- package/package.json +1 -1
- package/public/docs-mock-api-sw.js +3 -1
- package/public/docs-mock-api-sw.js.map +2 -2
- package/public/robots.txt +15 -1
- package/scripts/generate-crawl-docs.mjs +569 -0
- package/scripts/post-build-docs.js +18 -14
- package/src/core/decorators/api.spec.ts +74 -4
- package/src/core/decorators/api.ts +103 -20
- package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +42 -0
- package/src/core/utils/HTML.ts +4 -5
- package/src/docs/_decorators/get.md +47 -1
- package/src/docs/components/docs-demo-sources.ts +7 -2
- package/src/docs/example/decorators-demo-geo.ts +5 -0
- package/src/docs/example/decorators-demo-subscribe-publish-get-demos.ts +72 -31
- package/src/docs/mock-api/router.ts +3 -1
- package/src/docs/search/docs-search.json +92 -2
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fr" data-crawl-url="https://concorde.supersoniks.org/crawl/hubs/remote-data.html" data-doc-id="hubs/remote-data">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Fetching remote data in Concorde — Concorde</title>
|
|
7
|
+
<meta name="description" content="Hub for loading online data: @get decorator, Endpoint, API configuration, dynamic paths, sonic-list fetch, sonic-queue, legacy sonic-fetch.">
|
|
8
|
+
<meta name="keywords" content="@get, fetch, remote data, API, Endpoint, ApiResult, serviceURL, sonic-list, sonic-queue, HTTP GET">
|
|
9
|
+
<meta name="concorde-doc-id" content="hubs/remote-data">
|
|
10
|
+
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/hubs/remote-data.html">
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<header>
|
|
14
|
+
<p><a href="../index.html">Concorde documentation (crawl)</a></p>
|
|
15
|
+
</header>
|
|
16
|
+
<main>
|
|
17
|
+
<article>
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde documentation — Fetching remote data in Concorde</strong>. Hub for loading online data: @get decorator, Endpoint, API configuration, dynamic paths, sonic-list fetch, sonic-queue, legacy sonic-fetch. <span>Doc ID: <code>hubs/remote-data</code>. Keywords: @get, fetch, remote data, API, Endpoint, ApiResult, serviceURL, sonic-list, sonic-queue, HTTP GET. URL: <a href="https://concorde.supersoniks.org/crawl/hubs/remote-data.html">https://concorde.supersoniks.org/crawl/hubs/remote-data.html</a>.</span></p>
|
|
19
|
+
<section id="core-components-functional-fetch-fetch" data-doc-id="core/components/functional/fetch/fetch">
|
|
20
|
+
<h2><a href="../core/components/functional/fetch/fetch.html">Fetch</a></h2>
|
|
21
|
+
<p><strong>Doc ID:</strong> <code>core/components/functional/fetch/fetch</code> · <a href="../core/components/functional/fetch/fetch.html">full page</a></p>
|
|
22
|
+
<p>> New apps: prefer @get for a typed GET on a component, or List / Queue with fetch for collections. Use Local API demos (serviceURL="/docs-mock-api") to try examples offline.</p>
|
|
23
|
+
<pre class="doc-excerpt">Fetch
|
|
24
|
+
|
|
25
|
+
> New apps: prefer @get for a typed GET on a component, or List / Queue with fetch for collections. Use Local API demos (serviceURL="/docs-mock-api") to try examples offline.
|
|
26
|
+
|
|
27
|
+
The sonic-fetch component requests and stores API data. It extends the Fetcher and Subscriber mixins.
|
|
28
|
+
|
|
29
|
+
Basic usage
|
|
30
|
+
In order to work properly the sonic-fetch component needs at least the following attributes.
|
|
31
|
+
- serviceURL : A base service url. This attribute can be inherited from an ancestor.
|
|
32
|
+
ex : /docs-mock-api
|
|
33
|
+
- endPoint : the specific location where requests for information are sent (see the api docs).
|
|
34
|
+
ex : api/users | api/users?page=2 | api/users/2
|
|
35
|
+
- dataProvider (Required) : An ID that is used as a reference to the object storing the data returned by the API.
|
|
36
|
+
This attribute can be inherited from an ancestor.
|
|
37
|
+
|
|
38
|
+
Hover to see the data
|
|
39
|
+
|
|
40
|
+
DataProvider as an endPoint
|
|
41
|
+
If no endPoint is specified it will be filled by the dataProvider ID instead
|
|
42
|
+
|
|
43
|
+
Hover to see the data
|
|
44
|
+
|
|
45
|
+
HeadersDataProvider
|
|
46
|
+
|
|
47
|
+
Deprecated
|
|
48
|
+
|
|
49
|
+
Key
|
|
50
|
+
When the key attribute is present, only a sub-part of the data received is injected into the dataProvider.
|
|
51
|
+
We can use the dot syntax to target what we want to keep.
|
|
52
|
+
|
|
53
|
+
For example if the data </pre>
|
|
54
|
+
</section>
|
|
55
|
+
<section id="core-components-functional-list-list" data-doc-id="core/components/functional/list/list">
|
|
56
|
+
<h2><a href="../core/components/functional/list/list.html">List</a></h2>
|
|
57
|
+
<p><strong>Doc ID:</strong> <code>core/components/functional/list/list</code> · <a href="../core/components/functional/list/list.html">full page</a></p>
|
|
58
|
+
<p>> Try offline: serviceURL="/docs-mock-api" and dataProvider="api/users" with key="data" — see Local API demos. Recommended patterns: Data flow.</p>
|
|
59
|
+
<pre class="doc-excerpt">List
|
|
60
|
+
|
|
61
|
+
> Try offline: serviceURL="/docs-mock-api" and dataProvider="api/users" with key="data" — see Local API demos. Recommended patterns: Data flow.
|
|
62
|
+
|
|
63
|
+
The sonic-list component renders one row per entry in props (array from fetch or set on the element).
|
|
64
|
+
|
|
65
|
+
List extends Subscriber and Fetcher:
|
|
66
|
+
Subscriber — props + dataProvider
|
|
67
|
+
Fetcher — optional fetch + serviceURL / key (see Fetch)
|
|
68
|
+
|
|
69
|
+
Row renderer (items) — recommended
|
|
70
|
+
|
|
71
|
+
From a Lit parent, pass a function on the items property (ListItems). Each row is wrapped in a sonic-subscriber with dataProvider="…/list-item/n" (hover rows with debug).
|
|
72
|
+
|
|
73
|
+
private items = ({ firstname, lastname, email, avatar }) => html
|
|
74
|
+
|
|
75
|
+
${firstname} ${lastname}
|
|
76
|
+
${email}
|
|
77
|
+
;
|
|
78
|
+
|
|
79
|
+
html ;
|
|
80
|
+
|
|
81
|
+
Use .items=${fn} (property binding): Lit passes functions only as properties, not as HTML attributes — @property({ type: Function }) does not change that. Same for .noItems, .separator, .skeleton. The callback receives each row object (replacing data-bind / in a ).
|
|
82
|
+
|
|
83
|
+
Live demo + TypeScript source (one file, no Markdown copy):
|
|
84
|
+
|
|
85
|
+
Implementation: src/docs/example/docs-users-list.ts — row markup in the items callback (item.firstname, …), same idea as replacing data-bind / in a .
|
|
86
|
+
|
|
87
|
+
Alte</pre>
|
|
88
|
+
</section>
|
|
89
|
+
<section id="core-components-functional-queue-queue" data-doc-id="core/components/functional/queue/queue">
|
|
90
|
+
<h2><a href="../core/components/functional/queue/queue.html">Queue</a></h2>
|
|
91
|
+
<p><strong>Doc ID:</strong> <code>core/components/functional/queue/queue</code> · <a href="../core/components/functional/queue/queue.html">full page</a></p>
|
|
92
|
+
<p>> Try offline: serviceURL="/docs-mock-api" — see Local API demos. Row rendering: Data flow (.items property binding).</p>
|
|
93
|
+
<pre class="doc-excerpt">Queue
|
|
94
|
+
|
|
95
|
+
> Try offline: serviceURL="/docs-mock-api" — see Local API demos. Row rendering: Data flow (.items property binding).
|
|
96
|
+
|
|
97
|
+
sonic-queue loads data in batches. Each batch is an internal List with its own dataProvider (…/list-item/0, …/1, …).
|
|
98
|
+
|
|
99
|
+
| Mechanism | Role |
|
|
100
|
+
|-----------|------|
|
|
101
|
+
| dataProviderExpression | API path template; $offset and $limit are replaced per batch |
|
|
102
|
+
| lazyload | Load the next batch when the user scrolls near the end |
|
|
103
|
+
| dataFilterProvider | Publisher id of a form (formDataProvider); field values are merged into the request query string |
|
|
104
|
+
| filteredFields | Optional list of form field names to exclude from the query (space-separated) — omit when every field should be sent |
|
|
105
|
+
| .items, .noItems, .separator, .skeleton | Lit callbacks forwarded to each batch list (use the dot — functions are properties, not attributes) |
|
|
106
|
+
|
|
107
|
+
Lazy load — $offset and $limit
|
|
108
|
+
|
|
109
|
+
When the expression contains $offset and $limit, the queue:
|
|
110
|
+
|
|
111
|
+
1. Fetches the first batch with offset=0 (or the initial offset attribute) and perpage=$limit.
|
|
112
|
+
2. On scroll, appends a batch with offset increased by the previous batch size.
|
|
113
|
+
3. Stops when a batch returns fewer rows than limit (or none).
|
|
114
|
+
|
|
115
|
+
The doc mock im</pre>
|
|
116
|
+
</section>
|
|
117
|
+
<section id="docs-_core-concept-dataFlow" data-doc-id="docs/_core-concept/dataFlow">
|
|
118
|
+
<h2><a href="../docs/_core-concept/dataFlow.html">Data flow</a></h2>
|
|
119
|
+
<p><strong>Doc ID:</strong> <code>docs/_core-concept/dataFlow</code> · <a href="../docs/_core-concept/dataFlow.html">full page</a></p>
|
|
120
|
+
<p>Recommended patterns for new Concorde apps (Lit + TypeScript). Under the hood, data lives in a DataProvider store (legacy Publisher API: Legacy: Sharing data).</p>
|
|
121
|
+
<pre class="doc-excerpt">Data flow
|
|
122
|
+
|
|
123
|
+
Recommended patterns for new Concorde apps (Lit + TypeScript). Under the hood, data lives in a DataProvider store (legacy Publisher API: Legacy: Sharing data).
|
|
124
|
+
|
|
125
|
+
Quick map
|
|
126
|
+
|
|
127
|
+
| Need | Use |
|
|
128
|
+
|------|-----|
|
|
129
|
+
| Read/write in code | get / set / dp + DataProviderKey (static paths only) |
|
|
130
|
+
| Reactive Lit template | sub(key) or @subscribe |
|
|
131
|
+
| Read component state from store | @subscribe + DataProviderKey + @state |
|
|
132
|
+
| Inherit ancestor attributes | @ancestorAttribute |
|
|
133
|
+
| Write from component state | @publish |
|
|
134
|
+
| React to assignments | @handle |
|
|
135
|
+
| HTTP GET | @get + Endpoint, or sonic-list / sonic-queue with fetch |
|
|
136
|
+
| HTTP POST (body from store) | @post + Endpoint + body DataProviderKey |
|
|
137
|
+
| HTTP PUT / PATCH (body from store) | @put / @patch — same model as @post |
|
|
138
|
+
| Forms | formDataProvider + name on fields |
|
|
139
|
+
| Offline doc demos | serviceURL="/docs-mock-api" — Local API demos |
|
|
140
|
+
|
|
141
|
+
Skill: concorde-get-set-dp in the package ai/ folder.
|
|
142
|
+
|
|
143
|
+
DataProviderKey
|
|
144
|
+
|
|
145
|
+
import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
|
|
146
|
+
import { dp, get, set } from "@supersoniks/concorde/utils";
|
|
147
|
+
|
|
148
|
+
const cartKey = new DataProviderKey&lt;{ items: string[] }&gt;("cart");
|
|
149
|
+
|
|
150
|
+
set(cartKey, { items: [] });
|
|
151
|
+
dp(c</pre>
|
|
152
|
+
</section>
|
|
153
|
+
<section id="docs-_decorators-get" data-doc-id="docs/_decorators/get">
|
|
154
|
+
<h2><a href="../docs/_decorators/get.html">@get</a></h2>
|
|
155
|
+
<p><strong>Doc ID:</strong> <code>docs/_decorators/get</code> · <a href="../docs/_decorators/get.html">full page</a></p>
|
|
156
|
+
<p>Loads data through API.getDetailed. The decorated property is ApiResult<T> | null: request, response (or null for dataProvider(...) resolution without HTTP), and typed result.</p>
|
|
157
|
+
<pre class="doc-excerpt">@get
|
|
158
|
+
|
|
159
|
+
Loads data through API.getDetailed. The decorated property is ApiResult | null: request, response (or null for dataProvider(...) resolution without HTTP), and typed result.
|
|
160
|
+
|
|
161
|
+
Pass an Endpoint as the first argument. Import get and ApiResult from @supersoniks/concorde/decorators, and Endpoint from @supersoniks/concorde/utils/endpoint.
|
|
162
|
+
|
|
163
|
+
Configuration
|
|
164
|
+
|
|
165
|
+
- Default: HTML.getApiConfiguration(host) (ancestor serviceURL, etc.).
|
|
166
|
+
- Second argument: DataProviderKey — config is read from the publisher at the resolved path; internal mutations trigger another GET. See API configuration for mock demos.
|
|
167
|
+
|
|
168
|
+
Dynamic path
|
|
169
|
+
|
|
170
|
+
${prop} on the endpoint or config key is resolved on the host. While a placeholder is null or undefined, no GET runs. Optional skipEmptyPlaceholder: true also blocks "" (empty string only). Details: Dynamic path placeholders.
|
|
171
|
+
|
|
172
|
+
Options (GetOptions)
|
|
173
|
+
|
|
174
|
+
Pass as the second argument (scoped config) or third (with a configuration key). Same shape as send decorators where applicable:
|
|
175
|
+
|
|
176
|
+
| Option | Description |
|
|
177
|
+
|--------|-------------|
|
|
178
|
+
| skipEmptyPlaceholder | Treat "" as not ready (see Dynamic path). |
|
|
179
|
+
| refetchEveryMs | Automatic polling interval (ms). 0 or omitted = no polling. |
|
|
180
|
+
| tri</pre>
|
|
181
|
+
</section>
|
|
182
|
+
<section id="docs-_decorators-patch" data-doc-id="docs/_decorators/patch">
|
|
183
|
+
<h2><a href="../docs/_decorators/patch.html">@patch</a></h2>
|
|
184
|
+
<p><strong>Doc ID:</strong> <code>docs/_decorators/patch</code> · <a href="../docs/_decorators/patch.html">full page</a></p>
|
|
185
|
+
<p>Sends data through API.patchDetailed. Same model as @post: decorated property is ApiResult<T> | null (request, response, result).</p>
|
|
186
|
+
<pre class="doc-excerpt">@patch
|
|
187
|
+
|
|
188
|
+
Sends data through API.patchDetailed. Same model as @post: decorated property is ApiResult | null (request, response, result).
|
|
189
|
+
|
|
190
|
+
Pass an Endpoint and a DataProviderKey for the request body. Import patch and ApiResult from @supersoniks/concorde/decorators.
|
|
191
|
+
|
|
192
|
+
Configuration
|
|
193
|
+
|
|
194
|
+
Same as @post / @get: scoped HTML.getApiConfiguration(host) or DataProviderKey as third argument.
|
|
195
|
+
|
|
196
|
+
Options (PatchOptions)
|
|
197
|
+
|
|
198
|
+
Same shape as PostOptions on @post (ApiSendOptions): refetchEveryMs, skipIfBodyMissing, autoPostOnBodyMutation, triggerKey, skipEmptyPlaceholder. See Dynamic path placeholders for ${sessionId} and empty-string behaviour.
|
|
199
|
+
|
|
200
|
+
Import
|
|
201
|
+
|
|
202
|
+
import { patch, type ApiResult } from "@supersoniks/concorde/decorators";
|
|
203
|
+
import { Endpoint } from "@supersoniks/concorde/utils/endpoint";
|
|
204
|
+
import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
|
|
205
|
+
|
|
206
|
+
Example
|
|
207
|
+
|
|
208
|
+
const patchBodyKey = new DataProviderKey&lt;Partial&lt;Resource&gt;&gt;("resourcePatch");
|
|
209
|
+
|
|
210
|
+
@patch(
|
|
211
|
+
new Endpoint&lt;Resource, { resourceId: string }&gt;("resources/${resourceId}"),
|
|
212
|
+
patchBodyKey,
|
|
213
|
+
{ skipEmptyPlaceholder: true },
|
|
214
|
+
)
|
|
215
|
+
@state()
|
|
216
|
+
payload?: ApiResult&lt;Resource&gt; | null;
|
|
217
|
+
|
|
218
|
+
See also
|
|
219
|
+
|
|
220
|
+
- @post — POST (live demos)
|
|
221
|
+
- @put — full rep</pre>
|
|
222
|
+
</section>
|
|
223
|
+
<section id="docs-_decorators-post" data-doc-id="docs/_decorators/post">
|
|
224
|
+
<h2><a href="../docs/_decorators/post.html">@post</a></h2>
|
|
225
|
+
<p><strong>Doc ID:</strong> <code>docs/_decorators/post</code> · <a href="../docs/_decorators/post.html">full page</a></p>
|
|
226
|
+
<p>Sends data through API.postDetailed. The decorated property is ApiResult<T> | null: request, response, and typed result.</p>
|
|
227
|
+
<pre class="doc-excerpt">@post
|
|
228
|
+
|
|
229
|
+
Sends data through API.postDetailed. The decorated property is ApiResult | null: request, response, and typed result.
|
|
230
|
+
|
|
231
|
+
Pass an Endpoint as the first argument and a DataProviderKey for the request body as the second. Import post and ApiResult from @supersoniks/concorde/decorators, and Endpoint from @supersoniks/concorde/utils/endpoint.
|
|
232
|
+
|
|
233
|
+
Configuration
|
|
234
|
+
|
|
235
|
+
Same as @get: scoped HTML.getApiConfiguration(host) by default, or DataProviderKey as third argument. See API configuration for mock demos.
|
|
236
|
+
|
|
237
|
+
Optional PostOptions (third or fourth argument)
|
|
238
|
+
|
|
239
|
+
| Option | Description |
|
|
240
|
+
|--------|-------------|
|
|
241
|
+
| refetchEveryMs | Re-post on an interval (ms). |
|
|
242
|
+
| skipIfBodyMissing | Skip when body publisher is null/undefined (default: true). |
|
|
243
|
+
| autoPostOnBodyMutation | Re-post when the body publisher mutates (default: true). false = manual via triggerKey.invalidate(). |
|
|
244
|
+
| skipEmptyPlaceholder | If true, a placeholder resolved to '' blocks the request (empty string only — not 0 or false). See Dynamic paths. |
|
|
245
|
+
| triggerKey | DataProviderKey — invalidate() re-runs the POST with the current body. |
|
|
246
|
+
|
|
247
|
+
When the POST runs again
|
|
248
|
+
|
|
249
|
+
- Body publisher onInternalMutation when autoPostOnBodyMutation is true (defa</pre>
|
|
250
|
+
</section>
|
|
251
|
+
<section id="docs-_decorators-put" data-doc-id="docs/_decorators/put">
|
|
252
|
+
<h2><a href="../docs/_decorators/put.html">@put</a></h2>
|
|
253
|
+
<p><strong>Doc ID:</strong> <code>docs/_decorators/put</code> · <a href="../docs/_decorators/put.html">full page</a></p>
|
|
254
|
+
<p>Sends data through API.putDetailed. Same model as @post: decorated property is ApiResult<T> | null (request, response, result).</p>
|
|
255
|
+
<pre class="doc-excerpt">@put
|
|
256
|
+
|
|
257
|
+
Sends data through API.putDetailed. Same model as @post: decorated property is ApiResult | null (request, response, result).
|
|
258
|
+
|
|
259
|
+
Pass an Endpoint and a DataProviderKey for the request body. Import put and ApiResult from @supersoniks/concorde/decorators.
|
|
260
|
+
|
|
261
|
+
Configuration
|
|
262
|
+
|
|
263
|
+
Same as @post / @get: scoped HTML.getApiConfiguration(host) or DataProviderKey as third argument.
|
|
264
|
+
|
|
265
|
+
Options (PutOptions)
|
|
266
|
+
|
|
267
|
+
Same shape as PostOptions on @post (ApiSendOptions): refetchEveryMs, skipIfBodyMissing, autoPostOnBodyMutation, triggerKey, skipEmptyPlaceholder. See Dynamic path placeholders for ${sessionId} and empty-string behaviour.
|
|
268
|
+
|
|
269
|
+
Import
|
|
270
|
+
|
|
271
|
+
import { put, type ApiResult } from "@supersoniks/concorde/decorators";
|
|
272
|
+
import { Endpoint } from "@supersoniks/concorde/utils/endpoint";
|
|
273
|
+
import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
|
|
274
|
+
|
|
275
|
+
Example
|
|
276
|
+
|
|
277
|
+
const bodyKey = new DataProviderKey&lt;UpdatePayload&gt;("resourceBody");
|
|
278
|
+
|
|
279
|
+
@put(new Endpoint&lt;Resource, { resourceId: string }&gt;("resources/${resourceId}"), bodyKey)
|
|
280
|
+
@state()
|
|
281
|
+
payload?: ApiResult&lt;Resource&gt; | null;
|
|
282
|
+
|
|
283
|
+
Changing resourceId on the host re-runs the PUT when the path becomes ready — see Dynamic path placeholders.
|
|
284
|
+
|
|
285
|
+
See also
|
|
286
|
+
|
|
287
|
+
- @post —</pre>
|
|
288
|
+
</section>
|
|
289
|
+
<section id="docs-_misc-api-configuration" data-doc-id="docs/_misc/api-configuration">
|
|
290
|
+
<h2><a href="../docs/_misc/api-configuration.html">API configuration</a></h2>
|
|
291
|
+
<p><strong>Doc ID:</strong> <code>docs/_misc/api-configuration</code> · <a href="../docs/_misc/api-configuration.html">full page</a></p>
|
|
292
|
+
<p>APIConfiguration is the object built by HTML.getApiConfiguration from ancestor attributes on the DOM (or from a typed publisher — see @get / @post configuration key). It is passed to API by fetchers, </p>
|
|
293
|
+
<pre class="doc-excerpt">API configuration
|
|
294
|
+
|
|
295
|
+
APIConfiguration is the object built by HTML.getApiConfiguration from ancestor attributes on the DOM (or from a typed publisher — see @get / @post configuration key). It is passed to API by fetchers, sonic-submit, the wording() directive, @get, @post, @put, and @patch.
|
|
296
|
+
|
|
297
|
+
> Mock service: same Local API demos Service Worker / Vite middleware. Routes used on this page are listed in the API config routes section below.
|
|
298
|
+
|
|
299
|
+
Attribute map
|
|
300
|
+
|
|
301
|
+
| Attribute (ancestor) | APIConfiguration field | Role |
|
|
302
|
+
|---------------------|---------------------------|------|
|
|
303
|
+
| serviceURL | serviceURL | Base URL (e.g. /docs-mock-api) |
|
|
304
|
+
| token | token | Static Bearer sent on REST calls |
|
|
305
|
+
| userName / password | userName / password | Basic auth for tokenProvider fetch only |
|
|
306
|
+
| eventsApiToken | authToken | Bearer for tokenProvider when no Basic |
|
|
307
|
+
| tokenProvider | tokenProvider | Path to GET a new token ({ token } JSON) |
|
|
308
|
+
| wordingProvider | — (read by wording()) | Base path + query for label batch GET |
|
|
309
|
+
| wordingVersionProvider | — | Publisher id; bump version → reload wordings |
|
|
310
|
+
| credentials | credentials | fetch credentials mode |
|
|
311
|
+
| addHTTPResponse | addHTTPResponse | Attach sonichttpresponse </pre>
|
|
312
|
+
</section>
|
|
313
|
+
<section id="docs-_misc-dynamic-path" data-doc-id="docs/_misc/dynamic-path">
|
|
314
|
+
<h2><a href="../docs/_misc/dynamic-path.html">Dynamic path placeholders</a></h2>
|
|
315
|
+
<p><strong>Doc ID:</strong> <code>docs/_misc/dynamic-path</code> · <a href="../docs/_misc/dynamic-path.html">full page</a></p>
|
|
316
|
+
<p>Decorators and DataProviderKey paths can include placeholders resolved on the host component at runtime:</p>
|
|
317
|
+
<pre class="doc-excerpt">Dynamic path placeholders
|
|
318
|
+
|
|
319
|
+
Decorators and DataProviderKey paths can include placeholders resolved on the host component at runtime:
|
|
320
|
+
|
|
321
|
+
- ${prop} or {$prop} — e.g. "users/${userId}", "api/sessions/${sessionId}/sync"
|
|
322
|
+
- Nested expressions — e.g. "teams.${teamId}.members"
|
|
323
|
+
|
|
324
|
+
Resolution is done by resolveDynamicPath. The root property names (userId, sessionId, …) are watched via requestAnimationFrame (see dynamicPropertyWatch.ts).
|
|
325
|
+
|
|
326
|
+
Default behaviour (ready / not ready)
|
|
327
|
+
|
|
328
|
+
| Placeholder value | Path ready? | Inserted segment | Notes |
|
|
329
|
+
|-------------------|---------------|------------------|-------|
|
|
330
|
+
| undefined | no | — | Wait until defined |
|
|
331
|
+
| null | no | — | Same as undefined |
|
|
332
|
+
| "" | yes | empty string | e.g. sessions//sync — request may still run |
|
|
333
|
+
| 0 | yes | "0" | Not treated as “missing” |
|
|
334
|
+
| false | yes | "false" | |
|
|
335
|
+
| 42, "alpha" | yes | "42", "alpha" | |
|
|
336
|
+
|
|
337
|
+
When ready: false, decorators do not call the network (for @get / @post / @put / @patch), unsubscribe (@bind / @subscribe), or skip publisher binding (@publish / @handle). The decorated property is often left unchanged or set to undefined (HTTP decorators).
|
|
338
|
+
|
|
339
|
+
When the placeholder later becomes valid, observers run again and behaviour r</pre>
|
|
340
|
+
</section>
|
|
341
|
+
<section id="docs-_misc-endpoint" data-doc-id="docs/_misc/endpoint">
|
|
342
|
+
<h2><a href="../docs/_misc/endpoint.html">Endpoint</a></h2>
|
|
343
|
+
<p><strong>Doc ID:</strong> <code>docs/_misc/endpoint</code> · <a href="../docs/_misc/endpoint.html">full page</a></p>
|
|
344
|
+
<p>Endpoint<T, U> describes a single HTTP path (or a path accepted by API.get) and carries the expected response type T. Unlike DataProviderKey, there is no dot-navigation: the path is one string.</p>
|
|
345
|
+
<pre class="doc-excerpt">Endpoint
|
|
346
|
+
|
|
347
|
+
Endpoint describes a single HTTP path (or a path accepted by API.get) and carries the expected response type T. Unlike DataProviderKey, there is no dot-navigation: the path is one string.
|
|
348
|
+
|
|
349
|
+
The optional second generic U (default any) describes host properties used to resolve dynamic segments in the path (${…} / {$…}), for example with @get or @post. See Dynamic path placeholders for null / undefined / "" / 0 and skipEmptyPlaceholder.
|
|
350
|
+
|
|
351
|
+
Import
|
|
352
|
+
|
|
353
|
+
import { Endpoint } from "@supersoniks/concorde/utils/endpoint";
|
|
354
|
+
|
|
355
|
+
Construction
|
|
356
|
+
|
|
357
|
+
const users = new Endpoint&lt;User[]&gt;("users?limit=10");
|
|
358
|
+
users.path; // "users?limit=10"
|
|
359
|
+
|
|
360
|
+
const one = new Endpoint&lt;User, { userId: string }&gt;("users/${userId}");
|
|
361
|
+
// userId on the host class is observed when used with @get
|
|
362
|
+
|
|
363
|
+
Normalization
|
|
364
|
+
|
|
365
|
+
Endpoint.normalizePath trims the string, rejects an empty path, strips leading slashes for paths relative to serviceURL, collapses duplicate slashes, and validates absolute http(s):// URLs.
|
|
366
|
+
|
|
367
|
+
Publisher key for payloads
|
|
368
|
+
|
|
369
|
+
getDataProviderKey() returns a typed publisher key whose path matches the endpoint path (payload typing follows ApiResult for this endpoint). Useful when pairing @get with @publish / @subscribe (see</pre>
|
|
370
|
+
</section>
|
|
371
|
+
</article>
|
|
372
|
+
</main>
|
|
373
|
+
</body>
|
|
374
|
+
</html>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fr" data-doc-id="crawl-index">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Concorde documentation index</title>
|
|
7
|
+
<meta name="description" content="Static crawl index for Concorde framework documentation. All pages use .html under /crawl/.">
|
|
8
|
+
<meta name="keywords" content="Concorde, documentation index, web components, Lit, DataProvider">
|
|
9
|
+
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/index.html">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<header>
|
|
13
|
+
<h1>Concorde documentation</h1>
|
|
14
|
+
<p>Static pages for crawlers and AI indexing. Interactive docs: <a href="https://concorde.supersoniks.org/">https://concorde.supersoniks.org/</a></p>
|
|
15
|
+
<p>Full text mirror: <a href="https://concorde.supersoniks.org/llms-full.txt">llms-full.txt</a></p>
|
|
16
|
+
<ul>
|
|
17
|
+
<li><a href="hubs/decorators.html">Decorators hub (@get, @post, …)</a></li>
|
|
18
|
+
<li><a href="hubs/remote-data.html">Remote data hub (@get, List, Queue)</a></li>
|
|
19
|
+
<li><a href="hubs/form-components.html">Form components hub</a></li>
|
|
20
|
+
</ul>
|
|
21
|
+
</header>
|
|
22
|
+
<main>
|
|
23
|
+
<ul>
|
|
24
|
+
<li><a href="core/components/functional/date/date.html">Date</a> <small>(core/components/functional/date/date)</small></li>
|
|
25
|
+
<li><a href="core/components/functional/fetch/fetch.html">Fetch</a> <small>(core/components/functional/fetch/fetch)</small></li>
|
|
26
|
+
<li><a href="core/components/functional/if/if.html">if</a> <small>(core/components/functional/if/if)</small></li>
|
|
27
|
+
<li><a href="core/components/functional/list/list.html">List</a> <small>(core/components/functional/list/list)</small></li>
|
|
28
|
+
<li><a href="core/components/functional/mix/mix.html">Mix</a> <small>(core/components/functional/mix/mix)</small></li>
|
|
29
|
+
<li><a href="core/components/functional/queue/queue.html">Queue</a> <small>(core/components/functional/queue/queue)</small></li>
|
|
30
|
+
<li><a href="core/components/functional/router/router.html">Router</a> <small>(core/components/functional/router/router)</small></li>
|
|
31
|
+
<li><a href="core/components/functional/sdui/sdui.html">SDUI</a> <small>(core/components/functional/sdui/sdui)</small></li>
|
|
32
|
+
<li><a href="core/components/functional/states/states.html">States</a> <small>(core/components/functional/states/states)</small></li>
|
|
33
|
+
<li><a href="core/components/functional/submit/submit.html">Submit</a> <small>(core/components/functional/submit/submit)</small></li>
|
|
34
|
+
<li><a href="core/components/functional/subscriber/subscriber.html">Subscriber</a> <small>(core/components/functional/subscriber/subscriber)</small></li>
|
|
35
|
+
<li><a href="core/components/functional/value/value.html">Value</a> <small>(core/components/functional/value/value)</small></li>
|
|
36
|
+
<li><a href="core/components/ui/alert-messages/alert-messages.html">Concorde</a> <small>(core/components/ui/alert-messages/alert-messages)</small></li>
|
|
37
|
+
<li><a href="core/components/ui/alert/alert.html">Alert</a> <small>(core/components/ui/alert/alert)</small></li>
|
|
38
|
+
<li><a href="core/components/ui/badge/badge.html">Badge</a> <small>(core/components/ui/badge/badge)</small></li>
|
|
39
|
+
<li><a href="core/components/ui/button/button.html">Button</a> <small>(core/components/ui/button/button)</small></li>
|
|
40
|
+
<li><a href="core/components/ui/captcha/captcha.html">Captcha</a> <small>(core/components/ui/captcha/captcha)</small></li>
|
|
41
|
+
<li><a href="core/components/ui/card/card.html">Card</a> <small>(core/components/ui/card/card)</small></li>
|
|
42
|
+
<li><a href="core/components/ui/divider/divider.html">Divider</a> <small>(core/components/ui/divider/divider)</small></li>
|
|
43
|
+
<li><a href="core/components/ui/form/checkbox/checkbox.html">Checkbox</a> <small>(core/components/ui/form/checkbox/checkbox)</small></li>
|
|
44
|
+
<li><a href="core/components/ui/form/fieldset/fieldset.html">Fieldset</a> <small>(core/components/ui/form/fieldset/fieldset)</small></li>
|
|
45
|
+
<li><a href="core/components/ui/form/form-actions/form-actions.html">Form-actions</a> <small>(core/components/ui/form/form-actions/form-actions)</small></li>
|
|
46
|
+
<li><a href="core/components/ui/form/form-layout/form-layout.html">Form-layout</a> <small>(core/components/ui/form/form-layout/form-layout)</small></li>
|
|
47
|
+
<li><a href="core/components/ui/form/input-autocomplete/input-autocomplete.html">Input-autocomplete</a> <small>(core/components/ui/form/input-autocomplete/input-autocomplete)</small></li>
|
|
48
|
+
<li><a href="core/components/ui/form/input/input.html">Input</a> <small>(core/components/ui/form/input/input)</small></li>
|
|
49
|
+
<li><a href="core/components/ui/form/radio/radio.html">Radio</a> <small>(core/components/ui/form/radio/radio)</small></li>
|
|
50
|
+
<li><a href="core/components/ui/form/select/select.html">Select</a> <small>(core/components/ui/form/select/select)</small></li>
|
|
51
|
+
<li><a href="core/components/ui/form/switch/switch.html">Switch</a> <small>(core/components/ui/form/switch/switch)</small></li>
|
|
52
|
+
<li><a href="core/components/ui/form/textarea/textarea.html">Textarea</a> <small>(core/components/ui/form/textarea/textarea)</small></li>
|
|
53
|
+
<li><a href="core/components/ui/group/group.html">Group</a> <small>(core/components/ui/group/group)</small></li>
|
|
54
|
+
<li><a href="core/components/ui/icon/icon.html">Icon</a> <small>(core/components/ui/icon/icon)</small></li>
|
|
55
|
+
<li><a href="core/components/ui/image/image.html">Image</a> <small>(core/components/ui/image/image)</small></li>
|
|
56
|
+
<li><a href="core/components/ui/link/link.html">Link</a> <small>(core/components/ui/link/link)</small></li>
|
|
57
|
+
<li><a href="core/components/ui/loader/loader.html">Loader</a> <small>(core/components/ui/loader/loader)</small></li>
|
|
58
|
+
<li><a href="core/components/ui/menu/menu.html">Menu</a> <small>(core/components/ui/menu/menu)</small></li>
|
|
59
|
+
<li><a href="core/components/ui/modal/modal.html">Concorde</a> <small>(core/components/ui/modal/modal)</small></li>
|
|
60
|
+
<li><a href="core/components/ui/pop/pop.html">Pop</a> <small>(core/components/ui/pop/pop)</small></li>
|
|
61
|
+
<li><a href="core/components/ui/progress/progress.html">Progress bar</a> <small>(core/components/ui/progress/progress)</small></li>
|
|
62
|
+
<li><a href="core/components/ui/table/table.html">Table</a> <small>(core/components/ui/table/table)</small></li>
|
|
63
|
+
<li><a href="core/components/ui/toast/toast.html">Toast</a> <small>(core/components/ui/toast/toast)</small></li>
|
|
64
|
+
<li><a href="core/components/ui/tooltip/tooltip.html">Tooltip</a> <small>(core/components/ui/tooltip/tooltip)</small></li>
|
|
65
|
+
<li><a href="docs/_core-concept/dataFlow.html">Data flow</a> <small>(docs/_core-concept/dataFlow)</small></li>
|
|
66
|
+
<li><a href="docs/_core-concept/overview.html">lit + tailwind + vite</a> <small>(docs/_core-concept/overview)</small></li>
|
|
67
|
+
<li><a href="docs/_core-concept/subscriber.html">Legacy: Subscriber mixin</a> <small>(docs/_core-concept/subscriber)</small></li>
|
|
68
|
+
<li><a href="docs/_decorators/ancestor-attribute.html">@ancestorAttribute</a> <small>(docs/_decorators/ancestor-attribute)</small></li>
|
|
69
|
+
<li><a href="docs/_decorators/auto-subscribe.html">@autoSubscribe</a> <small>(docs/_decorators/auto-subscribe)</small></li>
|
|
70
|
+
<li><a href="docs/_decorators/bind.html">@bind</a> <small>(docs/_decorators/bind)</small></li>
|
|
71
|
+
<li><a href="docs/_decorators/get.html">@get</a> <small>(docs/_decorators/get)</small></li>
|
|
72
|
+
<li><a href="docs/_decorators/handle.html">@handle</a> <small>(docs/_decorators/handle)</small></li>
|
|
73
|
+
<li><a href="docs/_decorators/on-assign.html">@onAssign</a> <small>(docs/_decorators/on-assign)</small></li>
|
|
74
|
+
<li><a href="docs/_decorators/patch.html">@patch</a> <small>(docs/_decorators/patch)</small></li>
|
|
75
|
+
<li><a href="docs/_decorators/post.html">@post</a> <small>(docs/_decorators/post)</small></li>
|
|
76
|
+
<li><a href="docs/_decorators/publish.html">@publish</a> <small>(docs/_decorators/publish)</small></li>
|
|
77
|
+
<li><a href="docs/_decorators/put.html">@put</a> <small>(docs/_decorators/put)</small></li>
|
|
78
|
+
<li><a href="docs/_decorators/subscribe.html">@subscribe</a> <small>(docs/_decorators/subscribe)</small></li>
|
|
79
|
+
<li><a href="docs/_decorators/wait-for-ancestors.html">@awaitConnectedAncestors and @dispatchConnectedEvent</a> <small>(docs/_decorators/wait-for-ancestors)</small></li>
|
|
80
|
+
<li><a href="docs/_directives/sub.html">sub()</a> <small>(docs/_directives/sub)</small></li>
|
|
81
|
+
<li><a href="docs/_getting-started/ai-agents.html">AI agents (skills & AGENTS.md)</a> <small>(docs/_getting-started/ai-agents)</small></li>
|
|
82
|
+
<li><a href="docs/_getting-started/concorde-manual-install.html">Manual installation (Vite)</a> <small>(docs/_getting-started/concorde-manual-install)</small></li>
|
|
83
|
+
<li><a href="docs/_getting-started/concorde-outside.html">Installation</a> <small>(docs/_getting-started/concorde-outside)</small></li>
|
|
84
|
+
<li><a href="docs/_getting-started/create-a-component.html">Creating components</a> <small>(docs/_getting-started/create-a-component)</small></li>
|
|
85
|
+
<li><a href="docs/_getting-started/my-first-component.html">My first component</a> <small>(docs/_getting-started/my-first-component)</small></li>
|
|
86
|
+
<li><a href="docs/_getting-started/my-first-subscriber.html">Legacy: My first subscriber component</a> <small>(docs/_getting-started/my-first-subscriber)</small></li>
|
|
87
|
+
<li><a href="docs/_getting-started/pubsub.html">Legacy: Sharing data</a> <small>(docs/_getting-started/pubsub)</small></li>
|
|
88
|
+
<li><a href="docs/_getting-started/start.html">Introduction</a> <small>(docs/_getting-started/start)</small></li>
|
|
89
|
+
<li><a href="docs/_getting-started/theming.html">Adding styles</a> <small>(docs/_getting-started/theming)</small></li>
|
|
90
|
+
<li><a href="docs/_misc/api-configuration.html">API configuration</a> <small>(docs/_misc/api-configuration)</small></li>
|
|
91
|
+
<li><a href="docs/_misc/dataProviderKey.html">DataProviderKey</a> <small>(docs/_misc/dataProviderKey)</small></li>
|
|
92
|
+
<li><a href="docs/_misc/docs-mock-api.html">Local API demos (offline)</a> <small>(docs/_misc/docs-mock-api)</small></li>
|
|
93
|
+
<li><a href="docs/_misc/dynamic-path.html">Dynamic path placeholders</a> <small>(docs/_misc/dynamic-path)</small></li>
|
|
94
|
+
<li><a href="docs/_misc/endpoint.html">Endpoint</a> <small>(docs/_misc/endpoint)</small></li>
|
|
95
|
+
<li><a href="docs/_misc/html-integration.html">HTML integration (no Lit)</a> <small>(docs/_misc/html-integration)</small></li>
|
|
96
|
+
</ul>
|
|
97
|
+
</main>
|
|
98
|
+
</body>
|
|
99
|
+
</html>
|
package/docs/docs-mock-api-sw.js
CHANGED
|
@@ -578,7 +578,9 @@
|
|
|
578
578
|
return json2(paginateUsers(url));
|
|
579
579
|
}
|
|
580
580
|
if (subPath === "/geo/communes" || subPath.startsWith("/geo/communes")) {
|
|
581
|
-
return json2(geoCommunes(url)
|
|
581
|
+
return json2(geoCommunes(url), {
|
|
582
|
+
headers: { "X-Fetched-At": (/* @__PURE__ */ new Date()).toISOString() }
|
|
583
|
+
});
|
|
582
584
|
}
|
|
583
585
|
const jokeMatch = subPath.match(/^\/jokes\/joke\/([^/]+)$/);
|
|
584
586
|
if (jokeMatch) {
|