dn-react-router-toolkit 0.5.8 → 0.6.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/auth/cookie_store.d.mts +1 -1
- package/dist/auth/cookie_store.d.ts +1 -1
- package/dist/auth/cookie_store.js +4 -4
- package/dist/auth/cookie_store.mjs +4 -4
- package/dist/auth/index.js +4 -4
- package/dist/auth/index.mjs +4 -4
- 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 +10 -0
- package/dist/client/file_input.d.ts +10 -0
- package/dist/client/file_input.js +80 -0
- package/dist/client/file_input.mjs +45 -0
- package/dist/client/index.d.mts +4 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.js +104 -0
- package/dist/client/index.mjs +102 -0
- package/dist/client/store_text_editor.d.mts +13 -0
- package/dist/client/store_text_editor.d.ts +13 -0
- package/dist/client/store_text_editor.js +94 -0
- package/dist/client/store_text_editor.mjs +59 -0
- package/dist/crud/crud_form.d.mts +4 -6
- package/dist/crud/crud_form.d.ts +4 -6
- package/dist/crud/crud_form.js +147 -100
- package/dist/crud/crud_form.mjs +148 -106
- package/dist/crud/crud_form_provider.d.mts +10 -10
- package/dist/crud/crud_form_provider.d.ts +10 -10
- package/dist/crud/crud_form_provider.js +5 -6
- package/dist/crud/crud_form_provider.mjs +4 -5
- package/dist/crud/crud_page.d.mts +8 -8
- package/dist/crud/crud_page.d.ts +8 -8
- package/dist/crud/crud_page.js +203 -160
- package/dist/crud/crud_page.mjs +200 -162
- package/dist/crud/generate_pages.d.mts +3 -3
- package/dist/crud/generate_pages.d.ts +3 -3
- package/dist/crud/index.d.mts +1 -1
- package/dist/crud/index.d.ts +1 -1
- package/dist/crud/index.js +256 -213
- package/dist/crud/index.mjs +240 -202
- package/dist/form/create_form_component.d.mts +28 -0
- package/dist/form/create_form_component.d.ts +28 -0
- package/dist/form/create_form_component.js +47 -0
- package/dist/form/create_form_component.mjs +12 -0
- package/dist/form/form_components.d.mts +7 -0
- package/dist/form/form_components.d.ts +7 -0
- package/dist/form/form_components.js +64 -0
- package/dist/form/form_components.mjs +25 -0
- package/dist/form/index.d.mts +3 -0
- package/dist/form/index.d.ts +3 -0
- package/dist/form/index.js +66 -0
- package/dist/form/index.mjs +26 -0
- package/dist/post/index.d.mts +2 -0
- package/dist/post/index.d.ts +2 -0
- package/dist/post/index.js +33 -0
- package/dist/post/index.mjs +4 -0
- package/dist/post/thumbnail_picker.d.mts +18 -0
- package/dist/post/thumbnail_picker.d.ts +18 -0
- package/dist/post/thumbnail_picker.js +101 -0
- package/dist/post/thumbnail_picker.mjs +70 -0
- 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.js +44 -47
- package/dist/table/index.mjs +44 -47
- package/dist/table/page.d.mts +5 -7
- package/dist/table/page.d.ts +5 -7
- package/dist/table/page.js +44 -47
- package/dist/table/page.mjs +44 -47
- package/dist/table/table.d.mts +4 -4
- package/dist/table/table.d.ts +4 -4
- package/package.json +14 -2
package/dist/crud/crud_page.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { useLoaderData as useLoaderData2, useLocation as useLocation3 } from "re
|
|
|
3
3
|
|
|
4
4
|
// src/crud/crud_form_provider.tsx
|
|
5
5
|
import { useNavigate } from "react-router";
|
|
6
|
-
import { useStore } from "
|
|
6
|
+
import { useStore } from "react-store-input";
|
|
7
7
|
import { createContext, useContext } from "react";
|
|
8
8
|
import React from "react";
|
|
9
9
|
var FormContext = createContext({});
|
|
@@ -69,10 +69,9 @@ function CrudFormProvider({
|
|
|
69
69
|
return value2.map((v) => converter(v));
|
|
70
70
|
}
|
|
71
71
|
if (typeof value2 === "object") {
|
|
72
|
-
return Object.entries(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
);
|
|
72
|
+
return Object.entries(
|
|
73
|
+
value2
|
|
74
|
+
).reduce(reducer, {});
|
|
76
75
|
}
|
|
77
76
|
};
|
|
78
77
|
return {
|
|
@@ -459,7 +458,7 @@ function createTablePage({
|
|
|
459
458
|
primaryKey = "id"
|
|
460
459
|
}) {
|
|
461
460
|
return function TablePage({
|
|
462
|
-
|
|
461
|
+
AdminHeader
|
|
463
462
|
}) {
|
|
464
463
|
const { pathname } = useLocation2();
|
|
465
464
|
const { table } = useLoaderData();
|
|
@@ -472,189 +471,228 @@ function createTablePage({
|
|
|
472
471
|
navigate(`${pathname}?${searchParams2.toString()}`);
|
|
473
472
|
};
|
|
474
473
|
const [searchParams] = useSearchParams3();
|
|
475
|
-
return /* @__PURE__ */ React6.createElement(
|
|
476
|
-
|
|
474
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
|
|
475
|
+
AdminHeader,
|
|
477
476
|
{
|
|
478
477
|
title: name,
|
|
479
478
|
actions: /* @__PURE__ */ React6.createElement(Link3, { to: `${pathname}/new`, className: "button-primary" }, name, " \uCD94\uAC00")
|
|
479
|
+
}
|
|
480
|
+
), /* @__PURE__ */ React6.createElement("div", { className: "max-w-7xl mx-auto" }, searchKey && /* @__PURE__ */ React6.createElement(
|
|
481
|
+
"form",
|
|
482
|
+
{
|
|
483
|
+
className: "h-18 px-4 flex items-center border-t",
|
|
484
|
+
onSubmit: (e) => {
|
|
485
|
+
e.preventDefault();
|
|
486
|
+
const formData = new FormData(e.currentTarget);
|
|
487
|
+
const query = formData.get("query");
|
|
488
|
+
search(query);
|
|
489
|
+
}
|
|
480
490
|
},
|
|
481
|
-
searchKey && /* @__PURE__ */ React6.createElement(
|
|
482
|
-
"form",
|
|
483
|
-
{
|
|
484
|
-
className: "h-18 px-4 flex items-center border-t",
|
|
485
|
-
onSubmit: (e) => {
|
|
486
|
-
e.preventDefault();
|
|
487
|
-
const formData = new FormData(e.currentTarget);
|
|
488
|
-
const query = formData.get("query");
|
|
489
|
-
search(query);
|
|
490
|
-
}
|
|
491
|
-
},
|
|
492
|
-
/* @__PURE__ */ React6.createElement(
|
|
493
|
-
"button",
|
|
494
|
-
{
|
|
495
|
-
type: "submit",
|
|
496
|
-
className: "w-10 h-10 flex justify-center items-center"
|
|
497
|
-
},
|
|
498
|
-
/* @__PURE__ */ React6.createElement(GoSearch, { className: "text-xl mr-4" })
|
|
499
|
-
),
|
|
500
|
-
/* @__PURE__ */ React6.createElement(
|
|
501
|
-
"input",
|
|
502
|
-
{
|
|
503
|
-
className: "outline-none h-full flex-1",
|
|
504
|
-
placeholder: "\uC5EC\uAE30\uC5D0 \uAC80\uC0C9\uD558\uC138\uC694...",
|
|
505
|
-
name: "query",
|
|
506
|
-
defaultValue: searchParams.get("query") ?? ""
|
|
507
|
-
}
|
|
508
|
-
)
|
|
509
|
-
),
|
|
510
491
|
/* @__PURE__ */ React6.createElement(
|
|
511
|
-
|
|
492
|
+
"button",
|
|
512
493
|
{
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
offset,
|
|
518
|
-
orderBy,
|
|
519
|
-
direction
|
|
520
|
-
}
|
|
494
|
+
type: "submit",
|
|
495
|
+
className: "w-10 h-10 flex justify-center items-center"
|
|
496
|
+
},
|
|
497
|
+
/* @__PURE__ */ React6.createElement(GoSearch, { className: "text-xl mr-4" })
|
|
521
498
|
),
|
|
522
499
|
/* @__PURE__ */ React6.createElement(
|
|
523
|
-
|
|
500
|
+
"input",
|
|
524
501
|
{
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
502
|
+
className: "outline-none h-full flex-1",
|
|
503
|
+
placeholder: "\uC5EC\uAE30\uC5D0 \uAC80\uC0C9\uD558\uC138\uC694...",
|
|
504
|
+
name: "query",
|
|
505
|
+
defaultValue: searchParams.get("query") ?? ""
|
|
529
506
|
}
|
|
530
507
|
)
|
|
531
|
-
)
|
|
508
|
+
), /* @__PURE__ */ React6.createElement(
|
|
509
|
+
Table,
|
|
510
|
+
{
|
|
511
|
+
data: items,
|
|
512
|
+
columns,
|
|
513
|
+
getLink: primaryKey ? (item) => `${pathname}/${item[primaryKey]}` : void 0,
|
|
514
|
+
limit,
|
|
515
|
+
offset,
|
|
516
|
+
orderBy,
|
|
517
|
+
direction
|
|
518
|
+
}
|
|
519
|
+
), /* @__PURE__ */ React6.createElement(
|
|
520
|
+
TablePageButtons,
|
|
521
|
+
{
|
|
522
|
+
total,
|
|
523
|
+
limit,
|
|
524
|
+
offset,
|
|
525
|
+
MAX_PAGES_TO_SHOW: 10
|
|
526
|
+
}
|
|
527
|
+
)));
|
|
532
528
|
};
|
|
533
529
|
}
|
|
534
530
|
|
|
535
531
|
// src/crud/crud_form.tsx
|
|
536
|
-
import
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
} from "dn-react-toolkit/store";
|
|
532
|
+
import React11 from "react";
|
|
533
|
+
import { createTextEditor } from "dn-react-text-editor";
|
|
534
|
+
import { Input, Select } from "react-store-input";
|
|
535
|
+
|
|
536
|
+
// src/client/env_loader.tsx
|
|
542
537
|
import React7 from "react";
|
|
543
|
-
import {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
538
|
+
import { useRouteLoaderData } from "react-router";
|
|
539
|
+
|
|
540
|
+
// src/client/file_input.tsx
|
|
541
|
+
import "react";
|
|
542
|
+
import React8 from "react";
|
|
543
|
+
|
|
544
|
+
// src/client/use_user_agent.tsx
|
|
545
|
+
import { useRouteLoaderData as useRouteLoaderData2 } from "react-router";
|
|
546
|
+
|
|
547
|
+
// src/client/store_text_editor.tsx
|
|
548
|
+
import "dn-react-text-editor";
|
|
549
|
+
import { useStoreController } from "react-store-input";
|
|
550
|
+
import React9 from "react";
|
|
551
|
+
function createStoreTextEditor(TextEditor2) {
|
|
552
|
+
function StoreComponent({
|
|
553
|
+
store,
|
|
554
|
+
name,
|
|
555
|
+
defaultValue,
|
|
556
|
+
...props
|
|
557
|
+
}) {
|
|
558
|
+
const { ref, onChange } = useStoreController(
|
|
559
|
+
store,
|
|
560
|
+
{
|
|
561
|
+
ref: props.ref,
|
|
562
|
+
onSubscribe: (state, element) => {
|
|
563
|
+
const result = (props.getter ? props.getter(state) : name ? state[name] : "") || "";
|
|
564
|
+
if (element.value !== result) {
|
|
565
|
+
element.value = result;
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
onDispatch: (state, element) => {
|
|
569
|
+
if (props.setter) {
|
|
570
|
+
props.setter(state, element.value);
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
if (name) {
|
|
574
|
+
state[name] = element.value;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
);
|
|
579
|
+
const getDefaultValue = () => {
|
|
580
|
+
if (props.getter) {
|
|
581
|
+
return props.getter(store.state);
|
|
582
|
+
}
|
|
583
|
+
if (name) {
|
|
584
|
+
return store.state[name];
|
|
585
|
+
}
|
|
586
|
+
return void 0;
|
|
587
|
+
};
|
|
588
|
+
return /* @__PURE__ */ React9.createElement(
|
|
589
|
+
TextEditor2,
|
|
590
|
+
{
|
|
591
|
+
...props,
|
|
592
|
+
ref,
|
|
593
|
+
defaultValue: defaultValue ?? getDefaultValue(),
|
|
594
|
+
onChange: (e) => {
|
|
595
|
+
onChange();
|
|
596
|
+
props.onChange?.(e);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
return StoreComponent;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
// src/form/create_form_component.tsx
|
|
605
|
+
import { cn as cn3 } from "dn-react-toolkit/utils";
|
|
606
|
+
import React10 from "react";
|
|
607
|
+
function createComponent(tag, options) {
|
|
608
|
+
return function FormComponent({ className, ...props }) {
|
|
609
|
+
const Tag = tag;
|
|
610
|
+
return /* @__PURE__ */ React10.createElement(Tag, { ...props, className: cn3(options.className, className) });
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
// src/form/form_components.tsx
|
|
615
|
+
var FormEntry = createComponent("div", {
|
|
616
|
+
className: "flex-1"
|
|
617
|
+
});
|
|
618
|
+
var FormRow = createComponent("div", {
|
|
619
|
+
className: "flex-1 flex gap-4 mb-6"
|
|
620
|
+
});
|
|
621
|
+
var FormLabel = createComponent("label", {
|
|
622
|
+
className: "flex-1 font-semibold mb-2.5 block"
|
|
623
|
+
});
|
|
624
|
+
|
|
625
|
+
// src/crud/crud_form.tsx
|
|
626
|
+
var TextEditor = createStoreTextEditor(createTextEditor());
|
|
627
|
+
function CrudForm({ AdminHeader }) {
|
|
547
628
|
const form = useFormContext();
|
|
548
|
-
return /* @__PURE__ */
|
|
549
|
-
|
|
629
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
|
|
630
|
+
AdminHeader,
|
|
550
631
|
{
|
|
551
632
|
title: `${form.name} ${form.item ? "\uC218\uC815" : "\uCD94\uAC00"}`,
|
|
552
|
-
actions: /* @__PURE__ */
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
serializer: (value2) => {
|
|
574
|
-
if (value2 === void 0 || value2 === null) {
|
|
575
|
-
return "";
|
|
576
|
-
}
|
|
577
|
-
return String(value2);
|
|
578
|
-
},
|
|
579
|
-
deserializer: (value2) => {
|
|
580
|
-
const parsed = Number(value2);
|
|
581
|
-
if (isNaN(parsed)) {
|
|
582
|
-
return void 0;
|
|
583
|
-
}
|
|
584
|
-
return parsed;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
);
|
|
588
|
-
}
|
|
589
|
-
if (value.type === "datetime") {
|
|
590
|
-
return /* @__PURE__ */ React7.createElement(
|
|
591
|
-
SyncInput,
|
|
592
|
-
{
|
|
593
|
-
store: form.store,
|
|
594
|
-
property: key,
|
|
595
|
-
className: "input-form",
|
|
596
|
-
type: "datetime-local",
|
|
597
|
-
serializer: (value2) => {
|
|
598
|
-
if (value2 instanceof Date) {
|
|
599
|
-
return moment(value2).toISOString(true).slice(0, 16);
|
|
600
|
-
}
|
|
601
|
-
return String(value2);
|
|
602
|
-
},
|
|
603
|
-
deserializer: (value2) => {
|
|
604
|
-
if (!value2) {
|
|
605
|
-
return void 0;
|
|
606
|
-
}
|
|
607
|
-
return moment(value2).toDate();
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
);
|
|
611
|
-
}
|
|
612
|
-
if (value.type === "textarea") {
|
|
613
|
-
const Editor = useSyncTextEditor(textarea);
|
|
614
|
-
return /* @__PURE__ */ React7.createElement(
|
|
615
|
-
Editor.SyncTextEditor,
|
|
616
|
-
{
|
|
617
|
-
store: form.store,
|
|
618
|
-
property: key
|
|
619
|
-
}
|
|
620
|
-
);
|
|
621
|
-
}
|
|
622
|
-
if (value.options) {
|
|
623
|
-
const Component = value.options;
|
|
624
|
-
return /* @__PURE__ */ React7.createElement(SyncSelect, { store: form.store, property: key }, /* @__PURE__ */ React7.createElement(Component, null));
|
|
625
|
-
}
|
|
626
|
-
return /* @__PURE__ */ React7.createElement(
|
|
627
|
-
SyncInput,
|
|
633
|
+
actions: /* @__PURE__ */ React11.createElement(
|
|
634
|
+
"button",
|
|
635
|
+
{
|
|
636
|
+
type: "button",
|
|
637
|
+
className: "button-primary",
|
|
638
|
+
onClick: form.submit
|
|
639
|
+
},
|
|
640
|
+
"\uC800\uC7A5\uD558\uAE30"
|
|
641
|
+
)
|
|
642
|
+
}
|
|
643
|
+
), /* @__PURE__ */ React11.createElement("div", { className: "max-w-2xl mx-auto" }, Object.keys(form.columns).length > 0 && /* @__PURE__ */ React11.createElement(React11.Fragment, null, Object.entries(
|
|
644
|
+
form.columns
|
|
645
|
+
).map(([key, value]) => {
|
|
646
|
+
function InputComponent() {
|
|
647
|
+
if (value.type === "textarea") {
|
|
648
|
+
return /* @__PURE__ */ React11.createElement(TextEditor, { store: form.store, name: key });
|
|
649
|
+
}
|
|
650
|
+
if (value.options) {
|
|
651
|
+
const Component = value.options;
|
|
652
|
+
return /* @__PURE__ */ React11.createElement(
|
|
653
|
+
Select,
|
|
628
654
|
{
|
|
629
655
|
store: form.store,
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
656
|
+
name: key,
|
|
657
|
+
className: "select-form"
|
|
658
|
+
},
|
|
659
|
+
/* @__PURE__ */ React11.createElement(Component, null)
|
|
634
660
|
);
|
|
635
|
-
}
|
|
636
|
-
return /* @__PURE__ */
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
form.delete();
|
|
661
|
+
}
|
|
662
|
+
return /* @__PURE__ */ React11.createElement(
|
|
663
|
+
Input,
|
|
664
|
+
{
|
|
665
|
+
store: form.store,
|
|
666
|
+
name: key,
|
|
667
|
+
type: value.type,
|
|
668
|
+
className: "input-form"
|
|
644
669
|
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
const v = form.store.state[key];
|
|
673
|
+
if (typeof v === "boolean") {
|
|
674
|
+
return /* @__PURE__ */ React11.createElement("div", { className: "flex" }, value.label, /* @__PURE__ */ React11.createElement("div", { className: "ml-auto" }, /* @__PURE__ */ React11.createElement(InputComponent, null)));
|
|
675
|
+
}
|
|
676
|
+
return /* @__PURE__ */ React11.createElement(FormRow, null, /* @__PURE__ */ React11.createElement(FormEntry, null, /* @__PURE__ */ React11.createElement(FormLabel, { key }, value.label), /* @__PURE__ */ React11.createElement(InputComponent, null)));
|
|
677
|
+
})), form.item && /* @__PURE__ */ React11.createElement(
|
|
678
|
+
"button",
|
|
679
|
+
{
|
|
680
|
+
className: "button-dangerous mt-8",
|
|
681
|
+
onClick: () => {
|
|
682
|
+
form.delete();
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"\uC0AD\uC81C\uD558\uAE30"
|
|
686
|
+
)));
|
|
649
687
|
}
|
|
650
688
|
|
|
651
689
|
// src/crud/crud_page.tsx
|
|
652
|
-
import
|
|
690
|
+
import React12 from "react";
|
|
653
691
|
function crudPage({
|
|
654
692
|
name,
|
|
655
693
|
tablePageOptions,
|
|
656
694
|
formOptions,
|
|
657
|
-
|
|
695
|
+
AdminHeader
|
|
658
696
|
}) {
|
|
659
697
|
return (prefix) => {
|
|
660
698
|
return function Page() {
|
|
@@ -665,10 +703,10 @@ function crudPage({
|
|
|
665
703
|
...tablePageOptions,
|
|
666
704
|
name
|
|
667
705
|
});
|
|
668
|
-
return /* @__PURE__ */
|
|
706
|
+
return /* @__PURE__ */ React12.createElement(Component, { AdminHeader });
|
|
669
707
|
}
|
|
670
708
|
if (pathname.startsWith(prefix)) {
|
|
671
|
-
return /* @__PURE__ */
|
|
709
|
+
return /* @__PURE__ */ React12.createElement(
|
|
672
710
|
CrudFormProvider,
|
|
673
711
|
{
|
|
674
712
|
item: data?.item,
|
|
@@ -676,7 +714,7 @@ function crudPage({
|
|
|
676
714
|
name,
|
|
677
715
|
columns: formOptions.columns
|
|
678
716
|
},
|
|
679
|
-
formOptions.form ? /* @__PURE__ */
|
|
717
|
+
formOptions.form ? /* @__PURE__ */ React12.createElement(formOptions.form, null) : /* @__PURE__ */ React12.createElement(CrudForm, { AdminHeader })
|
|
680
718
|
);
|
|
681
719
|
}
|
|
682
720
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CrudPage } from './crud_page.mjs';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import './crud_form_provider.mjs';
|
|
4
|
-
import '
|
|
4
|
+
import 'react-store-input';
|
|
5
5
|
import '../table/page.mjs';
|
|
6
6
|
import '../table/table.mjs';
|
|
7
7
|
|
|
8
|
-
declare const generatePages: (pages: Record<string, CrudPage>) => () =>
|
|
8
|
+
declare const generatePages: (pages: Record<string, CrudPage>) => () => React__default.JSX.Element | undefined;
|
|
9
9
|
|
|
10
10
|
export { generatePages };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CrudPage } from './crud_page.js';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import './crud_form_provider.js';
|
|
4
|
-
import '
|
|
4
|
+
import 'react-store-input';
|
|
5
5
|
import '../table/page.js';
|
|
6
6
|
import '../table/table.js';
|
|
7
7
|
|
|
8
|
-
declare const generatePages: (pages: Record<string, CrudPage>) => () =>
|
|
8
|
+
declare const generatePages: (pages: Record<string, CrudPage>) => () => React__default.JSX.Element | undefined;
|
|
9
9
|
|
|
10
10
|
export { generatePages };
|
package/dist/crud/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ export { CrudPage, CrudPageOptions, crudPage } from './crud_page.mjs';
|
|
|
4
4
|
export { generateHandlers } from './generate_handlers.mjs';
|
|
5
5
|
export { generatePages } from './generate_pages.mjs';
|
|
6
6
|
export { generateCrudRoutes } from './generate_routes.mjs';
|
|
7
|
-
import '
|
|
7
|
+
import 'react-store-input';
|
|
8
8
|
import 'react';
|
|
9
9
|
import 'react-router';
|
|
10
10
|
import '../table/loader.mjs';
|
package/dist/crud/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { CrudPage, CrudPageOptions, crudPage } from './crud_page.js';
|
|
|
4
4
|
export { generateHandlers } from './generate_handlers.js';
|
|
5
5
|
export { generatePages } from './generate_pages.js';
|
|
6
6
|
export { generateCrudRoutes } from './generate_routes.js';
|
|
7
|
-
import '
|
|
7
|
+
import 'react-store-input';
|
|
8
8
|
import 'react';
|
|
9
9
|
import 'react-router';
|
|
10
10
|
import '../table/loader.js';
|