@wise/dynamic-flow-client 5.18.2 → 5.19.1

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.css CHANGED
@@ -4,16 +4,19 @@
4
4
  border-radius: var(--radius-medium);
5
5
  padding: var(--size-16);
6
6
  }
7
+
7
8
  .df-box-renderer-fixed-width {
8
9
  display: flex;
9
10
  justify-content: center;
10
11
  }
12
+
11
13
  .df-box-renderer-width-xs,
12
14
  .df-box-renderer-width-sm,
13
15
  .df-box-renderer-width-md,
14
16
  .df-box-renderer-width-lg {
15
17
  width: 100%;
16
18
  }
19
+
17
20
  @media screen and (width >=768px) {
18
21
  .df-box-renderer-border {
19
22
  padding: var(--size-24);
@@ -35,6 +38,7 @@
35
38
  width: 83.33%;
36
39
  }
37
40
  }
41
+
38
42
  @media screen and (width >=990px) {
39
43
  .df-box-renderer-width-xs {
40
44
  width: 25%;
@@ -52,16 +56,20 @@
52
56
  width: 66.66%;
53
57
  }
54
58
  }
59
+
55
60
  /* container queries (when .df-prefer-container-queries is set on a parent) */
61
+
56
62
  .df-prefer-container-queries .df-box-renderer.df-box-renderer-border {
57
63
  padding: var(--size-16);
58
64
  }
65
+
59
66
  .df-prefer-container-queries .df-box-renderer.df-box-renderer-width-xs,
60
67
  .df-prefer-container-queries .df-box-renderer.df-box-renderer-width-sm,
61
68
  .df-prefer-container-queries .df-box-renderer.df-box-renderer-width-md,
62
69
  .df-prefer-container-queries .df-box-renderer.df-box-renderer-width-lg {
63
70
  width: 100%;
64
71
  }
72
+
65
73
  @container (min-width: 480px) {
66
74
  .df-prefer-container-queries .df-box-renderer.df-box-renderer-border {
67
75
  padding: var(--size-24);
@@ -88,15 +96,18 @@
88
96
  gap: var(--size-4);
89
97
  flex-direction: column;
90
98
  }
99
+
91
100
  .df-columns-renderer-column,
92
101
  .df-columns-renderer-bias-start .df-columns-renderer-column:nth-child(2),
93
102
  .df-columns-renderer-bias-end .df-columns-renderer-column:nth-child(1) {
94
103
  flex: 1;
95
104
  }
105
+
96
106
  .df-columns-renderer-bias-start .df-columns-renderer-column:nth-child(1),
97
107
  .df-columns-renderer-bias-end .df-columns-renderer-column:nth-child(2) {
98
108
  flex: 2;
99
109
  }
110
+
100
111
  @media (width >=768px) {
101
112
  .df-columns-renderer-container {
102
113
  flex-direction: row;
@@ -106,21 +117,26 @@
106
117
  .df-image .df-illustration {
107
118
  padding: 0;
108
119
  }
120
+
109
121
  .df-image {
110
122
  display: flex;
111
123
  }
124
+
112
125
  .df-image.start {
113
126
  justify-content: start;
114
127
  align-items: start;
115
128
  }
129
+
116
130
  .df-image.center {
117
131
  justify-content: center;
118
132
  align-items: center;
119
133
  }
134
+
120
135
  .df-image.end {
121
136
  justify-content: end;
122
137
  align-items: end;
123
138
  }
139
+
124
140
  .df-image img.df-reserve-space {
125
141
  width: 100%;
126
142
  /*
@@ -131,25 +147,32 @@
131
147
  aspect-ratio: auto 1 / 1;
132
148
  height: auto;
133
149
  }
150
+
134
151
  .df-image img:not([src]) {
135
152
  visibility: hidden;
136
153
  }
154
+
137
155
  /* wide screens (or default) */
138
156
  .df-image.xs img.df-reserve-space {
139
157
  width: 100px;
140
158
  }
159
+
141
160
  .df-image.sm img.df-reserve-space {
142
161
  width: 200px;
143
162
  }
163
+
144
164
  .df-image.md img.df-reserve-space {
145
165
  width: 300px;
146
166
  }
167
+
147
168
  .df-image.lg img.df-reserve-space {
148
169
  width: 500px;
149
170
  }
171
+
150
172
  .df-image.xl img.df-reserve-space {
151
173
  max-width: 600px;
152
174
  }
175
+
153
176
  /* narrow screens */
154
177
  @media (width <576px) {
155
178
  .df-image.xs img.df-reserve-space {
@@ -168,6 +191,7 @@
168
191
  width: 300px;
169
192
  }
170
193
  }
194
+
171
195
  /* narrow container */
172
196
  @container (max-width: 576px) {
173
197
  .df-image.xs img.df-reserve-space {
@@ -192,14 +216,17 @@
192
216
  .df-media-layout-avatar {
193
217
  display: flex;
194
218
  }
219
+
195
220
  .df-media-layout-avatar.start {
196
221
  justify-content: start;
197
222
  align-items: start;
198
223
  }
224
+
199
225
  .df-media-layout-avatar.center {
200
226
  justify-content: center;
201
227
  align-items: center;
202
228
  }
229
+
203
230
  .df-media-layout-avatar.end {
204
231
  justify-content: end;
205
232
  align-items: end;
@@ -224,13 +251,16 @@
224
251
  padding: var(--size-16) 0;
225
252
  background-color: var(--color-background-screen);
226
253
  }
254
+
227
255
  /* If we're in a drawer, we need to account for the bottom padding on the drawer content */
228
256
  .np-drawer-content .df-step-fixed__footer {
229
257
  bottom: -16px;
230
258
  }
259
+
231
260
  .tw-modal-body--scrollable .df-step-fixed__footer {
232
261
  bottom: -24px;
233
262
  }
263
+
234
264
  .df-modal .df-back-button {
235
265
  position: fixed;
236
266
  top: 24px;
@@ -248,15 +278,18 @@
248
278
  display: block !important;
249
279
  /* left-aligned by default */
250
280
  }
281
+
251
282
  .df-button.circular {
252
283
  display: flex;
253
284
  justify-content: center;
254
285
  }
286
+
255
287
  .df-button.small.align-center {
256
288
  display: block !important;
257
289
  margin-left: auto;
258
290
  margin-right: auto;
259
291
  }
292
+
260
293
  /**
261
294
  * This specifies the container for container queries about width.
262
295
  * We don't use it by default, but integrations can specify it using the className prop in the DF component.
package/build/main.js CHANGED
@@ -3503,13 +3503,13 @@ var getBehaviorFromSchemaRefreshStepOnChange = (schema) => {
3503
3503
  return void 0;
3504
3504
  };
3505
3505
 
3506
- // src/domain/features/validation/validateStringPattern.ts
3507
- var validateStringPattern = (pattern, logEvent) => {
3506
+ // src/domain/features/validation/getPatternRegExp.ts
3507
+ var getPatternRegExp = (pattern, logEvent) => {
3508
3508
  if (!pattern) {
3509
3509
  return;
3510
3510
  }
3511
3511
  try {
3512
- new RegExp(pattern, "u");
3512
+ return new RegExp(pattern, "u");
3513
3513
  } catch (error) {
3514
3514
  const message = `Invalid schema pattern. Failed to instantiate RegExp with Unicode support.`;
3515
3515
  if (logEvent) {
@@ -3518,11 +3518,12 @@ var validateStringPattern = (pattern, logEvent) => {
3518
3518
  error: error == null ? void 0 : error.toString()
3519
3519
  });
3520
3520
  } else {
3521
- console.warn(`DynamicFlow - warning - ${message}`, {
3521
+ console.warn(`Dynamic Flow - ${message}`, {
3522
3522
  pattern,
3523
3523
  error: error == null ? void 0 : error.toString()
3524
3524
  });
3525
3525
  }
3526
+ return new RegExp(pattern);
3526
3527
  }
3527
3528
  };
3528
3529
 
@@ -3618,10 +3619,10 @@ var getBelowMinimumDateCheck = ({ minimum }, messageFunctions) => (value) => {
3618
3619
  return null;
3619
3620
  };
3620
3621
  var getNotAdheringToPatternCheck = ({ pattern }, messageFunctions, options) => {
3621
- validateStringPattern(pattern, options == null ? void 0 : options.logEvent);
3622
+ const regExp = getPatternRegExp(pattern, options == null ? void 0 : options.logEvent);
3622
3623
  return (value) => {
3623
- if (isString(pattern) && isString(value) && value) {
3624
- return new RegExp(pattern).test(value) ? null : messageFunctions.pattern();
3624
+ if (regExp && isString(value) && value) {
3625
+ return (regExp == null ? void 0 : regExp.test(value)) ? null : messageFunctions.pattern();
3625
3626
  }
3626
3627
  return null;
3627
3628
  };
package/build/main.mjs CHANGED
@@ -3472,13 +3472,13 @@ var getBehaviorFromSchemaRefreshStepOnChange = (schema) => {
3472
3472
  return void 0;
3473
3473
  };
3474
3474
 
3475
- // src/domain/features/validation/validateStringPattern.ts
3476
- var validateStringPattern = (pattern, logEvent) => {
3475
+ // src/domain/features/validation/getPatternRegExp.ts
3476
+ var getPatternRegExp = (pattern, logEvent) => {
3477
3477
  if (!pattern) {
3478
3478
  return;
3479
3479
  }
3480
3480
  try {
3481
- new RegExp(pattern, "u");
3481
+ return new RegExp(pattern, "u");
3482
3482
  } catch (error) {
3483
3483
  const message = `Invalid schema pattern. Failed to instantiate RegExp with Unicode support.`;
3484
3484
  if (logEvent) {
@@ -3487,11 +3487,12 @@ var validateStringPattern = (pattern, logEvent) => {
3487
3487
  error: error == null ? void 0 : error.toString()
3488
3488
  });
3489
3489
  } else {
3490
- console.warn(`DynamicFlow - warning - ${message}`, {
3490
+ console.warn(`Dynamic Flow - ${message}`, {
3491
3491
  pattern,
3492
3492
  error: error == null ? void 0 : error.toString()
3493
3493
  });
3494
3494
  }
3495
+ return new RegExp(pattern);
3495
3496
  }
3496
3497
  };
3497
3498
 
@@ -3587,10 +3588,10 @@ var getBelowMinimumDateCheck = ({ minimum }, messageFunctions) => (value) => {
3587
3588
  return null;
3588
3589
  };
3589
3590
  var getNotAdheringToPatternCheck = ({ pattern }, messageFunctions, options) => {
3590
- validateStringPattern(pattern, options == null ? void 0 : options.logEvent);
3591
+ const regExp = getPatternRegExp(pattern, options == null ? void 0 : options.logEvent);
3591
3592
  return (value) => {
3592
- if (isString(pattern) && isString(value) && value) {
3593
- return new RegExp(pattern).test(value) ? null : messageFunctions.pattern();
3593
+ if (regExp && isString(value) && value) {
3594
+ return (regExp == null ? void 0 : regExp.test(value)) ? null : messageFunctions.pattern();
3594
3595
  }
3595
3596
  return null;
3596
3597
  };