bt-core-app 1.4.36 → 1.4.37

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.
@@ -229,7 +229,7 @@ var Fe = function() {
229
229
  }
230
230
  return E.firstBy = E, E;
231
231
  }();
232
- function _e(e, t) {
232
+ function xe(e, t) {
233
233
  let u = e ?? "", E = t ?? "";
234
234
  if (u.endsWith("/"))
235
235
  do
@@ -498,7 +498,7 @@ function on(e) {
498
498
  }
499
499
  function T(l) {
500
500
  let c = z(l.url) ?? void 0, g = z(l.id);
501
- return c == null && (e == null ? void 0 : e.findPath) != null && (c = e.findPath(l.nav)), l.additionalUrl != null && (c == null ? c = l.additionalUrl : c = _e(c, l.additionalUrl)), g != null && (c != null && c.includes("{id}") ? c = c.replaceAll("{id}", g) : c = _e(c, g)), l.params != null && (c = `${c}?${u(l.params)}`), l.finalUrl = c, l.finalUrl ?? "";
501
+ return c == null && (e == null ? void 0 : e.findPath) != null && (c = e.findPath(l.nav)), l.additionalUrl != null && (c == null ? c = l.additionalUrl : c = xe(c, l.additionalUrl)), g != null && (c != null && c.includes("{id}") ? c = c.replaceAll("{id}", g) : c = xe(c, g)), l.params != null && (c = `${c}?${u(l.params)}`), l.finalUrl = c, l.finalUrl ?? "";
502
502
  }
503
503
  function N(l) {
504
504
  var g, w;
@@ -770,7 +770,7 @@ function mn(e) {
770
770
  }
771
771
  function d(b) {
772
772
  return e.getAuthorizeUrl ?? (e.getAuthorizeUrl = (D, s) => {
773
- const I = _e($r(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${s}`);
773
+ const I = xe($r(), `authorize?response_type=code&client_id=${e.oauthClientID}&redirect_uri=${window.location.origin}/authentication&state=${s}`);
774
774
  return D ? `${I}&redirect_path=${D}` : I;
775
775
  }), e.getAuthorizeUrl != null ? e.getAuthorizeUrl(b, u.value) ?? "" : "";
776
776
  }
@@ -813,7 +813,7 @@ function mn(e) {
813
813
  if (I != u.value)
814
814
  throw new Error("state does not match");
815
815
  let ee = "";
816
- e.getTokenUrl ?? (e.getTokenUrl = () => _e($r(), "token")), ee = e.getTokenUrl(s, `${window.location.origin}/authentication`, j, Q);
816
+ e.getTokenUrl ?? (e.getTokenUrl = () => xe($r(), "token")), ee = e.getTokenUrl(s, `${window.location.origin}/authentication`, j, Q);
817
817
  const le = {};
818
818
  le.grant_type = j, le.code = s, le.redirect_uri = `${window.location.origin}/authentication`, le.client_id = Q;
819
819
  const k = await sn().post({
@@ -1977,7 +1977,7 @@ var et = { exports: {} };
1977
1977
  });
1978
1978
  return r(m, a), m;
1979
1979
  }
1980
- function xe(n, i) {
1980
+ function _e(n, i) {
1981
1981
  var a = this;
1982
1982
  n = c(n);
1983
1983
  var o = new d(function(m, f) {
@@ -2192,7 +2192,7 @@ var et = { exports: {} };
2192
2192
  iterate: Ze,
2193
2193
  getItem: ge,
2194
2194
  setItem: ze,
2195
- removeItem: xe,
2195
+ removeItem: _e,
2196
2196
  clear: Je,
2197
2197
  length: je,
2198
2198
  key: Ke,
@@ -2919,7 +2919,7 @@ function Dn(e) {
2919
2919
  }
2920
2920
  const _n = (e) => {
2921
2921
  let t = z(e.url) ?? void 0;
2922
- if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = _e(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = _e(t, e.id)), e.params != null) {
2922
+ if (e.additionalUrl != null && (t == null ? t = e.additionalUrl : t = xe(t, e.additionalUrl)), e.id != null && (t != null && t.includes("{id}") ? t = t.replaceAll("{id}", e.id) : t = xe(t, e.id)), e.params != null) {
2923
2923
  t ?? (t = "");
2924
2924
  let u = new URLSearchParams();
2925
2925
  Object.entries(e.params).sort(Fe.firstBy((h) => h[0])).forEach((h) => {
@@ -3308,19 +3308,19 @@ function ya(e, t, u) {
3308
3308
  }), q = ie(() => e.errorMsg ?? j.value), ae = ie(() => e.loadingMsg ?? Q.value), Y = ie(() => ae.value != null), p = Le(!1), ue = Le(e.showSearch ?? !0), he = Z(0), ge = ie(() => {
3309
3309
  const F = e.params != null ? { ...e.params } : {};
3310
3310
  return S.value != null && (F.sortOrder = S.value), e.sortBy != null && (F.sortBy = e.sortBy), F;
3311
- }), Ze = ie(() => (F) => e.onCanDelete != null ? e.onCanDelete(F) : !(F != null && F.isInactive === !0)), ze = ie(() => (F) => M.value ? e.onCanRestore != null ? e.onCanRestore(F) : (F == null ? void 0 : F.isInactive) === !0 : !1), xe = ie(() => s.value.filter((F) => !F.hide)), Je = ie(() => {
3311
+ }), Ze = ie(() => (F) => e.onCanDelete != null ? e.onCanDelete(F) : !(F != null && F.isInactive === !0)), ze = ie(() => (F) => M.value ? e.onCanRestore != null ? e.onCanRestore(F) : (F == null ? void 0 : F.isInactive) === !0 : !1), _e = ie(() => s.value.filter((F) => !F.hide)), Je = ie(() => {
3312
3312
  let F = new Array();
3313
- return xe.value.filter((J) => J.sublevel != null).forEach((J) => {
3313
+ return _e.value.filter((J) => J.sublevel != null).forEach((J) => {
3314
3314
  let O = F.find((ye) => ye.position == J.sublevel);
3315
3315
  O == null ? F.push({ position: J.sublevel ?? 0, values: [J] }) : O.values.push(J);
3316
3316
  }), F.sort(Fe.firstBy((J) => J.position));
3317
3317
  }), je = ie(() => {
3318
3318
  let F = new Array();
3319
- return xe.value.filter((J) => J.level != null).forEach((J) => {
3319
+ return _e.value.filter((J) => J.level != null).forEach((J) => {
3320
3320
  let O = F.find((ye) => ye.position == J.level);
3321
3321
  O == null ? F.push({ position: J.level ?? 0, values: [J] }) : O.values.push(J);
3322
3322
  }), F.sort(Fe.firstBy((J) => J.position));
3323
- }), Ke = ie(() => xe.value.filter((F) => F.nav != null && F.itemText != null || F.textFilter != null || F.display != null || F.bool != null));
3323
+ }), Ke = ie(() => _e.value.filter((F) => F.nav != null && F.itemText != null || F.textFilter != null || F.display != null || F.bool != null));
3324
3324
  function Qe(F) {
3325
3325
  if (e.itemBladeName != null) {
3326
3326
  let te = {
@@ -3379,7 +3379,7 @@ function ya(e, t, u) {
3379
3379
  }
3380
3380
  function pe() {
3381
3381
  le(() => {
3382
- T.exportToCSV(xe.value, D.value);
3382
+ T.exportToCSV(_e.value, D.value);
3383
3383
  }, { loadingMsg: "Exporting to CSV" });
3384
3384
  }
3385
3385
  function de() {
@@ -3486,7 +3486,7 @@ function ya(e, t, u) {
3486
3486
  showSearch: ue,
3487
3487
  sortOrder: S,
3488
3488
  subtitleOptions: Je,
3489
- // tableHeaders,
3489
+ tableHeaders: _e,
3490
3490
  titleOptions: je,
3491
3491
  toggleSearch: Re,
3492
3492
  totalPages: he
@@ -3536,7 +3536,7 @@ function Tn(e) {
3536
3536
  if (l == null)
3537
3537
  return;
3538
3538
  let c = hn(l.microservice ?? "default") ?? "";
3539
- return l.path != null && (c = _e(c, l.path)), c != null && c.endsWith("/") && (c = c.slice(0, c.length - 1)), c;
3539
+ return l.path != null && (c = xe(c, l.path)), c != null && c.endsWith("/") && (c = c.slice(0, c.length - 1)), c;
3540
3540
  }
3541
3541
  function x(r) {
3542
3542
  const l = N(r);
@@ -3831,7 +3831,7 @@ function Da(e) {
3831
3831
  export {
3832
3832
  ta as DataURIToBlob,
3833
3833
  Qn as addWeekday,
3834
- _e as appendUrl,
3834
+ xe as appendUrl,
3835
3835
  pt as capitalizeWords,
3836
3836
  Yn as checkImage,
3837
3837
  an as containsSearch,
package/dist/index.d.ts CHANGED
@@ -589,7 +589,6 @@ export declare interface ListProps {
589
589
  useServerPagination?: boolean;
590
590
  useBladeSrc?: boolean;
591
591
  useRouteSrc?: boolean;
592
- variant?: BladeVariant;
593
592
  }
594
593
 
595
594
  declare interface LocalForage extends LocalForageDbMethods {
@@ -1166,6 +1165,30 @@ export declare function useList(props: ListProps, emit?: ListEvents, options?: U
1166
1165
  showSearch: ShallowRef<boolean>;
1167
1166
  sortOrder: Ref<"Ascending" | "Descending" | undefined>;
1168
1167
  subtitleOptions: ComputedRef<GroupedHeaderOption[]>;
1168
+ tableHeaders: ComputedRef< {
1169
+ align?: "start" | "end" | "center" | undefined;
1170
+ bool?: number | undefined;
1171
+ csv?: boolean | undefined;
1172
+ csvArray?: boolean | undefined;
1173
+ csvFilter?: string | undefined;
1174
+ csvText?: string | undefined;
1175
+ display?: boolean | undefined;
1176
+ hide?: boolean | undefined;
1177
+ itemText?: string | undefined;
1178
+ level?: number | undefined;
1179
+ maxWidth?: string | undefined;
1180
+ minWidth?: string | undefined;
1181
+ nav?: string | undefined;
1182
+ prefix?: string | undefined;
1183
+ searchable?: boolean | undefined;
1184
+ single?: boolean | undefined;
1185
+ sublevel?: number | undefined;
1186
+ suffix?: string | undefined;
1187
+ textFilter?: string | undefined;
1188
+ textFunction?: Function | undefined;
1189
+ title?: string | undefined;
1190
+ value?: string | undefined;
1191
+ }[]>;
1169
1192
  titleOptions: ComputedRef<GroupedHeaderOption[]>;
1170
1193
  toggleSearch: () => void;
1171
1194
  totalPages: Ref<number>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.36",
3
+ "version": "1.4.37",
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": {