adminforth 2.20.0-next.4 → 2.20.0-next.6

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.
@@ -129,8 +129,11 @@ const columnError = (column: AdminForthResourceColumnCommon) => {
129
129
  }
130
130
  }
131
131
  if (column.type === 'json' && !column.isArray?.enabled && currentValues.value[column.name]) {
132
+ const value = currentValues.value[column.name];
132
133
  try {
133
- JSON.parse(currentValues.value[column.name]);
134
+ if (typeof value === 'object') {
135
+ JSON.parse(JSON.stringify(value));
136
+ }
134
137
  } catch (e) {
135
138
  return t('Invalid JSON');
136
139
  }
@@ -286,10 +289,11 @@ onMounted(() => {
286
289
  }
287
290
  }
288
291
  } else if (currentValues.value[column.name]) {
289
- currentValues.value[column.name] = JSON.stringify(currentValues.value[column.name], null, 2);
292
+ if (typeof currentValues.value[column.name] !== 'string') {
293
+ currentValues.value[column.name] = JSON.stringify(currentValues.value[column.name], null, 2)
294
+ }
295
+ }
290
296
  }
291
-
292
- }
293
297
  });
294
298
  emit('update:isValid', isValid.value);
295
299
  });
@@ -431,7 +431,7 @@ export interface IAdminForth {
431
431
  *
432
432
  * Example:
433
433
  * ```ts
434
- * const auditLog = adminforth.getPluginById<AuditLogPlugin>('AuditLogPlugin');
434
+ * const auditLog = adminforth.getPluginById&lt;AuditLogPlugin&gt;('AuditLogPlugin');
435
435
  * ```
436
436
  */
437
437
  getPluginById<T>(id: string): T;
@@ -63,6 +63,7 @@
63
63
  </BreadcrumbsWithButtons>
64
64
 
65
65
  <component
66
+ v-if="!loading"
66
67
  v-for="c in coreStore?.resourceOptions?.pageInjections?.show?.afterBreadcrumbs || []"
67
68
  :is="getCustomComponent(c)"
68
69
  :meta="(c as AdminForthComponentDeclarationFull).meta"
@@ -397,7 +397,7 @@ export interface IAdminForth {
397
397
  *
398
398
  * Example:
399
399
  * ```ts
400
- * const auditLog = adminforth.getPluginById<AuditLogPlugin>('AuditLogPlugin');
400
+ * const auditLog = adminforth.getPluginById&lt;AuditLogPlugin&gt;('AuditLogPlugin');
401
401
  * ```
402
402
  */
403
403
  getPluginById<T>(id: string): T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.20.0-next.4",
3
+ "version": "2.20.0-next.6",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",