dn-react-router-toolkit 0.9.0 → 0.9.2

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.
Files changed (103) hide show
  1. package/dist/api/default_api_handler.d.mts +13 -0
  2. package/dist/api/default_api_handler.d.ts +13 -0
  3. package/dist/api/{create_handler.js → default_api_handler.js} +49 -52
  4. package/dist/api/{create_handler.mjs → default_api_handler.mjs} +45 -48
  5. package/dist/api/index.d.mts +8 -7
  6. package/dist/api/index.d.ts +8 -7
  7. package/dist/api/index.js +233 -147
  8. package/dist/api/index.mjs +238 -151
  9. package/dist/api/put_resource_handler.d.mts +25 -0
  10. package/dist/api/put_resource_handler.d.ts +25 -0
  11. package/dist/api/put_resource_handler.js +214 -0
  12. package/dist/api/put_resource_handler.mjs +194 -0
  13. package/dist/api/resource_handler.d.mts +26 -0
  14. package/dist/api/resource_handler.d.ts +26 -0
  15. package/dist/api/resource_handler.js +280 -0
  16. package/dist/api/resource_handler.mjs +265 -0
  17. package/dist/auth/cookie_manager.d.mts +1 -1
  18. package/dist/auth/cookie_manager.d.ts +1 -1
  19. package/dist/auth/index.d.mts +2 -2
  20. package/dist/auth/index.d.ts +2 -2
  21. package/dist/auth/index.js +18 -18
  22. package/dist/auth/index.mjs +18 -18
  23. package/dist/auth/with_auth.d.mts +2 -2
  24. package/dist/auth/with_auth.d.ts +2 -2
  25. package/dist/auth/with_auth.js +18 -18
  26. package/dist/auth/with_auth.mjs +18 -18
  27. package/dist/client/editor.d.mts +2 -2
  28. package/dist/client/editor.d.ts +2 -2
  29. package/dist/client/editor.js +9 -3
  30. package/dist/client/editor.mjs +9 -3
  31. package/dist/client/index.d.mts +2 -2
  32. package/dist/client/index.d.ts +2 -2
  33. package/dist/client/index.js +9 -3
  34. package/dist/client/index.mjs +9 -3
  35. package/dist/crud/crud_form.js +22 -4
  36. package/dist/crud/crud_form.mjs +11 -3
  37. package/dist/crud/crud_form_provider.js +16 -3
  38. package/dist/crud/crud_form_provider.mjs +14 -1
  39. package/dist/crud/index.js +22 -4
  40. package/dist/crud/index.mjs +11 -3
  41. package/dist/db/backup/index.d.mts +1 -1
  42. package/dist/db/backup/index.d.ts +1 -1
  43. package/dist/form/create_form_component.js +21 -2
  44. package/dist/form/create_form_component.mjs +10 -1
  45. package/dist/form/form_components.js +21 -2
  46. package/dist/form/form_components.mjs +10 -1
  47. package/dist/form/index.js +21 -2
  48. package/dist/form/index.mjs +10 -1
  49. package/dist/post/editor_toolbar.js +20 -3
  50. package/dist/post/editor_toolbar.mjs +9 -2
  51. package/dist/post/index.js +31 -11
  52. package/dist/post/index.mjs +19 -9
  53. package/dist/post/post_form_page.js +29 -11
  54. package/dist/post/post_form_page.mjs +17 -9
  55. package/dist/post/thumbnail_picker.js +21 -2
  56. package/dist/post/thumbnail_picker.mjs +10 -1
  57. package/dist/table/buttons.js +11 -14
  58. package/dist/table/buttons.mjs +10 -13
  59. package/dist/table/index.js +14 -18
  60. package/dist/table/index.mjs +13 -17
  61. package/dist/table/table.js +10 -4
  62. package/dist/table/table.mjs +5 -1
  63. package/dist/table/table_form.js +12 -18
  64. package/dist/table/table_form.mjs +9 -15
  65. package/dist/utils/cn.d.mts +3 -0
  66. package/dist/utils/cn.d.ts +3 -0
  67. package/dist/utils/cn.js +32 -0
  68. package/dist/utils/cn.mjs +7 -0
  69. package/dist/utils/date.d.mts +5 -0
  70. package/dist/utils/date.d.ts +5 -0
  71. package/dist/utils/date.js +65 -0
  72. package/dist/utils/date.mjs +29 -0
  73. package/dist/utils/index.d.mts +7 -0
  74. package/dist/utils/index.d.ts +7 -0
  75. package/dist/utils/index.js +116 -0
  76. package/dist/utils/index.mjs +73 -0
  77. package/dist/utils/korean.d.mts +6 -0
  78. package/dist/utils/korean.d.ts +6 -0
  79. package/dist/utils/korean.js +41 -0
  80. package/dist/utils/korean.mjs +16 -0
  81. package/dist/utils/singleton.d.mts +3 -0
  82. package/dist/utils/singleton.d.ts +3 -0
  83. package/dist/utils/singleton.js +37 -0
  84. package/dist/utils/singleton.mjs +12 -0
  85. package/dist/utils/sleep.d.mts +3 -0
  86. package/dist/utils/sleep.d.ts +3 -0
  87. package/dist/utils/sleep.js +32 -0
  88. package/dist/utils/sleep.mjs +7 -0
  89. package/dist/utils/slug.d.mts +3 -0
  90. package/dist/utils/slug.d.ts +3 -0
  91. package/dist/utils/slug.js +32 -0
  92. package/dist/utils/slug.mjs +7 -0
  93. package/package.json +8 -4
  94. package/dist/api/create_api_handler.d.mts +0 -30
  95. package/dist/api/create_api_handler.d.ts +0 -30
  96. package/dist/api/create_api_handler.js +0 -155
  97. package/dist/api/create_api_handler.mjs +0 -139
  98. package/dist/api/create_handler.d.mts +0 -13
  99. package/dist/api/create_handler.d.ts +0 -13
  100. package/dist/api/item_api_handler.d.mts +0 -21
  101. package/dist/api/item_api_handler.d.ts +0 -21
  102. package/dist/api/item_api_handler.js +0 -63
  103. package/dist/api/item_api_handler.mjs +0 -38
@@ -1,7 +1,16 @@
1
1
  // src/post/thumbnail_picker.tsx
2
2
  import { useSelector } from "react-store-input";
3
- import { cn } from "dn-react-toolkit/utils";
4
3
  import { useEffect, useState } from "react";
4
+
5
+ // src/utils/cn.ts
6
+ function cn(...classes) {
7
+ return classes.filter(Boolean).join(" ").trim();
8
+ }
9
+
10
+ // src/utils/date.ts
11
+ import moment from "moment-timezone";
12
+
13
+ // src/post/thumbnail_picker.tsx
5
14
  import { jsx } from "react/jsx-runtime";
6
15
  function PostThumbnailPicker({
7
16
  store,
@@ -23,8 +23,14 @@ __export(buttons_exports, {
23
23
  TablePageButtons: () => TablePageButtons
24
24
  });
25
25
  module.exports = __toCommonJS(buttons_exports);
26
- var import_utils = require("dn-react-toolkit/utils");
27
26
  var import_react_router = require("react-router");
27
+
28
+ // src/utils/cn.ts
29
+ function cn(...classes) {
30
+ return classes.filter(Boolean).join(" ").trim();
31
+ }
32
+
33
+ // src/table/buttons.tsx
28
34
  var import_jsx_runtime = require("react/jsx-runtime");
29
35
  function TablePageButtons({
30
36
  MAX_PAGES_TO_SHOW,
@@ -43,10 +49,7 @@ function TablePageButtons({
43
49
  import_react_router.Link,
44
50
  {
45
51
  to: (() => {
46
- searchParams.set(
47
- "offset",
48
- String((startButton - 1) * limit)
49
- );
52
+ searchParams.set("offset", String((startButton - 1) * limit));
50
53
  return `${pathname}?${searchParams.toString()}`;
51
54
  })(),
52
55
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -54,10 +57,7 @@ function TablePageButtons({
54
57
  }
55
58
  ),
56
59
  Array.from({
57
- length: Math.min(
58
- MAX_PAGES_TO_SHOW,
59
- pages - startButton
60
- )
60
+ length: Math.min(MAX_PAGES_TO_SHOW, pages - startButton)
61
61
  }).map((_, index) => {
62
62
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
63
  import_react_router.Link,
@@ -69,7 +69,7 @@ function TablePageButtons({
69
69
  );
70
70
  return `${pathname}?${searchParams.toString()}`;
71
71
  })(),
72
- className: (0, import_utils.cn)(
72
+ className: cn(
73
73
  "w-6 block text-center transition-colors",
74
74
  currentPage === startButton + index + 1 ? "font-bold text-primary" : "hover:text-primary"
75
75
  ),
@@ -82,10 +82,7 @@ function TablePageButtons({
82
82
  import_react_router.Link,
83
83
  {
84
84
  to: (() => {
85
- searchParams.set(
86
- "offset",
87
- String((endButton + 1) * limit)
88
- );
85
+ searchParams.set("offset", String((endButton + 1) * limit));
89
86
  return `${pathname}?${searchParams.toString()}`;
90
87
  })(),
91
88
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -1,6 +1,12 @@
1
1
  // src/table/buttons.tsx
2
- import { cn } from "dn-react-toolkit/utils";
3
2
  import { Link, useLocation, useSearchParams } from "react-router";
3
+
4
+ // src/utils/cn.ts
5
+ function cn(...classes) {
6
+ return classes.filter(Boolean).join(" ").trim();
7
+ }
8
+
9
+ // src/table/buttons.tsx
4
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
11
  function TablePageButtons({
6
12
  MAX_PAGES_TO_SHOW,
@@ -19,10 +25,7 @@ function TablePageButtons({
19
25
  Link,
20
26
  {
21
27
  to: (() => {
22
- searchParams.set(
23
- "offset",
24
- String((startButton - 1) * limit)
25
- );
28
+ searchParams.set("offset", String((startButton - 1) * limit));
26
29
  return `${pathname}?${searchParams.toString()}`;
27
30
  })(),
28
31
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -30,10 +33,7 @@ function TablePageButtons({
30
33
  }
31
34
  ),
32
35
  Array.from({
33
- length: Math.min(
34
- MAX_PAGES_TO_SHOW,
35
- pages - startButton
36
- )
36
+ length: Math.min(MAX_PAGES_TO_SHOW, pages - startButton)
37
37
  }).map((_, index) => {
38
38
  return /* @__PURE__ */ jsx(
39
39
  Link,
@@ -58,10 +58,7 @@ function TablePageButtons({
58
58
  Link,
59
59
  {
60
60
  to: (() => {
61
- searchParams.set(
62
- "offset",
63
- String((endButton + 1) * limit)
64
- );
61
+ searchParams.set("offset", String((endButton + 1) * limit));
65
62
  return `${pathname}?${searchParams.toString()}`;
66
63
  })(),
67
64
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -84,8 +84,14 @@ var BaseTableRepository = class {
84
84
  };
85
85
 
86
86
  // src/table/buttons.tsx
87
- var import_utils = require("dn-react-toolkit/utils");
88
87
  var import_react_router = require("react-router");
88
+
89
+ // src/utils/cn.ts
90
+ function cn(...classes) {
91
+ return classes.filter(Boolean).join(" ").trim();
92
+ }
93
+
94
+ // src/table/buttons.tsx
89
95
  var import_jsx_runtime = require("react/jsx-runtime");
90
96
  function TablePageButtons({
91
97
  MAX_PAGES_TO_SHOW,
@@ -104,10 +110,7 @@ function TablePageButtons({
104
110
  import_react_router.Link,
105
111
  {
106
112
  to: (() => {
107
- searchParams.set(
108
- "offset",
109
- String((startButton - 1) * limit)
110
- );
113
+ searchParams.set("offset", String((startButton - 1) * limit));
111
114
  return `${pathname}?${searchParams.toString()}`;
112
115
  })(),
113
116
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -115,10 +118,7 @@ function TablePageButtons({
115
118
  }
116
119
  ),
117
120
  Array.from({
118
- length: Math.min(
119
- MAX_PAGES_TO_SHOW,
120
- pages - startButton
121
- )
121
+ length: Math.min(MAX_PAGES_TO_SHOW, pages - startButton)
122
122
  }).map((_, index) => {
123
123
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
124
124
  import_react_router.Link,
@@ -130,7 +130,7 @@ function TablePageButtons({
130
130
  );
131
131
  return `${pathname}?${searchParams.toString()}`;
132
132
  })(),
133
- className: (0, import_utils.cn)(
133
+ className: cn(
134
134
  "w-6 block text-center transition-colors",
135
135
  currentPage === startButton + index + 1 ? "font-bold text-primary" : "hover:text-primary"
136
136
  ),
@@ -143,10 +143,7 @@ function TablePageButtons({
143
143
  import_react_router.Link,
144
144
  {
145
145
  to: (() => {
146
- searchParams.set(
147
- "offset",
148
- String((endButton + 1) * limit)
149
- );
146
+ searchParams.set("offset", String((endButton + 1) * limit));
150
147
  return `${pathname}?${searchParams.toString()}`;
151
148
  })(),
152
149
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -234,7 +231,6 @@ function tableLoader({
234
231
  }
235
232
 
236
233
  // src/table/table.tsx
237
- var import_utils2 = require("dn-react-toolkit/utils");
238
234
  var import_go = require("react-icons/go");
239
235
  var import_react_router2 = require("react-router");
240
236
  var import_jsx_runtime2 = require("react/jsx-runtime");
@@ -256,7 +252,7 @@ function Table({
256
252
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
257
253
  "table",
258
254
  {
259
- className: (0, import_utils2.cn)(className, "text-[15px] border-separate border-spacing-0"),
255
+ className: cn(className, "text-[15px] border-separate border-spacing-0"),
260
256
  children: [
261
257
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("tr", { children: keys.map((key) => {
262
258
  const value = columns[key];
@@ -272,7 +268,7 @@ function Table({
272
268
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
273
269
  "button",
274
270
  {
275
- className: (0, import_utils2.cn)(
271
+ className: cn(
276
272
  orderBy === key ? "text-gray-900 font-medium" : "text-gray-500 font-medium",
277
273
  "px-4 flex items-center w-full"
278
274
  ),
@@ -299,7 +295,7 @@ function Table({
299
295
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
300
296
  "th",
301
297
  {
302
- className: (0, import_utils2.cn)("py-4 border-y font-normal align-top"),
298
+ className: cn("py-4 border-y font-normal align-top"),
303
299
  children: [
304
300
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Head, {}),
305
301
  filter && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "px-3 mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
@@ -57,8 +57,14 @@ var BaseTableRepository = class {
57
57
  };
58
58
 
59
59
  // src/table/buttons.tsx
60
- import { cn } from "dn-react-toolkit/utils";
61
60
  import { Link, useLocation, useSearchParams } from "react-router";
61
+
62
+ // src/utils/cn.ts
63
+ function cn(...classes) {
64
+ return classes.filter(Boolean).join(" ").trim();
65
+ }
66
+
67
+ // src/table/buttons.tsx
62
68
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
63
69
  function TablePageButtons({
64
70
  MAX_PAGES_TO_SHOW,
@@ -77,10 +83,7 @@ function TablePageButtons({
77
83
  Link,
78
84
  {
79
85
  to: (() => {
80
- searchParams.set(
81
- "offset",
82
- String((startButton - 1) * limit)
83
- );
86
+ searchParams.set("offset", String((startButton - 1) * limit));
84
87
  return `${pathname}?${searchParams.toString()}`;
85
88
  })(),
86
89
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -88,10 +91,7 @@ function TablePageButtons({
88
91
  }
89
92
  ),
90
93
  Array.from({
91
- length: Math.min(
92
- MAX_PAGES_TO_SHOW,
93
- pages - startButton
94
- )
94
+ length: Math.min(MAX_PAGES_TO_SHOW, pages - startButton)
95
95
  }).map((_, index) => {
96
96
  return /* @__PURE__ */ jsx(
97
97
  Link,
@@ -116,10 +116,7 @@ function TablePageButtons({
116
116
  Link,
117
117
  {
118
118
  to: (() => {
119
- searchParams.set(
120
- "offset",
121
- String((endButton + 1) * limit)
122
- );
119
+ searchParams.set("offset", String((endButton + 1) * limit));
123
120
  return `${pathname}?${searchParams.toString()}`;
124
121
  })(),
125
122
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -211,7 +208,6 @@ function tableLoader({
211
208
  }
212
209
 
213
210
  // src/table/table.tsx
214
- import { cn as cn2 } from "dn-react-toolkit/utils";
215
211
  import { GoArrowDown, GoArrowUp } from "react-icons/go";
216
212
  import { Link as Link2, useSearchParams as useSearchParams2 } from "react-router";
217
213
  import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
@@ -233,7 +229,7 @@ function Table({
233
229
  return /* @__PURE__ */ jsxs2(
234
230
  "table",
235
231
  {
236
- className: cn2(className, "text-[15px] border-separate border-spacing-0"),
232
+ className: cn(className, "text-[15px] border-separate border-spacing-0"),
237
233
  children: [
238
234
  /* @__PURE__ */ jsx2("thead", { children: /* @__PURE__ */ jsx2("tr", { children: keys.map((key) => {
239
235
  const value = columns[key];
@@ -249,7 +245,7 @@ function Table({
249
245
  return /* @__PURE__ */ jsxs2(
250
246
  "button",
251
247
  {
252
- className: cn2(
248
+ className: cn(
253
249
  orderBy === key ? "text-gray-900 font-medium" : "text-gray-500 font-medium",
254
250
  "px-4 flex items-center w-full"
255
251
  ),
@@ -276,7 +272,7 @@ function Table({
276
272
  return /* @__PURE__ */ jsxs2(
277
273
  "th",
278
274
  {
279
- className: cn2("py-4 border-y font-normal align-top"),
275
+ className: cn("py-4 border-y font-normal align-top"),
280
276
  children: [
281
277
  /* @__PURE__ */ jsx2(Head, {}),
282
278
  filter && /* @__PURE__ */ jsx2("div", { className: "px-3 mt-4", children: /* @__PURE__ */ jsxs2(
@@ -23,7 +23,13 @@ __export(table_exports, {
23
23
  Table: () => Table
24
24
  });
25
25
  module.exports = __toCommonJS(table_exports);
26
- var import_utils = require("dn-react-toolkit/utils");
26
+
27
+ // src/utils/cn.ts
28
+ function cn(...classes) {
29
+ return classes.filter(Boolean).join(" ").trim();
30
+ }
31
+
32
+ // src/table/table.tsx
27
33
  var import_go = require("react-icons/go");
28
34
  var import_react_router = require("react-router");
29
35
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -45,7 +51,7 @@ function Table({
45
51
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
46
52
  "table",
47
53
  {
48
- className: (0, import_utils.cn)(className, "text-[15px] border-separate border-spacing-0"),
54
+ className: cn(className, "text-[15px] border-separate border-spacing-0"),
49
55
  children: [
50
56
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: keys.map((key) => {
51
57
  const value = columns[key];
@@ -61,7 +67,7 @@ function Table({
61
67
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
62
68
  "button",
63
69
  {
64
- className: (0, import_utils.cn)(
70
+ className: cn(
65
71
  orderBy === key ? "text-gray-900 font-medium" : "text-gray-500 font-medium",
66
72
  "px-4 flex items-center w-full"
67
73
  ),
@@ -88,7 +94,7 @@ function Table({
88
94
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
89
95
  "th",
90
96
  {
91
- className: (0, import_utils.cn)("py-4 border-y font-normal align-top"),
97
+ className: cn("py-4 border-y font-normal align-top"),
92
98
  children: [
93
99
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Head, {}),
94
100
  filter && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-3 mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
@@ -1,5 +1,9 @@
1
+ // src/utils/cn.ts
2
+ function cn(...classes) {
3
+ return classes.filter(Boolean).join(" ").trim();
4
+ }
5
+
1
6
  // src/table/table.tsx
2
- import { cn } from "dn-react-toolkit/utils";
3
7
  import { GoArrowDown, GoArrowUp } from "react-icons/go";
4
8
  import { Link, useSearchParams } from "react-router";
5
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -26,8 +26,12 @@ module.exports = __toCommonJS(table_form_exports);
26
26
  var import_react_router4 = require("react-router");
27
27
  var import_go2 = require("react-icons/go");
28
28
 
29
+ // src/utils/cn.ts
30
+ function cn(...classes) {
31
+ return classes.filter(Boolean).join(" ").trim();
32
+ }
33
+
29
34
  // src/table/table.tsx
30
- var import_utils = require("dn-react-toolkit/utils");
31
35
  var import_go = require("react-icons/go");
32
36
  var import_react_router = require("react-router");
33
37
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -49,7 +53,7 @@ function Table({
49
53
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
50
54
  "table",
51
55
  {
52
- className: (0, import_utils.cn)(className, "text-[15px] border-separate border-spacing-0"),
56
+ className: cn(className, "text-[15px] border-separate border-spacing-0"),
53
57
  children: [
54
58
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: keys.map((key) => {
55
59
  const value = columns[key];
@@ -65,7 +69,7 @@ function Table({
65
69
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
66
70
  "button",
67
71
  {
68
- className: (0, import_utils.cn)(
72
+ className: cn(
69
73
  orderBy === key ? "text-gray-900 font-medium" : "text-gray-500 font-medium",
70
74
  "px-4 flex items-center w-full"
71
75
  ),
@@ -92,7 +96,7 @@ function Table({
92
96
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
93
97
  "th",
94
98
  {
95
- className: (0, import_utils.cn)("py-4 border-y font-normal align-top"),
99
+ className: cn("py-4 border-y font-normal align-top"),
96
100
  children: [
97
101
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Head, {}),
98
102
  filter && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-3 mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
@@ -169,7 +173,6 @@ function useTable() {
169
173
  }
170
174
 
171
175
  // src/table/buttons.tsx
172
- var import_utils2 = require("dn-react-toolkit/utils");
173
176
  var import_react_router3 = require("react-router");
174
177
  var import_jsx_runtime2 = require("react/jsx-runtime");
175
178
  function TablePageButtons({
@@ -189,10 +192,7 @@ function TablePageButtons({
189
192
  import_react_router3.Link,
190
193
  {
191
194
  to: (() => {
192
- searchParams.set(
193
- "offset",
194
- String((startButton - 1) * limit)
195
- );
195
+ searchParams.set("offset", String((startButton - 1) * limit));
196
196
  return `${pathname}?${searchParams.toString()}`;
197
197
  })(),
198
198
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -200,10 +200,7 @@ function TablePageButtons({
200
200
  }
201
201
  ),
202
202
  Array.from({
203
- length: Math.min(
204
- MAX_PAGES_TO_SHOW,
205
- pages - startButton
206
- )
203
+ length: Math.min(MAX_PAGES_TO_SHOW, pages - startButton)
207
204
  }).map((_, index) => {
208
205
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
209
206
  import_react_router3.Link,
@@ -215,7 +212,7 @@ function TablePageButtons({
215
212
  );
216
213
  return `${pathname}?${searchParams.toString()}`;
217
214
  })(),
218
- className: (0, import_utils2.cn)(
215
+ className: cn(
219
216
  "w-6 block text-center transition-colors",
220
217
  currentPage === startButton + index + 1 ? "font-bold text-primary" : "hover:text-primary"
221
218
  ),
@@ -228,10 +225,7 @@ function TablePageButtons({
228
225
  import_react_router3.Link,
229
226
  {
230
227
  to: (() => {
231
- searchParams.set(
232
- "offset",
233
- String((endButton + 1) * limit)
234
- );
228
+ searchParams.set("offset", String((endButton + 1) * limit));
235
229
  return `${pathname}?${searchParams.toString()}`;
236
230
  })(),
237
231
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -2,8 +2,12 @@
2
2
  import { useLocation as useLocation2, useNavigate, useSearchParams as useSearchParams3 } from "react-router";
3
3
  import { GoSearch } from "react-icons/go";
4
4
 
5
+ // src/utils/cn.ts
6
+ function cn(...classes) {
7
+ return classes.filter(Boolean).join(" ").trim();
8
+ }
9
+
5
10
  // src/table/table.tsx
6
- import { cn } from "dn-react-toolkit/utils";
7
11
  import { GoArrowDown, GoArrowUp } from "react-icons/go";
8
12
  import { Link, useSearchParams } from "react-router";
9
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -145,7 +149,6 @@ function useTable() {
145
149
  }
146
150
 
147
151
  // src/table/buttons.tsx
148
- import { cn as cn2 } from "dn-react-toolkit/utils";
149
152
  import { Link as Link2, useLocation, useSearchParams as useSearchParams2 } from "react-router";
150
153
  import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
151
154
  function TablePageButtons({
@@ -165,10 +168,7 @@ function TablePageButtons({
165
168
  Link2,
166
169
  {
167
170
  to: (() => {
168
- searchParams.set(
169
- "offset",
170
- String((startButton - 1) * limit)
171
- );
171
+ searchParams.set("offset", String((startButton - 1) * limit));
172
172
  return `${pathname}?${searchParams.toString()}`;
173
173
  })(),
174
174
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -176,10 +176,7 @@ function TablePageButtons({
176
176
  }
177
177
  ),
178
178
  Array.from({
179
- length: Math.min(
180
- MAX_PAGES_TO_SHOW,
181
- pages - startButton
182
- )
179
+ length: Math.min(MAX_PAGES_TO_SHOW, pages - startButton)
183
180
  }).map((_, index) => {
184
181
  return /* @__PURE__ */ jsx2(
185
182
  Link2,
@@ -191,7 +188,7 @@ function TablePageButtons({
191
188
  );
192
189
  return `${pathname}?${searchParams.toString()}`;
193
190
  })(),
194
- className: cn2(
191
+ className: cn(
195
192
  "w-6 block text-center transition-colors",
196
193
  currentPage === startButton + index + 1 ? "font-bold text-primary" : "hover:text-primary"
197
194
  ),
@@ -204,10 +201,7 @@ function TablePageButtons({
204
201
  Link2,
205
202
  {
206
203
  to: (() => {
207
- searchParams.set(
208
- "offset",
209
- String((endButton + 1) * limit)
210
- );
204
+ searchParams.set("offset", String((endButton + 1) * limit));
211
205
  return `${pathname}?${searchParams.toString()}`;
212
206
  })(),
213
207
  className: "w-10 block text-center transition-colors hover:text-primary",
@@ -0,0 +1,3 @@
1
+ declare function cn(...classes: (string | false | undefined)[]): string;
2
+
3
+ export { cn };
@@ -0,0 +1,3 @@
1
+ declare function cn(...classes: (string | false | undefined)[]): string;
2
+
3
+ export { cn };
@@ -0,0 +1,32 @@
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
+
20
+ // src/utils/cn.ts
21
+ var cn_exports = {};
22
+ __export(cn_exports, {
23
+ cn: () => cn
24
+ });
25
+ module.exports = __toCommonJS(cn_exports);
26
+ function cn(...classes) {
27
+ return classes.filter(Boolean).join(" ").trim();
28
+ }
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ cn
32
+ });
@@ -0,0 +1,7 @@
1
+ // src/utils/cn.ts
2
+ function cn(...classes) {
3
+ return classes.filter(Boolean).join(" ").trim();
4
+ }
5
+ export {
6
+ cn
7
+ };
@@ -0,0 +1,5 @@
1
+ export { default as moment } from 'moment-timezone';
2
+
3
+ declare const formatHumanDateTime: (value: string | Date) => string;
4
+
5
+ export { formatHumanDateTime };
@@ -0,0 +1,5 @@
1
+ export { default as moment } from 'moment-timezone';
2
+
3
+ declare const formatHumanDateTime: (value: string | Date) => string;
4
+
5
+ export { formatHumanDateTime };
@@ -0,0 +1,65 @@
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
+
30
+ // src/utils/date.ts
31
+ var date_exports = {};
32
+ __export(date_exports, {
33
+ formatHumanDateTime: () => formatHumanDateTime,
34
+ moment: () => import_moment_timezone.default
35
+ });
36
+ module.exports = __toCommonJS(date_exports);
37
+ var import_moment_timezone = __toESM(require("moment-timezone"));
38
+ var formatHumanDateTime = (value) => {
39
+ const date = (0, import_moment_timezone.default)(value).tz("Asia/Seoul");
40
+ const now = (0, import_moment_timezone.default)().tz("Asia/Seoul");
41
+ if (date.isAfter(now.clone().subtract(1, "minute"))) {
42
+ return "\uBC29\uAE08 \uC804";
43
+ }
44
+ if (date.isAfter(now.clone().subtract(1, "hour"))) {
45
+ const diff = now.diff(date, "minute");
46
+ return `${diff}\uBD84 \uC804`;
47
+ }
48
+ if (date.isAfter(now.clone().subtract(6, "hours"))) {
49
+ const diff = now.diff(date, "hour");
50
+ return `${diff}\uC2DC\uAC04 \uC804`;
51
+ }
52
+ if (date.isAfter(now.clone().subtract(1, "week"))) {
53
+ const diff = now.diff(date, "day");
54
+ return `${diff}\uC77C \uC804`;
55
+ }
56
+ if (date.isSame(now, "year")) {
57
+ return date.format("M\uC6D4 D\uC77C");
58
+ }
59
+ return date.format("YYYY\uB144 M\uC6D4 D\uC77C");
60
+ };
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ formatHumanDateTime,
64
+ moment
65
+ });