adminforth 1.1.33 → 1.1.35
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.
- package/dist/index.js +7 -1
- package/dist/modules/styles.js +1 -1
- package/dist/spa/spa/.eslintrc.cjs +14 -0
- package/dist/spa/spa/.vscode/extensions.json +6 -0
- package/dist/spa/spa/README.md +39 -0
- package/dist/spa/spa/env.d.ts +1 -0
- package/dist/spa/spa/index.html +23 -0
- package/dist/spa/spa/package-lock.json +4359 -0
- package/dist/spa/spa/package.json +47 -0
- package/dist/spa/spa/postcss.config.js +6 -0
- package/dist/spa/spa/public/assets/favicon.png +0 -0
- package/dist/spa/spa/src/App.vue +271 -0
- package/dist/spa/spa/src/assets/base.css +0 -0
- package/dist/spa/spa/src/assets/logo.svg +19 -0
- package/dist/spa/spa/src/components/AcceptModal.vue +45 -0
- package/dist/spa/spa/src/components/Breadcrumbs.vue +40 -0
- package/dist/spa/spa/src/components/BreadcrumbsWithButtons.vue +26 -0
- package/dist/spa/spa/src/components/CustomDatePicker.vue +174 -0
- package/dist/spa/spa/src/components/CustomDateRangePicker.vue +218 -0
- package/dist/spa/spa/src/components/CustomRangePicker.vue +148 -0
- package/dist/spa/spa/src/components/Dropdown.vue +168 -0
- package/dist/spa/spa/src/components/Filters.vue +211 -0
- package/dist/spa/spa/src/components/HelloWorld.vue +17 -0
- package/dist/spa/spa/src/components/MenuLink.vue +24 -0
- package/dist/spa/spa/src/components/ResourceForm.vue +265 -0
- package/dist/spa/spa/src/components/ResourceListTable.vue +419 -0
- package/dist/spa/spa/src/components/SingleSkeletLoader.vue +13 -0
- package/dist/spa/spa/src/components/Toast.vue +66 -0
- package/dist/spa/spa/src/components/ValueRenderer.vue +60 -0
- package/dist/spa/spa/src/components/icons/IconCalendar.vue +5 -0
- package/dist/spa/spa/src/components/icons/IconCommunity.vue +7 -0
- package/dist/spa/spa/src/components/icons/IconDocumentation.vue +7 -0
- package/dist/spa/spa/src/components/icons/IconEcosystem.vue +7 -0
- package/dist/spa/spa/src/components/icons/IconSupport.vue +7 -0
- package/dist/spa/spa/src/components/icons/IconTime.vue +5 -0
- package/dist/spa/spa/src/components/icons/IconTooling.vue +19 -0
- package/dist/spa/spa/src/composables/useFrontendApi.ts +26 -0
- package/dist/spa/spa/src/composables/useStores.ts +113 -0
- package/dist/spa/spa/src/index.scss +26 -0
- package/dist/spa/spa/src/main.ts +18 -0
- package/dist/spa/spa/src/router/index.ts +64 -0
- package/dist/spa/spa/src/spa_types/core.ts +51 -0
- package/dist/spa/spa/src/stores/core.ts +144 -0
- package/dist/spa/spa/src/stores/filters.ts +22 -0
- package/dist/spa/spa/src/stores/modal.ts +48 -0
- package/dist/spa/spa/src/stores/toast.ts +15 -0
- package/dist/spa/spa/src/stores/user.ts +54 -0
- package/dist/spa/spa/src/utils.ts +101 -0
- package/dist/spa/spa/src/views/CreateView.vue +163 -0
- package/dist/spa/spa/src/views/EditView.vue +165 -0
- package/dist/spa/spa/src/views/ListView.vue +257 -0
- package/dist/spa/spa/src/views/LoginView.vue +134 -0
- package/dist/spa/spa/src/views/ResourceParent.vue +18 -0
- package/dist/spa/spa/src/views/ShowView.vue +188 -0
- package/dist/spa/spa/tailwind.config.js +15 -0
- package/dist/spa/spa/tsconfig.app.json +14 -0
- package/dist/spa/spa/tsconfig.json +11 -0
- package/dist/spa/spa/tsconfig.node.json +19 -0
- package/dist/spa/spa/vite.config.ts +49 -0
- package/index.ts +14 -6
- package/modules/styles.ts +1 -1
- package/package.json +1 -1
- package/spa/src/App.vue +2 -2
- package/types/AdminForthConfig.ts +0 -3
package/dist/index.js
CHANGED
|
@@ -135,7 +135,7 @@ class AdminForth {
|
|
|
135
135
|
if (this.config.customization.brandLogo) {
|
|
136
136
|
errors.push(...this.checkCustomFileExists(this.config.customization.brandLogo));
|
|
137
137
|
}
|
|
138
|
-
if (
|
|
138
|
+
if (this.config.customization.favicon) {
|
|
139
139
|
errors.push(...this.checkCustomFileExists(this.config.customization.favicon));
|
|
140
140
|
}
|
|
141
141
|
if (!this.config.customization.datesFormat) {
|
|
@@ -645,7 +645,13 @@ class AdminForth {
|
|
|
645
645
|
function interpretResource(adminUser, resource, meta, source) {
|
|
646
646
|
return __awaiter(this, void 0, void 0, function* () {
|
|
647
647
|
var _b;
|
|
648
|
+
if (process.env.HEAVY_DEBUG) {
|
|
649
|
+
console.log('🪲Interpreting resource', resource.resourceId, source);
|
|
650
|
+
}
|
|
648
651
|
yield Promise.all(Object.entries(((_b = resource.options) === null || _b === void 0 ? void 0 : _b.allowedActions) || {}).map((_c) => __awaiter(this, [_c], void 0, function* ([key, value]) {
|
|
652
|
+
if (process.env.HEAVY_DEBUG) {
|
|
653
|
+
console.log('🪲checking for allowed call', key, 'value:', value, 'typeof', typeof value);
|
|
654
|
+
}
|
|
649
655
|
// if callable then call
|
|
650
656
|
if (typeof value === 'function') {
|
|
651
657
|
resource.options.allowedActions[key] = yield value({ adminUser, resource, meta, source });
|
package/dist/modules/styles.js
CHANGED
|
@@ -11,7 +11,7 @@ export const styles = () => `
|
|
|
11
11
|
"header-logo-color": "#333333", // Dark grey logo
|
|
12
12
|
"header-border-color": "rgb(229 231 235)", // Light grey border
|
|
13
13
|
|
|
14
|
-
"nav-menu-bg": "#
|
|
14
|
+
"nav-menu-bg": "#ffffff", // Very light grey
|
|
15
15
|
"nav-menu-border": "rgb(229 231 235)",
|
|
16
16
|
"nav-menu-bg-hover": "rgb(243 244 246)", // Light grey hover
|
|
17
17
|
"nav-menu-bg-active": "rgb(233, 234, 236)", // Light grey active
|
|
@@ -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,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="/* IMPORTANT:ADMINFORTH FAVICON */">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>/* IMPORTANT:ADMINFORTH TITLE */</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 class=" ">
|
|
20
|
+
<div id="app" class="min-h-screen bg-html-bg dark:bg-gray-800"></div>
|
|
21
|
+
<script type="module" src="/src/main.ts"></script>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|