dn-react-router-toolkit 0.9.12 → 0.10.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/default_api_handler.d.mts +2 -1
- package/dist/api/default_api_handler.d.ts +2 -1
- package/dist/api/index.js +2 -23
- package/dist/api/index.mjs +3 -31
- package/dist/api/patch_resource_handler.js +2 -23
- package/dist/api/patch_resource_handler.mjs +3 -31
- package/dist/api/put_resource_handler.js +2 -23
- package/dist/api/put_resource_handler.mjs +3 -31
- package/dist/api/resource_handler.d.mts +3 -2
- package/dist/api/resource_handler.d.ts +3 -2
- package/dist/api/resource_handler.js +2 -23
- package/dist/api/resource_handler.mjs +3 -31
- package/dist/client/env_loader.d.mts +2 -2
- package/dist/client/env_loader.d.ts +2 -2
- package/dist/client/file_input.d.mts +2 -2
- package/dist/client/file_input.d.ts +2 -2
- package/dist/client/index.d.mts +0 -7
- package/dist/client/index.d.ts +0 -7
- package/dist/client/index.js +0 -117
- package/dist/client/index.mjs +0 -117
- package/dist/crud/crud_form.d.mts +2 -2
- package/dist/crud/crud_form.d.ts +2 -2
- package/dist/crud/crud_form.js +40 -151
- package/dist/crud/crud_form.mjs +40 -158
- package/dist/crud/crud_form_provider.d.mts +6 -7
- package/dist/crud/crud_form_provider.d.ts +6 -7
- package/dist/crud/crud_form_provider.mjs +1 -4
- package/dist/crud/index.d.mts +0 -1
- package/dist/crud/index.d.ts +0 -1
- package/dist/crud/index.js +2 -23
- package/dist/crud/index.mjs +3 -31
- package/dist/form/create_form_component.d.mts +2 -2
- package/dist/form/create_form_component.d.ts +2 -2
- package/dist/form/form_components.d.mts +3 -4
- package/dist/form/form_components.d.ts +3 -4
- package/dist/form/index.d.mts +0 -1
- package/dist/form/index.d.ts +0 -1
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/post/index.d.mts +2 -3
- package/dist/post/index.d.ts +2 -3
- package/dist/post/thumbnail_picker.d.mts +4 -4
- package/dist/post/thumbnail_picker.d.ts +4 -4
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.d.ts +1 -1
- package/dist/seo/seo.d.mts +2 -2
- package/dist/seo/seo.d.ts +2 -2
- package/dist/table/buttons.d.mts +2 -2
- package/dist/table/buttons.d.ts +2 -2
- package/dist/table/index.d.mts +1 -2
- package/dist/table/index.d.ts +1 -2
- package/dist/table/table.d.mts +2 -2
- package/dist/table/table.d.ts +2 -2
- package/dist/table/table_form.d.mts +2 -3
- package/dist/table/table_form.d.ts +2 -3
- package/package.json +13 -13
- package/dist/client/editor.d.mts +0 -12
- package/dist/client/editor.d.ts +0 -12
- package/dist/client/editor.js +0 -63
- package/dist/client/editor.mjs +0 -38
- package/dist/client/store_text_editor.d.mts +0 -13
- package/dist/client/store_text_editor.d.ts +0 -13
- package/dist/client/store_text_editor.js +0 -104
- package/dist/client/store_text_editor.mjs +0 -81
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as react from 'react';
|
|
3
2
|
import { HTMLInputTypeAttribute, FC, ReactNode } from 'react';
|
|
4
3
|
import { Store } from 'react-store-input';
|
|
5
4
|
|
|
6
|
-
type FormColumnValue<TModel> = {
|
|
5
|
+
type FormColumnValue<TModel extends {}> = {
|
|
7
6
|
label?: string;
|
|
8
7
|
type?: HTMLInputTypeAttribute | "textarea";
|
|
9
8
|
defaultValue?: TModel[keyof TModel];
|
|
@@ -13,10 +12,10 @@ type FormColumnValue<TModel> = {
|
|
|
13
12
|
}>;
|
|
14
13
|
options?: FC;
|
|
15
14
|
};
|
|
16
|
-
type FormColumns<TModel> = Partial<{
|
|
15
|
+
type FormColumns<TModel extends {}> = Partial<{
|
|
17
16
|
[K in keyof TModel]: FormColumnValue<TModel>;
|
|
18
17
|
}>;
|
|
19
|
-
type FormContextProps<TModel> = {
|
|
18
|
+
type FormContextProps<TModel extends {}> = {
|
|
20
19
|
name: string;
|
|
21
20
|
item?: TModel;
|
|
22
21
|
store: Store<TModel>;
|
|
@@ -25,8 +24,8 @@ type FormContextProps<TModel> = {
|
|
|
25
24
|
columns: FormColumns<TModel>;
|
|
26
25
|
};
|
|
27
26
|
declare const FormContext: react.Context<{}>;
|
|
28
|
-
declare function useFormContext<TModel>(): FormContextProps<TModel>;
|
|
29
|
-
type CrudFormProps<TModel> = {
|
|
27
|
+
declare function useFormContext<TModel extends {}>(): FormContextProps<TModel>;
|
|
28
|
+
type CrudFormProps<TModel extends {}> = {
|
|
30
29
|
primaryKey?: keyof TModel;
|
|
31
30
|
name: string;
|
|
32
31
|
prefix: string;
|
|
@@ -34,6 +33,6 @@ type CrudFormProps<TModel> = {
|
|
|
34
33
|
columns?: FormColumns<TModel>;
|
|
35
34
|
children?: ReactNode;
|
|
36
35
|
};
|
|
37
|
-
declare function CrudFormProvider<TModel>({ primaryKey, name, prefix, item, columns, children, }: CrudFormProps<TModel>):
|
|
36
|
+
declare function CrudFormProvider<TModel extends {}>({ primaryKey, name, prefix, item, columns, children, }: CrudFormProps<TModel>): react.JSX.Element;
|
|
38
37
|
|
|
39
38
|
export { type CrudFormProps, type FormColumnValue, type FormColumns, FormContext, type FormContextProps, CrudFormProvider as default, useFormContext };
|
|
@@ -1,10 +1,7 @@
|
|
|
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
|
-
createContext,
|
|
6
|
-
useContext
|
|
7
|
-
} from "react";
|
|
4
|
+
import { createContext, useContext } from "react";
|
|
8
5
|
|
|
9
6
|
// src/crud/serialize.ts
|
|
10
7
|
function serialize(value) {
|
package/dist/crud/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { CrudFormProps, FormColumnValue, FormColumns, FormContext, FormContextProps, useFormContext } from './crud_form_provider.mjs';
|
|
2
2
|
export { deserialize, serialize } from './serialize.mjs';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
3
|
import 'react';
|
|
5
4
|
import 'react-store-input';
|
package/dist/crud/index.d.ts
CHANGED
package/dist/crud/index.js
CHANGED
|
@@ -174,30 +174,9 @@ var FormLabel = createComponent("label", {
|
|
|
174
174
|
});
|
|
175
175
|
|
|
176
176
|
// src/crud/crud_form.tsx
|
|
177
|
-
var import_react_store_input3 = require("react-store-input");
|
|
178
|
-
|
|
179
|
-
// src/client/env_loader.tsx
|
|
180
|
-
var import_react_router2 = require("react-router");
|
|
181
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
182
|
-
|
|
183
|
-
// src/client/file_input.tsx
|
|
184
|
-
var import_react3 = require("react");
|
|
185
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
186
|
-
|
|
187
|
-
// src/client/use_user_agent.tsx
|
|
188
|
-
var import_react_router3 = require("react-router");
|
|
189
|
-
|
|
190
|
-
// src/client/store_text_editor.tsx
|
|
191
|
-
var import_gw_react_text_editor = require("gw-react-text-editor");
|
|
192
177
|
var import_react_store_input2 = require("react-store-input");
|
|
193
|
-
var
|
|
194
|
-
var
|
|
195
|
-
|
|
196
|
-
// src/client/editor.tsx
|
|
197
|
-
var import_client = require("gw-file/client");
|
|
198
|
-
|
|
199
|
-
// src/crud/crud_form.tsx
|
|
200
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
178
|
+
var import_text_editor = require("react-store-input/text-editor");
|
|
179
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
201
180
|
// Annotate the CommonJS export names for ESM import in node:
|
|
202
181
|
0 && (module.exports = {
|
|
203
182
|
FormContext,
|
package/dist/crud/index.mjs
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
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
|
-
createContext,
|
|
6
|
-
useContext
|
|
7
|
-
} from "react";
|
|
4
|
+
import { createContext, useContext } from "react";
|
|
8
5
|
|
|
9
6
|
// src/crud/serialize.ts
|
|
10
7
|
function serialize(value) {
|
|
@@ -139,33 +136,8 @@ var FormLabel = createComponent("label", {
|
|
|
139
136
|
|
|
140
137
|
// src/crud/crud_form.tsx
|
|
141
138
|
import { useStoreComponent } from "react-store-input";
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
import { useRouteLoaderData } from "react-router";
|
|
145
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
146
|
-
|
|
147
|
-
// src/client/file_input.tsx
|
|
148
|
-
import {
|
|
149
|
-
useRef
|
|
150
|
-
} from "react";
|
|
151
|
-
import { Fragment, jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
152
|
-
|
|
153
|
-
// src/client/use_user_agent.tsx
|
|
154
|
-
import { useRouteLoaderData as useRouteLoaderData2 } from "react-router";
|
|
155
|
-
|
|
156
|
-
// src/client/store_text_editor.tsx
|
|
157
|
-
import {
|
|
158
|
-
TextEditor
|
|
159
|
-
} from "gw-react-text-editor";
|
|
160
|
-
import { useStoreController } from "react-store-input";
|
|
161
|
-
import { useImperativeHandle, useRef as useRef2 } from "react";
|
|
162
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
163
|
-
|
|
164
|
-
// src/client/editor.tsx
|
|
165
|
-
import { generateMetadata } from "gw-file/client";
|
|
166
|
-
|
|
167
|
-
// src/crud/crud_form.tsx
|
|
168
|
-
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
139
|
+
import { TextEditor } from "react-store-input/text-editor";
|
|
140
|
+
import { Fragment, jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
169
141
|
export {
|
|
170
142
|
FormContext,
|
|
171
143
|
deserialize,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { HTMLElementType, DetailedHTMLProps, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, ButtonHTMLAttributes, LabelHTMLAttributes, FormHTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
type ElementPropsMap = {
|
|
@@ -24,6 +24,6 @@ type ElementPropsMap = {
|
|
|
24
24
|
type Props<T extends HTMLElementType> = T extends keyof ElementPropsMap ? ElementPropsMap[T] : DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
25
25
|
declare function createComponent<T extends HTMLElementType>(tag: T, options: {
|
|
26
26
|
className?: string;
|
|
27
|
-
}): ({ className, ...props }: Props<T>) =>
|
|
27
|
+
}): ({ className, ...props }: Props<T>) => react.JSX.Element;
|
|
28
28
|
|
|
29
29
|
export { createComponent };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { HTMLElementType, DetailedHTMLProps, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, ButtonHTMLAttributes, LabelHTMLAttributes, FormHTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
type ElementPropsMap = {
|
|
@@ -24,6 +24,6 @@ type ElementPropsMap = {
|
|
|
24
24
|
type Props<T extends HTMLElementType> = T extends keyof ElementPropsMap ? ElementPropsMap[T] : DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
25
25
|
declare function createComponent<T extends HTMLElementType>(tag: T, options: {
|
|
26
26
|
className?: string;
|
|
27
|
-
}): ({ className, ...props }: Props<T>) =>
|
|
27
|
+
}): ({ className, ...props }: Props<T>) => react.JSX.Element;
|
|
28
28
|
|
|
29
29
|
export { createComponent };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as react from 'react';
|
|
3
2
|
|
|
4
|
-
declare const FormEntry: ({ className, ...props }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) =>
|
|
5
|
-
declare const FormRow: ({ className, ...props }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) =>
|
|
6
|
-
declare const FormLabel: ({ className, ...props }: react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>) =>
|
|
3
|
+
declare const FormEntry: ({ className, ...props }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => react.JSX.Element;
|
|
4
|
+
declare const FormRow: ({ className, ...props }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => react.JSX.Element;
|
|
5
|
+
declare const FormLabel: ({ className, ...props }: react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>) => react.JSX.Element;
|
|
7
6
|
|
|
8
7
|
export { FormEntry, FormLabel, FormRow };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as react from 'react';
|
|
3
2
|
|
|
4
|
-
declare const FormEntry: ({ className, ...props }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) =>
|
|
5
|
-
declare const FormRow: ({ className, ...props }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) =>
|
|
6
|
-
declare const FormLabel: ({ className, ...props }: react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>) =>
|
|
3
|
+
declare const FormEntry: ({ className, ...props }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => react.JSX.Element;
|
|
4
|
+
declare const FormRow: ({ className, ...props }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => react.JSX.Element;
|
|
5
|
+
declare const FormLabel: ({ className, ...props }: react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>) => react.JSX.Element;
|
|
7
6
|
|
|
8
7
|
export { FormEntry, FormLabel, FormRow };
|
package/dist/form/index.d.mts
CHANGED
package/dist/form/index.d.ts
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import 'drizzle-orm/pg-core';
|
|
1
|
+
|
|
2
|
+
export { }
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import 'drizzle-orm/pg-core';
|
|
1
|
+
|
|
2
|
+
export { }
|
package/dist/post/index.d.mts
CHANGED
package/dist/post/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Store } from 'react-store-input';
|
|
1
|
+
import * as react from 'react';
|
|
3
2
|
import { RefObject } from 'react';
|
|
4
|
-
import {
|
|
3
|
+
import { Store } from 'react-store-input';
|
|
4
|
+
import { TextEditorController } from 'gw-rich-text-editor';
|
|
5
5
|
|
|
6
6
|
declare function PostThumbnailPicker<T extends {
|
|
7
7
|
thumbnail: string | null;
|
|
8
8
|
}>({ store, textEditorRef, }: {
|
|
9
9
|
store: Store<T>;
|
|
10
10
|
textEditorRef: RefObject<TextEditorController | null>;
|
|
11
|
-
}):
|
|
11
|
+
}): react.JSX.Element;
|
|
12
12
|
|
|
13
13
|
export { PostThumbnailPicker };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Store } from 'react-store-input';
|
|
1
|
+
import * as react from 'react';
|
|
3
2
|
import { RefObject } from 'react';
|
|
4
|
-
import {
|
|
3
|
+
import { Store } from 'react-store-input';
|
|
4
|
+
import { TextEditorController } from 'gw-rich-text-editor';
|
|
5
5
|
|
|
6
6
|
declare function PostThumbnailPicker<T extends {
|
|
7
7
|
thumbnail: string | null;
|
|
8
8
|
}>({ store, textEditorRef, }: {
|
|
9
9
|
store: Store<T>;
|
|
10
10
|
textEditorRef: RefObject<TextEditorController | null>;
|
|
11
|
-
}):
|
|
11
|
+
}): react.JSX.Element;
|
|
12
12
|
|
|
13
13
|
export { PostThumbnailPicker };
|
package/dist/seo/index.d.mts
CHANGED
package/dist/seo/index.d.ts
CHANGED
package/dist/seo/seo.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import * as Schema from 'schema-dts';
|
|
3
3
|
import { MetaFunction } from 'react-router';
|
|
4
4
|
|
|
@@ -65,7 +65,7 @@ declare function configSEO(config: {
|
|
|
65
65
|
thumbnail: SEOImage | null | undefined;
|
|
66
66
|
};
|
|
67
67
|
meta: MetaFunction<unknown, Record<string, unknown>>;
|
|
68
|
-
StructedData: () =>
|
|
68
|
+
StructedData: () => react.JSX.Element;
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
export { type SEO, type SEOImage, configSEO };
|
package/dist/seo/seo.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import * as Schema from 'schema-dts';
|
|
3
3
|
import { MetaFunction } from 'react-router';
|
|
4
4
|
|
|
@@ -65,7 +65,7 @@ declare function configSEO(config: {
|
|
|
65
65
|
thumbnail: SEOImage | null | undefined;
|
|
66
66
|
};
|
|
67
67
|
meta: MetaFunction<unknown, Record<string, unknown>>;
|
|
68
|
-
StructedData: () =>
|
|
68
|
+
StructedData: () => react.JSX.Element;
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
export { type SEO, type SEOImage, configSEO };
|
package/dist/table/buttons.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
3
|
declare function TablePageButtons({ MAX_PAGES_TO_SHOW, total, limit, offset, }: {
|
|
4
4
|
MAX_PAGES_TO_SHOW: number;
|
|
5
5
|
total: number;
|
|
6
6
|
limit: number;
|
|
7
7
|
offset: number;
|
|
8
|
-
}):
|
|
8
|
+
}): react.JSX.Element;
|
|
9
9
|
|
|
10
10
|
export { TablePageButtons };
|
package/dist/table/buttons.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
|
|
3
3
|
declare function TablePageButtons({ MAX_PAGES_TO_SHOW, total, limit, offset, }: {
|
|
4
4
|
MAX_PAGES_TO_SHOW: number;
|
|
5
5
|
total: number;
|
|
6
6
|
limit: number;
|
|
7
7
|
offset: number;
|
|
8
|
-
}):
|
|
8
|
+
}): react.JSX.Element;
|
|
9
9
|
|
|
10
10
|
export { TablePageButtons };
|
package/dist/table/index.d.mts
CHANGED
package/dist/table/index.d.ts
CHANGED
package/dist/table/table.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { DetailedHTMLProps, TableHTMLAttributes, ReactNode, FC } from 'react';
|
|
3
3
|
|
|
4
4
|
type TableColumnProps<T> = ReactNode | {
|
|
@@ -26,6 +26,6 @@ type OrderedTableProps<T> = DetailedHTMLProps<TableHTMLAttributes<HTMLTableEleme
|
|
|
26
26
|
[key: string]: unknown[];
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
declare function Table<T>({ className, data, columns, mapper: Mapper, getLink, limit, offset, orderBy, direction, filters, }: OrderedTableProps<T>):
|
|
29
|
+
declare function Table<T>({ className, data, columns, mapper: Mapper, getLink, limit, offset, orderBy, direction, filters, }: OrderedTableProps<T>): react.JSX.Element;
|
|
30
30
|
|
|
31
31
|
export { type OrderedTableProps, Table, type TableColumnOptions, type TableColumnProps };
|
package/dist/table/table.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { DetailedHTMLProps, TableHTMLAttributes, ReactNode, FC } from 'react';
|
|
3
3
|
|
|
4
4
|
type TableColumnProps<T> = ReactNode | {
|
|
@@ -26,6 +26,6 @@ type OrderedTableProps<T> = DetailedHTMLProps<TableHTMLAttributes<HTMLTableEleme
|
|
|
26
26
|
[key: string]: unknown[];
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
declare function Table<T>({ className, data, columns, mapper: Mapper, getLink, limit, offset, orderBy, direction, filters, }: OrderedTableProps<T>):
|
|
29
|
+
declare function Table<T>({ className, data, columns, mapper: Mapper, getLink, limit, offset, orderBy, direction, filters, }: OrderedTableProps<T>): react.JSX.Element;
|
|
30
30
|
|
|
31
31
|
export { type OrderedTableProps, Table, type TableColumnOptions, type TableColumnProps };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { TableColumnOptions } from './table.mjs';
|
|
3
3
|
import { TableLoaderData } from './use_table.mjs';
|
|
4
|
-
import 'react';
|
|
5
4
|
|
|
6
5
|
type TablePageOptions<TModel> = {
|
|
7
6
|
columns: TableColumnOptions<TModel>;
|
|
8
7
|
primaryKey?: keyof TModel;
|
|
9
8
|
};
|
|
10
9
|
type LoadedModel<T extends (...args: any) => any> = TableLoaderData<T>["items"][number];
|
|
11
|
-
declare function TableForm<T extends (...args: any) => any>({ columns, primaryKey, }: TablePageOptions<LoadedModel<T>>):
|
|
10
|
+
declare function TableForm<T extends (...args: any) => any>({ columns, primaryKey, }: TablePageOptions<LoadedModel<T>>): react.JSX.Element;
|
|
12
11
|
|
|
13
12
|
export { type LoadedModel, TableForm, type TablePageOptions };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { TableColumnOptions } from './table.js';
|
|
3
3
|
import { TableLoaderData } from './use_table.js';
|
|
4
|
-
import 'react';
|
|
5
4
|
|
|
6
5
|
type TablePageOptions<TModel> = {
|
|
7
6
|
columns: TableColumnOptions<TModel>;
|
|
8
7
|
primaryKey?: keyof TModel;
|
|
9
8
|
};
|
|
10
9
|
type LoadedModel<T extends (...args: any) => any> = TableLoaderData<T>["items"][number];
|
|
11
|
-
declare function TableForm<T extends (...args: any) => any>({ columns, primaryKey, }: TablePageOptions<LoadedModel<T>>):
|
|
10
|
+
declare function TableForm<T extends (...args: any) => any>({ columns, primaryKey, }: TablePageOptions<LoadedModel<T>>): react.JSX.Element;
|
|
12
11
|
|
|
13
12
|
export { type LoadedModel, TableForm, type TablePageOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dn-react-router-toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"types": "./dist/index.d.ts",
|
|
5
5
|
"main": "./dist/index.mjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"homepage": "https://github.com/dndnsoft/dn-react-router-toolkit#readme",
|
|
78
78
|
"description": "",
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@react-router/dev": "^
|
|
80
|
+
"@react-router/dev": "^8.3.0",
|
|
81
81
|
"@types/node": "^25.3.1",
|
|
82
82
|
"@types/react": "^19",
|
|
83
83
|
"@types/react-dom": "^19",
|
|
@@ -86,22 +86,22 @@
|
|
|
86
86
|
"typescript": "^5.9.3"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"cookie": "^
|
|
90
|
-
"gw-
|
|
91
|
-
"gw-auth": "^0.1.
|
|
92
|
-
"gw-file": "^0.1.
|
|
89
|
+
"cookie": "^2.0.1",
|
|
90
|
+
"gw-rich-text-editor": "^0.1.0",
|
|
91
|
+
"gw-auth": "^0.1.2",
|
|
92
|
+
"gw-file": "^0.1.3",
|
|
93
93
|
"gw-response": "^0.1.8",
|
|
94
|
-
"gw-result": "^0.
|
|
95
|
-
"moment-timezone": "^0.6.
|
|
96
|
-
"pg": "^8.
|
|
97
|
-
"react-icons": "^5.
|
|
98
|
-
"react-store-input": "^0.
|
|
99
|
-
"uuid": "^
|
|
94
|
+
"gw-result": "^0.3.0",
|
|
95
|
+
"moment-timezone": "^0.6.3",
|
|
96
|
+
"pg": "^8.22.0",
|
|
97
|
+
"react-icons": "^5.7.0",
|
|
98
|
+
"react-store-input": "^0.4.0",
|
|
99
|
+
"uuid": "^14.0.0"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"drizzle-orm": "^0.45.1",
|
|
103
103
|
"react": "^19",
|
|
104
104
|
"react-dom": "^19",
|
|
105
|
-
"react-router": "^
|
|
105
|
+
"react-router": "^8.3.0"
|
|
106
106
|
}
|
|
107
107
|
}
|
package/dist/client/editor.d.mts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FileUploader } from 'gw-file/client';
|
|
2
|
-
import { AttachFileOptions } from 'gw-react-text-editor';
|
|
3
|
-
import { CDN } from 'gw-file';
|
|
4
|
-
|
|
5
|
-
declare function createAttachFileOptions<TFile extends {
|
|
6
|
-
key: string;
|
|
7
|
-
}>({ cdn, fileUploader, }: {
|
|
8
|
-
cdn: CDN;
|
|
9
|
-
fileUploader: FileUploader<TFile>;
|
|
10
|
-
}): Omit<AttachFileOptions, "schema">;
|
|
11
|
-
|
|
12
|
-
export { createAttachFileOptions };
|
package/dist/client/editor.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FileUploader } from 'gw-file/client';
|
|
2
|
-
import { AttachFileOptions } from 'gw-react-text-editor';
|
|
3
|
-
import { CDN } from 'gw-file';
|
|
4
|
-
|
|
5
|
-
declare function createAttachFileOptions<TFile extends {
|
|
6
|
-
key: string;
|
|
7
|
-
}>({ cdn, fileUploader, }: {
|
|
8
|
-
cdn: CDN;
|
|
9
|
-
fileUploader: FileUploader<TFile>;
|
|
10
|
-
}): Omit<AttachFileOptions, "schema">;
|
|
11
|
-
|
|
12
|
-
export { createAttachFileOptions };
|
package/dist/client/editor.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
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/client/editor.tsx
|
|
21
|
-
var editor_exports = {};
|
|
22
|
-
__export(editor_exports, {
|
|
23
|
-
createAttachFileOptions: () => createAttachFileOptions
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(editor_exports);
|
|
26
|
-
var import_client = require("gw-file/client");
|
|
27
|
-
function createAttachFileOptions({
|
|
28
|
-
cdn,
|
|
29
|
-
fileUploader
|
|
30
|
-
}) {
|
|
31
|
-
return {
|
|
32
|
-
uploadFile: async (file) => {
|
|
33
|
-
const result = await fileUploader.uploadFile(file, {
|
|
34
|
-
convertToWebp: true
|
|
35
|
-
});
|
|
36
|
-
if (result.isErr) {
|
|
37
|
-
throw new Error(result.error.message);
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
alt: file.name,
|
|
41
|
-
src: cdn(result.value.key)
|
|
42
|
-
};
|
|
43
|
-
},
|
|
44
|
-
generateMetadata: (file) => (0, import_client.generateMetadata)(file, {
|
|
45
|
-
uploadBlob: async (blob) => {
|
|
46
|
-
const result = await fileUploader.uploadBlob(blob, "file", {
|
|
47
|
-
convertToWebp: true
|
|
48
|
-
});
|
|
49
|
-
if (result.isErr) {
|
|
50
|
-
throw new Error(result.error.message);
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
alt: file.name,
|
|
54
|
-
src: cdn(result.value.key)
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
-
0 && (module.exports = {
|
|
62
|
-
createAttachFileOptions
|
|
63
|
-
});
|
package/dist/client/editor.mjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// src/client/editor.tsx
|
|
2
|
-
import { generateMetadata } from "gw-file/client";
|
|
3
|
-
function createAttachFileOptions({
|
|
4
|
-
cdn,
|
|
5
|
-
fileUploader
|
|
6
|
-
}) {
|
|
7
|
-
return {
|
|
8
|
-
uploadFile: async (file) => {
|
|
9
|
-
const result = await fileUploader.uploadFile(file, {
|
|
10
|
-
convertToWebp: true
|
|
11
|
-
});
|
|
12
|
-
if (result.isErr) {
|
|
13
|
-
throw new Error(result.error.message);
|
|
14
|
-
}
|
|
15
|
-
return {
|
|
16
|
-
alt: file.name,
|
|
17
|
-
src: cdn(result.value.key)
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
generateMetadata: (file) => generateMetadata(file, {
|
|
21
|
-
uploadBlob: async (blob) => {
|
|
22
|
-
const result = await fileUploader.uploadBlob(blob, "file", {
|
|
23
|
-
convertToWebp: true
|
|
24
|
-
});
|
|
25
|
-
if (result.isErr) {
|
|
26
|
-
throw new Error(result.error.message);
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
alt: file.name,
|
|
30
|
-
src: cdn(result.value.key)
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
})
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
createAttachFileOptions
|
|
38
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { TextEditorProps } from 'gw-react-text-editor';
|
|
3
|
-
import { Store } from 'react-store-input';
|
|
4
|
-
|
|
5
|
-
type Props<TState> = {
|
|
6
|
-
store: Store<TState>;
|
|
7
|
-
name?: keyof TState;
|
|
8
|
-
getter?: (state: TState) => string;
|
|
9
|
-
setter?: (state: TState, value: string) => void;
|
|
10
|
-
} & TextEditorProps;
|
|
11
|
-
declare function StoreTextEditor<TState>({ store, name, getter, setter, defaultValue, ref, ...props }: Props<TState>): react_jsx_runtime.JSX.Element;
|
|
12
|
-
|
|
13
|
-
export { StoreTextEditor };
|