@jetlinks-web/components 2.0.2-2 → 2.0.2-4

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 (225) hide show
  1. package/es/AMap/Map.js +124 -0
  2. package/es/AMap/index.js +2 -0
  3. package/es/AMap/util.js +56 -0
  4. package/es/BadgeStatus/Badge.js +54 -0
  5. package/es/BadgeStatus/color.js +21 -0
  6. package/es/BadgeStatus/index.js +3 -0
  7. package/es/CardSelect/CardSelect.js +123 -0
  8. package/es/CardSelect/index.js +2 -0
  9. package/es/CheckButton/CheckButton.js +121 -0
  10. package/es/CheckButton/index.js +2 -0
  11. package/es/ConfigProvider/context.js +12 -0
  12. package/es/ConfigProvider/index.js +31 -0
  13. package/es/Echarts/Echarts.js +47 -0
  14. package/es/Echarts/index.js +2 -0
  15. package/es/Ellipsis/Ellipsis.js +189 -0
  16. package/es/Ellipsis/index.js +2 -0
  17. package/es/Empty/Empty.js +56 -0
  18. package/es/Empty/image.js +2 -0
  19. package/es/Empty/index.js +2 -0
  20. package/es/FullPage/FullPage.js +31 -0
  21. package/es/FullPage/index.js +2 -0
  22. package/es/Icon/icon.js +43 -0
  23. package/{src/Icon/index.ts → es/Icon/index.js} +2 -3
  24. package/es/MonacoEditor/Monaco.js +238 -0
  25. package/es/MonacoEditor/index.js +2 -0
  26. package/es/PermissionButton/index.js +117 -0
  27. package/es/ProLayout/Basic/BasicLayout.js +255 -0
  28. package/es/ProLayout/Basic/Header.js +93 -0
  29. package/es/ProLayout/PageContainer/index.js +318 -0
  30. package/es/ProLayout/PageContainer/typings.js +1 -0
  31. package/es/ProLayout/RouteContext.js +22 -0
  32. package/es/ProLayout/SiderMenu/BaseMenu.js +262 -0
  33. package/es/ProLayout/SiderMenu/SiderMenu.js +258 -0
  34. package/es/ProLayout/SiderMenu/index.js +2 -0
  35. package/es/ProLayout/SiderMenu/typings.js +1 -0
  36. package/es/ProLayout/TopHeader/index.js +155 -0
  37. package/es/ProLayout/defaultSettings.js +66 -0
  38. package/{src/ProLayout/index.ts → es/ProLayout/index.js} +4 -6
  39. package/{src → es}/ProLayout/style/default.less +4 -4
  40. package/es/ProLayout/style/index.js +1 -0
  41. package/es/ProLayout/typings.js +1 -0
  42. package/es/ProLayout/util.js +61 -0
  43. package/es/ProTable/index.js +406 -0
  44. package/es/ProTable/proTableTypes.js +11 -0
  45. package/es/ProTable/style/index.css +65 -0
  46. package/es/ProTable/style/index.js +1 -0
  47. package/es/Scrollbar/Bar.js +114 -0
  48. package/es/Scrollbar/Scrollbar.js +100 -0
  49. package/es/Scrollbar/Thumb.js +10 -0
  50. package/es/Scrollbar/constants.js +1 -0
  51. package/es/Scrollbar/index.js +2 -0
  52. package/es/Scrollbar/util.js +30 -0
  53. package/es/Search/Advanced/History.js +183 -0
  54. package/es/Search/Advanced/SaveHistory.js +153 -0
  55. package/es/Search/Advanced/index.js +520 -0
  56. package/es/Search/Item.js +497 -0
  57. package/es/Search/Search.js +249 -0
  58. package/es/Search/hooks/index.js +1 -0
  59. package/es/Search/hooks/useSearchItems.js +40 -0
  60. package/es/Search/index.js +4 -0
  61. package/es/Search/setting.js +91 -0
  62. package/es/Search/typing.js +1 -0
  63. package/es/Search/util.js +234 -0
  64. package/es/ValueItem/ValueItem.js +233 -0
  65. package/es/ValueItem/index.js +2 -0
  66. package/es/ValueItem/util.js +16 -0
  67. package/es/index.js +24 -0
  68. package/es/style/index.js +3 -0
  69. package/es/style/variable.css +0 -0
  70. package/{src → es}/style/variable.less +0 -2
  71. package/lib/AMap/Map.js +124 -0
  72. package/lib/AMap/index.js +9 -0
  73. package/lib/AMap/util.js +62 -0
  74. package/lib/BadgeStatus/Badge.js +54 -0
  75. package/lib/BadgeStatus/color.js +27 -0
  76. package/lib/BadgeStatus/index.js +22 -0
  77. package/lib/CardSelect/CardSelect.js +123 -0
  78. package/lib/CardSelect/index.js +9 -0
  79. package/lib/CheckButton/CheckButton.js +121 -0
  80. package/lib/CheckButton/index.js +9 -0
  81. package/lib/ConfigProvider/context.js +19 -0
  82. package/lib/ConfigProvider/index.js +37 -0
  83. package/lib/Echarts/Echarts.js +47 -0
  84. package/lib/Echarts/index.js +9 -0
  85. package/lib/Ellipsis/Ellipsis.js +189 -0
  86. package/lib/Ellipsis/index.js +9 -0
  87. package/lib/Empty/Empty.js +56 -0
  88. package/lib/Empty/image.js +8 -0
  89. package/lib/Empty/index.js +9 -0
  90. package/lib/FullPage/FullPage.js +31 -0
  91. package/lib/FullPage/index.js +9 -0
  92. package/lib/Icon/icon.js +52 -0
  93. package/lib/Icon/index.js +9 -0
  94. package/lib/MonacoEditor/Monaco.js +238 -0
  95. package/lib/MonacoEditor/index.js +9 -0
  96. package/lib/PermissionButton/index.js +124 -0
  97. package/lib/ProLayout/Basic/BasicLayout.js +264 -0
  98. package/lib/ProLayout/Basic/BasicLayout.less +66 -0
  99. package/lib/ProLayout/Basic/Header.js +99 -0
  100. package/lib/ProLayout/Basic/Header.less +8 -0
  101. package/lib/ProLayout/PageContainer/index.js +323 -0
  102. package/lib/ProLayout/PageContainer/index.less +103 -0
  103. package/lib/ProLayout/PageContainer/typings.js +5 -0
  104. package/lib/ProLayout/RouteContext.js +28 -0
  105. package/lib/ProLayout/SiderMenu/BaseMenu.js +268 -0
  106. package/lib/ProLayout/SiderMenu/SiderMenu.js +267 -0
  107. package/lib/ProLayout/SiderMenu/index.js +20 -0
  108. package/lib/ProLayout/SiderMenu/index.less +212 -0
  109. package/lib/ProLayout/SiderMenu/typings.js +5 -0
  110. package/lib/ProLayout/TopHeader/index.js +161 -0
  111. package/lib/ProLayout/TopHeader/index.less +174 -0
  112. package/lib/ProLayout/defaultSettings.js +72 -0
  113. package/lib/ProLayout/index.js +16 -0
  114. package/lib/ProLayout/style/default.less +4 -0
  115. package/lib/ProLayout/style/index.js +3 -0
  116. package/lib/ProLayout/style/style.less +7 -0
  117. package/lib/ProLayout/typings.js +5 -0
  118. package/lib/ProLayout/util.js +72 -0
  119. package/lib/ProTable/index.js +412 -0
  120. package/lib/ProTable/proTableTypes.js +17 -0
  121. package/lib/ProTable/style/index.css +65 -0
  122. package/lib/ProTable/style/index.js +3 -0
  123. package/lib/ProTable/style/index.less +92 -0
  124. package/lib/Scrollbar/Bar.js +114 -0
  125. package/{src/Scrollbar/scrollbar.ts → lib/Scrollbar/Scrollbar.js} +106 -108
  126. package/lib/Scrollbar/Thumb.js +16 -0
  127. package/lib/Scrollbar/constants.js +7 -0
  128. package/lib/Scrollbar/index.js +9 -0
  129. package/lib/Scrollbar/util.js +37 -0
  130. package/lib/Search/Advanced/History.js +183 -0
  131. package/lib/Search/Advanced/SaveHistory.js +153 -0
  132. package/lib/Search/Advanced/index.js +520 -0
  133. package/lib/Search/Item.js +497 -0
  134. package/lib/Search/Search.js +249 -0
  135. package/lib/Search/hooks/index.js +16 -0
  136. package/lib/Search/hooks/useSearchItems.js +47 -0
  137. package/lib/Search/index.js +16 -0
  138. package/lib/Search/setting.js +97 -0
  139. package/lib/Search/typing.js +5 -0
  140. package/lib/Search/util.js +241 -0
  141. package/lib/ValueItem/ValueItem.js +233 -0
  142. package/lib/ValueItem/index.js +9 -0
  143. package/lib/ValueItem/util.js +22 -0
  144. package/lib/index.js +158 -0
  145. package/lib/style/components.less +1 -0
  146. package/lib/style/index.js +4 -0
  147. package/lib/style/variable.css +0 -0
  148. package/lib/style/variable.less +2 -0
  149. package/package.json +121 -12
  150. package/index.ts +0 -64
  151. package/src/AMap/Map.vue +0 -110
  152. package/src/AMap/index.ts +0 -1
  153. package/src/AMap/util.ts +0 -56
  154. package/src/BadgeStatus/Badge.vue +0 -41
  155. package/src/BadgeStatus/color.ts +0 -25
  156. package/src/BadgeStatus/index.ts +0 -4
  157. package/src/CardSelect/CardSelect.vue +0 -136
  158. package/src/CardSelect/index.ts +0 -3
  159. package/src/CheckButton/CheckButton.vue +0 -146
  160. package/src/CheckButton/index.md +0 -27
  161. package/src/CheckButton/index.ts +0 -3
  162. package/src/ConfigProvider/context.ts +0 -17
  163. package/src/ConfigProvider/index.tsx +0 -40
  164. package/src/Echarts/Echarts.vue +0 -43
  165. package/src/Echarts/index.ts +0 -3
  166. package/src/Ellipsis/Ellipsis.vue +0 -182
  167. package/src/Ellipsis/index.ts +0 -3
  168. package/src/Empty/Empty.vue +0 -43
  169. package/src/Empty/image.ts +0 -3
  170. package/src/Empty/index.ts +0 -2
  171. package/src/FullPage/FullPage.vue +0 -30
  172. package/src/FullPage/index.ts +0 -3
  173. package/src/Icon/icon.tsx +0 -40
  174. package/src/MonacoEditor/Monaco.vue +0 -242
  175. package/src/MonacoEditor/index.md +0 -26
  176. package/src/MonacoEditor/index.ts +0 -2
  177. package/src/PermissionButton/index.tsx +0 -110
  178. package/src/ProLayout/Basic/BasicLayout.tsx +0 -395
  179. package/src/ProLayout/Basic/Header.tsx +0 -115
  180. package/src/ProLayout/PageContainer/index.tsx +0 -441
  181. package/src/ProLayout/PageContainer/typings.ts +0 -56
  182. package/src/ProLayout/RouteContext.ts +0 -87
  183. package/src/ProLayout/SiderMenu/BaseMenu.tsx +0 -296
  184. package/src/ProLayout/SiderMenu/SiderMenu.tsx +0 -320
  185. package/src/ProLayout/SiderMenu/index.ts +0 -2
  186. package/src/ProLayout/SiderMenu/typings.ts +0 -49
  187. package/src/ProLayout/TopHeader/index.tsx +0 -210
  188. package/src/ProLayout/defaultSettings.ts +0 -106
  189. package/src/ProLayout/style/index.ts +0 -1
  190. package/src/ProLayout/typings.ts +0 -87
  191. package/src/ProLayout/util.ts +0 -64
  192. package/src/ProTable/index.md +0 -53
  193. package/src/ProTable/index.tsx +0 -551
  194. package/src/ProTable/proTableTypes.ts +0 -70
  195. package/src/ProTable/style/index.ts +0 -1
  196. package/src/Scrollbar/Bar.vue +0 -75
  197. package/src/Scrollbar/Scrollbar.vue +0 -260
  198. package/src/Scrollbar/Thumb.vue +0 -163
  199. package/src/Scrollbar/constants.ts +0 -10
  200. package/src/Scrollbar/index.ts +0 -4
  201. package/src/Scrollbar/thumb.ts +0 -16
  202. package/src/Scrollbar/util.ts +0 -38
  203. package/src/Search/Advanced/History.vue +0 -140
  204. package/src/Search/Advanced/SaveHistory.vue +0 -108
  205. package/src/Search/Advanced/index.vue +0 -435
  206. package/src/Search/Item.vue +0 -525
  207. package/src/Search/Search.vue +0 -398
  208. package/src/Search/hooks/index.ts +0 -1
  209. package/src/Search/hooks/useSearchItems.ts +0 -68
  210. package/src/Search/index.md +0 -57
  211. package/src/Search/index.ts +0 -5
  212. package/src/Search/setting.ts +0 -55
  213. package/src/Search/typing.ts +0 -76
  214. package/src/Search/util.ts +0 -263
  215. package/src/ValueItem/ValueItem.vue +0 -192
  216. package/src/ValueItem/index.ts +0 -3
  217. package/src/ValueItem/util.ts +0 -16
  218. package/src/style/index.ts +0 -3
  219. /package/{src → es}/ProLayout/Basic/BasicLayout.less +0 -0
  220. /package/{src → es}/ProLayout/Basic/Header.less +0 -0
  221. /package/{src → es}/ProLayout/PageContainer/index.less +0 -0
  222. /package/{src → es}/ProLayout/SiderMenu/index.less +0 -0
  223. /package/{src → es}/ProLayout/TopHeader/index.less +0 -0
  224. /package/{src → es}/ProLayout/style/style.less +0 -0
  225. /package/{src → es}/ProTable/style/index.less +0 -0
@@ -0,0 +1,123 @@
1
+ /* Analyzed bindings: {
2
+ "layout": "props",
3
+ "options": "props",
4
+ "disabled": "props",
5
+ "multiple": "props",
6
+ "column": "props",
7
+ "value": "props",
8
+ "itemLayout": "props",
9
+ "has": "setup-maybe-ref",
10
+ "props": "setup-reactive-const",
11
+ "emit": "setup-const",
12
+ "selectKeys": "setup-maybe-ref",
13
+ "CardSelectStyle": "setup-maybe-ref",
14
+ "isMultiple": "setup-maybe-ref",
15
+ "handleSelect": "setup-const"
16
+ } */
17
+ import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
18
+ const _hoisted_1 = ["onClick"];
19
+ const _hoisted_2 = { class: "j-card-select-item-content" };
20
+ const _hoisted_3 = { class: "j-card-select-title" };
21
+ const _hoisted_4 = { class: "j-card-select-describe" };
22
+ import { has } from 'lodash-es';
23
+ const __sfc_main__ = {
24
+ props: {
25
+ layout: {
26
+ type: String,
27
+ default: 'horizontal'
28
+ },
29
+ options: {
30
+ type: Array,
31
+ default: () => [],
32
+ },
33
+ disabled: {
34
+ type: Boolean,
35
+ default: false,
36
+ },
37
+ multiple: {
38
+ type: Boolean,
39
+ default: false,
40
+ },
41
+ column: {
42
+ type: Number,
43
+ default: 3,
44
+ },
45
+ value: {
46
+ type: [String, Array],
47
+ default: undefined,
48
+ },
49
+ itemLayout: {
50
+ type: String,
51
+ default: 'horizontal'
52
+ }
53
+ },
54
+ emits: ['select', 'change', 'update:value'],
55
+ setup(__props, { emit: __emit }) {
56
+ const props = __props;
57
+ const emit = __emit;
58
+ const selectKeys = ref([]);
59
+ const CardSelectStyle = computed(() => {
60
+ const _column = props.column > 0 && props.layout === 'horizontal' ? props.column : 1;
61
+ return {
62
+ 'grid-template-columns': `repeat(${_column}, 1fr)`
63
+ };
64
+ });
65
+ const isMultiple = computed(() => {
66
+ return has(props, 'multiple') && props.multiple !== false;
67
+ });
68
+ const handleSelect = (key, node) => {
69
+ if (props.disabled || node.disabled) {
70
+ return;
71
+ }
72
+ const selectKeysSet = new Set(selectKeys.value);
73
+ const isActive = selectKeysSet.has(key);
74
+ if (isMultiple.value) {
75
+ if (isActive) {
76
+ selectKeysSet.delete(key);
77
+ }
78
+ else {
79
+ selectKeysSet.add(key);
80
+ }
81
+ selectKeys.value = [...selectKeysSet.values()];
82
+ const nodes = props.options.filter(item => selectKeys.value.includes(item.value));
83
+ emit('select', selectKeys.value, nodes);
84
+ emit('change', selectKeys.value, nodes);
85
+ emit('update:value', selectKeys.value);
86
+ }
87
+ else {
88
+ selectKeys.value = [key];
89
+ emit('select', key, node);
90
+ emit('change', key, node);
91
+ emit('update:value', key);
92
+ }
93
+ };
94
+ watch(() => props.value, () => {
95
+ selectKeys.value = isMultiple.value ? props.value : [props.value];
96
+ }, { immediate: true });
97
+ return (_ctx, _cache) => {
98
+ return (_openBlock(), _createElementBlock("div", {
99
+ class: "j-card-select",
100
+ style: _normalizeStyle(_unref(CardSelectStyle))
101
+ }, [
102
+ (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(__props.options, (item) => {
103
+ return (_openBlock(), _createElementBlock("div", {
104
+ class: _normalizeClass({
105
+ 'j-card-select-item': true,
106
+ 'disabled': __props.disabled || item.disabled,
107
+ 'active': _unref(selectKeys).includes(item.value)
108
+ }),
109
+ onClick: () => handleSelect(item.value, item)
110
+ }, [
111
+ _renderSlot(_ctx.$slots, "itemRender", { node: item }, () => [
112
+ _createElementVNode("div", _hoisted_2, [
113
+ _createElementVNode("div", _hoisted_3, _toDisplayString(item.label), 1 /* TEXT */),
114
+ _createElementVNode("div", _hoisted_4, _toDisplayString(item.describe), 1 /* TEXT */)
115
+ ])
116
+ ])
117
+ ], 10 /* CLASS, PROPS */, _hoisted_1));
118
+ }), 256 /* UNKEYED_FRAGMENT */))
119
+ ], 4 /* STYLE */));
120
+ };
121
+ }
122
+ };
123
+ export default __sfc_main__;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _CardSelect = _interopRequireDefault(require("./CardSelect.js"));
9
+ var _default = exports.default = _CardSelect.default;
@@ -0,0 +1,121 @@
1
+ /* Analyzed bindings: {
2
+ "value": "props",
3
+ "options": "props",
4
+ "multiple": "props",
5
+ "disabled": "props",
6
+ "class": "props",
7
+ "style": "props",
8
+ "computed": "setup-const",
9
+ "CSSProperties": "setup-const",
10
+ "PropType": "setup-const",
11
+ "ref": "setup-const",
12
+ "watch": "setup-const",
13
+ "isArray": "setup-maybe-ref",
14
+ "props": "setup-reactive-const",
15
+ "emit": "setup-const",
16
+ "myValue": "setup-ref",
17
+ "optionsMap": "setup-ref",
18
+ "_options": "setup-ref",
19
+ "selected": "setup-const"
20
+ } */
21
+ import { defineComponent as _defineComponent } from 'vue';
22
+ import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
23
+ const _withScopeId = n => (_pushScopeId("data-v-1712538744762"), n = n(), _popScopeId(), n);
24
+ const _hoisted_1 = ["onClick"];
25
+ import { computed, ref, watch } from 'vue';
26
+ import { isArray } from '@jetlinks-web/utils';
27
+ const __sfc_main__ = _defineComponent({
28
+ props: {
29
+ value: {
30
+ type: [String, Array],
31
+ default: undefined,
32
+ },
33
+ options: {
34
+ type: Array,
35
+ default: () => [],
36
+ },
37
+ multiple: {
38
+ type: Boolean,
39
+ default: false,
40
+ },
41
+ disabled: {
42
+ type: Boolean,
43
+ default: false,
44
+ },
45
+ class: {
46
+ type: String,
47
+ default: undefined,
48
+ },
49
+ style: {
50
+ type: Object,
51
+ default: () => ({}),
52
+ },
53
+ },
54
+ emits: ['update:value', 'change', 'select'],
55
+ setup(__props, { emit: __emit }) {
56
+ const props = __props;
57
+ const emit = __emit;
58
+ const myValue = ref();
59
+ const optionsMap = ref(new Map());
60
+ const _options = computed(() => {
61
+ props.options.forEach((item) => {
62
+ if (props.disabled) {
63
+ item.display = props.disabled;
64
+ }
65
+ optionsMap.value.set(item.value, item);
66
+ });
67
+ return props.options;
68
+ });
69
+ watch(() => props.value, () => {
70
+ if (props.value) {
71
+ myValue.value = isArray(props.value) ? props.value : [props.value];
72
+ }
73
+ else {
74
+ myValue.value = [];
75
+ }
76
+ }, { immediate: true, deep: true });
77
+ const selected = (key, disabled) => {
78
+ if (disabled)
79
+ return;
80
+ const values = new Set(myValue.value);
81
+ if (values.has(key)) {
82
+ values.delete(key);
83
+ }
84
+ else {
85
+ if (!props.multiple) {
86
+ values.clear();
87
+ }
88
+ values.add(key);
89
+ }
90
+ myValue.value = [...values.values()];
91
+ const optionsItems = myValue.value.map((_key) => {
92
+ return optionsMap.value.get(_key);
93
+ });
94
+ const _value = props.multiple ? myValue.value : myValue.value[0];
95
+ emit('update:value', _value);
96
+ emit('change', _value, props.multiple ? optionsItems : optionsItems[0]);
97
+ emit('select', _value, props.multiple ? optionsItems : optionsItems[0]);
98
+ };
99
+ return (_ctx, _cache) => {
100
+ return (_openBlock(), _createElementBlock("div", {
101
+ class: _normalizeClass(['j-check-button', props.class]),
102
+ style: _normalizeStyle(__props.style)
103
+ }, [
104
+ (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_options.value, (item) => {
105
+ return (_openBlock(), _createElementBlock("div", {
106
+ key: item.value,
107
+ class: _normalizeClass([
108
+ 'j-check-button-item',
109
+ myValue.value.includes(item.value) ? 'selected' : '',
110
+ item.disabled ? 'disabled' : '',
111
+ ]),
112
+ onClick: () => {
113
+ selected(item.value, item.disabled);
114
+ }
115
+ }, _toDisplayString(item.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_1));
116
+ }), 128 /* KEYED_FRAGMENT */))
117
+ ], 6 /* CLASS, STYLE */));
118
+ };
119
+ }
120
+ });
121
+ export default __sfc_main__;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _CheckButton = _interopRequireDefault(require("./CheckButton.js"));
9
+ var _default = exports.default = _CheckButton.default;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.configProps = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
+ var _context = require("ant-design-vue/es/config-provider/context");
10
+ var configProps = exports.configProps = function configProps() {
11
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _context.configProviderProps)()), {}, {
12
+ IconConfig: {
13
+ type: Object
14
+ },
15
+ MapConfig: {
16
+ type: Object
17
+ }
18
+ });
19
+ };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _vue = require("vue");
9
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
+ var _context = require("./context");
11
+ var _constants = require("@jetlinks-web/constants");
12
+ var _antDesignVue = require("ant-design-vue");
13
+ var _lodashEs = require("lodash");
14
+ var _Empty = _interopRequireDefault(require("../Empty"));
15
+ var JConfigProvider = (0, _vue.defineComponent)({
16
+ name: 'JConfigProvider',
17
+ inheritAttrs: false,
18
+ props: (0, _objectSpread2.default)({}, (0, _context.configProps)()),
19
+ setup: function setup(props, _ref) {
20
+ var slots = _ref.slots;
21
+ var _iconConfig = (0, _vue.reactive)(props.IconConfig || {});
22
+ var _mapConfig = (0, _vue.reactive)(props.MapConfig || {});
23
+ (0, _vue.provide)(_constants.ComponentsEnum.Icon, _iconConfig); // 全局Icon 配置
24
+ (0, _vue.provide)(_constants.MAPConfig, _mapConfig); // 全局地图配置
25
+ return function () {
26
+ return (0, _vue.h)(_antDesignVue.ConfigProvider, (0, _objectSpread2.default)({}, (0, _lodashEs.omit)(props, ['IconConfig', 'MapConfig'])), {
27
+ default: slots.default,
28
+ renderEmpty: function renderEmpty() {
29
+ var _slots$renderEmpty;
30
+ return ((_slots$renderEmpty = slots.renderEmpty) === null || _slots$renderEmpty === void 0 ? void 0 : _slots$renderEmpty.call(slots)) || (0, _vue.createVNode)(_Empty.default, null, null);
31
+ }
32
+ });
33
+ };
34
+ }
35
+ });
36
+ JConfigProvider.config = _antDesignVue.ConfigProvider.config;
37
+ var _default = exports.default = JConfigProvider;
@@ -0,0 +1,47 @@
1
+ /* Analyzed bindings: {
2
+ "options": "props",
3
+ "style": "props",
4
+ "CSSProperties": "setup-const",
5
+ "nextTick": "setup-const",
6
+ "ref": "setup-const",
7
+ "watch": "setup-const",
8
+ "Ref": "setup-const",
9
+ "useECharts": "setup-maybe-ref",
10
+ "props": "setup-reactive-const",
11
+ "echartsDom": "setup-ref",
12
+ "setOptions": "setup-maybe-ref"
13
+ } */
14
+ import { defineComponent as _defineComponent } from 'vue';
15
+ import { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
16
+ import { nextTick, ref, watch, } from 'vue';
17
+ import { useECharts } from '@jetlinks-web/hooks';
18
+ const __sfc_main__ = _defineComponent({
19
+ props: {
20
+ options: {
21
+ type: Object,
22
+ default: undefined,
23
+ },
24
+ style: Object,
25
+ },
26
+ setup(__props) {
27
+ const props = __props;
28
+ const echartsDom = ref();
29
+ const { setOptions } = useECharts(echartsDom.value);
30
+ watch(() => JSON.stringify(props.options), () => {
31
+ if (props.options) {
32
+ nextTick(() => {
33
+ setOptions(props.options);
34
+ });
35
+ }
36
+ }, { immediate: true });
37
+ return (_ctx, _cache) => {
38
+ return (_openBlock(), _createElementBlock("div", {
39
+ ref_key: "echartsDom",
40
+ ref: echartsDom,
41
+ class: "echarts-warp",
42
+ style: _normalizeStyle(__props.style)
43
+ }, null, 4 /* STYLE */));
44
+ };
45
+ }
46
+ });
47
+ export default __sfc_main__;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _Echarts = _interopRequireDefault(require("./Echarts.js"));
9
+ var _default = exports.default = _Echarts.default;
@@ -0,0 +1,189 @@
1
+ /* Analyzed bindings: {
2
+ "expandTrigger": "props",
3
+ "lineClamp": "props",
4
+ "tooltip": "props",
5
+ "Tooltip": "setup-maybe-ref",
6
+ "computed": "setup-const",
7
+ "mergeProps": "setup-const",
8
+ "ref": "setup-const",
9
+ "useAttrs": "setup-const",
10
+ "props": "setup-reactive-const",
11
+ "jEllipsis": "literal-const",
12
+ "jEllipsisCursorClass": "literal-const",
13
+ "jEllipsisLineClampClass": "literal-const",
14
+ "expandedRef": "setup-ref",
15
+ "tooltipRef": "setup-ref",
16
+ "triggerRef": "setup-ref",
17
+ "visible": "setup-ref",
18
+ "attrs": "setup-maybe-ref",
19
+ "handleClickRef": "setup-ref",
20
+ "triggerAttrs": "setup-const",
21
+ "showTooltip": "setup-const",
22
+ "ellipsisStyleRef": "setup-ref",
23
+ "syncEllipsisStyle": "setup-const",
24
+ "syncTriggerClass": "setup-const",
25
+ "syncCursorStyle": "setup-const",
26
+ "getTooltipDisabled": "setup-const"
27
+ } */
28
+ import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, createElementVNode as _createElementVNode, unref as _unref, withCtx as _withCtx, createBlock as _createBlock } from "vue";
29
+ import { Tooltip } from 'ant-design-vue';
30
+ import { computed, mergeProps, ref, useAttrs } from 'vue';
31
+ const jEllipsis = 'j-ellipsis';
32
+ const jEllipsisCursorClass = 'j-ellipsis-cursor';
33
+ const jEllipsisLineClampClass = 'j-ellipsis-line-clamp';
34
+ const __sfc_main__ = Object.assign({
35
+ name: 'Ellipsis',
36
+ }, {
37
+ props: {
38
+ expandTrigger: {
39
+ type: String,
40
+ default: undefined,
41
+ },
42
+ /** multiline ellipsis */
43
+ lineClamp: {
44
+ type: [Number, String],
45
+ default: 1,
46
+ },
47
+ tooltip: {
48
+ type: [Boolean, Object],
49
+ default: true,
50
+ },
51
+ },
52
+ setup(__props) {
53
+ const props = __props;
54
+ // define class name
55
+ const expandedRef = ref(false);
56
+ const tooltipRef = ref(null);
57
+ const triggerRef = ref(null);
58
+ const visible = ref(false);
59
+ const attrs = useAttrs();
60
+ const handleClickRef = computed(() => {
61
+ return props.expandTrigger === 'click'
62
+ ? () => {
63
+ const { value: expanded } = expandedRef;
64
+ expandedRef.value = !expanded;
65
+ }
66
+ : undefined;
67
+ });
68
+ function triggerAttrs() {
69
+ return {
70
+ ...mergeProps(attrs, {
71
+ class: [
72
+ jEllipsis,
73
+ props.lineClamp !== undefined ? jEllipsisLineClampClass : undefined,
74
+ props.expandTrigger === 'click' ? jEllipsisCursorClass : undefined,
75
+ ],
76
+ style: ellipsisStyleRef.value,
77
+ }),
78
+ };
79
+ }
80
+ const showTooltip = () => {
81
+ const { value: trigger } = triggerRef;
82
+ if (trigger) {
83
+ visible.value = trigger.scrollHeight > trigger.offsetHeight;
84
+ }
85
+ };
86
+ const ellipsisStyleRef = computed(() => {
87
+ const { lineClamp } = props;
88
+ const { value: expanded } = expandedRef;
89
+ if (lineClamp !== undefined) {
90
+ return {
91
+ textOverflow: '',
92
+ '-webkit-line-clamp': expanded ? '' : lineClamp,
93
+ };
94
+ }
95
+ else {
96
+ return {
97
+ textOverflow: expanded ? '' : 'ellipsis',
98
+ '-webkit-line-clamp': '',
99
+ };
100
+ }
101
+ });
102
+ const syncEllipsisStyle = (trigger) => {
103
+ if (!trigger)
104
+ return;
105
+ const latestStyle = ellipsisStyleRef.value;
106
+ const lineClampClass = jEllipsisLineClampClass;
107
+ if (props.lineClamp !== undefined) {
108
+ syncTriggerClass(trigger, lineClampClass, 'add');
109
+ }
110
+ else {
111
+ syncTriggerClass(trigger, lineClampClass, 'remove');
112
+ }
113
+ for (const key in latestStyle) {
114
+ if (trigger.style[key] !== latestStyle[key]) {
115
+ trigger.style[key] = latestStyle[key];
116
+ }
117
+ }
118
+ };
119
+ const syncTriggerClass = (trigger, styleClass, action) => {
120
+ if (action === 'add') {
121
+ if (!trigger.classList.contains(styleClass)) {
122
+ trigger.classList.add(styleClass);
123
+ }
124
+ }
125
+ else {
126
+ if (trigger.classList.contains(styleClass)) {
127
+ trigger.classList.remove(styleClass);
128
+ }
129
+ }
130
+ };
131
+ const syncCursorStyle = (trigger, tooltipDisabled) => {
132
+ if (props.expandTrigger === 'click' && !tooltipDisabled) {
133
+ syncTriggerClass(trigger, jEllipsisCursorClass, 'add');
134
+ }
135
+ else {
136
+ syncTriggerClass(trigger, jEllipsisCursorClass, 'remove');
137
+ }
138
+ };
139
+ const getTooltipDisabled = () => {
140
+ let tooltipDisabled = false;
141
+ const { value: expanded } = expandedRef;
142
+ if (expanded)
143
+ return true;
144
+ const { value: trigger } = triggerRef;
145
+ if (trigger) {
146
+ syncEllipsisStyle(trigger);
147
+ tooltipDisabled = trigger.scrollHeight <= trigger.offsetHeight;
148
+ syncCursorStyle(trigger, tooltipDisabled);
149
+ }
150
+ return tooltipDisabled;
151
+ };
152
+ return (_ctx, _cache) => {
153
+ return (_openBlock(), _createBlock(_unref(Tooltip), _mergeProps({
154
+ ref_key: "tooltipRef",
155
+ ref: tooltipRef,
156
+ placement: "top"
157
+ }, __props.tooltip, { visible: visible.value }), {
158
+ default: _withCtx(() => [
159
+ (__props.tooltip)
160
+ ? (_openBlock(), _createElementBlock("div", {
161
+ key: 0,
162
+ class: _normalizeClass([jEllipsisLineClampClass, jEllipsis, 'j-ellipsis-deep'])
163
+ }, [
164
+ _renderSlot(_ctx.$slots, "default"),
165
+ _renderSlot(_ctx.$slots, "tooltip")
166
+ ], 2 /* CLASS */))
167
+ : _createCommentVNode("v-if", true),
168
+ _createElementVNode("span", _mergeProps({
169
+ ref_key: "triggerRef",
170
+ ref: triggerRef
171
+ }, triggerAttrs(), {
172
+ onClick: _cache[0] || (_cache[0] = (...args) => (handleClickRef.value && handleClickRef.value(...args))),
173
+ onMouseleave: _cache[1] || (_cache[1] = $event => (visible.value = false)),
174
+ onMouseenter: _cache[2] || (_cache[2] = $event => {
175
+ ;
176
+ [
177
+ props.expandTrigger === 'click'
178
+ ? getTooltipDisabled()
179
+ : showTooltip(),
180
+ ];
181
+ })
182
+ }), null, 16 /* FULL_PROPS */)
183
+ ]),
184
+ _: 3 /* FORWARDED */
185
+ }, 16 /* FULL_PROPS */, ["visible"]));
186
+ };
187
+ }
188
+ });
189
+ export default __sfc_main__;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _Ellipsis = _interopRequireDefault(require("./Ellipsis.js"));
9
+ var _default = exports.default = _Ellipsis.default;
@@ -0,0 +1,56 @@
1
+ /* Analyzed bindings: {
2
+ "description": "props",
3
+ "image": "props",
4
+ "imageStyle": "props",
5
+ "Empty": "setup-maybe-ref",
6
+ "useSlots": "setup-const",
7
+ "NoData": "setup-maybe-ref",
8
+ "omit": "setup-maybe-ref",
9
+ "slots": "setup-maybe-ref",
10
+ "renderArr": "setup-maybe-ref",
11
+ "props": "setup-reactive-const",
12
+ "baseProps": "setup-maybe-ref"
13
+ } */
14
+ import { defineComponent as _defineComponent } from 'vue';
15
+ import { unref as _unref, renderSlot as _renderSlot, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, openBlock as _openBlock, createBlock as _createBlock } from "vue";
16
+ import { Empty } from 'ant-design-vue';
17
+ import { useSlots } from 'vue';
18
+ import NoData from './image';
19
+ import { omit } from 'lodash-es';
20
+ const __sfc_main__ = _defineComponent({
21
+ props: {
22
+ description: {
23
+ type: String,
24
+ default: '暂无数据',
25
+ },
26
+ image: {
27
+ type: String,
28
+ default: NoData,
29
+ },
30
+ imageStyle: {
31
+ type: Object,
32
+ default: () => {
33
+ return { height: '60px' };
34
+ },
35
+ },
36
+ },
37
+ setup(__props) {
38
+ const slots = useSlots();
39
+ const renderArr = Object.keys(slots);
40
+ const props = __props;
41
+ const baseProps = omit(props, ...renderArr);
42
+ return (_ctx, _cache) => {
43
+ return (_openBlock(), _createBlock(_unref(Empty), _normalizeProps(_guardReactiveProps(_unref(baseProps))), _createSlots({ _: 2 /* DYNAMIC */ }, [
44
+ _renderList(_unref(renderArr), (item) => {
45
+ return {
46
+ name: item,
47
+ fn: _withCtx((scope) => [
48
+ _renderSlot(_ctx.$slots, item, { scope: scope })
49
+ ])
50
+ };
51
+ })
52
+ ]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */));
53
+ };
54
+ }
55
+ });
56
+ export default __sfc_main__;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var img = 'data:image/png;base64,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';
8
+ var _default = exports.default = img;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _Empty = _interopRequireDefault(require("./Empty.js"));
9
+ var _default = exports.default = _Empty.default;