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

@opentiny/vue-renderless

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentiny/vue-renderless - npm Package Compare versions

Comparing version 3.11.5 to 3.11.6

common/global.js

6

common/deps/dom.js
import "../../chunk-G2ADBYYC.js";
import { hasOwn, isObject, isNull } from "../type";
import globalConfig from "../global";
const isServer = typeof window === "undefined";

@@ -137,4 +138,5 @@ const SPECIAL_CHARS_REGEXP = /([:\-_]+(.))/g;

const getDomNode = () => {
let documentElement = document.documentElement;
let bodyElem = document.body;
const viewportWindow = globalConfig.viewportWindow || window;
let documentElement = viewportWindow.document.documentElement;
let bodyElem = viewportWindow.document.body;
return {

@@ -141,0 +143,0 @@ scrollTop: documentElement.scrollTop || bodyElem.scrollTop,

@@ -6,2 +6,3 @@ import {

import PopupManager from "./popup-manager";
import globalConfig from "../global";
import { typeOf } from "../type";

@@ -493,3 +494,3 @@ const positions = ["left", "right", "top", "bottom"];

let scrollLeft = isFixed2 ? 0 : getScrollLeftValue(scrollParent);
const viewportWindow = PopupManager.viewportWindow || window;
const viewportWindow = globalConfig.viewportWindow || PopupManager.viewportWindow || window;
boundaries = {

@@ -496,0 +497,0 @@ top: 0 - (offsetParentRect.top - scrollTop),

@@ -222,3 +222,3 @@ import "../chunk-G2ADBYYC.js";

const plainNode = find(plainNodes, (plainNode2) => plainNode2.node.id === currentRadio.value);
return [plainNode.node.data];
return (plainNode == null ? void 0 : plainNode.node) ? [plainNode.node.data] : [];
};

@@ -225,0 +225,0 @@ const multiTreeCheck = ({ api, props, state, vm, nextTick }) => () => {

@@ -150,3 +150,3 @@ import "../chunk-G2ADBYYC.js";

if (!disabled) {
const data = { itemData, vm, disabled };
const data = { itemData, vm };
emit("item-click", data);

@@ -153,0 +153,0 @@ }

import "../../chunk-G2ADBYYC.js";
import { getRowid } from "./common";
import { hasClass } from "../../common/deps/dom";
import { hasClass, getDomNode } from "../../common/deps/dom";
import { getActualTarget } from "../../common/event";

@@ -99,12 +99,2 @@ import { arrayIndexOf } from "../static";

};
const getDomNode = () => {
const documentElement = document.documentElement;
const bodyElement = document.body;
return {
scrollTop: documentElement.scrollTop || bodyElement.scrollTop,
scrollLeft: documentElement.scrollLeft || bodyElement.scrollLeft,
visibleHeight: documentElement.clientHeight || bodyElement.clientHeight,
visibleWidth: documentElement.clientWidth || bodyElement.clientWidth
};
};
const getEventTargetNode = (event, container, queryCls) => {

@@ -111,0 +101,0 @@ let targetEl;

@@ -6,2 +6,3 @@ import "../chunk-G2ADBYYC.js";

import { getDomNode } from "../common/deps/dom";
import { getViewportWindow } from "../common/global";
const DragClass = "is__drag";

@@ -139,4 +140,5 @@ const emitZoom = ({ params, parent, emit, event }) => {

let modalBoxElem = api.getBox();
let clientVisibleWidth = document.documentElement.clientWidth || document.body.clientWidth;
let clientVisibleHeight = document.documentElement.clientHeight || document.body.clientHeight;
const viewportWindow = getViewportWindow();
let clientVisibleWidth = viewportWindow.document.documentElement.clientWidth || viewportWindow.document.body.clientWidth;
let clientVisibleHeight = viewportWindow.document.documentElement.clientHeight || viewportWindow.document.body.clientHeight;
modalBoxElem.style.left = `${clientVisibleWidth / 2 - modalBoxElem.offsetWidth / 2}px`;

@@ -143,0 +145,0 @@ if (modalBoxElem.offsetHeight + modalBoxElem.offsetTop + props.marginSize > clientVisibleHeight) {

{
"name": "@opentiny/vue-renderless",
"version": "3.11.5",
"version": "3.11.6",
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",

@@ -5,0 +5,0 @@ "homepage": "https://opentiny.design/tiny-vue",

@@ -64,3 +64,3 @@ import {

if (vertical) {
wrapperClass.push("tiny-steps-timeline", { reverse });
wrapperClass.push("tiny-steps-timeline", { reverse, "tiny-timeline__shape-dot": props.shape === "dot" });
} else {

@@ -74,2 +74,7 @@ wrapperClass.push("tiny-steps-normal", textPosition === "right" ? "text-right" : "text-bottom");

};
const toggleFold = ({ props }) => (node) => {
const isFold = !props.data[node.index].fold;
props.data[node.index].fold = isFold;
return isFold;
};
export {

@@ -86,3 +91,4 @@ changeStatus,

getStatusCls,
handleClick
handleClick,
toggleFold
};

@@ -13,5 +13,6 @@ import "../chunk-G2ADBYYC.js";

computedSpace,
computedWrapperClass
computedWrapperClass,
toggleFold
} from "./index";
const api = ["state", "handleClick", "getStatusCls", "getStatus", "getDate", "changeStatus"];
const api = ["state", "handleClick", "getStatusCls", "getStatus", "getDate", "changeStatus", "toggleFold"];
const renderless = (props, { computed, reactive, provide, watch }, { t, emit, constants }) => {

@@ -42,3 +43,4 @@ const api2 = {};

changeStatus: changeStatus({ state }),
computedWrapperClass: computedWrapperClass({ props })
computedWrapperClass: computedWrapperClass({ props }),
toggleFold: toggleFold({ props })
});

@@ -45,0 +47,0 @@ provide("nodesInject", { timelineItems: state.timelineItems, nodes: state.nodes, props });

@@ -12,3 +12,3 @@ import "../chunk-G2ADBYYC.js";

const computedWidth = () => (width) => {
return /^\d+$/.test(width) ? `${width}px` : width;
return /^\d+$/.test(String(width)) ? `${width}px` : width || "";
};

@@ -43,2 +43,5 @@ const handleClick = ({ emit, state }) => (node) => {

itemClass.push("timeline");
if (props.node.type) {
itemClass.push(`timeline-item--${props.node.type}`);
}
} else {

@@ -58,3 +61,3 @@ itemClass.push("normal");

if (vertical) {
return { height: index === nodesLength - 1 ? "" : computedSpace || "88px" };
return { height: index === nodesLength - 1 ? "" : computedSpace };
}

@@ -61,0 +64,0 @@ if (textPosition === "right") {

@@ -179,2 +179,18 @@ import "../chunk-G2ADBYYC.js";

};
const afterLoadHandler = ({ state, emit, props, api }) => (params) => {
const { lazy, afterLoad, showRadio } = props;
state.loaded = true;
if (lazy) {
if (state.root) {
state.root.childNodes = [...state.root.childNodes];
}
if (showRadio) {
api.setCurrentRadio();
}
}
emit("load-data", params);
if (typeof afterLoad === "function") {
afterLoad(params);
}
};
const initTreeStore = ({ api, props, state, emit }) => () => {

@@ -189,8 +205,3 @@ const { nodeKey, data, lazy, load, afterLoad, currentNodeKey, checkStrictly, checkDescendants } = props;

load,
afterLoad(params) {
!state.loaded && (state.loaded = true);
lazy && state.root && (state.root.childNodes = [...state.root.childNodes]);
emit("load-data", params);
afterLoad && afterLoad(params);
},
afterLoad: afterLoadHandler({ api, emit, props, state }),
currentNodeKey,

@@ -197,0 +208,0 @@ checkStrictly,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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