@rippling/pebble-sdui-web 0.25.3 → 0.26.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/dist/catalogs/custom-apps/catalog.d.ts +1 -1
- package/dist/catalogs/custom-apps/component-events.d.ts +2 -1
- package/dist/catalogs/custom-apps/component-props.d.ts +62 -6
- package/dist/catalogs/custom-apps/components.d.ts +4 -3
- package/dist/catalogs/custom-apps/index.cjs +2 -2
- package/dist/catalogs/custom-apps/index.cjs.map +1 -1
- package/dist/catalogs/custom-apps/index.d.ts +3 -3
- package/dist/catalogs/custom-apps/index.js +1379 -141
- package/dist/catalogs/custom-apps/index.js.map +1 -1
- package/dist/core/expressions.d.ts +2 -2
- package/dist/core/spec.cjs +1 -1
- package/dist/core/spec.cjs.map +1 -1
- package/dist/core/spec.js +62 -54
- package/dist/core/spec.js.map +1 -1
- package/dist/docs/concepts.md +13 -14
- package/dist/docs/typescript/api-reference.md +6 -7
- package/dist/docs/typescript/recipes.md +14 -10
- package/dist/docs/typescript/web/catalogs/custom-apps/components.md +29 -4
- package/dist/docs/typescript/web/catalogs/custom-apps/definitions.md +120 -1
- package/dist/docs/typescript/web/catalogs/custom-apps/readme.md +1 -1
- package/dist/docs/typescript/web/catalogs/custom-apps/types.md +87 -0
- package/dist/sdk-docs.cjs +17 -21
- package/dist/sdk-docs.cjs.map +1 -1
- package/dist/sdk-docs.js +17 -21
- package/dist/sdk-docs.js.map +1 -1
- package/package.json +1 -1
|
@@ -583,34 +583,81 @@ Referenced by:
|
|
|
583
583
|
TypeScript type:
|
|
584
584
|
|
|
585
585
|
```ts
|
|
586
|
-
"amplitude" | "asana" | "ashby" | "atlassian" | "bitrise" | "box" | "buildkite" | "cloudflare" | "contentful" | "context7" | "datadog" | "deel" | "dropbox" | "excalidraw" | "expo" | "figma" | "gem" | "github" | "gitlab" | "gmail" | "gong" | "googlecalendar" | "googlechat" | "googledocs" | "googledrive" | "googleforms" | "googlesheets" | "googleslides" | "googleworkspace" | "greenhouse" | "incidentio" | "ironclad" | "iterable" | "jumpcloud" | "launchdarkly" | "linear" | "logrocket" | "lucid" | "mermaidchart" | "metaview" | "microsoftcalendar" | "microsoftexcel" | "microsoftonedrive" | "microsoftoutlook" | "microsoftteams" | "microsoftword" | "mutiny" | "netsuite" | "notion" | "peopleapi" | "ramp" | "ranger" | "rippling" | "salesforce" | "sendoso" | "sentry" | "slack" | "snowflake" | "stripe" | "symmetrypayroll" | "vantage" | "zoom"
|
|
586
|
+
"achriom" | "activitysmith" | "adisinsight" | "admakeai" | "ahrefs" | "aiera" | "airops" | "airtable" | "aisa" | "aivideomcpbyaituber" | "alibabaclouddevops" | "amplitude" | "ansvar" | "asana" | "ashby" | "atlassian" | "attio" | "aurora" | "bitlymcpserver" | "bitrise" | "box" | "brex" | "buildkite" | "calendly" | "campfire" | "canva" | "carta" | "circleback" | "clarify" | "clay" | "clickup" | "close" | "cloudflare" | "cloudinary" | "coindesk" | "commonroom" | "consensus" | "contentful" | "contentsquare" | "context7" | "controlplane" | "coros" | "courtlistener" | "craft" | "crossbeam" | "cryptostruct" | "daloopa" | "databricks" | "datadog" | "dayai" | "deel" | "descrybelegalengine" | "digits" | "dropbox" | "eraser" | "excalidraw" | "expo" | "fellowai" | "figma" | "formcarrymcp" | "gem" | "genviral" | "github" | "githubcopilot" | "gitlab" | "gmail" | "gong" | "googleapis" | "googlecalendar" | "googlechat" | "googledocs" | "googledrive" | "googleforms" | "googlesheets" | "googleslides" | "googleworkspace" | "granolamcp" | "greenhouse" | "guru" | "huggingfacemcpserver" | "ibisworld" | "imanagework" | "incidentio" | "ironclad" | "iterable" | "jam" | "jentic" | "jotform" | "jumpcloud" | "katto" | "ketryx" | "klaviyo" | "krisp" | "langsmith" | "launchdarkly" | "lawveai" | "lilt" | "linear" | "21stdevmagic" | "logrocket" | "lucid" | "lunarcrush" | "make" | "mem" | "mercury" | "mermaidchart" | "metaview" | "microsoftcalendar" | "microsoftexcel" | "microsoftonedrive" | "microsoftoutlook" | "microsoftteams" | "microsoftword" | "mintlify" | "morningstar" | "motherduck" | "motioncreativeanalytics" | "mutiny" | "neon" | "netdocuments" | "netlify" | "netsuite" | "newsmind" | "notion" | "officialapolloiomcp" | "omnianalytics" | "openmetadata" | "openrouter" | "orionbygravity" | "outreach" | "pagedwebsiteupload" | "pendo" | "peopleapi" | "pexafy" | "pixelesq" | "planetscale" | "playsheetmusic" | "posthogmcp" | "postmanapi" | "pylon" | "railway" | "ramp" | "ranger" | "razorpay" | "readwise" | "rillet" | "rippling" | "salesforce" | "send" | "sendoso" | "sensefold" | "sentry" | "slack" | "snowflake" | "splice" | "statable" | "stripe" | "stytch" | "supabase" | "superhumanmail" | "supermetrics" | "switchboard" | "symmetrypayroll" | "synapseorg" | "tavily" | "threejs3dviewer" | "todoistmcp" | "topcounselbythelsuite" | "unspam" | "vantage" | "visualsandbox" | "webflow" | "wix" | "wordpresscom" | "workable" | "zapier" | "zoom"
|
|
587
587
|
```
|
|
588
588
|
|
|
589
589
|
Allowed values:
|
|
590
590
|
|
|
591
591
|
| Value |
|
|
592
592
|
|---|
|
|
593
|
+
| `achriom` |
|
|
594
|
+
| `activitysmith` |
|
|
595
|
+
| `adisinsight` |
|
|
596
|
+
| `admakeai` |
|
|
597
|
+
| `ahrefs` |
|
|
598
|
+
| `aiera` |
|
|
599
|
+
| `airops` |
|
|
600
|
+
| `airtable` |
|
|
601
|
+
| `aisa` |
|
|
602
|
+
| `aivideomcpbyaituber` |
|
|
603
|
+
| `alibabaclouddevops` |
|
|
593
604
|
| `amplitude` |
|
|
605
|
+
| `ansvar` |
|
|
594
606
|
| `asana` |
|
|
595
607
|
| `ashby` |
|
|
596
608
|
| `atlassian` |
|
|
609
|
+
| `attio` |
|
|
610
|
+
| `aurora` |
|
|
611
|
+
| `bitlymcpserver` |
|
|
597
612
|
| `bitrise` |
|
|
598
613
|
| `box` |
|
|
614
|
+
| `brex` |
|
|
599
615
|
| `buildkite` |
|
|
616
|
+
| `calendly` |
|
|
617
|
+
| `campfire` |
|
|
618
|
+
| `canva` |
|
|
619
|
+
| `carta` |
|
|
620
|
+
| `circleback` |
|
|
621
|
+
| `clarify` |
|
|
622
|
+
| `clay` |
|
|
623
|
+
| `clickup` |
|
|
624
|
+
| `close` |
|
|
600
625
|
| `cloudflare` |
|
|
626
|
+
| `cloudinary` |
|
|
627
|
+
| `coindesk` |
|
|
628
|
+
| `commonroom` |
|
|
629
|
+
| `consensus` |
|
|
601
630
|
| `contentful` |
|
|
631
|
+
| `contentsquare` |
|
|
602
632
|
| `context7` |
|
|
633
|
+
| `controlplane` |
|
|
634
|
+
| `coros` |
|
|
635
|
+
| `courtlistener` |
|
|
636
|
+
| `craft` |
|
|
637
|
+
| `crossbeam` |
|
|
638
|
+
| `cryptostruct` |
|
|
639
|
+
| `daloopa` |
|
|
640
|
+
| `databricks` |
|
|
603
641
|
| `datadog` |
|
|
642
|
+
| `dayai` |
|
|
604
643
|
| `deel` |
|
|
644
|
+
| `descrybelegalengine` |
|
|
645
|
+
| `digits` |
|
|
605
646
|
| `dropbox` |
|
|
647
|
+
| `eraser` |
|
|
606
648
|
| `excalidraw` |
|
|
607
649
|
| `expo` |
|
|
650
|
+
| `fellowai` |
|
|
608
651
|
| `figma` |
|
|
652
|
+
| `formcarrymcp` |
|
|
609
653
|
| `gem` |
|
|
654
|
+
| `genviral` |
|
|
610
655
|
| `github` |
|
|
656
|
+
| `githubcopilot` |
|
|
611
657
|
| `gitlab` |
|
|
612
658
|
| `gmail` |
|
|
613
659
|
| `gong` |
|
|
660
|
+
| `googleapis` |
|
|
614
661
|
| `googlecalendar` |
|
|
615
662
|
| `googlechat` |
|
|
616
663
|
| `googledocs` |
|
|
@@ -619,15 +666,35 @@ Allowed values:
|
|
|
619
666
|
| `googlesheets` |
|
|
620
667
|
| `googleslides` |
|
|
621
668
|
| `googleworkspace` |
|
|
669
|
+
| `granolamcp` |
|
|
622
670
|
| `greenhouse` |
|
|
671
|
+
| `guru` |
|
|
672
|
+
| `huggingfacemcpserver` |
|
|
673
|
+
| `ibisworld` |
|
|
674
|
+
| `imanagework` |
|
|
623
675
|
| `incidentio` |
|
|
624
676
|
| `ironclad` |
|
|
625
677
|
| `iterable` |
|
|
678
|
+
| `jam` |
|
|
679
|
+
| `jentic` |
|
|
680
|
+
| `jotform` |
|
|
626
681
|
| `jumpcloud` |
|
|
682
|
+
| `katto` |
|
|
683
|
+
| `ketryx` |
|
|
684
|
+
| `klaviyo` |
|
|
685
|
+
| `krisp` |
|
|
686
|
+
| `langsmith` |
|
|
627
687
|
| `launchdarkly` |
|
|
688
|
+
| `lawveai` |
|
|
689
|
+
| `lilt` |
|
|
628
690
|
| `linear` |
|
|
691
|
+
| `21stdevmagic` |
|
|
629
692
|
| `logrocket` |
|
|
630
693
|
| `lucid` |
|
|
694
|
+
| `lunarcrush` |
|
|
695
|
+
| `make` |
|
|
696
|
+
| `mem` |
|
|
697
|
+
| `mercury` |
|
|
631
698
|
| `mermaidchart` |
|
|
632
699
|
| `metaview` |
|
|
633
700
|
| `microsoftcalendar` |
|
|
@@ -636,21 +703,69 @@ Allowed values:
|
|
|
636
703
|
| `microsoftoutlook` |
|
|
637
704
|
| `microsoftteams` |
|
|
638
705
|
| `microsoftword` |
|
|
706
|
+
| `mintlify` |
|
|
707
|
+
| `morningstar` |
|
|
708
|
+
| `motherduck` |
|
|
709
|
+
| `motioncreativeanalytics` |
|
|
639
710
|
| `mutiny` |
|
|
711
|
+
| `neon` |
|
|
712
|
+
| `netdocuments` |
|
|
713
|
+
| `netlify` |
|
|
640
714
|
| `netsuite` |
|
|
715
|
+
| `newsmind` |
|
|
641
716
|
| `notion` |
|
|
717
|
+
| `officialapolloiomcp` |
|
|
718
|
+
| `omnianalytics` |
|
|
719
|
+
| `openmetadata` |
|
|
720
|
+
| `openrouter` |
|
|
721
|
+
| `orionbygravity` |
|
|
722
|
+
| `outreach` |
|
|
723
|
+
| `pagedwebsiteupload` |
|
|
724
|
+
| `pendo` |
|
|
642
725
|
| `peopleapi` |
|
|
726
|
+
| `pexafy` |
|
|
727
|
+
| `pixelesq` |
|
|
728
|
+
| `planetscale` |
|
|
729
|
+
| `playsheetmusic` |
|
|
730
|
+
| `posthogmcp` |
|
|
731
|
+
| `postmanapi` |
|
|
732
|
+
| `pylon` |
|
|
733
|
+
| `railway` |
|
|
643
734
|
| `ramp` |
|
|
644
735
|
| `ranger` |
|
|
736
|
+
| `razorpay` |
|
|
737
|
+
| `readwise` |
|
|
738
|
+
| `rillet` |
|
|
645
739
|
| `rippling` |
|
|
646
740
|
| `salesforce` |
|
|
741
|
+
| `send` |
|
|
647
742
|
| `sendoso` |
|
|
743
|
+
| `sensefold` |
|
|
648
744
|
| `sentry` |
|
|
649
745
|
| `slack` |
|
|
650
746
|
| `snowflake` |
|
|
747
|
+
| `splice` |
|
|
748
|
+
| `statable` |
|
|
651
749
|
| `stripe` |
|
|
750
|
+
| `stytch` |
|
|
751
|
+
| `supabase` |
|
|
752
|
+
| `superhumanmail` |
|
|
753
|
+
| `supermetrics` |
|
|
754
|
+
| `switchboard` |
|
|
652
755
|
| `symmetrypayroll` |
|
|
756
|
+
| `synapseorg` |
|
|
757
|
+
| `tavily` |
|
|
758
|
+
| `threejs3dviewer` |
|
|
759
|
+
| `todoistmcp` |
|
|
760
|
+
| `topcounselbythelsuite` |
|
|
761
|
+
| `unspam` |
|
|
653
762
|
| `vantage` |
|
|
763
|
+
| `visualsandbox` |
|
|
764
|
+
| `webflow` |
|
|
765
|
+
| `wix` |
|
|
766
|
+
| `wordpresscom` |
|
|
767
|
+
| `workable` |
|
|
768
|
+
| `zapier` |
|
|
654
769
|
| `zoom` |
|
|
655
770
|
|
|
656
771
|
Referenced by:
|
|
@@ -1912,6 +2027,8 @@ Referenced by:
|
|
|
1912
2027
|
|---|---|---|
|
|
1913
2028
|
| type | `DropdownFooter` | `type` |
|
|
1914
2029
|
| type | `DropdownList2` | `type` |
|
|
2030
|
+
| type | `ListItemFooter` | `type` |
|
|
2031
|
+
| type | `ListItemList` | `type` |
|
|
1915
2032
|
| type | `MenuListList` | `type` |
|
|
1916
2033
|
|
|
1917
2034
|
## DropdownPlacement
|
|
@@ -1944,6 +2061,7 @@ Referenced by:
|
|
|
1944
2061
|
| Kind | Entity | Field |
|
|
1945
2062
|
|---|---|---|
|
|
1946
2063
|
| component | `Dropdown` | `placement` |
|
|
2064
|
+
| type | `DropdownAction` | `placement` |
|
|
1947
2065
|
|
|
1948
2066
|
## EditDataOutcome
|
|
1949
2067
|
|
|
@@ -2995,6 +3113,7 @@ Referenced by:
|
|
|
2995
3113
|
| type | `FormWorkEmailTag` | `appearance` |
|
|
2996
3114
|
| type | `GridProp` | `appearance` |
|
|
2997
3115
|
| type | `LabelValue` | `appearance` |
|
|
3116
|
+
| type | `ListItemTag` | `appearance` |
|
|
2998
3117
|
| type | `ObjectUIStatsProp` | `appearance` |
|
|
2999
3118
|
| type | `RadioTag` | `appearance` |
|
|
3000
3119
|
| type | `WorkEmailTag` | `appearance` |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# custom-apps Catalog
|
|
3
3
|
|
|
4
4
|
Catalog: `custom-apps`
|
|
5
|
-
Version: `1.
|
|
5
|
+
Version: `1.17.1`
|
|
6
6
|
SDK language: `typescript`
|
|
7
7
|
|
|
8
8
|
Use this catalog index after you have chosen this catalog for the spec. Do not mix components, actions, computed functions, or render helpers from another catalog unless that catalog explicitly documents compatibility.
|
|
@@ -1199,6 +1199,27 @@ Breadcrumb props for the drawer title
|
|
|
1199
1199
|
|
|
1200
1200
|
No additional properties.
|
|
1201
1201
|
|
|
1202
|
+
## DropdownAction
|
|
1203
|
+
|
|
1204
|
+
Overflow menu displayed at the end of the row
|
|
1205
|
+
|
|
1206
|
+
### Fields
|
|
1207
|
+
|
|
1208
|
+
| Name | Required | Type | Description |
|
|
1209
|
+
|---|---:|---|---|
|
|
1210
|
+
| `footer` | no | [ListItemFooter](./types.md#listitemfooter) | Optional action pinned at the bottom of the overflow menu |
|
|
1211
|
+
| `header` | no | string | Optional heading shown above the action list |
|
|
1212
|
+
| `isDisabled` | no | boolean | Disable the overflow-menu trigger. Default: false |
|
|
1213
|
+
| `list` | yes | [ListItemList](./types.md#listitemlist)[] | Actions displayed in the overflow menu, with optional separators |
|
|
1214
|
+
| `maxHeight` | no | number | Maximum overflow-menu height in pixels |
|
|
1215
|
+
| `placement` | no | [DropdownPlacement](./definitions.md#dropdownplacement) | Popover position. Default: bottom-end |
|
|
1216
|
+
| `searchable` | no | boolean | Enable search within the overflow menu |
|
|
1217
|
+
| `shouldAutoClose` | no | boolean | Close the menu after selecting an action. Default: true |
|
|
1218
|
+
| `shouldCloseOnScroll` | no | boolean | Close the menu on document scroll |
|
|
1219
|
+
| `width` | no | number | Width of the overflow menu in pixels |
|
|
1220
|
+
|
|
1221
|
+
No additional properties.
|
|
1222
|
+
|
|
1202
1223
|
## DropdownDisabledInfo
|
|
1203
1224
|
|
|
1204
1225
|
### Fields
|
|
@@ -3200,6 +3221,71 @@ No additional properties.
|
|
|
3200
3221
|
|
|
3201
3222
|
No additional properties.
|
|
3202
3223
|
|
|
3224
|
+
## ListItemDisabledInfo
|
|
3225
|
+
|
|
3226
|
+
### Fields
|
|
3227
|
+
|
|
3228
|
+
| Name | Required | Type | Description |
|
|
3229
|
+
|---|---:|---|---|
|
|
3230
|
+
| `content` | yes | string | |
|
|
3231
|
+
|
|
3232
|
+
No additional properties.
|
|
3233
|
+
|
|
3234
|
+
## ListItemFooter
|
|
3235
|
+
|
|
3236
|
+
Optional action pinned at the bottom of the overflow menu
|
|
3237
|
+
|
|
3238
|
+
### Fields
|
|
3239
|
+
|
|
3240
|
+
| Name | Required | Type | Description |
|
|
3241
|
+
|---|---:|---|---|
|
|
3242
|
+
| `disabledInfo` | no | string \| [ListItemDisabledInfo](./types.md#listitemdisabledinfo) | Tooltip content shown when the action is disabled |
|
|
3243
|
+
| `id` | no | string | Unique action identifier written to actionClickedId before the action event fires. Required unless isSeparator is true |
|
|
3244
|
+
| `isDisabled` | no | boolean | Whether the action is disabled. Default: false |
|
|
3245
|
+
| `isSeparator` | no | true | Render a visual separator between action groups. Omit all other fields when set |
|
|
3246
|
+
| `label` | no | string | Visible label for the overflow-menu action. Required unless isSeparator is true |
|
|
3247
|
+
| `labelIcon` | no | string | Optional Icon.TYPES value shown next to the label |
|
|
3248
|
+
| `leftIconType` | no | string | Optional Icon.TYPES value shown before the label |
|
|
3249
|
+
| `quaternaryLabel` | no | string | Quaternary text below the tertiary label |
|
|
3250
|
+
| `secondaryLabel` | no | string | Secondary text below the main label |
|
|
3251
|
+
| `tag` | no | string \| [ListItemTag](./types.md#listitemtag) | Tag shown beside the action label |
|
|
3252
|
+
| `tertiaryLabel` | no | string | Tertiary text below the secondary label |
|
|
3253
|
+
| `type` | no | [DropdownFooterType](./definitions.md#dropdownfootertype) | Visual style for the action (WARNING or ALERT), e.g. destructive actions |
|
|
3254
|
+
|
|
3255
|
+
No additional properties.
|
|
3256
|
+
|
|
3257
|
+
## ListItemList
|
|
3258
|
+
|
|
3259
|
+
### Fields
|
|
3260
|
+
|
|
3261
|
+
| Name | Required | Type | Description |
|
|
3262
|
+
|---|---:|---|---|
|
|
3263
|
+
| `disabledInfo` | no | string \| [ListItemDisabledInfo](./types.md#listitemdisabledinfo) | Tooltip content shown when the action is disabled |
|
|
3264
|
+
| `id` | no | string | Unique action identifier written to actionClickedId before the action event fires. Required unless isSeparator is true |
|
|
3265
|
+
| `isDisabled` | no | boolean | Whether the action is disabled. Default: false |
|
|
3266
|
+
| `isSeparator` | no | true | Render a visual separator between action groups. Omit all other fields when set |
|
|
3267
|
+
| `label` | no | string | Visible label for the overflow-menu action. Required unless isSeparator is true |
|
|
3268
|
+
| `labelIcon` | no | string | Optional Icon.TYPES value shown next to the label |
|
|
3269
|
+
| `leftIconType` | no | string | Optional Icon.TYPES value shown before the label |
|
|
3270
|
+
| `quaternaryLabel` | no | string | Quaternary text below the tertiary label |
|
|
3271
|
+
| `secondaryLabel` | no | string | Secondary text below the main label |
|
|
3272
|
+
| `tag` | no | string \| [ListItemTag](./types.md#listitemtag) | Tag shown beside the action label |
|
|
3273
|
+
| `tertiaryLabel` | no | string | Tertiary text below the secondary label |
|
|
3274
|
+
| `type` | no | [DropdownFooterType](./definitions.md#dropdownfootertype) | Visual style for the action (WARNING or ALERT), e.g. destructive actions |
|
|
3275
|
+
|
|
3276
|
+
No additional properties.
|
|
3277
|
+
|
|
3278
|
+
## ListItemTag
|
|
3279
|
+
|
|
3280
|
+
### Fields
|
|
3281
|
+
|
|
3282
|
+
| Name | Required | Type | Description |
|
|
3283
|
+
|---|---:|---|---|
|
|
3284
|
+
| `appearance` | no | [LabelAppearance](./definitions.md#labelappearance) | Tag appearance |
|
|
3285
|
+
| `text` | yes | string | Tag text |
|
|
3286
|
+
|
|
3287
|
+
No additional properties.
|
|
3288
|
+
|
|
3203
3289
|
## LoadConfig
|
|
3204
3290
|
|
|
3205
3291
|
Semantic Lottie load configuration object
|
|
@@ -4233,6 +4319,7 @@ No additional properties.
|
|
|
4233
4319
|
| `credentialVault` | yes | [SelectionVariant2CredentialVault](./definitions.md#selectionvariant2credentialvault) | |
|
|
4234
4320
|
| `display` | no | [Display](./types.md#display) | Display title and username/owner line from the picker. Never includes passwords or vault keys. |
|
|
4235
4321
|
| `requestId` | yes | string | |
|
|
4322
|
+
| `shareId` | no | string | Server-confirmed sharing grant ID. Absent when using an older backend. |
|
|
4236
4323
|
|
|
4237
4324
|
No additional properties.
|
|
4238
4325
|
|
package/dist/sdk-docs.cjs
CHANGED
|
@@ -500,10 +500,7 @@ A **condition** controls visibility or conditional expressions. Conditions can c
|
|
|
500
500
|
|
|
501
501
|
## Repeat
|
|
502
502
|
|
|
503
|
-
A **repeat** renders
|
|
504
|
-
|
|
505
|
-
- a repeat binding attached to the repeated component
|
|
506
|
-
- an item accessor for \`$item\`, \`$bindItem\`, and \`$index\`
|
|
503
|
+
A **repeat** keeps the bound container in place and renders its children once per item in a list state path. Attach it to a child-capable container, and use \`$item\`, \`$bindItem\`, or \`$index\` in the repeated children.
|
|
507
504
|
|
|
508
505
|
Use repeat for data-driven lists instead of manually creating fixed children when the list length is dynamic.
|
|
509
506
|
|
|
@@ -1282,8 +1279,8 @@ const { $state, $bindState, $template, $cond, repeat } = specContext;
|
|
|
1282
1279
|
Use \`$state(path)\` for read-only runtime refs.
|
|
1283
1280
|
|
|
1284
1281
|
\`\`\`ts
|
|
1285
|
-
const nameRef = $state('user
|
|
1286
|
-
// Renders as: { "$state": "user
|
|
1282
|
+
const nameRef = $state('/user/name');
|
|
1283
|
+
// Renders as: { "$state": "/user/name" }
|
|
1287
1284
|
\`\`\`
|
|
1288
1285
|
|
|
1289
1286
|
The path is type checked against \`AppState\`. Invalid paths should fail TypeScript type checking.
|
|
@@ -1293,8 +1290,8 @@ The path is type checked against \`AppState\`. Invalid paths should fail TypeScr
|
|
|
1293
1290
|
Use \`$bindState(path)\` when a component should write back to state.
|
|
1294
1291
|
|
|
1295
1292
|
\`\`\`ts
|
|
1296
|
-
const nameBinding = $bindState('user
|
|
1297
|
-
// Renders as: { "$bindState": "user
|
|
1293
|
+
const nameBinding = $bindState('/user/name');
|
|
1294
|
+
// Renders as: { "$bindState": "/user/name" }
|
|
1298
1295
|
\`\`\`
|
|
1299
1296
|
|
|
1300
1297
|
Use bindings only for props documented as writable, such as form values or selected values.
|
|
@@ -1304,11 +1301,11 @@ Use bindings only for props documented as writable, such as form values or selec
|
|
|
1304
1301
|
\`$template\` is a tagged template helper for string interpolation.
|
|
1305
1302
|
|
|
1306
1303
|
\`\`\`ts
|
|
1307
|
-
const greeting = $template\`Hello \${$state('user
|
|
1308
|
-
// Renders as: { "$template": "Hello \${user
|
|
1304
|
+
const greeting = $template\`Hello \${$state('/user/name')}!\`;
|
|
1305
|
+
// Renders as: { "$template": "Hello \${/user/name}!" }
|
|
1309
1306
|
\`\`\`
|
|
1310
1307
|
|
|
1311
|
-
Template interpolations
|
|
1308
|
+
Template interpolations accept state refs, \`null\`, or \`undefined\`. Use item and index refs directly in compatible repeated-child props. For combined text on web, use \`$concat\` when the runtime registers standard directives; item and index refs cannot be interpolated in \`$template\`.
|
|
1312
1309
|
|
|
1313
1310
|
## Conditions
|
|
1314
1311
|
|
|
@@ -1317,8 +1314,8 @@ Conditions are used for \`visible\` and \`$cond()\`.
|
|
|
1317
1314
|
\`\`\`ts
|
|
1318
1315
|
import { equals, gt, truthy, and_, or_, not_ } from '@rippling/pebble-sdui-web';
|
|
1319
1316
|
|
|
1320
|
-
const isAdmin = equals($state('user
|
|
1321
|
-
const hasTodos = gt($state('count'), 0);
|
|
1317
|
+
const isAdmin = equals($state('/user/role'), 'admin');
|
|
1318
|
+
const hasTodos = gt($state('/count'), 0);
|
|
1322
1319
|
const show = and_(isAdmin, hasTodos);
|
|
1323
1320
|
\`\`\`
|
|
1324
1321
|
|
|
@@ -1342,7 +1339,7 @@ Use \`$cond(condition, thenValue, elseValue)\` for runtime prop values.
|
|
|
1342
1339
|
|
|
1343
1340
|
\`\`\`ts
|
|
1344
1341
|
const statusColor = $cond(
|
|
1345
|
-
equals($state('active'), true),
|
|
1342
|
+
equals($state('/active'), true),
|
|
1346
1343
|
'green',
|
|
1347
1344
|
'gray'
|
|
1348
1345
|
);
|
|
@@ -1355,23 +1352,22 @@ Both branches should resolve to the same prop type.
|
|
|
1355
1352
|
\`repeat(path, key?)\` creates a repeat binding and a typed item accessor.
|
|
1356
1353
|
|
|
1357
1354
|
\`\`\`ts
|
|
1358
|
-
const [todoRepeat, todo] = repeat('todos', 'id');
|
|
1355
|
+
const [todoRepeat, todo] = repeat('/todos', 'id');
|
|
1359
1356
|
|
|
1360
1357
|
const textRef = todo.$('text'); // { "$item": "text" }
|
|
1361
1358
|
const doneBind = todo.$bind('done'); // { "$bindItem": "done" }
|
|
1362
1359
|
const indexRef = todo.$index(); // { "$index": true }
|
|
1363
1360
|
\`\`\`
|
|
1364
1361
|
|
|
1365
|
-
Attach the repeat binding to
|
|
1362
|
+
Attach the repeat binding to a child-capable container. The container renders once; its children render once per item:
|
|
1366
1363
|
|
|
1367
1364
|
\`\`\`ts
|
|
1368
|
-
import { Text } from '@rippling/pebble-sdui-web/catalogs/custom-apps';
|
|
1365
|
+
import { Text, VStack } from '@rippling/pebble-sdui-web/catalogs/custom-apps';
|
|
1369
1366
|
|
|
1370
|
-
const
|
|
1367
|
+
const todoList = VStack({
|
|
1371
1368
|
repeat: todoRepeat,
|
|
1372
|
-
props: {
|
|
1373
|
-
|
|
1374
|
-
},
|
|
1369
|
+
props: { gap: 'space300' },
|
|
1370
|
+
children: [Text({ props: { text: todo.$('text') } })],
|
|
1375
1371
|
});
|
|
1376
1372
|
\`\`\`
|
|
1377
1373
|
|