@bpmn-io/form-js-viewer 2.0.0-alpha.0 → 2.0.2

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.
@@ -1366,11 +1366,19 @@
1366
1366
  width: 100%;
1367
1367
  }
1368
1368
 
1369
- .fjs-container .flatpickr-calendar.open,
1370
1369
  .fjs-container .dayContainer {
1371
1370
  height: auto;
1372
1371
  }
1373
1372
 
1373
+ /* a host stylesheet can reach the calendar through its .open state, which outranks the rules above */
1374
+ .fjs-container .flatpickr-calendar.open {
1375
+ width: 326px;
1376
+ height: auto;
1377
+ margin: 0;
1378
+ padding: 0;
1379
+ background: var(--color-datepicker-background);
1380
+ }
1381
+
1374
1382
  .fjs-container .flatpickr-calendar.hasTime.noCalendar {
1375
1383
  width: auto;
1376
1384
  max-width: 250px;
@@ -2133,11 +2133,19 @@
2133
2133
  width: 100%;
2134
2134
  }
2135
2135
 
2136
- .fjs-container .flatpickr-calendar.open,
2137
2136
  .fjs-container .dayContainer {
2138
2137
  height: auto;
2139
2138
  }
2140
2139
 
2140
+ /* a host stylesheet can reach the calendar through its .open state, which outranks the rules above */
2141
+ .fjs-container .flatpickr-calendar.open {
2142
+ width: 326px;
2143
+ height: auto;
2144
+ margin: 0;
2145
+ padding: 0;
2146
+ background: var(--color-datepicker-background);
2147
+ }
2148
+
2141
2149
  .fjs-container .flatpickr-calendar.hasTime.noCalendar {
2142
2150
  width: auto;
2143
2151
  max-width: 250px;
package/dist/index.cjs CHANGED
@@ -1428,10 +1428,11 @@ function useFilteredFormData() {
1428
1428
  const conditionChecker = useService('conditionChecker', false);
1429
1429
  return hooks.useMemo(() => {
1430
1430
  const newData = conditionChecker ? conditionChecker.applyConditions(data, data) : data;
1431
- return {
1432
- ...initialData,
1433
- ...newData
1434
- };
1431
+
1432
+ // deep-merge newData over a clone of initialData, so keys pruned from
1433
+ // newData (e.g. by a hidden group) fall back to their initial value
1434
+ // instead of the whole branch disappearing
1435
+ return minDash.merge(clone(initialData || {}), newData);
1435
1436
  }, [conditionChecker, data, initialData]);
1436
1437
  }
1437
1438