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.
- package/dist/api/create_api_handler.d.mts +5 -4
- package/dist/api/create_api_handler.d.ts +5 -4
- package/dist/api/create_api_handler.js +0 -1
- package/dist/api/create_api_handler.mjs +0 -1
- package/dist/api/index.d.mts +1 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +0 -2
- package/dist/api/index.mjs +0 -2
- package/dist/api/item_api_handler.d.mts +5 -4
- package/dist/api/item_api_handler.d.ts +5 -4
- package/dist/api/item_api_handler.js +0 -1
- package/dist/api/item_api_handler.mjs +0 -1
- package/dist/auth/cookie_manager.d.mts +2 -1
- package/dist/auth/cookie_manager.d.ts +2 -1
- package/dist/auth/cookie_manager.js +9 -3
- package/dist/auth/cookie_manager.mjs +9 -3
- package/dist/auth/index.js +9 -3
- package/dist/auth/index.mjs +9 -3
- package/dist/crud/crud_form.js +1 -1
- package/dist/crud/crud_form.mjs +1 -1
- package/dist/crud/crud_loader.d.mts +6 -5
- package/dist/crud/crud_loader.d.ts +6 -5
- package/dist/crud/crud_loader.js +46 -34
- package/dist/crud/crud_loader.mjs +46 -34
- package/dist/crud/crud_page.d.mts +3 -2
- package/dist/crud/crud_page.d.ts +3 -2
- package/dist/crud/crud_page.js +226 -198
- package/dist/crud/crud_page.mjs +224 -202
- package/dist/crud/generate_handlers.d.mts +3 -2
- package/dist/crud/generate_handlers.d.ts +3 -2
- package/dist/crud/generate_pages.d.mts +2 -1
- package/dist/crud/generate_pages.d.ts +2 -1
- package/dist/crud/index.d.mts +5 -3
- package/dist/crud/index.d.ts +5 -3
- package/dist/crud/index.js +246 -206
- package/dist/crud/index.mjs +252 -218
- package/dist/post/index.js +65 -58
- package/dist/post/index.mjs +68 -67
- package/dist/post/post_form_page.js +65 -58
- package/dist/post/post_form_page.mjs +68 -67
- package/dist/table/index.d.mts +7 -3
- package/dist/table/index.d.ts +7 -3
- package/dist/table/index.js +153 -105
- package/dist/table/index.mjs +149 -110
- package/dist/table/item_loader.d.mts +5 -4
- package/dist/table/item_loader.d.ts +5 -4
- package/dist/table/load_table.d.mts +30 -0
- package/dist/table/load_table.d.ts +30 -0
- package/dist/table/load_table.js +67 -0
- package/dist/table/load_table.mjs +45 -0
- package/dist/table/loader.d.mts +7 -15
- package/dist/table/loader.d.ts +7 -15
- package/dist/table/loader.js +47 -31
- package/dist/table/loader.mjs +46 -32
- package/dist/table/page.d.mts +6 -16
- package/dist/table/page.d.ts +6 -16
- package/dist/table/page.js +193 -165
- package/dist/table/page.mjs +194 -172
- package/dist/table/repository.d.mts +13 -11
- package/dist/table/repository.d.ts +13 -11
- package/dist/table/repository.js +1 -1
- package/dist/table/repository.mjs +1 -1
- package/dist/table/table_form.d.mts +13 -0
- package/dist/table/table_form.d.ts +13 -0
- package/dist/table/table_form.js +295 -0
- package/dist/table/table_form.mjs +270 -0
- package/dist/table/use_table.d.mts +4 -0
- package/dist/table/use_table.d.ts +4 -0
- package/dist/table/use_table.js +43 -0
- package/dist/table/use_table.mjs +18 -0
- 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/
|
|
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/
|
|
7960
|
+
// src/table/table.tsx
|
|
7960
7961
|
var import_utils5 = require("dn-react-toolkit/utils");
|
|
7961
|
-
var
|
|
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/
|
|
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
|
|
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/
|
|
7974
|
+
// src/table/table_form.tsx
|
|
7971
7975
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
7972
7976
|
|
|
7973
|
-
// src/
|
|
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
|
|
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
|
|
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,
|
|
7995
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8000
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
8026
|
-
/* @__PURE__ */ (0,
|
|
8027
|
-
/* @__PURE__ */ (0,
|
|
8028
|
-
/* @__PURE__ */ (0,
|
|
8029
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8038
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8044
|
-
/* @__PURE__ */ (0,
|
|
8045
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8056
|
-
/* @__PURE__ */ (0,
|
|
8057
|
-
/* @__PURE__ */ (0,
|
|
8058
|
-
/* @__PURE__ */ (0,
|
|
8059
|
-
/* @__PURE__ */ (0,
|
|
8060
|
-
boards.map((board) => /* @__PURE__ */ (0,
|
|
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,
|
|
8064
|
-
/* @__PURE__ */ (0,
|
|
8065
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8076
|
-
/* @__PURE__ */ (0,
|
|
8077
|
-
/* @__PURE__ */ (0,
|
|
8078
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8094
|
-
/* @__PURE__ */ (0,
|
|
8095
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8106
|
-
/* @__PURE__ */ (0,
|
|
8107
|
-
/* @__PURE__ */ (0,
|
|
8108
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8118
|
-
/* @__PURE__ */ (0,
|
|
8119
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8130
|
-
/* @__PURE__ */ (0,
|
|
8131
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
8143
|
-
/* @__PURE__ */ (0,
|
|
8144
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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/
|
|
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
|
|
7964
|
+
import { useLoaderData as useLoaderData2, useLocation as useLocation4 } from "react-router";
|
|
7967
7965
|
|
|
7968
7966
|
// src/table/page.tsx
|
|
7969
|
-
import {
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
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/
|
|
7973
|
+
// src/table/table.tsx
|
|
7979
7974
|
import { cn as cn4 } from "dn-react-toolkit/utils";
|
|
7980
|
-
import {
|
|
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/
|
|
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 {
|
|
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/
|
|
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
|
|
7994
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
7994
7995
|
|
|
7995
7996
|
// src/crud/generate_pages.tsx
|
|
7996
|
-
import { useLocation as
|
|
7997
|
-
import { jsx as
|
|
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
|
|
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__ */
|
|
8014
|
-
/* @__PURE__ */
|
|
8014
|
+
return /* @__PURE__ */ jsxs8(Fragment7, { children: [
|
|
8015
|
+
/* @__PURE__ */ jsx15(
|
|
8015
8016
|
AdminPageHeader,
|
|
8016
8017
|
{
|
|
8017
8018
|
title: `${form.name} \uCD94\uAC00`,
|
|
8018
|
-
actions: /* @__PURE__ */
|
|
8019
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
8045
|
-
/* @__PURE__ */
|
|
8046
|
-
/* @__PURE__ */
|
|
8047
|
-
/* @__PURE__ */
|
|
8048
|
-
/* @__PURE__ */
|
|
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__ */
|
|
8057
|
-
/* @__PURE__ */
|
|
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__ */
|
|
8063
|
-
/* @__PURE__ */
|
|
8064
|
-
/* @__PURE__ */
|
|
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__ */
|
|
8075
|
-
/* @__PURE__ */
|
|
8076
|
-
/* @__PURE__ */
|
|
8077
|
-
/* @__PURE__ */
|
|
8078
|
-
/* @__PURE__ */
|
|
8079
|
-
boards.map((board) => /* @__PURE__ */
|
|
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__ */
|
|
8083
|
-
/* @__PURE__ */
|
|
8084
|
-
/* @__PURE__ */
|
|
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__ */
|
|
8095
|
-
/* @__PURE__ */
|
|
8096
|
-
/* @__PURE__ */
|
|
8097
|
-
/* @__PURE__ */
|
|
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__ */
|
|
8113
|
-
/* @__PURE__ */
|
|
8114
|
-
/* @__PURE__ */
|
|
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__ */
|
|
8125
|
-
/* @__PURE__ */
|
|
8126
|
-
/* @__PURE__ */
|
|
8127
|
-
/* @__PURE__ */
|
|
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__ */
|
|
8137
|
-
/* @__PURE__ */
|
|
8138
|
-
/* @__PURE__ */
|
|
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__ */
|
|
8149
|
-
/* @__PURE__ */
|
|
8150
|
-
/* @__PURE__ */
|
|
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__ */
|
|
8162
|
-
/* @__PURE__ */
|
|
8163
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
8180
|
+
/* @__PURE__ */ jsx15("div", { className: "px-4", children: /* @__PURE__ */ jsx15(
|
|
8180
8181
|
StoreTextEditor,
|
|
8181
8182
|
{
|
|
8182
8183
|
ref: textEditorRef,
|
package/dist/table/index.d.mts
CHANGED
|
@@ -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 {
|
|
5
|
-
export {
|
|
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';
|
package/dist/table/index.d.ts
CHANGED
|
@@ -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 {
|
|
5
|
-
export {
|
|
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';
|