zova-module-rest-resource 5.1.54 → 5.1.56
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/page/entry.d.ts +5 -1
- package/dist/.metadata/page/entry.d.ts.map +1 -1
- package/dist/.metadata/page/entryCreate.d.ts +5 -1
- package/dist/.metadata/page/entryCreate.d.ts.map +1 -1
- package/dist/.metadata/page/resource.d.ts +5 -1
- package/dist/.metadata/page/resource.d.ts.map +1 -1
- package/dist/.metadata/page/resourcePicker.d.ts +5 -1
- package/dist/.metadata/page/resourcePicker.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/model/resource.d.ts +0 -1
- package/dist/model/resource.d.ts.map +1 -1
- package/dist/page/entry/controller.d.ts +1 -0
- package/dist/page/entry/controller.d.ts.map +1 -1
- package/dist/page/resource/controller.d.ts +2 -1
- package/dist/page/resource/controller.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/.metadata/page/resource.ts +6 -1
- package/src/model/resource.ts +0 -1
- package/src/page/entry/controller.tsx +6 -1
- package/src/page/resource/controller.tsx +5 -1
|
@@ -9,5 +9,9 @@ export declare namespace NSControllerPageEntry {
|
|
|
9
9
|
type ParamsInput = z.input<typeof ControllerPageEntrySchemaParams>;
|
|
10
10
|
type ParamsOutput = z.output<typeof ControllerPageEntrySchemaParams>;
|
|
11
11
|
}
|
|
12
|
-
export declare const ZPageEntry: import("vue").DefineSetupFnComponent<Record<string, any>,
|
|
12
|
+
export declare const ZPageEntry: import("vue").DefineSetupFnComponent<Record<string, any>, import("vue").EmitsOptions, import("vue").SlotsType<Record<string, any>>, Record<string, any> & ({
|
|
13
|
+
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
14
|
+
} | {
|
|
15
|
+
[x: `on${Capitalize<string>}`]: ((...args: never) => any) | undefined;
|
|
16
|
+
}), import("vue").PublicProps>;
|
|
13
17
|
//# sourceMappingURL=entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../../src/.metadata/page/entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,YAAY;;;;qBAAkC,CAAC;IAC5D,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;IAC1E,KAAY,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,+BAA+B,CAAC,CAAC;CAC7E;AAED,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../../src/.metadata/page/entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,YAAY;;;;qBAAkC,CAAC;IAC5D,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;IAC1E,KAAY,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,+BAA+B,CAAC,CAAC;CAC7E;AAED,eAAO,MAAM,UAAU;;;;8BAAqE,CAAC"}
|
|
@@ -9,5 +9,9 @@ export declare namespace NSControllerPageEntryCreate {
|
|
|
9
9
|
type ParamsInput = z.input<typeof ControllerPageEntryCreateSchemaParams>;
|
|
10
10
|
type ParamsOutput = z.output<typeof ControllerPageEntryCreateSchemaParams>;
|
|
11
11
|
}
|
|
12
|
-
export declare const ZPageEntryCreate: import("vue").DefineSetupFnComponent<Record<string, any>,
|
|
12
|
+
export declare const ZPageEntryCreate: import("vue").DefineSetupFnComponent<Record<string, any>, import("vue").EmitsOptions, import("vue").SlotsType<Record<string, any>>, Record<string, any> & ({
|
|
13
|
+
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
14
|
+
} | {
|
|
15
|
+
[x: `on${Capitalize<string>}`]: ((...args: never) => any) | undefined;
|
|
16
|
+
}), import("vue").PublicProps>;
|
|
13
17
|
//# sourceMappingURL=entryCreate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entryCreate.d.ts","sourceRoot":"","sources":["../../../src/.metadata/page/entryCreate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AAC9F,yBAAiB,2BAA2B,CAAC;IACpC,MAAM,YAAY;;;;qBAAwC,CAAC;IAClE,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;IAChF,KAAY,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qCAAqC,CAAC,CAAC;CACnF;AAED,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"entryCreate.d.ts","sourceRoot":"","sources":["../../../src/.metadata/page/entryCreate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AAC9F,yBAAiB,2BAA2B,CAAC;IACpC,MAAM,YAAY;;;;qBAAwC,CAAC;IAClE,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;IAChF,KAAY,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qCAAqC,CAAC,CAAC;CACnF;AAED,eAAO,MAAM,gBAAgB;;;;8BAI5B,CAAC"}
|
|
@@ -7,5 +7,9 @@ export declare namespace NSControllerPageResource {
|
|
|
7
7
|
type ParamsInput = z.input<typeof ControllerPageResourceSchemaParams>;
|
|
8
8
|
type ParamsOutput = z.output<typeof ControllerPageResourceSchemaParams>;
|
|
9
9
|
}
|
|
10
|
-
export declare const ZPageResource: import("vue").DefineSetupFnComponent<Record<string, any>,
|
|
10
|
+
export declare const ZPageResource: import("vue").DefineSetupFnComponent<Record<string, any>, import("vue").EmitsOptions, import("vue").SlotsType<Record<string, any>>, Record<string, any> & ({
|
|
11
|
+
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
12
|
+
} | {
|
|
13
|
+
[x: `on${Capitalize<string>}`]: ((...args: never) => any) | undefined;
|
|
14
|
+
}), import("vue").PublicProps>;
|
|
11
15
|
//# sourceMappingURL=resource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/.metadata/page/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AACxF,yBAAiB,wBAAwB,CAAC;IACjC,MAAM,YAAY;;qBAAqC,CAAC;IAC/D,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;IAC7E,KAAY,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kCAAkC,CAAC,CAAC;CAChF;AAED,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/.metadata/page/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AACxF,yBAAiB,wBAAwB,CAAC;IACjC,MAAM,YAAY;;qBAAqC,CAAC;IAC/D,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;IAC7E,KAAY,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kCAAkC,CAAC,CAAC;CAChF;AAED,eAAO,MAAM,aAAa;;;;8BAKzB,CAAC"}
|
|
@@ -7,5 +7,9 @@ export declare namespace NSControllerPageResourcePicker {
|
|
|
7
7
|
type ParamsInput = z.input<typeof ControllerPageResourcePickerSchemaParams>;
|
|
8
8
|
type ParamsOutput = z.output<typeof ControllerPageResourcePickerSchemaParams>;
|
|
9
9
|
}
|
|
10
|
-
export declare const ZPageResourcePicker: import("vue").DefineSetupFnComponent<Record<string, any>,
|
|
10
|
+
export declare const ZPageResourcePicker: import("vue").DefineSetupFnComponent<Record<string, any>, import("vue").EmitsOptions, import("vue").SlotsType<Record<string, any>>, Record<string, any> & ({
|
|
11
|
+
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
12
|
+
} | {
|
|
13
|
+
[x: `on${Capitalize<string>}`]: ((...args: never) => any) | undefined;
|
|
14
|
+
}), import("vue").PublicProps>;
|
|
11
15
|
//# sourceMappingURL=resourcePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourcePicker.d.ts","sourceRoot":"","sources":["../../../src/.metadata/page/resourcePicker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,wCAAwC,EAAE,MAAM,0CAA0C,CAAC;AACpG,yBAAiB,8BAA8B,CAAC;IACvC,MAAM,YAAY;;qBAA2C,CAAC;IACrE,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;IACnF,KAAY,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wCAAwC,CAAC,CAAC;CACtF;AAED,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"resourcePicker.d.ts","sourceRoot":"","sources":["../../../src/.metadata/page/resourcePicker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,wCAAwC,EAAE,MAAM,0CAA0C,CAAC;AACpG,yBAAiB,8BAA8B,CAAC;IACvC,MAAM,YAAY;;qBAA2C,CAAC;IACrE,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;IACnF,KAAY,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wCAAwC,CAAC,CAAC;CACtF;AAED,eAAO,MAAM,mBAAmB;;;;8BAI/B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -353,6 +353,7 @@ var ControllerPageEntry = (_dec$4 = Controller(), _dec2$4 = BeanInfo({ module: "
|
|
|
353
353
|
this.formProvider = void 0;
|
|
354
354
|
this.formSchema = void 0;
|
|
355
355
|
this.jsxZova = void 0;
|
|
356
|
+
this._blocks = void 0;
|
|
356
357
|
}
|
|
357
358
|
get $$modelResource() {
|
|
358
359
|
return usePrepareArg(this.$params.resource, true);
|
|
@@ -383,7 +384,9 @@ var ControllerPageEntry = (_dec$4 = Controller(), _dec2$4 = BeanInfo({ module: "
|
|
|
383
384
|
this.jsxZova = this.bean._newBeanSimple(ZovaJsx, false, this.formProvider.components);
|
|
384
385
|
}
|
|
385
386
|
render() {
|
|
386
|
-
const
|
|
387
|
+
const schema = this.formSchema;
|
|
388
|
+
if (schema) this._blocks = schema.rest?.blocks;
|
|
389
|
+
const blocks = this._blocks;
|
|
387
390
|
if (!blocks || blocks.length === 0) return;
|
|
388
391
|
const domBlocks = [];
|
|
389
392
|
blocks.forEach((block, index) => {
|
|
@@ -421,6 +424,7 @@ var _dec4$1;
|
|
|
421
424
|
var _dec5$1;
|
|
422
425
|
var _class$2;
|
|
423
426
|
var _class2$1;
|
|
427
|
+
var _ControllerPageResource;
|
|
424
428
|
function _applyDecoratedDescriptor$1(i, e, r, n, l) {
|
|
425
429
|
var a = {};
|
|
426
430
|
return Object.keys(n).forEach(function(i) {
|
|
@@ -434,7 +438,7 @@ function _isSlot$1(s) {
|
|
|
434
438
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
435
439
|
}
|
|
436
440
|
var ControllerPageResourceSchemaParams = z.object({ resource: z.string() });
|
|
437
|
-
var ControllerPageResource = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module: "rest-resource" }), _dec3$1 = Use({ beanFullName: "rest-resource.model.resource" }), _dec4$1 = Reflect.metadata("design:type", Function), _dec5$1 = Reflect.metadata("design:paramtypes", []), _dec$2(_class$2 = _dec2$2(_class$2 = (_class2$1 = class ControllerPageResource extends BeanControllerPageBase {
|
|
441
|
+
var ControllerPageResource = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module: "rest-resource" }), _dec3$1 = Use({ beanFullName: "rest-resource.model.resource" }), _dec4$1 = Reflect.metadata("design:type", Function), _dec5$1 = Reflect.metadata("design:paramtypes", []), _dec$2(_class$2 = _dec2$2(_class$2 = (_class2$1 = (_ControllerPageResource = class ControllerPageResource extends BeanControllerPageBase {
|
|
438
442
|
constructor(...args) {
|
|
439
443
|
super(...args);
|
|
440
444
|
this.jsxZova = void 0;
|
|
@@ -468,7 +472,7 @@ var ControllerPageResource = (_dec$2 = Controller(), _dec2$2 = BeanInfo({ module
|
|
|
468
472
|
});
|
|
469
473
|
return createVNode(ZPage$1, null, _isSlot$1(domBlocks) ? domBlocks : { default: () => [domBlocks] });
|
|
470
474
|
}
|
|
471
|
-
}, _applyDecoratedDescriptor$1(_class2$1.prototype, "$$modelResource", [
|
|
475
|
+
}, _ControllerPageResource.$componentOptions = { boundary: { retry: true } }, _ControllerPageResource), _applyDecoratedDescriptor$1(_class2$1.prototype, "$$modelResource", [
|
|
472
476
|
_dec3$1,
|
|
473
477
|
_dec4$1,
|
|
474
478
|
_dec5$1
|
|
@@ -590,7 +594,7 @@ var NSControllerPageResource;
|
|
|
590
594
|
(function(_NSControllerPageResource) {
|
|
591
595
|
_NSControllerPageResource.paramsSchema = ControllerPageResourceSchemaParams;
|
|
592
596
|
})(NSControllerPageResource || (NSControllerPageResource = {}));
|
|
593
|
-
var ZPageResource = createZovaComponentPage(ControllerPageResource, void 0, void 0);
|
|
597
|
+
var ZPageResource = createZovaComponentPage(ControllerPageResource, void 0, void 0, ControllerPageResource.$componentOptions);
|
|
594
598
|
//#endregion
|
|
595
599
|
//#region src/.metadata/page/resourcePicker.ts
|
|
596
600
|
var NSControllerPageResourcePicker;
|
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","$$modelResource","$params","entryId","__init__","$computed","getFormSchema","_prepareJsx","getFormApiSchemas","sdk","bean","_newBeanSimple","components","render","blocks","rest","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","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","_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 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\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 blocks = this.formSchema?.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 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, 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 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);","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}), _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AK"}
|
|
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,2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AC,GAAG,KAAK,SAAS,MAAM,SAAS,MAAM,gCAAgC,cAAc,CAAC,CAAC,KAAK,MAAM,KAAK"}
|
package/dist/model/resource.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/model/resource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,2BAA2B,EAC3B,WAAW,EACX,SAAS,EACT,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAsB,aAAa,EAAS,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAA2B,MAAM,uBAAuB,CAAC;AAMrF,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;CAAG;AAExE,UAAU,8BAA8B,CAAC,KAAK;IAC5C,EAAE,EAAE,aAAa,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE;QACL,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/model/resource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,2BAA2B,EAC3B,WAAW,EACX,SAAS,EACT,sBAAsB,EACvB,MAAM,uBAAuB,CAAC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I,EAAE,UAAU,GAAG,IAAI,EAC9C,OAAO,EAAE,qCAAqC,CAAC,KAAK,EAAE,UAAU,CAAC;IA0BnE,UAAU;aACkC,SAAS,aAAa,EAAE;;IAapE,MAAM,CAAC,EAAE,EAAE,aAAa;IAcxB,MAAM,CAAC,EAAE,EAAE,aAAa;IAYxB,IAAW,gBAAgB,oDAE1B;IAED,IAAW,cAAc,oDAExB;IAED,IAAW,gBAAgB,oDAE1B;IAED,IAAW,gBAAgB,oDAE1B;IAED,IAAW,gBAAgB,oDAE1B;IAEM,aAAa,CAAC,QAAQ,EAAE,SAAS;IAOjC,iBAAiB,CAAC,QAAQ,EAAE,SAAS;IAQrC,qBAAqB,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE,aAAa,GAAG,YAAY,GAAG,SAAS;IASxF,WAAW,CAChB,QAAQ,EAAE,SAAS,EACnB,EAAE,CAAC,EAAE,aAAa,GACjB,MAAM,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS;IAQ5C,wBAAwB,CAAC,UAAU,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS;IAQ7F,OAAO,CAAC,uBAAuB;IAO/B,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW;IAI5D,SAAS,CAAC,WAAW,CAAC,EAAE,EAAE,aAAa;IAKvC,SAAS,CAAC,OAAO,CAAC,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM;YAKrC,UAAU;CAOzB"}
|
|
@@ -13,6 +13,7 @@ export declare class ControllerPageEntry extends BeanControllerPageBase {
|
|
|
13
13
|
formProvider: IFormProvider;
|
|
14
14
|
formSchema?: ISchemaObjectExtensionField;
|
|
15
15
|
jsxZova: ZovaJsx;
|
|
16
|
+
private _blocks?;
|
|
16
17
|
get $$modelResource(): ModelResource;
|
|
17
18
|
get resource(): string;
|
|
18
19
|
get entryId(): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/page/entry/controller.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,2BAA2B,
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/page/entry/controller.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,2BAA2B,EAE3B,aAAa,EACd,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAkC,MAAM,MAAM,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAMnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,eAAO,MAAM,+BAA+B;;;;iBAI1C,CAAC;AAEH,qBACa,mBAAoB,SAAQ,sBAAsB;IAC7D,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,EAAE,aAAa,CAAC;IAC5B,UAAU,CAAC,EAAE,2BAA2B,CAAC;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,OAAO,CAAC,CAAqC;IAErD,IACI,eAAe,IAAI,aAAa,CAEnC;IAED,IAAI,QAAQ,WAEX;IAED,IAAI,OAAO,uBAEV;IAED,IAAI,SAAS,kBAKZ;cAEe,QAAQ;IAgBxB,OAAO,CAAC,WAAW;IAInB,SAAS,CAAC,MAAM;CA2BjB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { BeanControllerPageBase } from 'zova';
|
|
2
|
+
import { BeanControllerPageBase, IComponentOptions } from 'zova';
|
|
3
3
|
import { ZovaJsx } from 'zova-jsx';
|
|
4
4
|
import type { ModelResource } from '../../model/resource.js';
|
|
5
5
|
export declare const ControllerPageResourceSchemaParams: z.ZodObject<{
|
|
6
6
|
resource: z.ZodString;
|
|
7
7
|
}, z.core.$strip>;
|
|
8
8
|
export declare class ControllerPageResource extends BeanControllerPageBase {
|
|
9
|
+
static $componentOptions: IComponentOptions;
|
|
9
10
|
jsxZova: ZovaJsx;
|
|
10
11
|
get $$modelResource(): ModelResource;
|
|
11
12
|
get resource(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/page/resource/controller.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/page/resource/controller.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAc,iBAAiB,EAAsB,MAAM,MAAM,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,eAAO,MAAM,kCAAkC;;iBAE7C,CAAC;AAEH,qBACa,sBAAuB,SAAQ,sBAAsB;IAChE,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAEzC;IAEF,OAAO,EAAE,OAAO,CAAC;IAEjB,IACI,eAAe,IAAI,aAAa,CAEnC;IAED,IAAI,QAAQ,WAEX;cAEe,QAAQ;IAOxB,OAAO,CAAC,WAAW;IAInB,IAAI,SAAS,4EAEZ;IAEM,MAAM;CAsBd"}
|
package/package.json
CHANGED
|
@@ -9,4 +9,9 @@ export namespace NSControllerPageResource {
|
|
|
9
9
|
export type ParamsOutput = z.output<typeof ControllerPageResourceSchemaParams>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export const ZPageResource = createZovaComponentPage(
|
|
12
|
+
export const ZPageResource = createZovaComponentPage(
|
|
13
|
+
ControllerPageResource,
|
|
14
|
+
undefined,
|
|
15
|
+
undefined,
|
|
16
|
+
ControllerPageResource.$componentOptions,
|
|
17
|
+
);
|
package/src/model/resource.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type {
|
|
|
2
2
|
IFormMeta,
|
|
3
3
|
IFormProvider,
|
|
4
4
|
ISchemaObjectExtensionField,
|
|
5
|
+
IResourceRenderBlockOptionsBlock,
|
|
5
6
|
TypeFormScene,
|
|
6
7
|
} from 'zova-module-a-openapi';
|
|
7
8
|
|
|
@@ -29,6 +30,7 @@ export class ControllerPageEntry extends BeanControllerPageBase {
|
|
|
29
30
|
formProvider: IFormProvider;
|
|
30
31
|
formSchema?: ISchemaObjectExtensionField;
|
|
31
32
|
jsxZova: ZovaJsx;
|
|
33
|
+
private _blocks?: IResourceRenderBlockOptionsBlock[];
|
|
32
34
|
|
|
33
35
|
@Use({ beanFullName: 'rest-resource.model.resource' })
|
|
34
36
|
get $$modelResource(): ModelResource {
|
|
@@ -71,7 +73,10 @@ export class ControllerPageEntry extends BeanControllerPageBase {
|
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
protected render() {
|
|
74
|
-
const
|
|
76
|
+
const schema = this.formSchema;
|
|
77
|
+
// Keep the mounted editor while the current locale's schema is loading.
|
|
78
|
+
if (schema) this._blocks = schema.rest?.blocks;
|
|
79
|
+
const blocks = this._blocks;
|
|
75
80
|
if (!blocks || blocks.length === 0) return;
|
|
76
81
|
const domBlocks: VNode[] = [];
|
|
77
82
|
blocks.forEach((block, index) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { BeanControllerPageBase, deepExtend, Use, usePrepareArg } from 'zova';
|
|
3
|
+
import { BeanControllerPageBase, deepExtend, IComponentOptions, Use, usePrepareArg } from 'zova';
|
|
4
4
|
import { ZovaJsx } from 'zova-jsx';
|
|
5
5
|
import { Controller } from 'zova-module-a-bean';
|
|
6
6
|
import { $QueryEnsureLoaded } from 'zova-module-a-model';
|
|
@@ -14,6 +14,10 @@ export const ControllerPageResourceSchemaParams = z.object({
|
|
|
14
14
|
|
|
15
15
|
@Controller()
|
|
16
16
|
export class ControllerPageResource extends BeanControllerPageBase {
|
|
17
|
+
static $componentOptions: IComponentOptions = {
|
|
18
|
+
boundary: { retry: true },
|
|
19
|
+
};
|
|
20
|
+
|
|
17
21
|
jsxZova: ZovaJsx;
|
|
18
22
|
|
|
19
23
|
@Use({ beanFullName: 'rest-resource.model.resource' })
|