@wise/dynamic-flow-client 3.20.1 → 3.20.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/main.js CHANGED
@@ -6147,12 +6147,6 @@ var decisionLayoutOptionSchema = z.object({
6147
6147
  icon: iconSchema.optional(),
6148
6148
  image: imageLayoutSchema.optional()
6149
6149
  });
6150
- var statusListLayoutItemSchema = z.object({
6151
- title: z.string(),
6152
- description: z.string().optional(),
6153
- icon: iconSchema,
6154
- status: statusListLayoutStatusSchema.optional()
6155
- });
6156
6150
  var instructionsLayoutSchema = z.object({
6157
6151
  type: z.literal("instructions"),
6158
6152
  title: z.string().optional(),
@@ -6160,6 +6154,10 @@ var instructionsLayoutSchema = z.object({
6160
6154
  control: z.string().optional(),
6161
6155
  margin: sizeSchema.optional()
6162
6156
  });
6157
+ var behaviorSchema = z.object({
6158
+ action: actionSchema.optional(),
6159
+ link: linkSchema.optional()
6160
+ });
6163
6161
  var buttonLayoutSchema = z.object({
6164
6162
  type: z.literal("button"),
6165
6163
  size: sizeSchema.optional(),
@@ -6176,10 +6174,6 @@ var reviewLayoutFieldSchema = z.object({
6176
6174
  value: z.string(),
6177
6175
  help: helpSchema.optional()
6178
6176
  });
6179
- var behaviorSchema = z.object({
6180
- action: actionSchema.optional(),
6181
- link: linkSchema.optional()
6182
- });
6183
6177
  var searchResultSearchSchema = z.object({
6184
6178
  type: z.literal("search"),
6185
6179
  title: z.string(),
@@ -6240,12 +6234,10 @@ var decisionLayoutSchema = z.object({
6240
6234
  control: z.string().optional(),
6241
6235
  margin: sizeSchema.optional()
6242
6236
  });
6243
- var statusListLayoutSchema = z.object({
6244
- type: z.literal("status-list"),
6245
- items: z.array(statusListLayoutItemSchema),
6246
- title: z.string().optional(),
6247
- control: z.string().optional(),
6248
- margin: sizeSchema.optional()
6237
+ var itemCallToActionSchema = z.object({
6238
+ title: z.string(),
6239
+ accessibilityDescription: z.string().optional(),
6240
+ behavior: behaviorSchema
6249
6241
  });
6250
6242
  var reviewLayoutSchema = z.object({
6251
6243
  type: z.literal("review"),
@@ -6279,6 +6271,13 @@ var alertLayoutSchema = z.object({
6279
6271
  margin: sizeSchema.optional(),
6280
6272
  callToAction: alertLayoutCallToActionSchema.optional()
6281
6273
  });
6274
+ var statusListLayoutItemSchema = z.object({
6275
+ title: z.string(),
6276
+ description: z.string().optional(),
6277
+ icon: iconSchema,
6278
+ status: statusListLayoutStatusSchema.optional(),
6279
+ callToAction: itemCallToActionSchema.optional()
6280
+ });
6282
6281
  var searchResponseBodySchema = z.object({
6283
6282
  results: z.array(searchResultSchema)
6284
6283
  });
@@ -6320,6 +6319,13 @@ var constSchemaSchema = z.object({
6320
6319
  analyticsId: z.string().optional(),
6321
6320
  disabled: z.boolean().optional()
6322
6321
  });
6322
+ var statusListLayoutSchema = z.object({
6323
+ type: z.literal("status-list"),
6324
+ items: z.array(statusListLayoutItemSchema),
6325
+ title: z.string().optional(),
6326
+ control: z.string().optional(),
6327
+ margin: sizeSchema.optional()
6328
+ });
6323
6329
  var layoutSchema = z.lazy(
6324
6330
  () => z.union([
6325
6331
  alertLayoutSchema,
@@ -16314,7 +16320,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
16314
16320
  UNSAFE_inputAttributes: {
16315
16321
  id,
16316
16322
  "aria-invalid": invalid,
16317
- "aria-labelledby": void 0,
16323
+ "aria-labelledby": labelledBy,
16318
16324
  "aria-describedby": describedBy
16319
16325
  },
16320
16326
  onChange: this.handleOnChange
@@ -16346,7 +16352,7 @@ var _FormControl = class _FormControl extends import_react39.PureComponent {
16346
16352
  UNSAFE_triggerButtonProps: {
16347
16353
  id,
16348
16354
  "aria-invalid": invalid,
16349
- "aria-labelledby": void 0,
16355
+ "aria-labelledby": labelledBy,
16350
16356
  "aria-describedby": describedBy
16351
16357
  },
16352
16358
  items: items.map((value2) => ({
@@ -16867,11 +16873,12 @@ function OneOfSchema(props) {
16867
16873
  "has-error": !changed && props.errors && !isEmpty(props.errors) || (props.submitted || changed && blurred) && validations.length
16868
16874
  };
16869
16875
  const feedbackId = `${id}-feedback`;
16876
+ const labelId = `${id}-label`;
16870
16877
  return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
16871
16878
  (props.schema.oneOf.length > 1 || isConstSchema2(props.schema.oneOf[0])) && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
16872
16879
  props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(DynamicAlert_default, { component: props.schema.alert }),
16873
16880
  /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: (0, import_classnames11.default)(formGroupClasses), children: [
16874
- getTitleAndHelp(props.schema, id),
16881
+ getTitleAndHelp(props.schema, id, labelId),
16875
16882
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
16876
16883
  SchemaFormControl_default,
16877
16884
  {
@@ -16881,6 +16888,7 @@ function OneOfSchema(props) {
16881
16888
  disabled,
16882
16889
  invalid: !isEmpty(props.errors) || validations.length > 0,
16883
16890
  describedBy: feedbackId,
16891
+ labelledBy: labelId,
16884
16892
  required,
16885
16893
  onChange: onChooseNewSchema,
16886
16894
  onFocus,
@@ -16919,10 +16927,10 @@ function OneOfSchema(props) {
16919
16927
  )
16920
16928
  ] });
16921
16929
  }
16922
- function getTitleAndHelp(schema, forId) {
16930
+ function getTitleAndHelp(schema, forId, labelId) {
16923
16931
  var _a;
16924
16932
  const helpElement = schema.help ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Help_default2, { help: schema.help }) : null;
16925
- const titleElement = isConstSchema2(schema.oneOf[0]) ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "m-b-1", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("label", { className: "control-label d-inline", htmlFor: forId, children: [
16933
+ const titleElement = isConstSchema2(schema.oneOf[0]) ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "m-b-1", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("label", { className: "control-label d-inline", id: labelId, htmlFor: forId, children: [
16926
16934
  schema.title,
16927
16935
  " ",
16928
16936
  helpElement