@social-mail/social-mail-client 1.1.2 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-client",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -45,8 +45,6 @@ export default function CollectionEditor<T>({
45
45
 
46
46
  const onAddItem = async () => {
47
47
  const es = repeater.app.resolve(EntityService);
48
- const clone = es.cloner(model).copy;
49
- const copy = (clone[collection] ??= [] as any) as any;
50
48
  let newItem;
51
49
  if (addPage) {
52
50
  const result = await PageNavigator.pushPageForResult(addPage, addItemDefaults ?? {});
@@ -61,8 +59,10 @@ export default function CollectionEditor<T>({
61
59
  if (newItem?.then) {
62
60
  newItem = await newItem;
63
61
  }
64
- copy.push(newItem);
65
- await es.save(clone as any);
62
+ const draft = { model, [collection]: [newItem] };
63
+ const clone = es.cloner(draft);
64
+ clone.include(`(x) => x.${collection}` as any);
65
+ await es.save(clone.copy as any);
66
66
  repeater.items.add(newItem);
67
67
  };
68
68
 
@@ -11,10 +11,12 @@ export default class WebSiteService {
11
11
  private entityService: EntityService;
12
12
 
13
13
  async get(id) {
14
- return this.entityService.query(WebSiteFolder)
14
+ const site = await this.entityService.query(WebSiteFolder)
15
15
  .where({ id}, (p) => (x) => x.folderID === p.id)
16
16
  .include((x) => [x.folder, x.hosts, x.versions])
17
17
  .firstOrDefault();
18
+ site.versions?.sort((a, b) => b.snapshotFolderID - a.snapshotFolderID);
19
+ return site;
18
20
  }
19
21
 
20
22
  async list() {
@@ -116,10 +116,18 @@ export const stylerLayout = StylerProperty.create( "styler-layout", {
116
116
  }
117
117
 
118
118
  &:checked ~ nav {
119
- display: block;
119
+ display: flex;
120
+ gap: var(--size-default);
121
+ flex-direction: column;
120
122
  position: absolute;
121
123
  right: 10px;
122
- top: 50px;
124
+ top: 40px;
125
+ background-color: canvas;
126
+ padding: var(--size-default);
127
+ border-radius: var(--size-default);
128
+ box-shadow: 0 0 8px 2px gray;
129
+ min-width: 200px;
130
+ min-height: 300px;
123
131
  }
124
132
  }
125
133
  }