@lemon-fe/components 0.1.78 → 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 (115) hide show
  1. package/es/BaseTable/index.less +1 -1
  2. package/es/ColorPicker/index.less +47 -0
  3. package/es/MainFramework/components/Menu/index.less +0 -407
  4. package/es/Table/typings.d.ts +0 -1
  5. package/es/index.less +1 -0
  6. package/package.json +5 -2
  7. package/es/Actions/index.d.ts +0 -26
  8. package/es/Actions/index.js +0 -171
  9. package/es/BaseTable/Actions.d.ts +0 -8
  10. package/es/BaseTable/Actions.js +0 -136
  11. package/es/BaseTable/BaseTableContext.d.ts +0 -6
  12. package/es/BaseTable/BaseTableContext.js +0 -6
  13. package/es/BaseTable/ResizeHeaderCell.d.ts +0 -8
  14. package/es/BaseTable/ResizeHeaderCell.js +0 -126
  15. package/es/BaseTable/VirtualBody.d.ts +0 -8
  16. package/es/BaseTable/VirtualBody.js +0 -165
  17. package/es/BaseTable/index.d.ts +0 -7
  18. package/es/BaseTable/index.js +0 -465
  19. package/es/BaseTable/utils.d.ts +0 -4
  20. package/es/BaseTable/utils.js +0 -26
  21. package/es/Dropdown/index.d.ts +0 -14
  22. package/es/Dropdown/index.js +0 -53
  23. package/es/DurationPicker/index.d.ts +0 -25
  24. package/es/DurationPicker/index.js +0 -237
  25. package/es/EditableTable/EditableCell.d.ts +0 -11
  26. package/es/EditableTable/EditableCell.js +0 -37
  27. package/es/EditableTable/EditableTableFormItem.d.ts +0 -5
  28. package/es/EditableTable/EditableTableFormItem.js +0 -49
  29. package/es/EditableTable/Table.d.ts +0 -7
  30. package/es/EditableTable/Table.js +0 -363
  31. package/es/EditableTable/index.d.ts +0 -9
  32. package/es/EditableTable/index.js +0 -8
  33. package/es/EditableTable/util.d.ts +0 -25
  34. package/es/EditableTable/util.js +0 -387
  35. package/es/Filter/index.d.ts +0 -7
  36. package/es/Filter/index.js +0 -610
  37. package/es/FormHorizontal/index.d.ts +0 -6
  38. package/es/FormHorizontal/index.js +0 -35
  39. package/es/FormInline/index.d.ts +0 -15
  40. package/es/FormInline/index.js +0 -90
  41. package/es/FormLayout/index.d.ts +0 -32
  42. package/es/FormLayout/index.js +0 -41
  43. package/es/FormTable/index.d.ts +0 -6
  44. package/es/FormTable/index.js +0 -159
  45. package/es/Icons/BigTip/index.d.ts +0 -6
  46. package/es/Icons/BigTip/index.js +0 -50
  47. package/es/Icons/Calendar.d.ts +0 -5
  48. package/es/Icons/Calendar.js +0 -47
  49. package/es/Icons/CollapseUp.d.ts +0 -5
  50. package/es/Icons/CollapseUp.js +0 -31
  51. package/es/Icons/DarkSearch.d.ts +0 -5
  52. package/es/Icons/DarkSearch.js +0 -38
  53. package/es/Icons/Down.d.ts +0 -5
  54. package/es/Icons/Down.js +0 -35
  55. package/es/Icons/Empty.d.ts +0 -2
  56. package/es/Icons/Empty.js +0 -267
  57. package/es/Icons/LookUp.d.ts +0 -5
  58. package/es/Icons/LookUp.js +0 -74
  59. package/es/Icons/More.d.ts +0 -5
  60. package/es/Icons/More.js +0 -44
  61. package/es/Icons/Search.d.ts +0 -5
  62. package/es/Icons/Search.js +0 -35
  63. package/es/Icons/Tip.d.ts +0 -6
  64. package/es/Icons/Tip.js +0 -169
  65. package/es/Icons/index.d.ts +0 -22
  66. package/es/Icons/index.js +0 -23
  67. package/es/InputMaxLength/index.d.ts +0 -14
  68. package/es/InputMaxLength/index.js +0 -92
  69. package/es/Layout/index.d.ts +0 -41
  70. package/es/Layout/index.js +0 -175
  71. package/es/MainFramework/components/DropMenu/index.d.ts +0 -10
  72. package/es/MainFramework/components/DropMenu/index.js +0 -104
  73. package/es/MainFramework/components/Menu/index.d.ts +0 -9
  74. package/es/MainFramework/components/Menu/index.js +0 -656
  75. package/es/MainFramework/components/RefreshButton/index.d.ts +0 -5
  76. package/es/MainFramework/components/RefreshButton/index.js +0 -72
  77. package/es/MainFramework/components/RefreshButton/index.less +0 -30
  78. package/es/MainFramework/components/TabBar/index.d.ts +0 -9
  79. package/es/MainFramework/components/TabBar/index.js +0 -116
  80. package/es/MainFramework/index.d.ts +0 -24
  81. package/es/MainFramework/index.js +0 -66
  82. package/es/PageLoading/index.d.ts +0 -5
  83. package/es/PageLoading/index.js +0 -15
  84. package/es/Popup/index.d.ts +0 -37
  85. package/es/Popup/index.js +0 -198
  86. package/es/Portal/index.d.ts +0 -12
  87. package/es/Portal/index.js +0 -72
  88. package/es/Section/TabBar.d.ts +0 -12
  89. package/es/Section/TabBar.js +0 -48
  90. package/es/Section/index.d.ts +0 -54
  91. package/es/Section/index.js +0 -96
  92. package/es/SelectView/index.d.ts +0 -53
  93. package/es/SelectView/index.js +0 -257
  94. package/es/SiderTree/TreeNodeTitle.d.ts +0 -8
  95. package/es/SiderTree/TreeNodeTitle.js +0 -107
  96. package/es/SiderTree/index.d.ts +0 -37
  97. package/es/SiderTree/index.js +0 -221
  98. package/es/SymbolIcon/index.d.ts +0 -8
  99. package/es/SymbolIcon/index.js +0 -32
  100. package/es/TabBar/index.d.ts +0 -14
  101. package/es/TabBar/index.js +0 -52
  102. package/es/Table/index.d.ts +0 -2
  103. package/es/Table/index.js +0 -236
  104. package/es/Table/utils.d.ts +0 -2
  105. package/es/Table/utils.js +0 -3
  106. package/es/TipMark/index.d.ts +0 -10
  107. package/es/TipMark/index.js +0 -45
  108. package/es/constants.d.ts +0 -1
  109. package/es/constants.js +0 -1
  110. package/es/index.d.ts +0 -31
  111. package/es/index.js +0 -26
  112. package/es/init.d.ts +0 -3
  113. package/es/init.js +0 -135
  114. package/es/utils.d.ts +0 -2
  115. 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,135 +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 } 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
- export default function init() {
18
- var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
19
-
20
- // 添加站长统计
21
- if (opts.enableCNZZ) {
22
- var _node = document.createElement('script');
23
-
24
- _node.innerHTML = "\n var _czc = _czc || [];\n window._czc&&window._czc.push(['_setAutoPageview', false]);\n ";
25
- document.body.appendChild(_node);
26
- _node = document.createElement('script');
27
-
28
- if (typeof opts.enableCNZZ === 'string') {
29
- _node.src = opts.enableCNZZ;
30
- } else {
31
- _node.src = '//v1.cnzz.com/z_stat.php?id=1280732258&web_id=1280732258';
32
- }
33
-
34
- document.body.appendChild(_node);
35
- }
36
-
37
- var types = ['success', 'error', 'warning', 'info'];
38
- types.forEach(function (item) {
39
- var msgAPI = message[item].bind(message);
40
- var modalAPI = Modal[item].bind(Modal);
41
-
42
- message[item] = function () {
43
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
44
- args[_key] = arguments[_key];
45
- }
46
-
47
- var args0 = args[0],
48
- args1 = args[1],
49
- args2 = args[2];
50
-
51
- if (args.length === 1 && _typeof(args0) === 'object' && ! /*#__PURE__*/React.isValidElement(args0)) {
52
- return msgAPI(_objectSpread({
53
- icon: /*#__PURE__*/React.createElement(Tip, {
54
- type: item
55
- })
56
- }, args0));
57
- }
58
-
59
- return msgAPI({
60
- content: args0,
61
- duration: args1,
62
- onClose: args2,
63
- icon: /*#__PURE__*/React.createElement(Tip, {
64
- type: item
65
- })
66
- });
67
- };
68
-
69
- Modal[item] = function () {
70
- return modalAPI(_objectSpread({
71
- icon: /*#__PURE__*/React.createElement(BigTip, {
72
- type: item
73
- }),
74
- title: '提示'
75
- }, arguments.length <= 0 ? undefined : arguments[0]));
76
- };
77
- });
78
- var modalConfirm = Modal.confirm.bind(Modal);
79
-
80
- Modal.confirm = function () {
81
- return modalConfirm(_objectSpread({
82
- icon: /*#__PURE__*/React.createElement(BigTip, {
83
- type: "info"
84
- }),
85
- title: '提示'
86
- }, arguments.length <= 0 ? undefined : arguments[0]));
87
- };
88
-
89
- var node = /*#__PURE__*/React.createElement(Down, null); //@ts-ignore
90
-
91
- Select.defaultProps = {
92
- suffixIcon: version >= '4.18.9' ? node : function () {
93
- return node;
94
- }
95
- }; //@ts-ignore
96
-
97
- Cascader.defaultProps = {
98
- suffixIcon: node
99
- };
100
- DatePicker.RangePicker.defaultProps = {
101
- suffixIcon: /*#__PURE__*/React.createElement(Icons.Calendar, null)
102
- };
103
- config({
104
- showToast: function showToast() {
105
- return message.loading('请稍等', 0);
106
- },
107
- cancelToast: function cancelToast(hide) {
108
- hide();
109
- },
110
- showLoading: function showLoading() {
111
- return /*#__PURE__*/React.createElement(PageLoading, null);
112
- },
113
- showError: function showError(err) {
114
- message.error(err.message);
115
- },
116
- setPrimaryColor: function setPrimaryColor(color) {
117
- ConfigProvider.config({
118
- theme: {
119
- primaryColor: color
120
- }
121
- });
122
- },
123
- errorResult: function errorResult(err, refresh) {
124
- return /*#__PURE__*/React.createElement(Result, {
125
- status: "500",
126
- title: "500",
127
- subTitle: err.message,
128
- extra: /*#__PURE__*/React.createElement(Button, {
129
- type: "primary",
130
- onClick: refresh
131
- }, "\u91CD\u65B0\u52A0\u8F7D")
132
- });
133
- }
134
- });
135
- }
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
- };