@arquimedes.co/eureka-forms 3.0.48-test → 3.0.49-new-steps

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.
Files changed (140) hide show
  1. package/dist/@Types/AvailabilityFormStep.d.ts +48 -0
  2. package/dist/@Types/AvailabilityFormStep.js +24 -0
  3. package/dist/@Types/BankAccountFormStep.d.ts +67 -0
  4. package/dist/@Types/BankAccountFormStep.js +14 -0
  5. package/dist/@Types/BookingFormStep.d.ts +156 -0
  6. package/dist/@Types/BookingFormStep.js +44 -0
  7. package/dist/@Types/CalendarFormStep.d.ts +192 -0
  8. package/dist/@Types/CalendarFormStep.js +48 -0
  9. package/dist/@Types/CommunicationChannelFormStep.d.ts +51 -0
  10. package/dist/@Types/CommunicationChannelFormStep.js +15 -0
  11. package/dist/@Types/Condition.d.ts +4 -6
  12. package/dist/@Types/ConsentFormStep.d.ts +36 -0
  13. package/dist/@Types/ConsentFormStep.js +8 -0
  14. package/dist/@Types/EntityFormFormStep.d.ts +66 -0
  15. package/dist/@Types/EntityFormFormStep.js +20 -0
  16. package/dist/@Types/EventFormStep.d.ts +52 -0
  17. package/dist/@Types/EventFormStep.js +13 -0
  18. package/dist/@Types/ExternalReferenceFormStep.d.ts +74 -0
  19. package/dist/@Types/ExternalReferenceFormStep.js +20 -0
  20. package/dist/@Types/Form.d.ts +0 -1
  21. package/dist/@Types/FormStep.d.ts +8 -10
  22. package/dist/@Types/FormStep.js +2 -1
  23. package/dist/@Types/LocationFormStep.d.ts +159 -0
  24. package/dist/@Types/LocationFormStep.js +46 -0
  25. package/dist/@Types/NumericFormSteps.d.ts +108 -0
  26. package/dist/@Types/NumericFormSteps.js +20 -0
  27. package/dist/@Types/PredefinedSelectorFormStep.d.ts +51 -0
  28. package/dist/@Types/PredefinedSelectorFormStep.js +39 -0
  29. package/dist/@Types/StepRef.d.ts +135 -0
  30. package/dist/@Types/StepRef.js +49 -0
  31. package/dist/App/App.js +1 -1
  32. package/dist/App/AppFunctions.js +3 -8
  33. package/dist/App/AppHooks.js +1 -20
  34. package/dist/Form/Form.js +2 -6
  35. package/dist/Form/Form.module.css +39 -48
  36. package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +4 -8
  37. package/dist/FormSteps/BookingStep/BookingStep.d.ts +17 -0
  38. package/dist/FormSteps/BookingStep/BookingStep.js +14 -0
  39. package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.d.ts +3 -0
  40. package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.js +362 -0
  41. package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.module.css +174 -0
  42. package/dist/FormSteps/CBRStepMapper.js +1 -1
  43. package/dist/FormSteps/CalendarStep/CalendarStep.d.ts +7 -0
  44. package/dist/FormSteps/CalendarStep/CalendarStep.js +14 -0
  45. package/dist/FormSteps/CalendarStep/MaterialCalendarStep/MaterialCalendarStep.d.ts +3 -0
  46. package/dist/FormSteps/CalendarStep/MaterialCalendarStep/MaterialCalendarStep.js +269 -0
  47. package/dist/FormSteps/CalendarStep/MaterialCalendarStep/MaterialCalendarStep.module.css +531 -0
  48. package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +2 -2
  49. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +4 -52
  50. package/dist/FormSteps/LocationStep/LocationStep.d.ts +10 -0
  51. package/dist/FormSteps/LocationStep/LocationStep.js +14 -0
  52. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.d.ts +3 -0
  53. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.js +47 -0
  54. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.module.css +18 -0
  55. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.d.ts +3 -0
  56. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.js +168 -0
  57. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.module.css +94 -0
  58. package/dist/FormSteps/NumberStep/NumberStep.d.ts +10 -0
  59. package/dist/FormSteps/NumberStep/NumberStep.js +14 -0
  60. package/dist/FormSteps/Step.js +16 -0
  61. package/dist/FormSteps/StepFunctions.js +23 -6
  62. package/dist/FormSteps/StepFunctions.test.js +57 -3
  63. package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +1 -2
  64. package/dist/Icons/@ErkIcon.d.ts +2 -2
  65. package/dist/Icons/@ErkIcon.js +2 -2
  66. package/dist/Icons/AddIcon.d.ts +3 -0
  67. package/dist/Icons/AddIcon.js +7 -0
  68. package/dist/Icons/EditIcon.d.ts +3 -0
  69. package/dist/Icons/{EmailIcon.js → EditIcon.js} +3 -3
  70. package/dist/Icons/RemoveIcon.d.ts +3 -0
  71. package/dist/Icons/RemoveIcon.js +7 -0
  72. package/dist/Icons/ViewDayIcon.d.ts +3 -0
  73. package/dist/Icons/ViewDayIcon.js +7 -0
  74. package/dist/Icons/ViewWeekIcon.d.ts +3 -0
  75. package/dist/Icons/ViewWeekIcon.js +7 -0
  76. package/dist/Services/DraftService.js +1 -4
  77. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.d.ts +19 -0
  78. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.js +80 -0
  79. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.module.css +82 -0
  80. package/dist/Shared/ErkAddressAutocomplete/googlePlaces.d.ts +29 -0
  81. package/dist/Shared/ErkAddressAutocomplete/googlePlaces.js +139 -0
  82. package/dist/Shared/ErkDatePicker/ErkDatePicker.js +1 -3
  83. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.d.ts +2 -3
  84. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.js +1 -2
  85. package/dist/Shared/ErkLocationField/ErkLocationField.d.ts +23 -0
  86. package/dist/Shared/ErkLocationField/ErkLocationField.js +73 -0
  87. package/dist/Shared/ErkLocationField/ErkLocationField.module.css +29 -0
  88. package/dist/Shared/ErkLocationField/addressFields.d.ts +12 -0
  89. package/dist/Shared/ErkLocationField/addressFields.js +34 -0
  90. package/dist/Shared/ErkLocationField/locationRestrictions.d.ts +6 -0
  91. package/dist/Shared/ErkLocationField/locationRestrictions.js +51 -0
  92. package/dist/Shared/ErkLocationInput/ErkLocationInput.d.ts +15 -0
  93. package/dist/Shared/ErkLocationInput/ErkLocationInput.js +499 -0
  94. package/dist/Shared/ErkLocationInput/ErkLocationInput.module.css +115 -0
  95. package/dist/Shared/ErkNumberField/ErkNumberField.d.ts +42 -0
  96. package/dist/Shared/ErkNumberField/ErkNumberField.js +170 -0
  97. package/dist/Shared/ErkSelect/ErkSelect.d.ts +2 -2
  98. package/dist/Shared/InputIcon/InputIcon.js +0 -6
  99. package/dist/Shared/Navbar/Navbar.d.ts +1 -2
  100. package/dist/Shared/Navbar/Navbar.js +3 -22
  101. package/dist/Shared/Navbar/Navbar.module.css +8 -22
  102. package/dist/Shared/SmartDraftRenderer/SmartDraftRenderer.js +2 -8
  103. package/dist/States/GlobalSlice.d.ts +1 -4
  104. package/dist/States/GlobalSlice.js +1 -8
  105. package/dist/constants/ErkIconTypes.d.ts +1 -3
  106. package/dist/constants/ErkIconTypes.js +0 -2
  107. package/dist/constants/FormStepTypes.d.ts +6 -3
  108. package/dist/constants/FormStepTypes.js +4 -1
  109. package/dist/hooks.d.ts +0 -3
  110. package/dist/hooks.js +1 -17
  111. package/package.json +3 -9
  112. package/dist/@Types/ErkValue.d.ts +0 -16
  113. package/dist/@Types/ErkValue.js +0 -1
  114. package/dist/@Types/User.d.ts +0 -13
  115. package/dist/@Types/User.js +0 -1
  116. package/dist/Icons/EmailIcon.d.ts +0 -3
  117. package/dist/Icons/Entities/SchoolIcon.d.ts +0 -3
  118. package/dist/Icons/Entities/SchoolIcon.js +0 -7
  119. package/dist/Icons/GroupIcon.d.ts +0 -3
  120. package/dist/Icons/GroupIcon.js +0 -7
  121. package/dist/Icons/LockedIcon.d.ts +0 -3
  122. package/dist/Icons/LockedIcon.js +0 -7
  123. package/dist/Login/Login.module.css +0 -135
  124. package/dist/Login/LoginLayout.module.css +0 -68
  125. package/dist/Login/LoginPage.d.ts +0 -10
  126. package/dist/Login/LoginPage.js +0 -101
  127. package/dist/Login/LoginTextField.d.ts +0 -14
  128. package/dist/Login/LoginTextField.js +0 -29
  129. package/dist/Services/ApiSelectorService.d.ts +0 -366
  130. package/dist/Services/ApiSelectorService.js +0 -173
  131. package/dist/Services/ApiSelectorService.test.d.ts +0 -1
  132. package/dist/Services/ApiSelectorService.test.js +0 -87
  133. package/dist/Services/IntegrationService.d.ts +0 -21
  134. package/dist/Services/IntegrationService.js +0 -22
  135. package/dist/Services/UserService.d.ts +0 -10
  136. package/dist/Services/UserService.js +0 -21
  137. package/dist/Shared/SmartDraftRenderer/LinkDecorator.d.ts +0 -14
  138. package/dist/Shared/SmartDraftRenderer/LinkDecorator.js +0 -48
  139. package/dist/constants/ErkValueTypes.d.ts +0 -6
  140. package/dist/constants/ErkValueTypes.js +0 -7
@@ -0,0 +1,531 @@
1
+ /* =========================================================================
2
+ MaterialCalendarStep
3
+ ========================================================================= */
4
+
5
+ .container {
6
+ display: flex;
7
+ flex-direction: column;
8
+ padding: 10px;
9
+ padding-top: 5px;
10
+ padding-bottom: 0;
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ /* =========================================================================
15
+ Toolbar
16
+ ========================================================================= */
17
+
18
+ .toolbar {
19
+ display: flex;
20
+ align-items: center;
21
+ gap: 10px;
22
+ padding: 6px 2px 8px;
23
+ flex-wrap: wrap;
24
+ }
25
+
26
+ /* View switcher */
27
+
28
+ .viewSwitcher {
29
+ display: flex;
30
+ border: 1px solid var(--eureka-outline, #ddd);
31
+ border-radius: 8px;
32
+ overflow: hidden;
33
+ }
34
+
35
+ .viewBtn {
36
+ display: flex;
37
+ align-items: center;
38
+ justify-content: center;
39
+ padding: 5px 10px;
40
+ border: none;
41
+ border-right: 1px solid var(--eureka-outline, #ddd);
42
+ background: transparent;
43
+ cursor: pointer;
44
+ color: var(--eureka-text, #555);
45
+ opacity: 0.55;
46
+ transition: background 0.15s, opacity 0.15s;
47
+ }
48
+
49
+ .viewBtn:last-child {
50
+ border-right: none;
51
+ }
52
+
53
+ .viewBtn:hover {
54
+ background: rgba(0, 0, 0, 0.04);
55
+ opacity: 0.85;
56
+ }
57
+
58
+ .viewBtnActive {
59
+ background: var(--eureka-primary, #1976d2) !important;
60
+ color: #fff !important;
61
+ opacity: 1 !important;
62
+ }
63
+
64
+ /* Nav */
65
+
66
+ .navGroup {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: 4px;
70
+ flex: 1;
71
+ min-width: 0;
72
+ }
73
+
74
+ .navBtn {
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: center;
78
+ padding: 4px;
79
+ border: none;
80
+ border-radius: 6px;
81
+ background: transparent;
82
+ cursor: pointer;
83
+ color: var(--eureka-text, #555);
84
+ opacity: 0.55;
85
+ transition: opacity 0.15s, background 0.15s;
86
+ }
87
+
88
+ .navBtn:hover {
89
+ background: rgba(0, 0, 0, 0.05);
90
+ opacity: 1;
91
+ }
92
+
93
+ .navLabel {
94
+ font-weight: 600;
95
+ font-size: 14px;
96
+ white-space: nowrap;
97
+ overflow: hidden;
98
+ text-overflow: ellipsis;
99
+ text-transform: capitalize;
100
+ }
101
+
102
+ .eventBadge {
103
+ font-size: 11px;
104
+ padding: 3px 8px;
105
+ border-radius: 100px;
106
+ background: var(--eureka-primary, #1976d2);
107
+ color: #fff;
108
+ font-weight: 500;
109
+ white-space: nowrap;
110
+ }
111
+
112
+ .hintText {
113
+ font-size: 11px;
114
+ opacity: 0.4;
115
+ white-space: nowrap;
116
+ margin-left: auto;
117
+ }
118
+
119
+ /* =========================================================================
120
+ Calendar card container
121
+ ========================================================================= */
122
+
123
+ .calendarCard {
124
+ border: 1px solid var(--eureka-outline, #e0e0e0);
125
+ border-radius: 12px;
126
+ overflow: hidden;
127
+ background: var(--eureka-bg, #fff);
128
+ }
129
+
130
+ /* =========================================================================
131
+ Time grid (week / day)
132
+ ========================================================================= */
133
+
134
+ .gridWrapper {
135
+ display: flex;
136
+ flex-direction: column;
137
+ }
138
+
139
+ /* Header */
140
+
141
+ .gridHeader {
142
+ display: grid;
143
+ border-bottom: 2px solid var(--eureka-outline, #e0e0e0);
144
+ position: sticky;
145
+ top: 0;
146
+ z-index: 2;
147
+ background: var(--eureka-bg, #fff);
148
+ }
149
+
150
+ .cornerCell {
151
+ width: 48px;
152
+ border-right: 1px solid var(--eureka-outline, #e0e0e0);
153
+ }
154
+
155
+ .dayHeader {
156
+ display: flex;
157
+ flex-direction: column;
158
+ align-items: center;
159
+ justify-content: center;
160
+ padding: 8px 4px;
161
+ cursor: pointer;
162
+ border-right: 1px solid var(--eureka-outline, #e0e0e0);
163
+ transition: background 0.1s;
164
+ }
165
+
166
+ .dayHeader:last-child {
167
+ border-right: none;
168
+ }
169
+
170
+ .dayHeader:hover {
171
+ background: rgba(0, 0, 0, 0.03);
172
+ }
173
+
174
+ .dayHeaderToday {
175
+ color: var(--eureka-primary, #1976d2);
176
+ }
177
+
178
+ .dayHeaderDow {
179
+ font-size: 11px;
180
+ text-transform: capitalize;
181
+ opacity: 0.6;
182
+ }
183
+
184
+ .dayHeaderNum {
185
+ font-size: 18px;
186
+ font-weight: 700;
187
+ line-height: 1.1;
188
+ }
189
+
190
+ .todayCircle {
191
+ display: flex;
192
+ align-items: center;
193
+ justify-content: center;
194
+ width: 30px;
195
+ height: 30px;
196
+ border-radius: 50%;
197
+ background: var(--eureka-primary, #1976d2);
198
+ color: #fff !important;
199
+ }
200
+
201
+ /* Body */
202
+
203
+ .gridBody {
204
+ overflow-y: auto;
205
+ max-height: 520px;
206
+ }
207
+
208
+ .gridInner {
209
+ display: grid;
210
+ }
211
+
212
+ /* Hour labels */
213
+
214
+ .hourLabels {
215
+ border-right: 1px solid var(--eureka-outline, #e0e0e0);
216
+ }
217
+
218
+ .hourLabel {
219
+ display: flex;
220
+ align-items: flex-start;
221
+ justify-content: flex-end;
222
+ padding-right: 6px;
223
+ padding-top: 2px;
224
+ font-size: 10px;
225
+ opacity: 0.45;
226
+ box-sizing: border-box;
227
+ border-bottom: 1px solid rgba(0, 0, 0, 0.04);
228
+ }
229
+
230
+ /* Day columns */
231
+
232
+ .dayColumn {
233
+ position: relative;
234
+ border-right: 1px solid var(--eureka-outline, #e0e0e0);
235
+ cursor: crosshair;
236
+ box-sizing: border-box;
237
+ }
238
+
239
+ .dayColumn:last-child {
240
+ border-right: none;
241
+ }
242
+
243
+ .hourLine {
244
+ position: absolute;
245
+ left: 0;
246
+ right: 0;
247
+ height: 1px;
248
+ background: rgba(0, 0, 0, 0.05);
249
+ }
250
+
251
+ /* =========================================================================
252
+ Event blocks
253
+ ========================================================================= */
254
+
255
+ .eventBlock {
256
+ position: absolute;
257
+ left: 2px;
258
+ right: 2px;
259
+ border-radius: 4px;
260
+ padding: 2px 4px;
261
+ cursor: default;
262
+ overflow: hidden;
263
+ display: flex;
264
+ flex-direction: column;
265
+ z-index: 1;
266
+ opacity: 0.9;
267
+ transition: opacity 0.1s;
268
+ box-sizing: border-box;
269
+ }
270
+
271
+ .eventBlock:hover {
272
+ opacity: 1;
273
+ z-index: 2;
274
+ }
275
+
276
+ .eventLabel {
277
+ font-size: 11px;
278
+ font-weight: 600;
279
+ color: #fff;
280
+ white-space: nowrap;
281
+ overflow: hidden;
282
+ text-overflow: ellipsis;
283
+ line-height: 1.3;
284
+ }
285
+
286
+ .eventTime {
287
+ font-size: 10px;
288
+ color: rgba(255, 255, 255, 0.8);
289
+ white-space: nowrap;
290
+ }
291
+
292
+ .eventDeleteBtn {
293
+ position: absolute;
294
+ top: 2px;
295
+ right: 2px;
296
+ background: rgba(0, 0, 0, 0.25);
297
+ border: none;
298
+ border-radius: 3px;
299
+ cursor: pointer;
300
+ color: #fff;
301
+ display: none;
302
+ align-items: center;
303
+ justify-content: center;
304
+ padding: 1px;
305
+ line-height: 1;
306
+ }
307
+
308
+ .eventBlock:hover .eventDeleteBtn {
309
+ display: flex;
310
+ }
311
+
312
+ /* =========================================================================
313
+ Month view
314
+ ========================================================================= */
315
+
316
+ .monthGrid {
317
+ display: grid;
318
+ grid-template-columns: repeat(7, 1fr);
319
+ }
320
+
321
+ .monthDowHeader {
322
+ padding: 8px 4px;
323
+ font-size: 11px;
324
+ font-weight: 600;
325
+ text-align: center;
326
+ opacity: 0.5;
327
+ text-transform: uppercase;
328
+ letter-spacing: 0.4px;
329
+ border-bottom: 1px solid var(--eureka-outline, #e0e0e0);
330
+ }
331
+
332
+ .monthCell {
333
+ min-height: 80px;
334
+ padding: 4px;
335
+ border-right: 1px solid var(--eureka-outline, #e0e0e0);
336
+ border-bottom: 1px solid var(--eureka-outline, #e0e0e0);
337
+ cursor: pointer;
338
+ transition: background 0.1s;
339
+ overflow: hidden;
340
+ }
341
+
342
+ .monthCell:nth-child(7n) {
343
+ border-right: none;
344
+ }
345
+
346
+ .monthCell:hover {
347
+ background: rgba(0, 0, 0, 0.02);
348
+ }
349
+
350
+ .monthCellOutside {
351
+ opacity: 0.3;
352
+ }
353
+
354
+ .monthCellToday .monthCellNum {
355
+ color: var(--eureka-primary, #1976d2);
356
+ }
357
+
358
+ .monthCellNum {
359
+ font-size: 13px;
360
+ font-weight: 600;
361
+ display: inline-flex;
362
+ align-items: center;
363
+ justify-content: center;
364
+ width: 24px;
365
+ height: 24px;
366
+ margin-bottom: 2px;
367
+ border-radius: 50%;
368
+ }
369
+
370
+ .monthEventDot {
371
+ font-size: 10px;
372
+ color: #fff;
373
+ border-radius: 3px;
374
+ padding: 1px 4px;
375
+ margin-bottom: 2px;
376
+ white-space: nowrap;
377
+ overflow: hidden;
378
+ text-overflow: ellipsis;
379
+ }
380
+
381
+ .monthMoreLabel {
382
+ font-size: 10px;
383
+ opacity: 0.5;
384
+ padding-left: 2px;
385
+ }
386
+
387
+ /* =========================================================================
388
+ Create popover
389
+ ========================================================================= */
390
+
391
+ .popoverPaper {
392
+ border-radius: 12px !important;
393
+ box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
394
+ min-width: 260px;
395
+ max-width: 300px;
396
+ }
397
+
398
+ .popoverHeader {
399
+ display: flex;
400
+ align-items: center;
401
+ justify-content: space-between;
402
+ padding: 12px 14px 8px;
403
+ border-bottom: 1px solid rgba(0, 0, 0, 0.07);
404
+ }
405
+
406
+ .popoverTitle {
407
+ font-weight: 600;
408
+ font-size: 14px;
409
+ }
410
+
411
+ .popoverClose {
412
+ background: none;
413
+ border: none;
414
+ cursor: pointer;
415
+ display: flex;
416
+ align-items: center;
417
+ opacity: 0.5;
418
+ padding: 2px;
419
+ border-radius: 4px;
420
+ }
421
+
422
+ .popoverClose:hover { opacity: 1; }
423
+
424
+ .popoverBody {
425
+ padding: 12px 14px 14px;
426
+ display: flex;
427
+ flex-direction: column;
428
+ gap: 8px;
429
+ }
430
+
431
+ .popoverLabel {
432
+ font-size: 11px;
433
+ font-weight: 600;
434
+ text-transform: uppercase;
435
+ letter-spacing: 0.4px;
436
+ opacity: 0.5;
437
+ margin-bottom: -4px;
438
+ }
439
+
440
+ .categoryGrid {
441
+ display: flex;
442
+ flex-wrap: wrap;
443
+ gap: 6px;
444
+ }
445
+
446
+ .categoryChip {
447
+ display: flex;
448
+ align-items: center;
449
+ gap: 5px;
450
+ padding: 4px 10px;
451
+ border: 1px solid var(--eureka-outline, #ddd);
452
+ border-radius: 100px;
453
+ background: transparent;
454
+ cursor: pointer;
455
+ font-size: 12px;
456
+ transition: border-color 0.15s, background 0.15s;
457
+ }
458
+
459
+ .categoryChip:hover {
460
+ border-color: var(--eureka-primary, #1976d2);
461
+ }
462
+
463
+ .categoryChipActive {
464
+ border-color: transparent !important;
465
+ }
466
+
467
+ .categoryDot {
468
+ width: 8px;
469
+ height: 8px;
470
+ border-radius: 50%;
471
+ flex-shrink: 0;
472
+ }
473
+
474
+ .popoverInput {
475
+ width: 100%;
476
+ padding: 7px 10px;
477
+ border: 1px solid var(--eureka-outline, #ccc);
478
+ border-radius: 6px;
479
+ font-size: 13px;
480
+ font-family: inherit;
481
+ box-sizing: border-box;
482
+ background: transparent;
483
+ color: inherit;
484
+ outline: none;
485
+ transition: border-color 0.15s;
486
+ }
487
+
488
+ .popoverInput:focus {
489
+ border-color: var(--eureka-primary, #1976d2);
490
+ }
491
+
492
+ .timeRow {
493
+ display: flex;
494
+ align-items: flex-end;
495
+ gap: 8px;
496
+ }
497
+
498
+ .timeRow > div {
499
+ flex: 1;
500
+ display: flex;
501
+ flex-direction: column;
502
+ gap: 4px;
503
+ }
504
+
505
+ .timeDash {
506
+ font-size: 16px;
507
+ font-weight: 300;
508
+ opacity: 0.4;
509
+ padding-bottom: 6px;
510
+ }
511
+
512
+ .createBtn {
513
+ display: flex;
514
+ align-items: center;
515
+ justify-content: center;
516
+ gap: 6px;
517
+ padding: 9px 16px;
518
+ border: none;
519
+ border-radius: 8px;
520
+ color: #fff;
521
+ font-size: 13px;
522
+ font-weight: 600;
523
+ cursor: pointer;
524
+ margin-top: 4px;
525
+ transition: opacity 0.15s;
526
+ font-family: inherit;
527
+ }
528
+
529
+ .createBtn:hover {
530
+ opacity: 0.9;
531
+ }
@@ -34,7 +34,7 @@ function ClassifierSelectorStep({ step, editable }) {
34
34
  const form = useContext(FormContext);
35
35
  const classifier = form.classifiers?.[step.idClassifier ?? ''];
36
36
  const options = useMemo(() => {
37
- return (classifier?.children
37
+ return classifier?.children
38
38
  ?.filter((idClassifier) => {
39
39
  const option = step.options[idClassifier];
40
40
  if (option?.type === ClassifierOptionTypes.HIDE || !form.classifiers?.[idClassifier]) {
@@ -48,7 +48,7 @@ function ClassifierSelectorStep({ step, editable }) {
48
48
  value: classifier?._id,
49
49
  label: classifier?.clientName?.trim?.() && preview ? classifier?.clientName : classifier?.name,
50
50
  };
51
- }) ?? []);
51
+ });
52
52
  },
53
53
  // eslint-disable-next-line react-hooks/exhaustive-deps
54
54
  [dependenciesValues]);
@@ -3,30 +3,16 @@ import React, { useCallback, useContext, useMemo, useState } from 'react';
3
3
  import FormStepTypes, { EntityValueDataTypes, EntityValueOptionTypes } from '../../../constants/FormStepTypes';
4
4
  import SmartSelect from '../../SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep';
5
5
  import widgetInstance from '../../../Utils/AxiosWidget';
6
- import FormContext, { IdFormContext } from '../../../Contexts/FormContext';
6
+ import FormContext from '../../../Contexts/FormContext';
7
7
  import StepFillerContainer from '../../Utils/@StepFiller/StepFiller';
8
8
  import { recursivelyCalcConditionSteps, selectDependencies } from '../../StepHooks';
9
- import { useApiSubscribe, useAppSelector } from '../../../hooks';
9
+ import { useAppSelector } from '../../../hooks';
10
10
  import MaterialEntityValueDialog from './MaterialEntityValueDialog/MaterialEntityValueDialog';
11
11
  import InputIcon from '../../../Shared/InputIcon/InputIcon';
12
12
  import { evaluateCondition } from '../../StepFunctions';
13
13
  import StepComponent from '../../Step';
14
- import ErkValueTypes from '../../../constants/ErkValueTypes';
15
- import { IntegrationsApi } from '../../../Services/IntegrationService';
16
14
  function EntityValuePickerStep({ step, editable }) {
17
15
  const form = useContext(FormContext);
18
- const subscribe = useApiSubscribe();
19
- const idForm = useContext(IdFormContext);
20
- const fetchFilterIntegration = useCallback(async (idIntegration, payload) => {
21
- return ((await subscribe(IntegrationsApi.endpoints.fetchFilterIntegration.initiate({
22
- idForm,
23
- payload,
24
- idIntegration,
25
- }))) ?? []);
26
- }, [subscribe, idForm]);
27
- const getOptions = useCallback(async (step, dependencyStore, ids) => {
28
- return await getEntityValueOptions(step, dependencyStore, ids, fetchFilterIntegration);
29
- }, [fetchFilterIntegration]);
30
16
  const [dialogs, setDialogs] = useState();
31
17
  const dialogsIdStepDeps = useMemo(() => {
32
18
  const ids = [];
@@ -48,7 +34,7 @@ function EntityValuePickerStep({ step, editable }) {
48
34
  }
49
35
  : undefined);
50
36
  }, []);
51
- return (_jsxs(React.Fragment, { children: [dialogs !== undefined && form.entities?.[step.idEntity] && (_jsx(MaterialEntityValueDialog, { type: dialogs.current.type, entity: form.entities?.[step.idEntity], entityValue: dialogs.value, message: dialogs.current.message, handleClose: handleCloseDialog })), _jsx(StepFillerContainer, { step: step, children: _jsx(SmartSelect, { step: step, editable: editable, getOptions: getOptions, getOptionalDependencies: getOptionalDependencies, IconComponent: () => (step.icon ? _jsx(InputIcon, { icon: step.icon }) : undefined), getOptionSelected: (option, value) => option._id === value._id, calcDepError: (steps) => {
37
+ return (_jsxs(React.Fragment, { children: [dialogs !== undefined && form.entities?.[step.idEntity] && (_jsx(MaterialEntityValueDialog, { type: dialogs.current.type, entity: form.entities?.[step.idEntity], entityValue: dialogs.value, message: dialogs.current.message, handleClose: handleCloseDialog })), _jsx(StepFillerContainer, { step: step, children: _jsx(SmartSelect, { step: step, editable: editable, getOptions: getEntityValueOptions, getOptionalDependencies: getOptionalDependencies, IconComponent: () => (step.icon ? _jsx(InputIcon, { icon: step.icon }) : undefined), getOptionSelected: (option, value) => option._id === value._id, calcDepError: (steps) => {
52
38
  for (const step of steps) {
53
39
  if (step.type === FormStepTypes.ENTITYVALUEPICKER) {
54
40
  return 'Selecciona un ' + step.label;
@@ -111,7 +97,7 @@ function EntityValuePickerStep({ step, editable }) {
111
97
  } }) })] }));
112
98
  }
113
99
  export default EntityValuePickerStep;
114
- const getEntityValueOptions = async (step, dependencyStore, { idOrganization, idCurrentAgent, }, fetchFilterIntegration) => {
100
+ const getEntityValueOptions = async (step, dependencyStore, { idOrganization, idCurrentAgent, }) => {
115
101
  if (!idOrganization)
116
102
  return null;
117
103
  let urlPath = '';
@@ -138,40 +124,6 @@ const getEntityValueOptions = async (step, dependencyStore, { idOrganization, id
138
124
  const params = new URLSearchParams({});
139
125
  for (const filter of step.filters) {
140
126
  switch (filter.type) {
141
- case EntityValueDataTypes.INTEGRATION: {
142
- const payload = {};
143
- for (const [key, erkValue] of Object.entries(filter.values ?? {})) {
144
- switch (erkValue.type) {
145
- case ErkValueTypes.BOOLEAN:
146
- payload[key] = erkValue.value;
147
- break;
148
- case ErkValueTypes.DRAFT: {
149
- //TODO: Hacer esto bien, la lambda tiene que ser capaz de calcular un draft en un filtro
150
- // values[key] = await mapDraftEntities(
151
- // `filters[${index}].values.${key}`
152
- // );
153
- break;
154
- }
155
- case ErkValueTypes.STEP: {
156
- const currentValue = dependencyStore[erkValue.idStep]?.value;
157
- if (currentValue) {
158
- if (typeof currentValue === 'string')
159
- payload[key] = currentValue;
160
- else if (currentValue instanceof Date)
161
- payload[key] = currentValue.toISOString();
162
- else
163
- payload[key] = currentValue._id ?? currentValue.id;
164
- }
165
- else
166
- payload[key] = null;
167
- break;
168
- }
169
- }
170
- }
171
- const filtered = await fetchFilterIntegration(filter.idIntegration, payload);
172
- params.set(filter.idProperty, filtered.join(','));
173
- break;
174
- }
175
127
  case EntityValueDataTypes.STEP: {
176
128
  const currentValue = dependencyStore[filter.idStep]?.value;
177
129
  if (currentValue) {
@@ -0,0 +1,10 @@
1
+ import { LocationStep } from '../../@Types/LocationFormStep';
2
+ import { StepProps } from '../Step';
3
+ export interface LocationStepProps extends StepProps {
4
+ /** The LocationStep to display */
5
+ step: LocationStep;
6
+ /** The icon to display */
7
+ IconComponent?: React.ElementType;
8
+ }
9
+ declare function LocationStepComponent(props: LocationStepProps): JSX.Element;
10
+ export default LocationStepComponent;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { FormStyleTypes } from '../../constants/FormStepTypes';
3
+ import MaterialLocationStep from './MaterialLocationStep/MaterialLocationStep';
4
+ import { useAppSelector } from '../../hooks';
5
+ function LocationStepComponent(props) {
6
+ const { formStyle } = useAppSelector((state) => state.global);
7
+ switch (formStyle.type) {
8
+ case FormStyleTypes.MATERIAL:
9
+ default: {
10
+ return _jsx(MaterialLocationStep, { ...props });
11
+ }
12
+ }
13
+ }
14
+ export default LocationStepComponent;
@@ -0,0 +1,3 @@
1
+ import { LocationStepProps } from '../LocationStep';
2
+ declare function MaterialLocationStep({ step, editable }: LocationStepProps): JSX.Element;
3
+ export default MaterialLocationStep;