@gisce/react-ooui 0.21.1 → 0.21.3
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/package.json
CHANGED
|
@@ -3,6 +3,18 @@ import * as TablerIcons from "@tabler/icons";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
const iconMapping: { [key: string]: React.ElementType } = {
|
|
6
|
+
"terp-purchase": Icons.ShoppingCartOutlined,
|
|
7
|
+
"terp-graph": Icons.PieChartOutlined,
|
|
8
|
+
"terp-crm": Icons.ContactsOutlined,
|
|
9
|
+
"terp-hr": TablerIcons.IconFriends,
|
|
10
|
+
"terp-account": TablerIcons.IconBuildingBank,
|
|
11
|
+
"terp-project": TablerIcons.IconChecklist,
|
|
12
|
+
"terp-administration": TablerIcons.IconAdjustments,
|
|
13
|
+
"terp-partner": Icons.TeamOutlined,
|
|
14
|
+
"terp-mrp": Icons.BuildOutlined,
|
|
15
|
+
"terp-product": Icons.ShoppingOutlined,
|
|
16
|
+
STOCK_JUSTIFY_FILL: Icons.UnorderedListOutlined,
|
|
17
|
+
STOCK_INDENT: TablerIcons.IconIndentIncrease,
|
|
6
18
|
STOCK_HELP: Icons.QuestionOutlined,
|
|
7
19
|
STOCK_GO_UP: Icons.ArrowUpOutlined,
|
|
8
20
|
STOCK_SORT_DESCENDING: Icons.SortDescendingOutlined,
|
|
@@ -18,15 +30,10 @@ const iconMapping: { [key: string]: React.ElementType } = {
|
|
|
18
30
|
STOCK_BOLD: Icons.BoldOutlined,
|
|
19
31
|
STOCK_APPLY: Icons.CheckOutlined,
|
|
20
32
|
STOCK_ZOOM_OUT: Icons.ZoomOutOutlined,
|
|
21
|
-
"terp-graph": Icons.PieChartOutlined,
|
|
22
|
-
"terp-crm": Icons.ContactsOutlined,
|
|
23
33
|
STOCK_STRIKETHROUGH: Icons.StrikethroughOutlined,
|
|
24
34
|
STOCK_MEDIA_REWIND: Icons.BackwardOutlined,
|
|
25
|
-
"terp-partner": Icons.TeamOutlined,
|
|
26
35
|
STOCK_PRINT: Icons.PrinterOutlined,
|
|
27
36
|
STOCK_NO: Icons.CloseOutlined,
|
|
28
|
-
"terp-mrp": Icons.BuildOutlined,
|
|
29
|
-
"terp-product": Icons.ShoppingOutlined,
|
|
30
37
|
STOCK_GOTO_FIRST: Icons.FastBackwardOutlined,
|
|
31
38
|
STOCK_CLOSE: Icons.CloseOutlined,
|
|
32
39
|
STOCK_REMOVE: Icons.MinusOutlined,
|
|
@@ -82,7 +89,6 @@ const iconMapping: { [key: string]: React.ElementType } = {
|
|
|
82
89
|
STOCK_ABOUT: Icons.StarOutlined,
|
|
83
90
|
STOCK_COLOR_PICKER: Icons.AimOutlined,
|
|
84
91
|
STOCK_SELECT_FONT: Icons.FontSizeOutlined,
|
|
85
|
-
"terp-purchase": Icons.ShoppingCartOutlined,
|
|
86
92
|
STOCK_DELETE: Icons.DeleteOutlined,
|
|
87
93
|
STOCK_DND: Icons.FileTextOutlined,
|
|
88
94
|
STOCK_CLEAR: Icons.CloseSquareOutlined,
|
|
@@ -108,7 +114,11 @@ export default (key: string): React.ElementType => {
|
|
|
108
114
|
return Icons[antKey];
|
|
109
115
|
}
|
|
110
116
|
const tablerKey = `Icon${IconCamelCase}`;
|
|
117
|
+
if (TablerIcons.hasOwnProperty(tablerKey)) {
|
|
118
|
+
// @ts-ignore
|
|
119
|
+
const CustomIcon = () => React.createElement(Icon, {component: TablerIcons[tablerKey]});
|
|
120
|
+
return CustomIcon
|
|
121
|
+
}
|
|
111
122
|
// @ts-ignore
|
|
112
|
-
|
|
113
|
-
return CustomIcon
|
|
123
|
+
return undefined
|
|
114
124
|
};
|