@web-utils/component 2.9.4 → 2.9.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.
@@ -0,0 +1 @@
1
+ .vue-cron .language{position:absolute;right:25px;z-index:1}.vue-cron .el-tabs{box-shadow:none}.vue-cron .tabBody .el-row{margin:10px 0}.vue-cron .tabBody .el-row .long .el-select{width:350px}.vue-cron .tabBody .el-row .el-input-number{width:110px}.vue-cron .bottom{width:100%;text-align:center;margin-top:5px;position:relative}.vue-cron .bottom .value{font-size:18px;vertical-align:middle}
@@ -0,0 +1,117 @@
1
+ import "quill/dist/quill.core.css";
2
+ import "quill/dist/quill.snow.css";
3
+ import "quill/dist/quill.bubble.css";
4
+ import s from "quill";
5
+ import { n } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
6
+ var o = function() {
7
+ var t = this, i = t.$createElement, e = t._self._c || i;
8
+ return e("div", {
9
+ staticClass: "vue-quill-editor"
10
+ }, [t._t("toolbar"), e("div", {
11
+ ref: "editor",
12
+ staticClass: "quill-editor"
13
+ })], 2);
14
+ }, r = [];
15
+ const u = {
16
+ theme: "snow",
17
+ boundary: document.body,
18
+ modules: {
19
+ toolbar: [
20
+ ["bold", "italic", "underline", "strike"],
21
+ ["blockquote", "code-block"],
22
+ [{ header: 1 }, { header: 2 }],
23
+ [{ list: "ordered" }, { list: "bullet" }],
24
+ [{ script: "sub" }, { script: "super" }],
25
+ [{ indent: "-1" }, { indent: "+1" }],
26
+ [{ direction: "rtl" }],
27
+ [{ size: ["small", !1, "large", "huge"] }],
28
+ [{ header: [1, 2, 3, 4, 5, 6, !1] }],
29
+ [{ color: [] }, { background: [] }],
30
+ [{ font: [] }],
31
+ [{ align: [] }],
32
+ ["clean"],
33
+ ["link", "image", "video"]
34
+ ]
35
+ },
36
+ placeholder: "Insert text here ...",
37
+ readOnly: !1
38
+ }, a = {
39
+ name: "VueQuillEditor",
40
+ props: {
41
+ content: String,
42
+ value: String,
43
+ disabled: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ options: {
48
+ type: Object,
49
+ required: !1,
50
+ default: () => ({})
51
+ },
52
+ globalOptions: {
53
+ type: Object,
54
+ required: !1,
55
+ default: () => ({})
56
+ }
57
+ },
58
+ data() {
59
+ return {
60
+ innerOptions: {},
61
+ innerContent: "",
62
+ defaultOptions: u
63
+ };
64
+ },
65
+ watch: {
66
+ // Watch content change
67
+ content(t) {
68
+ this.quill && (t && t !== this.innerContent ? (this.innerContent = t, this.quill.pasteHTML(t)) : t || this.quill.setText(""));
69
+ },
70
+ // Watch content change
71
+ value(t) {
72
+ this.quill && (t && t !== this.innerContent ? (this.innerContent = t, this.quill.pasteHTML(t)) : t || this.quill.setText(""));
73
+ },
74
+ // Watch disabled change
75
+ disabled(t) {
76
+ this.quill && this.quill.enable(!t);
77
+ }
78
+ },
79
+ mounted() {
80
+ this.initialize();
81
+ },
82
+ beforeDestroy() {
83
+ this.quill = null, delete this.quill;
84
+ },
85
+ methods: {
86
+ // Init Quill instance
87
+ initialize() {
88
+ this.$el && (this.innerOptions = Object.assign({}, this.defaultOptions, this.globalOptions, this.options), this.quill = new s(this.$refs.editor, this.innerOptions), this.quill.enable(!1), (this.value || this.content) && this.quill.pasteHTML(this.value || this.content), this.disabled || this.quill.enable(!0), this.quill.on("selection-change", (t) => {
89
+ t ? this.$emit("focus", this.quill) : this.$emit("blur", this.quill);
90
+ }), this.quill.on("text-change", () => {
91
+ let t = this.$refs.editor.children[0].innerHTML;
92
+ const i = this.quill, e = this.quill.getText();
93
+ t === "<p><br></p>" && (t = ""), this.innerContent = t, this.$emit("input", this.innerContent), this.$emit("change", { html: t, text: e, quill: i });
94
+ }), this.$emit("ready", this.quill));
95
+ }
96
+ }
97
+ }, l = {};
98
+ var h = /* @__PURE__ */ n(
99
+ a,
100
+ o,
101
+ r,
102
+ !1,
103
+ d,
104
+ null,
105
+ null,
106
+ null
107
+ );
108
+ function d(t) {
109
+ for (let i in l)
110
+ this[i] = l[i];
111
+ }
112
+ const _ = /* @__PURE__ */ function() {
113
+ return h.exports;
114
+ }();
115
+ export {
116
+ _ as default
117
+ };
@@ -0,0 +1 @@
1
+ .vue-quill-editor .quill-editor{min-height:400px}
@@ -0,0 +1,187 @@
1
+ var f = Object.defineProperty;
2
+ var h = Object.getOwnPropertySymbols;
3
+ var m = Object.prototype.hasOwnProperty, g = Object.prototype.propertyIsEnumerable;
4
+ var c = (e, i, t) => i in e ? f(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, u = (e, i) => {
5
+ for (var t in i || (i = {}))
6
+ m.call(i, t) && c(e, t, i[t]);
7
+ if (h)
8
+ for (var t of h(i))
9
+ g.call(i, t) && c(e, t, i[t]);
10
+ return e;
11
+ };
12
+ var d = (e, i, t) => new Promise((r, o) => {
13
+ var n = (s) => {
14
+ try {
15
+ a(t.next(s));
16
+ } catch (p) {
17
+ o(p);
18
+ }
19
+ }, l = (s) => {
20
+ try {
21
+ a(t.throw(s));
22
+ } catch (p) {
23
+ o(p);
24
+ }
25
+ }, a = (s) => s.done ? r(s.value) : Promise.resolve(s.value).then(n, l);
26
+ a((t = t.apply(e, i)).next());
27
+ });
28
+ import "video.js/dist/video-js.min.css";
29
+ import v from "video.js";
30
+ import _ from "video.js/dist/lang/zh-CN.json";
31
+ import b from "lodash/defaults";
32
+ import { n as O } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
33
+ var $ = function() {
34
+ var e = this, i = e.$createElement, t = e._self._c || i;
35
+ return t("div", {
36
+ staticClass: "video-player video-player-box"
37
+ }, [t("video", {
38
+ ref: "video",
39
+ staticClass: "video-js"
40
+ })]);
41
+ }, x = [];
42
+ v.addLanguage("zh", _);
43
+ const A = [
44
+ "loadeddata",
45
+ "canplay",
46
+ "canplaythrough",
47
+ "play",
48
+ "pause",
49
+ "waiting",
50
+ "playing",
51
+ "ended",
52
+ "error"
53
+ ], T = {
54
+ name: "VueVideoPlayer",
55
+ props: {
56
+ crossOrigin: {
57
+ type: String,
58
+ default: ""
59
+ },
60
+ playsInline: {
61
+ type: Boolean,
62
+ default: !1
63
+ },
64
+ autoplay: {
65
+ type: Boolean,
66
+ default: !0
67
+ },
68
+ volume: {
69
+ type: Number,
70
+ default: 1
71
+ },
72
+ src: String,
73
+ options: Object,
74
+ events: {
75
+ type: Array,
76
+ default: () => []
77
+ },
78
+ globalOptions: {
79
+ type: Object,
80
+ default: () => ({
81
+ // autoplay: false,
82
+ controls: !0,
83
+ // preload: 'auto',
84
+ // fluid: false,
85
+ // muted: false,
86
+ playbackRates: [0.7, 1, 1.5, 2],
87
+ controlBar: {
88
+ remainingTimeDisplay: !1,
89
+ playToggle: {},
90
+ progressControl: {},
91
+ fullscreenToggle: {},
92
+ volumeMenuButton: {
93
+ inline: !1,
94
+ vertical: !0
95
+ }
96
+ },
97
+ techOrder: ["html5"],
98
+ plugins: {}
99
+ })
100
+ },
101
+ globalEvents: {
102
+ type: Array,
103
+ default: () => []
104
+ }
105
+ },
106
+ data() {
107
+ return {
108
+ player: null
109
+ };
110
+ },
111
+ computed: {
112
+ videoOptions() {
113
+ return b({
114
+ language: "zh",
115
+ autoplay: this.autoplay,
116
+ sources: [{ src: this.src }]
117
+ }, u(u({}, this.globalOptions), this.options));
118
+ }
119
+ },
120
+ watch: {
121
+ videoOptions: {
122
+ immediate: !0,
123
+ deep: !0,
124
+ handler: "initialize"
125
+ }
126
+ },
127
+ activated() {
128
+ var e;
129
+ (e = this.player) == null || e.play();
130
+ },
131
+ deactivated() {
132
+ var e;
133
+ (e = this.player) == null || e.pause();
134
+ },
135
+ beforeDestroy() {
136
+ this.dispose();
137
+ },
138
+ methods: {
139
+ initialize() {
140
+ return d(this, null, function* () {
141
+ var n, l;
142
+ if (yield this.$nextTick(), !((l = (n = this.videoOptions) == null ? void 0 : n.sources) != null && l.length))
143
+ return;
144
+ if (this.player) {
145
+ this.player.options(this.videoOptions);
146
+ return;
147
+ }
148
+ this.playsInline && (this.$refs.video.setAttribute("playsinline", this.playsInline), this.$refs.video.setAttribute("webkit-playsinline", this.playsInline), this.$refs.video.setAttribute("x5-playsinline", this.playsInline), this.$refs.video.setAttribute("x5-video-player-type", "h5"), this.$refs.video.setAttribute("x5-video-player-fullscreen", !1)), this.crossOrigin && (this.$refs.video.crossOrigin = this.crossOrigin, this.$refs.video.setAttribute("crossOrigin", this.crossOrigin));
149
+ const { events: e, globalEvents: i, volume: t } = this, r = (...a) => this.$emit(...a), o = A.concat(e).concat(i);
150
+ this.player = v(this.$refs.video, this.videoOptions, function() {
151
+ this.volume(t);
152
+ for (let a = 0; a < o.length; a++) {
153
+ const s = o[a];
154
+ this.on(s, () => r(s, this));
155
+ }
156
+ this.on("timeupdate", () => r("timeupdate", this.currentTime(), this)), r("ready", this);
157
+ });
158
+ });
159
+ },
160
+ dispose() {
161
+ return d(this, null, function* () {
162
+ var e;
163
+ (e = this.player) != null && e.dispose && (this.player.techName_ !== "Flash" && this.player.pause(), this.player.dispose(), this.player = null);
164
+ });
165
+ }
166
+ }
167
+ }, y = {};
168
+ var V = /* @__PURE__ */ O(
169
+ T,
170
+ $,
171
+ x,
172
+ !1,
173
+ z,
174
+ null,
175
+ null,
176
+ null
177
+ );
178
+ function z(e) {
179
+ for (let i in y)
180
+ this[i] = y[i];
181
+ }
182
+ const B = /* @__PURE__ */ function() {
183
+ return V.exports;
184
+ }();
185
+ export {
186
+ B as default
187
+ };
@@ -0,0 +1 @@
1
+ .video-player-box{width:100%;height:100%}.video-player-box .video-js{width:100%;height:100%;background-color:#404040}
package/web-types.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "@web-utils/component",
5
- "version": "2.9.4",
5
+ "version": "2.9.6",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "description-markup": "markdown",
@@ -19770,6 +19770,36 @@
19770
19770
  }
19771
19771
  ]
19772
19772
  },
19773
+ {
19774
+ "name": "VueCron",
19775
+ "description": "",
19776
+ "attributes": [
19777
+ {
19778
+ "name": "data",
19779
+ "value": {
19780
+ "kind": "expression",
19781
+ "type": "object"
19782
+ },
19783
+ "default": ""
19784
+ },
19785
+ {
19786
+ "name": "expression",
19787
+ "value": {
19788
+ "kind": "expression",
19789
+ "type": "string"
19790
+ },
19791
+ "default": ""
19792
+ }
19793
+ ],
19794
+ "events": [
19795
+ {
19796
+ "name": "change"
19797
+ },
19798
+ {
19799
+ "name": "close"
19800
+ }
19801
+ ]
19802
+ },
19773
19803
  {
19774
19804
  "name": "VueQrCode",
19775
19805
  "description": "",
@@ -19808,6 +19838,76 @@
19808
19838
  }
19809
19839
  ]
19810
19840
  },
19841
+ {
19842
+ "name": "VueQuillEditor",
19843
+ "description": "",
19844
+ "attributes": [
19845
+ {
19846
+ "name": "content",
19847
+ "value": {
19848
+ "kind": "expression",
19849
+ "type": "string"
19850
+ },
19851
+ "default": ""
19852
+ },
19853
+ {
19854
+ "name": "value",
19855
+ "value": {
19856
+ "kind": "expression",
19857
+ "type": "string"
19858
+ },
19859
+ "default": ""
19860
+ },
19861
+ {
19862
+ "name": "disabled",
19863
+ "value": {
19864
+ "kind": "expression",
19865
+ "type": "boolean"
19866
+ },
19867
+ "default": "false"
19868
+ },
19869
+ {
19870
+ "name": "options",
19871
+ "required": false,
19872
+ "value": {
19873
+ "kind": "expression",
19874
+ "type": "object"
19875
+ },
19876
+ "default": "{}"
19877
+ },
19878
+ {
19879
+ "name": "globalOptions",
19880
+ "required": false,
19881
+ "value": {
19882
+ "kind": "expression",
19883
+ "type": "object"
19884
+ },
19885
+ "default": "{}"
19886
+ }
19887
+ ],
19888
+ "events": [
19889
+ {
19890
+ "name": "blur"
19891
+ },
19892
+ {
19893
+ "name": "focus"
19894
+ },
19895
+ {
19896
+ "name": "input"
19897
+ },
19898
+ {
19899
+ "name": "change"
19900
+ },
19901
+ {
19902
+ "name": "ready"
19903
+ }
19904
+ ],
19905
+ "slots": [
19906
+ {
19907
+ "name": "toolbar"
19908
+ }
19909
+ ]
19910
+ },
19811
19911
  {
19812
19912
  "name": "VueTagsInput",
19813
19913
  "description": "",
@@ -20637,6 +20737,84 @@
20637
20737
  }
20638
20738
  ]
20639
20739
  },
20740
+ {
20741
+ "name": "VueVideoPlayer",
20742
+ "description": "",
20743
+ "attributes": [
20744
+ {
20745
+ "name": "crossOrigin",
20746
+ "value": {
20747
+ "kind": "expression",
20748
+ "type": "string"
20749
+ },
20750
+ "default": "''"
20751
+ },
20752
+ {
20753
+ "name": "playsInline",
20754
+ "value": {
20755
+ "kind": "expression",
20756
+ "type": "boolean"
20757
+ },
20758
+ "default": "false"
20759
+ },
20760
+ {
20761
+ "name": "autoplay",
20762
+ "value": {
20763
+ "kind": "expression",
20764
+ "type": "boolean"
20765
+ },
20766
+ "default": "true"
20767
+ },
20768
+ {
20769
+ "name": "volume",
20770
+ "value": {
20771
+ "kind": "expression",
20772
+ "type": "number"
20773
+ },
20774
+ "default": "1"
20775
+ },
20776
+ {
20777
+ "name": "src",
20778
+ "value": {
20779
+ "kind": "expression",
20780
+ "type": "string"
20781
+ },
20782
+ "default": ""
20783
+ },
20784
+ {
20785
+ "name": "options",
20786
+ "value": {
20787
+ "kind": "expression",
20788
+ "type": "object"
20789
+ },
20790
+ "default": ""
20791
+ },
20792
+ {
20793
+ "name": "events",
20794
+ "value": {
20795
+ "kind": "expression",
20796
+ "type": "array"
20797
+ },
20798
+ "default": "[]"
20799
+ },
20800
+ {
20801
+ "name": "globalOptions",
20802
+ "value": {
20803
+ "kind": "expression",
20804
+ "type": "object"
20805
+ },
20806
+ "default": "{\r\n // autoplay: false,\r\n controls: true,\r\n\r\n // preload: 'auto',\r\n // fluid: false,\r\n // muted: false,\r\n playbackRates: [0.7, 1.0, 1.5, 2.0],\r\n\r\n controlBar: {\r\n remainingTimeDisplay: false,\r\n playToggle: {},\r\n progressControl: {},\r\n fullscreenToggle: {},\r\n volumeMenuButton: {\r\n inline: false,\r\n vertical: true\r\n }\r\n },\r\n\r\n techOrder: ['html5'],\r\n plugins: {}\r\n}"
20807
+ },
20808
+ {
20809
+ "name": "globalEvents",
20810
+ "value": {
20811
+ "kind": "expression",
20812
+ "type": "array"
20813
+ },
20814
+ "default": "[]"
20815
+ }
20816
+ ]
20817
+ },
20640
20818
  {
20641
20819
  "name": "Watermark",
20642
20820
  "description": "",