vft 0.0.471 → 0.0.473

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.
@@ -1,6 +1,7 @@
1
1
  import type { RouteLocationNormalized } from 'vue-router';
2
2
  interface Props {
3
3
  iframePages: RouteLocationNormalized[];
4
+ preloadPage?: boolean;
4
5
  }
5
6
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
7
  export default _default;
@@ -1,30 +1,34 @@
1
- import { defineComponent as n, createElementBlock as a, openBlock as r, Fragment as o, renderList as m, withDirectives as l, createCommentVNode as s, createBlock as p, vShow as _, unref as i } from "vue";
2
- import { useRouter as h } from "vue-router";
3
- import d from "./iframe-page.vue2.js";
4
- const k = n({
1
+ import { defineComponent as o, createElementBlock as t, openBlock as r, Fragment as a, renderList as n, withDirectives as p, createCommentVNode as f, createBlock as c, vShow as u } from "vue";
2
+ import "@vueuse/core";
3
+ import "@vft/utils";
4
+ import "../config-provider/hooks/use-global-config.js";
5
+ import "lodash-es";
6
+ import "../form/index.js";
7
+ import "../../hooks/use-model-toggle/index.js";
8
+ import "@popperjs/core";
9
+ import "../../hooks/use-z-index/index.js";
10
+ import i from "./iframe-page.vue2.js";
11
+ const s = o({
5
12
  name: "vft-iframe-layout"
6
- }), w = /* @__PURE__ */ n({
7
- ...k,
13
+ }), C = /* @__PURE__ */ o({
14
+ ...s,
8
15
  props: {
9
- iframePages: {}
16
+ iframePages: {},
17
+ preloadPage: { type: Boolean }
10
18
  },
11
- setup(u) {
12
- const f = h();
13
- function c(t) {
14
- return t.fullPath === i(f.currentRoute).fullPath;
15
- }
16
- return (t, P) => (r(!0), a(o, null, m(u.iframePages, (e) => (r(), a(o, {
19
+ setup(m) {
20
+ return (l, _) => (r(!0), t(a, null, n(m.iframePages, (e) => (r(), t(a, {
17
21
  key: e.query ? e.fullPath : e.path
18
22
  }, [
19
- e.meta.frameSrc ? l((r(), p(d, {
23
+ e.meta.frameSrc && e.meta.loaded ? p((r(), c(i, {
20
24
  key: 0,
21
25
  "frame-src": e.meta.frameSrc
22
26
  }, null, 8, ["frame-src"])), [
23
- [_, c(e)]
24
- ]) : s("", !0)
27
+ [u, e.fullPath === l.$route.fullPath]
28
+ ]) : f("", !0)
25
29
  ], 64))), 128));
26
30
  }
27
31
  });
28
32
  export {
29
- w as default
33
+ C as default
30
34
  };
@@ -1,32 +1,57 @@
1
- import { defineComponent as o, createElementBlock as a, openBlock as t, normalizeClass as n, unref as i } from "vue";
1
+ import { defineComponent as m, ref as n, onMounted as p, nextTick as d, withDirectives as u, createElementBlock as v, openBlock as _, normalizeClass as i, unref as r, createElementVNode as w } from "vue";
2
2
  import "@vueuse/core";
3
3
  import "@vft/utils";
4
4
  import "../config-provider/hooks/use-global-config.js";
5
5
  import "lodash-es";
6
6
  import "../form/index.js";
7
- import { useNamespace as l } from "../../hooks/use-namespace/index.js";
7
+ import { useNamespace as g } from "../../hooks/use-namespace/index.js";
8
8
  import "../../hooks/use-model-toggle/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../hooks/use-z-index/index.js";
11
- const m = ["src"], s = o({
11
+ import { vLoading as h } from "../loading/directive.js";
12
+ import "../icon/index.js";
13
+ const b = ["src"], k = m({
12
14
  name: "vft-iframe-page"
13
- }), y = /* @__PURE__ */ o({
14
- ...s,
15
+ }), M = /* @__PURE__ */ m({
16
+ ...k,
15
17
  props: {
16
- frameSrc: { default: "" }
18
+ frameSrc: {}
17
19
  },
18
- setup(r) {
19
- const e = l("iframe-page");
20
- return (p, c) => (t(), a("iframe", {
21
- sandbox: "allow-scripts allow-same-origin allow-top-navigation allow-modals allow-forms allow-top-navigation-by-user-activation",
22
- referrerPolicy: "no-referrer-when-downgrade",
23
- frameborder: "0",
24
- style: { border: "none", outline: "none" },
25
- class: n(i(e).b()),
26
- src: r.frameSrc
27
- }, null, 10, m));
20
+ setup(s) {
21
+ const a = g("iframe-page"), e = n(), o = n(!0), t = () => {
22
+ o.value = !1;
23
+ }, l = () => {
24
+ o.value = !1;
25
+ }, c = () => {
26
+ if (!e.value) return;
27
+ e.value?.contentDocument?.readyState === "complete" && setTimeout(() => {
28
+ t();
29
+ }, 1e3);
30
+ };
31
+ return p(() => {
32
+ d(() => {
33
+ c();
34
+ });
35
+ }), (f, y) => u((_(), v("div", {
36
+ class: i(r(a).b())
37
+ }, [
38
+ w("iframe", {
39
+ ref_key: "iframeRef",
40
+ ref: e,
41
+ sandbox: "allow-scripts allow-same-origin allow-top-navigation allow-modals allow-forms allow-top-navigation-by-user-activation",
42
+ referrerPolicy: "no-referrer-when-downgrade",
43
+ frameborder: "0",
44
+ style: { border: "none", outline: "none" },
45
+ class: i(r(a).b()),
46
+ src: s.frameSrc,
47
+ onLoad: t,
48
+ onError: l
49
+ }, null, 42, b)
50
+ ], 2)), [
51
+ [r(h), o.value]
52
+ ]);
28
53
  }
29
54
  });
30
55
  export {
31
- y as default
56
+ M as default
32
57
  };
@@ -3,10 +3,16 @@ export declare const VftIframeLayout: import("vft/es/utils").SFCWithInstall<impo
3
3
  type: import("vue").PropType<import("vue-router").RouteLocationNormalizedGeneric[]>;
4
4
  required: true;
5
5
  };
6
+ preloadPage: {
7
+ type: import("vue").PropType<boolean>;
8
+ };
6
9
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
10
  iframePages: {
8
11
  type: import("vue").PropType<import("vue-router").RouteLocationNormalizedGeneric[]>;
9
12
  required: true;
10
13
  };
14
+ preloadPage: {
15
+ type: import("vue").PropType<boolean>;
16
+ };
11
17
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
12
18
  export default VftIframeLayout;
@@ -1 +1,2 @@
1
1
  import 'vft/theme-style/vft-iframe-layout.css';
2
+ import 'vft/theme-style/vft-loading.css';
@@ -1,2 +1,3 @@
1
1
  import "vft/theme-style/base.css";
2
2
  import "vft/theme-style/vft-iframe-layout.css";
3
+ import "vft/theme-style/vft-loading.css";
@@ -1 +1,2 @@
1
1
  import 'vft/theme-style/src/iframe-layout.scss';
2
+ import 'vft/theme-style/src/loading.scss';
@@ -1,2 +1,3 @@
1
1
  import "vft/theme-style/src/base.scss";
2
2
  import "vft/theme-style/src/iframe-layout.scss";
3
+ import "vft/theme-style/src/loading.scss";
@@ -2,14 +2,14 @@ import "@vueuse/core";
2
2
  import { isNumber as m, isClient as p } from "@vft/utils";
3
3
  import { debugWarn as l } from "../../utils/error.js";
4
4
  import "../../components/config-provider/hooks/use-global-config.js";
5
- import { ref as v, getCurrentInstance as i, inject as e, computed as c, unref as Z } from "vue";
5
+ import { getCurrentInstance as i, inject as e, computed as c, unref as v, ref as Z } from "vue";
6
6
  import "lodash-es";
7
7
  import "../../components/form/index.js";
8
8
  const s = {
9
9
  current: 0
10
- }, u = v(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
10
+ }, u = Z(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
11
11
  const n = i() ? e(d, s) : s, x = I || (i() ? e(y, void 0) : void 0), t = c(() => {
12
- const r = Z(x);
12
+ const r = v(x);
13
13
  return m(r) ? r : f;
14
14
  }), o = c(() => t.value + u.value), a = () => (n.current++, u.value = n.current, o.value);
15
15
  return !p && !e(d) && l(
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.471",
3
+ "version": "0.0.473",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
@@ -1,4 +1,4 @@
1
- const o = "0.0.471";
1
+ const o = "0.0.473";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1,6 +1,7 @@
1
1
  import type { RouteLocationNormalized } from 'vue-router';
2
2
  interface Props {
3
3
  iframePages: RouteLocationNormalized[];
4
+ preloadPage?: boolean;
4
5
  }
5
6
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
7
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("vue-router"),c=require("./iframe-page.vue2.cjs"),l=e.defineComponent({name:"vft-iframe-layout"}),s=e.defineComponent({...l,props:{iframePages:{}},setup(u){const n=o.useRouter();function a(t){return t.fullPath===e.unref(n.currentRoute).fullPath}return(t,f)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.iframePages,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.query?r.fullPath:r.path},[r.meta.frameSrc?e.withDirectives((e.openBlock(),e.createBlock(c.default,{key:0,"frame-src":r.meta.frameSrc},null,8,["frame-src"])),[[e.vShow,a(r)]]):e.createCommentVNode("",!0)],64))),128))}});exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const u=require("./iframe-page.vue2.cjs"),o=e.defineComponent({name:"vft-iframe-layout"}),l=e.defineComponent({...o,props:{iframePages:{},preloadPage:{type:Boolean}},setup(t){return(a,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.iframePages,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.query?r.fullPath:r.path},[r.meta.frameSrc&&r.meta.loaded?e.withDirectives((e.openBlock(),e.createBlock(u.default,{key:0,"frame-src":r.meta.frameSrc},null,8,["frame-src"])),[[e.vShow,r.fullPath===a.$route.fullPath]]):e.createCommentVNode("",!0)],64))),128))}});exports.default=l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const n=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const a=["src"],t=e.defineComponent({name:"vft-iframe-page"}),i=e.defineComponent({...t,props:{frameSrc:{default:""}},setup(r){const o=n.useNamespace("iframe-page");return(l,s)=>(e.openBlock(),e.createElementBlock("iframe",{sandbox:"allow-scripts allow-same-origin allow-top-navigation allow-modals allow-forms allow-top-navigation-by-user-activation",referrerPolicy:"no-referrer-when-downgrade",frameborder:"0",style:{border:"none",outline:"none"},class:e.normalizeClass(e.unref(o).b()),src:r.frameSrc},null,10,a))}});exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const c=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const u=require("../loading/directive.cjs");require("../icon/index.cjs");const f=["src"],d=e.defineComponent({name:"vft-iframe-page"}),m=e.defineComponent({...d,props:{frameSrc:{}},setup(t){const a=c.useNamespace("iframe-page"),r=e.ref(),o=e.ref(!0),n=()=>{o.value=!1},i=()=>{o.value=!1},s=()=>{if(!r.value)return;r.value?.contentDocument?.readyState==="complete"&&setTimeout(()=>{n()},1e3)};return e.onMounted(()=>{e.nextTick(()=>{s()})}),(l,v)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(a).b())},[e.createElementVNode("iframe",{ref_key:"iframeRef",ref:r,sandbox:"allow-scripts allow-same-origin allow-top-navigation allow-modals allow-forms allow-top-navigation-by-user-activation",referrerPolicy:"no-referrer-when-downgrade",frameborder:"0",style:{border:"none",outline:"none"},class:e.normalizeClass(e.unref(a).b()),src:t.frameSrc,onLoad:n,onError:i},null,42,f)],2)),[[e.unref(u.vLoading),o.value]])}});exports.default=m;
@@ -3,10 +3,16 @@ export declare const VftIframeLayout: import("vft/es/utils").SFCWithInstall<impo
3
3
  type: import("vue").PropType<import("vue-router").RouteLocationNormalizedGeneric[]>;
4
4
  required: true;
5
5
  };
6
+ preloadPage: {
7
+ type: import("vue").PropType<boolean>;
8
+ };
6
9
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
10
  iframePages: {
8
11
  type: import("vue").PropType<import("vue-router").RouteLocationNormalizedGeneric[]>;
9
12
  required: true;
10
13
  };
14
+ preloadPage: {
15
+ type: import("vue").PropType<boolean>;
16
+ };
11
17
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
12
18
  export default VftIframeLayout;
@@ -1 +1 @@
1
- "use strict";require("vft/theme-style/base.css");require("vft/theme-style/vft-iframe-layout.css");
1
+ "use strict";require("vft/theme-style/base.css");require("vft/theme-style/vft-iframe-layout.css");require("vft/theme-style/vft-loading.css");
@@ -1 +1,2 @@
1
1
  import 'vft/theme-style/vft-iframe-layout.css';
2
+ import 'vft/theme-style/vft-loading.css';
@@ -1 +1 @@
1
- "use strict";require("vft/theme-style/src/base.scss");require("vft/theme-style/src/iframe-layout.scss");
1
+ "use strict";require("vft/theme-style/src/base.scss");require("vft/theme-style/src/iframe-layout.scss");require("vft/theme-style/src/loading.scss");
@@ -1 +1,2 @@
1
1
  import 'vft/theme-style/src/iframe-layout.scss';
2
+ import 'vft/theme-style/src/loading.scss';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.471";exports.version=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.473";exports.version=e;
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "vft",
3
- "version": "0.0.471",
3
+ "version": "0.0.473",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vft",
3
- "version": "0.0.471",
3
+ "version": "0.0.473",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.js",
@@ -56,11 +56,11 @@
56
56
  "resize-detector": "0.3.0",
57
57
  "sortablejs": "1.15.0",
58
58
  "photoswipe": "5.4.4",
59
+ "@vft/utils": "0.0.151",
60
+ "@vft/store": "0.0.63",
59
61
  "@vft/constants": "0.0.75",
60
- "@vft/store": "0.0.61",
61
62
  "@vft/router": "0.0.71",
62
63
  "@vft/use": "0.0.92",
63
- "@vft/utils": "0.0.149",
64
64
  "@vft/directives": "0.0.36"
65
65
  },
66
66
  "vetur": {