@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.mjs
CHANGED
|
@@ -79,6 +79,9 @@ var cs_default = {
|
|
|
79
79
|
"dynamicFlows.ControlFeedback.patternDate": "Zadejte pros\xEDm datum ve spr\xE1vn\xE9m form\xE1tu.",
|
|
80
80
|
"dynamicFlows.ControlFeedback.required": "Vypl\u0148te pros\xEDm toto pole.",
|
|
81
81
|
"dynamicFlows.ControlFeedback.type": "Nespr\xE1vn\xFD typ",
|
|
82
|
+
"dynamicFlows.DownloadFeedback.failed": "Stahov\xE1n\xED se nezda\u0159ilo",
|
|
83
|
+
"dynamicFlows.DownloadFeedback.started": "Stahov\xE1n\xED...",
|
|
84
|
+
"dynamicFlows.DownloadFeedback.successful": "Stahov\xE1n\xED prob\u011Bhlo \xFAsp\u011B\u0161n\u011B",
|
|
82
85
|
"dynamicFlows.DynamicParagraph.copied": "Zkop\xEDrov\xE1no do schr\xE1nky",
|
|
83
86
|
"dynamicFlows.DynamicParagraph.copy": "Kop\xEDrovat",
|
|
84
87
|
"dynamicFlows.ErrorBoundary.errorAlert": "N\u011Bco se pokazilo.",
|
|
@@ -116,6 +119,9 @@ var de_default = {
|
|
|
116
119
|
"dynamicFlows.ControlFeedback.patternDate": "Bitte gib ein Datum im richtigen Format ein.",
|
|
117
120
|
"dynamicFlows.ControlFeedback.required": "Bitte f\xFClle dieses Feld aus.",
|
|
118
121
|
"dynamicFlows.ControlFeedback.type": "Falscher Typ",
|
|
122
|
+
"dynamicFlows.DownloadFeedback.failed": "Download fehlgeschlagenen",
|
|
123
|
+
"dynamicFlows.DownloadFeedback.started": "Wird heruntergeladen...",
|
|
124
|
+
"dynamicFlows.DownloadFeedback.successful": "Erfolgreich heruntergeladen",
|
|
119
125
|
"dynamicFlows.DynamicParagraph.copied": "In Zwischenablage kopiert",
|
|
120
126
|
"dynamicFlows.DynamicParagraph.copy": "Kopieren",
|
|
121
127
|
"dynamicFlows.ErrorBoundary.errorAlert": "Da ist etwas schiefgegangen.",
|
|
@@ -153,6 +159,9 @@ var en_default = {
|
|
|
153
159
|
"dynamicFlows.ControlFeedback.patternDate": "Please enter a date in the corrrect format.",
|
|
154
160
|
"dynamicFlows.ControlFeedback.required": "Please fill out this field.",
|
|
155
161
|
"dynamicFlows.ControlFeedback.type": "Incorrect type",
|
|
162
|
+
"dynamicFlows.DownloadFeedback.failed": "Download failed",
|
|
163
|
+
"dynamicFlows.DownloadFeedback.started": "Downloading...",
|
|
164
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
156
165
|
"dynamicFlows.DynamicParagraph.copied": "Copied to clipboard",
|
|
157
166
|
"dynamicFlows.DynamicParagraph.copy": "Copy",
|
|
158
167
|
"dynamicFlows.ErrorBoundary.errorAlert": "Something went wrong.",
|
|
@@ -190,6 +199,9 @@ var es_default = {
|
|
|
190
199
|
"dynamicFlows.ControlFeedback.patternDate": "Introduce la fecha en un formato correcto.",
|
|
191
200
|
"dynamicFlows.ControlFeedback.required": "Completa este campo.",
|
|
192
201
|
"dynamicFlows.ControlFeedback.type": "Tipo incorrecto",
|
|
202
|
+
"dynamicFlows.DownloadFeedback.failed": "Descarga fallida",
|
|
203
|
+
"dynamicFlows.DownloadFeedback.started": "Descargando...",
|
|
204
|
+
"dynamicFlows.DownloadFeedback.successful": "Descarga correcta",
|
|
193
205
|
"dynamicFlows.DynamicParagraph.copied": "Copiado al portapapeles",
|
|
194
206
|
"dynamicFlows.DynamicParagraph.copy": "Copiar",
|
|
195
207
|
"dynamicFlows.ErrorBoundary.errorAlert": "Ha habido un error.",
|
|
@@ -227,6 +239,9 @@ var fr_default = {
|
|
|
227
239
|
"dynamicFlows.ControlFeedback.patternDate": "Veuillez saisir une date au format correct.",
|
|
228
240
|
"dynamicFlows.ControlFeedback.required": "Champ obligatoire.",
|
|
229
241
|
"dynamicFlows.ControlFeedback.type": "Type incorrect",
|
|
242
|
+
"dynamicFlows.DownloadFeedback.failed": "\xC9chec du t\xE9l\xE9chargement",
|
|
243
|
+
"dynamicFlows.DownloadFeedback.started": "T\xE9l\xE9chargement...",
|
|
244
|
+
"dynamicFlows.DownloadFeedback.successful": "T\xE9l\xE9chargement r\xE9ussi",
|
|
230
245
|
"dynamicFlows.DynamicParagraph.copied": "Copi\xE9 dans le presse-papier",
|
|
231
246
|
"dynamicFlows.DynamicParagraph.copy": "Copier",
|
|
232
247
|
"dynamicFlows.ErrorBoundary.errorAlert": "Une erreur s'est produite.",
|
|
@@ -264,6 +279,9 @@ var hu_default = {
|
|
|
264
279
|
"dynamicFlows.ControlFeedback.patternDate": "K\xE9r\xFCnk, hogy a d\xE1tumot helyes form\xE1tumban add meg.",
|
|
265
280
|
"dynamicFlows.ControlFeedback.required": "K\xE9r\xFCnk, t\xF6ltsd ki ezt a mez\u0151t.",
|
|
266
281
|
"dynamicFlows.ControlFeedback.type": "Helytelen t\xEDpus",
|
|
282
|
+
"dynamicFlows.DownloadFeedback.failed": "Sikertelen let\xF6lt\xE9s",
|
|
283
|
+
"dynamicFlows.DownloadFeedback.started": "Let\xF6lt\xE9s...",
|
|
284
|
+
"dynamicFlows.DownloadFeedback.successful": "Let\xF6lt\xE9s sikeres",
|
|
267
285
|
"dynamicFlows.DynamicParagraph.copied": "V\xE1g\xF3lapra m\xE1solva",
|
|
268
286
|
"dynamicFlows.DynamicParagraph.copy": "M\xE1sol\xE1s",
|
|
269
287
|
"dynamicFlows.ErrorBoundary.errorAlert": "Valami hiba t\xF6rt\xE9nt.",
|
|
@@ -301,6 +319,9 @@ var id_default = {
|
|
|
301
319
|
"dynamicFlows.ControlFeedback.patternDate": "Harap masukkan tanggal dalam format yang benar.",
|
|
302
320
|
"dynamicFlows.ControlFeedback.required": "Harap isi kolom ini.",
|
|
303
321
|
"dynamicFlows.ControlFeedback.type": "Tipe salah",
|
|
322
|
+
"dynamicFlows.DownloadFeedback.failed": "Pengunduhan gagal",
|
|
323
|
+
"dynamicFlows.DownloadFeedback.started": "Mengunduh...",
|
|
324
|
+
"dynamicFlows.DownloadFeedback.successful": "Pengunduhan berhasil",
|
|
304
325
|
"dynamicFlows.DynamicParagraph.copied": "Disalin ke clipboard",
|
|
305
326
|
"dynamicFlows.DynamicParagraph.copy": "Salin",
|
|
306
327
|
"dynamicFlows.ErrorBoundary.errorAlert": "Terjadi kesalahan.",
|
|
@@ -338,6 +359,9 @@ var it_default = {
|
|
|
338
359
|
"dynamicFlows.ControlFeedback.patternDate": "Inserisci la data in un formato corretto.",
|
|
339
360
|
"dynamicFlows.ControlFeedback.required": "Compila questo campo.",
|
|
340
361
|
"dynamicFlows.ControlFeedback.type": "Tipo errato",
|
|
362
|
+
"dynamicFlows.DownloadFeedback.failed": "Download non riuscito",
|
|
363
|
+
"dynamicFlows.DownloadFeedback.started": "Download in corso...",
|
|
364
|
+
"dynamicFlows.DownloadFeedback.successful": "Download completato",
|
|
341
365
|
"dynamicFlows.DynamicParagraph.copied": "Copiato negli appunti",
|
|
342
366
|
"dynamicFlows.DynamicParagraph.copy": "Copia",
|
|
343
367
|
"dynamicFlows.ErrorBoundary.errorAlert": "Qualcosa non ha funzionato.",
|
|
@@ -375,6 +399,9 @@ var ja_default = {
|
|
|
375
399
|
"dynamicFlows.ControlFeedback.patternDate": "\u6B63\u3057\u3044\u5F62\u5F0F\u3067\u65E5\u4ED8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
376
400
|
"dynamicFlows.ControlFeedback.required": "\u3053\u306E\u9805\u76EE\u306F\u5165\u529B\u5FC5\u9808\u3067\u3059\u3002",
|
|
377
401
|
"dynamicFlows.ControlFeedback.type": "\u4E0D\u6B63\u306A\u30BF\u30A4\u30D7",
|
|
402
|
+
"dynamicFlows.DownloadFeedback.failed": "\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
403
|
+
"dynamicFlows.DownloadFeedback.started": "\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u4E2D...",
|
|
404
|
+
"dynamicFlows.DownloadFeedback.successful": "\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F",
|
|
378
405
|
"dynamicFlows.DynamicParagraph.copied": "\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u3078\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",
|
|
379
406
|
"dynamicFlows.DynamicParagraph.copy": "\u30B3\u30D4\u30FC\u3059\u308B",
|
|
380
407
|
"dynamicFlows.ErrorBoundary.errorAlert": "\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002",
|
|
@@ -412,6 +439,9 @@ var nl_default = {
|
|
|
412
439
|
"dynamicFlows.ControlFeedback.patternDate": "Voer een datum in de juiste indeling in.",
|
|
413
440
|
"dynamicFlows.ControlFeedback.required": "Vul dit veld in.",
|
|
414
441
|
"dynamicFlows.ControlFeedback.type": "Onjuist type",
|
|
442
|
+
"dynamicFlows.DownloadFeedback.failed": "Downloaden mislukt",
|
|
443
|
+
"dynamicFlows.DownloadFeedback.started": "Downloaden...",
|
|
444
|
+
"dynamicFlows.DownloadFeedback.successful": "Download gelukt",
|
|
415
445
|
"dynamicFlows.DynamicParagraph.copied": "Naar klembord gekopieerd",
|
|
416
446
|
"dynamicFlows.DynamicParagraph.copy": "Kopi\xEBren",
|
|
417
447
|
"dynamicFlows.ErrorBoundary.errorAlert": "Er is iets misgegaan.",
|
|
@@ -449,6 +479,9 @@ var pl_default = {
|
|
|
449
479
|
"dynamicFlows.ControlFeedback.patternDate": "Wprowad\u017A dat\u0119 w prawid\u0142owym formacie.",
|
|
450
480
|
"dynamicFlows.ControlFeedback.required": "Prosz\u0119 wype\u0142ni\u0107 to pole.",
|
|
451
481
|
"dynamicFlows.ControlFeedback.type": "Nieprawid\u0142owy typ",
|
|
482
|
+
"dynamicFlows.DownloadFeedback.failed": "Pobieranie nieudane",
|
|
483
|
+
"dynamicFlows.DownloadFeedback.started": "Pobieranie...",
|
|
484
|
+
"dynamicFlows.DownloadFeedback.successful": "Pobieranie zako\u0144czone powodzeniem",
|
|
452
485
|
"dynamicFlows.DynamicParagraph.copied": "Skopiowano do schowka",
|
|
453
486
|
"dynamicFlows.DynamicParagraph.copy": "Kopiuj",
|
|
454
487
|
"dynamicFlows.ErrorBoundary.errorAlert": "Co\u015B posz\u0142o nie tak.",
|
|
@@ -486,6 +519,9 @@ var pt_default = {
|
|
|
486
519
|
"dynamicFlows.ControlFeedback.patternDate": "Por favor, insira a data no formato correto.",
|
|
487
520
|
"dynamicFlows.ControlFeedback.required": "Por favor, preencha o campo.",
|
|
488
521
|
"dynamicFlows.ControlFeedback.type": "Tipo incorreto",
|
|
522
|
+
"dynamicFlows.DownloadFeedback.failed": "Falha no envio",
|
|
523
|
+
"dynamicFlows.DownloadFeedback.started": "Baixando...",
|
|
524
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
489
525
|
"dynamicFlows.DynamicParagraph.copied": "Copiado",
|
|
490
526
|
"dynamicFlows.DynamicParagraph.copy": "Copiar",
|
|
491
527
|
"dynamicFlows.ErrorBoundary.errorAlert": "Algo deu errado.",
|
|
@@ -523,6 +559,9 @@ var ro_default = {
|
|
|
523
559
|
"dynamicFlows.ControlFeedback.patternDate": "Te rug\u0103m s\u0103 introduci o dat\u0103 \xEEn formatul corect.",
|
|
524
560
|
"dynamicFlows.ControlFeedback.required": "Te rug\u0103m s\u0103 completezi acest spa\u021Biu.",
|
|
525
561
|
"dynamicFlows.ControlFeedback.type": "Tip incorect",
|
|
562
|
+
"dynamicFlows.DownloadFeedback.failed": "Desc\u0103rcare e\u0219uat\u0103",
|
|
563
|
+
"dynamicFlows.DownloadFeedback.started": "Se descarc\u0103...",
|
|
564
|
+
"dynamicFlows.DownloadFeedback.successful": "Desc\u0103rcare reu\u0219it\u0103",
|
|
526
565
|
"dynamicFlows.DynamicParagraph.copied": "Copiat \xEEn clipboard",
|
|
527
566
|
"dynamicFlows.DynamicParagraph.copy": "Copiaz\u0103",
|
|
528
567
|
"dynamicFlows.ErrorBoundary.errorAlert": "Ceva nu a mers bine.",
|
|
@@ -560,6 +599,9 @@ var ru_default = {
|
|
|
560
599
|
"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.",
|
|
561
600
|
"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.",
|
|
562
601
|
"dynamicFlows.ControlFeedback.type": "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0442\u0438\u043F",
|
|
602
|
+
"dynamicFlows.DownloadFeedback.failed": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u0430\u0447\u0430\u0442\u044C",
|
|
603
|
+
"dynamicFlows.DownloadFeedback.started": "\u0421\u043A\u0430\u0447\u0438\u0432\u0430\u043D\u0438\u0435...",
|
|
604
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
563
605
|
"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",
|
|
564
606
|
"dynamicFlows.DynamicParagraph.copy": "\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C",
|
|
565
607
|
"dynamicFlows.ErrorBoundary.errorAlert": "\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A.",
|
|
@@ -597,6 +639,9 @@ var th_default = {
|
|
|
597
639
|
"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",
|
|
598
640
|
"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",
|
|
599
641
|
"dynamicFlows.ControlFeedback.type": "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
642
|
+
"dynamicFlows.DownloadFeedback.failed": "\u0E14\u0E32\u0E27\u0E19\u0E4C\u0E42\u0E2B\u0E25\u0E14\u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27",
|
|
643
|
+
"dynamicFlows.DownloadFeedback.started": "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E14\u0E32\u0E27\u0E19\u0E4C\u0E42\u0E2B\u0E25\u0E14...",
|
|
644
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
600
645
|
"dynamicFlows.DynamicParagraph.copied": "\u0E04\u0E31\u0E14\u0E25\u0E2D\u0E01\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E04\u0E25\u0E34\u0E1B\u0E1A\u0E2D\u0E23\u0E4C\u0E14",
|
|
601
646
|
"dynamicFlows.DynamicParagraph.copy": "\u0E04\u0E31\u0E14\u0E25\u0E2D\u0E01",
|
|
602
647
|
"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",
|
|
@@ -634,6 +679,9 @@ var tr_default = {
|
|
|
634
679
|
"dynamicFlows.ControlFeedback.patternDate": "L\xFCtfen tarihi do\u011Fru bi\xE7imde girin.",
|
|
635
680
|
"dynamicFlows.ControlFeedback.required": "L\xFCtfen bu alan\u0131 doldurun.",
|
|
636
681
|
"dynamicFlows.ControlFeedback.type": "Ge\xE7ersiz se\xE7im",
|
|
682
|
+
"dynamicFlows.DownloadFeedback.failed": "\u0130ndirme ba\u015Far\u0131s\u0131z",
|
|
683
|
+
"dynamicFlows.DownloadFeedback.started": "\u0130ndiriliyor...",
|
|
684
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
637
685
|
"dynamicFlows.DynamicParagraph.copied": "Panoya kopyaland\u0131",
|
|
638
686
|
"dynamicFlows.DynamicParagraph.copy": "Kopyala",
|
|
639
687
|
"dynamicFlows.ErrorBoundary.errorAlert": "Bir sorun olu\u015Ftu.",
|
|
@@ -671,6 +719,9 @@ var zh_CN_default = {
|
|
|
671
719
|
"dynamicFlows.ControlFeedback.patternDate": "\u8BF7\u4EE5\u6B63\u786E\u7684\u683C\u5F0F\u8F93\u5165\u65E5\u671F",
|
|
672
720
|
"dynamicFlows.ControlFeedback.required": "\u8BF7\u586B\u5199\u6B64\u5B57\u6BB5\u3002",
|
|
673
721
|
"dynamicFlows.ControlFeedback.type": "\u7C7B\u578B\u9519\u8BEF",
|
|
722
|
+
"dynamicFlows.DownloadFeedback.failed": "\u4E0B\u8F7D\u5931\u8D25",
|
|
723
|
+
"dynamicFlows.DownloadFeedback.started": "\u6B63\u5728\u4E0B\u8F7D...",
|
|
724
|
+
"dynamicFlows.DownloadFeedback.successful": "Download successful",
|
|
674
725
|
"dynamicFlows.DynamicParagraph.copied": "\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F",
|
|
675
726
|
"dynamicFlows.DynamicParagraph.copy": "\u590D\u5236",
|
|
676
727
|
"dynamicFlows.ErrorBoundary.errorAlert": "\u51FA\u9519\u4E86\u3002",
|
|
@@ -708,6 +759,9 @@ var zh_HK_default = {
|
|
|
708
759
|
"dynamicFlows.ControlFeedback.patternDate": "\u8ACB\u4EE5\u6B63\u78BA\u683C\u5F0F\u8F38\u5165\u65E5\u671F\u3002",
|
|
709
760
|
"dynamicFlows.ControlFeedback.required": "\u8ACB\u586B\u5BEB\u6B64\u6B04\u4F4D\u3002",
|
|
710
761
|
"dynamicFlows.ControlFeedback.type": "\u932F\u8AA4\u7684\u985E\u578B",
|
|
762
|
+
"dynamicFlows.DownloadFeedback.failed": "\u4E0B\u8F09\u5931\u6557",
|
|
763
|
+
"dynamicFlows.DownloadFeedback.started": "\u4E0B\u8F09\u4E2D...",
|
|
764
|
+
"dynamicFlows.DownloadFeedback.successful": "\u4E0B\u8F09\u6210\u529F",
|
|
711
765
|
"dynamicFlows.DynamicParagraph.copied": "\u8907\u88FD\u5230\u526A\u8CBC\u677F",
|
|
712
766
|
"dynamicFlows.DynamicParagraph.copy": "\u8907\u88FD",
|
|
713
767
|
"dynamicFlows.ErrorBoundary.errorAlert": "\u51FA\u4E86\u4E9B\u554F\u984C\u3002",
|
|
@@ -969,7 +1023,6 @@ var createRootDomainComponent = (onComponentUpdate, scrollToTop, backConfig, req
|
|
|
969
1023
|
kind: "step",
|
|
970
1024
|
uid: "root",
|
|
971
1025
|
stepComponent: null,
|
|
972
|
-
subflow: null,
|
|
973
1026
|
stepStack: [],
|
|
974
1027
|
backConfig,
|
|
975
1028
|
requestCache,
|
|
@@ -1036,17 +1089,16 @@ var createRootDomainComponent = (onComponentUpdate, scrollToTop, backConfig, req
|
|
|
1036
1089
|
return (_a = this.stepStack[this.stepStack.length - 1]) != null ? _a : null;
|
|
1037
1090
|
},
|
|
1038
1091
|
addSubflow(subflow) {
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
});
|
|
1092
|
+
var _a;
|
|
1093
|
+
(_a = this.getStep()) == null ? void 0 : _a.addSubflow(subflow);
|
|
1042
1094
|
},
|
|
1043
1095
|
closeSubflow() {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1096
|
+
var _a;
|
|
1097
|
+
(_a = this.getStep()) == null ? void 0 : _a.closeSubflow();
|
|
1098
|
+
},
|
|
1099
|
+
getSubflow() {
|
|
1100
|
+
var _a, _b;
|
|
1101
|
+
return (_b = (_a = this.getStep()) == null ? void 0 : _a.subflow) != null ? _b : null;
|
|
1050
1102
|
},
|
|
1051
1103
|
start() {
|
|
1052
1104
|
var _a;
|
|
@@ -2568,15 +2620,17 @@ var getLocalValues = (components) => components.map((component) => component.get
|
|
|
2568
2620
|
|
|
2569
2621
|
// src/domain/components/step/StepDomainComponent.ts
|
|
2570
2622
|
var createStepComponent = (stepProps) => {
|
|
2571
|
-
const _a = stepProps, { uid, stepPolling, stepRefreshAfter, stepPrefetch, onComponentUpdate } = _a, rest = __objRest(_a, ["uid", "stepPolling", "stepRefreshAfter", "stepPrefetch", "onComponentUpdate"]);
|
|
2623
|
+
const _a = stepProps, { uid, stepPolling, stepRefreshAfter, stepPrefetch, onComponentUpdate, onLoad } = _a, rest = __objRest(_a, ["uid", "stepPolling", "stepRefreshAfter", "stepPrefetch", "onComponentUpdate", "onLoad"]);
|
|
2572
2624
|
const update = getInputUpdateFunction(onComponentUpdate);
|
|
2573
2625
|
const component = __spreadProps(__spreadValues({
|
|
2574
2626
|
uid
|
|
2575
2627
|
}, rest), {
|
|
2576
2628
|
type: "step",
|
|
2577
2629
|
kind: "step",
|
|
2630
|
+
state: "initial",
|
|
2578
2631
|
modals: [],
|
|
2579
2632
|
requestCache: stepPrefetch.requestCache,
|
|
2633
|
+
subflow: null,
|
|
2580
2634
|
dismissModal() {
|
|
2581
2635
|
var _a2;
|
|
2582
2636
|
(_a2 = this.modals.at(-1)) == null ? void 0 : _a2.close();
|
|
@@ -2622,7 +2676,26 @@ var createStepComponent = (stepProps) => {
|
|
|
2622
2676
|
draft.loadingState = loadingState;
|
|
2623
2677
|
});
|
|
2624
2678
|
},
|
|
2679
|
+
addSubflow(subflow) {
|
|
2680
|
+
this._update((draft) => {
|
|
2681
|
+
draft.subflow = subflow;
|
|
2682
|
+
});
|
|
2683
|
+
},
|
|
2684
|
+
closeSubflow() {
|
|
2685
|
+
if (!this.subflow) {
|
|
2686
|
+
return;
|
|
2687
|
+
}
|
|
2688
|
+
this._update((draft) => {
|
|
2689
|
+
draft.subflow = null;
|
|
2690
|
+
});
|
|
2691
|
+
},
|
|
2625
2692
|
start() {
|
|
2693
|
+
if (this.state === "initial") {
|
|
2694
|
+
onLoad == null ? void 0 : onLoad();
|
|
2695
|
+
}
|
|
2696
|
+
this._update((draft) => {
|
|
2697
|
+
draft.state = "started";
|
|
2698
|
+
});
|
|
2626
2699
|
stepPolling == null ? void 0 : stepPolling.start();
|
|
2627
2700
|
stepRefreshAfter == null ? void 0 : stepRefreshAfter.start();
|
|
2628
2701
|
stepPrefetch.start(this.getSubmittableValueSync());
|
|
@@ -2632,6 +2705,7 @@ var createStepComponent = (stepProps) => {
|
|
|
2632
2705
|
stepRefreshAfter == null ? void 0 : stepRefreshAfter.stop();
|
|
2633
2706
|
stepPrefetch.stop();
|
|
2634
2707
|
this._update((draft) => {
|
|
2708
|
+
draft.state = "stopped";
|
|
2635
2709
|
draft.modals = [];
|
|
2636
2710
|
});
|
|
2637
2711
|
}
|
|
@@ -2833,7 +2907,7 @@ var makeSafeHttpClient = (httpClient) => async (...props) => {
|
|
|
2833
2907
|
|
|
2834
2908
|
// src/controller/executeRequest.ts
|
|
2835
2909
|
var executeRequest = async (props) => {
|
|
2836
|
-
const { exit, request, requestCache, httpClient, trackEvent, logEvent } = props;
|
|
2910
|
+
const { isInitial, exit, request, requestCache, httpClient, trackEvent, logEvent } = props;
|
|
2837
2911
|
const { url, method, body } = request;
|
|
2838
2912
|
const response = await getCachedOrFetch(
|
|
2839
2913
|
[
|
|
@@ -2882,18 +2956,24 @@ var executeRequest = async (props) => {
|
|
|
2882
2956
|
}
|
|
2883
2957
|
case "subflow": {
|
|
2884
2958
|
assertSubflowResponseBody(responseBody);
|
|
2885
|
-
return {
|
|
2959
|
+
return !isInitial ? {
|
|
2886
2960
|
type: "behavior",
|
|
2887
2961
|
behavior: __spreadProps(__spreadValues({}, responseBody), {
|
|
2888
2962
|
type: "subflow",
|
|
2889
2963
|
onCompletion: responseBody.onCompletion ? normaliseBehavior(responseBody.onCompletion, []) : void 0,
|
|
2890
2964
|
onError: responseBody.onError ? normaliseBehavior(responseBody.onError, []) : void 0
|
|
2891
2965
|
})
|
|
2966
|
+
} : {
|
|
2967
|
+
type: "error",
|
|
2968
|
+
body: { errors: { error: "Cannot start subflow without a current step" } }
|
|
2892
2969
|
};
|
|
2893
2970
|
}
|
|
2894
2971
|
case "modal": {
|
|
2895
2972
|
assertModalResponseBody(responseBody);
|
|
2896
|
-
return { type: "behavior", behavior: __spreadProps(__spreadValues({}, responseBody), { type: "modal" }) }
|
|
2973
|
+
return !isInitial ? { type: "behavior", behavior: __spreadProps(__spreadValues({}, responseBody), { type: "modal" }) } : {
|
|
2974
|
+
type: "error",
|
|
2975
|
+
body: { errors: { error: "Cannot show modal without a current step" } }
|
|
2976
|
+
};
|
|
2897
2977
|
}
|
|
2898
2978
|
case "no-op": {
|
|
2899
2979
|
return { type: "no-op" };
|
|
@@ -2929,6 +3009,7 @@ var executeSubmission = async (props) => {
|
|
|
2929
3009
|
}
|
|
2930
3010
|
try {
|
|
2931
3011
|
const command = await executeRequest({
|
|
3012
|
+
isInitial,
|
|
2932
3013
|
exit,
|
|
2933
3014
|
request: createRequestFromAction(action, model),
|
|
2934
3015
|
requestCache,
|
|
@@ -3166,7 +3247,8 @@ var getComponentValidationAsync = (update, performValidationAsync) => (
|
|
|
3166
3247
|
draft.validationAsyncState = {
|
|
3167
3248
|
abortController: newAbortController,
|
|
3168
3249
|
lastSubmitted: currentValue,
|
|
3169
|
-
messages: {}
|
|
3250
|
+
messages: {},
|
|
3251
|
+
loadingState: "idle"
|
|
3170
3252
|
};
|
|
3171
3253
|
});
|
|
3172
3254
|
return;
|
|
@@ -3177,6 +3259,7 @@ var getComponentValidationAsync = (update, performValidationAsync) => (
|
|
|
3177
3259
|
if (message) {
|
|
3178
3260
|
draft.validationAsyncState.messages.success = message;
|
|
3179
3261
|
}
|
|
3262
|
+
draft.validationAsyncState.loadingState = "idle";
|
|
3180
3263
|
});
|
|
3181
3264
|
return message;
|
|
3182
3265
|
}).catch((error) => {
|
|
@@ -3185,13 +3268,15 @@ var getComponentValidationAsync = (update, performValidationAsync) => (
|
|
|
3185
3268
|
}
|
|
3186
3269
|
update(component, (draft) => {
|
|
3187
3270
|
draft.validationAsyncState.messages.error = error.message;
|
|
3271
|
+
draft.validationAsyncState.loadingState = "idle";
|
|
3188
3272
|
});
|
|
3189
3273
|
});
|
|
3190
3274
|
update(component, (draft) => {
|
|
3191
3275
|
draft.validationAsyncState = {
|
|
3192
3276
|
abortController: newAbortController,
|
|
3193
3277
|
lastSubmitted: currentValue,
|
|
3194
|
-
messages: {}
|
|
3278
|
+
messages: {},
|
|
3279
|
+
loadingState: "pending"
|
|
3195
3280
|
};
|
|
3196
3281
|
});
|
|
3197
3282
|
return newSubmission;
|
|
@@ -3294,22 +3379,23 @@ var getSchemaOnChange = (schema, onBehavior) => {
|
|
|
3294
3379
|
return void 0;
|
|
3295
3380
|
};
|
|
3296
3381
|
var getBehaviorFromSchemaOnChange = (schema) => {
|
|
3382
|
+
var _a;
|
|
3297
3383
|
if ("onChange" in schema && schema.onChange) {
|
|
3298
3384
|
const { $id, analyticsId, onChange } = schema;
|
|
3299
3385
|
const behavior = __spreadProps(__spreadValues({}, normaliseBehavior(onChange, [])), {
|
|
3300
|
-
analytics: { schema: analyticsId != null ? analyticsId : $id }
|
|
3386
|
+
analytics: { schema: (_a = analyticsId != null ? analyticsId : $id) != null ? _a : "" }
|
|
3301
3387
|
});
|
|
3302
3388
|
return behavior;
|
|
3303
3389
|
}
|
|
3304
3390
|
return void 0;
|
|
3305
3391
|
};
|
|
3306
3392
|
var getBehaviorFromSchemaRefreshStepOnChange = (schema) => {
|
|
3307
|
-
var _a, _b;
|
|
3393
|
+
var _a, _b, _c;
|
|
3308
3394
|
if ("refreshStepOnChange" in schema && ((_a = schema.refreshStepOnChange) != null ? _a : false) || "refreshFormOnChange" in schema && ((_b = schema.refreshFormOnChange) != null ? _b : false)) {
|
|
3309
3395
|
const { $id, analyticsId, refreshUrl, refreshFormUrl } = schema;
|
|
3310
3396
|
const behavior = {
|
|
3311
3397
|
type: "refresh",
|
|
3312
|
-
analytics: { schema: analyticsId != null ? analyticsId : $id },
|
|
3398
|
+
analytics: { schema: (_c = analyticsId != null ? analyticsId : $id) != null ? _c : "" },
|
|
3313
3399
|
url: refreshUrl != null ? refreshUrl : refreshFormUrl
|
|
3314
3400
|
};
|
|
3315
3401
|
return behavior;
|
|
@@ -3541,7 +3627,8 @@ var autocompleteTokenMap = {
|
|
|
3541
3627
|
var getInitialValidationAsyncState = () => ({
|
|
3542
3628
|
abortController: new AbortController(),
|
|
3543
3629
|
lastSubmitted: null,
|
|
3544
|
-
messages: {}
|
|
3630
|
+
messages: {},
|
|
3631
|
+
loadingState: "idle"
|
|
3545
3632
|
});
|
|
3546
3633
|
|
|
3547
3634
|
// src/domain/features/utils/response-utils.ts
|
|
@@ -3561,10 +3648,9 @@ var getPerformValidationAsync = ({
|
|
|
3561
3648
|
trackEvent
|
|
3562
3649
|
}) => {
|
|
3563
3650
|
const { method, param, url } = validationAsyncConfig;
|
|
3564
|
-
const
|
|
3651
|
+
const trackFailure = (json) => {
|
|
3565
3652
|
const analytics = getAnalyticsFromErrorResponse(json);
|
|
3566
3653
|
trackEvent("ValidationAsync Failed", __spreadValues({ schema: schemaId }, analytics));
|
|
3567
|
-
return null;
|
|
3568
3654
|
};
|
|
3569
3655
|
return async function performValidationAsync({ value, signal }) {
|
|
3570
3656
|
let response;
|
|
@@ -3574,8 +3660,9 @@ var getPerformValidationAsync = ({
|
|
|
3574
3660
|
url,
|
|
3575
3661
|
constructPayload({ value, signal, requestConfig: { method, param } })
|
|
3576
3662
|
);
|
|
3577
|
-
} catch (
|
|
3578
|
-
|
|
3663
|
+
} catch (error) {
|
|
3664
|
+
trackFailure();
|
|
3665
|
+
throw error;
|
|
3579
3666
|
}
|
|
3580
3667
|
const json = await response.json().catch(() => null);
|
|
3581
3668
|
const message = getValidationMessage(json);
|
|
@@ -3589,7 +3676,8 @@ var getPerformValidationAsync = ({
|
|
|
3589
3676
|
throw new Error(message);
|
|
3590
3677
|
}
|
|
3591
3678
|
}
|
|
3592
|
-
|
|
3679
|
+
trackFailure(json);
|
|
3680
|
+
return null;
|
|
3593
3681
|
};
|
|
3594
3682
|
};
|
|
3595
3683
|
var getValidationMessage = (json) => {
|
|
@@ -3686,7 +3774,7 @@ var mapCommonSchemaProps = (schemaMapperProps) => {
|
|
|
3686
3774
|
title,
|
|
3687
3775
|
hidden
|
|
3688
3776
|
} = schema;
|
|
3689
|
-
return __spreadValues(__spreadValues(__spreadValues({
|
|
3777
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
3690
3778
|
uid,
|
|
3691
3779
|
id: $id != null ? $id : uid,
|
|
3692
3780
|
schemaId,
|
|
@@ -3703,7 +3791,7 @@ var mapCommonSchemaProps = (schemaMapperProps) => {
|
|
|
3703
3791
|
title,
|
|
3704
3792
|
onPersistAsync,
|
|
3705
3793
|
summariser: getSummariser(schema)
|
|
3706
|
-
}, schemaHasHelp(schema) ? { help: schema.help.markdown } : {}), schemaHasPlaceholder(schema) ? { placeholder: schema.placeholder } : {}), schema.alert ? { alert: mapSchemaAlert(schema.alert) } : {});
|
|
3794
|
+
}, schemaHasHelp(schema) ? { help: schema.help.markdown } : {}), schemaHasPlaceholder(schema) ? { placeholder: schema.placeholder } : {}), schema.alert ? { alert: mapSchemaAlert(schema.alert) } : {}), schema.inlineAlert ? { inlineAlert: mapInlineAlert(schema.inlineAlert) } : {});
|
|
3707
3795
|
};
|
|
3708
3796
|
var schemaHasDisabled = (schema) => Boolean("disabled" in schema && schema.disabled !== void 0);
|
|
3709
3797
|
var schemaHasHelp = (schema) => Boolean("help" in schema && schema.help);
|
|
@@ -5634,6 +5722,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5634
5722
|
schemaId,
|
|
5635
5723
|
component,
|
|
5636
5724
|
hidden,
|
|
5725
|
+
status: "idle",
|
|
5637
5726
|
lastSubmitted: model != null ? localValue != null ? localValue : null : null,
|
|
5638
5727
|
lastResponse: model != null ? model : null,
|
|
5639
5728
|
submission: Promise.resolve(model != null ? model : null),
|
|
@@ -5672,6 +5761,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5672
5761
|
draft.lastSubmitted = childLocalValue;
|
|
5673
5762
|
draft.submission = resolvedNull;
|
|
5674
5763
|
draft.errors = [];
|
|
5764
|
+
draft.status = "idle";
|
|
5675
5765
|
});
|
|
5676
5766
|
void (schemaOnChange == null ? void 0 : schemaOnChange());
|
|
5677
5767
|
return resolvedNull;
|
|
@@ -5681,6 +5771,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5681
5771
|
this._update((draft) => {
|
|
5682
5772
|
draft.lastResponse = token;
|
|
5683
5773
|
draft.errors = [];
|
|
5774
|
+
draft.status = "success";
|
|
5684
5775
|
});
|
|
5685
5776
|
void (schemaOnChange == null ? void 0 : schemaOnChange());
|
|
5686
5777
|
return token;
|
|
@@ -5692,6 +5783,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5692
5783
|
draft.lastResponse = null;
|
|
5693
5784
|
draft.lastSubmitted = null;
|
|
5694
5785
|
draft.submission = Promise.resolve(null);
|
|
5786
|
+
draft.status = "error";
|
|
5695
5787
|
if (this.component.type !== "upload") {
|
|
5696
5788
|
draft.errors = error instanceof Error ? [error.message] : [];
|
|
5697
5789
|
}
|
|
@@ -5704,6 +5796,7 @@ var createPersistAsyncComponent = (props, performPersistAsync, schemaOnChange, o
|
|
|
5704
5796
|
draft.lastResponse = null;
|
|
5705
5797
|
draft.submission = newSubmission;
|
|
5706
5798
|
draft.errors = [];
|
|
5799
|
+
draft.status = "persisting";
|
|
5707
5800
|
});
|
|
5708
5801
|
return newSubmission;
|
|
5709
5802
|
}
|
|
@@ -6272,7 +6365,7 @@ var mapStepToComponent = (_a) => {
|
|
|
6272
6365
|
"onPoll",
|
|
6273
6366
|
"onBehavior"
|
|
6274
6367
|
]);
|
|
6275
|
-
var _a2;
|
|
6368
|
+
var _a2, _b2;
|
|
6276
6369
|
const { etag, step, stepLocalValue, flowRequestCache, logEvent, onComponentUpdate } = restProps;
|
|
6277
6370
|
const {
|
|
6278
6371
|
id,
|
|
@@ -6291,6 +6384,12 @@ var mapStepToComponent = (_a) => {
|
|
|
6291
6384
|
const registerSubmissionBehavior = (behavior) => {
|
|
6292
6385
|
submissionBehaviors.push(behavior);
|
|
6293
6386
|
};
|
|
6387
|
+
const mapperProps = __spreadProps(__spreadValues({}, restProps), {
|
|
6388
|
+
features,
|
|
6389
|
+
trackEvent,
|
|
6390
|
+
onBehavior,
|
|
6391
|
+
registerSubmissionBehavior
|
|
6392
|
+
});
|
|
6294
6393
|
const back = mapBackNavigation(navigation, onBehavior, features.isEnabled("nativeBack"));
|
|
6295
6394
|
const stepId = id || key;
|
|
6296
6395
|
if (stepId === void 0) {
|
|
@@ -6306,18 +6405,15 @@ var mapStepToComponent = (_a) => {
|
|
|
6306
6405
|
}) : void 0;
|
|
6307
6406
|
const stepRefreshAfter = refreshAfter ? getStepRefreshAfter({ refreshAfter, logEvent, onBehavior }) : void 0;
|
|
6308
6407
|
const stepPrefetch = getStepPrefetch(restProps.httpClient, flowRequestCache, submissionBehaviors);
|
|
6309
|
-
const
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
restProps.onLink,
|
|
6313
|
-
onComponentUpdate
|
|
6314
|
-
) : void 0;
|
|
6315
|
-
const mapperProps = __spreadProps(__spreadValues({}, restProps), {
|
|
6316
|
-
features,
|
|
6317
|
-
trackEvent,
|
|
6318
|
-
onBehavior,
|
|
6408
|
+
const onLoadBehavior = getDomainLayerBehavior(
|
|
6409
|
+
{ behavior: step.onLoad },
|
|
6410
|
+
(_a2 = step.actions) != null ? _a2 : [],
|
|
6319
6411
|
registerSubmissionBehavior
|
|
6320
|
-
|
|
6412
|
+
);
|
|
6413
|
+
const stepOnLoad = onLoadBehavior && onLoadBehavior.type !== "link" ? () => {
|
|
6414
|
+
void onBehavior(onLoadBehavior);
|
|
6415
|
+
} : void 0;
|
|
6416
|
+
const externalConfirmation = getExternalConfiguration(uid, external, onLoadBehavior, mapperProps);
|
|
6321
6417
|
const referencedSchemaIds = getReferencedSchemaId(step);
|
|
6322
6418
|
const schemaComponents = mapStepSchemas(uid, step, stepLocalValue, mapperProps);
|
|
6323
6419
|
const { layout, footer } = getLayoutAndFooter(step, features);
|
|
@@ -6345,13 +6441,14 @@ var mapStepToComponent = (_a) => {
|
|
|
6345
6441
|
stepRefreshAfter,
|
|
6346
6442
|
title,
|
|
6347
6443
|
tags,
|
|
6348
|
-
stackBehavior: (
|
|
6444
|
+
stackBehavior: (_b2 = navigation == null ? void 0 : navigation.stackBehavior) != null ? _b2 : "default",
|
|
6349
6445
|
stepPrefetch,
|
|
6350
6446
|
step,
|
|
6351
6447
|
referencedSchemaIds,
|
|
6352
6448
|
onComponentUpdate,
|
|
6353
6449
|
trackEvent,
|
|
6354
|
-
onBehavior
|
|
6450
|
+
onBehavior,
|
|
6451
|
+
onLoad: stepOnLoad
|
|
6355
6452
|
});
|
|
6356
6453
|
return stepComponent;
|
|
6357
6454
|
};
|
|
@@ -6373,6 +6470,25 @@ var mapBackNavigation = (navigation, onBehavior, isNativeBackEnabled) => {
|
|
|
6373
6470
|
}
|
|
6374
6471
|
} : void 0;
|
|
6375
6472
|
};
|
|
6473
|
+
var getExternalConfiguration = (uid, external, onLoad, mapperProps) => {
|
|
6474
|
+
if (onLoad.type === "link") {
|
|
6475
|
+
return createExternalConfirmation(
|
|
6476
|
+
`${uid}-external-confirmation`,
|
|
6477
|
+
onLoad == null ? void 0 : onLoad.url,
|
|
6478
|
+
mapperProps.onLink,
|
|
6479
|
+
mapperProps.onComponentUpdate
|
|
6480
|
+
);
|
|
6481
|
+
}
|
|
6482
|
+
if ((external == null ? void 0 : external.url) && onLoad.type === "none") {
|
|
6483
|
+
return createExternalConfirmation(
|
|
6484
|
+
`${uid}-external-confirmation`,
|
|
6485
|
+
external == null ? void 0 : external.url,
|
|
6486
|
+
mapperProps.onLink,
|
|
6487
|
+
mapperProps.onComponentUpdate
|
|
6488
|
+
);
|
|
6489
|
+
}
|
|
6490
|
+
return void 0;
|
|
6491
|
+
};
|
|
6376
6492
|
var getLayoutAndFooter = (step, features) => {
|
|
6377
6493
|
var _a;
|
|
6378
6494
|
if (step.footer) {
|
|
@@ -6403,6 +6519,135 @@ var validateStepTypes = (step, logEvent) => {
|
|
|
6403
6519
|
}
|
|
6404
6520
|
};
|
|
6405
6521
|
|
|
6522
|
+
// src/controller/getFilenameFromContentDisposition.ts
|
|
6523
|
+
var getFilenameFromContentDisposition = (contentDisposition) => {
|
|
6524
|
+
var _a;
|
|
6525
|
+
if (!contentDisposition) {
|
|
6526
|
+
return "";
|
|
6527
|
+
}
|
|
6528
|
+
const parameters = getFilenames(contentDisposition);
|
|
6529
|
+
const { filename, filenameStar } = parameters;
|
|
6530
|
+
const decodedFilename = decodeFilename(filenameStar);
|
|
6531
|
+
return extractBasename((_a = decodedFilename != null ? decodedFilename : filename) != null ? _a : "");
|
|
6532
|
+
};
|
|
6533
|
+
var filenameRegex = /;\s*(filename\*?)\s*=\s*("[^"]*"|[^;]*)/gi;
|
|
6534
|
+
var getFilenames = (contentDisposition) => {
|
|
6535
|
+
var _a, _b;
|
|
6536
|
+
const params = Array.from(contentDisposition.matchAll(filenameRegex)).map((match) => {
|
|
6537
|
+
var _a2, _b2, _c;
|
|
6538
|
+
return [(_a2 = match[1]) == null ? void 0 : _a2.toLowerCase(), removeQuotes((_c = (_b2 = match[2]) == null ? void 0 : _b2.trim()) != null ? _c : "") || void 0];
|
|
6539
|
+
});
|
|
6540
|
+
return {
|
|
6541
|
+
filename: (_a = params.find(([key]) => key === "filename")) == null ? void 0 : _a[1],
|
|
6542
|
+
filenameStar: (_b = params.find(([key]) => key === "filename*")) == null ? void 0 : _b[1]
|
|
6543
|
+
};
|
|
6544
|
+
};
|
|
6545
|
+
var removeQuotes = (value) => {
|
|
6546
|
+
if (value.startsWith('"') && value.endsWith('"')) {
|
|
6547
|
+
return value.slice(1, -1);
|
|
6548
|
+
}
|
|
6549
|
+
return value;
|
|
6550
|
+
};
|
|
6551
|
+
var decodeFilename = (encodedFilename) => {
|
|
6552
|
+
if (!encodedFilename) {
|
|
6553
|
+
return void 0;
|
|
6554
|
+
}
|
|
6555
|
+
const sections = encodedFilename.split("'");
|
|
6556
|
+
const encodedValue = sections.length >= 3 ? sections.slice(2).join("'") : encodedFilename;
|
|
6557
|
+
try {
|
|
6558
|
+
return decodeURIComponent(encodedValue);
|
|
6559
|
+
} catch (e) {
|
|
6560
|
+
return void 0;
|
|
6561
|
+
}
|
|
6562
|
+
};
|
|
6563
|
+
var extractBasename = (filename) => {
|
|
6564
|
+
var _a;
|
|
6565
|
+
const segments = filename.split(/[\\/]+/).filter(Boolean);
|
|
6566
|
+
return (_a = segments.at(-1)) != null ? _a : "";
|
|
6567
|
+
};
|
|
6568
|
+
|
|
6569
|
+
// src/controller/executeDownload.ts
|
|
6570
|
+
var getExecuteDownload = ({
|
|
6571
|
+
onNotification,
|
|
6572
|
+
getErrorMessageFunctions,
|
|
6573
|
+
trackEvent
|
|
6574
|
+
// TODO: add analytics after aligning with other client platforms
|
|
6575
|
+
}) => {
|
|
6576
|
+
const pendingRequests = createPendingRequestsSet();
|
|
6577
|
+
const executeDownload = async (request, httpClient) => {
|
|
6578
|
+
if (pendingRequests.has(request)) {
|
|
6579
|
+
return;
|
|
6580
|
+
}
|
|
6581
|
+
pendingRequests.add(request);
|
|
6582
|
+
onNotification == null ? void 0 : onNotification({ text: getErrorMessageFunctions().downloadStarted() });
|
|
6583
|
+
return fetchDownloadRequest(request, httpClient).then(saveBlob).then(() => {
|
|
6584
|
+
onNotification == null ? void 0 : onNotification({ text: getErrorMessageFunctions().downloadSuccessful() });
|
|
6585
|
+
}).catch((error) => {
|
|
6586
|
+
onNotification == null ? void 0 : onNotification({ text: getErrorMessageFunctions().downloadFailed() });
|
|
6587
|
+
throw error;
|
|
6588
|
+
}).finally(() => {
|
|
6589
|
+
pendingRequests.remove(request);
|
|
6590
|
+
});
|
|
6591
|
+
};
|
|
6592
|
+
return executeDownload;
|
|
6593
|
+
};
|
|
6594
|
+
var fetchDownloadRequest = async (request, httpClient) => {
|
|
6595
|
+
const { url, method, body, headers } = request;
|
|
6596
|
+
const requestBody = method === "GET" ? void 0 : JSON.stringify(body);
|
|
6597
|
+
const requestHeaders = filterForbiddenHeaders(headers);
|
|
6598
|
+
if (requestBody) {
|
|
6599
|
+
requestHeaders.set("Content-Type", "application/json");
|
|
6600
|
+
}
|
|
6601
|
+
const response = await httpClient(url, { method, body: requestBody, headers: requestHeaders });
|
|
6602
|
+
if (!response.ok) {
|
|
6603
|
+
throw new Error(`Download failed with status ${response.status}`);
|
|
6604
|
+
}
|
|
6605
|
+
const contentDisposition = response.headers.get("Content-Disposition");
|
|
6606
|
+
const filename = getFilenameFromContentDisposition(contentDisposition);
|
|
6607
|
+
const blob = await response.blob();
|
|
6608
|
+
return { filename, blob };
|
|
6609
|
+
};
|
|
6610
|
+
var saveBlob = async ({ blob, filename = "" }) => {
|
|
6611
|
+
const blobUrl = URL.createObjectURL(blob);
|
|
6612
|
+
const link = Object.assign(document.createElement("a"), {
|
|
6613
|
+
href: blobUrl,
|
|
6614
|
+
download: filename
|
|
6615
|
+
});
|
|
6616
|
+
document.body.appendChild(link);
|
|
6617
|
+
link.click();
|
|
6618
|
+
await wait();
|
|
6619
|
+
document.body.removeChild(link);
|
|
6620
|
+
URL.revokeObjectURL(blobUrl);
|
|
6621
|
+
};
|
|
6622
|
+
var filterForbiddenHeaders = (headers) => {
|
|
6623
|
+
const forbiddenHeaders = ["authorization", "cookie", "host"];
|
|
6624
|
+
const filteredHeaders = Object.entries(headers != null ? headers : {}).map(([key, value]) => [
|
|
6625
|
+
key.trim().toLowerCase(),
|
|
6626
|
+
value
|
|
6627
|
+
]).filter(([key]) => !forbiddenHeaders.includes(key));
|
|
6628
|
+
return new Headers(filteredHeaders);
|
|
6629
|
+
};
|
|
6630
|
+
var wait = async () => new Promise((resolve) => {
|
|
6631
|
+
setTimeout(resolve, 0);
|
|
6632
|
+
});
|
|
6633
|
+
var createPendingRequestsSet = () => {
|
|
6634
|
+
const pendingRequests = /* @__PURE__ */ new Set();
|
|
6635
|
+
return {
|
|
6636
|
+
add: (request) => {
|
|
6637
|
+
const requestKey = JSON.stringify(request);
|
|
6638
|
+
pendingRequests.add(requestKey);
|
|
6639
|
+
},
|
|
6640
|
+
remove: (request) => {
|
|
6641
|
+
const requestKey = JSON.stringify(request);
|
|
6642
|
+
pendingRequests.delete(requestKey);
|
|
6643
|
+
},
|
|
6644
|
+
has: (request) => {
|
|
6645
|
+
const requestKey = JSON.stringify(request);
|
|
6646
|
+
return pendingRequests.has(requestKey);
|
|
6647
|
+
}
|
|
6648
|
+
};
|
|
6649
|
+
};
|
|
6650
|
+
|
|
6406
6651
|
// src/controller/executePoll.ts
|
|
6407
6652
|
var executePoll = async (props) => {
|
|
6408
6653
|
const { errorBehavior, signal, url, httpClient, trackEvent } = props;
|
|
@@ -6575,7 +6820,7 @@ var executeSubflow = async ({
|
|
|
6575
6820
|
};
|
|
6576
6821
|
const close = () => {
|
|
6577
6822
|
var _a2;
|
|
6578
|
-
if (((_a2 = rootComponent.
|
|
6823
|
+
if (((_a2 = rootComponent.getSubflow()) == null ? void 0 : _a2.uid) === component.uid) {
|
|
6579
6824
|
rootComponent.closeSubflow();
|
|
6580
6825
|
}
|
|
6581
6826
|
};
|
|
@@ -6675,13 +6920,14 @@ var getStepCounter = () => {
|
|
|
6675
6920
|
|
|
6676
6921
|
// src/controller/FlowController.ts
|
|
6677
6922
|
var createFlowController = (props) => {
|
|
6678
|
-
const
|
|
6923
|
+
const {
|
|
6679
6924
|
flowId,
|
|
6680
6925
|
initialAction,
|
|
6681
6926
|
initialStep,
|
|
6682
6927
|
backConfig,
|
|
6683
6928
|
features,
|
|
6684
6929
|
nativeSubflowHandlers,
|
|
6930
|
+
requestCache,
|
|
6685
6931
|
getErrorMessageFunctions,
|
|
6686
6932
|
scrollToTop,
|
|
6687
6933
|
onChange,
|
|
@@ -6689,38 +6935,21 @@ var createFlowController = (props) => {
|
|
|
6689
6935
|
onCompletion,
|
|
6690
6936
|
onCopy,
|
|
6691
6937
|
onLink,
|
|
6938
|
+
onNotification,
|
|
6692
6939
|
onError,
|
|
6693
6940
|
onEvent,
|
|
6694
6941
|
onLog,
|
|
6695
6942
|
onValueChange
|
|
6696
|
-
} =
|
|
6697
|
-
"flowId",
|
|
6698
|
-
"initialAction",
|
|
6699
|
-
"initialStep",
|
|
6700
|
-
"backConfig",
|
|
6701
|
-
"features",
|
|
6702
|
-
"nativeSubflowHandlers",
|
|
6703
|
-
"getErrorMessageFunctions",
|
|
6704
|
-
"scrollToTop",
|
|
6705
|
-
"onChange",
|
|
6706
|
-
"onCancellation",
|
|
6707
|
-
"onCompletion",
|
|
6708
|
-
"onCopy",
|
|
6709
|
-
"onLink",
|
|
6710
|
-
"onError",
|
|
6711
|
-
"onEvent",
|
|
6712
|
-
"onLog",
|
|
6713
|
-
"onValueChange"
|
|
6714
|
-
]);
|
|
6943
|
+
} = props;
|
|
6715
6944
|
const httpClient = getHttpClientWithCapabilities(props.httpClient, nativeSubflowHandlers);
|
|
6716
6945
|
const rootComponent = createRootDomainComponent(
|
|
6717
6946
|
onChange,
|
|
6718
6947
|
scrollToTop,
|
|
6719
6948
|
backConfig,
|
|
6720
|
-
normaliseRequestCache(
|
|
6949
|
+
normaliseRequestCache(requestCache)
|
|
6721
6950
|
);
|
|
6722
6951
|
const stepCount = getStepCounter();
|
|
6723
|
-
const
|
|
6952
|
+
const refreshAbortController = getRequestAbortController();
|
|
6724
6953
|
const createStep = (newStep, etag) => {
|
|
6725
6954
|
if (rootComponent.hasStep()) {
|
|
6726
6955
|
stepCount.increment();
|
|
@@ -6732,8 +6961,8 @@ var createFlowController = (props) => {
|
|
|
6732
6961
|
}
|
|
6733
6962
|
};
|
|
6734
6963
|
const updateStep = (newStep, etag) => {
|
|
6735
|
-
var
|
|
6736
|
-
const component = createStepComponent2(newStep, etag, (
|
|
6964
|
+
var _a;
|
|
6965
|
+
const component = createStepComponent2(newStep, etag, (_a = rootComponent.getLocalValue()) != null ? _a : null);
|
|
6737
6966
|
if (component) {
|
|
6738
6967
|
rootComponent.updateStep(component);
|
|
6739
6968
|
rootComponent.setLoadingState("idle");
|
|
@@ -6768,14 +6997,14 @@ var createFlowController = (props) => {
|
|
|
6768
6997
|
}
|
|
6769
6998
|
};
|
|
6770
6999
|
const getStep = () => {
|
|
6771
|
-
var
|
|
7000
|
+
var _a;
|
|
6772
7001
|
const stepComponent = rootComponent.getStep();
|
|
6773
|
-
return (
|
|
7002
|
+
return (_a = stepComponent == null ? void 0 : stepComponent.step) != null ? _a : initialStep;
|
|
6774
7003
|
};
|
|
6775
7004
|
const trackEvent = (eventName, properties) => {
|
|
6776
|
-
var
|
|
7005
|
+
var _a, _b;
|
|
6777
7006
|
const step = getStep();
|
|
6778
|
-
const stepId = (_b = (
|
|
7007
|
+
const stepId = (_b = (_a = step == null ? void 0 : step.id) != null ? _a : step == null ? void 0 : step.key) != null ? _b : null;
|
|
6779
7008
|
const analytics = step == null ? void 0 : step.analytics;
|
|
6780
7009
|
const metadata = __spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
6781
7010
|
flowId,
|
|
@@ -6786,10 +7015,16 @@ var createFlowController = (props) => {
|
|
|
6786
7015
|
} catch (e) {
|
|
6787
7016
|
}
|
|
6788
7017
|
};
|
|
7018
|
+
const trackCoreEvent = trackEvent;
|
|
7019
|
+
const executeDownload = getExecuteDownload({
|
|
7020
|
+
onNotification,
|
|
7021
|
+
getErrorMessageFunctions,
|
|
7022
|
+
trackEvent
|
|
7023
|
+
});
|
|
6789
7024
|
const logEvent = (level, message, properties) => {
|
|
6790
|
-
var
|
|
7025
|
+
var _a, _b;
|
|
6791
7026
|
const step = getStep();
|
|
6792
|
-
const stepId = (_b = (
|
|
7027
|
+
const stepId = (_b = (_a = step == null ? void 0 : step.id) != null ? _a : step == null ? void 0 : step.key) != null ? _b : null;
|
|
6793
7028
|
try {
|
|
6794
7029
|
onLog == null ? void 0 : onLog(level, message, __spreadValues(__spreadValues(__spreadProps(__spreadValues({}, properties), {
|
|
6795
7030
|
flowId
|
|
@@ -6799,17 +7034,25 @@ var createFlowController = (props) => {
|
|
|
6799
7034
|
};
|
|
6800
7035
|
const closeWithError = (error, analytics, statusCode) => {
|
|
6801
7036
|
rootComponent.stop();
|
|
6802
|
-
|
|
7037
|
+
trackCoreEvent("Failed", __spreadValues({}, analytics));
|
|
6803
7038
|
logEvent("error", "Dynamic Flow failed", { errorMessage: getErrorMessage(error), analytics });
|
|
6804
7039
|
onError(error, statusCode);
|
|
6805
7040
|
};
|
|
6806
7041
|
const closeWithCancellation = () => {
|
|
6807
|
-
|
|
7042
|
+
trackCoreEvent("Cancelled");
|
|
6808
7043
|
onCancellation == null ? void 0 : onCancellation();
|
|
6809
7044
|
};
|
|
6810
7045
|
const onBehavior = async (behavior) => {
|
|
6811
|
-
var
|
|
7046
|
+
var _a;
|
|
6812
7047
|
switch (behavior.type) {
|
|
7048
|
+
case "download": {
|
|
7049
|
+
try {
|
|
7050
|
+
await executeDownload(behavior.request, httpClient);
|
|
7051
|
+
} catch (error) {
|
|
7052
|
+
logEvent("error", "Download failed", { errorMessage: getErrorMessage(error) });
|
|
7053
|
+
}
|
|
7054
|
+
break;
|
|
7055
|
+
}
|
|
6813
7056
|
case "back": {
|
|
6814
7057
|
if (behavior.action) {
|
|
6815
7058
|
onAction(behavior.action, null).then(() => {
|
|
@@ -6844,6 +7087,7 @@ var createFlowController = (props) => {
|
|
|
6844
7087
|
void onAction(action, model);
|
|
6845
7088
|
} else {
|
|
6846
7089
|
rootComponent.setLoadingState("idle");
|
|
7090
|
+
scrollToTop("smooth");
|
|
6847
7091
|
}
|
|
6848
7092
|
} catch (e) {
|
|
6849
7093
|
rootComponent.setLoadingState("idle");
|
|
@@ -6866,7 +7110,7 @@ var createFlowController = (props) => {
|
|
|
6866
7110
|
void onRefresh({ refreshUrl: behavior.url, analytics: behavior.analytics });
|
|
6867
7111
|
return {
|
|
6868
7112
|
abort: () => {
|
|
6869
|
-
|
|
7113
|
+
refreshAbortController.abort();
|
|
6870
7114
|
}
|
|
6871
7115
|
};
|
|
6872
7116
|
}
|
|
@@ -6875,7 +7119,7 @@ var createFlowController = (props) => {
|
|
|
6875
7119
|
break;
|
|
6876
7120
|
}
|
|
6877
7121
|
case "modal": {
|
|
6878
|
-
const currentStep = (
|
|
7122
|
+
const currentStep = (_a = rootComponent.getStep()) == null ? void 0 : _a.step;
|
|
6879
7123
|
if (currentStep) {
|
|
6880
7124
|
rootComponent.showModal(
|
|
6881
7125
|
modalToComponent(
|
|
@@ -6926,14 +7170,14 @@ var createFlowController = (props) => {
|
|
|
6926
7170
|
} };
|
|
6927
7171
|
};
|
|
6928
7172
|
const onAction = async (action, model) => {
|
|
6929
|
-
var
|
|
7173
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
6930
7174
|
try {
|
|
6931
7175
|
rootComponent.setLoadingState("submitting");
|
|
6932
7176
|
const command = await executeSubmission({
|
|
6933
7177
|
action,
|
|
6934
7178
|
model,
|
|
6935
7179
|
isInitial: !rootComponent.hasStep(),
|
|
6936
|
-
requestCache: (_b = (
|
|
7180
|
+
requestCache: (_b = (_a = rootComponent.getStep()) == null ? void 0 : _a.requestCache) != null ? _b : rootComponent.requestCache,
|
|
6937
7181
|
httpClient,
|
|
6938
7182
|
trackEvent,
|
|
6939
7183
|
logEvent
|
|
@@ -6941,7 +7185,7 @@ var createFlowController = (props) => {
|
|
|
6941
7185
|
switch (command.type) {
|
|
6942
7186
|
case "complete": {
|
|
6943
7187
|
onCompletion(command.result);
|
|
6944
|
-
|
|
7188
|
+
trackCoreEvent("Succeeded");
|
|
6945
7189
|
if (features.isEnabled("continueAfterCompletion")) {
|
|
6946
7190
|
rootComponent.setLoadingState("idle");
|
|
6947
7191
|
} else {
|
|
@@ -6953,7 +7197,7 @@ var createFlowController = (props) => {
|
|
|
6953
7197
|
const isFirstStep = !rootComponent.hasStep();
|
|
6954
7198
|
rootComponent.closeSubflow();
|
|
6955
7199
|
createStep(command.step, command.etag);
|
|
6956
|
-
|
|
7200
|
+
trackCoreEvent("Step Shown", { isFirstStep });
|
|
6957
7201
|
break;
|
|
6958
7202
|
}
|
|
6959
7203
|
case "error": {
|
|
@@ -6970,8 +7214,10 @@ var createFlowController = (props) => {
|
|
|
6970
7214
|
// and the model that was submitted
|
|
6971
7215
|
polling: void 0,
|
|
6972
7216
|
// and no polling, to avoid restarting it
|
|
6973
|
-
external: void 0
|
|
7217
|
+
external: void 0,
|
|
6974
7218
|
// and no external, to avoid retriggering it
|
|
7219
|
+
onLoad: void 0
|
|
7220
|
+
// and no onLoad, to avoid retriggering it (how is this still the best we have. Should refactor soon)
|
|
6975
7221
|
}),
|
|
6976
7222
|
(_f = (_e = rootComponent.getStep()) == null ? void 0 : _e.etag) != null ? _f : null
|
|
6977
7223
|
);
|
|
@@ -7010,13 +7256,13 @@ var createFlowController = (props) => {
|
|
|
7010
7256
|
errorsOverride,
|
|
7011
7257
|
analytics
|
|
7012
7258
|
}) => {
|
|
7013
|
-
var
|
|
7259
|
+
var _a, _b, _c;
|
|
7014
7260
|
try {
|
|
7015
7261
|
rootComponent.setLoadingState("refreshing");
|
|
7016
7262
|
const model = rootComponent.getSubmittableValueSync();
|
|
7017
7263
|
const command = await executeRefresh({
|
|
7018
|
-
abortSignal:
|
|
7019
|
-
url: (
|
|
7264
|
+
abortSignal: refreshAbortController.abortAndGetNewSignal(),
|
|
7265
|
+
url: (_a = refreshUrl != null ? refreshUrl : rootComponent.getRefreshUrl()) != null ? _a : "",
|
|
7020
7266
|
model,
|
|
7021
7267
|
etag: (_c = (_b = rootComponent.getStep()) == null ? void 0 : _b.etag) != null ? _c : null,
|
|
7022
7268
|
analytics,
|
|
@@ -7072,14 +7318,14 @@ var createFlowController = (props) => {
|
|
|
7072
7318
|
let initState = "initial";
|
|
7073
7319
|
if (initialStep) {
|
|
7074
7320
|
initState = "created";
|
|
7075
|
-
|
|
7321
|
+
trackCoreEvent("Initiated");
|
|
7076
7322
|
createStep(initialStep, null);
|
|
7077
|
-
|
|
7323
|
+
trackCoreEvent("Step Shown", { isFirstStep: true });
|
|
7078
7324
|
}
|
|
7079
7325
|
const start = () => {
|
|
7080
7326
|
if (initState === "initial" && initialAction) {
|
|
7081
7327
|
initState = "created";
|
|
7082
|
-
|
|
7328
|
+
trackCoreEvent("Initiated");
|
|
7083
7329
|
rootComponent.setLoadingState("submitting");
|
|
7084
7330
|
void onAction(__spreadValues({ method: "GET" }, initialAction), null).then(() => {
|
|
7085
7331
|
initState = "started";
|
|
@@ -7278,6 +7524,26 @@ var multi_file_upload_messages_default = defineMessages5({
|
|
|
7278
7524
|
}
|
|
7279
7525
|
});
|
|
7280
7526
|
|
|
7527
|
+
// src/common/messages/download.messages.ts
|
|
7528
|
+
import { defineMessages as defineMessages6 } from "react-intl";
|
|
7529
|
+
var download_messages_default = defineMessages6({
|
|
7530
|
+
downloadStarted: {
|
|
7531
|
+
id: "dynamicFlows.DownloadFeedback.started",
|
|
7532
|
+
defaultMessage: "Downloading...",
|
|
7533
|
+
description: "Appears in a snackbar when a download starts."
|
|
7534
|
+
},
|
|
7535
|
+
downloadSuccessful: {
|
|
7536
|
+
id: "dynamicFlows.DownloadFeedback.successful",
|
|
7537
|
+
defaultMessage: "Download successful",
|
|
7538
|
+
description: "Appears in a snackbar when a download succeeds."
|
|
7539
|
+
},
|
|
7540
|
+
downloadFailed: {
|
|
7541
|
+
id: "dynamicFlows.DownloadFeedback.failed",
|
|
7542
|
+
defaultMessage: "Download failed",
|
|
7543
|
+
description: "Appears in a snackbar when a download fails."
|
|
7544
|
+
}
|
|
7545
|
+
});
|
|
7546
|
+
|
|
7281
7547
|
// src/renderers/getSchemaErrorMessageFunction.ts
|
|
7282
7548
|
function getSchemaErrorMessageFunction(formatMessage, locale) {
|
|
7283
7549
|
return (validationMessages) => createErrorMessageFunctions(validationMessages != null ? validationMessages : {}, formatMessage, locale);
|
|
@@ -7364,6 +7630,15 @@ var createErrorMessageFunctions = (validationMessages, formatMessage, locale) =>
|
|
|
7364
7630
|
},
|
|
7365
7631
|
genericErrorWithRetry() {
|
|
7366
7632
|
return formatMessage(generic_error_messages_default.genericErrorRetryHint);
|
|
7633
|
+
},
|
|
7634
|
+
downloadStarted() {
|
|
7635
|
+
return formatMessage(download_messages_default.downloadStarted);
|
|
7636
|
+
},
|
|
7637
|
+
downloadFailed() {
|
|
7638
|
+
return formatMessage(download_messages_default.downloadFailed);
|
|
7639
|
+
},
|
|
7640
|
+
downloadSuccessful() {
|
|
7641
|
+
return formatMessage(download_messages_default.downloadSuccessful);
|
|
7367
7642
|
}
|
|
7368
7643
|
});
|
|
7369
7644
|
var formatDateOptions = {
|
|
@@ -7459,6 +7734,7 @@ var inputComponentToProps = (component, type) => {
|
|
|
7459
7734
|
title,
|
|
7460
7735
|
tags,
|
|
7461
7736
|
validationAsyncState,
|
|
7737
|
+
inlineAlert,
|
|
7462
7738
|
onBlur,
|
|
7463
7739
|
onFocus
|
|
7464
7740
|
} = component;
|
|
@@ -7478,12 +7754,21 @@ var inputComponentToProps = (component, type) => {
|
|
|
7478
7754
|
required,
|
|
7479
7755
|
title,
|
|
7480
7756
|
tags,
|
|
7481
|
-
validationState: getValidationState(errors, validationAsyncState),
|
|
7482
7757
|
value: component.getLocalValue(),
|
|
7758
|
+
validationState: getValidationState(errors, validationAsyncState),
|
|
7759
|
+
inlineAlert,
|
|
7760
|
+
fieldLoadingState: getFieldLoadingState(component),
|
|
7483
7761
|
onBlur: onBlur.bind(component),
|
|
7484
7762
|
onFocus: onFocus.bind(component)
|
|
7485
7763
|
};
|
|
7486
7764
|
};
|
|
7765
|
+
var getFieldLoadingState = (component) => {
|
|
7766
|
+
const { validationAsyncState } = component;
|
|
7767
|
+
if (!validationAsyncState) {
|
|
7768
|
+
return "idle";
|
|
7769
|
+
}
|
|
7770
|
+
return validationAsyncState.loadingState === "pending" ? "validating" : "idle";
|
|
7771
|
+
};
|
|
7487
7772
|
|
|
7488
7773
|
// src/renderers/mappers/booleanInputComponentToProps.ts
|
|
7489
7774
|
var booleanInputComponentToProps = (component, rendererMapperProps) => {
|
|
@@ -7915,13 +8200,10 @@ var paragraphComponentToProps = (component, rendererMapperProps) => __spreadValu
|
|
|
7915
8200
|
|
|
7916
8201
|
// src/renderers/mappers/persistAsyncComponentToProps.ts
|
|
7917
8202
|
var persistAsyncComponentToProps = (component, rendererMapperProps) => {
|
|
7918
|
-
const
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
});
|
|
7923
|
-
}
|
|
7924
|
-
return props;
|
|
8203
|
+
const { errors, status } = component;
|
|
8204
|
+
const validationState = errors.length > 0 ? { status: "invalid", message: errors[0] } : void 0;
|
|
8205
|
+
const fieldLoadingState = status === "persisting" ? "persisting" : void 0;
|
|
8206
|
+
return __spreadValues(__spreadValues(__spreadValues({}, componentToRendererProps(component.component, rendererMapperProps)), validationState ? { validationState } : {}), fieldLoadingState ? { fieldLoadingState } : {});
|
|
7925
8207
|
};
|
|
7926
8208
|
|
|
7927
8209
|
// src/renderers/mappers/progressComponentToProps.ts
|
|
@@ -8457,8 +8739,9 @@ var rootComponentToProps = (rootComponent, rendererMapperProps, nativeSubflowHan
|
|
|
8457
8739
|
return componentToRendererProps(child, rendererMapperProps);
|
|
8458
8740
|
})
|
|
8459
8741
|
];
|
|
8460
|
-
const
|
|
8461
|
-
|
|
8742
|
+
const currentStepSubflow = rootComponent.getSubflow();
|
|
8743
|
+
const subflow = currentStepSubflow ? subflowComponentToRendererProps(
|
|
8744
|
+
currentStepSubflow,
|
|
8462
8745
|
rendererMapperProps,
|
|
8463
8746
|
nativeSubflowHandlers
|
|
8464
8747
|
) : void 0;
|