bt-core-app 1.4.91 → 1.4.92
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/README.md +15 -30
- package/dist/bt-core-app.js +76 -75
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,40 +1,22 @@
|
|
|
1
|
-
## Vue 3 + TypeScript + Vite
|
|
1
|
+
## Vue 3 + TypeScript + Vite + Vuetify
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
## Custom Themes
|
|
4
|
+
Enables saving local cosmetic settings that are loaded in to Vuetify
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Data URL Navigation
|
|
7
|
+
Enables managing navigation and permissions through defining permissions, urls, and microservices base urls.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
## Auto Routes
|
|
10
|
+
Uses unplugin-auto-router to define routes. Specific details can be overriden with navigation items.
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
## Component Presets
|
|
13
|
+
Can set default settings that are applied to components with a single property.
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
VITE_BASE_AUTH_URL=[https://auth...]
|
|
17
|
-
VITE_[BASE_DATA_URL]=[https://data...]
|
|
18
|
-
VITE_WEB_APP_URL=[https://webapp...]
|
|
19
|
-
VITE_[MICROSERVICE]=[https://microservice...]
|
|
20
|
-
VITE_[LOCAL_DB_NAME]=[btweb]
|
|
21
|
-
```
|
|
22
|
-
The VITE_[MICROSERVICE] variable can include any number of variables like this:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
VITE_auth=[https://data_auth...]
|
|
26
|
-
VITE_ordering=[https://data_ordering...]
|
|
27
|
-
VITE_courier-invoicing=[https://data_courier-invoicing...]
|
|
28
|
-
``` -->
|
|
15
|
+
## Components
|
|
16
|
+
Some custom components that are built off Vuetify and have default grid/column settings, but haven't worked out how to export them with Vuetify components and styles.
|
|
29
17
|
|
|
30
18
|
## Auth modes
|
|
31
19
|
|
|
32
|
-
Auth credentials are stored locally using @vueuse/core's useStorage composable. You can change the storage key by setting an environment variable:
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
VITE_AUTH_STORAGE_TOKEN=[string]
|
|
36
|
-
```
|
|
37
|
-
|
|
38
20
|
Permissions take the format [permission].[access]. For instance:
|
|
39
21
|
|
|
40
22
|
```
|
|
@@ -42,4 +24,7 @@ customers.view
|
|
|
42
24
|
customers.edit
|
|
43
25
|
```
|
|
44
26
|
|
|
45
|
-
If the navigation item requires a permission of 'customers', then it will allow viewing and also editing.
|
|
27
|
+
If the navigation item requires a permission of 'customers', then it will allow viewing and also editing.
|
|
28
|
+
|
|
29
|
+
## Environment URL Testing
|
|
30
|
+
Can set different data urls for each stage - whether development or staging or production
|
package/dist/bt-core-app.js
CHANGED
|
@@ -544,9 +544,9 @@ var nt = { exports: {} };
|
|
|
544
544
|
if (!D)
|
|
545
545
|
return this.resolve([]);
|
|
546
546
|
for (var f = new Array(D), A = 0, J = -1, Q = new this(x); ++J < D; )
|
|
547
|
-
|
|
547
|
+
O(b[J], J);
|
|
548
548
|
return Q;
|
|
549
|
-
function
|
|
549
|
+
function O(ce, we) {
|
|
550
550
|
T.resolve(ce).then(W, function(Y) {
|
|
551
551
|
L || (L = !0, P.reject(Q, Y));
|
|
552
552
|
});
|
|
@@ -567,10 +567,10 @@ var nt = { exports: {} };
|
|
|
567
567
|
J(b[f]);
|
|
568
568
|
return A;
|
|
569
569
|
function J(Q) {
|
|
570
|
-
T.resolve(Q).then(function(
|
|
571
|
-
L || (L = !0, P.resolve(A,
|
|
572
|
-
}, function(
|
|
573
|
-
L || (L = !0, P.reject(A,
|
|
570
|
+
T.resolve(Q).then(function(O) {
|
|
571
|
+
L || (L = !0, P.resolve(A, O));
|
|
572
|
+
}, function(O) {
|
|
573
|
+
L || (L = !0, P.reject(A, O));
|
|
574
574
|
});
|
|
575
575
|
}
|
|
576
576
|
}
|
|
@@ -722,7 +722,7 @@ var nt = { exports: {} };
|
|
|
722
722
|
};
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function O(n) {
|
|
726
726
|
return Q(n, !1);
|
|
727
727
|
}
|
|
728
728
|
function ce(n) {
|
|
@@ -775,7 +775,7 @@ var nt = { exports: {} };
|
|
|
775
775
|
var v = a[m];
|
|
776
776
|
v._dbInfo.db && (v._dbInfo.db.close(), v._dbInfo.db = null);
|
|
777
777
|
}
|
|
778
|
-
return n.db = null,
|
|
778
|
+
return n.db = null, O(n).then(function(o) {
|
|
779
779
|
return n.db = o, we(n) ? ce(n) : o;
|
|
780
780
|
}).then(function(o) {
|
|
781
781
|
n.db = c.db = o;
|
|
@@ -834,7 +834,7 @@ var nt = { exports: {} };
|
|
|
834
834
|
}
|
|
835
835
|
var F = v.forages.slice(0);
|
|
836
836
|
return d.all(o).then(function() {
|
|
837
|
-
return a.db = v.db,
|
|
837
|
+
return a.db = v.db, O(a);
|
|
838
838
|
}).then(function(k) {
|
|
839
839
|
return a.db = k, we(a, c._defaultConfig.version) ? ce(a) : k;
|
|
840
840
|
}).then(function(k) {
|
|
@@ -882,8 +882,8 @@ var nt = { exports: {} };
|
|
|
882
882
|
if (q) {
|
|
883
883
|
var Z = q.value;
|
|
884
884
|
H(Z) && (Z = Y(Z));
|
|
885
|
-
var
|
|
886
|
-
|
|
885
|
+
var ee = n(Z, q.key, k++);
|
|
886
|
+
ee !== void 0 ? v(ee) : q.continue();
|
|
887
887
|
} else
|
|
888
888
|
v();
|
|
889
889
|
}, F.onerror = function() {
|
|
@@ -917,11 +917,11 @@ var nt = { exports: {} };
|
|
|
917
917
|
k.oncomplete = function() {
|
|
918
918
|
B === void 0 && (B = null), o(B);
|
|
919
919
|
}, k.onabort = k.onerror = function() {
|
|
920
|
-
var
|
|
921
|
-
C(
|
|
920
|
+
var ee = Z.error ? Z.error : Z.transaction.error;
|
|
921
|
+
C(ee);
|
|
922
922
|
};
|
|
923
|
-
} catch (
|
|
924
|
-
C(
|
|
923
|
+
} catch (ee) {
|
|
924
|
+
C(ee);
|
|
925
925
|
}
|
|
926
926
|
});
|
|
927
927
|
}).catch(C);
|
|
@@ -1061,7 +1061,7 @@ var nt = { exports: {} };
|
|
|
1061
1061
|
if (!n.name)
|
|
1062
1062
|
v = d.reject("Invalid arguments");
|
|
1063
1063
|
else {
|
|
1064
|
-
var o = n.name === a.name && m._dbInfo.db, C = o ? d.resolve(m._dbInfo.db) :
|
|
1064
|
+
var o = n.name === a.name && m._dbInfo.db, C = o ? d.resolve(m._dbInfo.db) : O(n).then(function(R) {
|
|
1065
1065
|
var B = E[n.name], F = B.forages;
|
|
1066
1066
|
B.db = R;
|
|
1067
1067
|
for (var k = 0; k < F.length; k++)
|
|
@@ -1078,7 +1078,7 @@ var nt = { exports: {} };
|
|
|
1078
1078
|
var Z = k[q];
|
|
1079
1079
|
Z._dbInfo.db = null, Z._dbInfo.version = B;
|
|
1080
1080
|
}
|
|
1081
|
-
var
|
|
1081
|
+
var ee = new d(function(re, ie) {
|
|
1082
1082
|
var le = _.open(n.name, B);
|
|
1083
1083
|
le.onerror = function(ye) {
|
|
1084
1084
|
var ze = le.result;
|
|
@@ -1091,7 +1091,7 @@ var nt = { exports: {} };
|
|
|
1091
1091
|
ye.close(), re(ye);
|
|
1092
1092
|
};
|
|
1093
1093
|
});
|
|
1094
|
-
return
|
|
1094
|
+
return ee.then(function(re) {
|
|
1095
1095
|
F.db = re;
|
|
1096
1096
|
for (var ie = 0; ie < k.length; ie++) {
|
|
1097
1097
|
var le = k[ie];
|
|
@@ -1110,7 +1110,7 @@ var nt = { exports: {} };
|
|
|
1110
1110
|
var q = F[k];
|
|
1111
1111
|
q._dbInfo.db = null;
|
|
1112
1112
|
}
|
|
1113
|
-
var Z = new d(function(
|
|
1113
|
+
var Z = new d(function(ee, re) {
|
|
1114
1114
|
var ie = _.deleteDatabase(n.name);
|
|
1115
1115
|
ie.onerror = function() {
|
|
1116
1116
|
var le = ie.result;
|
|
@@ -1119,18 +1119,18 @@ var nt = { exports: {} };
|
|
|
1119
1119
|
console.warn('dropInstance blocked for database "' + n.name + '" until all open connections are closed');
|
|
1120
1120
|
}, ie.onsuccess = function() {
|
|
1121
1121
|
var le = ie.result;
|
|
1122
|
-
le && le.close(),
|
|
1122
|
+
le && le.close(), ee(le);
|
|
1123
1123
|
};
|
|
1124
1124
|
});
|
|
1125
|
-
return Z.then(function(
|
|
1126
|
-
B.db =
|
|
1125
|
+
return Z.then(function(ee) {
|
|
1126
|
+
B.db = ee;
|
|
1127
1127
|
for (var re = 0; re < F.length; re++) {
|
|
1128
1128
|
var ie = F[re];
|
|
1129
1129
|
A(ie._dbInfo);
|
|
1130
1130
|
}
|
|
1131
|
-
}).catch(function(
|
|
1132
|
-
throw (J(n,
|
|
1133
|
-
}),
|
|
1131
|
+
}).catch(function(ee) {
|
|
1132
|
+
throw (J(n, ee) || d.resolve()).catch(function() {
|
|
1133
|
+
}), ee;
|
|
1134
1134
|
});
|
|
1135
1135
|
});
|
|
1136
1136
|
}
|
|
@@ -1153,7 +1153,7 @@ var nt = { exports: {} };
|
|
|
1153
1153
|
function ur() {
|
|
1154
1154
|
return typeof openDatabase == "function";
|
|
1155
1155
|
}
|
|
1156
|
-
var be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ir = "~~local_forage_type~", Ze = /^~~local_forage_type~([^~]+)~/, Fe = "__lfsc__:", Ne = Fe.length, We = "arbf", Ie = "blob", Je = "si08", je = "ui08", qe = "uic8", He = "si16", U = "si32", j = "ur16", V = "ui32",
|
|
1156
|
+
var be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ir = "~~local_forage_type~", Ze = /^~~local_forage_type~([^~]+)~/, Fe = "__lfsc__:", Ne = Fe.length, We = "arbf", Ie = "blob", Je = "si08", je = "ui08", qe = "uic8", He = "si16", U = "si32", j = "ur16", V = "ui32", p = "fl32", de = "fl64", ge = Ne + We.length, De = Object.prototype.toString;
|
|
1157
1157
|
function Se(n) {
|
|
1158
1158
|
var c = n.length * 0.75, a = n.length, m, v = 0, o, C, R, B;
|
|
1159
1159
|
n[n.length - 1] === "=" && (c--, n[n.length - 2] === "=" && c--);
|
|
@@ -1172,7 +1172,7 @@ var nt = { exports: {} };
|
|
|
1172
1172
|
var a = "";
|
|
1173
1173
|
if (n && (a = De.call(n)), n && (a === "[object ArrayBuffer]" || n.buffer && De.call(n.buffer) === "[object ArrayBuffer]")) {
|
|
1174
1174
|
var m, v = Fe;
|
|
1175
|
-
n instanceof ArrayBuffer ? (m = n, v += We) : (m = n.buffer, a === "[object Int8Array]" ? v += Je : a === "[object Uint8Array]" ? v += je : a === "[object Uint8ClampedArray]" ? v += qe : a === "[object Int16Array]" ? v += He : a === "[object Uint16Array]" ? v += j : a === "[object Int32Array]" ? v += U : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v +=
|
|
1175
|
+
n instanceof ArrayBuffer ? (m = n, v += We) : (m = n.buffer, a === "[object Int8Array]" ? v += Je : a === "[object Uint8Array]" ? v += je : a === "[object Uint8ClampedArray]" ? v += qe : a === "[object Int16Array]" ? v += He : a === "[object Uint16Array]" ? v += j : a === "[object Int32Array]" ? v += U : a === "[object Uint32Array]" ? v += V : a === "[object Float32Array]" ? v += p : a === "[object Float64Array]" ? v += de : c(new Error("Failed to get type for BinaryArray"))), c(v + oe(m));
|
|
1176
1176
|
} else if (a === "[object Blob]") {
|
|
1177
1177
|
var o = new FileReader();
|
|
1178
1178
|
o.onload = function() {
|
|
@@ -1214,7 +1214,7 @@ var nt = { exports: {} };
|
|
|
1214
1214
|
return new Int32Array(o);
|
|
1215
1215
|
case V:
|
|
1216
1216
|
return new Uint32Array(o);
|
|
1217
|
-
case
|
|
1217
|
+
case p:
|
|
1218
1218
|
return new Float32Array(o);
|
|
1219
1219
|
case de:
|
|
1220
1220
|
return new Float64Array(o);
|
|
@@ -1288,8 +1288,8 @@ var nt = { exports: {} };
|
|
|
1288
1288
|
C.db.transaction(function(R) {
|
|
1289
1289
|
xe(R, C, "SELECT * FROM " + C.storeName, [], function(B, F) {
|
|
1290
1290
|
for (var k = F.rows, q = k.length, Z = 0; Z < q; Z++) {
|
|
1291
|
-
var
|
|
1292
|
-
if (re && (re = C.serializer.deserialize(re)), re = n(re,
|
|
1291
|
+
var ee = k.item(Z), re = ee.value;
|
|
1292
|
+
if (re && (re = C.serializer.deserialize(re)), re = n(re, ee.key, Z + 1), re !== void 0) {
|
|
1293
1293
|
v(re);
|
|
1294
1294
|
return;
|
|
1295
1295
|
}
|
|
@@ -1314,7 +1314,7 @@ var nt = { exports: {} };
|
|
|
1314
1314
|
q ? R(q) : F.db.transaction(function(Z) {
|
|
1315
1315
|
xe(Z, F, "INSERT OR REPLACE INTO " + F.storeName + " (key, value) VALUES (?, ?)", [n, k], function() {
|
|
1316
1316
|
C(B);
|
|
1317
|
-
}, function(
|
|
1317
|
+
}, function(ee, re) {
|
|
1318
1318
|
R(re);
|
|
1319
1319
|
});
|
|
1320
1320
|
}, function(Z) {
|
|
@@ -1447,9 +1447,9 @@ var nt = { exports: {} };
|
|
|
1447
1447
|
}).then(function(o) {
|
|
1448
1448
|
return new d(function(C, R) {
|
|
1449
1449
|
o.db.transaction(function(B) {
|
|
1450
|
-
function F(
|
|
1450
|
+
function F(ee) {
|
|
1451
1451
|
return new d(function(re, ie) {
|
|
1452
|
-
B.executeSql("DROP TABLE IF EXISTS " +
|
|
1452
|
+
B.executeSql("DROP TABLE IF EXISTS " + ee, [], function() {
|
|
1453
1453
|
re();
|
|
1454
1454
|
}, function(le, ye) {
|
|
1455
1455
|
ie(ye);
|
|
@@ -1460,8 +1460,8 @@ var nt = { exports: {} };
|
|
|
1460
1460
|
k.push(F(o.storeNames[q]));
|
|
1461
1461
|
d.all(k).then(function() {
|
|
1462
1462
|
C();
|
|
1463
|
-
}).catch(function(
|
|
1464
|
-
R(
|
|
1463
|
+
}).catch(function(ee) {
|
|
1464
|
+
R(ee);
|
|
1465
1465
|
});
|
|
1466
1466
|
}, function(B) {
|
|
1467
1467
|
R(B);
|
|
@@ -1705,8 +1705,8 @@ var nt = { exports: {} };
|
|
|
1705
1705
|
return;
|
|
1706
1706
|
}
|
|
1707
1707
|
for (var k = fr.concat("_initStorage"), q = 0, Z = k.length; q < Z; q++) {
|
|
1708
|
-
var
|
|
1709
|
-
if ((re || a[
|
|
1708
|
+
var ee = k[q], re = !$t(Ke, ee);
|
|
1709
|
+
if ((re || a[ee]) && typeof a[ee] != "function") {
|
|
1710
1710
|
R(F);
|
|
1711
1711
|
return;
|
|
1712
1712
|
}
|
|
@@ -1758,16 +1758,16 @@ var nt = { exports: {} };
|
|
|
1758
1758
|
function F(q) {
|
|
1759
1759
|
return function() {
|
|
1760
1760
|
var Z = 0;
|
|
1761
|
-
function
|
|
1761
|
+
function ee() {
|
|
1762
1762
|
for (; Z < q.length; ) {
|
|
1763
1763
|
var re = q[Z];
|
|
1764
|
-
return Z++, o._dbInfo = null, o._ready = null, o.getDriver(re).then(B).catch(
|
|
1764
|
+
return Z++, o._dbInfo = null, o._ready = null, o.getDriver(re).then(B).catch(ee);
|
|
1765
1765
|
}
|
|
1766
1766
|
R();
|
|
1767
1767
|
var ie = new Error("No available storage method found.");
|
|
1768
1768
|
return o._driverSet = d.reject(ie), o._driverSet;
|
|
1769
1769
|
}
|
|
1770
|
-
return
|
|
1770
|
+
return ee();
|
|
1771
1771
|
};
|
|
1772
1772
|
}
|
|
1773
1773
|
var k = this._driverSet !== null ? this._driverSet.catch(function() {
|
|
@@ -2683,8 +2683,8 @@ function Dn(e) {
|
|
|
2683
2683
|
let A = !1;
|
|
2684
2684
|
if (f == null)
|
|
2685
2685
|
return !1;
|
|
2686
|
-
let J = f.subscriptions ?? [], Q = f.permissions ?? [],
|
|
2687
|
-
return
|
|
2686
|
+
let J = f.subscriptions ?? [], Q = f.permissions ?? [], O = N(J, Q, "view");
|
|
2687
|
+
return O || !L || !_e(f.children) ? O : ((f == null ? void 0 : f.children) != null && f.children.forEach((ce) => {
|
|
2688
2688
|
$(ce, !0) && (A = !0);
|
|
2689
2689
|
}), A);
|
|
2690
2690
|
}
|
|
@@ -2729,12 +2729,12 @@ function Dn(e) {
|
|
|
2729
2729
|
throw new Error("Code and State required in OAuth token process");
|
|
2730
2730
|
if (A != l.value)
|
|
2731
2731
|
throw new Error("state does not match");
|
|
2732
|
-
let
|
|
2733
|
-
e.getTokenUrl ?? (e.getTokenUrl = () => Be(Wr(), "token")),
|
|
2732
|
+
let O = "";
|
|
2733
|
+
e.getTokenUrl ?? (e.getTokenUrl = () => Be(Wr(), "token")), O = e.getTokenUrl(f, `${window.location.origin}/authentication`, J, Q);
|
|
2734
2734
|
const ce = {};
|
|
2735
2735
|
ce.grant_type = J, ce.code = f, ce.redirect_uri = `${window.location.origin}/authentication`, ce.client_id = Q;
|
|
2736
2736
|
const W = await Er().post({
|
|
2737
|
-
additionalUrl:
|
|
2737
|
+
additionalUrl: O,
|
|
2738
2738
|
data: ce
|
|
2739
2739
|
});
|
|
2740
2740
|
E(W.access_token);
|
|
@@ -2918,7 +2918,7 @@ function _n(e, t = {}) {
|
|
|
2918
2918
|
const fe = Math.min(x, Math.max(g, (se.width ?? 0) + X));
|
|
2919
2919
|
w.width = fe;
|
|
2920
2920
|
}
|
|
2921
|
-
H.dispatchEvent(new CustomEvent("resize")), M(W),
|
|
2921
|
+
H.dispatchEvent(new CustomEvent("resize")), M(W), O(w);
|
|
2922
2922
|
}
|
|
2923
2923
|
function A() {
|
|
2924
2924
|
document.documentElement.style.cursor = "", d = null, y.forEach((W) => {
|
|
@@ -2946,7 +2946,7 @@ function _n(e, t = {}) {
|
|
|
2946
2946
|
const ne = window.getComputedStyle(G);
|
|
2947
2947
|
X = parseInt(ne.getPropertyValue("width")) - G.offsetLeft;
|
|
2948
2948
|
}
|
|
2949
|
-
H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", H.offsetHeight, u.value = !0,
|
|
2949
|
+
H.style.transition = "width 0.5s, height 0.5s, top 0.5s, left 0.5s", H.offsetHeight, u.value = !0, O({
|
|
2950
2950
|
height: void 0,
|
|
2951
2951
|
width: X,
|
|
2952
2952
|
top: 0,
|
|
@@ -2962,7 +2962,7 @@ function _n(e, t = {}) {
|
|
|
2962
2962
|
top: H.offsetTop,
|
|
2963
2963
|
left: H.offsetLeft,
|
|
2964
2964
|
position: "absolute"
|
|
2965
|
-
},
|
|
2965
|
+
}, O(E), H.offsetHeight;
|
|
2966
2966
|
const ae = E;
|
|
2967
2967
|
W == "freestyle" ? w = {
|
|
2968
2968
|
height: ae.height,
|
|
@@ -2976,12 +2976,12 @@ function _n(e, t = {}) {
|
|
|
2976
2976
|
top: (ae.top ?? 0) + 2,
|
|
2977
2977
|
left: (ae.left ?? 0) + 2,
|
|
2978
2978
|
position: "absolute"
|
|
2979
|
-
}),
|
|
2979
|
+
}), O(w), me(H, "transitionend", () => {
|
|
2980
2980
|
H.style.transition = "", u.value = !1;
|
|
2981
2981
|
}, { once: !0 });
|
|
2982
2982
|
}
|
|
2983
2983
|
}
|
|
2984
|
-
function
|
|
2984
|
+
function O(W) {
|
|
2985
2985
|
const Y = Ae(e);
|
|
2986
2986
|
if (!Y)
|
|
2987
2987
|
return;
|
|
@@ -3544,7 +3544,7 @@ function Ia(e, t) {
|
|
|
3544
3544
|
}), J = te(() => {
|
|
3545
3545
|
const G = K($);
|
|
3546
3546
|
return e.onCanSave != null ? e.onCanSave(G) : !0;
|
|
3547
|
-
}), { isChanged: Q, restartTracker:
|
|
3547
|
+
}), { isChanged: Q, restartTracker: O } = Bn($, {
|
|
3548
3548
|
useTracker: e.trackChanges,
|
|
3549
3549
|
propsToIgnore: e.trackIgnoreProps,
|
|
3550
3550
|
propsToTrack: e.trackProps
|
|
@@ -3608,7 +3608,7 @@ function Ia(e, t) {
|
|
|
3608
3608
|
$.value = ne.data;
|
|
3609
3609
|
}
|
|
3610
3610
|
}
|
|
3611
|
-
|
|
3611
|
+
O();
|
|
3612
3612
|
}
|
|
3613
3613
|
function Y(G, X) {
|
|
3614
3614
|
const {
|
|
@@ -3616,7 +3616,7 @@ function Ia(e, t) {
|
|
|
3616
3616
|
onCanSaveAsync: se,
|
|
3617
3617
|
onGetSaveAsync: fe,
|
|
3618
3618
|
onSaveAsync: Ee,
|
|
3619
|
-
onSaveSuccessAsync: $e = (Ce) => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : (G.rowVersion != null && Ce.rowVersion != null && (G.rowVersion = Ce.rowVersion),
|
|
3619
|
+
onSaveSuccessAsync: $e = (Ce) => ((X == null ? void 0 : X.navBack) === !0 ? x.back() : (G.rowVersion != null && Ce.rowVersion != null && (G.rowVersion = Ce.rowVersion), O(), T.value = "view"), Promise.resolve(void 0))
|
|
3620
3620
|
} = { ...e };
|
|
3621
3621
|
i({
|
|
3622
3622
|
additionalUrl: ne,
|
|
@@ -3801,7 +3801,7 @@ function Da(e, t, l) {
|
|
|
3801
3801
|
...e.searchProps ?? [],
|
|
3802
3802
|
...(e.headers ?? []).filter((U) => U.searchable != null && U.value != null).map((U) => U.value ?? "")
|
|
3803
3803
|
]), A = z([]), J = Re([]), Q = z([]);
|
|
3804
|
-
let
|
|
3804
|
+
let O;
|
|
3805
3805
|
const { actionErrorMsg: ce, actionLoadingMsg: we, deleteItem: W, doAction: Y, getItem: H, getAllItems: ae, restoreItem: G } = ut({
|
|
3806
3806
|
nav: $,
|
|
3807
3807
|
onError: e.onError ?? (l == null ? void 0 : l.onError),
|
|
@@ -3813,8 +3813,8 @@ function Da(e, t, l) {
|
|
|
3813
3813
|
})
|
|
3814
3814
|
}), X = te(() => e.errorMsg ?? ce.value), ne = te(() => e.loadingMsg ?? we.value), se = te(() => ne.value != null), fe = Re(!1), Ee = Re(e.showSearch ?? !0), $e = z(0), Ce = te(() => {
|
|
3815
3815
|
let U, j = [];
|
|
3816
|
-
I.value.forEach((
|
|
3817
|
-
const de = y.value[
|
|
3816
|
+
I.value.forEach((p) => {
|
|
3817
|
+
const de = y.value[p], ge = u.find((De) => De.name == de);
|
|
3818
3818
|
ge != null ? U = U != null ? `${U}ANDALSO${ge.filterFunction()}` : ge.filterFunction() : j.push(de);
|
|
3819
3819
|
});
|
|
3820
3820
|
const V = {};
|
|
@@ -3826,14 +3826,14 @@ function Da(e, t, l) {
|
|
|
3826
3826
|
}), tr = te(() => (U) => e.onCanDelete != null ? e.onCanDelete(U) : !(U != null && U.isInactive === !0)), nr = te(() => (U) => L.value ? e.onCanRestore != null ? e.onCanRestore(U) : (U == null ? void 0 : U.isInactive) === !0 : !1), Pe = te(() => Q.value.filter((U) => !U.hide)), ar = te(() => {
|
|
3827
3827
|
let U = new Array();
|
|
3828
3828
|
return Pe.value.filter((V) => V.sublevel != null).forEach((V) => {
|
|
3829
|
-
let
|
|
3830
|
-
|
|
3829
|
+
let p = U.find((de) => de.position == V.sublevel);
|
|
3830
|
+
p == null ? U.push({ position: V.sublevel ?? 0, values: [V] }) : p.values.push(V);
|
|
3831
3831
|
}), U.sort(Ue.firstBy((V) => V.position));
|
|
3832
3832
|
}), lr = te(() => {
|
|
3833
3833
|
let U = new Array();
|
|
3834
3834
|
return Pe.value.filter((V) => V.level != null).forEach((V) => {
|
|
3835
|
-
let
|
|
3836
|
-
|
|
3835
|
+
let p = U.find((de) => de.position == V.level);
|
|
3836
|
+
p == null ? U.push({ position: V.level ?? 0, values: [V] }) : p.values.push(V);
|
|
3837
3837
|
}), U.sort(Ue.firstBy((V) => V.position));
|
|
3838
3838
|
}), ur = te(() => Pe.value.filter((U) => U.nav != null && U.itemText != null || U.textFilter != null || U.display != null || U.bool != null));
|
|
3839
3839
|
function be(U) {
|
|
@@ -3853,7 +3853,7 @@ function Da(e, t, l) {
|
|
|
3853
3853
|
const {
|
|
3854
3854
|
additionalUrl: j,
|
|
3855
3855
|
onDeleteAsync: V
|
|
3856
|
-
} = { ...e },
|
|
3856
|
+
} = { ...e }, p = K(U), de = p.id, ge = (De) => {
|
|
3857
3857
|
if (De != null) {
|
|
3858
3858
|
let Se = A.value.findIndex((oe) => oe.id == De);
|
|
3859
3859
|
if (Se > -1 && A.value.splice(Se, 1), e.items != null) {
|
|
@@ -3861,20 +3861,20 @@ function Da(e, t, l) {
|
|
|
3861
3861
|
oe > -1 && e.items.splice(oe, 1);
|
|
3862
3862
|
}
|
|
3863
3863
|
} else {
|
|
3864
|
-
let Se = A.value.findIndex((oe) => oe ===
|
|
3865
|
-
if (Se == -1 && (Se = A.value.findIndex((oe) => oe ==
|
|
3866
|
-
let oe = e.items.findIndex((Me) => Me ===
|
|
3867
|
-
oe == -1 && (oe = e.items.findIndex((Me) => Me ==
|
|
3864
|
+
let Se = A.value.findIndex((oe) => oe === p);
|
|
3865
|
+
if (Se == -1 && (Se = A.value.findIndex((oe) => oe == p)), Se > -1 && A.value.splice(Se, 1), e.items != null) {
|
|
3866
|
+
let oe = e.items.findIndex((Me) => Me === p);
|
|
3867
|
+
oe == -1 && (oe = e.items.findIndex((Me) => Me == p)), oe > -1 && e.items.splice(oe, 1);
|
|
3868
3868
|
}
|
|
3869
3869
|
}
|
|
3870
3870
|
};
|
|
3871
3871
|
e.localOnly == !0 || $ == null ? ge(de) : W({
|
|
3872
3872
|
additionalUrl: j,
|
|
3873
|
-
data:
|
|
3873
|
+
data: p,
|
|
3874
3874
|
nav: $,
|
|
3875
3875
|
onCanDeleteAsync: e.onCanDeleteAsync,
|
|
3876
3876
|
onDeleteAsync: V,
|
|
3877
|
-
onDeleteSuccessAsync: async () => (ge(de), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(
|
|
3877
|
+
onDeleteSuccessAsync: async () => (ge(de), e.onDeleteSuccessAsync != null ? e.onDeleteSuccessAsync(p) : Promise.resolve(void 0)),
|
|
3878
3878
|
proxyID: b.value,
|
|
3879
3879
|
// ...(useBladeSrc ? bladeData.value : {}),
|
|
3880
3880
|
requireConfirmation: !0
|
|
@@ -3933,9 +3933,9 @@ function Da(e, t, l) {
|
|
|
3933
3933
|
else {
|
|
3934
3934
|
let V = await ae({
|
|
3935
3935
|
...j,
|
|
3936
|
-
onGetSuccessAsync: async (
|
|
3937
|
-
let ge =
|
|
3938
|
-
return r.value = (
|
|
3936
|
+
onGetSuccessAsync: async (p, de) => {
|
|
3937
|
+
let ge = p == null ? void 0 : p.data;
|
|
3938
|
+
return r.value = (p == null ? void 0 : p.filters) ?? [], e.useServerPagination === !0 && e.itemsPerPage && p.count && ($e.value = Math.ceil(p.count / e.itemsPerPage)), e.onGetSuccessAsync != null && (ge = await e.onGetSuccessAsync(ge, de)), ge;
|
|
3939
3939
|
}
|
|
3940
3940
|
});
|
|
3941
3941
|
A.value = V, i.value = [...I.value];
|
|
@@ -3944,20 +3944,21 @@ function Da(e, t, l) {
|
|
|
3944
3944
|
}
|
|
3945
3945
|
function Je(U, j) {
|
|
3946
3946
|
const V = K(U);
|
|
3947
|
-
if (V != null && V ===
|
|
3947
|
+
if (V != null && V === O && e.canUnselect ? O = null : O = V, e.canSelect == !0 && (e.onCanSelectItem == null || e.onCanSelectItem(V)))
|
|
3948
3948
|
if (e.onSelectItem != null)
|
|
3949
|
-
e.onSelectItem(
|
|
3949
|
+
e.onSelectItem(O);
|
|
3950
3950
|
else {
|
|
3951
|
-
let
|
|
3951
|
+
let p = {
|
|
3952
3952
|
bladeName: e.itemBladeName,
|
|
3953
3953
|
id: V.id,
|
|
3954
3954
|
nav: $
|
|
3955
3955
|
};
|
|
3956
3956
|
j == "page" && g.push({
|
|
3957
|
-
name:
|
|
3958
|
-
params: { id:
|
|
3957
|
+
name: p.bladeName,
|
|
3958
|
+
params: { id: p.id }
|
|
3959
3959
|
});
|
|
3960
3960
|
}
|
|
3961
|
+
t != null && (t("select", O), t("confirm", O));
|
|
3961
3962
|
}
|
|
3962
3963
|
function je() {
|
|
3963
3964
|
Ee.value ? (Ee.value = e.showSearch ?? !1, T.value = void 0, Ie()) : Ee.value = e.showSearch ?? !0;
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED