dphelper 0.2.88 → 0.2.89

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 (116) hide show
  1. package/.editorconfig +13 -0
  2. package/.env +3 -0
  3. package/.eslintignore +13 -0
  4. package/.eslintrc.json +87 -0
  5. package/.eslintrc.legacy.json +91 -0
  6. package/.gitattributes +2 -0
  7. package/.hintrc +11 -0
  8. package/.jsbeautifyrc +25 -0
  9. package/.jshintrc +16 -0
  10. package/.prettierignore +2 -0
  11. package/.prettierrc.json +8 -0
  12. package/.stylelintignore +0 -0
  13. package/.stylelintrc.json +468 -0
  14. package/.vscode/launch.json +34 -0
  15. package/.vscode/settings.json +58 -0
  16. package/3party/shortcut.js +224 -0
  17. package/__mocks__/fileMock.js +3 -0
  18. package/__mocks__/styleMock.js +3 -0
  19. package/babel.config.js +30 -0
  20. package/backup.bat +43 -0
  21. package/coverage/coverage-final.json +1 -0
  22. package/coverage/lcov-report/base.css +224 -0
  23. package/coverage/lcov-report/block-navigation.js +87 -0
  24. package/coverage/lcov-report/favicon.png +0 -0
  25. package/coverage/lcov-report/index.html +101 -0
  26. package/coverage/lcov-report/prettify.css +1 -0
  27. package/coverage/lcov-report/prettify.js +2 -0
  28. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  29. package/coverage/lcov-report/sorter.js +196 -0
  30. package/coverage/lcov.info +0 -0
  31. package/data/list.json +19 -0
  32. package/dist/LICENSE.txt +209 -0
  33. package/dist/README.md +79 -0
  34. package/elements/button/component.js +0 -0
  35. package/elements/code/component.js +0 -0
  36. package/elements/costants.tsx +13 -0
  37. package/elements/fieldset/component.js +0 -0
  38. package/elements/input/checkbox/component.js +0 -0
  39. package/elements/input/date/component.js +27 -0
  40. package/elements/input/number/component.js +0 -0
  41. package/elements/input/radio/component.js +0 -0
  42. package/elements/input/search/component.js +0 -0
  43. package/elements/input/select/component.js +0 -0
  44. package/elements/input/slider/component.js +0 -0
  45. package/elements/input/switch/component.js +0 -0
  46. package/elements/tab/component.js +0 -0
  47. package/elements/table/component.js +0 -0
  48. package/elements/tags.less +0 -0
  49. package/elements/textarea/component.js +0 -0
  50. package/elements/x-foo/define.js +33 -0
  51. package/elements/x-foo/namespace.d.ts +7 -0
  52. package/index.js +12 -2
  53. package/init.js +87 -0
  54. package/jest.config.js +81 -0
  55. package/node/createTag.js +7 -0
  56. package/node/gitDeploy.js +7 -0
  57. package/node/goLive.js +7 -0
  58. package/package.json +7 -7
  59. package/{assets → public/assets}/images/banner.png +0 -0
  60. package/{assets → public/assets}/logos/logo.svg +0 -0
  61. package/{documents → public/documents}/iDB/list.html +0 -0
  62. package/{documents → public/documents}/iDB/toState.html +0 -0
  63. package/scripts/.OLD/import.js +48 -0
  64. package/scripts/.OLD/onBeforeUnLoad.js +120 -0
  65. package/scripts/.OLD/purge.js +53 -0
  66. package/scripts/.OLD/string.js +27 -0
  67. package/scripts/anchor.js +73 -0
  68. package/scripts/array.js +203 -0
  69. package/scripts/avoid.js +48 -0
  70. package/scripts/browser.js +100 -0
  71. package/scripts/color.js +121 -0
  72. package/scripts/console.js +97 -0
  73. package/scripts/console.mapped.js +160 -0
  74. package/scripts/coods.js +57 -0
  75. package/scripts/cookie.js +105 -0
  76. package/scripts/date.js +179 -0
  77. package/scripts/disable.js +91 -0
  78. package/scripts/errors.js +3 -0
  79. package/scripts/event.js +57 -0
  80. package/scripts/font.js +60 -0
  81. package/scripts/form.js +211 -0
  82. package/scripts/format.js +71 -0
  83. package/scripts/function.js +55 -0
  84. package/scripts/iDB.js +688 -0
  85. package/scripts/json.js +84 -0
  86. package/scripts/load.js +112 -0
  87. package/scripts/math.js +100 -0
  88. package/scripts/obj.js +118 -0
  89. package/scripts/path.js +101 -0
  90. package/scripts/promise.js +56 -0
  91. package/scripts/screen.js +82 -0
  92. package/scripts/scrollbar.js +293 -0
  93. package/scripts/shortcut.js +83 -0
  94. package/scripts/socket.js +184 -0
  95. package/scripts/state.js +87 -0
  96. package/scripts/storage.js +93 -0
  97. package/scripts/store.js +115 -0
  98. package/scripts/svg.js +380 -0
  99. package/scripts/text.js +116 -0
  100. package/scripts/time.js +43 -0
  101. package/scripts/timer.js +54 -0
  102. package/scripts/tool.js +73 -0
  103. package/scripts/trigger.js +57 -0
  104. package/scripts/type.js +76 -0
  105. package/scripts/ui.js +41 -0
  106. package/scripts/window.js +244 -0
  107. package/styles/console.less +95 -0
  108. package/tests/setupJest.tsx +4 -0
  109. package/typings/.OLD/cordova.d.ts +12 -0
  110. package/typings/.OLD/layerpro.d.ts +20 -0
  111. package/typings/.OLD/menupro.d.ts +20 -0
  112. package/typings/dphelper.d.ts +26 -0
  113. package/typings/image.d.ts +5 -0
  114. package/typings/styles.d.ts +23 -0
  115. package/webpack.config.js +249 -0
  116. package/index.js.LICENSE.txt +0 -31
@@ -0,0 +1,20 @@
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;
@@ -0,0 +1,20 @@
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;
@@ -0,0 +1,26 @@
1
+ // /*
2
+ // Copyright: © 2022 Dario Passariello <dariopassariello@gmail.com>
3
+ // License: CC BY-NC-ND 4.0
4
+ // */
5
+
6
+ // declare module 'dphelper';
7
+ // declare var dphelper: any;
8
+
9
+ // declare module 'jquery';
10
+ // declare var $: any;
11
+
12
+ // ////////////////////////////////////////////////////////////////
13
+
14
+ // declare global {
15
+ // interface Window {
16
+ // dphelper:any;
17
+ // }
18
+ // }
19
+
20
+ if (typeof window === 'undefined') {
21
+ global.window = {};
22
+ }
23
+
24
+ window.$ = window.jQuery = require('jquery');
25
+ window.dphelper = window.dphelper || {};
26
+ const dphelper = window.dphelper
@@ -0,0 +1,5 @@
1
+
2
+ declare module "*.svg" {
3
+ const value: any;
4
+ export default value;
5
+ }
@@ -0,0 +1,23 @@
1
+
2
+ declare module '*.less' {
3
+ const resource: { [key: string]: string };
4
+ export = resource;
5
+ }
6
+
7
+ declare module '*.scss' {
8
+ const resource: { [key: string]: string };
9
+ export = resource;
10
+ }
11
+
12
+ declare module '*.sass' {
13
+ const resource: { [key: string]: string };
14
+ export = resource;
15
+ }
16
+
17
+ declare module '*.js' {
18
+ const resource: { [key: string]: string };
19
+ export = resource;
20
+ }
21
+
22
+
23
+
@@ -0,0 +1,249 @@
1
+
2
+
3
+ const path = require("path");
4
+ const webpack = require("webpack");
5
+ const dotenv = require('dotenv').config({path: __dirname + '/.env'});
6
+ const TerserPlugin = require("terser-webpack-plugin");
7
+ const CopyPlugin = require("copy-webpack-plugin");
8
+
9
+ let pjson = require('./package.json');
10
+
11
+ module.exports = (env, argv) => {
12
+
13
+ console.log(
14
+ {
15
+ version: pjson.version,
16
+ codeName: pjson.appCode,
17
+ relaseCodeName: pjson.appCodeRelease,
18
+ relaseType: pjson.appType,
19
+ appName: pjson.appName,
20
+ root: pjson.appFolder,
21
+ folderAPI: pjson.appAPI,
22
+ mode: argv.mode === 'development' ? 'development' : 'production',
23
+ }
24
+ );
25
+
26
+ // console.debug( "\n\tDEV: http://localhost:" + JSON.stringify( pjson.appPort ) + "/");
27
+ // console.debug( "\tAPI: " + JSON.stringify( pjson.apiDev ) + "\n\n");
28
+
29
+ return {
30
+
31
+ mode: argv.mode === 'development' ? 'development' : 'production',
32
+ devtool: argv.mode === 'development' ? 'eval-source-map' : 'cheap-module-source-map',
33
+ stats: argv.mode === 'development' ? 'errors-warnings' : '',
34
+ cache: argv.mode === 'development' ? false : true,
35
+ target: 'web',
36
+
37
+ devServer: {
38
+
39
+ static: {
40
+ directory: path.join( __dirname, 'dist'),
41
+ publicPath: '/',
42
+ },
43
+
44
+ port: pjson.appPort,
45
+ compress: argv.mode === 'development' ? false : true,
46
+ magicHtml: argv.mode === 'development' ? true : false,
47
+ liveReload: argv.mode === 'development' ? true : false,
48
+ hot: argv.mode === 'development' ? true : false,
49
+ historyApiFallback: true,
50
+ open: false,
51
+
52
+ headers: {
53
+ 'Access-Control-Allow-Origin': '*',
54
+ 'Access-Control-Allow-Credentials': true,
55
+ 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
56
+ 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
57
+ 'Accept-Encoding': '*',
58
+ 'Crossorigin': 'anonymous',
59
+ 'Author': 'Dario Passariello',
60
+ },
61
+
62
+ webSocketServer: 'ws',
63
+ client: {
64
+ overlay: argv.mode === 'development' ? true : false,
65
+ webSocketTransport: 'ws',
66
+ //progress: true,
67
+ //logging: 'info',
68
+ },
69
+
70
+ },
71
+
72
+ entry: {
73
+ index: ['./index.js']
74
+ },
75
+
76
+ output: {
77
+ filename: '[name].js',
78
+ //filename: '[name].js?t=' + new Date().getTime(),
79
+ path: path.resolve(__dirname, 'dist'),
80
+ clean: true,
81
+ publicPath: '/'
82
+ },
83
+
84
+ performance: {
85
+ hints: argv.mode === 'development' ? 'error' : false,
86
+ maxEntrypointSize: 51200000,
87
+ maxAssetSize: 51200000
88
+ },
89
+
90
+ optimization: {
91
+ minimize: argv.mode === 'development' ? false : true,
92
+ minimizer: [new TerserPlugin({
93
+ exclude: /static/,
94
+ })]
95
+ },
96
+
97
+ resolve: {
98
+
99
+ fallback: {
100
+ "fs": false
101
+ },
102
+
103
+ alias: {
104
+ Assets: path.resolve( __dirname, 'public/assets' ),
105
+ Components: path.resolve( __dirname, 'src/components' ),
106
+ Shared: path.resolve( __dirname, 'src/shared' ),
107
+ App: path.resolve( __dirname, 'src/app' ),
108
+ Config: path.resolve( __dirname, 'src/config' ),
109
+ Data: path.resolve( __dirname, 'src/data' ),
110
+ Pages: path.resolve( __dirname, 'src/pages' ),
111
+ Scripts: path.resolve( __dirname, 'src/scripts' ),
112
+ Styles: path.resolve( __dirname, 'src/styles' ),
113
+ Typings: path.resolve( __dirname, 'src/typings' ),
114
+ Utils: path.resolve( __dirname, 'src/utils' ),
115
+ Validators: path.resolve( __dirname, 'src/validators' ),
116
+ Layout: path.resolve( __dirname, 'src/layout' ),
117
+ Root: path.resolve( __dirname, 'src/' )
118
+ },
119
+
120
+ modules: [path.resolve('node_modules')],
121
+ extensions: [".ts", ".tsx", ".js", ".less", ".css", "sass", "scss"],
122
+
123
+ },
124
+
125
+ module: {
126
+
127
+ rules: [
128
+ // we use babel-loader to load our jsx and tsx files
129
+ {
130
+ test: /\.(ts|tsx|js|jsx)$/,
131
+ loader: require.resolve('babel-loader'),
132
+ exclude: [ /node_modules/, /.OLD/ ],
133
+ options: {
134
+ //plugins: ['react-hot-loader/babel'],
135
+ cacheDirectory: argv.mode === 'development' ? true : false,
136
+ },
137
+ },
138
+
139
+ // plain file loader
140
+ {
141
+ test: /\.(txt|htm|html)$/i, //
142
+ loader: 'file-loader',
143
+ exclude: [ /.OLD/ ]
144
+ },
145
+
146
+ // CSS, SCSS
147
+ {
148
+ test: /\.(s?(c|a)ss)(\?v=\d+\.\d+\.\d+)?$/i,
149
+ use: [
150
+ {
151
+ loader: "style-loader"
152
+ },{
153
+ loader: 'css-loader',
154
+ options: {
155
+ importLoaders: 1,
156
+ modules: false,
157
+ sourceMap: false,
158
+ url: false
159
+ },
160
+ },{
161
+ loader: "sass-loader"
162
+ },
163
+ ],
164
+ exclude: [ /.OLD/ ]
165
+ },
166
+
167
+ // css-loader and less-loader
168
+ {
169
+ test: /\.(less)(\?v=\d+\.\d+\.\d+)?$/i,
170
+ use: [
171
+ {
172
+ loader: "style-loader"
173
+ },{
174
+ loader: "css-loader",
175
+ options: {
176
+ sourceMap: true,
177
+ modules: true,
178
+ url: false
179
+ }
180
+ },{
181
+ loader: "less-loader"
182
+ },
183
+ ],
184
+ exclude: [ /.OLD/ ]
185
+ },
186
+
187
+ // assets
188
+ {
189
+ test: /\.(a?png|jpe?g|gif|ico|bmp|webb|svg)(\?v=\d+\.\d+\.\d+)?$/i,
190
+ type: 'asset/resource',
191
+ exclude: [ /node_modules/, /.OLD/ ],
192
+ },
193
+
194
+ // fonts
195
+ {
196
+ test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/i,
197
+ type: 'asset/resource',
198
+ exclude: [ /node_modules/, /.OLD/ ],
199
+ },
200
+
201
+ ],
202
+ },
203
+
204
+ plugins: [
205
+
206
+ //Environment
207
+ new webpack.DefinePlugin({
208
+ 'process.env.NODE_ENV': JSON.stringify( argv.mode ),
209
+ 'process.env': dotenv.parsed,
210
+ 'process.env.debug': argv.mode === 'development' ? true : false
211
+ }),
212
+
213
+ new webpack.ContextReplacementPlugin(
214
+ /\/package-name\//,
215
+ (data) => {
216
+ delete data.dependencies[0].critical;
217
+ return data;
218
+ },
219
+ ),
220
+
221
+ new CopyPlugin({
222
+ patterns: [
223
+ {
224
+ from: "./public",
225
+ to: "./",
226
+ noErrorOnMissing: true,
227
+ globOptions: {
228
+ gitignore: true
229
+ },
230
+ },
231
+ { from: "./.github", to: "./.github" },
232
+ { from: "./package.json", to: "./" },
233
+ { from: "./LICENSE.txt", to: "./" },
234
+ { from: "./README.md", to: "./" },
235
+ { from: "./SECURITY.md", to: "./" },
236
+ { from: "./CHANGELOG.txt", to: "./" }
237
+ ],
238
+ options: {
239
+ concurrency: 100,
240
+ }
241
+ })
242
+
243
+ ]
244
+
245
+ };
246
+
247
+ };
248
+
249
+
@@ -1,31 +0,0 @@
1
- /*!
2
- dpHelper
3
- Copyright (c) 2021 Dario Passariello <dariopassariello@gmail.com>
4
- Licensed under the Apache-2.0, see
5
- https://dario.passariello.ca
6
- */
7
-
8
- /*!
9
- * Sizzle CSS Selector Engine v2.3.6
10
- * https://sizzlejs.com/
11
- *
12
- * Copyright JS Foundation and other contributors
13
- * Released under the MIT license
14
- * https://js.foundation/
15
- *
16
- * Date: 2021-02-16
17
- */
18
-
19
- /*!
20
- * jQuery JavaScript Library v3.6.0
21
- * https://jquery.com/
22
- *
23
- * Includes Sizzle.js
24
- * https://sizzlejs.com/
25
- *
26
- * Copyright OpenJS Foundation and other contributors
27
- * Released under the MIT license
28
- * https://jquery.org/license
29
- *
30
- * Date: 2021-03-02T17:08Z
31
- */