bt-core-app 1.4.556 → 1.4.557
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/bt-core-app.js +4 -2
- package/dist/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/bt-core-app.js
CHANGED
|
@@ -7304,7 +7304,8 @@ function yx(e) {
|
|
|
7304
7304
|
throw new Error("Must supply an api object to use store");
|
|
7305
7305
|
return wx({
|
|
7306
7306
|
...e,
|
|
7307
|
-
storeName: e.storeName ?? ""
|
|
7307
|
+
storeName: e.storeName ?? "",
|
|
7308
|
+
priority: (t == null ? void 0 : t.priority) ?? "local"
|
|
7308
7309
|
});
|
|
7309
7310
|
} else if (e.storeMode == "partial-last-updated") {
|
|
7310
7311
|
if (e.api == null)
|
|
@@ -7592,6 +7593,7 @@ function wx(e) {
|
|
|
7592
7593
|
nav: p.nav,
|
|
7593
7594
|
params: {
|
|
7594
7595
|
lastUpdate: i.value.lastUpdate ?? Ri()
|
|
7596
|
+
// lastUpdate: options.priority == 'server' ? undefined : meta.value.lastUpdate ?? getMinDateString()
|
|
7595
7597
|
}
|
|
7596
7598
|
}));
|
|
7597
7599
|
S == null ? C(S) : (t.value ?? (t.value = []), S.data.forEach((M) => {
|
|
@@ -7618,7 +7620,7 @@ function wx(e) {
|
|
|
7618
7620
|
data: t.value,
|
|
7619
7621
|
filters: []
|
|
7620
7622
|
};
|
|
7621
|
-
if (!w && l == !0) {
|
|
7623
|
+
if (!w && e.priority != "server" && l == !0) {
|
|
7622
7624
|
const M = await ha().getItem(T);
|
|
7623
7625
|
if (M != null && parseFloat(M.meta.storedOn) > a - 7)
|
|
7624
7626
|
return t.value = M.data, n.value = M.data.length, i.value = M.meta, {
|
package/dist/index.d.ts
CHANGED
|
@@ -1101,6 +1101,8 @@ export declare interface NavigationItem extends AuthItem {
|
|
|
1101
1101
|
pluWindowProp?: string;
|
|
1102
1102
|
/**for PLU stores only - defining how many days to bunch requests in */
|
|
1103
1103
|
pluDays?: number;
|
|
1104
|
+
/**whether to search for list locally or server first */
|
|
1105
|
+
priority?: 'server' | 'local';
|
|
1104
1106
|
/**default to true. When false will allow universal access regardless of permission */
|
|
1105
1107
|
requiresAuth?: boolean;
|
|
1106
1108
|
/**the name of the route to access individual items */
|
|
@@ -2108,6 +2110,8 @@ declare interface UseWholeLastUpdateStoreOptions {
|
|
|
2108
2110
|
getStorageKey?: (dOptions: GetStorageKeyOptions) => string;
|
|
2109
2111
|
/**used to select item. Default to x => x.id */
|
|
2110
2112
|
idSelector?: (item: any) => string;
|
|
2113
|
+
/**whether to search for list locally or server first */
|
|
2114
|
+
priority?: 'server' | 'local';
|
|
2111
2115
|
storageMode?: 'session' | 'local-cache';
|
|
2112
2116
|
storeName: string;
|
|
2113
2117
|
}
|
package/package.json
CHANGED