denwa-react-shared 1.0.93 → 1.0.95
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/base-table-CEtpTXnb.cjs +1 -0
- package/dist/base-table-C__iDbuG.js +90 -0
- package/dist/denwa-react-shared.cjs.js +1 -132
- package/dist/denwa-react-shared.css +1 -1
- package/dist/denwa-react-shared.es.js +890 -31954
- package/dist/shared/lib/index.d.ts +1 -0
- package/dist/shared/lib/openapi-axios/const/defaultOptions.d.ts +5 -0
- package/dist/shared/lib/openapi-axios/const/methods.d.ts +18 -0
- package/dist/shared/lib/openapi-axios/index.d.ts +80 -0
- package/dist/shared/lib/openapi-axios/interpolate-params.d.ts +11 -0
- package/dist/shared/lib/openapi-axios/types/options.d.ts +27 -0
- package/dist/shared/lib/openapi-axios/types/requestParameters.d.ts +22 -0
- package/dist/shared/lib/openapi-axios/types/response.d.ts +100 -0
- package/dist/shared/lib/openapi-axios/types/schemeTypes.d.ts +69 -0
- package/dist/shared/lib/openapi-axios/types/serializer.d.ts +21 -0
- package/dist/shared/lib/openapi-axios/types/utils.d.ts +44 -0
- package/dist/shared/lib/openapi-axios/utils/querySerializer.d.ts +3 -0
- package/dist/shared/lib/openapi-axios/utils/response-converters/convertToAll.d.ts +5 -0
- package/dist/shared/lib/openapi-axios/utils/response-converters/convertToAxios.d.ts +5 -0
- package/dist/shared/lib/openapi-axios/utils/response-converters/convertToFetch.d.ts +5 -0
- package/dist/styles.module-B6UFYCUZ.cjs +1 -0
- package/dist/styles.module-DqoHspR8.js +775 -0
- package/dist/table-head-DEAS-Ubv.js +123 -0
- package/dist/table-head-DbVlLwY6.cjs +1 -0
- package/package.json +39 -24
- package/dist/base-table-CJaPkrQG.js +0 -8323
- package/dist/base-table-DQjDFH1p.cjs +0 -67
- package/dist/denwa-react-shared.umd.js +0 -703
- package/dist/space-BJ3vxIsm.cjs +0 -403
- package/dist/space-DbOTEMQH.js +0 -34936
- package/dist/spin-DmlDLEyA.js +0 -2711
- package/dist/spin-WHoLMfw5.cjs +0 -10
- package/dist/styles.module-C_XbqrB-.cjs +0 -95
- package/dist/styles.module-klEM0K92.js +0 -17512
- package/dist/table-head-DmPedLsO.cjs +0 -1
- package/dist/table-head-cgBo60N5.js +0 -588
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { G as e, J as t, K as n, X as r, n as i, t as a } from "./styles.module-DqoHspR8.js";
|
|
2
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
3
|
+
import { useDebounce as c } from "react-use";
|
|
4
|
+
import { createElement as l, useMemo as u, useState as d } from "react";
|
|
5
|
+
import { Button as f, Flex as p, Input as m, Segmented as h, Select as g, Tooltip as _, theme as v } from "antd";
|
|
6
|
+
import { PlusOutlined as y, RedoOutlined as b } from "@ant-design/icons";
|
|
7
|
+
//#region src/shared/ui/admin-table/table-search.tsx
|
|
8
|
+
var x = ({ datePickerComponent: r, searchText: f, noDateText: _, emptyText: y, searchSelect: b, radioOptions: x, searchOptions: S, searchType: C, textSearchValue: w = "", dateSearchValue: T, numberSearchValue: E, multiselectSearchValue: D, multiselectOptions: O, onChangeSearch: k, onChangeTextSearch: A, onChangeRadioSearch: j, onChangeDateSearch: M, onChangeNumberSearch: N, onChangeMultiselectSearch: P }) => {
|
|
9
|
+
let [F, I] = d(w), { token: { borderRadius: L, colorBgBase: R, paddingXXS: z } } = v.useToken(), { isMobileMaxWidth: B } = e(), { isSmallMaxWidth: V } = n(), H = u(() => V ? 2 : B ? 5 : 15, [B, V]);
|
|
10
|
+
c(() => {
|
|
11
|
+
A?.(F);
|
|
12
|
+
}, t.milliseconds.milliseconds500, [F]);
|
|
13
|
+
let U = () => {
|
|
14
|
+
I("");
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ s(p, {
|
|
17
|
+
className: a.flex,
|
|
18
|
+
gap: "small",
|
|
19
|
+
style: {
|
|
20
|
+
padding: z,
|
|
21
|
+
borderRadius: L,
|
|
22
|
+
background: R
|
|
23
|
+
},
|
|
24
|
+
children: [/* @__PURE__ */ o(g, {
|
|
25
|
+
defaultValue: b,
|
|
26
|
+
value: b,
|
|
27
|
+
style: {
|
|
28
|
+
width: 120,
|
|
29
|
+
minWidth: 120
|
|
30
|
+
},
|
|
31
|
+
options: S,
|
|
32
|
+
onChange: (e) => {
|
|
33
|
+
k(e), U();
|
|
34
|
+
}
|
|
35
|
+
}), {
|
|
36
|
+
text: /* @__PURE__ */ o(m, {
|
|
37
|
+
placeholder: f,
|
|
38
|
+
value: F,
|
|
39
|
+
allowClear: !0,
|
|
40
|
+
onChange: (e) => {
|
|
41
|
+
I(e.target.value.replace(/"/g, ""));
|
|
42
|
+
}
|
|
43
|
+
}),
|
|
44
|
+
radio: /* @__PURE__ */ o(h, {
|
|
45
|
+
options: x,
|
|
46
|
+
defaultValue: "all",
|
|
47
|
+
onChange: j
|
|
48
|
+
}),
|
|
49
|
+
date: l(r, {
|
|
50
|
+
noDateText: _,
|
|
51
|
+
currentValue: T ?? "",
|
|
52
|
+
onChangeDate: (e) => {
|
|
53
|
+
M?.(e);
|
|
54
|
+
}
|
|
55
|
+
}),
|
|
56
|
+
number: /* @__PURE__ */ o(i, {
|
|
57
|
+
emptyText: y,
|
|
58
|
+
value: E,
|
|
59
|
+
placeholder: f,
|
|
60
|
+
min: 0,
|
|
61
|
+
max: 2147483647,
|
|
62
|
+
onChange: (e) => {
|
|
63
|
+
!e && e !== 0 || N?.(+e);
|
|
64
|
+
}
|
|
65
|
+
}),
|
|
66
|
+
multiselect: /* @__PURE__ */ o(g, {
|
|
67
|
+
className: a.select,
|
|
68
|
+
mode: "multiple",
|
|
69
|
+
placeholder: f,
|
|
70
|
+
maxTagCount: 1,
|
|
71
|
+
maxTagTextLength: H,
|
|
72
|
+
showSearch: !1,
|
|
73
|
+
allowClear: !0,
|
|
74
|
+
options: O,
|
|
75
|
+
value: D,
|
|
76
|
+
onChange: P
|
|
77
|
+
})
|
|
78
|
+
}[C]]
|
|
79
|
+
});
|
|
80
|
+
}, S = ({ sortTooltipText: e, updateDataText: t, refreshText: n, createText: i, createNewElementText: c, order: l, orderOptions: u, createButtonTooltip: d, searchProps: m, isCanCreate: h, isHiddenCreate: v, onCreate: S, onRefetch: C, onChangeOrder: w }) => /* @__PURE__ */ s(p, {
|
|
81
|
+
gap: "middle",
|
|
82
|
+
justify: "space-between",
|
|
83
|
+
wrap: "wrap",
|
|
84
|
+
style: { marginBottom: r.OFFSET[1] },
|
|
85
|
+
children: [/* @__PURE__ */ s(p, {
|
|
86
|
+
align: "center",
|
|
87
|
+
gap: "middle",
|
|
88
|
+
wrap: "wrap",
|
|
89
|
+
children: [/* @__PURE__ */ o(x, { ...m }), /* @__PURE__ */ o(_, {
|
|
90
|
+
title: e,
|
|
91
|
+
children: /* @__PURE__ */ o(g, {
|
|
92
|
+
className: a.sort,
|
|
93
|
+
value: l,
|
|
94
|
+
options: u,
|
|
95
|
+
onChange: w
|
|
96
|
+
})
|
|
97
|
+
})]
|
|
98
|
+
}), /* @__PURE__ */ s(p, {
|
|
99
|
+
className: a.buttonsContainer,
|
|
100
|
+
gap: "small",
|
|
101
|
+
align: "center",
|
|
102
|
+
children: [C && /* @__PURE__ */ o(_, {
|
|
103
|
+
title: t,
|
|
104
|
+
children: /* @__PURE__ */ o(f, {
|
|
105
|
+
className: a.button,
|
|
106
|
+
icon: /* @__PURE__ */ o(b, {}),
|
|
107
|
+
onClick: C,
|
|
108
|
+
children: n
|
|
109
|
+
})
|
|
110
|
+
}), !v && h && /* @__PURE__ */ o(_, {
|
|
111
|
+
title: d ?? c,
|
|
112
|
+
children: /* @__PURE__ */ o(f, {
|
|
113
|
+
className: a.button,
|
|
114
|
+
type: "primary",
|
|
115
|
+
icon: /* @__PURE__ */ o(y, {}),
|
|
116
|
+
onClick: S,
|
|
117
|
+
children: i
|
|
118
|
+
})
|
|
119
|
+
})]
|
|
120
|
+
})]
|
|
121
|
+
});
|
|
122
|
+
//#endregion
|
|
123
|
+
export { S as TableHead };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./styles.module-B6UFYCUZ.cjs");let t=require("react/jsx-runtime"),n=require("react-use"),r=require("react"),i=require("antd"),a=require("@ant-design/icons");var o=({datePickerComponent:a,searchText:o,noDateText:s,emptyText:c,searchSelect:l,radioOptions:u,searchOptions:d,searchType:f,textSearchValue:p=``,dateSearchValue:m,numberSearchValue:h,multiselectSearchValue:g,multiselectOptions:_,onChangeSearch:v,onChangeTextSearch:y,onChangeRadioSearch:b,onChangeDateSearch:x,onChangeNumberSearch:S,onChangeMultiselectSearch:C})=>{let[w,T]=(0,r.useState)(p),{token:{borderRadius:E,colorBgBase:D,paddingXXS:O}}=i.theme.useToken(),{isMobileMaxWidth:k}=e.G(),{isSmallMaxWidth:A}=e.K(),j=(0,r.useMemo)(()=>A?2:k?5:15,[k,A]);(0,n.useDebounce)(()=>{y?.(w)},e.J.milliseconds.milliseconds500,[w]);let M=()=>{T(``)};return(0,t.jsxs)(i.Flex,{className:e.t.flex,gap:`small`,style:{padding:O,borderRadius:E,background:D},children:[(0,t.jsx)(i.Select,{defaultValue:l,value:l,style:{width:120,minWidth:120},options:d,onChange:e=>{v(e),M()}}),{text:(0,t.jsx)(i.Input,{placeholder:o,value:w,allowClear:!0,onChange:e=>{T(e.target.value.replace(/"/g,``))}}),radio:(0,t.jsx)(i.Segmented,{options:u,defaultValue:`all`,onChange:b}),date:(0,r.createElement)(a,{noDateText:s,currentValue:m??``,onChangeDate:e=>{x?.(e)}}),number:(0,t.jsx)(e.n,{emptyText:c,value:h,placeholder:o,min:0,max:2147483647,onChange:e=>{!e&&e!==0||S?.(+e)}}),multiselect:(0,t.jsx)(i.Select,{className:e.t.select,mode:`multiple`,placeholder:o,maxTagCount:1,maxTagTextLength:j,showSearch:!1,allowClear:!0,options:_,value:g,onChange:C})}[f]]})},s=({sortTooltipText:n,updateDataText:r,refreshText:s,createText:c,createNewElementText:l,order:u,orderOptions:d,createButtonTooltip:f,searchProps:p,isCanCreate:m,isHiddenCreate:h,onCreate:g,onRefetch:_,onChangeOrder:v})=>(0,t.jsxs)(i.Flex,{gap:`middle`,justify:`space-between`,wrap:`wrap`,style:{marginBottom:e.X.OFFSET[1]},children:[(0,t.jsxs)(i.Flex,{align:`center`,gap:`middle`,wrap:`wrap`,children:[(0,t.jsx)(o,{...p}),(0,t.jsx)(i.Tooltip,{title:n,children:(0,t.jsx)(i.Select,{className:e.t.sort,value:u,options:d,onChange:v})})]}),(0,t.jsxs)(i.Flex,{className:e.t.buttonsContainer,gap:`small`,align:`center`,children:[_&&(0,t.jsx)(i.Tooltip,{title:r,children:(0,t.jsx)(i.Button,{className:e.t.button,icon:(0,t.jsx)(a.RedoOutlined,{}),onClick:_,children:s})}),!h&&m&&(0,t.jsx)(i.Tooltip,{title:f??l,children:(0,t.jsx)(i.Button,{className:e.t.button,type:`primary`,icon:(0,t.jsx)(a.PlusOutlined,{}),onClick:g,children:c})})]})]});exports.TableHead=s;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "denwa-react-shared",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.95",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Denwa",
|
|
7
7
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"admin",
|
|
15
15
|
"tanstack-intent"
|
|
16
16
|
],
|
|
17
|
-
"main": "dist/denwa-react-shared.
|
|
17
|
+
"main": "dist/denwa-react-shared.cjs.js",
|
|
18
18
|
"module": "dist/denwa-react-shared.es.js",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -43,56 +43,71 @@
|
|
|
43
43
|
"release:patch": "npm run build && standard-version patch"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@ant-design/icons": "^6.0.0",
|
|
47
46
|
"@dnd-kit/core": "^6.3.1",
|
|
48
47
|
"@dnd-kit/sortable": "^10.0.0",
|
|
49
48
|
"@dnd-kit/utilities": "^3.2.2",
|
|
50
|
-
"@hookform/resolvers": "^5.
|
|
49
|
+
"@hookform/resolvers": "^5.4.0",
|
|
51
50
|
"@iminside/react-yandex-maps": "^1.2.7",
|
|
52
|
-
"
|
|
53
|
-
"antd": "^6.3.7",
|
|
54
|
-
"axios": "^1.16.0",
|
|
51
|
+
"axios": "^1.16.1",
|
|
55
52
|
"classnames": "^2.5.1",
|
|
56
|
-
"dayjs": "^1.11.
|
|
53
|
+
"dayjs": "^1.11.21",
|
|
57
54
|
"is-hotkey": "^0.2.0",
|
|
58
|
-
"libphonenumber-js": "^1.
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"react-hook-form": "^7.75.0",
|
|
55
|
+
"libphonenumber-js": "^1.13.4",
|
|
56
|
+
"openapi-typescript-helpers": "^0.1.0",
|
|
57
|
+
"query-string": "^9.4.0",
|
|
62
58
|
"react-use": "^17.6.0",
|
|
59
|
+
"validator": "^13.15.35",
|
|
60
|
+
"zod": "^4.4.3"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"@ant-design/icons": "^6.0.0",
|
|
64
|
+
"@tanstack/react-router": "^1.120.16",
|
|
65
|
+
"antd": "^6.3.7",
|
|
66
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
67
|
+
"react-dom": "^18.2.0 || ^19.0.0",
|
|
68
|
+
"react-hook-form": "^7.75.0",
|
|
63
69
|
"slate": "^0.115.1",
|
|
64
70
|
"slate-dom": "^0.114.0",
|
|
65
71
|
"slate-history": "^0.113.1",
|
|
66
72
|
"slate-react": "^0.114.2",
|
|
67
|
-
"validator": "^13.15.35",
|
|
68
|
-
"zod": "^4.4.2",
|
|
69
73
|
"zustand": "^5.0.12"
|
|
70
74
|
},
|
|
71
75
|
"devDependencies": {
|
|
76
|
+
"@ant-design/icons": "^6.2.5",
|
|
72
77
|
"@eslint/js": "^10.0.1",
|
|
78
|
+
"@tanstack/intent": "latest",
|
|
79
|
+
"@tanstack/react-router": "^1.170.10",
|
|
73
80
|
"@types/is-hotkey": "^0.1.10",
|
|
74
|
-
"@types/react": "^19.2.
|
|
81
|
+
"@types/react": "^19.2.15",
|
|
75
82
|
"@types/react-dom": "^19.2.3",
|
|
76
83
|
"@types/validator": "^13.15.10",
|
|
77
|
-
"@
|
|
78
|
-
"
|
|
84
|
+
"@vitejs/plugin-react-swc": "^4.3.1",
|
|
85
|
+
"antd": "^6.4.3",
|
|
79
86
|
"autoprefixer": "^10.5.0",
|
|
80
|
-
"eslint": "^10.
|
|
87
|
+
"eslint": "^10.4.1",
|
|
81
88
|
"eslint-config-prettier": "^10.1.8",
|
|
82
|
-
"eslint-plugin-prettier": "^5.5.
|
|
89
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
83
90
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
84
91
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
85
92
|
"globals": "^17.6.0",
|
|
86
|
-
"postcss": "^8.5.
|
|
93
|
+
"postcss": "^8.5.15",
|
|
87
94
|
"postcss-cli": "^11.0.1",
|
|
88
95
|
"postcss-custom-media": "^12.0.1",
|
|
89
96
|
"postcss-import": "^16.1.1",
|
|
90
97
|
"postcss-nesting": "^14.0.0",
|
|
91
98
|
"prettier": "^3.8.3",
|
|
99
|
+
"react": "^19.2.6",
|
|
100
|
+
"react-dom": "^19.2.6",
|
|
101
|
+
"react-hook-form": "^7.76.1",
|
|
102
|
+
"slate": "^0.124.1",
|
|
103
|
+
"slate-dom": "^0.124.1",
|
|
104
|
+
"slate-history": "^0.113.1",
|
|
105
|
+
"slate-react": "^0.124.2",
|
|
92
106
|
"standard-version": "^9.5.0",
|
|
93
|
-
"typescript": "~
|
|
94
|
-
"typescript-eslint": "^8.
|
|
95
|
-
"vite": "^8.0.
|
|
96
|
-
"vite-plugin-dts": "^
|
|
107
|
+
"typescript": "~6.0.3",
|
|
108
|
+
"typescript-eslint": "^8.60.0",
|
|
109
|
+
"vite": "^8.0.14",
|
|
110
|
+
"vite-plugin-dts": "^5.0.1",
|
|
111
|
+
"zustand": "^5.0.14"
|
|
97
112
|
}
|
|
98
113
|
}
|