bt-core-app 1.4.299 → 1.4.301

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.
@@ -7952,7 +7952,7 @@ function Xc(e) {
7952
7952
  const C = (e == null ? void 0 : e.items) ?? [];
7953
7953
  return u.onGetSaveAsync ?? (u.onGetSaveAsync = (M) => M), u.onCanSaveAsync ?? (u.onCanSaveAsync = () => Promise.resolve(void 0)), w == null && u.nav != null && (w = Sr({ nav: u.nav })), w != null ? u.onSaveAsync ?? (u.onSaveAsync = async () => {
7954
7954
  var M;
7955
- return u.mode ?? (u.mode = ((M = u.data) == null ? void 0 : M.id) == null ? "new" : "edit"), u.mode == "new" ? await w().post(u) : await w().patch(u);
7955
+ return u.mode ?? (u.mode = ((M = u.data) == null ? void 0 : M.id) == null ? "new" : "edit"), u.mode == "new" ? (console.log("posting"), console.log(u), await w().post(u)) : (console.log("patching"), console.log(u), await w().patch(u));
7956
7956
  }) : u.onSaveAsync ?? (u.onSaveAsync = (M) => {
7957
7957
  const k = C.findIndex((x) => x.id == M.id);
7958
7958
  return k >= 0 ? C.splice(k, 1, M) : C.push(M), Promise.resolve(M);
@@ -33215,7 +33215,7 @@ function i1(e, t, n) {
33215
33215
  }), p = _(() => e.errorMsg ?? g.value), b = _(() => e.loadingMsg ?? u.value), T = _(() => b.value != null), S = _(() => {
33216
33216
  var G, ne;
33217
33217
  let E = e.itemID;
33218
- return E == null && a && (console.log(a), E = v.bladeData.data.id), E == null && r && (E = ((G = d == null ? void 0 : d.query) == null ? void 0 : G.id) ?? ((ne = d == null ? void 0 : d.params) == null ? void 0 : ne.id)), E;
33218
+ return E == null && a && (E = v.bladeData.data.id), E == null && r && (E = ((G = d == null ? void 0 : d.query) == null ? void 0 : G.id) ?? ((ne = d == null ? void 0 : d.params) == null ? void 0 : ne.id)), E;
33219
33219
  }), I = Y(S.value == "new" ? "new" : e.startEditing ? "edit" : "view"), L = Ve(!1), N = _(() => {
33220
33220
  let E = e.params != null ? { ...e.params } : {};
33221
33221
  return e.includeDetails != null && (E.includeDetails = e.includeDetails), E;
@@ -33576,8 +33576,11 @@ const NL = /* @__PURE__ */ tt({
33576
33576
  }
33577
33577
  });
33578
33578
  async function w(C) {
33579
- const { valid: M } = await l.value.validate();
33580
- M && await c.saveItem(c.asyncItem.value, { navBack: C });
33579
+ if (l.value != null) {
33580
+ const { valid: M } = await l.value.validate();
33581
+ M && await c.saveItem(c.asyncItem.value, { navBack: C });
33582
+ } else
33583
+ await c.saveItem(c.asyncItem.value, { navBack: C });
33581
33584
  }
33582
33585
  return (C, M) => {
33583
33586
  const k = ha("bt-blade");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.299",
3
+ "version": "1.4.301",
4
4
  "description": "Core app tools for some basic features like navigation, authentication, server apis, and cosmetics",
5
5
  "homepage": "https://github.com/BlitzItTech/bt-core",
6
6
  "bugs": {