dn-react-router-toolkit 0.7.14 → 0.8.0

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 (71) hide show
  1. package/dist/api/create_api_handler.d.mts +5 -4
  2. package/dist/api/create_api_handler.d.ts +5 -4
  3. package/dist/api/create_api_handler.js +0 -1
  4. package/dist/api/create_api_handler.mjs +0 -1
  5. package/dist/api/index.d.mts +1 -0
  6. package/dist/api/index.d.ts +1 -0
  7. package/dist/api/index.js +0 -2
  8. package/dist/api/index.mjs +0 -2
  9. package/dist/api/item_api_handler.d.mts +5 -4
  10. package/dist/api/item_api_handler.d.ts +5 -4
  11. package/dist/api/item_api_handler.js +0 -1
  12. package/dist/api/item_api_handler.mjs +0 -1
  13. package/dist/auth/cookie_manager.d.mts +2 -1
  14. package/dist/auth/cookie_manager.d.ts +2 -1
  15. package/dist/auth/cookie_manager.js +9 -3
  16. package/dist/auth/cookie_manager.mjs +9 -3
  17. package/dist/auth/index.js +9 -3
  18. package/dist/auth/index.mjs +9 -3
  19. package/dist/crud/crud_form.js +1 -1
  20. package/dist/crud/crud_form.mjs +1 -1
  21. package/dist/crud/crud_loader.d.mts +6 -5
  22. package/dist/crud/crud_loader.d.ts +6 -5
  23. package/dist/crud/crud_loader.js +46 -34
  24. package/dist/crud/crud_loader.mjs +46 -34
  25. package/dist/crud/crud_page.d.mts +3 -2
  26. package/dist/crud/crud_page.d.ts +3 -2
  27. package/dist/crud/crud_page.js +226 -198
  28. package/dist/crud/crud_page.mjs +224 -202
  29. package/dist/crud/generate_handlers.d.mts +3 -2
  30. package/dist/crud/generate_handlers.d.ts +3 -2
  31. package/dist/crud/generate_pages.d.mts +2 -1
  32. package/dist/crud/generate_pages.d.ts +2 -1
  33. package/dist/crud/index.d.mts +5 -3
  34. package/dist/crud/index.d.ts +5 -3
  35. package/dist/crud/index.js +246 -206
  36. package/dist/crud/index.mjs +252 -218
  37. package/dist/post/index.js +65 -58
  38. package/dist/post/index.mjs +68 -67
  39. package/dist/post/post_form_page.js +65 -58
  40. package/dist/post/post_form_page.mjs +68 -67
  41. package/dist/table/index.d.mts +7 -3
  42. package/dist/table/index.d.ts +7 -3
  43. package/dist/table/index.js +153 -105
  44. package/dist/table/index.mjs +149 -110
  45. package/dist/table/item_loader.d.mts +5 -4
  46. package/dist/table/item_loader.d.ts +5 -4
  47. package/dist/table/load_table.d.mts +30 -0
  48. package/dist/table/load_table.d.ts +30 -0
  49. package/dist/table/load_table.js +67 -0
  50. package/dist/table/load_table.mjs +45 -0
  51. package/dist/table/loader.d.mts +7 -15
  52. package/dist/table/loader.d.ts +7 -15
  53. package/dist/table/loader.js +47 -31
  54. package/dist/table/loader.mjs +46 -32
  55. package/dist/table/page.d.mts +6 -16
  56. package/dist/table/page.d.ts +6 -16
  57. package/dist/table/page.js +193 -165
  58. package/dist/table/page.mjs +194 -172
  59. package/dist/table/repository.d.mts +13 -11
  60. package/dist/table/repository.d.ts +13 -11
  61. package/dist/table/repository.js +1 -1
  62. package/dist/table/repository.mjs +1 -1
  63. package/dist/table/table_form.d.mts +13 -0
  64. package/dist/table/table_form.d.ts +13 -0
  65. package/dist/table/table_form.js +295 -0
  66. package/dist/table/table_form.mjs +270 -0
  67. package/dist/table/use_table.d.mts +4 -0
  68. package/dist/table/use_table.d.ts +4 -0
  69. package/dist/table/use_table.js +43 -0
  70. package/dist/table/use_table.mjs +18 -0
  71. package/package.json +3 -3
@@ -7936,52 +7936,59 @@ var FormLabel = createComponent("label", {
7936
7936
  var import_react_store_input4 = require("react-store-input");
7937
7937
  var import_jsx_runtime8 = require("react/jsx-runtime");
7938
7938
 
7939
- // src/table/loader.tsx
7939
+ // src/table/load_table.tsx
7940
7940
  var import_drizzle_orm = require("drizzle-orm");
7941
7941
 
7942
7942
  // src/api/create_api_handler.ts
7943
7943
  var import_http = require("dn-react-toolkit/http");
7944
7944
  var import_drizzle_orm2 = require("drizzle-orm");
7945
- var import_react_router4 = require("react-router");
7946
7945
  var import_uuid = require("uuid");
7947
7946
 
7948
7947
  // src/api/item_api_handler.ts
7949
7948
  var import_http2 = require("dn-react-toolkit/http");
7950
- var import_react_router5 = require("react-router");
7951
7949
 
7952
7950
  // src/crud/crud_page.tsx
7953
7951
  var import_react_router9 = require("react-router");
7954
7952
 
7955
7953
  // src/table/page.tsx
7956
7954
  var import_react_router8 = require("react-router");
7955
+
7956
+ // src/table/table_form.tsx
7957
+ var import_react_router7 = require("react-router");
7957
7958
  var import_go3 = require("react-icons/go");
7958
7959
 
7959
- // src/table/buttons.tsx
7960
+ // src/table/table.tsx
7960
7961
  var import_utils5 = require("dn-react-toolkit/utils");
7961
- var import_react_router6 = require("react-router");
7962
+ var import_go2 = require("react-icons/go");
7963
+ var import_react_router4 = require("react-router");
7962
7964
  var import_jsx_runtime9 = require("react/jsx-runtime");
7963
7965
 
7964
- // src/table/table.tsx
7966
+ // src/table/use_table.tsx
7967
+ var import_react_router5 = require("react-router");
7968
+
7969
+ // src/table/buttons.tsx
7965
7970
  var import_utils6 = require("dn-react-toolkit/utils");
7966
- var import_go2 = require("react-icons/go");
7967
- var import_react_router7 = require("react-router");
7971
+ var import_react_router6 = require("react-router");
7968
7972
  var import_jsx_runtime10 = require("react/jsx-runtime");
7969
7973
 
7970
- // src/table/page.tsx
7974
+ // src/table/table_form.tsx
7971
7975
  var import_jsx_runtime11 = require("react/jsx-runtime");
7972
7976
 
7973
- // src/crud/crud_page.tsx
7977
+ // src/table/page.tsx
7974
7978
  var import_jsx_runtime12 = require("react/jsx-runtime");
7975
7979
 
7980
+ // src/crud/crud_page.tsx
7981
+ var import_jsx_runtime13 = require("react/jsx-runtime");
7982
+
7976
7983
  // src/crud/generate_pages.tsx
7977
7984
  var import_react_router10 = require("react-router");
7978
- var import_jsx_runtime13 = require("react/jsx-runtime");
7985
+ var import_jsx_runtime14 = require("react/jsx-runtime");
7979
7986
 
7980
7987
  // src/crud/generate_routes.tsx
7981
7988
  var Routes = __toESM(require_routes());
7982
7989
 
7983
7990
  // src/post/post_form_page.tsx
7984
- var import_jsx_runtime14 = require("react/jsx-runtime");
7991
+ var import_jsx_runtime15 = require("react/jsx-runtime");
7985
7992
  var createPostFormPage = ({
7986
7993
  header: AdminPageHeader,
7987
7994
  textEditorClassName,
@@ -7991,13 +7998,13 @@ var createPostFormPage = ({
7991
7998
  const { boards } = (0, import_react_router11.useLoaderData)();
7992
7999
  const component = (0, import_react_store_input5.useStoreComponent)(form.store);
7993
8000
  const textEditorRef = (0, import_react6.useRef)(null);
7994
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
7995
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8001
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
8002
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
7996
8003
  AdminPageHeader,
7997
8004
  {
7998
8005
  title: `${form.name} \uCD94\uAC00`,
7999
- actions: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
8000
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8006
+ actions: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
8007
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8001
8008
  "button",
8002
8009
  {
8003
8010
  type: "button",
@@ -8008,7 +8015,7 @@ var createPostFormPage = ({
8008
8015
  children: "\uC0AD\uC81C\uD558\uAE30"
8009
8016
  }
8010
8017
  ),
8011
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8018
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8012
8019
  "button",
8013
8020
  {
8014
8021
  type: "button",
@@ -8022,11 +8029,11 @@ var createPostFormPage = ({
8022
8029
  ] })
8023
8030
  }
8024
8031
  ),
8025
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "max-w-7xl mx-auto w-full", children: [
8026
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormRow, { children: [
8027
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
8028
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uACF5\uAC1C\uC5EC\uBD80" }),
8029
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
8032
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "max-w-7xl mx-auto w-full", children: [
8033
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormRow, { children: [
8034
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormEntry, { children: [
8035
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormLabel, { children: "\uACF5\uAC1C\uC5EC\uBD80" }),
8036
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
8030
8037
  component.select,
8031
8038
  {
8032
8039
  name: "isPublic",
@@ -8034,15 +8041,15 @@ var createPostFormPage = ({
8034
8041
  toInputValue: (value) => value ? "true" : "false",
8035
8042
  toStateValue: (value) => Boolean(value === "true"),
8036
8043
  children: [
8037
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "true", children: "\uACF5\uAC1C" }),
8038
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "false", children: "\uBE44\uACF5\uAC1C" })
8044
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "true", children: "\uACF5\uAC1C" }),
8045
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "false", children: "\uBE44\uACF5\uAC1C" })
8039
8046
  ]
8040
8047
  }
8041
8048
  )
8042
8049
  ] }),
8043
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
8044
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uC791\uC131\uC77C\uC2DC" }),
8045
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8050
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormEntry, { children: [
8051
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormLabel, { children: "\uC791\uC131\uC77C\uC2DC" }),
8052
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8046
8053
  component.input,
8047
8054
  {
8048
8055
  name: "createdAt",
@@ -8052,17 +8059,17 @@ var createPostFormPage = ({
8052
8059
  )
8053
8060
  ] })
8054
8061
  ] }),
8055
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormRow, { children: [
8056
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
8057
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uAC8C\uC2DC\uD310" }),
8058
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(component.select, { name: "boardId", className: "select-form", children: [
8059
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "", children: "\uC120\uD0DD\uD558\uC138\uC694" }),
8060
- boards.map((board) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: board.id, children: board.title }, board.id))
8062
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormRow, { children: [
8063
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormEntry, { children: [
8064
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormLabel, { children: "\uAC8C\uC2DC\uD310" }),
8065
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(component.select, { name: "boardId", className: "select-form", children: [
8066
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "", children: "\uC120\uD0DD\uD558\uC138\uC694" }),
8067
+ boards.map((board) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: board.id, children: board.title }, board.id))
8061
8068
  ] })
8062
8069
  ] }),
8063
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
8064
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uCE74\uD14C\uACE0\uB9AC" }),
8065
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8070
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormEntry, { children: [
8071
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormLabel, { children: "\uCE74\uD14C\uACE0\uB9AC" }),
8072
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8066
8073
  component.input,
8067
8074
  {
8068
8075
  name: "category",
@@ -8072,10 +8079,10 @@ var createPostFormPage = ({
8072
8079
  )
8073
8080
  ] })
8074
8081
  ] }),
8075
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormRow, { children: [
8076
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
8077
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uC81C\uBAA9" }),
8078
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8082
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormRow, { children: [
8083
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormEntry, { children: [
8084
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormLabel, { children: "\uC81C\uBAA9" }),
8085
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8079
8086
  component.input,
8080
8087
  {
8081
8088
  name: "title",
@@ -8090,9 +8097,9 @@ var createPostFormPage = ({
8090
8097
  }
8091
8098
  )
8092
8099
  ] }),
8093
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
8094
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uBD80\uC81C\uBAA9" }),
8095
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8100
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormEntry, { children: [
8101
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormLabel, { children: "\uBD80\uC81C\uBAA9" }),
8102
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8096
8103
  component.input,
8097
8104
  {
8098
8105
  name: "subtitle",
@@ -8102,10 +8109,10 @@ var createPostFormPage = ({
8102
8109
  )
8103
8110
  ] })
8104
8111
  ] }),
8105
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormRow, { children: [
8106
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
8107
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uC2AC\uB7EC\uADF8" }),
8108
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8112
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormRow, { children: [
8113
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormEntry, { children: [
8114
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormLabel, { children: "\uC2AC\uB7EC\uADF8" }),
8115
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8109
8116
  component.input,
8110
8117
  {
8111
8118
  name: "slug",
@@ -8114,9 +8121,9 @@ var createPostFormPage = ({
8114
8121
  }
8115
8122
  )
8116
8123
  ] }),
8117
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
8118
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uD0DC\uADF8" }),
8119
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8124
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormEntry, { children: [
8125
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormLabel, { children: "\uD0DC\uADF8" }),
8126
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8120
8127
  component.input,
8121
8128
  {
8122
8129
  name: "tags",
@@ -8126,9 +8133,9 @@ var createPostFormPage = ({
8126
8133
  )
8127
8134
  ] })
8128
8135
  ] }),
8129
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormRow, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
8130
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uC124\uBA85" }),
8131
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8136
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormRow, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormEntry, { children: [
8137
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormLabel, { children: "\uC124\uBA85" }),
8138
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8132
8139
  StoreTextEditor,
8133
8140
  {
8134
8141
  store: form.store,
@@ -8139,9 +8146,9 @@ var createPostFormPage = ({
8139
8146
  }
8140
8147
  )
8141
8148
  ] }) }),
8142
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormRow, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
8143
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uC378\uB124\uC77C" }),
8144
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8149
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormRow, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(FormEntry, { children: [
8150
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormLabel, { children: "\uC378\uB124\uC77C" }),
8151
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8145
8152
  PostThumbnailPicker,
8146
8153
  {
8147
8154
  store: form.store,
@@ -8150,14 +8157,14 @@ var createPostFormPage = ({
8150
8157
  )
8151
8158
  ] }) })
8152
8159
  ] }) }),
8153
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "sticky top-[160px] z-998 bg-white px-4", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8160
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "sticky top-[160px] z-998 bg-white px-4", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8154
8161
  EditorToolbar,
8155
8162
  {
8156
8163
  textEditorRef,
8157
8164
  className: "max-w-7xl mx-auto"
8158
8165
  }
8159
8166
  ) }),
8160
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8167
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8161
8168
  StoreTextEditor,
8162
8169
  {
8163
8170
  ref: textEditorRef,
@@ -7937,7 +7937,7 @@ var FormLabel = createComponent("label", {
7937
7937
  import { useStoreComponent } from "react-store-input";
7938
7938
  import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
7939
7939
 
7940
- // src/table/loader.tsx
7940
+ // src/table/load_table.tsx
7941
7941
  import {
7942
7942
  and,
7943
7943
  ilike
@@ -7955,52 +7955,53 @@ import {
7955
7955
  import {
7956
7956
  and as and2
7957
7957
  } from "drizzle-orm";
7958
- import "react-router";
7959
7958
  import { v4 } from "uuid";
7960
7959
 
7961
7960
  // src/api/item_api_handler.ts
7962
7961
  import { UNAUTHORIZED as UNAUTHORIZED2 } from "dn-react-toolkit/http";
7963
- import "react-router";
7964
7962
 
7965
7963
  // src/crud/crud_page.tsx
7966
- import { useLoaderData as useLoaderData2, useLocation as useLocation3 } from "react-router";
7964
+ import { useLoaderData as useLoaderData2, useLocation as useLocation4 } from "react-router";
7967
7965
 
7968
7966
  // src/table/page.tsx
7969
- import {
7970
- Link as Link3,
7971
- useLoaderData,
7972
- useLocation as useLocation2,
7973
- useNavigate as useNavigate2,
7974
- useSearchParams as useSearchParams3
7975
- } from "react-router";
7967
+ import { Link as Link3, useLocation as useLocation3 } from "react-router";
7968
+
7969
+ // src/table/table_form.tsx
7970
+ import { useLocation as useLocation2, useNavigate as useNavigate2, useSearchParams as useSearchParams3 } from "react-router";
7976
7971
  import { GoSearch } from "react-icons/go";
7977
7972
 
7978
- // src/table/buttons.tsx
7973
+ // src/table/table.tsx
7979
7974
  import { cn as cn4 } from "dn-react-toolkit/utils";
7980
- import { Link, useLocation, useSearchParams } from "react-router";
7975
+ import { GoArrowDown, GoArrowUp } from "react-icons/go";
7976
+ import { Link, useSearchParams } from "react-router";
7981
7977
  import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
7982
7978
 
7983
- // src/table/table.tsx
7979
+ // src/table/use_table.tsx
7980
+ import { useLoaderData } from "react-router";
7981
+
7982
+ // src/table/buttons.tsx
7984
7983
  import { cn as cn5 } from "dn-react-toolkit/utils";
7985
- import { GoArrowDown, GoArrowUp } from "react-icons/go";
7986
- import { Link as Link2, useSearchParams as useSearchParams2 } from "react-router";
7984
+ import { Link as Link2, useLocation, useSearchParams as useSearchParams2 } from "react-router";
7987
7985
  import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
7988
7986
 
7989
- // src/table/page.tsx
7987
+ // src/table/table_form.tsx
7990
7988
  import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
7991
7989
 
7990
+ // src/table/page.tsx
7991
+ import { Fragment as Fragment6, jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
7992
+
7992
7993
  // src/crud/crud_page.tsx
7993
- import { jsx as jsx12 } from "react/jsx-runtime";
7994
+ import { jsx as jsx13 } from "react/jsx-runtime";
7994
7995
 
7995
7996
  // src/crud/generate_pages.tsx
7996
- import { useLocation as useLocation4 } from "react-router";
7997
- import { jsx as jsx13 } from "react/jsx-runtime";
7997
+ import { useLocation as useLocation5 } from "react-router";
7998
+ import { jsx as jsx14 } from "react/jsx-runtime";
7998
7999
 
7999
8000
  // src/crud/generate_routes.tsx
8000
8001
  var Routes = __toESM(require_routes());
8001
8002
 
8002
8003
  // src/post/post_form_page.tsx
8003
- import { Fragment as Fragment6, jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
8004
+ import { Fragment as Fragment7, jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
8004
8005
  var createPostFormPage = ({
8005
8006
  header: AdminPageHeader,
8006
8007
  textEditorClassName,
@@ -8010,13 +8011,13 @@ var createPostFormPage = ({
8010
8011
  const { boards } = useLoaderData3();
8011
8012
  const component = useStoreComponent2(form.store);
8012
8013
  const textEditorRef = useRef3(null);
8013
- return /* @__PURE__ */ jsxs7(Fragment6, { children: [
8014
- /* @__PURE__ */ jsx14(
8014
+ return /* @__PURE__ */ jsxs8(Fragment7, { children: [
8015
+ /* @__PURE__ */ jsx15(
8015
8016
  AdminPageHeader,
8016
8017
  {
8017
8018
  title: `${form.name} \uCD94\uAC00`,
8018
- actions: /* @__PURE__ */ jsxs7(Fragment6, { children: [
8019
- /* @__PURE__ */ jsx14(
8019
+ actions: /* @__PURE__ */ jsxs8(Fragment7, { children: [
8020
+ /* @__PURE__ */ jsx15(
8020
8021
  "button",
8021
8022
  {
8022
8023
  type: "button",
@@ -8027,7 +8028,7 @@ var createPostFormPage = ({
8027
8028
  children: "\uC0AD\uC81C\uD558\uAE30"
8028
8029
  }
8029
8030
  ),
8030
- /* @__PURE__ */ jsx14(
8031
+ /* @__PURE__ */ jsx15(
8031
8032
  "button",
8032
8033
  {
8033
8034
  type: "button",
@@ -8041,11 +8042,11 @@ var createPostFormPage = ({
8041
8042
  ] })
8042
8043
  }
8043
8044
  ),
8044
- /* @__PURE__ */ jsx14("div", { className: "px-4", children: /* @__PURE__ */ jsxs7("div", { className: "max-w-7xl mx-auto w-full", children: [
8045
- /* @__PURE__ */ jsxs7(FormRow, { children: [
8046
- /* @__PURE__ */ jsxs7(FormEntry, { children: [
8047
- /* @__PURE__ */ jsx14(FormLabel, { children: "\uACF5\uAC1C\uC5EC\uBD80" }),
8048
- /* @__PURE__ */ jsxs7(
8045
+ /* @__PURE__ */ jsx15("div", { className: "px-4", children: /* @__PURE__ */ jsxs8("div", { className: "max-w-7xl mx-auto w-full", children: [
8046
+ /* @__PURE__ */ jsxs8(FormRow, { children: [
8047
+ /* @__PURE__ */ jsxs8(FormEntry, { children: [
8048
+ /* @__PURE__ */ jsx15(FormLabel, { children: "\uACF5\uAC1C\uC5EC\uBD80" }),
8049
+ /* @__PURE__ */ jsxs8(
8049
8050
  component.select,
8050
8051
  {
8051
8052
  name: "isPublic",
@@ -8053,15 +8054,15 @@ var createPostFormPage = ({
8053
8054
  toInputValue: (value) => value ? "true" : "false",
8054
8055
  toStateValue: (value) => Boolean(value === "true"),
8055
8056
  children: [
8056
- /* @__PURE__ */ jsx14("option", { value: "true", children: "\uACF5\uAC1C" }),
8057
- /* @__PURE__ */ jsx14("option", { value: "false", children: "\uBE44\uACF5\uAC1C" })
8057
+ /* @__PURE__ */ jsx15("option", { value: "true", children: "\uACF5\uAC1C" }),
8058
+ /* @__PURE__ */ jsx15("option", { value: "false", children: "\uBE44\uACF5\uAC1C" })
8058
8059
  ]
8059
8060
  }
8060
8061
  )
8061
8062
  ] }),
8062
- /* @__PURE__ */ jsxs7(FormEntry, { children: [
8063
- /* @__PURE__ */ jsx14(FormLabel, { children: "\uC791\uC131\uC77C\uC2DC" }),
8064
- /* @__PURE__ */ jsx14(
8063
+ /* @__PURE__ */ jsxs8(FormEntry, { children: [
8064
+ /* @__PURE__ */ jsx15(FormLabel, { children: "\uC791\uC131\uC77C\uC2DC" }),
8065
+ /* @__PURE__ */ jsx15(
8065
8066
  component.input,
8066
8067
  {
8067
8068
  name: "createdAt",
@@ -8071,17 +8072,17 @@ var createPostFormPage = ({
8071
8072
  )
8072
8073
  ] })
8073
8074
  ] }),
8074
- /* @__PURE__ */ jsxs7(FormRow, { children: [
8075
- /* @__PURE__ */ jsxs7(FormEntry, { children: [
8076
- /* @__PURE__ */ jsx14(FormLabel, { children: "\uAC8C\uC2DC\uD310" }),
8077
- /* @__PURE__ */ jsxs7(component.select, { name: "boardId", className: "select-form", children: [
8078
- /* @__PURE__ */ jsx14("option", { value: "", children: "\uC120\uD0DD\uD558\uC138\uC694" }),
8079
- boards.map((board) => /* @__PURE__ */ jsx14("option", { value: board.id, children: board.title }, board.id))
8075
+ /* @__PURE__ */ jsxs8(FormRow, { children: [
8076
+ /* @__PURE__ */ jsxs8(FormEntry, { children: [
8077
+ /* @__PURE__ */ jsx15(FormLabel, { children: "\uAC8C\uC2DC\uD310" }),
8078
+ /* @__PURE__ */ jsxs8(component.select, { name: "boardId", className: "select-form", children: [
8079
+ /* @__PURE__ */ jsx15("option", { value: "", children: "\uC120\uD0DD\uD558\uC138\uC694" }),
8080
+ boards.map((board) => /* @__PURE__ */ jsx15("option", { value: board.id, children: board.title }, board.id))
8080
8081
  ] })
8081
8082
  ] }),
8082
- /* @__PURE__ */ jsxs7(FormEntry, { children: [
8083
- /* @__PURE__ */ jsx14(FormLabel, { children: "\uCE74\uD14C\uACE0\uB9AC" }),
8084
- /* @__PURE__ */ jsx14(
8083
+ /* @__PURE__ */ jsxs8(FormEntry, { children: [
8084
+ /* @__PURE__ */ jsx15(FormLabel, { children: "\uCE74\uD14C\uACE0\uB9AC" }),
8085
+ /* @__PURE__ */ jsx15(
8085
8086
  component.input,
8086
8087
  {
8087
8088
  name: "category",
@@ -8091,10 +8092,10 @@ var createPostFormPage = ({
8091
8092
  )
8092
8093
  ] })
8093
8094
  ] }),
8094
- /* @__PURE__ */ jsxs7(FormRow, { children: [
8095
- /* @__PURE__ */ jsxs7(FormEntry, { children: [
8096
- /* @__PURE__ */ jsx14(FormLabel, { children: "\uC81C\uBAA9" }),
8097
- /* @__PURE__ */ jsx14(
8095
+ /* @__PURE__ */ jsxs8(FormRow, { children: [
8096
+ /* @__PURE__ */ jsxs8(FormEntry, { children: [
8097
+ /* @__PURE__ */ jsx15(FormLabel, { children: "\uC81C\uBAA9" }),
8098
+ /* @__PURE__ */ jsx15(
8098
8099
  component.input,
8099
8100
  {
8100
8101
  name: "title",
@@ -8109,9 +8110,9 @@ var createPostFormPage = ({
8109
8110
  }
8110
8111
  )
8111
8112
  ] }),
8112
- /* @__PURE__ */ jsxs7(FormEntry, { children: [
8113
- /* @__PURE__ */ jsx14(FormLabel, { children: "\uBD80\uC81C\uBAA9" }),
8114
- /* @__PURE__ */ jsx14(
8113
+ /* @__PURE__ */ jsxs8(FormEntry, { children: [
8114
+ /* @__PURE__ */ jsx15(FormLabel, { children: "\uBD80\uC81C\uBAA9" }),
8115
+ /* @__PURE__ */ jsx15(
8115
8116
  component.input,
8116
8117
  {
8117
8118
  name: "subtitle",
@@ -8121,10 +8122,10 @@ var createPostFormPage = ({
8121
8122
  )
8122
8123
  ] })
8123
8124
  ] }),
8124
- /* @__PURE__ */ jsxs7(FormRow, { children: [
8125
- /* @__PURE__ */ jsxs7(FormEntry, { children: [
8126
- /* @__PURE__ */ jsx14(FormLabel, { children: "\uC2AC\uB7EC\uADF8" }),
8127
- /* @__PURE__ */ jsx14(
8125
+ /* @__PURE__ */ jsxs8(FormRow, { children: [
8126
+ /* @__PURE__ */ jsxs8(FormEntry, { children: [
8127
+ /* @__PURE__ */ jsx15(FormLabel, { children: "\uC2AC\uB7EC\uADF8" }),
8128
+ /* @__PURE__ */ jsx15(
8128
8129
  component.input,
8129
8130
  {
8130
8131
  name: "slug",
@@ -8133,9 +8134,9 @@ var createPostFormPage = ({
8133
8134
  }
8134
8135
  )
8135
8136
  ] }),
8136
- /* @__PURE__ */ jsxs7(FormEntry, { children: [
8137
- /* @__PURE__ */ jsx14(FormLabel, { children: "\uD0DC\uADF8" }),
8138
- /* @__PURE__ */ jsx14(
8137
+ /* @__PURE__ */ jsxs8(FormEntry, { children: [
8138
+ /* @__PURE__ */ jsx15(FormLabel, { children: "\uD0DC\uADF8" }),
8139
+ /* @__PURE__ */ jsx15(
8139
8140
  component.input,
8140
8141
  {
8141
8142
  name: "tags",
@@ -8145,9 +8146,9 @@ var createPostFormPage = ({
8145
8146
  )
8146
8147
  ] })
8147
8148
  ] }),
8148
- /* @__PURE__ */ jsx14(FormRow, { children: /* @__PURE__ */ jsxs7(FormEntry, { children: [
8149
- /* @__PURE__ */ jsx14(FormLabel, { children: "\uC124\uBA85" }),
8150
- /* @__PURE__ */ jsx14(
8149
+ /* @__PURE__ */ jsx15(FormRow, { children: /* @__PURE__ */ jsxs8(FormEntry, { children: [
8150
+ /* @__PURE__ */ jsx15(FormLabel, { children: "\uC124\uBA85" }),
8151
+ /* @__PURE__ */ jsx15(
8151
8152
  StoreTextEditor,
8152
8153
  {
8153
8154
  store: form.store,
@@ -8158,9 +8159,9 @@ var createPostFormPage = ({
8158
8159
  }
8159
8160
  )
8160
8161
  ] }) }),
8161
- /* @__PURE__ */ jsx14(FormRow, { children: /* @__PURE__ */ jsxs7(FormEntry, { children: [
8162
- /* @__PURE__ */ jsx14(FormLabel, { children: "\uC378\uB124\uC77C" }),
8163
- /* @__PURE__ */ jsx14(
8162
+ /* @__PURE__ */ jsx15(FormRow, { children: /* @__PURE__ */ jsxs8(FormEntry, { children: [
8163
+ /* @__PURE__ */ jsx15(FormLabel, { children: "\uC378\uB124\uC77C" }),
8164
+ /* @__PURE__ */ jsx15(
8164
8165
  PostThumbnailPicker,
8165
8166
  {
8166
8167
  store: form.store,
@@ -8169,14 +8170,14 @@ var createPostFormPage = ({
8169
8170
  )
8170
8171
  ] }) })
8171
8172
  ] }) }),
8172
- /* @__PURE__ */ jsx14("div", { className: "sticky top-[160px] z-998 bg-white px-4", children: /* @__PURE__ */ jsx14(
8173
+ /* @__PURE__ */ jsx15("div", { className: "sticky top-[160px] z-998 bg-white px-4", children: /* @__PURE__ */ jsx15(
8173
8174
  EditorToolbar,
8174
8175
  {
8175
8176
  textEditorRef,
8176
8177
  className: "max-w-7xl mx-auto"
8177
8178
  }
8178
8179
  ) }),
8179
- /* @__PURE__ */ jsx14("div", { className: "px-4", children: /* @__PURE__ */ jsx14(
8180
+ /* @__PURE__ */ jsx15("div", { className: "px-4", children: /* @__PURE__ */ jsx15(
8180
8181
  StoreTextEditor,
8181
8182
  {
8182
8183
  ref: textEditorRef,
@@ -1,10 +1,14 @@
1
- export { BaseTableRepository, ColumnOf, FindAllOptions, InsertModelOf, SelectModelOf, TableRepository } from './repository.mjs';
1
+ export { BaseTableRepository, ColumnOf, FindAllOptions, InsertModelOf, SchemaOf, SelectModelOf, TableRepository } from './repository.mjs';
2
2
  export { TablePageButtons } from './buttons.mjs';
3
3
  export { TableItemLoaderOptions, tableItemloader } from './item_loader.mjs';
4
- export { TableLoaderOptions, tableLoader } from './loader.mjs';
5
- export { TablePageOptions, TableProps, createTablePage } from './page.mjs';
4
+ export { tableLoader } from './loader.mjs';
5
+ export { createTablePage } from './page.mjs';
6
6
  export { OrderedTableProps, Table, TableColumnOptions, TableColumnProps } from './table.mjs';
7
+ export { TableLoaderOptions, loadTable } from './load_table.mjs';
8
+ export { LoadedModel, TableForm, TablePageOptions } from './table_form.mjs';
9
+ export { LoadedTable, useTable } from './use_table.mjs';
7
10
  import 'drizzle-orm';
11
+ import 'drizzle-orm/node-postgres';
8
12
  import 'drizzle-orm/pg-core';
9
13
  import 'react/jsx-runtime';
10
14
  import 'react-router';
@@ -1,10 +1,14 @@
1
- export { BaseTableRepository, ColumnOf, FindAllOptions, InsertModelOf, SelectModelOf, TableRepository } from './repository.js';
1
+ export { BaseTableRepository, ColumnOf, FindAllOptions, InsertModelOf, SchemaOf, SelectModelOf, TableRepository } from './repository.js';
2
2
  export { TablePageButtons } from './buttons.js';
3
3
  export { TableItemLoaderOptions, tableItemloader } from './item_loader.js';
4
- export { TableLoaderOptions, tableLoader } from './loader.js';
5
- export { TablePageOptions, TableProps, createTablePage } from './page.js';
4
+ export { tableLoader } from './loader.js';
5
+ export { createTablePage } from './page.js';
6
6
  export { OrderedTableProps, Table, TableColumnOptions, TableColumnProps } from './table.js';
7
+ export { TableLoaderOptions, loadTable } from './load_table.js';
8
+ export { LoadedModel, TableForm, TablePageOptions } from './table_form.js';
9
+ export { LoadedTable, useTable } from './use_table.js';
7
10
  import 'drizzle-orm';
11
+ import 'drizzle-orm/node-postgres';
8
12
  import 'drizzle-orm/pg-core';
9
13
  import 'react/jsx-runtime';
10
14
  import 'react-router';