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

@opentiny/vue-loading

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentiny/vue-loading - npm Package Compare versions

Comparing version 3.12.0 to 3.13.0-alpha.0

38

lib/index.js

@@ -17,15 +17,17 @@ function _extends() {

import { addClass, getStyle, removeClass } from "@opentiny/vue-renderless/common/deps/dom";
import { defineComponent, $prefix, $setup, $props, createComponent, hooks, directive as directive$1, setupComponent } from "@opentiny/vue-common";
import { defineComponent, $prefix, $setup, $props, createComponent, appProperties, hooks, directive as directive$1, setupComponent } from "@opentiny/vue-common";
import PcTemplate from "./pc.js";
import MobileTemplate from "./mobile.js";
import MobileFirstTemplate from "./mobile-first.js";
import afterLeave from "@opentiny/vue-renderless/common/deps/after-leave";
import "@opentiny/vue-theme/loading/index.css";
var template = function template2(mode) {
if ("pc" === (process.env.TINY_MODE || mode)) {
var _process$env;
var tinyMode = typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null;
if ("pc" === (tinyMode || mode)) {
return PcTemplate;
}
if ("pc" === (process.env.TINY_MODE || mode)) {
return PcTemplate;
if ("mobile" === (tinyMode || mode)) {
return MobileTemplate;
}
if ("mobile-first" === (process.env.TINY_MODE || mode)) {
if ("mobile-first" === (tinyMode || mode)) {
return MobileFirstTemplate;

@@ -73,7 +75,5 @@ }

fullscreen: true,
type: "primary",
tiny_mode: "pc"
iconSize: ""
};
var fullscreenLoading = null;
var tinyMode = null;
var constants = {

@@ -115,2 +115,3 @@ TEXT_ATTR: "tiny-loading__text",

var service = function service2(configs) {
var _appProperties$tiny_m;
if (configs === void 0) {

@@ -120,3 +121,2 @@ configs = {};

configs = _extends({}, defaults, configs);
tinyMode = configs.tiny_mode;
if (typeof configs.target === "string") {

@@ -138,3 +138,6 @@ configs.target = document.querySelector(configs.target);

propsData: {
_constants: constants
_constants: constants,
size: configs.size,
loadingImg: configs.loadingImg,
tiny_mode: configs.tiny_mode || ((_appProperties$tiny_m = appProperties().tiny_mode) == null ? void 0 : _appProperties$tiny_m.value)
},

@@ -240,2 +243,3 @@ el: document.createElement("div")

bind: function bind(el, binding, vnode) {
var _vm$tiny_mode, _appProperties$tiny_m2;
var vm = vnode.context;

@@ -249,7 +253,8 @@ var textExr = el.getAttribute(constants.TEXT_ATTR);

propsData: {
_constants: constants
_constants: constants,
tiny_mode: ((_vm$tiny_mode = vm.tiny_mode) == null ? void 0 : _vm$tiny_mode.value) || ((_appProperties$tiny_m2 = appProperties().tiny_mode) == null ? void 0 : _appProperties$tiny_m2.value)
},
el: document.createElement("div")
});
var config = {
var config = _extends({}, defaults, {
text: vm && vm[textExr] || textExr,

@@ -260,3 +265,3 @@ spinner: vm && vm[spinnerExr] || spinnerExr,

fullscreen: !!binding.modifiers.fullscreen
};
});
for (var key in config) {

@@ -291,3 +296,3 @@ if (Object.prototype.hasOwnProperty.call(config, key)) {

}).vLoading;
var version = "3.12.0";
var version = "3.13.0-alpha.0";
var Loadings = {

@@ -303,3 +308,4 @@ install: function install(app) {

init: function init(root) {
root.$loading = service;
var prefix = root.$apiPrefix || "$";
root[prefix + "loading"] = service;
}

@@ -306,0 +312,0 @@ };

@@ -17,2 +17,3 @@ function _extends() {

import { renderless, api } from "@opentiny/vue-renderless/loading/vue";
import loadingImg from "@opentiny/vue-theme/images/loading.png";
import { openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, resolveDynamicComponent, toDisplayString, createCommentVNode, vShow } from "vue";

@@ -84,6 +85,14 @@ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {

var _sfc_main = defineComponent({
inheritAttrs: false,
name: $prefix + "Loading",
emits: ["after-leave"],
props: _extends({}, $props, {
_constants: Object
_constants: Object,
loadingImg: {
type: String,
default: loadingImg
},
size: {
type: String
}
}),

@@ -100,2 +109,3 @@ setup: function setup(props, context) {

});
var _hoisted_1 = ["src"];
function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {

@@ -124,41 +134,24 @@ return openBlock(), createBlock(Transition, {

class: normalizeClass(_ctx.m(_ctx.gcls("loading-content"), _ctx.gcls({
"loading-size-mini": _ctx.state.size === "mini"
"loading-size-mini": _ctx.size === "mini"
}), _ctx.gcls({
"loading-size-unmini": _ctx.state.size !== "mini"
"loading-size-unmini": _ctx.size !== "mini"
})))
},
[!_ctx.state.spinner ? (openBlock(), createElementBlock(
"svg",
{
key: 0,
"data-tag": "tiny-loading-icon",
class: normalizeClass(_ctx.m(_ctx.gcls("loading-unspinner"), _ctx.gcls({
"loading-unspinner-size-default": !_ctx.state.size || !["large", "medium", "small", "mini"].includes(_ctx.state.size)
}), _ctx.gcls({
"loading-unspinner-size-large": _ctx.state.size === "large"
}), _ctx.gcls({
"loading-unspinner-size-medium": _ctx.state.size === "medium"
}), _ctx.gcls({
"loading-unspinner-size-small": _ctx.state.size === "small"
}), _ctx.gcls({
"loading-unspinner-size-mini": _ctx.state.size === "mini"
}))),
viewBox: "25 25 50 50"
},
[createElementVNode(
"circle",
{
class: normalizeClass(_ctx.m(_ctx.gcls("loading-unspinner-svg-circle"))),
cx: "50",
cy: "50",
r: "24",
fill: "none"
},
null,
2
/* CLASS */
)],
2
/* CLASS */
)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.spinner), {
[!_ctx.state.spinner ? (openBlock(), createElementBlock("img", {
key: 0,
"data-tag": "tiny-loading-icon",
class: normalizeClass(_ctx.m(_ctx.gcls({
"loading-unspinner-size-default": !_ctx.size || !["large", "medium", "small", "mini"].includes(_ctx.size)
}), _ctx.gcls({
"loading-unspinner-size-large": _ctx.size === "large"
}), _ctx.gcls({
"loading-unspinner-size-medium": _ctx.size === "medium"
}), _ctx.gcls({
"loading-unspinner-size-small": _ctx.size === "small"
}), _ctx.gcls({
"loading-unspinner-size-mini": _ctx.size === "mini"
}))),
src: _ctx.state.loadingImg,
style: normalizeStyle(_ctx.state.iconStyle)
}, null, 14, _hoisted_1)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.spinner), {
key: 1,

@@ -173,5 +166,5 @@ "data-tag": "tiny-loading-spinner",

class: normalizeClass(_ctx.m(_ctx.gcls("loading-spinner-text"), _ctx.gcls({
"loading-spinner-size-mini": _ctx.state.size === "mini"
"loading-spinner-size-mini": _ctx.size === "mini"
}), _ctx.gcls({
"loading-spinner-size-unmini": _ctx.state.size !== "mini"
"loading-spinner-size-unmini": _ctx.size !== "mini"
})))

@@ -178,0 +171,0 @@ },

@@ -1,5 +0,19 @@

import { defineComponent, props, setup as _setup } from "@opentiny/vue-common";
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);
}
import { defineComponent, $prefix, $props, setup as _setup } from "@opentiny/vue-common";
import { renderless, api } from "@opentiny/vue-renderless/loading/vue";
import "@opentiny/vue-theme/loading/index.css";
import { openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, resolveDynamicComponent, toDisplayString, createCommentVNode, vShow } from "vue";
import { openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, resolveDynamicComponent, createElementBlock, toDisplayString, createCommentVNode, vShow } from "vue";
function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {

@@ -51,6 +65,18 @@ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];

var _sfc_main = defineComponent({
props: [].concat(props),
setup: function setup(props2, context) {
inheritAttrs: false,
name: $prefix + "Loading",
emits: ["after-leave"],
props: _extends({}, $props, {
_constants: Object,
loadingImg: {
type: String
},
size: {
type: String,
default: "small"
}
}),
setup: function setup(props, context) {
return _setup({
props: props2,
props,
context,

@@ -62,8 +88,9 @@ renderless,

});
var _hoisted_1 = {
key: 0,
var _hoisted_1 = ["src"];
var _hoisted_2 = {
key: 2,
class: "circular",
viewBox: "25 25 50 50"
};
var _hoisted_2 = /* @__PURE__ */ createElementVNode(
var _hoisted_3 = /* @__PURE__ */ createElementVNode(
"circle",

@@ -81,8 +108,8 @@ {

);
var _hoisted_3 = [_hoisted_2];
var _hoisted_4 = {
key: 2,
var _hoisted_4 = [_hoisted_3];
var _hoisted_5 = {
key: 3,
class: "tiny-loading__text"
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
return openBlock(), createBlock(Transition, {

@@ -111,10 +138,15 @@ name: "tiny-loading-fade",

large: "tiny-loading__spinner-large"
}[_ctx.state.size]])
}[_ctx.size]])
},
[!_ctx.state.spinner ? (openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.spinner), {
[_ctx.state.spinner ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.state.spinner), {
key: 0,
class: "tiny-icon-loading"
})) : _ctx.state.loadingImg ? (openBlock(), createElementBlock("img", {
key: 1,
class: "tiny-icon-loading"
})), _ctx.state.text ? (openBlock(), createElementBlock(
class: "circular",
style: normalizeStyle(_ctx.state.iconStyle),
src: _ctx.state.loadingImg
}, null, 12, _hoisted_1)) : (openBlock(), createElementBlock("svg", _hoisted_2, _hoisted_4)), _ctx.state.text ? (openBlock(), createElementBlock(
"p",
_hoisted_4,
_hoisted_5,
toDisplayString(_ctx.state.text),

@@ -121,0 +153,0 @@ 1

{
"name": "@opentiny/vue-loading",
"version": "3.12.0",
"version": "3.13.0-alpha.0",
"description": "",

@@ -10,6 +10,6 @@ "main": "./lib/index.js",

"dependencies": {
"@opentiny/vue-common": "~3.12.0",
"@opentiny/vue-icon": "~3.12.0",
"@opentiny/vue-renderless": "~3.12.0",
"@opentiny/vue-locale": "~3.12.0"
"@opentiny/vue-common": "~3.13.0-alpha.0",
"@opentiny/vue-icon": "~3.13.0-alpha.0",
"@opentiny/vue-renderless": "~3.13.0-alpha.0",
"@opentiny/vue-locale": "~3.13.0-alpha.0"
},

@@ -16,0 +16,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