dn-react-router-toolkit 0.7.14 → 0.7.15

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.
@@ -6,7 +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 | undefined>;
9
+ parseFromRequest(request: Request, parseOptions?: ParseOptions | undefined): Promise<string | undefined>;
10
+ parse(cookieHeader: string, parseOptions?: ParseOptions | undefined): Promise<string | undefined>;
10
11
  serialize(value: string | undefined, serializeOptions?: SerializeOptions | undefined): Promise<string>;
11
12
  }
12
13
 
@@ -6,7 +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 | undefined>;
9
+ parseFromRequest(request: Request, parseOptions?: ParseOptions | undefined): Promise<string | undefined>;
10
+ parse(cookieHeader: string, parseOptions?: ParseOptions | undefined): Promise<string | undefined>;
10
11
  serialize(value: string | undefined, serializeOptions?: SerializeOptions | undefined): Promise<string>;
11
12
  }
12
13
 
@@ -38,9 +38,15 @@ var ReactRouterCookieManager = class {
38
38
  };
39
39
  this.cookie = (0, import_react_router.createCookie)(this.name, this.options);
40
40
  }
41
- async parse(request, parseOptions) {
42
- const cookieStore = request.headers.get("cookie") || "";
43
- return this.cookie.parse(cookieStore, parseOptions) || void 0;
41
+ async parseFromRequest(request, parseOptions) {
42
+ const cookieHeader = request.headers.get("Cookie");
43
+ if (!cookieHeader) {
44
+ return void 0;
45
+ }
46
+ return this.parse(cookieHeader, parseOptions);
47
+ }
48
+ async parse(cookieHeader, parseOptions) {
49
+ return this.cookie.parse(cookieHeader, parseOptions) || void 0;
44
50
  }
45
51
  async serialize(value, serializeOptions) {
46
52
  return this.cookie.serialize(value, {
@@ -14,9 +14,15 @@ var ReactRouterCookieManager = class {
14
14
  };
15
15
  this.cookie = createCookie(this.name, this.options);
16
16
  }
17
- async parse(request, parseOptions) {
18
- const cookieStore = request.headers.get("cookie") || "";
19
- return this.cookie.parse(cookieStore, parseOptions) || void 0;
17
+ async parseFromRequest(request, parseOptions) {
18
+ const cookieHeader = request.headers.get("Cookie");
19
+ if (!cookieHeader) {
20
+ return void 0;
21
+ }
22
+ return this.parse(cookieHeader, parseOptions);
23
+ }
24
+ async parse(cookieHeader, parseOptions) {
25
+ return this.cookie.parse(cookieHeader, parseOptions) || void 0;
20
26
  }
21
27
  async serialize(value, serializeOptions) {
22
28
  return this.cookie.serialize(value, {
@@ -97,9 +97,15 @@ var ReactRouterCookieManager = class {
97
97
  };
98
98
  this.cookie = (0, import_react_router.createCookie)(this.name, this.options);
99
99
  }
100
- async parse(request, parseOptions) {
101
- const cookieStore = request.headers.get("cookie") || "";
102
- return this.cookie.parse(cookieStore, parseOptions) || void 0;
100
+ async parseFromRequest(request, parseOptions) {
101
+ const cookieHeader = request.headers.get("Cookie");
102
+ if (!cookieHeader) {
103
+ return void 0;
104
+ }
105
+ return this.parse(cookieHeader, parseOptions);
106
+ }
107
+ async parse(cookieHeader, parseOptions) {
108
+ return this.cookie.parse(cookieHeader, parseOptions) || void 0;
103
109
  }
104
110
  async serialize(value, serializeOptions) {
105
111
  return this.cookie.serialize(value, {
@@ -70,9 +70,15 @@ var ReactRouterCookieManager = class {
70
70
  };
71
71
  this.cookie = createCookie(this.name, this.options);
72
72
  }
73
- async parse(request, parseOptions) {
74
- const cookieStore = request.headers.get("cookie") || "";
75
- return this.cookie.parse(cookieStore, parseOptions) || void 0;
73
+ async parseFromRequest(request, parseOptions) {
74
+ const cookieHeader = request.headers.get("Cookie");
75
+ if (!cookieHeader) {
76
+ return void 0;
77
+ }
78
+ return this.parse(cookieHeader, parseOptions);
79
+ }
80
+ async parse(cookieHeader, parseOptions) {
81
+ return this.cookie.parse(cookieHeader, parseOptions) || void 0;
76
82
  }
77
83
  async serialize(value, serializeOptions) {
78
84
  return this.cookie.serialize(value, {
@@ -231,7 +231,7 @@ function CrudForm({
231
231
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FormRow, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(FormEntry, { children: [
232
232
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FormLabel, { children: value.label }, name),
233
233
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InputComponent, {})
234
- ] }) });
234
+ ] }) }, name);
235
235
  }
236
236
  ) }) })
237
237
  ] });
@@ -212,7 +212,7 @@ function CrudForm({
212
212
  return /* @__PURE__ */ jsx6(FormRow, { children: /* @__PURE__ */ jsxs2(FormEntry, { children: [
213
213
  /* @__PURE__ */ jsx6(FormLabel, { children: value.label }, name),
214
214
  /* @__PURE__ */ jsx6(InputComponent, {})
215
- ] }) });
215
+ ] }) }, name);
216
216
  }
217
217
  ) }) })
218
218
  ] });
@@ -640,7 +640,7 @@ function CrudForm({
640
640
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FormRow, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(FormEntry, { children: [
641
641
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FormLabel, { children: value.label }, name),
642
642
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(InputComponent, {})
643
- ] }) });
643
+ ] }) }, name);
644
644
  }
645
645
  ) }) })
646
646
  ] });
@@ -629,7 +629,7 @@ function CrudForm({
629
629
  return /* @__PURE__ */ jsx9(FormRow, { children: /* @__PURE__ */ jsxs5(FormEntry, { children: [
630
630
  /* @__PURE__ */ jsx9(FormLabel, { children: value.label }, name),
631
631
  /* @__PURE__ */ jsx9(InputComponent, {})
632
- ] }) });
632
+ ] }) }, name);
633
633
  }
634
634
  ) }) })
635
635
  ] });
@@ -7985,7 +7985,7 @@ function CrudForm({
7985
7985
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FormRow, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(FormEntry, { children: [
7986
7986
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FormLabel, { children: value.label }, name),
7987
7987
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InputComponent, {})
7988
- ] }) });
7988
+ ] }) }, name);
7989
7989
  }
7990
7990
  ) }) })
7991
7991
  ] });
@@ -7971,7 +7971,7 @@ function CrudForm({
7971
7971
  return /* @__PURE__ */ jsx6(FormRow, { children: /* @__PURE__ */ jsxs2(FormEntry, { children: [
7972
7972
  /* @__PURE__ */ jsx6(FormLabel, { children: value.label }, name),
7973
7973
  /* @__PURE__ */ jsx6(InputComponent, {})
7974
- ] }) });
7974
+ ] }) }, name);
7975
7975
  }
7976
7976
  ) }) })
7977
7977
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dn-react-router-toolkit",
3
- "version": "0.7.14",
3
+ "version": "0.7.15",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.mjs",
6
6
  "module": "./dist/index.js",
@@ -88,7 +88,7 @@
88
88
  "dependencies": {
89
89
  "cookie": "^1.1.1",
90
90
  "dn-react-text-editor": "^0.3.9",
91
- "dn-react-toolkit": "^0.2.57",
91
+ "dn-react-toolkit": "^0.2.59",
92
92
  "pg": "^8.19.0",
93
93
  "react-icons": "^5.5.0",
94
94
  "react-store-input": "^0.2.1",
@@ -100,4 +100,4 @@
100
100
  "react-dom": "^19",
101
101
  "react-router": "^7.13.1"
102
102
  }
103
- }
103
+ }