@jetlinks-web/components 2.2.0 → 2.3.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.
package/es/AMap/Map.js CHANGED
@@ -10,6 +10,7 @@
10
10
  "ref": "setup-const",
11
11
  "computed": "setup-const",
12
12
  "inject": "setup-const",
13
+ "defineOptions": "setup-const",
13
14
  "initAMapApiLoader": "setup-maybe-ref",
14
15
  "ElAmap": "setup-maybe-ref",
15
16
  "getAMapUiPromise": "setup-maybe-ref",
@@ -29,7 +30,7 @@
29
30
  } */
30
31
  import { defineComponent as _defineComponent } from 'vue';
31
32
  import { renderSlot as _renderSlot, unref as _unref, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from "vue";
32
- import { ref, computed, inject } from 'vue';
33
+ import { ref, computed, inject, } from 'vue';
33
34
  import { initAMapApiLoader, ElAmap } from '@vuemap/vue-amap';
34
35
  import { getAMapUiPromise } from '@jetlinks-web/utils';
35
36
  import { MapProps } from './util';
@@ -0,0 +1,88 @@
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
+ "searchKey": "props",
19
+ "AutoComplete": "setup-maybe-ref",
20
+ "autoCompleteProps": "setup-maybe-ref",
21
+ "ref": "setup-const",
22
+ "defineOptions": "setup-const",
23
+ "props": "setup-reactive-const",
24
+ "emit": "setup-const",
25
+ "options": "setup-ref",
26
+ "onSearch": "setup-const",
27
+ "dropdownVisibleChange": "setup-const"
28
+ } */
29
+ import { defineComponent as _defineComponent } from 'vue';
30
+ import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, unref as _unref, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
31
+ import { AutoComplete } from 'ant-design-vue';
32
+ import { autoCompleteProps } from 'ant-design-vue/lib/auto-complete';
33
+ import { ref, } from 'vue';
34
+ const __sfc_main__ = _defineComponent({
35
+ ...{
36
+ name: 'JAutoComplete'
37
+ },
38
+ props: {
39
+ ...autoCompleteProps(),
40
+ searchKey: {
41
+ type: String,
42
+ default: 'label',
43
+ },
44
+ },
45
+ emits: ["select"],
46
+ setup(__props, { emit: __emit }) {
47
+ const props = __props;
48
+ const emit = __emit;
49
+ const options = ref(props.options);
50
+ /**
51
+ * 根据关键词提示
52
+ * @param searchText 关键词
53
+ */
54
+ const onSearch = (searchText) => {
55
+ options.value = _optionalChain([props, 'access', _2 => _2.options, 'optionalAccess', _3 => _3.filter, 'call', _4 => _4((item) => !!_optionalChain([item, 'access', _5 => _5[props.searchKey], 'optionalAccess', _6 => _6.includes, 'call', _7 => _7(searchText)]))]) || [];
56
+ if (!options.value.length) {
57
+ options.value.unshift({ label: searchText, value: searchText });
58
+ }
59
+ };
60
+ const dropdownVisibleChange = (open) => {
61
+ if (!open) {
62
+ // 关闭还原下拉options
63
+ setTimeout(() => {
64
+ options.value = props.options || [];
65
+ });
66
+ }
67
+ };
68
+ return (_ctx, _cache) => {
69
+ return (_openBlock(), _createBlock(_unref(AutoComplete), _mergeProps(props, {
70
+ style: { "width": "100%" },
71
+ options: options.value,
72
+ onSearch: onSearch,
73
+ onDropdownVisibleChange: dropdownVisibleChange
74
+ }), {
75
+ option: _withCtx(({ value, label }) => [
76
+ _renderSlot(_ctx.$slots, "option", { value: value }, () => [
77
+ _createTextVNode(_toDisplayString(label || value), 1 /* TEXT */)
78
+ ])
79
+ ]),
80
+ default: _withCtx(() => [
81
+ _renderSlot(_ctx.$slots, "default")
82
+ ]),
83
+ _: 3 /* FORWARDED */
84
+ }, 16 /* FULL_PROPS */, ["options"]));
85
+ };
86
+ }
87
+ });
88
+ export default __sfc_main__;
@@ -0,0 +1,5 @@
1
+ import AutoComplete from './AutoComplete.js';
2
+ AutoComplete.install = function (app) {
3
+ app.component(AutoComplete.name, AutoComplete);
4
+ };
5
+ export default AutoComplete;
@@ -3,6 +3,7 @@
3
3
  "status": "props",
4
4
  "statusNames": "props",
5
5
  "computed": "setup-const",
6
+ "defineOptions": "setup-const",
6
7
  "getHexColor": "setup-maybe-ref",
7
8
  "Badge": "setup-maybe-ref",
8
9
  "props": "setup-reactive-const",
@@ -10,7 +11,7 @@
10
11
  } */
11
12
  import { defineComponent as _defineComponent } from 'vue';
12
13
  import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock } from "vue";
13
- import { computed } from 'vue';
14
+ import { computed, } from 'vue';
14
15
  import { getHexColor } from './color';
15
16
  import { Badge } from 'ant-design-vue';
16
17
  const __sfc_main__ = _defineComponent({
@@ -10,6 +10,7 @@
10
10
  "computed": "setup-const",
11
11
  "ref": "setup-const",
12
12
  "watch": "setup-const",
13
+ "defineOptions": "setup-const",
13
14
  "props": "setup-reactive-const",
14
15
  "emit": "setup-const",
15
16
  "selectKeys": "setup-ref",
@@ -23,7 +24,7 @@ const _hoisted_2 = { class: "j-card-select-item-content" };
23
24
  const _hoisted_3 = { class: "j-card-select-title" };
24
25
  const _hoisted_4 = { class: "j-card-select-describe" };
25
26
  import { has } from 'lodash-es';
26
- import { computed, ref, watch } from 'vue';
27
+ import { computed, ref, watch, } from 'vue';
27
28
  const __sfc_main__ = Object.assign({
28
29
  name: 'JCardSelect'
29
30
  }, {
@@ -6,10 +6,9 @@
6
6
  "class": "props",
7
7
  "style": "props",
8
8
  "computed": "setup-const",
9
- "CSSProperties": "setup-const",
10
- "PropType": "setup-const",
11
9
  "ref": "setup-const",
12
10
  "watch": "setup-const",
11
+ "defineOptions": "setup-const",
13
12
  "isArray": "setup-maybe-ref",
14
13
  "props": "setup-reactive-const",
15
14
  "emit": "setup-const",
@@ -21,7 +20,7 @@
21
20
  import { defineComponent as _defineComponent } from 'vue';
22
21
  import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
23
22
  const _hoisted_1 = ["onClick"];
24
- import { computed, ref, watch } from 'vue';
23
+ import { computed, ref, watch, } from 'vue';
25
24
  import { isArray } from '@jetlinks-web/utils';
26
25
  const __sfc_main__ = _defineComponent({
27
26
  ...{
@@ -1,11 +1,10 @@
1
1
  /* Analyzed bindings: {
2
2
  "options": "props",
3
3
  "style": "props",
4
- "CSSProperties": "setup-const",
5
4
  "nextTick": "setup-const",
6
5
  "ref": "setup-const",
7
6
  "watch": "setup-const",
8
- "Ref": "setup-const",
7
+ "defineOptions": "setup-const",
9
8
  "useECharts": "setup-maybe-ref",
10
9
  "props": "setup-reactive-const",
11
10
  "echartsDom": "setup-ref",
@@ -48,7 +48,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
48
48
  "onFieldChange": "setup-const"
49
49
  } */
50
50
  import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
51
- const _withScopeId = n => (_pushScopeId("data-v-1724924739516"), n = n(), _popScopeId(), n);
51
+ const _withScopeId = n => (_pushScopeId("data-v-1725345293616"), n = n(), _popScopeId(), n);
52
52
  const _hoisted_1 = { style: { "color": "#1d2129" } };
53
53
  const _hoisted_2 = {
54
54
  key: 0,
@@ -6,7 +6,7 @@
6
6
  } */
7
7
  import { defineComponent as _defineComponent } from 'vue';
8
8
  import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
9
- const _withScopeId = n => (_pushScopeId("data-v-1724924738720"), n = n(), _popScopeId(), n);
9
+ const _withScopeId = n => (_pushScopeId("data-v-1725345293925"), n = n(), _popScopeId(), n);
10
10
  const _hoisted_1 = { class: "full-page-warp-content" };
11
11
  import { ref } from 'vue';
12
12
  import { useElementBounding } from '@vueuse/core';
@@ -0,0 +1,122 @@
1
+ import { h, onMounted, onUpdated, ref, defineComponent } from 'vue';
2
+ import MarkdownIt from 'markdown-it';
3
+ import MarkdownItAbbr from 'markdown-it-abbr';
4
+ import MarkdownItAnchor from 'markdown-it-anchor';
5
+ import MarkdownItDeflist from 'markdown-it-deflist';
6
+ import MarkdownItFootnote from 'markdown-it-footnote';
7
+ import MarkdownItHighlightjs from 'markdown-it-highlightjs';
8
+ import MarkdownItIns from 'markdown-it-ins';
9
+ import MarkdownItMark from 'markdown-it-mark';
10
+ import MarkdownItSub from 'markdown-it-sub';
11
+ import MarkdownItSup from 'markdown-it-sup';
12
+ import MarkdownItTaskLists from 'markdown-it-task-lists';
13
+ import MarkdownItTOC from 'markdown-it-toc-done-right';
14
+ var props = {
15
+ anchor: {
16
+ type: Object,
17
+ default: function _default() {
18
+ return {};
19
+ }
20
+ },
21
+ breaks: {
22
+ type: Boolean,
23
+ default: false
24
+ },
25
+ emoji: {
26
+ type: Object,
27
+ default: function _default() {
28
+ return {};
29
+ }
30
+ },
31
+ highlight: {
32
+ type: Object,
33
+ default: function _default() {
34
+ return {};
35
+ }
36
+ },
37
+ html: {
38
+ type: Boolean,
39
+ default: false
40
+ },
41
+ langPrefix: {
42
+ type: String,
43
+ default: 'language-'
44
+ },
45
+ linkify: {
46
+ type: Boolean,
47
+ default: false
48
+ },
49
+ plugins: {
50
+ type: Array,
51
+ default: function _default() {
52
+ return [];
53
+ }
54
+ },
55
+ quotes: {
56
+ type: String,
57
+ default: '“”‘’'
58
+ },
59
+ source: {
60
+ type: String,
61
+ default: ''
62
+ },
63
+ tasklists: {
64
+ type: Object,
65
+ default: function _default() {
66
+ return {};
67
+ }
68
+ },
69
+ toc: {
70
+ type: Object,
71
+ default: function _default() {
72
+ return {};
73
+ }
74
+ },
75
+ typographer: {
76
+ type: Boolean,
77
+ default: false
78
+ },
79
+ xhtmlOut: {
80
+ type: Boolean,
81
+ default: false
82
+ }
83
+ };
84
+ export default defineComponent({
85
+ name: 'JMarkdown',
86
+ props: props,
87
+ setup: function setup(props) {
88
+ var md = ref();
89
+ var renderMarkdown = function renderMarkdown() {
90
+ var markdown = new MarkdownIt().use(MarkdownItAbbr).use(MarkdownItAnchor, props.anchor).use(MarkdownItDeflist).use(MarkdownItFootnote).use(MarkdownItHighlightjs, props.highlight).use(MarkdownItIns).use(MarkdownItMark).use(MarkdownItSub).use(MarkdownItSup).use(MarkdownItTaskLists, props.tasklists).use(MarkdownItTOC, props.toc).set({
91
+ breaks: props.breaks,
92
+ html: props.html,
93
+ langPrefix: props.langPrefix,
94
+ linkify: props.linkify,
95
+ quotes: props.quotes,
96
+ typographer: props.typographer,
97
+ xhtmlOut: props.xhtmlOut
98
+ });
99
+ props.plugins.forEach(function (_ref) {
100
+ var plugin = _ref.plugin,
101
+ _ref$options = _ref.options,
102
+ options = _ref$options === void 0 ? {} : _ref$options;
103
+ markdown.use(plugin, options);
104
+ });
105
+ md.value = markdown.render(props.source);
106
+ };
107
+ onMounted(function () {
108
+ return renderMarkdown();
109
+ });
110
+ onUpdated(function () {
111
+ return renderMarkdown();
112
+ });
113
+ return function () {
114
+ return h('div', {
115
+ innerHTML: md.value,
116
+ style: {
117
+ height: '100%'
118
+ }
119
+ });
120
+ };
121
+ }
122
+ });
@@ -0,0 +1,5 @@
1
+ import Markdown from './Markdown';
2
+ Markdown.install = function (app) {
3
+ app.component(Markdown.name, Markdown);
4
+ };
5
+ export default Markdown;
@@ -2,6 +2,7 @@
2
2
  "value": "props",
3
3
  "options": "props",
4
4
  "columns": "props",
5
+ "defineOptions": "setup-const",
5
6
  "props": "setup-reactive-const",
6
7
  "emit": "setup-const",
7
8
  "myValue": "setup-maybe-ref",
@@ -9,7 +10,7 @@
9
10
  "onClick": "setup-const"
10
11
  } */
11
12
  import { unref as _unref, 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";
12
- const _withScopeId = n => (_pushScopeId("data-v-1724924739727"), n = n(), _popScopeId(), n);
13
+ const _withScopeId = n => (_pushScopeId("data-v-1725345294479"), n = n(), _popScopeId(), n);
13
14
  const _hoisted_1 = ["onClick"];
14
15
  const __sfc_main__ = Object.assign({
15
16
  name: 'JRadioButton',
@@ -21,7 +21,7 @@
21
21
  } */
22
22
  import { defineComponent as _defineComponent } from 'vue';
23
23
  import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
24
- const _withScopeId = n => (_pushScopeId("data-v-1724924741250"), n = n(), _popScopeId(), n);
24
+ const _withScopeId = n => (_pushScopeId("data-v-1725345295640"), n = n(), _popScopeId(), n);
25
25
  const _hoisted_1 = {
26
26
  key: 0,
27
27
  style: { "width": "240px" }
package/es/Search/Item.js CHANGED
@@ -78,7 +78,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
78
78
  } */
79
79
  import { defineComponent as _defineComponent } from 'vue';
80
80
  import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
81
- const _withScopeId = n => (_pushScopeId("data-v-1724924740375"), n = n(), _popScopeId(), n);
81
+ const _withScopeId = n => (_pushScopeId("data-v-1725345294732"), n = n(), _popScopeId(), n);
82
82
  const _hoisted_1 = { class: "JSearch-item" };
83
83
  const _hoisted_2 = {
84
84
  key: 0,
@@ -36,7 +36,7 @@
36
36
  } */
37
37
  import { defineComponent as _defineComponent } from 'vue';
38
38
  import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, unref as _unref, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
39
- const _withScopeId = n => (_pushScopeId("data-v-1724924740471"), n = n(), _popScopeId(), n);
39
+ const _withScopeId = n => (_pushScopeId("data-v-1725345294853"), n = n(), _popScopeId(), n);
40
40
  const _hoisted_1 = { class: "JSearch-content simple" };
41
41
  const _hoisted_2 = { class: "JSearch-items" };
42
42
  import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
package/es/components.js CHANGED
@@ -17,4 +17,6 @@ export { default as Search, AdvancedSearch } from './Search';
17
17
  export { default as ValueItem } from './ValueItem';
18
18
  export { default as TimeFormat } from './TimeFormat';
19
19
  export { default as DragModal } from './DragModal';
20
- export { default as EditTable } from './EditTable';
20
+ export { default as EditTable } from './EditTable';
21
+ export { default as Markdown } from './Markdown';
22
+ export { default as AutoComplete } from './AutoComplete';
package/lib/AMap/Map.js CHANGED
@@ -10,6 +10,7 @@
10
10
  "ref": "setup-const",
11
11
  "computed": "setup-const",
12
12
  "inject": "setup-const",
13
+ "defineOptions": "setup-const",
13
14
  "initAMapApiLoader": "setup-maybe-ref",
14
15
  "ElAmap": "setup-maybe-ref",
15
16
  "getAMapUiPromise": "setup-maybe-ref",
@@ -29,7 +30,7 @@
29
30
  } */
30
31
  import { defineComponent as _defineComponent } from 'vue';
31
32
  import { renderSlot as _renderSlot, unref as _unref, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from "vue";
32
- import { ref, computed, inject } from 'vue';
33
+ import { ref, computed, inject, } from 'vue';
33
34
  import { initAMapApiLoader, ElAmap } from '@vuemap/vue-amap';
34
35
  import { getAMapUiPromise } from '@jetlinks-web/utils';
35
36
  import { MapProps } from './util';
@@ -0,0 +1,88 @@
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
+ "searchKey": "props",
19
+ "AutoComplete": "setup-maybe-ref",
20
+ "autoCompleteProps": "setup-maybe-ref",
21
+ "ref": "setup-const",
22
+ "defineOptions": "setup-const",
23
+ "props": "setup-reactive-const",
24
+ "emit": "setup-const",
25
+ "options": "setup-ref",
26
+ "onSearch": "setup-const",
27
+ "dropdownVisibleChange": "setup-const"
28
+ } */
29
+ import { defineComponent as _defineComponent } from 'vue';
30
+ import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, unref as _unref, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
31
+ import { AutoComplete } from 'ant-design-vue';
32
+ import { autoCompleteProps } from 'ant-design-vue/lib/auto-complete';
33
+ import { ref, } from 'vue';
34
+ const __sfc_main__ = _defineComponent({
35
+ ...{
36
+ name: 'JAutoComplete'
37
+ },
38
+ props: {
39
+ ...autoCompleteProps(),
40
+ searchKey: {
41
+ type: String,
42
+ default: 'label',
43
+ },
44
+ },
45
+ emits: ["select"],
46
+ setup(__props, { emit: __emit }) {
47
+ const props = __props;
48
+ const emit = __emit;
49
+ const options = ref(props.options);
50
+ /**
51
+ * 根据关键词提示
52
+ * @param searchText 关键词
53
+ */
54
+ const onSearch = (searchText) => {
55
+ options.value = _optionalChain([props, 'access', _2 => _2.options, 'optionalAccess', _3 => _3.filter, 'call', _4 => _4((item) => !!_optionalChain([item, 'access', _5 => _5[props.searchKey], 'optionalAccess', _6 => _6.includes, 'call', _7 => _7(searchText)]))]) || [];
56
+ if (!options.value.length) {
57
+ options.value.unshift({ label: searchText, value: searchText });
58
+ }
59
+ };
60
+ const dropdownVisibleChange = (open) => {
61
+ if (!open) {
62
+ // 关闭还原下拉options
63
+ setTimeout(() => {
64
+ options.value = props.options || [];
65
+ });
66
+ }
67
+ };
68
+ return (_ctx, _cache) => {
69
+ return (_openBlock(), _createBlock(_unref(AutoComplete), _mergeProps(props, {
70
+ style: { "width": "100%" },
71
+ options: options.value,
72
+ onSearch: onSearch,
73
+ onDropdownVisibleChange: dropdownVisibleChange
74
+ }), {
75
+ option: _withCtx(({ value, label }) => [
76
+ _renderSlot(_ctx.$slots, "option", { value: value }, () => [
77
+ _createTextVNode(_toDisplayString(label || value), 1 /* TEXT */)
78
+ ])
79
+ ]),
80
+ default: _withCtx(() => [
81
+ _renderSlot(_ctx.$slots, "default")
82
+ ]),
83
+ _: 3 /* FORWARDED */
84
+ }, 16 /* FULL_PROPS */, ["options"]));
85
+ };
86
+ }
87
+ });
88
+ export default __sfc_main__;
@@ -0,0 +1,12 @@
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 _AutoComplete = _interopRequireDefault(require("./AutoComplete.js"));
9
+ _AutoComplete.default.install = function (app) {
10
+ app.component(_AutoComplete.default.name, _AutoComplete.default);
11
+ };
12
+ var _default = exports.default = _AutoComplete.default;
@@ -3,6 +3,7 @@
3
3
  "status": "props",
4
4
  "statusNames": "props",
5
5
  "computed": "setup-const",
6
+ "defineOptions": "setup-const",
6
7
  "getHexColor": "setup-maybe-ref",
7
8
  "Badge": "setup-maybe-ref",
8
9
  "props": "setup-reactive-const",
@@ -10,7 +11,7 @@
10
11
  } */
11
12
  import { defineComponent as _defineComponent } from 'vue';
12
13
  import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock } from "vue";
13
- import { computed } from 'vue';
14
+ import { computed, } from 'vue';
14
15
  import { getHexColor } from './color';
15
16
  import { Badge } from 'ant-design-vue';
16
17
  const __sfc_main__ = _defineComponent({
@@ -10,6 +10,7 @@
10
10
  "computed": "setup-const",
11
11
  "ref": "setup-const",
12
12
  "watch": "setup-const",
13
+ "defineOptions": "setup-const",
13
14
  "props": "setup-reactive-const",
14
15
  "emit": "setup-const",
15
16
  "selectKeys": "setup-ref",
@@ -23,7 +24,7 @@ const _hoisted_2 = { class: "j-card-select-item-content" };
23
24
  const _hoisted_3 = { class: "j-card-select-title" };
24
25
  const _hoisted_4 = { class: "j-card-select-describe" };
25
26
  import { has } from 'lodash-es';
26
- import { computed, ref, watch } from 'vue';
27
+ import { computed, ref, watch, } from 'vue';
27
28
  const __sfc_main__ = Object.assign({
28
29
  name: 'JCardSelect'
29
30
  }, {
@@ -6,10 +6,9 @@
6
6
  "class": "props",
7
7
  "style": "props",
8
8
  "computed": "setup-const",
9
- "CSSProperties": "setup-const",
10
- "PropType": "setup-const",
11
9
  "ref": "setup-const",
12
10
  "watch": "setup-const",
11
+ "defineOptions": "setup-const",
13
12
  "isArray": "setup-maybe-ref",
14
13
  "props": "setup-reactive-const",
15
14
  "emit": "setup-const",
@@ -21,7 +20,7 @@
21
20
  import { defineComponent as _defineComponent } from 'vue';
22
21
  import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
23
22
  const _hoisted_1 = ["onClick"];
24
- import { computed, ref, watch } from 'vue';
23
+ import { computed, ref, watch, } from 'vue';
25
24
  import { isArray } from '@jetlinks-web/utils';
26
25
  const __sfc_main__ = _defineComponent({
27
26
  ...{
@@ -1,11 +1,10 @@
1
1
  /* Analyzed bindings: {
2
2
  "options": "props",
3
3
  "style": "props",
4
- "CSSProperties": "setup-const",
5
4
  "nextTick": "setup-const",
6
5
  "ref": "setup-const",
7
6
  "watch": "setup-const",
8
- "Ref": "setup-const",
7
+ "defineOptions": "setup-const",
9
8
  "useECharts": "setup-maybe-ref",
10
9
  "props": "setup-reactive-const",
11
10
  "echartsDom": "setup-ref",
@@ -48,7 +48,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
48
48
  "onFieldChange": "setup-const"
49
49
  } */
50
50
  import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
51
- const _withScopeId = n => (_pushScopeId("data-v-1724924739491"), n = n(), _popScopeId(), n);
51
+ const _withScopeId = n => (_pushScopeId("data-v-1725345293592"), n = n(), _popScopeId(), n);
52
52
  const _hoisted_1 = { style: { "color": "#1d2129" } };
53
53
  const _hoisted_2 = {
54
54
  key: 0,
@@ -6,7 +6,7 @@
6
6
  } */
7
7
  import { defineComponent as _defineComponent } from 'vue';
8
8
  import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
9
- const _withScopeId = n => (_pushScopeId("data-v-1724924738728"), n = n(), _popScopeId(), n);
9
+ const _withScopeId = n => (_pushScopeId("data-v-1725345293934"), n = n(), _popScopeId(), n);
10
10
  const _hoisted_1 = { class: "full-page-warp-content" };
11
11
  import { ref } from 'vue';
12
12
  import { useElementBounding } from '@vueuse/core';
@@ -0,0 +1,129 @@
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 _markdownIt = _interopRequireDefault(require("markdown-it"));
10
+ var _markdownItAbbr = _interopRequireDefault(require("markdown-it-abbr"));
11
+ var _markdownItAnchor = _interopRequireDefault(require("markdown-it-anchor"));
12
+ var _markdownItDeflist = _interopRequireDefault(require("markdown-it-deflist"));
13
+ var _markdownItFootnote = _interopRequireDefault(require("markdown-it-footnote"));
14
+ var _markdownItHighlightjs = _interopRequireDefault(require("markdown-it-highlightjs"));
15
+ var _markdownItIns = _interopRequireDefault(require("markdown-it-ins"));
16
+ var _markdownItMark = _interopRequireDefault(require("markdown-it-mark"));
17
+ var _markdownItSub = _interopRequireDefault(require("markdown-it-sub"));
18
+ var _markdownItSup = _interopRequireDefault(require("markdown-it-sup"));
19
+ var _markdownItTaskLists = _interopRequireDefault(require("markdown-it-task-lists"));
20
+ var _markdownItTocDoneRight = _interopRequireDefault(require("markdown-it-toc-done-right"));
21
+ var props = {
22
+ anchor: {
23
+ type: Object,
24
+ default: function _default() {
25
+ return {};
26
+ }
27
+ },
28
+ breaks: {
29
+ type: Boolean,
30
+ default: false
31
+ },
32
+ emoji: {
33
+ type: Object,
34
+ default: function _default() {
35
+ return {};
36
+ }
37
+ },
38
+ highlight: {
39
+ type: Object,
40
+ default: function _default() {
41
+ return {};
42
+ }
43
+ },
44
+ html: {
45
+ type: Boolean,
46
+ default: false
47
+ },
48
+ langPrefix: {
49
+ type: String,
50
+ default: 'language-'
51
+ },
52
+ linkify: {
53
+ type: Boolean,
54
+ default: false
55
+ },
56
+ plugins: {
57
+ type: Array,
58
+ default: function _default() {
59
+ return [];
60
+ }
61
+ },
62
+ quotes: {
63
+ type: String,
64
+ default: '“”‘’'
65
+ },
66
+ source: {
67
+ type: String,
68
+ default: ''
69
+ },
70
+ tasklists: {
71
+ type: Object,
72
+ default: function _default() {
73
+ return {};
74
+ }
75
+ },
76
+ toc: {
77
+ type: Object,
78
+ default: function _default() {
79
+ return {};
80
+ }
81
+ },
82
+ typographer: {
83
+ type: Boolean,
84
+ default: false
85
+ },
86
+ xhtmlOut: {
87
+ type: Boolean,
88
+ default: false
89
+ }
90
+ };
91
+ var _default2 = exports.default = (0, _vue.defineComponent)({
92
+ name: 'JMarkdown',
93
+ props: props,
94
+ setup: function setup(props) {
95
+ var md = (0, _vue.ref)();
96
+ var renderMarkdown = function renderMarkdown() {
97
+ var markdown = new _markdownIt.default().use(_markdownItAbbr.default).use(_markdownItAnchor.default, props.anchor).use(_markdownItDeflist.default).use(_markdownItFootnote.default).use(_markdownItHighlightjs.default, props.highlight).use(_markdownItIns.default).use(_markdownItMark.default).use(_markdownItSub.default).use(_markdownItSup.default).use(_markdownItTaskLists.default, props.tasklists).use(_markdownItTocDoneRight.default, props.toc).set({
98
+ breaks: props.breaks,
99
+ html: props.html,
100
+ langPrefix: props.langPrefix,
101
+ linkify: props.linkify,
102
+ quotes: props.quotes,
103
+ typographer: props.typographer,
104
+ xhtmlOut: props.xhtmlOut
105
+ });
106
+ props.plugins.forEach(function (_ref) {
107
+ var plugin = _ref.plugin,
108
+ _ref$options = _ref.options,
109
+ options = _ref$options === void 0 ? {} : _ref$options;
110
+ markdown.use(plugin, options);
111
+ });
112
+ md.value = markdown.render(props.source);
113
+ };
114
+ (0, _vue.onMounted)(function () {
115
+ return renderMarkdown();
116
+ });
117
+ (0, _vue.onUpdated)(function () {
118
+ return renderMarkdown();
119
+ });
120
+ return function () {
121
+ return (0, _vue.h)('div', {
122
+ innerHTML: md.value,
123
+ style: {
124
+ height: '100%'
125
+ }
126
+ });
127
+ };
128
+ }
129
+ });
@@ -0,0 +1,12 @@
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 _Markdown = _interopRequireDefault(require("./Markdown"));
9
+ _Markdown.default.install = function (app) {
10
+ app.component(_Markdown.default.name, _Markdown.default);
11
+ };
12
+ var _default = exports.default = _Markdown.default;
@@ -2,6 +2,7 @@
2
2
  "value": "props",
3
3
  "options": "props",
4
4
  "columns": "props",
5
+ "defineOptions": "setup-const",
5
6
  "props": "setup-reactive-const",
6
7
  "emit": "setup-const",
7
8
  "myValue": "setup-maybe-ref",
@@ -9,7 +10,7 @@
9
10
  "onClick": "setup-const"
10
11
  } */
11
12
  import { unref as _unref, 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";
12
- const _withScopeId = n => (_pushScopeId("data-v-1724924739717"), n = n(), _popScopeId(), n);
13
+ const _withScopeId = n => (_pushScopeId("data-v-1725345294465"), n = n(), _popScopeId(), n);
13
14
  const _hoisted_1 = ["onClick"];
14
15
  const __sfc_main__ = Object.assign({
15
16
  name: 'JRadioButton',
@@ -21,7 +21,7 @@
21
21
  } */
22
22
  import { defineComponent as _defineComponent } from 'vue';
23
23
  import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
24
- const _withScopeId = n => (_pushScopeId("data-v-1724924741261"), n = n(), _popScopeId(), n);
24
+ const _withScopeId = n => (_pushScopeId("data-v-1725345295629"), n = n(), _popScopeId(), n);
25
25
  const _hoisted_1 = {
26
26
  key: 0,
27
27
  style: { "width": "240px" }
@@ -78,7 +78,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
78
78
  } */
79
79
  import { defineComponent as _defineComponent } from 'vue';
80
80
  import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
81
- const _withScopeId = n => (_pushScopeId("data-v-1724924740311"), n = n(), _popScopeId(), n);
81
+ const _withScopeId = n => (_pushScopeId("data-v-1725345294677"), n = n(), _popScopeId(), n);
82
82
  const _hoisted_1 = { class: "JSearch-item" };
83
83
  const _hoisted_2 = {
84
84
  key: 0,
@@ -36,7 +36,7 @@
36
36
  } */
37
37
  import { defineComponent as _defineComponent } from 'vue';
38
38
  import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, unref as _unref, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
39
- const _withScopeId = n => (_pushScopeId("data-v-1724924740452"), n = n(), _popScopeId(), n);
39
+ const _withScopeId = n => (_pushScopeId("data-v-1725345294831"), n = n(), _popScopeId(), n);
40
40
  const _hoisted_1 = { class: "JSearch-content simple" };
41
41
  const _hoisted_2 = { class: "JSearch-items" };
42
42
  import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
package/lib/components.js CHANGED
@@ -17,6 +17,12 @@ Object.defineProperty(exports, "AdvancedSearch", {
17
17
  return _Search.AdvancedSearch;
18
18
  }
19
19
  });
20
+ Object.defineProperty(exports, "AutoComplete", {
21
+ enumerable: true,
22
+ get: function get() {
23
+ return _AutoComplete.default;
24
+ }
25
+ });
20
26
  Object.defineProperty(exports, "BadgeStatus", {
21
27
  enumerable: true,
22
28
  get: function get() {
@@ -77,6 +83,12 @@ Object.defineProperty(exports, "FullPage", {
77
83
  return _FullPage.default;
78
84
  }
79
85
  });
86
+ Object.defineProperty(exports, "Markdown", {
87
+ enumerable: true,
88
+ get: function get() {
89
+ return _Markdown.default;
90
+ }
91
+ });
80
92
  Object.defineProperty(exports, "MonacoEditor", {
81
93
  enumerable: true,
82
94
  get: function get() {
@@ -151,5 +163,7 @@ var _ValueItem = _interopRequireDefault(require("./ValueItem"));
151
163
  var _TimeFormat = _interopRequireDefault(require("./TimeFormat"));
152
164
  var _DragModal = _interopRequireDefault(require("./DragModal"));
153
165
  var _EditTable = _interopRequireDefault(require("./EditTable"));
166
+ var _Markdown = _interopRequireDefault(require("./Markdown"));
167
+ var _AutoComplete = _interopRequireDefault(require("./AutoComplete"));
154
168
  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); }
155
169
  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; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/components",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -22,6 +22,19 @@
22
22
  "@vueuse/router": "^10.9.0",
23
23
  "async-validator": "^4.2.5",
24
24
  "echarts": "^5.4.3",
25
+ "markdown-it": "^14.1.0",
26
+ "markdown-it-abbr": "^2.0.0",
27
+ "markdown-it-anchor": "^9.1.0",
28
+ "markdown-it-deflist": "^3.0.0",
29
+ "markdown-it-emoji": "^3.0.0",
30
+ "markdown-it-footnote": "^4.0.0",
31
+ "markdown-it-highlightjs": "^4.1.0",
32
+ "markdown-it-ins": "^4.0.0",
33
+ "markdown-it-mark": "^4.0.0",
34
+ "markdown-it-sub": "^2.0.0",
35
+ "markdown-it-sup": "^2.0.0",
36
+ "markdown-it-task-lists": "^2.1.1",
37
+ "markdown-it-toc-done-right": "^4.2.0",
25
38
  "monaco-editor": "^0.40.0",
26
39
  "resize-observer-polyfill": "^1.5.1",
27
40
  "sortablejs": "^1.15.2"
@@ -140,8 +153,8 @@
140
153
  "webpack-merge": "^5.0.0",
141
154
  "webpackbar": "^5.0.2",
142
155
  "@jetlinks-web/constants": "^1.0.2",
143
- "@jetlinks-web/utils": "^1.1.0",
144
- "@jetlinks-web/hooks": "^1.0.13"
156
+ "@jetlinks-web/utils": "^1.2.0",
157
+ "@jetlinks-web/hooks": "^1.0.15"
145
158
  },
146
159
  "publishConfig": {
147
160
  "registry": "https://registry.npmjs.org/",