dn-react-router-toolkit 0.7.7 → 0.7.9
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 -5
- package/dist/api/create_api_handler.d.ts +5 -5
- package/dist/client/env_loader.d.mts +2 -2
- package/dist/client/env_loader.d.ts +2 -2
- package/dist/client/env_loader.js +2 -12
- package/dist/client/env_loader.mjs +2 -2
- package/dist/client/file_input.d.mts +3 -2
- package/dist/client/file_input.d.ts +3 -2
- package/dist/client/file_input.js +30 -37
- package/dist/client/file_input.mjs +33 -28
- package/dist/client/index.d.mts +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +38 -44
- package/dist/client/index.mjs +39 -33
- package/dist/client/store_text_editor.d.mts +2 -2
- package/dist/client/store_text_editor.d.ts +2 -2
- package/dist/client/store_text_editor.js +3 -12
- package/dist/client/store_text_editor.mjs +3 -2
- package/dist/crud/crud_form.d.mts +5 -4
- package/dist/crud/crud_form.d.ts +5 -4
- package/dist/crud/crud_form.js +83 -72
- package/dist/crud/crud_form.mjs +88 -62
- package/dist/crud/crud_form_provider.d.mts +10 -8
- package/dist/crud/crud_form_provider.d.ts +10 -8
- package/dist/crud/crud_form_provider.js +2 -12
- package/dist/crud/crud_form_provider.mjs +6 -3
- package/dist/crud/crud_loader.d.mts +1 -1
- package/dist/crud/crud_loader.d.ts +1 -1
- package/dist/crud/crud_page.d.mts +10 -6
- package/dist/crud/crud_page.d.ts +10 -6
- package/dist/crud/crud_page.js +281 -409
- package/dist/crud/crud_page.mjs +286 -399
- package/dist/crud/generate_pages.d.mts +10 -2
- package/dist/crud/generate_pages.d.ts +10 -2
- package/dist/crud/generate_pages.js +17 -14
- package/dist/crud/generate_pages.mjs +17 -4
- package/dist/crud/index.d.mts +2 -1
- package/dist/crud/index.d.ts +2 -1
- package/dist/crud/index.js +299 -404
- package/dist/crud/index.mjs +304 -404
- package/dist/form/create_form_component.d.mts +3 -2
- package/dist/form/create_form_component.d.ts +3 -2
- package/dist/form/create_form_component.js +3 -12
- package/dist/form/create_form_component.mjs +3 -2
- package/dist/form/form_components.d.mts +5 -4
- package/dist/form/form_components.d.ts +5 -4
- package/dist/form/form_components.js +3 -12
- package/dist/form/form_components.mjs +3 -2
- package/dist/form/index.d.mts +1 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/form/index.js +3 -12
- package/dist/form/index.mjs +3 -2
- package/dist/post/editor_toolbar.d.mts +4 -3
- package/dist/post/editor_toolbar.d.ts +4 -3
- package/dist/post/editor_toolbar.js +116 -273
- package/dist/post/editor_toolbar.mjs +123 -263
- package/dist/post/index.d.mts +1 -0
- package/dist/post/index.d.ts +1 -0
- package/dist/post/index.js +329 -411
- package/dist/post/index.mjs +337 -409
- package/dist/post/post_form_page.d.mts +5 -4
- package/dist/post/post_form_page.d.ts +5 -4
- package/dist/post/post_form_page.js +331 -413
- package/dist/post/post_form_page.mjs +337 -409
- package/dist/post/thumbnail_picker.d.mts +3 -2
- package/dist/post/thumbnail_picker.d.ts +3 -2
- package/dist/post/thumbnail_picker.js +14 -23
- package/dist/post/thumbnail_picker.mjs +14 -13
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.d.ts +1 -1
- package/dist/seo/index.js +2 -2
- package/dist/seo/index.mjs +2 -2
- package/dist/seo/seo.d.mts +2 -2
- package/dist/seo/seo.d.ts +2 -2
- package/dist/seo/seo.js +2 -2
- package/dist/seo/seo.mjs +2 -2
- package/dist/table/buttons.d.mts +2 -2
- package/dist/table/buttons.d.ts +2 -2
- package/dist/table/buttons.js +42 -57
- package/dist/table/buttons.mjs +42 -47
- package/dist/table/index.d.mts +1 -0
- package/dist/table/index.d.ts +1 -0
- package/dist/table/index.js +185 -338
- package/dist/table/index.mjs +185 -328
- package/dist/table/page.d.mts +5 -4
- package/dist/table/page.d.ts +5 -4
- package/dist/table/page.js +185 -338
- package/dist/table/page.mjs +185 -328
- package/dist/table/table.d.mts +5 -4
- package/dist/table/table.d.ts +5 -4
- package/dist/table/table.js +77 -237
- package/dist/table/table.mjs +77 -227
- package/package.json +7 -5
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
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
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// src/crud/crud_form_provider.tsx
|
|
@@ -38,7 +28,6 @@ module.exports = __toCommonJS(crud_form_provider_exports);
|
|
|
38
28
|
var import_react_router = require("react-router");
|
|
39
29
|
var import_react_store_input = require("react-store-input");
|
|
40
30
|
var import_react = require("react");
|
|
41
|
-
var import_react2 = __toESM(require("react"));
|
|
42
31
|
|
|
43
32
|
// src/crud/serialize.ts
|
|
44
33
|
function serialize(value) {
|
|
@@ -99,6 +88,7 @@ function serialize(value) {
|
|
|
99
88
|
}
|
|
100
89
|
|
|
101
90
|
// src/crud/crud_form_provider.tsx
|
|
91
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
102
92
|
var FormContext = (0, import_react.createContext)({});
|
|
103
93
|
function useFormContext() {
|
|
104
94
|
return (0, import_react.useContext)(FormContext);
|
|
@@ -179,7 +169,7 @@ function CrudFormProvider({
|
|
|
179
169
|
delete: deleteItem,
|
|
180
170
|
columns
|
|
181
171
|
};
|
|
182
|
-
return /* @__PURE__ */
|
|
172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormContext.Provider, { value, children });
|
|
183
173
|
}
|
|
184
174
|
// Annotate the CommonJS export names for ESM import in node:
|
|
185
175
|
0 && (module.exports = {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// src/crud/crud_form_provider.tsx
|
|
2
2
|
import { useNavigate } from "react-router";
|
|
3
3
|
import { useStore } from "react-store-input";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
createContext,
|
|
6
|
+
useContext
|
|
7
|
+
} from "react";
|
|
6
8
|
|
|
7
9
|
// src/crud/serialize.ts
|
|
8
10
|
function serialize(value) {
|
|
@@ -63,6 +65,7 @@ function serialize(value) {
|
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
// src/crud/crud_form_provider.tsx
|
|
68
|
+
import { jsx } from "react/jsx-runtime";
|
|
66
69
|
var FormContext = createContext({});
|
|
67
70
|
function useFormContext() {
|
|
68
71
|
return useContext(FormContext);
|
|
@@ -143,7 +146,7 @@ function CrudFormProvider({
|
|
|
143
146
|
delete: deleteItem,
|
|
144
147
|
columns
|
|
145
148
|
};
|
|
146
|
-
return /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ jsx(FormContext.Provider, { value, children });
|
|
147
150
|
}
|
|
148
151
|
export {
|
|
149
152
|
FormContext,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LoaderFunctionArgs, LoaderFunction } from 'react-router';
|
|
2
2
|
import { TableLoaderOptions } from '../table/loader.mjs';
|
|
3
3
|
import { TableItemLoaderOptions } from '../table/item_loader.mjs';
|
|
4
4
|
import { Table } from 'drizzle-orm';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LoaderFunctionArgs, LoaderFunction } from 'react-router';
|
|
2
2
|
import { TableLoaderOptions } from '../table/loader.js';
|
|
3
3
|
import { TableItemLoaderOptions } from '../table/item_loader.js';
|
|
4
4
|
import { Table } from 'drizzle-orm';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FormContextProps, CrudFormProps } from './crud_form_provider.mjs';
|
|
2
2
|
import { TablePageOptions } from '../table/page.mjs';
|
|
3
|
-
import
|
|
3
|
+
import { FC, ReactNode } from 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
4
5
|
import 'react-store-input';
|
|
5
6
|
import '../table/table.mjs';
|
|
6
7
|
|
|
@@ -9,19 +10,22 @@ type CrudPageOptions<TModel> = {
|
|
|
9
10
|
primaryKey: keyof TModel;
|
|
10
11
|
tablePageOptions: Omit<TablePageOptions<TModel>, "name">;
|
|
11
12
|
formOptions: {
|
|
12
|
-
form?:
|
|
13
|
+
form?: FC<{
|
|
13
14
|
form: FormContextProps<TModel>;
|
|
14
15
|
}>;
|
|
15
16
|
columns?: CrudFormProps<TModel>["columns"];
|
|
16
17
|
};
|
|
17
|
-
header:
|
|
18
|
+
header: FC<{
|
|
18
19
|
title: string;
|
|
19
|
-
actions?:
|
|
20
|
+
actions?: ReactNode;
|
|
20
21
|
className?: string;
|
|
21
|
-
children?:
|
|
22
|
+
children?: ReactNode;
|
|
22
23
|
}>;
|
|
23
24
|
};
|
|
24
|
-
type CrudPage =
|
|
25
|
+
type CrudPage = {
|
|
26
|
+
name: string;
|
|
27
|
+
create: (prefix: string) => FC;
|
|
28
|
+
};
|
|
25
29
|
declare function crudPage<TModel>({ name, primaryKey, tablePageOptions, formOptions, header: header, }: CrudPageOptions<TModel>): CrudPage;
|
|
26
30
|
|
|
27
31
|
export { type CrudPage, type CrudPageOptions, crudPage };
|
package/dist/crud/crud_page.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FormContextProps, CrudFormProps } from './crud_form_provider.js';
|
|
2
2
|
import { TablePageOptions } from '../table/page.js';
|
|
3
|
-
import
|
|
3
|
+
import { FC, ReactNode } from 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
4
5
|
import 'react-store-input';
|
|
5
6
|
import '../table/table.js';
|
|
6
7
|
|
|
@@ -9,19 +10,22 @@ type CrudPageOptions<TModel> = {
|
|
|
9
10
|
primaryKey: keyof TModel;
|
|
10
11
|
tablePageOptions: Omit<TablePageOptions<TModel>, "name">;
|
|
11
12
|
formOptions: {
|
|
12
|
-
form?:
|
|
13
|
+
form?: FC<{
|
|
13
14
|
form: FormContextProps<TModel>;
|
|
14
15
|
}>;
|
|
15
16
|
columns?: CrudFormProps<TModel>["columns"];
|
|
16
17
|
};
|
|
17
|
-
header:
|
|
18
|
+
header: FC<{
|
|
18
19
|
title: string;
|
|
19
|
-
actions?:
|
|
20
|
+
actions?: ReactNode;
|
|
20
21
|
className?: string;
|
|
21
|
-
children?:
|
|
22
|
+
children?: ReactNode;
|
|
22
23
|
}>;
|
|
23
24
|
};
|
|
24
|
-
type CrudPage =
|
|
25
|
+
type CrudPage = {
|
|
26
|
+
name: string;
|
|
27
|
+
create: (prefix: string) => FC;
|
|
28
|
+
};
|
|
25
29
|
declare function crudPage<TModel>({ name, primaryKey, tablePageOptions, formOptions, header: header, }: CrudPageOptions<TModel>): CrudPage;
|
|
26
30
|
|
|
27
31
|
export { type CrudPage, type CrudPageOptions, crudPage };
|