tntd 2.8.0-beta.8 → 2.8.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,28 +6,123 @@ var __rest = this && this.__rest || function (s, e) {
6
6
  }
7
7
  return t;
8
8
  };
9
- import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
10
- import classNames from 'classnames';
11
- import React from 'react';
12
9
  import { ConfigConsumer } from 'antd/es/config-provider';
13
10
  import { default as AntdDrawer } from 'antd/es/drawer';
11
+ import LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver';
12
+ import classNames from 'classnames';
13
+ import React, { useEffect } from 'react';
14
+ import { Button } from '../button';
15
+ import Icon from '../icon';
16
+ const DefaultFooter = ({
17
+ locale,
18
+ onClose,
19
+ onSubmit,
20
+ onCancel,
21
+ onOk,
22
+ okText,
23
+ okType,
24
+ cancelText,
25
+ confirmLoading,
26
+ okButtonProps,
27
+ cancelButtonProps,
28
+ cancelType
29
+ }) => {
30
+ return React.createElement(React.Fragment, null, React.createElement(Button, Object.assign({
31
+ onClick: onCancel || onClose,
32
+ style: {
33
+ marginRight: 8
34
+ },
35
+ type: cancelType || 'default'
36
+ }, cancelButtonProps), cancelText || (locale === null || locale === void 0 ? void 0 : locale.cancelText)), React.createElement(Button, Object.assign({
37
+ onClick: onOk || onSubmit,
38
+ type: okType || 'primary',
39
+ loading: confirmLoading
40
+ }, okButtonProps), okText || (locale === null || locale === void 0 ? void 0 : locale.okText)));
41
+ };
14
42
  export const Drawer = _a => {
15
43
  var {
16
- closable,
17
- className
44
+ closable = true,
45
+ className,
46
+ footer,
47
+ showFooter,
48
+ onClose,
49
+ onSubmit,
50
+ onCancel,
51
+ onOk,
52
+ okText = '',
53
+ cancelText = '',
54
+ locale,
55
+ okType = 'primary',
56
+ cancelType = 'default',
57
+ confirmLoading = false,
58
+ okButtonProps = {},
59
+ cancelButtonProps = {},
60
+ clickOnBlankToClose = false
18
61
  } = _a,
19
- rest = __rest(_a, ["closable", "className"]);
62
+ rest = __rest(_a, ["closable", "className", "footer", "showFooter", "onClose", "onSubmit", "onCancel", "onOk", "okText", "cancelText", "locale", "okType", "cancelType", "confirmLoading", "okButtonProps", "cancelButtonProps", "clickOnBlankToClose"]);
63
+ const drawerDom = React.useRef(null);
64
+ const _onCancel = onCancel || onClose;
65
+ useEffect(() => {
66
+ if (clickOnBlankToClose) {
67
+ const handleOutsideClick = event => {
68
+ const drawer = drawerDom.current;
69
+ const targetElement = event.target;
70
+ let isInDrawer = false;
71
+ if (drawer && targetElement) {
72
+ isInDrawer = drawer.contains(targetElement) || targetElement === drawer;
73
+ }
74
+ drawerDom.current = null;
75
+ if (rest.visible && !isInDrawer && _onCancel) {
76
+ _onCancel();
77
+ }
78
+ };
79
+ document.removeEventListener('click', handleOutsideClick);
80
+ document.addEventListener('click', handleOutsideClick);
81
+ return () => {
82
+ document.removeEventListener('click', handleOutsideClick);
83
+ };
84
+ }
85
+ }, [rest.visible, clickOnBlankToClose, _onCancel]);
20
86
  return React.createElement(ConfigConsumer, null, ({
21
87
  getPrefixCls
22
88
  }) => {
23
89
  const prefixCls = getPrefixCls('drawer');
24
90
  return React.createElement(LocaleReceiver, {
25
- componentName: "Drawer"
26
- }, () => React.createElement(AntdDrawer, Object.assign({
27
- className: classNames(prefixCls, 'tntd-drawer', className, {
28
- [`${prefixCls}-contain-closable`]: closable !== false
29
- }),
30
- closable: closable
31
- }, rest)));
91
+ componentName: "Drawer",
92
+ defaultLocale: locale
93
+ }, locale => {
94
+ return React.createElement("div", {
95
+ onClick: event => {
96
+ drawerDom.current = event.target;
97
+ }
98
+ }, React.createElement(AntdDrawer, Object.assign({
99
+ className: classNames(prefixCls, 'tnt-drawer', 'tntd-drawer', className, {
100
+ [`${prefixCls}-contain-closable`]: closable !== false,
101
+ [`${prefixCls}-footer`]: showFooter || footer
102
+ }),
103
+ closable: false,
104
+ onClose: onClose,
105
+ width: 480
106
+ }, rest), React.createElement(React.Fragment, null, closable !== false && React.createElement(Icon, {
107
+ type: "close",
108
+ className: `${prefixCls}-close`,
109
+ onClick: onClose
110
+ }), rest.children, React.createElement("div", {
111
+ className: `${prefixCls}-footer-style`
112
+ }, !footer ? showFooter && React.createElement(DefaultFooter, {
113
+ confirmLoading: confirmLoading,
114
+ okButtonProps: okButtonProps,
115
+ cancelButtonProps: cancelButtonProps,
116
+ okType: okType,
117
+ locale: locale,
118
+ okText: okText,
119
+ cancelType: cancelType,
120
+ cancelText: cancelText,
121
+ onClose: onClose,
122
+ onSubmit: onSubmit,
123
+ onOk: onOk,
124
+ onCancel: onCancel
125
+ }) : footer))));
126
+ });
32
127
  });
33
128
  };
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;AASA,OAAO,cAAc,MAAM,wCAAwC,CAAA;AACnE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEtD,MAAM,CAAC,MAAM,MAAM,GAAwB,CAAC,EAAgC,EAAE,EAAE;QAApC,EAAE,QAAQ,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9B,yBAAgC,CAAF;IAAO,OAAA,CAC/E,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;QACxC,OAAO,CACL,oBAAC,cAAc,IAAC,aAAa,EAAC,QAAQ,IACnC,GAAG,EAAE,CAAC,CACL,oBAAC,UAAU,kBACT,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE;gBACzD,CAAC,GAAG,SAAS,mBAAmB,CAAC,EAAE,QAAQ,KAAK,KAAK;aACtD,CAAC,EACF,QAAQ,EAAE,QAAQ,IACd,IAAI,EACR,CACH,CACc,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;CAAA,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-03-08 16:45:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-03-08 18:56:20\n * @FilePath: /tntd/packages/tntd/src/drawer/drawer.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport type { DrawerProps as AntdDrawerProps } from 'antd/es/drawer'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport React, { FC } from 'react'\n\nimport { ConfigConsumer } from 'antd/es/config-provider'\nimport { default as AntdDrawer } from 'antd/es/drawer'\n\nexport const Drawer: FC<AntdDrawerProps> = ({ closable, className, ...rest }) => (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('drawer')\n return (\n <LocaleReceiver componentName=\"Drawer\">\n {() => (\n <AntdDrawer\n className={classNames(prefixCls, 'tntd-drawer', className, {\n [`${prefixCls}-contain-closable`]: closable !== false,\n })}\n closable={closable}\n {...rest}\n />\n )}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n)\n"]}
1
+ {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":"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","sourcesContent":["import { ConfigConsumer } from 'antd/es/config-provider'\nimport type { DrawerProps as AntdDrawerProps } from 'antd/es/drawer'\nimport { default as AntdDrawer } from 'antd/es/drawer'\nimport LocaleReceiver from 'antd/es/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport type { BaseButtonProps } from 'antd/es/button/button'\nimport type { ButtonType } from '../button/button'\n\nimport React, { FC, useEffect, useRef } from 'react'\nimport { Button } from '../button'\nimport Icon from '../icon'\nconst DefaultFooter = ({\n locale,\n onClose,\n onSubmit,\n onCancel,\n onOk,\n okText,\n okType,\n cancelText,\n confirmLoading,\n okButtonProps,\n cancelButtonProps,\n cancelType,\n}: {\n locale?: {\n okText?: string\n cancelText?: string\n }\n onClose?: () => void\n onSubmit?: () => void\n onCancel?: () => void\n onOk?: () => void\n okText: string\n cancelText: string\n okType?: ButtonType\n cancelType: ButtonType\n confirmLoading?: boolean\n okButtonProps?: BaseButtonProps\n cancelButtonProps?: BaseButtonProps\n}) => {\n return (\n <>\n <Button\n onClick={onCancel || onClose}\n style={{ marginRight: 8 }}\n type={cancelType || 'default'}\n {...cancelButtonProps}\n >\n {cancelText || locale?.cancelText}\n </Button>\n <Button\n onClick={onOk || onSubmit}\n type={okType || 'primary'}\n loading={confirmLoading}\n {...okButtonProps}\n >\n {okText || locale?.okText}\n </Button>\n </>\n )\n}\n\ninterface CustomDrawerProps extends AntdDrawerProps {\n footer?: React.ReactNode\n showFooter?: boolean\n onClose?: () => void\n onSubmit?: () => void\n onCancel?: () => void\n onOk?: () => void\n okText?: string\n cancelText?: string\n locale?: {\n okText?: string\n cancelText?: string\n }\n okType?: ButtonType\n cancelType?: ButtonType\n confirmLoading?: boolean\n okButtonProps?: BaseButtonProps\n cancelButtonProps?: BaseButtonProps\n clickOnBlankToClose: boolean\n}\n\nexport const Drawer: FC<CustomDrawerProps> = ({\n closable = true,\n className,\n footer,\n showFooter,\n onClose,\n onSubmit,\n onCancel,\n onOk,\n okText = '',\n cancelText = '',\n locale,\n okType = 'primary',\n cancelType = 'default',\n confirmLoading = false,\n okButtonProps = {},\n cancelButtonProps = {},\n clickOnBlankToClose = false,\n ...rest\n}) => {\n const drawerDom = React.useRef<EventTarget | null>(null)\n const _onCancel = onCancel || onClose\n\n useEffect(() => {\n if (clickOnBlankToClose) {\n const handleOutsideClick = (event: Event) => {\n const drawer = drawerDom.current as Node\n const targetElement = event.target as Node\n\n let isInDrawer = false\n if (drawer && targetElement) {\n isInDrawer = drawer.contains(targetElement as Node) || targetElement === drawer\n }\n drawerDom.current = null\n if (rest.visible && !isInDrawer && _onCancel) {\n _onCancel()\n }\n }\n document.removeEventListener('click', handleOutsideClick)\n document.addEventListener('click', handleOutsideClick)\n return () => {\n document.removeEventListener('click', handleOutsideClick)\n }\n }\n }, [rest.visible, clickOnBlankToClose, _onCancel])\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('drawer')\n return (\n <LocaleReceiver componentName=\"Drawer\" defaultLocale={locale}>\n {(locale) => {\n return (\n <div\n onClick={(event: React.MouseEvent<HTMLDivElement>) => {\n drawerDom.current = event.target\n }}\n >\n <AntdDrawer\n className={classNames(prefixCls, 'tnt-drawer', 'tntd-drawer', className, {\n [`${prefixCls}-contain-closable`]: closable !== false,\n [`${prefixCls}-footer`]: showFooter || footer,\n })}\n closable={false}\n onClose={onClose}\n width={480}\n {...rest}\n >\n <>\n {closable !== false && (\n <Icon type=\"close\" className={`${prefixCls}-close`} onClick={onClose} />\n )}\n {rest.children}\n <div className={`${prefixCls}-footer-style`}>\n {!footer\n ? showFooter && (\n <DefaultFooter\n confirmLoading={confirmLoading}\n okButtonProps={okButtonProps}\n cancelButtonProps={cancelButtonProps}\n okType={okType}\n locale={locale}\n okText={okText}\n cancelType={cancelType}\n cancelText={cancelText}\n onClose={onClose}\n onSubmit={onSubmit}\n onOk={onOk}\n onCancel={onCancel}\n />\n )\n : footer}\n </div>\n </>\n </AntdDrawer>\n </div>\n )\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n )\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import './style';
2
2
  import { Drawer } from './drawer';
3
- import './drawer.less';
3
+ import './index.less';
4
4
  export * from 'antd/es/drawer';
5
5
  export default Drawer;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,eAAe,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAE9B,eAAe,MAAM,CAAA","sourcesContent":["import './style'\nimport { Drawer } from './drawer'\n\nimport './drawer.less'\nexport * from 'antd/es/drawer'\n\nexport default Drawer\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,cAAc,CAAA;AACrB,cAAc,gBAAgB,CAAA;AAE9B,eAAe,MAAM,CAAA","sourcesContent":["import './style'\nimport { Drawer } from './drawer'\n\nimport './index.less'\nexport * from 'antd/es/drawer'\n\nexport default Drawer\n"]}
@@ -0,0 +1,154 @@
1
+ @drawer-prefix-cls: ~'@{ant-prefix}-drawer';
2
+
3
+
4
+ .tnt-drawer.@{drawer-prefix-cls} {
5
+ &-top {
6
+ .@{drawer-prefix-cls}-wrapper-body {
7
+ margin-top: 48px;
8
+ }
9
+
10
+ .@{drawer-prefix-cls}-content-wrapper {
11
+ height: 480px !important;
12
+ }
13
+ }
14
+
15
+ &-bottom {
16
+ .@{drawer-prefix-cls}-content-wrapper {
17
+ height: 480px !important;
18
+ }
19
+ }
20
+
21
+ .@{drawer-prefix-cls}-wrapper-body {
22
+ margin-top: 48px;
23
+ max-height: ~'calc(100vh - 50px)';
24
+ }
25
+
26
+ &-footer {
27
+ .@{drawer-prefix-cls}-header {
28
+ border-bottom: none;
29
+ position: absolute;
30
+ right: 0;
31
+ top: 0;
32
+ background: #fff;
33
+ width: 100%;
34
+ }
35
+
36
+ .@{drawer-prefix-cls}-wrapper-body {
37
+ max-height: ~'calc(100vh - 98px)' !important;
38
+ margin-top: 48px !important;
39
+ margin-bottom: 48px !important;
40
+ }
41
+
42
+ }
43
+
44
+ .@{drawer-prefix-cls}-title {
45
+ font-size: 16px !important;
46
+ font-weight: 500 !important;
47
+ }
48
+
49
+ .@{drawer-prefix-cls}-close {
50
+ color: fade(@text-color, 50%);
51
+ width: 62px;
52
+ top: -4px;
53
+
54
+
55
+ position: absolute;
56
+ top: -2px;
57
+ right: 0;
58
+ z-index: 10;
59
+ display: block;
60
+ width: 48px;
61
+ height: 48px;
62
+ padding: 0;
63
+ color: rgba(23, 35, 61, 0.8);
64
+ font-weight: 700;
65
+ font-size: 20px;
66
+ font-style: normal;
67
+ line-height: 56px;
68
+ text-align: center;
69
+ text-transform: none;
70
+ text-decoration: none;
71
+ background: transparent;
72
+ border: 0;
73
+ outline: 0;
74
+ cursor: pointer;
75
+ transition: color 0.3s;
76
+ text-rendering: auto;
77
+ }
78
+
79
+
80
+ .@{drawer-prefix-cls}-contain-closable {
81
+ .@{drawer-prefix-cls}-header {
82
+ padding: 12px 36px 12px 20px;
83
+ }
84
+ }
85
+
86
+ &-right {
87
+ .@{drawer-prefix-cls}-content {
88
+ border-radius: @border-radius-base 0px 0px @border-radius-base;
89
+ background: #F8F9FB;
90
+ }
91
+ }
92
+
93
+ &-left {
94
+ .@{drawer-prefix-cls}-content {
95
+ border-radius: 0px @border-radius-base @border-radius-base 0px;
96
+ background: #F8F9FB;
97
+ }
98
+ }
99
+
100
+ &-top {
101
+ .@{drawer-prefix-cls}-content {
102
+ border-radius: 0px 0px @border-radius-base @border-radius-base;
103
+ background: #F8F9FB;
104
+ padding-top: 48px;
105
+ }
106
+
107
+ .@{drawer-prefix-cls}-wrapper-body {
108
+ margin-top: 0px !important;
109
+ }
110
+ }
111
+
112
+ &-bottom {
113
+ .@{drawer-prefix-cls}-content {
114
+ border-radius: @border-radius-base @border-radius-base 0px 0px;
115
+ background: #F8F9FB;
116
+ padding-top: 48px;
117
+ }
118
+
119
+ .@{drawer-prefix-cls}-wrapper-body {
120
+ margin-top: 0px !important;
121
+ }
122
+ }
123
+
124
+
125
+ .@{drawer-prefix-cls}-header {
126
+ padding: 13px 24px;
127
+ border-bottom: none;
128
+ position: absolute;
129
+ right: 0;
130
+ top: 0;
131
+ width: 100%;
132
+ background: #fff;
133
+ }
134
+
135
+ .@{drawer-prefix-cls}-body {
136
+ padding: @padding-lg !important;
137
+
138
+ }
139
+
140
+
141
+ .@{drawer-prefix-cls}-wrapper-body {
142
+
143
+ .@{drawer-prefix-cls}-footer-style {
144
+ position: absolute;
145
+ right: 0;
146
+ bottom: 0;
147
+ width: 100%;
148
+ padding: 8px 24px;
149
+ background: #fff;
150
+ text-align: right;
151
+ }
152
+
153
+ }
154
+ }
@@ -157,7 +157,7 @@
157
157
  padding: 0;
158
158
  color: @text-color-secondary;
159
159
  font-weight: 700;
160
- font-size: 20px;
160
+ font-size: @font-size-lg;
161
161
  font-style: normal;
162
162
  line-height: 56px;
163
163
  text-align: center;
@@ -169,9 +169,7 @@
169
169
  cursor: pointer;
170
170
  transition: color @animation-duration-slow;
171
171
  text-rendering: auto;
172
- .tntd-anticon {
173
- font-size: 20px;
174
- }
172
+
175
173
  &:focus,
176
174
  &:hover {
177
175
  color: @icon-color-hover;
@@ -50,6 +50,10 @@ const en_US = _merge(sourceLocale, {
50
50
  TntdSecondPage: {
51
51
  back: 'Back'
52
52
  },
53
- ColorPicker: {}
53
+ ColorPicker: {},
54
+ Drawer: {
55
+ okText: 'Submit',
56
+ cancelText: 'Cancel'
57
+ }
54
58
  });
55
59
  export default en_US;
@@ -1 +1 @@
1
- {"version":3,"file":"en_US.js","sourceRoot":"","sources":["../../src/locale/en_US.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,YAAY;QAChC,gBAAgB,EAAE,SAAS;QAC3B,KAAK,EAAE,4BAA4B;KACpC;IACD,KAAK,EAAE;QACL,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,eAAe;QAC7B,mBAAmB,EAAE,sBAAsB;QAC3C,cAAc,EAAE,iBAAiB;QACjC,SAAS,EAAE,uBAAuB;QAClC,MAAM,EAAE,SAAS;KAClB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,UAAU,EAAE,aAAa;YACzB,EAAE,EAAE,IAAI;YACR,UAAU,EAAE,aAAa;SAC1B;KACF;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;KACb;IACD,SAAS,EAAE;QACT,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,yCAAyC;KACjD;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,SAAS;KAClB;IACD,UAAU,EAAE;QACV,MAAM,EAAE,SAAS;KAClB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;KACb;IACD,WAAW,EAAE,EAAE;CAChB,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-11-01 17:14:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-11-03 17:02:30\n * @FilePath: /tntd/packages/tntd/src/locale/en_US.ts\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport sourceLocale from 'antd/es/locale/en_US'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst en_US = merge(sourceLocale, {\n Table: {\n loadingDescription: 'loading...',\n emptyDescription: 'No data',\n total: 'Totally ${total} Record(s)',\n },\n Empty: {\n noGraphData: 'No data',\n noPermission: 'No permission',\n createdSuccessfully: 'Created successfully',\n creationFailed: 'Creation failed',\n noNetwork: 'Network not connected',\n noData: 'No data',\n },\n Calendar: {\n lang: {\n timeSelect: 'Select time',\n ok: 'OK',\n dateSelect: 'Select date',\n },\n },\n Handle: {\n more: 'More',\n },\n Exception: {\n '403': \"Sorry, we don't have access to this page\",\n '404': 'Sorry, there are no results on this page',\n '500': \"I'm sorry, the server reported an error\",\n },\n TntdCascader: {\n noData: 'No data',\n },\n TntdSelect: {\n noData: 'No data',\n },\n PageLoading: {\n text: 'loading...',\n },\n TntdSecondPage: {\n back: 'Back',\n },\n ColorPicker: {},\n})\n\nexport default en_US\n"]}
1
+ {"version":3,"file":"en_US.js","sourceRoot":"","sources":["../../src/locale/en_US.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,YAAY;QAChC,gBAAgB,EAAE,SAAS;QAC3B,KAAK,EAAE,4BAA4B;KACpC;IACD,KAAK,EAAE;QACL,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,eAAe;QAC7B,mBAAmB,EAAE,sBAAsB;QAC3C,cAAc,EAAE,iBAAiB;QACjC,SAAS,EAAE,uBAAuB;QAClC,MAAM,EAAE,SAAS;KAClB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,UAAU,EAAE,aAAa;YACzB,EAAE,EAAE,IAAI;YACR,UAAU,EAAE,aAAa;SAC1B;KACF;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;KACb;IACD,SAAS,EAAE;QACT,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,yCAAyC;KACjD;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,SAAS;KAClB;IACD,UAAU,EAAE;QACV,MAAM,EAAE,SAAS;KAClB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;KACb;IACD,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-11-01 17:14:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-11-03 17:02:30\n * @FilePath: /tntd/packages/tntd/src/locale/en_US.ts\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport sourceLocale from 'antd/es/locale/en_US'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst en_US = merge(sourceLocale, {\n Table: {\n loadingDescription: 'loading...',\n emptyDescription: 'No data',\n total: 'Totally ${total} Record(s)',\n },\n Empty: {\n noGraphData: 'No data',\n noPermission: 'No permission',\n createdSuccessfully: 'Created successfully',\n creationFailed: 'Creation failed',\n noNetwork: 'Network not connected',\n noData: 'No data',\n },\n Calendar: {\n lang: {\n timeSelect: 'Select time',\n ok: 'OK',\n dateSelect: 'Select date',\n },\n },\n Handle: {\n more: 'More',\n },\n Exception: {\n '403': \"Sorry, we don't have access to this page\",\n '404': 'Sorry, there are no results on this page',\n '500': \"I'm sorry, the server reported an error\",\n },\n TntdCascader: {\n noData: 'No data',\n },\n TntdSelect: {\n noData: 'No data',\n },\n PageLoading: {\n text: 'loading...',\n },\n TntdSecondPage: {\n back: 'Back',\n },\n ColorPicker: {},\n Drawer: {\n okText: 'Submit',\n cancelText: 'Cancel',\n },\n})\n\nexport default en_US\n"]}
@@ -35,6 +35,10 @@ const zh_CN = _merge(sourceLocale, {
35
35
  TntdSecondPage: {
36
36
  back: '返回'
37
37
  },
38
- ColorPicker: {}
38
+ ColorPicker: {},
39
+ Drawer: {
40
+ okText: '确定',
41
+ cancelText: '取消'
42
+ }
39
43
  });
40
44
  export default zh_CN;
@@ -1 +1 @@
1
- {"version":3,"file":"zh_CN.js","sourceRoot":"","sources":["../../src/locale/zh_CN.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,UAAU;QAC9B,gBAAgB,EAAE,MAAM;QACxB,KAAK,EAAE,gBAAgB;KACxB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,MAAM;QACpB,mBAAmB,EAAE,MAAM;QAC3B,cAAc,EAAE,MAAM;QACtB,SAAS,EAAE,OAAO;QAClB,MAAM,EAAE,MAAM;KACf;IACD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI;KACX;IACD,SAAS,EAAE;QACT,KAAK,EAAE,eAAe;QACtB,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,WAAW;KACnB;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM;KACf;IACD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;KACf;IACD,UAAU,EAAE;QACV,MAAM,EAAE,MAAM;KACf;IACD,cAAc,EAAE;QACd,IAAI,EAAE,IAAI;KACX;IACD,WAAW,EAAE,EAAE;CAChB,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA","sourcesContent":["import sourceLocale from 'antd/es/locale/zh_CN'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst zh_CN = merge(sourceLocale, {\n Table: {\n loadingDescription: '数据加载中...',\n emptyDescription: '暂无数据',\n total: '共 ${total} 条记录',\n },\n Empty: {\n noGraphData: '暂无图表',\n noPermission: '暂无权限',\n createdSuccessfully: '创建成功',\n creationFailed: '创建失败',\n noNetwork: '网络未连接',\n noData: '暂无数据',\n },\n Handle: {\n more: '更多',\n },\n Exception: {\n '403': '很抱歉,暂无该页面访问权限',\n '404': '很抱歉,本页暂无结果',\n '500': '很抱歉,服务器报错',\n },\n TntdCascader: {\n noData: '暂无数据',\n },\n PageLoading: {\n text: '加载中...',\n },\n TntdSelect: {\n noData: '暂无数据',\n },\n TntdSecondPage: {\n back: '返回',\n },\n ColorPicker: {},\n})\n\nexport default zh_CN\n"]}
1
+ {"version":3,"file":"zh_CN.js","sourceRoot":"","sources":["../../src/locale/zh_CN.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,sBAAsB,CAAA;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,UAAU;QAC9B,gBAAgB,EAAE,MAAM;QACxB,KAAK,EAAE,gBAAgB;KACxB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,MAAM;QACpB,mBAAmB,EAAE,MAAM;QAC3B,cAAc,EAAE,MAAM;QACtB,SAAS,EAAE,OAAO;QAClB,MAAM,EAAE,MAAM;KACf;IACD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI;KACX;IACD,SAAS,EAAE;QACT,KAAK,EAAE,eAAe;QACtB,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,WAAW;KACnB;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM;KACf;IACD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;KACf;IACD,UAAU,EAAE;QACV,MAAM,EAAE,MAAM;KACf;IACD,cAAc,EAAE;QACd,IAAI,EAAE,IAAI;KACX;IACD,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,IAAI;KACjB;CACF,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA","sourcesContent":["import sourceLocale from 'antd/es/locale/zh_CN'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst zh_CN = merge(sourceLocale, {\n Table: {\n loadingDescription: '数据加载中...',\n emptyDescription: '暂无数据',\n total: '共 ${total} 条记录',\n },\n Empty: {\n noGraphData: '暂无图表',\n noPermission: '暂无权限',\n createdSuccessfully: '创建成功',\n creationFailed: '创建失败',\n noNetwork: '网络未连接',\n noData: '暂无数据',\n },\n Handle: {\n more: '更多',\n },\n Exception: {\n '403': '很抱歉,暂无该页面访问权限',\n '404': '很抱歉,本页暂无结果',\n '500': '很抱歉,服务器报错',\n },\n TntdCascader: {\n noData: '暂无数据',\n },\n PageLoading: {\n text: '加载中...',\n },\n TntdSelect: {\n noData: '暂无数据',\n },\n TntdSecondPage: {\n back: '返回',\n },\n ColorPicker: {},\n Drawer: {\n okText: '确定',\n cancelText: '取消',\n },\n})\n\nexport default zh_CN\n"]}
@@ -1,4 +1,27 @@
1
1
  import type { DrawerProps as AntdDrawerProps } from 'antd/lib/drawer';
2
- import { FC } from 'react';
3
- export declare const Drawer: FC<AntdDrawerProps>;
2
+ import type { BaseButtonProps } from 'antd/lib/button/button';
3
+ import type { ButtonType } from '../button/button';
4
+ import React, { FC } from 'react';
5
+ interface CustomDrawerProps extends AntdDrawerProps {
6
+ footer?: React.ReactNode;
7
+ showFooter?: boolean;
8
+ onClose?: () => void;
9
+ onSubmit?: () => void;
10
+ onCancel?: () => void;
11
+ onOk?: () => void;
12
+ okText?: string;
13
+ cancelText?: string;
14
+ locale?: {
15
+ okText?: string;
16
+ cancelText?: string;
17
+ };
18
+ okType?: ButtonType;
19
+ cancelType?: ButtonType;
20
+ confirmLoading?: boolean;
21
+ okButtonProps?: BaseButtonProps;
22
+ cancelButtonProps?: BaseButtonProps;
23
+ clickOnBlankToClose: boolean;
24
+ }
25
+ export declare const Drawer: FC<CustomDrawerProps>;
26
+ export {};
4
27
  //# sourceMappingURL=drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGpE,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAKjC,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,eAAe,CAmBtC,CAAA"}
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAIpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,OAAO,KAAK,EAAE,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAA;AAuDpD,UAAU,iBAAkB,SAAQ,eAAe;IACjD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;IACD,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,eAAe,CAAA;IAC/B,iBAAiB,CAAC,EAAE,eAAe,CAAA;IACnC,mBAAmB,EAAE,OAAO,CAAA;CAC7B;AAED,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,iBAAiB,CAwGxC,CAAA"}
@@ -4,11 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Drawer = void 0;
7
- var _LocaleReceiver = _interopRequireDefault(require("antd/lib/locale-provider/LocaleReceiver"));
8
- var _classnames = _interopRequireDefault(require("classnames"));
9
- var _react = _interopRequireDefault(require("react"));
10
7
  var _configProvider = require("antd/lib/config-provider");
11
8
  var _drawer = _interopRequireDefault(require("antd/lib/drawer"));
9
+ var _LocaleReceiver = _interopRequireDefault(require("antd/lib/locale-provider/LocaleReceiver"));
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _button = require("../button");
13
+ var _icon = _interopRequireDefault(require("../icon"));
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
12
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
17
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
14
18
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -22,20 +26,118 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
22
26
  }
23
27
  return t;
24
28
  };
29
+ var DefaultFooter = function DefaultFooter(_ref) {
30
+ var locale = _ref.locale,
31
+ onClose = _ref.onClose,
32
+ onSubmit = _ref.onSubmit,
33
+ onCancel = _ref.onCancel,
34
+ onOk = _ref.onOk,
35
+ okText = _ref.okText,
36
+ okType = _ref.okType,
37
+ cancelText = _ref.cancelText,
38
+ confirmLoading = _ref.confirmLoading,
39
+ okButtonProps = _ref.okButtonProps,
40
+ cancelButtonProps = _ref.cancelButtonProps,
41
+ cancelType = _ref.cancelType;
42
+ return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(_button.Button, Object.assign({
43
+ onClick: onCancel || onClose,
44
+ style: {
45
+ marginRight: 8
46
+ },
47
+ type: cancelType || 'default'
48
+ }, cancelButtonProps), cancelText || (locale === null || locale === void 0 ? void 0 : locale.cancelText)), _react["default"].createElement(_button.Button, Object.assign({
49
+ onClick: onOk || onSubmit,
50
+ type: okType || 'primary',
51
+ loading: confirmLoading
52
+ }, okButtonProps), okText || (locale === null || locale === void 0 ? void 0 : locale.okText)));
53
+ };
25
54
  var Drawer = exports.Drawer = function Drawer(_a) {
26
- var closable = _a.closable,
55
+ var _a$closable = _a.closable,
56
+ closable = _a$closable === void 0 ? true : _a$closable,
27
57
  className = _a.className,
28
- rest = __rest(_a, ["closable", "className"]);
29
- return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
30
- var getPrefixCls = _ref.getPrefixCls;
58
+ footer = _a.footer,
59
+ showFooter = _a.showFooter,
60
+ onClose = _a.onClose,
61
+ onSubmit = _a.onSubmit,
62
+ onCancel = _a.onCancel,
63
+ onOk = _a.onOk,
64
+ _a$okText = _a.okText,
65
+ okText = _a$okText === void 0 ? '' : _a$okText,
66
+ _a$cancelText = _a.cancelText,
67
+ cancelText = _a$cancelText === void 0 ? '' : _a$cancelText,
68
+ locale = _a.locale,
69
+ _a$okType = _a.okType,
70
+ okType = _a$okType === void 0 ? 'primary' : _a$okType,
71
+ _a$cancelType = _a.cancelType,
72
+ cancelType = _a$cancelType === void 0 ? 'default' : _a$cancelType,
73
+ _a$confirmLoading = _a.confirmLoading,
74
+ confirmLoading = _a$confirmLoading === void 0 ? false : _a$confirmLoading,
75
+ _a$okButtonProps = _a.okButtonProps,
76
+ okButtonProps = _a$okButtonProps === void 0 ? {} : _a$okButtonProps,
77
+ _a$cancelButtonProps = _a.cancelButtonProps,
78
+ cancelButtonProps = _a$cancelButtonProps === void 0 ? {} : _a$cancelButtonProps,
79
+ _a$clickOnBlankToClos = _a.clickOnBlankToClose,
80
+ clickOnBlankToClose = _a$clickOnBlankToClos === void 0 ? false : _a$clickOnBlankToClos,
81
+ rest = __rest(_a, ["closable", "className", "footer", "showFooter", "onClose", "onSubmit", "onCancel", "onOk", "okText", "cancelText", "locale", "okType", "cancelType", "confirmLoading", "okButtonProps", "cancelButtonProps", "clickOnBlankToClose"]);
82
+ var drawerDom = _react["default"].useRef(null);
83
+ var _onCancel = onCancel || onClose;
84
+ (0, _react.useEffect)(function () {
85
+ if (clickOnBlankToClose) {
86
+ var handleOutsideClick = function handleOutsideClick(event) {
87
+ var drawer = drawerDom.current;
88
+ var targetElement = event.target;
89
+ var isInDrawer = false;
90
+ if (drawer && targetElement) {
91
+ isInDrawer = drawer.contains(targetElement) || targetElement === drawer;
92
+ }
93
+ drawerDom.current = null;
94
+ if (rest.visible && !isInDrawer && _onCancel) {
95
+ _onCancel();
96
+ }
97
+ };
98
+ document.removeEventListener('click', handleOutsideClick);
99
+ document.addEventListener('click', handleOutsideClick);
100
+ return function () {
101
+ document.removeEventListener('click', handleOutsideClick);
102
+ };
103
+ }
104
+ }, [rest.visible, clickOnBlankToClose, _onCancel]);
105
+ return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref2) {
106
+ var getPrefixCls = _ref2.getPrefixCls;
31
107
  var prefixCls = getPrefixCls('drawer');
32
108
  return _react["default"].createElement(_LocaleReceiver["default"], {
33
- componentName: "Drawer"
34
- }, function () {
35
- return _react["default"].createElement(_drawer["default"], Object.assign({
36
- className: (0, _classnames["default"])(prefixCls, 'tntd-drawer', className, _defineProperty({}, "".concat(prefixCls, "-contain-closable"), closable !== false)),
37
- closable: closable
38
- }, rest));
109
+ componentName: "Drawer",
110
+ defaultLocale: locale
111
+ }, function (locale) {
112
+ return _react["default"].createElement("div", {
113
+ onClick: function onClick(event) {
114
+ drawerDom.current = event.target;
115
+ }
116
+ }, _react["default"].createElement(_drawer["default"], Object.assign({
117
+ className: (0, _classnames["default"])(prefixCls, 'tnt-drawer', 'tntd-drawer', className, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-contain-closable"), closable !== false), "".concat(prefixCls, "-footer"), showFooter || footer)),
118
+ closable: false,
119
+ onClose: onClose,
120
+ width: 480
121
+ }, rest), _react["default"].createElement(_react["default"].Fragment, null, closable !== false && _react["default"].createElement(_icon["default"], {
122
+ type: "close",
123
+ className: "".concat(prefixCls, "-close"),
124
+ onClick: onClose
125
+ }), rest.children, _react["default"].createElement("div", {
126
+ className: "".concat(prefixCls, "-footer-style")
127
+ }, !footer ? showFooter && _react["default"].createElement(DefaultFooter, {
128
+ confirmLoading: confirmLoading,
129
+ okButtonProps: okButtonProps,
130
+ cancelButtonProps: cancelButtonProps,
131
+ okType: okType,
132
+ locale: locale,
133
+ okText: okText,
134
+ cancelType: cancelType,
135
+ cancelText: cancelText,
136
+ onClose: onClose,
137
+ onSubmit: onSubmit,
138
+ onOk: onOk,
139
+ onCancel: onCancel
140
+ }) : footer))));
39
141
  });
40
142
  });
41
143
  };
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AASA,4FAAmE;AACnE,4DAAmC;AACnC,kDAAiC;AAEjC,6DAAwD;AACxD,4DAAsD;AAE/C,MAAM,MAAM,GAAwB,CAAC,EAAgC,EAAE,EAAE;QAApC,EAAE,QAAQ,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9B,yBAAgC,CAAF;IAAO,OAAA,CAC/E,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;QACxC,OAAO,CACL,8BAAC,wBAAc,IAAC,aAAa,EAAC,QAAQ,IACnC,GAAG,EAAE,CAAC,CACL,8BAAC,gBAAU,kBACT,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE;gBACzD,CAAC,GAAG,SAAS,mBAAmB,CAAC,EAAE,QAAQ,KAAK,KAAK;aACtD,CAAC,EACF,QAAQ,EAAE,QAAQ,IACd,IAAI,EACR,CACH,CACc,CAClB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;CAAA,CAAA;AAnBY,QAAA,MAAM,UAmBlB","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-03-08 16:45:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-03-08 18:56:20\n * @FilePath: /tntd/packages/tntd/src/drawer/drawer.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport type { DrawerProps as AntdDrawerProps } from 'antd/lib/drawer'\nimport LocaleReceiver from 'antd/lib/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport React, { FC } from 'react'\n\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport { default as AntdDrawer } from 'antd/lib/drawer'\n\nexport const Drawer: FC<AntdDrawerProps> = ({ closable, className, ...rest }) => (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('drawer')\n return (\n <LocaleReceiver componentName=\"Drawer\">\n {() => (\n <AntdDrawer\n className={classNames(prefixCls, 'tntd-drawer', className, {\n [`${prefixCls}-contain-closable`]: closable !== false,\n })}\n closable={closable}\n {...rest}\n />\n )}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n)\n"]}
1
+ {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../src/drawer/drawer.tsx"],"names":[],"mappings":"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","sourcesContent":["import { ConfigConsumer } from 'antd/lib/config-provider'\nimport type { DrawerProps as AntdDrawerProps } from 'antd/lib/drawer'\nimport { default as AntdDrawer } from 'antd/lib/drawer'\nimport LocaleReceiver from 'antd/lib/locale-provider/LocaleReceiver'\nimport classNames from 'classnames'\nimport type { BaseButtonProps } from 'antd/lib/button/button'\nimport type { ButtonType } from '../button/button'\n\nimport React, { FC, useEffect, useRef } from 'react'\nimport { Button } from '../button'\nimport Icon from '../icon'\nconst DefaultFooter = ({\n locale,\n onClose,\n onSubmit,\n onCancel,\n onOk,\n okText,\n okType,\n cancelText,\n confirmLoading,\n okButtonProps,\n cancelButtonProps,\n cancelType,\n}: {\n locale?: {\n okText?: string\n cancelText?: string\n }\n onClose?: () => void\n onSubmit?: () => void\n onCancel?: () => void\n onOk?: () => void\n okText: string\n cancelText: string\n okType?: ButtonType\n cancelType: ButtonType\n confirmLoading?: boolean\n okButtonProps?: BaseButtonProps\n cancelButtonProps?: BaseButtonProps\n}) => {\n return (\n <>\n <Button\n onClick={onCancel || onClose}\n style={{ marginRight: 8 }}\n type={cancelType || 'default'}\n {...cancelButtonProps}\n >\n {cancelText || locale?.cancelText}\n </Button>\n <Button\n onClick={onOk || onSubmit}\n type={okType || 'primary'}\n loading={confirmLoading}\n {...okButtonProps}\n >\n {okText || locale?.okText}\n </Button>\n </>\n )\n}\n\ninterface CustomDrawerProps extends AntdDrawerProps {\n footer?: React.ReactNode\n showFooter?: boolean\n onClose?: () => void\n onSubmit?: () => void\n onCancel?: () => void\n onOk?: () => void\n okText?: string\n cancelText?: string\n locale?: {\n okText?: string\n cancelText?: string\n }\n okType?: ButtonType\n cancelType?: ButtonType\n confirmLoading?: boolean\n okButtonProps?: BaseButtonProps\n cancelButtonProps?: BaseButtonProps\n clickOnBlankToClose: boolean\n}\n\nexport const Drawer: FC<CustomDrawerProps> = ({\n closable = true,\n className,\n footer,\n showFooter,\n onClose,\n onSubmit,\n onCancel,\n onOk,\n okText = '',\n cancelText = '',\n locale,\n okType = 'primary',\n cancelType = 'default',\n confirmLoading = false,\n okButtonProps = {},\n cancelButtonProps = {},\n clickOnBlankToClose = false,\n ...rest\n}) => {\n const drawerDom = React.useRef<EventTarget | null>(null)\n const _onCancel = onCancel || onClose\n\n useEffect(() => {\n if (clickOnBlankToClose) {\n const handleOutsideClick = (event: Event) => {\n const drawer = drawerDom.current as Node\n const targetElement = event.target as Node\n\n let isInDrawer = false\n if (drawer && targetElement) {\n isInDrawer = drawer.contains(targetElement as Node) || targetElement === drawer\n }\n drawerDom.current = null\n if (rest.visible && !isInDrawer && _onCancel) {\n _onCancel()\n }\n }\n document.removeEventListener('click', handleOutsideClick)\n document.addEventListener('click', handleOutsideClick)\n return () => {\n document.removeEventListener('click', handleOutsideClick)\n }\n }\n }, [rest.visible, clickOnBlankToClose, _onCancel])\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('drawer')\n return (\n <LocaleReceiver componentName=\"Drawer\" defaultLocale={locale}>\n {(locale) => {\n return (\n <div\n onClick={(event: React.MouseEvent<HTMLDivElement>) => {\n drawerDom.current = event.target\n }}\n >\n <AntdDrawer\n className={classNames(prefixCls, 'tnt-drawer', 'tntd-drawer', className, {\n [`${prefixCls}-contain-closable`]: closable !== false,\n [`${prefixCls}-footer`]: showFooter || footer,\n })}\n closable={false}\n onClose={onClose}\n width={480}\n {...rest}\n >\n <>\n {closable !== false && (\n <Icon type=\"close\" className={`${prefixCls}-close`} onClick={onClose} />\n )}\n {rest.children}\n <div className={`${prefixCls}-footer-style`}>\n {!footer\n ? showFooter && (\n <DefaultFooter\n confirmLoading={confirmLoading}\n okButtonProps={okButtonProps}\n cancelButtonProps={cancelButtonProps}\n okType={okType}\n locale={locale}\n okText={okText}\n cancelType={cancelType}\n cancelText={cancelText}\n onClose={onClose}\n onSubmit={onSubmit}\n onOk={onOk}\n onCancel={onCancel}\n />\n )\n : footer}\n </div>\n </>\n </AntdDrawer>\n </div>\n )\n }}\n </LocaleReceiver>\n )\n }}\n </ConfigConsumer>\n )\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import './style';
2
2
  import { Drawer } from './drawer';
3
- import './drawer.less';
3
+ import './index.less';
4
4
  export * from 'antd/lib/drawer';
5
5
  export default Drawer;
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,eAAe,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAE9B,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,cAAc,CAAA;AACrB,cAAc,gBAAgB,CAAA;AAE9B,eAAe,MAAM,CAAA"}
@@ -7,16 +7,16 @@ var _exportNames = {};
7
7
  exports["default"] = void 0;
8
8
  require("./style");
9
9
  var _drawer = require("./drawer");
10
- require("./drawer.less");
11
- var _drawer3 = require("antd/lib/drawer");
12
- Object.keys(_drawer3).forEach(function (key) {
10
+ require("./index.less");
11
+ var _drawer2 = require("antd/lib/drawer");
12
+ Object.keys(_drawer2).forEach(function (key) {
13
13
  if (key === "default" || key === "__esModule") return;
14
14
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
15
- if (key in exports && exports[key] === _drawer3[key]) return;
15
+ if (key in exports && exports[key] === _drawer2[key]) return;
16
16
  Object.defineProperty(exports, key, {
17
17
  enumerable: true,
18
18
  get: function get() {
19
- return _drawer3[key];
19
+ return _drawer2[key];
20
20
  }
21
21
  });
22
22
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/drawer/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mBAAgB;AAChB,qCAAiC;AAEjC,yBAAsB;AACtB,iDAA8B;AAE9B,kBAAe,eAAM,CAAA","sourcesContent":["import './style'\nimport { Drawer } from './drawer'\n\nimport './drawer.less'\nexport * from 'antd/lib/drawer'\n\nexport default Drawer\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/drawer/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mBAAgB;AAChB,qCAAiC;AAEjC,wBAAqB;AACrB,iDAA8B;AAE9B,kBAAe,eAAM,CAAA","sourcesContent":["import './style'\nimport { Drawer } from './drawer'\n\nimport './index.less'\nexport * from 'antd/lib/drawer'\n\nexport default Drawer\n"]}
@@ -0,0 +1,154 @@
1
+ @drawer-prefix-cls: ~'@{ant-prefix}-drawer';
2
+
3
+
4
+ .tnt-drawer.@{drawer-prefix-cls} {
5
+ &-top {
6
+ .@{drawer-prefix-cls}-wrapper-body {
7
+ margin-top: 48px;
8
+ }
9
+
10
+ .@{drawer-prefix-cls}-content-wrapper {
11
+ height: 480px !important;
12
+ }
13
+ }
14
+
15
+ &-bottom {
16
+ .@{drawer-prefix-cls}-content-wrapper {
17
+ height: 480px !important;
18
+ }
19
+ }
20
+
21
+ .@{drawer-prefix-cls}-wrapper-body {
22
+ margin-top: 48px;
23
+ max-height: ~'calc(100vh - 50px)';
24
+ }
25
+
26
+ &-footer {
27
+ .@{drawer-prefix-cls}-header {
28
+ border-bottom: none;
29
+ position: absolute;
30
+ right: 0;
31
+ top: 0;
32
+ background: #fff;
33
+ width: 100%;
34
+ }
35
+
36
+ .@{drawer-prefix-cls}-wrapper-body {
37
+ max-height: ~'calc(100vh - 98px)' !important;
38
+ margin-top: 48px !important;
39
+ margin-bottom: 48px !important;
40
+ }
41
+
42
+ }
43
+
44
+ .@{drawer-prefix-cls}-title {
45
+ font-size: 16px !important;
46
+ font-weight: 500 !important;
47
+ }
48
+
49
+ .@{drawer-prefix-cls}-close {
50
+ color: fade(@text-color, 50%);
51
+ width: 62px;
52
+ top: -4px;
53
+
54
+
55
+ position: absolute;
56
+ top: -2px;
57
+ right: 0;
58
+ z-index: 10;
59
+ display: block;
60
+ width: 48px;
61
+ height: 48px;
62
+ padding: 0;
63
+ color: rgba(23, 35, 61, 0.8);
64
+ font-weight: 700;
65
+ font-size: 20px;
66
+ font-style: normal;
67
+ line-height: 56px;
68
+ text-align: center;
69
+ text-transform: none;
70
+ text-decoration: none;
71
+ background: transparent;
72
+ border: 0;
73
+ outline: 0;
74
+ cursor: pointer;
75
+ transition: color 0.3s;
76
+ text-rendering: auto;
77
+ }
78
+
79
+
80
+ .@{drawer-prefix-cls}-contain-closable {
81
+ .@{drawer-prefix-cls}-header {
82
+ padding: 12px 36px 12px 20px;
83
+ }
84
+ }
85
+
86
+ &-right {
87
+ .@{drawer-prefix-cls}-content {
88
+ border-radius: @border-radius-base 0px 0px @border-radius-base;
89
+ background: #F8F9FB;
90
+ }
91
+ }
92
+
93
+ &-left {
94
+ .@{drawer-prefix-cls}-content {
95
+ border-radius: 0px @border-radius-base @border-radius-base 0px;
96
+ background: #F8F9FB;
97
+ }
98
+ }
99
+
100
+ &-top {
101
+ .@{drawer-prefix-cls}-content {
102
+ border-radius: 0px 0px @border-radius-base @border-radius-base;
103
+ background: #F8F9FB;
104
+ padding-top: 48px;
105
+ }
106
+
107
+ .@{drawer-prefix-cls}-wrapper-body {
108
+ margin-top: 0px !important;
109
+ }
110
+ }
111
+
112
+ &-bottom {
113
+ .@{drawer-prefix-cls}-content {
114
+ border-radius: @border-radius-base @border-radius-base 0px 0px;
115
+ background: #F8F9FB;
116
+ padding-top: 48px;
117
+ }
118
+
119
+ .@{drawer-prefix-cls}-wrapper-body {
120
+ margin-top: 0px !important;
121
+ }
122
+ }
123
+
124
+
125
+ .@{drawer-prefix-cls}-header {
126
+ padding: 13px 24px;
127
+ border-bottom: none;
128
+ position: absolute;
129
+ right: 0;
130
+ top: 0;
131
+ width: 100%;
132
+ background: #fff;
133
+ }
134
+
135
+ .@{drawer-prefix-cls}-body {
136
+ padding: @padding-lg !important;
137
+
138
+ }
139
+
140
+
141
+ .@{drawer-prefix-cls}-wrapper-body {
142
+
143
+ .@{drawer-prefix-cls}-footer-style {
144
+ position: absolute;
145
+ right: 0;
146
+ bottom: 0;
147
+ width: 100%;
148
+ padding: 8px 24px;
149
+ background: #fff;
150
+ text-align: right;
151
+ }
152
+
153
+ }
154
+ }
@@ -157,7 +157,7 @@
157
157
  padding: 0;
158
158
  color: @text-color-secondary;
159
159
  font-weight: 700;
160
- font-size: 20px;
160
+ font-size: @font-size-lg;
161
161
  font-style: normal;
162
162
  line-height: 56px;
163
163
  text-align: center;
@@ -169,9 +169,7 @@
169
169
  cursor: pointer;
170
170
  transition: color @animation-duration-slow;
171
171
  text-rendering: auto;
172
- .tntd-anticon {
173
- font-size: 20px;
174
- }
172
+
175
173
  &:focus,
176
174
  &:hover {
177
175
  color: @icon-color-hover;
@@ -168,6 +168,10 @@ declare const defaultLocale: {
168
168
  back: string;
169
169
  };
170
170
  ColorPicker: {};
171
+ Drawer: {
172
+ okText: string;
173
+ cancelText: string;
174
+ };
171
175
  };
172
176
  export default defaultLocale;
173
177
  //# sourceMappingURL=default.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/locale/default.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiC,CAAA;AAEpD,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/locale/default.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiC,CAAA;AAEpD,eAAe,aAAa,CAAA"}
@@ -108,6 +108,10 @@ declare const en_US: {
108
108
  back: string;
109
109
  };
110
110
  ColorPicker: {};
111
+ Drawer: {
112
+ okText: string;
113
+ cancelText: string;
114
+ };
111
115
  };
112
116
  export default en_US;
113
117
  //# sourceMappingURL=en_US.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"en_US.d.ts","sourceRoot":"","sources":["../../src/locale/en_US.ts"],"names":[],"mappings":"AAaA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CT,CAAA;AAEF,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"en_US.d.ts","sourceRoot":"","sources":["../../src/locale/en_US.ts"],"names":[],"mappings":"AAaA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CT,CAAA;AAEF,eAAe,KAAK,CAAA"}
@@ -58,6 +58,10 @@ var en_US = (0, _merge2["default"])(_en_US["default"], {
58
58
  TntdSecondPage: {
59
59
  back: 'Back'
60
60
  },
61
- ColorPicker: {}
61
+ ColorPicker: {},
62
+ Drawer: {
63
+ okText: 'Submit',
64
+ cancelText: 'Cancel'
65
+ }
62
66
  });
63
67
  var _default = exports["default"] = en_US;
@@ -1 +1 @@
1
- {"version":3,"file":"en_US.js","sourceRoot":"","sources":["../../src/locale/en_US.ts"],"names":[],"mappings":";;;;;AAAA;;;;;;;GAOG;AACH,iEAA+C;AAE/C,mCAA8B;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,IAAA,cAAK,EAAC,eAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,YAAY;QAChC,gBAAgB,EAAE,SAAS;QAC3B,KAAK,EAAE,4BAA4B;KACpC;IACD,KAAK,EAAE;QACL,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,eAAe;QAC7B,mBAAmB,EAAE,sBAAsB;QAC3C,cAAc,EAAE,iBAAiB;QACjC,SAAS,EAAE,uBAAuB;QAClC,MAAM,EAAE,SAAS;KAClB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,UAAU,EAAE,aAAa;YACzB,EAAE,EAAE,IAAI;YACR,UAAU,EAAE,aAAa;SAC1B;KACF;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;KACb;IACD,SAAS,EAAE;QACT,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,yCAAyC;KACjD;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,SAAS;KAClB;IACD,UAAU,EAAE;QACV,MAAM,EAAE,SAAS;KAClB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;KACb;IACD,WAAW,EAAE,EAAE;CAChB,CAAC,CAAA;AAEF,kBAAe,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-11-01 17:14:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-11-03 17:02:30\n * @FilePath: /tntd/packages/tntd/src/locale/en_US.ts\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport sourceLocale from 'antd/lib/locale/en_US'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst en_US = merge(sourceLocale, {\n Table: {\n loadingDescription: 'loading...',\n emptyDescription: 'No data',\n total: 'Totally ${total} Record(s)',\n },\n Empty: {\n noGraphData: 'No data',\n noPermission: 'No permission',\n createdSuccessfully: 'Created successfully',\n creationFailed: 'Creation failed',\n noNetwork: 'Network not connected',\n noData: 'No data',\n },\n Calendar: {\n lang: {\n timeSelect: 'Select time',\n ok: 'OK',\n dateSelect: 'Select date',\n },\n },\n Handle: {\n more: 'More',\n },\n Exception: {\n '403': \"Sorry, we don't have access to this page\",\n '404': 'Sorry, there are no results on this page',\n '500': \"I'm sorry, the server reported an error\",\n },\n TntdCascader: {\n noData: 'No data',\n },\n TntdSelect: {\n noData: 'No data',\n },\n PageLoading: {\n text: 'loading...',\n },\n TntdSecondPage: {\n back: 'Back',\n },\n ColorPicker: {},\n})\n\nexport default en_US\n"]}
1
+ {"version":3,"file":"en_US.js","sourceRoot":"","sources":["../../src/locale/en_US.ts"],"names":[],"mappings":";;;;;AAAA;;;;;;;GAOG;AACH,iEAA+C;AAE/C,mCAA8B;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,IAAA,cAAK,EAAC,eAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,YAAY;QAChC,gBAAgB,EAAE,SAAS;QAC3B,KAAK,EAAE,4BAA4B;KACpC;IACD,KAAK,EAAE;QACL,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,eAAe;QAC7B,mBAAmB,EAAE,sBAAsB;QAC3C,cAAc,EAAE,iBAAiB;QACjC,SAAS,EAAE,uBAAuB;QAClC,MAAM,EAAE,SAAS;KAClB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,UAAU,EAAE,aAAa;YACzB,EAAE,EAAE,IAAI;YACR,UAAU,EAAE,aAAa;SAC1B;KACF;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;KACb;IACD,SAAS,EAAE;QACT,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,0CAA0C;QACjD,KAAK,EAAE,yCAAyC;KACjD;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,SAAS;KAClB;IACD,UAAU,EAAE;QACV,MAAM,EAAE,SAAS;KAClB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;KACb;IACD,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAA;AAEF,kBAAe,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-11-01 17:14:46\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-11-03 17:02:30\n * @FilePath: /tntd/packages/tntd/src/locale/en_US.ts\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport sourceLocale from 'antd/lib/locale/en_US'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst en_US = merge(sourceLocale, {\n Table: {\n loadingDescription: 'loading...',\n emptyDescription: 'No data',\n total: 'Totally ${total} Record(s)',\n },\n Empty: {\n noGraphData: 'No data',\n noPermission: 'No permission',\n createdSuccessfully: 'Created successfully',\n creationFailed: 'Creation failed',\n noNetwork: 'Network not connected',\n noData: 'No data',\n },\n Calendar: {\n lang: {\n timeSelect: 'Select time',\n ok: 'OK',\n dateSelect: 'Select date',\n },\n },\n Handle: {\n more: 'More',\n },\n Exception: {\n '403': \"Sorry, we don't have access to this page\",\n '404': 'Sorry, there are no results on this page',\n '500': \"I'm sorry, the server reported an error\",\n },\n TntdCascader: {\n noData: 'No data',\n },\n TntdSelect: {\n noData: 'No data',\n },\n PageLoading: {\n text: 'loading...',\n },\n TntdSecondPage: {\n back: 'Back',\n },\n ColorPicker: {},\n Drawer: {\n okText: 'Submit',\n cancelText: 'Cancel',\n },\n})\n\nexport default en_US\n"]}
@@ -100,6 +100,10 @@ declare const zh_CN: {
100
100
  back: string;
101
101
  };
102
102
  ColorPicker: {};
103
+ Drawer: {
104
+ okText: string;
105
+ cancelText: string;
106
+ };
103
107
  };
104
108
  export default zh_CN;
105
109
  //# sourceMappingURL=zh_CN.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zh_CN.d.ts","sourceRoot":"","sources":["../../src/locale/zh_CN.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCT,CAAA;AAEF,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"zh_CN.d.ts","sourceRoot":"","sources":["../../src/locale/zh_CN.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCT,CAAA;AAEF,eAAe,KAAK,CAAA"}
@@ -42,6 +42,10 @@ var zh_CN = (0, _merge2["default"])(_zh_CN["default"], {
42
42
  TntdSecondPage: {
43
43
  back: '返回'
44
44
  },
45
- ColorPicker: {}
45
+ ColorPicker: {},
46
+ Drawer: {
47
+ okText: '确定',
48
+ cancelText: '取消'
49
+ }
46
50
  });
47
51
  var _default = exports["default"] = zh_CN;
@@ -1 +1 @@
1
- {"version":3,"file":"zh_CN.js","sourceRoot":"","sources":["../../src/locale/zh_CN.ts"],"names":[],"mappings":";;;;;AAAA,iEAA+C;AAE/C,mCAA8B;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,IAAA,cAAK,EAAC,eAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,UAAU;QAC9B,gBAAgB,EAAE,MAAM;QACxB,KAAK,EAAE,gBAAgB;KACxB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,MAAM;QACpB,mBAAmB,EAAE,MAAM;QAC3B,cAAc,EAAE,MAAM;QACtB,SAAS,EAAE,OAAO;QAClB,MAAM,EAAE,MAAM;KACf;IACD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI;KACX;IACD,SAAS,EAAE;QACT,KAAK,EAAE,eAAe;QACtB,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,WAAW;KACnB;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM;KACf;IACD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;KACf;IACD,UAAU,EAAE;QACV,MAAM,EAAE,MAAM;KACf;IACD,cAAc,EAAE;QACd,IAAI,EAAE,IAAI;KACX;IACD,WAAW,EAAE,EAAE;CAChB,CAAC,CAAA;AAEF,kBAAe,KAAK,CAAA","sourcesContent":["import sourceLocale from 'antd/lib/locale/zh_CN'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst zh_CN = merge(sourceLocale, {\n Table: {\n loadingDescription: '数据加载中...',\n emptyDescription: '暂无数据',\n total: '共 ${total} 条记录',\n },\n Empty: {\n noGraphData: '暂无图表',\n noPermission: '暂无权限',\n createdSuccessfully: '创建成功',\n creationFailed: '创建失败',\n noNetwork: '网络未连接',\n noData: '暂无数据',\n },\n Handle: {\n more: '更多',\n },\n Exception: {\n '403': '很抱歉,暂无该页面访问权限',\n '404': '很抱歉,本页暂无结果',\n '500': '很抱歉,服务器报错',\n },\n TntdCascader: {\n noData: '暂无数据',\n },\n PageLoading: {\n text: '加载中...',\n },\n TntdSelect: {\n noData: '暂无数据',\n },\n TntdSecondPage: {\n back: '返回',\n },\n ColorPicker: {},\n})\n\nexport default zh_CN\n"]}
1
+ {"version":3,"file":"zh_CN.js","sourceRoot":"","sources":["../../src/locale/zh_CN.ts"],"names":[],"mappings":";;;;;AAAA,iEAA+C;AAE/C,mCAA8B;AAE9B,yCAAyC;AACzC,MAAM,KAAK,GAAG,IAAA,cAAK,EAAC,eAAY,EAAE;IAChC,KAAK,EAAE;QACL,kBAAkB,EAAE,UAAU;QAC9B,gBAAgB,EAAE,MAAM;QACxB,KAAK,EAAE,gBAAgB;KACxB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,MAAM;QACpB,mBAAmB,EAAE,MAAM;QAC3B,cAAc,EAAE,MAAM;QACtB,SAAS,EAAE,OAAO;QAClB,MAAM,EAAE,MAAM;KACf;IACD,MAAM,EAAE;QACN,IAAI,EAAE,IAAI;KACX;IACD,SAAS,EAAE;QACT,KAAK,EAAE,eAAe;QACtB,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,WAAW;KACnB;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM;KACf;IACD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;KACf;IACD,UAAU,EAAE;QACV,MAAM,EAAE,MAAM;KACf;IACD,cAAc,EAAE;QACd,IAAI,EAAE,IAAI;KACX;IACD,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,IAAI;KACjB;CACF,CAAC,CAAA;AAEF,kBAAe,KAAK,CAAA","sourcesContent":["import sourceLocale from 'antd/lib/locale/zh_CN'\n\nimport { merge } from 'lodash'\n\n// 覆盖原始的语言包,以便在使用 LocalReceiver 时获取正确的语言包\nconst zh_CN = merge(sourceLocale, {\n Table: {\n loadingDescription: '数据加载中...',\n emptyDescription: '暂无数据',\n total: '共 ${total} 条记录',\n },\n Empty: {\n noGraphData: '暂无图表',\n noPermission: '暂无权限',\n createdSuccessfully: '创建成功',\n creationFailed: '创建失败',\n noNetwork: '网络未连接',\n noData: '暂无数据',\n },\n Handle: {\n more: '更多',\n },\n Exception: {\n '403': '很抱歉,暂无该页面访问权限',\n '404': '很抱歉,本页暂无结果',\n '500': '很抱歉,服务器报错',\n },\n TntdCascader: {\n noData: '暂无数据',\n },\n PageLoading: {\n text: '加载中...',\n },\n TntdSelect: {\n noData: '暂无数据',\n },\n TntdSecondPage: {\n back: '返回',\n },\n ColorPicker: {},\n Drawer: {\n okText: '确定',\n cancelText: '取消',\n },\n})\n\nexport default zh_CN\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tntd",
3
- "version": "2.8.0-beta.8",
3
+ "version": "2.8.0-beta.9",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "start": "heft start --storybook",
@@ -36,7 +36,7 @@
36
36
  "rc-segmented": "~2.2.2",
37
37
  "rc-field-form": "~1.34.0",
38
38
  "scroll-into-view-if-needed": "^2.2.25",
39
- "@tntd/icons": "^1.0.1",
39
+ "@tntd/icons": "^1.0.5",
40
40
  "@ant-design/colors": "^3.1.0"
41
41
  },
42
42
  "devDependencies": {