dphelper 0.2.57 → 0.2.59

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.
Files changed (63) hide show
  1. package/index.js +2 -10
  2. package/index.js.LICENSE.txt +24 -0
  3. package/package.json +1 -1
  4. package/.editorconfig +0 -15
  5. package/.env +0 -3
  6. package/.eslintignore +0 -8
  7. package/.eslintrc.json +0 -36
  8. package/.gitattributes +0 -2
  9. package/.hintrc +0 -11
  10. package/.jsbeautifyrc +0 -25
  11. package/.jshintrc +0 -14
  12. package/.prettierignore +0 -2
  13. package/.prettierrc +0 -7
  14. package/.vscode/settings.json +0 -54
  15. package/3party/shortcut.js +0 -224
  16. package/backup.bat +0 -43
  17. package/data/list.json +0 -19
  18. package/dist/LICENSE +0 -201
  19. package/dist/README.md +0 -176
  20. package/index.d.ts +0 -14
  21. package/init.js +0 -48
  22. package/jest.config.js +0 -18
  23. package/public/assets/images/banner.png +0 -0
  24. package/public/assets/logos/logo.svg +0 -64
  25. package/scripts/anchorToOnClick.js +0 -47
  26. package/scripts/array.js +0 -142
  27. package/scripts/browser.js +0 -65
  28. package/scripts/console.js +0 -86
  29. package/scripts/coodinates.js +0 -41
  30. package/scripts/cookie.js +0 -97
  31. package/scripts/currency.js +0 -41
  32. package/scripts/date.js +0 -101
  33. package/scripts/disable.js +0 -90
  34. package/scripts/event.js +0 -39
  35. package/scripts/font.js +0 -52
  36. package/scripts/form.js +0 -113
  37. package/scripts/function.js +0 -47
  38. package/scripts/indexedDB.js +0 -222
  39. package/scripts/json.js +0 -42
  40. package/scripts/load.js +0 -85
  41. package/scripts/noCache.js +0 -26
  42. package/scripts/number.js +0 -66
  43. package/scripts/obj.js +0 -81
  44. package/scripts/onBeforeUnLoad.js +0 -120
  45. package/scripts/parseBool.js +0 -27
  46. package/scripts/path.js +0 -94
  47. package/scripts/promise.js +0 -35
  48. package/scripts/purge.js +0 -53
  49. package/scripts/screen.js +0 -64
  50. package/scripts/scrollbar.js +0 -245
  51. package/scripts/shortcut.js +0 -70
  52. package/scripts/storage.js +0 -62
  53. package/scripts/svg.js +0 -372
  54. package/scripts/text.js +0 -78
  55. package/scripts/time.js +0 -41
  56. package/scripts/timer.js +0 -35
  57. package/scripts/trigger.js +0 -46
  58. package/scripts/type.js +0 -56
  59. package/scripts/uuid.js +0 -33
  60. package/scripts/window.js +0 -50
  61. package/tests/ld-json-funtions.test.ts +0 -21
  62. package/tests/ld-json.test.ts +0 -46
  63. package/webpack.config.js +0 -240
package/scripts/window.js DELETED
@@ -1,50 +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" : "Window Options",
11
- "description" : "test",
12
- "version" : "0.0.1",
13
- "command" : "window",
14
- "subCommand" : [],
15
- "example" : "",
16
- "author" : "Dario Passariello",
17
- "active" : true
18
- };
19
-
20
- dphelper._list.scripts.push( description );
21
-
22
- /***********************************************************************/
23
-
24
- dphelper.window = () => {
25
-
26
- window.offScreenBuffering = "auto";
27
-
28
- // HIDE STATUS INFORMATION ON BROWSER BAR
29
- //***************************************
30
-
31
- window.status = "";
32
- window.defaultStatus = "";
33
-
34
- // WINDOW ANIMATION
35
- //**********************************
36
-
37
- ( () => {
38
- return (
39
- window.requestAnimationFrame ||
40
- window.webkitRequestAnimationFrame ||
41
- window.mozRequestAnimationFrame ||
42
- window.oRequestAnimationFrame ||
43
- window.msRequestAnimationFrame ||
44
- function( callback ){
45
- window.setTimeout( callback, 1000 / 120 );
46
- }
47
- );
48
- })();
49
-
50
- };
@@ -1,21 +0,0 @@
1
- // Jest imports
2
- import 'jest-get-type'
3
- //import 'html-validate/jest'
4
- //import 'jest-chain'
5
- //import 'jest-extended'
6
- //import 'jsdom-global/register'
7
- import 'jsdom-worker'
8
-
9
- // test('SchemaLinks() generates proper links', async () => {
10
- // const data = Schema.schemaLinks('Graph', 'https://mydomain.com/homepage.htm')
11
- // expect(data).toBeArray()
12
- // expect(data.length).toBe(3)
13
- // data.forEach(btn => {
14
- // expect(btn.url.match(MockData.RegExIsUrl)).toBeArray()
15
- // })
16
- // })
17
-
18
- // test('ldJsonCard() creates card with proper HTML', () => {
19
- // const data = ldJsonCard(MockData.LdJsonSample, MockData.UrlSample).getDiv().innerHTML
20
- // expect(data).toBeString().toHTMLValidate()
21
- // })
@@ -1,46 +0,0 @@
1
- // Jest imports
2
- import 'jest-get-type'
3
- //import 'html-validate/jest'
4
- //import 'jest-chain'
5
- //import 'jest-extended'
6
- //import 'jsdom-global/register'
7
- import 'jsdom-worker'
8
-
9
- // describe('codeInjector() mocking the func', () => {
10
- // beforeEach(() => {
11
- // jest.spyOn(actions, 'codeInjector').mockImplementation(() => [MockData.LdJsonSample])
12
- // jest.spyOn(main, 'sendTaskToWorker').mockImplementation(() => {})
13
- // })
14
-
15
- // afterEach(() => {
16
- // jest.clearAllMocks()
17
- // })
18
-
19
- // test('codeInjector() returns valid script(s)', async () => {
20
- // const data = actions.codeInjector()
21
- // expect(data).toBeArray()
22
- // expect(data[0]).toBeObject()
23
- // expect(actions.codeInjector).toBeCalledTimes(1)
24
- // })
25
-
26
- // test('reportGenerator() generates valid HTML from complex LD+JSON', () =>
27
- // actions.reportGenerator(MockData.UrlSample, actions.codeInjector(), MockData.reportTester))
28
-
29
- // test('reportGenerator() generates valid HTML from empty Url', () =>
30
- // actions.reportGenerator('', actions.codeInjector(), MockData.reportTester))
31
- // })
32
-
33
- // describe('reportGenerator()', () => {
34
- // beforeEach(() => {
35
- // jest.spyOn(main, 'sendTaskToWorker').mockImplementation(() => {})
36
- // })
37
-
38
- // test('reportGenerator() LD-JSON testing report', () =>
39
- // actions.reportGenerator(MockData.UrlSample, [MockData.LdJsonSample], MockData.reportTester))
40
-
41
- // test('reportGenerator() generates valid HTML from empty LD+JSON', () =>
42
- // actions.reportGenerator(MockData.UrlSample, [], MockData.reportTester))
43
-
44
- // test('reportGenerator() generates valid HTML from empty Url and empty LD+JSON', () =>
45
- // actions.reportGenerator('', [], MockData.reportTester))
46
- // })
package/webpack.config.js DELETED
@@ -1,240 +0,0 @@
1
- /*
2
- Copyright: © 2022 Dario Passariello <dariopassariello@gmail.com>
3
- License: CC BY-NC-ND 4.0
4
- */
5
-
6
- const path = require("path");
7
- const webpack = require("webpack");
8
- const dotenv = require('dotenv').config({path: __dirname + '/.env'});
9
- const TerserPlugin = require("terser-webpack-plugin");
10
- const CopyPlugin = require("copy-webpack-plugin");
11
-
12
- let pjson = require('./package.json');
13
-
14
- module.exports = (env, argv) => {
15
-
16
- console.log(
17
- {
18
- version: pjson.version,
19
- codeName: pjson.appCode,
20
- relaseCodeName: pjson.appCodeRelease,
21
- relaseType: pjson.appType,
22
- appName: pjson.appName,
23
- root: pjson.appFolder,
24
- folderAPI: pjson.appAPI,
25
- mode: argv.mode === 'development' ? 'development' : 'production',
26
- }
27
- );
28
-
29
- console.debug( "\n\tYour API came from: " + JSON.stringify( pjson.apiDev ) + "\n\n");
30
-
31
- return {
32
-
33
- mode: argv.mode === 'development' ? 'development' : 'production',
34
- devtool: argv.mode === 'development' ? 'eval-source-map' : 'cheap-module-source-map',
35
- stats: argv.mode === 'development' ? 'errors-warnings' : '',
36
- cache: argv.mode === 'development' ? false : true,
37
- target: 'web',
38
-
39
- devServer: {
40
-
41
- static: {
42
- directory: path.join( __dirname, 'dist'),
43
- publicPath: '/',
44
- },
45
-
46
- port: pjson.appPort,
47
- compress: argv.mode === 'development' ? false : true,
48
- magicHtml: argv.mode === 'development' ? true : false,
49
- liveReload: argv.mode === 'development' ? true : false,
50
- hot: argv.mode === 'development' ? true : false,
51
- historyApiFallback: true,
52
- open: false,
53
-
54
- headers: {
55
- 'Access-Control-Allow-Origin': '*',
56
- 'Access-Control-Allow-Credentials': true,
57
- 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
58
- 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
59
- 'Accept-Encoding': '*',
60
- 'Crossorigin': 'anonymous',
61
- 'Author': 'Dario Passariello',
62
- },
63
-
64
- webSocketServer: 'ws',
65
- client: {
66
- overlay: argv.mode === 'development' ? true : false,
67
- webSocketTransport: 'ws',
68
- //progress: true,
69
- //logging: 'info',
70
- },
71
-
72
- },
73
-
74
- entry: {
75
- index: ['./index.js']
76
- },
77
-
78
- output: {
79
- filename: '[name].js?t=' + new Date().getTime(),
80
- path: path.resolve(__dirname, 'dist'),
81
- clean: true,
82
- publicPath: '/'
83
- },
84
-
85
- performance: {
86
- hints: argv.mode === 'development' ? 'error' : false,
87
- maxEntrypointSize: 51200000,
88
- maxAssetSize: 51200000
89
- },
90
-
91
- optimization: {
92
- minimize: argv.mode === 'development' ? false : true,
93
- minimizer: [new TerserPlugin({
94
- exclude: /static/,
95
- })]
96
- },
97
-
98
- resolve: {
99
-
100
- fallback: {
101
- "fs": false
102
- },
103
-
104
- alias: {
105
- Assets: path.resolve( __dirname, 'public/assets' ),
106
- Components: path.resolve( __dirname, 'src/components' ),
107
- Shared: path.resolve( __dirname, 'src/shared' ),
108
- App: path.resolve( __dirname, 'src/app' ),
109
- Config: path.resolve( __dirname, 'src/config' ),
110
- Data: path.resolve( __dirname, 'src/data' ),
111
- Pages: path.resolve( __dirname, 'src/pages' ),
112
- Scripts: path.resolve( __dirname, 'src/scripts' ),
113
- Styles: path.resolve( __dirname, 'src/styles' ),
114
- Typings: path.resolve( __dirname, 'src/typings' ),
115
- Utils: path.resolve( __dirname, 'src/utils' ),
116
- Validators: path.resolve( __dirname, 'src/validators' ),
117
- Layout: path.resolve( __dirname, 'src/layout' ),
118
- Root: path.resolve( __dirname, 'src/' )
119
- },
120
-
121
- modules: [path.resolve('node_modules')],
122
- extensions: [".ts", ".tsx", ".js", ".less", ".css", "sass", "scss"],
123
-
124
- },
125
-
126
- module: {
127
-
128
- rules: [
129
- // we use babel-loader to load our jsx and tsx files
130
- {
131
- test: /\.(ts|tsx|js|jsx)$/,
132
- loader: require.resolve('babel-loader'),
133
- exclude: [ /node_modules/, /.OLD/ ],
134
- options: {
135
- //plugins: ['react-hot-loader/babel'],
136
- cacheDirectory: argv.mode === 'development' ? true : false,
137
- },
138
- },
139
-
140
- // plain file loader
141
- {
142
- test: /\.(txt)$/i, //
143
- loader: 'file-loader',
144
- exclude: [ /.OLD/ ]
145
- },
146
-
147
- // CSS, SCSS
148
- {
149
- test: /\.(s?(c|a)ss)(\?v=\d+\.\d+\.\d+)?$/i,
150
- use: [
151
- {
152
- loader: "style-loader"
153
- },{
154
- loader: 'css-loader',
155
- options: {
156
- importLoaders: 1,
157
- modules: false,
158
- sourceMap: false,
159
- url: false
160
- },
161
- },{
162
- loader: "sass-loader"
163
- },
164
- ],
165
- exclude: [ /.OLD/ ]
166
- },
167
-
168
- // css-loader and less-loader
169
- {
170
- test: /\.(less)(\?v=\d+\.\d+\.\d+)?$/i,
171
- use: [
172
- {
173
- loader: "style-loader"
174
- },{
175
- loader: "css-loader",
176
- options: {
177
- sourceMap: true,
178
- modules: true,
179
- url: false
180
- }
181
- },{
182
- loader: "less-loader"
183
- },
184
- ],
185
- exclude: [ /.OLD/ ]
186
- },
187
-
188
- // assets
189
- {
190
- test: /\.(a?png|jpe?g|gif|ico|bmp|webb|svg)(\?v=\d+\.\d+\.\d+)?$/i,
191
- type: 'asset/resource',
192
- exclude: [ /node_modules/, /.OLD/ ],
193
- },
194
-
195
- // fonts
196
- {
197
- test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/i,
198
- type: 'asset/resource',
199
- exclude: [ /node_modules/, /.OLD/ ],
200
- },
201
-
202
- ],
203
- },
204
-
205
- plugins: [
206
-
207
- //Environment
208
- new webpack.DefinePlugin({
209
- 'process.env.NODE_ENV': JSON.stringify( argv.mode ),
210
- 'process.env': dotenv.parsed,
211
- 'process.env.debug': argv.mode === 'development' ? true : false
212
- }),
213
-
214
- new CopyPlugin({
215
- patterns: [
216
- {
217
- from: "./public",
218
- to: "./",
219
- noErrorOnMissing: true,
220
- globOptions: {
221
- gitignore: true
222
- },
223
- },
224
- { from: "./.github", to: "./.github" },
225
- { from: "./package.json", to: "./" },
226
- { from: "./LICENSE", to: "./" },
227
- { from: "./README.md", to: "./" }
228
- ],
229
- options: {
230
- concurrency: 100,
231
- }
232
- })
233
-
234
- ]
235
-
236
- };
237
-
238
- };
239
-
240
-