@opentiny/vue-espace
Advanced tools
Comparing version 3.6.0 to 3.6.1-alpha.0
import Espace from './src/index'; | ||
import '@opentiny/vue-theme/espace/index.css'; | ||
export default Espace; |
205
lib/index.js
@@ -1,135 +0,27 @@ | ||
import { setup, props, $prefix, $props, $setup } from '@opentiny/vue-common'; | ||
import { renderless, api } from '@opentiny/vue-renderless/espace/vue'; | ||
import { IconMessageCircle, IconTelephoneCircle, IconEmailCircle, IconEmailAdd, IconTelephone, IconDialog } from '@opentiny/vue-icon'; | ||
import { openBlock, createElementBlock, Fragment, renderList, normalizeClass, createBlock, resolveDynamicComponent } from 'vue'; | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
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 _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
return target; | ||
} | ||
function _defineProperty(obj, key, value) { | ||
key = _toPropertyKey(key); | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); | ||
} | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); | ||
} | ||
function _iterableToArray(iter) { | ||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); | ||
} | ||
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; | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
function _toPrimitive(input, hint) { | ||
if (typeof input !== "object" || input === null) return input; | ||
var prim = input[Symbol.toPrimitive]; | ||
if (prim !== undefined) { | ||
var res = prim.call(input, hint || "default"); | ||
if (typeof res !== "object") return res; | ||
throw new TypeError("@@toPrimitive must return a primitive value."); | ||
} | ||
return (hint === "string" ? String : Number)(input); | ||
} | ||
function _toPropertyKey(arg) { | ||
var key = _toPrimitive(arg, "string"); | ||
return typeof key === "symbol" ? key : String(key); | ||
} | ||
var script = { | ||
components: { | ||
IconMessageCircle: IconMessageCircle(), | ||
IconTelephoneCircle: IconTelephoneCircle(), | ||
IconEmailCircle: IconEmailCircle(), | ||
IconEmailAdd: IconEmailAdd(), | ||
IconTelephone: IconTelephone(), | ||
IconDialog: IconDialog() | ||
}, | ||
props: [].concat(_toConsumableArray(props), ['data', 'isNewImMode']), | ||
setup: function setup$1(props, context) { | ||
return setup({ | ||
props: props, | ||
context: context, | ||
renderless: renderless, | ||
api: api | ||
}); | ||
} | ||
import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common"; | ||
import PcTemplate from "./pc.js"; | ||
import "@opentiny/vue-theme/espace/index.css"; | ||
var template = function template2(mode) { | ||
if ("mobile" === (process.env.TINY_MODE || mode)) | ||
return MobileTemplate; | ||
else | ||
return PcTemplate; | ||
}; | ||
var _hoisted_1 = { | ||
class: "tiny-espace" | ||
}; | ||
var _hoisted_2 = ["title", "href", "onClick"]; | ||
function render(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList($props.data, function (item, index) { | ||
return openBlock(), createElementBlock("a", { | ||
key: index, | ||
title: _ctx.getUserTitle(item), | ||
href: _ctx.getUserHref(item), | ||
onClick: function onClick($event) { | ||
return _ctx.doUserAction(item); | ||
}, | ||
class: normalizeClass([{ | ||
'item-talk': item.type === 'im' | ||
}, { | ||
'item-call': item.type === 'sip' | ||
}, { | ||
'item-email': item.type === 'mailto' | ||
}]) | ||
}, [(openBlock(), createBlock(resolveDynamicComponent(item.icon), { | ||
class: "tiny-svg-size" | ||
}))], 10, _hoisted_2); | ||
}), 128))]); | ||
} | ||
script.render = render; | ||
var template = function template() { | ||
return script; | ||
}; | ||
var Espace = { | ||
name: $prefix + 'Espace', | ||
props: _objectSpread2(_objectSpread2({}, $props), {}, { | ||
var Espace = defineComponent({ | ||
name: $prefix + "Espace", | ||
props: _extends({}, $props, { | ||
data: Array, | ||
@@ -143,44 +35,15 @@ isNewImMode: { | ||
return $setup({ | ||
props: props, | ||
context: context, | ||
template: template | ||
props, | ||
context, | ||
template | ||
}); | ||
} | ||
}; | ||
function styleInject(css, ref) { | ||
if ( ref === void 0 ) ref = {}; | ||
var insertAt = ref.insertAt; | ||
if (!css || typeof document === 'undefined') { return; } | ||
var head = document.head || document.getElementsByTagName('head')[0]; | ||
var style = document.createElement('style'); | ||
style.type = 'text/css'; | ||
if (insertAt === 'top') { | ||
if (head.firstChild) { | ||
head.insertBefore(style, head.firstChild); | ||
} else { | ||
head.appendChild(style); | ||
} | ||
} else { | ||
head.appendChild(style); | ||
} | ||
if (style.styleSheet) { | ||
style.styleSheet.cssText = css; | ||
} else { | ||
style.appendChild(document.createTextNode(css)); | ||
} | ||
} | ||
var css_248z = ".tiny-espace{--ti-espace-font-size:26px;--ti-espace-text-color:var(--ti-base-color-brand-6);--ti-espace-hover-text-color:var(--ti-base-color-brand-5)}.tiny-espace .item-call,.tiny-espace .item-email,.tiny-espace .item-talk{margin:0 8px 0 0;line-height:1}.tiny-espace .item-call .tiny-svg,.tiny-espace .item-email .tiny-svg,.tiny-espace .item-talk .tiny-svg{fill:var(--ti-espace-text-color);font-size:var(--ti-espace-font-size)}.tiny-espace .item-call:hover .tiny-svg,.tiny-espace .item-email:hover .tiny-svg,.tiny-espace .item-talk:hover .tiny-svg{fill:var(--ti-espace-hover-text-color)}"; | ||
styleInject(css_248z); | ||
Espace.install = function (Vue) { | ||
}); | ||
var version = "3.7.0"; | ||
Espace.install = function(Vue) { | ||
Vue.component(Espace.name, Espace); | ||
}; | ||
Espace.version = '3.6.0'; | ||
export { Espace as default }; | ||
Espace.version = version; | ||
export { | ||
Espace as default | ||
}; |
137
lib/pc.js
@@ -1,33 +0,51 @@ | ||
import { renderless, api } from '@opentiny/vue-renderless/espace/vue'; | ||
import { setup, props } from '@opentiny/vue-common'; | ||
import { IconMessageCircle, IconTelephoneCircle, IconEmailCircle, IconEmailAdd, IconTelephone, IconDialog } from '@opentiny/vue-icon'; | ||
import { openBlock, createElementBlock, Fragment, renderList, normalizeClass, createBlock, resolveDynamicComponent } from 'vue'; | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); | ||
import { renderless, api } from "@opentiny/vue-renderless/espace/vue"; | ||
import { defineComponent, props, setup as _setup } from "@opentiny/vue-common"; | ||
import { IconMessageCircle, IconTelephoneCircle, IconEmailCircle, IconEmailAdd, IconTelephone, IconDialog } from "@opentiny/vue-icon"; | ||
import { openBlock, createElementBlock, Fragment, renderList, normalizeClass, createBlock, resolveDynamicComponent } 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 _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); | ||
} | ||
function _iterableToArray(iter) { | ||
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(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); | ||
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]; | ||
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; | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
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; | ||
} | ||
return target; | ||
}; | ||
var script = { | ||
var _sfc_main = /* @__PURE__ */ defineComponent({ | ||
components: { | ||
@@ -41,13 +59,12 @@ IconMessageCircle: IconMessageCircle(), | ||
}, | ||
props: [].concat(_toConsumableArray(props), ['data', 'isNewImMode']), | ||
setup: function setup$1(props, context) { | ||
return setup({ | ||
props: props, | ||
context: context, | ||
renderless: renderless, | ||
api: api | ||
props: [].concat(props, ["data", "isNewImMode"]), | ||
setup: function setup(props2, context) { | ||
return _setup({ | ||
props: props2, | ||
context, | ||
renderless, | ||
api | ||
}); | ||
} | ||
}; | ||
}); | ||
var _hoisted_1 = { | ||
@@ -57,26 +74,32 @@ class: "tiny-espace" | ||
var _hoisted_2 = ["title", "href", "onClick"]; | ||
function render(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList($props.data, function (item, index) { | ||
return openBlock(), createElementBlock("a", { | ||
key: index, | ||
title: _ctx.getUserTitle(item), | ||
href: _ctx.getUserHref(item), | ||
onClick: function onClick($event) { | ||
return _ctx.doUserAction(item); | ||
}, | ||
class: normalizeClass([{ | ||
'item-talk': item.type === 'im' | ||
}, { | ||
'item-call': item.type === 'sip' | ||
}, { | ||
'item-email': item.type === 'mailto' | ||
}]) | ||
}, [(openBlock(), createBlock(resolveDynamicComponent(item.icon), { | ||
class: "tiny-svg-size" | ||
}))], 10, _hoisted_2); | ||
}), 128))]); | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock( | ||
Fragment, | ||
null, | ||
renderList(_ctx.data, function(item, index) { | ||
return openBlock(), createElementBlock("a", { | ||
key: index, | ||
title: _ctx.getUserTitle(item), | ||
href: _ctx.getUserHref(item), | ||
onClick: function onClick($event) { | ||
return _ctx.doUserAction(item); | ||
}, | ||
class: normalizeClass([{ | ||
"item-talk": item.type === "im" | ||
}, { | ||
"item-call": item.type === "sip" | ||
}, { | ||
"item-email": item.type === "mailto" | ||
}]) | ||
}, [(openBlock(), createBlock(resolveDynamicComponent(item.icon), { | ||
class: "tiny-svg-size" | ||
}))], 10, _hoisted_2); | ||
}), | ||
128 | ||
/* KEYED_FRAGMENT */ | ||
))]); | ||
} | ||
script.render = render; | ||
export { script as default }; | ||
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); | ||
export { | ||
pc as default | ||
}; |
{ | ||
"name": "@opentiny/vue-espace", | ||
"version": "3.6.0", | ||
"version": "3.6.1-alpha.0", | ||
"description": "", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"lint": "eslint src/**/*{.js,.html,.vue} --quiet", | ||
"build:ui2": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../build/build-ui.js", | ||
"build:ui3": "cross-env BUILD_TARGET=single NODE_ENV=production node ../../example/build/build-ui.js" | ||
}, | ||
"main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-common": "~3.6.0", | ||
"@opentiny/vue-icon": "~3.6.0", | ||
"@opentiny/vue-renderless": "~3.6.0", | ||
"@opentiny/vue-theme": "~3.6.0", | ||
"@opentiny/vue-theme-mobile": "~3.6.0" | ||
"@opentiny/vue-common": "~3.6.1-alpha.0", | ||
"@opentiny/vue-icon": "~3.6.1-alpha.0", | ||
"@opentiny/vue-renderless": "~3.6.1-alpha.0" | ||
}, | ||
"license": "MIT", | ||
"types": "index.d.ts", | ||
"sideEffects": false | ||
"scripts": { | ||
"build": "pnpm -w build:ui $npm_package_name", | ||
"//postversion": "pnpm build" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
declare const _default: import("vue").DefineComponent<{ | ||
declare const _default: import("@vue/runtime-core").DefineComponent<{ | ||
data: ArrayConstructor; | ||
@@ -7,3 +7,5 @@ isNewImMode: { | ||
}; | ||
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { | ||
[key: string]: any; | ||
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{ | ||
data: ArrayConstructor; | ||
@@ -10,0 +12,0 @@ isNewImMode: { |
@@ -1,20 +0,15 @@ | ||
declare const _default: { | ||
components: { | ||
IconMessageCircle: any; | ||
IconTelephoneCircle: any; | ||
IconEmailCircle: any; | ||
IconEmailAdd: any; | ||
IconTelephone: any; | ||
IconDialog: any; | ||
}; | ||
props: string[]; | ||
setup(props: any, context: any): { | ||
t: any; | ||
vm: any; | ||
f: (props: any, attrs?: {}) => {}; | ||
a: (attrs: any, filters: any, include: any) => {}; | ||
d: (props: any) => void; | ||
dp: (props: any) => void; | ||
}; | ||
}; | ||
export default _default; | ||
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<Readonly<{ | ||
[x: string]: any; | ||
}>, { | ||
t: (this: any, path: any, options?: any) => any; | ||
vm: any; | ||
f: (props: any, attrs?: {}) => {}; | ||
a: (attrs: any, filters: any, include: any) => {}; | ||
d: (props: any) => void; | ||
dp: (props: any) => void; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{ | ||
[x: string]: any; | ||
}>>>, { | ||
[x: string]: any; | ||
}>; | ||
export default _sfc_main; |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
3
7
7845
186
2
2
1