dn-react-router-toolkit 0.7.11 → 0.7.13
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/api/create_handler.js +2 -2
- package/dist/api/create_handler.mjs +2 -2
- package/dist/api/index.js +2 -2
- package/dist/api/index.mjs +2 -2
- package/dist/auth/{cookie_store.d.mts → cookie_manager.d.mts} +2 -2
- package/dist/auth/{cookie_store.d.ts → cookie_manager.d.ts} +2 -2
- package/dist/auth/{cookie_store.js → cookie_manager.js} +5 -5
- package/dist/auth/{cookie_store.mjs → cookie_manager.mjs} +2 -2
- package/dist/auth/index.d.mts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +3 -3
- package/dist/auth/index.mjs +3 -3
- package/dist/auth/with_auth.js +1 -1
- package/dist/auth/with_auth.mjs +1 -1
- package/dist/crud/crud_page.js +12 -3
- package/dist/crud/crud_page.mjs +12 -3
- package/dist/crud/index.js +12 -3
- package/dist/crud/index.mjs +12 -3
- package/dist/table/buttons.d.mts +1 -1
- package/dist/table/buttons.d.ts +1 -1
- package/dist/table/buttons.js +17 -4
- package/dist/table/buttons.mjs +13 -4
- package/dist/table/index.d.mts +2 -1
- package/dist/table/index.d.ts +2 -1
- package/dist/table/index.js +14 -3
- package/dist/table/index.mjs +13 -3
- package/dist/table/page.js +12 -3
- package/dist/table/page.mjs +12 -3
- package/package.json +3 -3
|
@@ -70,7 +70,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
70
70
|
return respond(payload, headers);
|
|
71
71
|
} catch (e) {
|
|
72
72
|
console.log(e);
|
|
73
|
-
const setCookieHeader = await authService.getRefreshTokenSetCookie(
|
|
73
|
+
const setCookieHeader = await authService.getRefreshTokenSetCookie(void 0);
|
|
74
74
|
const headers = new Headers();
|
|
75
75
|
headers.append("Set-Cookie", setCookieHeader);
|
|
76
76
|
return respond(void 0, headers);
|
|
@@ -82,7 +82,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
// src/auth/
|
|
85
|
+
// src/auth/cookie_manager.ts
|
|
86
86
|
var import_react_router = require("react-router");
|
|
87
87
|
|
|
88
88
|
// src/api/create_handler.ts
|
|
@@ -57,7 +57,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
57
57
|
return respond(payload, headers);
|
|
58
58
|
} catch (e) {
|
|
59
59
|
console.log(e);
|
|
60
|
-
const setCookieHeader = await authService.getRefreshTokenSetCookie(
|
|
60
|
+
const setCookieHeader = await authService.getRefreshTokenSetCookie(void 0);
|
|
61
61
|
const headers = new Headers();
|
|
62
62
|
headers.append("Set-Cookie", setCookieHeader);
|
|
63
63
|
return respond(void 0, headers);
|
|
@@ -69,7 +69,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
// src/auth/
|
|
72
|
+
// src/auth/cookie_manager.ts
|
|
73
73
|
import { createCookie } from "react-router";
|
|
74
74
|
|
|
75
75
|
// src/api/create_handler.ts
|
package/dist/api/index.js
CHANGED
|
@@ -74,7 +74,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
74
74
|
return respond(payload, headers);
|
|
75
75
|
} catch (e) {
|
|
76
76
|
console.log(e);
|
|
77
|
-
const setCookieHeader = await authService.getRefreshTokenSetCookie(
|
|
77
|
+
const setCookieHeader = await authService.getRefreshTokenSetCookie(void 0);
|
|
78
78
|
const headers = new Headers();
|
|
79
79
|
headers.append("Set-Cookie", setCookieHeader);
|
|
80
80
|
return respond(void 0, headers);
|
|
@@ -86,7 +86,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
// src/auth/
|
|
89
|
+
// src/auth/cookie_manager.ts
|
|
90
90
|
var import_react_router = require("react-router");
|
|
91
91
|
|
|
92
92
|
// src/api/create_handler.ts
|
package/dist/api/index.mjs
CHANGED
|
@@ -57,7 +57,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
57
57
|
return respond(payload, headers);
|
|
58
58
|
} catch (e) {
|
|
59
59
|
console.log(e);
|
|
60
|
-
const setCookieHeader = await authService.getRefreshTokenSetCookie(
|
|
60
|
+
const setCookieHeader = await authService.getRefreshTokenSetCookie(void 0);
|
|
61
61
|
const headers = new Headers();
|
|
62
62
|
headers.append("Set-Cookie", setCookieHeader);
|
|
63
63
|
return respond(void 0, headers);
|
|
@@ -69,7 +69,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
// src/auth/
|
|
72
|
+
// src/auth/cookie_manager.ts
|
|
73
73
|
import { createCookie } from "react-router";
|
|
74
74
|
|
|
75
75
|
// src/api/create_handler.ts
|
|
@@ -6,8 +6,8 @@ declare class ReactRouterCookieManager implements CookieManager {
|
|
|
6
6
|
options: SerializeOptions;
|
|
7
7
|
private cookie;
|
|
8
8
|
constructor(name: string);
|
|
9
|
-
parse(request: Request, parseOptions?: ParseOptions | undefined): Promise<string |
|
|
10
|
-
serialize(value: string |
|
|
9
|
+
parse(request: Request, parseOptions?: ParseOptions | undefined): Promise<string | undefined>;
|
|
10
|
+
serialize(value: string | undefined, serializeOptions?: SerializeOptions | undefined): Promise<string>;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export { ReactRouterCookieManager };
|
|
@@ -6,8 +6,8 @@ declare class ReactRouterCookieManager implements CookieManager {
|
|
|
6
6
|
options: SerializeOptions;
|
|
7
7
|
private cookie;
|
|
8
8
|
constructor(name: string);
|
|
9
|
-
parse(request: Request, parseOptions?: ParseOptions | undefined): Promise<string |
|
|
10
|
-
serialize(value: string |
|
|
9
|
+
parse(request: Request, parseOptions?: ParseOptions | undefined): Promise<string | undefined>;
|
|
10
|
+
serialize(value: string | undefined, serializeOptions?: SerializeOptions | undefined): Promise<string>;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export { ReactRouterCookieManager };
|
|
@@ -17,12 +17,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/auth/
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
20
|
+
// src/auth/cookie_manager.ts
|
|
21
|
+
var cookie_manager_exports = {};
|
|
22
|
+
__export(cookie_manager_exports, {
|
|
23
23
|
ReactRouterCookieManager: () => ReactRouterCookieManager
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(cookie_manager_exports);
|
|
26
26
|
var import_react_router = require("react-router");
|
|
27
27
|
var ReactRouterCookieManager = class {
|
|
28
28
|
name;
|
|
@@ -40,7 +40,7 @@ var ReactRouterCookieManager = class {
|
|
|
40
40
|
}
|
|
41
41
|
async parse(request, parseOptions) {
|
|
42
42
|
const cookieStore = request.headers.get("cookie") || "";
|
|
43
|
-
return this.cookie.parse(cookieStore, parseOptions);
|
|
43
|
+
return this.cookie.parse(cookieStore, parseOptions) || void 0;
|
|
44
44
|
}
|
|
45
45
|
async serialize(value, serializeOptions) {
|
|
46
46
|
return this.cookie.serialize(value, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/auth/
|
|
1
|
+
// src/auth/cookie_manager.ts
|
|
2
2
|
import { createCookie } from "react-router";
|
|
3
3
|
var ReactRouterCookieManager = class {
|
|
4
4
|
name;
|
|
@@ -16,7 +16,7 @@ var ReactRouterCookieManager = class {
|
|
|
16
16
|
}
|
|
17
17
|
async parse(request, parseOptions) {
|
|
18
18
|
const cookieStore = request.headers.get("cookie") || "";
|
|
19
|
-
return this.cookie.parse(cookieStore, parseOptions);
|
|
19
|
+
return this.cookie.parse(cookieStore, parseOptions) || void 0;
|
|
20
20
|
}
|
|
21
21
|
async serialize(value, serializeOptions) {
|
|
22
22
|
return this.cookie.serialize(value, {
|
package/dist/auth/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { WithAuthHandler, createWithStrictAuthHandler } from './with_auth.mjs';
|
|
2
|
-
export { ReactRouterCookieManager } from './
|
|
2
|
+
export { ReactRouterCookieManager } from './cookie_manager.mjs';
|
|
3
3
|
import 'dn-react-toolkit/auth';
|
|
4
4
|
import 'dn-react-toolkit/auth/server';
|
|
5
5
|
import 'react-router';
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { WithAuthHandler, createWithStrictAuthHandler } from './with_auth.js';
|
|
2
|
-
export { ReactRouterCookieManager } from './
|
|
2
|
+
export { ReactRouterCookieManager } from './cookie_manager.js';
|
|
3
3
|
import 'dn-react-toolkit/auth';
|
|
4
4
|
import 'dn-react-toolkit/auth/server';
|
|
5
5
|
import 'react-router';
|
package/dist/auth/index.js
CHANGED
|
@@ -69,7 +69,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
69
69
|
return respond(payload, headers);
|
|
70
70
|
} catch (e) {
|
|
71
71
|
console.log(e);
|
|
72
|
-
const setCookieHeader = await authService.getRefreshTokenSetCookie(
|
|
72
|
+
const setCookieHeader = await authService.getRefreshTokenSetCookie(void 0);
|
|
73
73
|
const headers = new Headers();
|
|
74
74
|
headers.append("Set-Cookie", setCookieHeader);
|
|
75
75
|
return respond(void 0, headers);
|
|
@@ -81,7 +81,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
// src/auth/
|
|
84
|
+
// src/auth/cookie_manager.ts
|
|
85
85
|
var import_react_router = require("react-router");
|
|
86
86
|
var ReactRouterCookieManager = class {
|
|
87
87
|
name;
|
|
@@ -99,7 +99,7 @@ var ReactRouterCookieManager = class {
|
|
|
99
99
|
}
|
|
100
100
|
async parse(request, parseOptions) {
|
|
101
101
|
const cookieStore = request.headers.get("cookie") || "";
|
|
102
|
-
return this.cookie.parse(cookieStore, parseOptions);
|
|
102
|
+
return this.cookie.parse(cookieStore, parseOptions) || void 0;
|
|
103
103
|
}
|
|
104
104
|
async serialize(value, serializeOptions) {
|
|
105
105
|
return this.cookie.serialize(value, {
|
package/dist/auth/index.mjs
CHANGED
|
@@ -42,7 +42,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
42
42
|
return respond(payload, headers);
|
|
43
43
|
} catch (e) {
|
|
44
44
|
console.log(e);
|
|
45
|
-
const setCookieHeader = await authService.getRefreshTokenSetCookie(
|
|
45
|
+
const setCookieHeader = await authService.getRefreshTokenSetCookie(void 0);
|
|
46
46
|
const headers = new Headers();
|
|
47
47
|
headers.append("Set-Cookie", setCookieHeader);
|
|
48
48
|
return respond(void 0, headers);
|
|
@@ -54,7 +54,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
// src/auth/
|
|
57
|
+
// src/auth/cookie_manager.ts
|
|
58
58
|
import { createCookie } from "react-router";
|
|
59
59
|
var ReactRouterCookieManager = class {
|
|
60
60
|
name;
|
|
@@ -72,7 +72,7 @@ var ReactRouterCookieManager = class {
|
|
|
72
72
|
}
|
|
73
73
|
async parse(request, parseOptions) {
|
|
74
74
|
const cookieStore = request.headers.get("cookie") || "";
|
|
75
|
-
return this.cookie.parse(cookieStore, parseOptions);
|
|
75
|
+
return this.cookie.parse(cookieStore, parseOptions) || void 0;
|
|
76
76
|
}
|
|
77
77
|
async serialize(value, serializeOptions) {
|
|
78
78
|
return this.cookie.serialize(value, {
|
package/dist/auth/with_auth.js
CHANGED
|
@@ -66,7 +66,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
66
66
|
return respond(payload, headers);
|
|
67
67
|
} catch (e) {
|
|
68
68
|
console.log(e);
|
|
69
|
-
const setCookieHeader = await authService.getRefreshTokenSetCookie(
|
|
69
|
+
const setCookieHeader = await authService.getRefreshTokenSetCookie(void 0);
|
|
70
70
|
const headers = new Headers();
|
|
71
71
|
headers.append("Set-Cookie", setCookieHeader);
|
|
72
72
|
return respond(void 0, headers);
|
package/dist/auth/with_auth.mjs
CHANGED
|
@@ -42,7 +42,7 @@ function createWithStrictAuthHandler({ authService }) {
|
|
|
42
42
|
return respond(payload, headers);
|
|
43
43
|
} catch (e) {
|
|
44
44
|
console.log(e);
|
|
45
|
-
const setCookieHeader = await authService.getRefreshTokenSetCookie(
|
|
45
|
+
const setCookieHeader = await authService.getRefreshTokenSetCookie(void 0);
|
|
46
46
|
const headers = new Headers();
|
|
47
47
|
headers.append("Set-Cookie", setCookieHeader);
|
|
48
48
|
return respond(void 0, headers);
|
package/dist/crud/crud_page.js
CHANGED
|
@@ -199,7 +199,10 @@ function TablePageButtons({
|
|
|
199
199
|
import_react_router2.Link,
|
|
200
200
|
{
|
|
201
201
|
to: (() => {
|
|
202
|
-
searchParams.set(
|
|
202
|
+
searchParams.set(
|
|
203
|
+
"offset",
|
|
204
|
+
String((startButton - 1) * limit)
|
|
205
|
+
);
|
|
203
206
|
return `${pathname}?${searchParams.toString()}`;
|
|
204
207
|
})(),
|
|
205
208
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -207,7 +210,10 @@ function TablePageButtons({
|
|
|
207
210
|
}
|
|
208
211
|
),
|
|
209
212
|
Array.from({
|
|
210
|
-
length: Math.min(
|
|
213
|
+
length: Math.min(
|
|
214
|
+
MAX_PAGES_TO_SHOW,
|
|
215
|
+
pages - startButton
|
|
216
|
+
)
|
|
211
217
|
}).map((_, index) => {
|
|
212
218
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
213
219
|
import_react_router2.Link,
|
|
@@ -232,7 +238,10 @@ function TablePageButtons({
|
|
|
232
238
|
import_react_router2.Link,
|
|
233
239
|
{
|
|
234
240
|
to: (() => {
|
|
235
|
-
searchParams.set(
|
|
241
|
+
searchParams.set(
|
|
242
|
+
"offset",
|
|
243
|
+
String((endButton + 1) * limit)
|
|
244
|
+
);
|
|
236
245
|
return `${pathname}?${searchParams.toString()}`;
|
|
237
246
|
})(),
|
|
238
247
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
package/dist/crud/crud_page.mjs
CHANGED
|
@@ -184,7 +184,10 @@ function TablePageButtons({
|
|
|
184
184
|
Link,
|
|
185
185
|
{
|
|
186
186
|
to: (() => {
|
|
187
|
-
searchParams.set(
|
|
187
|
+
searchParams.set(
|
|
188
|
+
"offset",
|
|
189
|
+
String((startButton - 1) * limit)
|
|
190
|
+
);
|
|
188
191
|
return `${pathname}?${searchParams.toString()}`;
|
|
189
192
|
})(),
|
|
190
193
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -192,7 +195,10 @@ function TablePageButtons({
|
|
|
192
195
|
}
|
|
193
196
|
),
|
|
194
197
|
Array.from({
|
|
195
|
-
length: Math.min(
|
|
198
|
+
length: Math.min(
|
|
199
|
+
MAX_PAGES_TO_SHOW,
|
|
200
|
+
pages - startButton
|
|
201
|
+
)
|
|
196
202
|
}).map((_, index) => {
|
|
197
203
|
return /* @__PURE__ */ jsx2(
|
|
198
204
|
Link,
|
|
@@ -217,7 +223,10 @@ function TablePageButtons({
|
|
|
217
223
|
Link,
|
|
218
224
|
{
|
|
219
225
|
to: (() => {
|
|
220
|
-
searchParams.set(
|
|
226
|
+
searchParams.set(
|
|
227
|
+
"offset",
|
|
228
|
+
String((endButton + 1) * limit)
|
|
229
|
+
);
|
|
221
230
|
return `${pathname}?${searchParams.toString()}`;
|
|
222
231
|
})(),
|
|
223
232
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
package/dist/crud/index.js
CHANGED
|
@@ -8261,7 +8261,10 @@ function TablePageButtons({
|
|
|
8261
8261
|
import_react_router6.Link,
|
|
8262
8262
|
{
|
|
8263
8263
|
to: (() => {
|
|
8264
|
-
searchParams.set(
|
|
8264
|
+
searchParams.set(
|
|
8265
|
+
"offset",
|
|
8266
|
+
String((startButton - 1) * limit)
|
|
8267
|
+
);
|
|
8265
8268
|
return `${pathname}?${searchParams.toString()}`;
|
|
8266
8269
|
})(),
|
|
8267
8270
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -8269,7 +8272,10 @@ function TablePageButtons({
|
|
|
8269
8272
|
}
|
|
8270
8273
|
),
|
|
8271
8274
|
Array.from({
|
|
8272
|
-
length: Math.min(
|
|
8275
|
+
length: Math.min(
|
|
8276
|
+
MAX_PAGES_TO_SHOW,
|
|
8277
|
+
pages - startButton
|
|
8278
|
+
)
|
|
8273
8279
|
}).map((_, index2) => {
|
|
8274
8280
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
8275
8281
|
import_react_router6.Link,
|
|
@@ -8294,7 +8300,10 @@ function TablePageButtons({
|
|
|
8294
8300
|
import_react_router6.Link,
|
|
8295
8301
|
{
|
|
8296
8302
|
to: (() => {
|
|
8297
|
-
searchParams.set(
|
|
8303
|
+
searchParams.set(
|
|
8304
|
+
"offset",
|
|
8305
|
+
String((endButton + 1) * limit)
|
|
8306
|
+
);
|
|
8298
8307
|
return `${pathname}?${searchParams.toString()}`;
|
|
8299
8308
|
})(),
|
|
8300
8309
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
package/dist/crud/index.mjs
CHANGED
|
@@ -8265,7 +8265,10 @@ function TablePageButtons({
|
|
|
8265
8265
|
Link,
|
|
8266
8266
|
{
|
|
8267
8267
|
to: (() => {
|
|
8268
|
-
searchParams.set(
|
|
8268
|
+
searchParams.set(
|
|
8269
|
+
"offset",
|
|
8270
|
+
String((startButton - 1) * limit)
|
|
8271
|
+
);
|
|
8269
8272
|
return `${pathname}?${searchParams.toString()}`;
|
|
8270
8273
|
})(),
|
|
8271
8274
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -8273,7 +8276,10 @@ function TablePageButtons({
|
|
|
8273
8276
|
}
|
|
8274
8277
|
),
|
|
8275
8278
|
Array.from({
|
|
8276
|
-
length: Math.min(
|
|
8279
|
+
length: Math.min(
|
|
8280
|
+
MAX_PAGES_TO_SHOW,
|
|
8281
|
+
pages - startButton
|
|
8282
|
+
)
|
|
8277
8283
|
}).map((_, index2) => {
|
|
8278
8284
|
return /* @__PURE__ */ jsx7(
|
|
8279
8285
|
Link,
|
|
@@ -8298,7 +8304,10 @@ function TablePageButtons({
|
|
|
8298
8304
|
Link,
|
|
8299
8305
|
{
|
|
8300
8306
|
to: (() => {
|
|
8301
|
-
searchParams.set(
|
|
8307
|
+
searchParams.set(
|
|
8308
|
+
"offset",
|
|
8309
|
+
String((endButton + 1) * limit)
|
|
8310
|
+
);
|
|
8302
8311
|
return `${pathname}?${searchParams.toString()}`;
|
|
8303
8312
|
})(),
|
|
8304
8313
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
package/dist/table/buttons.d.mts
CHANGED
package/dist/table/buttons.d.ts
CHANGED
package/dist/table/buttons.js
CHANGED
|
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/table/buttons.tsx
|
|
21
21
|
var buttons_exports = {};
|
|
22
22
|
__export(buttons_exports, {
|
|
23
|
-
|
|
23
|
+
TablePageButtons: () => TablePageButtons
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(buttons_exports);
|
|
26
26
|
var import_utils = require("dn-react-toolkit/utils");
|
|
@@ -43,7 +43,10 @@ function TablePageButtons({
|
|
|
43
43
|
import_react_router.Link,
|
|
44
44
|
{
|
|
45
45
|
to: (() => {
|
|
46
|
-
searchParams.set(
|
|
46
|
+
searchParams.set(
|
|
47
|
+
"offset",
|
|
48
|
+
String((startButton - 1) * limit)
|
|
49
|
+
);
|
|
47
50
|
return `${pathname}?${searchParams.toString()}`;
|
|
48
51
|
})(),
|
|
49
52
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -51,7 +54,10 @@ function TablePageButtons({
|
|
|
51
54
|
}
|
|
52
55
|
),
|
|
53
56
|
Array.from({
|
|
54
|
-
length: Math.min(
|
|
57
|
+
length: Math.min(
|
|
58
|
+
MAX_PAGES_TO_SHOW,
|
|
59
|
+
pages - startButton
|
|
60
|
+
)
|
|
55
61
|
}).map((_, index) => {
|
|
56
62
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
63
|
import_react_router.Link,
|
|
@@ -76,7 +82,10 @@ function TablePageButtons({
|
|
|
76
82
|
import_react_router.Link,
|
|
77
83
|
{
|
|
78
84
|
to: (() => {
|
|
79
|
-
searchParams.set(
|
|
85
|
+
searchParams.set(
|
|
86
|
+
"offset",
|
|
87
|
+
String((endButton + 1) * limit)
|
|
88
|
+
);
|
|
80
89
|
return `${pathname}?${searchParams.toString()}`;
|
|
81
90
|
})(),
|
|
82
91
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -85,3 +94,7 @@ function TablePageButtons({
|
|
|
85
94
|
)
|
|
86
95
|
] }) });
|
|
87
96
|
}
|
|
97
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
98
|
+
0 && (module.exports = {
|
|
99
|
+
TablePageButtons
|
|
100
|
+
});
|
package/dist/table/buttons.mjs
CHANGED
|
@@ -19,7 +19,10 @@ function TablePageButtons({
|
|
|
19
19
|
Link,
|
|
20
20
|
{
|
|
21
21
|
to: (() => {
|
|
22
|
-
searchParams.set(
|
|
22
|
+
searchParams.set(
|
|
23
|
+
"offset",
|
|
24
|
+
String((startButton - 1) * limit)
|
|
25
|
+
);
|
|
23
26
|
return `${pathname}?${searchParams.toString()}`;
|
|
24
27
|
})(),
|
|
25
28
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -27,7 +30,10 @@ function TablePageButtons({
|
|
|
27
30
|
}
|
|
28
31
|
),
|
|
29
32
|
Array.from({
|
|
30
|
-
length: Math.min(
|
|
33
|
+
length: Math.min(
|
|
34
|
+
MAX_PAGES_TO_SHOW,
|
|
35
|
+
pages - startButton
|
|
36
|
+
)
|
|
31
37
|
}).map((_, index) => {
|
|
32
38
|
return /* @__PURE__ */ jsx(
|
|
33
39
|
Link,
|
|
@@ -52,7 +58,10 @@ function TablePageButtons({
|
|
|
52
58
|
Link,
|
|
53
59
|
{
|
|
54
60
|
to: (() => {
|
|
55
|
-
searchParams.set(
|
|
61
|
+
searchParams.set(
|
|
62
|
+
"offset",
|
|
63
|
+
String((endButton + 1) * limit)
|
|
64
|
+
);
|
|
56
65
|
return `${pathname}?${searchParams.toString()}`;
|
|
57
66
|
})(),
|
|
58
67
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -62,5 +71,5 @@ function TablePageButtons({
|
|
|
62
71
|
] }) });
|
|
63
72
|
}
|
|
64
73
|
export {
|
|
65
|
-
TablePageButtons
|
|
74
|
+
TablePageButtons
|
|
66
75
|
};
|
package/dist/table/index.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { BaseTableRepository, ColumnOf, FindAllOptions, InsertModelOf, SelectModelOf, TableRepository } from './repository.mjs';
|
|
2
|
+
export { TablePageButtons } from './buttons.mjs';
|
|
2
3
|
export { TableItemLoaderOptions, tableItemloader } from './item_loader.mjs';
|
|
3
4
|
export { TableLoaderOptions, tableLoader } from './loader.mjs';
|
|
4
5
|
export { TablePageOptions, TableProps, createTablePage } from './page.mjs';
|
|
5
6
|
export { OrderedTableProps, Table, TableColumnOptions, TableColumnProps } from './table.mjs';
|
|
6
7
|
import 'drizzle-orm';
|
|
7
8
|
import 'drizzle-orm/pg-core';
|
|
8
|
-
import 'react-router';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
|
+
import 'react-router';
|
|
10
11
|
import 'react';
|
package/dist/table/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { BaseTableRepository, ColumnOf, FindAllOptions, InsertModelOf, SelectModelOf, TableRepository } from './repository.js';
|
|
2
|
+
export { TablePageButtons } from './buttons.js';
|
|
2
3
|
export { TableItemLoaderOptions, tableItemloader } from './item_loader.js';
|
|
3
4
|
export { TableLoaderOptions, tableLoader } from './loader.js';
|
|
4
5
|
export { TablePageOptions, TableProps, createTablePage } from './page.js';
|
|
5
6
|
export { OrderedTableProps, Table, TableColumnOptions, TableColumnProps } from './table.js';
|
|
6
7
|
import 'drizzle-orm';
|
|
7
8
|
import 'drizzle-orm/pg-core';
|
|
8
|
-
import 'react-router';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
|
+
import 'react-router';
|
|
10
11
|
import 'react';
|
package/dist/table/index.js
CHANGED
|
@@ -22,6 +22,7 @@ var table_exports = {};
|
|
|
22
22
|
__export(table_exports, {
|
|
23
23
|
BaseTableRepository: () => BaseTableRepository,
|
|
24
24
|
Table: () => Table,
|
|
25
|
+
TablePageButtons: () => TablePageButtons,
|
|
25
26
|
createTablePage: () => createTablePage,
|
|
26
27
|
tableItemloader: () => tableItemloader,
|
|
27
28
|
tableLoader: () => tableLoader
|
|
@@ -98,7 +99,10 @@ function TablePageButtons({
|
|
|
98
99
|
import_react_router.Link,
|
|
99
100
|
{
|
|
100
101
|
to: (() => {
|
|
101
|
-
searchParams.set(
|
|
102
|
+
searchParams.set(
|
|
103
|
+
"offset",
|
|
104
|
+
String((startButton - 1) * limit)
|
|
105
|
+
);
|
|
102
106
|
return `${pathname}?${searchParams.toString()}`;
|
|
103
107
|
})(),
|
|
104
108
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -106,7 +110,10 @@ function TablePageButtons({
|
|
|
106
110
|
}
|
|
107
111
|
),
|
|
108
112
|
Array.from({
|
|
109
|
-
length: Math.min(
|
|
113
|
+
length: Math.min(
|
|
114
|
+
MAX_PAGES_TO_SHOW,
|
|
115
|
+
pages - startButton
|
|
116
|
+
)
|
|
110
117
|
}).map((_, index) => {
|
|
111
118
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
112
119
|
import_react_router.Link,
|
|
@@ -131,7 +138,10 @@ function TablePageButtons({
|
|
|
131
138
|
import_react_router.Link,
|
|
132
139
|
{
|
|
133
140
|
to: (() => {
|
|
134
|
-
searchParams.set(
|
|
141
|
+
searchParams.set(
|
|
142
|
+
"offset",
|
|
143
|
+
String((endButton + 1) * limit)
|
|
144
|
+
);
|
|
135
145
|
return `${pathname}?${searchParams.toString()}`;
|
|
136
146
|
})(),
|
|
137
147
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -400,6 +410,7 @@ function createTablePage({
|
|
|
400
410
|
0 && (module.exports = {
|
|
401
411
|
BaseTableRepository,
|
|
402
412
|
Table,
|
|
413
|
+
TablePageButtons,
|
|
403
414
|
createTablePage,
|
|
404
415
|
tableItemloader,
|
|
405
416
|
tableLoader
|
package/dist/table/index.mjs
CHANGED
|
@@ -73,7 +73,10 @@ function TablePageButtons({
|
|
|
73
73
|
Link,
|
|
74
74
|
{
|
|
75
75
|
to: (() => {
|
|
76
|
-
searchParams.set(
|
|
76
|
+
searchParams.set(
|
|
77
|
+
"offset",
|
|
78
|
+
String((startButton - 1) * limit)
|
|
79
|
+
);
|
|
77
80
|
return `${pathname}?${searchParams.toString()}`;
|
|
78
81
|
})(),
|
|
79
82
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -81,7 +84,10 @@ function TablePageButtons({
|
|
|
81
84
|
}
|
|
82
85
|
),
|
|
83
86
|
Array.from({
|
|
84
|
-
length: Math.min(
|
|
87
|
+
length: Math.min(
|
|
88
|
+
MAX_PAGES_TO_SHOW,
|
|
89
|
+
pages - startButton
|
|
90
|
+
)
|
|
85
91
|
}).map((_, index) => {
|
|
86
92
|
return /* @__PURE__ */ jsx(
|
|
87
93
|
Link,
|
|
@@ -106,7 +112,10 @@ function TablePageButtons({
|
|
|
106
112
|
Link,
|
|
107
113
|
{
|
|
108
114
|
to: (() => {
|
|
109
|
-
searchParams.set(
|
|
115
|
+
searchParams.set(
|
|
116
|
+
"offset",
|
|
117
|
+
String((endButton + 1) * limit)
|
|
118
|
+
);
|
|
110
119
|
return `${pathname}?${searchParams.toString()}`;
|
|
111
120
|
})(),
|
|
112
121
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -383,6 +392,7 @@ function createTablePage({
|
|
|
383
392
|
export {
|
|
384
393
|
BaseTableRepository,
|
|
385
394
|
Table,
|
|
395
|
+
TablePageButtons,
|
|
386
396
|
createTablePage,
|
|
387
397
|
tableItemloader,
|
|
388
398
|
tableLoader
|
package/dist/table/page.js
CHANGED
|
@@ -47,7 +47,10 @@ function TablePageButtons({
|
|
|
47
47
|
import_react_router.Link,
|
|
48
48
|
{
|
|
49
49
|
to: (() => {
|
|
50
|
-
searchParams.set(
|
|
50
|
+
searchParams.set(
|
|
51
|
+
"offset",
|
|
52
|
+
String((startButton - 1) * limit)
|
|
53
|
+
);
|
|
51
54
|
return `${pathname}?${searchParams.toString()}`;
|
|
52
55
|
})(),
|
|
53
56
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -55,7 +58,10 @@ function TablePageButtons({
|
|
|
55
58
|
}
|
|
56
59
|
),
|
|
57
60
|
Array.from({
|
|
58
|
-
length: Math.min(
|
|
61
|
+
length: Math.min(
|
|
62
|
+
MAX_PAGES_TO_SHOW,
|
|
63
|
+
pages - startButton
|
|
64
|
+
)
|
|
59
65
|
}).map((_, index) => {
|
|
60
66
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
67
|
import_react_router.Link,
|
|
@@ -80,7 +86,10 @@ function TablePageButtons({
|
|
|
80
86
|
import_react_router.Link,
|
|
81
87
|
{
|
|
82
88
|
to: (() => {
|
|
83
|
-
searchParams.set(
|
|
89
|
+
searchParams.set(
|
|
90
|
+
"offset",
|
|
91
|
+
String((endButton + 1) * limit)
|
|
92
|
+
);
|
|
84
93
|
return `${pathname}?${searchParams.toString()}`;
|
|
85
94
|
})(),
|
|
86
95
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
package/dist/table/page.mjs
CHANGED
|
@@ -29,7 +29,10 @@ function TablePageButtons({
|
|
|
29
29
|
Link,
|
|
30
30
|
{
|
|
31
31
|
to: (() => {
|
|
32
|
-
searchParams.set(
|
|
32
|
+
searchParams.set(
|
|
33
|
+
"offset",
|
|
34
|
+
String((startButton - 1) * limit)
|
|
35
|
+
);
|
|
33
36
|
return `${pathname}?${searchParams.toString()}`;
|
|
34
37
|
})(),
|
|
35
38
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
|
@@ -37,7 +40,10 @@ function TablePageButtons({
|
|
|
37
40
|
}
|
|
38
41
|
),
|
|
39
42
|
Array.from({
|
|
40
|
-
length: Math.min(
|
|
43
|
+
length: Math.min(
|
|
44
|
+
MAX_PAGES_TO_SHOW,
|
|
45
|
+
pages - startButton
|
|
46
|
+
)
|
|
41
47
|
}).map((_, index) => {
|
|
42
48
|
return /* @__PURE__ */ jsx(
|
|
43
49
|
Link,
|
|
@@ -62,7 +68,10 @@ function TablePageButtons({
|
|
|
62
68
|
Link,
|
|
63
69
|
{
|
|
64
70
|
to: (() => {
|
|
65
|
-
searchParams.set(
|
|
71
|
+
searchParams.set(
|
|
72
|
+
"offset",
|
|
73
|
+
String((endButton + 1) * limit)
|
|
74
|
+
);
|
|
66
75
|
return `${pathname}?${searchParams.toString()}`;
|
|
67
76
|
})(),
|
|
68
77
|
className: "w-10 block text-center transition-colors hover:text-primary",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dn-react-router-toolkit",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.13",
|
|
4
4
|
"types": "./dist/index.d.ts",
|
|
5
5
|
"main": "./dist/index.mjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"cookie": "^1.1.1",
|
|
90
|
-
"dn-react-text-editor": "^0.3.
|
|
91
|
-
"dn-react-toolkit": "^0.2.
|
|
90
|
+
"dn-react-text-editor": "^0.3.9",
|
|
91
|
+
"dn-react-toolkit": "^0.2.57",
|
|
92
92
|
"pg": "^8.19.0",
|
|
93
93
|
"react-icons": "^5.5.0",
|
|
94
94
|
"react-store-input": "^0.2.1",
|