@opentiny/vue-popconfirm
Advanced tools
Comparing version 3.8.3 to 3.9.0
@@ -1,2 +0,2 @@ | ||
import Popconfirm from './src/mobile-first.vue'; | ||
import Popconfirm from './src/index'; | ||
export default Popconfirm; |
310
lib/index.js
@@ -1,54 +0,34 @@ | ||
import { defineComponent, $prefix, setup as _setup } from "@opentiny/vue-common"; | ||
import { renderless, api } from "@opentiny/vue-renderless/popconfirm/vue"; | ||
import Popover from "@opentiny/vue-popover"; | ||
import Modal from "@opentiny/vue-modal"; | ||
import Button from "@opentiny/vue-button"; | ||
import { IconSuccess, IconInfoSolid, IconWarning, IconError } from "@opentiny/vue-icon"; | ||
import { resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, renderSlot, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString, createTextVNode } from "vue"; | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (it) | ||
return (it = it.call(o)).next.bind(it); | ||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) | ||
o = it; | ||
var i = 0; | ||
return function() { | ||
if (i >= o.length) | ||
return { done: true }; | ||
return { done: false, value: o[i++] }; | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
function _extends() { | ||
_extends = Object.assign ? Object.assign.bind() : function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) | ||
return; | ||
if (typeof o === "string") | ||
return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) | ||
n = o.constructor.name; | ||
if (n === "Map" || n === "Set") | ||
return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) | ||
return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) | ||
len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) | ||
arr2[i] = arr[i]; | ||
return arr2; | ||
} | ||
var _export_sfc = function _export_sfc2(sfc, props) { | ||
var target = sfc.__vccOpts || sfc; | ||
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) { | ||
var _step$value = _step.value, key = _step$value[0], val = _step$value[1]; | ||
target[key] = val; | ||
import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common"; | ||
import PcTemplate from "./pc.js"; | ||
import MobileFirstTemplate from "./mobile-first.js"; | ||
var template = function template2(mode) { | ||
if ("pc" === (process.env.TINY_MODE || mode)) { | ||
return PcTemplate; | ||
} | ||
return target; | ||
if ("mobile-first" === (process.env.TINY_MODE || mode)) { | ||
return MobileFirstTemplate; | ||
} | ||
return PcTemplate; | ||
}; | ||
var $constants = { | ||
PC_PREFIXCLS: "tiny-popconfim", | ||
MOBILE_PREFIXCLS: "tiny-mobile-popconfim", | ||
Mode: "pc", | ||
prefixcls: function prefixcls(mode) { | ||
return mode === this.Mode ? this.PC_PREFIXCLS : this.MOBILE_PREFIXCLS; | ||
}, | ||
ICON_MAP: { | ||
@@ -61,14 +41,5 @@ success: "icon-success", | ||
}; | ||
var _sfc_main = defineComponent({ | ||
name: $prefix + "Popconfirm", | ||
components: { | ||
TinyPopover: Popover, | ||
TinyModal: Modal, | ||
TinyButton: Button, | ||
IconSuccess: IconSuccess(), | ||
IconInfoSolid: IconInfoSolid(), | ||
IconWarning: IconWarning(), | ||
IconError: IconError() | ||
}, | ||
props: { | ||
var Popconfirm = defineComponent({ | ||
name: $prefix + "Popconfim", | ||
props: _extends({}, $props, { | ||
_constants: { | ||
@@ -100,222 +71,15 @@ type: Object, | ||
type: [String, Number], | ||
default: "" | ||
default: "350" | ||
}, | ||
type: [String, Object] | ||
}, | ||
emits: ["hide", "show", "confirm"], | ||
}), | ||
setup: function setup(props, context) { | ||
return _setup({ | ||
return $setup({ | ||
props, | ||
context, | ||
renderless, | ||
api, | ||
mono: true | ||
template | ||
}); | ||
} | ||
}); | ||
var _hoisted_1 = { | ||
"data-tag": "tiny-popconfirm", | ||
class: "inline-block" | ||
}; | ||
var _hoisted_2 = { | ||
class: "hidden sm:inline-block" | ||
}; | ||
var _hoisted_3 = { | ||
class: "py-1 text-xs text-color-text-primary" | ||
}; | ||
var _hoisted_4 = { | ||
"data-tag": "tiny-popconfirm-header", | ||
class: "flex items-center leading-6" | ||
}; | ||
var _hoisted_5 = { | ||
class: "flex-auto" | ||
}; | ||
var _hoisted_6 = { | ||
"data-tag": "tiny-popconfirm-content", | ||
class: "text-color-text-secondary leading-6" | ||
}; | ||
var _hoisted_7 = { | ||
class: "flex mt-4 justify-end" | ||
}; | ||
var _hoisted_8 = { | ||
class: "sm:hidden inline-block" | ||
}; | ||
var _hoisted_9 = { | ||
class: "flex text-base justify-center" | ||
}; | ||
var _hoisted_10 = { | ||
key: 1, | ||
class: "border-r border-r-color-border-separator" | ||
}; | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
var _component_tiny_button = resolveComponent("tiny-button"); | ||
var _component_tiny_popover = resolveComponent("tiny-popover"); | ||
var _component_tiny_modal = resolveComponent("tiny-modal"); | ||
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [createVNode(_component_tiny_popover, { | ||
ref: "popover", | ||
tiny_mode: "mobile-first", | ||
modelValue: _ctx.state.showPopover, | ||
"onUpdate:modelValue": _cache[2] || (_cache[2] = function($event) { | ||
return _ctx.state.showPopover = $event; | ||
}), | ||
placement: _ctx.placement, | ||
trigger: "manual", | ||
width: _ctx.width, | ||
"popper-class": _ctx.m("min-w-[10.5rem] max-w-[21.875rem] hidden sm:block", _ctx.popperClass), | ||
onShow: _ctx.show, | ||
onHide: _ctx.hide | ||
}, { | ||
reference: withCtx(function() { | ||
return [createElementVNode( | ||
"div", | ||
{ | ||
class: "inline-block", | ||
onClick: _cache[0] || (_cache[0] = function($event) { | ||
return _ctx.show("click"); | ||
}), | ||
onMouseover: _cache[1] || (_cache[1] = function($event) { | ||
return _ctx.show("hover"); | ||
}) | ||
}, | ||
[renderSlot(_ctx.$slots, "reference")], | ||
32 | ||
/* HYDRATE_EVENTS */ | ||
)]; | ||
}), | ||
default: withCtx(function() { | ||
return [createElementVNode("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [_ctx.type ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.getIcon), { | ||
key: 0, | ||
class: normalizeClass(_ctx.m("h-6 w-6 mr-2", { | ||
"fill-color-info-secondary": _ctx.type === "info" | ||
}, { | ||
"fill-color-error": _ctx.type === "error" | ||
}, { | ||
"fill-color-warning": _ctx.type === "warning" | ||
}, { | ||
"fill-color-success": _ctx.type === "success" | ||
})) | ||
}, null, 8, ["class"])) : createCommentVNode("v-if", true), createElementVNode( | ||
"div", | ||
_hoisted_5, | ||
toDisplayString(_ctx.title), | ||
1 | ||
/* TEXT */ | ||
)]), createElementVNode( | ||
"div", | ||
_hoisted_6, | ||
toDisplayString(_ctx.content), | ||
1 | ||
/* TEXT */ | ||
), createElementVNode("div", _hoisted_7, [renderSlot(_ctx.$slots, "footer", {}, function() { | ||
return [_ctx.cancelButton ? (openBlock(), createBlock(_component_tiny_button, { | ||
key: 0, | ||
class: "mr-2 w-16", | ||
size: "mini", | ||
tiny_mode: "mobile-first", | ||
onClick: _ctx.hide | ||
}, { | ||
default: withCtx(function() { | ||
return [createTextVNode( | ||
toDisplayString(_ctx.t("ui.buttonMessage.cancel")), | ||
1 | ||
/* TEXT */ | ||
)]; | ||
}), | ||
_: 1 | ||
/* STABLE */ | ||
}, 8, ["onClick"])) : createCommentVNode("v-if", true), createVNode(_component_tiny_button, { | ||
class: "w-16", | ||
size: "mini", | ||
tiny_mode: "mobile-first", | ||
type: "primary", | ||
onClick: _ctx.confirm | ||
}, { | ||
default: withCtx(function() { | ||
return [createTextVNode( | ||
toDisplayString(_ctx.t("ui.buttonMessage.confirm")), | ||
1 | ||
/* TEXT */ | ||
)]; | ||
}), | ||
_: 1 | ||
/* STABLE */ | ||
}, 8, ["onClick"])]; | ||
})])])]; | ||
}), | ||
_: 3 | ||
/* FORWARDED */ | ||
}, 8, ["modelValue", "placement", "width", "popper-class", "onShow", "onHide"])]), createElementVNode("div", _hoisted_8, [createElementVNode( | ||
"div", | ||
{ | ||
class: "inline-block", | ||
onClick: _cache[3] || (_cache[3] = function($event) { | ||
return _ctx.show("click"); | ||
}), | ||
onMouseover: _cache[4] || (_cache[4] = function($event) { | ||
return _ctx.show("hover"); | ||
}) | ||
}, | ||
[renderSlot(_ctx.$slots, "reference")], | ||
32 | ||
/* HYDRATE_EVENTS */ | ||
), createVNode(_component_tiny_modal, { | ||
ref: "modal", | ||
tiny_mode: "mobile-first", | ||
class: "sm:hidden", | ||
modelValue: _ctx.state.showPopover, | ||
"onUpdate:modelValue": _cache[5] || (_cache[5] = function($event) { | ||
return _ctx.state.showPopover = $event; | ||
}), | ||
title: _ctx.title, | ||
"show-footer": "" | ||
}, { | ||
default: withCtx(function() { | ||
return [createTextVNode( | ||
toDisplayString(_ctx.content), | ||
1 | ||
/* TEXT */ | ||
)]; | ||
}), | ||
footer: withCtx(function() { | ||
return [createElementVNode("div", _hoisted_9, [renderSlot(_ctx.$slots, "footer", {}, function() { | ||
return [_ctx.cancelButton ? (openBlock(), createBlock(_component_tiny_button, { | ||
key: 0, | ||
class: "flex-1 text-color-text-secondary", | ||
tiny_mode: "mobile-first", | ||
type: "text", | ||
onClick: _ctx.hide | ||
}, { | ||
default: withCtx(function() { | ||
return [createTextVNode( | ||
toDisplayString(_ctx.t("ui.buttonMessage.cancel")), | ||
1 | ||
/* TEXT */ | ||
)]; | ||
}), | ||
_: 1 | ||
/* STABLE */ | ||
}, 8, ["onClick"])) : createCommentVNode("v-if", true), _ctx.cancelButton ? (openBlock(), createElementBlock("span", _hoisted_10)) : createCommentVNode("v-if", true), createVNode(_component_tiny_button, { | ||
class: "flex-1 text-color-brand tiny-modal-mf-button", | ||
tiny_mode: "mobile-first", | ||
type: "text", | ||
onClick: _ctx.confirm | ||
}, { | ||
default: withCtx(function() { | ||
return [createTextVNode( | ||
toDisplayString(_ctx.t("ui.buttonMessage.confirm")), | ||
1 | ||
/* TEXT */ | ||
)]; | ||
}), | ||
_: 1 | ||
/* STABLE */ | ||
}, 8, ["onClick"])]; | ||
})])]; | ||
}), | ||
_: 3 | ||
/* FORWARDED */ | ||
}, 8, ["modelValue", "title"])])]); | ||
} | ||
var Popconfirm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); | ||
var version = "3.7.0"; | ||
var version = "3.9.0"; | ||
Popconfirm.install = function(Vue) { | ||
@@ -322,0 +86,0 @@ Vue.component(Popconfirm.name, Popconfirm); |
{ | ||
"name": "@opentiny/vue-popconfirm", | ||
"version": "3.8.3", | ||
"version": "3.9.0", | ||
"description": "", | ||
@@ -9,10 +9,10 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-button": "~3.8.3", | ||
"@opentiny/vue-common": "~3.8.3", | ||
"@opentiny/vue-icon": "~3.8.3", | ||
"@opentiny/vue-modal": "~3.8.3", | ||
"@opentiny/vue-popover": "~3.8.3", | ||
"@opentiny/vue-renderless": "~3.8.3", | ||
"@opentiny/vue-theme": "~3.8.3", | ||
"@opentiny/vue-theme-mobile": "~3.8.3" | ||
"@opentiny/vue-button": "~3.9.0", | ||
"@opentiny/vue-common": "~3.9.0", | ||
"@opentiny/vue-icon": "~3.9.0", | ||
"@opentiny/vue-modal": "~3.9.0", | ||
"@opentiny/vue-popover": "~3.9.0", | ||
"@opentiny/vue-renderless": "~3.9.0", | ||
"@opentiny/vue-theme": "~3.9.0", | ||
"@opentiny/vue-theme-mobile": "~3.9.0" | ||
}, | ||
@@ -19,0 +19,0 @@ "license": "MIT", |
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<{ | ||
_constants: { | ||
type: ObjectConstructor; | ||
default: () => { | ||
ICON_MAP: { | ||
success: string; | ||
error: string; | ||
info: string; | ||
warning: string; | ||
}; | ||
}; | ||
default: () => any; | ||
}; | ||
@@ -37,10 +30,3 @@ content: StringConstructor; | ||
type: ObjectConstructor; | ||
default: () => { | ||
ICON_MAP: { | ||
success: string; | ||
error: string; | ||
info: string; | ||
warning: string; | ||
}; | ||
}; | ||
default: () => any; | ||
}; | ||
@@ -47,0 +33,0 @@ content: StringConstructor; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28214
9
852
3
1
+ Added@opentiny/vue-button@3.9.0(transitive)
+ Added@opentiny/vue-common@3.9.0(transitive)
+ Added@opentiny/vue-icon@3.9.1(transitive)
+ Added@opentiny/vue-locale@3.9.0(transitive)
+ Added@opentiny/vue-modal@3.9.0(transitive)
+ Added@opentiny/vue-popover@3.9.0(transitive)
+ Added@opentiny/vue-renderless@3.9.3(transitive)
+ Added@opentiny/vue-theme@3.9.4(transitive)
+ Added@opentiny/vue-theme-mobile@3.9.0(transitive)
- Removed@opentiny/vue-button@3.8.3(transitive)
- Removed@opentiny/vue-common@3.8.3(transitive)
- Removed@opentiny/vue-icon@3.8.3(transitive)
- Removed@opentiny/vue-locale@3.8.3(transitive)
- Removed@opentiny/vue-modal@3.8.3(transitive)
- Removed@opentiny/vue-popover@3.8.3(transitive)
- Removed@opentiny/vue-renderless@3.8.4(transitive)
- Removed@opentiny/vue-theme@3.8.5(transitive)
- Removed@opentiny/vue-theme-mobile@3.8.3(transitive)
Updated@opentiny/vue-button@~3.9.0
Updated@opentiny/vue-common@~3.9.0
Updated@opentiny/vue-icon@~3.9.0
Updated@opentiny/vue-modal@~3.9.0
Updated@opentiny/vue-popover@~3.9.0
Updated@opentiny/vue-theme@~3.9.0