@jetlinks-web/components 2.7.0 → 3.0.0

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 (284) hide show
  1. package/es/AutoComplete/AutoComplete.js +2 -3
  2. package/es/BadgeStatus/Badge.js +2 -3
  3. package/es/CardSelect/CardSelect.js +23 -18
  4. package/es/CardSelect/style/index.js +25 -1
  5. package/es/CheckButton/CheckButton.js +12 -4
  6. package/es/CheckButton/style/index.js +41 -1
  7. package/es/ConfigProvider/index.js +1 -1
  8. package/es/DragModal/DragModal.js +15 -9
  9. package/es/DragModal/style/index.js +64 -1
  10. package/es/EditTable/Body.js +10 -3
  11. package/es/EditTable/EditTable.js +14 -8
  12. package/es/EditTable/FormItem.js +15 -10
  13. package/es/EditTable/Header.js +16 -6
  14. package/es/EditTable/components/ContextMenu/Menu.js +12 -6
  15. package/es/EditTable/components/Search/search.js +1 -2
  16. package/es/EditTable/components/Search/sort.js +1 -3
  17. package/es/EditTable/group.js +24 -19
  18. package/es/EditTable/hooks/useValidate.js +1 -1
  19. package/es/EditTable/style/body.js +53 -0
  20. package/es/EditTable/style/form.js +24 -0
  21. package/es/EditTable/style/group.js +25 -0
  22. package/es/EditTable/style/header.js +58 -0
  23. package/es/EditTable/style/index.js +42 -1
  24. package/es/EditTable/style/menu.js +27 -0
  25. package/es/EditTable/style/table.js +46 -0
  26. package/es/EditTable/utils.js +1 -1
  27. package/es/Ellipsis/Ellipsis.js +11 -3
  28. package/es/Ellipsis/style/index.js +24 -1
  29. package/es/Empty/Empty.js +1 -1
  30. package/es/FullPage/FullPage.js +1 -2
  31. package/es/LocaleProvider/index.js +1 -2
  32. package/es/PermissionButton/index.js +4 -5
  33. package/es/ProLayout/Basic/BasicLayout.js +46 -42
  34. package/es/ProLayout/Basic/BasicLayoutStyle.js +39 -0
  35. package/es/ProLayout/Basic/Header.js +4 -8
  36. package/es/ProLayout/Basic/HeaderStyle.js +10 -0
  37. package/es/ProLayout/PageContainer/index.js +20 -16
  38. package/es/ProLayout/PageContainer/style.js +46 -0
  39. package/es/ProLayout/SiderMenu/BaseMenu.js +14 -37
  40. package/es/ProLayout/SiderMenu/SiderMenu.js +25 -36
  41. package/es/ProLayout/SiderMenu/style.js +166 -0
  42. package/es/ProLayout/TopHeader/index.js +12 -11
  43. package/es/ProLayout/TopHeader/style.js +126 -0
  44. package/es/ProLayout/style/index.js +7 -1
  45. package/es/ProLayout/util.js +5 -5
  46. package/es/ProTable/Alert.js +13 -5
  47. package/es/ProTable/Content.js +22 -14
  48. package/es/ProTable/Header.js +22 -12
  49. package/es/ProTable/Pagination.js +13 -5
  50. package/es/ProTable/ProTable.js +43 -27
  51. package/es/ProTable/setting.js +1 -1
  52. package/es/ProTable/style/index.js +109 -1
  53. package/es/RadioButton/RadioButton.js +10 -4
  54. package/es/RadioButton/style/index.js +23 -1
  55. package/es/Scrollbar/Scrollbar.js +10 -3
  56. package/es/Scrollbar/Thumb.js +36 -25
  57. package/es/Scrollbar/style/index.js +63 -1
  58. package/es/Search/Advanced/History.js +24 -17
  59. package/es/Search/Advanced/SaveHistory.js +2 -3
  60. package/es/Search/Advanced/index.js +213 -293
  61. package/es/Search/Item.js +175 -415
  62. package/es/Search/Search.js +78 -172
  63. package/es/Search/hooks/index.js +108 -1
  64. package/es/Search/hooks/useRouteQuery.js +57 -0
  65. package/es/Search/setting.js +132 -14
  66. package/es/Search/style/index.js +4 -2
  67. package/es/Search/style/item.js +28 -0
  68. package/es/Search/style/search.js +133 -0
  69. package/es/Search/util.js +116 -124
  70. package/es/Skeleton/components/DashBoardCard.js +64 -0
  71. package/es/Skeleton/components/DashBoardChart.js +96 -0
  72. package/es/Skeleton/components/Detail.js +110 -0
  73. package/es/Skeleton/components/Drawer.js +91 -0
  74. package/es/Skeleton/components/Item.js +68 -0
  75. package/es/Skeleton/components/List.js +45 -0
  76. package/es/Skeleton/components/ListCard.js +63 -0
  77. package/es/Skeleton/components/ListCardItem.js +86 -0
  78. package/es/Skeleton/components/ListTable.js +76 -0
  79. package/es/Skeleton/components/Page.js +62 -0
  80. package/es/Skeleton/components/Search.js +54 -0
  81. package/es/Skeleton/components/Tree.js +72 -0
  82. package/es/Skeleton/index.js +15 -0
  83. package/es/Skeleton/skeleton.js +58 -0
  84. package/es/Skeleton/style/index.js +132 -0
  85. package/es/Title/style/index.js +29 -1
  86. package/es/Title/title.js +13 -5
  87. package/es/ValueItem/ValueItem.js +29 -72
  88. package/es/components.js +0 -3
  89. package/es/locale/en-US.js +0 -7
  90. package/es/locale/zh-CN.js +0 -7
  91. package/es/style/index.js +0 -3
  92. package/es/style/styleRegister.js +21 -0
  93. package/es/style/variable.js +4 -0
  94. package/es/style.js +0 -12
  95. package/lib/AutoComplete/AutoComplete.js +1 -2
  96. package/lib/BadgeStatus/Badge.js +2 -3
  97. package/lib/CardSelect/CardSelect.js +23 -18
  98. package/lib/CardSelect/style/index.js +30 -1
  99. package/lib/CheckButton/CheckButton.js +12 -4
  100. package/lib/CheckButton/style/index.js +46 -1
  101. package/lib/ConfigProvider/context.js +1 -1
  102. package/lib/ConfigProvider/index.js +3 -3
  103. package/lib/DragModal/DragModal.js +15 -9
  104. package/lib/DragModal/style/index.js +69 -1
  105. package/lib/EditTable/Body.js +10 -3
  106. package/lib/EditTable/EditTable.js +13 -7
  107. package/lib/EditTable/FormItem.js +16 -11
  108. package/lib/EditTable/Header.js +16 -6
  109. package/lib/EditTable/components/ContextMenu/Menu.js +12 -6
  110. package/lib/EditTable/components/Search/search.js +1 -2
  111. package/lib/EditTable/components/Search/sort.js +1 -3
  112. package/lib/EditTable/group.js +24 -19
  113. package/lib/EditTable/hooks/useValidate.js +1 -1
  114. package/lib/EditTable/style/body.js +60 -0
  115. package/lib/EditTable/style/form.js +31 -0
  116. package/lib/EditTable/style/group.js +32 -0
  117. package/lib/EditTable/style/header.js +65 -0
  118. package/lib/EditTable/style/index.js +47 -1
  119. package/lib/EditTable/style/menu.js +33 -0
  120. package/lib/EditTable/style/table.js +52 -0
  121. package/lib/EditTable/utils.js +1 -1
  122. package/lib/Ellipsis/Ellipsis.js +11 -3
  123. package/lib/Ellipsis/style/index.js +29 -1
  124. package/lib/Empty/Empty.js +1 -1
  125. package/lib/FullPage/FullPage.js +1 -2
  126. package/lib/LocaleProvider/index.js +1 -2
  127. package/lib/PermissionButton/index.js +9 -10
  128. package/lib/ProLayout/Basic/BasicLayout.js +55 -51
  129. package/lib/ProLayout/Basic/BasicLayoutStyle.js +46 -0
  130. package/lib/ProLayout/Basic/Header.js +6 -10
  131. package/lib/ProLayout/Basic/HeaderStyle.js +17 -0
  132. package/lib/ProLayout/PageContainer/index.js +24 -20
  133. package/lib/ProLayout/PageContainer/style.js +53 -0
  134. package/lib/ProLayout/SiderMenu/BaseMenu.js +18 -40
  135. package/lib/ProLayout/SiderMenu/SiderMenu.js +28 -39
  136. package/lib/ProLayout/SiderMenu/style.js +173 -0
  137. package/lib/ProLayout/TopHeader/index.js +12 -10
  138. package/lib/ProLayout/TopHeader/style.js +133 -0
  139. package/lib/ProLayout/defaultSettings.js +1 -1
  140. package/lib/ProLayout/style/index.js +12 -1
  141. package/lib/ProLayout/util.js +5 -5
  142. package/lib/ProTable/Alert.js +13 -5
  143. package/lib/ProTable/Content.js +22 -14
  144. package/lib/ProTable/Header.js +22 -12
  145. package/lib/ProTable/Pagination.js +13 -5
  146. package/lib/ProTable/ProTable.js +43 -27
  147. package/lib/ProTable/setting.js +3 -3
  148. package/lib/ProTable/style/index.js +114 -1
  149. package/lib/RadioButton/RadioButton.js +10 -4
  150. package/lib/RadioButton/style/index.js +28 -1
  151. package/lib/Scrollbar/Scrollbar.js +10 -3
  152. package/lib/Scrollbar/Thumb.js +36 -25
  153. package/lib/Scrollbar/style/index.js +68 -1
  154. package/lib/Search/Advanced/History.js +24 -17
  155. package/lib/Search/Advanced/SaveHistory.js +2 -3
  156. package/lib/Search/Advanced/index.js +213 -293
  157. package/lib/Search/Item.js +175 -415
  158. package/lib/Search/Search.js +78 -172
  159. package/lib/Search/hooks/index.js +130 -1
  160. package/lib/Search/hooks/useRouteQuery.js +64 -0
  161. package/lib/Search/setting.js +133 -15
  162. package/lib/Search/style/index.js +9 -2
  163. package/lib/Search/style/item.js +35 -0
  164. package/lib/Search/style/search.js +140 -0
  165. package/lib/Search/util.js +116 -124
  166. package/lib/Skeleton/components/DashBoardCard.js +64 -0
  167. package/lib/Skeleton/components/DashBoardChart.js +96 -0
  168. package/lib/Skeleton/components/Detail.js +110 -0
  169. package/lib/Skeleton/components/Drawer.js +91 -0
  170. package/lib/Skeleton/components/Item.js +68 -0
  171. package/lib/Skeleton/components/List.js +45 -0
  172. package/lib/Skeleton/components/ListCard.js +63 -0
  173. package/lib/Skeleton/components/ListCardItem.js +86 -0
  174. package/lib/Skeleton/components/ListTable.js +76 -0
  175. package/lib/Skeleton/components/Page.js +62 -0
  176. package/lib/Skeleton/components/Search.js +54 -0
  177. package/lib/Skeleton/components/Tree.js +72 -0
  178. package/lib/Skeleton/index.js +75 -0
  179. package/lib/Skeleton/skeleton.js +58 -0
  180. package/lib/Skeleton/style/index.js +139 -0
  181. package/lib/Title/style/index.js +34 -1
  182. package/lib/Title/title.js +13 -5
  183. package/lib/ValueItem/ValueItem.js +29 -72
  184. package/lib/components.js +0 -21
  185. package/lib/locale/en-US.js +0 -7
  186. package/lib/locale/zh-CN.js +0 -7
  187. package/lib/style/components.less +0 -1
  188. package/lib/style/index.js +1 -4
  189. package/lib/style/styleRegister.js +28 -0
  190. package/lib/style/variable.js +10 -0
  191. package/lib/style.js +1 -14
  192. package/package.json +13 -14
  193. package/es/AMap/Map.js +0 -133
  194. package/es/AMap/index.js +0 -5
  195. package/es/AMap/util.js +0 -56
  196. package/es/CardSelect/style/index.css +0 -24
  197. package/es/CardSelect/style/index.less +0 -26
  198. package/es/CheckButton/style/index.css +0 -37
  199. package/es/CheckButton/style/index.less +0 -40
  200. package/es/DragModal/style/index.css +0 -82
  201. package/es/DragModal/style/index.less +0 -97
  202. package/es/Echarts/Echarts.js +0 -48
  203. package/es/Echarts/index.js +0 -5
  204. package/es/EditTable/style/body.less +0 -66
  205. package/es/EditTable/style/form.less +0 -33
  206. package/es/EditTable/style/group.less +0 -32
  207. package/es/EditTable/style/header.less +0 -77
  208. package/es/EditTable/style/index.css +0 -267
  209. package/es/EditTable/style/index.less +0 -41
  210. package/es/EditTable/style/menu.less +0 -25
  211. package/es/EditTable/style/table.less +0 -47
  212. package/es/Ellipsis/style/index.css +0 -17
  213. package/es/Ellipsis/style/index.less +0 -20
  214. package/es/MonacoEditor/Monaco.js +0 -242
  215. package/es/MonacoEditor/index.js +0 -5
  216. package/es/MonacoEditor/style/index.css +0 -4
  217. package/es/MonacoEditor/style/index.js +0 -1
  218. package/es/MonacoEditor/style/index.less +0 -4
  219. package/es/ProLayout/Basic/BasicLayout.less +0 -66
  220. package/es/ProLayout/Basic/Header.less +0 -8
  221. package/es/ProLayout/PageContainer/index.less +0 -103
  222. package/es/ProLayout/SiderMenu/index.less +0 -231
  223. package/es/ProLayout/TopHeader/index.less +0 -174
  224. package/es/ProLayout/style/default.less +0 -4
  225. package/es/ProLayout/style/style.less +0 -7
  226. package/es/ProTable/style/ProTable.less +0 -141
  227. package/es/RadioButton/style/index.css +0 -20
  228. package/es/RadioButton/style/index.less +0 -19
  229. package/es/Scrollbar/style/index.css +0 -65
  230. package/es/Scrollbar/style/index.less +0 -83
  231. package/es/Search/style/Item.less +0 -33
  232. package/es/Search/style/Search.less +0 -179
  233. package/es/Title/style/index.css +0 -23
  234. package/es/Title/style/index.less +0 -25
  235. package/es/style/index.css +0 -5197
  236. package/es/style/index.less +0 -13
  237. package/es/style/variable.css +0 -4
  238. package/es/style/variable.less +0 -4
  239. package/lib/AMap/Map.js +0 -133
  240. package/lib/AMap/index.js +0 -12
  241. package/lib/AMap/util.js +0 -62
  242. package/lib/CardSelect/style/index.css +0 -24
  243. package/lib/CardSelect/style/index.less +0 -26
  244. package/lib/CheckButton/style/index.css +0 -37
  245. package/lib/CheckButton/style/index.less +0 -40
  246. package/lib/DragModal/style/index.css +0 -82
  247. package/lib/DragModal/style/index.less +0 -97
  248. package/lib/Echarts/Echarts.js +0 -48
  249. package/lib/Echarts/index.js +0 -12
  250. package/lib/EditTable/style/body.less +0 -66
  251. package/lib/EditTable/style/form.less +0 -33
  252. package/lib/EditTable/style/group.less +0 -32
  253. package/lib/EditTable/style/header.less +0 -77
  254. package/lib/EditTable/style/index.css +0 -267
  255. package/lib/EditTable/style/index.less +0 -41
  256. package/lib/EditTable/style/menu.less +0 -25
  257. package/lib/EditTable/style/table.less +0 -47
  258. package/lib/Ellipsis/style/index.css +0 -17
  259. package/lib/Ellipsis/style/index.less +0 -20
  260. package/lib/MonacoEditor/Monaco.js +0 -242
  261. package/lib/MonacoEditor/index.js +0 -12
  262. package/lib/MonacoEditor/style/index.css +0 -4
  263. package/lib/MonacoEditor/style/index.js +0 -3
  264. package/lib/MonacoEditor/style/index.less +0 -4
  265. package/lib/ProLayout/Basic/BasicLayout.less +0 -66
  266. package/lib/ProLayout/Basic/Header.less +0 -8
  267. package/lib/ProLayout/PageContainer/index.less +0 -103
  268. package/lib/ProLayout/SiderMenu/index.less +0 -231
  269. package/lib/ProLayout/TopHeader/index.less +0 -174
  270. package/lib/ProLayout/style/default.less +0 -4
  271. package/lib/ProLayout/style/style.less +0 -7
  272. package/lib/ProTable/style/ProTable.less +0 -141
  273. package/lib/RadioButton/style/index.css +0 -20
  274. package/lib/RadioButton/style/index.less +0 -19
  275. package/lib/Scrollbar/style/index.css +0 -65
  276. package/lib/Scrollbar/style/index.less +0 -83
  277. package/lib/Search/style/Item.less +0 -33
  278. package/lib/Search/style/Search.less +0 -179
  279. package/lib/Title/style/index.css +0 -23
  280. package/lib/Title/style/index.less +0 -25
  281. package/lib/style/index.css +0 -5197
  282. package/lib/style/index.less +0 -13
  283. package/lib/style/variable.css +0 -4
  284. package/lib/style/variable.less +0 -4
@@ -1,267 +0,0 @@
1
- /* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
2
- /* stylelint-disable no-duplicate-selectors */
3
- /* stylelint-disable */
4
- /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
5
- .jetlinks-edit-table-wrapper {
6
- background: #fff;
7
- height: 100%;
8
- position: relative;
9
- }
10
- .jetlinks-edit-table-wrapper.table-full-screen {
11
- padding: 24px;
12
- }
13
- .jetlinks-edit-table-wrapper .jetlinks-edit-table {
14
- display: flex;
15
- flex-direction: column;
16
- flex-grow: 0;
17
- flex-shrink: 0;
18
- background: #fafafa;
19
- transition: background-color 0.3s ease;
20
- overflow: auto hidden;
21
- }
22
- .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-edit-table-header {
23
- overflow: hidden;
24
- width: 100%;
25
- }
26
- .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-edit-table-body {
27
- background-color: #fff;
28
- overflow-y: hidden;
29
- position: relative;
30
- height: 100%;
31
- width: 100%;
32
- flex: 1 1 auto;
33
- flex-direction: row;
34
- }
35
- .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-table-horizontal-scroll {
36
- width: 100%;
37
- height: 15px;
38
- min-height: 15px;
39
- max-height: 15px;
40
- display: flex;
41
- }
42
- .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-table-horizontal-scroll .jetlinks-table-horizontal-scroll-bar {
43
- height: 100%;
44
- overflow-x: scroll;
45
- }
46
- .jetlinks-edit-table-body-viewport {
47
- max-height: 100%;
48
- width: 100%;
49
- overflow: hidden auto;
50
- position: relative;
51
- }
52
- .jetlinks-edit-table-body-viewport .jetlinks-edit-scrollbar {
53
- position: absolute;
54
- left: 0;
55
- top: 0;
56
- right: 0;
57
- z-index: -1;
58
- }
59
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-body-container {
60
- overflow: hidden;
61
- height: 100%;
62
- }
63
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center {
64
- position: relative;
65
- flex: 1 1 auto;
66
- min-width: 0;
67
- height: 100%;
68
- }
69
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row {
70
- width: 100%;
71
- display: flex;
72
- align-items: center;
73
- transition: top 0.2s, height 0.2s, background-color 0.1s;
74
- border-bottom: 1px solid #ebebeb;
75
- }
76
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row .jetlinks-edit-table-cell {
77
- position: absolute;
78
- min-width: 0;
79
- }
80
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row:hover {
81
- background-color: #f8f8f8;
82
- }
83
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row.jetlinks-edit-table-row-selected {
84
- background-color: var(--ant-primary-1);
85
- }
86
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .jetlinks-edit-table-row .body-cell-box {
87
- padding: 0 12px;
88
- position: relative;
89
- }
90
- .jetlinks-edit-table-body-viewport .jetlinks-edit-table-center .readonly-mask {
91
- position: absolute;
92
- top: 0;
93
- left: 0;
94
- right: 0;
95
- bottom: 0;
96
- z-index: 4;
97
- }
98
- .jetlinks-edit-table-body-empty {
99
- display: flex;
100
- width: 100%;
101
- justify-content: center;
102
- padding-top: 24px;
103
- }
104
- .jetlinks-edit-table-header-container {
105
- height: 100%;
106
- position: relative;
107
- }
108
- .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell {
109
- height: 100%;
110
- display: inline-flex;
111
- align-items: center;
112
- float: left;
113
- overflow: visible;
114
- position: absolute;
115
- top: 0;
116
- }
117
- .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell .jetlinks-edit-table-header-cell-box {
118
- padding: 0 12px;
119
- width: 100%;
120
- }
121
- .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell .jetlinks-edit-table-header-cell-box.header-cell-box-tool {
122
- display: flex;
123
- justify-content: space-between;
124
- align-items: center;
125
- }
126
- .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell .jetlinks-edit-table-header-cell-box .table-header-cell-title {
127
- flex: 1;
128
- display: flex;
129
- align-items: center;
130
- font-weight: 600;
131
- gap: 4px;
132
- }
133
- .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell .jetlinks-edit-table-header-cell-box .table-header-cell-title .cell-title-box {
134
- flex: 1 1 auto;
135
- }
136
- .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell .jetlinks-edit-table-header-cell-box .header-cell-required {
137
- color: #ff4d4f;
138
- padding-left: 8px;
139
- transform: translateY(3px);
140
- font-weight: 500;
141
- }
142
- .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell .jetlinks-edit-table-header-cell-box::before {
143
- position: absolute;
144
- top: 50%;
145
- right: 1px;
146
- width: 1px;
147
- height: 1.6em;
148
- pointer-events: none;
149
- background-color: rgba(0, 0, 0, 0.06);
150
- transform: translateY(-50%);
151
- transition: background-color 0.3s;
152
- content: "";
153
- }
154
- .jetlinks-edit-table-header-container .jetlinks-edit-table-header-cell .jetlinks-edit-table-header-cell-box:not(:last-child)::before {
155
- background-color: transparent;
156
- }
157
- .jetlinks-table-search .jetlinks-table-search-header {
158
- display: flex;
159
- justify-content: space-between;
160
- }
161
- .jetlinks-table-search .jetlinks-table-search-header .jetlinks-drag-modal-footer {
162
- display: none;
163
- }
164
- .jetlinks-table-search .jetlinks-table-search-header .jetlinks-table-search-result-total {
165
- color: #1890ff;
166
- }
167
- .jetlinks-table-group-warp .ant-tabs-nav {
168
- margin-bottom: 0;
169
- }
170
- .jetlinks-table-group-warp .ant-tabs-nav .ant-tabs-tab {
171
- overflow: hidden;
172
- position: relative;
173
- }
174
- .jetlinks-table-group-warp .ant-tabs-nav .ant-tabs-tab-active {
175
- background-color: #BAE0FF !important;
176
- border-color: #91CAFF !important;
177
- }
178
- .jetlinks-table-group-warp .ant-tabs-nav .ant-tabs-nav-add {
179
- border: none;
180
- }
181
- .jetlinks-table-group-error-warp {
182
- color: #1a1a1a !important;
183
- }
184
- .jetlinks-table-group-error-warp .table-group-error-target {
185
- position: absolute;
186
- right: 0;
187
- top: 0;
188
- border: 16px solid transparent;
189
- border-top-color: #ff4d4f;
190
- border-right-width: 0;
191
- border-bottom-width: 0;
192
- }
193
- .jetlinks-table-form-error-target {
194
- position: absolute;
195
- right: 2px;
196
- top: -9px;
197
- border: 16px solid transparent;
198
- border-top-color: #ff4d4f;
199
- border-right-width: 0;
200
- border-bottom-width: 0;
201
- }
202
- .jetlinks-edit-table-form-has-error .select-no-value .ant-select-selector {
203
- border-color: #ff4d4f !important;
204
- }
205
- .jetlinks-edit-table-form-has-error .select-no-value .ant-select-selector:focus {
206
- box-shadow: 0 0 0 2px var(--ant-error-color-outline) !important;
207
- }
208
- .jetlinks-edit-table-form-has-error > input {
209
- border-color: #ff4d4f !important;
210
- }
211
- .jetlinks-edit-table-form-has-error > input:focus {
212
- box-shadow: 0 0 0 2px var(--ant-error-color-outline) !important;
213
- }
214
- .jetlinks-edit-table-form-has-error .jetlinks-table-form-required-aicon {
215
- color: #ff4d4f;
216
- }
217
- .jetlinks-edit-table-context-menu {
218
- position: fixed;
219
- box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
220
- border-radius: 4px;
221
- overflow: hidden;
222
- width: 192px;
223
- padding: 4px;
224
- background-color: #fff;
225
- }
226
- .jetlinks-edit-table-context-menu .ant-menu {
227
- border-right: none;
228
- }
229
- .jetlinks-edit-table-context-menu .ant-menu .ant-menu-item {
230
- margin: 0;
231
- height: 32px;
232
- }
233
- .jetlinks-edit-table-context-menu .ant-menu .ant-menu-item.danger {
234
- color: #ff4d4f;
235
- }
236
- .jetlinks-edit-table-context-menu .ant-menu-item-active {
237
- background-color: var(--ant-primary-1);
238
- }
239
- .edit-table-search-header {
240
- display: flex;
241
- justify-content: space-between;
242
- }
243
- .edit-table-search-result-total {
244
- color: #1890ff;
245
- }
246
- .jetlinks-edit-table-horizontal-scroll {
247
- height: 17px;
248
- width: 100%;
249
- display: flex;
250
- position: relative;
251
- z-index: 4;
252
- }
253
- .jetlinks-edit-table-horizontal-scroll .jetlinks-edit-table-horizontal-scroll-viewport {
254
- overflow-y: hidden;
255
- overflow-x: scroll;
256
- position: relative;
257
- flex: 1 1 0;
258
- height: 17px;
259
- width: 100%;
260
- }
261
- .jetlinks-edit-table-horizontal-scroll .jetlinks-edit-table-horizontal-scroll-viewport > div {
262
- height: 17px;
263
- }
264
- .jetlinks-edit-table-horizontal-scroll .jetlinks-edit-table-horizontal-scroll-hidden {
265
- height: 100%;
266
- overflow-x: hidden;
267
- }
@@ -1,41 +0,0 @@
1
- @import "ant-design-vue/es/style/themes/index.less";
2
- @import "./table.less";
3
- @import "./body.less";
4
- @import "./header.less";
5
- @import "./group.less";
6
- @import "./form.less";
7
- @import "./menu.less";
8
-
9
- .edit-table-search-header {
10
- display: flex;
11
- justify-content: space-between;
12
- }
13
-
14
- .edit-table-search-result-total {
15
- color: @primary-color;
16
- }
17
-
18
- .jetlinks-edit-table-horizontal-scroll {
19
- height: 17px;
20
- width: 100%;
21
- display: flex;
22
- position: relative;
23
- z-index: 4;
24
-
25
- .jetlinks-edit-table-horizontal-scroll-viewport {
26
- overflow-y: hidden;
27
- overflow-x: scroll;
28
- position: relative;
29
- flex: 1 1 0;
30
- height: 17px;
31
- width: 100%;
32
-
33
- > div {
34
- height: 17px;
35
- }
36
- }
37
-
38
- .jetlinks-edit-table-horizontal-scroll-hidden {
39
- height: 100%; overflow-x: hidden;
40
- }
41
- }
@@ -1,25 +0,0 @@
1
- .jetlinks-edit-table-context-menu{
2
- position: fixed;
3
- box-shadow: 0 0 12px rgba(0, 0, 0 ,.2);
4
- border-radius: 4px;
5
- overflow: hidden;
6
- width: 192px;
7
- padding: 4px;
8
- background-color: #fff;
9
- .ant-menu {
10
- border-right: none;
11
-
12
- .ant-menu-item {
13
- margin: 0;
14
- height: 32px;
15
-
16
- &.danger {
17
- color: @error-color;
18
- }
19
- }
20
- }
21
-
22
- .ant-menu-item-active {
23
- background-color: var(--ant-primary-1);;
24
- }
25
- }
@@ -1,47 +0,0 @@
1
- .jetlinks-edit-table-wrapper {
2
- background: #fff;
3
- height: 100%;
4
- position: relative;
5
-
6
- &.table-full-screen {
7
- padding: 24px;
8
- }
9
-
10
- .jetlinks-edit-table {
11
- display: flex;
12
- flex-direction: column;
13
- flex-grow: 0;
14
- flex-shrink: 0;
15
- background: #fafafa;
16
- transition: background-color .3s ease;
17
- overflow: auto hidden;
18
-
19
- .jetlinks-edit-table-header {
20
- overflow: hidden;
21
- width: 100%;
22
- }
23
-
24
- .jetlinks-edit-table-body {
25
- background-color: #fff;
26
- overflow-y: hidden;
27
- position: relative;
28
- height: 100%;
29
- width: 100%;
30
- flex: 1 1 auto;
31
- flex-direction: row;
32
- }
33
-
34
- .jetlinks-table-horizontal-scroll {
35
- width: 100%;
36
- height: 15px;
37
- min-height: 15px;
38
- max-height: 15px;
39
- display: flex;
40
-
41
- .jetlinks-table-horizontal-scroll-bar {
42
- height: 100%;
43
- overflow-x: scroll;
44
- }
45
- }
46
- }
47
- }
@@ -1,17 +0,0 @@
1
- .j-ellipsis {
2
- overflow: hidden;
3
- vertical-align: bottom;
4
- }
5
- .j-ellipsis-cursor {
6
- cursor: pointer;
7
- }
8
- .j-ellipsis-line-clamp {
9
- display: -webkit-box;
10
- -webkit-box-orient: vertical;
11
- word-break: break-all;
12
- }
13
- .j-ellipsis-deep {
14
- max-height: 380px;
15
- -webkit-line-clamp: 17;
16
- text-overflow: ellipsis;
17
- }
@@ -1,20 +0,0 @@
1
- .j-ellipsis {
2
- overflow: hidden;
3
- vertical-align: bottom;
4
- }
5
-
6
- .j-ellipsis-cursor {
7
- cursor: pointer;
8
- }
9
-
10
- .j-ellipsis-line-clamp {
11
- display: -webkit-box;
12
- -webkit-box-orient: vertical;
13
- word-break: break-all;
14
- }
15
-
16
- .j-ellipsis-deep {
17
- max-height: 380px;
18
- -webkit-line-clamp: 17;
19
- text-overflow: ellipsis;
20
- }
@@ -1,242 +0,0 @@
1
- function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) {
2
- const op = ops[i];
3
- const fn = ops[i + 1];
4
- i += 2;
5
- if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
6
- return undefined;
7
- }
8
- if (op === 'access' || op === 'optionalAccess') {
9
- lastAccessLHS = value;
10
- value = fn(value);
11
- }
12
- else if (op === 'call' || op === 'optionalCall') {
13
- value = fn((...args) => value.call(lastAccessLHS, ...args));
14
- lastAccessLHS = undefined;
15
- }
16
- } return value; }
17
- /* Analyzed bindings: {
18
- "modelValue": "props",
19
- "theme": "props",
20
- "language": "props",
21
- "codeTips": "props",
22
- "init": "props",
23
- "registrationTips": "props",
24
- "registrationTypescript": "props",
25
- "blurFormat": "props",
26
- "readOnly": "props",
27
- "options": "props",
28
- "ref": "setup-const",
29
- "onMounted": "setup-const",
30
- "watch": "setup-const",
31
- "onUnmounted": "setup-const",
32
- "toRaw": "setup-const",
33
- "nextTick": "setup-const",
34
- "monaco": "setup-const",
35
- "omit": "setup-maybe-ref",
36
- "props": "setup-reactive-const",
37
- "emit": "setup-const",
38
- "dom": "setup-ref",
39
- "instance": "setup-let",
40
- "monacoProviderRef": "setup-ref",
41
- "monacoTypescriptProviderRef": "setup-ref",
42
- "handleSuggestions": "setup-const",
43
- "disposeRegister": "setup-const",
44
- "registerCompletionItemProvider": "setup-const",
45
- "disposeTypescript": "setup-const",
46
- "registerTypescript": "setup-const",
47
- "editorFormat": "setup-const",
48
- "insert": "setup-const"
49
- } */
50
- import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
51
- import { ref, onMounted, watch, onUnmounted, nextTick } from 'vue';
52
- import * as monaco from 'monaco-editor';
53
- import { omit } from 'lodash-es';
54
- const __sfc_main__ = Object.assign({
55
- name: 'JMonacoEditor'
56
- }, {
57
- props: {
58
- modelValue: [String, Number],
59
- theme: { type: String, default: 'vs-dark' },
60
- language: { type: String, default: 'json' },
61
- codeTips: { type: Array, default: () => [] },
62
- init: { type: Function, default: undefined },
63
- registrationTips: { type: Object, default: () => ({}) },
64
- registrationTypescript: { type: Object, default: () => ({}) },
65
- blurFormat: { type: Boolean, default: true },
66
- readOnly: { type: Boolean, default: false },
67
- options: { type: Object, default: () => ({}) },
68
- },
69
- emits: [
70
- 'update:modelValue',
71
- 'blur',
72
- 'focus',
73
- 'change',
74
- 'errorChange',
75
- ],
76
- setup(__props, { expose: __expose, emit: __emit }) {
77
- const props = __props;
78
- const emit = __emit;
79
- const dom = ref();
80
- let instance;
81
- const monacoProviderRef = ref();
82
- const monacoTypescriptProviderRef = ref();
83
- // codeTipItem.dispose() // 销毁自定义提示
84
- const handleSuggestions = (suggestions, range) => {
85
- return Array.isArray(suggestions)
86
- ? suggestions.map((item) => ({ ...item, range }))
87
- : [];
88
- };
89
- const disposeRegister = () => {
90
- _optionalChain([monacoProviderRef, 'access', _ => _.value, 'optionalAccess', _2 => _2.dispose, 'call', _3 => _3()]);
91
- monacoProviderRef.value = null;
92
- };
93
- /**
94
- * 代码提示注册
95
- */
96
- const registerCompletionItemProvider = () => {
97
- disposeRegister();
98
- if (monaco.languages && _optionalChain([props, 'access', _4 => _4.registrationTips, 'optionalAccess', _5 => _5.suggestions])) {
99
- const { name, suggestions } = props.registrationTips;
100
- monacoProviderRef.value =
101
- monaco.languages.registerCompletionItemProvider(name || 'json', {
102
- provideCompletionItems: function (model, position) {
103
- const word = model.getWordUntilPosition(position); // 获取提示代码范围位置
104
- const range = {
105
- startLineNumber: position.lineNumber,
106
- endLineNumber: position.lineNumber,
107
- startColumn: word.startColumn,
108
- endColumn: word.endColumn,
109
- };
110
- return {
111
- suggestions: handleSuggestions(suggestions, range),
112
- };
113
- },
114
- });
115
- }
116
- };
117
- const disposeTypescript = () => {
118
- _optionalChain([monacoTypescriptProviderRef, 'access', _6 => _6.value, 'optionalAccess', _7 => _7.dispose, 'call', _8 => _8()]);
119
- monacoTypescriptProviderRef.value = null;
120
- };
121
- const registerTypescript = () => {
122
- disposeTypescript();
123
- if (monaco.languages && _optionalChain([props, 'access', _9 => _9.registrationTypescript, 'optionalAccess', _10 => _10.typescript])) {
124
- const { name, typescript } = props.registrationTypescript;
125
- monacoTypescriptProviderRef.value =
126
- monaco.languages.typescript.javascriptDefaults.addExtraLib(typescript);
127
- }
128
- };
129
- /**
130
- * 代码格式化
131
- */
132
- const editorFormat = () => {
133
- if (!instance)
134
- return;
135
- setTimeout(() => {
136
- _optionalChain([instance, 'access', _11 => _11.getAction, 'call', _12 => _12('editor.action.formatDocument'), 'optionalAccess', _13 => _13.run, 'call', _14 => _14()]);
137
- }, 300);
138
- if (props.hasOwnProperty('readOnly')) {
139
- setTimeout(() => {
140
- instance.updateOptions({
141
- readOnly: props.readOnly !== false,
142
- });
143
- }, 400);
144
- }
145
- };
146
- monaco.editor.onDidChangeMarkers(([uri]) => {
147
- const markers = monaco.editor.getModelMarkers({ resource: uri });
148
- emit('errorChange', markers);
149
- });
150
- onMounted(async () => {
151
- const _model = monaco.editor.createModel(props.modelValue, props.language);
152
- instance = monaco.editor.create(dom.value, {
153
- model: _model,
154
- tabSize: 2,
155
- automaticLayout: true,
156
- scrollBeyondLastLine: false,
157
- theme: props.theme,
158
- formatOnPaste: true,
159
- ...(omit(props.options, ['readOnly']) || {}),
160
- });
161
- instance.onDidChangeModelContent(() => {
162
- //
163
- const value = instance.getValue();
164
- nextTick(() => {
165
- emit('update:modelValue', value);
166
- emit('change', value);
167
- });
168
- });
169
- instance.onDidBlurEditorText(() => {
170
- emit('blur');
171
- if (props.blurFormat) {
172
- editorFormat();
173
- }
174
- });
175
- instance.onDidFocusEditorText(() => {
176
- emit('focus');
177
- });
178
- if (props.modelValue) {
179
- setTimeout(() => {
180
- editorFormat();
181
- }, 200);
182
- }
183
- _optionalChain([props, 'access', _15 => _15.init, 'optionalCall', _16 => _16(instance, monaco)]);
184
- });
185
- /**
186
- * 光标位置插入内容
187
- * @param {String} val
188
- * @param position
189
- */
190
- const insert = (val, position) => {
191
- if (!instance)
192
- return;
193
- const _position = position || instance.getPosition();
194
- const value = instance.getValue();
195
- if (position && position.lineNumber) {
196
- instance.setPosition(position);
197
- }
198
- instance.executeEdits(value, [
199
- {
200
- range: new monaco.Range(_optionalChain([_position, 'optionalAccess', _17 => _17.lineNumber]), _optionalChain([_position, 'optionalAccess', _18 => _18.column]), _optionalChain([_position, 'optionalAccess', _19 => _19.lineNumber]), _optionalChain([_position, 'optionalAccess', _20 => _20.column])),
201
- text: val,
202
- },
203
- ]);
204
- };
205
- watch(() => props.modelValue, (val) => {
206
- if (!instance ||
207
- (instance &&
208
- props.modelValue === instance.getValue()))
209
- return;
210
- // setValue之前获取光标位置
211
- const position = instance.getPosition();
212
- // setValue之后光标位置改变
213
- instance.setValue(val);
214
- // 设置光标位置为setValue之前的位置
215
- instance.setPosition(position);
216
- editorFormat();
217
- });
218
- watch(() => JSON.stringify(props.registrationTips), () => {
219
- registerCompletionItemProvider();
220
- }, { immediate: true });
221
- watch(() => JSON.stringify(props.registrationTypescript), () => {
222
- registerTypescript();
223
- }, { immediate: true });
224
- onUnmounted(() => {
225
- disposeRegister();
226
- disposeTypescript();
227
- _optionalChain([instance, 'access', _21 => _21.editor, 'optionalAccess', _22 => _22.dispose, 'optionalCall', _23 => _23()]);
228
- });
229
- __expose({
230
- editorFormat,
231
- insert,
232
- });
233
- return (_ctx, _cache) => {
234
- return (_openBlock(), _createElementBlock("div", {
235
- ref_key: "dom",
236
- ref: dom,
237
- class: "j-monaco-editor"
238
- }, null, 512 /* NEED_PATCH */));
239
- };
240
- }
241
- });
242
- export default __sfc_main__;
@@ -1,5 +0,0 @@
1
- import Monaco from './Monaco.js';
2
- Monaco.install = function (app) {
3
- app.component(Monaco.name, Monaco);
4
- };
5
- export default Monaco;
@@ -1,4 +0,0 @@
1
- .j-monaco-editor {
2
- min-height: 50px;
3
- height: 100%;
4
- }
@@ -1 +0,0 @@
1
- import './index.less';
@@ -1,4 +0,0 @@
1
- .j-monaco-editor {
2
- min-height: 50px;
3
- height: 100%;
4
- }