@wise/dynamic-flow-client 5.15.1 → 5.16.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/i18n/cs.json +3 -0
- package/build/i18n/de.json +3 -0
- package/build/i18n/en.json +3 -0
- package/build/i18n/es.json +3 -0
- package/build/i18n/fr.json +3 -0
- package/build/i18n/hu.json +3 -0
- package/build/i18n/id.json +3 -0
- package/build/i18n/it.json +3 -0
- package/build/i18n/ja.json +3 -0
- package/build/i18n/nl.json +3 -0
- package/build/i18n/pl.json +3 -0
- package/build/i18n/pt.json +3 -0
- package/build/i18n/ro.json +3 -0
- package/build/i18n/ru.json +3 -0
- package/build/i18n/th.json +3 -0
- package/build/i18n/tr.json +3 -0
- package/build/i18n/uk.json +3 -0
- package/build/i18n/zh_CN.json +3 -0
- package/build/i18n/zh_HK.json +3 -0
- package/build/main.js +347 -84
- package/build/main.mjs +345 -82
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/build/types/common/messages/download.messages.d.ts +19 -0
- package/build/types/common/messages/download.messages.d.ts.map +1 -0
- package/build/types/controller/FlowController.d.ts +32 -3
- package/build/types/controller/FlowController.d.ts.map +1 -1
- package/build/types/controller/executeDownload.d.ts +11 -0
- package/build/types/controller/executeDownload.d.ts.map +1 -0
- package/build/types/controller/getFilenameFromContentDisposition.d.ts +2 -0
- package/build/types/controller/getFilenameFromContentDisposition.d.ts.map +1 -0
- package/build/types/domain/components/DateInputComponent.d.ts +3 -2
- package/build/types/domain/components/DateInputComponent.d.ts.map +1 -1
- package/build/types/domain/components/IntegerInputComponent.d.ts +3 -2
- package/build/types/domain/components/IntegerInputComponent.d.ts.map +1 -1
- package/build/types/domain/components/NumberInputComponent.d.ts +3 -2
- package/build/types/domain/components/NumberInputComponent.d.ts.map +1 -1
- package/build/types/domain/components/PersistAsyncComponent.d.ts +1 -0
- package/build/types/domain/components/PersistAsyncComponent.d.ts.map +1 -1
- package/build/types/domain/components/TextInputComponent.d.ts +3 -2
- package/build/types/domain/components/TextInputComponent.d.ts.map +1 -1
- package/build/types/domain/components/step/StepDomainComponent.d.ts +2 -0
- package/build/types/domain/components/step/StepDomainComponent.d.ts.map +1 -1
- package/build/types/domain/features/validation/spec-utils.d.ts.map +1 -1
- package/build/types/domain/features/validationAsync/getComponentValidationAsync.d.ts.map +1 -1
- package/build/types/domain/features/validationAsync/getInitialValidationAsyncState.d.ts.map +1 -1
- package/build/types/domain/features/validationAsync/getPerformValidationAsync.d.ts.map +1 -1
- package/build/types/domain/mappers/mapStepToComponent.d.ts.map +1 -1
- package/build/types/domain/mappers/schema/persistAsyncSchemaToComponent.d.ts +14 -0
- package/build/types/domain/mappers/schema/persistAsyncSchemaToComponent.d.ts.map +1 -1
- package/build/types/domain/mappers/schema/utils/mapCommonSchemaProps.d.ts +1 -0
- package/build/types/domain/mappers/schema/utils/mapCommonSchemaProps.d.ts.map +1 -1
- package/build/types/domain/mappers/types.d.ts +3 -0
- package/build/types/domain/mappers/types.d.ts.map +1 -1
- package/build/types/domain/types.d.ts +7 -2
- package/build/types/domain/types.d.ts.map +1 -1
- package/build/types/renderers/getSchemaErrorMessageFunction.d.ts.map +1 -1
- package/build/types/renderers/mappers/persistAsyncComponentToProps.d.ts +2 -1
- package/build/types/renderers/mappers/persistAsyncComponentToProps.d.ts.map +1 -1
- package/build/types/renderers/mappers/utils/inputComponentToProps.d.ts +3 -1
- package/build/types/renderers/mappers/utils/inputComponentToProps.d.ts.map +1 -1
- package/build/types/renderers/subflow/getDynamicSubflowRenderer.d.ts +1 -0
- package/build/types/renderers/subflow/getDynamicSubflowRenderer.d.ts.map +1 -1
- package/build/types/test-utils/DynamicFlowWise.d.ts.map +1 -1
- package/build/types/test-utils/useSnackBar.d.ts +9 -0
- package/build/types/test-utils/useSnackBar.d.ts.map +1 -0
- package/build/types/types.d.ts +3 -29
- package/build/types/types.d.ts.map +1 -1
- package/build/types/useDynamicFlow.d.ts.map +1 -1
- package/package.json +23 -23
package/build/main.js
CHANGED
|
@@ -110,6 +110,9 @@ var cs_default = {
|
|
|
110
110
|
"dynamicFlows.ControlFeedback.patternDate": "Zadejte pros\xEDm datum ve spr\xE1vn\xE9m form\xE1tu.",
|
|
111
111
|
"dynamicFlows.ControlFeedback.required": "Vypl\u0148te pros\xEDm toto pole.",
|
|
112
112
|
"dynamicFlows.ControlFeedback.type": "Nespr\xE1vn\xFD typ",
|
|
113
|
+
"dynamicFlows.DownloadFeedback.failed": "Stahov\xE1n\xED se nezda\u0159ilo",
|
|
114
|
+
"dynamicFlows.DownloadFeedback.started": "Stahov\xE1n\xED...",
|
|
115
|
+
"dynamicFlows.DownloadFeedback.successful": "Stahov\xE1n\xED prob\u011Bhlo \xFAsp\u011B\u0161n\u011B",
|
|
113
116
|
"dynamicFlows.DynamicParagraph.copied": "Zkop\xEDrov\xE1no do schr\xE1nky",
|
|
114
117
|
"dynamicFlows.DynamicParagraph.copy": "Kop\xEDrovat",
|
|
115
118
|
"dynamicFlows.ErrorBoundary.errorAlert": "N\u011Bco se pokazilo.",
|
|
@@ -147,6 +150,9 @@ var de_default = {
|
|
|
147
150
|
"dynamicFlows.ControlFeedback.patternDate": "Bitte gib ein Datum im richtigen Format ein.",
|
|
148
151
|
"dynamicFlows.ControlFeedback.required": "Bitte f\xFClle dieses Feld aus.",
|
|
149
152
|
"dynamicFlows.ControlFeedback.type": "Falscher Typ",
|
|
153
|
+
"dynamicFlows.DownloadFeedback.failed": "Download fehlgeschlagenen",
|
|
154
|
+
"dynamicFlows.DownloadFeedback.started": "Wird heruntergeladen...",
|
|
155
|
+
"dynamicFlows.DownloadFeedback.successful": "Erfolgreich heruntergeladen",
|
|
150
156
|
"dynamicFlows.DynamicParagraph.copied": "In Zwischenablage kopiert",
|
|
151
157
|
"dynamicFlows.DynamicParagraph.copy": "Kopieren",
|
|
152
158
|
"dynamicFlows.ErrorBoundary.errorAlert": "Da ist etwas schiefgegangen.",
|
|
@@ -184,6 +190,9 @@ var en_default = {
|
|
|
184
190
|
"dynamicFlows.ControlFeedback.patternDate": "Please enter a date in the corrrect format.",
|
|
185
191
|
"dynamicFlows.ControlFeedback.required": "Please fill out this field.",
|
|
186
192
|
"dynamicFlows.ControlFeedback.type": "Incorrect type",
|
|
193
|
+
"dynamicFlows.DownloadFeedback.failed": "Download failed",
|
|
194
|
+
"dynamicFlows.DownloadFeedback.started": "Downloading...",
|
|
195
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
187
196
|
"dynamicFlows.DynamicParagraph.copied": "Copied to clipboard",
|
|
188
197
|
"dynamicFlows.DynamicParagraph.copy": "Copy",
|
|
189
198
|
"dynamicFlows.ErrorBoundary.errorAlert": "Something went wrong.",
|
|
@@ -221,6 +230,9 @@ var es_default = {
|
|
|
221
230
|
"dynamicFlows.ControlFeedback.patternDate": "Introduce la fecha en un formato correcto.",
|
|
222
231
|
"dynamicFlows.ControlFeedback.required": "Completa este campo.",
|
|
223
232
|
"dynamicFlows.ControlFeedback.type": "Tipo incorrecto",
|
|
233
|
+
"dynamicFlows.DownloadFeedback.failed": "Descarga fallida",
|
|
234
|
+
"dynamicFlows.DownloadFeedback.started": "Descargando...",
|
|
235
|
+
"dynamicFlows.DownloadFeedback.successful": "Descarga correcta",
|
|
224
236
|
"dynamicFlows.DynamicParagraph.copied": "Copiado al portapapeles",
|
|
225
237
|
"dynamicFlows.DynamicParagraph.copy": "Copiar",
|
|
226
238
|
"dynamicFlows.ErrorBoundary.errorAlert": "Ha habido un error.",
|
|
@@ -258,6 +270,9 @@ var fr_default = {
|
|
|
258
270
|
"dynamicFlows.ControlFeedback.patternDate": "Veuillez saisir une date au format correct.",
|
|
259
271
|
"dynamicFlows.ControlFeedback.required": "Champ obligatoire.",
|
|
260
272
|
"dynamicFlows.ControlFeedback.type": "Type incorrect",
|
|
273
|
+
"dynamicFlows.DownloadFeedback.failed": "\xC9chec du t\xE9l\xE9chargement",
|
|
274
|
+
"dynamicFlows.DownloadFeedback.started": "T\xE9l\xE9chargement...",
|
|
275
|
+
"dynamicFlows.DownloadFeedback.successful": "T\xE9l\xE9chargement r\xE9ussi",
|
|
261
276
|
"dynamicFlows.DynamicParagraph.copied": "Copi\xE9 dans le presse-papier",
|
|
262
277
|
"dynamicFlows.DynamicParagraph.copy": "Copier",
|
|
263
278
|
"dynamicFlows.ErrorBoundary.errorAlert": "Une erreur s'est produite.",
|
|
@@ -295,6 +310,9 @@ var hu_default = {
|
|
|
295
310
|
"dynamicFlows.ControlFeedback.patternDate": "K\xE9r\xFCnk, hogy a d\xE1tumot helyes form\xE1tumban add meg.",
|
|
296
311
|
"dynamicFlows.ControlFeedback.required": "K\xE9r\xFCnk, t\xF6ltsd ki ezt a mez\u0151t.",
|
|
297
312
|
"dynamicFlows.ControlFeedback.type": "Helytelen t\xEDpus",
|
|
313
|
+
"dynamicFlows.DownloadFeedback.failed": "Sikertelen let\xF6lt\xE9s",
|
|
314
|
+
"dynamicFlows.DownloadFeedback.started": "Let\xF6lt\xE9s...",
|
|
315
|
+
"dynamicFlows.DownloadFeedback.successful": "Let\xF6lt\xE9s sikeres",
|
|
298
316
|
"dynamicFlows.DynamicParagraph.copied": "V\xE1g\xF3lapra m\xE1solva",
|
|
299
317
|
"dynamicFlows.DynamicParagraph.copy": "M\xE1sol\xE1s",
|
|
300
318
|
"dynamicFlows.ErrorBoundary.errorAlert": "Valami hiba t\xF6rt\xE9nt.",
|
|
@@ -332,6 +350,9 @@ var id_default = {
|
|
|
332
350
|
"dynamicFlows.ControlFeedback.patternDate": "Harap masukkan tanggal dalam format yang benar.",
|
|
333
351
|
"dynamicFlows.ControlFeedback.required": "Harap isi kolom ini.",
|
|
334
352
|
"dynamicFlows.ControlFeedback.type": "Tipe salah",
|
|
353
|
+
"dynamicFlows.DownloadFeedback.failed": "Pengunduhan gagal",
|
|
354
|
+
"dynamicFlows.DownloadFeedback.started": "Mengunduh...",
|
|
355
|
+
"dynamicFlows.DownloadFeedback.successful": "Pengunduhan berhasil",
|
|
335
356
|
"dynamicFlows.DynamicParagraph.copied": "Disalin ke clipboard",
|
|
336
357
|
"dynamicFlows.DynamicParagraph.copy": "Salin",
|
|
337
358
|
"dynamicFlows.ErrorBoundary.errorAlert": "Terjadi kesalahan.",
|
|
@@ -369,6 +390,9 @@ var it_default = {
|
|
|
369
390
|
"dynamicFlows.ControlFeedback.patternDate": "Inserisci la data in un formato corretto.",
|
|
370
391
|
"dynamicFlows.ControlFeedback.required": "Compila questo campo.",
|
|
371
392
|
"dynamicFlows.ControlFeedback.type": "Tipo errato",
|
|
393
|
+
"dynamicFlows.DownloadFeedback.failed": "Download non riuscito",
|
|
394
|
+
"dynamicFlows.DownloadFeedback.started": "Download in corso...",
|
|
395
|
+
"dynamicFlows.DownloadFeedback.successful": "Download completato",
|
|
372
396
|
"dynamicFlows.DynamicParagraph.copied": "Copiato negli appunti",
|
|
373
397
|
"dynamicFlows.DynamicParagraph.copy": "Copia",
|
|
374
398
|
"dynamicFlows.ErrorBoundary.errorAlert": "Qualcosa non ha funzionato.",
|
|
@@ -406,6 +430,9 @@ var ja_default = {
|
|
|
406
430
|
"dynamicFlows.ControlFeedback.patternDate": "\u6B63\u3057\u3044\u5F62\u5F0F\u3067\u65E5\u4ED8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
407
431
|
"dynamicFlows.ControlFeedback.required": "\u3053\u306E\u9805\u76EE\u306F\u5165\u529B\u5FC5\u9808\u3067\u3059\u3002",
|
|
408
432
|
"dynamicFlows.ControlFeedback.type": "\u4E0D\u6B63\u306A\u30BF\u30A4\u30D7",
|
|
433
|
+
"dynamicFlows.DownloadFeedback.failed": "\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
434
|
+
"dynamicFlows.DownloadFeedback.started": "\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u4E2D...",
|
|
435
|
+
"dynamicFlows.DownloadFeedback.successful": "\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F",
|
|
409
436
|
"dynamicFlows.DynamicParagraph.copied": "\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u3078\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",
|
|
410
437
|
"dynamicFlows.DynamicParagraph.copy": "\u30B3\u30D4\u30FC\u3059\u308B",
|
|
411
438
|
"dynamicFlows.ErrorBoundary.errorAlert": "\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002",
|
|
@@ -443,6 +470,9 @@ var nl_default = {
|
|
|
443
470
|
"dynamicFlows.ControlFeedback.patternDate": "Voer een datum in de juiste indeling in.",
|
|
444
471
|
"dynamicFlows.ControlFeedback.required": "Vul dit veld in.",
|
|
445
472
|
"dynamicFlows.ControlFeedback.type": "Onjuist type",
|
|
473
|
+
"dynamicFlows.DownloadFeedback.failed": "Downloaden mislukt",
|
|
474
|
+
"dynamicFlows.DownloadFeedback.started": "Downloaden...",
|
|
475
|
+
"dynamicFlows.DownloadFeedback.successful": "Download gelukt",
|
|
446
476
|
"dynamicFlows.DynamicParagraph.copied": "Naar klembord gekopieerd",
|
|
447
477
|
"dynamicFlows.DynamicParagraph.copy": "Kopi\xEBren",
|
|
448
478
|
"dynamicFlows.ErrorBoundary.errorAlert": "Er is iets misgegaan.",
|
|
@@ -480,6 +510,9 @@ var pl_default = {
|
|
|
480
510
|
"dynamicFlows.ControlFeedback.patternDate": "Wprowad\u017A dat\u0119 w prawid\u0142owym formacie.",
|
|
481
511
|
"dynamicFlows.ControlFeedback.required": "Prosz\u0119 wype\u0142ni\u0107 to pole.",
|
|
482
512
|
"dynamicFlows.ControlFeedback.type": "Nieprawid\u0142owy typ",
|
|
513
|
+
"dynamicFlows.DownloadFeedback.failed": "Pobieranie nieudane",
|
|
514
|
+
"dynamicFlows.DownloadFeedback.started": "Pobieranie...",
|
|
515
|
+
"dynamicFlows.DownloadFeedback.successful": "Pobieranie zako\u0144czone powodzeniem",
|
|
483
516
|
"dynamicFlows.DynamicParagraph.copied": "Skopiowano do schowka",
|
|
484
517
|
"dynamicFlows.DynamicParagraph.copy": "Kopiuj",
|
|
485
518
|
"dynamicFlows.ErrorBoundary.errorAlert": "Co\u015B posz\u0142o nie tak.",
|
|
@@ -517,6 +550,9 @@ var pt_default = {
|
|
|
517
550
|
"dynamicFlows.ControlFeedback.patternDate": "Por favor, insira a data no formato correto.",
|
|
518
551
|
"dynamicFlows.ControlFeedback.required": "Por favor, preencha o campo.",
|
|
519
552
|
"dynamicFlows.ControlFeedback.type": "Tipo incorreto",
|
|
553
|
+
"dynamicFlows.DownloadFeedback.failed": "Falha no envio",
|
|
554
|
+
"dynamicFlows.DownloadFeedback.started": "Baixando...",
|
|
555
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
520
556
|
"dynamicFlows.DynamicParagraph.copied": "Copiado",
|
|
521
557
|
"dynamicFlows.DynamicParagraph.copy": "Copiar",
|
|
522
558
|
"dynamicFlows.ErrorBoundary.errorAlert": "Algo deu errado.",
|
|
@@ -554,6 +590,9 @@ var ro_default = {
|
|
|
554
590
|
"dynamicFlows.ControlFeedback.patternDate": "Te rug\u0103m s\u0103 introduci o dat\u0103 \xEEn formatul corect.",
|
|
555
591
|
"dynamicFlows.ControlFeedback.required": "Te rug\u0103m s\u0103 completezi acest spa\u021Biu.",
|
|
556
592
|
"dynamicFlows.ControlFeedback.type": "Tip incorect",
|
|
593
|
+
"dynamicFlows.DownloadFeedback.failed": "Desc\u0103rcare e\u0219uat\u0103",
|
|
594
|
+
"dynamicFlows.DownloadFeedback.started": "Se descarc\u0103...",
|
|
595
|
+
"dynamicFlows.DownloadFeedback.successful": "Desc\u0103rcare reu\u0219it\u0103",
|
|
557
596
|
"dynamicFlows.DynamicParagraph.copied": "Copiat \xEEn clipboard",
|
|
558
597
|
"dynamicFlows.DynamicParagraph.copy": "Copiaz\u0103",
|
|
559
598
|
"dynamicFlows.ErrorBoundary.errorAlert": "Ceva nu a mers bine.",
|
|
@@ -591,6 +630,9 @@ var ru_default = {
|
|
|
591
630
|
"dynamicFlows.ControlFeedback.patternDate": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0430\u0442\u0443 \u0432 \u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u043E\u043C \u0444\u043E\u0440\u043C\u0430\u0442\u0435.",
|
|
592
631
|
"dynamicFlows.ControlFeedback.required": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u043E\u0435 \u043F\u043E\u043B\u0435.",
|
|
593
632
|
"dynamicFlows.ControlFeedback.type": "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0442\u0438\u043F",
|
|
633
|
+
"dynamicFlows.DownloadFeedback.failed": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u0430\u0447\u0430\u0442\u044C",
|
|
634
|
+
"dynamicFlows.DownloadFeedback.started": "\u0421\u043A\u0430\u0447\u0438\u0432\u0430\u043D\u0438\u0435...",
|
|
635
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
594
636
|
"dynamicFlows.DynamicParagraph.copied": "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430",
|
|
595
637
|
"dynamicFlows.DynamicParagraph.copy": "\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C",
|
|
596
638
|
"dynamicFlows.ErrorBoundary.errorAlert": "\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A.",
|
|
@@ -628,6 +670,9 @@ var th_default = {
|
|
|
628
670
|
"dynamicFlows.ControlFeedback.patternDate": "\u0E42\u0E1B\u0E23\u0E14\u0E1B\u0E49\u0E2D\u0E19\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
629
671
|
"dynamicFlows.ControlFeedback.required": "\u0E42\u0E1B\u0E23\u0E14\u0E43\u0E2A\u0E48\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E43\u0E19\u0E0A\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49",
|
|
630
672
|
"dynamicFlows.ControlFeedback.type": "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
673
|
+
"dynamicFlows.DownloadFeedback.failed": "\u0E14\u0E32\u0E27\u0E19\u0E4C\u0E42\u0E2B\u0E25\u0E14\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27",
|
|
674
|
+
"dynamicFlows.DownloadFeedback.started": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E14\u0E32\u0E27\u0E19\u0E4C\u0E42\u0E2B\u0E25\u0E14...",
|
|
675
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
631
676
|
"dynamicFlows.DynamicParagraph.copied": "\u0E04\u0E31\u0E14\u0E25\u0E2D\u0E01\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E04\u0E25\u0E34\u0E1B\u0E1A\u0E2D\u0E23\u0E4C\u0E14",
|
|
632
677
|
"dynamicFlows.DynamicParagraph.copy": "\u0E04\u0E31\u0E14\u0E25\u0E2D\u0E01",
|
|
633
678
|
"dynamicFlows.ErrorBoundary.errorAlert": "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E02\u0E36\u0E49\u0E19",
|
|
@@ -665,6 +710,9 @@ var tr_default = {
|
|
|
665
710
|
"dynamicFlows.ControlFeedback.patternDate": "L\xFCtfen tarihi do\u011Fru bi\xE7imde girin.",
|
|
666
711
|
"dynamicFlows.ControlFeedback.required": "L\xFCtfen bu alan\u0131 doldurun.",
|
|
667
712
|
"dynamicFlows.ControlFeedback.type": "Ge\xE7ersiz se\xE7im",
|
|
713
|
+
"dynamicFlows.DownloadFeedback.failed": "\u0130ndirme ba\u015Far\u0131s\u0131z",
|
|
714
|
+
"dynamicFlows.DownloadFeedback.started": "\u0130ndiriliyor...",
|
|
715
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
668
716
|
"dynamicFlows.DynamicParagraph.copied": "Panoya kopyaland\u0131",
|
|
669
717
|
"dynamicFlows.DynamicParagraph.copy": "Kopyala",
|
|
670
718
|
"dynamicFlows.ErrorBoundary.errorAlert": "Bir sorun olu\u015Ftu.",
|
|
@@ -702,6 +750,9 @@ var zh_CN_default = {
|
|
|
702
750
|
"dynamicFlows.ControlFeedback.patternDate": "\u8BF7\u4EE5\u6B63\u786E\u7684\u683C\u5F0F\u8F93\u5165\u65E5\u671F",
|
|
703
751
|
"dynamicFlows.ControlFeedback.required": "\u8BF7\u586B\u5199\u6B64\u5B57\u6BB5\u3002",
|
|
704
752
|
"dynamicFlows.ControlFeedback.type": "\u7C7B\u578B\u9519\u8BEF",
|
|
753
|
+
"dynamicFlows.DownloadFeedback.failed": "\u4E0B\u8F7D\u5931\u8D25",
|
|
754
|
+
"dynamicFlows.DownloadFeedback.started": "\u6B63\u5728\u4E0B\u8F7D...",
|
|
755
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
705
756
|
"dynamicFlows.DynamicParagraph.copied": "\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F",
|
|
706
757
|
"dynamicFlows.DynamicParagraph.copy": "\u590D\u5236",
|
|
707
758
|
"dynamicFlows.ErrorBoundary.errorAlert": "\u51FA\u9519\u4E86\u3002",
|
|
@@ -739,6 +790,9 @@ var zh_HK_default = {
|
|
|
739
790
|
"dynamicFlows.ControlFeedback.patternDate": "\u8ACB\u4EE5\u6B63\u78BA\u683C\u5F0F\u8F38\u5165\u65E5\u671F\u3002",
|
|
740
791
|
"dynamicFlows.ControlFeedback.required": "\u8ACB\u586B\u5BEB\u6B64\u6B04\u4F4D\u3002",
|
|
741
792
|
"dynamicFlows.ControlFeedback.type": "\u932F\u8AA4\u7684\u985E\u578B",
|
|
793
|
+
"dynamicFlows.DownloadFeedback.failed": "\u4E0B\u8F09\u5931\u6557",
|
|
794
|
+
"dynamicFlows.DownloadFeedback.started": "\u4E0B\u8F09\u4E2D...",
|
|
795
|
+
"dynamicFlows.DownloadFeedback.successful": "\u4E0B\u8F09\u6210\u529F",
|
|
742
796
|
"dynamicFlows.DynamicParagraph.copied": "\u8907\u88FD\u5230\u526A\u8CBC\u677F",
|
|
743
797
|
"dynamicFlows.DynamicParagraph.copy": "\u8907\u88FD",
|
|
744
798
|
"dynamicFlows.ErrorBoundary.errorAlert": "\u51FA\u4E86\u4E9B\u554F\u984C\u3002",
|
|
@@ -865,7 +919,7 @@ var getChildren = (node) => {
|
|
|
865
919
|
|
|
866
920
|
// src/useDynamicFlow.tsx
|
|
867
921
|
var import_react3 = require("react");
|
|
868
|
-
var
|
|
922
|
+
var import_react_intl8 = require("react-intl");
|
|
869
923
|
|
|
870
924
|
// src/common/errorBoundary/ErrorBoundary.tsx
|
|
871
925
|
var import_react = require("react");
|
|
@@ -2597,13 +2651,14 @@ var getLocalValues = (components) => components.map((component) => component.get
|
|
|
2597
2651
|
|
|
2598
2652
|
// src/domain/components/step/StepDomainComponent.ts
|
|
2599
2653
|
var createStepComponent = (stepProps) => {
|
|
2600
|
-
const _a = stepProps, { uid, stepPolling, stepRefreshAfter, stepPrefetch, onComponentUpdate } = _a, rest = __objRest(_a, ["uid", "stepPolling", "stepRefreshAfter", "stepPrefetch", "onComponentUpdate"]);
|
|
2654
|
+
const _a = stepProps, { uid, stepPolling, stepRefreshAfter, stepPrefetch, onComponentUpdate, onLoad } = _a, rest = __objRest(_a, ["uid", "stepPolling", "stepRefreshAfter", "stepPrefetch", "onComponentUpdate", "onLoad"]);
|
|
2601
2655
|
const update = getInputUpdateFunction(onComponentUpdate);
|
|
2602
2656
|
const component = __spreadProps(__spreadValues({
|
|
2603
2657
|
uid
|
|
2604
2658
|
}, rest), {
|
|
2605
2659
|
type: "step",
|
|
2606
2660
|
kind: "step",
|
|
2661
|
+
state: "initial",
|
|
2607
2662
|
modals: [],
|
|
2608
2663
|
requestCache: stepPrefetch.requestCache,
|
|
2609
2664
|
subflow: null,
|
|
@@ -2666,6 +2721,12 @@ var createStepComponent = (stepProps) => {
|
|
|
2666
2721
|
});
|
|
2667
2722
|
},
|
|
2668
2723
|
start() {
|
|
2724
|
+
if (this.state === "initial") {
|
|
2725
|
+
onLoad == null ? void 0 : onLoad();
|
|
2726
|
+
}
|
|
2727
|
+
this._update((draft) => {
|
|
2728
|
+
draft.state = "started";
|
|
2729
|
+
});
|
|
2669
2730
|
stepPolling == null ? void 0 : stepPolling.start();
|
|
2670
2731
|
stepRefreshAfter == null ? void 0 : stepRefreshAfter.start();
|
|
2671
2732
|
stepPrefetch.start(this.getSubmittableValueSync());
|
|
@@ -2675,6 +2736,7 @@ var createStepComponent = (stepProps) => {
|
|
|
2675
2736
|
stepRefreshAfter == null ? void 0 : stepRefreshAfter.stop();
|
|
2676
2737
|
stepPrefetch.stop();
|
|
2677
2738
|
this._update((draft) => {
|
|
2739
|
+
draft.state = "stopped";
|
|
2678
2740
|
draft.modals = [];
|
|
2679
2741
|
});
|
|
2680
2742
|
}
|
|
@@ -3216,7 +3278,8 @@ var getComponentValidationAsync = (update, performValidationAsync) => (
|
|
|
3216
3278
|
draft.validationAsyncState = {
|
|
3217
3279
|
abortController: newAbortController,
|
|
3218
3280
|
lastSubmitted: currentValue,
|
|
3219
|
-
messages: {}
|
|
3281
|
+
messages: {},
|
|
3282
|
+
loadingState: "idle"
|
|
3220
3283
|
};
|
|
3221
3284
|
});
|
|
3222
3285
|
return;
|
|
@@ -3227,6 +3290,7 @@ var getComponentValidationAsync = (update, performValidationAsync) => (
|
|
|
3227
3290
|
if (message) {
|
|
3228
3291
|
draft.validationAsyncState.messages.success = message;
|
|
3229
3292
|
}
|
|
3293
|
+
draft.validationAsyncState.loadingState = "idle";
|
|
3230
3294
|
});
|
|
3231
3295
|
return message;
|
|
3232
3296
|
}).catch((error) => {
|
|
@@ -3235,13 +3299,15 @@ var getComponentValidationAsync = (update, performValidationAsync) => (
|
|
|
3235
3299
|
}
|
|
3236
3300
|
update(component, (draft) => {
|
|
3237
3301
|
draft.validationAsyncState.messages.error = error.message;
|
|
3302
|
+
draft.validationAsyncState.loadingState = "idle";
|
|
3238
3303
|
});
|
|
3239
3304
|
});
|
|
3240
3305
|
update(component, (draft) => {
|
|
3241
3306
|
draft.validationAsyncState = {
|
|
3242
3307
|
abortController: newAbortController,
|
|
3243
3308
|
lastSubmitted: currentValue,
|
|
3244
|
-
messages: {}
|
|
3309
|
+
messages: {},
|
|
3310
|
+
loadingState: "pending"
|
|
3245
3311
|
};
|
|
3246
3312
|
});
|
|
3247
3313
|
return newSubmission;
|
|
@@ -3344,22 +3410,23 @@ var getSchemaOnChange = (schema, onBehavior) => {
|
|
|
3344
3410
|
return void 0;
|
|
3345
3411
|
};
|
|
3346
3412
|
var getBehaviorFromSchemaOnChange = (schema) => {
|
|
3413
|
+
var _a;
|
|
3347
3414
|
if ("onChange" in schema && schema.onChange) {
|
|
3348
3415
|
const { $id, analyticsId, onChange } = schema;
|
|
3349
3416
|
const behavior = __spreadProps(__spreadValues({}, normaliseBehavior(onChange, [])), {
|
|
3350
|
-
analytics: { schema: analyticsId != null ? analyticsId : $id }
|
|
3417
|
+
analytics: { schema: (_a = analyticsId != null ? analyticsId : $id) != null ? _a : "" }
|
|
3351
3418
|
});
|
|
3352
3419
|
return behavior;
|
|
3353
3420
|
}
|
|
3354
3421
|
return void 0;
|
|
3355
3422
|
};
|
|
3356
3423
|
var getBehaviorFromSchemaRefreshStepOnChange = (schema) => {
|
|
3357
|
-
var _a, _b;
|
|
3424
|
+
var _a, _b, _c;
|
|
3358
3425
|
if ("refreshStepOnChange" in schema && ((_a = schema.refreshStepOnChange) != null ? _a : false) || "refreshFormOnChange" in schema && ((_b = schema.refreshFormOnChange) != null ? _b : false)) {
|
|
3359
3426
|
const { $id, analyticsId, refreshUrl, refreshFormUrl } = schema;
|
|
3360
3427
|
const behavior = {
|
|
3361
3428
|
type: "refresh",
|
|
3362
|
-
analytics: { schema: analyticsId != null ? analyticsId : $id },
|
|
3429
|
+
analytics: { schema: (_c = analyticsId != null ? analyticsId : $id) != null ? _c : "" },
|
|
3363
3430
|
url: refreshUrl != null ? refreshUrl : refreshFormUrl
|
|
3364
3431
|
};
|
|
3365
3432
|
return behavior;
|
|
@@ -3591,7 +3658,8 @@ var autocompleteTokenMap = {
|
|
|
3591
3658
|
var getInitialValidationAsyncState = () => ({
|
|
3592
3659
|
abortController: new AbortController(),
|
|
3593
3660
|
lastSubmitted: null,
|
|
3594
|
-
messages: {}
|
|
3661
|
+
messages: {},
|
|
3662
|
+
loadingState: "idle"
|
|
3595
3663
|
});
|
|
3596
3664
|
|
|
3597
3665
|
// src/domain/features/utils/response-utils.ts
|
|
@@ -3611,10 +3679,9 @@ var getPerformValidationAsync = ({
|
|
|
3611
3679
|
trackEvent
|
|
3612
3680
|
}) => {
|
|
3613
3681
|
const { method, param, url } = validationAsyncConfig;
|
|
3614
|
-
const
|
|
3682
|
+
const trackFailure = (json) => {
|
|
3615
3683
|
const analytics = getAnalyticsFromErrorResponse(json);
|
|
3616
3684
|
trackEvent("ValidationAsync Failed", __spreadValues({ schema: schemaId }, analytics));
|
|
3617
|
-
return null;
|
|
3618
3685
|
};
|
|
3619
3686
|
return async function performValidationAsync({ value, signal }) {
|
|
3620
3687
|
let response;
|
|
@@ -3624,8 +3691,9 @@ var getPerformValidationAsync = ({
|
|
|
3624
3691
|
url,
|
|
3625
3692
|
constructPayload({ value, signal, requestConfig: { method, param } })
|
|
3626
3693
|
);
|
|
3627
|
-
} catch (
|
|
3628
|
-
|
|
3694
|
+
} catch (error) {
|
|
3695
|
+
trackFailure();
|
|
3696
|
+
throw error;
|
|
3629
3697
|
}
|
|
3630
3698
|
const json = await response.json().catch(() => null);
|
|
3631
3699
|
const message = getValidationMessage(json);
|
|
@@ -3639,7 +3707,8 @@ var getPerformValidationAsync = ({
|
|
|
3639
3707
|
throw new Error(message);
|
|
3640
3708
|
}
|
|
3641
3709
|
}
|
|
3642
|
-
|
|
3710
|
+
trackFailure(json);
|
|
3711
|
+
return null;
|
|
3643
3712
|
};
|
|
3644
3713
|
};
|
|
3645
3714
|
var getValidationMessage = (json) => {
|
|
@@ -3736,7 +3805,7 @@ var mapCommonSchemaProps = (schemaMapperProps) => {
|
|
|
3736
3805
|
title,
|
|
3737
3806
|
hidden
|
|
3738
3807
|
} = schema;
|
|
3739
|
-
return __spreadValues(__spreadValues(__spreadValues({
|
|
3808
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
3740
3809
|
uid,
|
|
3741
3810
|
id: $id != null ? $id : uid,
|
|
3742
3811
|
schemaId,
|
|
@@ -3753,7 +3822,7 @@ var mapCommonSchemaProps = (schemaMapperProps) => {
|
|
|
3753
3822
|
title,
|
|
3754
3823
|
onPersistAsync,
|
|
3755
3824
|
summariser: getSummariser(schema)
|
|
3756
|
-
}, schemaHasHelp(schema) ? { help: schema.help.markdown } : {}), schemaHasPlaceholder(schema) ? { placeholder: schema.placeholder } : {}), schema.alert ? { alert: mapSchemaAlert(schema.alert) } : {});
|
|
3825
|
+
}, schemaHasHelp(schema) ? { help: schema.help.markdown } : {}), schemaHasPlaceholder(schema) ? { placeholder: schema.placeholder } : {}), schema.alert ? { alert: mapSchemaAlert(schema.alert) } : {}), schema.inlineAlert ? { inlineAlert: mapInlineAlert(schema.inlineAlert) } : {});
|
|
3757
3826
|
};
|
|
3758
3827
|
var schemaHasDisabled = (schema) => Boolean("disabled" in schema && schema.disabled !== void 0);
|
|
3759
3828
|
var schemaHasHelp = (schema) => Boolean("help" in schema && schema.help);
|
|
@@ -5684,6 +5753,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5684
5753
|
schemaId,
|
|
5685
5754
|
component,
|
|
5686
5755
|
hidden,
|
|
5756
|
+
status: "idle",
|
|
5687
5757
|
lastSubmitted: model != null ? localValue != null ? localValue : null : null,
|
|
5688
5758
|
lastResponse: model != null ? model : null,
|
|
5689
5759
|
submission: Promise.resolve(model != null ? model : null),
|
|
@@ -5722,6 +5792,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5722
5792
|
draft.lastSubmitted = childLocalValue;
|
|
5723
5793
|
draft.submission = resolvedNull;
|
|
5724
5794
|
draft.errors = [];
|
|
5795
|
+
draft.status = "idle";
|
|
5725
5796
|
});
|
|
5726
5797
|
void (schemaOnChange == null ? void 0 : schemaOnChange());
|
|
5727
5798
|
return resolvedNull;
|
|
@@ -5731,6 +5802,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5731
5802
|
this._update((draft) => {
|
|
5732
5803
|
draft.lastResponse = token;
|
|
5733
5804
|
draft.errors = [];
|
|
5805
|
+
draft.status = "success";
|
|
5734
5806
|
});
|
|
5735
5807
|
void (schemaOnChange == null ? void 0 : schemaOnChange());
|
|
5736
5808
|
return token;
|
|
@@ -5742,6 +5814,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5742
5814
|
draft.lastResponse = null;
|
|
5743
5815
|
draft.lastSubmitted = null;
|
|
5744
5816
|
draft.submission = Promise.resolve(null);
|
|
5817
|
+
draft.status = "error";
|
|
5745
5818
|
if (this.component.type !== "upload") {
|
|
5746
5819
|
draft.errors = error instanceof Error ? [error.message] : [];
|
|
5747
5820
|
}
|
|
@@ -5754,6 +5827,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5754
5827
|
draft.lastResponse = null;
|
|
5755
5828
|
draft.submission = newSubmission;
|
|
5756
5829
|
draft.errors = [];
|
|
5830
|
+
draft.status = "persisting";
|
|
5757
5831
|
});
|
|
5758
5832
|
return newSubmission;
|
|
5759
5833
|
}
|
|
@@ -6322,7 +6396,7 @@ var mapStepToComponent = (_a) => {
|
|
|
6322
6396
|
"onPoll",
|
|
6323
6397
|
"onBehavior"
|
|
6324
6398
|
]);
|
|
6325
|
-
var _a2;
|
|
6399
|
+
var _a2, _b2;
|
|
6326
6400
|
const { etag, step, stepLocalValue, flowRequestCache, logEvent, onComponentUpdate } = restProps;
|
|
6327
6401
|
const {
|
|
6328
6402
|
id,
|
|
@@ -6341,6 +6415,12 @@ var mapStepToComponent = (_a) => {
|
|
|
6341
6415
|
const registerSubmissionBehavior = (behavior) => {
|
|
6342
6416
|
submissionBehaviors.push(behavior);
|
|
6343
6417
|
};
|
|
6418
|
+
const mapperProps = __spreadProps(__spreadValues({}, restProps), {
|
|
6419
|
+
features,
|
|
6420
|
+
trackEvent,
|
|
6421
|
+
onBehavior,
|
|
6422
|
+
registerSubmissionBehavior
|
|
6423
|
+
});
|
|
6344
6424
|
const back = mapBackNavigation(navigation, onBehavior, features.isEnabled("nativeBack"));
|
|
6345
6425
|
const stepId = id || key;
|
|
6346
6426
|
if (stepId === void 0) {
|
|
@@ -6356,18 +6436,15 @@ var mapStepToComponent = (_a) => {
|
|
|
6356
6436
|
}) : void 0;
|
|
6357
6437
|
const stepRefreshAfter = refreshAfter ? getStepRefreshAfter({ refreshAfter, logEvent, onBehavior }) : void 0;
|
|
6358
6438
|
const stepPrefetch = getStepPrefetch(restProps.httpClient, flowRequestCache, submissionBehaviors);
|
|
6359
|
-
const
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
restProps.onLink,
|
|
6363
|
-
onComponentUpdate
|
|
6364
|
-
) : void 0;
|
|
6365
|
-
const mapperProps = __spreadProps(__spreadValues({}, restProps), {
|
|
6366
|
-
features,
|
|
6367
|
-
trackEvent,
|
|
6368
|
-
onBehavior,
|
|
6439
|
+
const onLoadBehavior = getDomainLayerBehavior(
|
|
6440
|
+
{ behavior: step.onLoad },
|
|
6441
|
+
(_a2 = step.actions) != null ? _a2 : [],
|
|
6369
6442
|
registerSubmissionBehavior
|
|
6370
|
-
|
|
6443
|
+
);
|
|
6444
|
+
const stepOnLoad = onLoadBehavior && onLoadBehavior.type !== "link" ? () => {
|
|
6445
|
+
void onBehavior(onLoadBehavior);
|
|
6446
|
+
} : void 0;
|
|
6447
|
+
const externalConfirmation = getExternalConfiguration(uid, external, onLoadBehavior, mapperProps);
|
|
6371
6448
|
const referencedSchemaIds = getReferencedSchemaId(step);
|
|
6372
6449
|
const schemaComponents = mapStepSchemas(uid, step, stepLocalValue, mapperProps);
|
|
6373
6450
|
const { layout, footer } = getLayoutAndFooter(step, features);
|
|
@@ -6395,13 +6472,14 @@ var mapStepToComponent = (_a) => {
|
|
|
6395
6472
|
stepRefreshAfter,
|
|
6396
6473
|
title,
|
|
6397
6474
|
tags,
|
|
6398
|
-
stackBehavior: (
|
|
6475
|
+
stackBehavior: (_b2 = navigation == null ? void 0 : navigation.stackBehavior) != null ? _b2 : "default",
|
|
6399
6476
|
stepPrefetch,
|
|
6400
6477
|
step,
|
|
6401
6478
|
referencedSchemaIds,
|
|
6402
6479
|
onComponentUpdate,
|
|
6403
6480
|
trackEvent,
|
|
6404
|
-
onBehavior
|
|
6481
|
+
onBehavior,
|
|
6482
|
+
onLoad: stepOnLoad
|
|
6405
6483
|
});
|
|
6406
6484
|
return stepComponent;
|
|
6407
6485
|
};
|
|
@@ -6423,6 +6501,25 @@ var mapBackNavigation = (navigation, onBehavior, isNativeBackEnabled) => {
|
|
|
6423
6501
|
}
|
|
6424
6502
|
} : void 0;
|
|
6425
6503
|
};
|
|
6504
|
+
var getExternalConfiguration = (uid, external, onLoad, mapperProps) => {
|
|
6505
|
+
if (onLoad.type === "link") {
|
|
6506
|
+
return createExternalConfirmation(
|
|
6507
|
+
`${uid}-external-confirmation`,
|
|
6508
|
+
onLoad == null ? void 0 : onLoad.url,
|
|
6509
|
+
mapperProps.onLink,
|
|
6510
|
+
mapperProps.onComponentUpdate
|
|
6511
|
+
);
|
|
6512
|
+
}
|
|
6513
|
+
if ((external == null ? void 0 : external.url) && onLoad.type === "none") {
|
|
6514
|
+
return createExternalConfirmation(
|
|
6515
|
+
`${uid}-external-confirmation`,
|
|
6516
|
+
external == null ? void 0 : external.url,
|
|
6517
|
+
mapperProps.onLink,
|
|
6518
|
+
mapperProps.onComponentUpdate
|
|
6519
|
+
);
|
|
6520
|
+
}
|
|
6521
|
+
return void 0;
|
|
6522
|
+
};
|
|
6426
6523
|
var getLayoutAndFooter = (step, features) => {
|
|
6427
6524
|
var _a;
|
|
6428
6525
|
if (step.footer) {
|
|
@@ -6453,6 +6550,135 @@ var validateStepTypes = (step, logEvent) => {
|
|
|
6453
6550
|
}
|
|
6454
6551
|
};
|
|
6455
6552
|
|
|
6553
|
+
// src/controller/getFilenameFromContentDisposition.ts
|
|
6554
|
+
var getFilenameFromContentDisposition = (contentDisposition) => {
|
|
6555
|
+
var _a;
|
|
6556
|
+
if (!contentDisposition) {
|
|
6557
|
+
return "";
|
|
6558
|
+
}
|
|
6559
|
+
const parameters = getFilenames(contentDisposition);
|
|
6560
|
+
const { filename, filenameStar } = parameters;
|
|
6561
|
+
const decodedFilename = decodeFilename(filenameStar);
|
|
6562
|
+
return extractBasename((_a = decodedFilename != null ? decodedFilename : filename) != null ? _a : "");
|
|
6563
|
+
};
|
|
6564
|
+
var filenameRegex = /;\s*(filename\*?)\s*=\s*("[^"]*"|[^;]*)/gi;
|
|
6565
|
+
var getFilenames = (contentDisposition) => {
|
|
6566
|
+
var _a, _b;
|
|
6567
|
+
const params = Array.from(contentDisposition.matchAll(filenameRegex)).map((match) => {
|
|
6568
|
+
var _a2, _b2, _c;
|
|
6569
|
+
return [(_a2 = match[1]) == null ? void 0 : _a2.toLowerCase(), removeQuotes((_c = (_b2 = match[2]) == null ? void 0 : _b2.trim()) != null ? _c : "") || void 0];
|
|
6570
|
+
});
|
|
6571
|
+
return {
|
|
6572
|
+
filename: (_a = params.find(([key]) => key === "filename")) == null ? void 0 : _a[1],
|
|
6573
|
+
filenameStar: (_b = params.find(([key]) => key === "filename*")) == null ? void 0 : _b[1]
|
|
6574
|
+
};
|
|
6575
|
+
};
|
|
6576
|
+
var removeQuotes = (value) => {
|
|
6577
|
+
if (value.startsWith('"') && value.endsWith('"')) {
|
|
6578
|
+
return value.slice(1, -1);
|
|
6579
|
+
}
|
|
6580
|
+
return value;
|
|
6581
|
+
};
|
|
6582
|
+
var decodeFilename = (encodedFilename) => {
|
|
6583
|
+
if (!encodedFilename) {
|
|
6584
|
+
return void 0;
|
|
6585
|
+
}
|
|
6586
|
+
const sections = encodedFilename.split("'");
|
|
6587
|
+
const encodedValue = sections.length >= 3 ? sections.slice(2).join("'") : encodedFilename;
|
|
6588
|
+
try {
|
|
6589
|
+
return decodeURIComponent(encodedValue);
|
|
6590
|
+
} catch (e) {
|
|
6591
|
+
return void 0;
|
|
6592
|
+
}
|
|
6593
|
+
};
|
|
6594
|
+
var extractBasename = (filename) => {
|
|
6595
|
+
var _a;
|
|
6596
|
+
const segments = filename.split(/[\\/]+/).filter(Boolean);
|
|
6597
|
+
return (_a = segments.at(-1)) != null ? _a : "";
|
|
6598
|
+
};
|
|
6599
|
+
|
|
6600
|
+
// src/controller/executeDownload.ts
|
|
6601
|
+
var getExecuteDownload = ({
|
|
6602
|
+
onNotification,
|
|
6603
|
+
getErrorMessageFunctions,
|
|
6604
|
+
trackEvent
|
|
6605
|
+
// TODO: add analytics after aligning with other client platforms
|
|
6606
|
+
}) => {
|
|
6607
|
+
const pendingRequests = createPendingRequestsSet();
|
|
6608
|
+
const executeDownload = async (request, httpClient) => {
|
|
6609
|
+
if (pendingRequests.has(request)) {
|
|
6610
|
+
return;
|
|
6611
|
+
}
|
|
6612
|
+
pendingRequests.add(request);
|
|
6613
|
+
onNotification == null ? void 0 : onNotification({ text: getErrorMessageFunctions().downloadStarted() });
|
|
6614
|
+
return fetchDownloadRequest(request, httpClient).then(saveBlob).then(() => {
|
|
6615
|
+
onNotification == null ? void 0 : onNotification({ text: getErrorMessageFunctions().downloadSuccessful() });
|
|
6616
|
+
}).catch((error) => {
|
|
6617
|
+
onNotification == null ? void 0 : onNotification({ text: getErrorMessageFunctions().downloadFailed() });
|
|
6618
|
+
throw error;
|
|
6619
|
+
}).finally(() => {
|
|
6620
|
+
pendingRequests.remove(request);
|
|
6621
|
+
});
|
|
6622
|
+
};
|
|
6623
|
+
return executeDownload;
|
|
6624
|
+
};
|
|
6625
|
+
var fetchDownloadRequest = async (request, httpClient) => {
|
|
6626
|
+
const { url, method, body, headers } = request;
|
|
6627
|
+
const requestBody = method === "GET" ? void 0 : JSON.stringify(body);
|
|
6628
|
+
const requestHeaders = filterForbiddenHeaders(headers);
|
|
6629
|
+
if (requestBody) {
|
|
6630
|
+
requestHeaders.set("Content-Type", "application/json");
|
|
6631
|
+
}
|
|
6632
|
+
const response = await httpClient(url, { method, body: requestBody, headers: requestHeaders });
|
|
6633
|
+
if (!response.ok) {
|
|
6634
|
+
throw new Error(`Download failed with status ${response.status}`);
|
|
6635
|
+
}
|
|
6636
|
+
const contentDisposition = response.headers.get("Content-Disposition");
|
|
6637
|
+
const filename = getFilenameFromContentDisposition(contentDisposition);
|
|
6638
|
+
const blob = await response.blob();
|
|
6639
|
+
return { filename, blob };
|
|
6640
|
+
};
|
|
6641
|
+
var saveBlob = async ({ blob, filename = "" }) => {
|
|
6642
|
+
const blobUrl = URL.createObjectURL(blob);
|
|
6643
|
+
const link = Object.assign(document.createElement("a"), {
|
|
6644
|
+
href: blobUrl,
|
|
6645
|
+
download: filename
|
|
6646
|
+
});
|
|
6647
|
+
document.body.appendChild(link);
|
|
6648
|
+
link.click();
|
|
6649
|
+
await wait();
|
|
6650
|
+
document.body.removeChild(link);
|
|
6651
|
+
URL.revokeObjectURL(blobUrl);
|
|
6652
|
+
};
|
|
6653
|
+
var filterForbiddenHeaders = (headers) => {
|
|
6654
|
+
const forbiddenHeaders = ["authorization", "cookie", "host"];
|
|
6655
|
+
const filteredHeaders = Object.entries(headers != null ? headers : {}).map(([key, value]) => [
|
|
6656
|
+
key.trim().toLowerCase(),
|
|
6657
|
+
value
|
|
6658
|
+
]).filter(([key]) => !forbiddenHeaders.includes(key));
|
|
6659
|
+
return new Headers(filteredHeaders);
|
|
6660
|
+
};
|
|
6661
|
+
var wait = async () => new Promise((resolve) => {
|
|
6662
|
+
setTimeout(resolve, 0);
|
|
6663
|
+
});
|
|
6664
|
+
var createPendingRequestsSet = () => {
|
|
6665
|
+
const pendingRequests = /* @__PURE__ */ new Set();
|
|
6666
|
+
return {
|
|
6667
|
+
add: (request) => {
|
|
6668
|
+
const requestKey = JSON.stringify(request);
|
|
6669
|
+
pendingRequests.add(requestKey);
|
|
6670
|
+
},
|
|
6671
|
+
remove: (request) => {
|
|
6672
|
+
const requestKey = JSON.stringify(request);
|
|
6673
|
+
pendingRequests.delete(requestKey);
|
|
6674
|
+
},
|
|
6675
|
+
has: (request) => {
|
|
6676
|
+
const requestKey = JSON.stringify(request);
|
|
6677
|
+
return pendingRequests.has(requestKey);
|
|
6678
|
+
}
|
|
6679
|
+
};
|
|
6680
|
+
};
|
|
6681
|
+
|
|
6456
6682
|
// src/controller/executePoll.ts
|
|
6457
6683
|
var executePoll = async (props) => {
|
|
6458
6684
|
const { errorBehavior, signal, url, httpClient, trackEvent } = props;
|
|
@@ -6725,13 +6951,14 @@ var getStepCounter = () => {
|
|
|
6725
6951
|
|
|
6726
6952
|
// src/controller/FlowController.ts
|
|
6727
6953
|
var createFlowController = (props) => {
|
|
6728
|
-
const
|
|
6954
|
+
const {
|
|
6729
6955
|
flowId,
|
|
6730
6956
|
initialAction,
|
|
6731
6957
|
initialStep,
|
|
6732
6958
|
backConfig,
|
|
6733
6959
|
features,
|
|
6734
6960
|
nativeSubflowHandlers,
|
|
6961
|
+
requestCache,
|
|
6735
6962
|
getErrorMessageFunctions,
|
|
6736
6963
|
scrollToTop,
|
|
6737
6964
|
onChange,
|
|
@@ -6739,38 +6966,21 @@ var createFlowController = (props) => {
|
|
|
6739
6966
|
onCompletion,
|
|
6740
6967
|
onCopy,
|
|
6741
6968
|
onLink,
|
|
6969
|
+
onNotification,
|
|
6742
6970
|
onError,
|
|
6743
6971
|
onEvent,
|
|
6744
6972
|
onLog,
|
|
6745
6973
|
onValueChange
|
|
6746
|
-
} =
|
|
6747
|
-
"flowId",
|
|
6748
|
-
"initialAction",
|
|
6749
|
-
"initialStep",
|
|
6750
|
-
"backConfig",
|
|
6751
|
-
"features",
|
|
6752
|
-
"nativeSubflowHandlers",
|
|
6753
|
-
"getErrorMessageFunctions",
|
|
6754
|
-
"scrollToTop",
|
|
6755
|
-
"onChange",
|
|
6756
|
-
"onCancellation",
|
|
6757
|
-
"onCompletion",
|
|
6758
|
-
"onCopy",
|
|
6759
|
-
"onLink",
|
|
6760
|
-
"onError",
|
|
6761
|
-
"onEvent",
|
|
6762
|
-
"onLog",
|
|
6763
|
-
"onValueChange"
|
|
6764
|
-
]);
|
|
6974
|
+
} = props;
|
|
6765
6975
|
const httpClient = getHttpClientWithCapabilities(props.httpClient, nativeSubflowHandlers);
|
|
6766
6976
|
const rootComponent = createRootDomainComponent(
|
|
6767
6977
|
onChange,
|
|
6768
6978
|
scrollToTop,
|
|
6769
6979
|
backConfig,
|
|
6770
|
-
normaliseRequestCache(
|
|
6980
|
+
normaliseRequestCache(requestCache)
|
|
6771
6981
|
);
|
|
6772
6982
|
const stepCount = getStepCounter();
|
|
6773
|
-
const
|
|
6983
|
+
const refreshAbortController = getRequestAbortController();
|
|
6774
6984
|
const createStep = (newStep, etag) => {
|
|
6775
6985
|
if (rootComponent.hasStep()) {
|
|
6776
6986
|
stepCount.increment();
|
|
@@ -6782,8 +6992,8 @@ var createFlowController = (props) => {
|
|
|
6782
6992
|
}
|
|
6783
6993
|
};
|
|
6784
6994
|
const updateStep = (newStep, etag) => {
|
|
6785
|
-
var
|
|
6786
|
-
const component = createStepComponent2(newStep, etag, (
|
|
6995
|
+
var _a;
|
|
6996
|
+
const component = createStepComponent2(newStep, etag, (_a = rootComponent.getLocalValue()) != null ? _a : null);
|
|
6787
6997
|
if (component) {
|
|
6788
6998
|
rootComponent.updateStep(component);
|
|
6789
6999
|
rootComponent.setLoadingState("idle");
|
|
@@ -6818,14 +7028,14 @@ var createFlowController = (props) => {
|
|
|
6818
7028
|
}
|
|
6819
7029
|
};
|
|
6820
7030
|
const getStep = () => {
|
|
6821
|
-
var
|
|
7031
|
+
var _a;
|
|
6822
7032
|
const stepComponent = rootComponent.getStep();
|
|
6823
|
-
return (
|
|
7033
|
+
return (_a = stepComponent == null ? void 0 : stepComponent.step) != null ? _a : initialStep;
|
|
6824
7034
|
};
|
|
6825
7035
|
const trackEvent = (eventName, properties) => {
|
|
6826
|
-
var
|
|
7036
|
+
var _a, _b;
|
|
6827
7037
|
const step = getStep();
|
|
6828
|
-
const stepId = (_b = (
|
|
7038
|
+
const stepId = (_b = (_a = step == null ? void 0 : step.id) != null ? _a : step == null ? void 0 : step.key) != null ? _b : null;
|
|
6829
7039
|
const analytics = step == null ? void 0 : step.analytics;
|
|
6830
7040
|
const metadata = __spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
6831
7041
|
flowId,
|
|
@@ -6836,10 +7046,16 @@ var createFlowController = (props) => {
|
|
|
6836
7046
|
} catch (e) {
|
|
6837
7047
|
}
|
|
6838
7048
|
};
|
|
7049
|
+
const trackCoreEvent = trackEvent;
|
|
7050
|
+
const executeDownload = getExecuteDownload({
|
|
7051
|
+
onNotification,
|
|
7052
|
+
getErrorMessageFunctions,
|
|
7053
|
+
trackEvent
|
|
7054
|
+
});
|
|
6839
7055
|
const logEvent = (level, message, properties) => {
|
|
6840
|
-
var
|
|
7056
|
+
var _a, _b;
|
|
6841
7057
|
const step = getStep();
|
|
6842
|
-
const stepId = (_b = (
|
|
7058
|
+
const stepId = (_b = (_a = step == null ? void 0 : step.id) != null ? _a : step == null ? void 0 : step.key) != null ? _b : null;
|
|
6843
7059
|
try {
|
|
6844
7060
|
onLog == null ? void 0 : onLog(level, message, __spreadValues(__spreadValues(__spreadProps(__spreadValues({}, properties), {
|
|
6845
7061
|
flowId
|
|
@@ -6849,17 +7065,25 @@ var createFlowController = (props) => {
|
|
|
6849
7065
|
};
|
|
6850
7066
|
const closeWithError = (error, analytics, statusCode) => {
|
|
6851
7067
|
rootComponent.stop();
|
|
6852
|
-
|
|
7068
|
+
trackCoreEvent("Failed", __spreadValues({}, analytics));
|
|
6853
7069
|
logEvent("error", "Dynamic Flow failed", { errorMessage: getErrorMessage(error), analytics });
|
|
6854
7070
|
onError(error, statusCode);
|
|
6855
7071
|
};
|
|
6856
7072
|
const closeWithCancellation = () => {
|
|
6857
|
-
|
|
7073
|
+
trackCoreEvent("Cancelled");
|
|
6858
7074
|
onCancellation == null ? void 0 : onCancellation();
|
|
6859
7075
|
};
|
|
6860
7076
|
const onBehavior = async (behavior) => {
|
|
6861
|
-
var
|
|
7077
|
+
var _a;
|
|
6862
7078
|
switch (behavior.type) {
|
|
7079
|
+
case "download": {
|
|
7080
|
+
try {
|
|
7081
|
+
await executeDownload(behavior.request, httpClient);
|
|
7082
|
+
} catch (error) {
|
|
7083
|
+
logEvent("error", "Download failed", { errorMessage: getErrorMessage(error) });
|
|
7084
|
+
}
|
|
7085
|
+
break;
|
|
7086
|
+
}
|
|
6863
7087
|
case "back": {
|
|
6864
7088
|
if (behavior.action) {
|
|
6865
7089
|
onAction(behavior.action, null).then(() => {
|
|
@@ -6894,6 +7118,7 @@ var createFlowController = (props) => {
|
|
|
6894
7118
|
void onAction(action, model);
|
|
6895
7119
|
} else {
|
|
6896
7120
|
rootComponent.setLoadingState("idle");
|
|
7121
|
+
scrollToTop("smooth");
|
|
6897
7122
|
}
|
|
6898
7123
|
} catch (e) {
|
|
6899
7124
|
rootComponent.setLoadingState("idle");
|
|
@@ -6916,7 +7141,7 @@ var createFlowController = (props) => {
|
|
|
6916
7141
|
void onRefresh({ refreshUrl: behavior.url, analytics: behavior.analytics });
|
|
6917
7142
|
return {
|
|
6918
7143
|
abort: () => {
|
|
6919
|
-
|
|
7144
|
+
refreshAbortController.abort();
|
|
6920
7145
|
}
|
|
6921
7146
|
};
|
|
6922
7147
|
}
|
|
@@ -6925,7 +7150,7 @@ var createFlowController = (props) => {
|
|
|
6925
7150
|
break;
|
|
6926
7151
|
}
|
|
6927
7152
|
case "modal": {
|
|
6928
|
-
const currentStep = (
|
|
7153
|
+
const currentStep = (_a = rootComponent.getStep()) == null ? void 0 : _a.step;
|
|
6929
7154
|
if (currentStep) {
|
|
6930
7155
|
rootComponent.showModal(
|
|
6931
7156
|
modalToComponent(
|
|
@@ -6976,14 +7201,14 @@ var createFlowController = (props) => {
|
|
|
6976
7201
|
} };
|
|
6977
7202
|
};
|
|
6978
7203
|
const onAction = async (action, model) => {
|
|
6979
|
-
var
|
|
7204
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
6980
7205
|
try {
|
|
6981
7206
|
rootComponent.setLoadingState("submitting");
|
|
6982
7207
|
const command = await executeSubmission({
|
|
6983
7208
|
action,
|
|
6984
7209
|
model,
|
|
6985
7210
|
isInitial: !rootComponent.hasStep(),
|
|
6986
|
-
requestCache: (_b = (
|
|
7211
|
+
requestCache: (_b = (_a = rootComponent.getStep()) == null ? void 0 : _a.requestCache) != null ? _b : rootComponent.requestCache,
|
|
6987
7212
|
httpClient,
|
|
6988
7213
|
trackEvent,
|
|
6989
7214
|
logEvent
|
|
@@ -6991,7 +7216,7 @@ var createFlowController = (props) => {
|
|
|
6991
7216
|
switch (command.type) {
|
|
6992
7217
|
case "complete": {
|
|
6993
7218
|
onCompletion(command.result);
|
|
6994
|
-
|
|
7219
|
+
trackCoreEvent("Succeeded");
|
|
6995
7220
|
if (features.isEnabled("continueAfterCompletion")) {
|
|
6996
7221
|
rootComponent.setLoadingState("idle");
|
|
6997
7222
|
} else {
|
|
@@ -7003,7 +7228,7 @@ var createFlowController = (props) => {
|
|
|
7003
7228
|
const isFirstStep = !rootComponent.hasStep();
|
|
7004
7229
|
rootComponent.closeSubflow();
|
|
7005
7230
|
createStep(command.step, command.etag);
|
|
7006
|
-
|
|
7231
|
+
trackCoreEvent("Step Shown", { isFirstStep });
|
|
7007
7232
|
break;
|
|
7008
7233
|
}
|
|
7009
7234
|
case "error": {
|
|
@@ -7020,8 +7245,10 @@ var createFlowController = (props) => {
|
|
|
7020
7245
|
// and the model that was submitted
|
|
7021
7246
|
polling: void 0,
|
|
7022
7247
|
// and no polling, to avoid restarting it
|
|
7023
|
-
external: void 0
|
|
7248
|
+
external: void 0,
|
|
7024
7249
|
// and no external, to avoid retriggering it
|
|
7250
|
+
onLoad: void 0
|
|
7251
|
+
// and no onLoad, to avoid retriggering it (how is this still the best we have. Should refactor soon)
|
|
7025
7252
|
}),
|
|
7026
7253
|
(_f = (_e = rootComponent.getStep()) == null ? void 0 : _e.etag) != null ? _f : null
|
|
7027
7254
|
);
|
|
@@ -7060,13 +7287,13 @@ var createFlowController = (props) => {
|
|
|
7060
7287
|
errorsOverride,
|
|
7061
7288
|
analytics
|
|
7062
7289
|
}) => {
|
|
7063
|
-
var
|
|
7290
|
+
var _a, _b, _c;
|
|
7064
7291
|
try {
|
|
7065
7292
|
rootComponent.setLoadingState("refreshing");
|
|
7066
7293
|
const model = rootComponent.getSubmittableValueSync();
|
|
7067
7294
|
const command = await executeRefresh({
|
|
7068
|
-
abortSignal:
|
|
7069
|
-
url: (
|
|
7295
|
+
abortSignal: refreshAbortController.abortAndGetNewSignal(),
|
|
7296
|
+
url: (_a = refreshUrl != null ? refreshUrl : rootComponent.getRefreshUrl()) != null ? _a : "",
|
|
7070
7297
|
model,
|
|
7071
7298
|
etag: (_c = (_b = rootComponent.getStep()) == null ? void 0 : _b.etag) != null ? _c : null,
|
|
7072
7299
|
analytics,
|
|
@@ -7122,14 +7349,14 @@ var createFlowController = (props) => {
|
|
|
7122
7349
|
let initState = "initial";
|
|
7123
7350
|
if (initialStep) {
|
|
7124
7351
|
initState = "created";
|
|
7125
|
-
|
|
7352
|
+
trackCoreEvent("Initiated");
|
|
7126
7353
|
createStep(initialStep, null);
|
|
7127
|
-
|
|
7354
|
+
trackCoreEvent("Step Shown", { isFirstStep: true });
|
|
7128
7355
|
}
|
|
7129
7356
|
const start = () => {
|
|
7130
7357
|
if (initState === "initial" && initialAction) {
|
|
7131
7358
|
initState = "created";
|
|
7132
|
-
|
|
7359
|
+
trackCoreEvent("Initiated");
|
|
7133
7360
|
rootComponent.setLoadingState("submitting");
|
|
7134
7361
|
void onAction(__spreadValues({ method: "GET" }, initialAction), null).then(() => {
|
|
7135
7362
|
initState = "started";
|
|
@@ -7328,6 +7555,26 @@ var multi_file_upload_messages_default = (0, import_react_intl6.defineMessages)(
|
|
|
7328
7555
|
}
|
|
7329
7556
|
});
|
|
7330
7557
|
|
|
7558
|
+
// src/common/messages/download.messages.ts
|
|
7559
|
+
var import_react_intl7 = require("react-intl");
|
|
7560
|
+
var download_messages_default = (0, import_react_intl7.defineMessages)({
|
|
7561
|
+
downloadStarted: {
|
|
7562
|
+
id: "dynamicFlows.DownloadFeedback.started",
|
|
7563
|
+
defaultMessage: "Downloading...",
|
|
7564
|
+
description: "Appears in a snackbar when a download starts."
|
|
7565
|
+
},
|
|
7566
|
+
downloadSuccessful: {
|
|
7567
|
+
id: "dynamicFlows.DownloadFeedback.successful",
|
|
7568
|
+
defaultMessage: "Download successful",
|
|
7569
|
+
description: "Appears in a snackbar when a download succeeds."
|
|
7570
|
+
},
|
|
7571
|
+
downloadFailed: {
|
|
7572
|
+
id: "dynamicFlows.DownloadFeedback.failed",
|
|
7573
|
+
defaultMessage: "Download failed",
|
|
7574
|
+
description: "Appears in a snackbar when a download fails."
|
|
7575
|
+
}
|
|
7576
|
+
});
|
|
7577
|
+
|
|
7331
7578
|
// src/renderers/getSchemaErrorMessageFunction.ts
|
|
7332
7579
|
function getSchemaErrorMessageFunction(formatMessage, locale) {
|
|
7333
7580
|
return (validationMessages) => createErrorMessageFunctions(validationMessages != null ? validationMessages : {}, formatMessage, locale);
|
|
@@ -7414,6 +7661,15 @@ var createErrorMessageFunctions = (validationMessages, formatMessage, locale) =>
|
|
|
7414
7661
|
},
|
|
7415
7662
|
genericErrorWithRetry() {
|
|
7416
7663
|
return formatMessage(generic_error_messages_default.genericErrorRetryHint);
|
|
7664
|
+
},
|
|
7665
|
+
downloadStarted() {
|
|
7666
|
+
return formatMessage(download_messages_default.downloadStarted);
|
|
7667
|
+
},
|
|
7668
|
+
downloadFailed() {
|
|
7669
|
+
return formatMessage(download_messages_default.downloadFailed);
|
|
7670
|
+
},
|
|
7671
|
+
downloadSuccessful() {
|
|
7672
|
+
return formatMessage(download_messages_default.downloadSuccessful);
|
|
7417
7673
|
}
|
|
7418
7674
|
});
|
|
7419
7675
|
var formatDateOptions = {
|
|
@@ -7509,6 +7765,7 @@ var inputComponentToProps = (component, type) => {
|
|
|
7509
7765
|
title,
|
|
7510
7766
|
tags,
|
|
7511
7767
|
validationAsyncState,
|
|
7768
|
+
inlineAlert,
|
|
7512
7769
|
onBlur,
|
|
7513
7770
|
onFocus
|
|
7514
7771
|
} = component;
|
|
@@ -7528,12 +7785,21 @@ var inputComponentToProps = (component, type) => {
|
|
|
7528
7785
|
required,
|
|
7529
7786
|
title,
|
|
7530
7787
|
tags,
|
|
7531
|
-
validationState: getValidationState(errors, validationAsyncState),
|
|
7532
7788
|
value: component.getLocalValue(),
|
|
7789
|
+
validationState: getValidationState(errors, validationAsyncState),
|
|
7790
|
+
inlineAlert,
|
|
7791
|
+
fieldLoadingState: getFieldLoadingState(component),
|
|
7533
7792
|
onBlur: onBlur.bind(component),
|
|
7534
7793
|
onFocus: onFocus.bind(component)
|
|
7535
7794
|
};
|
|
7536
7795
|
};
|
|
7796
|
+
var getFieldLoadingState = (component) => {
|
|
7797
|
+
const { validationAsyncState } = component;
|
|
7798
|
+
if (!validationAsyncState) {
|
|
7799
|
+
return "idle";
|
|
7800
|
+
}
|
|
7801
|
+
return validationAsyncState.loadingState === "pending" ? "validating" : "idle";
|
|
7802
|
+
};
|
|
7537
7803
|
|
|
7538
7804
|
// src/renderers/mappers/booleanInputComponentToProps.ts
|
|
7539
7805
|
var booleanInputComponentToProps = (component, rendererMapperProps) => {
|
|
@@ -7965,13 +8231,10 @@ var paragraphComponentToProps = (component, rendererMapperProps) => __spreadValu
|
|
|
7965
8231
|
|
|
7966
8232
|
// src/renderers/mappers/persistAsyncComponentToProps.ts
|
|
7967
8233
|
var persistAsyncComponentToProps = (component, rendererMapperProps) => {
|
|
7968
|
-
const
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
});
|
|
7973
|
-
}
|
|
7974
|
-
return props;
|
|
8234
|
+
const { errors, status } = component;
|
|
8235
|
+
const validationState = errors.length > 0 ? { status: "invalid", message: errors[0] } : void 0;
|
|
8236
|
+
const fieldLoadingState = status === "persisting" ? "persisting" : void 0;
|
|
8237
|
+
return __spreadValues(__spreadValues(__spreadValues({}, componentToRendererProps(component.component, rendererMapperProps)), validationState ? { validationState } : {}), fieldLoadingState ? { fieldLoadingState } : {});
|
|
7975
8238
|
};
|
|
7976
8239
|
|
|
7977
8240
|
// src/renderers/mappers/progressComponentToProps.ts
|
|
@@ -8593,7 +8856,7 @@ function useDynamicFlow(props) {
|
|
|
8593
8856
|
const onEvent = useStableCallback(props.onEvent);
|
|
8594
8857
|
const onLog = useStableCallback(props.onLog);
|
|
8595
8858
|
const onValueChange = noop2;
|
|
8596
|
-
const { formatMessage, locale } = (0,
|
|
8859
|
+
const { formatMessage, locale } = (0, import_react_intl8.useIntl)();
|
|
8597
8860
|
const getErrorMessageFunctions = (0, import_react3.useMemo)(
|
|
8598
8861
|
() => getSchemaErrorMessageFunction(formatMessage, locale),
|
|
8599
8862
|
[formatMessage, locale]
|