@rippling/pebble-sdui-web 0.20.0 → 0.21.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.
@@ -98,3 +98,93 @@ Params type: `ArraySomeParams`
98
98
  | `where` | yes | unknown | |
99
99
 
100
100
  No additional properties.
101
+
102
+ ## formatDate
103
+
104
+ Formats a date using the viewer locale and timezone configured in the client.
105
+
106
+ Use inside any dynamically resolved component prop.
107
+ Example: { "$computed": "format_date", "args": { "value": { "$state": "/createdAt" } } }
108
+ Uses the viewer's configured locale, timezone, and date order.
109
+ Invalid date values return an empty string.
110
+
111
+ Catalog key: `format_date`
112
+ Helper: `formatDate`
113
+ Params type: `FormatDateParams`
114
+
115
+ ### Params
116
+
117
+ | Name | Required | Type | Description |
118
+ |---|---:|---|---|
119
+ | `style` | no | [formatDateStyle](./definitions.md#formatdatestyle) | Date display style. Defaults to medium. |
120
+ | `timeZone` | no | string | Optional IANA timezone override, for example America/Los_Angeles. Defaults to the viewer timezone configured in the client. |
121
+ | `value` | yes | string | ISO date or date-time string to format. |
122
+
123
+ No additional properties.
124
+
125
+ ## formatDateTime
126
+
127
+ Formats a date and time using the viewer locale and timezone configured in the client.
128
+
129
+ Use inside any dynamically resolved component prop.
130
+ Example: { "$computed": "format_date_time", "args": { "value": { "$state": "/createdAt" } } }
131
+ Uses the viewer's configured locale, timezone, date order, and 12/24-hour preference.
132
+ Invalid date values return an empty string.
133
+
134
+ Catalog key: `format_date_time`
135
+ Helper: `formatDateTime`
136
+ Params type: `FormatDateTimeParams`
137
+
138
+ ### Params
139
+
140
+ | Name | Required | Type | Description |
141
+ |---|---:|---|---|
142
+ | `dateStyle` | no | [formatDateStyle](./definitions.md#formatdatestyle) | Date display style. Defaults to medium. |
143
+ | `timeStyle` | no | [formatDateTimeTimeStyle](./definitions.md#formatdatetimetimestyle) | Time display style. Defaults to short. |
144
+ | `timeZone` | no | string | Optional IANA timezone override, for example America/Los_Angeles. Defaults to the viewer timezone configured in the client. |
145
+ | `value` | yes | string | ISO date or date-time string to format. |
146
+
147
+ No additional properties.
148
+
149
+ ## formatRelativeTime
150
+
151
+ Formats a date as relative time using the viewer locale configured in the client.
152
+
153
+ Use inside any dynamically resolved component prop.
154
+ Example: { "$computed": "format_relative_time", "args": { "value": { "$state": "/createdAt" } } }
155
+ Invalid date values return an empty string.
156
+
157
+ Catalog key: `format_relative_time`
158
+ Helper: `formatRelativeTime`
159
+ Params type: `FormatRelativeTimeParams`
160
+
161
+ ### Params
162
+
163
+ | Name | Required | Type | Description |
164
+ |---|---:|---|---|
165
+ | `value` | yes | string | ISO date or date-time string to format. |
166
+
167
+ No additional properties.
168
+
169
+ ## formatTime
170
+
171
+ Formats a time using the viewer locale and timezone configured in the client.
172
+
173
+ Use inside any dynamically resolved component prop.
174
+ Example: { "$computed": "format_time", "args": { "value": { "$state": "/createdAt" } } }
175
+ Uses the viewer's configured locale, timezone, and 12/24-hour preference.
176
+ Invalid date values return an empty string.
177
+
178
+ Catalog key: `format_time`
179
+ Helper: `formatTime`
180
+ Params type: `FormatTimeParams`
181
+
182
+ ### Params
183
+
184
+ | Name | Required | Type | Description |
185
+ |---|---:|---|---|
186
+ | `style` | no | [formatDateTimeTimeStyle](./definitions.md#formatdatetimetimestyle) | Time display style. Defaults to short. |
187
+ | `timeZone` | no | string | Optional IANA timezone override, for example America/Los_Angeles. Defaults to the viewer timezone configured in the client. |
188
+ | `value` | yes | string | ISO date or date-time string to format. |
189
+
190
+ No additional properties.
@@ -2246,6 +2246,51 @@ Referenced by:
2246
2246
  | component | `FloatingButton` | `type` |
2247
2247
  | component | `IconButton` | `type` |
2248
2248
 
2249
+ ## formatDateStyle
2250
+
2251
+ TypeScript type:
2252
+
2253
+ ```ts
2254
+ "short" | "medium" | "long"
2255
+ ```
2256
+
2257
+ Allowed values:
2258
+
2259
+ | Value |
2260
+ |---|
2261
+ | `short` |
2262
+ | `medium` |
2263
+ | `long` |
2264
+
2265
+ Referenced by:
2266
+
2267
+ | Kind | Entity | Field |
2268
+ |---|---|---|
2269
+ | computed function | `formatDate` | `style` |
2270
+ | computed function | `formatDateTime` | `dateStyle` |
2271
+
2272
+ ## formatDateTimeTimeStyle
2273
+
2274
+ TypeScript type:
2275
+
2276
+ ```ts
2277
+ "short" | "long"
2278
+ ```
2279
+
2280
+ Allowed values:
2281
+
2282
+ | Value |
2283
+ |---|
2284
+ | `short` |
2285
+ | `long` |
2286
+
2287
+ Referenced by:
2288
+
2289
+ | Kind | Entity | Field |
2290
+ |---|---|---|
2291
+ | computed function | `formatDateTime` | `timeStyle` |
2292
+ | computed function | `formatTime` | `style` |
2293
+
2249
2294
  ## FormInputGroupInputType
2250
2295
 
2251
2296
  TypeScript type:
@@ -2,7 +2,7 @@
2
2
  # custom-apps Catalog
3
3
 
4
4
  Catalog: `custom-apps`
5
- Version: `1.11.0`
5
+ Version: `1.12.0`
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rippling/pebble-sdui-web",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "Type-safe TypeScript web SDK for authoring json-render specs",
5
5
  "repository": {
6
6
  "type": "git",