@social-mail/social-mail-client 1.1.3 → 1.1.4

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.
@@ -19769,10 +19769,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-con
19769
19769
  let repeater;
19770
19770
  const items = (_a = model[collection]) !== null && _a !== void 0 ? _a : model[collection] = [];
19771
19771
  const onAddItem = () => __awaiter(this, void 0, void 0, function* () {
19772
- var _b;
19773
19772
  const es = repeater.app.resolve(EntityService);
19774
- const clone = es.cloner(model).copy;
19775
- const copy = (_b = clone[collection]) !== null && _b !== void 0 ? _b : clone[collection] = [];
19776
19773
  let newItem;
19777
19774
  if (addPage) {
19778
19775
  const result = yield PageNavigator.pushPageForResult(addPage, addItemDefaults !== null && addItemDefaults !== void 0 ? addItemDefaults : {});
@@ -19786,8 +19783,13 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-con
19786
19783
  if (newItem === null || newItem === void 0 ? void 0 : newItem.then) {
19787
19784
  newItem = yield newItem;
19788
19785
  }
19789
- copy.push(newItem);
19790
- yield es.save(clone);
19786
+ const draft = {
19787
+ model,
19788
+ [collection]: [newItem]
19789
+ };
19790
+ const clone = es.cloner(draft);
19791
+ clone.include(`(x) => x.${collection}`);
19792
+ yield es.save(clone.copy);
19791
19793
  repeater.items.add(newItem);
19792
19794
  });
19793
19795
  const deleteItem = item => __awaiter(this, void 0, void 0, function* () {