@wise/dynamic-flow-types 2.23.1 → 2.24.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.
@@ -45,6 +45,7 @@ export type { SearchLayout } from './layout/SearchLayout';
45
45
  export type { StatusListLayout } from './layout/StatusListLayout';
46
46
  export type { StatusListLayoutItem } from './layout/StatusListLayoutItem';
47
47
  export type { StatusListLayoutStatus } from './layout/StatusListLayoutStatus';
48
+ export type { ItemCallToAction } from './layout/ItemCallToAction';
48
49
  export type { SearchResult } from './responses/search/SearchResult';
49
50
  export type { SearchResponseBody } from './responses/search/SearchResponseBody';
50
51
  export type { Schema } from './schema/Schema';
@@ -231,6 +231,13 @@ export type StatusListItem = {
231
231
  icon: Icon;
232
232
  status?: 'done' | 'not-done' | 'pending';
233
233
  title: string;
234
+ callToAction?: StatusListItemCallToAction;
235
+ };
236
+ export type StatusListItemCallToAction = {
237
+ accessibilityDescription?: string;
238
+ href?: string;
239
+ title: string;
240
+ onClick: () => void;
234
241
  };
235
242
  export type StatusListItemStatus = 'done' | 'not-done' | 'pending';
236
243
  export type FormSectionRendererProps = {
@@ -247,14 +254,26 @@ interface BaseInputRendererProps {
247
254
  autoComplete: string;
248
255
  description?: string;
249
256
  disabled: boolean;
257
+ /**
258
+ * @deprecated please use the `validationState` property instead
259
+ */
250
260
  error?: string;
251
261
  help?: string;
252
262
  label?: string;
253
263
  placeholder?: string;
254
264
  required: boolean;
265
+ /** @experimental */
266
+ validationState: ValidationResult | undefined;
255
267
  onBlur: () => void;
256
268
  onFocus: () => void;
257
269
  }
270
+ export type ValidationResult = {
271
+ status: 'valid';
272
+ message?: string;
273
+ } | {
274
+ status: 'invalid';
275
+ message: string;
276
+ };
258
277
  export interface BooleanInputRendererProps extends BaseInputRendererProps {
259
278
  type: 'input-boolean';
260
279
  value: boolean;
@@ -326,7 +345,12 @@ export type RepeatableRendererProps = {
326
345
  children: ReactNode[];
327
346
  editableItem: ReactNode;
328
347
  editItemTitle: string;
348
+ /**
349
+ * @deprecated please use the `validationState` property instead
350
+ */
329
351
  error?: string;
352
+ /** @experimental */
353
+ validationState: ValidationResult | undefined;
330
354
  items: RepeatableItemRendererProps[];
331
355
  title: string;
332
356
  /** @experimental */
@@ -146,6 +146,12 @@ type StatusListItem = {
146
146
  description?: string;
147
147
  icon?: Icon;
148
148
  status?: 'done' | 'not-done' | 'pending';
149
+ callToAction?: StatusListItemCallToAction;
150
+ };
151
+ type StatusListItemCallToAction = {
152
+ title: string;
153
+ accessibilityDescription?: string;
154
+ behavior: Behavior;
149
155
  };
150
156
  export type LoadingIndicatorLayout = {
151
157
  type: 'loading-indicator';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/dynamic-flow-types",
3
- "version": "2.23.1",
3
+ "version": "2.24.0",
4
4
  "description": "Dynamic Flow TypeScript Types",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -24,8 +24,8 @@
24
24
  ],
25
25
  "devDependencies": {
26
26
  "@formatjs/cli": "^6.2.12",
27
- "@types/react": "18.3.8",
28
- "esbuild": "0.23.1",
27
+ "@types/react": "18.3.11",
28
+ "esbuild": "0.24.0",
29
29
  "npm-run-all2": "6.2.3",
30
30
  "ts-to-zod": "3.6.1",
31
31
  "typescript": "5.6.2"