@blokkli/editor 2.0.0-alpha.61 → 2.0.0-alpha.62

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blokkli/editor",
3
3
  "configKey": "blokkli",
4
- "version": "2.0.0-alpha.61",
4
+ "version": "2.0.0-alpha.62",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.15.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -19,7 +19,7 @@ import 'typescript';
19
19
  import 'oxc-walker';
20
20
 
21
21
  const name = "@blokkli/editor";
22
- const version = "2.0.0-alpha.61";
22
+ const version = "2.0.0-alpha.62";
23
23
 
24
24
  function validateOption(optionKey, option, icons) {
25
25
  const errors = [];
@@ -178,7 +178,7 @@ export default defineBlokkliEditAdapter(
178
178
  },
179
179
  {}
180
180
  ),
181
- entityTypeConfig: v.data.entityTypeConfig
181
+ entityTypeConfig: v.data.entityTypeConfig ?? []
182
182
  };
183
183
  });
184
184
  const entityTypeConfigMap = /* @__PURE__ */ new Map();
@@ -1510,7 +1510,7 @@ export default defineBlokkliEditAdapter(
1510
1510
  host: hostInput()
1511
1511
  }).then((v) => mapConversation(v.data.conversation)),
1512
1512
  list: () => useGraphqlQuery("pbAgentConversations", { host: hostInput() }).then(
1513
- (v) => v.data.result.items
1513
+ (v) => v.data.result?.items ?? []
1514
1514
  ),
1515
1515
  delete: (uuid) => useGraphqlMutation("pbAgentConversationDelete", { uuid }).then(
1516
1516
  (v) => v.data.result.success
@@ -1526,33 +1526,43 @@ export default defineBlokkliEditAdapter(
1526
1526
  }
1527
1527
  if (hasQuery("pbAgentConversationsAll")) {
1528
1528
  adapter.agentConversations.queryConversations = (e) => useGraphqlQuery("pbAgentConversationsAll", { page: e.page }).then(
1529
- (v) => ({
1530
- filters: mapPluginConfigInputs(v.data.result.filters),
1531
- items: v.data.result.items.map((c) => ({
1532
- uuid: c.uuid,
1533
- title: c.title,
1534
- createdAt: c.createdAt,
1535
- updatedAt: c.updatedAt,
1536
- host: c.host ? {
1537
- entityType: c.host.entityType,
1538
- entityUuid: c.host.entityUuid,
1539
- label: c.host.label ?? null,
1540
- editUrl: c.host.editUrl ?? null
1541
- } : null,
1542
- author: mapBlokkliUser(c.author)
1543
- })),
1544
- perPage: v.data.result.perPage,
1545
- total: v.data.result.total
1546
- })
1529
+ (v) => {
1530
+ if (!v.data.result) {
1531
+ throw new Error("Failed to load agent conversations.");
1532
+ }
1533
+ return {
1534
+ filters: mapPluginConfigInputs(v.data.result.filters),
1535
+ items: v.data.result.items.map((c) => ({
1536
+ uuid: c.uuid,
1537
+ title: c.title,
1538
+ createdAt: c.createdAt,
1539
+ updatedAt: c.updatedAt,
1540
+ host: c.host ? {
1541
+ entityType: c.host.entityType,
1542
+ entityUuid: c.host.entityUuid,
1543
+ label: c.host.label ?? null,
1544
+ editUrl: c.host.editUrl ?? null
1545
+ } : null,
1546
+ author: mapBlokkliUser(c.author)
1547
+ })),
1548
+ perPage: v.data.result.perPage,
1549
+ total: v.data.result.total
1550
+ };
1551
+ }
1547
1552
  );
1548
1553
  }
1549
1554
  if (hasQuery("pbAgentFeedbackAll")) {
1550
- adapter.agentConversations.queryFeedback = (e) => useGraphqlQuery("pbAgentFeedbackAll", { page: e.page }).then((v) => ({
1551
- filters: mapPluginConfigInputs(v.data.result.filters),
1552
- items: v.data.result.items.map(mapFeedback),
1553
- perPage: v.data.result.perPage,
1554
- total: v.data.result.total
1555
- }));
1555
+ adapter.agentConversations.queryFeedback = (e) => useGraphqlQuery("pbAgentFeedbackAll", { page: e.page }).then((v) => {
1556
+ if (!v.data.result) {
1557
+ throw new Error("Failed to load agent feedback.");
1558
+ }
1559
+ return {
1560
+ filters: mapPluginConfigInputs(v.data.result.filters),
1561
+ items: v.data.result.items.map(mapFeedback),
1562
+ perPage: v.data.result.perPage,
1563
+ total: v.data.result.total
1564
+ };
1565
+ });
1556
1566
  }
1557
1567
  }
1558
1568
  if (hasMutation("pbBulkUpdateFieldValues")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blokkli/editor",
3
- "version": "2.0.0-alpha.61",
3
+ "version": "2.0.0-alpha.62",
4
4
  "description": "Interactive page building experience for Nuxt",
5
5
  "keywords": [
6
6
  "cms",