@web-utils/component 1.2.4 → 1.2.6

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 (111) hide show
  1. package/README.md +27 -27
  2. package/dist/chunks/163eed3b.js +16 -1
  3. package/dist/chunks/2bd4e340.js +184 -0
  4. package/dist/chunks/6499de3a.js +30 -1
  5. package/dist/chunks/7af3ceb1.js +75 -0
  6. package/dist/chunks/86bcadec.js +24 -0
  7. package/dist/chunks/8bbde9bf.js +81 -1
  8. package/dist/chunks/90bd3d52.js +26 -1
  9. package/dist/chunks/92404ceb.js +126 -0
  10. package/dist/chunks/a73fe8ee.js +11 -0
  11. package/dist/chunks/df803484.js +60 -0
  12. package/dist/components/address-input/index.js +113 -1
  13. package/dist/components/aside-menu/index.js +58 -1
  14. package/dist/components/awesome-button/index.js +82 -1
  15. package/dist/components/capsule-tab/index.js +52 -1
  16. package/dist/components/chunk-file-uploader/index.js +119 -1
  17. package/dist/components/chunk-file-uploader-button/index.js +60 -1
  18. package/dist/components/chunk-file-uploader-drop/index.js +65 -1
  19. package/dist/components/chunk-file-uploader-file/index.js +311 -1
  20. package/dist/components/chunk-file-uploader-files/index.js +49 -1
  21. package/dist/components/chunk-file-uploader-list/index.js +50 -1
  22. package/dist/components/chunk-file-uploader-un-support/index.js +51 -1
  23. package/dist/components/code-mirror-editor/index.js +310 -6
  24. package/dist/components/color-picker/index.js +110 -1
  25. package/dist/components/confirm-button/index.js +57 -1
  26. package/dist/components/confirmable/index.js +28 -1
  27. package/dist/components/context-menu/index.js +236 -1
  28. package/dist/components/custom-scrollbar/index.js +150 -1
  29. package/dist/components/data-table-picker/index.js +137 -1
  30. package/dist/components/dynamic-table/index.js +195 -1
  31. package/dist/components/e-charts/index.js +229 -1
  32. package/dist/components/editable-progress/index.js +141 -1
  33. package/dist/components/editable-tree/index.js +789 -1
  34. package/dist/components/egd-collapse/index.js +79 -1
  35. package/dist/components/egd-collapse-item/index.js +132 -1
  36. package/dist/components/el-color-picker-dropdown/index.js +170 -1
  37. package/dist/components/element-dialog/index.js +242 -1
  38. package/dist/components/empty-view/index.js +69 -1
  39. package/dist/components/error-view/index.js +61 -1
  40. package/dist/components/flex-column/index.js +50 -1
  41. package/dist/components/flex-item/index.js +66 -1
  42. package/dist/components/flex-row/index.js +50 -1
  43. package/dist/components/flex-scroller/index.js +47 -1
  44. package/dist/components/form-button/index.js +80 -1
  45. package/dist/components/form-cascader/index.js +151 -1
  46. package/dist/components/form-checkbox-group/index.js +192 -1
  47. package/dist/components/form-date-picker/index.js +182 -1
  48. package/dist/components/form-holder/index.js +90 -1
  49. package/dist/components/form-input/index.js +106 -1
  50. package/dist/components/form-input-email/index.js +97 -1
  51. package/dist/components/form-input-id-card/index.js +104 -1
  52. package/dist/components/form-input-number/index.js +123 -1
  53. package/dist/components/form-input-phone-number/index.js +98 -1
  54. package/dist/components/form-input-time/index.js +124 -1
  55. package/dist/components/form-item/index.js +120 -1
  56. package/dist/components/form-item-config-provider/index.js +63 -1
  57. package/dist/components/form-item-group/index.js +169 -1
  58. package/dist/components/form-radio-group/index.js +170 -1
  59. package/dist/components/form-select/index.js +154 -1
  60. package/dist/components/form-switch/index.js +97 -1
  61. package/dist/components/form-textarea/index.js +102 -1
  62. package/dist/components/form-view/index.js +343 -1
  63. package/dist/components/guide-steps/index.js +94 -1
  64. package/dist/components/icon-card/index.js +62 -1
  65. package/dist/components/iframe-window/index.js +99 -1
  66. package/dist/components/input-number/index.js +274 -1
  67. package/dist/components/input-number-range/index.js +110 -1
  68. package/dist/components/j-s-x-component/index.js +16 -1
  69. package/dist/components/keep-view-alive/index.js +119 -1
  70. package/dist/components/loading-view/index.js +61 -1
  71. package/dist/components/nav-bar/index.js +52 -1
  72. package/dist/components/not-implement/index.js +35 -1
  73. package/dist/components/page/index.js +40 -1
  74. package/dist/components/page-header/index.js +56 -1
  75. package/dist/components/page-index/index.js +151 -1
  76. package/dist/components/page-index-top/index.js +119 -1
  77. package/dist/components/page-skeleton/index.js +56 -1
  78. package/dist/components/page-skeleton-new/index.js +98 -1
  79. package/dist/components/pageable-table/index.js +429 -1
  80. package/dist/components/pageable-view/index.js +328 -2
  81. package/dist/components/photo-swipe/index.js +187 -1
  82. package/dist/components/resize-observer/index.js +62 -1
  83. package/dist/components/search-popover/index.js +391 -2
  84. package/dist/components/sign-panel/index.js +242 -1
  85. package/dist/components/split-pane/index.js +209 -1
  86. package/dist/components/stateful/index.js +84 -1
  87. package/dist/components/static-pageable-table/index.js +92 -1
  88. package/dist/components/swiper/index.js +158 -1
  89. package/dist/components/tab/index.js +145 -1
  90. package/dist/components/tab-item/index.js +73 -1
  91. package/dist/components/table-column/index.js +89 -1
  92. package/dist/components/table-view/index.js +363 -1
  93. package/dist/components/tag-render/index.js +97 -1
  94. package/dist/components/tinymce-editor/index.js +173 -1
  95. package/dist/components/tinymce-wrapper/index.js +618 -1
  96. package/dist/components/toolbar/index.js +217 -1
  97. package/dist/components/toolbar-button/index.js +90 -1
  98. package/dist/components/trigger/index.js +71 -1
  99. package/dist/components/vue-tags-input/index.js +439 -1
  100. package/dist/components/watermark/index.js +63 -1
  101. package/dist/components/x-dialog/index.js +173 -1
  102. package/dist/index.css +2102 -1
  103. package/dist/index.es.js +2995 -2078
  104. package/package.json +29 -29
  105. package/web-types.json +22 -16
  106. package/dist/chunks/23bd3525.js +0 -1
  107. package/dist/chunks/65f4f4f2.js +0 -1
  108. package/dist/chunks/8473fc69.js +0 -1
  109. package/dist/chunks/addb6ed5.js +0 -1
  110. package/dist/chunks/b8305633.js +0 -1
  111. package/dist/chunks/e8547f66.js +0 -1
@@ -1 +1,97 @@
1
- var u=Object.defineProperty;var s=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;var o=(e,t,n)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l=(e,t)=>{for(var n in t||(t={}))d.call(t,n)&&o(e,n,t[n]);if(s)for(var n of s(t))c.call(t,n)&&o(e,n,t[n]);return e};import{hasOwn as i}from"@web-utils/core";import{n as p}from"../../chunks/6499de3a.js";var _=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"tag-render"},[e.tags&&e.tags.length&&e.tags[0]?e._l(e.internalTags,function(r,a){return n("ElTag",{key:a,attrs:{closable:e.enable,"disable-transitions":""},on:{close:function(x){return e.$emit("close",e.tags[a],a)}}},[e._v(" "+e._s(e.getTagName(r))+" ")])}):e.enable?e._e():[n("span",{staticStyle:{color:"#b5b5b5"}},[e._v("\u65E0")])],e.enable?n("ElButton",{staticClass:"el-tag el-tag--medium el-tag--light button-new-tag",attrs:{size:"small"},on:{click:function(r){return e.$emit("add")}}},[e._v(" + \u6DFB\u52A0 ")]):e._e(),e.count?n("span",{staticClass:"tags-count"},[e._v(e._s(e.tags.length&&e.tags[0]?e.tags.length:""))]):e._e()],2)},m=[];const f={name:"TagRender",inject:["elFormItem"],props:{enable:{type:Boolean,default:!0},count:{type:Boolean,default:!0},tags:{type:Array,default:()=>[]},transfer:{type:Function,default:null}},computed:{internalTags(){return this.transfer?this.tags.map(e=>{const t=l({},e);return this.transfer(t)}):this.tags}},watch:{tags(e){this.elFormItem&&e&&e.length>0&&this.elFormItem.clearValidate()}},methods:{getTagName(e){return i(e,"name")?e.name:i(e,"label")?e.label:e}}},g={};var b=p(f,_,m,!1,h,null,null,null);function h(e){for(let t in g)this[t]=g[t]}var v=function(){return b.exports}();export{v as default};
1
+ import { hasOwn as r } from "@web-utils/core";
2
+ import { n as o } from "../../chunks/6499de3a.js";
3
+ var i = function() {
4
+ var t = this, e = t.$createElement, n = t._self._c || e;
5
+ return n("div", {
6
+ staticClass: "tag-render"
7
+ }, [t.tags && t.tags.length && t.tags[0] ? t._l(t.internalTags, function(s, a) {
8
+ return n("ElTag", {
9
+ key: a,
10
+ attrs: {
11
+ closable: t.enable,
12
+ "disable-transitions": ""
13
+ },
14
+ on: {
15
+ close: function(m) {
16
+ return t.$emit("close", t.tags[a], a);
17
+ }
18
+ }
19
+ }, [t._v(" " + t._s(t.getTagName(s)) + " ")]);
20
+ }) : t.enable ? t._e() : [n("span", {
21
+ staticStyle: {
22
+ color: "#b5b5b5"
23
+ }
24
+ }, [t._v("\u65E0")])], t.enable ? n("ElButton", {
25
+ staticClass: "el-tag el-tag--medium el-tag--light button-new-tag",
26
+ attrs: {
27
+ size: "small"
28
+ },
29
+ on: {
30
+ click: function(s) {
31
+ return t.$emit("add");
32
+ }
33
+ }
34
+ }, [t._v(" + \u6DFB\u52A0 ")]) : t._e(), t.count ? n("span", {
35
+ staticClass: "tags-count"
36
+ }, [t._v(t._s(t.tags.length && t.tags[0] ? t.tags.length : ""))]) : t._e()], 2);
37
+ }, u = [];
38
+ const c = {
39
+ name: "TagRender",
40
+ inject: ["elFormItem"],
41
+ props: {
42
+ enable: {
43
+ type: Boolean,
44
+ default: !0
45
+ },
46
+ count: {
47
+ type: Boolean,
48
+ default: !0
49
+ },
50
+ tags: {
51
+ type: Array,
52
+ default: () => []
53
+ },
54
+ transfer: {
55
+ type: Function,
56
+ default: null
57
+ }
58
+ },
59
+ computed: {
60
+ internalTags() {
61
+ return this.transfer ? this.tags.map((t) => {
62
+ const e = { ...t };
63
+ return this.transfer(e);
64
+ }) : this.tags;
65
+ }
66
+ },
67
+ watch: {
68
+ tags(t) {
69
+ this.elFormItem && t && t.length > 0 && this.elFormItem.clearValidate();
70
+ }
71
+ },
72
+ methods: {
73
+ getTagName(t) {
74
+ return r(t, "name") ? t.name : r(t, "label") ? t.label : t;
75
+ }
76
+ }
77
+ }, l = {};
78
+ var _ = /* @__PURE__ */ o(
79
+ c,
80
+ i,
81
+ u,
82
+ !1,
83
+ g,
84
+ null,
85
+ null,
86
+ null
87
+ );
88
+ function g(t) {
89
+ for (let e in l)
90
+ this[e] = l[e];
91
+ }
92
+ const p = /* @__PURE__ */ function() {
93
+ return _.exports;
94
+ }();
95
+ export {
96
+ p as default
97
+ };
@@ -1 +1,173 @@
1
- import{n}from"../../chunks/6499de3a.js";var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticStyle:{"margin-bottom":"10px"},style:{height:e.height}},[e.lazy?[e.focus&&!e.inputDisabled?i("TinymceWrapper",e._b({ref:"editor",attrs:{"query-params":e.queryParams,disabled:e.inputDisabled,"show-types":e.showTypes,value:e.value},on:{"on-blur":e.onEditorBlur,"dialog-show":function(r){e.hideOnBlur=!1},"dialog-hide":function(r){e.hideOnBlur=!0},input:function(r){return e.$emit("input",r)}}},"TinymceWrapper",e.$attrs,!1)):i("div",{staticClass:"editor-shadow",class:[{"show-placeholder":e.isEmpty}],style:{cursor:e.inputDisabled?"not-allowed":"text"},attrs:{placeholder:e.inputDisabled?"":e.placeholder},domProps:{innerHTML:e._s(e.value)},on:{click:e.onEditorShadowClick}})]:[e.inputDisabled?i("div",{staticClass:"editor-shadow",class:[{"show-placeholder":e.isEmpty}],style:{cursor:e.inputDisabled?"not-allowed":"text"},attrs:{placeholder:e.inputDisabled?"":e.placeholder},domProps:{innerHTML:e._s(e.value)}}):i("TinymceWrapper",e._b({ref:"editor",attrs:{"query-params":e.queryParams,disabled:e.inputDisabled,value:e.value},on:{"on-blur":e.onEditorBlur,"dialog-show":function(r){e.hideOnBlur=!1},"dialog-hide":function(r){e.hideOnBlur=!0},input:function(r){return e.$emit("input",r)}}},"TinymceWrapper",e.$attrs,!1))]],2)},l=[];const s={name:"TinymceEditor",inject:{elForm:{default:""},elFormItem:{default:""}},props:{disabled:Boolean,lazy:{type:Boolean,default:!0},showTypes:{type:Boolean,default:!0},height:{type:String,default:"300px"},value:String,placeholder:{type:String,default:"\u8BF7\u8F93\u5165..."},queryParams:Object},data(){return{hideOnBlur:!0,focus:!1}},computed:{inputDisabled(){return this.disabled||(this.elForm||{}).disabled},isEmpty(){return!this.value}},watch:{hideOnBlur(e){e&&this.onEditorShadowClick()}},methods:{onEditorBlur(){this.inputDisabled||!this.hideOnBlur||(this.focus=!1)},getEditor(){return this.$refs.editor.$refs.editor.editor},async onEditorShadowClick(){if(this.inputDisabled)return;this.focus=!0,await this.$nextTick();const e=this.getEditor();e.focus();const t=e.getBody();e.selection.setCursorLocation(t,t.childNodes.length)},insertContent(e){this.getEditor().insertContent(e)}}},o={};var d=n(s,a,l,!1,u,null,null,null);function u(e){for(let t in o)this[t]=o[t]}var p=function(){return d.exports}();export{p as default};
1
+ import { n as o } from "../../chunks/6499de3a.js";
2
+ var s = function() {
3
+ var e = this, t = e.$createElement, r = e._self._c || t;
4
+ return r("div", {
5
+ staticStyle: {
6
+ "margin-bottom": "10px"
7
+ },
8
+ style: {
9
+ height: e.height
10
+ }
11
+ }, [e.lazy ? [e.focus && !e.inputDisabled ? r("TinymceWrapper", e._b({
12
+ ref: "editor",
13
+ attrs: {
14
+ "query-params": e.queryParams,
15
+ disabled: e.inputDisabled,
16
+ "show-types": e.showTypes,
17
+ value: e.value
18
+ },
19
+ on: {
20
+ "on-blur": e.onEditorBlur,
21
+ "dialog-show": function(i) {
22
+ e.hideOnBlur = !1;
23
+ },
24
+ "dialog-hide": function(i) {
25
+ e.hideOnBlur = !0;
26
+ },
27
+ input: function(i) {
28
+ return e.$emit("input", i);
29
+ }
30
+ }
31
+ }, "TinymceWrapper", e.$attrs, !1)) : r("div", {
32
+ staticClass: "editor-shadow",
33
+ class: [{
34
+ "show-placeholder": e.isEmpty
35
+ }],
36
+ style: {
37
+ cursor: e.inputDisabled ? "not-allowed" : "text"
38
+ },
39
+ attrs: {
40
+ placeholder: e.inputDisabled ? "" : e.placeholder
41
+ },
42
+ domProps: {
43
+ innerHTML: e._s(e.value)
44
+ },
45
+ on: {
46
+ click: e.onEditorShadowClick
47
+ }
48
+ })] : [e.inputDisabled ? r("div", {
49
+ staticClass: "editor-shadow",
50
+ class: [{
51
+ "show-placeholder": e.isEmpty
52
+ }],
53
+ style: {
54
+ cursor: e.inputDisabled ? "not-allowed" : "text"
55
+ },
56
+ attrs: {
57
+ placeholder: e.inputDisabled ? "" : e.placeholder
58
+ },
59
+ domProps: {
60
+ innerHTML: e._s(e.value)
61
+ }
62
+ }) : r("TinymceWrapper", e._b({
63
+ ref: "editor",
64
+ attrs: {
65
+ "query-params": e.queryParams,
66
+ disabled: e.inputDisabled,
67
+ value: e.value
68
+ },
69
+ on: {
70
+ "on-blur": e.onEditorBlur,
71
+ "dialog-show": function(i) {
72
+ e.hideOnBlur = !1;
73
+ },
74
+ "dialog-hide": function(i) {
75
+ e.hideOnBlur = !0;
76
+ },
77
+ input: function(i) {
78
+ return e.$emit("input", i);
79
+ }
80
+ }
81
+ }, "TinymceWrapper", e.$attrs, !1))]], 2);
82
+ }, a = [];
83
+ const l = {
84
+ name: "TinymceEditor",
85
+ inject: {
86
+ elForm: {
87
+ default: ""
88
+ },
89
+ elFormItem: {
90
+ default: ""
91
+ }
92
+ },
93
+ props: {
94
+ disabled: Boolean,
95
+ lazy: {
96
+ type: Boolean,
97
+ default: !0
98
+ },
99
+ showTypes: {
100
+ type: Boolean,
101
+ default: !0
102
+ },
103
+ height: {
104
+ type: String,
105
+ default: "300px"
106
+ },
107
+ value: String,
108
+ placeholder: {
109
+ type: String,
110
+ default: "\u8BF7\u8F93\u5165..."
111
+ },
112
+ queryParams: Object
113
+ },
114
+ data() {
115
+ return {
116
+ hideOnBlur: !0,
117
+ focus: !1
118
+ };
119
+ },
120
+ computed: {
121
+ inputDisabled() {
122
+ return this.disabled || (this.elForm || {}).disabled;
123
+ },
124
+ isEmpty() {
125
+ return !this.value;
126
+ }
127
+ },
128
+ watch: {
129
+ hideOnBlur(e) {
130
+ e && this.onEditorShadowClick();
131
+ }
132
+ },
133
+ methods: {
134
+ onEditorBlur() {
135
+ this.inputDisabled || !this.hideOnBlur || (this.focus = !1);
136
+ },
137
+ getEditor() {
138
+ return this.$refs.editor.$refs.editor.editor;
139
+ },
140
+ async onEditorShadowClick() {
141
+ if (this.inputDisabled)
142
+ return;
143
+ this.focus = !0, await this.$nextTick();
144
+ const e = this.getEditor();
145
+ e.focus();
146
+ const t = e.getBody();
147
+ e.selection.setCursorLocation(t, t.childNodes.length);
148
+ },
149
+ insertContent(e) {
150
+ this.getEditor().insertContent(e);
151
+ }
152
+ }
153
+ }, n = {};
154
+ var d = /* @__PURE__ */ o(
155
+ l,
156
+ s,
157
+ a,
158
+ !1,
159
+ u,
160
+ null,
161
+ null,
162
+ null
163
+ );
164
+ function u(e) {
165
+ for (let t in n)
166
+ this[t] = n[t];
167
+ }
168
+ const p = /* @__PURE__ */ function() {
169
+ return d.exports;
170
+ }();
171
+ export {
172
+ p as default
173
+ };