npm-pkg-hook 1.3.7 → 1.3.9

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 (95) hide show
  1. package/.eslintrc.js +38 -38
  2. package/.eslintrc.json +127 -127
  3. package/.github/pull_request_template.md +17 -17
  4. package/.github/workflows/pepeline.yaml +29 -29
  5. package/package.json +46 -46
  6. package/script.txt +6 -6
  7. package/src/config/client/index.js +1 -1
  8. package/src/hooks/getCategoriesWithProduct/helpers/index.js +7 -7
  9. package/src/hooks/getCategoriesWithProduct/index.js +62 -62
  10. package/src/hooks/getSession/index.js +18 -18
  11. package/src/hooks/useAnimationFrame/index.js +45 -45
  12. package/src/hooks/useAsideCart/index.js +155 -155
  13. package/src/hooks/useAsideCart/queries.js +10 -10
  14. package/src/hooks/useCart/index.js +2 -2
  15. package/src/hooks/useCart/queries.js +164 -164
  16. package/src/hooks/useCart/useCart/helpers/index.js +75 -75
  17. package/src/hooks/useCart/useCart/index.js +410 -410
  18. package/src/hooks/useCart/useGetCart/index.js +31 -31
  19. package/src/hooks/useCatWithProductClient/index.js +56 -56
  20. package/src/hooks/useCatWithProductClient/queries.js +55 -55
  21. package/src/hooks/useCategoriesProduct/index.js +12 -12
  22. package/src/hooks/useCategoriesProduct/queries.js +16 -16
  23. package/src/hooks/useCategoryInStore/queries.js +78 -78
  24. package/src/hooks/useChartData/useChartData/index.js +199 -199
  25. package/src/hooks/useChartData/useChartDataAllOrders/index.js +94 -94
  26. package/src/hooks/useCheckbox/index.js +115 -115
  27. package/src/hooks/useCreateProduct/helpers/manageCacheDataCatProduct/index.js +52 -0
  28. package/src/hooks/useCreateProduct/index.js +8 -3
  29. package/src/hooks/useDeleteSubProductOptional/index.js +30 -30
  30. package/src/hooks/useDeleteSubProductOptional/queries.js +10 -10
  31. package/src/hooks/useDessert/helpers/index.js +51 -51
  32. package/src/hooks/useDevices/index.js +35 -35
  33. package/src/hooks/useDevices/queries.js +19 -19
  34. package/src/hooks/useDropzone/index.js +94 -94
  35. package/src/hooks/useDynamicAuth/index.js +13 -13
  36. package/src/hooks/useDynamicAuth/queries.js +24 -24
  37. package/src/hooks/useEditSubProductOptional/queries.js +10 -10
  38. package/src/hooks/useEvent/index.js +33 -33
  39. package/src/hooks/useFavoriteStores/index.js +19 -19
  40. package/src/hooks/useFavoriteStores/queries.js +47 -47
  41. package/src/hooks/useFetchJson/index.js +25 -25
  42. package/src/hooks/useFingerprintjs/index.js +172 -172
  43. package/src/hooks/useFullScreenMode/index.js +65 -65
  44. package/src/hooks/useGenerateNumberArray/index.js +17 -17
  45. package/src/hooks/useGetExtProductFoodsSubOptionalAll/index.js +14 -14
  46. package/src/hooks/useGetFoodRecomended/index.js +32 -33
  47. package/src/hooks/useGetFoodRecomended/queries.js +47 -47
  48. package/src/hooks/useGetMinPrice/index.js +12 -12
  49. package/src/hooks/useGetMinPrice/queries.js +7 -7
  50. package/src/hooks/useGetOneStoreRating/index.js +40 -40
  51. package/src/hooks/useGetOneStoreRating/queries.js +18 -18
  52. package/src/hooks/useGoogleLogin/index.js +160 -160
  53. package/src/hooks/useGoogleLogin/loadScript.js +15 -15
  54. package/src/hooks/useGoogleLogin/removeScript.js +7 -7
  55. package/src/hooks/useHover/index.js +29 -29
  56. package/src/hooks/useImagesStore/index.js +5 -4
  57. package/src/hooks/useInnerHtml/index.js +39 -39
  58. package/src/hooks/useKeypress/index.js +28 -28
  59. package/src/hooks/useLocationNavigate/index.js +54 -54
  60. package/src/hooks/useLogout/index.js +29 -21
  61. package/src/hooks/useManageQueryParams/index.js +37 -36
  62. package/src/hooks/useMobile/index.js +39 -39
  63. package/src/hooks/useOrderClient/index.js +5 -5
  64. package/src/hooks/useProviders/index.js +3 -3
  65. package/src/hooks/useProviders/queries.js +31 -31
  66. package/src/hooks/useProviders/useProvidersCreateStore/index.js +12 -12
  67. package/src/hooks/useProviders/useProvidersDataStore/index.js +24 -24
  68. package/src/hooks/useProvidersStore/index.js +24 -24
  69. package/src/hooks/useProvidersStore/queries.js +31 -31
  70. package/src/hooks/useRatingArrayData/index.js +54 -54
  71. package/src/hooks/useRatingArrayData/queries.js +19 -19
  72. package/src/hooks/useRemoveExtraProductFoodsOptional/index.js +23 -23
  73. package/src/hooks/useRemoveExtraProductFoodsOptional/queries.js +48 -48
  74. package/src/hooks/useRestaurant/index.js +19 -19
  75. package/src/hooks/useRestaurant/queries.js +80 -80
  76. package/src/hooks/useSales/useGetAllSales/index.js +25 -25
  77. package/src/hooks/useSchedule/index.js +72 -72
  78. package/src/hooks/useSchedule/index.jsx +22 -22
  79. package/src/hooks/useSchedule/queries.js +43 -43
  80. package/src/hooks/useScheduleData/index.js +123 -123
  81. package/src/hooks/useScroll/index.js +56 -56
  82. package/src/hooks/useScrollRotate/index.js +16 -16
  83. package/src/hooks/useStatusOpenStore/helpers/index.js +101 -101
  84. package/src/hooks/useStatusOpenStore/index.js +172 -172
  85. package/src/hooks/useStatusOrdersClient/queries.js +80 -80
  86. package/src/hooks/useStore/queries.js +163 -163
  87. package/src/hooks/useStoreCalendar/index.js +5 -5
  88. package/src/hooks/useStoreContacts/queries.js +1 -1
  89. package/src/hooks/useTimeAgo/useTimeAgo.js +39 -39
  90. package/src/hooks/useUpdateExtProductFoodsSubOptional/index.js +38 -38
  91. package/src/hooks/useWindowSize/index.js +38 -38
  92. package/src/mock/dessert/index.js +16 -16
  93. package/src/mock/index.js +1 -1
  94. package/.vscode/extensions.json +0 -6
  95. package/.vscode/settings.json +0 -8
package/.eslintrc.js CHANGED
@@ -1,38 +1,38 @@
1
- module.exports = {
2
- settings: {
3
- react: {
4
- version: 'detect'
5
- }
6
- },
7
- env: {
8
- browser: true,
9
- es2021: true,
10
- node: true
11
- },
12
- extends: [
13
- 'standard',
14
- 'plugin:react/recommended'
15
- ],
16
- overrides: [
17
- {
18
- env: {
19
- node: true
20
- },
21
- files: [
22
- '.eslintrc.{js,cjs}'
23
- ],
24
- parserOptions: {
25
- sourceType: 'script'
26
- }
27
- }
28
- ],
29
- parserOptions: {
30
- ecmaVersion: 'latest',
31
- sourceType: 'module'
32
- },
33
- plugins: [
34
- 'react'
35
- ],
36
- rules: {
37
- }
38
- }
1
+ module.exports = {
2
+ settings: {
3
+ react: {
4
+ version: 'detect'
5
+ }
6
+ },
7
+ env: {
8
+ browser: true,
9
+ es2021: true,
10
+ node: true
11
+ },
12
+ extends: [
13
+ 'standard',
14
+ 'plugin:react/recommended'
15
+ ],
16
+ overrides: [
17
+ {
18
+ env: {
19
+ node: true
20
+ },
21
+ files: [
22
+ '.eslintrc.{js,cjs}'
23
+ ],
24
+ parserOptions: {
25
+ sourceType: 'script'
26
+ }
27
+ }
28
+ ],
29
+ parserOptions: {
30
+ ecmaVersion: 'latest',
31
+ sourceType: 'module'
32
+ },
33
+ plugins: [
34
+ 'react'
35
+ ],
36
+ rules: {
37
+ }
38
+ }
package/.eslintrc.json CHANGED
@@ -1,127 +1,127 @@
1
- {
2
- "settings": {
3
- "react": {
4
- "version": "detect"
5
- }
6
- },
7
- "env": {
8
- "browser": true,
9
- "es2021": true,
10
- "node": true
11
- },
12
- "extends": "eslint:recommended",
13
- "parserOptions": {
14
- "ecmaVersion": "latest",
15
- "sourceType": "module"
16
- },
17
- "rules": {
18
- "import/no-anonymous-default-export": ["error", {
19
- "allowArray": false,
20
- "allowArrowFunction": false,
21
- "allowAnonymousClass": false,
22
- "allowAnonymousFunction": false,
23
- "allowCallExpression": true, // The true value here is for backward compatibility
24
- "allowLiteral": false,
25
- "allowObject": true // anonymous-default-export
26
- }],
27
- // react hooks validations
28
- "react-hooks/exhaustive-deps": "warn",
29
- "react-hooks/rules-of-hooks": "error",
30
- // allow jsx syntax in js files (for next.js project)
31
- "react/jsx-filename-extension": [
32
- 1,
33
- {
34
- "extensions": [
35
- ".js",
36
- ".jsx",
37
- ".ts",
38
- ".tsx"
39
- ]
40
- }
41
- ],
42
- "quotes": [
43
- 2,
44
- "single",
45
- {
46
- "avoidEscape": true,
47
- "allowTemplateLiterals": true
48
- }
49
- ],
50
- "consistent-return": 2,
51
- "indent": [
52
- 2,
53
- 2,
54
- {
55
- "SwitchCase": 1
56
- }
57
- ],
58
- "no-else-return": 1,
59
- "semi": [
60
- 1,
61
- "never"
62
- ],
63
- "space-unary-ops": 2,
64
- "comma-dangle": [
65
- "error",
66
- {
67
- "arrays": "never",
68
- "objects": "never",
69
- "imports": "never",
70
- "exports": "never",
71
- "functions": "never"
72
- }
73
- ],
74
- "one-var": [
75
- 2,
76
- "never"
77
- ],
78
- "no-var": "error",
79
- "arrow-body-style": [
80
- "error",
81
- "always"
82
- ],
83
- "no-console": "error",
84
- "no-multi-spaces": [
85
- "error",
86
- {
87
- "exceptions": {
88
- "BinaryExpression": true
89
- }
90
- }
91
- ],
92
- "no-multiple-empty-lines": [
93
- "error",
94
- {
95
- "max": 2,
96
- "maxBOF": 2
97
- }
98
- ],
99
- "jsx-quotes": [
100
- "error",
101
- "prefer-single"
102
- ],
103
- "react/jsx-sort-props": [
104
- "error",
105
- {
106
- "noSortAlphabetically": false
107
- }
108
- ],
109
- "react/jsx-first-prop-new-line": [
110
- "error",
111
- "multiline"
112
- ],
113
- "react/jsx-max-props-per-line": [
114
- "error",
115
- {
116
- "maximum": {
117
- "single": 2,
118
- "multi": 1
119
- }
120
- }
121
- ],
122
- "react/jsx-closing-bracket-location": [
123
- "error",
124
- "line-aligned"
125
- ]
126
- }
127
- }
1
+ {
2
+ "settings": {
3
+ "react": {
4
+ "version": "detect"
5
+ }
6
+ },
7
+ "env": {
8
+ "browser": true,
9
+ "es2021": true,
10
+ "node": true
11
+ },
12
+ "extends": "eslint:recommended",
13
+ "parserOptions": {
14
+ "ecmaVersion": "latest",
15
+ "sourceType": "module"
16
+ },
17
+ "rules": {
18
+ "import/no-anonymous-default-export": ["error", {
19
+ "allowArray": false,
20
+ "allowArrowFunction": false,
21
+ "allowAnonymousClass": false,
22
+ "allowAnonymousFunction": false,
23
+ "allowCallExpression": true, // The true value here is for backward compatibility
24
+ "allowLiteral": false,
25
+ "allowObject": true // anonymous-default-export
26
+ }],
27
+ // react hooks validations
28
+ "react-hooks/exhaustive-deps": "warn",
29
+ "react-hooks/rules-of-hooks": "error",
30
+ // allow jsx syntax in js files (for next.js project)
31
+ "react/jsx-filename-extension": [
32
+ 1,
33
+ {
34
+ "extensions": [
35
+ ".js",
36
+ ".jsx",
37
+ ".ts",
38
+ ".tsx"
39
+ ]
40
+ }
41
+ ],
42
+ "quotes": [
43
+ 2,
44
+ "single",
45
+ {
46
+ "avoidEscape": true,
47
+ "allowTemplateLiterals": true
48
+ }
49
+ ],
50
+ "consistent-return": 2,
51
+ "indent": [
52
+ 2,
53
+ 2,
54
+ {
55
+ "SwitchCase": 1
56
+ }
57
+ ],
58
+ "no-else-return": 1,
59
+ "semi": [
60
+ 1,
61
+ "never"
62
+ ],
63
+ "space-unary-ops": 2,
64
+ "comma-dangle": [
65
+ "error",
66
+ {
67
+ "arrays": "never",
68
+ "objects": "never",
69
+ "imports": "never",
70
+ "exports": "never",
71
+ "functions": "never"
72
+ }
73
+ ],
74
+ "one-var": [
75
+ 2,
76
+ "never"
77
+ ],
78
+ "no-var": "error",
79
+ "arrow-body-style": [
80
+ "error",
81
+ "always"
82
+ ],
83
+ "no-console": "error",
84
+ "no-multi-spaces": [
85
+ "error",
86
+ {
87
+ "exceptions": {
88
+ "BinaryExpression": true
89
+ }
90
+ }
91
+ ],
92
+ "no-multiple-empty-lines": [
93
+ "error",
94
+ {
95
+ "max": 2,
96
+ "maxBOF": 2
97
+ }
98
+ ],
99
+ "jsx-quotes": [
100
+ "error",
101
+ "prefer-single"
102
+ ],
103
+ "react/jsx-sort-props": [
104
+ "error",
105
+ {
106
+ "noSortAlphabetically": false
107
+ }
108
+ ],
109
+ "react/jsx-first-prop-new-line": [
110
+ "error",
111
+ "multiline"
112
+ ],
113
+ "react/jsx-max-props-per-line": [
114
+ "error",
115
+ {
116
+ "maximum": {
117
+ "single": 2,
118
+ "multi": 1
119
+ }
120
+ }
121
+ ],
122
+ "react/jsx-closing-bracket-location": [
123
+ "error",
124
+ "line-aligned"
125
+ ]
126
+ }
127
+ }
@@ -1,18 +1,18 @@
1
- ## What problem is this solving?
2
-
3
- - [x] this is an example if you finish your work
4
-
5
- ## How should this be manually tested?
6
-
7
- ### Screenshots or example usage
8
-
9
- ## Types of changes
10
-
11
- * [ ] Bug fix (a non-breaking change which fixes an issue)
12
- * [ ] New feature (a non-breaking change which adds functionality)
13
- * [ ] Breaking change (fix or feature that would cause existing functionality to change)
14
- * [ ] Requires change to documentation, which has been updated accordingly.
15
-
16
- ## PR's related
17
-
1
+ ## What problem is this solving?
2
+
3
+ - [x] this is an example if you finish your work
4
+
5
+ ## How should this be manually tested?
6
+
7
+ ### Screenshots or example usage
8
+
9
+ ## Types of changes
10
+
11
+ * [ ] Bug fix (a non-breaking change which fixes an issue)
12
+ * [ ] New feature (a non-breaking change which adds functionality)
13
+ * [ ] Breaking change (fix or feature that would cause existing functionality to change)
14
+ * [ ] Requires change to documentation, which has been updated accordingly.
15
+
16
+ ## PR's related
17
+
18
18
  - [x] Add the relation between pull request
@@ -1,30 +1,30 @@
1
- name: Publish package to GitHub Packages
2
- on:
3
- push:
4
- branches: [main]
5
- pull_request:
6
- branches: [develop]
7
- types: [opened, synchronize]
8
- release:
9
- types: [created]
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
- permissions:
14
- contents: read
15
- packages: write
16
- steps:
17
- - uses: actions/checkout@v3
18
- # Setup .npmrc file to publish to GitHub Packages
19
- - uses: actions/setup-node@v3
20
- with:
21
- node-version: '16.x'
22
- registry-url: 'https://npm.pkg.github.com'
23
- # Defaults to the user or organization that owns the workflow file
24
- - run: npm install
25
- - uses: JS-DevTools/npm-publish@v1
26
- with:
27
- token: ${{ secrets.NPM_TOKEN }}
28
- # - run: npm publish
29
- # env:
1
+ name: Publish package to GitHub Packages
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ pull_request:
6
+ branches: [develop]
7
+ types: [opened, synchronize]
8
+ release:
9
+ types: [created]
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read
15
+ packages: write
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ # Setup .npmrc file to publish to GitHub Packages
19
+ - uses: actions/setup-node@v3
20
+ with:
21
+ node-version: '16.x'
22
+ registry-url: 'https://npm.pkg.github.com'
23
+ # Defaults to the user or organization that owns the workflow file
24
+ - run: npm install
25
+ - uses: JS-DevTools/npm-publish@v1
26
+ with:
27
+ token: ${{ secrets.NPM_TOKEN }}
28
+ # - run: npm publish
29
+ # env:
30
30
  # NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/package.json CHANGED
@@ -1,47 +1,47 @@
1
- {
2
- "author": "",
3
- "dependencies": {
4
- "@apollo/client": "3.6.9",
5
- "@typescript-eslint/parser": "^5.37.0",
6
- "js-cookie": "3.0.1",
7
- "lodash": "^4.17.21",
8
- "md5": "2.3.0",
9
- "moment": "^2.29.4",
10
- "react": "18.1.0",
11
- "react-dom": "18.1.0",
12
- "react-query": "^3.39.2"
13
- },
14
- "description": "description-pkg-hook",
15
- "devDependencies": {
16
- "@babel/preset-env": "^7.19.1",
17
- "@babel/preset-react": "^7.18.6",
18
- "@babel/preset-typescript": "^7.18.6",
19
- "@types/react": "^18.0.20",
20
- "@typescript-eslint/eslint-plugin": "5.29.0",
21
- "@typescript-eslint/parser": "5.29.0",
22
- "eslint": "^8.0.1",
23
- "eslint-config-standard": "^17.0.0",
24
- "eslint-plugin-import": "^2.25.2",
25
- "eslint-plugin-n": "^15.0.0",
26
- "eslint-plugin-promise": "^6.0.0",
27
- "eslint-plugin-react": "^7.33.2",
28
- "eslint-plugin-react-hooks": "^4.6.0"
29
- },
30
- "license": "ISC",
31
- "main": "/src/index.jsx",
32
- "name": "npm-pkg-hook",
33
- "publishConfig": {
34
- "registry": "https://registry.npmjs.org/"
35
- },
36
- "repository": {
37
- "type": "git",
38
- "url": "https://github.com/Jesus123780/pkg-hook"
39
- },
40
- "scripts": {
41
- "lint": "eslint .",
42
- "lint:fix": "npm run lint -- --fix",
43
- "rm": "rm -rf node_modules package-lock.json && npm i",
44
- "test": "echo \"Error: no test specified\" && exit 1"
45
- },
46
- "version": "1.3.7"
1
+ {
2
+ "author": "",
3
+ "dependencies": {
4
+ "@apollo/client": "3.6.9",
5
+ "@typescript-eslint/parser": "^5.37.0",
6
+ "js-cookie": "3.0.1",
7
+ "lodash": "^4.17.21",
8
+ "md5": "2.3.0",
9
+ "moment": "^2.29.4",
10
+ "react": "18.1.0",
11
+ "react-dom": "18.1.0",
12
+ "react-query": "^3.39.2"
13
+ },
14
+ "description": "description-pkg-hook",
15
+ "devDependencies": {
16
+ "@babel/preset-env": "^7.19.1",
17
+ "@babel/preset-react": "^7.18.6",
18
+ "@babel/preset-typescript": "^7.18.6",
19
+ "@types/react": "^18.0.20",
20
+ "@typescript-eslint/eslint-plugin": "5.29.0",
21
+ "@typescript-eslint/parser": "5.29.0",
22
+ "eslint": "^8.0.1",
23
+ "eslint-config-standard": "^17.0.0",
24
+ "eslint-plugin-import": "^2.25.2",
25
+ "eslint-plugin-n": "^15.0.0",
26
+ "eslint-plugin-promise": "^6.0.0",
27
+ "eslint-plugin-react": "^7.33.2",
28
+ "eslint-plugin-react-hooks": "^4.6.0"
29
+ },
30
+ "license": "ISC",
31
+ "main": "/src/index.jsx",
32
+ "name": "npm-pkg-hook",
33
+ "publishConfig": {
34
+ "registry": "https://registry.npmjs.org/"
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://github.com/Jesus123780/pkg-hook"
39
+ },
40
+ "scripts": {
41
+ "lint": "eslint .",
42
+ "lint:fix": "npm run lint -- --fix",
43
+ "rm": "rm -rf node_modules package-lock.json && npm i",
44
+ "test": "echo \"Error: no test specified\" && exit 1"
45
+ },
46
+ "version": "1.3.9"
47
47
  }
package/script.txt CHANGED
@@ -1,7 +1,7 @@
1
- // (function (params) {
2
- // var ct = document.createElement('link');
3
- // ct.rel = 'stylesheet';
4
- // ct.href = 'https://csswizardry.com/ct/ct.css';
5
- // ct.classList.add('ct');
6
- // document.head.appendChild(ct)
1
+ // (function (params) {
2
+ // var ct = document.createElement('link');
3
+ // ct.rel = 'stylesheet';
4
+ // ct.href = 'https://csswizardry.com/ct/ct.css';
5
+ // ct.classList.add('ct');
6
+ // document.head.appendChild(ct)
7
7
  // }());
@@ -1 +1 @@
1
- export * from './errors'
1
+ export * from './errors'
@@ -1,7 +1,7 @@
1
- export const jaccardSimilarity = (s1, s2) => {
2
- const set1 = new Set(s1)
3
- const set2 = new Set(s2)
4
- const intersection = new Set([...set1].filter(x => { return set2.has(x) }))
5
- const union = new Set([...set1, ...set2])
6
- return intersection.size / union.size
7
- }
1
+ export const jaccardSimilarity = (s1, s2) => {
2
+ const set1 = new Set(s1)
3
+ const set2 = new Set(s2)
4
+ const intersection = new Set([...set1].filter(x => { return set2.has(x) }))
5
+ const union = new Set([...set1, ...set2])
6
+ return intersection.size / union.size
7
+ }