From 5435bc9478fd679c39263e19b6750195174879c9 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Tue, 19 Dec 2017 13:05:34 -0800 Subject: [PATCH] confirmdialog: Provides its own types --- notNeededPackages.json | 6 + types/confirmdialog/confirmdialog-tests.ts | 129 --------------------- types/confirmdialog/index.d.ts | 93 --------------- types/confirmdialog/tsconfig.json | 23 ---- types/confirmdialog/tslint.json | 1 - 5 files changed, 6 insertions(+), 246 deletions(-) delete mode 100644 types/confirmdialog/confirmdialog-tests.ts delete mode 100644 types/confirmdialog/index.d.ts delete mode 100644 types/confirmdialog/tsconfig.json delete mode 100644 types/confirmdialog/tslint.json diff --git a/notNeededPackages.json b/notNeededPackages.json index 38c0a39808..6048746555 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -144,6 +144,12 @@ "sourceRepoURL": "https://github.com/tj/commander.js", "asOfVersion": "2.12.2" }, + { + "libraryName": "confirmdialog", + "typingsPackageName": "confirmdialog", + "sourceRepoURL": "https://github.com/allipierre/Type-definitions-for-jquery-confirm/tree/master/types/confirmDialog-js", + "asOfVersion": "1.0.0" + }, { "libraryName": "constant-case", "typingsPackageName": "constant-case", diff --git a/types/confirmdialog/confirmdialog-tests.ts b/types/confirmdialog/confirmdialog-tests.ts deleted file mode 100644 index cd2ad0e8ca..0000000000 --- a/types/confirmdialog/confirmdialog-tests.ts +++ /dev/null @@ -1,129 +0,0 @@ -class Confirm { - private title_: string; - private conTent_: string; - constructor(title: string, content: string) { - this.title_ = title; - this.conTent_ = content; - } - - confirm() { - $.confirm({ - title: 'Confirm!', - content: 'Simple confirm!', - buttons: { - confirm: () => { - $.alert('Confirmed!'); - }, - cancel: (cancel: string) => { - $.alert('Canceled! ' + cancel); - }, - somethingElse: { - text: 'Something else', - btnClass: 'btn-blue', - keys: ['enter', 'shift'], - action: () => { - alert('Something else?'); - } - } - } - }); - } - - alert() { - $.alert({ - title: 'Alert!', - content: 'Simple alert!', - }); - } - - globalSettings() { - jconfirm.defaults = { - title: 'Hello', - titleClass: '', - type: 'default', - typeAnimated: true, - draggable: true, - dragWindowGap: 15, - dragWindowBorder: true, - animateFromElement: true, - smoothContent: true, - content: 'Are you sure to continue?', - buttons: {}, - defaultButtons: { - ok: { - action: () => { - } - }, - close: { - action: () => { - } - }, - }, - - icon: '', - lazyOpen: false, - bgOpacity: null, - theme: 'light', - animation: 'scale', - closeAnimation: 'scale', - animationSpeed: 400, - animationBounce: 1, - rtl: false, - container: 'body', - containerFluid: false, - backgroundDismiss: false, - backgroundDismissAnimation: 'shake', - autoClose: false, - closeIcon: null, - closeIconClass: false, - watchInterval: 100, - columnClass: 'col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1', - boxWidth: '50%', - scrollToPreviousElement: true, - scrollToPreviousElementAnimate: true, - useBootstrap: true, - offsetTop: 40, - offsetBottom: 40, - bootstrapClasses: { - container: 'container', - containerFluid: 'container-fluid', - row: 'row', - }, - onContentReady: () => {}, - onOpenBefore: () => {}, - onOpen: () => {}, - onClose: () => {}, - onDestroy: () => {}, - onAction: () => {} -}; - } - - api() { - const jc = $.confirm({ - title: 'awesome', - onContentReady: () => { - jc.setTitle(); - } -}); - } - - confirm_84() { - $.confirm({ - closeIcon: true, - buttons: { - buttonA: { - text: 'button a', - action: (buttonA: string) => { - return false; // prevent the modal from closing - } - }, - resetButton: (resetButton: string) => { - } - } -}); - } -} - -let firstName = 'Pierre'; -let lastName = 'Yotti'; -let type = new Confirm(firstName, lastName); diff --git a/types/confirmdialog/index.d.ts b/types/confirmdialog/index.d.ts deleted file mode 100644 index 9b98ab2389..0000000000 --- a/types/confirmdialog/index.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -// Type definitions for confirmdialog 3.3 -// Project: https://github.com/allipierre/Type-definitions-for-jquery-confirm/tree/master/types/confirmDialog-js -// Definitions by: Alli Pierre Yotti -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -/// - - interface JQueryStatic { - /** - * confirm Dialog - * {confirmOptions} pOtions - */ - confirm(pOtions: options.confirmOptions | string, title?: string): any; - - /** - * confirm alert - * {any} pMessage - */ - alert(pMessage?: any, title?: string): any; - - /** - * confirm Dialog - * {any} pMessage - */ - dialog(pOtions: options.confirmOptions | string): any; -} - - interface JQuery { - /** - * confirm Dialog - * {confirmOptions} pOtions - */ - confirm(pOtions: options.confirmOptions | string, title?: string): any; - - /** - * confirm alert - * {any} pMessage - */ - alert(pMessage?: any, title?: string): any; - - /** - * confirm Dialog - * {any} pMessage - */ - dialog(pOtions: options.confirmOptions): any; -} - -interface Window { - setContentAppend: any; -} - -declare namespace options { - interface confirmOptions { - buttons?: any; - title?: string | boolean; - content?: any; - onContentReady?: any; - lazyOpen?: boolean; - closeIcon?: any; - type?: string; - typeAnimated?: boolean; - icon?: string; - closeIconClass?: string; - columnClass?: string; - containerFluid?: boolean; - boxWidth?: string; - useBootstrap?: boolean; - bootstrapClasses?: any; - draggable?: boolean; - dragWindowBorder?: boolean; - dragWindowGap?: number; - contentLoaded?: () => void; - autoClose?: string; - backgroundDismiss?: any; - backgroundDismissAnimation?: string; - escapeKey?: string | boolean; - onOpenBefore?: () => void; - onOpen?: () => void; - onClose?: () => void; - onDestroy?: () => void; - onAction?: () => void; - } - - interface buttonOptionss { - cancel?: () => void; - confirm?: () => void; - } -} - -declare namespace jconfirm { - let defaults: any; -} diff --git a/types/confirmdialog/tsconfig.json b/types/confirmdialog/tsconfig.json deleted file mode 100644 index 95f33eb036..0000000000 --- a/types/confirmdialog/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": ["../"], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true, - "target": "es6" - }, - "files": [ - "index.d.ts", - "confirmdialog-tests.ts" - ] -} diff --git a/types/confirmdialog/tslint.json b/types/confirmdialog/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/confirmdialog/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" }