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

innerken-js-utils

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

innerken-js-utils - npm Package Compare versions

Comparing version 1.0.14 to 1.0.15

29

dist/Utils.js

@@ -6,2 +6,3 @@ "use strict";

});
exports.showInput = showInput;
exports.showConfirm = showConfirm;

@@ -48,2 +49,6 @@ exports.showConfirmAsyn = showConfirmAsyn;

});
function showInput() {
return _showInput.apply(this, arguments);
}
/**

@@ -57,2 +62,26 @@ * @param {string|HTMLElement|JQuery} title

function _showInput() {
_showInput = _asyncToGenerator(function* () {
var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Please Input ...';
var inputType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'number';
var text = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
var res = yield _sweetalert.default.fire({
input: inputType,
title: title,
text: text,
icon: 'warning',
showCancelButton: true,
cancelButtonText: _i18n.default.t('Zurück'),
confirmButtonText: _i18n.default.t('OK')
});
if (res.isConfirmed) {
return res.value;
} else {
return null;
}
});
return _showInput.apply(this, arguments);
}
function showConfirm() {

@@ -59,0 +88,0 @@ var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Bist du sicher?';

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

export type SweetAlertInput =
'text' | 'email' | 'password' | 'number' | 'tel' | 'range' | 'textarea' | 'select' | 'radio' | 'checkbox' |
'file' | 'url';
export interface IKUtils {

@@ -26,2 +30,4 @@ ValidateRules,

showInput(title?: string, inputType?: SweetAlertInput, text?: string): Promise<string>
checkKeyExist(item, key: string): boolean,

@@ -28,0 +34,0 @@

2

package.json
{
"name": "innerken-js-utils",
"version": "1.0.14",
"version": "1.0.15",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -16,2 +16,19 @@ import Swal from 'sweetalert2'

export async function showInput (title = 'Please Input ...', inputType = 'number', text = '') {
const res = (await Swal.fire({
input: inputType,
title: title,
text: text,
icon: 'warning',
showCancelButton: true,
cancelButtonText: i18n.t('Zurück'),
confirmButtonText: i18n.t('OK')
}))
if (res.isConfirmed) {
return res.value
} else {
return null
}
}
/**

@@ -18,0 +35,0 @@ * @param {string|HTMLElement|JQuery} title

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