zova-module-rest-resource 5.1.10 → 5.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { celEnvBase, hashkey, isNil } from "@cabloy/utils";
3
3
  import { formMetaFromFormScene, formSceneFromFormMeta } from "zova-module-a-form";
4
4
  import { $QueryAutoLoad, BeanModelBase, Model } from "zova-module-a-model";
5
5
  import { SymbolOpenapiSchemaName } from "zova-module-a-openapi";
6
- import { createVNode, isVNode } from "vue";
6
+ import { createTextVNode, createVNode, isVNode } from "vue";
7
7
  import { z } from "zod";
8
8
  import { ZovaJsx } from "zova-jsx";
9
9
  import { Controller, Scope } from "zova-module-a-bean";
@@ -303,9 +303,11 @@ var ControllerPageEntry = (_dec$3 = Controller(), _dec2$3 = BeanInfo({ module: "
303
303
  };
304
304
  }
305
305
  render() {
306
+ const componentRestPageEntry = this.$$modelResource.componentRestPageEntry;
307
+ if (!componentRestPageEntry) return createVNode(ZPage$1, null, { default: () => [createTextVNode("not found componentRestPageEntry")] });
306
308
  const celScope = this.pageEntryWrapperScope;
307
309
  const jsxRenderContext = this.getJsxRenderContextPageEntryWrapper(celScope);
308
- const domRestPageEntry = this.zovaJsx.render(this.$$modelResource.componentRestPageEntry, {}, celScope, jsxRenderContext);
310
+ const domRestPageEntry = this.zovaJsx.render(componentRestPageEntry, {}, celScope, jsxRenderContext);
309
311
  return createVNode(ZPage$1, null, _isSlot$1(domRestPageEntry) ? domRestPageEntry : { default: () => [domRestPageEntry] });
310
312
  }
311
313
  }, _applyDecoratedDescriptor$1(_class2$1.prototype, "$$modelResource", [
@@ -397,9 +399,11 @@ var ControllerPageResource = (_dec$1 = Controller(), _dec2$1 = BeanInfo({ module
397
399
  };
398
400
  }
399
401
  render() {
402
+ const componentRestPage = this.$$modelResource.componentRestPage;
403
+ if (!componentRestPage) return createVNode(ZPage, null, { default: () => [createTextVNode("not found componentRestPage")] });
400
404
  const celScope = this.pageWrapperScope;
401
405
  const jsxRenderContext = this.getJsxRenderContextPageWrapper(celScope);
402
- const domRestPage = this.zovaJsx.render(this.$$modelResource.componentRestPage, {}, celScope, jsxRenderContext);
406
+ const domRestPage = this.zovaJsx.render(componentRestPage, {}, celScope, jsxRenderContext);
403
407
  return createVNode(ZPage, null, _isSlot(domRestPage) ? domRestPage : { default: () => [domRestPage] });
404
408
  }
405
409
  }, _applyDecoratedDescriptor(_class2.prototype, "$$modelResource", [
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["celEnvBase","isNil","z","BeanControllerPageBase","Use","useCustomRef","usePrepareArg","ZovaJsx","Controller","formMetaFromFormScene","_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","pageEntryWrapperScope","zovaJsx","pageEntryWrapperCelEnv","$$modelResource","$params","entryId","__init__","bean","_setBean","$useComputed","_getPageEntryWrapperScope","_getPageEntryWrapperCelEnv","app","_newBeanSimple","components","actions","onActionTable","_action","onActionRow","action","mutation","delete","mutateAsync","self","permissions","get","set","_value","celEnv","clone","getJsxRenderContextPageEntryWrapper","celScope","ctx","$scene","$host","$celScope","$jsx","$$pageEntryWrapper","render","jsxRenderContext","domRestPageEntry","componentRestPageEntry","_createVNode","ZPage","default","_applyDecoratedDescriptor","getOwnPropertyDescriptor","Virtual","Controller","ControllerPageEntry","ControllerPageEntrySchemaParams","ControllerPageEntryCreateSchemaParams","ControllerPageEntryCreate","_dec","_dec2","_dec3","__z_BeanInfo","module","_class","celEnvBase","z","BeanControllerPageBase","Use","useCustomRef","usePrepareArg","ZovaJsx","Controller","_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","constructor","args","tableProvider","pageWrapperScope","zovaJsx","pageWrapperCelEnv","$$modelResource","$params","__init__","bean","_setBean","$useComputed","_getPageWrapperScope","_getPageWrapperCelEnv","app","_newBeanSimple","components","actions","onActionTable","_action","onActionRow","action","id","mutation","delete","mutateAsync","self","permissions","get","set","_value","celEnv","clone","getJsxRenderContextPageWrapper","celScope","ctx","$scene","$host","$celScope","$jsx","$$pageWrapper","render","jsxRenderContext","domRestPage","componentRestPage","_createVNode","ZPage","default","_applyDecoratedDescriptor","getOwnPropertyDescriptor"],"sources":["../src/model/resource.ts","../src/page/entry/controller.tsx","../src/page/entryCreate/controller.tsx","../src/page/resource/controller.tsx","../src/.metadata/page/entry.ts","../src/.metadata/page/entryCreate.ts","../src/.metadata/page/resource.ts","../src/routes.ts","../src/.metadata/index.ts"],"sourcesContent":["import type { TableIdentity } from 'table-identity';\nimport type { DataMutation, IDecoratorModelOptions } from 'zova-module-a-model';\nimport type { IOpenapiOptionsResourceMeta, ITableQuery, ITableRes, ScopeModuleAOpenapi, TypeOpenapiPermissions } from 'zova-module-a-openapi';\n\nimport { hashkey, isNil } from '@cabloy/utils';\nimport { SchemaObject } from 'openapi3-ts/oas31';\nimport { deepExtend, UseScope } from 'zova';\nimport { formSceneFromFormMeta, IFormMeta, IFormProvider } from 'zova-module-a-form';\nimport { $QueryAutoLoad, BeanModelBase, Model } from 'zova-module-a-model';\nimport { SymbolOpenapiSchemaName } from 'zova-module-a-openapi';\nimport { ITableProvider } from 'zova-module-a-table';\n\nexport interface IModelOptionsResource extends IDecoratorModelOptions {}\n\n@Model<IModelOptionsResource>({\n enableSelector: true,\n})\nexport class ModelResource<Entity = any, EntityCreate = Partial<Entity>, EntityUpdate = Partial<Entity>> extends BeanModelBase {\n public resource: string;\n public resourceApi: string;\n public resourceMeta: IOpenapiOptionsResourceMeta;\n public permissions?: TypeOpenapiPermissions;\n public formProvider: IFormProvider;\n public tableProvider: ITableProvider;\n public schemaView?: SchemaObject;\n public schemaCreate?: SchemaObject;\n public schemaUpdate?: SchemaObject;\n public schemaFilter?: SchemaObject;\n public schemaRow?: SchemaObject;\n public schemaPages?: SchemaObject;\n\n @UseScope('a-openapi')\n $$scopeModuleAOpenapi: ScopeModuleAOpenapi;\n\n protected async __init__(resource: string) {\n if (!resource) throw new Error('resource not specified');\n await super.__init__(resource);\n this.resource = resource;\n // resourceMeta\n this.resourceMeta = this.$useComputed(() => {\n const resourceMeta = this.$sdk.getBootstrap(this.resource);\n return deepExtend({}, this.$$scopeModuleAOpenapi.config.resourceMeta, resourceMeta.data?.resourceMeta);\n });\n this.permissions = this.$useComputed(() => {\n const permissions = this.$sdk.getPermissions(this.resource);\n return permissions.data;\n });\n this.formProvider = this.$useComputed(() => {\n return deepExtend({}, this.resourceMeta.provider, this.resourceMeta.form?.provider);\n });\n this.tableProvider = this.$useComputed(() => {\n return deepExtend({}, this.resourceMeta.provider, this.resourceMeta.table?.provider);\n });\n this.schemaView = this.$useComputed(() => {\n return this.apiSchemasView.responseBody;\n });\n this.schemaCreate = this.$useComputed(() => {\n return this.apiSchemasCreate.requestBody;\n });\n this.schemaUpdate = this.$useComputed(() => {\n return this.apiSchemasUpdate.requestBody;\n });\n this.schemaFilter = this.$useComputed(() => {\n return this.apiSchemasSelect.filter;\n });\n this.schemaRow = this.$useComputed(() => {\n return this.apiSchemasSelect.row;\n });\n this.schemaPages = this.$useComputed(() => {\n return this.apiSchemasSelect.paged;\n });\n // bootstrap\n await this._bootstrap();\n }\n\n selectGeneral(actionPath?: string, query?: ITableQuery) {\n const queryHash = hashkey(query);\n return this.$useStateData({\n queryKey: ['select', actionPath ?? '', queryHash],\n queryFn: async () => {\n const apiPath = actionPath ? `${this.resourceApi}/${actionPath}` : this.resourceApi;\n return this.$fetch.get<any, ITableRes<Entity>>(\n this.sys.util.apiActionPathTranslate(apiPath),\n this.sys.util.apiActionConfigPrepare(undefined, { query }),\n );\n },\n });\n }\n\n select(query?: ITableQuery) {\n return this.selectGeneral(undefined, query);\n }\n\n view(id: TableIdentity) {\n if (isNil(id)) throw new Error('row id cannot empty');\n return this.$useStateData({\n queryKey: ['get', id],\n queryFn: async () => {\n const res = await this.$fetch.get<any, Entity>(\n this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, { id }),\n this.sys.util.apiActionConfigPrepare(),\n );\n return res ?? null;\n },\n });\n }\n\n create() {\n return this.$useMutationData<void, EntityCreate>({\n mutationKey: ['create'],\n mutationFn: async params => {\n return this.$fetch.post<any, void, EntityCreate>(\n this.sys.util.apiActionPathTranslate(this.resourceApi),\n params,\n this.sys.util.apiActionConfigPrepare(),\n );\n },\n onSuccess: () => {\n this.$invalidateQueries({ queryKey: ['select'] });\n },\n });\n }\n\n update(id: TableIdentity) {\n return this.$useMutationData<void, EntityUpdate>({\n mutationKey: ['update', id],\n mutationFn: async params => {\n return this.$fetch.patch<any, void, EntityUpdate>(\n this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, { id }),\n params,\n this.sys.util.apiActionConfigPrepare(),\n );\n },\n onSuccess: () => {\n this.$invalidateQueries({ queryKey: ['select'] });\n this.$invalidateQueries({ queryKey: ['get', id] });\n },\n });\n }\n\n delete(id: TableIdentity) {\n return this.$useMutationData<void, void>({\n mutationKey: ['delete', id],\n mutationFn: async () => {\n return this.$fetch.delete<any, void, void>(\n this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, { id }),\n this.sys.util.apiActionConfigPrepare(),\n );\n },\n onSuccess: () => {\n this.$invalidateQueries({ queryKey: ['select'] });\n this.$invalidateQueries({ queryKey: ['get', id] });\n },\n });\n }\n\n public get apiSchemasSelect() {\n return this.$sdk.createApiSchemas(this.resourceApi, 'get');\n }\n\n public get apiSchemasView() {\n return this.$sdk.createApiSchemas(`${this.resourceApi}/:id`, 'get');\n }\n\n public get apiSchemasCreate() {\n return this.$sdk.createApiSchemas(this.resourceApi, 'post');\n }\n\n public get apiSchemasUpdate() {\n return this.$sdk.createApiSchemas(`${this.resourceApi}/:id`, 'patch');\n }\n\n public get componentRestPage() {\n return this.resourceMeta.provider!.components!.restPage!;\n }\n\n public get componentRestPageEntry() {\n return this.resourceMeta.provider!.components!.restPageEntry!;\n }\n\n public get componentTable() {\n return this.resourceMeta.provider!.components!.table!;\n }\n\n public get componentForm() {\n return this.resourceMeta.provider!.components!.form!;\n }\n\n public getFormSchema(formMeta: IFormMeta) {\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\n public getFormApiSchemas(formMeta: IFormMeta) {\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\n public getFormMutationSubmit(formMeta: IFormMeta, id?: TableIdentity): DataMutation | undefined {\n if (formMeta.formMode !== 'edit') return;\n if (formMeta.editMode === 'create') {\n return this.create() as any;\n } else if (formMeta.editMode === 'update') {\n return this.update(id!) as any;\n }\n }\n\n public getFormData(formMeta: IFormMeta, id?: TableIdentity): Entity | EntityCreate | EntityUpdate | undefined {\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 as Entity | EntityUpdate | undefined;\n }\n\n public getQueryDataDefaultValue(schemaName?: SchemaObject | string): EntityCreate | undefined {\n if (!schemaName) return;\n if (typeof schemaName === 'object') {\n schemaName = schemaName[SymbolOpenapiSchemaName] as string;\n }\n return this.$sdk.getSchemaDefaultValue(schemaName) as EntityCreate | undefined;\n }\n\n private async _bootstrap() {\n const queryBootstrap = await $QueryAutoLoad(() => 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}\n","import { celEnvBase, isNil } from '@cabloy/utils';\nimport { z } from 'zod';\nimport { BeanControllerPageBase, Use, useCustomRef, usePrepareArg } from 'zova';\nimport { ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport { formMetaFromFormScene, IFormMeta, IFormProvider, TypeFormScene } from 'zova-module-a-form';\nimport { TypeResourceActionRowRecord, TypeResourceActionTableRecord } from 'zova-module-a-openapi';\nimport { ZPage } from 'zova-module-home-base';\n\nimport type { ModelResource } from '../../model/resource.js';\n\nimport { IJsxRenderContextPageEntryWrapper, IPageEntryWrapperScope } from '../../types/pageEntryWrapper.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 pageEntryWrapperScope: IPageEntryWrapperScope;\n zovaJsx: ZovaJsx;\n pageEntryWrapperCelEnv: typeof celEnvBase;\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 (this.$params.formScene as TypeFormScene | undefined) ?? (isNil(this.entryId) ? 'create' : 'view');\n }\n\n protected async __init__() {\n this.bean._setBean('$$pageEntryWrapper', this);\n this.formMeta = this.$useComputed(() => {\n const formScene = this.formScene;\n return { ...formMetaFromFormScene(formScene), formScene };\n });\n this.formProvider = this.$useComputed(() => {\n return this.$$modelResource.formProvider;\n });\n this.pageEntryWrapperScope = this._getPageEntryWrapperScope();\n // jsx\n this.pageEntryWrapperCelEnv = this._getPageEntryWrapperCelEnv();\n this.zovaJsx = this.app.bean._newBeanSimple(ZovaJsx, false, this.formProvider.components, this.formProvider.actions, this.pageEntryWrapperCelEnv);\n }\n\n async onActionTable(_action: keyof TypeResourceActionTableRecord) {}\n\n async onActionRow(action: keyof TypeResourceActionRowRecord) {\n if (!this.entryId) return;\n if (action === 'delete') {\n const mutation = this.$$modelResource.delete(this.entryId);\n await mutation.mutateAsync();\n }\n }\n\n private _getPageEntryWrapperScope(): IPageEntryWrapperScope {\n const self = this;\n const permissions = useCustomRef(() => {\n return {\n get() {\n return self.$$modelResource.permissions;\n },\n set(_value) {},\n };\n }) as any;\n return {\n resource: this.$params.resource,\n id: this.entryId,\n permissions,\n onActionTable: (action: keyof TypeResourceActionTableRecord) => {\n return this.onActionTable(action);\n },\n onActionRow: (action: keyof TypeResourceActionRowRecord) => {\n return this.onActionRow(action);\n },\n };\n }\n\n private _getPageEntryWrapperCelEnv(): typeof celEnvBase {\n const celEnv = celEnvBase.clone();\n return celEnv;\n }\n\n public getJsxRenderContextPageEntryWrapper(celScope: IPageEntryWrapperScope): IJsxRenderContextPageEntryWrapper {\n return {\n app: this.app,\n ctx: this.ctx,\n $scene: 'pageEntryWrapper',\n $host: this,\n $celScope: celScope,\n $jsx: this.zovaJsx,\n $$pageEntryWrapper: this,\n };\n }\n\n protected render() {\n const celScope = this.pageEntryWrapperScope;\n const jsxRenderContext = this.getJsxRenderContextPageEntryWrapper(celScope);\n const domRestPageEntry = this.zovaJsx.render(this.$$modelResource.componentRestPageEntry, {}, celScope, jsxRenderContext);\n return <ZPage>{domRestPageEntry}</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 { celEnvBase } from '@cabloy/utils';\nimport { z } from 'zod';\nimport { BeanControllerPageBase, Use, useCustomRef, usePrepareArg } from 'zova';\nimport { ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport { TypeResourceActionRowRecord, TypeResourceActionTableRecord } from 'zova-module-a-openapi';\nimport { ITableProvider } from 'zova-module-a-table';\nimport { ZPage } from 'zova-module-home-base';\n\nimport type { ModelResource } from '../../model/resource.js';\n\nimport { IJsxRenderContextPageWrapper, IPageWrapperScope } from '../../types/pageWrapper.js';\n\nexport const ControllerPageResourceSchemaParams = z.object({\n resource: z.string(),\n});\n\n@Controller()\nexport class ControllerPageResource extends BeanControllerPageBase {\n tableProvider: ITableProvider;\n pageWrapperScope: IPageWrapperScope;\n zovaJsx: ZovaJsx;\n pageWrapperCelEnv: typeof celEnvBase;\n\n @Use({ beanFullName: 'rest-resource.model.resource' })\n get $$modelResource(): ModelResource {\n return usePrepareArg(this.$params.resource, true);\n }\n\n protected async __init__() {\n this.bean._setBean('$$pageWrapper', this);\n this.tableProvider = this.$useComputed(() => {\n return this.$$modelResource.tableProvider;\n });\n this.pageWrapperScope = this._getPageWrapperScope();\n // jsx\n this.pageWrapperCelEnv = this._getPageWrapperCelEnv();\n this.zovaJsx = this.app.bean._newBeanSimple(ZovaJsx, false, this.tableProvider.components, this.tableProvider.actions, this.pageWrapperCelEnv);\n }\n\n get resource() {\n return this.$params.resource;\n }\n\n async onActionTable(_action: keyof TypeResourceActionTableRecord) {}\n\n async onActionRow(action: keyof TypeResourceActionRowRecord, id: string) {\n if (action === 'delete') {\n const mutation = this.$$modelResource.delete(id);\n await mutation.mutateAsync();\n }\n }\n\n private _getPageWrapperScope(): IPageWrapperScope {\n const self = this;\n const permissions = useCustomRef(() => {\n return {\n get() {\n return self.$$modelResource.permissions;\n },\n set(_value) {},\n };\n }) as any;\n return {\n resource: this.$$modelResource.resource,\n permissions,\n onActionTable: (action: keyof TypeResourceActionTableRecord) => {\n return this.onActionTable(action);\n },\n onActionRow: (action: keyof TypeResourceActionRowRecord, id: string) => {\n return this.onActionRow(action, id);\n },\n };\n }\n\n private _getPageWrapperCelEnv(): typeof celEnvBase {\n const celEnv = celEnvBase.clone();\n return celEnv;\n }\n\n public getJsxRenderContextPageWrapper(celScope: IPageWrapperScope): IJsxRenderContextPageWrapper {\n return {\n app: this.app,\n ctx: this.ctx,\n $scene: 'pageWrapper',\n $host: this,\n $celScope: celScope,\n $jsx: this.zovaJsx,\n $$pageWrapper: this,\n };\n }\n\n public render() {\n const celScope = this.pageWrapperScope;\n const jsxRenderContext = this.getJsxRenderContextPageWrapper(celScope);\n const domRestPage = this.zovaJsx.render(this.$$modelResource.componentRestPage, {}, celScope, jsxRenderContext);\n return <ZPage>{domRestPage}</ZPage>;\n }\n}\n","import { z } from 'zod';\nimport { createZovaComponentPage } from 'zova';\n\nimport { ControllerPageEntry } from '../../page/entry/controller.jsx';\nimport { ControllerPageEntrySchemaParams } from '../../page/entry/controller.jsx';\nexport namespace NSControllerPageEntry {\n export const paramsSchema = ControllerPageEntrySchemaParams;\n export type ParamsInput = z.input<typeof ControllerPageEntrySchemaParams>;\n export type ParamsOutput = z.output<typeof ControllerPageEntrySchemaParams>;\n}\n\nexport const ZPageEntry = createZovaComponentPage(ControllerPageEntry, undefined, undefined);\n","import { z } from 'zod';\nimport { createZovaComponentPage } from 'zova';\n\nimport { ControllerPageEntryCreate } from '../../page/entryCreate/controller.jsx';\nimport { ControllerPageEntryCreateSchemaParams } from '../../page/entryCreate/controller.jsx';\nexport namespace NSControllerPageEntryCreate {\n export const paramsSchema = ControllerPageEntryCreateSchemaParams;\n export type ParamsInput = z.input<typeof ControllerPageEntryCreateSchemaParams>;\n export type ParamsOutput = z.output<typeof ControllerPageEntryCreateSchemaParams>;\n}\n\nexport const ZPageEntryCreate = createZovaComponentPage(ControllerPageEntryCreate, undefined, undefined);\n","import { z } from 'zod';\nimport { createZovaComponentPage } from 'zova';\n\nimport { ControllerPageResource } from '../../page/resource/controller.jsx';\nimport { ControllerPageResourceSchemaParams } from '../../page/resource/controller.jsx';\nexport namespace NSControllerPageResource {\n export const paramsSchema = ControllerPageResourceSchemaParams;\n export type ParamsInput = z.input<typeof ControllerPageResourceSchemaParams>;\n export type ParamsOutput = z.output<typeof ControllerPageResourceSchemaParams>;\n}\n\nexport const ZPageResource = createZovaComponentPage(ControllerPageResource, undefined, undefined);\n","import type { IModuleRoute } from 'zova-module-a-router';\n\nimport { ZPageEntry } from './.metadata/page/entry.js';\nimport { ZPageEntryCreate } from './.metadata/page/entryCreate.js';\nimport { ZPageResource } from './.metadata/page/resource.js';\n\nexport const routes: IModuleRoute[] = [\n {\n name: 'resource',\n path: ':resource',\n component: ZPageResource,\n meta: {\n tabKey,\n },\n },\n {\n name: 'entryCreate',\n path: ':resource/create',\n component: ZPageEntryCreate,\n meta: {\n tabKey,\n },\n },\n {\n name: 'entry',\n path: ':resource/:id/:formScene?',\n component: ZPageEntry,\n meta: {\n tabKey,\n },\n },\n];\n\nfunction tabKey(route) {\n return `/rest/resource/${encodeURIComponent(route.params.resource)}`;\n}\n","// eslint-disable\n/** model: begin */\nexport * from '../model/resource.js';\nimport { IModelOptionsResource } from '../model/resource.js';\nimport 'zova-module-a-model';\ndeclare module 'zova-module-a-model' {\n \n export interface IModelRecord {\n 'rest-resource:resource': IModelOptionsResource;\n }\n\n \n}\ndeclare module 'zova-module-rest-resource' {\n \n export interface ModelResource {\n /** @internal */\n get scope(): ScopeModuleRestResource;\n }\n\n export interface ModelResource {\n get $beanFullName(): 'rest-resource.model.resource';\n get $onionName(): 'rest-resource:resource';\n get $onionOptions(): IModelOptionsResource;\n } \n}\n/** model: end */\n/** model: begin */\nimport { ModelResource } from '../model/resource.js';\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanRecordGeneral {\n 'rest-resource.model.resource': ModelResource;\n }\n}\n/** model: end */\n/** controller: begin */\nexport * from '../page/entry/controller.jsx';\nexport * from '../page/entryCreate/controller.jsx';\nexport * from '../page/resource/controller.jsx';\n\nimport 'zova';\ndeclare module 'zova' {\n \n \n}\ndeclare module 'zova-module-rest-resource' {\n \n export interface ControllerPageEntry {\n /** @internal */\n get scope(): ScopeModuleRestResource;\n }\n\n export interface ControllerPageResource {\n /** @internal */\n get scope(): ScopeModuleRestResource;\n } \n}\n/** controller: end */\n/** controller: begin */\nimport { ControllerPageEntry } from '../page/entry/controller.jsx';\nimport { ControllerPageEntryCreate } from '../page/entryCreate/controller.jsx';\nimport { ControllerPageResource } from '../page/resource/controller.jsx';\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanRecordLocal {\n 'rest-resource.controller.pageEntry': ControllerPageEntry;\n'rest-resource.controller.pageEntryCreate': ControllerPageEntryCreate;\n'rest-resource.controller.pageResource': ControllerPageResource;\n }\n}\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 '../routes.js';\nimport { TypePagePathSchema } from 'zova-module-a-router';\nimport 'zova';\ndeclare module 'zova-module-a-router' {\nexport interface IPagePathRecord {\n '/rest/resource/:resource/:id/:formScene?': TypePagePathSchema<NSControllerPageEntry.ParamsInput,undefined>;\n'/rest/resource/:resource/create': TypePagePathSchema<NSControllerPageEntryCreate.ParamsInput,undefined>;\n'/rest/resource/:resource': TypePagePathSchema<NSControllerPageResource.ParamsInput,undefined>;\n}\nexport interface IPageNameRecord {\n 'rest-resource:entry': undefined;\n'rest-resource:entryCreate': undefined;\n'rest-resource:resource': undefined;\n}\n}\nexport const pagePathSchemas = {\n\n};\nexport const pageNameSchemas = {\n'rest-resource:entry': {\n params: NSControllerPageEntry.paramsSchema,\n \n },\n'rest-resource:entryCreate': {\n params: NSControllerPageEntryCreate.paramsSchema,\n \n },\n'rest-resource:resource': {\n params: NSControllerPageResource.paramsSchema,\n \n },\n};\ndeclare module 'zova-module-rest-resource' {\n export interface ControllerPageEntry {\n $params: NSControllerPageEntry.ParamsOutput;\n }\nexport interface ControllerPageEntryCreate {\n $params: NSControllerPageEntryCreate.ParamsOutput;\n }\nexport interface ControllerPageResource {\n $params: NSControllerPageResource.ParamsOutput;\n }\n}\n/** pages: end */\n\n/** scope: begin */\nimport { BeanScopeBase, type BeanScopeUtil } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\n\n@Scope()\nexport class ScopeModuleRestResource extends BeanScopeBase {}\n\nexport interface ScopeModuleRestResource {\n util: BeanScopeUtil;\n}\n\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanScopeRecord {\n 'rest-resource': ScopeModuleRestResource;\n }\n \n \n\n \n\n \n}\n \n/** scope: end */\n"],"mappings":";;;;;;;;;;;AAAA,IAAA,QAAO,SAAO,SAAA,SAAgB,UAAM,WAAM;AAC1C,SAAO,2BAAqB,GAAA,GAAA,GAAA,GAAA;AAAsB,MAAG,OAAM,eAAc,GAAM,GAAA;EAAA,YAAA,EAAA;EAAA,cAAA,EAAA;EAAA,UAAA,EAAA;EAAA,OAAA,EAAA,cAAA,EAAA,YAAA,KAAA,EAAA,GAAA,KAAA;EAAA,CAAA;;AAC/E,SAAO,4BAAO,GAAA,GAA2B,GAAE,GAAA,GAAA;CAAA,IAAa,IAAA,EAAA;AAAA,QAAW,OAAA,KAAA,EAAA,CAAmB,QAAE,SAAA,GAAA;AAAA,IAAuB,KAAE,EAAK;GAAM,EAAA,EAAA,aAAiB,CAAA,CAAA,EAAA,YAAA,EAAA,eAAA,CAAA,CAAA,EAAA,eAAA,WAAA,KAAA,EAAA,iBAAA,EAAA,WAAA,CAAA,IAAA,IAAA,EAAA,OAAA,CAAA,SAAA,CAAA,OAAA,SAAA,GAAA,GAAA;AAAA,SAAA,EAAA,GAAA,GAAA,EAAA,IAAA;IAAA,EAAA,EAAA,KAAA,KAAA,MAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,cAAA,EAAA,YAAA,KAAA,EAAA,GAAA,KAAA,GAAA,EAAA,cAAA,KAAA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MD,IAAW,2BAAc,OAAA,OAAA,EAAA,QAAA,SAAA,EACvB,QAAQ,iBACT,CAAC,EAAE,KAAI,SAAA,MAAA,SAAA,MAAA,gCAAA,cAAA,GAAA,IAAA,OAAA,IAAA"}
1
+ {"version":3,"file":"index.js","names":["celEnvBase","isNil","z","BeanControllerPageBase","Use","useCustomRef","usePrepareArg","ZovaJsx","Controller","formMetaFromFormScene","_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","pageEntryWrapperScope","zovaJsx","pageEntryWrapperCelEnv","$$modelResource","$params","entryId","__init__","bean","_setBean","$useComputed","_getPageEntryWrapperScope","_getPageEntryWrapperCelEnv","app","_newBeanSimple","components","actions","onActionTable","_action","onActionRow","action","mutation","delete","mutateAsync","self","permissions","get","set","_value","celEnv","clone","getJsxRenderContextPageEntryWrapper","celScope","ctx","$scene","$host","$celScope","$jsx","$$pageEntryWrapper","render","componentRestPageEntry","_createVNode","ZPage","default","_createTextVNode","jsxRenderContext","domRestPageEntry","_applyDecoratedDescriptor","getOwnPropertyDescriptor","Virtual","Controller","ControllerPageEntry","ControllerPageEntrySchemaParams","ControllerPageEntryCreateSchemaParams","ControllerPageEntryCreate","_dec","_dec2","_dec3","__z_BeanInfo","module","_class","celEnvBase","z","BeanControllerPageBase","Use","useCustomRef","usePrepareArg","ZovaJsx","Controller","_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","constructor","args","tableProvider","pageWrapperScope","zovaJsx","pageWrapperCelEnv","$$modelResource","$params","__init__","bean","_setBean","$useComputed","_getPageWrapperScope","_getPageWrapperCelEnv","app","_newBeanSimple","components","actions","onActionTable","_action","onActionRow","action","id","mutation","delete","mutateAsync","self","permissions","get","set","_value","celEnv","clone","getJsxRenderContextPageWrapper","celScope","ctx","$scene","$host","$celScope","$jsx","$$pageWrapper","render","componentRestPage","_createVNode","ZPage","default","_createTextVNode","jsxRenderContext","domRestPage","_applyDecoratedDescriptor","getOwnPropertyDescriptor"],"sources":["../src/model/resource.ts","../src/page/entry/controller.tsx","../src/page/entryCreate/controller.tsx","../src/page/resource/controller.tsx","../src/.metadata/page/entry.ts","../src/.metadata/page/entryCreate.ts","../src/.metadata/page/resource.ts","../src/routes.ts","../src/.metadata/index.ts"],"sourcesContent":["import type { TableIdentity } from 'table-identity';\nimport type { DataMutation, IDecoratorModelOptions } from 'zova-module-a-model';\nimport type { IOpenapiOptionsResourceMeta, ITableQuery, ITableRes, ScopeModuleAOpenapi, TypeOpenapiPermissions } from 'zova-module-a-openapi';\n\nimport { hashkey, isNil } from '@cabloy/utils';\nimport { SchemaObject } from 'openapi3-ts/oas31';\nimport { deepExtend, UseScope } from 'zova';\nimport { formSceneFromFormMeta, IFormMeta, IFormProvider } from 'zova-module-a-form';\nimport { $QueryAutoLoad, BeanModelBase, Model } from 'zova-module-a-model';\nimport { SymbolOpenapiSchemaName } from 'zova-module-a-openapi';\nimport { ITableProvider } from 'zova-module-a-table';\n\nexport interface IModelOptionsResource extends IDecoratorModelOptions {}\n\n@Model<IModelOptionsResource>({\n enableSelector: true,\n})\nexport class ModelResource<Entity = any, EntityCreate = Partial<Entity>, EntityUpdate = Partial<Entity>> extends BeanModelBase {\n public resource: string;\n public resourceApi: string;\n public resourceMeta: IOpenapiOptionsResourceMeta;\n public permissions?: TypeOpenapiPermissions;\n public formProvider: IFormProvider;\n public tableProvider: ITableProvider;\n public schemaView?: SchemaObject;\n public schemaCreate?: SchemaObject;\n public schemaUpdate?: SchemaObject;\n public schemaFilter?: SchemaObject;\n public schemaRow?: SchemaObject;\n public schemaPages?: SchemaObject;\n\n @UseScope('a-openapi')\n $$scopeModuleAOpenapi: ScopeModuleAOpenapi;\n\n protected async __init__(resource: string) {\n if (!resource) throw new Error('resource not specified');\n await super.__init__(resource);\n this.resource = resource;\n // resourceMeta\n this.resourceMeta = this.$useComputed(() => {\n const resourceMeta = this.$sdk.getBootstrap(this.resource);\n return deepExtend({}, this.$$scopeModuleAOpenapi.config.resourceMeta, resourceMeta.data?.resourceMeta);\n });\n this.permissions = this.$useComputed(() => {\n const permissions = this.$sdk.getPermissions(this.resource);\n return permissions.data;\n });\n this.formProvider = this.$useComputed(() => {\n return deepExtend({}, this.resourceMeta.provider, this.resourceMeta.form?.provider);\n });\n this.tableProvider = this.$useComputed(() => {\n return deepExtend({}, this.resourceMeta.provider, this.resourceMeta.table?.provider);\n });\n this.schemaView = this.$useComputed(() => {\n return this.apiSchemasView.responseBody;\n });\n this.schemaCreate = this.$useComputed(() => {\n return this.apiSchemasCreate.requestBody;\n });\n this.schemaUpdate = this.$useComputed(() => {\n return this.apiSchemasUpdate.requestBody;\n });\n this.schemaFilter = this.$useComputed(() => {\n return this.apiSchemasSelect.filter;\n });\n this.schemaRow = this.$useComputed(() => {\n return this.apiSchemasSelect.row;\n });\n this.schemaPages = this.$useComputed(() => {\n return this.apiSchemasSelect.paged;\n });\n // bootstrap\n await this._bootstrap();\n }\n\n selectGeneral(actionPath?: string, query?: ITableQuery) {\n const queryHash = hashkey(query);\n return this.$useStateData({\n queryKey: ['select', actionPath ?? '', queryHash],\n queryFn: async () => {\n const apiPath = actionPath ? `${this.resourceApi}/${actionPath}` : this.resourceApi;\n return this.$fetch.get<any, ITableRes<Entity>>(\n this.sys.util.apiActionPathTranslate(apiPath),\n this.sys.util.apiActionConfigPrepare(undefined, { query }),\n );\n },\n });\n }\n\n select(query?: ITableQuery) {\n return this.selectGeneral(undefined, query);\n }\n\n view(id: TableIdentity) {\n if (isNil(id)) throw new Error('row id cannot empty');\n return this.$useStateData({\n queryKey: ['get', id],\n queryFn: async () => {\n const res = await this.$fetch.get<any, Entity>(\n this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, { id }),\n this.sys.util.apiActionConfigPrepare(),\n );\n return res ?? null;\n },\n });\n }\n\n create() {\n return this.$useMutationData<void, EntityCreate>({\n mutationKey: ['create'],\n mutationFn: async params => {\n return this.$fetch.post<any, void, EntityCreate>(\n this.sys.util.apiActionPathTranslate(this.resourceApi),\n params,\n this.sys.util.apiActionConfigPrepare(),\n );\n },\n onSuccess: () => {\n this.$invalidateQueries({ queryKey: ['select'] });\n },\n });\n }\n\n update(id: TableIdentity) {\n return this.$useMutationData<void, EntityUpdate>({\n mutationKey: ['update', id],\n mutationFn: async params => {\n return this.$fetch.patch<any, void, EntityUpdate>(\n this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, { id }),\n params,\n this.sys.util.apiActionConfigPrepare(),\n );\n },\n onSuccess: () => {\n this.$invalidateQueries({ queryKey: ['select'] });\n this.$invalidateQueries({ queryKey: ['get', id] });\n },\n });\n }\n\n delete(id: TableIdentity) {\n return this.$useMutationData<void, void>({\n mutationKey: ['delete', id],\n mutationFn: async () => {\n return this.$fetch.delete<any, void, void>(\n this.sys.util.apiActionPathTranslate(`${this.resourceApi}/:id`, { id }),\n this.sys.util.apiActionConfigPrepare(),\n );\n },\n onSuccess: () => {\n this.$invalidateQueries({ queryKey: ['select'] });\n this.$invalidateQueries({ queryKey: ['get', id] });\n },\n });\n }\n\n public get apiSchemasSelect() {\n return this.$sdk.createApiSchemas(this.resourceApi, 'get');\n }\n\n public get apiSchemasView() {\n return this.$sdk.createApiSchemas(`${this.resourceApi}/:id`, 'get');\n }\n\n public get apiSchemasCreate() {\n return this.$sdk.createApiSchemas(this.resourceApi, 'post');\n }\n\n public get apiSchemasUpdate() {\n return this.$sdk.createApiSchemas(`${this.resourceApi}/:id`, 'patch');\n }\n\n public get componentRestPage() {\n return this.resourceMeta.provider!.components!.restPage!;\n }\n\n public get componentRestPageEntry() {\n return this.resourceMeta.provider!.components!.restPageEntry!;\n }\n\n public get componentTable() {\n return this.resourceMeta.provider!.components!.table!;\n }\n\n public get componentForm() {\n return this.resourceMeta.provider!.components!.form!;\n }\n\n public getFormSchema(formMeta: IFormMeta) {\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\n public getFormApiSchemas(formMeta: IFormMeta) {\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\n public getFormMutationSubmit(formMeta: IFormMeta, id?: TableIdentity): DataMutation | undefined {\n if (formMeta.formMode !== 'edit') return;\n if (formMeta.editMode === 'create') {\n return this.create() as any;\n } else if (formMeta.editMode === 'update') {\n return this.update(id!) as any;\n }\n }\n\n public getFormData(formMeta: IFormMeta, id?: TableIdentity): Entity | EntityCreate | EntityUpdate | undefined {\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 as Entity | EntityUpdate | undefined;\n }\n\n public getQueryDataDefaultValue(schemaName?: SchemaObject | string): EntityCreate | undefined {\n if (!schemaName) return;\n if (typeof schemaName === 'object') {\n schemaName = schemaName[SymbolOpenapiSchemaName] as string;\n }\n return this.$sdk.getSchemaDefaultValue(schemaName) as EntityCreate | undefined;\n }\n\n private async _bootstrap() {\n const queryBootstrap = await $QueryAutoLoad(() => 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}\n","import { celEnvBase, isNil } from '@cabloy/utils';\nimport { z } from 'zod';\nimport { BeanControllerPageBase, Use, useCustomRef, usePrepareArg } from 'zova';\nimport { ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport { formMetaFromFormScene, IFormMeta, IFormProvider, TypeFormScene } from 'zova-module-a-form';\nimport { TypeResourceActionRowRecord, TypeResourceActionTableRecord } from 'zova-module-a-openapi';\nimport { ZPage } from 'zova-module-home-base';\n\nimport type { ModelResource } from '../../model/resource.js';\n\nimport { IJsxRenderContextPageEntryWrapper, IPageEntryWrapperScope } from '../../types/pageEntryWrapper.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 pageEntryWrapperScope: IPageEntryWrapperScope;\n zovaJsx: ZovaJsx;\n pageEntryWrapperCelEnv: typeof celEnvBase;\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 (this.$params.formScene as TypeFormScene | undefined) ?? (isNil(this.entryId) ? 'create' : 'view');\n }\n\n protected async __init__() {\n this.bean._setBean('$$pageEntryWrapper', this);\n this.formMeta = this.$useComputed(() => {\n const formScene = this.formScene;\n return { ...formMetaFromFormScene(formScene), formScene };\n });\n this.formProvider = this.$useComputed(() => {\n return this.$$modelResource.formProvider;\n });\n this.pageEntryWrapperScope = this._getPageEntryWrapperScope();\n // jsx\n this.pageEntryWrapperCelEnv = this._getPageEntryWrapperCelEnv();\n this.zovaJsx = this.app.bean._newBeanSimple(ZovaJsx, false, this.formProvider.components, this.formProvider.actions, this.pageEntryWrapperCelEnv);\n }\n\n async onActionTable(_action: keyof TypeResourceActionTableRecord) {}\n\n async onActionRow(action: keyof TypeResourceActionRowRecord) {\n if (!this.entryId) return;\n if (action === 'delete') {\n const mutation = this.$$modelResource.delete(this.entryId);\n await mutation.mutateAsync();\n }\n }\n\n private _getPageEntryWrapperScope(): IPageEntryWrapperScope {\n const self = this;\n const permissions = useCustomRef(() => {\n return {\n get() {\n return self.$$modelResource.permissions;\n },\n set(_value) {},\n };\n }) as any;\n return {\n resource: this.$params.resource,\n id: this.entryId,\n permissions,\n onActionTable: (action: keyof TypeResourceActionTableRecord) => {\n return this.onActionTable(action);\n },\n onActionRow: (action: keyof TypeResourceActionRowRecord) => {\n return this.onActionRow(action);\n },\n };\n }\n\n private _getPageEntryWrapperCelEnv(): typeof celEnvBase {\n const celEnv = celEnvBase.clone();\n return celEnv;\n }\n\n public getJsxRenderContextPageEntryWrapper(celScope: IPageEntryWrapperScope): IJsxRenderContextPageEntryWrapper {\n return {\n app: this.app,\n ctx: this.ctx,\n $scene: 'pageEntryWrapper',\n $host: this,\n $celScope: celScope,\n $jsx: this.zovaJsx,\n $$pageEntryWrapper: this,\n };\n }\n\n protected render() {\n const componentRestPageEntry = this.$$modelResource.componentRestPageEntry;\n if (!componentRestPageEntry) {\n return <ZPage>not found componentRestPageEntry</ZPage>;\n }\n const celScope = this.pageEntryWrapperScope;\n const jsxRenderContext = this.getJsxRenderContextPageEntryWrapper(celScope);\n const domRestPageEntry = this.zovaJsx.render(componentRestPageEntry, {}, celScope, jsxRenderContext);\n return <ZPage>{domRestPageEntry}</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 { celEnvBase } from '@cabloy/utils';\nimport { z } from 'zod';\nimport { BeanControllerPageBase, Use, useCustomRef, usePrepareArg } from 'zova';\nimport { ZovaJsx } from 'zova-jsx';\nimport { Controller } from 'zova-module-a-bean';\nimport { TypeResourceActionRowRecord, TypeResourceActionTableRecord } from 'zova-module-a-openapi';\nimport { ITableProvider } from 'zova-module-a-table';\nimport { ZPage } from 'zova-module-home-base';\n\nimport type { ModelResource } from '../../model/resource.js';\n\nimport { IJsxRenderContextPageWrapper, IPageWrapperScope } from '../../types/pageWrapper.js';\n\nexport const ControllerPageResourceSchemaParams = z.object({\n resource: z.string(),\n});\n\n@Controller()\nexport class ControllerPageResource extends BeanControllerPageBase {\n tableProvider: ITableProvider;\n pageWrapperScope: IPageWrapperScope;\n zovaJsx: ZovaJsx;\n pageWrapperCelEnv: typeof celEnvBase;\n\n @Use({ beanFullName: 'rest-resource.model.resource' })\n get $$modelResource(): ModelResource {\n return usePrepareArg(this.$params.resource, true);\n }\n\n protected async __init__() {\n this.bean._setBean('$$pageWrapper', this);\n this.tableProvider = this.$useComputed(() => {\n return this.$$modelResource.tableProvider;\n });\n this.pageWrapperScope = this._getPageWrapperScope();\n // jsx\n this.pageWrapperCelEnv = this._getPageWrapperCelEnv();\n this.zovaJsx = this.app.bean._newBeanSimple(ZovaJsx, false, this.tableProvider.components, this.tableProvider.actions, this.pageWrapperCelEnv);\n }\n\n get resource() {\n return this.$params.resource;\n }\n\n async onActionTable(_action: keyof TypeResourceActionTableRecord) {}\n\n async onActionRow(action: keyof TypeResourceActionRowRecord, id: string) {\n if (action === 'delete') {\n const mutation = this.$$modelResource.delete(id);\n await mutation.mutateAsync();\n }\n }\n\n private _getPageWrapperScope(): IPageWrapperScope {\n const self = this;\n const permissions = useCustomRef(() => {\n return {\n get() {\n return self.$$modelResource.permissions;\n },\n set(_value) {},\n };\n }) as any;\n return {\n resource: this.$$modelResource.resource,\n permissions,\n onActionTable: (action: keyof TypeResourceActionTableRecord) => {\n return this.onActionTable(action);\n },\n onActionRow: (action: keyof TypeResourceActionRowRecord, id: string) => {\n return this.onActionRow(action, id);\n },\n };\n }\n\n private _getPageWrapperCelEnv(): typeof celEnvBase {\n const celEnv = celEnvBase.clone();\n return celEnv;\n }\n\n public getJsxRenderContextPageWrapper(celScope: IPageWrapperScope): IJsxRenderContextPageWrapper {\n return {\n app: this.app,\n ctx: this.ctx,\n $scene: 'pageWrapper',\n $host: this,\n $celScope: celScope,\n $jsx: this.zovaJsx,\n $$pageWrapper: this,\n };\n }\n\n public render() {\n const componentRestPage = this.$$modelResource.componentRestPage;\n if (!componentRestPage) {\n return <ZPage>not found componentRestPage</ZPage>;\n }\n const celScope = this.pageWrapperScope;\n const jsxRenderContext = this.getJsxRenderContextPageWrapper(celScope);\n const domRestPage = this.zovaJsx.render(componentRestPage, {}, celScope, jsxRenderContext);\n return <ZPage>{domRestPage}</ZPage>;\n }\n}\n","import { z } from 'zod';\nimport { createZovaComponentPage } from 'zova';\n\nimport { ControllerPageEntry } from '../../page/entry/controller.jsx';\nimport { ControllerPageEntrySchemaParams } from '../../page/entry/controller.jsx';\nexport namespace NSControllerPageEntry {\n export const paramsSchema = ControllerPageEntrySchemaParams;\n export type ParamsInput = z.input<typeof ControllerPageEntrySchemaParams>;\n export type ParamsOutput = z.output<typeof ControllerPageEntrySchemaParams>;\n}\n\nexport const ZPageEntry = createZovaComponentPage(ControllerPageEntry, undefined, undefined);\n","import { z } from 'zod';\nimport { createZovaComponentPage } from 'zova';\n\nimport { ControllerPageEntryCreate } from '../../page/entryCreate/controller.jsx';\nimport { ControllerPageEntryCreateSchemaParams } from '../../page/entryCreate/controller.jsx';\nexport namespace NSControllerPageEntryCreate {\n export const paramsSchema = ControllerPageEntryCreateSchemaParams;\n export type ParamsInput = z.input<typeof ControllerPageEntryCreateSchemaParams>;\n export type ParamsOutput = z.output<typeof ControllerPageEntryCreateSchemaParams>;\n}\n\nexport const ZPageEntryCreate = createZovaComponentPage(ControllerPageEntryCreate, undefined, undefined);\n","import { z } from 'zod';\nimport { createZovaComponentPage } from 'zova';\n\nimport { ControllerPageResource } from '../../page/resource/controller.jsx';\nimport { ControllerPageResourceSchemaParams } from '../../page/resource/controller.jsx';\nexport namespace NSControllerPageResource {\n export const paramsSchema = ControllerPageResourceSchemaParams;\n export type ParamsInput = z.input<typeof ControllerPageResourceSchemaParams>;\n export type ParamsOutput = z.output<typeof ControllerPageResourceSchemaParams>;\n}\n\nexport const ZPageResource = createZovaComponentPage(ControllerPageResource, undefined, undefined);\n","import type { IModuleRoute } from 'zova-module-a-router';\n\nimport { ZPageEntry } from './.metadata/page/entry.js';\nimport { ZPageEntryCreate } from './.metadata/page/entryCreate.js';\nimport { ZPageResource } from './.metadata/page/resource.js';\n\nexport const routes: IModuleRoute[] = [\n {\n name: 'resource',\n path: ':resource',\n component: ZPageResource,\n meta: {\n tabKey,\n },\n },\n {\n name: 'entryCreate',\n path: ':resource/create',\n component: ZPageEntryCreate,\n meta: {\n tabKey,\n },\n },\n {\n name: 'entry',\n path: ':resource/:id/:formScene?',\n component: ZPageEntry,\n meta: {\n tabKey,\n },\n },\n];\n\nfunction tabKey(route) {\n return `/rest/resource/${encodeURIComponent(route.params.resource)}`;\n}\n","// eslint-disable\n/** model: begin */\nexport * from '../model/resource.js';\nimport { IModelOptionsResource } from '../model/resource.js';\nimport 'zova-module-a-model';\ndeclare module 'zova-module-a-model' {\n \n export interface IModelRecord {\n 'rest-resource:resource': IModelOptionsResource;\n }\n\n \n}\ndeclare module 'zova-module-rest-resource' {\n \n export interface ModelResource {\n /** @internal */\n get scope(): ScopeModuleRestResource;\n }\n\n export interface ModelResource {\n get $beanFullName(): 'rest-resource.model.resource';\n get $onionName(): 'rest-resource:resource';\n get $onionOptions(): IModelOptionsResource;\n } \n}\n/** model: end */\n/** model: begin */\nimport { ModelResource } from '../model/resource.js';\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanRecordGeneral {\n 'rest-resource.model.resource': ModelResource;\n }\n}\n/** model: end */\n/** controller: begin */\nexport * from '../page/entry/controller.jsx';\nexport * from '../page/entryCreate/controller.jsx';\nexport * from '../page/resource/controller.jsx';\n\nimport 'zova';\ndeclare module 'zova' {\n \n \n}\ndeclare module 'zova-module-rest-resource' {\n \n export interface ControllerPageEntry {\n /** @internal */\n get scope(): ScopeModuleRestResource;\n }\n\n export interface ControllerPageResource {\n /** @internal */\n get scope(): ScopeModuleRestResource;\n } \n}\n/** controller: end */\n/** controller: begin */\nimport { ControllerPageEntry } from '../page/entry/controller.jsx';\nimport { ControllerPageEntryCreate } from '../page/entryCreate/controller.jsx';\nimport { ControllerPageResource } from '../page/resource/controller.jsx';\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanRecordLocal {\n 'rest-resource.controller.pageEntry': ControllerPageEntry;\n'rest-resource.controller.pageEntryCreate': ControllerPageEntryCreate;\n'rest-resource.controller.pageResource': ControllerPageResource;\n }\n}\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 '../routes.js';\nimport { TypePagePathSchema } from 'zova-module-a-router';\nimport 'zova';\ndeclare module 'zova-module-a-router' {\nexport interface IPagePathRecord {\n '/rest/resource/:resource/:id/:formScene?': TypePagePathSchema<NSControllerPageEntry.ParamsInput,undefined>;\n'/rest/resource/:resource/create': TypePagePathSchema<NSControllerPageEntryCreate.ParamsInput,undefined>;\n'/rest/resource/:resource': TypePagePathSchema<NSControllerPageResource.ParamsInput,undefined>;\n}\nexport interface IPageNameRecord {\n 'rest-resource:entry': undefined;\n'rest-resource:entryCreate': undefined;\n'rest-resource:resource': undefined;\n}\n}\nexport const pagePathSchemas = {\n\n};\nexport const pageNameSchemas = {\n'rest-resource:entry': {\n params: NSControllerPageEntry.paramsSchema,\n \n },\n'rest-resource:entryCreate': {\n params: NSControllerPageEntryCreate.paramsSchema,\n \n },\n'rest-resource:resource': {\n params: NSControllerPageResource.paramsSchema,\n \n },\n};\ndeclare module 'zova-module-rest-resource' {\n export interface ControllerPageEntry {\n $params: NSControllerPageEntry.ParamsOutput;\n }\nexport interface ControllerPageEntryCreate {\n $params: NSControllerPageEntryCreate.ParamsOutput;\n }\nexport interface ControllerPageResource {\n $params: NSControllerPageResource.ParamsOutput;\n }\n}\n/** pages: end */\n\n/** scope: begin */\nimport { BeanScopeBase, type BeanScopeUtil } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\n\n@Scope()\nexport class ScopeModuleRestResource extends BeanScopeBase {}\n\nexport interface ScopeModuleRestResource {\n util: BeanScopeUtil;\n}\n\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanScopeRecord {\n 'rest-resource': ScopeModuleRestResource;\n }\n \n \n\n \n\n \n}\n \n/** scope: end */\n"],"mappings":";;;;;;;;;;;AAAA,IAAA,QAAO,SAAO,SAAA,SAAgB,UAAM,WAAM;AAC1C,SAAO,2BAAqB,GAAA,GAAA,GAAA,GAAA;AAAsB,MAAG,OAAM,eAAc,GAAM,GAAA;EAAA,YAAA,EAAA;EAAA,cAAA,EAAA;EAAA,UAAA,EAAA;EAAA,OAAA,EAAA,cAAA,EAAA,YAAA,KAAA,EAAA,GAAA,KAAA;EAAA,CAAA;;AAC/E,SAAO,4BAAO,GAAA,GAA2B,GAAE,GAAA,GAAA;CAAA,IAAa,IAAA,EAAA;AAAA,QAAW,OAAA,KAAA,EAAA,CAAmB,QAAE,SAAA,GAAA;AAAA,IAAuB,KAAE,EAAK;GAAM,EAAA,EAAA,aAAiB,CAAA,CAAA,EAAA,YAAA,EAAA,eAAA,CAAA,CAAA,EAAA,eAAA,WAAA,KAAA,EAAA,iBAAA,EAAA,WAAA,CAAA,IAAA,IAAA,EAAA,OAAA,CAAA,SAAA,CAAA,OAAA,SAAA,GAAA,GAAA;AAAA,SAAA,EAAA,GAAA,GAAA,EAAA,IAAA;IAAA,EAAA,EAAA,KAAA,KAAA,MAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,cAAA,EAAA,YAAA,KAAA,EAAA,GAAA,KAAA,GAAA,EAAA,cAAA,KAAA,IAAA,KAAA,MAAA,EAA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qB;IAKtB,8BAA8B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,4BAA4B;IAYzF,MAAM;CAMd"}
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/page/resource/controller.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAoC,MAAM,MAAM,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE7F,eAAO,MAAM,kCAAkC;;iBAE7C,CAAC;AAEH,qBACa,sBAAuB,SAAQ,sBAAsB;IAChE,aAAa,EAAE,cAAc,CAAC;IAC9B,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,OAAO,UAAU,CAAC;IAErC,IACI,eAAe,IAAI,aAAa,CAEnC;cAEe,QAAQ;IAWxB,IAAI,QAAQ,WAEX;IAEK,aAAa,CAAC,OAAO,EAAE,MAAM,6BAA6B;IAE1D,WAAW,CAAC,MAAM,EAAE,MAAM,2BAA2B,EAAE,EAAE,EAAE,MAAM;IAOvE,OAAO,CAAC,oBAAoB;IAsB5B,OAAO,CAAC,qBAAqB;IAKtB,8BAA8B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,4BAA4B;IAYzF,MAAM;CAUd"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zova-module-rest-resource",
3
- "version": "5.1.10",
4
- "gitHead": "4574f3873b1ad25eb6cdc8c44757a6c14dfc950d",
3
+ "version": "5.1.11",
4
+ "gitHead": "ee0bdf92186d7979b5f8f167c653394eba69b21c",
5
5
  "description": "",
6
6
  "keywords": [
7
7
  "Zova Module"
@@ -108,9 +108,13 @@ export class ControllerPageEntry extends BeanControllerPageBase {
108
108
  }
109
109
 
110
110
  protected render() {
111
+ const componentRestPageEntry = this.$$modelResource.componentRestPageEntry;
112
+ if (!componentRestPageEntry) {
113
+ return <ZPage>not found componentRestPageEntry</ZPage>;
114
+ }
111
115
  const celScope = this.pageEntryWrapperScope;
112
116
  const jsxRenderContext = this.getJsxRenderContextPageEntryWrapper(celScope);
113
- const domRestPageEntry = this.zovaJsx.render(this.$$modelResource.componentRestPageEntry, {}, celScope, jsxRenderContext);
117
+ const domRestPageEntry = this.zovaJsx.render(componentRestPageEntry, {}, celScope, jsxRenderContext);
114
118
  return <ZPage>{domRestPageEntry}</ZPage>;
115
119
  }
116
120
  }
@@ -91,9 +91,13 @@ export class ControllerPageResource extends BeanControllerPageBase {
91
91
  }
92
92
 
93
93
  public render() {
94
+ const componentRestPage = this.$$modelResource.componentRestPage;
95
+ if (!componentRestPage) {
96
+ return <ZPage>not found componentRestPage</ZPage>;
97
+ }
94
98
  const celScope = this.pageWrapperScope;
95
99
  const jsxRenderContext = this.getJsxRenderContextPageWrapper(celScope);
96
- const domRestPage = this.zovaJsx.render(this.$$modelResource.componentRestPage, {}, celScope, jsxRenderContext);
100
+ const domRestPage = this.zovaJsx.render(componentRestPage, {}, celScope, jsxRenderContext);
97
101
  return <ZPage>{domRestPage}</ZPage>;
98
102
  }
99
103
  }