innerken-js-utils
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -7,2 +7,3 @@ "use strict"; | ||
exports.showConfirm = showConfirm; | ||
exports.showConfirmAsyn = showConfirmAsyn; | ||
exports.toast = toast; | ||
@@ -81,2 +82,14 @@ exports.showError = showError; | ||
function showConfirmAsyn(str) { | ||
var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'areYouSure'; | ||
return _sweetalert.default.fire({ | ||
title: title, | ||
html: str, | ||
icon: 'warning', | ||
showCancelButton: true, | ||
confirmButtonColor: '#3085d6', | ||
cancelButtonColor: '#d33' | ||
}); | ||
} | ||
function toast() { | ||
@@ -83,0 +96,0 @@ var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Erfolgreich!'; |
@@ -1,25 +0,42 @@ | ||
export interface IKUtils{ | ||
export interface IKUtils { | ||
ValidateRules, | ||
compose():string, //not sure return value | ||
compose(): string, //not sure return value | ||
trick, | ||
delCookie(name), | ||
setCookie(cName, value:string, expireDays:number), | ||
getCookie(name):string, //not sure | ||
deepCopy(target:object):object, | ||
hideLoading(success:number), | ||
showLoading(canCancel:boolean), | ||
showError(content?:string, title?:string), | ||
toast(title?:string, type?:string), | ||
showConfirm(content?:string, title?:string ), | ||
checkKeyExist(item, key:string):boolean, | ||
safeCallFunction(on:object, func, ...args), | ||
extend(target:object, args):object, //not sure | ||
toggleElement(el:object, arr:any[]), | ||
removeElement(el:object, arr:any[]), | ||
play(url?:string), | ||
getQueryString(name:string):string, //not sure | ||
wait(time):Promise<any> //not sure | ||
setCookie(cName, value: string, expireDays: number), | ||
getCookie(name): string, //not sure | ||
deepCopy(target: object): object, | ||
hideLoading(success: number), | ||
showLoading(canCancel: boolean), | ||
showError(content?: string, title?: string), | ||
toast(title?: string, type?: string), | ||
showConfirm(content?: string, title?: string), | ||
showConfirmAsyn(str: string, title?: string), | ||
checkKeyExist(item, key: string): boolean, | ||
safeCallFunction(on: object, func, ...args), | ||
extend(target: object, args): object, //not sure | ||
toggleElement(el: object, arr: any[]), | ||
removeElement(el: object, arr: any[]), | ||
play(url?: string), | ||
getQueryString(name: string): string, //not sure | ||
wait(time): Promise<any> //not sure | ||
} | ||
export declare const IKUtils:IKUtils | ||
export declare const IKUtils: IKUtils | ||
export default IKUtils |
{ | ||
"name": "innerken-js-utils", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -22,3 +22,3 @@ import Swal from 'sweetalert2' | ||
export function showConfirm (title = 'Bist du sicher?', content = 'Sie dürfen dies nicht wieder rückgängig machen!', | ||
callback, failCallback) { | ||
callback, failCallback) { | ||
Swal.fire({ | ||
@@ -38,3 +38,2 @@ title: title, | ||
} | ||
} else { | ||
@@ -48,2 +47,13 @@ if (failCallback) { | ||
export function showConfirmAsyn (str, title = 'areYouSure') { | ||
return Swal.fire({ | ||
title: title, | ||
html: str, | ||
icon: 'warning', | ||
showCancelButton: true, | ||
confirmButtonColor: '#3085d6', | ||
cancelButtonColor: '#d33' | ||
}) | ||
} | ||
export function toast (title = 'Erfolgreich!', type = 'success') { | ||
@@ -50,0 +60,0 @@ Toast.fire({ |
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
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
19716
622