@supersoniks/concorde 4.7.4 → 4.8.0
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/README.md +1 -1
- package/ai/cursor/rules/concorde.mdc +1 -1
- package/ai/skills/concorde-scope/SKILL.md +2 -2
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +289 -289
- package/concorde-core.es.js +4837 -4544
- package/dist/concorde-core.bundle.js +289 -289
- package/dist/concorde-core.es.js +4837 -4544
- package/dist/docs-mock-api-sw.js +19 -0
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/docs/assets/index-wyNMyWT9.js +11196 -0
- package/docs/docs-mock-api-sw.js +19 -0
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +1 -1
- package/package.json +9 -1
- package/public/docs-mock-api-sw.js +19 -0
- package/public/docs-mock-api-sw.js.map +2 -2
- package/src/core/components/functional/example/example.ts +3 -3
- package/src/core/components/ui/icon/icon.ts +17 -2
- package/src/core/components/ui/menu/menu.ts +12 -3
- package/src/core/decorators/api.post.spec.ts +293 -0
- package/src/core/decorators/api.spec.ts +6 -6
- package/src/core/decorators/api.ts +643 -12
- package/src/core/decorators/subscriber/bind.ts +13 -5
- package/src/core/decorators/subscriber/dynamicPath.spec.ts +53 -0
- package/src/core/decorators/subscriber/dynamicPath.ts +23 -1
- package/src/core/decorators/subscriber/handle.ts +3 -1
- package/src/core/decorators/subscriber/onAssign.ts +10 -2
- package/src/core/decorators/subscriber/publish.ts +12 -2
- package/src/core/utils/PublisherProxy.ts +95 -11
- package/src/core/utils/api.ts +72 -3
- package/src/core/utils/dpOptions.spec.ts +56 -0
- package/src/core/utils/endpoint.ts +3 -3
- package/src/decorators.ts +17 -1
- package/src/docs/_core-concept/dataFlow.md +9 -3
- package/src/docs/_decorators/bind.md +2 -2
- package/src/docs/_decorators/get.md +13 -4
- package/src/docs/_decorators/handle.md +5 -1
- package/src/docs/_decorators/on-assign.md +2 -0
- package/src/docs/_decorators/patch.md +45 -0
- package/src/docs/_decorators/post.md +93 -0
- package/src/docs/_decorators/publish.md +1 -1
- package/src/docs/_decorators/put.md +43 -0
- package/src/docs/_decorators/subscribe.md +4 -1
- package/src/docs/_directives/sub.md +1 -1
- package/src/docs/_getting-started/my-first-component.md +1 -1
- package/src/docs/_misc/api-configuration.md +3 -1
- package/src/docs/_misc/dataProviderKey.md +2 -2
- package/src/docs/_misc/dynamic-path.md +71 -0
- package/src/docs/_misc/endpoint.md +5 -3
- package/src/docs/components/docs-demo-sources.ts +102 -3
- package/src/docs/components/docs-lit-demo-raw.ts +2 -26
- package/src/docs/components/docs-lit-demo.ts +9 -42
- package/src/docs/components/docs-source-excerpt.ts +53 -0
- package/src/docs/components/docs-source-link.ts +24 -8
- package/src/docs/components/docs-source-raw.ts +34 -0
- package/src/docs/example/decorators-demo-geo.ts +2 -2
- package/src/docs/example/decorators-demo-post.ts +249 -0
- package/src/docs/example/decorators-demo-subscribe-publish-get-demos.ts +5 -5
- package/src/docs/example/decorators-demo.ts +1 -0
- package/src/docs/example/docs-api-config-demos.ts +5 -5
- package/src/docs/mock-api/router.ts +20 -0
- package/src/docs/navigation/navigation.ts +16 -0
- package/src/docs/search/docs-search.json +540 -15
- package/src/tsconfig.json +24 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/vite.config.mts +1 -1
- package/docs/assets/index-CwtPzTFq.js +0 -7508
- package/docs/src/core/components/functional/date/date.md +0 -290
- package/docs/src/core/components/functional/fetch/fetch.md +0 -125
- package/docs/src/core/components/functional/if/if.md +0 -9
- package/docs/src/core/components/functional/list/list.md +0 -65
- package/docs/src/core/components/functional/mix/mix.md +0 -41
- package/docs/src/core/components/functional/queue/queue.md +0 -72
- package/docs/src/core/components/functional/router/router.md +0 -94
- package/docs/src/core/components/functional/sdui/default-library.json +0 -108
- package/docs/src/core/components/functional/sdui/example.json +0 -99
- package/docs/src/core/components/functional/sdui/sdui.md +0 -356
- package/docs/src/core/components/functional/states/states.md +0 -87
- package/docs/src/core/components/functional/submit/submit.md +0 -114
- package/docs/src/core/components/functional/subscriber/subscriber.md +0 -91
- package/docs/src/core/components/functional/value/value.md +0 -35
- package/docs/src/core/components/ui/alert/alert.md +0 -121
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
- package/docs/src/core/components/ui/badge/badge.md +0 -127
- package/docs/src/core/components/ui/button/button.md +0 -182
- package/docs/src/core/components/ui/captcha/captcha.md +0 -12
- package/docs/src/core/components/ui/card/card.md +0 -97
- package/docs/src/core/components/ui/divider/divider.md +0 -35
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -77
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +0 -129
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +0 -77
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +0 -44
- package/docs/src/core/components/ui/form/input/input.md +0 -142
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -133
- package/docs/src/core/components/ui/form/radio/radio.md +0 -57
- package/docs/src/core/components/ui/form/select/select.md +0 -71
- package/docs/src/core/components/ui/form/switch/switch.md +0 -57
- package/docs/src/core/components/ui/form/textarea/textarea.md +0 -65
- package/docs/src/core/components/ui/group/group.md +0 -75
- package/docs/src/core/components/ui/icon/icon.md +0 -125
- package/docs/src/core/components/ui/icon/icons.json +0 -1
- package/docs/src/core/components/ui/image/image.md +0 -107
- package/docs/src/core/components/ui/link/link.md +0 -43
- package/docs/src/core/components/ui/loader/loader.md +0 -55
- package/docs/src/core/components/ui/menu/menu.md +0 -329
- package/docs/src/core/components/ui/modal/modal.md +0 -119
- package/docs/src/core/components/ui/pop/pop.md +0 -96
- package/docs/src/core/components/ui/progress/progress.md +0 -63
- package/docs/src/core/components/ui/table/table.md +0 -455
- package/docs/src/core/components/ui/toast/toast.md +0 -166
- package/docs/src/core/components/ui/tooltip/tooltip.md +0 -82
- package/docs/src/docs/_core-concept/dataFlow.md +0 -73
- package/docs/src/docs/_core-concept/overview.md +0 -57
- package/docs/src/docs/_core-concept/subscriber.md +0 -75
- package/docs/src/docs/_decorators/ancestor-attribute.md +0 -79
- package/docs/src/docs/_decorators/auto-subscribe.md +0 -202
- package/docs/src/docs/_decorators/bind.md +0 -167
- package/docs/src/docs/_decorators/get.md +0 -68
- package/docs/src/docs/_decorators/handle.md +0 -171
- package/docs/src/docs/_decorators/on-assign.md +0 -388
- package/docs/src/docs/_decorators/publish.md +0 -55
- package/docs/src/docs/_decorators/subscribe.md +0 -97
- package/docs/src/docs/_decorators/wait-for-ancestors.md +0 -163
- package/docs/src/docs/_directives/sub.md +0 -91
- package/docs/src/docs/_getting-started/ai-agents.md +0 -56
- package/docs/src/docs/_getting-started/concorde-manual-install.md +0 -133
- package/docs/src/docs/_getting-started/concorde-outside.md +0 -33
- package/docs/src/docs/_getting-started/create-a-component.md +0 -139
- package/docs/src/docs/_getting-started/my-first-component.md +0 -236
- package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -120
- package/docs/src/docs/_getting-started/pubsub.md +0 -37
- package/docs/src/docs/_getting-started/start.md +0 -47
- package/docs/src/docs/_getting-started/theming.md +0 -91
- package/docs/src/docs/_misc/api-configuration.md +0 -79
- package/docs/src/docs/_misc/dataProviderKey.md +0 -168
- package/docs/src/docs/_misc/docs-mock-api.md +0 -60
- package/docs/src/docs/_misc/endpoint.md +0 -43
- package/docs/src/docs/_misc/html-integration.md +0 -13
- package/docs/src/docs/search/docs-search.json +0 -8532
- package/docs/src/tag-list.json +0 -1
- package/docs/src/tsconfig-model.json +0 -23
- package/docs/src/tsconfig.json +0 -1095
|
@@ -3245,7 +3245,7 @@
|
|
|
3245
3245
|
}
|
|
3246
3246
|
},
|
|
3247
3247
|
{
|
|
3248
|
-
"search": "Dynamic paths (users.${userId}) → decorators or sub() — not get("users.${id}") in imperative code.\n",
|
|
3248
|
+
"search": "Dynamic paths (users.${userId}) → decorators or sub() — not get("users.${id}") in imperative code. Resolution rules: Dynamic path placeholders.\n",
|
|
3249
3249
|
"files": {
|
|
3250
3250
|
"docs/_core-concept/dataFlow.md": {
|
|
3251
3251
|
"title": "Data flow",
|
|
@@ -4340,7 +4340,7 @@
|
|
|
4340
4340
|
}
|
|
4341
4341
|
},
|
|
4342
4342
|
{
|
|
4343
|
-
"search": "See also: @subscribe, @handle, @publish, @get.\n",
|
|
4343
|
+
"search": "See also: @subscribe, @handle, @publish, @get, @post, @put, @patch.\n",
|
|
4344
4344
|
"files": {
|
|
4345
4345
|
"docs/_decorators/bind.md": {
|
|
4346
4346
|
"title": "@bind",
|
|
@@ -4550,7 +4550,7 @@
|
|
|
4550
4550
|
}
|
|
4551
4551
|
},
|
|
4552
4552
|
{
|
|
4553
|
-
"search": "Use ${prop} or ${this.prop} inside a normal string literal (not a JS template literal with backticks). @bind re-subscribes when a reactive dependency changes.\n",
|
|
4553
|
+
"search": "Use ${prop} or ${this.prop} inside a normal string literal (not a JS template literal with backticks). @bind re-subscribes when a reactive dependency changes. While a placeholder is null/undefined, the bind is inactive; optional { skipEmptyPlaceholder: true } also waits on "". See Dynamic path placeholders.\n",
|
|
4554
4554
|
"files": {
|
|
4555
4555
|
"docs/_decorators/bind.md": {
|
|
4556
4556
|
"title": "@bind",
|
|
@@ -4625,7 +4625,7 @@
|
|
|
4625
4625
|
}
|
|
4626
4626
|
},
|
|
4627
4627
|
{
|
|
4628
|
-
"search": "Loads data through API.getDetailed. The decorated property is
|
|
4628
|
+
"search": "Loads data through API.getDetailed. The decorated property is ApiResult<T> | null: request, response (or null for dataProvider(...) resolution without HTTP), and typed result.\n",
|
|
4629
4629
|
"files": {
|
|
4630
4630
|
"docs/_decorators/get.md": {
|
|
4631
4631
|
"title": "@get",
|
|
@@ -4640,7 +4640,7 @@
|
|
|
4640
4640
|
}
|
|
4641
4641
|
},
|
|
4642
4642
|
{
|
|
4643
|
-
"search": "Pass an Endpoint<T> as the first argument. Import get and
|
|
4643
|
+
"search": "Pass an Endpoint<T> as the first argument. Import get and ApiResult from @supersoniks/concorde/decorators, and Endpoint from @supersoniks/concorde/utils/endpoint.\n",
|
|
4644
4644
|
"files": {
|
|
4645
4645
|
"docs/_decorators/get.md": {
|
|
4646
4646
|
"title": "@get",
|
|
@@ -4654,6 +4654,21 @@
|
|
|
4654
4654
|
}
|
|
4655
4655
|
}
|
|
4656
4656
|
},
|
|
4657
|
+
{
|
|
4658
|
+
"search": "${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.\n",
|
|
4659
|
+
"files": {
|
|
4660
|
+
"docs/_decorators/get.md": {
|
|
4661
|
+
"title": "@get",
|
|
4662
|
+
"hashes": {
|
|
4663
|
+
"dynamic-path": {
|
|
4664
|
+
"count": 1,
|
|
4665
|
+
"title": "Dynamic path",
|
|
4666
|
+
"type": "paragraph"
|
|
4667
|
+
}
|
|
4668
|
+
}
|
|
4669
|
+
}
|
|
4670
|
+
}
|
|
4671
|
+
},
|
|
4657
4672
|
{
|
|
4658
4673
|
"search": "Same demo service as sonic-queue (/docs-mock-api/geo/). Publisher setup lives in decorators-demo-geo.ts and decorators-demo-subscribe-publish-get-demos.ts.\n",
|
|
4659
4674
|
"files": {
|
|
@@ -4711,6 +4726,16 @@
|
|
|
4711
4726
|
"type": "paragraph"
|
|
4712
4727
|
}
|
|
4713
4728
|
}
|
|
4729
|
+
},
|
|
4730
|
+
"docs/_decorators/post.md": {
|
|
4731
|
+
"title": "@post",
|
|
4732
|
+
"hashes": {
|
|
4733
|
+
"live-demos": {
|
|
4734
|
+
"count": 1,
|
|
4735
|
+
"title": "Live demos",
|
|
4736
|
+
"type": "paragraph"
|
|
4737
|
+
}
|
|
4738
|
+
}
|
|
4714
4739
|
}
|
|
4715
4740
|
}
|
|
4716
4741
|
},
|
|
@@ -5030,7 +5055,22 @@
|
|
|
5030
5055
|
}
|
|
5031
5056
|
},
|
|
5032
5057
|
{
|
|
5033
|
-
"search": "See
|
|
5058
|
+
"search": "On a dynamic key path ("items.${itemId}"), if true, a placeholder resolved to '' is treated as not ready (no subscription) — empty string only, not 0 or false. See Dynamic path placeholders.\n",
|
|
5059
|
+
"files": {
|
|
5060
|
+
"docs/_decorators/handle.md": {
|
|
5061
|
+
"title": "@handle",
|
|
5062
|
+
"hashes": {
|
|
5063
|
+
"skipemptyplaceholder": {
|
|
5064
|
+
"count": 1,
|
|
5065
|
+
"title": "`skipEmptyPlaceholder`",
|
|
5066
|
+
"type": "paragraph"
|
|
5067
|
+
}
|
|
5068
|
+
}
|
|
5069
|
+
}
|
|
5070
|
+
}
|
|
5071
|
+
},
|
|
5072
|
+
{
|
|
5073
|
+
"search": "See also DataProviderKey and Dynamic path placeholders.\n",
|
|
5034
5074
|
"files": {
|
|
5035
5075
|
"docs/_decorators/handle.md": {
|
|
5036
5076
|
"title": "@handle",
|
|
@@ -5269,6 +5309,21 @@
|
|
|
5269
5309
|
}
|
|
5270
5310
|
}
|
|
5271
5311
|
},
|
|
5312
|
+
{
|
|
5313
|
+
"search": "While a placeholder is null/undefined, subscriptions are detached. Optional skipEmptyPlaceholder on @handle (typed replacement). Details: Dynamic path placeholders.\n",
|
|
5314
|
+
"files": {
|
|
5315
|
+
"docs/_decorators/on-assign.md": {
|
|
5316
|
+
"title": "@onAssign",
|
|
5317
|
+
"hashes": {
|
|
5318
|
+
"dynamic-path-driven-by-class-properties": {
|
|
5319
|
+
"count": 1,
|
|
5320
|
+
"title": "Dynamic path driven by class properties",
|
|
5321
|
+
"type": "paragraph"
|
|
5322
|
+
}
|
|
5323
|
+
}
|
|
5324
|
+
}
|
|
5325
|
+
}
|
|
5326
|
+
},
|
|
5272
5327
|
{
|
|
5273
5328
|
"search": " @property({ type: String })\n dataProvider: "demoUsers" | "demoUsersAlt" = "demoUsers";\n",
|
|
5274
5329
|
"files": {
|
|
@@ -5569,6 +5624,266 @@
|
|
|
5569
5624
|
}
|
|
5570
5625
|
}
|
|
5571
5626
|
},
|
|
5627
|
+
{
|
|
5628
|
+
"search": "@patch",
|
|
5629
|
+
"files": {
|
|
5630
|
+
"docs/_decorators/patch.md": {
|
|
5631
|
+
"title": "@patch",
|
|
5632
|
+
"hashes": {
|
|
5633
|
+
"patch": {
|
|
5634
|
+
"count": 1,
|
|
5635
|
+
"title": "",
|
|
5636
|
+
"type": "page"
|
|
5637
|
+
}
|
|
5638
|
+
}
|
|
5639
|
+
}
|
|
5640
|
+
}
|
|
5641
|
+
},
|
|
5642
|
+
{
|
|
5643
|
+
"search": "Sends data through API.patchDetailed. Same model as @post: decorated property is ApiResult<T> | null (request, response, result).\n",
|
|
5644
|
+
"files": {
|
|
5645
|
+
"docs/_decorators/patch.md": {
|
|
5646
|
+
"title": "@patch",
|
|
5647
|
+
"hashes": {
|
|
5648
|
+
"patch": {
|
|
5649
|
+
"count": 1,
|
|
5650
|
+
"title": "",
|
|
5651
|
+
"type": "paragraph"
|
|
5652
|
+
}
|
|
5653
|
+
}
|
|
5654
|
+
}
|
|
5655
|
+
}
|
|
5656
|
+
},
|
|
5657
|
+
{
|
|
5658
|
+
"search": "Pass an Endpoint<T> and a DataProviderKey for the request body. Import patch and ApiResult from @supersoniks/concorde/decorators.\n",
|
|
5659
|
+
"files": {
|
|
5660
|
+
"docs/_decorators/patch.md": {
|
|
5661
|
+
"title": "@patch",
|
|
5662
|
+
"hashes": {
|
|
5663
|
+
"patch": {
|
|
5664
|
+
"count": 1,
|
|
5665
|
+
"title": "",
|
|
5666
|
+
"type": "paragraph"
|
|
5667
|
+
}
|
|
5668
|
+
}
|
|
5669
|
+
}
|
|
5670
|
+
}
|
|
5671
|
+
},
|
|
5672
|
+
{
|
|
5673
|
+
"search": "Same as @post / @get: scoped HTML.getApiConfiguration(host) or DataProviderKey<APIConfiguration> as third argument.\n",
|
|
5674
|
+
"files": {
|
|
5675
|
+
"docs/_decorators/patch.md": {
|
|
5676
|
+
"title": "@patch",
|
|
5677
|
+
"hashes": {
|
|
5678
|
+
"configuration": {
|
|
5679
|
+
"count": 1,
|
|
5680
|
+
"title": "Configuration",
|
|
5681
|
+
"type": "paragraph"
|
|
5682
|
+
}
|
|
5683
|
+
}
|
|
5684
|
+
},
|
|
5685
|
+
"docs/_decorators/put.md": {
|
|
5686
|
+
"title": "@put",
|
|
5687
|
+
"hashes": {
|
|
5688
|
+
"configuration": {
|
|
5689
|
+
"count": 1,
|
|
5690
|
+
"title": "Configuration",
|
|
5691
|
+
"type": "paragraph"
|
|
5692
|
+
}
|
|
5693
|
+
}
|
|
5694
|
+
}
|
|
5695
|
+
}
|
|
5696
|
+
},
|
|
5697
|
+
{
|
|
5698
|
+
"search": "Same shape as PostOptions on @post (ApiSendOptions): refetchEveryMs, skipIfBodyMissing, autoPostOnBodyMutation, triggerKey, skipEmptyPlaceholder. See Dynamic path placeholders for ${sessionId} and empty-string behaviour.\n",
|
|
5699
|
+
"files": {
|
|
5700
|
+
"docs/_decorators/patch.md": {
|
|
5701
|
+
"title": "@patch",
|
|
5702
|
+
"hashes": {
|
|
5703
|
+
"options-patchoptions": {
|
|
5704
|
+
"count": 1,
|
|
5705
|
+
"title": "Options (`PatchOptions`)",
|
|
5706
|
+
"type": "paragraph"
|
|
5707
|
+
}
|
|
5708
|
+
}
|
|
5709
|
+
},
|
|
5710
|
+
"docs/_decorators/put.md": {
|
|
5711
|
+
"title": "@put",
|
|
5712
|
+
"hashes": {
|
|
5713
|
+
"options-putoptions": {
|
|
5714
|
+
"count": 1,
|
|
5715
|
+
"title": "Options (`PutOptions`)",
|
|
5716
|
+
"type": "paragraph"
|
|
5717
|
+
}
|
|
5718
|
+
}
|
|
5719
|
+
}
|
|
5720
|
+
}
|
|
5721
|
+
},
|
|
5722
|
+
{
|
|
5723
|
+
"search": "@patch(\n new Endpoint<Resource, { resourceId: string }>("resources/${resourceId}"),\n patchBodyKey,\n { skipEmptyPlaceholder: true },\n)\n@state()\npayload?: ApiResult<Resource> | null;\n \n\n",
|
|
5724
|
+
"files": {
|
|
5725
|
+
"docs/_decorators/patch.md": {
|
|
5726
|
+
"title": "@patch",
|
|
5727
|
+
"hashes": {
|
|
5728
|
+
"example": {
|
|
5729
|
+
"count": 1,
|
|
5730
|
+
"title": "Example",
|
|
5731
|
+
"type": "paragraph"
|
|
5732
|
+
}
|
|
5733
|
+
}
|
|
5734
|
+
}
|
|
5735
|
+
}
|
|
5736
|
+
},
|
|
5737
|
+
{
|
|
5738
|
+
"search": "@post",
|
|
5739
|
+
"files": {
|
|
5740
|
+
"docs/_decorators/post.md": {
|
|
5741
|
+
"title": "@post",
|
|
5742
|
+
"hashes": {
|
|
5743
|
+
"post": {
|
|
5744
|
+
"count": 1,
|
|
5745
|
+
"title": "",
|
|
5746
|
+
"type": "page"
|
|
5747
|
+
}
|
|
5748
|
+
}
|
|
5749
|
+
}
|
|
5750
|
+
}
|
|
5751
|
+
},
|
|
5752
|
+
{
|
|
5753
|
+
"search": "Sends data through API.postDetailed. The decorated property is ApiResult<T> | null: request, response, and typed result.\n",
|
|
5754
|
+
"files": {
|
|
5755
|
+
"docs/_decorators/post.md": {
|
|
5756
|
+
"title": "@post",
|
|
5757
|
+
"hashes": {
|
|
5758
|
+
"post": {
|
|
5759
|
+
"count": 1,
|
|
5760
|
+
"title": "",
|
|
5761
|
+
"type": "paragraph"
|
|
5762
|
+
}
|
|
5763
|
+
}
|
|
5764
|
+
}
|
|
5765
|
+
}
|
|
5766
|
+
},
|
|
5767
|
+
{
|
|
5768
|
+
"search": "Pass an Endpoint<T> 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.\n",
|
|
5769
|
+
"files": {
|
|
5770
|
+
"docs/_decorators/post.md": {
|
|
5771
|
+
"title": "@post",
|
|
5772
|
+
"hashes": {
|
|
5773
|
+
"post": {
|
|
5774
|
+
"count": 1,
|
|
5775
|
+
"title": "",
|
|
5776
|
+
"type": "paragraph"
|
|
5777
|
+
}
|
|
5778
|
+
}
|
|
5779
|
+
}
|
|
5780
|
+
}
|
|
5781
|
+
},
|
|
5782
|
+
{
|
|
5783
|
+
"search": "Same as @get: scoped HTML.getApiConfiguration(host) by default, or DataProviderKey<APIConfiguration> as third argument. See API configuration for mock demos.\n",
|
|
5784
|
+
"files": {
|
|
5785
|
+
"docs/_decorators/post.md": {
|
|
5786
|
+
"title": "@post",
|
|
5787
|
+
"hashes": {
|
|
5788
|
+
"configuration": {
|
|
5789
|
+
"count": 1,
|
|
5790
|
+
"title": "Configuration",
|
|
5791
|
+
"type": "paragraph"
|
|
5792
|
+
}
|
|
5793
|
+
}
|
|
5794
|
+
}
|
|
5795
|
+
}
|
|
5796
|
+
},
|
|
5797
|
+
{
|
|
5798
|
+
"search": "Mock service: POST /docs-mock-api/api/register (same route as sonic-submit demos). Publisher setup lives in decorators-demo-post.ts.\n",
|
|
5799
|
+
"files": {
|
|
5800
|
+
"docs/_decorators/post.md": {
|
|
5801
|
+
"title": "@post",
|
|
5802
|
+
"hashes": {
|
|
5803
|
+
"minimal-example": {
|
|
5804
|
+
"count": 1,
|
|
5805
|
+
"title": "Minimal example",
|
|
5806
|
+
"type": "paragraph"
|
|
5807
|
+
}
|
|
5808
|
+
}
|
|
5809
|
+
}
|
|
5810
|
+
}
|
|
5811
|
+
},
|
|
5812
|
+
{
|
|
5813
|
+
"search": "@post(\n new Endpoint<SyncResponse, { sessionId: string }>("sessions/${sessionId}/sync"),\n syncRequest,\n { triggerKey: syncTrigger },\n)\n@state()\npayload?: ApiResult<SyncResponse> | null;\n \n\n",
|
|
5814
|
+
"files": {
|
|
5815
|
+
"docs/_decorators/post.md": {
|
|
5816
|
+
"title": "@post",
|
|
5817
|
+
"hashes": {
|
|
5818
|
+
"minimal-example": {
|
|
5819
|
+
"count": 1,
|
|
5820
|
+
"title": "Minimal example",
|
|
5821
|
+
"type": "paragraph"
|
|
5822
|
+
}
|
|
5823
|
+
}
|
|
5824
|
+
}
|
|
5825
|
+
}
|
|
5826
|
+
},
|
|
5827
|
+
{
|
|
5828
|
+
"search": "Dynamic endpoint path — changing sessionId on the host re-runs the POST (POST /docs-mock-api/api/sessions/{id}/sync):\n",
|
|
5829
|
+
"files": {
|
|
5830
|
+
"docs/_decorators/post.md": {
|
|
5831
|
+
"title": "@post",
|
|
5832
|
+
"hashes": {
|
|
5833
|
+
"live-demos": {
|
|
5834
|
+
"count": 1,
|
|
5835
|
+
"title": "Live demos",
|
|
5836
|
+
"type": "paragraph"
|
|
5837
|
+
}
|
|
5838
|
+
}
|
|
5839
|
+
}
|
|
5840
|
+
}
|
|
5841
|
+
},
|
|
5842
|
+
{
|
|
5843
|
+
"search": "@post + @publish on the same property (see @publish):\n",
|
|
5844
|
+
"files": {
|
|
5845
|
+
"docs/_decorators/post.md": {
|
|
5846
|
+
"title": "@post",
|
|
5847
|
+
"hashes": {
|
|
5848
|
+
"live-demos": {
|
|
5849
|
+
"count": 1,
|
|
5850
|
+
"title": "Live demos",
|
|
5851
|
+
"type": "paragraph"
|
|
5852
|
+
}
|
|
5853
|
+
}
|
|
5854
|
+
}
|
|
5855
|
+
}
|
|
5856
|
+
},
|
|
5857
|
+
{
|
|
5858
|
+
"search": "Note: plusieurs composants @post sur la même page qui partagent le même bodyKey enverront chacun une requête à chaque mutation du body — utiliser une clé par composant (voir les deux démos live ci-dessus).\n",
|
|
5859
|
+
"files": {
|
|
5860
|
+
"docs/_decorators/post.md": {
|
|
5861
|
+
"title": "@post",
|
|
5862
|
+
"hashes": {
|
|
5863
|
+
"live-demos": {
|
|
5864
|
+
"count": 1,
|
|
5865
|
+
"title": "Live demos",
|
|
5866
|
+
"type": "paragraph"
|
|
5867
|
+
}
|
|
5868
|
+
}
|
|
5869
|
+
}
|
|
5870
|
+
}
|
|
5871
|
+
},
|
|
5872
|
+
{
|
|
5873
|
+
"search": "Path placeholders (${sessionId}, …): Dynamic path placeholders.\n",
|
|
5874
|
+
"files": {
|
|
5875
|
+
"docs/_decorators/post.md": {
|
|
5876
|
+
"title": "@post",
|
|
5877
|
+
"hashes": {
|
|
5878
|
+
"live-demos": {
|
|
5879
|
+
"count": 1,
|
|
5880
|
+
"title": "Live demos",
|
|
5881
|
+
"type": "paragraph"
|
|
5882
|
+
}
|
|
5883
|
+
}
|
|
5884
|
+
}
|
|
5885
|
+
}
|
|
5886
|
+
},
|
|
5572
5887
|
{
|
|
5573
5888
|
"search": "@publish",
|
|
5574
5889
|
"files": {
|
|
@@ -5615,7 +5930,7 @@
|
|
|
5615
5930
|
}
|
|
5616
5931
|
},
|
|
5617
5932
|
{
|
|
5618
|
-
"search": "Dynamic paths use the same placeholder rules as @bind / @subscribe.\n",
|
|
5933
|
+
"search": "Dynamic paths use the same placeholder rules as @bind / @subscribe. Resolution and skipEmptyPlaceholder: Dynamic path placeholders.\n",
|
|
5619
5934
|
"files": {
|
|
5620
5935
|
"docs/_decorators/publish.md": {
|
|
5621
5936
|
"title": "@publish",
|
|
@@ -5629,6 +5944,81 @@
|
|
|
5629
5944
|
}
|
|
5630
5945
|
}
|
|
5631
5946
|
},
|
|
5947
|
+
{
|
|
5948
|
+
"search": "@put",
|
|
5949
|
+
"files": {
|
|
5950
|
+
"docs/_decorators/put.md": {
|
|
5951
|
+
"title": "@put",
|
|
5952
|
+
"hashes": {
|
|
5953
|
+
"put": {
|
|
5954
|
+
"count": 1,
|
|
5955
|
+
"title": "",
|
|
5956
|
+
"type": "page"
|
|
5957
|
+
}
|
|
5958
|
+
}
|
|
5959
|
+
}
|
|
5960
|
+
}
|
|
5961
|
+
},
|
|
5962
|
+
{
|
|
5963
|
+
"search": "Sends data through API.putDetailed. Same model as @post: decorated property is ApiResult<T> | null (request, response, result).\n",
|
|
5964
|
+
"files": {
|
|
5965
|
+
"docs/_decorators/put.md": {
|
|
5966
|
+
"title": "@put",
|
|
5967
|
+
"hashes": {
|
|
5968
|
+
"put": {
|
|
5969
|
+
"count": 1,
|
|
5970
|
+
"title": "",
|
|
5971
|
+
"type": "paragraph"
|
|
5972
|
+
}
|
|
5973
|
+
}
|
|
5974
|
+
}
|
|
5975
|
+
}
|
|
5976
|
+
},
|
|
5977
|
+
{
|
|
5978
|
+
"search": "Pass an Endpoint<T> and a DataProviderKey for the request body. Import put and ApiResult from @supersoniks/concorde/decorators.\n",
|
|
5979
|
+
"files": {
|
|
5980
|
+
"docs/_decorators/put.md": {
|
|
5981
|
+
"title": "@put",
|
|
5982
|
+
"hashes": {
|
|
5983
|
+
"put": {
|
|
5984
|
+
"count": 1,
|
|
5985
|
+
"title": "",
|
|
5986
|
+
"type": "paragraph"
|
|
5987
|
+
}
|
|
5988
|
+
}
|
|
5989
|
+
}
|
|
5990
|
+
}
|
|
5991
|
+
},
|
|
5992
|
+
{
|
|
5993
|
+
"search": "@put(new Endpoint<Resource, { resourceId: string }>("resources/${resourceId}"), bodyKey)\n@state()\npayload?: ApiResult<Resource> | null;\n \n\n",
|
|
5994
|
+
"files": {
|
|
5995
|
+
"docs/_decorators/put.md": {
|
|
5996
|
+
"title": "@put",
|
|
5997
|
+
"hashes": {
|
|
5998
|
+
"example": {
|
|
5999
|
+
"count": 1,
|
|
6000
|
+
"title": "Example",
|
|
6001
|
+
"type": "paragraph"
|
|
6002
|
+
}
|
|
6003
|
+
}
|
|
6004
|
+
}
|
|
6005
|
+
}
|
|
6006
|
+
},
|
|
6007
|
+
{
|
|
6008
|
+
"search": "Changing resourceId on the host re-runs the PUT when the path becomes ready — see Dynamic path placeholders.\n",
|
|
6009
|
+
"files": {
|
|
6010
|
+
"docs/_decorators/put.md": {
|
|
6011
|
+
"title": "@put",
|
|
6012
|
+
"hashes": {
|
|
6013
|
+
"example": {
|
|
6014
|
+
"count": 1,
|
|
6015
|
+
"title": "Example",
|
|
6016
|
+
"type": "paragraph"
|
|
6017
|
+
}
|
|
6018
|
+
}
|
|
6019
|
+
}
|
|
6020
|
+
}
|
|
6021
|
+
},
|
|
5632
6022
|
{
|
|
5633
6023
|
"search": "@subscribe",
|
|
5634
6024
|
"files": {
|
|
@@ -5750,7 +6140,22 @@
|
|
|
5750
6140
|
}
|
|
5751
6141
|
},
|
|
5752
6142
|
{
|
|
5753
|
-
"search": "Placeholders ${prop} in the key string are resolved from properties on the same component.
|
|
6143
|
+
"search": "Placeholders ${prop} in the key string are resolved from properties on the same component. While a value is null/undefined, the subscription is inactive; optional { skipEmptyPlaceholder: true } also waits on "". Full rules: Dynamic path placeholders.\n",
|
|
6144
|
+
"files": {
|
|
6145
|
+
"docs/_decorators/subscribe.md": {
|
|
6146
|
+
"title": "@subscribe",
|
|
6147
|
+
"hashes": {
|
|
6148
|
+
"dynamic-path-and-scope": {
|
|
6149
|
+
"count": 1,
|
|
6150
|
+
"title": "Dynamic path and scope",
|
|
6151
|
+
"type": "paragraph"
|
|
6152
|
+
}
|
|
6153
|
+
}
|
|
6154
|
+
}
|
|
6155
|
+
}
|
|
6156
|
+
},
|
|
6157
|
+
{
|
|
6158
|
+
"search": "Declare dynamic props in the key’s second generic so TypeScript expects them on the host:\n",
|
|
5754
6159
|
"files": {
|
|
5755
6160
|
"docs/_decorators/subscribe.md": {
|
|
5756
6161
|
"title": "@subscribe",
|
|
@@ -6230,7 +6635,7 @@
|
|
|
6230
6635
|
}
|
|
6231
6636
|
},
|
|
6232
6637
|
{
|
|
6233
|
-
"search": "Like @subscribe: the path is resolved on the template host component; the directive re-subscribes when observed props change.\n",
|
|
6638
|
+
"search": "Like @subscribe: the path is resolved on the template host component; the directive re-subscribes when observed props change. Placeholder values (null, "", 0, …): Dynamic path placeholders (skipEmptyPlaceholder not available on sub() yet).\n",
|
|
6234
6639
|
"files": {
|
|
6235
6640
|
"docs/_directives/sub.md": {
|
|
6236
6641
|
"title": "sub()",
|
|
@@ -7165,7 +7570,7 @@
|
|
|
7165
7570
|
}
|
|
7166
7571
|
},
|
|
7167
7572
|
{
|
|
7168
|
-
"search": "The second generic ({ dataProvider: string | null }) lists what the host must expose so "${dataProvider}" can be resolved. See DataProviderKey.\n",
|
|
7573
|
+
"search": "The second generic ({ dataProvider: string | null }) lists what the host must expose so "${dataProvider}" can be resolved. See DataProviderKey and Dynamic path placeholders.\n",
|
|
7169
7574
|
"files": {
|
|
7170
7575
|
"docs/_getting-started/my-first-component.md": {
|
|
7171
7576
|
"title": "My first component",
|
|
@@ -7915,7 +8320,7 @@
|
|
|
7915
8320
|
}
|
|
7916
8321
|
},
|
|
7917
8322
|
{
|
|
7918
|
-
"search": "APIConfiguration is the object built by HTML.getApiConfiguration from ancestor attributes on the DOM (or from a typed publisher — see @get configuration key). It is passed to API by fetchers, sonic-submit, the wording() directive, and @
|
|
8323
|
+
"search": "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.\n",
|
|
7919
8324
|
"files": {
|
|
7920
8325
|
"docs/_misc/api-configuration.md": {
|
|
7921
8326
|
"title": "API configuration",
|
|
@@ -8185,7 +8590,7 @@
|
|
|
8185
8590
|
}
|
|
8186
8591
|
},
|
|
8187
8592
|
{
|
|
8188
|
-
"search": "Use placeholders ${prop} or {$prop} in the path string. The path is resolved at runtime from the component's properties. The type remains declarative:\n",
|
|
8593
|
+
"search": "Use placeholders ${prop} or {$prop} in the path string. The path is resolved at runtime from the component's properties. See Dynamic path placeholders for resolution rules and skipEmptyPlaceholder. The type remains declarative:\n",
|
|
8189
8594
|
"files": {
|
|
8190
8595
|
"docs/_misc/dataProviderKey.md": {
|
|
8191
8596
|
"title": "DataProviderKey",
|
|
@@ -8275,7 +8680,7 @@
|
|
|
8275
8680
|
}
|
|
8276
8681
|
},
|
|
8277
8682
|
{
|
|
8278
|
-
"search": "These decorators support dynamic paths: "base.${prop}" in the constructor. A wrong property type (e.g. number for DataProviderKey<string>) is a TypeScript error. See @handle for method callbacks.\n",
|
|
8683
|
+
"search": "These decorators support dynamic paths: "base.${prop}" in the constructor. A wrong property type (e.g. number for DataProviderKey<string>) is a TypeScript error. Resolution rules: Dynamic path placeholders. See @handle for method callbacks.\n",
|
|
8279
8684
|
"files": {
|
|
8280
8685
|
"docs/_misc/dataProviderKey.md": {
|
|
8281
8686
|
"title": "DataProviderKey",
|
|
@@ -8364,6 +8769,126 @@
|
|
|
8364
8769
|
}
|
|
8365
8770
|
}
|
|
8366
8771
|
},
|
|
8772
|
+
{
|
|
8773
|
+
"search": "Dynamic path placeholders",
|
|
8774
|
+
"files": {
|
|
8775
|
+
"docs/_misc/dynamic-path.md": {
|
|
8776
|
+
"title": "Dynamic path placeholders",
|
|
8777
|
+
"hashes": {
|
|
8778
|
+
"dynamic-path-placeholders": {
|
|
8779
|
+
"count": 1,
|
|
8780
|
+
"title": "",
|
|
8781
|
+
"type": "page"
|
|
8782
|
+
}
|
|
8783
|
+
}
|
|
8784
|
+
}
|
|
8785
|
+
}
|
|
8786
|
+
},
|
|
8787
|
+
{
|
|
8788
|
+
"search": "Decorators and DataProviderKey paths can include placeholders resolved on the host component at runtime:\n",
|
|
8789
|
+
"files": {
|
|
8790
|
+
"docs/_misc/dynamic-path.md": {
|
|
8791
|
+
"title": "Dynamic path placeholders",
|
|
8792
|
+
"hashes": {
|
|
8793
|
+
"dynamic-path-placeholders": {
|
|
8794
|
+
"count": 1,
|
|
8795
|
+
"title": "",
|
|
8796
|
+
"type": "paragraph"
|
|
8797
|
+
}
|
|
8798
|
+
}
|
|
8799
|
+
}
|
|
8800
|
+
}
|
|
8801
|
+
},
|
|
8802
|
+
{
|
|
8803
|
+
"search": "Resolution is done by resolveDynamicPath. The root property names (userId, sessionId, …) are watched via requestAnimationFrame (see dynamicPropertyWatch.ts).\n",
|
|
8804
|
+
"files": {
|
|
8805
|
+
"docs/_misc/dynamic-path.md": {
|
|
8806
|
+
"title": "Dynamic path placeholders",
|
|
8807
|
+
"hashes": {
|
|
8808
|
+
"dynamic-path-placeholders": {
|
|
8809
|
+
"count": 1,
|
|
8810
|
+
"title": "",
|
|
8811
|
+
"type": "paragraph"
|
|
8812
|
+
}
|
|
8813
|
+
}
|
|
8814
|
+
}
|
|
8815
|
+
}
|
|
8816
|
+
},
|
|
8817
|
+
{
|
|
8818
|
+
"search": "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).\n",
|
|
8819
|
+
"files": {
|
|
8820
|
+
"docs/_misc/dynamic-path.md": {
|
|
8821
|
+
"title": "Dynamic path placeholders",
|
|
8822
|
+
"hashes": {
|
|
8823
|
+
"default-behaviour-ready--not-ready": {
|
|
8824
|
+
"count": 1,
|
|
8825
|
+
"title": "Default behaviour (`ready` / `not ready`)",
|
|
8826
|
+
"type": "paragraph"
|
|
8827
|
+
}
|
|
8828
|
+
}
|
|
8829
|
+
}
|
|
8830
|
+
}
|
|
8831
|
+
},
|
|
8832
|
+
{
|
|
8833
|
+
"search": "When the placeholder later becomes valid, observers run again and behaviour resumes.\n",
|
|
8834
|
+
"files": {
|
|
8835
|
+
"docs/_misc/dynamic-path.md": {
|
|
8836
|
+
"title": "Dynamic path placeholders",
|
|
8837
|
+
"hashes": {
|
|
8838
|
+
"default-behaviour-ready--not-ready": {
|
|
8839
|
+
"count": 1,
|
|
8840
|
+
"title": "Default behaviour (`ready` / `not ready`)",
|
|
8841
|
+
"type": "paragraph"
|
|
8842
|
+
}
|
|
8843
|
+
}
|
|
8844
|
+
}
|
|
8845
|
+
}
|
|
8846
|
+
},
|
|
8847
|
+
{
|
|
8848
|
+
"search": "Some APIs should not run while an id is still "". Opt in per decorator:\n",
|
|
8849
|
+
"files": {
|
|
8850
|
+
"docs/_misc/dynamic-path.md": {
|
|
8851
|
+
"title": "Dynamic path placeholders",
|
|
8852
|
+
"hashes": {
|
|
8853
|
+
"skipemptyplaceholder-option": {
|
|
8854
|
+
"count": 1,
|
|
8855
|
+
"title": "`skipEmptyPlaceholder` option",
|
|
8856
|
+
"type": "paragraph"
|
|
8857
|
+
}
|
|
8858
|
+
}
|
|
8859
|
+
}
|
|
8860
|
+
}
|
|
8861
|
+
},
|
|
8862
|
+
{
|
|
8863
|
+
"search": "Does not affect 0, false, null, or undefined (nullish stays “not ready” regardless).\n",
|
|
8864
|
+
"files": {
|
|
8865
|
+
"docs/_misc/dynamic-path.md": {
|
|
8866
|
+
"title": "Dynamic path placeholders",
|
|
8867
|
+
"hashes": {
|
|
8868
|
+
"skipemptyplaceholder-option": {
|
|
8869
|
+
"count": 1,
|
|
8870
|
+
"title": "`skipEmptyPlaceholder` option",
|
|
8871
|
+
"type": "paragraph"
|
|
8872
|
+
}
|
|
8873
|
+
}
|
|
8874
|
+
}
|
|
8875
|
+
}
|
|
8876
|
+
},
|
|
8877
|
+
{
|
|
8878
|
+
"search": "Available on:\n",
|
|
8879
|
+
"files": {
|
|
8880
|
+
"docs/_misc/dynamic-path.md": {
|
|
8881
|
+
"title": "Dynamic path placeholders",
|
|
8882
|
+
"hashes": {
|
|
8883
|
+
"skipemptyplaceholder-option": {
|
|
8884
|
+
"count": 1,
|
|
8885
|
+
"title": "`skipEmptyPlaceholder` option",
|
|
8886
|
+
"type": "paragraph"
|
|
8887
|
+
}
|
|
8888
|
+
}
|
|
8889
|
+
}
|
|
8890
|
+
}
|
|
8891
|
+
},
|
|
8367
8892
|
{
|
|
8368
8893
|
"search": "Endpoint",
|
|
8369
8894
|
"files": {
|
|
@@ -8395,7 +8920,7 @@
|
|
|
8395
8920
|
}
|
|
8396
8921
|
},
|
|
8397
8922
|
{
|
|
8398
|
-
"search": "The optional second generic U (default any) describes host properties used to resolve dynamic segments in the path (${…} / {$…}), for example with
|
|
8923
|
+
"search": "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.\n",
|
|
8399
8924
|
"files": {
|
|
8400
8925
|
"docs/_misc/endpoint.md": {
|
|
8401
8926
|
"title": "Endpoint",
|
|
@@ -8440,7 +8965,7 @@
|
|
|
8440
8965
|
}
|
|
8441
8966
|
},
|
|
8442
8967
|
{
|
|
8443
|
-
"search": "getDataProviderKey() returns a typed publisher key whose path matches the endpoint path (payload typing follows
|
|
8968
|
+
"search": "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 @get).\n",
|
|
8444
8969
|
"files": {
|
|
8445
8970
|
"docs/_misc/endpoint.md": {
|
|
8446
8971
|
"title": "Endpoint",
|