@wise/dynamic-flow-client 5.15.0 → 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 +383 -100
- package/build/main.mjs +381 -98
- 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/executeRequest.d.ts +2 -1
- package/build/types/controller/executeRequest.d.ts.map +1 -1
- package/build/types/controller/executeSubmission.d.ts.map +1 -1
- 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/RootDomainComponent.d.ts +1 -1
- package/build/types/domain/components/RootDomainComponent.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 +9 -3
- 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/rootComponentToProps.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 +25 -25
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");
|
|
@@ -1000,7 +1054,6 @@ var createRootDomainComponent = (onComponentUpdate, scrollToTop, backConfig, req
|
|
|
1000
1054
|
kind: "step",
|
|
1001
1055
|
uid: "root",
|
|
1002
1056
|
stepComponent: null,
|
|
1003
|
-
subflow: null,
|
|
1004
1057
|
stepStack: [],
|
|
1005
1058
|
backConfig,
|
|
1006
1059
|
requestCache,
|
|
@@ -1067,17 +1120,16 @@ var createRootDomainComponent = (onComponentUpdate, scrollToTop, backConfig, req
|
|
|
1067
1120
|
return (_a = this.stepStack[this.stepStack.length - 1]) != null ? _a : null;
|
|
1068
1121
|
},
|
|
1069
1122
|
addSubflow(subflow) {
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
});
|
|
1123
|
+
var _a;
|
|
1124
|
+
(_a = this.getStep()) == null ? void 0 : _a.addSubflow(subflow);
|
|
1073
1125
|
},
|
|
1074
1126
|
closeSubflow() {
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1127
|
+
var _a;
|
|
1128
|
+
(_a = this.getStep()) == null ? void 0 : _a.closeSubflow();
|
|
1129
|
+
},
|
|
1130
|
+
getSubflow() {
|
|
1131
|
+
var _a, _b;
|
|
1132
|
+
return (_b = (_a = this.getStep()) == null ? void 0 : _a.subflow) != null ? _b : null;
|
|
1081
1133
|
},
|
|
1082
1134
|
start() {
|
|
1083
1135
|
var _a;
|
|
@@ -2599,15 +2651,17 @@ var getLocalValues = (components) => components.map((component) => component.get
|
|
|
2599
2651
|
|
|
2600
2652
|
// src/domain/components/step/StepDomainComponent.ts
|
|
2601
2653
|
var createStepComponent = (stepProps) => {
|
|
2602
|
-
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"]);
|
|
2603
2655
|
const update = getInputUpdateFunction(onComponentUpdate);
|
|
2604
2656
|
const component = __spreadProps(__spreadValues({
|
|
2605
2657
|
uid
|
|
2606
2658
|
}, rest), {
|
|
2607
2659
|
type: "step",
|
|
2608
2660
|
kind: "step",
|
|
2661
|
+
state: "initial",
|
|
2609
2662
|
modals: [],
|
|
2610
2663
|
requestCache: stepPrefetch.requestCache,
|
|
2664
|
+
subflow: null,
|
|
2611
2665
|
dismissModal() {
|
|
2612
2666
|
var _a2;
|
|
2613
2667
|
(_a2 = this.modals.at(-1)) == null ? void 0 : _a2.close();
|
|
@@ -2653,7 +2707,26 @@ var createStepComponent = (stepProps) => {
|
|
|
2653
2707
|
draft.loadingState = loadingState;
|
|
2654
2708
|
});
|
|
2655
2709
|
},
|
|
2710
|
+
addSubflow(subflow) {
|
|
2711
|
+
this._update((draft) => {
|
|
2712
|
+
draft.subflow = subflow;
|
|
2713
|
+
});
|
|
2714
|
+
},
|
|
2715
|
+
closeSubflow() {
|
|
2716
|
+
if (!this.subflow) {
|
|
2717
|
+
return;
|
|
2718
|
+
}
|
|
2719
|
+
this._update((draft) => {
|
|
2720
|
+
draft.subflow = null;
|
|
2721
|
+
});
|
|
2722
|
+
},
|
|
2656
2723
|
start() {
|
|
2724
|
+
if (this.state === "initial") {
|
|
2725
|
+
onLoad == null ? void 0 : onLoad();
|
|
2726
|
+
}
|
|
2727
|
+
this._update((draft) => {
|
|
2728
|
+
draft.state = "started";
|
|
2729
|
+
});
|
|
2657
2730
|
stepPolling == null ? void 0 : stepPolling.start();
|
|
2658
2731
|
stepRefreshAfter == null ? void 0 : stepRefreshAfter.start();
|
|
2659
2732
|
stepPrefetch.start(this.getSubmittableValueSync());
|
|
@@ -2663,6 +2736,7 @@ var createStepComponent = (stepProps) => {
|
|
|
2663
2736
|
stepRefreshAfter == null ? void 0 : stepRefreshAfter.stop();
|
|
2664
2737
|
stepPrefetch.stop();
|
|
2665
2738
|
this._update((draft) => {
|
|
2739
|
+
draft.state = "stopped";
|
|
2666
2740
|
draft.modals = [];
|
|
2667
2741
|
});
|
|
2668
2742
|
}
|
|
@@ -2864,7 +2938,7 @@ var makeSafeHttpClient = (httpClient) => async (...props) => {
|
|
|
2864
2938
|
|
|
2865
2939
|
// src/controller/executeRequest.ts
|
|
2866
2940
|
var executeRequest = async (props) => {
|
|
2867
|
-
const { exit, request, requestCache, httpClient, trackEvent, logEvent } = props;
|
|
2941
|
+
const { isInitial, exit, request, requestCache, httpClient, trackEvent, logEvent } = props;
|
|
2868
2942
|
const { url, method, body } = request;
|
|
2869
2943
|
const response = await getCachedOrFetch(
|
|
2870
2944
|
[
|
|
@@ -2913,18 +2987,24 @@ var executeRequest = async (props) => {
|
|
|
2913
2987
|
}
|
|
2914
2988
|
case "subflow": {
|
|
2915
2989
|
assertSubflowResponseBody(responseBody);
|
|
2916
|
-
return {
|
|
2990
|
+
return !isInitial ? {
|
|
2917
2991
|
type: "behavior",
|
|
2918
2992
|
behavior: __spreadProps(__spreadValues({}, responseBody), {
|
|
2919
2993
|
type: "subflow",
|
|
2920
2994
|
onCompletion: responseBody.onCompletion ? normaliseBehavior(responseBody.onCompletion, []) : void 0,
|
|
2921
2995
|
onError: responseBody.onError ? normaliseBehavior(responseBody.onError, []) : void 0
|
|
2922
2996
|
})
|
|
2997
|
+
} : {
|
|
2998
|
+
type: "error",
|
|
2999
|
+
body: { errors: { error: "Cannot start subflow without a current step" } }
|
|
2923
3000
|
};
|
|
2924
3001
|
}
|
|
2925
3002
|
case "modal": {
|
|
2926
3003
|
assertModalResponseBody(responseBody);
|
|
2927
|
-
return { type: "behavior", behavior: __spreadProps(__spreadValues({}, responseBody), { type: "modal" }) }
|
|
3004
|
+
return !isInitial ? { type: "behavior", behavior: __spreadProps(__spreadValues({}, responseBody), { type: "modal" }) } : {
|
|
3005
|
+
type: "error",
|
|
3006
|
+
body: { errors: { error: "Cannot show modal without a current step" } }
|
|
3007
|
+
};
|
|
2928
3008
|
}
|
|
2929
3009
|
case "no-op": {
|
|
2930
3010
|
return { type: "no-op" };
|
|
@@ -2960,6 +3040,7 @@ var executeSubmission = async (props) => {
|
|
|
2960
3040
|
}
|
|
2961
3041
|
try {
|
|
2962
3042
|
const command = await executeRequest({
|
|
3043
|
+
isInitial,
|
|
2963
3044
|
exit,
|
|
2964
3045
|
request: createRequestFromAction(action, model),
|
|
2965
3046
|
requestCache,
|
|
@@ -3197,7 +3278,8 @@ var getComponentValidationAsync = (update, performValidationAsync) => (
|
|
|
3197
3278
|
draft.validationAsyncState = {
|
|
3198
3279
|
abortController: newAbortController,
|
|
3199
3280
|
lastSubmitted: currentValue,
|
|
3200
|
-
messages: {}
|
|
3281
|
+
messages: {},
|
|
3282
|
+
loadingState: "idle"
|
|
3201
3283
|
};
|
|
3202
3284
|
});
|
|
3203
3285
|
return;
|
|
@@ -3208,6 +3290,7 @@ var getComponentValidationAsync = (update, performValidationAsync) => (
|
|
|
3208
3290
|
if (message) {
|
|
3209
3291
|
draft.validationAsyncState.messages.success = message;
|
|
3210
3292
|
}
|
|
3293
|
+
draft.validationAsyncState.loadingState = "idle";
|
|
3211
3294
|
});
|
|
3212
3295
|
return message;
|
|
3213
3296
|
}).catch((error) => {
|
|
@@ -3216,13 +3299,15 @@ var getComponentValidationAsync = (update, performValidationAsync) => (
|
|
|
3216
3299
|
}
|
|
3217
3300
|
update(component, (draft) => {
|
|
3218
3301
|
draft.validationAsyncState.messages.error = error.message;
|
|
3302
|
+
draft.validationAsyncState.loadingState = "idle";
|
|
3219
3303
|
});
|
|
3220
3304
|
});
|
|
3221
3305
|
update(component, (draft) => {
|
|
3222
3306
|
draft.validationAsyncState = {
|
|
3223
3307
|
abortController: newAbortController,
|
|
3224
3308
|
lastSubmitted: currentValue,
|
|
3225
|
-
messages: {}
|
|
3309
|
+
messages: {},
|
|
3310
|
+
loadingState: "pending"
|
|
3226
3311
|
};
|
|
3227
3312
|
});
|
|
3228
3313
|
return newSubmission;
|
|
@@ -3325,22 +3410,23 @@ var getSchemaOnChange = (schema, onBehavior) => {
|
|
|
3325
3410
|
return void 0;
|
|
3326
3411
|
};
|
|
3327
3412
|
var getBehaviorFromSchemaOnChange = (schema) => {
|
|
3413
|
+
var _a;
|
|
3328
3414
|
if ("onChange" in schema && schema.onChange) {
|
|
3329
3415
|
const { $id, analyticsId, onChange } = schema;
|
|
3330
3416
|
const behavior = __spreadProps(__spreadValues({}, normaliseBehavior(onChange, [])), {
|
|
3331
|
-
analytics: { schema: analyticsId != null ? analyticsId : $id }
|
|
3417
|
+
analytics: { schema: (_a = analyticsId != null ? analyticsId : $id) != null ? _a : "" }
|
|
3332
3418
|
});
|
|
3333
3419
|
return behavior;
|
|
3334
3420
|
}
|
|
3335
3421
|
return void 0;
|
|
3336
3422
|
};
|
|
3337
3423
|
var getBehaviorFromSchemaRefreshStepOnChange = (schema) => {
|
|
3338
|
-
var _a, _b;
|
|
3424
|
+
var _a, _b, _c;
|
|
3339
3425
|
if ("refreshStepOnChange" in schema && ((_a = schema.refreshStepOnChange) != null ? _a : false) || "refreshFormOnChange" in schema && ((_b = schema.refreshFormOnChange) != null ? _b : false)) {
|
|
3340
3426
|
const { $id, analyticsId, refreshUrl, refreshFormUrl } = schema;
|
|
3341
3427
|
const behavior = {
|
|
3342
3428
|
type: "refresh",
|
|
3343
|
-
analytics: { schema: analyticsId != null ? analyticsId : $id },
|
|
3429
|
+
analytics: { schema: (_c = analyticsId != null ? analyticsId : $id) != null ? _c : "" },
|
|
3344
3430
|
url: refreshUrl != null ? refreshUrl : refreshFormUrl
|
|
3345
3431
|
};
|
|
3346
3432
|
return behavior;
|
|
@@ -3572,7 +3658,8 @@ var autocompleteTokenMap = {
|
|
|
3572
3658
|
var getInitialValidationAsyncState = () => ({
|
|
3573
3659
|
abortController: new AbortController(),
|
|
3574
3660
|
lastSubmitted: null,
|
|
3575
|
-
messages: {}
|
|
3661
|
+
messages: {},
|
|
3662
|
+
loadingState: "idle"
|
|
3576
3663
|
});
|
|
3577
3664
|
|
|
3578
3665
|
// src/domain/features/utils/response-utils.ts
|
|
@@ -3592,10 +3679,9 @@ var getPerformValidationAsync = ({
|
|
|
3592
3679
|
trackEvent
|
|
3593
3680
|
}) => {
|
|
3594
3681
|
const { method, param, url } = validationAsyncConfig;
|
|
3595
|
-
const
|
|
3682
|
+
const trackFailure = (json) => {
|
|
3596
3683
|
const analytics = getAnalyticsFromErrorResponse(json);
|
|
3597
3684
|
trackEvent("ValidationAsync Failed", __spreadValues({ schema: schemaId }, analytics));
|
|
3598
|
-
return null;
|
|
3599
3685
|
};
|
|
3600
3686
|
return async function performValidationAsync({ value, signal }) {
|
|
3601
3687
|
let response;
|
|
@@ -3605,8 +3691,9 @@ var getPerformValidationAsync = ({
|
|
|
3605
3691
|
url,
|
|
3606
3692
|
constructPayload({ value, signal, requestConfig: { method, param } })
|
|
3607
3693
|
);
|
|
3608
|
-
} catch (
|
|
3609
|
-
|
|
3694
|
+
} catch (error) {
|
|
3695
|
+
trackFailure();
|
|
3696
|
+
throw error;
|
|
3610
3697
|
}
|
|
3611
3698
|
const json = await response.json().catch(() => null);
|
|
3612
3699
|
const message = getValidationMessage(json);
|
|
@@ -3620,7 +3707,8 @@ var getPerformValidationAsync = ({
|
|
|
3620
3707
|
throw new Error(message);
|
|
3621
3708
|
}
|
|
3622
3709
|
}
|
|
3623
|
-
|
|
3710
|
+
trackFailure(json);
|
|
3711
|
+
return null;
|
|
3624
3712
|
};
|
|
3625
3713
|
};
|
|
3626
3714
|
var getValidationMessage = (json) => {
|
|
@@ -3717,7 +3805,7 @@ var mapCommonSchemaProps = (schemaMapperProps) => {
|
|
|
3717
3805
|
title,
|
|
3718
3806
|
hidden
|
|
3719
3807
|
} = schema;
|
|
3720
|
-
return __spreadValues(__spreadValues(__spreadValues({
|
|
3808
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
3721
3809
|
uid,
|
|
3722
3810
|
id: $id != null ? $id : uid,
|
|
3723
3811
|
schemaId,
|
|
@@ -3734,7 +3822,7 @@ var mapCommonSchemaProps = (schemaMapperProps) => {
|
|
|
3734
3822
|
title,
|
|
3735
3823
|
onPersistAsync,
|
|
3736
3824
|
summariser: getSummariser(schema)
|
|
3737
|
-
}, 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) } : {});
|
|
3738
3826
|
};
|
|
3739
3827
|
var schemaHasDisabled = (schema) => Boolean("disabled" in schema && schema.disabled !== void 0);
|
|
3740
3828
|
var schemaHasHelp = (schema) => Boolean("help" in schema && schema.help);
|
|
@@ -5665,6 +5753,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5665
5753
|
schemaId,
|
|
5666
5754
|
component,
|
|
5667
5755
|
hidden,
|
|
5756
|
+
status: "idle",
|
|
5668
5757
|
lastSubmitted: model != null ? localValue != null ? localValue : null : null,
|
|
5669
5758
|
lastResponse: model != null ? model : null,
|
|
5670
5759
|
submission: Promise.resolve(model != null ? model : null),
|
|
@@ -5703,6 +5792,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5703
5792
|
draft.lastSubmitted = childLocalValue;
|
|
5704
5793
|
draft.submission = resolvedNull;
|
|
5705
5794
|
draft.errors = [];
|
|
5795
|
+
draft.status = "idle";
|
|
5706
5796
|
});
|
|
5707
5797
|
void (schemaOnChange == null ? void 0 : schemaOnChange());
|
|
5708
5798
|
return resolvedNull;
|
|
@@ -5712,6 +5802,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5712
5802
|
this._update((draft) => {
|
|
5713
5803
|
draft.lastResponse = token;
|
|
5714
5804
|
draft.errors = [];
|
|
5805
|
+
draft.status = "success";
|
|
5715
5806
|
});
|
|
5716
5807
|
void (schemaOnChange == null ? void 0 : schemaOnChange());
|
|
5717
5808
|
return token;
|
|
@@ -5723,6 +5814,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5723
5814
|
draft.lastResponse = null;
|
|
5724
5815
|
draft.lastSubmitted = null;
|
|
5725
5816
|
draft.submission = Promise.resolve(null);
|
|
5817
|
+
draft.status = "error";
|
|
5726
5818
|
if (this.component.type !== "upload") {
|
|
5727
5819
|
draft.errors = error instanceof Error ? [error.message] : [];
|
|
5728
5820
|
}
|
|
@@ -5735,6 +5827,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5735
5827
|
draft.lastResponse = null;
|
|
5736
5828
|
draft.submission = newSubmission;
|
|
5737
5829
|
draft.errors = [];
|
|
5830
|
+
draft.status = "persisting";
|
|
5738
5831
|
});
|
|
5739
5832
|
return newSubmission;
|
|
5740
5833
|
}
|
|
@@ -6303,7 +6396,7 @@ var mapStepToComponent = (_a) => {
|
|
|
6303
6396
|
"onPoll",
|
|
6304
6397
|
"onBehavior"
|
|
6305
6398
|
]);
|
|
6306
|
-
var _a2;
|
|
6399
|
+
var _a2, _b2;
|
|
6307
6400
|
const { etag, step, stepLocalValue, flowRequestCache, logEvent, onComponentUpdate } = restProps;
|
|
6308
6401
|
const {
|
|
6309
6402
|
id,
|
|
@@ -6322,6 +6415,12 @@ var mapStepToComponent = (_a) => {
|
|
|
6322
6415
|
const registerSubmissionBehavior = (behavior) => {
|
|
6323
6416
|
submissionBehaviors.push(behavior);
|
|
6324
6417
|
};
|
|
6418
|
+
const mapperProps = __spreadProps(__spreadValues({}, restProps), {
|
|
6419
|
+
features,
|
|
6420
|
+
trackEvent,
|
|
6421
|
+
onBehavior,
|
|
6422
|
+
registerSubmissionBehavior
|
|
6423
|
+
});
|
|
6325
6424
|
const back = mapBackNavigation(navigation, onBehavior, features.isEnabled("nativeBack"));
|
|
6326
6425
|
const stepId = id || key;
|
|
6327
6426
|
if (stepId === void 0) {
|
|
@@ -6337,18 +6436,15 @@ var mapStepToComponent = (_a) => {
|
|
|
6337
6436
|
}) : void 0;
|
|
6338
6437
|
const stepRefreshAfter = refreshAfter ? getStepRefreshAfter({ refreshAfter, logEvent, onBehavior }) : void 0;
|
|
6339
6438
|
const stepPrefetch = getStepPrefetch(restProps.httpClient, flowRequestCache, submissionBehaviors);
|
|
6340
|
-
const
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
restProps.onLink,
|
|
6344
|
-
onComponentUpdate
|
|
6345
|
-
) : void 0;
|
|
6346
|
-
const mapperProps = __spreadProps(__spreadValues({}, restProps), {
|
|
6347
|
-
features,
|
|
6348
|
-
trackEvent,
|
|
6349
|
-
onBehavior,
|
|
6439
|
+
const onLoadBehavior = getDomainLayerBehavior(
|
|
6440
|
+
{ behavior: step.onLoad },
|
|
6441
|
+
(_a2 = step.actions) != null ? _a2 : [],
|
|
6350
6442
|
registerSubmissionBehavior
|
|
6351
|
-
|
|
6443
|
+
);
|
|
6444
|
+
const stepOnLoad = onLoadBehavior && onLoadBehavior.type !== "link" ? () => {
|
|
6445
|
+
void onBehavior(onLoadBehavior);
|
|
6446
|
+
} : void 0;
|
|
6447
|
+
const externalConfirmation = getExternalConfiguration(uid, external, onLoadBehavior, mapperProps);
|
|
6352
6448
|
const referencedSchemaIds = getReferencedSchemaId(step);
|
|
6353
6449
|
const schemaComponents = mapStepSchemas(uid, step, stepLocalValue, mapperProps);
|
|
6354
6450
|
const { layout, footer } = getLayoutAndFooter(step, features);
|
|
@@ -6376,13 +6472,14 @@ var mapStepToComponent = (_a) => {
|
|
|
6376
6472
|
stepRefreshAfter,
|
|
6377
6473
|
title,
|
|
6378
6474
|
tags,
|
|
6379
|
-
stackBehavior: (
|
|
6475
|
+
stackBehavior: (_b2 = navigation == null ? void 0 : navigation.stackBehavior) != null ? _b2 : "default",
|
|
6380
6476
|
stepPrefetch,
|
|
6381
6477
|
step,
|
|
6382
6478
|
referencedSchemaIds,
|
|
6383
6479
|
onComponentUpdate,
|
|
6384
6480
|
trackEvent,
|
|
6385
|
-
onBehavior
|
|
6481
|
+
onBehavior,
|
|
6482
|
+
onLoad: stepOnLoad
|
|
6386
6483
|
});
|
|
6387
6484
|
return stepComponent;
|
|
6388
6485
|
};
|
|
@@ -6404,6 +6501,25 @@ var mapBackNavigation = (navigation, onBehavior, isNativeBackEnabled) => {
|
|
|
6404
6501
|
}
|
|
6405
6502
|
} : void 0;
|
|
6406
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
|
+
};
|
|
6407
6523
|
var getLayoutAndFooter = (step, features) => {
|
|
6408
6524
|
var _a;
|
|
6409
6525
|
if (step.footer) {
|
|
@@ -6434,6 +6550,135 @@ var validateStepTypes = (step, logEvent) => {
|
|
|
6434
6550
|
}
|
|
6435
6551
|
};
|
|
6436
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
|
+
|
|
6437
6682
|
// src/controller/executePoll.ts
|
|
6438
6683
|
var executePoll = async (props) => {
|
|
6439
6684
|
const { errorBehavior, signal, url, httpClient, trackEvent } = props;
|
|
@@ -6606,7 +6851,7 @@ var executeSubflow = async ({
|
|
|
6606
6851
|
};
|
|
6607
6852
|
const close = () => {
|
|
6608
6853
|
var _a2;
|
|
6609
|
-
if (((_a2 = rootComponent.
|
|
6854
|
+
if (((_a2 = rootComponent.getSubflow()) == null ? void 0 : _a2.uid) === component.uid) {
|
|
6610
6855
|
rootComponent.closeSubflow();
|
|
6611
6856
|
}
|
|
6612
6857
|
};
|
|
@@ -6706,13 +6951,14 @@ var getStepCounter = () => {
|
|
|
6706
6951
|
|
|
6707
6952
|
// src/controller/FlowController.ts
|
|
6708
6953
|
var createFlowController = (props) => {
|
|
6709
|
-
const
|
|
6954
|
+
const {
|
|
6710
6955
|
flowId,
|
|
6711
6956
|
initialAction,
|
|
6712
6957
|
initialStep,
|
|
6713
6958
|
backConfig,
|
|
6714
6959
|
features,
|
|
6715
6960
|
nativeSubflowHandlers,
|
|
6961
|
+
requestCache,
|
|
6716
6962
|
getErrorMessageFunctions,
|
|
6717
6963
|
scrollToTop,
|
|
6718
6964
|
onChange,
|
|
@@ -6720,38 +6966,21 @@ var createFlowController = (props) => {
|
|
|
6720
6966
|
onCompletion,
|
|
6721
6967
|
onCopy,
|
|
6722
6968
|
onLink,
|
|
6969
|
+
onNotification,
|
|
6723
6970
|
onError,
|
|
6724
6971
|
onEvent,
|
|
6725
6972
|
onLog,
|
|
6726
6973
|
onValueChange
|
|
6727
|
-
} =
|
|
6728
|
-
"flowId",
|
|
6729
|
-
"initialAction",
|
|
6730
|
-
"initialStep",
|
|
6731
|
-
"backConfig",
|
|
6732
|
-
"features",
|
|
6733
|
-
"nativeSubflowHandlers",
|
|
6734
|
-
"getErrorMessageFunctions",
|
|
6735
|
-
"scrollToTop",
|
|
6736
|
-
"onChange",
|
|
6737
|
-
"onCancellation",
|
|
6738
|
-
"onCompletion",
|
|
6739
|
-
"onCopy",
|
|
6740
|
-
"onLink",
|
|
6741
|
-
"onError",
|
|
6742
|
-
"onEvent",
|
|
6743
|
-
"onLog",
|
|
6744
|
-
"onValueChange"
|
|
6745
|
-
]);
|
|
6974
|
+
} = props;
|
|
6746
6975
|
const httpClient = getHttpClientWithCapabilities(props.httpClient, nativeSubflowHandlers);
|
|
6747
6976
|
const rootComponent = createRootDomainComponent(
|
|
6748
6977
|
onChange,
|
|
6749
6978
|
scrollToTop,
|
|
6750
6979
|
backConfig,
|
|
6751
|
-
normaliseRequestCache(
|
|
6980
|
+
normaliseRequestCache(requestCache)
|
|
6752
6981
|
);
|
|
6753
6982
|
const stepCount = getStepCounter();
|
|
6754
|
-
const
|
|
6983
|
+
const refreshAbortController = getRequestAbortController();
|
|
6755
6984
|
const createStep = (newStep, etag) => {
|
|
6756
6985
|
if (rootComponent.hasStep()) {
|
|
6757
6986
|
stepCount.increment();
|
|
@@ -6763,8 +6992,8 @@ var createFlowController = (props) => {
|
|
|
6763
6992
|
}
|
|
6764
6993
|
};
|
|
6765
6994
|
const updateStep = (newStep, etag) => {
|
|
6766
|
-
var
|
|
6767
|
-
const component = createStepComponent2(newStep, etag, (
|
|
6995
|
+
var _a;
|
|
6996
|
+
const component = createStepComponent2(newStep, etag, (_a = rootComponent.getLocalValue()) != null ? _a : null);
|
|
6768
6997
|
if (component) {
|
|
6769
6998
|
rootComponent.updateStep(component);
|
|
6770
6999
|
rootComponent.setLoadingState("idle");
|
|
@@ -6799,14 +7028,14 @@ var createFlowController = (props) => {
|
|
|
6799
7028
|
}
|
|
6800
7029
|
};
|
|
6801
7030
|
const getStep = () => {
|
|
6802
|
-
var
|
|
7031
|
+
var _a;
|
|
6803
7032
|
const stepComponent = rootComponent.getStep();
|
|
6804
|
-
return (
|
|
7033
|
+
return (_a = stepComponent == null ? void 0 : stepComponent.step) != null ? _a : initialStep;
|
|
6805
7034
|
};
|
|
6806
7035
|
const trackEvent = (eventName, properties) => {
|
|
6807
|
-
var
|
|
7036
|
+
var _a, _b;
|
|
6808
7037
|
const step = getStep();
|
|
6809
|
-
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;
|
|
6810
7039
|
const analytics = step == null ? void 0 : step.analytics;
|
|
6811
7040
|
const metadata = __spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
6812
7041
|
flowId,
|
|
@@ -6817,10 +7046,16 @@ var createFlowController = (props) => {
|
|
|
6817
7046
|
} catch (e) {
|
|
6818
7047
|
}
|
|
6819
7048
|
};
|
|
7049
|
+
const trackCoreEvent = trackEvent;
|
|
7050
|
+
const executeDownload = getExecuteDownload({
|
|
7051
|
+
onNotification,
|
|
7052
|
+
getErrorMessageFunctions,
|
|
7053
|
+
trackEvent
|
|
7054
|
+
});
|
|
6820
7055
|
const logEvent = (level, message, properties) => {
|
|
6821
|
-
var
|
|
7056
|
+
var _a, _b;
|
|
6822
7057
|
const step = getStep();
|
|
6823
|
-
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;
|
|
6824
7059
|
try {
|
|
6825
7060
|
onLog == null ? void 0 : onLog(level, message, __spreadValues(__spreadValues(__spreadProps(__spreadValues({}, properties), {
|
|
6826
7061
|
flowId
|
|
@@ -6830,17 +7065,25 @@ var createFlowController = (props) => {
|
|
|
6830
7065
|
};
|
|
6831
7066
|
const closeWithError = (error, analytics, statusCode) => {
|
|
6832
7067
|
rootComponent.stop();
|
|
6833
|
-
|
|
7068
|
+
trackCoreEvent("Failed", __spreadValues({}, analytics));
|
|
6834
7069
|
logEvent("error", "Dynamic Flow failed", { errorMessage: getErrorMessage(error), analytics });
|
|
6835
7070
|
onError(error, statusCode);
|
|
6836
7071
|
};
|
|
6837
7072
|
const closeWithCancellation = () => {
|
|
6838
|
-
|
|
7073
|
+
trackCoreEvent("Cancelled");
|
|
6839
7074
|
onCancellation == null ? void 0 : onCancellation();
|
|
6840
7075
|
};
|
|
6841
7076
|
const onBehavior = async (behavior) => {
|
|
6842
|
-
var
|
|
7077
|
+
var _a;
|
|
6843
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
|
+
}
|
|
6844
7087
|
case "back": {
|
|
6845
7088
|
if (behavior.action) {
|
|
6846
7089
|
onAction(behavior.action, null).then(() => {
|
|
@@ -6875,6 +7118,7 @@ var createFlowController = (props) => {
|
|
|
6875
7118
|
void onAction(action, model);
|
|
6876
7119
|
} else {
|
|
6877
7120
|
rootComponent.setLoadingState("idle");
|
|
7121
|
+
scrollToTop("smooth");
|
|
6878
7122
|
}
|
|
6879
7123
|
} catch (e) {
|
|
6880
7124
|
rootComponent.setLoadingState("idle");
|
|
@@ -6897,7 +7141,7 @@ var createFlowController = (props) => {
|
|
|
6897
7141
|
void onRefresh({ refreshUrl: behavior.url, analytics: behavior.analytics });
|
|
6898
7142
|
return {
|
|
6899
7143
|
abort: () => {
|
|
6900
|
-
|
|
7144
|
+
refreshAbortController.abort();
|
|
6901
7145
|
}
|
|
6902
7146
|
};
|
|
6903
7147
|
}
|
|
@@ -6906,7 +7150,7 @@ var createFlowController = (props) => {
|
|
|
6906
7150
|
break;
|
|
6907
7151
|
}
|
|
6908
7152
|
case "modal": {
|
|
6909
|
-
const currentStep = (
|
|
7153
|
+
const currentStep = (_a = rootComponent.getStep()) == null ? void 0 : _a.step;
|
|
6910
7154
|
if (currentStep) {
|
|
6911
7155
|
rootComponent.showModal(
|
|
6912
7156
|
modalToComponent(
|
|
@@ -6957,14 +7201,14 @@ var createFlowController = (props) => {
|
|
|
6957
7201
|
} };
|
|
6958
7202
|
};
|
|
6959
7203
|
const onAction = async (action, model) => {
|
|
6960
|
-
var
|
|
7204
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
6961
7205
|
try {
|
|
6962
7206
|
rootComponent.setLoadingState("submitting");
|
|
6963
7207
|
const command = await executeSubmission({
|
|
6964
7208
|
action,
|
|
6965
7209
|
model,
|
|
6966
7210
|
isInitial: !rootComponent.hasStep(),
|
|
6967
|
-
requestCache: (_b = (
|
|
7211
|
+
requestCache: (_b = (_a = rootComponent.getStep()) == null ? void 0 : _a.requestCache) != null ? _b : rootComponent.requestCache,
|
|
6968
7212
|
httpClient,
|
|
6969
7213
|
trackEvent,
|
|
6970
7214
|
logEvent
|
|
@@ -6972,7 +7216,7 @@ var createFlowController = (props) => {
|
|
|
6972
7216
|
switch (command.type) {
|
|
6973
7217
|
case "complete": {
|
|
6974
7218
|
onCompletion(command.result);
|
|
6975
|
-
|
|
7219
|
+
trackCoreEvent("Succeeded");
|
|
6976
7220
|
if (features.isEnabled("continueAfterCompletion")) {
|
|
6977
7221
|
rootComponent.setLoadingState("idle");
|
|
6978
7222
|
} else {
|
|
@@ -6984,7 +7228,7 @@ var createFlowController = (props) => {
|
|
|
6984
7228
|
const isFirstStep = !rootComponent.hasStep();
|
|
6985
7229
|
rootComponent.closeSubflow();
|
|
6986
7230
|
createStep(command.step, command.etag);
|
|
6987
|
-
|
|
7231
|
+
trackCoreEvent("Step Shown", { isFirstStep });
|
|
6988
7232
|
break;
|
|
6989
7233
|
}
|
|
6990
7234
|
case "error": {
|
|
@@ -7001,8 +7245,10 @@ var createFlowController = (props) => {
|
|
|
7001
7245
|
// and the model that was submitted
|
|
7002
7246
|
polling: void 0,
|
|
7003
7247
|
// and no polling, to avoid restarting it
|
|
7004
|
-
external: void 0
|
|
7248
|
+
external: void 0,
|
|
7005
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)
|
|
7006
7252
|
}),
|
|
7007
7253
|
(_f = (_e = rootComponent.getStep()) == null ? void 0 : _e.etag) != null ? _f : null
|
|
7008
7254
|
);
|
|
@@ -7041,13 +7287,13 @@ var createFlowController = (props) => {
|
|
|
7041
7287
|
errorsOverride,
|
|
7042
7288
|
analytics
|
|
7043
7289
|
}) => {
|
|
7044
|
-
var
|
|
7290
|
+
var _a, _b, _c;
|
|
7045
7291
|
try {
|
|
7046
7292
|
rootComponent.setLoadingState("refreshing");
|
|
7047
7293
|
const model = rootComponent.getSubmittableValueSync();
|
|
7048
7294
|
const command = await executeRefresh({
|
|
7049
|
-
abortSignal:
|
|
7050
|
-
url: (
|
|
7295
|
+
abortSignal: refreshAbortController.abortAndGetNewSignal(),
|
|
7296
|
+
url: (_a = refreshUrl != null ? refreshUrl : rootComponent.getRefreshUrl()) != null ? _a : "",
|
|
7051
7297
|
model,
|
|
7052
7298
|
etag: (_c = (_b = rootComponent.getStep()) == null ? void 0 : _b.etag) != null ? _c : null,
|
|
7053
7299
|
analytics,
|
|
@@ -7103,14 +7349,14 @@ var createFlowController = (props) => {
|
|
|
7103
7349
|
let initState = "initial";
|
|
7104
7350
|
if (initialStep) {
|
|
7105
7351
|
initState = "created";
|
|
7106
|
-
|
|
7352
|
+
trackCoreEvent("Initiated");
|
|
7107
7353
|
createStep(initialStep, null);
|
|
7108
|
-
|
|
7354
|
+
trackCoreEvent("Step Shown", { isFirstStep: true });
|
|
7109
7355
|
}
|
|
7110
7356
|
const start = () => {
|
|
7111
7357
|
if (initState === "initial" && initialAction) {
|
|
7112
7358
|
initState = "created";
|
|
7113
|
-
|
|
7359
|
+
trackCoreEvent("Initiated");
|
|
7114
7360
|
rootComponent.setLoadingState("submitting");
|
|
7115
7361
|
void onAction(__spreadValues({ method: "GET" }, initialAction), null).then(() => {
|
|
7116
7362
|
initState = "started";
|
|
@@ -7309,6 +7555,26 @@ var multi_file_upload_messages_default = (0, import_react_intl6.defineMessages)(
|
|
|
7309
7555
|
}
|
|
7310
7556
|
});
|
|
7311
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
|
+
|
|
7312
7578
|
// src/renderers/getSchemaErrorMessageFunction.ts
|
|
7313
7579
|
function getSchemaErrorMessageFunction(formatMessage, locale) {
|
|
7314
7580
|
return (validationMessages) => createErrorMessageFunctions(validationMessages != null ? validationMessages : {}, formatMessage, locale);
|
|
@@ -7395,6 +7661,15 @@ var createErrorMessageFunctions = (validationMessages, formatMessage, locale) =>
|
|
|
7395
7661
|
},
|
|
7396
7662
|
genericErrorWithRetry() {
|
|
7397
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);
|
|
7398
7673
|
}
|
|
7399
7674
|
});
|
|
7400
7675
|
var formatDateOptions = {
|
|
@@ -7490,6 +7765,7 @@ var inputComponentToProps = (component, type) => {
|
|
|
7490
7765
|
title,
|
|
7491
7766
|
tags,
|
|
7492
7767
|
validationAsyncState,
|
|
7768
|
+
inlineAlert,
|
|
7493
7769
|
onBlur,
|
|
7494
7770
|
onFocus
|
|
7495
7771
|
} = component;
|
|
@@ -7509,12 +7785,21 @@ var inputComponentToProps = (component, type) => {
|
|
|
7509
7785
|
required,
|
|
7510
7786
|
title,
|
|
7511
7787
|
tags,
|
|
7512
|
-
validationState: getValidationState(errors, validationAsyncState),
|
|
7513
7788
|
value: component.getLocalValue(),
|
|
7789
|
+
validationState: getValidationState(errors, validationAsyncState),
|
|
7790
|
+
inlineAlert,
|
|
7791
|
+
fieldLoadingState: getFieldLoadingState(component),
|
|
7514
7792
|
onBlur: onBlur.bind(component),
|
|
7515
7793
|
onFocus: onFocus.bind(component)
|
|
7516
7794
|
};
|
|
7517
7795
|
};
|
|
7796
|
+
var getFieldLoadingState = (component) => {
|
|
7797
|
+
const { validationAsyncState } = component;
|
|
7798
|
+
if (!validationAsyncState) {
|
|
7799
|
+
return "idle";
|
|
7800
|
+
}
|
|
7801
|
+
return validationAsyncState.loadingState === "pending" ? "validating" : "idle";
|
|
7802
|
+
};
|
|
7518
7803
|
|
|
7519
7804
|
// src/renderers/mappers/booleanInputComponentToProps.ts
|
|
7520
7805
|
var booleanInputComponentToProps = (component, rendererMapperProps) => {
|
|
@@ -7946,13 +8231,10 @@ var paragraphComponentToProps = (component, rendererMapperProps) => __spreadValu
|
|
|
7946
8231
|
|
|
7947
8232
|
// src/renderers/mappers/persistAsyncComponentToProps.ts
|
|
7948
8233
|
var persistAsyncComponentToProps = (component, rendererMapperProps) => {
|
|
7949
|
-
const
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
});
|
|
7954
|
-
}
|
|
7955
|
-
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 } : {});
|
|
7956
8238
|
};
|
|
7957
8239
|
|
|
7958
8240
|
// src/renderers/mappers/progressComponentToProps.ts
|
|
@@ -8488,8 +8770,9 @@ var rootComponentToProps = (rootComponent, rendererMapperProps, nativeSubflowHan
|
|
|
8488
8770
|
return componentToRendererProps(child, rendererMapperProps);
|
|
8489
8771
|
})
|
|
8490
8772
|
];
|
|
8491
|
-
const
|
|
8492
|
-
|
|
8773
|
+
const currentStepSubflow = rootComponent.getSubflow();
|
|
8774
|
+
const subflow = currentStepSubflow ? subflowComponentToRendererProps(
|
|
8775
|
+
currentStepSubflow,
|
|
8493
8776
|
rendererMapperProps,
|
|
8494
8777
|
nativeSubflowHandlers
|
|
8495
8778
|
) : void 0;
|
|
@@ -8573,7 +8856,7 @@ function useDynamicFlow(props) {
|
|
|
8573
8856
|
const onEvent = useStableCallback(props.onEvent);
|
|
8574
8857
|
const onLog = useStableCallback(props.onLog);
|
|
8575
8858
|
const onValueChange = noop2;
|
|
8576
|
-
const { formatMessage, locale } = (0,
|
|
8859
|
+
const { formatMessage, locale } = (0, import_react_intl8.useIntl)();
|
|
8577
8860
|
const getErrorMessageFunctions = (0, import_react3.useMemo)(
|
|
8578
8861
|
() => getSchemaErrorMessageFunction(formatMessage, locale),
|
|
8579
8862
|
[formatMessage, locale]
|