dphelper 0.2.89 → 0.2.93

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 (121) hide show
  1. package/{LICENSE.txt → LICENSE.md} +0 -0
  2. package/README.md +6 -0
  3. package/index.js +2 -12
  4. package/package.json +130 -136
  5. package/.editorconfig +0 -13
  6. package/.env +0 -3
  7. package/.eslintignore +0 -13
  8. package/.eslintrc.json +0 -87
  9. package/.eslintrc.legacy.json +0 -91
  10. package/.gitattributes +0 -2
  11. package/.github/FUNDING.yml +0 -12
  12. package/.github/dependabot.yml +0 -12
  13. package/.hintrc +0 -11
  14. package/.jsbeautifyrc +0 -25
  15. package/.jshintrc +0 -16
  16. package/.prettierignore +0 -2
  17. package/.prettierrc.json +0 -8
  18. package/.stylelintignore +0 -0
  19. package/.stylelintrc.json +0 -468
  20. package/.vscode/launch.json +0 -34
  21. package/.vscode/settings.json +0 -58
  22. package/3party/shortcut.js +0 -224
  23. package/CHANGELOG.txt +0 -4
  24. package/SECURITY.md +0 -3
  25. package/__mocks__/fileMock.js +0 -3
  26. package/__mocks__/styleMock.js +0 -3
  27. package/babel.config.js +0 -30
  28. package/backup.bat +0 -43
  29. package/coverage/coverage-final.json +0 -1
  30. package/coverage/lcov-report/base.css +0 -224
  31. package/coverage/lcov-report/block-navigation.js +0 -87
  32. package/coverage/lcov-report/favicon.png +0 -0
  33. package/coverage/lcov-report/index.html +0 -101
  34. package/coverage/lcov-report/prettify.css +0 -1
  35. package/coverage/lcov-report/prettify.js +0 -2
  36. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  37. package/coverage/lcov-report/sorter.js +0 -196
  38. package/coverage/lcov.info +0 -0
  39. package/data/list.json +0 -19
  40. package/dist/LICENSE.txt +0 -209
  41. package/dist/README.md +0 -79
  42. package/elements/button/component.js +0 -0
  43. package/elements/code/component.js +0 -0
  44. package/elements/costants.tsx +0 -13
  45. package/elements/fieldset/component.js +0 -0
  46. package/elements/input/checkbox/component.js +0 -0
  47. package/elements/input/date/component.js +0 -27
  48. package/elements/input/number/component.js +0 -0
  49. package/elements/input/radio/component.js +0 -0
  50. package/elements/input/search/component.js +0 -0
  51. package/elements/input/select/component.js +0 -0
  52. package/elements/input/slider/component.js +0 -0
  53. package/elements/input/switch/component.js +0 -0
  54. package/elements/tab/component.js +0 -0
  55. package/elements/table/component.js +0 -0
  56. package/elements/tags.less +0 -0
  57. package/elements/textarea/component.js +0 -0
  58. package/elements/x-foo/define.js +0 -33
  59. package/elements/x-foo/namespace.d.ts +0 -7
  60. package/init.js +0 -87
  61. package/jest.config.js +0 -81
  62. package/node/createTag.js +0 -7
  63. package/node/gitDeploy.js +0 -7
  64. package/node/goLive.js +0 -7
  65. package/public/assets/images/banner.png +0 -0
  66. package/public/assets/logos/logo.svg +0 -64
  67. package/public/documents/iDB/list.html +0 -11
  68. package/public/documents/iDB/toState.html +0 -11
  69. package/scripts/.OLD/import.js +0 -48
  70. package/scripts/.OLD/onBeforeUnLoad.js +0 -120
  71. package/scripts/.OLD/purge.js +0 -53
  72. package/scripts/.OLD/string.js +0 -27
  73. package/scripts/anchor.js +0 -73
  74. package/scripts/array.js +0 -203
  75. package/scripts/avoid.js +0 -48
  76. package/scripts/browser.js +0 -100
  77. package/scripts/color.js +0 -121
  78. package/scripts/console.js +0 -97
  79. package/scripts/console.mapped.js +0 -160
  80. package/scripts/coods.js +0 -57
  81. package/scripts/cookie.js +0 -105
  82. package/scripts/date.js +0 -179
  83. package/scripts/disable.js +0 -91
  84. package/scripts/errors.js +0 -3
  85. package/scripts/event.js +0 -57
  86. package/scripts/font.js +0 -60
  87. package/scripts/form.js +0 -211
  88. package/scripts/format.js +0 -71
  89. package/scripts/function.js +0 -55
  90. package/scripts/iDB.js +0 -688
  91. package/scripts/json.js +0 -84
  92. package/scripts/load.js +0 -112
  93. package/scripts/math.js +0 -100
  94. package/scripts/obj.js +0 -118
  95. package/scripts/path.js +0 -101
  96. package/scripts/promise.js +0 -56
  97. package/scripts/screen.js +0 -82
  98. package/scripts/scrollbar.js +0 -293
  99. package/scripts/shortcut.js +0 -83
  100. package/scripts/socket.js +0 -184
  101. package/scripts/state.js +0 -87
  102. package/scripts/storage.js +0 -93
  103. package/scripts/store.js +0 -115
  104. package/scripts/svg.js +0 -380
  105. package/scripts/text.js +0 -116
  106. package/scripts/time.js +0 -43
  107. package/scripts/timer.js +0 -54
  108. package/scripts/tool.js +0 -73
  109. package/scripts/trigger.js +0 -57
  110. package/scripts/type.js +0 -76
  111. package/scripts/ui.js +0 -41
  112. package/scripts/window.js +0 -244
  113. package/styles/console.less +0 -95
  114. package/tests/setupJest.tsx +0 -4
  115. package/typings/.OLD/cordova.d.ts +0 -12
  116. package/typings/.OLD/layerpro.d.ts +0 -20
  117. package/typings/.OLD/menupro.d.ts +0 -20
  118. package/typings/dphelper.d.ts +0 -26
  119. package/typings/image.d.ts +0 -5
  120. package/typings/styles.d.ts +0 -23
  121. package/webpack.config.js +0 -249
@@ -1,13 +0,0 @@
1
-
2
-
3
- const generalConsts = ( props ) => {
4
-
5
- const general = {
6
- general: ""
7
- }
8
-
9
- return general
10
-
11
- }
12
-
13
- export default generalConsts
File without changes
File without changes
@@ -1,27 +0,0 @@
1
-
2
- import React from "react"
3
- import generalConsts from "../constants"
4
-
5
- import styles from "../tags.less"
6
-
7
- export const InpuDate = ( props ) => {
8
-
9
- const {
10
- generalConsts,
11
- type = props.type === "datetime-local" ? "datetime-local" : "date" || "date"
12
- } = props
13
-
14
- return (
15
-
16
- <label>
17
- <span>{ label }</span>
18
- <input type={ type } />
19
- </label>
20
-
21
- )
22
-
23
-
24
-
25
-
26
-
27
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,33 +0,0 @@
1
- require("./namespace.d.ts");
2
-
3
- class dphFoo extends HTMLElement {
4
- constructor() {
5
- super();
6
- }
7
-
8
- connectedCallback() {
9
- console.log('hello');
10
- this.style.color = "red";
11
- }
12
-
13
- disconnectedCallback() {
14
- console.log('bye');
15
- window.addEventListener('beforeunload', function (e) {
16
- e.preventDefault();
17
- e.returnValue = '';
18
- });
19
- }
20
-
21
- // connectedCallback() {}
22
- //
23
- // attributeChangedCallback(attrName, oldVal, newVal) {}
24
-
25
- }
26
-
27
- window.customElements.define( 'x-foo', dphFoo );
28
- customElements.whenDefined( 'x-foo' ).then( () => {
29
- // console.debug( '%cx-foo: %c' + 'defined' ,"color:gray","" );
30
- } );
31
-
32
- //console.log( document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "div") );
33
-
@@ -1,7 +0,0 @@
1
-
2
- // declare namespace JSX {
3
- // export interface IntrinsicElements {
4
- // 'x-foo': any;
5
- // }
6
- // }
7
-
package/init.js DELETED
@@ -1,87 +0,0 @@
1
-
2
- ( () => {
3
-
4
- ///////////////////////////////////////////////////////////////////////////////
5
- // CUSTOM ELEMENTS
6
-
7
- require("./elements/x-foo/define.js");
8
-
9
- ///////////////////////////////////////////////////////////////////////////////
10
- // DPH DECLARATIONS
11
-
12
- require( __dirname + '/typings/dphelper.d.ts' );
13
-
14
- ///////////////////////////////////////////////////////////////////////////////
15
- // CONFIG
16
-
17
- const pjson = require('./package.json');
18
- var e = e || event;
19
-
20
- ///////////////////////////////////////////////////////////////////////////////
21
- // CREATE FULL LIST FOR DPHELPER MANAGER
22
-
23
- dphelper._list = require('./data/list.json');
24
- dphelper._list.scripts = [];
25
- dphelper._list.version = pjson.version;
26
-
27
- ///////////////////////////////////////////////////////////////////////////////
28
- // CACHE
29
- const cache = {};
30
-
31
- ///////////////////////////////////////////////////////////////////////////////
32
- // API
33
-
34
- dphelper.api = {};
35
-
36
- ///////////////////////////////////////////////////////////////////////////////
37
- // INSTALL ON BODY
38
-
39
- const $$ = document.querySelector('html')
40
-
41
- if( !$( $$ ) ){
42
-
43
- console.error('You need the primary node tag on your app')
44
-
45
- }else{
46
-
47
- $$.dphelper = {
48
- test: ()=> console.log('test')
49
- }
50
-
51
- // setTimeout( async ()=> {
52
- // console.log( $( $$ ) )
53
- // $$.dphelper.test()
54
- // },2000)
55
-
56
- }
57
-
58
- ///////////////////////////////////////////////////////////////////////////////
59
- // LOAD ALL SCRIPT AUTOMATICALLY
60
-
61
- const importAll = ( cntx ) => {
62
- cntx.keys().forEach(
63
- ( key ) => (
64
- cache[ key ] = cntx( key )
65
- )
66
- );
67
- };
68
- var cntx = require.context( __dirname + '/scripts/', false , /\.js$/ );
69
- importAll( cntx );
70
-
71
- ///////////////////////////////////////////////////////////////////////////////
72
- // FIRST MESSAGE
73
-
74
- console.groupCollapsed( `%c${pjson.name} v${pjson.version}%c`,"color:orange","" );
75
- console.debug( `%c${pjson.name} v${pjson.version}%c by Dario Passariello started`,"color:orange","" );
76
- console.debug( `%cType ${pjson.name} in this console to see it`, "color:gray","" );
77
- console.debug( "%cFor help visit: " + pjson.repository.help, "color:gray","" );
78
- console.debug( 'name: %c' + pjson.name,"color:orange","" );
79
- console.debug( 'version: %c' + pjson.version,"color:orange","" );
80
- console.debug( 'description: %c' + pjson.description,"color:orange","" );
81
- console.debug( 'license: %c' + pjson.license,"color:orange","" );
82
- console.debug( 'repository: %c' + pjson.repository.url,"color:orange","" );
83
- console.debug( 'author: %c' + pjson.author.name,"color:orange","" );
84
- console.debug( 'email: %c' + pjson.author.email,"color:orange","" );
85
- console.groupEnd();
86
-
87
- })();
package/jest.config.js DELETED
@@ -1,81 +0,0 @@
1
- module.exports = {
2
-
3
- verbose: true,
4
-
5
- testEnvironmentOptions: { url: "http://localhost/" },
6
-
7
- automock: false,
8
-
9
- collectCoverage: true,
10
-
11
- "transform": {
12
- "\\.tsx$": "<rootDir>/node_modules/babel-jest"
13
- },
14
-
15
- setupFilesAfterEnv: [
16
- "./tests/setupJest.tsx"
17
- ],
18
-
19
- moduleNameMapper: {
20
- "\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|html)$": "<rootDir>/__mocks__/fileMock.js",
21
- "\\.(css|scss|svg)$": "identity-obj-proxy"
22
- },
23
-
24
- moduleFileExtensions: [
25
- "js",
26
- "jsx",
27
- "ts",
28
- "tsx"
29
- ],
30
-
31
- transformIgnorePatterns: [
32
- "/node_modules/",
33
- "/node_modules/(?!(nrg-common)/)"
34
- ],
35
-
36
- coveragePathIgnorePatterns: [
37
- "/node_modules/",
38
- "/node_modules/(?!(nrg-common)/)"
39
- ],
40
-
41
- modulePathIgnorePatterns: [
42
- "/node_modules/",
43
- "/node_modules/(?!(nrg-common)/)"
44
- ],
45
-
46
- unmockedModulePathPatterns: [
47
- "./node_modules/react/",
48
- "./node_modules/react-dom/"
49
- ],
50
-
51
- coverageReporters: [
52
- "json",
53
- "lcov",
54
- "text"
55
- ],
56
-
57
- snapshotSerializers: [
58
- "enzyme-to-json/serializer"
59
- ],
60
-
61
- // transformIgnorePatterns: [
62
- // "node_modules/enzyme"
63
- // ],
64
-
65
- testPathIgnorePatterns: [
66
- "/node_modules/",
67
- ],
68
-
69
- unmockedModulePathPatterns: [
70
- "react",
71
- "react-dom",
72
- "react-native",
73
- "react-addons-test-utils",
74
- "promise",
75
- "source-map",
76
- "enzyme"
77
- ]
78
-
79
- };
80
-
81
-
package/node/createTag.js DELETED
@@ -1,7 +0,0 @@
1
- const moment = require('moment');
2
- const execSync = require('child_process').execSync;
3
- const dateTime = moment().format('YYYYMMDDHHmmss');
4
- const pjson = require('../package.json');
5
-
6
- //https://stackoverflow.com/questions/55021363/how-to-pass-current-datetime-in-npm-script-for-git-commit-message-in-windows-and
7
- execSync(`git tag \"v${pjson.version}\" -am \"Modify content\" && git push --tags`, { stdio: [0, 1, 2]} );
package/node/gitDeploy.js DELETED
@@ -1,7 +0,0 @@
1
- const moment = require('moment');
2
- const execSync = require('child_process').execSync;
3
- const dateTime = moment().format('YYYYMMDDHHmmss');
4
- const pjson = require('../package.json');
5
-
6
- //https://stackoverflow.com/questions/55021363/how-to-pass-current-datetime-in-npm-script-for-git-commit-message-in-windows-and
7
- execSync(`cd .. && git add . && git commit -m \"ver. ${pjson.version} / ${dateTime}\" && git pull && git push --all`, { stdio: [0, 1, 2]} );
package/node/goLive.js DELETED
@@ -1,7 +0,0 @@
1
- const moment = require('moment');
2
- const execSync = require('child_process').execSync;
3
- const dateTime = moment().format('YYYYMMDDHHmmss');
4
- const pjson = require('../package.json');
5
-
6
- //https://stackoverflow.com/questions/55021363/how-to-pass-current-datetime-in-npm-script-for-git-commit-message-in-windows-and
7
- execSync(`cli-confirm \"Do you want go live?\" && npm version patch --force && cd.. && webpack --progress --color --mode production --config webpack.config.js && cd dist && npm publish`, { stdio: [0, 1, 2]} );
Binary file
@@ -1,64 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
-
4
- <svg
5
- width="93.683228"
6
- height="119.23308"
7
- viewBox="0 0 99.148077 126.18834"
8
- version="1.1"
9
- id="svg5"
10
- inkscape:export-filename="C:\Users\dario\Desktop\dphelper_manager_48.png"
11
- inkscape:export-xdpi="9.000001"
12
- inkscape:export-ydpi="9.000001"
13
- inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
14
- sodipodi:docname="logo.svg"
15
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
16
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
17
- xmlns="http://www.w3.org/2000/svg"
18
- xmlns:svg="http://www.w3.org/2000/svg">
19
- <sodipodi:namedview
20
- id="namedview7"
21
- pagecolor="#ffffff"
22
- bordercolor="#666666"
23
- borderopacity="1.0"
24
- inkscape:pageshadow="2"
25
- inkscape:pageopacity="0.0"
26
- inkscape:pagecheckerboard="0"
27
- inkscape:document-units="mm"
28
- showgrid="false"
29
- inkscape:zoom="0.7500982"
30
- inkscape:cx="556.59379"
31
- inkscape:cy="359.95287"
32
- inkscape:window-width="1920"
33
- inkscape:window-height="1027"
34
- inkscape:window-x="-8"
35
- inkscape:window-y="-8"
36
- inkscape:window-maximized="1"
37
- inkscape:current-layer="layer1"
38
- scale-x="4"
39
- units="px" />
40
- <defs
41
- id="defs2">
42
- <pattern
43
- id="WMFhbasepattern"
44
- patternUnits="userSpaceOnUse"
45
- width="6"
46
- height="6"
47
- x="0"
48
- y="0" />
49
- </defs>
50
- <g
51
- inkscape:label="Layer 1"
52
- inkscape:groupmode="layer"
53
- id="layer1"
54
- transform="translate(-89.565622,-102.08653)">
55
- <path
56
- style="fill:#0093dd;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.37544"
57
- d="m 166.83728,102.08653 -0.85247,4.03896 -0.60497,3.73603 -0.39875,3.46197 -0.19249,3.21673 -0.013,2.97152 0.17875,2.76958 0.32997,2.55319 0.495,2.36567 0.61873,2.22142 0.74246,2.06276 0.86623,1.93293 0.94873,1.81752 1.04496,1.73099 1.11372,1.65884 1.18245,1.60117 1.22373,1.55789 2.51617,3.07247 2.55742,3.1302 1.26496,1.63 1.22372,1.70213 1.1687,1.78869 1.12747,1.90408 1.04498,2.00504 0.96245,2.16374 0.86623,2.30797 0.75623,2.4955 0.64622,2.68301 0.49499,2.8994 0.34374,3.11576 0.19249,3.37541 0.0276,3.44755 -0.10994,3.30327 -0.23374,3.1879 -0.3575,3.04363 -0.49498,2.92826 -0.60498,2.79841 -0.72874,2.6686 -0.83871,2.55318 -0.94874,2.4378 -1.05871,2.30798 -1.1687,2.20701 -1.25122,2.07718 -1.37495,1.96176 -1.4437,1.84639 -1.55372,1.7454 -1.63621,1.61559 -1.71869,1.51461 -1.78745,1.41363 -1.88368,1.29823 -1.95243,1.19727 -2.00745,1.09629 -2.08993,0.99531 -2.15869,0.87991 -2.19992,0.79337 -2.26868,0.69238 -2.32368,0.59143 -2.37868,0.50486 -2.40618,0.4039 -2.46116,0.31735 -2.50244,0.21636 -2.54366,0.12976 -2.57118,0.0432 -2.57116,-0.0721 -2.52993,-0.21637 -2.50241,-0.36062 -2.46119,-0.49046 -2.41992,-0.62025 -2.37867,-0.76453 -2.32368,-0.87992 -2.26868,-1.00973 -2.22743,-1.12513 -2.15869,-1.24055 -2.08993,-1.34151 -2.03495,-1.47133 -1.96618,-1.55788 -1.89744,-1.65885 -1.81494,-1.77427 -1.74621,-1.84636 -1.64995,-1.94737 -1.58119,-2.0339 -1.484949,-2.12044 -1.402457,-2.207 -1.30622,-2.26471 -1.209952,-2.35124 -1.113716,-2.40896 -1.003724,-2.48106 -0.893717,-2.53878 -0.783726,-2.61089 -0.687489,-2.65416 -0.549972,-2.71188 -0.453736,-2.74072 -0.316251,-2.79842 -0.192489,-2.84169 -0.06869,-2.88496 0.06869,-2.91383 0.192489,-2.95708 0.329989,-2.98596 0.467491,-3.01477 0.591237,-3.0148 0.742477,-3.04363 0.879962,-3.02922 1.031219,-3.01479 1.168719,-3.00038 1.319959,-2.97151 1.45746,-2.92824 1.622439,-2.88498 1.773697,-2.82726 1.92495,-2.75515 2.08993,-2.69744 2.24119,-2.6109 2.40616,-2.50992 2.57118,-2.42336 2.73617,-2.30798 2.90115,-2.207 3.07991,-2.06275 3.2449,-1.93294 3.42364,-1.8031 3.6024,-1.64443 3.78112,-1.47133 3.95988,-1.31267 4.13863,-1.13955 4.33111,-0.93762 4.50985,-0.76452 4.70236,-0.54814 4.89486,-0.33177 z"
58
- id="path30" />
59
- <path
60
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.37544"
61
- d="m 136.91822,132.58065 0.30249,4.09665 0.48123,3.76489 0.64623,3.44753 0.81123,3.14461 0.93497,2.87054 1.07246,2.62532 1.18246,2.36568 1.29247,2.1493 1.3887,1.94735 1.47122,1.75984 1.5262,1.58673 1.59494,1.44249 1.6362,1.29823 1.6637,1.19725 1.6912,1.09629 1.70495,1.00975 1.67744,0.96645 1.67745,0.90877 1.64996,0.89434 1.60869,0.87991 1.53995,0.89435 1.4987,0.92318 1.40247,0.98089 1.31994,1.03859 1.20997,1.12515 1.11373,1.22611 0.9762,1.34151 0.83873,1.48575 0.68749,1.64442 0.52248,1.81755 0.35748,2.01946 0.165,2.22143 0.013,2.29355 -0.0687,2.20701 -0.15119,2.10602 -0.24747,2.0339 -0.33001,1.94735 -0.39873,1.87524 -0.48123,1.77425 -0.56374,1.70212 -0.63247,1.61559 -0.70123,1.54345 -0.78373,1.47135 -0.83873,1.38478 -0.90747,1.29823 -0.96246,1.24053 -1.03122,1.15399 -1.08623,1.08187 -1.15495,1.00974 -1.19622,0.93761 -1.25121,0.86549 -1.29247,0.8078 -1.34745,0.72123 -1.3887,0.66355 -1.42997,0.59142 -1.4712,0.51929 -1.51245,0.4616 -1.55371,0.40388 -1.58119,0.33178 -1.6087,0.27407 -1.63621,0.20194 -1.66369,0.14421 -1.6912,0.0866 -1.70495,0.0289 -1.71869,-0.0432 -1.6912,-0.14421 -1.6637,-0.24523 -1.64995,-0.31734 -1.6087,-0.41832 -1.58121,-0.50488 -1.53994,-0.59141 -1.5262,-0.67797 -1.47122,-0.73566 -1.4437,-0.83665 -1.3887,-0.89434 -1.36121,-0.98089 -1.30621,-1.03859 -1.26497,-1.11071 -1.20995,-1.16841 -1.15496,-1.24053 -1.11372,-1.29823 -1.04497,-1.35595 -0.98997,-1.41363 -0.93497,-1.45691 -0.86622,-1.5146 -0.81124,-1.55789 -0.72872,-1.61559 -0.67373,-1.64442 -0.60498,-1.70213 -0.52248,-1.73099 -0.45373,-1.77424 -0.37124,-1.80311 -0.28874,-1.83196 -0.22,-1.86081 -0.12375,-1.88964 -0.0413,-1.91851 0.0275,-1.93292 0.0825,-1.93293 0.15119,-1.94736 0.20625,-1.94734 0.26124,-1.94737 0.31624,-1.93292 0.37124,-1.94735 0.43998,-1.93294 0.48125,-1.9185 0.53623,-1.91851 0.60497,-1.88964 0.65998,-1.88965 0.70123,-1.8608 0.76997,-1.83197 0.81124,-1.81752 0.87996,-1.78869 0.92123,-1.75982 0.98997,-1.74541 1.03122,-1.68771 1.08622,-1.67328 1.14121,-1.61559 1.18246,-1.58672 1.25121,-1.54345 1.29247,-1.50019 1.34745,-1.45691 1.40246,-1.39921 1.44371,-1.34151 1.4987,-1.29823 1.5537,-1.24054 1.59495,-1.16842 1.64995,-1.12513 z"
62
- id="path32" />
63
- </g>
64
- </svg>
@@ -1,11 +0,0 @@
1
- <h4>list</h4>
2
- <p>
3
- List all database
4
- </p>
5
-
6
- Type <b>'dphelper.iDB.list()'</b> in console to see all DBs in a Table
7
-
8
- <br/>
9
- <br/>
10
-
11
- <button onclick='t()'>Test in console</button>
@@ -1,11 +0,0 @@
1
- <h4>toState</h4>
2
- <p>
3
- Save all DB and Tables to Global State
4
- </p>
5
-
6
- <ul>
7
- <li>You can use (as example): 'dphelper.iDB.toState( 'test', dphelper.iDB.get( 'test', 'test', 1 ) )'</li>
8
- <li>or: 'dphelper.iDB.toState()' to load all indexedDB into dphelper.databases global store.</li>
9
- </ul>
10
-
11
- Please type 'dphelper.databases' in console to see all DBs
@@ -1,48 +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" : "Import",
11
- "description" : "Import files by type from folder",
12
- "version" : "0.0.1",
13
- "command" : "cormat",
14
- // "subCommand" : [
15
- // {
16
- // "name":"all",
17
- // "description":"Import all file by type from folder"
18
- // }
19
- // ],
20
- "example" : "dphelper.import.all( __dirname + '/scripts/', false , /\.js$/ )",
21
- "author" : "Dario Passariello",
22
- "active" : true
23
- };
24
-
25
- dphelper._list.scripts.push( description );
26
-
27
- /***********************************************************************/
28
-
29
- dphelper.import = {
30
-
31
- // all: ( path ='' , mode = false , extension ='/\.js$/' ) => {
32
-
33
- // // example: dphelper.import.all( __dirname + '/scripts/', false , /\.js$/ )
34
-
35
- // const importAll = ( cntx ) => {
36
- // cntx.keys().forEach(
37
- // ( key ) => (
38
- // cache[ key ] = cntx( key )
39
- // )
40
- // );
41
- // };
42
-
43
- // var cntx = require.context( path , mode , extension );
44
- // importAll( cntx );
45
-
46
- // }
47
-
48
- }
@@ -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
- };