mtxuilib 0.0.337 → 0.0.339
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/esm/App.js +1 -27
- package/dist/esm/MtmButton.js +1 -7
- package/dist/esm/NovelEditor.js +1 -5
- package/dist/esm/NovelEditorLoader.js +1 -16
- package/dist/esm/common/FullCenter.js +1 -9
- package/dist/esm/common/MtImage.js +1 -54
- package/dist/esm/common/OnlyDebug.js +1 -9
- package/dist/esm/common/mtlink.js +1 -54
- package/dist/esm/common/table/cells/ExpenderCell.js +1 -38
- package/dist/esm/common/table/cells/SelectCell.js +1 -26
- package/dist/esm/common/table/cells/Text.js +1 -16
- package/dist/esm/common/table/cells/ViewLink.js +1 -26
- package/dist/esm/common/table/cells/container/cellWrapper.js +1 -8
- package/dist/esm/common/table/cells/number.js +1 -13
- package/dist/esm/common/table/cells/string.js +1 -18
- package/dist/esm/common/table/data-table-pagination.js +1 -105
- package/dist/esm/common/table/data-table-view-options.js +1 -44
- package/dist/esm/common/tailwind-indicator.js +1 -17
- package/dist/esm/components/Header.js +1 -17
- package/dist/esm/components/ListItem.js +1 -68
- package/dist/esm/components/PageCmds.js +1 -57
- package/dist/esm/components/PageSearchCmd.js +1 -76
- package/dist/esm/components/PostCard.js +1 -34
- package/dist/esm/components/SideNav.js +1 -78
- package/dist/esm/components/UserAvatorMenus.js +1 -85
- package/dist/esm/components/common/NotFoundGoBack.js +1 -23
- package/dist/esm/components/common/react-markdown/Code.js +1 -40
- package/dist/esm/components/common/react-markdown/MarkdownToolbar.js +1 -23
- package/dist/esm/components/common/react-markdown/ReactMarkdownExample.js +1 -31
- package/dist/esm/components/common/theme/mode-toggle.js +1 -24
- package/dist/esm/components/common/theme/theme-toggle.js +1 -24
- package/dist/esm/components/common/tiptap/MenuBar.js +1 -165
- package/dist/esm/components/common/tiptap/TiptapEditor.js +1 -65
- package/dist/esm/components/common/tiptap/examples/Demo-Default.js +2 -191
- package/dist/esm/components/common/tiptap/examples/Demo-Tiptap.js +1 -16
- package/dist/esm/components/main-nav.js +1 -143
- package/dist/esm/consts.js +1 -58
- package/dist/esm/curd/CommonListView.js +1 -88
- package/dist/esm/curd/CurdViewView.js +1 -176
- package/dist/esm/curd/curd-detail.js +1 -129
- package/dist/esm/entry-client.js +1 -9
- package/dist/esm/entry-server.js +1 -14
- package/dist/esm/form/EditFormToolbar.js +1 -106
- package/dist/esm/form/MtFormPopupHolder.js +1 -163
- package/dist/esm/form/MtFormV3.js +1 -90
- package/dist/esm/form/SchemaFormViewV2.js +1 -140
- package/dist/esm/form/ZodForm.js +1 -97
- package/dist/esm/form/deleteConform.js +1 -117
- package/dist/esm/hooks/use-local-storage.js +1 -19
- package/dist/esm/hooks/use-lock-body.js +1 -13
- package/dist/esm/hooks/use-media-query.js +1 -42
- package/dist/esm/hooks/use-mounted.js +1 -11
- package/dist/esm/hooks/use-mutation-observer.js +1 -18
- package/dist/esm/hooks/use-router.js +1 -69
- package/dist/esm/hooks/useIsIntersecting.js +1 -25
- package/dist/esm/hooks/useScript.js +1 -71
- package/dist/esm/icons/icons.js +1 -360
- package/dist/esm/index.js +1 -5
- package/dist/esm/layouts/mail-layout.js +1 -116
- package/dist/esm/lib/clientlib/clientlib.js +1 -44
- package/dist/esm/lib/clientlib/domutils.js +1 -14
- package/dist/esm/lib/clientlib/selectPath.js +1 -45
- package/dist/esm/lib/connectquery/call-unary-method.js +1 -47
- package/dist/esm/lib/connectquery/connect-query-key.js +1 -15
- package/dist/esm/lib/connectquery/create-use-infinite-query-options.js +1 -92
- package/dist/esm/lib/connectquery/create-use-query-options.js +1 -74
- package/dist/esm/lib/connectquery/default-options.js +1 -9
- package/dist/esm/lib/connectquery/index.js +1 -33
- package/dist/esm/lib/connectquery/use-infinite-query.js +1 -87
- package/dist/esm/lib/connectquery/use-mutation.js +1 -79
- package/dist/esm/lib/connectquery/use-query.js +1 -75
- package/dist/esm/lib/connectquery/use-transport.js +1 -23
- package/dist/esm/lib/connectquery/utils.js +1 -24
- package/dist/esm/lib/errors.js +1 -12
- package/dist/esm/lib/http/cors.js +1 -129
- package/dist/esm/lib/http/fetchMiddleWithCache.js +1 -87
- package/dist/esm/lib/http/fetchMiddleWithUrlProxy.js +1 -29
- package/dist/esm/lib/http/mthttp.js +1 -61
- package/dist/esm/lib/http/response-cache.test.js +1 -72
- package/dist/esm/lib/jotai-helper.js +1 -96
- package/dist/esm/lib/mt-logger.js +2 -101
- package/dist/esm/lib/mtmFetcher.js +1 -106
- package/dist/esm/lib/mtmclient/mtm/conf/conf-ConfService_connectquery.js +1 -60
- package/dist/esm/lib/mtmclient/mtm/conf/conf_connect.js +1 -56
- package/dist/esm/lib/mtmclient/mtm/conf/conf_pb.js +1 -2360
- package/dist/esm/lib/mtmclient/mtm/mtbot/mtbotpb/bot-BotService_connectquery.js +1 -38
- package/dist/esm/lib/mtmclient/mtm/mtbot/mtbotpb/bot_connect.js +1 -42
- package/dist/esm/lib/mtmclient/mtm/mtbot/mtbotpb/bot_pb.js +1 -919
- package/dist/esm/lib/mtmclient/mtm/mtps/mtpspb/mtps-PsService_connectquery.js +1 -59
- package/dist/esm/lib/mtmclient/mtm/mtps/mtpspb/mtps_connect.js +1 -55
- package/dist/esm/lib/mtmclient/mtm/mtps/mtpspb/mtps_pb.js +1 -530
- package/dist/esm/lib/mtmclient/mtm/sp/sppb/sp-SpService_connectquery.js +1 -236
- package/dist/esm/lib/mtmclient/mtm/sp/sppb/sp_connect.js +1 -208
- package/dist/esm/lib/mtmclient/mtm/sp/sppb/sp_pb.js +1 -2905
- package/dist/esm/lib/mtmclient/mtm/sppb/ai-AiService_connectquery.js +1 -26
- package/dist/esm/lib/mtmclient/mtm/sppb/ai_connect.js +1 -32
- package/dist/esm/lib/mtmclient/mtm/sppb/ai_pb.js +1 -149
- package/dist/esm/lib/mtmclient/mtm/sppb/av-AvService_connectquery.js +1 -60
- package/dist/esm/lib/mtmclient/mtm/sppb/av_connect.js +1 -56
- package/dist/esm/lib/mtmclient/mtm/sppb/av_pb.js +1 -290
- package/dist/esm/lib/mtmclient/mtm/sppb/cx-CxService_connectquery.js +1 -148
- package/dist/esm/lib/mtmclient/mtm/sppb/cx_connect.js +1 -141
- package/dist/esm/lib/mtmclient/mtm/sppb/cx_pb.js +1 -1725
- package/dist/esm/lib/mtmclient/mtm/sppb/events_pb.js +1 -874
- package/dist/esm/lib/mtmclient/mtm/sppb/job-JobService_connectquery.js +1 -38
- package/dist/esm/lib/mtmclient/mtm/sppb/job_connect.js +1 -40
- package/dist/esm/lib/mtmclient/mtm/sppb/job_pb.js +1 -442
- package/dist/esm/lib/mtmclient/mtm/sppb/mtm-MtmService_connectquery.js +1 -565
- package/dist/esm/lib/mtmclient/mtm/sppb/mtm_connect.js +1 -503
- package/dist/esm/lib/mtmclient/mtm/sppb/mtm_pb.js +1 -7653
- package/dist/esm/lib/mtmservices.js +1 -22
- package/dist/esm/lib/queue copy.js +1 -47
- package/dist/esm/lib/queue.js +1 -47
- package/dist/esm/lib/render copy.js +1 -36
- package/dist/esm/lib/render.js +1 -36
- package/dist/esm/lib/service-worker.js +1 -48
- package/dist/esm/lib/sscore.js +1 -51
- package/dist/esm/lib/sslib/github-file.js +1 -39
- package/dist/esm/lib/sslib/mtmcore.js +1 -19
- package/dist/esm/lib/url.js +1 -69
- package/dist/esm/lib/useScript.js +1 -71
- package/dist/esm/lib/utils.js +1 -287
- package/dist/esm/store/MtConnectProvider.js +1 -18
- package/dist/esm/store/ReactQueryProvider.js +1 -109
- package/dist/esm/store/StorybookDecorator.js +1 -20
- package/dist/esm/store/appContext.js +1 -164
- package/dist/esm/store/hydrateCore.js +1 -48
- package/dist/esm/store/logger.context.js +1 -41
- package/dist/esm/store/pageMeta.js +1 -18
- package/dist/esm/store/userContext.js +1 -102
- package/dist/esm/ui/accordion.js +1 -90
- package/dist/esm/ui/alert-dialog.js +1 -167
- package/dist/esm/ui/alert.js +1 -85
- package/dist/esm/ui/aspect-ratio.js +1 -6
- package/dist/esm/ui/avatar.js +1 -77
- package/dist/esm/ui/badge.js +1 -55
- package/dist/esm/ui/button.js +1 -76
- package/dist/esm/ui/calendar.js +1 -99
- package/dist/esm/ui/card.js +1 -102
- package/dist/esm/ui/checkbox.js +1 -62
- package/dist/esm/ui/collapsible.js +1 -10
- package/dist/esm/ui/command.js +1 -159
- package/dist/esm/ui/context-menu.js +1 -209
- package/dist/esm/ui/dialog.js +1 -151
- package/dist/esm/ui/drawer.js +1 -151
- package/dist/esm/ui/dropdown-menu.js +1 -208
- package/dist/esm/ui/form.js +1 -144
- package/dist/esm/ui/hover-card.js +1 -56
- package/dist/esm/ui/input.js +1 -51
- package/dist/esm/ui/label.js +1 -51
- package/dist/esm/ui/menubar.js +1 -242
- package/dist/esm/ui/navigation-menu.js +1 -154
- package/dist/esm/ui/novel/content.js +7 -234
- package/dist/esm/ui/novel/novel/src/components/editor-bubble-item.js +1 -49
- package/dist/esm/ui/novel/novel/src/components/editor-bubble.js +1 -79
- package/dist/esm/ui/novel/novel/src/components/editor-command-item.js +1 -61
- package/dist/esm/ui/novel/novel/src/components/editor-command.js +1 -111
- package/dist/esm/ui/novel/novel/src/components/editor.js +1 -65
- package/dist/esm/ui/novel/novel/src/components/index.js +1 -17
- package/dist/esm/ui/novel/novel/src/extensions/ai-highlight.js +1 -100
- package/dist/esm/ui/novel/novel/src/extensions/custom-keymap.js +1 -40
- package/dist/esm/ui/novel/novel/src/extensions/drag-and-drop.js +1 -185
- package/dist/esm/ui/novel/novel/src/extensions/image-resizer.js +1 -64
- package/dist/esm/ui/novel/novel/src/extensions/index.js +1 -76
- package/dist/esm/ui/novel/novel/src/extensions/slash-command.js +1 -105
- package/dist/esm/ui/novel/novel/src/extensions/updated-image.js +1 -38
- package/dist/esm/ui/novel/novel/src/plugins/index.js +1 -12
- package/dist/esm/ui/novel/novel/src/plugins/upload-images.js +1 -112
- package/dist/esm/ui/novel/novel/src/utils/atoms.js +1 -7
- package/dist/esm/ui/novel/novel/src/utils/store.js +1 -5
- package/dist/esm/ui/novel/novel/src/utils/utils.js +1 -30
- package/dist/esm/ui/novel/tailwind/advanced-editor.js +1 -127
- package/dist/esm/ui/novel/tailwind/extensions.d.ts +1 -1
- package/dist/esm/ui/novel/tailwind/extensions.js +1 -102
- package/dist/esm/ui/novel/tailwind/generative/ai-completion-command.js +1 -62
- package/dist/esm/ui/novel/tailwind/generative/ai-selector-commands.js +1 -79
- package/dist/esm/ui/novel/tailwind/generative/ai-selector.js +1 -96
- package/dist/esm/ui/novel/tailwind/generative/generative-menu-switch.js +1 -57
- package/dist/esm/ui/novel/tailwind/image-upload.js +1 -74
- package/dist/esm/ui/novel/tailwind/selectors/color-selector.js +1 -174
- package/dist/esm/ui/novel/tailwind/selectors/link-selector.js +1 -105
- package/dist/esm/ui/novel/tailwind/selectors/node-selector.js +1 -117
- package/dist/esm/ui/novel/tailwind/selectors/text-buttons.js +1 -69
- package/dist/esm/ui/novel/tailwind/slash-command.js +1 -155
- package/dist/esm/ui/novel/tailwind/ui/button.js +1 -76
- package/dist/esm/ui/novel/tailwind/ui/command.js +1 -160
- package/dist/esm/ui/novel/tailwind/ui/dialog.js +1 -151
- package/dist/esm/ui/novel/tailwind/ui/icons/crazy-spinner.js +1 -12
- package/dist/esm/ui/novel/tailwind/ui/icons/font-default.js +1 -32
- package/dist/esm/ui/novel/tailwind/ui/icons/font-mono.js +1 -33
- package/dist/esm/ui/novel/tailwind/ui/icons/font-serif.js +1 -33
- package/dist/esm/ui/novel/tailwind/ui/icons/github.js +1 -18
- package/dist/esm/ui/novel/tailwind/ui/icons/index.js +1 -10
- package/dist/esm/ui/novel/tailwind/ui/icons/loading-circle.js +1 -32
- package/dist/esm/ui/novel/tailwind/ui/icons/magic.js +1 -45
- package/dist/esm/ui/novel/tailwind/ui/menu.js +1 -50
- package/dist/esm/ui/novel/tailwind/ui/popover.js +1 -56
- package/dist/esm/ui/novel/tailwind/ui/scroll-area.js +1 -76
- package/dist/esm/ui/novel/tailwind/ui/separator.js +1 -55
- package/dist/esm/ui/pagination.js +1 -164
- package/dist/esm/ui/popover.js +1 -56
- package/dist/esm/ui/progress.js +1 -61
- package/dist/esm/ui/radio-group.js +1 -69
- package/dist/esm/ui/resizable.js +1 -78
- package/dist/esm/ui/scroll-area.js +1 -84
- package/dist/esm/ui/select.js +1 -137
- package/dist/esm/ui/separator.js +1 -55
- package/dist/esm/ui/sheet.js +1 -163
- package/dist/esm/ui/skeleton.js +1 -46
- package/dist/esm/ui/slider.js +1 -58
- package/dist/esm/ui/sonner.js +1 -54
- package/dist/esm/ui/switch.js +1 -62
- package/dist/esm/ui/table.js +1 -132
- package/dist/esm/ui/tabs.js +1 -82
- package/dist/esm/ui/textarea.js +1 -50
- package/dist/esm/ui/toast.js +1 -139
- package/dist/esm/ui/toaster.js +1 -62
- package/dist/esm/ui/toggle.js +1 -69
- package/dist/esm/ui/tooltip.js +1 -57
- package/dist/esm/ui/ui-mt/Button.js +1 -5
- package/dist/esm/ui/ui-mt/MtForm.js +1 -6
- package/dist/esm/ui/ui-mt/NavTag.js +1 -24
- package/dist/esm/ui/ui-mt/Separator.js +1 -6
- package/dist/esm/ui/ui-mt/SimpleModel.js +1 -51
- package/dist/esm/ui/ui-mt/inputField/InputField.js +1 -88
- package/dist/esm/ui/ui-mt/inputField/SingleUploadForm.js +1 -156
- package/dist/esm/ui/ui-mt/inputField/TextArea.js +1 -63
- package/dist/esm/ui/ui-mt/inputField/TextFileInput.js +1 -104
- package/dist/esm/ui/ui-mt/inputField/select/InputSelect.js +1 -72
- package/dist/esm/ui/ui-mt/inputs/SearchInput.js +1 -52
- package/dist/esm/ui/ui-mt/inputs/searchBar.js +1 -21
- package/dist/esm/ui/ui-mt/skeleton/skeleton-card.js +1 -18
- package/dist/esm/ui/ui-mt/skeleton/skeleton2.js +1 -10
- package/dist/esm/ui/ui-mt/skeleton/skeletons.js +1 -16
- package/dist/esm/ui/ui-vamp/alert.js +1 -129
- package/dist/esm/ui/ui-vamp/avatar.js +1 -96
- package/dist/esm/ui/ui-vamp/button.js +1 -90
- package/dist/esm/ui/ui-vamp/card.js +1 -93
- package/dist/esm/ui/ui-vamp/checkbox.js +1 -82
- package/dist/esm/ui/ui-vamp/chip.js +1 -69
- package/dist/esm/ui/ui-vamp/dropdown.js +1 -96
- package/dist/esm/ui/ui-vamp/external-link.js +1 -52
- package/dist/esm/ui/ui-vamp/headline.js +1 -10
- package/dist/esm/ui/ui-vamp/input.js +1 -81
- package/dist/esm/ui/ui-vamp/keyvalue.js +1 -26
- package/dist/esm/ui/ui-vamp/label.js +1 -42
- package/dist/esm/ui/ui-vamp/mobile-nav-button.js +1 -21
- package/dist/esm/ui/ui-vamp/modal.js +1 -81
- package/dist/esm/ui/ui-vamp/pagination.js +1 -90
- package/dist/esm/ui/ui-vamp/scroll-area.js +1 -80
- package/dist/esm/ui/ui-vamp/skeleton.js +1 -45
- package/dist/esm/ui/ui-vamp/stripe-not-connected-modal.js +1 -43
- package/dist/esm/ui/ui-vamp/textarea.js +1 -77
- package/dist/esm/ui/ui-vamp/toggle-group.js +1 -58
- package/dist/esm/ui/use-toast.js +1 -153
- package/dist/store/ReactQueryProvider.cjs +2 -2
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/dist/ui/novel/tailwind/advanced-editor.cjs +20 -2
- package/dist/ui/novel/tailwind/extensions.cjs +28 -1
- package/package.json +5 -2
package/dist/esm/App.js
CHANGED
|
@@ -1,27 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Suspense, useState } from "react";
|
|
3
|
-
import "./App.css";
|
|
4
|
-
import "./styles/index.css";
|
|
5
|
-
function App() {
|
|
6
|
-
const [count, setCount] = useState(0);
|
|
7
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8
|
-
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Fragment, { children: "loading" }), children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("a", { href: "https://vitejs.dev", target: "_blank" }) }) }),
|
|
9
|
-
/* @__PURE__ */ jsx("h1", { children: "Vite + React" }),
|
|
10
|
-
/* @__PURE__ */ jsxs("div", { className: "card", children: [
|
|
11
|
-
/* @__PURE__ */ jsxs("button", { onClick: () => setCount((count2) => count2 + 1), children: [
|
|
12
|
-
"count is ",
|
|
13
|
-
count
|
|
14
|
-
] }),
|
|
15
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
16
|
-
"Edit ",
|
|
17
|
-
/* @__PURE__ */ jsx("code", { children: "src/App.tsx" }),
|
|
18
|
-
" and save to test HMR"
|
|
19
|
-
] })
|
|
20
|
-
] }),
|
|
21
|
-
/* @__PURE__ */ jsx("p", { className: "read-the-docs", children: "Click on the Vite and React logos to learn more" })
|
|
22
|
-
] });
|
|
23
|
-
}
|
|
24
|
-
var App_default = App;
|
|
25
|
-
export {
|
|
26
|
-
App_default as default
|
|
27
|
-
};
|
|
1
|
+
import{Fragment as o,jsx as t,jsxs as e}from"react/jsx-runtime";import{Suspense as c,useState as d}from"react";import"./App.css";import"./styles/index.css";function i(){const[a,s]=d(0);return e(o,{children:[t(c,{fallback:t(o,{children:"loading"}),children:t("div",{children:t("a",{href:"https://vitejs.dev",target:"_blank"})})}),t("h1",{children:"Vite + React"}),e("div",{className:"card",children:[e("button",{onClick:()=>s(n=>n+1),children:["count is ",a]}),e("p",{children:["Edit ",t("code",{children:"src/App.tsx"})," and save to test HMR"]})]}),t("p",{className:"read-the-docs",children:"Click on the Vite and React logos to learn more"})]})}var u=i;export{u as default};
|
package/dist/esm/MtmButton.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
const MtmButton = () => {
|
|
3
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("button", { className: "border bg-green-700", children: "MtmButton6" }) });
|
|
4
|
-
};
|
|
5
|
-
export {
|
|
6
|
-
MtmButton
|
|
7
|
-
};
|
|
1
|
+
import{Fragment as o,jsx as t}from"react/jsx-runtime";const n=()=>t(o,{children:t("button",{className:"border bg-green-700",children:"MtmButton6"})});export{n as MtmButton};
|
package/dist/esm/NovelEditor.js
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Suspense, useState } from "react";
|
|
3
|
-
import { TailwindAdvancedEditor } from "./ui/novel/tailwind/advanced-editor";
|
|
4
|
-
const TWEditorLoder = () => {
|
|
5
|
-
const [open, setOpen] = useState(false);
|
|
6
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7
|
-
/* @__PURE__ */ jsx("button", { onClick: () => {
|
|
8
|
-
console.log("load editor");
|
|
9
|
-
setOpen(true);
|
|
10
|
-
}, children: " load" }),
|
|
11
|
-
open && /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Fragment, { children: "loading" }), children: /* @__PURE__ */ jsx(TailwindAdvancedEditor, {}) })
|
|
12
|
-
] });
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
TWEditorLoder
|
|
16
|
-
};
|
|
1
|
+
import{Fragment as e,jsx as o,jsxs as r}from"react/jsx-runtime";import{Suspense as d,useState as i}from"react";import{TailwindAdvancedEditor as l}from"./ui/novel/tailwind/advanced-editor";const p=()=>{const[t,n]=i(!1);return r(e,{children:[o("button",{onClick:()=>{console.log("load editor"),n(!0)},children:" load"}),t&&o(d,{fallback:o(e,{children:"loading"}),children:o(l,{})})]})};export{p as TWEditorLoder};
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
const FullCenter = (props) => {
|
|
4
|
-
const { children } = props;
|
|
5
|
-
return /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "flex-1", children }) });
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
FullCenter
|
|
9
|
-
};
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";const s=l=>{const{children:i}=l;return e("div",{className:"flex h-full w-full items-center justify-center",children:e("div",{className:"flex-1",children:i})})};export{s as FullCenter};
|
|
@@ -1,54 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { jsx } from "react/jsx-runtime";
|
|
21
|
-
import Image from "next/image";
|
|
22
|
-
import { isCloudflarePage } from "../lib/utils";
|
|
23
|
-
const normalizeSrc = (src) => {
|
|
24
|
-
return src.startsWith("/") ? src.slice(1) : src;
|
|
25
|
-
};
|
|
26
|
-
const cloudflareLoader = ({ src, width, quality }) => {
|
|
27
|
-
const params = [`width=${width}`];
|
|
28
|
-
if (quality) {
|
|
29
|
-
params.push(`quality=${quality}`);
|
|
30
|
-
}
|
|
31
|
-
const paramsString = params.join(",");
|
|
32
|
-
return `https://cfgomtm.yuepa8.com/cdn-cgi/image/${paramsString}/${normalizeSrc(src)}`;
|
|
33
|
-
};
|
|
34
|
-
const exampleImageLoader = ({ src, width, quality }) => {
|
|
35
|
-
return `https://example.com/${src}?w=${width}&q=${quality || 75}`;
|
|
36
|
-
};
|
|
37
|
-
function getImageLoader() {
|
|
38
|
-
if (isCloudflarePage()) {
|
|
39
|
-
return cloudflareLoader;
|
|
40
|
-
} else {
|
|
41
|
-
exampleImageLoader;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
const MtImage = (props) => {
|
|
45
|
-
return /* @__PURE__ */ jsx(
|
|
46
|
-
Image,
|
|
47
|
-
__spreadProps(__spreadValues({}, props), {
|
|
48
|
-
loader: getImageLoader()
|
|
49
|
-
})
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
MtImage
|
|
54
|
-
};
|
|
1
|
+
var s=Object.defineProperty,g=Object.defineProperties;var i=Object.getOwnPropertyDescriptors;var t=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;var m=(e,o,r)=>o in e?s(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r,n=(e,o)=>{for(var r in o||(o={}))d.call(o,r)&&m(e,r,o[r]);if(t)for(var r of t(o))c.call(o,r)&&m(e,r,o[r]);return e},p=(e,o)=>g(e,i(o));import{jsx as h}from"react/jsx-runtime";import l from"next/image";import{isCloudflarePage as f}from"../lib/utils";const u=e=>e.startsWith("/")?e.slice(1):e,I=({src:e,width:o,quality:r})=>{const a=[`width=${o}`];return r&&a.push(`quality=${r}`),`https://cfgomtm.yuepa8.com/cdn-cgi/image/${a.join(",")}/${u(e)}`},L=({src:e,width:o,quality:r})=>`https://example.com/${e}?w=${o}&q=${r||75}`;function $(){if(f())return I}const z=e=>h(l,p(n({},e),{loader:$()}));export{z as MtImage};
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useMtmApp } from "../store/appContext";
|
|
3
|
-
const OnlyDebug = (props) => {
|
|
4
|
-
const mtapp = useMtmApp();
|
|
5
|
-
return mtapp.isDebug ? props.children : null;
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
OnlyDebug
|
|
9
|
-
};
|
|
1
|
+
"use client";import{useMtmApp as t}from"../store/appContext";const o=r=>t().isDebug?r.children:null;export{o as OnlyDebug};
|
|
@@ -1,54 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
-
var __spreadValues = (a, b) => {
|
|
8
|
-
for (var prop in b || (b = {}))
|
|
9
|
-
if (__hasOwnProp.call(b, prop))
|
|
10
|
-
__defNormalProp(a, prop, b[prop]);
|
|
11
|
-
if (__getOwnPropSymbols)
|
|
12
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
13
|
-
if (__propIsEnum.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
}
|
|
16
|
-
return a;
|
|
17
|
-
};
|
|
18
|
-
var __objRest = (source, exclude) => {
|
|
19
|
-
var target = {};
|
|
20
|
-
for (var prop in source)
|
|
21
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
22
|
-
target[prop] = source[prop];
|
|
23
|
-
if (source != null && __getOwnPropSymbols)
|
|
24
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
25
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
26
|
-
target[prop] = source[prop];
|
|
27
|
-
}
|
|
28
|
-
return target;
|
|
29
|
-
};
|
|
30
|
-
import { jsx } from "react/jsx-runtime";
|
|
31
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
32
|
-
import Link from "next/link";
|
|
33
|
-
import React from "react";
|
|
34
|
-
import { cn } from "../lib/utils";
|
|
35
|
-
import { buttonVariants } from "../ui/button";
|
|
36
|
-
const MtLink = React.forwardRef(
|
|
37
|
-
(_a, ref) => {
|
|
38
|
-
var _b = _a, { className, variant, size, asChild = false } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild"]);
|
|
39
|
-
const Comp = asChild ? Slot : Link;
|
|
40
|
-
return /* @__PURE__ */ jsx(
|
|
41
|
-
Comp,
|
|
42
|
-
__spreadValues({
|
|
43
|
-
className: cn(
|
|
44
|
-
variant && buttonVariants({ variant, className })
|
|
45
|
-
),
|
|
46
|
-
ref
|
|
47
|
-
}, props)
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
MtLink.displayName = "MtLink";
|
|
52
|
-
export {
|
|
53
|
-
MtLink
|
|
54
|
-
};
|
|
1
|
+
"use client";var L=Object.defineProperty;var e=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var i=(o,t,r)=>t in o?L(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r,s=(o,t)=>{for(var r in t||(t={}))m.call(t,r)&&i(o,r,t[r]);if(e)for(var r of e(t))a.call(t,r)&&i(o,r,t[r]);return o};var f=(o,t)=>{var r={};for(var n in o)m.call(o,n)&&t.indexOf(n)<0&&(r[n]=o[n]);if(o!=null&&e)for(var n of e(o))t.indexOf(n)<0&&a.call(o,n)&&(r[n]=o[n]);return r};import{jsx as b}from"react/jsx-runtime";import{Slot as k}from"@radix-ui/react-slot";import P from"next/link";import C from"react";import{cn as M}from"../lib/utils";import{buttonVariants as d}from"../ui/button";const V=C.forwardRef((u,c)=>{var p=u,{className:o,variant:t,size:r,asChild:n=!1}=p,l=f(p,["className","variant","size","asChild"]);return b(n?k:P,s({className:M(t&&d({variant:t,className:o})),ref:c},l))});V.displayName="MtLink";export{V as MtLink};
|
|
@@ -1,38 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
-
import { jsx } from "react/jsx-runtime";
|
|
22
|
-
import { ChevronRight } from "lucide-react";
|
|
23
|
-
import { cn } from "../../../lib/utils";
|
|
24
|
-
const ExpenderCell = (info) => {
|
|
25
|
-
return info.row.getCanExpand() ? /* @__PURE__ */ jsx(
|
|
26
|
-
"button",
|
|
27
|
-
__spreadProps(__spreadValues({
|
|
28
|
-
className: "pointer"
|
|
29
|
-
}, {
|
|
30
|
-
onClick: info.row.getToggleExpandedHandler()
|
|
31
|
-
}), {
|
|
32
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { className: cn(info.row.getIsExpanded() && "rotate-90") })
|
|
33
|
-
})
|
|
34
|
-
) : "\u{1F535}";
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
ExpenderCell
|
|
38
|
-
};
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import{ChevronRight as o}from"lucide-react";import{cn as n}from"../../../lib/utils";const C=e=>e.row.getCanExpand()?t("button",{className:"pointer",onClick:e.row.getToggleExpandedHandler(),children:t(o,{className:n(e.row.getIsExpanded()&&"rotate-90")})}):"\u{1F535}";export{C as ExpenderCell};
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "../../../ui/select";
|
|
5
|
-
const SelectCell = (info) => {
|
|
6
|
-
const [value, setValue] = React.useState(info.cell.getValue());
|
|
7
|
-
const onBlur = () => {
|
|
8
|
-
const numValue = parseInt(value);
|
|
9
|
-
};
|
|
10
|
-
return /* @__PURE__ */ jsx("div", { className: "flex w-full", children: /* @__PURE__ */ jsx("input", { type: "number", value, onChange: (e) => setValue(e.target.value), onBlur, className: "grow" }) });
|
|
11
|
-
};
|
|
12
|
-
const NewSelectCell = ({ placeholder, items }) => {
|
|
13
|
-
const component = (_info) => {
|
|
14
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Select, { children: [
|
|
15
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: placeholder || "--" }) }),
|
|
16
|
-
/* @__PURE__ */ jsx(SelectContent, { children: /* @__PURE__ */ jsx(SelectGroup, { children: items == null ? void 0 : items.map((item, i) => {
|
|
17
|
-
return /* @__PURE__ */ jsx(SelectItem, { value: item.value, children: item.label }, i);
|
|
18
|
-
}) }) })
|
|
19
|
-
] }) });
|
|
20
|
-
};
|
|
21
|
-
return component;
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
NewSelectCell,
|
|
25
|
-
SelectCell
|
|
26
|
-
};
|
|
1
|
+
"use client";import{Fragment as g,jsx as e,jsxs as m}from"react/jsx-runtime";import a from"react";import{Select as u,SelectContent as s,SelectGroup as p,SelectItem as S,SelectTrigger as C,SelectValue as i}from"../../../ui/select";const y=n=>{const[l,o]=a.useState(n.cell.getValue());return e("div",{className:"flex w-full",children:e("input",{type:"number",value:l,onChange:t=>o(t.target.value),onBlur:()=>{const t=parseInt(l)},className:"grow"})})},N=({placeholder:n,items:l})=>r=>e(g,{children:m(u,{children:[e(C,{className:"w-[180px]",children:e(i,{placeholder:n||"--"})}),e(s,{children:e(p,{children:l==null?void 0:l.map((t,c)=>e(S,{value:t.value,children:t.label},c))})})]})});export{N as NewSelectCell,y as SelectCell};
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
const NewTextCell = ({ enableEdit, placeholder, popup }) => (info) => {
|
|
5
|
-
const initialValue = info.cell.getValue();
|
|
6
|
-
const [value, setValue] = React.useState(initialValue);
|
|
7
|
-
React.useEffect(() => {
|
|
8
|
-
setValue(initialValue);
|
|
9
|
-
}, [initialValue]);
|
|
10
|
-
const onBlur = () => {
|
|
11
|
-
};
|
|
12
|
-
return /* @__PURE__ */ jsx(Fragment, { children: value });
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
NewTextCell
|
|
16
|
-
};
|
|
1
|
+
"use client";import{Fragment as a,jsx as p}from"react/jsx-runtime";import l from"react";const x=({enableEdit:i,placeholder:c,popup:r})=>t=>{const e=t.cell.getValue(),[o,n]=l.useState(e);l.useEffect(()=>{n(e)},[e]);const s=()=>{};return p(a,{children:o})};export{x as NewTextCell};
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Link from "next/link";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "../../../ui/select";
|
|
6
|
-
const ViewLinkCell = (info) => {
|
|
7
|
-
const [value, setValue] = React.useState(info.cell.getValue());
|
|
8
|
-
const onBlur = () => {
|
|
9
|
-
const numValue = parseInt(value);
|
|
10
|
-
};
|
|
11
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Link, { href: "#", children: "res link" }) });
|
|
12
|
-
};
|
|
13
|
-
const NewSelectCell = ({ placeholder, items }) => {
|
|
14
|
-
return (info) => {
|
|
15
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Select, { children: [
|
|
16
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: placeholder || "--" }) }),
|
|
17
|
-
/* @__PURE__ */ jsx(SelectContent, { children: /* @__PURE__ */ jsx(SelectGroup, { children: items == null ? void 0 : items.map((item, i) => {
|
|
18
|
-
return /* @__PURE__ */ jsx(SelectItem, { value: item.value, children: item.label }, i);
|
|
19
|
-
}) }) })
|
|
20
|
-
] }) });
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
NewSelectCell,
|
|
25
|
-
ViewLinkCell
|
|
26
|
-
};
|
|
1
|
+
"use client";import{Fragment as c,jsx as e,jsxs as f}from"react/jsx-runtime";import a from"next/link";import u from"react";import{Select as S,SelectContent as i,SelectGroup as p,SelectItem as C,SelectTrigger as s,SelectValue as m}from"../../../ui/select";const I=t=>{const[l,o]=u.useState(t.cell.getValue()),n=()=>{const r=parseInt(l)};return e(c,{children:e(a,{href:"#",children:"res link"})})},V=({placeholder:t,items:l})=>o=>e(c,{children:f(S,{children:[e(s,{className:"w-[180px]",children:e(m,{placeholder:t||"--"})}),e(i,{children:e(p,{children:l==null?void 0:l.map((n,r)=>e(C,{value:n.value,children:n.label},r))})})]})});export{V as NewSelectCell,I as ViewLinkCell};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
const CellWrapper = ({ children }) => {
|
|
4
|
-
return /* @__PURE__ */ jsx("div", { children });
|
|
5
|
-
};
|
|
6
|
-
export {
|
|
7
|
-
CellWrapper
|
|
8
|
-
};
|
|
1
|
+
"use client";import{jsx as r}from"react/jsx-runtime";const o=({children:e})=>r("div",{children:e});export{o as CellWrapper};
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
const NumberCell = (info) => {
|
|
5
|
-
const [value, setValue] = React.useState(info.cell.getValue());
|
|
6
|
-
const onBlur = () => {
|
|
7
|
-
const numValue = parseInt(value);
|
|
8
|
-
};
|
|
9
|
-
return /* @__PURE__ */ jsx("div", { className: "flex w-full", children: /* @__PURE__ */ jsx("input", { type: "number", value, onChange: (e) => setValue(e.target.value), onBlur, className: "grow" }) });
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
NumberCell
|
|
13
|
-
};
|
|
1
|
+
"use client";import{jsx as t}from"react/jsx-runtime";import o from"react";const m=n=>{const[e,a]=o.useState(n.cell.getValue());return t("div",{className:"flex w-full",children:t("input",{type:"number",value:e,onChange:l=>a(l.target.value),onBlur:()=>{const l=parseInt(e)},className:"grow"})})};export{m as NumberCell};
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { CellWrapper } from "./container/cellWrapper";
|
|
5
|
-
const StringCell = (info) => {
|
|
6
|
-
const initialValue = info.cell.getValue();
|
|
7
|
-
const [value, setValue] = React.useState(initialValue);
|
|
8
|
-
const onBlur = () => {
|
|
9
|
-
console.log("\u66F4\u65B0\u5355\u5143\u683C", info.row.index, info.column.id, value);
|
|
10
|
-
};
|
|
11
|
-
React.useEffect(() => {
|
|
12
|
-
setValue(initialValue);
|
|
13
|
-
}, [initialValue]);
|
|
14
|
-
return /* @__PURE__ */ jsx(CellWrapper, { children: value });
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
StringCell
|
|
18
|
-
};
|
|
1
|
+
"use client";import{jsx as a}from"react/jsx-runtime";import o from"react";import{CellWrapper as n}from"./container/cellWrapper";const C=e=>{const l=e.cell.getValue(),[t,r]=o.useState(l),c=()=>{console.log("\u66F4\u65B0\u5355\u5143\u683C",e.row.index,e.column.id,t)};return o.useEffect(()=>{r(l)},[l]),a(n,{children:t})};export{C as StringCell};
|
|
@@ -1,105 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
ChevronLeftIcon,
|
|
5
|
-
ChevronRightIcon,
|
|
6
|
-
DoubleArrowLeftIcon,
|
|
7
|
-
DoubleArrowRightIcon
|
|
8
|
-
} from "@radix-ui/react-icons";
|
|
9
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../ui/select";
|
|
10
|
-
import { MtButton } from "../../ui/ui-mt/Button";
|
|
11
|
-
function DataTablePagination({
|
|
12
|
-
table
|
|
13
|
-
}) {
|
|
14
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-2", children: [
|
|
15
|
-
/* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex-1 text-sm", children: [
|
|
16
|
-
table.getFilteredSelectedRowModel().rows.length,
|
|
17
|
-
" of",
|
|
18
|
-
" ",
|
|
19
|
-
table.getFilteredRowModel().rows.length,
|
|
20
|
-
" row(s) selected."
|
|
21
|
-
] }),
|
|
22
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
|
|
23
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
24
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Rows per page" }),
|
|
25
|
-
/* @__PURE__ */ jsxs(
|
|
26
|
-
Select,
|
|
27
|
-
{
|
|
28
|
-
value: `${table.getState().pagination.pageSize}`,
|
|
29
|
-
onValueChange: (value) => {
|
|
30
|
-
table.setPageSize(Number(value));
|
|
31
|
-
},
|
|
32
|
-
children: [
|
|
33
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }),
|
|
34
|
-
/* @__PURE__ */ jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => /* @__PURE__ */ jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize)) })
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
] }),
|
|
39
|
-
/* @__PURE__ */ jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
|
|
40
|
-
"Page ",
|
|
41
|
-
table.getState().pagination.pageIndex + 1,
|
|
42
|
-
" of",
|
|
43
|
-
" ",
|
|
44
|
-
table.getPageCount()
|
|
45
|
-
] }),
|
|
46
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
47
|
-
/* @__PURE__ */ jsxs(
|
|
48
|
-
MtButton,
|
|
49
|
-
{
|
|
50
|
-
variant: "outline",
|
|
51
|
-
className: "hidden h-8 w-8 p-0 lg:flex",
|
|
52
|
-
onClick: () => table.setPageIndex(0),
|
|
53
|
-
disabled: !table.getCanPreviousPage(),
|
|
54
|
-
children: [
|
|
55
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to first page" }),
|
|
56
|
-
/* @__PURE__ */ jsx(DoubleArrowLeftIcon, { className: "h-4 w-4" })
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
),
|
|
60
|
-
/* @__PURE__ */ jsxs(
|
|
61
|
-
MtButton,
|
|
62
|
-
{
|
|
63
|
-
variant: "outline",
|
|
64
|
-
className: "h-8 w-8 p-0",
|
|
65
|
-
onClick: () => table.previousPage(),
|
|
66
|
-
disabled: !table.getCanPreviousPage(),
|
|
67
|
-
children: [
|
|
68
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to previous page" }),
|
|
69
|
-
/* @__PURE__ */ jsx(ChevronLeftIcon, { className: "h-4 w-4" })
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
),
|
|
73
|
-
/* @__PURE__ */ jsxs(
|
|
74
|
-
MtButton,
|
|
75
|
-
{
|
|
76
|
-
variant: "outline",
|
|
77
|
-
className: "h-8 w-8 p-0",
|
|
78
|
-
onClick: () => table.nextPage(),
|
|
79
|
-
disabled: !table.getCanNextPage(),
|
|
80
|
-
children: [
|
|
81
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to next page" }),
|
|
82
|
-
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "h-4 w-4" })
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
),
|
|
86
|
-
/* @__PURE__ */ jsxs(
|
|
87
|
-
MtButton,
|
|
88
|
-
{
|
|
89
|
-
variant: "outline",
|
|
90
|
-
className: "hidden h-8 w-8 p-0 lg:flex",
|
|
91
|
-
onClick: () => table.setPageIndex(table.getPageCount() - 1),
|
|
92
|
-
disabled: !table.getCanNextPage(),
|
|
93
|
-
children: [
|
|
94
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to last page" }),
|
|
95
|
-
/* @__PURE__ */ jsx(DoubleArrowRightIcon, { className: "h-4 w-4" })
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
)
|
|
99
|
-
] })
|
|
100
|
-
] })
|
|
101
|
-
] });
|
|
102
|
-
}
|
|
103
|
-
export {
|
|
104
|
-
DataTablePagination
|
|
105
|
-
};
|
|
1
|
+
"use client";import{jsx as a,jsxs as t}from"react/jsx-runtime";import{ChevronLeftIcon as o,ChevronRightIcon as i,DoubleArrowLeftIcon as l,DoubleArrowRightIcon as c}from"@radix-ui/react-icons";import{Select as r,SelectContent as g,SelectItem as m,SelectTrigger as p,SelectValue as d}from"../../ui/select";import{MtButton as n}from"../../ui/ui-mt/Button";function h({table:e}){return t("div",{className:"flex items-center justify-between px-2",children:[t("div",{className:"text-muted-foreground flex-1 text-sm",children:[e.getFilteredSelectedRowModel().rows.length," of"," ",e.getFilteredRowModel().rows.length," row(s) selected."]}),t("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[t("div",{className:"flex items-center space-x-2",children:[a("p",{className:"text-sm font-medium",children:"Rows per page"}),t(r,{value:`${e.getState().pagination.pageSize}`,onValueChange:s=>{e.setPageSize(Number(s))},children:[a(p,{className:"h-8 w-[70px]",children:a(d,{placeholder:e.getState().pagination.pageSize})}),a(g,{side:"top",children:[10,20,30,40,50].map(s=>a(m,{value:`${s}`,children:s},s))})]})]}),t("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",e.getState().pagination.pageIndex+1," of"," ",e.getPageCount()]}),t("div",{className:"flex items-center space-x-2",children:[t(n,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[a("span",{className:"sr-only",children:"Go to first page"}),a(l,{className:"h-4 w-4"})]}),t(n,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[a("span",{className:"sr-only",children:"Go to previous page"}),a(o,{className:"h-4 w-4"})]}),t(n,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[a("span",{className:"sr-only",children:"Go to next page"}),a(i,{className:"h-4 w-4"})]}),t(n,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[a("span",{className:"sr-only",children:"Go to last page"}),a(c,{className:"h-4 w-4"})]})]})]})]})}export{h as DataTablePagination};
|
|
@@ -1,44 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { MixerHorizontalIcon } from "@radix-ui/react-icons";
|
|
4
|
-
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "../../ui/dropdown-menu";
|
|
5
|
-
import { MtButton } from "../../ui/ui-mt/Button";
|
|
6
|
-
function DataTableViewOptions({
|
|
7
|
-
table
|
|
8
|
-
}) {
|
|
9
|
-
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
10
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
11
|
-
MtButton,
|
|
12
|
-
{
|
|
13
|
-
variant: "outline",
|
|
14
|
-
size: "sm",
|
|
15
|
-
className: "ml-auto hidden h-8 lg:flex",
|
|
16
|
-
children: [
|
|
17
|
-
/* @__PURE__ */ jsx(MixerHorizontalIcon, { className: "mr-2 h-4 w-4" }),
|
|
18
|
-
"View"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
) }),
|
|
22
|
-
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-[150px]", children: [
|
|
23
|
-
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: "Toggle columns" }),
|
|
24
|
-
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
25
|
-
table.getAllColumns().filter(
|
|
26
|
-
(column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
|
|
27
|
-
).map((column) => {
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
29
|
-
DropdownMenuCheckboxItem,
|
|
30
|
-
{
|
|
31
|
-
className: "capitalize",
|
|
32
|
-
checked: column.getIsVisible(),
|
|
33
|
-
onCheckedChange: (value) => column.toggleVisibility(!!value),
|
|
34
|
-
children: column.id
|
|
35
|
-
},
|
|
36
|
-
column.id
|
|
37
|
-
);
|
|
38
|
-
})
|
|
39
|
-
] })
|
|
40
|
-
] });
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
DataTableViewOptions
|
|
44
|
-
};
|
|
1
|
+
"use client";import{jsx as o,jsxs as n}from"react/jsx-runtime";import{MixerHorizontalIcon as r}from"@radix-ui/react-icons";import{DropdownMenu as i,DropdownMenuCheckboxItem as l,DropdownMenuContent as p,DropdownMenuLabel as s,DropdownMenuSeparator as d,DropdownMenuTrigger as D}from"../../ui/dropdown-menu";import{MtButton as u}from"../../ui/ui-mt/Button";function c({table:a}){return n(i,{children:[o(D,{asChild:!0,children:n(u,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[o(r,{className:"mr-2 h-4 w-4"}),"View"]})}),n(p,{align:"end",className:"w-[150px]",children:[o(s,{children:"Toggle columns"}),o(d,{}),a.getAllColumns().filter(e=>typeof e.accessorFn!="undefined"&&e.getCanHide()).map(e=>o(l,{className:"capitalize",checked:e.getIsVisible(),onCheckedChange:t=>e.toggleVisibility(!!t),children:e.id},e.id))]})]})}export{c as DataTableViewOptions};
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
const TailwindIndicator = () => {
|
|
4
|
-
if (process.env.NODE_ENV === "production")
|
|
5
|
-
return null;
|
|
6
|
-
return /* @__PURE__ */ jsxs("div", { className: "fixed bottom-1 left-1 z-50 flex h-6 w-6 items-center justify-center rounded-full bg-gray-800 p-3 font-mono text-xs text-white", children: [
|
|
7
|
-
/* @__PURE__ */ jsx("div", { className: "block sm:hidden", children: "xs" }),
|
|
8
|
-
/* @__PURE__ */ jsx("div", { className: "hidden sm:block md:hidden", children: "sm" }),
|
|
9
|
-
/* @__PURE__ */ jsx("div", { className: "hidden md:block lg:hidden", children: "md" }),
|
|
10
|
-
/* @__PURE__ */ jsx("div", { className: "hidden lg:block xl:hidden", children: "lg" }),
|
|
11
|
-
/* @__PURE__ */ jsx("div", { className: "hidden xl:block 2xl:hidden", children: "xl" }),
|
|
12
|
-
/* @__PURE__ */ jsx("div", { className: "hidden 2xl:block", children: "2xl" })
|
|
13
|
-
] });
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
TailwindIndicator
|
|
17
|
-
};
|
|
1
|
+
"use client";import{jsx as d,jsxs as e}from"react/jsx-runtime";const i=()=>null;export{i as TailwindIndicator};
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { MtLink } from "../common/mtlink";
|
|
4
|
-
import { PageSearchCmd } from "./PageSearchCmd";
|
|
5
|
-
import { MainNav } from "./main-nav";
|
|
6
|
-
const DefaultHeader = () => {
|
|
7
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("header", { className: "bg-background/95 supports-[backdrop-filter]:bg-background/60 sticky top-0 z-50 w-full border-b backdrop-blur", children: /* @__PURE__ */ jsxs("div", { className: "flex h-14 items-center", children: [
|
|
8
|
-
/* @__PURE__ */ jsx("div", { className: "hidden w-52 items-center justify-center md:flex", children: /* @__PURE__ */ jsx(MtLink, { href: "/", className: "flex items-center space-x-2" }) }),
|
|
9
|
-
/* @__PURE__ */ jsx(MainNav, {}),
|
|
10
|
-
/* @__PURE__ */ jsx("nav", { className: " flex items-center space-x-6 text-sm font-medium" }),
|
|
11
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(PageSearchCmd, {}) }),
|
|
12
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-1 shrink items-center justify-end space-x-2 pr-4", children: /* @__PURE__ */ jsx("nav", { className: "flex items-center" }) })
|
|
13
|
-
] }) }) });
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
DefaultHeader
|
|
17
|
-
};
|
|
1
|
+
"use client";import{Fragment as i,jsx as e,jsxs as t}from"react/jsx-runtime";import{MtLink as a}from"../common/mtlink";import{PageSearchCmd as r}from"./PageSearchCmd";import{MainNav as s}from"./main-nav";const n=()=>e(i,{children:e("header",{className:"bg-background/95 supports-[backdrop-filter]:bg-background/60 sticky top-0 z-50 w-full border-b backdrop-blur",children:t("div",{className:"flex h-14 items-center",children:[e("div",{className:"hidden w-52 items-center justify-center md:flex",children:e(a,{href:"/",className:"flex items-center space-x-2"})}),e(s,{}),e("nav",{className:" flex items-center space-x-6 text-sm font-medium"}),e("div",{children:e(r,{})}),e("div",{className:"flex flex-1 shrink items-center justify-end space-x-2 pr-4",children:e("nav",{className:"flex items-center"})})]})})});export{n as DefaultHeader};
|
|
@@ -1,68 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { compile } from "path-to-regexp";
|
|
4
|
-
import { useMemo } from "react";
|
|
5
|
-
import { MtLink } from "../common/mtlink";
|
|
6
|
-
import { useCurdView, useCurdViewList } from "../curd/CurdViewView";
|
|
7
|
-
import { cn } from "../lib/utils";
|
|
8
|
-
import { MtButton } from "../ui/ui-mt/Button";
|
|
9
|
-
import { PostCard } from "./PostCard";
|
|
10
|
-
const ListItemView = (props) => {
|
|
11
|
-
var _a, _b;
|
|
12
|
-
const { item } = props;
|
|
13
|
-
if ((_a = item == null ? void 0 : item.item) == null ? void 0 : _a.value) {
|
|
14
|
-
const itemCase = ((_b = item.item) == null ? void 0 : _b.case) || "";
|
|
15
|
-
switch (itemCase) {
|
|
16
|
-
case "commonListItem":
|
|
17
|
-
return /* @__PURE__ */ jsx(CommonListItemView, { item: item.item.value });
|
|
18
|
-
case "postCard":
|
|
19
|
-
return /* @__PURE__ */ jsx(PostCard, { item: item.item.value });
|
|
20
|
-
default:
|
|
21
|
-
return /* @__PURE__ */ jsx("span", { className: "bg-red-600 p-2", children: "unknow list item type" });
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return null;
|
|
25
|
-
};
|
|
26
|
-
const CommonListItemView = (props) => {
|
|
27
|
-
const { item } = props;
|
|
28
|
-
const curdView = useCurdView();
|
|
29
|
-
const listView = useCurdViewList();
|
|
30
|
-
const link = useMemo(() => {
|
|
31
|
-
const itemId = item.id;
|
|
32
|
-
const routeShow = curdView.item.routeShow;
|
|
33
|
-
const toPath = compile(routeShow, { encode: encodeURIComponent });
|
|
34
|
-
return toPath({ id: itemId });
|
|
35
|
-
}, [curdView.item.routeShow, item.id]);
|
|
36
|
-
const handleSelect = (e) => {
|
|
37
|
-
e.preventDefault();
|
|
38
|
-
e.stopPropagation();
|
|
39
|
-
listView.handleSelectItem(item);
|
|
40
|
-
};
|
|
41
|
-
return /* @__PURE__ */ jsx(
|
|
42
|
-
MtButton,
|
|
43
|
-
{
|
|
44
|
-
variant: "ghost",
|
|
45
|
-
onClick: handleSelect,
|
|
46
|
-
className: cn(
|
|
47
|
-
"flex justify-start border p-4 text-left",
|
|
48
|
-
item.id == curdView.activateId && " font-bold"
|
|
49
|
-
),
|
|
50
|
-
"aria-label": item.id,
|
|
51
|
-
children: /* @__PURE__ */ jsxs(
|
|
52
|
-
MtLink,
|
|
53
|
-
{
|
|
54
|
-
href: link,
|
|
55
|
-
children: [
|
|
56
|
-
"id:",
|
|
57
|
-
item.id,
|
|
58
|
-
item.title,
|
|
59
|
-
/* @__PURE__ */ jsx("span", { children: item.description })
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
export {
|
|
67
|
-
ListItemView
|
|
68
|
-
};
|
|
1
|
+
"use client";import{jsx as o,jsxs as h}from"react/jsx-runtime";import{compile as a}from"path-to-regexp";import{useMemo as l}from"react";import{MtLink as c}from"../common/mtlink";import{useCurdView as d,useCurdViewList as u}from"../curd/CurdViewView";import{cn as p}from"../lib/utils";import{MtButton as f}from"../ui/ui-mt/Button";import{PostCard as C}from"./PostCard";const D=m=>{var e,i;const{item:t}=m;if((e=t==null?void 0:t.item)!=null&&e.value)switch(((i=t.item)==null?void 0:i.case)||""){case"commonListItem":return o(I,{item:t.item.value});case"postCard":return o(C,{item:t.item.value});default:return o("span",{className:"bg-red-600 p-2",children:"unknow list item type"})}return null},I=m=>{const{item:t}=m,e=d(),i=u(),n=l(()=>{const s=t.id,r=e.item.routeShow;return a(r,{encode:encodeURIComponent})({id:s})},[e.item.routeShow,t.id]);return o(f,{variant:"ghost",onClick:s=>{s.preventDefault(),s.stopPropagation(),i.handleSelectItem(t)},className:p("flex justify-start border p-4 text-left",t.id==e.activateId&&" font-bold"),"aria-label":t.id,children:h(c,{href:n,children:["id:",t.id,t.title,o("span",{children:t.description})]})})};export{D as ListItemView};
|