Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opentiny/vue-modal

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentiny/vue-modal - npm Package Compare versions

Comparing version 3.6.1 to 3.6.6

230

lib/index.js

@@ -17,9 +17,231 @@ function _extends() {

import { MsgQueue } from "@opentiny/vue-renderless/modal";
import PcTemplate from "./pc.js";
import MobileTemplate from "./mobile.js";
import { defineComponent, props, setup as _setup, h } from "@opentiny/vue-common";
import { renderless, api } from "@opentiny/vue-renderless/modal/vue";
import Button from "@opentiny/vue-button";
import { iconHelpSolid, iconInfoSolid, iconSuccess, iconWarning, iconError, iconLoading, iconMinscreenLeft, iconFullscreenLeft, iconClose } from "@opentiny/vue-icon";
import "@opentiny/vue-theme/modal/index.css";
var _sfc_main = /* @__PURE__ */ defineComponent({
props: [].concat(props, ["_constants", "animat", "beforeClose", "duration", "escClosable", "events", "fullscreen", "height", "id", "isFormReset", "lockScroll", "lockView", "marginSize", "mask", "maskClosable", "message", "minHeight", "minWidth", "modelValue", "resize", "showFooter", "showHeader", "status", "title", "top", "type", "vSize", "width", "zIndex"]),
components: {
Button
},
provide: function provide() {
return {
dialog: this
};
},
setup: function setup(props2, context) {
return _setup({
props: props2,
context,
renderless,
api
});
},
render: function render() {
var _ref, _this = this;
var state = this.state, scopedSlots = this.scopedSlots, vSize = this.vSize, type = this.type, resize = this.resize, animat = this.animat, status = this.status, showHeader = this.showHeader;
var showFooter = this.showFooter, title = this.title, message = this.message, lockScroll = this.lockScroll, lockView = this.lockView, mask = this.mask, constants = this._constants, t = this.t;
var zoomLocat = state.zoomLocat, visible = state.visible, contentVisible = state.contentVisible, modalTop = state.modalTop, isMsg = state.isMsg;
var defaultSlot = scopedSlots.default;
var footerSlot = scopedSlots.footer;
var STATUS_MAPPING_COMPINENT = {
QUESTION: iconHelpSolid(),
INFO: iconInfoSolid(),
SUCCESS: iconSuccess(),
WARNING: iconWarning(),
ERROR: iconError(),
LOADING: iconLoading()
};
return h("div", {
class: ["tiny-modal", "tiny-modal__wrapper", "type__" + type, (_ref = {}, _ref["size__" + vSize] = vSize, _ref["status__" + status] = typeof status === "string", _ref.is__animat = animat, _ref.lock__scroll = lockScroll, _ref.lock__view = lockView, _ref.is__mask = mask, _ref.is__maximize = zoomLocat, _ref.is__visible = contentVisible, _ref.active = visible, _ref)],
style: {
zIndex: this.state.modalZindex,
top: modalTop ? modalTop + "px" : null
},
on: {
click: this.selfClickEvent
}
}, [h("div", {
class: "tiny-modal__box",
ref: "modalBox"
}, [showHeader ? h("div", {
class: "tiny-modal__header",
on: {
mousedown: this.mousedownEvent
}
}, [status ? h("div", {
class: "tiny-modal__status-wrapper"
}, [typeof status === "string" ? h(STATUS_MAPPING_COMPINENT[status.toUpperCase()], {
class: [constants.STATUS_MAPPING_CLASSS[status.toUpperCase()]]
}) : h(status, {
class: ["tiny-modal__status-icon"]
})]) : null, h("span", {
class: "tiny-modal__title"
}, title || t("ui.alert.title")), resize ? h(zoomLocat ? iconMinscreenLeft() : iconFullscreenLeft(), {
class: ["tiny-modal__zoom-btn", "trigger__btn"],
on: {
click: this.toggleZoomEvent
}
}) : null, h(iconClose(), {
class: ["tiny-modal__close-btn", "trigger__btn"],
on: {
click: this.closeEvent
}
})]) : null, h("div", {
class: "tiny-modal__body"
}, [isMsg && status ? h("div", {
class: "tiny-modal__status-wrapper"
}, [typeof status === "string" ? h(STATUS_MAPPING_COMPINENT[status.toUpperCase()], {
class: [constants.STATUS_MAPPING_CLASSS[status.toUpperCase()]]
}) : h(status, {
class: ["tiny-modal__status-icon"]
})]) : null, h("div", {
class: "tiny-modal__content"
}, defaultSlot ? defaultSlot.call(this, {
$modal: this
}, h) : [h("div", {
class: "tiny-modal__text"
}, typeof message === "function" ? message.call(this, h) : message)])]), showFooter ? h("div", {
class: "tiny-modal__footer"
}, footerSlot ? footerSlot.call(this, {
$modal: this,
beforeClose: this.beforeClose
}, h) : [h(Button, {
props: {
type: "primary"
},
on: {
click: this.confirmEvent
}
}, t("ui.button.confirm")), type === "confirm" ? h(Button, {
on: {
click: this.cancelEvent
}
}, t("ui.button.cancel")) : null]) : null, !isMsg && resize ? h("span", {
class: "tiny-modal__resize"
}, ["wl", "wr", "swst", "sest", "st", "swlb", "selb", "sb"].map(function(type2) {
return h("span", {
class: type2 + "-resize",
attrs: {
"data-type": type2
},
on: {
mousedown: _this.dragEvent
}
});
})) : null])]);
}
});
import { defineComponent, props, setup as _setup, h } from "@opentiny/vue-common";
import { renderless, api } from "@opentiny/vue-renderless/modal/vue";
import Button from "@opentiny/vue-button";
import { iconMinscreenLeft, iconFullscreenLeft } from "@opentiny/vue-icon";
import "@opentiny/vue-theme-mobile/modal/index.css";
var _sfc_main = /* @__PURE__ */ defineComponent({
props: [].concat(props, ["_constants", "animat", "beforeClose", "duration", "escClosable", "events", "fullscreen", "height", "id", "isFormReset", "lockScroll", "lockView", "marginSize", "mask", "maskClosable", "message", "minHeight", "minWidth", "modelValue", "resize", "showFooter", "showHeader", "title", "top", "type", "vSize", "width", "zIndex"]),
components: {
Button
},
provide: function provide() {
return {
dialog: this
};
},
setup: function setup(props2, context) {
return _setup({
props: props2,
context,
renderless,
api
});
},
render: function render() {
var _ref, _this = this;
var state = this.state, scopedSlots = this.scopedSlots, vSize = this.vSize, type = this.type, resize = this.resize, animat = this.animat, showHeader = this.showHeader;
var showFooter = this.showFooter, title = this.title, message = this.message, lockScroll = this.lockScroll, lockView = this.lockView, mask = this.mask, t = this.t;
var zoomLocat = state.zoomLocat, visible = state.visible, contentVisible = state.contentVisible, modalTop = state.modalTop, isMsg = state.isMsg;
var defaultSlot = scopedSlots.default;
var footerSlot = scopedSlots.footer;
return h("div", {
class: ["tiny-mobile-modal", "tiny-mobile-modal__wrapper", "type__" + type, (_ref = {}, _ref["size__" + vSize] = vSize, _ref.is__animat = animat, _ref.lock__scroll = lockScroll, _ref.lock__view = lockView, _ref.is__mask = mask, _ref.is__maximize = zoomLocat, _ref.is__visible = contentVisible, _ref.active = visible, _ref)],
style: {
zIndex: this.state.modalZindex,
top: modalTop ? modalTop + "px" : null
},
on: {
click: this.selfClickEvent
}
}, [h("div", {
class: "tiny-mobile-modal__box",
ref: "modalBox"
}, [showHeader ? h("div", {
class: "tiny-mobile-modal__header",
on: {
mousedown: this.mousedownEvent
}
}, [h("span", {
class: "tiny-mobile-modal__title"
}, title || t("ui.alert.title")), resize ? h(zoomLocat ? iconMinscreenLeft() : iconFullscreenLeft(), {
class: ["tiny-mobile-modal__zoom-btn", "trigger__btn"],
on: {
click: this.toggleZoomEvent
}
}) : null]) : null, h("div", {
class: "tiny-mobile-modal__body"
}, [isMsg ? h("div", {
class: "tiny-mobile-modal__status-wrapper"
}) : null, h("div", {
class: "tiny-mobile-modal__content"
}, defaultSlot ? defaultSlot.call(this, {
$modal: this
}, h) : [h("div", {
class: "tiny-mobile-modal__text"
}, typeof message === "function" ? message.call(this, h) : message)])]), showFooter ? h("div", {
class: "tiny-mobile-modal__footer"
}, footerSlot ? footerSlot.call(this, {
$modal: this,
beforeClose: this.beforeClose
}, h) : [type === "confirm" ? h(Button, {
props: {
class: ["tiny-mobile-button", "tiny-mobile-button--default"]
},
on: {
click: this.cancelEvent
}
}, t("ui.button.cancel")) : null, h(Button, {
props: {
type: "primary",
class: ["tiny-mobile-button", type !== "confirm" ? "tiny-mobile-button__single" : ""]
},
on: {
click: this.confirmEvent
}
}, t("ui.button.confirm"))]) : null, !isMsg && resize ? h("span", {
class: "tiny-mobile-modal__resize"
}, ["wl", "wr", "swst", "sest", "st", "swlb", "selb", "sb"].map(function(type2) {
return h("span", {
class: type2 + "-resize",
attrs: {
"data-type": type2
},
on: {
mousedown: _this.dragEvent
}
});
})) : null])]);
}
});
import "@opentiny/vue-renderless/modal/vue";
import "@opentiny/vue-button";
import "@opentiny/vue-icon";
import "@opentiny/vue-theme/modal/index.css";
import "@opentiny/vue-theme-mobile/modal/index.css";
var template = function template2(mode) {
if ("mobile" === (process.env.TINY_MODE || mode))
return MobileTemplate;
return _sfc_main;
else
return PcTemplate;
return _sfc_main$1;
};

@@ -26,0 +248,0 @@ var $constants = {

@@ -100,4 +100,10 @@ import { defineComponent, props, setup as _setup, h } from "@opentiny/vue-common";

});
import "@opentiny/vue-common";
import "@opentiny/vue-renderless/modal/vue";
import "@opentiny/vue-button";
import "@opentiny/vue-icon";
import "@opentiny/vue-theme-mobile/modal/index.css";
export {
_sfc_main as default
};

@@ -119,4 +119,10 @@ import { defineComponent, props, setup as _setup, h } from "@opentiny/vue-common";

});
import "@opentiny/vue-common";
import "@opentiny/vue-renderless/modal/vue";
import "@opentiny/vue-button";
import "@opentiny/vue-icon";
import "@opentiny/vue-theme/modal/index.css";
export {
_sfc_main as default
};

10

package.json
{
"name": "@opentiny/vue-modal",
"version": "3.6.1",
"version": "3.6.6",
"description": "",
"main": "./lib/index.js",
"dependencies": {
"@opentiny/vue-renderless": "~3.6.1",
"@opentiny/vue-common": "~3.6.1",
"@opentiny/vue-button": "~3.6.1",
"@opentiny/vue-locale": "~3.6.1"
"@opentiny/vue-renderless": "~3.6.6",
"@opentiny/vue-common": "~3.6.6",
"@opentiny/vue-button": "~3.6.6",
"@opentiny/vue-locale": "~3.6.6"
},

@@ -12,0 +12,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc