adminforth 1.0.24 → 1.0.26

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 (67) hide show
  1. package/dataConnectors/mongo.ts +2 -2
  2. package/dist/dataConnectors/mongo.js +1 -1
  3. package/dist/modules/codeInjector.js +9 -0
  4. package/dist/spa/.eslintrc.cjs +14 -0
  5. package/dist/spa/.vscode/extensions.json +6 -0
  6. package/dist/spa/README.md +39 -0
  7. package/dist/spa/env.d.ts +1 -0
  8. package/dist/spa/index.html +23 -0
  9. package/dist/spa/package-lock.json +4158 -0
  10. package/dist/spa/package.json +41 -0
  11. package/dist/spa/postcss.config.js +6 -0
  12. package/dist/spa/public/favicon.ico +0 -0
  13. package/dist/spa/src/App.vue +172 -0
  14. package/dist/spa/src/assets/base.css +0 -0
  15. package/dist/spa/src/assets/logo.svg +1 -0
  16. package/dist/spa/src/components/AcceptModal.vue +52 -0
  17. package/dist/spa/src/components/Breadcrumbs.vue +40 -0
  18. package/dist/spa/src/components/BreadcrumbsWithButtons.vue +26 -0
  19. package/dist/spa/src/components/CustomDatePicker.vue +161 -0
  20. package/dist/spa/src/components/CustomDateRangePicker.vue +209 -0
  21. package/dist/spa/src/components/Dropdown.vue +154 -0
  22. package/dist/spa/src/components/Filters.vue +157 -0
  23. package/dist/spa/src/components/HelloWorld.vue +17 -0
  24. package/dist/spa/src/components/MenuLink.vue +24 -0
  25. package/dist/spa/src/components/ResourceForm.vue +205 -0
  26. package/dist/spa/src/components/SingleSkeletLoader.vue +13 -0
  27. package/dist/spa/src/components/ValueRenderer.vue +44 -0
  28. package/dist/spa/src/components/icons/IconCalendar.vue +5 -0
  29. package/dist/spa/src/components/icons/IconCommunity.vue +7 -0
  30. package/dist/spa/src/components/icons/IconDocumentation.vue +7 -0
  31. package/dist/spa/src/components/icons/IconEcosystem.vue +7 -0
  32. package/dist/spa/src/components/icons/IconSupport.vue +7 -0
  33. package/dist/spa/src/components/icons/IconTime.vue +5 -0
  34. package/dist/spa/src/components/icons/IconTooling.vue +19 -0
  35. package/dist/spa/src/index.scss +26 -0
  36. package/dist/spa/src/main.ts +18 -0
  37. package/dist/spa/src/router/index.ts +53 -0
  38. package/dist/spa/src/stores/core.ts +138 -0
  39. package/dist/spa/src/stores/modal.ts +38 -0
  40. package/dist/spa/src/utils.ts +44 -0
  41. package/dist/spa/src/views/CreateView.vue +103 -0
  42. package/dist/spa/src/views/EditView.vue +103 -0
  43. package/dist/spa/src/views/HomeView.vue +8 -0
  44. package/dist/spa/src/views/ListView.vue +528 -0
  45. package/dist/spa/src/views/LoginView.vue +122 -0
  46. package/dist/spa/src/views/ResourceParent.vue +18 -0
  47. package/dist/spa/src/views/ShowView.vue +93 -0
  48. package/dist/spa/tailwind.config.js +12 -0
  49. package/dist/spa/tsconfig.app.json +14 -0
  50. package/dist/spa/tsconfig.json +11 -0
  51. package/dist/spa/tsconfig.node.json +19 -0
  52. package/dist/spa/vite.config.ts +43 -0
  53. package/modules/codeInjector.ts +12 -0
  54. package/package.json +2 -2
  55. package/dist/spa/src/main.js +0 -16
  56. package/dist/spa/src/router/index.js +0 -79
  57. package/dist/spa/src/stores/core.js +0 -154
  58. package/dist/spa/src/stores/modal.js +0 -35
  59. package/dist/spa/src/utils.js +0 -59
  60. package/dist/spa/vite.config.js +0 -44
  61. package/dist/spa_tmp/src/custom/custom/vueUses.js +0 -10
  62. package/dist/spa_tmp/src/main.js +0 -29
  63. package/dist/spa_tmp/src/router/index.js +0 -83
  64. package/dist/spa_tmp/src/stores/core.js +0 -150
  65. package/dist/spa_tmp/src/stores/modal.js +0 -35
  66. package/dist/spa_tmp/src/utils.js +0 -59
  67. package/dist/spa_tmp/vite.config.js +0 -43
@@ -4,7 +4,7 @@ import { AdminForthFilterOperators, AdminForthSortDirections, AdminForthTypes }
4
4
 
5
5
 
6
6
  class MongoConnector {
7
- db: any;
7
+ db: MongoClient
8
8
 
9
9
  constructor({ url }) {
10
10
  this.db = new MongoClient(url);
@@ -188,7 +188,7 @@ class MongoConnector {
188
188
  }
189
189
 
190
190
  async close() {
191
- await this.db.end();
191
+ await this.db.close()
192
192
  }
193
193
  }
194
194
 
@@ -197,7 +197,7 @@ class MongoConnector {
197
197
  }
198
198
  close() {
199
199
  return __awaiter(this, void 0, void 0, function* () {
200
- yield this.db.end();
200
+ yield this.db.close();
201
201
  });
202
202
  }
203
203
  }
@@ -116,11 +116,20 @@ class CodeInjector {
116
116
  const src = path.join(__dirname, 'spa', file);
117
117
  const dest = path.join(spaTmpPath, file);
118
118
  yield fsExtra.copy(src, dest);
119
+ if (process.env.HEAVY_DEBUG) {
120
+ console.log('🪲 await fsExtra.copy filtering', src, dest);
121
+ }
119
122
  })));
120
123
  }
121
124
  else {
125
+ if (process.env.HEAVY_DEBUG) {
126
+ console.log(`🪲 await fsExtra.copy from ${path.join(__dirname, 'spa')}, ${spaTmpPath}`);
127
+ }
122
128
  yield fsExtra.copy(path.join(__dirname, 'spa'), spaTmpPath, {
123
129
  filter: (src) => {
130
+ if (process.env.HEAVY_DEBUG) {
131
+ console.log('🪲 await fsExtra.copy filtering', src);
132
+ }
124
133
  return !src.includes('/adminforth/spa/node_modules') && !src.includes('/adminforth/spa/dist');
125
134
  },
126
135
  });
@@ -0,0 +1,14 @@
1
+ /* eslint-env node */
2
+ require('@rushstack/eslint-patch/modern-module-resolution')
3
+
4
+ module.exports = {
5
+ root: true,
6
+ 'extends': [
7
+ 'plugin:vue/vue3-essential',
8
+ 'eslint:recommended',
9
+ '@vue/eslint-config-typescript'
10
+ ],
11
+ parserOptions: {
12
+ ecmaVersion: 'latest'
13
+ }
14
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "recommendations": [
3
+ "Vue.volar",
4
+ "dbaeumer.vscode-eslint"
5
+ ]
6
+ }
@@ -0,0 +1,39 @@
1
+ # spa
2
+
3
+ This template should help get you started developing with Vue 3 in Vite.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8
+
9
+ ## Type Support for `.vue` Imports in TS
10
+
11
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
12
+
13
+ ## Customize configuration
14
+
15
+ See [Vite Configuration Reference](https://vitejs.dev/config/).
16
+
17
+ ## Project Setup
18
+
19
+ ```sh
20
+ npm install
21
+ ```
22
+
23
+ ### Compile and Hot-Reload for Development
24
+
25
+ ```sh
26
+ npm run dev
27
+ ```
28
+
29
+ ### Type-Check, Compile and Minify for Production
30
+
31
+ ```sh
32
+ npm run build
33
+ ```
34
+
35
+ ### Lint with [ESLint](https://eslint.org/)
36
+
37
+ ```sh
38
+ npm run lint
39
+ ```
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <link rel="icon" href="/favicon.ico">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Vite App</title>
8
+ <!--
9
+ <script>
10
+ // On page load or when changing themes, best to add inline in `head` to avoid FOUC
11
+ if (localStorage.getItem('color-theme') === 'dark' || (!('color-theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
12
+ document.documentElement.classList.add('dark');
13
+ } else {
14
+ document.documentElement.classList.remove('dark')
15
+ }
16
+ </script> -->
17
+
18
+ </head>
19
+ <body>
20
+ <div id="app" class="min-h-screen dark:bg-gray-800"></div>
21
+ <script type="module" src="/src/main.ts"></script>
22
+ </body>
23
+ </html>