@quazardous/qdadm 2.4.3 → 2.4.5
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 +1 -1
- package/src/composables/useDirtyState.ts +33 -20
- package/src/composables/useListPage.alterHooks.ts +153 -0
- package/src/composables/useListPage.filters.ts +421 -0
- package/src/composables/useListPage.ts +52 -412
- package/src/entity/EntityManager.ts +1 -4
- package/src/entity/auth/EntityAuthAdapter.ts +10 -0
- package/src/entity/auth/SecurityChecker.ts +6 -13
- package/src/kernel/Kernel.api.ts +5 -5
- package/src/kernel/Kernel.auth.ts +5 -5
- package/src/kernel/Kernel.i18n.ts +5 -5
- package/src/kernel/Kernel.modules.ts +5 -5
- package/src/kernel/Kernel.registries.ts +5 -5
- package/src/kernel/Kernel.routing.ts +5 -5
- package/src/kernel/Kernel.vue.ts +5 -5
- package/src/kernel/KernelContext.entities.ts +5 -5
- package/src/kernel/KernelContext.events.ts +5 -5
- package/src/kernel/KernelContext.i18n.ts +5 -5
- package/src/kernel/KernelContext.permissions.ts +5 -5
- package/src/kernel/KernelContext.routing.ts +5 -5
- package/src/kernel/KernelContext.types.ts +5 -0
- package/src/kernel/KernelContext.zones.ts +5 -5
- package/src/query/FilterQuery.ts +1 -1
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
type RouteRecordNormalized,
|
|
9
9
|
} from 'vue-router'
|
|
10
10
|
import { getRoutes } from '../module/moduleRegistry'
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
import type { Kernel } from './Kernel'
|
|
12
|
+
// #1196 Phase B — this-typing against the real Kernel shape (was Self = any)
|
|
13
|
+
type Self = Kernel
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Patch Kernel prototype with routing-related methods.
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const proto = KernelClass.prototype as Self
|
|
18
|
+
export function applyRoutingMethods(KernelClass: { prototype: Kernel }): void {
|
|
19
|
+
const proto = KernelClass.prototype
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Create Vue Router.
|
package/src/kernel/Kernel.vue.ts
CHANGED
|
@@ -16,8 +16,9 @@ import ToastListener from '../toast/ToastListener.vue'
|
|
|
16
16
|
import { createQdadm } from '../plugin.js'
|
|
17
17
|
import { createNotificationStore, NOTIFICATION_KEY } from '../notifications/NotificationStore'
|
|
18
18
|
import { I18N_INJECTION_KEY } from '../i18n/useI18n'
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
import type { Kernel } from './Kernel'
|
|
20
|
+
// #1196 Phase B — this-typing against the real Kernel shape (was Self = any)
|
|
21
|
+
type Self = Kernel
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* Reactive reference to the debug bar component, set by the Kernel
|
|
@@ -57,9 +58,8 @@ export function setQdadmDebugBar(component: Component | null): void {
|
|
|
57
58
|
/**
|
|
58
59
|
* Patch Kernel prototype with Vue app creation methods.
|
|
59
60
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const proto = KernelClass.prototype as Self
|
|
61
|
+
export function applyVueMethods(KernelClass: { prototype: Kernel }): void {
|
|
62
|
+
const proto = KernelClass.prototype
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Create layout components map for useLayoutResolver
|
|
@@ -8,13 +8,13 @@ import { managerFactory, type ManagerFactoryContext } from '../entity/factory.js
|
|
|
8
8
|
import type { EntityManager } from '../entity/EntityManager'
|
|
9
9
|
import { UsersManager } from '../security/UsersManager'
|
|
10
10
|
import type { UserEntityOptions } from './KernelContext.types'
|
|
11
|
+
import type { KernelContext } from './KernelContext'
|
|
11
12
|
|
|
12
|
-
//
|
|
13
|
-
type Self =
|
|
13
|
+
// #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
|
|
14
|
+
type Self = KernelContext
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const proto = KernelContextClass.prototype as Self
|
|
16
|
+
export function applyEntityMethods(KernelContextClass: { prototype: KernelContext }): void {
|
|
17
|
+
const proto = KernelContextClass.prototype
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Register an entity manager.
|
|
@@ -12,13 +12,13 @@ import type {
|
|
|
12
12
|
HookHandler,
|
|
13
13
|
SignalHandler,
|
|
14
14
|
} from './KernelContext.types'
|
|
15
|
+
import type { KernelContext } from './KernelContext'
|
|
15
16
|
|
|
16
|
-
//
|
|
17
|
-
type Self =
|
|
17
|
+
// #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
|
|
18
|
+
type Self = KernelContext
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const proto = KernelContextClass.prototype as Self
|
|
20
|
+
export function applyEventMethods(KernelContextClass: { prototype: KernelContext }): void {
|
|
21
|
+
const proto = KernelContextClass.prototype
|
|
22
22
|
|
|
23
23
|
proto.on = function (
|
|
24
24
|
this: Self,
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { AliasPattern, MessagesBundle, TranslationProvider } from '../i18n/types'
|
|
9
|
+
import type { KernelContext } from './KernelContext'
|
|
9
10
|
|
|
10
|
-
//
|
|
11
|
-
type Self =
|
|
11
|
+
// #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
|
|
12
|
+
type Self = KernelContext
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const proto = KernelContextClass.prototype as Self
|
|
14
|
+
export function applyI18nMethods(KernelContextClass: { prototype: KernelContext }): void {
|
|
15
|
+
const proto = KernelContextClass.prototype
|
|
16
16
|
|
|
17
17
|
proto.messages = function (this: Self, locale: string, bundle: MessagesBundle): Self {
|
|
18
18
|
if (this._kernel.i18nInstance) {
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type { PermissionMeta, PermissionOptions } from './KernelContext.types'
|
|
8
|
+
import type { KernelContext } from './KernelContext'
|
|
8
9
|
|
|
9
|
-
//
|
|
10
|
-
type Self =
|
|
10
|
+
// #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
|
|
11
|
+
type Self = KernelContext
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const proto = KernelContextClass.prototype as Self
|
|
13
|
+
export function applyPermissionMethods(KernelContextClass: { prototype: KernelContext }): void {
|
|
14
|
+
const proto = KernelContextClass.prototype
|
|
15
15
|
|
|
16
16
|
proto.permissions = function (
|
|
17
17
|
this: Self,
|
|
@@ -21,9 +21,10 @@ import type {
|
|
|
21
21
|
ParentConfig,
|
|
22
22
|
RouteOptions,
|
|
23
23
|
} from './KernelContext.types'
|
|
24
|
+
import type { KernelContext } from './KernelContext'
|
|
24
25
|
|
|
25
|
-
//
|
|
26
|
-
type Self =
|
|
26
|
+
// #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
|
|
27
|
+
type Self = KernelContext
|
|
27
28
|
|
|
28
29
|
/** Singularize a plural word (simple English rules) */
|
|
29
30
|
function singularize(plural: string): string {
|
|
@@ -128,9 +129,8 @@ function resolveParentParam(opts: {
|
|
|
128
129
|
return namespaced
|
|
129
130
|
}
|
|
130
131
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const proto = KernelContextClass.prototype as Self
|
|
132
|
+
export function applyRoutingMethods(KernelContextClass: { prototype: KernelContext }): void {
|
|
133
|
+
const proto = KernelContextClass.prototype
|
|
134
134
|
|
|
135
135
|
proto.routes = function (
|
|
136
136
|
this: Self,
|
|
@@ -20,6 +20,7 @@ import type { DeferredRegistry } from '../deferred/DeferredRegistry.js'
|
|
|
20
20
|
import type { SecurityChecker } from '../entity/auth/SecurityChecker'
|
|
21
21
|
import type { PermissionRegistry } from '../security/PermissionRegistry'
|
|
22
22
|
import type { I18n } from '../i18n/I18n'
|
|
23
|
+
import type { RouteParamResolverContext } from './KernelContext.routing'
|
|
23
24
|
|
|
24
25
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
25
26
|
// Internal types — shared across patch modules, not exposed by index.ts
|
|
@@ -41,6 +42,10 @@ export interface AuthAdapter {
|
|
|
41
42
|
export interface KernelOptions {
|
|
42
43
|
debug?: boolean
|
|
43
44
|
authAdapter?: AuthAdapter | null
|
|
45
|
+
/** Parent route param naming policy for child CRUD families (#1201). */
|
|
46
|
+
parentParamMode?: 'auto' | 'always' | 'bare'
|
|
47
|
+
/** Custom parent route param name resolver (#1201) — wins over parentParamMode. */
|
|
48
|
+
routeParamResolver?: (ctx: RouteParamResolverContext) => string | undefined
|
|
44
49
|
storageResolver?: unknown
|
|
45
50
|
managerResolver?: unknown
|
|
46
51
|
managerRegistry?: Record<string, unknown>
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
|
|
13
13
|
import type { Component } from 'vue'
|
|
14
14
|
import type { BlockConfig, ZoneOptions } from './KernelContext.types'
|
|
15
|
+
import type { KernelContext } from './KernelContext'
|
|
15
16
|
|
|
16
|
-
//
|
|
17
|
-
type Self =
|
|
17
|
+
// #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
|
|
18
|
+
type Self = KernelContext
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const proto = KernelContextClass.prototype as Self
|
|
20
|
+
export function applyZoneMethods(KernelContextClass: { prototype: KernelContext }): void {
|
|
21
|
+
const proto = KernelContextClass.prototype
|
|
22
22
|
|
|
23
23
|
proto.zone = function (this: Self, name: string, options: ZoneOptions = {}): Self {
|
|
24
24
|
if (this._kernel.zoneRegistry) {
|
package/src/query/FilterQuery.ts
CHANGED