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

lesca-click

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lesca-click - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

.prettierignore

4

lib/constants.js
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -10,4 +12,2 @@ value: true

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var GET_DEVICE = function GET_DEVICE() {

@@ -14,0 +14,0 @@ var m = new _mobileDetect["default"](window.navigator.userAgent);

"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -8,24 +10,14 @@ value: true

var _constants = require("./constants");
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
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); }
var _constants = require("./constants");
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
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 _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
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 _objectSpread(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 _objectSpread(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) { (0, _defineProperty2["default"])(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) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
/**

@@ -170,6 +162,5 @@ * event dataset

var addPreventExcept = function addPreventExcept(query) {
var type = _typeof(query);
var type = (0, _typeof2["default"])(query);
if (type === 'string') exceptParentClassIDDataset.push(query);else if (Array.isArray(query)) {
exceptParentClassIDDataset = _toConsumableArray(query);
exceptParentClassIDDataset = (0, _toConsumableArray2["default"])(query);
}

@@ -237,3 +228,3 @@ };

exports.clear = clear;
var _default = {
var Click = {
install: install,

@@ -247,2 +238,3 @@ dataset: dataset,

};
var _default = Click;
exports["default"] = _default;
{
"name": "lesca-click",
"version": "4.0.1",
"version": "4.0.2",
"description": "replace click / touch start on SPY page",

@@ -9,7 +9,7 @@ "main": "lib/index.js",

"watch": "babel src/lib -w -d lib --copy-files",
"build": "babel src/lib -d lib --copy-files",
"dev": "concurrently \"npm run lib:watch\" \"npm run docs\"",
"op": "babel src/lib -d lib --copy-files",
"dev": "concurrently \"npm run watch\" \"npm run start\"",
"rm": "rm -rf node_modules/ package-lock.json",
"deploy": "gh-pages -d dist",
"docs:prod": "webpack --mode production"
"build": "NODE_ENV=production webpack"
},

@@ -19,28 +19,34 @@ "keywords": [

"衝康吉",
"jameshsu1125"
"jameshsu1125",
"click"
],
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.16.0",
"@babel/core": "^7.16.0",
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
"@babel/preset-env": "^7.16.4",
"@babel/preset-react": "^7.16.0",
"autoprefixer": "^10.4.0",
"@babel/cli": "^7.17.0",
"@babel/core": "^7.17.2",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-object-rest-spread": "^7.16.7",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/preset-react": "^7.16.7",
"autoprefixer": "^10.4.2",
"babel-loader": "^8.2.3",
"concurrently": "^6.4.0",
"css-loader": "^6.5.1",
"concurrently": "^7.0.0",
"css-loader": "^6.6.0",
"file-loader": "^6.2.0",
"gh-pages": "^3.2.3",
"html-react-parser": "^1.4.8",
"html-webpack-plugin": "^5.5.0",
"lesca-react-qrcode": "^1.0.0",
"less": "^4.1.2",
"less-loader": "^10.2.0",
"postcss": "^8.3.11",
"postcss-loader": "^6.2.0",
"postcss": "^8.4.6",
"postcss-loader": "^6.2.1",
"prismjs": "^1.26.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"style-loader": "^3.3.1",
"webpack": "^5.64.1",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.5.0"
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.4"
},

@@ -47,0 +53,0 @@ "author": "jamehsu1125 <jameshsu1125@gmail.com>",

@@ -1,2 +0,2 @@

[![dev by JamesHsu](https://img.shields.io/badge/Dev%20by-Jameshsu1125-green)](https://github.com/jameshsu1125/) [![made in Taiwan](https://img.shields.io/badge/Made%20in-Taiwan-orange)](https://github.com/jameshsu1125/)
[![dev by JamesHsu](https://img.shields.io/badge/Dev%20by-Jameshsu1125-green)](https://github.com/jameshsu1125/) [![made in Taiwan](https://img.shields.io/badge/Made%20in-Taiwan-orange)](https://github.com/jameshsu1125/) [![npm](https://img.shields.io/badge/npm-Jameshsu1125-red)](https://www.npmjs.com/~jameshsu1125)

@@ -23,11 +23,10 @@ # Installation

| method | options | description | default |
| :------------------------------- | :------------: | :--------------------------------: | ------: |
| install(clickEventAlso, install) | clickEventAlso | click event combine also | true |
| | install | set on window.Click | true |
| add(target, execution) | target | selector => ".target" or "#target" | |
| | execution | call when target clicked | |
| remove(target) | target | selector => ".target" or "#target" | |
| clear() | | clear all functions | |
| setPreventDefault(value) | value | is set preventDefault | |
| addPreventExcept(DOM-query) | DOM-query | .target or #target | |
| method | options | type | description | default |
| :----------------------- | :-------: | :------: | :----------------------------------: | ------: |
| .install() | | | install | true |
| add(target, execution) | target | string | selector => ".target" or "#target" | |
| | execution | function | call when target clicked | |
| remove(target) | target | string | selector => ".target" or "#target" | |
| clear() | | | clear all functions | |
| setPreventDefault(value) | value | boolean | set preventDefault enable or disable | |
| addPreventExcept(target) | target | string | ".target" or "#target" | |

@@ -1,28 +0,53 @@

import React from 'react';
import { render } from 'react-dom';
import Click from '../lib/index';
import Click from '../lib';
import { Code, Navation } from './components';
import Demo from './demo';
import Qrcode from 'lesca-react-qrcode';
import './styles.less';
import './styles.css';
const homepage = 'https://github.com/jameshsu1125/lesca-click';
const name = 'lesca-click';
const description = 'simple exsample';
const code = `import Click from 'lesca-click';
console.log(Click);
Click.install();
Click.addPreventExcept(['#mmmmm', '.g']);
Click.add('.btn', (e) => {
console.log(e);
});
`;
function Demo() {
Click.install();
const Page = () => {
return (
<>
<div id='mmmmm'>
<button className='myDiv'>button</button>
</div>
<Navation />
<div className='content'>
<div>
<h1>{name}</h1>
<figcaption>{description}</figcaption>
</div>
<div>
<h2>install</h2>
<Code code={`npm install ${name} --save`} theme='markup' />
</div>
<div>
<h2>test on mobile</h2>
<Qrcode content={window.location.href} size='300' />
</div>
<div>
<h2>install on entry file. (ex: index.js)</h2>
<Code code={code} />
</div>
<div>
<h2>set onClick use id or class name.</h2>
</div>
<Demo />
<div className='g'>
<div className='btn'>button</div>
<div>
<h2>Usage</h2>
<a href={homepage}>Documentation</a>
</div>
</div>
</>
);
}
};
render(<Demo />, document.getElementById('app'));
render(<Page />, document.getElementById('app'));

@@ -7,3 +7,3 @@ const path = require('path');

output: {
path: path.join(__dirname, 'docs'),
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',

@@ -10,0 +10,0 @@ },

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