tntd 2.8.10 → 2.8.11
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/es/array-input/index.js +10 -3
- package/es/array-input/index.js.map +1 -1
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/es/locale/en_US.js +16 -0
- package/es/locale/en_US.js.map +1 -1
- package/es/locale/zh_CN.js +16 -0
- package/es/locale/zh_CN.js.map +1 -1
- package/es/prev-locale.js +32 -2
- package/es/prev-locale.js.map +1 -1
- package/es/query-list-scene/index.less +4 -0
- package/es/table/index.js +2 -2
- package/es/table/index.js.map +1 -1
- package/es/table/resizableTable/index.js +87 -0
- package/es/table/resizableTable/index.js.map +1 -0
- package/es/table/resizableTable/index.less +36 -0
- package/es/table/table-hoc.js +26 -0
- package/es/table/table-hoc.js.map +1 -0
- package/es/table/table.js +27 -25
- package/es/table/table.js.map +1 -1
- package/es/title/index.less +4 -1
- package/es/tntd-reference/AHref/index.js +39 -0
- package/es/tntd-reference/AHref/index.js.map +1 -0
- package/es/tntd-reference/ReferenceBatchCheck/index.js +153 -0
- package/es/tntd-reference/ReferenceBatchCheck/index.js.map +1 -0
- package/es/tntd-reference/ReferenceBatchCheck/index.less +21 -0
- package/es/tntd-reference/ReferenceBatchDrawer/index.js +102 -0
- package/es/tntd-reference/ReferenceBatchDrawer/index.js.map +1 -0
- package/es/tntd-reference/ReferenceBatchDrawer/index.less +0 -0
- package/es/tntd-reference/ReferenceCheck/index.js +117 -0
- package/es/tntd-reference/ReferenceCheck/index.js.map +1 -0
- package/es/tntd-reference/ReferenceCheck/index.less +10 -0
- package/es/tntd-reference/ReferenceDrawer/index.js +69 -0
- package/es/tntd-reference/ReferenceDrawer/index.js.map +1 -0
- package/es/tntd-reference/ReferenceDrawer/index.less +0 -0
- package/es/tntd-reference/ReferenceInfo/index.js +150 -0
- package/es/tntd-reference/ReferenceInfo/index.js.map +1 -0
- package/es/tntd-reference/ReferenceInfo/index.less +31 -0
- package/es/tntd-reference/index.js +13 -0
- package/es/tntd-reference/index.js.map +1 -0
- package/es/tntd-virtual-tree/index.js +14 -3
- package/es/tntd-virtual-tree/index.js.map +1 -1
- package/es/tntd-virtual-tree/index.less +2 -42
- package/es/tntd-virtual-tree-select/index.js +95 -21
- package/es/tntd-virtual-tree-select/index.js.map +1 -1
- package/es/tntd-virtual-tree-select/utils.js +20 -124
- package/es/tntd-virtual-tree-select/utils.js.map +1 -1
- package/lib/array-input/index.d.ts.map +1 -1
- package/lib/array-input/index.js +13 -4
- package/lib/array-input/index.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -1
- package/lib/locale/default.d.ts +16 -0
- package/lib/locale/default.d.ts.map +1 -1
- package/lib/locale/en_US.d.ts +16 -0
- package/lib/locale/en_US.d.ts.map +1 -1
- package/lib/locale/en_US.js +16 -0
- package/lib/locale/en_US.js.map +1 -1
- package/lib/locale/zh_CN.d.ts +16 -0
- package/lib/locale/zh_CN.d.ts.map +1 -1
- package/lib/locale/zh_CN.js +16 -0
- package/lib/locale/zh_CN.js.map +1 -1
- package/lib/prev-locale.d.ts +42 -0
- package/lib/prev-locale.d.ts.map +1 -1
- package/lib/prev-locale.js +32 -2
- package/lib/prev-locale.js.map +1 -1
- package/lib/query-list-scene/index.less +4 -0
- package/lib/segmented/index.d.ts +1 -1
- package/lib/table/index.d.ts +2 -2
- package/lib/table/index.d.ts.map +1 -1
- package/lib/table/index.js +7 -7
- package/lib/table/index.js.map +1 -1
- package/lib/table/resizableTable/index.d.ts +12 -0
- package/lib/table/resizableTable/index.d.ts.map +1 -0
- package/lib/table/resizableTable/index.js +110 -0
- package/lib/table/resizableTable/index.js.map +1 -0
- package/lib/table/resizableTable/index.less +36 -0
- package/lib/table/table-hoc.d.ts +7 -0
- package/lib/table/table-hoc.d.ts.map +1 -0
- package/lib/{spin/spin.js → table/table-hoc.js} +12 -22
- package/lib/table/table-hoc.js.map +1 -0
- package/lib/table/table.js +18 -15
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.stories.d.ts +1 -1
- package/lib/title/index.less +4 -1
- package/lib/tntd-reference/AHref/index.d.ts +4 -0
- package/lib/tntd-reference/AHref/index.d.ts.map +1 -0
- package/lib/tntd-reference/AHref/index.js +44 -0
- package/lib/tntd-reference/AHref/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.d.ts +3 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.js +165 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.less +21 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.d.ts +4 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.js +126 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.less +0 -0
- package/lib/tntd-reference/ReferenceCheck/index.d.ts +3 -0
- package/lib/tntd-reference/ReferenceCheck/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceCheck/index.js +126 -0
- package/lib/tntd-reference/ReferenceCheck/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceCheck/index.less +10 -0
- package/lib/tntd-reference/ReferenceDrawer/index.d.ts +4 -0
- package/lib/tntd-reference/ReferenceDrawer/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceDrawer/index.js +93 -0
- package/lib/tntd-reference/ReferenceDrawer/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceDrawer/index.less +0 -0
- package/lib/tntd-reference/ReferenceInfo/index.d.ts +4 -0
- package/lib/tntd-reference/ReferenceInfo/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceInfo/index.js +164 -0
- package/lib/tntd-reference/ReferenceInfo/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceInfo/index.less +31 -0
- package/lib/tntd-reference/index.d.ts +15 -0
- package/lib/tntd-reference/index.d.ts.map +1 -0
- package/lib/tntd-reference/index.js +20 -0
- package/lib/tntd-reference/index.js.map +1 -0
- package/lib/tntd-virtual-tree/index.d.ts +3 -1
- package/lib/tntd-virtual-tree/index.d.ts.map +1 -1
- package/lib/tntd-virtual-tree/index.js +15 -4
- package/lib/tntd-virtual-tree/index.js.map +1 -1
- package/lib/tntd-virtual-tree/index.less +2 -42
- package/lib/tntd-virtual-tree-select/index.d.ts +12 -4
- package/lib/tntd-virtual-tree-select/index.d.ts.map +1 -1
- package/lib/tntd-virtual-tree-select/index.js +96 -17
- package/lib/tntd-virtual-tree-select/index.js.map +1 -1
- package/lib/tntd-virtual-tree-select/utils.d.ts +2 -9
- package/lib/tntd-virtual-tree-select/utils.d.ts.map +1 -1
- package/lib/tntd-virtual-tree-select/utils.js +23 -142
- package/lib/tntd-virtual-tree-select/utils.js.map +1 -1
- package/package.json +4 -2
- package/es/spin/spin.js +0 -36
- package/es/spin/spin.js.map +0 -1
- package/es/spin/spin.less +0 -9
- package/es/tntd-virtual-tree-select/VirtualTree.js +0 -125
- package/es/tntd-virtual-tree-select/VirtualTree.js.map +0 -1
- package/es/tntd-virtual-tree-select/tree.less +0 -29
- package/lib/spin/spin.d.ts +0 -9
- package/lib/spin/spin.d.ts.map +0 -1
- package/lib/spin/spin.js.map +0 -1
- package/lib/spin/spin.less +0 -9
- package/lib/tntd-virtual-tree-select/VirtualTree.d.ts +0 -13
- package/lib/tntd-virtual-tree-select/VirtualTree.d.ts.map +0 -1
- package/lib/tntd-virtual-tree-select/VirtualTree.js +0 -155
- package/lib/tntd-virtual-tree-select/VirtualTree.js.map +0 -1
- package/lib/tntd-virtual-tree-select/tree.less +0 -29
package/lib/locale/zh_CN.js.map
CHANGED
|
@@ -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;IACf,MAAM,EAAE;QACN,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,IAAI;KACjB;IACD,UAAU,EAAE;QACV,GAAG,EAAE,IAAI;QACT,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,0BAA0B;KAClC;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 ArrayInput: {\n add: '添加',\n action: '操作',\n error: 'ArrayInput的children必须是函数',\n },\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;IACD,UAAU,EAAE;QACV,GAAG,EAAE,IAAI;QACT,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,0BAA0B;KAClC;IACD,aAAa,EAAE;QACb,UAAU,EAAE,QAAQ;QACpB,OAAO,EACL,qDAAqD;QACvD,SAAS,EACP,4CAA4C;QAC9C,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,KAAK;QACX,YAAY,EAAE,UAAU;QACxB,aAAa,EAAE,cAAc;QAC7B,aAAa,EAAE,UAAU;QACzB,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE,MAAM;QACd,aAAa,EAAE,QAAQ;KACxB;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 ArrayInput: {\n add: '添加',\n action: '操作',\n error: 'ArrayInput的children必须是函数',\n },\n TntdReference: {\n onLineFail: '上线校验失败',\n weakMsg:\n '存在弱引用(被下线、禁用、待提交/上线、导入待提交/上线、暂存、保存等相关状态组件引用)关系,谨慎操作',\n strongMsg:\n '存在强引用(被上线、启用、上下线审批中和指标初始化等相关状态组件引用)关系,禁止操作',\n cancel: '取消',\n next: '下一步',\n exist: '存在',\n strong: '强引用',\n weak: '弱引用',\n relationFail: '查询关联关系失败',\n reliableQuery: '请提供一个可靠的查询请求',\n referenceFail: '查询引用关系失败',\n inQuery: '查询中...',\n noData: '暂无数据',\n viewReference: '引用关系查看',\n },\n})\n\nexport default zh_CN\n"]}
|
package/lib/prev-locale.d.ts
CHANGED
|
@@ -14,6 +14,20 @@ export namespace zh_CN {
|
|
|
14
14
|
const handleMore: string;
|
|
15
15
|
const enter: string;
|
|
16
16
|
const select: string;
|
|
17
|
+
const onLineFail: string;
|
|
18
|
+
const weakMsg: string;
|
|
19
|
+
const strongMsg: string;
|
|
20
|
+
const cancel: string;
|
|
21
|
+
const next: string;
|
|
22
|
+
const exist: string;
|
|
23
|
+
const strong: string;
|
|
24
|
+
const weak: string;
|
|
25
|
+
const relationFail: string;
|
|
26
|
+
const reliableQuery: string;
|
|
27
|
+
const referenceFail: string;
|
|
28
|
+
const inQuery: string;
|
|
29
|
+
const noData: string;
|
|
30
|
+
const viewReference: string;
|
|
17
31
|
}
|
|
18
32
|
export namespace en_US {
|
|
19
33
|
const globalNavigation_1: string;
|
|
@@ -46,6 +60,34 @@ export namespace en_US {
|
|
|
46
60
|
export { enter_1 as enter };
|
|
47
61
|
const select_1: string;
|
|
48
62
|
export { select_1 as select };
|
|
63
|
+
const onLineFail_1: string;
|
|
64
|
+
export { onLineFail_1 as onLineFail };
|
|
65
|
+
const weakMsg_1: string;
|
|
66
|
+
export { weakMsg_1 as weakMsg };
|
|
67
|
+
const strongMsg_1: string;
|
|
68
|
+
export { strongMsg_1 as strongMsg };
|
|
69
|
+
const cancel_1: string;
|
|
70
|
+
export { cancel_1 as cancel };
|
|
71
|
+
const next_1: string;
|
|
72
|
+
export { next_1 as next };
|
|
73
|
+
const exist_1: string;
|
|
74
|
+
export { exist_1 as exist };
|
|
75
|
+
const strong_1: string;
|
|
76
|
+
export { strong_1 as strong };
|
|
77
|
+
const weak_1: string;
|
|
78
|
+
export { weak_1 as weak };
|
|
79
|
+
const relationFail_1: string;
|
|
80
|
+
export { relationFail_1 as relationFail };
|
|
81
|
+
const reliableQuery_1: string;
|
|
82
|
+
export { reliableQuery_1 as reliableQuery };
|
|
83
|
+
const referenceFail_1: string;
|
|
84
|
+
export { referenceFail_1 as referenceFail };
|
|
85
|
+
const inQuery_1: string;
|
|
86
|
+
export { inQuery_1 as inQuery };
|
|
87
|
+
const noData_1: string;
|
|
88
|
+
export { noData_1 as noData };
|
|
89
|
+
const viewReference_1: string;
|
|
90
|
+
export { viewReference_1 as viewReference };
|
|
49
91
|
}
|
|
50
92
|
export function getText(key: any, language?: string, ...params: any[]): any;
|
|
51
93
|
export function getLanguage(): any;
|
package/lib/prev-locale.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prev-locale.d.ts","sourceRoot":"","sources":["../src/prev-locale.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prev-locale.d.ts","sourceRoot":"","sources":["../src/prev-locale.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGO,4EAaN;AAEM,mCAAmD"}
|
package/lib/prev-locale.js
CHANGED
|
@@ -26,7 +26,22 @@ var zh_CN = exports.zh_CN = {
|
|
|
26
26
|
// Enter
|
|
27
27
|
enter: '请输入',
|
|
28
28
|
// Select
|
|
29
|
-
select: '请选择'
|
|
29
|
+
select: '请选择',
|
|
30
|
+
// Reference
|
|
31
|
+
onLineFail: '上线校验失败',
|
|
32
|
+
weakMsg: '存在弱引用(被下线、禁用、待提交/上线、导入待提交/上线、暂存、保存等相关状态组件引用)关系,谨慎操作',
|
|
33
|
+
strongMsg: '存在强引用(被上线、启用、上下线审批中和指标初始化等相关状态组件引用)关系,禁止操作',
|
|
34
|
+
cancel: '取消',
|
|
35
|
+
next: '下一步',
|
|
36
|
+
exist: '存在',
|
|
37
|
+
strong: '强引用',
|
|
38
|
+
weak: '弱引用',
|
|
39
|
+
relationFail: '查询关联关系失败',
|
|
40
|
+
reliableQuery: '请提供一个可靠的查询请求',
|
|
41
|
+
referenceFail: '查询引用关系失败',
|
|
42
|
+
inQuery: '查询中...',
|
|
43
|
+
noData: '暂无数据',
|
|
44
|
+
viewReference: '引用关系查看'
|
|
30
45
|
};
|
|
31
46
|
var en_US = exports.en_US = {
|
|
32
47
|
globalNavigation: 'Global Navigation',
|
|
@@ -49,7 +64,22 @@ var en_US = exports.en_US = {
|
|
|
49
64
|
// Enter
|
|
50
65
|
enter: 'Enter',
|
|
51
66
|
// Select
|
|
52
|
-
select: 'Select'
|
|
67
|
+
select: 'Select',
|
|
68
|
+
// Reference
|
|
69
|
+
onLineFail: 'On-line verification failure',
|
|
70
|
+
weakMsg: 'Caution When performing this operation, weak references exist for status components, such as offline, disabled, to be submitted/online, Import to be submitted/online, temporary, and save',
|
|
71
|
+
strongMsg: 'A strong reference relationship exists (referenced by status components such as online, enabled, online and offline approval, and indicator initialization). Therefore, no operation is allowed',
|
|
72
|
+
cancel: 'Cancel',
|
|
73
|
+
next: 'Next',
|
|
74
|
+
exist: 'Exist',
|
|
75
|
+
strong: 'Strong',
|
|
76
|
+
weak: 'Weak',
|
|
77
|
+
relationFail: 'Description Failed to query the association relationship',
|
|
78
|
+
reliableQuery: 'Please provide a reliable query request',
|
|
79
|
+
referenceFail: 'Description Failed to query the reference relationship',
|
|
80
|
+
inQuery: 'In query...',
|
|
81
|
+
noData: 'No data',
|
|
82
|
+
viewReference: 'Reference relationship viewing'
|
|
53
83
|
};
|
|
54
84
|
var getText = exports.getText = function getText(key) {
|
|
55
85
|
var language = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'cn';
|
package/lib/prev-locale.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prev-locale.js","sourceRoot":"","sources":["../src/prev-locale.js"],"names":[],"mappings":";;;AAAA,mDAAyD;AAE5C,QAAA,KAAK,GAAG;IACnB,gBAAgB,EAAE,MAAM;IACxB,UAAU,EAAE,MAAM;IAElB,YAAY;IACZ,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IAEd,iBAAiB;IACjB,YAAY,EAAE,QAAQ;IAEtB,eAAe;IACf,QAAQ,EAAE,MAAM;IAChB,gBAAgB,EAAE,MAAM;IACxB,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,IAAI;IAEb,SAAS;IACT,UAAU,EAAC,IAAI;IAEf,QAAQ;IACR,KAAK,EAAE,KAAK;IAEZ,SAAS;IACT,MAAM,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"prev-locale.js","sourceRoot":"","sources":["../src/prev-locale.js"],"names":[],"mappings":"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","sourcesContent":["import { getLanguageStore } from './tntd-layout/storage';\n\nexport const zh_CN = {\n globalNavigation: '全局导航',\n menuSearch: '菜单搜索',\n\n // QueryForm\n search: '搜索',\n reset: '重置',\n moreFiltering: '更多过滤',\n expand: '展开',\n collapse: '收起',\n\n // QueryListScene\n totalRecords: '共%s条记录',\n\n // user popover\n nameNull: '暂无昵称',\n personalSettings: '个人设置',\n changePwd: '修改密码',\n signOut: '退出',\n\n // Handle\n handleMore:'更多',\n\n // Enter\n enter: '请输入',\n\n // Select\n select: '请选择',\n\n\n // Reference\n onLineFail: '上线校验失败',\n weakMsg:\n '存在弱引用(被下线、禁用、待提交/上线、导入待提交/上线、暂存、保存等相关状态组件引用)关系,谨慎操作',\n strongMsg: '存在强引用(被上线、启用、上下线审批中和指标初始化等相关状态组件引用)关系,禁止操作',\n cancel: '取消',\n next: '下一步',\n exist: '存在',\n strong: '强引用',\n weak: '弱引用',\n relationFail: '查询关联关系失败',\n reliableQuery: '请提供一个可靠的查询请求',\n referenceFail: '查询引用关系失败',\n inQuery: '查询中...',\n noData: '暂无数据',\n viewReference: '引用关系查看',\n\n}\n\nexport const en_US = {\n globalNavigation: 'Global Navigation',\n menuSearch: 'Menu Search',\n\n\n // QueryForm\n search: 'Search',\n reset: 'Reset',\n moreFiltering: 'More filtering',\n expand: 'Expand',\n collapse: 'Collapse',\n\n // QueryListScene\n totalRecords: 'Totally %s Record(s)',\n\n // user popover\n nameNull: 'No nickname yet',\n personalSettings: 'Setting',\n changePwd: 'Change password',\n signOut: 'Sign out',\n\n // Handle\n handleMore:'More',\n\n // Enter\n enter: 'Enter',\n // Select\n select: 'Select',\n\n\n // Reference\n onLineFail: 'On-line verification failure',\n weakMsg:\n 'Caution When performing this operation, weak references exist for status components, such as offline, disabled, to be submitted/online, Import to be submitted/online, temporary, and save',\n strongMsg:\n 'A strong reference relationship exists (referenced by status components such as online, enabled, online and offline approval, and indicator initialization). Therefore, no operation is allowed',\n cancel: 'Cancel',\n next: 'Next',\n exist: 'Exist',\n strong: 'Strong',\n weak: 'Weak',\n relationFail: 'Description Failed to query the association relationship',\n reliableQuery: 'Please provide a reliable query request',\n referenceFail: 'Description Failed to query the reference relationship',\n inQuery: 'In query...',\n noData: 'No data',\n viewReference: 'Reference relationship viewing',\n}\n\nexport const getText = (key, language = 'cn', ...params) => {\n const text = ({\n cn: zh_CN,\n en: en_US,\n }[language] || zh_CN)?.[key]\n\n if (params?.length) {\n return params.reduce((acc, cur) => {\n return acc.replace(/%s/, cur)\n }, text)\n }\n\n return text\n}\n\nexport const getLanguage = () => getLanguageStore()|| 'cn'\n\nexport default { en_US, zh_CN }\n"]}
|
package/lib/segmented/index.d.ts
CHANGED
|
@@ -18,6 +18,6 @@ export interface SegmentedProps extends Omit<RCSegmentedProps, 'size' | 'options
|
|
|
18
18
|
block?: boolean;
|
|
19
19
|
size?: SizeType;
|
|
20
20
|
}
|
|
21
|
-
declare const Segmented: React.ForwardRefExoticComponent<Pick<SegmentedProps, "children" | "target" | "lang" | "about" | "as" | "type" | "onClick" | "download" | "href" | "hrefLang" | "media" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "list" | "step" | "shape" | "size" | "prefixCls" | "block" | "default" | "cite" | "data" | "label" | "span" | "summary" | "pattern" | "key" | "width" | "height" | "src" | "max" | "method" | "min" | "crossOrigin" | "direction" | "checked" | "open" | "options" | "multiple" | "wrap" | "start" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "motionName" | "htmlFor" | "required" | "classID" | "accept" | "alt" | "capture" | "maxLength" | "minLength" | "readOnly" | "cols" | "rows" | "headers" | "allowFullScreen" | "allowTransparency" | "async" | "autoPlay" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "
|
|
21
|
+
declare const Segmented: React.ForwardRefExoticComponent<Pick<SegmentedProps, "children" | "target" | "lang" | "about" | "as" | "type" | "onClick" | "download" | "href" | "hrefLang" | "media" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "list" | "step" | "shape" | "size" | "prefixCls" | "block" | "default" | "cite" | "data" | "label" | "span" | "summary" | "pattern" | "key" | "width" | "height" | "src" | "max" | "method" | "min" | "crossOrigin" | "direction" | "checked" | "open" | "options" | "multiple" | "wrap" | "start" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "motionName" | "htmlFor" | "required" | "classID" | "accept" | "alt" | "capture" | "maxLength" | "minLength" | "readOnly" | "cols" | "rows" | "colSpan" | "headers" | "allowFullScreen" | "allowTransparency" | "async" | "autoPlay" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "controls" | "coords" | "dateTime" | "defer" | "frameBorder" | "high" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "mediaGroup" | "muted" | "optimum" | "playsInline" | "poster" | "preload" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "sizes" | "srcDoc" | "srcLang" | "srcSet" | "useMap" | "wmode" | "rootClassName"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
22
|
export default Segmented;
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/table/index.d.ts
CHANGED
package/lib/table/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,cAAc,CAAA;AACrB,OAAO,eAAe,CAAA;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAEnC,cAAc,aAAa,CAAA;AAE3B,eAAe,KAAK,CAAA"}
|
package/lib/table/index.js
CHANGED
|
@@ -6,18 +6,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _exportNames = {};
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
require("./style");
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
require("./table.less");
|
|
10
|
+
require("./expand.less");
|
|
11
|
+
var _tableHoc = require("./table-hoc");
|
|
12
|
+
Object.keys(_tableHoc).forEach(function (key) {
|
|
11
13
|
if (key === "default" || key === "__esModule") return;
|
|
12
14
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
13
|
-
if (key in exports && exports[key] ===
|
|
15
|
+
if (key in exports && exports[key] === _tableHoc[key]) return;
|
|
14
16
|
Object.defineProperty(exports, key, {
|
|
15
17
|
enumerable: true,
|
|
16
18
|
get: function get() {
|
|
17
|
-
return
|
|
19
|
+
return _tableHoc[key];
|
|
18
20
|
}
|
|
19
21
|
});
|
|
20
22
|
});
|
|
21
|
-
|
|
22
|
-
require("./expand.less");
|
|
23
|
-
var _default = exports["default"] = _table.Table;
|
|
23
|
+
var _default = exports["default"] = _tableHoc.Table;
|
package/lib/table/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/table/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mBAAgB;AAChB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/table/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mBAAgB;AAChB,wBAAqB;AACrB,yBAAsB;AACtB,2CAAmC;AAEnC,8CAA2B;AAE3B,kBAAe,iBAAK,CAAA","sourcesContent":["import './style'\nimport './table.less'\nimport './expand.less'\nimport { Table } from './table-hoc'\n\nexport * from './table-hoc'\n\nexport default Table\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ColumnType {
|
|
4
|
+
width?: any;
|
|
5
|
+
}
|
|
6
|
+
interface MyComponentProps {
|
|
7
|
+
columns: ColumnType[];
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: React.ForwardRefExoticComponent<MyComponentProps & React.RefAttributes<any>>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/table/resizableTable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAA;AAKtE,OAAO,cAAc,CAAA;AAkCrB,UAAU,UAAU;IAClB,KAAK,CAAC,EAAE,GAAG,CAAA;CACZ;AAED,UAAU,gBAAgB;IACxB,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;;AAoDD,wBAAsC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _throttle2 = _interopRequireDefault(require("lodash/throttle"));
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _reactResizable = require("react-resizable");
|
|
12
|
+
var _table = require("../table");
|
|
13
|
+
require("./index.less");
|
|
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; }
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
22
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
23
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
25
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
27
|
+
var t = {};
|
|
28
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
30
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
31
|
+
}
|
|
32
|
+
return t;
|
|
33
|
+
};
|
|
34
|
+
var ResizableTitle = function ResizableTitle(props) {
|
|
35
|
+
var onResize = props.onResize,
|
|
36
|
+
width = props.width,
|
|
37
|
+
restProps = __rest(props, ["onResize", "width"]);
|
|
38
|
+
if (!width) {
|
|
39
|
+
return _react["default"].createElement("th", Object.assign({}, restProps));
|
|
40
|
+
}
|
|
41
|
+
return _react["default"].createElement(_reactResizable.Resizable, {
|
|
42
|
+
width: width,
|
|
43
|
+
height: 0,
|
|
44
|
+
handle: _react["default"].createElement("span", {
|
|
45
|
+
className: "react-resizable-handle",
|
|
46
|
+
onClick: function onClick(e) {
|
|
47
|
+
e.stopPropagation();
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
onResize: onResize,
|
|
51
|
+
draggableOpts: {
|
|
52
|
+
enableUserSelectHack: false
|
|
53
|
+
}
|
|
54
|
+
}, _react["default"].createElement("th", Object.assign({}, restProps)));
|
|
55
|
+
};
|
|
56
|
+
var MyComponent = function MyComponent(props, ref) {
|
|
57
|
+
var _useState = (0, _react.useState)([]),
|
|
58
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
+
columns = _useState2[0],
|
|
60
|
+
setColumns = _useState2[1];
|
|
61
|
+
var dataRef = (0, _react.useRef)([]);
|
|
62
|
+
var handleResize = function handleResize(index) {
|
|
63
|
+
return (0, _throttle2["default"])(function (e, _ref) {
|
|
64
|
+
var size = _ref.size;
|
|
65
|
+
var updatedColumns = dataRef.current || [];
|
|
66
|
+
setColumns(updatedColumns.map(function (column, idx) {
|
|
67
|
+
return idx === index ? Object.assign(Object.assign({}, column), {
|
|
68
|
+
width: size.width
|
|
69
|
+
}) : column;
|
|
70
|
+
}));
|
|
71
|
+
}, 25);
|
|
72
|
+
};
|
|
73
|
+
var buildColumns = function buildColumns(columns) {
|
|
74
|
+
return columns === null || columns === void 0 ? void 0 : columns.map(function (column, index) {
|
|
75
|
+
var _a;
|
|
76
|
+
if (typeof (column === null || column === void 0 ? void 0 : column.width) === 'string' && ((_a = column === null || column === void 0 ? void 0 : column.width) === null || _a === void 0 ? void 0 : _a.includes('%'))) {
|
|
77
|
+
return column;
|
|
78
|
+
}
|
|
79
|
+
return Object.assign(Object.assign({}, column), {
|
|
80
|
+
onHeaderCell: function onHeaderCell(column) {
|
|
81
|
+
var width = column.width;
|
|
82
|
+
if (typeof width === 'string' && !width.includes('%')) {
|
|
83
|
+
width = Number(width.replace(/[^\d]/g, ''));
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
width: width,
|
|
87
|
+
onResize: handleResize(index)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
(0, _react.useEffect)(function () {
|
|
94
|
+
var curColumns = buildColumns(props.columns);
|
|
95
|
+
setColumns(curColumns || []);
|
|
96
|
+
}, [props === null || props === void 0 ? void 0 : props.columns]);
|
|
97
|
+
(0, _react.useEffect)(function () {
|
|
98
|
+
dataRef.current = columns;
|
|
99
|
+
}, [columns]);
|
|
100
|
+
return _react["default"].createElement(_table.Table, Object.assign({}, props, {
|
|
101
|
+
className: (0, _classnames["default"])('tnt-resizable-table', _defineProperty({}, props.className, props.className)),
|
|
102
|
+
components: {
|
|
103
|
+
header: {
|
|
104
|
+
cell: ResizableTitle
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
columns: columns
|
|
108
|
+
}));
|
|
109
|
+
};
|
|
110
|
+
var _default = exports["default"] = (0, _react.forwardRef)(MyComponent);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/table/resizableTable/index.tsx"],"names":[],"mappings":"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","sourcesContent":["import React, { useState, forwardRef, useRef, useEffect } from 'react'\nimport cn from 'classnames'\nimport { throttle } from 'lodash'\nimport { Resizable } from 'react-resizable'\nimport { Table } from '../table'\nimport './index.less'\n\nconst ResizableTitle = (\n props: React.HTMLAttributes<any> & {\n onResize: (e: React.SyntheticEvent<Element>, data: any) => void\n width: number\n }\n) => {\n const { onResize, width, ...restProps } = props\n\n if (!width) {\n return <th {...restProps} />\n }\n\n return (\n <Resizable\n width={width}\n height={0}\n handle={\n <span\n className=\"react-resizable-handle\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n />\n }\n onResize={onResize}\n draggableOpts={{ enableUserSelectHack: false }}\n >\n <th {...restProps} />\n </Resizable>\n )\n}\n\ninterface ColumnType {\n width?: any\n}\n\ninterface MyComponentProps {\n columns: ColumnType[]\n className?: string\n}\n\nconst MyComponent: React.ForwardRefRenderFunction<any, MyComponentProps> = (props, ref) => {\n const [columns, setColumns] = useState<ColumnType[]>([])\n const dataRef = useRef<ColumnType[]>([])\n\n const handleResize = (index: number) =>\n throttle((e, { size }) => {\n const updatedColumns = dataRef.current || []\n setColumns(\n updatedColumns.map((column, idx) =>\n idx === index ? { ...column, width: size.width } : column\n )\n )\n }, 25)\n\n const buildColumns = (columns: ColumnType[]) =>\n columns?.map((column, index) => {\n if (typeof column?.width === 'string' && column?.width?.includes('%')) {\n return column\n }\n return {\n ...column,\n onHeaderCell: (column: ColumnType) => {\n let width = column.width\n if (typeof width === 'string' && !width.includes('%')) {\n width = Number(width.replace(/[^\\d]/g, ''))\n }\n return { width, onResize: handleResize(index) }\n },\n }\n })\n\n useEffect(() => {\n const curColumns = buildColumns(props.columns)\n setColumns(curColumns || [])\n }, [props?.columns])\n\n useEffect(() => {\n dataRef.current = columns\n }, [columns])\n\n return (\n <Table\n {...props}\n className={cn('tnt-resizable-table', { [props.className!]: props.className })}\n components={{ header: { cell: ResizableTitle } }}\n columns={columns}\n />\n )\n}\n\nexport default forwardRef(MyComponent)\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.tnt-resizable-table {
|
|
2
|
+
.react-resizable {
|
|
3
|
+
position: relative;
|
|
4
|
+
background-clip: padding-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
&-handle {
|
|
8
|
+
position: absolute;
|
|
9
|
+
width: 10px;
|
|
10
|
+
height: 100%;
|
|
11
|
+
bottom: 0;
|
|
12
|
+
right: -5px;
|
|
13
|
+
cursor: col-resize;
|
|
14
|
+
z-index: 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
th:last-of-type{
|
|
18
|
+
.react-resizable-handle {
|
|
19
|
+
right: 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
// tbody > tr > td > *,
|
|
23
|
+
.ant-table-column-title{
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
text-overflow: ellipsis;
|
|
27
|
+
}
|
|
28
|
+
.ant-table-column-sorters {
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
max-width: 100%;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
text-overflow: ellipsis;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
align-items: center;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TableProps as AntdTableProps } from 'antd/lib/table';
|
|
3
|
+
declare const Table: React.ForwardRefExoticComponent<Omit<AntdTableProps<any>, "locale"> & {
|
|
4
|
+
resizable?: boolean | undefined;
|
|
5
|
+
} & React.RefAttributes<unknown>>;
|
|
6
|
+
export { Table };
|
|
7
|
+
//# sourceMappingURL=table-hoc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-hoc.d.ts","sourceRoot":"","sources":["../../src/table/table-hoc.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,eAAe,CAAA;AAQjE,QAAA,MAAM,KAAK;;iCAQT,CAAA;AAEF,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -4,23 +4,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.Table = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
-
require("./spin.less");
|
|
9
|
+
var _table = require("./table");
|
|
10
|
+
var _index = _interopRequireDefault(require("./resizableTable/index"));
|
|
13
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
12
|
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
13
|
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; }
|
|
16
|
-
/*
|
|
17
|
-
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
18
|
-
* @Date: 2024-07-19 18:49:24
|
|
19
|
-
* @LastEditors: 周泽飞 zefei.zhou@tongdun.net
|
|
20
|
-
* @LastEditTime: 2024-07-19 18:54:42
|
|
21
|
-
* @FilePath: /tntd/packages/tntd/src/spin/spin.tsx
|
|
22
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
23
|
-
*/
|
|
24
14
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
25
15
|
var t = {};
|
|
26
16
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -29,16 +19,16 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
29
19
|
}
|
|
30
20
|
return t;
|
|
31
21
|
};
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
restProps = __rest(props, ["
|
|
36
|
-
|
|
37
|
-
return _react["default"].createElement(
|
|
38
|
-
|
|
39
|
-
className: (0, _classnames["default"])('tnt-spin', className || '')
|
|
22
|
+
var Table = exports.Table = (0, _react.forwardRef)(function (props, ref) {
|
|
23
|
+
var _props$resizable = props.resizable,
|
|
24
|
+
resizable = _props$resizable === void 0 ? false : _props$resizable,
|
|
25
|
+
restProps = __rest(props, ["resizable"]);
|
|
26
|
+
if (resizable) {
|
|
27
|
+
return _react["default"].createElement(_index["default"], Object.assign({
|
|
28
|
+
columns: []
|
|
40
29
|
}, restProps, {
|
|
41
30
|
ref: ref
|
|
42
31
|
}));
|
|
43
|
-
}
|
|
32
|
+
}
|
|
33
|
+
return _react["default"].createElement(_table.Table, Object.assign({}, restProps));
|
|
44
34
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-hoc.js","sourceRoot":"","sources":["../../src/table/table-hoc.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AAEzC,mCAA4C;AAC5C,mEAAmD;AAMnD,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,CAAC,KAA4B,EAAE,GAAQ,EAAE,EAAE;IAClE,MAAM,EAAE,SAAS,GAAG,KAAK,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAA3C,aAAmC,CAAQ,CAAA;IAEjD,IAAI,SAAS,EAAE;QACb,OAAO,8BAAC,eAAc,kBAAC,OAAO,EAAE,EAAE,IAAM,SAAS,IAAE,GAAG,EAAE,GAAG,IAAI,CAAA;KAChE;IAED,OAAO,8BAAC,aAAS,oBAAK,SAAS,EAAI,CAAA;AACrC,CAAC,CAAC,CAAA;AAEO,sBAAK","sourcesContent":["import React, { forwardRef } from 'react'\nimport type { TableProps as AntdTableProps } from 'antd/lib/table'\nimport { Table as AntdTable } from './table'\nimport ResizableTable from './resizableTable/index'\n\ntype CustomTableProps<T> = Omit<AntdTableProps<T>, 'locale'> & {\n resizable?: boolean\n}\n\nconst Table = forwardRef((props: CustomTableProps<any>, ref: any) => {\n const { resizable = false, ...restProps } = props\n\n if (resizable) {\n return <ResizableTable columns={[]} {...restProps} ref={ref} />\n }\n\n return <AntdTable {...restProps} />\n})\n\nexport { Table }\n"]}
|
package/lib/table/table.js
CHANGED
|
@@ -19,7 +19,7 @@ var _utils = require("./utils");
|
|
|
19
19
|
var _lang = require("../utils/lang");
|
|
20
20
|
var _totalShower = require("./total-shower");
|
|
21
21
|
var _prevLocale = require("../prev-locale");
|
|
22
|
-
|
|
22
|
+
require("rc-resize-observer");
|
|
23
23
|
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); }
|
|
24
24
|
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; }
|
|
25
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -234,20 +234,23 @@ var Table = exports.Table = function Table(_a) {
|
|
|
234
234
|
}, function (localeObject) {
|
|
235
235
|
// const locale = localeObject as Record<string, string>
|
|
236
236
|
// const paginationConfig = pagination ? getDefaultPagination(locale) : pagination
|
|
237
|
-
return
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
237
|
+
return (
|
|
238
|
+
// <ResizeObserver
|
|
239
|
+
// onResize={({ width }) => {
|
|
240
|
+
// setFixedWidth(width)
|
|
241
|
+
// }}
|
|
242
|
+
// >
|
|
243
|
+
_react["default"].createElement(_table["default"], Object.assign({
|
|
244
|
+
className: (0, _classnames["default"])(
|
|
245
|
+
// prefixCls,
|
|
246
|
+
'tnt-table-wrapper', "".concat(tableKey, " collapse-panel"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-borderless"), !bordered), "".concat(prefixCls, "-hide-cell-borders"), !showCellBorders), "".concat(prefixCls, "-size-small"), size === 'small'), "".concat(prefixCls, "-size-middle"), size === 'middle'), "".concat(prefixCls, "-striped"), striped), "".concat(prefixCls, "-shadowed"), shadowed), "".concat(prefixCls, "-small-padding"), smallPadding), "".concat(prefixCls, "-sticky"), sticky), className),
|
|
247
|
+
locale: locale,
|
|
248
|
+
bordered: bordered,
|
|
249
|
+
size: size,
|
|
250
|
+
columns: newColumns
|
|
251
|
+
}, rest, sticky ? stickyProps : {}))
|
|
252
|
+
// </ResizeObserver>
|
|
253
|
+
);
|
|
251
254
|
}));
|
|
252
255
|
}));
|
|
253
256
|
};
|