dphelper 0.2.87 → 0.2.88

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,6 +1,6 @@
1
1
  {
2
2
  "name": "dphelper",
3
- "version": "0.2.87",
3
+ "version": "0.2.88",
4
4
  "description": "Developer Tools",
5
5
  "deprecated": false,
6
6
  "appCode": "dphelper",
@@ -30,7 +30,9 @@
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 jsdom",
35
+ "test_lint": "eslint --fix"
34
36
  },
35
37
  "eslintConfig": {
36
38
  "globals": {
@@ -85,48 +87,52 @@
85
87
  "url": "https://github.com/passariello/dpHelper/issues"
86
88
  },
87
89
  "devDependencies": {
88
- "@babel/plugin-transform-runtime": "7.17.0",
90
+ "@babel/plugin-transform-runtime": "7.18.0",
89
91
  "css-loader": "6.7.1",
90
- "eslint": "8.14.0",
92
+ "eslint": "8.16.0",
91
93
  "file-loader": "6.2.0",
92
94
  "jest": "27.5.1",
93
95
  "less-loader": "10.2.0",
94
- "sass-loader": "12.6.0",
96
+ "sass-loader": "13.0.0",
95
97
  "style-loader": "3.3.1",
96
98
  "webpack-cli": "4.9.2"
97
99
  },
98
100
  "dependencies": {
99
- "@babel/plugin-proposal-class-properties": "7.16.7",
100
- "@babel/preset-env": "7.16.11",
101
- "@babel/preset-react": "7.16.7",
101
+ "@babel/plugin-proposal-class-properties": "7.17.12",
102
+ "@babel/preset-env": "7.18.0",
103
+ "@babel/preset-react": "7.17.12",
102
104
  "@babel/preset-typescript": "7.16.7",
103
105
  "@testing-library/jest-dom": "^5.16.2",
104
106
  "@testing-library/user-event": "^14.0.0",
105
- "babel-loader": "8.2.4",
107
+ "@types/enzyme-adapter-react-16": "1.0.6",
108
+ "babel-loader": "8.2.5",
106
109
  "child_process": "1.0.2",
107
110
  "classnames": "2.3.1",
108
111
  "cli-confirm": "1.0.1",
109
- "compression-webpack-plugin": "9.2.0",
110
- "concurrently": "7.1.0",
111
- "copy-webpack-plugin": "10.2.4",
112
+ "compression-webpack-plugin": "10.0.0",
113
+ "concurrently": "7.2.0",
114
+ "copy-webpack-plugin": "11.0.0",
112
115
  "css": "3.0.0",
113
- "dotenv": "16.0.0",
116
+ "dotenv": "16.0.1",
117
+ "enzyme": "3.11.0",
118
+ "enzyme-adapter-react-16": "1.15.6",
119
+ "enzyme-to-json": "3.6.2",
114
120
  "fs": "0.0.1-security",
115
121
  "html-webpack-plugin": "5.5.0",
116
122
  "jquery": "3.6.0",
117
123
  "jsdom-worker": "0.2.1",
118
124
  "jshint": "^2.13.4",
119
125
  "less": "4.1.2",
120
- "moment": "2.29.2",
126
+ "moment": "2.29.3",
121
127
  "path": "0.12.7",
122
128
  "progress-bar-webpack-plugin": "2.1.0",
123
- "react": "18.0.0",
129
+ "react": "18.1.0",
124
130
  "react-dom": "18.0.0",
125
131
  "require": "2.4.20",
126
- "sass": "1.50.0",
127
- "socket.io-client": "4.5.0",
132
+ "sass": "1.52.0",
133
+ "socket.io-client": "4.5.1",
128
134
  "ts-jest": "27.1.4",
129
135
  "tslint": "6.1.3",
130
- "webpack": "5.71.0"
136
+ "webpack": "5.72.1"
131
137
  }
132
138
  }
@@ -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;