@qikdev/vue-ui 0.2.255 → 0.2.257

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/dist/lib.umd.js CHANGED
@@ -7,7 +7,7 @@
7
7
  t((V["@qikdev/vue-ui"] = {}), V.Vue, V["@qikdev/sdk"]));
8
8
  })(this, function (V, t, Mr) {
9
9
  "use strict";
10
- const ac = "0.2.255";
10
+ const ac = "0.2.257";
11
11
  class st extends Error {}
12
12
  class sc extends st {
13
13
  constructor(n) {
@@ -23806,6 +23806,14 @@
23806
23806
  case "javascript":
23807
23807
  window.js_beautify && (e = window.js_beautify(e));
23808
23808
  break;
23809
+ case "json":
23810
+ try {
23811
+ const n = JSON.parse(e);
23812
+ e = JSON.stringify(n, null, 4);
23813
+ } catch (n) {
23814
+ console.error("Unable to format invalid JSON string:", n);
23815
+ }
23816
+ break;
23809
23817
  case "css":
23810
23818
  case "scss":
23811
23819
  window.css_beautify && (e = window.css_beautify(e));
@@ -23844,23 +23852,42 @@
23844
23852
  model(e) {
23845
23853
  this.$emit("update:modelValue", e);
23846
23854
  },
23855
+ async formatReady() {
23856
+ if (
23857
+ this.mounted &&
23858
+ !(!this.$sdk.global || !this.$sdk.global.injectScript)
23859
+ )
23860
+ switch (this.lang) {
23861
+ case "js":
23862
+ case "javascript":
23863
+ await this.$sdk.global.injectScript(
23864
+ "https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.5/beautify.min.js",
23865
+ );
23866
+ break;
23867
+ case "css":
23868
+ case "scss":
23869
+ await this.$sdk.global.injectScript(
23870
+ "https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.5/beautify-css.min.js",
23871
+ );
23872
+ break;
23873
+ case "html":
23874
+ await this.$sdk.global.injectScript(
23875
+ "https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.5/beautify-html.min.js",
23876
+ );
23877
+ break;
23878
+ }
23879
+ },
23847
23880
  },
23848
23881
  unmounted() {
23849
23882
  this.editor = null;
23850
23883
  },
23851
- async mounted() {
23852
- (this.mounted = !0),
23853
- this.$sdk.global &&
23854
- this.$sdk.global.injectScript &&
23855
- (this.$sdk.global.injectScript(
23856
- "https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.5/beautify.min.js",
23857
- ),
23858
- this.$sdk.global.injectScript(
23859
- "https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.5/beautify-css.min.js",
23860
- ),
23861
- this.$sdk.global.injectScript(
23862
- "https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.5/beautify-html.min.js",
23863
- ));
23884
+ mounted() {
23885
+ this.mounted = !0;
23886
+ },
23887
+ computed: {
23888
+ formatReady() {
23889
+ return `${this.mounted}-${this.lang}`;
23890
+ },
23864
23891
  },
23865
23892
  data() {
23866
23893
  return {
@@ -24009,7 +24036,7 @@
24009
24036
  }
24010
24037
  const ms = g(y0, [
24011
24038
  ["render", k0],
24012
- ["__scopeId", "data-v-661639aa"],
24039
+ ["__scopeId", "data-v-fb400049"],
24013
24040
  ]),
24014
24041
  VM = "",
24015
24042
  b0 = {