dphelper 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +7 -2
- package/index.js +1 -1
- package/index.js.LICENSE.txt +11 -14
- package/package.json +2 -2
- package/types/_array.d.ts +24 -0
- package/types/_console.d.ts +25 -0
- package/types/_dispatch.d.ts +25 -0
- package/types/_security.d.ts +14 -0
- package/types/cache.d.ts +10 -2
- package/types/dphelper.d.ts +24 -10
- package/types/jquery.d.ts +8 -10
- package/types/observer.d.ts +9 -2
- package/types/state.d.ts +3 -4
- package/types/store.d.ts +2 -3
- package/types/audio.d.ts +0 -8
- package/types/files.d.ts +0 -21
- package/types/icon.d.ts +0 -17
- package/types/image.d.ts +0 -9
- package/types/styles.d.ts +0 -21
package/index.js.LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
dpHelper
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
4
4
|
Licensed under MIT License, see
|
|
5
5
|
https://dario.passariello.ca
|
|
6
6
|
*/
|
|
@@ -17,18 +17,15 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
/** @preserve
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
21
|
+
* derived from CryptoJS.mode.CTR
|
|
22
|
+
* Jan Hruby jhruby.web@gmail.com
|
|
23
|
+
*/
|
|
24
24
|
|
|
25
25
|
/** @preserve
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
-
*/
|
|
26
|
+
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
27
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
28
|
+
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
29
|
+
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
30
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dphelper",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"displayName": "dphelper",
|
|
5
5
|
"description": "dphelper devtools | tools, store and state management brave developers by Dario Passariello",
|
|
6
6
|
"copyright": "Dario Passariello",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"@babel/preset-react": "7.24.7",
|
|
190
190
|
"@babel/preset-typescript": "7.24.7",
|
|
191
191
|
"@babel/runtime": "^7.25.0",
|
|
192
|
-
"@types/node": "22.
|
|
192
|
+
"@types/node": "22.3.0",
|
|
193
193
|
"@types/react": "^18.3.3",
|
|
194
194
|
"@types/react-dom": "^18.3.0",
|
|
195
195
|
"@types/webpack-env": "1.18.5",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
interface _dpHelper extends _dpHelper {
|
|
3
|
+
|
|
4
|
+
array: {
|
|
5
|
+
find: (array: array, key: string) => any
|
|
6
|
+
unique: (array: array) => any
|
|
7
|
+
delete: (array: array, key: string) => any
|
|
8
|
+
merge: (arrayA: array, arrayB: array) => any
|
|
9
|
+
mergeByKey: (arrayA: array, arrayB: array, key: string) => any
|
|
10
|
+
asc: (array: array) => any
|
|
11
|
+
desc: (array: array) => any
|
|
12
|
+
duplicates: (array: array) => any
|
|
13
|
+
even: (array: array) => any
|
|
14
|
+
odd: (array: array) => any
|
|
15
|
+
toObj: (array: array) => any
|
|
16
|
+
sumColumn: (array: [[]], column: number) => any
|
|
17
|
+
shuffle: (array: array) => any
|
|
18
|
+
testArrayInt: (num: number) => any
|
|
19
|
+
|
|
20
|
+
generate: (num: number) => array
|
|
21
|
+
rand32: (num: number) => array
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface _dpHelper extends _dpHelper {
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Root
|
|
5
|
+
* @return group of commands.
|
|
6
|
+
*/
|
|
7
|
+
console: {
|
|
8
|
+
/**
|
|
9
|
+
* info
|
|
10
|
+
* @return console log of paramenters.
|
|
11
|
+
*/
|
|
12
|
+
info: (name: String, message: String, func: Function) => any
|
|
13
|
+
/**
|
|
14
|
+
* stop
|
|
15
|
+
* @return stop all.
|
|
16
|
+
*/
|
|
17
|
+
stop: (options?) => any
|
|
18
|
+
/**
|
|
19
|
+
* stop
|
|
20
|
+
* @return stop all.
|
|
21
|
+
*/
|
|
22
|
+
toHtml: (element: string) => any
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface _dpHelper extends _dpHelper {
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* dispatch
|
|
5
|
+
* @return group of commands.
|
|
6
|
+
*/
|
|
7
|
+
dispatch: {
|
|
8
|
+
/**
|
|
9
|
+
* info
|
|
10
|
+
* @return console log of paramenters.
|
|
11
|
+
*/
|
|
12
|
+
set: (name: any, value: any) => any
|
|
13
|
+
/**
|
|
14
|
+
* stop
|
|
15
|
+
* @return stop all.
|
|
16
|
+
*/
|
|
17
|
+
listen: (name: string, cb: any, flag?: any) => any
|
|
18
|
+
/**
|
|
19
|
+
* stop
|
|
20
|
+
* @return stop all.
|
|
21
|
+
*/
|
|
22
|
+
remove: (name: string) => any
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
package/types/cache.d.ts
CHANGED
|
@@ -3,7 +3,15 @@ Copyright: © 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
|
3
3
|
License: MIT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Cache is used for internal use only... but you can use if you need.
|
|
8
|
+
* @return Some stuff you cache... usually used for dynamic imports from dpHelper.
|
|
9
|
+
*/
|
|
10
|
+
interface dpCache {
|
|
11
|
+
[key: string]: any
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare var cache: dpCache
|
|
15
|
+
type cache = dpCache
|
|
8
16
|
|
|
9
17
|
cache = {}
|
package/types/dphelper.d.ts
CHANGED
|
@@ -7,21 +7,35 @@ License: MIT
|
|
|
7
7
|
// Global object
|
|
8
8
|
////////////////////
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @return dpHelper Root.
|
|
12
|
+
*/
|
|
13
|
+
interface _dpHelper {
|
|
14
|
+
/**
|
|
15
|
+
* Set parameter in dphelper
|
|
16
|
+
* @param key Name of main function.
|
|
17
|
+
* @return The values.
|
|
18
|
+
*/
|
|
19
|
+
[key: string]: any
|
|
20
|
+
|
|
21
|
+
// _list: {
|
|
22
|
+
// scripts: any
|
|
23
|
+
// sockets: any
|
|
24
|
+
// }
|
|
13
25
|
|
|
14
|
-
|
|
26
|
+
}
|
|
15
27
|
|
|
16
|
-
declare var
|
|
17
|
-
|
|
18
|
-
api: any
|
|
28
|
+
declare var dphelper: _dpHelper
|
|
29
|
+
type dphelper = _dpHelper
|
|
19
30
|
|
|
20
31
|
dphelper = {}
|
|
21
|
-
api = {}
|
|
22
32
|
|
|
33
|
+
//////////////////////////////////////////////////////////////////////////////////////
|
|
34
|
+
// EXTRA
|
|
35
|
+
|
|
36
|
+
/*******************************************************************************/
|
|
23
37
|
// OVERRIDE CONFIRM FUNCTION
|
|
38
|
+
|
|
24
39
|
declare function confirm(message?: string, func?: func, func?: func): boolean
|
|
25
40
|
|
|
26
|
-
|
|
27
|
-
type api = { [key: string]: Any }
|
|
41
|
+
///////////////////
|
package/types/jquery.d.ts
CHANGED
|
@@ -3,21 +3,19 @@ Copyright: © 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
|
3
3
|
License: MIT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
type $ = {}
|
|
7
|
-
type jQuery = {}
|
|
8
|
-
|
|
9
6
|
declare var $: any
|
|
10
7
|
declare var jQuery: any
|
|
11
8
|
declare module 'jquery'
|
|
12
9
|
|
|
13
10
|
// ////////////////////////////////////////////////////////////////
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
jQuery: any
|
|
19
|
-
}
|
|
12
|
+
interface globalThis {
|
|
13
|
+
$: any
|
|
14
|
+
jQuery: any
|
|
20
15
|
}
|
|
21
16
|
|
|
22
|
-
$ = globalThis
|
|
23
|
-
jQuery = globalThis
|
|
17
|
+
type $ = globalThis
|
|
18
|
+
type jQuery = globalThis
|
|
19
|
+
|
|
20
|
+
$ = {}
|
|
21
|
+
jQuery = {}
|
package/types/observer.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Observer run a callback anytime the associated state going to change
|
|
3
|
+
* @return Execution of function after state change.
|
|
4
|
+
*/
|
|
1
5
|
interface dpObserver {
|
|
6
|
+
|
|
2
7
|
(stateName: string, callBack): Any
|
|
3
|
-
|
|
4
|
-
readonly
|
|
8
|
+
|
|
9
|
+
readonly list?: () => void
|
|
10
|
+
readonly remove?: (name: string, callBack, flag?: bool[]) => void
|
|
11
|
+
|
|
5
12
|
}
|
|
6
13
|
|
|
7
14
|
declare var observer: dpObserver
|
package/types/state.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
1
|
/**
|
|
3
2
|
* If you use only "state" you get the entire Proxy object
|
|
4
3
|
* @return Proxy Object of all states.
|
|
5
4
|
*/
|
|
6
|
-
interface
|
|
5
|
+
interface dpState {
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Create states using: state.test = "example"
|
|
@@ -38,7 +37,7 @@ interface _state {
|
|
|
38
37
|
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
declare var state:
|
|
42
|
-
type state =
|
|
40
|
+
declare var state: dpState
|
|
41
|
+
type state = dpState
|
|
43
42
|
|
|
44
43
|
state = {}
|
package/types/store.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Create states using:
|
|
3
|
-
|
|
2
|
+
* Create states using: store.set("example",{test:"test"})
|
|
4
3
|
*/
|
|
5
4
|
interface dpStore {
|
|
6
5
|
|
|
@@ -73,7 +72,7 @@ interface dpStore {
|
|
|
73
72
|
*/
|
|
74
73
|
readonly size: () => any
|
|
75
74
|
|
|
76
|
-
//
|
|
75
|
+
// TODO
|
|
77
76
|
// readonly increaseQuota: (value: number) => void
|
|
78
77
|
}
|
|
79
78
|
|
package/types/audio.d.ts
DELETED
package/types/files.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright: © 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
3
|
-
License: MIT
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
declare module '*.htm'
|
|
7
|
-
declare module '*.html'
|
|
8
|
-
|
|
9
|
-
////////////////////////////////////////////////////////////////
|
|
10
|
-
|
|
11
|
-
declare module '*.js' {
|
|
12
|
-
const value: any
|
|
13
|
-
export default value
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
////////////////////////////////////////////////////////////////
|
|
17
|
-
|
|
18
|
-
declare module "*.svg" {
|
|
19
|
-
const value: any
|
|
20
|
-
export default value
|
|
21
|
-
}
|
package/types/icon.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright: © 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
3
|
-
License: MIT
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
////////////////////////////////////////////////////////////////
|
|
7
|
-
|
|
8
|
-
declare module 'icon'
|
|
9
|
-
declare var icon: any
|
|
10
|
-
|
|
11
|
-
declare global {
|
|
12
|
-
interface globalThis {
|
|
13
|
-
icon: any
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
icon = globalThis.icon || {}
|
package/types/image.d.ts
DELETED
package/types/styles.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright: © 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
3
|
-
License: MIT
|
|
4
|
-
*/
|
|
5
|
-
declare module '*.less' {
|
|
6
|
-
const resource: { [key: string]: any }
|
|
7
|
-
export = resource
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
////////////////////////////////////////////////////////////////
|
|
11
|
-
|
|
12
|
-
declare module '*.scss' {
|
|
13
|
-
const resource: { [key: string]: any }
|
|
14
|
-
export = resource
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
////////////////////////////////////////////////////////////////
|
|
18
|
-
declare module '*.sass' {
|
|
19
|
-
const resource: { [key: string]: any }
|
|
20
|
-
export = resource
|
|
21
|
-
}
|