mtxuilib 0.0.340 → 0.0.344
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/connectes/ConnectEs.cjs +43 -0
- package/dist/connectes/connectquery/call-unary-method.cjs +71 -0
- package/dist/connectes/connectquery/connect-query-key.cjs +40 -0
- package/dist/connectes/connectquery/create-use-infinite-query-options.cjs +112 -0
- package/dist/connectes/connectquery/create-use-query-options.cjs +96 -0
- package/dist/connectes/connectquery/default-options.cjs +43 -0
- package/dist/connectes/connectquery/index.cjs +65 -0
- package/dist/connectes/connectquery/method-unary-descriptor.cjs +16 -0
- package/dist/connectes/connectquery/use-infinite-query.cjs +107 -0
- package/dist/connectes/connectquery/use-mutation.cjs +101 -0
- package/dist/connectes/connectquery/use-query.cjs +95 -0
- package/dist/connectes/connectquery/use-transport.cjs +49 -0
- package/dist/connectes/connectquery/utils.cjs +51 -0
- package/dist/esm/connectes/ConnectEs.d.ts +9 -0
- package/dist/esm/connectes/ConnectEs.js +1 -0
- package/dist/esm/connectes/connectquery/call-unary-method.d.ts +8 -0
- package/dist/esm/connectes/connectquery/call-unary-method.js +1 -0
- package/dist/esm/connectes/connectquery/connect-query-key.d.ts +16 -0
- package/dist/esm/connectes/connectquery/connect-query-key.js +1 -0
- package/dist/esm/connectes/connectquery/create-use-infinite-query-options.d.ts +21 -0
- package/dist/esm/connectes/connectquery/create-use-infinite-query-options.js +1 -0
- package/dist/esm/connectes/connectquery/create-use-query-options.d.ts +19 -0
- package/dist/esm/connectes/connectquery/create-use-query-options.js +1 -0
- package/dist/esm/connectes/connectquery/default-options.d.ts +6 -0
- package/dist/esm/connectes/connectquery/default-options.js +1 -0
- package/dist/esm/connectes/connectquery/index.d.ts +16 -0
- package/dist/esm/connectes/connectquery/index.js +1 -0
- package/dist/esm/connectes/connectquery/method-unary-descriptor.d.ts +4 -0
- package/dist/esm/connectes/connectquery/method-unary-descriptor.js +0 -0
- package/dist/esm/connectes/connectquery/use-infinite-query.d.ts +12 -0
- package/dist/esm/connectes/connectquery/use-infinite-query.js +1 -0
- package/dist/esm/connectes/connectquery/use-mutation.d.ts +10 -0
- package/dist/esm/connectes/connectquery/use-mutation.js +1 -0
- package/dist/esm/connectes/connectquery/use-query.d.ts +12 -0
- package/dist/esm/connectes/connectquery/use-query.js +1 -0
- package/dist/esm/connectes/connectquery/use-transport.d.ts +7 -0
- package/dist/esm/connectes/connectquery/use-transport.js +1 -0
- package/dist/esm/connectes/connectquery/utils.d.ts +12 -0
- package/dist/esm/connectes/connectquery/utils.js +1 -0
- package/dist/esm/lib/strings.d.ts +3 -0
- package/dist/esm/lib/strings.js +1 -0
- package/dist/esm/lib/time.d.ts +2 -0
- package/dist/esm/lib/time.js +1 -0
- package/dist/esm/ui/novel/tailwind/utils.d.ts +1 -1
- package/dist/esm/video-player/mt-video-player.d.ts +7 -0
- package/dist/esm/video-player/mt-video-player.js +1 -0
- package/dist/esm/video-player/video-player2/modal-video-player.d.ts +13 -0
- package/dist/esm/video-player/video-player2/modal-video-player.js +1 -0
- package/dist/lib/strings.cjs +34 -0
- package/dist/lib/time.cjs +31 -0
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/dist/video-player/mt-video-player.cjs +70 -0
- package/dist/video-player/video-player2/modal-video-player.cjs +95 -0
- package/package.json +12 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var ConnectEs_exports = {};
|
|
21
|
+
__export(ConnectEs_exports, {
|
|
22
|
+
ConnectLoadIfNoDefaultValues: () => ConnectLoadIfNoDefaultValues
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(ConnectEs_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_connectquery = require("./connectquery");
|
|
28
|
+
function ConnectLoadIfNoDefaultValues(props) {
|
|
29
|
+
const { defauleValues, methodSig, params, children } = props;
|
|
30
|
+
if (!defauleValues) {
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: "loading4" }), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Load, { methodSig, params, children }) });
|
|
32
|
+
}
|
|
33
|
+
return children(defauleValues);
|
|
34
|
+
}
|
|
35
|
+
function Load(props) {
|
|
36
|
+
const { methodSig, params, children } = props;
|
|
37
|
+
const query = (0, import_connectquery.useSuspenseQuery)(methodSig, params);
|
|
38
|
+
return children && children(query.data);
|
|
39
|
+
}
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
ConnectLoadIfNoDefaultValues
|
|
43
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __async = (__this, __arguments, generator) => {
|
|
20
|
+
return new Promise((resolve, reject) => {
|
|
21
|
+
var fulfilled = (value) => {
|
|
22
|
+
try {
|
|
23
|
+
step(generator.next(value));
|
|
24
|
+
} catch (e) {
|
|
25
|
+
reject(e);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var rejected = (value) => {
|
|
29
|
+
try {
|
|
30
|
+
step(generator.throw(value));
|
|
31
|
+
} catch (e) {
|
|
32
|
+
reject(e);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
36
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var call_unary_method_exports = {};
|
|
40
|
+
__export(call_unary_method_exports, {
|
|
41
|
+
callUnaryMethod: () => callUnaryMethod
|
|
42
|
+
});
|
|
43
|
+
module.exports = __toCommonJS(call_unary_method_exports);
|
|
44
|
+
var import_protobuf = require("@bufbuild/protobuf");
|
|
45
|
+
function callUnaryMethod(_0, _1, _2) {
|
|
46
|
+
return __async(this, arguments, function* (methodType, input, {
|
|
47
|
+
callOptions,
|
|
48
|
+
transport
|
|
49
|
+
}) {
|
|
50
|
+
try {
|
|
51
|
+
const result = yield transport.unary(
|
|
52
|
+
{ typeName: methodType.service.typeName, methods: {} },
|
|
53
|
+
methodType,
|
|
54
|
+
callOptions == null ? void 0 : callOptions.signal,
|
|
55
|
+
callOptions == null ? void 0 : callOptions.timeoutMs,
|
|
56
|
+
callOptions == null ? void 0 : callOptions.headers,
|
|
57
|
+
input != null ? input : {}
|
|
58
|
+
);
|
|
59
|
+
return (0, import_protobuf.toPlainMessage)(result.message);
|
|
60
|
+
} catch (e) {
|
|
61
|
+
return {
|
|
62
|
+
error_message: e == null ? void 0 : e.toString(),
|
|
63
|
+
error_code: "unary_call_error"
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
callUnaryMethod
|
|
71
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var connect_query_key_exports = {};
|
|
20
|
+
__export(connect_query_key_exports, {
|
|
21
|
+
createConnectInfiniteQueryKey: () => createConnectInfiniteQueryKey,
|
|
22
|
+
createConnectQueryKey: () => createConnectQueryKey
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(connect_query_key_exports);
|
|
25
|
+
var import_utils = require("./utils");
|
|
26
|
+
function createConnectQueryKey(methodDescriptor, input) {
|
|
27
|
+
return [
|
|
28
|
+
methodDescriptor.service.typeName,
|
|
29
|
+
methodDescriptor.name,
|
|
30
|
+
input === import_utils.disableQuery || !input ? {} : input
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
function createConnectInfiniteQueryKey(methodDescriptor, input) {
|
|
34
|
+
return [...createConnectQueryKey(methodDescriptor, input), "infinite"];
|
|
35
|
+
}
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
createConnectInfiniteQueryKey,
|
|
39
|
+
createConnectQueryKey
|
|
40
|
+
});
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __export = (target, all) => {
|
|
24
|
+
for (var name in all)
|
|
25
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
+
for (let key of __getOwnPropNames(from))
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
+
var __async = (__this, __arguments, generator) => {
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
var fulfilled = (value) => {
|
|
39
|
+
try {
|
|
40
|
+
step(generator.next(value));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var rejected = (value) => {
|
|
46
|
+
try {
|
|
47
|
+
step(generator.throw(value));
|
|
48
|
+
} catch (e) {
|
|
49
|
+
reject(e);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
53
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
var create_use_infinite_query_options_exports = {};
|
|
57
|
+
__export(create_use_infinite_query_options_exports, {
|
|
58
|
+
createUseInfiniteQueryOptions: () => createUseInfiniteQueryOptions
|
|
59
|
+
});
|
|
60
|
+
module.exports = __toCommonJS(create_use_infinite_query_options_exports);
|
|
61
|
+
var import_call_unary_method = require("./call-unary-method");
|
|
62
|
+
var import_connect_query_key = require("./connect-query-key");
|
|
63
|
+
var import_utils = require("./utils");
|
|
64
|
+
function createUnaryInfiniteQueryFn(methodType, input, {
|
|
65
|
+
callOptions,
|
|
66
|
+
transport,
|
|
67
|
+
pageParamKey
|
|
68
|
+
}) {
|
|
69
|
+
return (context) => __async(this, null, function* () {
|
|
70
|
+
var _a;
|
|
71
|
+
(0, import_utils.assert)(input !== import_utils.disableQuery, "Disabled query cannot be fetched");
|
|
72
|
+
(0, import_utils.assert)("pageParam" in context, "pageParam must be part of context");
|
|
73
|
+
const inputCombinedWithPageParam = __spreadProps(__spreadValues({}, input), {
|
|
74
|
+
[pageParamKey]: context.pageParam
|
|
75
|
+
});
|
|
76
|
+
console.log("callUnaryMothod", inputCombinedWithPageParam);
|
|
77
|
+
return (0, import_call_unary_method.callUnaryMethod)(methodType, inputCombinedWithPageParam, {
|
|
78
|
+
callOptions: __spreadProps(__spreadValues({}, callOptions), {
|
|
79
|
+
signal: (_a = callOptions == null ? void 0 : callOptions.signal) != null ? _a : context.signal
|
|
80
|
+
}),
|
|
81
|
+
transport
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function createUseInfiniteQueryOptions(methodSig, input, {
|
|
86
|
+
transport,
|
|
87
|
+
getNextPageParam,
|
|
88
|
+
pageParamKey,
|
|
89
|
+
callOptions
|
|
90
|
+
}) {
|
|
91
|
+
const queryKey = (0, import_connect_query_key.createConnectInfiniteQueryKey)(
|
|
92
|
+
methodSig,
|
|
93
|
+
input === import_utils.disableQuery ? void 0 : __spreadProps(__spreadValues({}, input), {
|
|
94
|
+
[pageParamKey]: void 0
|
|
95
|
+
})
|
|
96
|
+
);
|
|
97
|
+
return {
|
|
98
|
+
getNextPageParam,
|
|
99
|
+
initialPageParam: input === import_utils.disableQuery ? void 0 : input[pageParamKey],
|
|
100
|
+
queryKey,
|
|
101
|
+
queryFn: createUnaryInfiniteQueryFn(methodSig, input, {
|
|
102
|
+
transport,
|
|
103
|
+
callOptions,
|
|
104
|
+
pageParamKey
|
|
105
|
+
}),
|
|
106
|
+
enabled: input !== import_utils.disableQuery
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
110
|
+
0 && (module.exports = {
|
|
111
|
+
createUseInfiniteQueryOptions
|
|
112
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __export = (target, all) => {
|
|
24
|
+
for (var name in all)
|
|
25
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
+
for (let key of __getOwnPropNames(from))
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
+
var __async = (__this, __arguments, generator) => {
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
var fulfilled = (value) => {
|
|
39
|
+
try {
|
|
40
|
+
step(generator.next(value));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var rejected = (value) => {
|
|
46
|
+
try {
|
|
47
|
+
step(generator.throw(value));
|
|
48
|
+
} catch (e) {
|
|
49
|
+
reject(e);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
53
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
var create_use_query_options_exports = {};
|
|
57
|
+
__export(create_use_query_options_exports, {
|
|
58
|
+
createUseQueryOptions: () => createUseQueryOptions
|
|
59
|
+
});
|
|
60
|
+
module.exports = __toCommonJS(create_use_query_options_exports);
|
|
61
|
+
var import_call_unary_method = require("./call-unary-method");
|
|
62
|
+
var import_connect_query_key = require("./connect-query-key");
|
|
63
|
+
var import_utils = require("./utils");
|
|
64
|
+
function createUnaryQueryFn(methodType, input, {
|
|
65
|
+
callOptions,
|
|
66
|
+
transport
|
|
67
|
+
}) {
|
|
68
|
+
return (context) => __async(this, null, function* () {
|
|
69
|
+
var _a;
|
|
70
|
+
(0, import_utils.assert)(input !== import_utils.disableQuery, "Disabled query cannot be fetched");
|
|
71
|
+
return (0, import_call_unary_method.callUnaryMethod)(methodType, input, {
|
|
72
|
+
callOptions: __spreadProps(__spreadValues({}, callOptions), {
|
|
73
|
+
signal: (_a = callOptions == null ? void 0 : callOptions.signal) != null ? _a : context.signal
|
|
74
|
+
}),
|
|
75
|
+
transport
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function createUseQueryOptions(methodSig, input, {
|
|
80
|
+
transport,
|
|
81
|
+
callOptions
|
|
82
|
+
}) {
|
|
83
|
+
const queryKey = (0, import_connect_query_key.createConnectQueryKey)(methodSig, input);
|
|
84
|
+
return {
|
|
85
|
+
queryKey,
|
|
86
|
+
queryFn: createUnaryQueryFn(methodSig, input, {
|
|
87
|
+
transport,
|
|
88
|
+
callOptions
|
|
89
|
+
}),
|
|
90
|
+
enabled: input !== import_utils.disableQuery
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
94
|
+
0 && (module.exports = {
|
|
95
|
+
createUseQueryOptions
|
|
96
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var default_options_exports = {};
|
|
30
|
+
__export(default_options_exports, {
|
|
31
|
+
defaultOptions: () => defaultOptions
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(default_options_exports);
|
|
34
|
+
var import_stable_hash = __toESM(require("stable-hash"), 1);
|
|
35
|
+
const defaultOptions = {
|
|
36
|
+
queries: {
|
|
37
|
+
queryKeyHashFn: import_stable_hash.default
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
defaultOptions
|
|
43
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var connectquery_exports = {};
|
|
20
|
+
__export(connectquery_exports, {
|
|
21
|
+
TransportProvider: () => import_use_transport.TransportProvider,
|
|
22
|
+
callUnaryMethod: () => import_call_unary_method.callUnaryMethod,
|
|
23
|
+
createConnectInfiniteQueryKey: () => import_connect_query_key.createConnectInfiniteQueryKey,
|
|
24
|
+
createConnectQueryKey: () => import_connect_query_key.createConnectQueryKey,
|
|
25
|
+
createInfiniteQueryOptions: () => import_create_use_infinite_query_options.createUseInfiniteQueryOptions,
|
|
26
|
+
createProtobufSafeUpdater: () => import_utils.createProtobufSafeUpdater,
|
|
27
|
+
createQueryOptions: () => import_create_use_query_options.createUseQueryOptions,
|
|
28
|
+
defaultOptions: () => import_default_options.defaultOptions,
|
|
29
|
+
disableQuery: () => import_utils.disableQuery,
|
|
30
|
+
useInfiniteQuery: () => import_use_infinite_query.useInfiniteQuery,
|
|
31
|
+
useMutation: () => import_use_mutation.useMutation,
|
|
32
|
+
useQuery: () => import_use_query.useQuery,
|
|
33
|
+
useSuspenseInfiniteQuery: () => import_use_infinite_query.useSuspenseInfiniteQuery,
|
|
34
|
+
useSuspenseQuery: () => import_use_query.useSuspenseQuery,
|
|
35
|
+
useTransport: () => import_use_transport.useTransport
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(connectquery_exports);
|
|
38
|
+
var import_call_unary_method = require("./call-unary-method");
|
|
39
|
+
var import_connect_query_key = require("./connect-query-key");
|
|
40
|
+
var import_create_use_infinite_query_options = require("./create-use-infinite-query-options");
|
|
41
|
+
var import_create_use_query_options = require("./create-use-query-options");
|
|
42
|
+
var import_default_options = require("./default-options");
|
|
43
|
+
var import_use_infinite_query = require("./use-infinite-query");
|
|
44
|
+
var import_use_mutation = require("./use-mutation");
|
|
45
|
+
var import_use_query = require("./use-query");
|
|
46
|
+
var import_use_transport = require("./use-transport");
|
|
47
|
+
var import_utils = require("./utils");
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
TransportProvider,
|
|
51
|
+
callUnaryMethod,
|
|
52
|
+
createConnectInfiniteQueryKey,
|
|
53
|
+
createConnectQueryKey,
|
|
54
|
+
createInfiniteQueryOptions,
|
|
55
|
+
createProtobufSafeUpdater,
|
|
56
|
+
createQueryOptions,
|
|
57
|
+
defaultOptions,
|
|
58
|
+
disableQuery,
|
|
59
|
+
useInfiniteQuery,
|
|
60
|
+
useMutation,
|
|
61
|
+
useQuery,
|
|
62
|
+
useSuspenseInfiniteQuery,
|
|
63
|
+
useSuspenseQuery,
|
|
64
|
+
useTransport
|
|
65
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var method_unary_descriptor_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(method_unary_descriptor_exports);
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
var __export = (target, all) => {
|
|
36
|
+
for (var name in all)
|
|
37
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
38
|
+
};
|
|
39
|
+
var __copyProps = (to, from, except, desc) => {
|
|
40
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
+
for (let key of __getOwnPropNames(from))
|
|
42
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
+
}
|
|
45
|
+
return to;
|
|
46
|
+
};
|
|
47
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
|
+
var use_infinite_query_exports = {};
|
|
49
|
+
__export(use_infinite_query_exports, {
|
|
50
|
+
useInfiniteQuery: () => useInfiniteQuery,
|
|
51
|
+
useSuspenseInfiniteQuery: () => useSuspenseInfiniteQuery
|
|
52
|
+
});
|
|
53
|
+
module.exports = __toCommonJS(use_infinite_query_exports);
|
|
54
|
+
var import_react_query = require("@tanstack/react-query");
|
|
55
|
+
var import_create_use_infinite_query_options = require("./create-use-infinite-query-options");
|
|
56
|
+
var import_use_transport = require("./use-transport");
|
|
57
|
+
function useInfiniteQuery(methodSig, input, _a) {
|
|
58
|
+
var _b = _a, {
|
|
59
|
+
transport,
|
|
60
|
+
callOptions,
|
|
61
|
+
pageParamKey,
|
|
62
|
+
getNextPageParam
|
|
63
|
+
} = _b, options = __objRest(_b, [
|
|
64
|
+
"transport",
|
|
65
|
+
"callOptions",
|
|
66
|
+
"pageParamKey",
|
|
67
|
+
"getNextPageParam"
|
|
68
|
+
]);
|
|
69
|
+
var _a2;
|
|
70
|
+
const transportFromCtx = (0, import_use_transport.useTransport)();
|
|
71
|
+
const baseOptions = (0, import_create_use_infinite_query_options.createUseInfiniteQueryOptions)(methodSig, input, {
|
|
72
|
+
transport: transport != null ? transport : transportFromCtx,
|
|
73
|
+
getNextPageParam,
|
|
74
|
+
pageParamKey,
|
|
75
|
+
callOptions
|
|
76
|
+
});
|
|
77
|
+
const enabled = baseOptions.enabled && ((_a2 = options.enabled) != null ? _a2 : true);
|
|
78
|
+
return (0, import_react_query.useInfiniteQuery)(__spreadProps(__spreadValues(__spreadValues({}, options), baseOptions), {
|
|
79
|
+
enabled
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
function useSuspenseInfiniteQuery(methodSig, input, _c) {
|
|
83
|
+
var _d = _c, {
|
|
84
|
+
transport,
|
|
85
|
+
callOptions,
|
|
86
|
+
pageParamKey,
|
|
87
|
+
getNextPageParam
|
|
88
|
+
} = _d, options = __objRest(_d, [
|
|
89
|
+
"transport",
|
|
90
|
+
"callOptions",
|
|
91
|
+
"pageParamKey",
|
|
92
|
+
"getNextPageParam"
|
|
93
|
+
]);
|
|
94
|
+
const transportFromCtx = (0, import_use_transport.useTransport)();
|
|
95
|
+
const baseOptions = (0, import_create_use_infinite_query_options.createUseInfiniteQueryOptions)(methodSig, input, {
|
|
96
|
+
transport: transport != null ? transport : transportFromCtx,
|
|
97
|
+
getNextPageParam,
|
|
98
|
+
pageParamKey,
|
|
99
|
+
callOptions
|
|
100
|
+
});
|
|
101
|
+
return (0, import_react_query.useSuspenseInfiniteQuery)(__spreadValues(__spreadValues({}, options), baseOptions));
|
|
102
|
+
}
|
|
103
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
104
|
+
0 && (module.exports = {
|
|
105
|
+
useInfiniteQuery,
|
|
106
|
+
useSuspenseInfiniteQuery
|
|
107
|
+
});
|