zova-module-rest-resource 5.1.56 → 5.1.58
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/.metadata/component/resourcePickerContext.d.ts +2 -2
- package/dist/.metadata/index.d.ts +24 -24
- package/dist/.metadata/page/entry.d.ts +1 -1
- package/dist/.metadata/page/entryCreate.d.ts +1 -1
- package/dist/.metadata/page/resource.d.ts +1 -1
- package/dist/.metadata/page/resourcePicker.d.ts +1 -1
- package/dist/.metadata/this.d.ts +1 -1
- package/dist/component/resourcePickerContext/controller.d.ts +1 -1
- package/dist/component/resourcePickerContext/controller.d.ts.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/page/entry/controller.d.ts +1 -1
- package/dist/page/entryCreate/controller.d.ts +1 -1
- package/dist/page/resource/controller.d.ts +1 -1
- package/dist/page/resourcePicker/controller.d.ts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/types/pageEntryWrapper.d.ts +1 -1
- package/dist/types/pageWrapper.d.ts +1 -1
- package/package.json +2 -2
- package/src/.metadata/component/resourcePickerContext.ts +2 -2
- package/src/.metadata/index.ts +24 -24
- package/src/.metadata/page/entry.ts +2 -2
- package/src/.metadata/page/entryCreate.ts +2 -2
- package/src/.metadata/page/resource.ts +2 -2
- package/src/.metadata/page/resourcePicker.ts +2 -2
- package/src/.metadata/this.ts +1 -1
- package/src/component/resourcePickerContext/controller.tsx +2 -2
- package/src/index.ts +4 -4
- package/src/model/resource.ts +3 -3
- package/src/page/entry/controller.tsx +1 -1
- package/src/page/entryCreate/controller.tsx +1 -1
- package/src/page/resource/controller.tsx +1 -1
- package/src/page/resourcePicker/controller.tsx +5 -5
- package/src/routes.ts +5 -5
- package/src/types/index.ts +3 -3
- package/src/types/pageEntryWrapper.ts +1 -1
- package/src/types/pageWrapper.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TypeControllerInnerProps } from 'zova';
|
|
2
|
-
import type { ControllerResourcePickerContextProps } from '../../component/resourcePickerContext/controller.
|
|
3
|
-
import { ControllerResourcePickerContext } from '../../component/resourcePickerContext/controller.
|
|
2
|
+
import type { ControllerResourcePickerContextProps } from '../../component/resourcePickerContext/controller.tsx';
|
|
3
|
+
import { ControllerResourcePickerContext } from '../../component/resourcePickerContext/controller.tsx';
|
|
4
4
|
export type ZResourcePickerContextProps = {
|
|
5
5
|
controllerRef?: (ref: ControllerResourcePickerContext) => void;
|
|
6
6
|
} & ControllerResourcePickerContextProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** model: begin */
|
|
2
|
-
export * from '../model/resource.
|
|
3
|
-
import { IModelOptionsResource } from '../model/resource.
|
|
2
|
+
export * from '../model/resource.ts';
|
|
3
|
+
import { IModelOptionsResource } from '../model/resource.ts';
|
|
4
4
|
import 'zova-module-a-model';
|
|
5
5
|
declare module 'zova-module-a-model' {
|
|
6
6
|
interface IModelRecord {
|
|
@@ -18,7 +18,7 @@ declare module 'zova-module-rest-resource' {
|
|
|
18
18
|
}
|
|
19
19
|
/** model: end */
|
|
20
20
|
/** model: begin */
|
|
21
|
-
import type { ModelResource } from '../model/resource.
|
|
21
|
+
import type { ModelResource } from '../model/resource.ts';
|
|
22
22
|
import 'zova';
|
|
23
23
|
declare module 'zova' {
|
|
24
24
|
interface IBeanRecordGeneral {
|
|
@@ -27,11 +27,11 @@ declare module 'zova' {
|
|
|
27
27
|
}
|
|
28
28
|
/** model: end */
|
|
29
29
|
/** controller: begin */
|
|
30
|
-
export * from '../component/resourcePickerContext/controller.
|
|
31
|
-
export * from '../page/entry/controller.
|
|
32
|
-
export * from '../page/entryCreate/controller.
|
|
33
|
-
export * from '../page/resource/controller.
|
|
34
|
-
export * from '../page/resourcePicker/controller.
|
|
30
|
+
export * from '../component/resourcePickerContext/controller.tsx';
|
|
31
|
+
export * from '../page/entry/controller.tsx';
|
|
32
|
+
export * from '../page/entryCreate/controller.tsx';
|
|
33
|
+
export * from '../page/resource/controller.tsx';
|
|
34
|
+
export * from '../page/resourcePicker/controller.tsx';
|
|
35
35
|
import 'zova';
|
|
36
36
|
declare module 'zova' {
|
|
37
37
|
}
|
|
@@ -47,11 +47,11 @@ declare module 'zova-module-rest-resource' {
|
|
|
47
47
|
}
|
|
48
48
|
/** controller: end */
|
|
49
49
|
/** controller: begin */
|
|
50
|
-
import type { ControllerResourcePickerContext } from '../component/resourcePickerContext/controller.
|
|
51
|
-
import type { ControllerPageEntry } from '../page/entry/controller.
|
|
52
|
-
import type { ControllerPageEntryCreate } from '../page/entryCreate/controller.
|
|
53
|
-
import type { ControllerPageResource } from '../page/resource/controller.
|
|
54
|
-
import type { ControllerPageResourcePicker } from '../page/resourcePicker/controller.
|
|
50
|
+
import type { ControllerResourcePickerContext } from '../component/resourcePickerContext/controller.tsx';
|
|
51
|
+
import type { ControllerPageEntry } from '../page/entry/controller.tsx';
|
|
52
|
+
import type { ControllerPageEntryCreate } from '../page/entryCreate/controller.tsx';
|
|
53
|
+
import type { ControllerPageResource } from '../page/resource/controller.tsx';
|
|
54
|
+
import type { ControllerPageResourcePicker } from '../page/resourcePicker/controller.tsx';
|
|
55
55
|
import 'zova';
|
|
56
56
|
declare module 'zova' {
|
|
57
57
|
interface IBeanRecordLocal {
|
|
@@ -64,15 +64,15 @@ declare module 'zova' {
|
|
|
64
64
|
}
|
|
65
65
|
/** controller: end */
|
|
66
66
|
/** pages: begin */
|
|
67
|
-
export * from './page/entry.
|
|
68
|
-
import { NSControllerPageEntry } from './page/entry.
|
|
69
|
-
export * from './page/entryCreate.
|
|
70
|
-
import { NSControllerPageEntryCreate } from './page/entryCreate.
|
|
71
|
-
export * from './page/resource.
|
|
72
|
-
import { NSControllerPageResource } from './page/resource.
|
|
73
|
-
export * from './page/resourcePicker.
|
|
74
|
-
import { NSControllerPageResourcePicker } from './page/resourcePicker.
|
|
75
|
-
export * from '../routes.
|
|
67
|
+
export * from './page/entry.ts';
|
|
68
|
+
import { NSControllerPageEntry } from './page/entry.ts';
|
|
69
|
+
export * from './page/entryCreate.ts';
|
|
70
|
+
import { NSControllerPageEntryCreate } from './page/entryCreate.ts';
|
|
71
|
+
export * from './page/resource.ts';
|
|
72
|
+
import { NSControllerPageResource } from './page/resource.ts';
|
|
73
|
+
export * from './page/resourcePicker.ts';
|
|
74
|
+
import { NSControllerPageResourcePicker } from './page/resourcePicker.ts';
|
|
75
|
+
export * from '../routes.ts';
|
|
76
76
|
import { TypePagePathSchema } from 'zova-module-a-router';
|
|
77
77
|
import 'zova';
|
|
78
78
|
declare module 'zova-module-a-router' {
|
|
@@ -132,8 +132,8 @@ declare module 'zova-module-rest-resource' {
|
|
|
132
132
|
}
|
|
133
133
|
/** pages: end */
|
|
134
134
|
/** components: begin */
|
|
135
|
-
export * from './component/resourcePickerContext.
|
|
136
|
-
import { ZResourcePickerContext } from './component/resourcePickerContext.
|
|
135
|
+
export * from './component/resourcePickerContext.ts';
|
|
136
|
+
import { ZResourcePickerContext } from './component/resourcePickerContext.ts';
|
|
137
137
|
export declare const components: {
|
|
138
138
|
resourcePickerContext: import("vue").DefineSetupFnComponent<import("zova-module-rest-resource").ZResourcePickerContextProps, import("vue").EmitsOptions, import("vue").SlotsType<Record<string, any>>, {
|
|
139
139
|
controllerRef?: (ref: ControllerResourcePickerContext) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ControllerPageEntrySchemaParams } from '../../page/entry/controller.
|
|
2
|
+
import { ControllerPageEntrySchemaParams } from '../../page/entry/controller.tsx';
|
|
3
3
|
export declare namespace NSControllerPageEntry {
|
|
4
4
|
const paramsSchema: z.ZodObject<{
|
|
5
5
|
resource: z.ZodString;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ControllerPageEntryCreateSchemaParams } from '../../page/entryCreate/controller.
|
|
2
|
+
import { ControllerPageEntryCreateSchemaParams } from '../../page/entryCreate/controller.tsx';
|
|
3
3
|
export declare namespace NSControllerPageEntryCreate {
|
|
4
4
|
const paramsSchema: z.ZodObject<{
|
|
5
5
|
resource: z.ZodString;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ControllerPageResourceSchemaParams } from '../../page/resource/controller.
|
|
2
|
+
import { ControllerPageResourceSchemaParams } from '../../page/resource/controller.tsx';
|
|
3
3
|
export declare namespace NSControllerPageResource {
|
|
4
4
|
const paramsSchema: z.ZodObject<{
|
|
5
5
|
resource: z.ZodString;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ControllerPageResourcePickerSchemaParams } from '../../page/resourcePicker/controller.
|
|
2
|
+
import { ControllerPageResourcePickerSchemaParams } from '../../page/resourcePicker/controller.tsx';
|
|
3
3
|
export declare namespace NSControllerPageResourcePicker {
|
|
4
4
|
const paramsSchema: z.ZodObject<{
|
|
5
5
|
resource: z.ZodString;
|
package/dist/.metadata/this.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BeanControllerBase } from 'zova';
|
|
2
|
-
import type { IResourcePickerPageContext } from '../../page/resourcePicker/controller.
|
|
2
|
+
import type { IResourcePickerPageContext } from '../../page/resourcePicker/controller.tsx';
|
|
3
3
|
export interface ControllerResourcePickerContextProps {
|
|
4
4
|
context: IResourcePickerPageContext;
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/component/resourcePickerContext/controller.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAG1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/component/resourcePickerContext/controller.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAG1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAI3F,MAAM,WAAW,oCAAoC;IACnD,OAAO,EAAE,0BAA0B,CAAC;CACrC;AAED,qBACa,+BAAgC,SAAQ,kBAAkB;IACrE,MAAM,CAAC,aAAa,KAAM;cAEV,QAAQ;IAOxB,SAAS,CAAC,MAAM;;;CAGjB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './.metadata/index.
|
|
2
|
-
export * from './types/index.
|
|
3
|
-
export * from './lib/resourcePicker.
|
|
4
|
-
export * from './page/resourcePicker/controller.
|
|
1
|
+
export * from './.metadata/index.ts';
|
|
2
|
+
export * from './types/index.ts';
|
|
3
|
+
export * from './lib/resourcePicker.ts';
|
|
4
|
+
export * from './page/resourcePicker/controller.tsx';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sCAAsC,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["BeanControllerBase","Controller","resourcePickerPageContextKey","ControllerResourcePickerContext","_dec","_dec2","__z_BeanInfo","module","_class","_ControllerResourcePickerContext","__init__","bean","_setBean","$props","context","render","$slotDefault","$propsDefault","isNil","z","BeanControllerPageBase","deepExtend","Use","usePrepareArg","ZovaJsx","Controller","formMetaFromFormScene","$QueryEnsureLoaded","_isSlot","s","Object","prototype","toString","call","_isVNode","ControllerPageEntrySchemaParams","object","resource","string","id","optional","formScene","ControllerPageEntry","_dec","_dec2","__z_BeanInfo","module","_dec3","beanFullName","_dec4","Reflect","metadata","Function","_dec5","_class","_class2","constructor","args","formMeta","formProvider","formSchema","jsxZova","_blocks","$$modelResource","$params","entryId","__init__","$computed","getFormSchema","_prepareJsx","getFormApiSchemas","sdk","bean","_newBeanSimple","components","render","schema","rest","blocks","length","domBlocks","forEach","block","index","options","key","domBlock","Array","isArray","push","_createVNode","ZPage","default","_applyDecoratedDescriptor","getOwnPropertyDescriptor","Virtual","Controller","ControllerPageEntry","ControllerPageEntrySchemaParams","ControllerPageEntryCreateSchemaParams","ControllerPageEntryCreate","_dec","_dec2","_dec3","__z_BeanInfo","module","_class","z","BeanControllerPageBase","deepExtend","Use","usePrepareArg","ZovaJsx","Controller","$QueryEnsureLoaded","_isSlot","s","Object","prototype","toString","call","_isVNode","ControllerPageResourceSchemaParams","object","resource","string","ControllerPageResource","_dec","_dec2","__z_BeanInfo","module","_dec3","beanFullName","_dec4","Reflect","metadata","Function","_dec5","_class","_class2","_ControllerPageResource","constructor","args","jsxZova","$$modelResource","$params","__init__","_prepareJsx","apiSchemasSelect","sdk","bean","_newBeanSimple","schemaRow","render","blocks","rest","length","domBlocks","forEach","block","index","options","key","domBlock","Array","isArray","push","_createVNode","ZPage","default","$componentOptions","boundary","retry","_applyDecoratedDescriptor","getOwnPropertyDescriptor","z","BeanControllerPageBase","deepExtend","Use","usePrepareArg","ZovaJsx","Controller","$QueryEnsureLoaded","ZResourcePickerContext","resourcePickerPageHostKey","_isSlot","s","Object","prototype","toString","call","_isVNode","ControllerPageResourcePickerSchemaParams","object","resource","string","ControllerPageResourcePicker","_dec","_dec2","__z_BeanInfo","module","_dec3","beanFullName","_dec4","Reflect","metadata","Function","_dec5","_dec6","name","injectionScope","_dec7","IResourcePickerPageHost","_class","_class2","constructor","args","jsxZova","_initializerDefineProperty","_descriptor","$$modelResource","$params","pickerContext","host","$$pickerHost","Error","options","session","dialog","__init__","bean","_newBeanSimple","apiSchemasSelect","sdk","schemaRow","render","blocks","prepareBlocks","rest","length","domBlocks","forEach","block","index","key","domBlock","Array","isArray","push","_createVNode","default","ZPage","_applyDecoratedDescriptor","getOwnPropertyDescriptor","configurable","enumerable","writable","initializer"],"sources":["../src/lib/deleteRequest.ts","../src/lib/mutationSuccess.ts","../src/lib/selectedIds.ts","../src/model/resource.ts","../src/lib/resourcePicker.ts","../src/component/resourcePickerContext/controller.tsx","../src/page/entry/controller.tsx","../src/page/entryCreate/controller.tsx","../src/page/resource/controller.tsx","../src/.metadata/component/resourcePickerContext.ts","../src/page/resourcePicker/controller.tsx","../src/.metadata/page/entry.ts","../src/.metadata/page/entryCreate.ts","../src/.metadata/page/resource.ts","../src/.metadata/page/resourcePicker.ts","../src/lib/resourceRouteMeta.ts","../src/routes.ts","../src/.metadata/index.ts"],"sourcesContent":["export function prepareDeleteRequestConfig(config, body) {\n if (body === undefined) return config;\n return {\n ...config,\n data: body\n };\n}","export async function runMutationSuccess(options) {\n await options.invalidateSelect?.();\n await options.invalidateItem?.();\n await options.onSuccess?.();\n}","import { isNil } from '@cabloy/utils';\nexport function validateSelectedIds(ids) {\n if (ids.length === 0) throw new Error('selected ids cannot empty');\n const keys = new Set();\n for (const id of ids) {\n if (isNil(id) || id === '') throw new Error('selected row id cannot empty');\n const key = String(id);\n if (keys.has(key)) throw new Error(`duplicate selected row id: ${key}`);\n keys.add(key);\n }\n return [...ids];\n}","var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { hashkey, isNil } from '@cabloy/utils';\nimport { UseScope } from 'zova';\nimport { formSceneFromFormMeta } from 'zova-module-a-form';\nimport { $QueryEnsureLoaded, BeanModelBase, Model } from 'zova-module-a-model';\nimport { SymbolOpenapiSchemaName } from 'zova-module-a-openapi';\nimport { prepareDeleteRequestConfig } from '../lib/deleteRequest.js';\nimport { runMutationSuccess } from '../lib/mutationSuccess.js';\nimport { validateSelectedIds } from '../lib/selectedIds.js';\nexport let ModelResource = (_dec = Model({\n enableSelector: true\n}), _dec2 = __z_BeanInfo({\n module: \"rest-resource\"\n}), _dec3 = UseScope(\"a-openapi\"), _dec4 = Reflect.metadata(\"design:type\", typeof ScopeModuleAOpenapi === \"undefined\" ? Object : ScopeModuleAOpenapi), _dec(_class = _dec2(_class = (_class2 = class ModelResource extends BeanModelBase {\n constructor(...args) {\n super(...args);\n this.resource = void 0;\n this.resourceApi = void 0;\n this.permissions = void 0;\n this.formProvider = void 0;\n this.schemaView = void 0;\n this.schemaCreate = void 0;\n this.schemaUpdate = void 0;\n this.schemaFilter = void 0;\n this.schemaOrder = void 0;\n this.schemaRow = void 0;\n this.schemaPages = void 0;\n _initializerDefineProperty(this, \"$$scopeOpenapi\", _descriptor, this);\n }\n async __init__(resource) {\n if (!resource) throw new Error('resource not specified');\n await super.__init__(resource);\n this.resource = resource;\n this.permissions = this.$computed(() => {\n if (this.$ssr.cookieDisabledOnServer) return;\n const permissions = this.$sdk.getPermissions(this.resource);\n return permissions.data;\n });\n this.formProvider = this.$computed(() => {\n return this.$$scopeOpenapi.config.formProvider;\n });\n this.schemaView = this.$computed(() => {\n return this.apiSchemasView.responseBody;\n });\n this.schemaCreate = this.$computed(() => {\n return this.apiSchemasCreate.requestBody;\n });\n this.schemaUpdate = this.$computed(() => {\n return this.apiSchemasUpdate.requestBody;\n });\n this.schemaFilter = this.$computed(() => {\n return this.apiSchemasSelect.filter;\n });\n this.schemaOrder = this.$computed(() => {\n return this.apiSchemasSelect.order;\n });\n this.schemaRow = this.$computed(() => {\n return this.apiSchemasSelect.row;\n });\n this.schemaPages = this.$computed(() => {\n return this.apiSchemasSelect.paged;\n });\n // bootstrap\n await this._bootstrap();\n }\n selectGeneral(actionPath, query) {\n return this.$useStateData({\n queryKey: this.keySelect(actionPath, query),\n queryFn: async () => {\n const apiPath = actionPath ? `${this.resourceApi}/${actionPath}` : this.resourceApi;\n return this.$fetch.get(this.sys.util.apiActionPathTranslate(apiPath), this.sys.util.apiActionConfigPrepare(undefined, {\n query\n }));\n }\n });\n }\n select(query) {\n return this.selectGeneral(undefined, query);\n }\n query(action, queryFn) {\n return this.$useStateData({\n queryKey: this.keySelect(action),\n queryFn\n });\n }\n queryItem(options) {\n const {\n id,\n action,\n queryFn,\n meta\n } = options;\n if (isNil(id)) throw new Error('row id cannot empty');\n return this.$useStateData({\n queryKey: this.keyItem(id, action),\n queryFn,\n meta\n });\n }\n view(id) {\n return this.queryItem({\n id,\n action: 'view',\n queryFn: async () => {\n const res = await this.$fetch.get(this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, {\n id\n }), this.sys.util.apiActionConfigPrepare());\n return res ?? null;\n }\n });\n }\n create() {\n return this.$useMutationData({\n mutationKey: ['create'],\n mutationFn: async params => {\n return this.$fetch.post(this.sys.util.apiActionPathTranslate(this.resourceApi), params, this.sys.util.apiActionConfigPrepare());\n },\n onSuccess: async () => {\n await runMutationSuccess({\n invalidateSelect: () => this.$invalidateQueries({\n queryKey: ['select']\n })\n });\n }\n });\n }\n mutationItem(options) {\n const {\n id,\n action,\n mutationFn,\n onSuccess,\n invalidateSelect = true\n } = options;\n if (isNil(id)) throw new Error('row id cannot empty');\n return this.$useMutationData({\n mutationKey: [...this.keyItem(id, action), 'mutation'],\n mutationFn,\n onSuccess: async (data, variables, context) => {\n await runMutationSuccess({\n invalidateSelect: invalidateSelect ? () => this.$invalidateQueries({\n queryKey: ['select']\n }) : undefined,\n invalidateItem: () => this.$invalidateQueries({\n queryKey: this.keyItemRoot(id)\n }),\n onSuccess: () => onSuccess?.(data, variables, context)\n });\n }\n });\n }\n mutationSelected(options) {\n const {\n action,\n getIds,\n mutationFn,\n onSuccess,\n invalidateSelect = true\n } = options;\n return this.$useMutationData({\n mutationKey: ['selected', action, 'mutation'],\n mutationFn: async variables => {\n this._getMutationSelectedIds(getIds, variables);\n return await mutationFn(variables);\n },\n onSuccess: async (data, variables, context) => {\n const ids = this._getMutationSelectedIds(getIds, variables);\n await runMutationSuccess({\n invalidateSelect: invalidateSelect ? () => this.$invalidateQueries({\n queryKey: ['select']\n }) : undefined,\n invalidateItem: async () => {\n await Promise.all(ids.map(id => this.$invalidateQueries({\n queryKey: this.keyItemRoot(id)\n })));\n },\n onSuccess: () => onSuccess?.(data, variables, context)\n });\n }\n });\n }\n deleteBulk() {\n return this.mutationSelected({\n action: 'delete',\n getIds: body => body.ids,\n mutationFn: async body => {\n return this.$fetch.post(this.sys.util.apiActionPathTranslate(`${this.resourceApi}/bulk/delete`), body, this.sys.util.apiActionConfigPrepare());\n }\n });\n }\n update(id) {\n return this.mutationItem({\n id,\n action: 'update',\n mutationFn: async params => {\n return this.$fetch.patch(this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, {\n id\n }), params, this.sys.util.apiActionConfigPrepare());\n }\n });\n }\n delete(id) {\n return this.mutationItem({\n id,\n action: 'delete',\n mutationFn: async body => {\n const apiPath = this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, {\n id\n });\n const apiConfig = prepareDeleteRequestConfig(this.sys.util.apiActionConfigPrepare(), body);\n return this.$fetch.delete(apiPath, apiConfig);\n }\n });\n }\n get apiSchemasSelect() {\n return this.$sdk.createApiSchemas(this.resourceApi, 'get');\n }\n get apiSchemasView() {\n return this.$sdk.createApiSchemas(`${this.resourceApi}/:id`, 'get');\n }\n get apiSchemasCreate() {\n return this.$sdk.createApiSchemas(this.resourceApi, 'post');\n }\n get apiSchemasUpdate() {\n return this.$sdk.createApiSchemas(`${this.resourceApi}/:id`, 'patch');\n }\n get apiSchemasDelete() {\n return this.$sdk.createApiSchemas(`${this.resourceApi}/:id`, 'delete');\n }\n getFormSchema(formMeta) {\n const formScene = formMeta.formScene ?? formSceneFromFormMeta(formMeta);\n if (formScene === 'view') return this.schemaView;\n if (formScene === 'create') return this.schemaCreate;\n if (formScene === 'edit') return this.schemaUpdate;\n }\n getFormApiSchemas(formMeta) {\n const formScene = formMeta.formScene ?? formSceneFromFormMeta(formMeta);\n if (formScene === 'view') return this.apiSchemasView;\n if (formScene === 'create') return this.apiSchemasCreate;\n if (formScene === 'edit') return this.apiSchemasUpdate;\n throw new Error('invalid parameters');\n }\n getFormMutationSubmit(formMeta, id) {\n if (formMeta.formMode !== 'edit') return;\n if (formMeta.editMode === 'create') {\n return this.create();\n } else if (formMeta.editMode === 'update') {\n return this.update(id);\n }\n }\n getFormData(formMeta, id) {\n if (formMeta.formMode === 'edit' && formMeta.editMode === 'create') {\n return this.getQueryDataDefaultValue(this.schemaCreate);\n }\n if (isNil(id)) return undefined;\n return this.view(id).data;\n }\n getQueryDataDefaultValue(schemaName) {\n if (!schemaName) return;\n if (typeof schemaName === 'object') {\n schemaName = schemaName[SymbolOpenapiSchemaName];\n }\n return this.$sdk.getSchemaDefaultValue(schemaName);\n }\n _getMutationSelectedIds(getIds, variables) {\n return validateSelectedIds(getIds(variables));\n }\n keySelect(actionPath, query) {\n return ['select', actionPath ?? '', hashkey(query)];\n }\n keyItemRoot(id) {\n if (isNil(id)) throw new Error('row id cannot empty');\n return ['item', id];\n }\n keyItem(id, action) {\n if (isNil(id)) throw new Error('row id cannot empty');\n return ['item', id, action];\n }\n async _bootstrap() {\n const queryBootstrap = await $QueryEnsureLoaded(() => this.$sdk.getBootstrap(this.resource));\n if (!queryBootstrap?.data) {\n throw new Error(`not found sdk of resource: ${this.resource}`);\n }\n this.resourceApi = this.sys.util.parseResourceApi(this.resource, queryBootstrap.data.apiPath);\n }\n}, _descriptor = _applyDecoratedDescriptor(_class2.prototype, \"$$scopeOpenapi\", [_dec3, _dec4], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _class2)) || _class) || _class);","export const resourcePickerPageContextKey = '$resourcePickerPageContext';\nexport const resourcePickerPageHostKey = '$resourcePickerPageHost';","import { BeanControllerBase } from 'zova';\nimport { Controller } from 'zova-module-a-bean';\n\nimport type { IResourcePickerPageContext } from '../../page/resourcePicker/controller.js';\n\nimport { resourcePickerPageContextKey } from '../../lib/resourcePicker.js';\n\nexport interface ControllerResourcePickerContextProps {\n context: IResourcePickerPageContext;\n}\n\n@Controller()\nexport class ControllerResourcePickerContext extends BeanControllerBase {\n static $propsDefault = {};\n\n protected async __init__() {\n this.bean._setBean(\n resourcePickerPageContextKey,\n (this.$props as ControllerResourcePickerContextProps).context,\n );\n }\n\n protected render() {\n return this.$slotDefault?.();\n }\n}\n","import type {\n IFormMeta,\n IFormProvider,\n ISchemaObjectExtensionField,\n IResourceRenderBlockOptionsBlock,\n TypeFormScene,\n} from 'zova-module-a-openapi';\n\nimport { isNil } from '@cabloy/utils';\nimport { VNode } from 'vue';\nimport { z } from 'zod';\nimport { BeanControllerPageBase, deepExtend, Use, usePrepareArg } from 'zova';\nimport { ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport { formMetaFromFormScene } from 'zova-module-a-form';\nimport { $QueryEnsureLoaded } from 'zova-module-a-model';\nimport { ZPage } from 'zova-module-home-base';\n\nimport type { ModelResource } from '../../model/resource.js';\n\nexport const ControllerPageEntrySchemaParams = z.object({\n resource: z.string(),\n id: z.string().optional(),\n formScene: z.string().optional(),\n});\n\n@Controller()\nexport class ControllerPageEntry extends BeanControllerPageBase {\n formMeta: IFormMeta;\n formProvider: IFormProvider;\n formSchema?: ISchemaObjectExtensionField;\n jsxZova: ZovaJsx;\n private _blocks?: IResourceRenderBlockOptionsBlock[];\n\n @Use({ beanFullName: 'rest-resource.model.resource' })\n get $$modelResource(): ModelResource {\n return usePrepareArg(this.$params.resource, true);\n }\n\n get resource() {\n return this.$params.resource;\n }\n\n get entryId() {\n return this.$params.id;\n }\n\n get formScene() {\n return (\n (this.$params.formScene as TypeFormScene | undefined) ??\n (isNil(this.entryId) ? 'create' : 'view')\n );\n }\n\n protected async __init__() {\n this.formMeta = this.$computed(() => {\n return formMetaFromFormScene(this.formScene);\n });\n this.formProvider = this.$computed(() => {\n return this.$$modelResource.formProvider;\n });\n this.formSchema = this.$computed(() => {\n return this.$$modelResource.getFormSchema(this.formMeta);\n });\n // jsx\n this._prepareJsx();\n // load schema\n await $QueryEnsureLoaded(() => this.$$modelResource.getFormApiSchemas(this.formMeta)?.sdk);\n }\n\n private _prepareJsx() {\n this.jsxZova = this.bean._newBeanSimple(ZovaJsx, false, this.formProvider.components);\n }\n\n protected render() {\n const schema = this.formSchema;\n // Keep the mounted editor while the current locale's schema is loading.\n if (schema) this._blocks = schema.rest?.blocks;\n const blocks = this._blocks;\n if (!blocks || blocks.length === 0) return;\n const domBlocks: VNode[] = [];\n blocks.forEach((block, index) => {\n const options = deepExtend(\n { key: index },\n {\n resource: this.resource,\n id: this.entryId,\n formScene: this.formScene,\n },\n block.options,\n );\n const domBlock = this.jsxZova.render(block.render!, options);\n if (!domBlock) return;\n if (Array.isArray(domBlock)) {\n domBlocks.push(...domBlock);\n } else {\n domBlocks.push(domBlock);\n }\n });\n return <ZPage>{domBlocks}</ZPage>;\n }\n}\n","import { Virtual } from 'zova-core';\nimport { Controller } from 'zova-module-a-bean';\n\nimport { ControllerPageEntry, ControllerPageEntrySchemaParams } from '../entry/controller.jsx';\n\nexport const ControllerPageEntryCreateSchemaParams = ControllerPageEntrySchemaParams;\n\n@Controller()\n@Virtual()\nexport class ControllerPageEntryCreate extends ControllerPageEntry {}\n","import { VNode } from 'vue';\nimport { z } from 'zod';\nimport { BeanControllerPageBase, deepExtend, IComponentOptions, Use, usePrepareArg } from 'zova';\nimport { ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport { $QueryEnsureLoaded } from 'zova-module-a-model';\nimport { ZPage } from 'zova-module-home-base';\n\nimport type { ModelResource } from '../../model/resource.js';\n\nexport const ControllerPageResourceSchemaParams = z.object({\n resource: z.string(),\n});\n\n@Controller()\nexport class ControllerPageResource extends BeanControllerPageBase {\n static $componentOptions: IComponentOptions = {\n boundary: { retry: true },\n };\n\n jsxZova: ZovaJsx;\n\n @Use({ beanFullName: 'rest-resource.model.resource' })\n get $$modelResource(): ModelResource {\n return usePrepareArg(this.$params.resource, true);\n }\n\n get resource() {\n return this.$params.resource;\n }\n\n protected async __init__() {\n // jsx\n this._prepareJsx();\n // load schema/data\n await $QueryEnsureLoaded(() => this.$$modelResource.apiSchemasSelect.sdk);\n }\n\n private _prepareJsx() {\n this.jsxZova = this.bean._newBeanSimple(ZovaJsx, false);\n }\n\n get schemaRow() {\n return this.$$modelResource.schemaRow;\n }\n\n public render() {\n const blocks = this.schemaRow?.rest?.blocks;\n if (!blocks || blocks.length === 0) return;\n const domBlocks: VNode[] = [];\n blocks.forEach((block, index) => {\n const options = deepExtend(\n { key: index },\n {\n resource: this.resource,\n },\n block.options,\n );\n const domBlock = this.jsxZova.render(block.render!, options);\n if (!domBlock) return;\n if (Array.isArray(domBlock)) {\n domBlocks.push(...domBlock);\n } else {\n domBlocks.push(domBlock);\n }\n });\n return <ZPage>{domBlocks}</ZPage>;\n }\n}\n","import { defineComponent } from 'vue';\nimport { prepareComponentOptions, useController } from 'zova';\nimport { ControllerResourcePickerContext } from '../../component/resourcePickerContext/controller.jsx';\nexport const ZResourcePickerContext = defineComponent(_props => {\n useController(ControllerResourcePickerContext, undefined, undefined);\n return () => {};\n}, prepareComponentOptions());","import type { VNode } from 'vue';\n\nimport { z } from 'zod';\nimport { BeanControllerPageBase, deepExtend, Use, usePrepareArg } from 'zova';\nimport { ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport { $QueryEnsureLoaded } from 'zova-module-a-model';\nimport { ZPage } from 'zova-module-home-base';\n\nimport type {\n IResourcePickerPageContext,\n IResourcePickerPageHost,\n} from '../../lib/resourcePicker.js';\nimport type { ModelResource } from '../../model/resource.js';\n\nimport { ZResourcePickerContext } from '../../.metadata/component/resourcePickerContext.js';\nimport { resourcePickerPageHostKey } from '../../lib/resourcePicker.js';\n\nexport const ControllerPageResourcePickerSchemaParams = z.object({\n resource: z.string(),\n});\n\n@Controller()\nexport class ControllerPageResourcePicker extends BeanControllerPageBase {\n jsxZova: ZovaJsx;\n\n @Use({ beanFullName: 'rest-resource.model.resource' })\n get $$modelResource(): ModelResource {\n return usePrepareArg(this.resource, true);\n }\n\n @Use({ name: resourcePickerPageHostKey, injectionScope: 'host' })\n $$pickerHost: IResourcePickerPageHost | undefined;\n\n get resource() {\n return this.$params.resource;\n }\n\n get pickerContext(): IResourcePickerPageContext {\n const host = this.$$pickerHost;\n if (!host) {\n throw new Error('resource picker requires a page host');\n }\n const options = host.options;\n const session = host.session;\n if (options.resource !== this.resource) {\n throw new Error('resource picker context does not match route resource');\n }\n return {\n options,\n session,\n dialog: host,\n };\n }\n\n protected async __init__() {\n this.jsxZova = this.bean._newBeanSimple(ZovaJsx, false);\n await $QueryEnsureLoaded(() => this.$$modelResource.apiSchemasSelect.sdk);\n }\n\n get schemaRow() {\n return this.$$modelResource.schemaRow;\n }\n\n public render() {\n const pickerContext = this.pickerContext;\n const blocks = this.$$pickerHost!.prepareBlocks(this.schemaRow?.rest?.blocks, pickerContext);\n if (!blocks || blocks.length === 0) return;\n const domBlocks: VNode[] = [];\n blocks.forEach((block, index) => {\n const options = deepExtend({ key: index }, { resource: this.resource }, block.options);\n const domBlock = this.jsxZova.render(block.render!, options);\n if (!domBlock) return;\n if (Array.isArray(domBlock)) domBlocks.push(...domBlock);\n else domBlocks.push(domBlock);\n });\n return (\n <ZResourcePickerContext context={pickerContext}>\n <ZPage>{domBlocks}</ZPage>\n </ZResourcePickerContext>\n );\n }\n}\n\nexport type { IResourcePickerPageContext } from '../../lib/resourcePicker.js';\n","import { createZovaComponentPage } from 'zova';\nimport { ControllerPageEntry } from '../../page/entry/controller.jsx';\nimport { ControllerPageEntrySchemaParams } from '../../page/entry/controller.jsx';\nexport let NSControllerPageEntry;\n(function (_NSControllerPageEntry) {\n const paramsSchema = _NSControllerPageEntry.paramsSchema = ControllerPageEntrySchemaParams;\n})(NSControllerPageEntry || (NSControllerPageEntry = {}));\nexport const ZPageEntry = createZovaComponentPage(ControllerPageEntry, undefined, undefined);","import { createZovaComponentPage } from 'zova';\nimport { ControllerPageEntryCreate } from '../../page/entryCreate/controller.jsx';\nimport { ControllerPageEntryCreateSchemaParams } from '../../page/entryCreate/controller.jsx';\nexport let NSControllerPageEntryCreate;\n(function (_NSControllerPageEntryCreate) {\n const paramsSchema = _NSControllerPageEntryCreate.paramsSchema = ControllerPageEntryCreateSchemaParams;\n})(NSControllerPageEntryCreate || (NSControllerPageEntryCreate = {}));\nexport const ZPageEntryCreate = createZovaComponentPage(ControllerPageEntryCreate, undefined, undefined);","import { createZovaComponentPage } from 'zova';\nimport { ControllerPageResource } from '../../page/resource/controller.jsx';\nimport { ControllerPageResourceSchemaParams } from '../../page/resource/controller.jsx';\nexport let NSControllerPageResource;\n(function (_NSControllerPageResource) {\n const paramsSchema = _NSControllerPageResource.paramsSchema = ControllerPageResourceSchemaParams;\n})(NSControllerPageResource || (NSControllerPageResource = {}));\nexport const ZPageResource = createZovaComponentPage(ControllerPageResource, undefined, undefined, ControllerPageResource.$componentOptions);","import { createZovaComponentPage } from 'zova';\nimport { ControllerPageResourcePicker } from '../../page/resourcePicker/controller.jsx';\nimport { ControllerPageResourcePickerSchemaParams } from '../../page/resourcePicker/controller.jsx';\nexport let NSControllerPageResourcePicker;\n(function (_NSControllerPageResourcePicker) {\n const paramsSchema = _NSControllerPageResourcePicker.paramsSchema = ControllerPageResourcePickerSchemaParams;\n})(NSControllerPageResourcePicker || (NSControllerPageResourcePicker = {}));\nexport const ZPageResourcePicker = createZovaComponentPage(ControllerPageResourcePicker, undefined, undefined);","export const resourceRouteMeta = {\n tabKey: resourceTabKey,\n componentKey: resourceTabKey,\n ssrProfile: 'session'\n};\nexport function resourceTabKey(route) {\n return `/rest/resource/${encodeURIComponent(route.params.resource)}`;\n}","import { ZPageEntry } from './.metadata/page/entry.js';\nimport { ZPageEntryCreate } from './.metadata/page/entryCreate.js';\nimport { ZPageResource } from './.metadata/page/resource.js';\nimport { ZPageResourcePicker } from './.metadata/page/resourcePicker.js';\nimport { resourceRouteMeta, resourceTabKey } from './lib/resourceRouteMeta.js';\nexport const routes = [{\n name: 'resource',\n path: ':resource',\n component: ZPageResource,\n meta: resourceRouteMeta\n}, {\n name: 'entryCreate',\n path: ':resource/create',\n component: ZPageEntryCreate,\n meta: {\n tabKey: resourceTabKey,\n ssrProfile: 'session'\n }\n}, {\n name: 'resourcePicker',\n path: ':resource/picker',\n component: ZPageResourcePicker,\n meta: {\n ssrProfile: 'session'\n }\n}, {\n name: 'entry',\n path: ':resource/:id/:formScene?',\n component: ZPageEntry,\n meta: {\n tabKey: resourceTabKey,\n ssrProfile: 'session'\n }\n}];","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** model: begin */\nexport * from '../model/resource.js';\nimport 'zova-module-a-model';\n/** model: end */\n/** model: begin */\n\nimport 'zova';\n/** model: end */\n/** controller: begin */\nexport * from '../component/resourcePickerContext/controller.jsx';\nexport * from '../page/entry/controller.jsx';\nexport * from '../page/entryCreate/controller.jsx';\nexport * from '../page/resource/controller.jsx';\nexport * from '../page/resourcePicker/controller.jsx';\nimport 'zova';\n/** controller: end */\n/** controller: begin */\n\nimport 'zova';\n/** controller: end */\n/** pages: begin */\nexport * from './page/entry.js';\nimport { NSControllerPageEntry } from './page/entry.js';\nexport * from './page/entryCreate.js';\nimport { NSControllerPageEntryCreate } from './page/entryCreate.js';\nexport * from './page/resource.js';\nimport { NSControllerPageResource } from './page/resource.js';\nexport * from './page/resourcePicker.js';\nimport { NSControllerPageResourcePicker } from './page/resourcePicker.js';\nexport * from '../routes.js';\nimport 'zova';\nexport const pagePathSchemas = {};\nexport const pageNameSchemas = {\n 'rest-resource:entry': {\n params: NSControllerPageEntry.paramsSchema\n },\n 'rest-resource:entryCreate': {\n params: NSControllerPageEntryCreate.paramsSchema\n },\n 'rest-resource:resource': {\n params: NSControllerPageResource.paramsSchema\n },\n 'rest-resource:resourcePicker': {\n params: NSControllerPageResourcePicker.paramsSchema\n }\n};\n/** pages: end */\n\n/** components: begin */\nexport * from './component/resourcePickerContext.js';\nimport { ZResourcePickerContext } from './component/resourcePickerContext.js';\nexport const components = {\n 'resourcePickerContext': ZResourcePickerContext\n};\nimport 'zova';\n/** components: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleRestResource = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"rest-resource\"\n}), _dec(_class = _dec2(_class = class ScopeModuleRestResource extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */"],"mappings":";;;;;;;;;;;AAAA,SAAgB,2BAA2B,QAAQ,MAAM;CACvD,IAAI,SAAS,KAAA,GAAW,OAAO;CAC/B,OAAO;EACL,GAAG;EACH,MAAM;CACR;AACF;;;ACNA,eAAsB,mBAAmB,SAAS;CAChD,MAAM,QAAQ,mBAAmB;CACjC,MAA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BAAwB,wBAAwB,KAAA,GAAW,KAAA,GAAW,uBAAuB,iBAAiB;;;ACJ3I,IAAW;CACV,SAAU,iCAAiC;CACrB,gCAAgC,eAAe;AACtE,EAAA,CAAG,mCAAmC,iCAAiC,CAAC,EAAE;AAC1E,IAAa,sBAAsB,wBAAwB,8BAA8B,KAAA,GAAW,KAAA,CAAS;;;ACP7G,IAAa,oBAAoB;CAC/B,QAAQ;CACR,cAAc;CACd,YAAY;AACd;AACA,SAAgB,eAAe,OAAO;CACpC,OAAO,kBAAkB,mBAAmB,MAAM,OAAO,QAAQ;AACnE;;;ACFA,IAAa,SAAS;CAAC;EACrB,MAAM;EACN,MAAM;EACN,WAAW;EACX,MAAM;CACR;CAAG;EACD,MAAM;EACN,MAAM;EACN,WAAW;EACX,MAAM;GACJ,QAAQ;GACR,YAAY;EACd;CACF;CAAG;EACD,MAAM;EACN,MAAM;EACN,WAAW;EACX,MAAM,EACJ,YAAY,UACd;CACF;CAAG;EACD,MAAM;EACN,MAAM;EACN,WAAW;EACX,MAAM;GACJ,QAAQ;GACR,YAAY;EACd;CACF;AAAC;;;;;ACjCD,IAAI;AAAM,IAAA;AAAO,IAAA;AAkCjB,IAAa,kBAAkB,CAAC;AAChC,IAAa,kBAAkB;CAC7B,uBAAuB,EACrB,QAAQ,sBAAsB,aAChC;CACA,6BAA6B,EAC3B,QAAQ,4BAA4B,aACtC;CACA,0BAA0B,EACxB,QAAQ,yBAAyB,aACnC;CACA,gCAAgC,EAC9B,QAAQ,+BAA+B,aACzC;AACF;AAMA,IAAa,aAAa,EACxB,yBAAyB,uBAC3B;AAMA,IAAW,2BAA2B,OAAO,MAAM,GAAG,QAAQ,SAAa,EACzE,QAAQ,gBACV,CAAC,GAAG,KAAK,SAAS,MAAM,SAAS,MAAM,gCAAgC,cAAc,CAAC,CAAC,KAAK,MAAM,KAAK"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_dec","_dec2","_dec3","_dec4","_class","_class2","_descriptor","_initializerDefineProperty","_applyDecoratedDescriptor","__z_BeanInfo","BeanControllerBase","Controller","resourcePickerPageContextKey","ControllerResourcePickerContext","_dec","_dec2","__z_BeanInfo","module","_class","_ControllerResourcePickerContext","__init__","bean","_setBean","$props","context","render","$slotDefault","$propsDefault","_dec","_dec2","_class","__z_BeanInfo","isNil","z","BeanControllerPageBase","deepExtend","Use","usePrepareArg","ZovaJsx","Controller","formMetaFromFormScene","$QueryEnsureLoaded","_isSlot","s","Object","prototype","toString","call","_isVNode","ControllerPageEntrySchemaParams","object","resource","string","id","optional","formScene","ControllerPageEntry","_dec","_dec2","__z_BeanInfo","module","_dec3","beanFullName","_dec4","Reflect","metadata","Function","_dec5","_class","_class2","constructor","args","formMeta","formProvider","formSchema","jsxZova","_blocks","$$modelResource","$params","entryId","__init__","$computed","getFormSchema","_prepareJsx","getFormApiSchemas","sdk","bean","_newBeanSimple","components","render","schema","rest","blocks","length","domBlocks","forEach","block","index","options","key","domBlock","Array","isArray","push","_createVNode","ZPage","default","_applyDecoratedDescriptor","getOwnPropertyDescriptor","_dec","_dec2","_dec3","_dec4","_dec5","_class","_class2","_applyDecoratedDescriptor","ZPage","__z_createZovaComponentAsync","_isSlot","_isVNode","__z_BeanInfo","_createVNode","Virtual","Controller","ControllerPageEntry","ControllerPageEntrySchemaParams","ControllerPageEntryCreateSchemaParams","ControllerPageEntryCreate","_dec","_dec2","_dec3","__z_BeanInfo","module","_class","_dec","_dec2","_dec3","_class","__z_BeanInfo","z","BeanControllerPageBase","deepExtend","Use","usePrepareArg","ZovaJsx","Controller","$QueryEnsureLoaded","_isSlot","s","Object","prototype","toString","call","_isVNode","ControllerPageResourceSchemaParams","object","resource","string","ControllerPageResource","_dec","_dec2","__z_BeanInfo","module","_dec3","beanFullName","_dec4","Reflect","metadata","Function","_dec5","_class","_class2","_ControllerPageResource","constructor","args","jsxZova","$$modelResource","$params","__init__","_prepareJsx","apiSchemasSelect","sdk","bean","_newBeanSimple","schemaRow","render","blocks","rest","length","domBlocks","forEach","block","index","options","key","domBlock","Array","isArray","push","_createVNode","ZPage","default","$componentOptions","boundary","retry","_applyDecoratedDescriptor","getOwnPropertyDescriptor","_dec","_dec2","_dec3","_dec4","_dec5","_class","_class2","_applyDecoratedDescriptor","ZPage","__z_createZovaComponentAsync","_isSlot","_isVNode","__z_BeanInfo","_createVNode","z","BeanControllerPageBase","deepExtend","Use","usePrepareArg","ZovaJsx","Controller","$QueryEnsureLoaded","ZResourcePickerContext","resourcePickerPageHostKey","_isSlot","s","Object","prototype","toString","call","_isVNode","ControllerPageResourcePickerSchemaParams","object","resource","string","ControllerPageResourcePicker","_dec","_dec2","__z_BeanInfo","module","_dec3","beanFullName","_dec4","Reflect","metadata","Function","_dec5","_dec6","name","injectionScope","_dec7","IResourcePickerPageHost","_class","_class2","constructor","args","jsxZova","_initializerDefineProperty","_descriptor","$$modelResource","$params","pickerContext","host","$$pickerHost","Error","options","session","dialog","__init__","bean","_newBeanSimple","apiSchemasSelect","sdk","schemaRow","render","blocks","prepareBlocks","rest","length","domBlocks","forEach","block","index","key","domBlock","Array","isArray","push","_createVNode","default","ZPage","_applyDecoratedDescriptor","getOwnPropertyDescriptor","configurable","enumerable","writable","initializer","_dec","_dec2","_class","__z_createZovaComponentAsync","_isVNode","__z_BeanInfo","_createVNode","__z_BeanInfo"],"sources":["../src/lib/deleteRequest.ts","../src/lib/mutationSuccess.ts","../src/lib/selectedIds.ts","../src/model/resource.ts","../src/lib/resourcePicker.ts","../src/component/resourcePickerContext/controller.tsx","../src/page/entry/controller.tsx","../src/page/entryCreate/controller.tsx","../src/page/resource/controller.tsx","../src/.metadata/component/resourcePickerContext.ts","../src/page/resourcePicker/controller.tsx","../src/.metadata/page/entry.ts","../src/.metadata/page/entryCreate.ts","../src/.metadata/page/resource.ts","../src/.metadata/page/resourcePicker.ts","../src/lib/resourceRouteMeta.ts","../src/routes.ts","../src/.metadata/index.ts"],"sourcesContent":["export function prepareDeleteRequestConfig(config, body) {\n if (body === undefined) return config;\n return {\n ...config,\n data: body\n };\n}","export async function runMutationSuccess(options) {\n await options.invalidateSelect?.();\n await options.invalidateItem?.();\n await options.onSuccess?.();\n}","import { isNil } from '@cabloy/utils';\nexport function validateSelectedIds(ids) {\n if (ids.length === 0) throw new Error('selected ids cannot empty');\n const keys = new Set();\n for (const id of ids) {\n if (isNil(id) || id === '') throw new Error('selected row id cannot empty');\n const key = String(id);\n if (keys.has(key)) throw new Error(`duplicate selected row id: ${key}`);\n keys.add(key);\n }\n return [...ids];\n}","var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { hashkey, isNil } from '@cabloy/utils';\nimport { UseScope } from 'zova';\nimport { formSceneFromFormMeta } from 'zova-module-a-form';\nimport { $QueryEnsureLoaded, BeanModelBase, Model } from 'zova-module-a-model';\nimport { SymbolOpenapiSchemaName } from 'zova-module-a-openapi';\nimport { prepareDeleteRequestConfig } from '../lib/deleteRequest.ts';\nimport { runMutationSuccess } from '../lib/mutationSuccess.ts';\nimport { validateSelectedIds } from '../lib/selectedIds.ts';\nexport let ModelResource = (_dec = Model({\n enableSelector: true\n}), _dec2 = __z_BeanInfo({\n module: \"rest-resource\"\n}), _dec3 = UseScope(\"a-openapi\"), _dec4 = Reflect.metadata(\"design:type\", typeof ScopeModuleAOpenapi === \"undefined\" ? Object : ScopeModuleAOpenapi), _dec(_class = _dec2(_class = (_class2 = class ModelResource extends BeanModelBase {\n constructor(...args) {\n super(...args);\n this.resource = void 0;\n this.resourceApi = void 0;\n this.permissions = void 0;\n this.formProvider = void 0;\n this.schemaView = void 0;\n this.schemaCreate = void 0;\n this.schemaUpdate = void 0;\n this.schemaFilter = void 0;\n this.schemaOrder = void 0;\n this.schemaRow = void 0;\n this.schemaPages = void 0;\n _initializerDefineProperty(this, \"$$scopeOpenapi\", _descriptor, this);\n }\n async __init__(resource) {\n if (!resource) throw new Error('resource not specified');\n await super.__init__(resource);\n this.resource = resource;\n this.permissions = this.$computed(() => {\n if (this.$ssr.cookieDisabledOnServer) return;\n const permissions = this.$sdk.getPermissions(this.resource);\n return permissions.data;\n });\n this.formProvider = this.$computed(() => {\n return this.$$scopeOpenapi.config.formProvider;\n });\n this.schemaView = this.$computed(() => {\n return this.apiSchemasView.responseBody;\n });\n this.schemaCreate = this.$computed(() => {\n return this.apiSchemasCreate.requestBody;\n });\n this.schemaUpdate = this.$computed(() => {\n return this.apiSchemasUpdate.requestBody;\n });\n this.schemaFilter = this.$computed(() => {\n return this.apiSchemasSelect.filter;\n });\n this.schemaOrder = this.$computed(() => {\n return this.apiSchemasSelect.order;\n });\n this.schemaRow = this.$computed(() => {\n return this.apiSchemasSelect.row;\n });\n this.schemaPages = this.$computed(() => {\n return this.apiSchemasSelect.paged;\n });\n // bootstrap\n await this._bootstrap();\n }\n selectGeneral(actionPath, query) {\n return this.$useStateData({\n queryKey: this.keySelect(actionPath, query),\n queryFn: async () => {\n const apiPath = actionPath ? `${this.resourceApi}/${actionPath}` : this.resourceApi;\n return this.$fetch.get(this.sys.util.apiActionPathTranslate(apiPath), this.sys.util.apiActionConfigPrepare(undefined, {\n query\n }));\n }\n });\n }\n select(query) {\n return this.selectGeneral(undefined, query);\n }\n query(action, queryFn) {\n return this.$useStateData({\n queryKey: this.keySelect(action),\n queryFn\n });\n }\n queryItem(options) {\n const {\n id,\n action,\n queryFn,\n meta\n } = options;\n if (isNil(id)) throw new Error('row id cannot empty');\n return this.$useStateData({\n queryKey: this.keyItem(id, action),\n queryFn,\n meta\n });\n }\n view(id) {\n return this.queryItem({\n id,\n action: 'view',\n queryFn: async () => {\n const res = await this.$fetch.get(this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, {\n id\n }), this.sys.util.apiActionConfigPrepare());\n return res ?? null;\n }\n });\n }\n create() {\n return this.$useMutationData({\n mutationKey: ['create'],\n mutationFn: async params => {\n return this.$fetch.post(this.sys.util.apiActionPathTranslate(this.resourceApi), params, this.sys.util.apiActionConfigPrepare());\n },\n onSuccess: async () => {\n await runMutationSuccess({\n invalidateSelect: () => this.$invalidateQueries({\n queryKey: ['select']\n })\n });\n }\n });\n }\n mutationItem(options) {\n const {\n id,\n action,\n mutationFn,\n onSuccess,\n invalidateSelect = true\n } = options;\n if (isNil(id)) throw new Error('row id cannot empty');\n return this.$useMutationData({\n mutationKey: [...this.keyItem(id, action), 'mutation'],\n mutationFn,\n onSuccess: async (data, variables, context) => {\n await runMutationSuccess({\n invalidateSelect: invalidateSelect ? () => this.$invalidateQueries({\n queryKey: ['select']\n }) : undefined,\n invalidateItem: () => this.$invalidateQueries({\n queryKey: this.keyItemRoot(id)\n }),\n onSuccess: () => onSuccess?.(data, variables, context)\n });\n }\n });\n }\n mutationSelected(options) {\n const {\n action,\n getIds,\n mutationFn,\n onSuccess,\n invalidateSelect = true\n } = options;\n return this.$useMutationData({\n mutationKey: ['selected', action, 'mutation'],\n mutationFn: async variables => {\n this._getMutationSelectedIds(getIds, variables);\n return await mutationFn(variables);\n },\n onSuccess: async (data, variables, context) => {\n const ids = this._getMutationSelectedIds(getIds, variables);\n await runMutationSuccess({\n invalidateSelect: invalidateSelect ? () => this.$invalidateQueries({\n queryKey: ['select']\n }) : undefined,\n invalidateItem: async () => {\n await Promise.all(ids.map(id => this.$invalidateQueries({\n queryKey: this.keyItemRoot(id)\n })));\n },\n onSuccess: () => onSuccess?.(data, variables, context)\n });\n }\n });\n }\n deleteBulk() {\n return this.mutationSelected({\n action: 'delete',\n getIds: body => body.ids,\n mutationFn: async body => {\n return this.$fetch.post(this.sys.util.apiActionPathTranslate(`${this.resourceApi}/bulk/delete`), body, this.sys.util.apiActionConfigPrepare());\n }\n });\n }\n update(id) {\n return this.mutationItem({\n id,\n action: 'update',\n mutationFn: async params => {\n return this.$fetch.patch(this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, {\n id\n }), params, this.sys.util.apiActionConfigPrepare());\n }\n });\n }\n delete(id) {\n return this.mutationItem({\n id,\n action: 'delete',\n mutationFn: async body => {\n const apiPath = this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, {\n id\n });\n const apiConfig = prepareDeleteRequestConfig(this.sys.util.apiActionConfigPrepare(), body);\n return this.$fetch.delete(apiPath, apiConfig);\n }\n });\n }\n get apiSchemasSelect() {\n return this.$sdk.createApiSchemas(this.resourceApi, 'get');\n }\n get apiSchemasView() {\n return this.$sdk.createApiSchemas(`${this.resourceApi}/:id`, 'get');\n }\n get apiSchemasCreate() {\n return this.$sdk.createApiSchemas(this.resourceApi, 'post');\n }\n get apiSchemasUpdate() {\n return this.$sdk.createApiSchemas(`${this.resourceApi}/:id`, 'patch');\n }\n get apiSchemasDelete() {\n return this.$sdk.createApiSchemas(`${this.resourceApi}/:id`, 'delete');\n }\n getFormSchema(formMeta) {\n const formScene = formMeta.formScene ?? formSceneFromFormMeta(formMeta);\n if (formScene === 'view') return this.schemaView;\n if (formScene === 'create') return this.schemaCreate;\n if (formScene === 'edit') return this.schemaUpdate;\n }\n getFormApiSchemas(formMeta) {\n const formScene = formMeta.formScene ?? formSceneFromFormMeta(formMeta);\n if (formScene === 'view') return this.apiSchemasView;\n if (formScene === 'create') return this.apiSchemasCreate;\n if (formScene === 'edit') return this.apiSchemasUpdate;\n throw new Error('invalid parameters');\n }\n getFormMutationSubmit(formMeta, id) {\n if (formMeta.formMode !== 'edit') return;\n if (formMeta.editMode === 'create') {\n return this.create();\n } else if (formMeta.editMode === 'update') {\n return this.update(id);\n }\n }\n getFormData(formMeta, id) {\n if (formMeta.formMode === 'edit' && formMeta.editMode === 'create') {\n return this.getQueryDataDefaultValue(this.schemaCreate);\n }\n if (isNil(id)) return undefined;\n return this.view(id).data;\n }\n getQueryDataDefaultValue(schemaName) {\n if (!schemaName) return;\n if (typeof schemaName === 'object') {\n schemaName = schemaName[SymbolOpenapiSchemaName];\n }\n return this.$sdk.getSchemaDefaultValue(schemaName);\n }\n _getMutationSelectedIds(getIds, variables) {\n return validateSelectedIds(getIds(variables));\n }\n keySelect(actionPath, query) {\n return ['select', actionPath ?? '', hashkey(query)];\n }\n keyItemRoot(id) {\n if (isNil(id)) throw new Error('row id cannot empty');\n return ['item', id];\n }\n keyItem(id, action) {\n if (isNil(id)) throw new Error('row id cannot empty');\n return ['item', id, action];\n }\n async _bootstrap() {\n const queryBootstrap = await $QueryEnsureLoaded(() => this.$sdk.getBootstrap(this.resource));\n if (!queryBootstrap?.data) {\n throw new Error(`not found sdk of resource: ${this.resource}`);\n }\n this.resourceApi = this.sys.util.parseResourceApi(this.resource, queryBootstrap.data.apiPath);\n }\n}, _descriptor = _applyDecoratedDescriptor(_class2.prototype, \"$$scopeOpenapi\", [_dec3, _dec4], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _class2)) || _class) || _class);","export const resourcePickerPageContextKey = '$resourcePickerPageContext';\nexport const resourcePickerPageHostKey = '$resourcePickerPageHost';","import { BeanControllerBase } from 'zova';\nimport { Controller } from 'zova-module-a-bean';\n\nimport type { IResourcePickerPageContext } from '../../page/resourcePicker/controller.tsx';\n\nimport { resourcePickerPageContextKey } from '../../lib/resourcePicker.ts';\n\nexport interface ControllerResourcePickerContextProps {\n context: IResourcePickerPageContext;\n}\n\n@Controller()\nexport class ControllerResourcePickerContext extends BeanControllerBase {\n static $propsDefault = {};\n\n protected async __init__() {\n this.bean._setBean(\n resourcePickerPageContextKey,\n (this.$props as ControllerResourcePickerContextProps).context,\n );\n }\n\n protected render() {\n return this.$slotDefault?.();\n }\n}\n","import type {\n IFormMeta,\n IFormProvider,\n ISchemaObjectExtensionField,\n IResourceRenderBlockOptionsBlock,\n TypeFormScene,\n} from 'zova-module-a-openapi';\n\nimport { isNil } from '@cabloy/utils';\nimport { VNode } from 'vue';\nimport { z } from 'zod';\nimport { BeanControllerPageBase, deepExtend, Use, usePrepareArg } from 'zova';\nimport { ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport { formMetaFromFormScene } from 'zova-module-a-form';\nimport { $QueryEnsureLoaded } from 'zova-module-a-model';\nimport { ZPage } from 'zova-module-home-base';\n\nimport type { ModelResource } from '../../model/resource.ts';\n\nexport const ControllerPageEntrySchemaParams = z.object({\n resource: z.string(),\n id: z.string().optional(),\n formScene: z.string().optional(),\n});\n\n@Controller()\nexport class ControllerPageEntry extends BeanControllerPageBase {\n formMeta: IFormMeta;\n formProvider: IFormProvider;\n formSchema?: ISchemaObjectExtensionField;\n jsxZova: ZovaJsx;\n private _blocks?: IResourceRenderBlockOptionsBlock[];\n\n @Use({ beanFullName: 'rest-resource.model.resource' })\n get $$modelResource(): ModelResource {\n return usePrepareArg(this.$params.resource, true);\n }\n\n get resource() {\n return this.$params.resource;\n }\n\n get entryId() {\n return this.$params.id;\n }\n\n get formScene() {\n return (\n (this.$params.formScene as TypeFormScene | undefined) ??\n (isNil(this.entryId) ? 'create' : 'view')\n );\n }\n\n protected async __init__() {\n this.formMeta = this.$computed(() => {\n return formMetaFromFormScene(this.formScene);\n });\n this.formProvider = this.$computed(() => {\n return this.$$modelResource.formProvider;\n });\n this.formSchema = this.$computed(() => {\n return this.$$modelResource.getFormSchema(this.formMeta);\n });\n // jsx\n this._prepareJsx();\n // load schema\n await $QueryEnsureLoaded(() => this.$$modelResource.getFormApiSchemas(this.formMeta)?.sdk);\n }\n\n private _prepareJsx() {\n this.jsxZova = this.bean._newBeanSimple(ZovaJsx, false, this.formProvider.components);\n }\n\n protected render() {\n const schema = this.formSchema;\n // Keep the mounted editor while the current locale's schema is loading.\n if (schema) this._blocks = schema.rest?.blocks;\n const blocks = this._blocks;\n if (!blocks || blocks.length === 0) return;\n const domBlocks: VNode[] = [];\n blocks.forEach((block, index) => {\n const options = deepExtend(\n { key: index },\n {\n resource: this.resource,\n id: this.entryId,\n formScene: this.formScene,\n },\n block.options,\n );\n const domBlock = this.jsxZova.render(block.render!, options);\n if (!domBlock) return;\n if (Array.isArray(domBlock)) {\n domBlocks.push(...domBlock);\n } else {\n domBlocks.push(domBlock);\n }\n });\n return <ZPage>{domBlocks}</ZPage>;\n }\n}\n","import { Virtual } from 'zova-core';\nimport { Controller } from 'zova-module-a-bean';\n\nimport { ControllerPageEntry, ControllerPageEntrySchemaParams } from '../entry/controller.tsx';\n\nexport const ControllerPageEntryCreateSchemaParams = ControllerPageEntrySchemaParams;\n\n@Controller()\n@Virtual()\nexport class ControllerPageEntryCreate extends ControllerPageEntry {}\n","import { VNode } from 'vue';\nimport { z } from 'zod';\nimport { BeanControllerPageBase, deepExtend, IComponentOptions, Use, usePrepareArg } from 'zova';\nimport { ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport { $QueryEnsureLoaded } from 'zova-module-a-model';\nimport { ZPage } from 'zova-module-home-base';\n\nimport type { ModelResource } from '../../model/resource.ts';\n\nexport const ControllerPageResourceSchemaParams = z.object({\n resource: z.string(),\n});\n\n@Controller()\nexport class ControllerPageResource extends BeanControllerPageBase {\n static $componentOptions: IComponentOptions = {\n boundary: { retry: true },\n };\n\n jsxZova: ZovaJsx;\n\n @Use({ beanFullName: 'rest-resource.model.resource' })\n get $$modelResource(): ModelResource {\n return usePrepareArg(this.$params.resource, true);\n }\n\n get resource() {\n return this.$params.resource;\n }\n\n protected async __init__() {\n // jsx\n this._prepareJsx();\n // load schema/data\n await $QueryEnsureLoaded(() => this.$$modelResource.apiSchemasSelect.sdk);\n }\n\n private _prepareJsx() {\n this.jsxZova = this.bean._newBeanSimple(ZovaJsx, false);\n }\n\n get schemaRow() {\n return this.$$modelResource.schemaRow;\n }\n\n public render() {\n const blocks = this.schemaRow?.rest?.blocks;\n if (!blocks || blocks.length === 0) return;\n const domBlocks: VNode[] = [];\n blocks.forEach((block, index) => {\n const options = deepExtend(\n { key: index },\n {\n resource: this.resource,\n },\n block.options,\n );\n const domBlock = this.jsxZova.render(block.render!, options);\n if (!domBlock) return;\n if (Array.isArray(domBlock)) {\n domBlocks.push(...domBlock);\n } else {\n domBlocks.push(domBlock);\n }\n });\n return <ZPage>{domBlocks}</ZPage>;\n }\n}\n","import { defineComponent } from 'vue';\nimport { prepareComponentOptions, useController } from 'zova';\nimport { ControllerResourcePickerContext } from '../../component/resourcePickerContext/controller.tsx';\nexport const ZResourcePickerContext = defineComponent(_props => {\n useController(ControllerResourcePickerContext, undefined, undefined);\n return () => {};\n}, prepareComponentOptions());","import type { VNode } from 'vue';\n\nimport { z } from 'zod';\nimport { BeanControllerPageBase, deepExtend, Use, usePrepareArg } from 'zova';\nimport { ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport { $QueryEnsureLoaded } from 'zova-module-a-model';\nimport { ZPage } from 'zova-module-home-base';\n\nimport type {\n IResourcePickerPageContext,\n IResourcePickerPageHost,\n} from '../../lib/resourcePicker.ts';\nimport type { ModelResource } from '../../model/resource.ts';\n\nimport { ZResourcePickerContext } from '../../.metadata/component/resourcePickerContext.ts';\nimport { resourcePickerPageHostKey } from '../../lib/resourcePicker.ts';\n\nexport const ControllerPageResourcePickerSchemaParams = z.object({\n resource: z.string(),\n});\n\n@Controller()\nexport class ControllerPageResourcePicker extends BeanControllerPageBase {\n jsxZova: ZovaJsx;\n\n @Use({ beanFullName: 'rest-resource.model.resource' })\n get $$modelResource(): ModelResource {\n return usePrepareArg(this.resource, true);\n }\n\n @Use({ name: resourcePickerPageHostKey, injectionScope: 'host' })\n $$pickerHost: IResourcePickerPageHost | undefined;\n\n get resource() {\n return this.$params.resource;\n }\n\n get pickerContext(): IResourcePickerPageContext {\n const host = this.$$pickerHost;\n if (!host) {\n throw new Error('resource picker requires a page host');\n }\n const options = host.options;\n const session = host.session;\n if (options.resource !== this.resource) {\n throw new Error('resource picker context does not match route resource');\n }\n return {\n options,\n session,\n dialog: host,\n };\n }\n\n protected async __init__() {\n this.jsxZova = this.bean._newBeanSimple(ZovaJsx, false);\n await $QueryEnsureLoaded(() => this.$$modelResource.apiSchemasSelect.sdk);\n }\n\n get schemaRow() {\n return this.$$modelResource.schemaRow;\n }\n\n public render() {\n const pickerContext = this.pickerContext;\n const blocks = this.$$pickerHost!.prepareBlocks(this.schemaRow?.rest?.blocks, pickerContext);\n if (!blocks || blocks.length === 0) return;\n const domBlocks: VNode[] = [];\n blocks.forEach((block, index) => {\n const options = deepExtend({ key: index }, { resource: this.resource }, block.options);\n const domBlock = this.jsxZova.render(block.render!, options);\n if (!domBlock) return;\n if (Array.isArray(domBlock)) domBlocks.push(...domBlock);\n else domBlocks.push(domBlock);\n });\n return (\n <ZResourcePickerContext context={pickerContext}>\n <ZPage>{domBlocks}</ZPage>\n </ZResourcePickerContext>\n );\n }\n}\n\nexport type { IResourcePickerPageContext } from '../../lib/resourcePicker.ts';\n","import { createZovaComponentPage } from 'zova';\nimport { ControllerPageEntry } from '../../page/entry/controller.tsx';\nimport { ControllerPageEntrySchemaParams } from '../../page/entry/controller.tsx';\nexport let NSControllerPageEntry;\n(function (_NSControllerPageEntry) {\n const paramsSchema = _NSControllerPageEntry.paramsSchema = ControllerPageEntrySchemaParams;\n})(NSControllerPageEntry || (NSControllerPageEntry = {}));\nexport const ZPageEntry = createZovaComponentPage(ControllerPageEntry, undefined, undefined);","import { createZovaComponentPage } from 'zova';\nimport { ControllerPageEntryCreate } from '../../page/entryCreate/controller.tsx';\nimport { ControllerPageEntryCreateSchemaParams } from '../../page/entryCreate/controller.tsx';\nexport let NSControllerPageEntryCreate;\n(function (_NSControllerPageEntryCreate) {\n const paramsSchema = _NSControllerPageEntryCreate.paramsSchema = ControllerPageEntryCreateSchemaParams;\n})(NSControllerPageEntryCreate || (NSControllerPageEntryCreate = {}));\nexport const ZPageEntryCreate = createZovaComponentPage(ControllerPageEntryCreate, undefined, undefined);","import { createZovaComponentPage } from 'zova';\nimport { ControllerPageResource } from '../../page/resource/controller.tsx';\nimport { ControllerPageResourceSchemaParams } from '../../page/resource/controller.tsx';\nexport let NSControllerPageResource;\n(function (_NSControllerPageResource) {\n const paramsSchema = _NSControllerPageResource.paramsSchema = ControllerPageResourceSchemaParams;\n})(NSControllerPageResource || (NSControllerPageResource = {}));\nexport const ZPageResource = createZovaComponentPage(ControllerPageResource, undefined, undefined, ControllerPageResource.$componentOptions);","import { createZovaComponentPage } from 'zova';\nimport { ControllerPageResourcePicker } from '../../page/resourcePicker/controller.tsx';\nimport { ControllerPageResourcePickerSchemaParams } from '../../page/resourcePicker/controller.tsx';\nexport let NSControllerPageResourcePicker;\n(function (_NSControllerPageResourcePicker) {\n const paramsSchema = _NSControllerPageResourcePicker.paramsSchema = ControllerPageResourcePickerSchemaParams;\n})(NSControllerPageResourcePicker || (NSControllerPageResourcePicker = {}));\nexport const ZPageResourcePicker = createZovaComponentPage(ControllerPageResourcePicker, undefined, undefined);","export const resourceRouteMeta = {\n tabKey: resourceTabKey,\n componentKey: resourceTabKey,\n ssrProfile: 'session'\n};\nexport function resourceTabKey(route) {\n return `/rest/resource/${encodeURIComponent(route.params.resource)}`;\n}","import { ZPageEntry } from './.metadata/page/entry.ts';\nimport { ZPageEntryCreate } from './.metadata/page/entryCreate.ts';\nimport { ZPageResource } from './.metadata/page/resource.ts';\nimport { ZPageResourcePicker } from './.metadata/page/resourcePicker.ts';\nimport { resourceRouteMeta, resourceTabKey } from './lib/resourceRouteMeta.ts';\nexport const routes = [{\n name: 'resource',\n path: ':resource',\n component: ZPageResource,\n meta: resourceRouteMeta\n}, {\n name: 'entryCreate',\n path: ':resource/create',\n component: ZPageEntryCreate,\n meta: {\n tabKey: resourceTabKey,\n ssrProfile: 'session'\n }\n}, {\n name: 'resourcePicker',\n path: ':resource/picker',\n component: ZPageResourcePicker,\n meta: {\n ssrProfile: 'session'\n }\n}, {\n name: 'entry',\n path: ':resource/:id/:formScene?',\n component: ZPageEntry,\n meta: {\n tabKey: resourceTabKey,\n ssrProfile: 'session'\n }\n}];","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** model: begin */\nexport * from '../model/resource.ts';\nimport 'zova-module-a-model';\n/** model: end */\n/** model: begin */\n\nimport 'zova';\n/** model: end */\n/** controller: begin */\nexport * from '../component/resourcePickerContext/controller.tsx';\nexport * from '../page/entry/controller.tsx';\nexport * from '../page/entryCreate/controller.tsx';\nexport * from '../page/resource/controller.tsx';\nexport * from '../page/resourcePicker/controller.tsx';\nimport 'zova';\n/** controller: end */\n/** controller: begin */\n\nimport 'zova';\n/** controller: end */\n/** pages: begin */\nexport * from './page/entry.ts';\nimport { NSControllerPageEntry } from './page/entry.ts';\nexport * from './page/entryCreate.ts';\nimport { NSControllerPageEntryCreate } from './page/entryCreate.ts';\nexport * from './page/resource.ts';\nimport { NSControllerPageResource } from './page/resource.ts';\nexport * from './page/resourcePicker.ts';\nimport { NSControllerPageResourcePicker } from './page/resourcePicker.ts';\nexport * from '../routes.ts';\nimport 'zova';\nexport const pagePathSchemas = {};\nexport const pageNameSchemas = {\n 'rest-resource:entry': {\n params: NSControllerPageEntry.paramsSchema\n },\n 'rest-resource:entryCreate': {\n params: NSControllerPageEntryCreate.paramsSchema\n },\n 'rest-resource:resource': {\n params: NSControllerPageResource.paramsSchema\n },\n 'rest-resource:resourcePicker': {\n params: NSControllerPageResourcePicker.paramsSchema\n }\n};\n/** pages: end */\n\n/** components: begin */\nexport * from './component/resourcePickerContext.ts';\nimport { ZResourcePickerContext } from './component/resourcePickerContext.ts';\nexport const components = {\n 'resourcePickerContext': ZResourcePickerContext\n};\nimport 'zova';\n/** components: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleRestResource = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"rest-resource\"\n}), _dec(_class = _dec2(_class = class ScopeModuleRestResource extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */"],"mappings":";;;;;;;;;;;AAAA,SAAgB,2BAA2B,QAAQ,MAAM;CACvD,IAAI,SAAS,KAAA,GAAW,OAAO;CAC/B,OAAO;EACL,GAAG;EACH,MAAM;CACR;AACF;;;ACNA,eAAsB,mBAAmB,SAAS;CAChD,MAAM,QAAQ,mBAAmB;CACjC,MAAM,QAAQ,iBAAiB;CAC/B,MAAM,QAAQ,YAAY;AAC5B;;;ACHA,SAAgB,oBAAoB,KAAK;CACvC,IAAI,IAAI,WAAW,GAAG,MAAM,IAAI,MAAM,2BAA2B;CACjE,MAAM,uBAAO,IAAI,IAAI;CACrB,KAAK,MAAM,MAAM,KAAK;EACpB,IAAI,MAAM,EAAE,KAAK,OAAO,IAAI,MAAM,IAAI,MAAM,8BAA8B;EAC1E,MAAM,MAAM,OAAO,EAAE;EACrB,IAAI,KAAK,IAAI,GAAG,GAAG,MAAM,IAAI,MAAM,8BAA8B,KAAK;EACtE,KAAK,IAAI,GAAG;CACd;CACA,OAAO,CAAC,GAAG,GAAG;AAChB;;;ACXA,IAAIA;AAAMC,IAAAA;AAAOC,IAAAA;AAAOC,IAAAA;AAAOC,IAAAA;AAAQC,IAAAA;AAASC,IAAAA;AAChD,SAASC,6BAA2B,GAAG,GAAG,GAAG,GAAG;CAAE,KAAK,OAAO,eAAe,GAAG,GAAG;EAAE,YAAY,EAAE;EAAY,cAAc,EAAE;EAAc,UAAU,EAAE;EAAU,OAAO,EAAE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,YAAY;EACd;CACF;AAAC;;;ACjCD,IAAI;AAAM,IAAA;AAAO,IAAA;AAkCjB,IAAa,kBAAkB,CAAC;AAChC,IAAa,kBAAkB;CAC7B,uBAAuB,EACrB,QAAQ,sBAAsB,aAChC;CACA,6BAA6B,EAC3B,QAAQ,4BAA4B,aACtC;CACA,0BAA0B,EACxB,QAAQ,yBAAyB,aACnC;CACA,gCAAgC,EAC9B,QAAQ,+BAA+B,aACzC;AACF;AAMA,IAAa,aAAa,EACxB,yBAAyB,uBAC3B;AAMA,IAAW,2BAA2B,OAAO,MAAM,GAAG,QAAQoD,SAAa,EACzE,QAAQ,gBACV,CAAC,GAAG,KAAK,SAAS,MAAM,SAAS,MAAM,gCAAgC,cAAc,CAAC,CAAC,KAAK,MAAM,KAAK"}
|
|
@@ -2,7 +2,7 @@ import type { IFormMeta, IFormProvider, ISchemaObjectExtensionField, TypeFormSce
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { BeanControllerPageBase } from 'zova';
|
|
4
4
|
import { ZovaJsx } from 'zova-jsx';
|
|
5
|
-
import type { ModelResource } from '../../model/resource.
|
|
5
|
+
import type { ModelResource } from '../../model/resource.ts';
|
|
6
6
|
export declare const ControllerPageEntrySchemaParams: z.ZodObject<{
|
|
7
7
|
resource: z.ZodString;
|
|
8
8
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ControllerPageEntry } from '../entry/controller.
|
|
1
|
+
import { ControllerPageEntry } from '../entry/controller.tsx';
|
|
2
2
|
export declare const ControllerPageEntryCreateSchemaParams: import("zod").ZodObject<{
|
|
3
3
|
resource: import("zod").ZodString;
|
|
4
4
|
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BeanControllerPageBase, IComponentOptions } from 'zova';
|
|
3
3
|
import { ZovaJsx } from 'zova-jsx';
|
|
4
|
-
import type { ModelResource } from '../../model/resource.
|
|
4
|
+
import type { ModelResource } from '../../model/resource.ts';
|
|
5
5
|
export declare const ControllerPageResourceSchemaParams: z.ZodObject<{
|
|
6
6
|
resource: z.ZodString;
|
|
7
7
|
}, z.core.$strip>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BeanControllerPageBase } from 'zova';
|
|
3
3
|
import { ZovaJsx } from 'zova-jsx';
|
|
4
|
-
import type { IResourcePickerPageContext, IResourcePickerPageHost } from '../../lib/resourcePicker.
|
|
5
|
-
import type { ModelResource } from '../../model/resource.
|
|
4
|
+
import type { IResourcePickerPageContext, IResourcePickerPageHost } from '../../lib/resourcePicker.ts';
|
|
5
|
+
import type { ModelResource } from '../../model/resource.ts';
|
|
6
6
|
export declare const ControllerPageResourcePickerSchemaParams: z.ZodObject<{
|
|
7
7
|
resource: z.ZodString;
|
|
8
8
|
}, z.core.$strip>;
|
|
@@ -16,5 +16,5 @@ export declare class ControllerPageResourcePicker extends BeanControllerPageBase
|
|
|
16
16
|
get schemaRow(): import("zova-module-a-openapi").ISchemaObjectExtensionField | undefined;
|
|
17
17
|
render(): import("vue/jsx-runtime").JSX.Element | undefined;
|
|
18
18
|
}
|
|
19
|
-
export type { IResourcePickerPageContext } from '../../lib/resourcePicker.
|
|
19
|
+
export type { IResourcePickerPageContext } from '../../lib/resourcePicker.ts';
|
|
20
20
|
//# sourceMappingURL=controller.d.ts.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './pageEntryWrapper.
|
|
2
|
-
export * from './pageWrapper.
|
|
3
|
-
export * from './resource.
|
|
1
|
+
export * from './pageEntryWrapper.ts';
|
|
2
|
+
export * from './pageWrapper.ts';
|
|
3
|
+
export * from './resource.ts';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ControllerPageEntry } from '../page/entry/controller.
|
|
1
|
+
import type { ControllerPageEntry } from '../page/entry/controller.tsx';
|
|
2
2
|
import 'zova-module-a-openapi';
|
|
3
3
|
declare module 'zova-module-a-openapi' {
|
|
4
4
|
interface IJsxRenderContextPageEntryWrapper {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ControllerPageResource } from '../page/resource/controller.
|
|
1
|
+
import type { ControllerPageResource } from '../page/resource/controller.tsx';
|
|
2
2
|
import 'zova-module-a-openapi';
|
|
3
3
|
declare module 'zova-module-a-openapi' {
|
|
4
4
|
interface IJsxRenderContextPageWrapper {
|
package/package.json
CHANGED
|
@@ -3,9 +3,9 @@ import type { TypeControllerInnerProps } from 'zova';
|
|
|
3
3
|
import { defineComponent } from 'vue';
|
|
4
4
|
import { prepareComponentOptions, useController } from 'zova';
|
|
5
5
|
|
|
6
|
-
import type { ControllerResourcePickerContextProps } from '../../component/resourcePickerContext/controller.
|
|
6
|
+
import type { ControllerResourcePickerContextProps } from '../../component/resourcePickerContext/controller.tsx';
|
|
7
7
|
|
|
8
|
-
import { ControllerResourcePickerContext } from '../../component/resourcePickerContext/controller.
|
|
8
|
+
import { ControllerResourcePickerContext } from '../../component/resourcePickerContext/controller.tsx';
|
|
9
9
|
export type ZResourcePickerContextProps = {
|
|
10
10
|
controllerRef?: (ref: ControllerResourcePickerContext) => void;
|
|
11
11
|
} & ControllerResourcePickerContextProps;
|
package/src/.metadata/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// eslint-disable
|
|
2
2
|
/** model: begin */
|
|
3
|
-
export * from '../model/resource.
|
|
4
|
-
import { IModelOptionsResource } from '../model/resource.
|
|
3
|
+
export * from '../model/resource.ts';
|
|
4
|
+
import { IModelOptionsResource } from '../model/resource.ts';
|
|
5
5
|
import 'zova-module-a-model';
|
|
6
6
|
declare module 'zova-module-a-model' {
|
|
7
7
|
|
|
@@ -26,7 +26,7 @@ declare module 'zova-module-rest-resource' {
|
|
|
26
26
|
}
|
|
27
27
|
/** model: end */
|
|
28
28
|
/** model: begin */
|
|
29
|
-
import type { ModelResource } from '../model/resource.
|
|
29
|
+
import type { ModelResource } from '../model/resource.ts';
|
|
30
30
|
import 'zova';
|
|
31
31
|
declare module 'zova' {
|
|
32
32
|
export interface IBeanRecordGeneral {
|
|
@@ -35,11 +35,11 @@ declare module 'zova' {
|
|
|
35
35
|
}
|
|
36
36
|
/** model: end */
|
|
37
37
|
/** controller: begin */
|
|
38
|
-
export * from '../component/resourcePickerContext/controller.
|
|
39
|
-
export * from '../page/entry/controller.
|
|
40
|
-
export * from '../page/entryCreate/controller.
|
|
41
|
-
export * from '../page/resource/controller.
|
|
42
|
-
export * from '../page/resourcePicker/controller.
|
|
38
|
+
export * from '../component/resourcePickerContext/controller.tsx';
|
|
39
|
+
export * from '../page/entry/controller.tsx';
|
|
40
|
+
export * from '../page/entryCreate/controller.tsx';
|
|
41
|
+
export * from '../page/resource/controller.tsx';
|
|
42
|
+
export * from '../page/resourcePicker/controller.tsx';
|
|
43
43
|
|
|
44
44
|
import 'zova';
|
|
45
45
|
declare module 'zova' {
|
|
@@ -70,11 +70,11 @@ declare module 'zova-module-rest-resource' {
|
|
|
70
70
|
}
|
|
71
71
|
/** controller: end */
|
|
72
72
|
/** controller: begin */
|
|
73
|
-
import type { ControllerResourcePickerContext } from '../component/resourcePickerContext/controller.
|
|
74
|
-
import type { ControllerPageEntry } from '../page/entry/controller.
|
|
75
|
-
import type { ControllerPageEntryCreate } from '../page/entryCreate/controller.
|
|
76
|
-
import type { ControllerPageResource } from '../page/resource/controller.
|
|
77
|
-
import type { ControllerPageResourcePicker } from '../page/resourcePicker/controller.
|
|
73
|
+
import type { ControllerResourcePickerContext } from '../component/resourcePickerContext/controller.tsx';
|
|
74
|
+
import type { ControllerPageEntry } from '../page/entry/controller.tsx';
|
|
75
|
+
import type { ControllerPageEntryCreate } from '../page/entryCreate/controller.tsx';
|
|
76
|
+
import type { ControllerPageResource } from '../page/resource/controller.tsx';
|
|
77
|
+
import type { ControllerPageResourcePicker } from '../page/resourcePicker/controller.tsx';
|
|
78
78
|
import 'zova';
|
|
79
79
|
declare module 'zova' {
|
|
80
80
|
export interface IBeanRecordLocal {
|
|
@@ -87,15 +87,15 @@ declare module 'zova' {
|
|
|
87
87
|
}
|
|
88
88
|
/** controller: end */
|
|
89
89
|
/** pages: begin */
|
|
90
|
-
export * from './page/entry.
|
|
91
|
-
import { NSControllerPageEntry } from './page/entry.
|
|
92
|
-
export * from './page/entryCreate.
|
|
93
|
-
import { NSControllerPageEntryCreate } from './page/entryCreate.
|
|
94
|
-
export * from './page/resource.
|
|
95
|
-
import { NSControllerPageResource } from './page/resource.
|
|
96
|
-
export * from './page/resourcePicker.
|
|
97
|
-
import { NSControllerPageResourcePicker } from './page/resourcePicker.
|
|
98
|
-
export * from '../routes.
|
|
90
|
+
export * from './page/entry.ts';
|
|
91
|
+
import { NSControllerPageEntry } from './page/entry.ts';
|
|
92
|
+
export * from './page/entryCreate.ts';
|
|
93
|
+
import { NSControllerPageEntryCreate } from './page/entryCreate.ts';
|
|
94
|
+
export * from './page/resource.ts';
|
|
95
|
+
import { NSControllerPageResource } from './page/resource.ts';
|
|
96
|
+
export * from './page/resourcePicker.ts';
|
|
97
|
+
import { NSControllerPageResourcePicker } from './page/resourcePicker.ts';
|
|
98
|
+
export * from '../routes.ts';
|
|
99
99
|
import { TypePagePathSchema } from 'zova-module-a-router';
|
|
100
100
|
import 'zova';
|
|
101
101
|
declare module 'zova-module-a-router' {
|
|
@@ -150,8 +150,8 @@ export interface ControllerPageResourcePicker {
|
|
|
150
150
|
/** pages: end */
|
|
151
151
|
|
|
152
152
|
/** components: begin */
|
|
153
|
-
export * from './component/resourcePickerContext.
|
|
154
|
-
import { ZResourcePickerContext } from './component/resourcePickerContext.
|
|
153
|
+
export * from './component/resourcePickerContext.ts';
|
|
154
|
+
import { ZResourcePickerContext } from './component/resourcePickerContext.ts';
|
|
155
155
|
export const components = {
|
|
156
156
|
'resourcePickerContext': ZResourcePickerContext,
|
|
157
157
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { createZovaComponentPage } from 'zova';
|
|
3
3
|
|
|
4
|
-
import { ControllerPageEntry } from '../../page/entry/controller.
|
|
5
|
-
import { ControllerPageEntrySchemaParams } from '../../page/entry/controller.
|
|
4
|
+
import { ControllerPageEntry } from '../../page/entry/controller.tsx';
|
|
5
|
+
import { ControllerPageEntrySchemaParams } from '../../page/entry/controller.tsx';
|
|
6
6
|
export namespace NSControllerPageEntry {
|
|
7
7
|
export const paramsSchema = ControllerPageEntrySchemaParams;
|
|
8
8
|
export type ParamsInput = z.input<typeof ControllerPageEntrySchemaParams>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { createZovaComponentPage } from 'zova';
|
|
3
3
|
|
|
4
|
-
import { ControllerPageEntryCreate } from '../../page/entryCreate/controller.
|
|
5
|
-
import { ControllerPageEntryCreateSchemaParams } from '../../page/entryCreate/controller.
|
|
4
|
+
import { ControllerPageEntryCreate } from '../../page/entryCreate/controller.tsx';
|
|
5
|
+
import { ControllerPageEntryCreateSchemaParams } from '../../page/entryCreate/controller.tsx';
|
|
6
6
|
export namespace NSControllerPageEntryCreate {
|
|
7
7
|
export const paramsSchema = ControllerPageEntryCreateSchemaParams;
|
|
8
8
|
export type ParamsInput = z.input<typeof ControllerPageEntryCreateSchemaParams>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { createZovaComponentPage } from 'zova';
|
|
3
3
|
|
|
4
|
-
import { ControllerPageResource } from '../../page/resource/controller.
|
|
5
|
-
import { ControllerPageResourceSchemaParams } from '../../page/resource/controller.
|
|
4
|
+
import { ControllerPageResource } from '../../page/resource/controller.tsx';
|
|
5
|
+
import { ControllerPageResourceSchemaParams } from '../../page/resource/controller.tsx';
|
|
6
6
|
export namespace NSControllerPageResource {
|
|
7
7
|
export const paramsSchema = ControllerPageResourceSchemaParams;
|
|
8
8
|
export type ParamsInput = z.input<typeof ControllerPageResourceSchemaParams>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { createZovaComponentPage } from 'zova';
|
|
3
3
|
|
|
4
|
-
import { ControllerPageResourcePicker } from '../../page/resourcePicker/controller.
|
|
5
|
-
import { ControllerPageResourcePickerSchemaParams } from '../../page/resourcePicker/controller.
|
|
4
|
+
import { ControllerPageResourcePicker } from '../../page/resourcePicker/controller.tsx';
|
|
5
|
+
import { ControllerPageResourcePickerSchemaParams } from '../../page/resourcePicker/controller.tsx';
|
|
6
6
|
export namespace NSControllerPageResourcePicker {
|
|
7
7
|
export const paramsSchema = ControllerPageResourcePickerSchemaParams;
|
|
8
8
|
export type ParamsInput = z.input<typeof ControllerPageResourcePickerSchemaParams>;
|
package/src/.metadata/this.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const __ThisModule__ = 'rest-resource';
|
|
2
|
-
export { ScopeModuleRestResource as ScopeModule } from './index.
|
|
2
|
+
export { ScopeModuleRestResource as ScopeModule } from './index.ts';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BeanControllerBase } from 'zova';
|
|
2
2
|
import { Controller } from 'zova-module-a-bean';
|
|
3
3
|
|
|
4
|
-
import type { IResourcePickerPageContext } from '../../page/resourcePicker/controller.
|
|
4
|
+
import type { IResourcePickerPageContext } from '../../page/resourcePicker/controller.tsx';
|
|
5
5
|
|
|
6
|
-
import { resourcePickerPageContextKey } from '../../lib/resourcePicker.
|
|
6
|
+
import { resourcePickerPageContextKey } from '../../lib/resourcePicker.ts';
|
|
7
7
|
|
|
8
8
|
export interface ControllerResourcePickerContextProps {
|
|
9
9
|
context: IResourcePickerPageContext;
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './.metadata/index.
|
|
2
|
-
export * from './types/index.
|
|
3
|
-
export * from './lib/resourcePicker.
|
|
4
|
-
export * from './page/resourcePicker/controller.
|
|
1
|
+
export * from './.metadata/index.ts';
|
|
2
|
+
export * from './types/index.ts';
|
|
3
|
+
export * from './lib/resourcePicker.ts';
|
|
4
|
+
export * from './page/resourcePicker/controller.tsx';
|
package/src/model/resource.ts
CHANGED
|
@@ -16,9 +16,9 @@ import { formSceneFromFormMeta } from 'zova-module-a-form';
|
|
|
16
16
|
import { $QueryEnsureLoaded, BeanModelBase, Model } from 'zova-module-a-model';
|
|
17
17
|
import { ScopeModuleAOpenapi, SymbolOpenapiSchemaName } from 'zova-module-a-openapi';
|
|
18
18
|
|
|
19
|
-
import { prepareDeleteRequestConfig } from '../lib/deleteRequest.
|
|
20
|
-
import { runMutationSuccess } from '../lib/mutationSuccess.
|
|
21
|
-
import { validateSelectedIds } from '../lib/selectedIds.
|
|
19
|
+
import { prepareDeleteRequestConfig } from '../lib/deleteRequest.ts';
|
|
20
|
+
import { runMutationSuccess } from '../lib/mutationSuccess.ts';
|
|
21
|
+
import { validateSelectedIds } from '../lib/selectedIds.ts';
|
|
22
22
|
|
|
23
23
|
export interface IModelOptionsResource extends IDecoratorModelOptions {}
|
|
24
24
|
|
|
@@ -16,7 +16,7 @@ import { formMetaFromFormScene } from 'zova-module-a-form';
|
|
|
16
16
|
import { $QueryEnsureLoaded } from 'zova-module-a-model';
|
|
17
17
|
import { ZPage } from 'zova-module-home-base';
|
|
18
18
|
|
|
19
|
-
import type { ModelResource } from '../../model/resource.
|
|
19
|
+
import type { ModelResource } from '../../model/resource.ts';
|
|
20
20
|
|
|
21
21
|
export const ControllerPageEntrySchemaParams = z.object({
|
|
22
22
|
resource: z.string(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Virtual } from 'zova-core';
|
|
2
2
|
import { Controller } from 'zova-module-a-bean';
|
|
3
3
|
|
|
4
|
-
import { ControllerPageEntry, ControllerPageEntrySchemaParams } from '../entry/controller.
|
|
4
|
+
import { ControllerPageEntry, ControllerPageEntrySchemaParams } from '../entry/controller.tsx';
|
|
5
5
|
|
|
6
6
|
export const ControllerPageEntryCreateSchemaParams = ControllerPageEntrySchemaParams;
|
|
7
7
|
|
|
@@ -6,7 +6,7 @@ import { Controller } from 'zova-module-a-bean';
|
|
|
6
6
|
import { $QueryEnsureLoaded } from 'zova-module-a-model';
|
|
7
7
|
import { ZPage } from 'zova-module-home-base';
|
|
8
8
|
|
|
9
|
-
import type { ModelResource } from '../../model/resource.
|
|
9
|
+
import type { ModelResource } from '../../model/resource.ts';
|
|
10
10
|
|
|
11
11
|
export const ControllerPageResourceSchemaParams = z.object({
|
|
12
12
|
resource: z.string(),
|
|
@@ -10,11 +10,11 @@ import { ZPage } from 'zova-module-home-base';
|
|
|
10
10
|
import type {
|
|
11
11
|
IResourcePickerPageContext,
|
|
12
12
|
IResourcePickerPageHost,
|
|
13
|
-
} from '../../lib/resourcePicker.
|
|
14
|
-
import type { ModelResource } from '../../model/resource.
|
|
13
|
+
} from '../../lib/resourcePicker.ts';
|
|
14
|
+
import type { ModelResource } from '../../model/resource.ts';
|
|
15
15
|
|
|
16
|
-
import { ZResourcePickerContext } from '../../.metadata/component/resourcePickerContext.
|
|
17
|
-
import { resourcePickerPageHostKey } from '../../lib/resourcePicker.
|
|
16
|
+
import { ZResourcePickerContext } from '../../.metadata/component/resourcePickerContext.ts';
|
|
17
|
+
import { resourcePickerPageHostKey } from '../../lib/resourcePicker.ts';
|
|
18
18
|
|
|
19
19
|
export const ControllerPageResourcePickerSchemaParams = z.object({
|
|
20
20
|
resource: z.string(),
|
|
@@ -82,4 +82,4 @@ export class ControllerPageResourcePicker extends BeanControllerPageBase {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
export type { IResourcePickerPageContext } from '../../lib/resourcePicker.
|
|
85
|
+
export type { IResourcePickerPageContext } from '../../lib/resourcePicker.ts';
|
package/src/routes.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { IModuleRoute } from 'zova-module-a-router';
|
|
2
2
|
|
|
3
|
-
import { ZPageEntry } from './.metadata/page/entry.
|
|
4
|
-
import { ZPageEntryCreate } from './.metadata/page/entryCreate.
|
|
5
|
-
import { ZPageResource } from './.metadata/page/resource.
|
|
6
|
-
import { ZPageResourcePicker } from './.metadata/page/resourcePicker.
|
|
7
|
-
import { resourceRouteMeta, resourceTabKey } from './lib/resourceRouteMeta.
|
|
3
|
+
import { ZPageEntry } from './.metadata/page/entry.ts';
|
|
4
|
+
import { ZPageEntryCreate } from './.metadata/page/entryCreate.ts';
|
|
5
|
+
import { ZPageResource } from './.metadata/page/resource.ts';
|
|
6
|
+
import { ZPageResourcePicker } from './.metadata/page/resourcePicker.ts';
|
|
7
|
+
import { resourceRouteMeta, resourceTabKey } from './lib/resourceRouteMeta.ts';
|
|
8
8
|
|
|
9
9
|
export const routes: IModuleRoute[] = [
|
|
10
10
|
{
|
package/src/types/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './pageEntryWrapper.
|
|
2
|
-
export * from './pageWrapper.
|
|
3
|
-
export * from './resource.
|
|
1
|
+
export * from './pageEntryWrapper.ts';
|
|
2
|
+
export * from './pageWrapper.ts';
|
|
3
|
+
export * from './resource.ts';
|
package/src/types/pageWrapper.ts
CHANGED