vona-module-a-openapiutils 5.0.15 → 5.0.16
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 +7 -1
- package/dist/lib/schema/v.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { Scope } from 'vona-module-a-bean';
|
|
|
4
4
|
import { isEmptyObject, isClass, isNil, combineParamsAndQuery } from '@cabloy/utils';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { ZodMetadata } from '@cabloy/zod-openapi';
|
|
7
|
+
import React from 'react';
|
|
7
8
|
import { coerceWithNil } from '@cabloy/zod-query';
|
|
8
9
|
|
|
9
10
|
let ScopeModuleAOpenapiutils = class ScopeModuleAOpenapiutils extends BeanScopeBase {};
|
|
@@ -233,6 +234,11 @@ function schemaFilterTransform(filterTransformName, options) {
|
|
|
233
234
|
};
|
|
234
235
|
}
|
|
235
236
|
function schemaFilterDateRange(options) {
|
|
237
|
+
const separator = options?.separator;
|
|
238
|
+
const DateRange = 'dateRange';
|
|
239
|
+
const filterRender = separator ? React.createElement(DateRange, {
|
|
240
|
+
separator: separator
|
|
241
|
+
}) : 'dateRange';
|
|
236
242
|
return function (schema) {
|
|
237
243
|
return schema.openapi({
|
|
238
244
|
filter: {
|
|
@@ -240,7 +246,7 @@ function schemaFilterDateRange(options) {
|
|
|
240
246
|
},
|
|
241
247
|
rest: {
|
|
242
248
|
filter: {
|
|
243
|
-
render:
|
|
249
|
+
render: filterRender
|
|
244
250
|
}
|
|
245
251
|
}
|
|
246
252
|
});
|
package/dist/lib/schema/v.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { schemaFilter, schemaFilterDateRange, schemaFilterTransform } from './v/filter.
|
|
1
|
+
import { schemaFilter, schemaFilterDateRange, schemaFilterTransform } from './v/filter.tsx';
|
|
2
2
|
import { schemaCaptcha, schemaEmail, schemaIPv4, schemaIPv6, schemaLowercase, schemaMax, schemaMin, schemaRegex, schemaTableIdentity, schemaToLowerCase, schemaToUpperCase, schemaTrim, schemaUppercase, schemaUrl, schemaUuid } from './v/helpers.ts';
|
|
3
3
|
import { schemaDescription, schemaExample, schemaOpenapi, schemaTitle } from './v/openapi.ts';
|
|
4
4
|
import { schemaCurrency, schemaDate, schemaOrder, schemaRender, schemaVisible } from './v/rest.ts';
|