bt-core-app 1.4.460 → 1.4.462

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.
@@ -7996,7 +7996,10 @@ function fd(e) {
7996
7996
  u.nav ?? (u.nav = e == null ? void 0 : e.nav), u.proxyID ?? (u.proxyID = e == null ? void 0 : e.proxyID), u.refresh ?? (u.refresh = e == null ? void 0 : e.refresh), u.storeKey ?? (u.storeKey = e == null ? void 0 : e.storeKey), u.throwError ?? (u.throwError = e == null ? void 0 : e.throwError), u.url ?? (u.url = e == null ? void 0 : e.url), u.confirmationMsg ?? (u.confirmationMsg = u.requireConfirmation === !0 ? "Are you sure you want to delete this item?" : void 0);
7997
7997
  let w = (u == null ? void 0 : u.store) ?? (e == null ? void 0 : e.store);
7998
7998
  const k = (e == null ? void 0 : e.items) ?? [];
7999
- return w == null && u.nav != null && (w = Dl({ nav: u.nav })), w != null ? u.onDeleteAsync ?? (u.onDeleteAsync = () => w().deleteItem(u)) : u.onDeleteAsync ?? (u.onDeleteAsync = () => {
7999
+ return w == null && u.nav != null && (w = Dl({ nav: u.nav })), w != null ? u.deleteStrat == "soft" ? u.onDeleteAsync ?? (u.onDeleteAsync = () => w().patch({
8000
+ additionalUrl: "/delete",
8001
+ ...u
8002
+ })) : u.onDeleteAsync ?? (u.onDeleteAsync = () => w().deleteItem(u)) : u.onDeleteAsync ?? (u.onDeleteAsync = () => {
8000
8003
  var S;
8001
8004
  const C = u.id ?? ((S = u.data) == null ? void 0 : S.id);
8002
8005
  if (C == null)
@@ -33584,15 +33587,17 @@ function k1(e, t, n) {
33584
33587
  function W(q) {
33585
33588
  const {
33586
33589
  additionalUrl: Q,
33587
- onDeleteAsync: U,
33588
- onDeleteSuccessAsync: ge = () => (e.variant == "blade" ? v.closeBlade({ bladeName: e.bladeName }) : c(), Promise.resolve(void 0))
33590
+ deleteStrat: U,
33591
+ onDeleteAsync: ge,
33592
+ onDeleteSuccessAsync: Be = () => (e.variant == "blade" ? v.closeBlade({ bladeName: e.bladeName }) : c(), Promise.resolve(void 0))
33589
33593
  } = { ...e };
33590
33594
  w({
33591
33595
  additionalUrl: Q,
33592
33596
  data: q,
33597
+ deleteStrat: U,
33593
33598
  nav: d,
33594
- onDeleteAsync: U,
33595
- onDeleteSuccessAsync: ge,
33599
+ onDeleteAsync: ge,
33600
+ onDeleteSuccessAsync: Be,
33596
33601
  proxyID: h.value,
33597
33602
  storeKey: r
33598
33603
  // ...params.getOptions(),
@@ -33955,6 +33960,7 @@ const fI = { class: "d-flex align-center justify-center h-100 w-100" }, mI = { c
33955
33960
  bladeName: {},
33956
33961
  bladeStartShowing: { type: Boolean },
33957
33962
  canSave: { type: Boolean, default: !0 },
33963
+ deleteStrat: {},
33958
33964
  eager: { type: Boolean, default: !0 },
33959
33965
  eagerWithID: { type: Boolean },
33960
33966
  errorMsg: {},
@@ -35741,6 +35747,7 @@ const TI = /* @__PURE__ */ Je({
35741
35747
  bladeName: {},
35742
35748
  bladeStartShowing: { type: Boolean },
35743
35749
  canSave: { type: Boolean },
35750
+ deleteStrat: {},
35744
35751
  eager: { type: Boolean, default: !1 },
35745
35752
  eagerWithID: { type: Boolean, default: !0 },
35746
35753
  errorMsg: {},
package/dist/index.d.ts CHANGED
@@ -505,6 +505,8 @@ export declare function DataURIToBlob(dataURI: any): Blob;
505
505
  export declare function deepSelect(obj: any, propSelector?: Function): any[];
506
506
 
507
507
  export declare interface DeleteOptions<T> extends StorePathOptions, DoActionOptions {
508
+ /**only applies if connecting to store */
509
+ deleteStrat?: 'soft' | undefined;
508
510
  /**Returns a string if cannot */
509
511
  onCanDeleteAsync?: OnCanDoAsync<T>;
510
512
  /**Will override the default store delete action */
@@ -759,6 +761,8 @@ export declare interface ItemProps<T, TSave, TReturn> {
759
761
  bladeName?: string;
760
762
  bladeStartShowing?: boolean;
761
763
  canSave?: boolean;
764
+ /**only applies if connecting to store */
765
+ deleteStrat?: 'soft' | undefined;
762
766
  eager?: boolean;
763
767
  eagerWithID?: boolean;
764
768
  errorMsg?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.460",
3
+ "version": "1.4.462",
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": {