dn-react-router-toolkit 0.8.1 → 0.9.1
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 +2 -2
- package/dist/api/create_api_handler.d.ts +2 -2
- package/dist/api/create_api_handler.js +55 -52
- package/dist/api/create_api_handler.mjs +61 -59
- package/dist/api/create_handler.d.mts +5 -5
- package/dist/api/create_handler.d.ts +5 -5
- package/dist/api/create_handler.js +41 -44
- package/dist/api/create_handler.mjs +41 -44
- package/dist/api/index.d.mts +4 -3
- package/dist/api/index.d.ts +4 -3
- package/dist/api/index.js +118 -102
- package/dist/api/index.mjs +130 -109
- package/dist/api/item_api_handler.d.mts +4 -3
- package/dist/api/item_api_handler.d.ts +4 -3
- package/dist/api/item_api_handler.js +22 -6
- package/dist/api/item_api_handler.mjs +28 -6
- package/dist/auth/cookie_manager.d.mts +1 -1
- package/dist/auth/cookie_manager.d.ts +1 -1
- package/dist/auth/index.d.mts +2 -2
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +18 -18
- package/dist/auth/index.mjs +18 -18
- package/dist/auth/with_auth.d.mts +2 -2
- package/dist/auth/with_auth.d.ts +2 -2
- package/dist/auth/with_auth.js +18 -18
- package/dist/auth/with_auth.mjs +18 -18
- package/dist/client/editor.d.mts +2 -2
- package/dist/client/editor.d.ts +2 -2
- package/dist/client/editor.js +9 -3
- package/dist/client/editor.mjs +9 -3
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +9 -3
- package/dist/client/index.mjs +9 -3
- package/dist/crud/crud_form.js +22 -4
- package/dist/crud/crud_form.mjs +11 -3
- package/dist/crud/crud_form_provider.js +16 -3
- package/dist/crud/crud_form_provider.mjs +14 -1
- package/dist/crud/index.d.mts +0 -20
- package/dist/crud/index.d.ts +0 -20
- package/dist/crud/index.js +32 -8589
- package/dist/crud/index.mjs +11 -8599
- package/dist/db/backup/index.d.mts +1 -1
- package/dist/db/backup/index.d.ts +1 -1
- package/dist/form/create_form_component.js +21 -2
- package/dist/form/create_form_component.mjs +10 -1
- package/dist/form/form_components.js +21 -2
- package/dist/form/form_components.mjs +10 -1
- package/dist/form/index.js +21 -2
- package/dist/form/index.mjs +10 -1
- package/dist/post/editor_toolbar.js +20 -3
- package/dist/post/editor_toolbar.mjs +9 -2
- package/dist/post/index.js +93 -7711
- package/dist/post/index.mjs +69 -7723
- package/dist/post/post_form_page.js +91 -7711
- package/dist/post/post_form_page.mjs +69 -7725
- package/dist/post/thumbnail_picker.js +21 -2
- package/dist/post/thumbnail_picker.mjs +10 -1
- package/dist/table/buttons.js +11 -14
- package/dist/table/buttons.mjs +10 -13
- package/dist/table/index.d.mts +0 -2
- package/dist/table/index.d.ts +0 -2
- package/dist/table/index.js +24 -95
- package/dist/table/index.mjs +23 -92
- package/dist/table/load_table.d.mts +1 -1
- package/dist/table/load_table.d.ts +1 -1
- package/dist/table/load_table.js +2 -2
- package/dist/table/load_table.mjs +2 -2
- package/dist/table/loader.js +2 -2
- package/dist/table/loader.mjs +2 -2
- package/dist/table/table.d.mts +2 -2
- package/dist/table/table.d.ts +2 -2
- package/dist/table/table.js +14 -25
- package/dist/table/table.mjs +11 -24
- package/dist/table/table_form.js +16 -39
- package/dist/table/table_form.mjs +15 -38
- package/dist/utils/cn.d.mts +3 -0
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/cn.js +32 -0
- package/dist/utils/cn.mjs +7 -0
- package/dist/utils/date.d.mts +5 -0
- package/dist/utils/date.d.ts +5 -0
- package/dist/utils/date.js +65 -0
- package/dist/utils/date.mjs +29 -0
- package/dist/utils/index.d.mts +7 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +116 -0
- package/dist/utils/index.mjs +73 -0
- package/dist/utils/korean.d.mts +6 -0
- package/dist/utils/korean.d.ts +6 -0
- package/dist/{crud/generate_pages.js → utils/korean.js} +16 -30
- package/dist/utils/korean.mjs +16 -0
- package/dist/utils/singleton.d.mts +3 -0
- package/dist/utils/singleton.d.ts +3 -0
- package/dist/utils/singleton.js +37 -0
- package/dist/utils/singleton.mjs +12 -0
- package/dist/utils/sleep.d.mts +3 -0
- package/dist/utils/sleep.d.ts +3 -0
- package/dist/{table/item_loader.js → utils/sleep.js} +8 -19
- package/dist/utils/sleep.mjs +7 -0
- package/dist/utils/slug.d.mts +3 -0
- package/dist/utils/slug.d.ts +3 -0
- package/dist/{crud/generate_handlers.js → utils/slug.js} +8 -15
- package/dist/utils/slug.mjs +7 -0
- package/package.json +7 -3
- package/dist/crud/crud_loader.d.mts +0 -26
- package/dist/crud/crud_loader.d.ts +0 -26
- package/dist/crud/crud_loader.js +0 -351
- package/dist/crud/crud_loader.mjs +0 -337
- package/dist/crud/crud_page.d.mts +0 -32
- package/dist/crud/crud_page.d.ts +0 -32
- package/dist/crud/crud_page.js +0 -776
- package/dist/crud/crud_page.mjs +0 -758
- package/dist/crud/generate_handlers.d.mts +0 -16
- package/dist/crud/generate_handlers.d.ts +0 -16
- package/dist/crud/generate_handlers.mjs +0 -14
- package/dist/crud/generate_pages.d.mts +0 -19
- package/dist/crud/generate_pages.d.ts +0 -19
- package/dist/crud/generate_pages.mjs +0 -30
- package/dist/crud/generate_routes.d.mts +0 -5
- package/dist/crud/generate_routes.d.ts +0 -5
- package/dist/crud/generate_routes.js +0 -7639
- package/dist/crud/generate_routes.mjs +0 -7627
- package/dist/table/item_loader.d.mts +0 -14
- package/dist/table/item_loader.d.ts +0 -14
- package/dist/table/item_loader.mjs +0 -18
- package/dist/table/page.d.mts +0 -16
- package/dist/table/page.d.ts +0 -16
- package/dist/table/page.js +0 -375
- package/dist/table/page.mjs +0 -350
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LoaderFunctionArgs } from 'react-router';
|
|
2
|
-
import { CrudHandler } from './crud_loader.mjs';
|
|
3
|
-
import '../table/item_loader.mjs';
|
|
4
|
-
import '../table/repository.mjs';
|
|
5
|
-
import 'drizzle-orm';
|
|
6
|
-
import 'drizzle-orm/node-postgres';
|
|
7
|
-
import 'drizzle-orm/pg-core';
|
|
8
|
-
import '../table/load_table.mjs';
|
|
9
|
-
import '../api/create_api_handler.mjs';
|
|
10
|
-
import '../auth/with_auth.mjs';
|
|
11
|
-
import 'dn-react-toolkit/auth';
|
|
12
|
-
import 'dn-react-toolkit/auth/server';
|
|
13
|
-
|
|
14
|
-
declare const generateHandlers: (handlers: Record<string, CrudHandler>) => (args: LoaderFunctionArgs) => Promise<any>;
|
|
15
|
-
|
|
16
|
-
export { generateHandlers };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LoaderFunctionArgs } from 'react-router';
|
|
2
|
-
import { CrudHandler } from './crud_loader.js';
|
|
3
|
-
import '../table/item_loader.js';
|
|
4
|
-
import '../table/repository.js';
|
|
5
|
-
import 'drizzle-orm';
|
|
6
|
-
import 'drizzle-orm/node-postgres';
|
|
7
|
-
import 'drizzle-orm/pg-core';
|
|
8
|
-
import '../table/load_table.js';
|
|
9
|
-
import '../api/create_api_handler.js';
|
|
10
|
-
import '../auth/with_auth.js';
|
|
11
|
-
import 'dn-react-toolkit/auth';
|
|
12
|
-
import 'dn-react-toolkit/auth/server';
|
|
13
|
-
|
|
14
|
-
declare const generateHandlers: (handlers: Record<string, CrudHandler>) => (args: LoaderFunctionArgs) => Promise<any>;
|
|
15
|
-
|
|
16
|
-
export { generateHandlers };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// src/crud/generate_handlers.ts
|
|
2
|
-
var generateHandlers = (handlers) => {
|
|
3
|
-
return async (args) => {
|
|
4
|
-
const pattern = args.unstable_pattern;
|
|
5
|
-
for (const route of Object.keys(handlers)) {
|
|
6
|
-
if (pattern.startsWith(route) || pattern.startsWith(`/api${route}`)) {
|
|
7
|
-
return handlers[route](route)(args);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
generateHandlers
|
|
14
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { CrudPage } from './crud_page.mjs';
|
|
3
|
-
import './crud_form_provider.mjs';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react-store-input';
|
|
6
|
-
import '../table/table_form.mjs';
|
|
7
|
-
import '../table/table.mjs';
|
|
8
|
-
import '../table/use_table.mjs';
|
|
9
|
-
|
|
10
|
-
declare const generatePages: (pages: Record<string, CrudPage>) => {
|
|
11
|
-
Page: () => react_jsx_runtime.JSX.Element | undefined;
|
|
12
|
-
routes: string[];
|
|
13
|
-
menus: {
|
|
14
|
-
title: string;
|
|
15
|
-
to: string;
|
|
16
|
-
}[];
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export { generatePages };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { CrudPage } from './crud_page.js';
|
|
3
|
-
import './crud_form_provider.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react-store-input';
|
|
6
|
-
import '../table/table_form.js';
|
|
7
|
-
import '../table/table.js';
|
|
8
|
-
import '../table/use_table.js';
|
|
9
|
-
|
|
10
|
-
declare const generatePages: (pages: Record<string, CrudPage>) => {
|
|
11
|
-
Page: () => react_jsx_runtime.JSX.Element | undefined;
|
|
12
|
-
routes: string[];
|
|
13
|
-
menus: {
|
|
14
|
-
title: string;
|
|
15
|
-
to: string;
|
|
16
|
-
}[];
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export { generatePages };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// src/crud/generate_pages.tsx
|
|
2
|
-
import { useLocation } from "react-router";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
var generatePages = (pages) => {
|
|
5
|
-
function Page() {
|
|
6
|
-
const { pathname } = useLocation();
|
|
7
|
-
for (const route of Object.keys(pages)) {
|
|
8
|
-
if (pathname.startsWith(route)) {
|
|
9
|
-
const Page2 = pages[route].create(route);
|
|
10
|
-
return /* @__PURE__ */ jsx(Page2, {});
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
const routes = Object.keys(pages);
|
|
15
|
-
const menus = Object.keys(pages).map((path) => {
|
|
16
|
-
const page = pages[path];
|
|
17
|
-
return {
|
|
18
|
-
title: page.name,
|
|
19
|
-
to: path
|
|
20
|
-
};
|
|
21
|
-
});
|
|
22
|
-
return {
|
|
23
|
-
Page,
|
|
24
|
-
routes,
|
|
25
|
-
menus
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
generatePages
|
|
30
|
-
};
|