dphelper 0.2.87 → 0.2.91

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dphelper",
3
- "version": "0.2.87",
4
- "description": "Developer Tools",
3
+ "version": "0.2.91",
4
+ "description": "Developer Tools by Dario Passariello",
5
5
  "deprecated": false,
6
6
  "appCode": "dphelper",
7
7
  "appCodeRelease": "dphelper",
@@ -30,11 +30,14 @@
30
30
  "git": "cd node && node gitDeploy",
31
31
  "git-tag": "cd node && node createTag",
32
32
  "backup": "backup.bat",
33
- "goLive": "cd node && node goLive"
33
+ "goLive": "cd node && node goLive",
34
+ "test_jest": "jest --watchAll --coverage --testEnvironment",
35
+ "test_lint": "eslint --fix"
34
36
  },
35
37
  "eslintConfig": {
36
38
  "globals": {
37
- "window": true
39
+ "window": true,
40
+ "dphelper": true
38
41
  }
39
42
  },
40
43
  "author": {
@@ -85,48 +88,43 @@
85
88
  "url": "https://github.com/passariello/dpHelper/issues"
86
89
  },
87
90
  "devDependencies": {
88
- "@babel/plugin-transform-runtime": "7.17.0",
89
- "css-loader": "6.7.1",
90
- "eslint": "8.14.0",
91
+ "@babel/plugin-proposal-class-properties": "7.18.6",
92
+ "@babel/plugin-transform-runtime": "7.18.9",
93
+ "@babel/preset-env": "7.18.9",
94
+ "@babel/preset-react": "7.18.6",
95
+ "@babel/preset-typescript": "7.18.6",
96
+ "@testing-library/jest-dom": "^5.16.4",
97
+ "@testing-library/user-event": "^14.3.0",
98
+ "@types/enzyme-adapter-react-16": "1.0.6",
99
+ "babel-loader": "8.2.5",
100
+ "child_process": "1.0.2",
101
+ "cli-confirm": "1.0.1",
102
+ "compression-webpack-plugin": "10.0.0",
103
+ "copy-webpack-plugin": "11.0.0",
104
+ "dotenv": "16.0.1",
105
+ "enzyme": "3.11.0",
106
+ "enzyme-to-json": "3.6.2",
107
+ "eslint": "8.20.0",
91
108
  "file-loader": "6.2.0",
92
- "jest": "27.5.1",
93
- "less-loader": "10.2.0",
94
- "sass-loader": "12.6.0",
109
+ "fs": "0.0.1-security",
110
+ "html-webpack-plugin": "5.5.0",
111
+ "jest": "28.1.3",
112
+ "lint": "1.1.2",
113
+ "progress-bar-webpack-plugin": "2.1.0",
95
114
  "style-loader": "3.3.1",
96
- "webpack-cli": "4.9.2"
115
+ "ts-jest": "28.0.7",
116
+ "webpack": "5.73.0",
117
+ "webpack-cli": "4.10.0"
97
118
  },
98
119
  "dependencies": {
99
- "@babel/plugin-proposal-class-properties": "7.16.7",
100
- "@babel/preset-env": "7.16.11",
101
- "@babel/preset-react": "7.16.7",
102
- "@babel/preset-typescript": "7.16.7",
103
- "@testing-library/jest-dom": "^5.16.2",
104
- "@testing-library/user-event": "^14.0.0",
105
- "babel-loader": "8.2.4",
106
- "child_process": "1.0.2",
107
120
  "classnames": "2.3.1",
108
- "cli-confirm": "1.0.1",
109
- "compression-webpack-plugin": "9.2.0",
110
- "concurrently": "7.1.0",
111
- "copy-webpack-plugin": "10.2.4",
121
+ "concurrently": "7.3.0",
112
122
  "css": "3.0.0",
113
- "dotenv": "16.0.0",
114
- "fs": "0.0.1-security",
115
- "html-webpack-plugin": "5.5.0",
116
123
  "jquery": "3.6.0",
117
124
  "jsdom-worker": "0.2.1",
118
- "jshint": "^2.13.4",
119
- "less": "4.1.2",
120
- "moment": "2.29.2",
125
+ "moment": "2.29.4",
121
126
  "path": "0.12.7",
122
- "progress-bar-webpack-plugin": "2.1.0",
123
- "react": "18.0.0",
124
- "react-dom": "18.0.0",
125
- "require": "2.4.20",
126
- "sass": "1.50.0",
127
- "socket.io-client": "4.5.0",
128
- "ts-jest": "27.1.4",
129
- "tslint": "6.1.3",
130
- "webpack": "5.71.0"
127
+ "react": "18.2.0",
128
+ "react-dom": "18.2.0"
131
129
  }
132
130
  }
@@ -1,120 +0,0 @@
1
- /*!
2
- * dpHelper <https://github.com/passariello/dpHelper>
3
- * Copyright (c) 2021, Dario Passariello.
4
- * Licensed under the Apache-2.0 License.
5
- */
6
-
7
- /***********************************************************************/
8
-
9
- var description = {
10
- "name" : "BeforeUnLoad",
11
- "description" : "test",
12
- "version" : "0.0.1",
13
- "command" : "onBeforeUnLoad",
14
- "subCommand" : [],
15
- "example" : "",
16
- "author" : "Dario Passariello",
17
- "active" : true
18
- };
19
-
20
- dphelper._list.scripts.push( description );
21
-
22
- /***********************************************************************/
23
-
24
- dphelper.onBeforeUnLoad = () => {
25
-
26
- let is_dirty = false;
27
- let answer = null;
28
- let mex = "You have made some changes which you might want to save.";
29
- let loadOnce = false;
30
- let save_button = document.querySelector("#save_button");
31
-
32
- const beforeUnloadListener = ( event ) => {
33
- event.preventDefault();
34
- return mex;
35
- };
36
-
37
- const nameInput = document.querySelector("#name");
38
-
39
- if( nameInput ){
40
- nameInput.addEventListener( "input" , (event) => {
41
- if (event.target.value !== "") {
42
- addEventListener("beforeunload", beforeUnloadListener, { capture: true });
43
- } else {
44
- removeEventListener("beforeunload", beforeUnloadListener, { capture: true });
45
- }
46
- });
47
- }
48
-
49
- /****************************************************************************** */
50
-
51
- let handleEvent = function( event ){
52
-
53
- if( event.target.type === 'textarea' || event.target.type === 'input' ){
54
- if( is_dirty === false ){
55
- return is_dirty = true;
56
- }
57
- }
58
-
59
- };
60
-
61
- /****************************************************************************** */
62
-
63
- let TEST = function (){
64
- // CHANGE ON KEY
65
- document.body.addEventListener( "keyup" , handleEvent );
66
- }();
67
-
68
- /****************************************************************************** */
69
-
70
- // CHANGE ON ASIDE CLICK
71
- if( loadOnce === false ){
72
- document.body.addEventListener( "click" , function( event ){
73
-
74
- if( event.target.tagName === 'IMG'){
75
-
76
- if( is_dirty === true ) {
77
-
78
- // if the user navigates away from this page via an anchor link,
79
- // popup a new boxy confirmation.
80
- answer = confirm( mex );
81
- if ( answer === true ) {
82
- return is_dirty = false;
83
- }else{
84
- event.preventDefault();
85
- }
86
- }
87
- }
88
-
89
- });
90
- loadOnce = true;
91
- }
92
-
93
- /****************************************************************************** */
94
-
95
- addEventListener('popstate', function(event) {
96
-
97
- if( is_dirty === true ){
98
- answer = confirm( mex );
99
- if ( answer === true ) {
100
- return is_dirty = false;
101
- } else {
102
- event.stopImmediatePropagation();
103
- event.preventDefault();
104
- return mex;
105
- }
106
- }
107
-
108
- });
109
-
110
- /****************************************************************************** */
111
-
112
- window.onbeforeunload = function( event ) {
113
- if( ( is_dirty === true ) && ( answer === null ) ){
114
- event.preventDefault();
115
- return event.returnValue = mex;
116
- //return mex
117
- }
118
- };
119
-
120
- };
@@ -1,53 +0,0 @@
1
- /*!
2
- * dpHelper <https://github.com/passariello/dpHelper>
3
- * Copyright (c) 2021, Dario Passariello.
4
- * Licensed under the Apache-2.0 License.
5
- */
6
-
7
- /***********************************************************************/
8
-
9
- var description = {
10
- "name" : "Purge From Memory",
11
- "description" : "test",
12
- "version" : "0.0.1",
13
- "command" : "purge",
14
- "subCommand" : [],
15
- "example" : "",
16
- "author" : "Dario Passariello",
17
- "active" : true
18
- };
19
-
20
- dphelper._list.scripts.push( description );
21
-
22
- /***********************************************************************/
23
-
24
- dphelper.purge = ( d = body, time = 10000 ) => {
25
-
26
- setTimeout(() => {
27
- if( d === undefined ) return null;
28
-
29
- let a = d.attributes, i, l, n;
30
-
31
- if (a) {
32
- l = a.length;
33
- for( i = 0; i < l; i += 1 ) {
34
- n = a[i].name;
35
- if( typeof d[n] === 'function' ) { d[n] = null; }
36
- if( typeof d[n] === 'undefined' ) { d[n] = null; }
37
- }
38
-
39
- }
40
-
41
- a = d.childNodes;
42
-
43
- if (a) {
44
- l = a.length;
45
- for( i = 0; i < l; i += 1 ) {
46
- Purge( d.childNodes[i] );
47
- }
48
- }
49
- }, time );
50
-
51
- };
52
-
53
- // purge()
@@ -1,27 +0,0 @@
1
- /*!
2
- * dpHelper <https://github.com/passariello/dpHelper>
3
- * Copyright (c) 2021, Dario Passariello.
4
- * Licensed under the Apache-2.0 License.
5
- */
6
-
7
- /***********************************************************************/
8
-
9
- var description = {
10
- "name" : "String",
11
- "description" : "test",
12
- "version" : "0.0.1",
13
- "command" : "parseBool",
14
- "subCommand" : [],
15
- "example" : "",
16
- "author" : "Dario Passariello",
17
- "active" : true
18
- };
19
-
20
- dphelper._list.scripts.push( description );
21
-
22
- /***********************************************************************/
23
-
24
- dphelper.parseBool = ( val ) => {
25
- if ( !val || val.length == null ) return true;
26
- return val != 0 ? true : false;
27
- };
@@ -1,12 +0,0 @@
1
- /*
2
- Copyright: © 2022 Dario Passariello <dariopassariello@gmail.com>
3
- License: CC BY-NC-ND 4.0
4
- */
5
-
6
- declare global {
7
- interface Window {
8
- cordova: any;
9
- }
10
- }
11
-
12
- window.cordova = window.cordova || false;
@@ -1,20 +0,0 @@
1
- /*
2
- Copyright: © 2022 Dario Passariello <dariopassariello@gmail.com>
3
- License: CC BY-NC-ND 4.0
4
- */
5
-
6
- declare module 'layerpro';
7
- declare var layerpro: any;
8
-
9
- declare module 'jquery';
10
- declare var $: any;
11
-
12
- ////////////////////////////////////////////////////////////////
13
-
14
- declare global {
15
- interface Window {
16
- layerpro:any;
17
- }
18
- }
19
-
20
- window.layerpro = window.layerpro || false;
@@ -1,20 +0,0 @@
1
- /*
2
- Copyright: © 2022 Dario Passariello <dariopassariello@gmail.com>
3
- License: CC BY-NC-ND 4.0
4
- */
5
-
6
- declare module 'menupro';
7
- declare var menupro: any;
8
-
9
- declare module 'jquery';
10
- declare var $: any;
11
-
12
- ////////////////////////////////////////////////////////////////
13
-
14
- declare global {
15
- interface Window {
16
- menupro:any;
17
- }
18
- }
19
-
20
- window.menupro = window.menupro || false;