@dckj-npm/dc-material 0.1.147 → 0.1.149

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 (276) hide show
  1. package/build/lowcode/assets-daily.json +13 -13
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +13 -13
  4. package/build/lowcode/meta.design.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.js +1 -1
  8. package/es/components/bottom-navigation/bottom-navigation.d.ts +15 -0
  9. package/es/components/bottom-navigation/index.d.ts +3 -0
  10. package/es/components/button/button.d.ts +14 -0
  11. package/es/components/button/index.d.ts +6 -0
  12. package/es/components/carousel/carousel.d.ts +14 -0
  13. package/es/components/colorful-button/colorful-button.d.ts +12 -0
  14. package/es/components/colorful-button/index.d.ts +3 -0
  15. package/es/components/colorful-input/colorful-input.d.ts +8 -0
  16. package/es/components/colorful-input/index.d.ts +3 -0
  17. package/es/components/form/form-item.d.ts +42 -0
  18. package/es/components/form/form.d.ts +57 -0
  19. package/es/components/form/form.js +46 -0
  20. package/es/components/form/index.d.ts +6 -0
  21. package/es/components/form/index.js +6 -0
  22. package/es/components/form/index.scss +22 -0
  23. package/es/components/form/next-wrapper.d.ts +54 -0
  24. package/es/components/form/next-wrapper.js +43 -0
  25. package/es/components/goods-card-list/goods-card-list-common.d.ts +5 -0
  26. package/es/components/goods-card-list/goods-card-list-common.js +60 -0
  27. package/es/components/goods-card-list/goods-card-list-common.scss +118 -0
  28. package/es/components/goods-card-list/goods-card-list.d.ts +5 -0
  29. package/es/components/goods-card-list/goods-card-list.js +156 -0
  30. package/es/components/goods-card-list/goods-card-list.scss +112 -0
  31. package/es/components/goods-card-list/index.d.ts +4 -0
  32. package/es/components/goods-card-list/index.js +3 -0
  33. package/es/components/goods-card-list/types.d.ts +45 -0
  34. package/es/components/goods-card-list/types.js +1 -0
  35. package/es/components/grid-nav/grid-nav.d.ts +13 -0
  36. package/es/components/grid-nav/grid-nav.js +102 -0
  37. package/es/components/grid-nav/index.d.ts +3 -0
  38. package/es/components/grid-nav/index.js +2 -0
  39. package/es/components/grid-nav/index.scss +50 -0
  40. package/es/components/integral-task/index.d.ts +6 -0
  41. package/es/components/integral-task/index.js +5 -0
  42. package/es/components/integral-task/index.scss +35 -0
  43. package/es/components/integral-task/integral-task.d.ts +40 -0
  44. package/es/components/integral-task/integral-task.js +54 -0
  45. package/es/components/menu-list/index.d.ts +6 -0
  46. package/es/components/menu-list/index.js +6 -0
  47. package/es/components/menu-list/index.scss +16 -0
  48. package/es/components/menu-list/menu-list-item.d.ts +5 -0
  49. package/es/components/menu-list/menu-list-item.js +32 -0
  50. package/es/components/menu-list/menu-list-item.scss +49 -0
  51. package/es/components/menu-list/menu-list.d.ts +5 -0
  52. package/es/components/menu-list/menu-list.js +25 -0
  53. package/es/components/menu-list/types.d.ts +23 -0
  54. package/es/components/menu-list/types.js +1 -0
  55. package/es/components/message-list/index.d.ts +6 -0
  56. package/es/components/message-list/index.js +6 -0
  57. package/es/components/message-list/index.scss +22 -0
  58. package/es/components/message-list/message-list-item.d.ts +33 -0
  59. package/es/components/message-list/message-list-item.js +41 -0
  60. package/es/components/message-list/message-list-item.scss +60 -0
  61. package/es/components/message-list/message-list.d.ts +28 -0
  62. package/es/components/message-list/message-list.js +53 -0
  63. package/es/components/notice-bar/index.d.ts +3 -0
  64. package/es/components/notice-bar/index.js +2 -0
  65. package/es/components/notice-bar/index.scss +84 -0
  66. package/es/components/notice-bar/notice-bar-item.d.ts +18 -0
  67. package/es/components/notice-bar/notice-bar-item.js +30 -0
  68. package/es/components/notice-bar/notice-bar-item.scss +26 -0
  69. package/es/components/notice-bar/notice-bar.d.ts +46 -0
  70. package/es/components/notice-bar/notice-bar.js +57 -0
  71. package/es/components/position/entity.d.ts +5 -0
  72. package/es/components/position/entity.js +1 -0
  73. package/es/components/position/index.d.ts +3 -0
  74. package/es/components/position/index.js +2 -0
  75. package/es/components/position/index.scss +27 -0
  76. package/es/components/position/position-left.d.ts +9 -0
  77. package/es/components/position/position-left.js +28 -0
  78. package/es/components/position/position-list.d.ts +11 -0
  79. package/es/components/position/position-list.js +29 -0
  80. package/es/components/position/position.d.ts +8 -0
  81. package/es/components/position/position.js +48 -0
  82. package/es/components/radio-group/index.d.ts +8 -0
  83. package/es/components/radio-group/index.js +7 -0
  84. package/es/components/radio-group/index.scss +40 -0
  85. package/es/components/radio-group/radio-group-item.d.ts +48 -0
  86. package/es/components/radio-group/radio-group-item.js +74 -0
  87. package/es/components/radio-group/radio-group.d.ts +52 -0
  88. package/es/components/radio-group/radio-group.js +80 -0
  89. package/es/components/rich-text/index.d.ts +6 -0
  90. package/es/components/rich-text/index.js +6 -0
  91. package/es/components/rich-text/index.scss +19 -0
  92. package/es/components/rich-text/rich-text.d.ts +14 -0
  93. package/es/components/rich-text/rich-text.js +37 -0
  94. package/es/components/search-bar/index.d.ts +3 -0
  95. package/es/components/search-bar/index.js +2 -0
  96. package/es/components/search-bar/index.scss +39 -0
  97. package/es/components/search-bar/search-bar.d.ts +10 -0
  98. package/es/components/search-bar/search-bar.js +73 -0
  99. package/es/components/stream-list/index.d.ts +6 -0
  100. package/es/components/stream-list/index.js +6 -0
  101. package/es/components/stream-list/index.scss +26 -0
  102. package/es/components/stream-list/stream-list.d.ts +54 -0
  103. package/es/components/stream-list/stream-list.js +159 -0
  104. package/es/components/swiper/index.d.ts +3 -0
  105. package/es/components/swiper/index.js +2 -0
  106. package/es/components/swiper/index.scss +33 -0
  107. package/es/components/swiper/swiper.d.ts +26 -0
  108. package/es/components/swiper/swiper.js +77 -0
  109. package/es/components/tab/index.d.ts +6 -0
  110. package/es/components/tab/index.js +5 -0
  111. package/es/components/tab/index.scss +39 -0
  112. package/es/components/tab/tab.d.ts +27 -0
  113. package/es/components/tab/tab.js +50 -0
  114. package/es/components/tab-container/index.d.ts +3 -0
  115. package/es/components/tab-container/index.js +2 -0
  116. package/es/components/tab-container/index.scss +48 -0
  117. package/es/components/tab-container/tab-container.d.ts +10 -0
  118. package/es/components/tab-container/tab-container.js +26 -0
  119. package/es/components/tab-container-item/index.d.ts +3 -0
  120. package/es/components/tab-container-item/index.js +2 -0
  121. package/es/components/tab-container-item/index.scss +0 -0
  122. package/es/components/tab-container-item/tab-container-item.d.ts +11 -0
  123. package/es/components/tab-container-item/tab-container-item.js +19 -0
  124. package/es/components/tag/index.d.ts +6 -0
  125. package/es/components/tag/index.js +5 -0
  126. package/es/components/tag/index.scss +24 -0
  127. package/es/components/tag/tag.d.ts +14 -0
  128. package/es/components/tag/tag.js +14 -0
  129. package/es/components/teletext-list/index.d.ts +6 -0
  130. package/es/components/teletext-list/index.js +6 -0
  131. package/es/components/teletext-list/index.scss +40 -0
  132. package/es/components/teletext-list/teletext-list-item.d.ts +33 -0
  133. package/es/components/teletext-list/teletext-list-item.js +61 -0
  134. package/es/components/teletext-list/teletext-list-item.scss +57 -0
  135. package/es/components/teletext-list/teletext-list.d.ts +61 -0
  136. package/es/components/teletext-list/teletext-list.js +48 -0
  137. package/es/components/title/index.d.ts +8 -0
  138. package/es/components/title/index.js +7 -0
  139. package/es/components/title/title-1.d.ts +10 -0
  140. package/es/components/title/title-1.js +16 -0
  141. package/es/components/title/title-1.scss +25 -0
  142. package/es/components/title/title-2.d.ts +18 -0
  143. package/es/components/title/title-2.js +31 -0
  144. package/es/components/title/title-2.scss +22 -0
  145. package/es/entity/dynamic-column-data-type.d.ts +47 -0
  146. package/es/entity/dynamic-column-data-type.js +165 -0
  147. package/es/index.d.ts +46 -0
  148. package/es/index.js +86 -0
  149. package/es/index.scss +6 -0
  150. package/es/style.js +4 -0
  151. package/es/utils/children-node-handle.d.ts +9 -0
  152. package/es/utils/children-node-handle.js +25 -0
  153. package/es/utils/component-wrapper.d.ts +9 -0
  154. package/es/utils/component-wrapper.js +38 -0
  155. package/es/utils/debounce.d.ts +1 -0
  156. package/es/utils/debounce.js +14 -0
  157. package/es/utils/textUtil.d.ts +10 -0
  158. package/es/utils/textUtil.js +51 -0
  159. package/es/utils/time-util.d.ts +5 -0
  160. package/es/utils/time-util.js +18 -0
  161. package/es/variables.d.ts +2 -0
  162. package/es/variables.js +2 -0
  163. package/es/variables.scss +3 -0
  164. package/lib/assets/icon/grid-nav/right.png +0 -0
  165. package/lib/assets/icon/position/img.png +0 -0
  166. package/lib/assets/icon/position/location.png +0 -0
  167. package/lib/assets/icon/search/delete.png +0 -0
  168. package/lib/assets/icon/search/search.png +0 -0
  169. package/lib/assets/icon/teletext-list/arr.png +0 -0
  170. package/lib/components/bottom-navigation/bottom-navigation.d.ts +15 -0
  171. package/lib/components/bottom-navigation/index.d.ts +3 -0
  172. package/lib/components/button/button.d.ts +14 -0
  173. package/lib/components/button/index.d.ts +6 -0
  174. package/lib/components/carousel/carousel.d.ts +14 -0
  175. package/lib/components/colorful-button/colorful-button.d.ts +12 -0
  176. package/lib/components/colorful-button/index.d.ts +3 -0
  177. package/lib/components/colorful-input/colorful-input.d.ts +8 -0
  178. package/lib/components/colorful-input/index.d.ts +3 -0
  179. package/lib/components/form/form-item.d.ts +42 -0
  180. package/lib/components/form/form-item.js +86 -0
  181. package/lib/components/form/form-item.scss +20 -0
  182. package/lib/components/form/form.d.ts +57 -0
  183. package/lib/components/form/form.js +49 -0
  184. package/lib/components/form/index.d.ts +6 -0
  185. package/lib/components/form/index.js +6 -0
  186. package/lib/components/form/index.scss +22 -0
  187. package/lib/components/form/next-wrapper.d.ts +54 -0
  188. package/lib/components/form/next-wrapper.js +49 -0
  189. package/lib/components/goods-card-list/goods-card-list-common.d.ts +5 -0
  190. package/lib/components/goods-card-list/goods-card-list.d.ts +5 -0
  191. package/lib/components/goods-card-list/index.d.ts +4 -0
  192. package/lib/components/goods-card-list/types.d.ts +45 -0
  193. package/lib/components/grid-nav/grid-nav.d.ts +13 -0
  194. package/lib/components/grid-nav/grid-nav.js +15 -4
  195. package/lib/components/grid-nav/index.d.ts +3 -0
  196. package/lib/components/grid-nav/index.scss +27 -18
  197. package/lib/components/integral-task/index.d.ts +6 -0
  198. package/lib/components/integral-task/integral-task.d.ts +40 -0
  199. package/lib/components/menu-list/index.d.ts +6 -0
  200. package/lib/components/menu-list/menu-list-item.d.ts +5 -0
  201. package/lib/components/menu-list/menu-list.d.ts +5 -0
  202. package/lib/components/menu-list/types.d.ts +23 -0
  203. package/lib/components/message-list/index.d.ts +6 -0
  204. package/lib/components/message-list/message-list-item.d.ts +33 -0
  205. package/lib/components/message-list/message-list-item.scss +1 -1
  206. package/lib/components/message-list/message-list.d.ts +28 -0
  207. package/lib/components/notice-bar/index.d.ts +3 -0
  208. package/lib/components/notice-bar/index.scss +56 -14
  209. package/lib/components/notice-bar/notice-bar-item.d.ts +18 -0
  210. package/lib/components/notice-bar/notice-bar-item.js +6 -5
  211. package/lib/components/notice-bar/notice-bar-item.scss +1 -1
  212. package/lib/components/notice-bar/notice-bar.d.ts +46 -0
  213. package/lib/components/notice-bar/notice-bar.js +28 -56
  214. package/lib/components/position/entity.d.ts +5 -0
  215. package/lib/components/position/index.d.ts +3 -0
  216. package/lib/components/position/position-left.d.ts +9 -0
  217. package/lib/components/position/position-list.d.ts +11 -0
  218. package/lib/components/position/position-list.js +2 -3
  219. package/lib/components/position/position.d.ts +8 -0
  220. package/lib/components/radio-group/index.d.ts +8 -0
  221. package/lib/components/radio-group/radio-group-item.d.ts +48 -0
  222. package/lib/components/radio-group/radio-group.d.ts +52 -0
  223. package/lib/components/rich-text/index.d.ts +6 -0
  224. package/lib/components/rich-text/rich-text.d.ts +14 -0
  225. package/lib/components/search-bar/index.d.ts +3 -0
  226. package/lib/components/search-bar/index.scss +36 -10
  227. package/lib/components/search-bar/search-bar.d.ts +10 -0
  228. package/lib/components/search-bar/search-bar.js +67 -27
  229. package/lib/components/stream-list/index.d.ts +6 -0
  230. package/lib/components/stream-list/index.js +6 -0
  231. package/lib/components/stream-list/index.scss +26 -0
  232. package/lib/components/stream-list/stream-list.d.ts +54 -0
  233. package/lib/components/stream-list/stream-list.js +166 -0
  234. package/lib/components/swiper/index.d.ts +3 -0
  235. package/lib/components/swiper/index.scss +29 -8
  236. package/lib/components/swiper/swiper.d.ts +26 -0
  237. package/lib/components/swiper/swiper.js +60 -19
  238. package/lib/components/tab/index.d.ts +6 -0
  239. package/lib/components/tab/tab.d.ts +27 -0
  240. package/lib/components/tab-container/index.d.ts +3 -0
  241. package/lib/components/tab-container/tab-container.d.ts +10 -0
  242. package/lib/components/tab-container-item/index.d.ts +3 -0
  243. package/lib/components/tab-container-item/tab-container-item.d.ts +11 -0
  244. package/lib/components/tag/index.d.ts +6 -0
  245. package/lib/components/tag/tag.d.ts +14 -0
  246. package/lib/components/teletext-list/index.d.ts +6 -0
  247. package/lib/components/teletext-list/index.scss +21 -0
  248. package/lib/components/teletext-list/teletext-list-item.d.ts +33 -0
  249. package/lib/components/teletext-list/teletext-list-item.scss +4 -2
  250. package/lib/components/teletext-list/teletext-list.d.ts +61 -0
  251. package/lib/components/teletext-list/teletext-list.js +17 -7
  252. package/lib/components/title/index.d.ts +8 -0
  253. package/lib/components/title/title-1.d.ts +10 -0
  254. package/lib/components/title/title-2.d.ts +18 -0
  255. package/lib/entity/dynamic-column-data-type.d.ts +47 -0
  256. package/lib/entity/dynamic-column-data-type.js +169 -0
  257. package/lib/index.d.ts +46 -0
  258. package/lib/index.js +9 -1
  259. package/lib/style.js +1 -2
  260. package/lib/utils/children-node-handle.d.ts +9 -0
  261. package/lib/utils/component-wrapper.d.ts +9 -0
  262. package/lib/utils/debounce.d.ts +1 -0
  263. package/lib/utils/textUtil.d.ts +10 -0
  264. package/lib/utils/textUtil.js +55 -0
  265. package/lib/utils/time-util.d.ts +5 -0
  266. package/lib/variables.d.ts +2 -0
  267. package/lowcode/{d-c-form → form}/meta.ts +6 -6
  268. package/lowcode_es/{d-c-form → form}/meta.js +6 -6
  269. package/lowcode_es/meta.js +3 -3
  270. package/lowcode_lib/{d-c-form → form}/meta.js +6 -6
  271. package/lowcode_lib/meta.js +3 -3
  272. package/package.json +3 -3
  273. package/lib/components/notice-bar/components/ScrollSwitcher.js +0 -52
  274. package/lib/components/notice-bar/components/ScrollSwitcher.scss +0 -17
  275. /package/lowcode_es/{d-c-form → form}/meta.d.ts +0 -0
  276. /package/lowcode_lib/{d-c-form → form}/meta.d.ts +0 -0
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import './message-list-item.scss';
3
+ /**
4
+ * 数据
5
+ */
6
+ export interface DataProps {
7
+ /**
8
+ * 标题
9
+ */
10
+ title?: string;
11
+ /**
12
+ * 图片地址
13
+ */
14
+ image?: string;
15
+ /**
16
+ * 说明
17
+ */
18
+ description?: string;
19
+ /**
20
+ * 发布时间
21
+ */
22
+ gmtCreate?: string;
23
+ /**
24
+ * 点击事件
25
+ */
26
+ onClick?: (e: any) => void;
27
+ /**
28
+ * 是否已读
29
+ */
30
+ isRead?: boolean;
31
+ }
32
+ declare const MessageListItem: React.FC<DataProps>;
33
+ export default MessageListItem;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ import { DataProps } from './message-list-item';
4
+ export interface MessageListProps {
5
+ /**
6
+ * 全部的数据
7
+ */
8
+ dataList?: DataProps[];
9
+ /**
10
+ * 点击事件
11
+ * @param e
12
+ */
13
+ onClick?: (e: any) => void;
14
+ /**
15
+ * 子节点
16
+ */
17
+ children: React.ReactChild;
18
+ /**
19
+ * 图片
20
+ */
21
+ images: string[];
22
+ /**
23
+ * 切换数据源
24
+ */
25
+ handleDataList: (key: string) => DataProps[];
26
+ }
27
+ declare const MessageList: React.FC<MessageListProps>;
28
+ export default MessageList;
@@ -0,0 +1,3 @@
1
+ import NoticeBar from './notice-bar';
2
+ export type { NoticeBarProps } from './notice-bar';
3
+ export default NoticeBar;
@@ -2,41 +2,83 @@
2
2
  width: 100%;
3
3
  display: flex;
4
4
  align-items: center;
5
+ justify-content: space-between;
5
6
  height: 70px;
6
7
  box-shadow: 0px 2px 6px 0px rgba(0,0,0,0.07);
7
8
  margin: 0;
8
- padding: 0 10px;
9
+ padding: 10px;
9
10
  border-radius: 12px;
10
11
  box-sizing: border-box;
11
12
  .notice-bar__panel__item-img {
12
13
  width: 46px;
13
14
  margin-right: 7px;
15
+ }
16
+ .notice-bar__panel__item-more {
17
+ width: 60px;
18
+ height: 100%;
19
+ //background: pink;
20
+ cursor: pointer;
21
+
22
+ &-more {
23
+ flex-shrink: 0;
24
+ cursor: pointer;
25
+ display: flex;
26
+ justify-content: end;
27
+ align-items: center;
14
28
 
29
+ &-text {
30
+ font-weight: 500;
31
+ font-size: 11px;
32
+ color: #666666;
33
+ margin-right: 2px;
34
+ }
35
+ &-img {
36
+ width: 5px;
37
+ height: 10px;
38
+ }
39
+ }
15
40
  }
16
41
  .notice-bar__panel__item-list {
17
- width: calc(100% - 53px);
42
+ width: calc(100% - 53px - 60px);
18
43
  display: flex;
19
44
  flex-direction: column;
20
45
  align-items: start;
21
46
  justify-content: start;
22
47
  border-left: 1px solid #f1f1f1;
23
48
  padding-left: 10px;
24
- .notice-bar__panel-loop {
49
+ position: relative;
50
+ overflow: hidden;
51
+
52
+ .notice-bar__panel__item-loop {
53
+ width: 100%;
54
+ position: relative;
55
+ overflow: hidden; // 确保超出部分不显示
56
+ height: 20px; // 设置合适的高度
57
+ }
58
+
59
+ .notice-bar__panel__item-loop > div {
60
+ position: absolute; // 绝对定位
25
61
  width: 100%;
26
- overflow: hidden;
27
- list-style: none;
28
- text-align: center;
29
62
  height: 20px;
30
- color: #111111;
31
- padding: 0;
32
- .notice-bar__panel-loop__item {
33
- text-align: left;
34
- height: 20px;
63
+ animation: scrollUp 4s linear infinite; // 动画持续时间和类型
64
+ }
65
+
66
+ @keyframes scrollUp {
67
+ 0% {
68
+ transform: translateY(100%); // 从底部开始
35
69
  }
36
- .toUp {
37
- margin-top: -25px; //向上移
38
- transition: all 0.5s;
70
+ 100% {
71
+ transform: translateY(-200%); // 滚动到顶部
39
72
  }
40
73
  }
74
+
75
+
41
76
  }
77
+
78
+
79
+ }
80
+ //动画
81
+ .anim {
82
+ transition: all 0.5s;
83
+ margin-top: -24px;
42
84
  }
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import './notice-bar-item.scss';
3
+ interface NoticeBarItemProps {
4
+ /**
5
+ * 内容
6
+ */
7
+ content?: string;
8
+ /**
9
+ * 发布时间
10
+ */
11
+ releaseTime?: string;
12
+ /**
13
+ * 是否置顶
14
+ */
15
+ isTop?: number;
16
+ }
17
+ declare const NoticeBarItem: React.FC<NoticeBarItemProps>;
18
+ export default NoticeBarItem;
@@ -18,17 +18,18 @@ var NoticeBarItem = function NoticeBarItem(_ref) {
18
18
  otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
19
19
  var _otherProps = otherProps || {};
20
20
  releaseTime = (0, _timeUtil.formatTime)(releaseTime);
21
+ console.log((0, _childrenNodeHandle.convertChildren)(children, isTop === 1 ? 'teletext-tagc-1' : 'teletext-tagc-2', {
22
+ name: isTop === 1 ? '置顶' : '最新'
23
+ }));
21
24
  return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
22
25
  className: "notice-bar__panel__item"
23
26
  }, _otherProps), /*#__PURE__*/_react["default"].createElement("div", {
24
27
  className: "notice-bar__panel__item-left"
25
- }, (0, _childrenNodeHandle.convertChildren)(children, isTop === 0 ? 'teletext-tagc-1' : 'teletext-tagc-2', {
26
- name: isTop === 0 ? '置顶' : '最新'
28
+ }, (0, _childrenNodeHandle.convertChildren)(children, isTop === 1 ? 'teletext-tagc-1' : 'teletext-tagc-2', {
29
+ name: isTop === 1 ? '置顶' : '最新'
27
30
  }), /*#__PURE__*/_react["default"].createElement("div", {
28
31
  className: "notice-bar__panal__item__content"
29
- }, content)), /*#__PURE__*/_react["default"].createElement("div", {
30
- className: "notice-bar__panel__item-releaseTime"
31
- }, releaseTime));
32
+ }, content)));
32
33
  };
33
34
  NoticeBarItem.displayName = 'NoticeBarItem';
34
35
  var _default = exports["default"] = NoticeBarItem;
@@ -10,7 +10,7 @@
10
10
  .notice-bar__panal__item__content{
11
11
  color: #676767;
12
12
  font-size: 12px;
13
- width: 160px;
13
+ width: 180px;
14
14
  overflow: hidden;
15
15
  text-overflow: ellipsis;
16
16
  white-space: nowrap;
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ interface DataProps {
4
+ /**
5
+ * 内容
6
+ */
7
+ content?: string;
8
+ /**
9
+ * 发布时间
10
+ */
11
+ releaseTime?: string;
12
+ /**
13
+ * 是否置顶
14
+ */
15
+ isTop?: number;
16
+ }
17
+ export interface NoticeBarProps {
18
+ /**
19
+ * 数据
20
+ */
21
+ dataList?: DataProps[];
22
+ /**
23
+ * 点击事件
24
+ * @param e
25
+ */
26
+ onClick?: (e: any) => void;
27
+ /**
28
+ * 子节点
29
+ */
30
+ children: React.ReactChild;
31
+ /**
32
+ * 左侧图标
33
+ */
34
+ icon: string;
35
+ /**
36
+ * 点击事件
37
+ * @param e
38
+ */
39
+ handleMoreClick?: (e: any) => void;
40
+ /**
41
+ * 更多
42
+ */
43
+ moreText: string;
44
+ }
45
+ declare const NoticeBar: React.FC<NoticeBarProps>;
46
+ export default NoticeBar;
@@ -5,58 +5,26 @@ exports.__esModule = true;
5
5
  exports["default"] = void 0;
6
6
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
7
7
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
8
- var _react = _interopRequireWildcard(require("react"));
8
+ var _react = _interopRequireDefault(require("react"));
9
9
  require("./index.scss");
10
10
  var _noticeBarItem = _interopRequireDefault(require("./notice-bar-item"));
11
- var _excluded = ["dataList", "onClick", "icon", "children"];
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); }
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; }
11
+ var _arr = _interopRequireDefault(require("../../assets/icon/teletext-list/arr.png"));
12
+ var _excluded = ["dataList", "onClick", "icon", "children", "handleMoreClick", "moreText"];
14
13
  var NoticeBar = function NoticeBar(_ref) {
15
14
  var dataList = _ref.dataList,
16
15
  _ref$onClick = _ref.onClick,
17
16
  onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
18
17
  icon = _ref.icon,
19
18
  children = _ref.children,
19
+ handleMoreClick = _ref.handleMoreClick,
20
+ moreText = _ref.moreText,
20
21
  otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
21
22
  var _otherProps = otherProps || {};
22
- // const stickyItems = (dataList || []).filter((item) => item?.isTop === 1)
23
- // const loopItems = (dataList || []).filter((item) => item?.isTop === 0)
24
-
25
- var _useState = (0, _react.useState)(true),
26
- play = _useState[0],
27
- setPlay = _useState[1];
28
- var _useState2 = (0, _react.useState)([]),
29
- loopItems = _useState2[0],
30
- setLoopItems = _useState2[1];
31
- var intervalId = (0, _react.useRef)(null);
32
- (0, _react.useEffect)(function () {
33
- var stickyItems = dataList.filter(function (item) {
34
- return item.isTop === 1;
35
- });
36
- setLoopItems(dataList.filter(function (item) {
37
- return item.isTop === 1;
38
- }));
39
- var startPlay = function startPlay() {
40
- if (play) {
41
- setLoopItems(function (prev) {
42
- var newItems = [].concat(prev);
43
- newItems.push(newItems[0]);
44
- newItems.shift();
45
- return newItems;
46
- });
47
- setPlay(false);
48
- }
49
- };
50
- intervalId.current = setInterval(startPlay, 2000);
51
- return function () {
52
- clearInterval(intervalId.current);
53
- };
54
- }, [dataList, play]);
55
- var isScroll = function isScroll(index) {
56
- return index === 0;
57
- };
58
- var stickyItems = dataList.filter(function (item) {
59
- return item.isTop === 1;
23
+ var stickyItems = (dataList || []).filter(function (item) {
24
+ return (item === null || item === void 0 ? void 0 : item.isTop) === 1;
25
+ });
26
+ var loopItems = (dataList || []).filter(function (item) {
27
+ return (item === null || item === void 0 ? void 0 : item.isTop) === 0;
60
28
  });
61
29
  return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
62
30
  className: "notice-bar__panel"
@@ -69,22 +37,26 @@ var NoticeBar = function NoticeBar(_ref) {
69
37
  }, stickyItems ? stickyItems.map(function (item, index) {
70
38
  return /*#__PURE__*/_react["default"].createElement(_noticeBarItem["default"], (0, _extends2["default"])({
71
39
  key: index,
72
- onClick: onClick,
73
- children: children
74
- }, item));
75
- }) : /*#__PURE__*/_react["default"].createElement("div", null), loopItems.length > 0 ? /*#__PURE__*/_react["default"].createElement("div", {
76
- className: "notice-bar__panel-loop"
77
- }, loopItems.map(function (item, index) {
78
- return /*#__PURE__*/_react["default"].createElement(_noticeBarItem["default"], {
40
+ onClick: onClick
41
+ }, item), children);
42
+ }) : /*#__PURE__*/_react["default"].createElement("div", null), /*#__PURE__*/_react["default"].createElement("div", {
43
+ className: "notice-bar__panel__item-loop"
44
+ }, /*#__PURE__*/_react["default"].createElement("div", null, loopItems.length > 0 ? loopItems.map(function (item, index) {
45
+ return /*#__PURE__*/_react["default"].createElement(_noticeBarItem["default"], (0, _extends2["default"])({
79
46
  key: index,
80
- className: "notice-bar__panel-loop__item " + (isScroll(index) && play ? 'toUp' : ''),
81
- content: item.content,
82
- releaseTime: item.releaseTime,
83
- isTop: item.isTop,
84
- tag: item.tag,
85
47
  onClick: onClick
86
- });
87
- })) : /*#__PURE__*/_react["default"].createElement("div", null, "\u6682\u65E0\u6570\u636E")));
48
+ }, item), children);
49
+ }) : /*#__PURE__*/_react["default"].createElement("div", null, "No items to display")))), /*#__PURE__*/_react["default"].createElement("div", {
50
+ className: "notice-bar__panel__item-more"
51
+ }, moreText ? /*#__PURE__*/_react["default"].createElement("div", {
52
+ className: "notice-bar__panel__item-more-more"
53
+ }, /*#__PURE__*/_react["default"].createElement("span", {
54
+ className: "notice-bar__panel__item-more-more-text",
55
+ onClick: handleMoreClick
56
+ }, moreText), /*#__PURE__*/_react["default"].createElement("img", {
57
+ src: _arr["default"],
58
+ className: "notice-bar__panel__item-more-more-img"
59
+ })) : ''));
88
60
  };
89
61
  NoticeBar.displayName = 'NoticeBar';
90
62
  var _default = exports["default"] = NoticeBar;
@@ -0,0 +1,5 @@
1
+ export interface Location {
2
+ lat: string;
3
+ lng: string;
4
+ address: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ import Position from './position';
2
+ export type { LocationProps } from './position';
3
+ export default Position;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import './index.scss';
3
+ import { Location } from "./entity";
4
+ export interface LocationProps {
5
+ currentLocation: Location;
6
+ clickHandle: () => void;
7
+ }
8
+ declare const NavigationLeft: React.FC<LocationProps>;
9
+ export default NavigationLeft;
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import './index.scss';
3
+ import { Location } from "./position";
4
+ interface LocationProps {
5
+ itemArray: Location[];
6
+ open: boolean;
7
+ setIsOpen: () => void;
8
+ setCurrent: (data: Location) => void;
9
+ }
10
+ declare const ContentList: React.FC<LocationProps>;
11
+ export default ContentList;
@@ -9,7 +9,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
9
9
  var ContentList = function navigationList(_ref) {
10
10
  var open = _ref.open,
11
11
  itemArray = _ref.itemArray,
12
- currentLocation = _ref.currentLocation,
13
12
  setIsOpen = _ref.setIsOpen,
14
13
  setCurrent = _ref.setCurrent;
15
14
  var changeHandle = function changeHandle(position) {
@@ -24,13 +23,13 @@ var ContentList = function navigationList(_ref) {
24
23
  style: {
25
24
  display: open ? 'block' : 'none'
26
25
  }
27
- }, itemArray.map(function (item) {
26
+ }, itemArray ? itemArray.map(function (item) {
28
27
  return /*#__PURE__*/React.createElement("div", {
29
28
  onClick: function onClick() {
30
29
  return changeHandle(item);
31
30
  },
32
31
  className: "location-list-item"
33
32
  }, item.address);
34
- }));
33
+ }) : /*#__PURE__*/React.createElement("div", null, "\u6682\u65E0\u6570\u636E"));
35
34
  };
36
35
  var _default = exports["default"] = ContentList;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { Location } from "./entity";
3
+ export interface LocationProps {
4
+ itemArray: Location[];
5
+ defaultLocation: Location;
6
+ }
7
+ declare const Navigation: React.FC<LocationProps>;
8
+ export default Navigation;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 单选按钮组
3
+ */
4
+ import RadioGroup from './radio-group';
5
+ import RadioGroupItem from './radio-group-item';
6
+ export type { RadioGroupProps } from './radio-group';
7
+ export type { RadioGroupItemProps } from './radio-group-item';
8
+ export { RadioGroup as CustomRadioGroup, RadioGroupItem as CustomRadioGroupItem, };
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ export type RadioGroupItemType = 'button' | 'text';
4
+ export interface RadioGroupItemProps {
5
+ /**
6
+ * 选项
7
+ */
8
+ label: string;
9
+ /**
10
+ * 值
11
+ */
12
+ value: string;
13
+ /**
14
+ * 是否选中
15
+ */
16
+ checked: boolean;
17
+ /**
18
+ * 选中颜色
19
+ */
20
+ selectColor?: string;
21
+ /**
22
+ * 选中的文字颜色
23
+ */
24
+ selectTextColor?: string;
25
+ /**
26
+ * 未选中颜色
27
+ */
28
+ unSelectColor?: string;
29
+ /**
30
+ * 未选中的文字颜色
31
+ */
32
+ unSelectTextColor?: string;
33
+ /**
34
+ * 类型
35
+ */
36
+ type?: RadioGroupItemType;
37
+ /**
38
+ * 名称
39
+ */
40
+ name: string;
41
+ /**
42
+ * 改变事件
43
+ * @param value
44
+ */
45
+ onChange: (value: string) => void;
46
+ }
47
+ declare const RadioGroupItem: React.FC<RadioGroupItemProps>;
48
+ export default RadioGroupItem;
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ export interface RadioType {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ export type RadioGroupItemType = 'button' | 'text';
8
+ export interface RadioGroupProps {
9
+ /**
10
+ * 选项
11
+ */
12
+ options: Array<RadioType>;
13
+ /**
14
+ * 默认值
15
+ */
16
+ defaultValue?: string;
17
+ /**
18
+ * 是否换行
19
+ */
20
+ isWrap?: boolean;
21
+ /**
22
+ * 选中颜色
23
+ */
24
+ selectColor?: string;
25
+ /**
26
+ * 选中的文字颜色
27
+ */
28
+ selectTextColor?: string;
29
+ /**
30
+ * 未选中颜色
31
+ */
32
+ unSelectColor?: string;
33
+ /**
34
+ * 未选中的文字颜色
35
+ */
36
+ unSelectTextColor?: string;
37
+ /**
38
+ * 改变事件
39
+ * @param value
40
+ */
41
+ onChange?: (value: string) => void;
42
+ /**
43
+ * 类型
44
+ */
45
+ type?: RadioGroupItemType;
46
+ /**
47
+ * 名称
48
+ */
49
+ name?: string;
50
+ }
51
+ declare const RadioGroup: React.FC<RadioGroupProps>;
52
+ export default RadioGroup;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 富文本
3
+ */
4
+ import RichText from './rich-text';
5
+ export type { RichTextProps } from './rich-text';
6
+ export { RichText, };
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import './index.scss';
3
+ interface DataProps {
4
+ content?: string;
5
+ }
6
+ export interface RichTextProps {
7
+ content?: string;
8
+ dataList?: DataProps[];
9
+ }
10
+ declare const RichText: {
11
+ (props: RichTextProps): JSX.Element;
12
+ displayName: string;
13
+ };
14
+ export default RichText;
@@ -0,0 +1,3 @@
1
+ import SearchBar from "./search-bar";
2
+ export type { SearchBarProps } from './search-bar';
3
+ export default SearchBar;
@@ -1,13 +1,39 @@
1
- .search-bar-box {
2
- width: 260px;
1
+ .search-bar-form {
3
2
  height: 35px;
4
- margin: 0;
5
- .next-input {
6
- width: 260px;
7
- border-radius: 34px;
8
- height: 35px;
9
- & input {
10
- height: 100%;
11
- }
3
+ flex: 1;
4
+ box-shadow: 0 1px 6px 0 rgba(66, 36, 8, 0.08);
5
+ border-radius: 17px;
6
+ }
7
+ .search-bar {
8
+ //border: solid 1px #c4c6cf;
9
+ display: flex;
10
+ align-items: center;
11
+ height: 100%;
12
+ padding-right: 16px;
13
+ &-input {
14
+ outline: none;
15
+ border: none;
16
+ //width: calc(100% - 15px - 34px);
17
+ height: 100%;
18
+ flex: 1;
19
+ }
20
+ &-icon {
21
+ margin-left: 15px;
22
+ margin-right: 5px;
23
+ display: flex;
24
+ align-items: center;
25
+ &-img {
26
+ width: 15px;
27
+ height: 15px;
12
28
  }
29
+ }
30
+ &-delete-img {
31
+ width: 15px;
32
+ height: 15px;
33
+ }
34
+ &-enter {
35
+ font-size: 14px;
36
+ color: #f77c32;
37
+ margin-left: 6px;
38
+ }
13
39
  }
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export interface SearchBarProps {
3
+ onSearch?: () => void;
4
+ onConfirm?: (value: string) => void;
5
+ placeholder?: string;
6
+ searchText?: boolean;
7
+ autofocus?: boolean;
8
+ }
9
+ declare const SearchBar: React.FC<SearchBarProps>;
10
+ export default SearchBar;