@lemon-fe/components 0.1.81 → 0.1.82

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.
Files changed (116) hide show
  1. package/es/BaseTable/index.less +1 -0
  2. package/es/ColorPicker/index.less +47 -0
  3. package/es/MainFramework/components/Menu/index.less +0 -407
  4. package/es/index.less +1 -0
  5. package/package.json +5 -2
  6. package/es/Actions/index.d.ts +0 -26
  7. package/es/Actions/index.js +0 -171
  8. package/es/BaseTable/Actions.d.ts +0 -8
  9. package/es/BaseTable/Actions.js +0 -136
  10. package/es/BaseTable/BaseTableContext.d.ts +0 -6
  11. package/es/BaseTable/BaseTableContext.js +0 -6
  12. package/es/BaseTable/ResizeHeaderCell.d.ts +0 -8
  13. package/es/BaseTable/ResizeHeaderCell.js +0 -126
  14. package/es/BaseTable/VirtualBody.d.ts +0 -8
  15. package/es/BaseTable/VirtualBody.js +0 -165
  16. package/es/BaseTable/index.d.ts +0 -7
  17. package/es/BaseTable/index.js +0 -465
  18. package/es/BaseTable/utils.d.ts +0 -4
  19. package/es/BaseTable/utils.js +0 -26
  20. package/es/Dropdown/index.d.ts +0 -14
  21. package/es/Dropdown/index.js +0 -53
  22. package/es/DurationPicker/index.d.ts +0 -25
  23. package/es/DurationPicker/index.js +0 -237
  24. package/es/EditableTable/EditableCell.d.ts +0 -11
  25. package/es/EditableTable/EditableCell.js +0 -37
  26. package/es/EditableTable/EditableTableFormItem.d.ts +0 -5
  27. package/es/EditableTable/EditableTableFormItem.js +0 -51
  28. package/es/EditableTable/Table.d.ts +0 -7
  29. package/es/EditableTable/Table.js +0 -363
  30. package/es/EditableTable/index.d.ts +0 -9
  31. package/es/EditableTable/index.js +0 -8
  32. package/es/EditableTable/util.d.ts +0 -25
  33. package/es/EditableTable/util.js +0 -387
  34. package/es/Filter/index.d.ts +0 -7
  35. package/es/Filter/index.js +0 -612
  36. package/es/FormHorizontal/index.d.ts +0 -6
  37. package/es/FormHorizontal/index.js +0 -35
  38. package/es/FormInline/index.d.ts +0 -15
  39. package/es/FormInline/index.js +0 -90
  40. package/es/FormLayout/index.d.ts +0 -32
  41. package/es/FormLayout/index.js +0 -41
  42. package/es/FormTable/index.d.ts +0 -6
  43. package/es/FormTable/index.js +0 -159
  44. package/es/Icons/BigTip/index.d.ts +0 -6
  45. package/es/Icons/BigTip/index.js +0 -50
  46. package/es/Icons/Calendar.d.ts +0 -5
  47. package/es/Icons/Calendar.js +0 -47
  48. package/es/Icons/Close.d.ts +0 -5
  49. package/es/Icons/Close.js +0 -29
  50. package/es/Icons/CollapseUp.d.ts +0 -5
  51. package/es/Icons/CollapseUp.js +0 -31
  52. package/es/Icons/DarkSearch.d.ts +0 -5
  53. package/es/Icons/DarkSearch.js +0 -38
  54. package/es/Icons/Down.d.ts +0 -5
  55. package/es/Icons/Down.js +0 -35
  56. package/es/Icons/Empty.d.ts +0 -2
  57. package/es/Icons/Empty.js +0 -267
  58. package/es/Icons/LookUp.d.ts +0 -5
  59. package/es/Icons/LookUp.js +0 -74
  60. package/es/Icons/More.d.ts +0 -5
  61. package/es/Icons/More.js +0 -44
  62. package/es/Icons/Search.d.ts +0 -5
  63. package/es/Icons/Search.js +0 -35
  64. package/es/Icons/Tip.d.ts +0 -6
  65. package/es/Icons/Tip.js +0 -169
  66. package/es/Icons/index.d.ts +0 -24
  67. package/es/Icons/index.js +0 -25
  68. package/es/InputMaxLength/index.d.ts +0 -14
  69. package/es/InputMaxLength/index.js +0 -92
  70. package/es/Layout/index.d.ts +0 -41
  71. package/es/Layout/index.js +0 -175
  72. package/es/MainFramework/components/DropMenu/index.d.ts +0 -10
  73. package/es/MainFramework/components/DropMenu/index.js +0 -104
  74. package/es/MainFramework/components/Menu/index.d.ts +0 -9
  75. package/es/MainFramework/components/Menu/index.js +0 -656
  76. package/es/MainFramework/components/RefreshButton/index.d.ts +0 -5
  77. package/es/MainFramework/components/RefreshButton/index.js +0 -72
  78. package/es/MainFramework/components/RefreshButton/index.less +0 -30
  79. package/es/MainFramework/components/TabBar/index.d.ts +0 -9
  80. package/es/MainFramework/components/TabBar/index.js +0 -116
  81. package/es/MainFramework/index.d.ts +0 -24
  82. package/es/MainFramework/index.js +0 -66
  83. package/es/PageLoading/index.d.ts +0 -5
  84. package/es/PageLoading/index.js +0 -15
  85. package/es/Popup/index.d.ts +0 -37
  86. package/es/Popup/index.js +0 -198
  87. package/es/Portal/index.d.ts +0 -12
  88. package/es/Portal/index.js +0 -72
  89. package/es/Section/TabBar.d.ts +0 -12
  90. package/es/Section/TabBar.js +0 -48
  91. package/es/Section/index.d.ts +0 -54
  92. package/es/Section/index.js +0 -96
  93. package/es/SelectView/index.d.ts +0 -53
  94. package/es/SelectView/index.js +0 -257
  95. package/es/SiderTree/TreeNodeTitle.d.ts +0 -8
  96. package/es/SiderTree/TreeNodeTitle.js +0 -107
  97. package/es/SiderTree/index.d.ts +0 -37
  98. package/es/SiderTree/index.js +0 -221
  99. package/es/SymbolIcon/index.d.ts +0 -8
  100. package/es/SymbolIcon/index.js +0 -32
  101. package/es/TabBar/index.d.ts +0 -14
  102. package/es/TabBar/index.js +0 -52
  103. package/es/Table/index.d.ts +0 -2
  104. package/es/Table/index.js +0 -236
  105. package/es/Table/utils.d.ts +0 -2
  106. package/es/Table/utils.js +0 -3
  107. package/es/TipMark/index.d.ts +0 -10
  108. package/es/TipMark/index.js +0 -45
  109. package/es/constants.d.ts +0 -1
  110. package/es/constants.js +0 -1
  111. package/es/index.d.ts +0 -31
  112. package/es/index.js +0 -26
  113. package/es/init.d.ts +0 -3
  114. package/es/init.js +0 -145
  115. package/es/utils.d.ts +0 -2
  116. package/es/utils.js +0 -14
package/es/index.d.ts DELETED
@@ -1,31 +0,0 @@
1
- export * from './constants';
2
- export { default as PageLoading } from './PageLoading';
3
- export { default as Actions } from './Actions';
4
- export { default as Filter } from './Filter';
5
- export type { FilterItemType } from './Filter/typings';
6
- export { default as BaseTable } from './BaseTable';
7
- export type { BaseTableProps, ColumnType, ColumnsType } from './BaseTable/typings';
8
- export { default as Section } from './Section';
9
- export { default as Layout } from './Layout';
10
- export { default as Table } from './Table';
11
- export type { TableProps, TableRef } from './Table/typings';
12
- export { default as DurationPicker } from './DurationPicker';
13
- export { default as InputMaxLength } from './InputMaxLength';
14
- export { default as TipMark } from './TipMark';
15
- export { default as EditableTable } from './EditableTable';
16
- export { default as EditableCell } from './EditableTable/EditableCell';
17
- export type { EditableTableProps, EditableTableColumnType, EditableCellFocusedType, EditableTableRef, EditableTableRule, } from './EditableTable/typings';
18
- export { default as Popup } from './Popup';
19
- export { default as SiderTree } from './SiderTree';
20
- export { default as Icons } from './Icons';
21
- export { default as FormLayout } from './FormLayout';
22
- export { default as MainFramework } from './MainFramework';
23
- export { default as init } from './init';
24
- export { default as FormHorizontal } from './FormHorizontal';
25
- export { default as FormInline } from './FormInline';
26
- export { default as FormTable } from './FormTable';
27
- export type { FormTableColumnType, FormTableProps, FormTableRef } from './FormTable/typings';
28
- export { default as TabBar } from './TabBar';
29
- export { default as SymbolIcon } from './SymbolIcon';
30
- export { default as Dropdown } from './Dropdown';
31
- export { default as SelectView } from './SelectView';
package/es/index.js DELETED
@@ -1,26 +0,0 @@
1
- export * from './constants';
2
- export { default as PageLoading } from './PageLoading';
3
- export { default as Actions } from './Actions';
4
- export { default as Filter } from './Filter';
5
- export { default as BaseTable } from './BaseTable';
6
- export { default as Section } from './Section';
7
- export { default as Layout } from './Layout';
8
- export { default as Table } from './Table';
9
- export { default as DurationPicker } from './DurationPicker';
10
- export { default as InputMaxLength } from './InputMaxLength';
11
- export { default as TipMark } from './TipMark';
12
- export { default as EditableTable } from './EditableTable';
13
- export { default as EditableCell } from './EditableTable/EditableCell';
14
- export { default as Popup } from './Popup';
15
- export { default as SiderTree } from './SiderTree';
16
- export { default as Icons } from './Icons';
17
- export { default as FormLayout } from './FormLayout';
18
- export { default as MainFramework } from './MainFramework';
19
- export { default as init } from './init';
20
- export { default as FormHorizontal } from './FormHorizontal';
21
- export { default as FormInline } from './FormInline';
22
- export { default as FormTable } from './FormTable';
23
- export { default as TabBar } from './TabBar';
24
- export { default as SymbolIcon } from './SymbolIcon';
25
- export { default as Dropdown } from './Dropdown';
26
- export { default as SelectView } from './SelectView';
package/es/init.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export default function init(opts?: {
2
- enableCNZZ?: boolean | string;
3
- }): void;
package/es/init.js DELETED
@@ -1,145 +0,0 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
8
-
9
- import React from 'react';
10
- import { message, Modal, Select, ConfigProvider, Result, Button, version, DatePicker, Cascader, TreeSelect } from 'antd';
11
- import { config } from '@lemon-fe/hooks';
12
- import PageLoading from './PageLoading';
13
- import Icons from './Icons';
14
- var Tip = Icons.Tip,
15
- Down = Icons.Down,
16
- BigTip = Icons.BigTip,
17
- Close = Icons.Close;
18
- export default function init() {
19
- var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
20
-
21
- // 添加站长统计
22
- if (opts.enableCNZZ) {
23
- var _node = document.createElement('script');
24
-
25
- _node.innerHTML = "\n var _czc = _czc || [];\n window._czc&&window._czc.push(['_setAutoPageview', false]);\n ";
26
- document.body.appendChild(_node);
27
- _node = document.createElement('script');
28
-
29
- if (typeof opts.enableCNZZ === 'string') {
30
- _node.src = opts.enableCNZZ;
31
- } else {
32
- _node.src = '//v1.cnzz.com/z_stat.php?id=1280732258&web_id=1280732258';
33
- }
34
-
35
- document.body.appendChild(_node);
36
- }
37
-
38
- var types = ['success', 'error', 'warning', 'info'];
39
- types.forEach(function (item) {
40
- var msgAPI = message[item].bind(message);
41
- var modalAPI = Modal[item].bind(Modal);
42
-
43
- message[item] = function () {
44
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
45
- args[_key] = arguments[_key];
46
- }
47
-
48
- var args0 = args[0],
49
- args1 = args[1],
50
- args2 = args[2];
51
-
52
- if (args.length === 1 && _typeof(args0) === 'object' && ! /*#__PURE__*/React.isValidElement(args0)) {
53
- return msgAPI(_objectSpread({
54
- icon: /*#__PURE__*/React.createElement(Tip, {
55
- type: item
56
- })
57
- }, args0));
58
- }
59
-
60
- return msgAPI({
61
- content: args0,
62
- duration: args1,
63
- onClose: args2,
64
- icon: /*#__PURE__*/React.createElement(Tip, {
65
- type: item
66
- })
67
- });
68
- };
69
-
70
- Modal[item] = function () {
71
- return modalAPI(_objectSpread({
72
- icon: /*#__PURE__*/React.createElement(BigTip, {
73
- type: item
74
- }),
75
- title: '提示'
76
- }, arguments.length <= 0 ? undefined : arguments[0]));
77
- };
78
- });
79
- var modalConfirm = Modal.confirm.bind(Modal);
80
-
81
- Modal.confirm = function () {
82
- return modalConfirm(_objectSpread({
83
- icon: /*#__PURE__*/React.createElement(BigTip, {
84
- type: "info"
85
- }),
86
- title: '提示'
87
- }, arguments.length <= 0 ? undefined : arguments[0]));
88
- };
89
-
90
- Modal.defaultProps = _objectSpread(_objectSpread({}, Modal.defaultProps), {}, {
91
- closeIcon: /*#__PURE__*/React.createElement(Close, null)
92
- });
93
- var node = /*#__PURE__*/React.createElement(Down, null); //@ts-ignore
94
-
95
- Select.defaultProps = {
96
- suffixIcon: version >= '4.18.9' ? node : function () {
97
- return node;
98
- }
99
- }; //@ts-ignore
100
-
101
- TreeSelect.defaultProps = {
102
- suffixIcon: version >= '4.18.9' ? node : function () {
103
- return node;
104
- }
105
- }; //@ts-ignore
106
-
107
- Cascader.defaultProps = {
108
- suffixIcon: node
109
- };
110
- DatePicker.RangePicker.defaultProps = {
111
- suffixIcon: /*#__PURE__*/React.createElement(Icons.Calendar, null)
112
- };
113
- config({
114
- showToast: function showToast() {
115
- return message.loading('请稍等', 0);
116
- },
117
- cancelToast: function cancelToast(hide) {
118
- hide();
119
- },
120
- showLoading: function showLoading() {
121
- return /*#__PURE__*/React.createElement(PageLoading, null);
122
- },
123
- showError: function showError(err) {
124
- message.error(err.message);
125
- },
126
- setPrimaryColor: function setPrimaryColor(color) {
127
- ConfigProvider.config({
128
- theme: {
129
- primaryColor: color
130
- }
131
- });
132
- },
133
- errorResult: function errorResult(err, refresh) {
134
- return /*#__PURE__*/React.createElement(Result, {
135
- status: "500",
136
- title: "500",
137
- subTitle: err.message,
138
- extra: /*#__PURE__*/React.createElement(Button, {
139
- type: "primary",
140
- onClick: refresh
141
- }, "\u91CD\u65B0\u52A0\u8F7D")
142
- });
143
- }
144
- });
145
- }
package/es/utils.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export declare const mapChildren: (children: ReactNode, cb: (node: ReactNode, index: number) => ReactNode) => ReactNode[];
package/es/utils.js DELETED
@@ -1,14 +0,0 @@
1
- // 不使用Children.map的原因是由于它会给子节点生成一个key与tabs的activeTabKey无法对应
2
- export var mapChildren = function mapChildren(children, cb) {
3
- var nodes = [];
4
-
5
- if (Array.isArray(children)) {
6
- nodes = children;
7
- } else {
8
- nodes = [children];
9
- }
10
-
11
- return nodes.filter(function (item) {
12
- return item !== null && item !== undefined;
13
- }).map(cb);
14
- };