@katlux/providers 0.1.1-alpha.129 → 0.1.1-alpha.130
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/index.cjs +8 -6
- package/dist/index.d.cts +360 -353
- package/dist/index.d.mts +360 -353
- package/dist/index.d.ts +360 -353
- package/dist/index.mjs +8 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as crypto$1 from 'node:crypto';
|
|
2
2
|
import { $fetch } from 'ofetch';
|
|
3
3
|
|
|
4
|
-
const DECRYPT_ERROR_SENTINEL = Symbol.for("katlux.decrypt_error");
|
|
5
|
-
|
|
6
4
|
var EDataFilterOperator = /* @__PURE__ */ ((EDataFilterOperator2) => {
|
|
7
5
|
EDataFilterOperator2["Equal"] = "==";
|
|
8
6
|
EDataFilterOperator2["NotEqual"] = "!=";
|
|
@@ -18,6 +16,7 @@ var EDataFilterOperator = /* @__PURE__ */ ((EDataFilterOperator2) => {
|
|
|
18
16
|
EDataFilterOperator2["Nor"] = "nor";
|
|
19
17
|
return EDataFilterOperator2;
|
|
20
18
|
})(EDataFilterOperator || {});
|
|
19
|
+
|
|
21
20
|
var ECacheStrategy = /* @__PURE__ */ ((ECacheStrategy2) => {
|
|
22
21
|
ECacheStrategy2["Application"] = "Application";
|
|
23
22
|
ECacheStrategy2["ServerSession"] = "ServerSession";
|
|
@@ -28,6 +27,7 @@ var ECacheStrategy = /* @__PURE__ */ ((ECacheStrategy2) => {
|
|
|
28
27
|
ECacheStrategy2["Cookie"] = "Cookie";
|
|
29
28
|
return ECacheStrategy2;
|
|
30
29
|
})(ECacheStrategy || {});
|
|
30
|
+
|
|
31
31
|
var EQueueStorage = /* @__PURE__ */ ((EQueueStorage2) => {
|
|
32
32
|
EQueueStorage2["Memory"] = "Memory";
|
|
33
33
|
EQueueStorage2["LocalStorage"] = "LocalStorage";
|
|
@@ -35,6 +35,8 @@ var EQueueStorage = /* @__PURE__ */ ((EQueueStorage2) => {
|
|
|
35
35
|
return EQueueStorage2;
|
|
36
36
|
})(EQueueStorage || {});
|
|
37
37
|
|
|
38
|
+
const DECRYPT_ERROR_SENTINEL = Symbol.for("katlux.decrypt_error");
|
|
39
|
+
|
|
38
40
|
const useDebounce = (callback, delay) => {
|
|
39
41
|
let timeoutId = null;
|
|
40
42
|
const debounced = function(...args) {
|
|
@@ -9079,7 +9081,7 @@ class CAPIFlatClientDataProvider extends CFlatClientDataProvider {
|
|
|
9079
9081
|
if (this.refreshOnMutation) {
|
|
9080
9082
|
await this.refresh(true);
|
|
9081
9083
|
} else {
|
|
9082
|
-
if (result && result
|
|
9084
|
+
if (result && typeof result === "object" && "item" in result) {
|
|
9083
9085
|
this.allData = [...this.allData, result.item];
|
|
9084
9086
|
this.loadPageData();
|
|
9085
9087
|
} else {
|
|
@@ -9105,7 +9107,7 @@ class CAPIFlatClientDataProvider extends CFlatClientDataProvider {
|
|
|
9105
9107
|
} else {
|
|
9106
9108
|
const index = this.allData.findIndex((row) => row[this.idKey] === item[this.idKey]);
|
|
9107
9109
|
if (index !== -1) {
|
|
9108
|
-
if (result && result
|
|
9110
|
+
if (result && typeof result === "object" && "item" in result) {
|
|
9109
9111
|
this.allData[index] = result.item;
|
|
9110
9112
|
} else {
|
|
9111
9113
|
if (this.encryption?.enabled) {
|
|
@@ -10333,7 +10335,7 @@ class CAPITreeClientDataProvider extends CTreeClientDataProvider {
|
|
|
10333
10335
|
if (this.refreshOnMutation) {
|
|
10334
10336
|
await this.refresh(true);
|
|
10335
10337
|
} else {
|
|
10336
|
-
if (result && result
|
|
10338
|
+
if (result && typeof result === "object" && "item" in result) {
|
|
10337
10339
|
this.allData.push(result.item);
|
|
10338
10340
|
this.invalidateStaticCache();
|
|
10339
10341
|
this.loadPageData();
|
|
@@ -10360,7 +10362,7 @@ class CAPITreeClientDataProvider extends CTreeClientDataProvider {
|
|
|
10360
10362
|
} else {
|
|
10361
10363
|
const index = this.allData.findIndex((row) => row[this.idKey] === item[this.idKey]);
|
|
10362
10364
|
if (index !== -1) {
|
|
10363
|
-
if (result && result
|
|
10365
|
+
if (result && typeof result === "object" && "item" in result) {
|
|
10364
10366
|
this.allData[index] = result.item;
|
|
10365
10367
|
} else {
|
|
10366
10368
|
if (this.encryption?.enabled) {
|