adminforth 1.1.107 → 1.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.1.107",
3
+ "version": "1.2.2",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,5 @@
1
1
  <template>
2
2
  <div>
3
-
4
3
  <span @click="(e)=>{e.stopPropagation()}" v-if="column.foreignResource">
5
4
  <RouterLink v-if="record[column.name]" class="font-medium text-blue-600 dark:text-blue-500 hover:brightness-110"
6
5
  :to="{ name: 'resource-show', params: { resourceId: column.foreignResource.resourceId, primaryKey: record[column.name].pk } }">
package/spa/src/utils.ts CHANGED
@@ -74,7 +74,7 @@ export const loadFile = (file: string) => {
74
74
  return baseUrl;
75
75
  }
76
76
 
77
- export function checkEmptyValues(value: any, viewType:'show' | 'list' ) {
77
+ export function checkEmptyValues(value: any, viewType: 'show' | 'list' ) {
78
78
  const config: CoreConfig | {} = useCoreStore().config;
79
79
  let emptyFieldPlaceholder = '';
80
80
  if (config.emptyFieldPlaceholder) {
@@ -43,7 +43,7 @@
43
43
  <span class="sr-only">Loading...</span>
44
44
  </div>
45
45
  <div
46
- v-else
46
+ v-else-if="coreStore.record"
47
47
  class="relative overflow-x-auto shadow-resourseFormShadow "
48
48
  >
49
49
  <table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400 rounded-default">
@@ -90,7 +90,12 @@
90
90
  </template>
91
91
  </tr>
92
92
  </tbody>
93
- </table>
93
+ </table>
94
+ </div>
95
+
96
+ <div v-else class="text-center text-gray-500 dark:text-gray-400 mt-10">
97
+ Ooops. Record not found
98
+ </div>
94
99
 
95
100
  <component
96
101
  v-for="c in coreStore?.resourceOptions?.pageInjections?.show?.bottom || []"
@@ -101,7 +106,6 @@
101
106
  :resource="coreStore.resource"
102
107
  :adminUser="coreStore.adminUser"
103
108
  />
104
- </div>
105
109
 
106
110
 
107
111
  </div>
@@ -5,6 +5,11 @@ export interface ICodeInjector {
5
5
  allComponentNames: Object;
6
6
  }
7
7
 
8
+ export interface IConfigValidator {
9
+ validateConfig()
10
+ postProcessAfterDiscover(resource: AdminForthResource): void;
11
+ }
12
+
8
13
  export interface IAdminForthHttpResponse {
9
14
  setHeader: (key: string, value: string) => void,
10
15
  setStatus: (code: number, message: string) => void,
@@ -208,6 +213,8 @@ export interface IAdminForthAuth {
208
213
  removeCustomCookie({response, name}: {response: any, name: string}): void;
209
214
 
210
215
  setAuthCookie({response, username, pk,}: {response: any, username: string, pk: string}): void;
216
+
217
+ removeAuthCookie(response: any): void;
211
218
  }
212
219
 
213
220
  export interface IAdminForth {
@@ -215,6 +222,14 @@ export interface IAdminForth {
215
222
  codeInjector: ICodeInjector;
216
223
  express: IHttpServer;
217
224
 
225
+ activatedPlugins: Array<IAdminForthPlugin>;
226
+
227
+ baseUrlSlashed: string;
228
+
229
+ statuses: {
230
+ dbDiscover: 'running' | 'done',
231
+ };
232
+
218
233
  connectors: {
219
234
  [key: string]: IAdminForthDataSourceConnectorBase;
220
235
  };
@@ -1003,9 +1018,11 @@ export type AdminForthConfig = {
1003
1018
  * }
1004
1019
  * ```
1005
1020
  *
1006
- * Install HighCharts:
1021
+ * Install HighCharts into custom folder:
1007
1022
  *
1008
- * ```bash
1023
+ * ```bashcreating rec
1024
+ * cd custom
1025
+ * npm init -y
1009
1026
  * npm install highcharts highcharts-vue
1010
1027
  * ```
1011
1028
  *