nextjs-cms 0.5.8 → 0.5.10
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/api/index.d.ts +41 -41
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -2
- package/dist/api/lib/serverActions.d.ts +9 -9
- package/dist/api/lib/serverActions.d.ts.map +1 -1
- package/dist/api/lib/serverActions.js +7 -7
- package/dist/api/root.d.ts +37 -37
- package/dist/api/root.js +13 -13
- package/dist/api/routers/accountSettings.d.ts +2 -2
- package/dist/api/routers/accountSettings.js +3 -3
- package/dist/api/routers/admins.d.ts +2 -2
- package/dist/api/routers/admins.js +6 -6
- package/dist/api/routers/auth.d.ts +2 -2
- package/dist/api/routers/auth.js +2 -2
- package/dist/api/routers/categorySection.d.ts +2 -2
- package/dist/api/routers/categorySection.js +1 -1
- package/dist/api/routers/cmsSettings.d.ts +2 -2
- package/dist/api/routers/cmsSettings.js +3 -3
- package/dist/api/routers/cpanel.d.ts +2 -2
- package/dist/api/routers/cpanel.js +3 -3
- package/dist/api/routers/files.d.ts +2 -2
- package/dist/api/routers/files.js +2 -2
- package/dist/api/routers/gallery.d.ts +2 -2
- package/dist/api/routers/gallery.js +6 -6
- package/dist/api/routers/googleAnalytics.d.ts +2 -2
- package/dist/api/routers/googleAnalytics.js +1 -1
- package/dist/api/routers/hasItemsSection.d.ts +8 -8
- package/dist/api/routers/hasItemsSection.js +1 -1
- package/dist/api/routers/navigation.d.ts +2 -2
- package/dist/api/routers/navigation.js +2 -2
- package/dist/api/routers/simpleSection.d.ts +5 -5
- package/dist/api/routers/simpleSection.js +2 -2
- package/dist/api/trpc.d.ts +11 -11
- package/dist/api/trpc.js +2 -2
- package/dist/auth/hooks/index.d.ts +2 -2
- package/dist/auth/hooks/index.d.ts.map +1 -1
- package/dist/auth/hooks/index.js +2 -2
- package/dist/auth/hooks/useAxiosPrivate.js +3 -3
- package/dist/auth/hooks/useRefreshToken.js +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/lib/actions.d.ts +1 -1
- package/dist/auth/lib/actions.d.ts.map +1 -1
- package/dist/auth/lib/actions.js +2 -2
- package/dist/auth/lib/client.js +1 -1
- package/dist/auth/lib/index.d.ts +2 -2
- package/dist/auth/lib/index.d.ts.map +1 -1
- package/dist/auth/lib/index.js +2 -2
- package/dist/auth/react.d.ts +3 -3
- package/dist/auth/react.d.ts.map +1 -1
- package/dist/auth/react.js +3 -3
- package/dist/auth/trpc.d.ts.map +1 -1
- package/dist/auth/trpc.js +1 -1
- package/dist/core/config/config-loader.js +1 -1
- package/dist/core/config/index.d.ts +2 -2
- package/dist/core/config/index.d.ts.map +1 -1
- package/dist/core/config/index.js +1 -1
- package/dist/core/db/index.d.ts +1 -1
- package/dist/core/db/index.d.ts.map +1 -1
- package/dist/core/db/index.js +1 -1
- package/dist/core/db/table-checker/MysqlTable.d.ts +1 -1
- package/dist/core/db/table-checker/MysqlTable.d.ts.map +1 -1
- package/dist/core/db/table-checker/MysqlTable.js +2 -2
- package/dist/core/db/table-checker/index.d.ts +1 -1
- package/dist/core/db/table-checker/index.d.ts.map +1 -1
- package/dist/core/db/table-checker/index.js +1 -1
- package/dist/core/factories/FieldFactory.d.ts +4 -4
- package/dist/core/factories/FieldFactory.d.ts.map +1 -1
- package/dist/core/factories/FieldFactory.js +5 -5
- package/dist/core/factories/SectionFactory.d.ts +3 -3
- package/dist/core/factories/SectionFactory.d.ts.map +1 -1
- package/dist/core/factories/SectionFactory.js +7 -7
- package/dist/core/factories/index.d.ts +2 -2
- package/dist/core/factories/index.d.ts.map +1 -1
- package/dist/core/factories/index.js +2 -2
- package/dist/core/fields/checkbox.d.ts +6 -6
- package/dist/core/fields/checkbox.d.ts.map +1 -1
- package/dist/core/fields/checkbox.js +2 -2
- package/dist/core/fields/color.d.ts +6 -6
- package/dist/core/fields/color.d.ts.map +1 -1
- package/dist/core/fields/color.js +2 -2
- package/dist/core/fields/date.d.ts +6 -6
- package/dist/core/fields/date.d.ts.map +1 -1
- package/dist/core/fields/date.js +2 -2
- package/dist/core/fields/document.d.ts +6 -6
- package/dist/core/fields/document.d.ts.map +1 -1
- package/dist/core/fields/document.js +4 -4
- package/dist/core/fields/field-group.d.ts +2 -2
- package/dist/core/fields/field-group.d.ts.map +1 -1
- package/dist/core/fields/field.d.ts +2 -2
- package/dist/core/fields/field.d.ts.map +1 -1
- package/dist/core/fields/field.js +1 -1
- package/dist/core/fields/fileField.d.ts +2 -2
- package/dist/core/fields/fileField.d.ts.map +1 -1
- package/dist/core/fields/fileField.js +2 -2
- package/dist/core/fields/index.d.ts +50 -50
- package/dist/core/fields/index.d.ts.map +1 -1
- package/dist/core/fields/index.js +18 -18
- package/dist/core/fields/map.d.ts +6 -6
- package/dist/core/fields/map.d.ts.map +1 -1
- package/dist/core/fields/map.js +2 -2
- package/dist/core/fields/number.d.ts +8 -8
- package/dist/core/fields/number.d.ts.map +1 -1
- package/dist/core/fields/number.js +2 -2
- package/dist/core/fields/password.d.ts +6 -6
- package/dist/core/fields/password.d.ts.map +1 -1
- package/dist/core/fields/password.js +2 -2
- package/dist/core/fields/photo.d.ts +6 -6
- package/dist/core/fields/photo.d.ts.map +1 -1
- package/dist/core/fields/photo.js +5 -5
- package/dist/core/fields/richText.d.ts +8 -8
- package/dist/core/fields/richText.d.ts.map +1 -1
- package/dist/core/fields/richText.js +6 -6
- package/dist/core/fields/select.d.ts +10 -10
- package/dist/core/fields/select.d.ts.map +1 -1
- package/dist/core/fields/select.js +4 -4
- package/dist/core/fields/selectMultiple.d.ts +9 -9
- package/dist/core/fields/selectMultiple.d.ts.map +1 -1
- package/dist/core/fields/selectMultiple.js +5 -5
- package/dist/core/fields/tags.d.ts +6 -6
- package/dist/core/fields/tags.d.ts.map +1 -1
- package/dist/core/fields/tags.js +3 -3
- package/dist/core/fields/text.d.ts +6 -6
- package/dist/core/fields/text.d.ts.map +1 -1
- package/dist/core/fields/text.js +3 -3
- package/dist/core/fields/textArea.d.ts +6 -6
- package/dist/core/fields/textArea.d.ts.map +1 -1
- package/dist/core/fields/textArea.js +3 -3
- package/dist/core/fields/video.d.ts +6 -6
- package/dist/core/fields/video.d.ts.map +1 -1
- package/dist/core/fields/video.js +4 -4
- package/dist/core/helpers/index.d.ts +4 -4
- package/dist/core/helpers/index.d.ts.map +1 -1
- package/dist/core/helpers/index.js +3 -3
- package/dist/core/index.d.ts +7 -7
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +7 -7
- package/dist/core/sections/category.d.ts +22 -22
- package/dist/core/sections/category.d.ts.map +1 -1
- package/dist/core/sections/category.js +3 -3
- package/dist/core/sections/hasItems.d.ts +52 -52
- package/dist/core/sections/hasItems.d.ts.map +1 -1
- package/dist/core/sections/hasItems.js +2 -2
- package/dist/core/sections/index.d.ts +4 -4
- package/dist/core/sections/index.d.ts.map +1 -1
- package/dist/core/sections/index.js +4 -4
- package/dist/core/sections/section.d.ts +6 -6
- package/dist/core/sections/section.d.ts.map +1 -1
- package/dist/core/sections/section.js +3 -3
- package/dist/core/sections/simple.d.ts +8 -8
- package/dist/core/sections/simple.d.ts.map +1 -1
- package/dist/core/sections/simple.js +3 -3
- package/dist/core/types/index.d.ts +2 -2
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/db/client.d.ts +2 -2
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +2 -2
- package/dist/db/drizzle.config.js +2 -2
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -7
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/utils.js +1 -1
- package/dist/validators/checkbox.d.ts +1 -1
- package/dist/validators/checkbox.d.ts.map +1 -1
- package/dist/validators/color.d.ts +1 -1
- package/dist/validators/color.d.ts.map +1 -1
- package/dist/validators/date.d.ts +1 -1
- package/dist/validators/date.d.ts.map +1 -1
- package/dist/validators/document.d.ts +1 -1
- package/dist/validators/document.d.ts.map +1 -1
- package/dist/validators/index.d.ts +14 -14
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +14 -14
- package/dist/validators/map.d.ts +1 -1
- package/dist/validators/map.d.ts.map +1 -1
- package/dist/validators/number.d.ts +1 -1
- package/dist/validators/number.d.ts.map +1 -1
- package/dist/validators/password.d.ts +1 -1
- package/dist/validators/password.d.ts.map +1 -1
- package/dist/validators/photo.d.ts +1 -1
- package/dist/validators/photo.d.ts.map +1 -1
- package/dist/validators/richText.d.ts +1 -1
- package/dist/validators/richText.d.ts.map +1 -1
- package/dist/validators/select-multiple.d.ts +1 -1
- package/dist/validators/select-multiple.d.ts.map +1 -1
- package/dist/validators/select.d.ts +1 -1
- package/dist/validators/select.d.ts.map +1 -1
- package/dist/validators/text.d.ts +1 -1
- package/dist/validators/text.d.ts.map +1 -1
- package/dist/validators/textarea.d.ts +1 -1
- package/dist/validators/textarea.d.ts.map +1 -1
- package/dist/validators/video.d.ts +1 -1
- package/dist/validators/video.d.ts.map +1 -1
- package/package.json +5 -3
|
@@ -4,7 +4,7 @@ if (typeof window !== 'undefined') {
|
|
|
4
4
|
// import 'server-only'
|
|
5
5
|
// import chalk from 'chalk'
|
|
6
6
|
import * as z from 'zod';
|
|
7
|
-
import { loadConfigModule } from './loader';
|
|
7
|
+
import { loadConfigModule } from './loader.js';
|
|
8
8
|
// 1. Define config schema
|
|
9
9
|
const cmsConfigSchema = z.object({
|
|
10
10
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { getCMSConfig } from './config-loader';
|
|
2
|
-
export type { CMSConfig } from './config-loader';
|
|
1
|
+
export { getCMSConfig } from './config-loader.js';
|
|
2
|
+
export type { CMSConfig } from './config-loader.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { getCMSConfig } from './config-loader';
|
|
1
|
+
export { getCMSConfig } from './config-loader.js';
|
package/dist/core/db/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MysqlTableChecker } from './table-checker';
|
|
1
|
+
export { MysqlTableChecker } from './table-checker/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/db/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/db/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA"}
|
package/dist/core/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MysqlTableChecker } from './table-checker';
|
|
1
|
+
export { MysqlTableChecker } from './table-checker/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MysqlTable.d.ts","sourceRoot":"","sources":["../../../../src/core/db/table-checker/MysqlTable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"MysqlTable.d.ts","sourceRoot":"","sources":["../../../../src/core/db/table-checker/MysqlTable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAG7C;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,cAAc;WACpC,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;WAkBhD,eAAe,CAAC,KAAK,EAAE,MAAM;;;kBAIR,MAAM;qBAAW,MAAM,EAAE;;;kBAC1B,MAAM;qBAAW,MAAM,EAAE;;;;kBACtB,MAAM;qBAAW,MAAM,EAAE;;;WA2DhD,yBAAyB,CAAC,KAAK,EAAE,MAAM;;mBAU7B,MAAM;kBACP,MAAM;kBACN,MAAM;iBACP,MAAM;qBACF,MAAM;mBACR,MAAM;;;CAahC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { db } from '../../../db/client';
|
|
1
|
+
import { db } from '../../../db/client.js';
|
|
2
2
|
import { sql } from 'drizzle-orm';
|
|
3
|
-
import { DbTableChecker } from './DbTable';
|
|
3
|
+
import { DbTableChecker } from './DbTable.js';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
/**
|
|
6
6
|
* MySQL Table class
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './MysqlTable';
|
|
1
|
+
export * from './MysqlTable.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/db/table-checker/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/db/table-checker/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './MysqlTable';
|
|
1
|
+
export * from './MysqlTable.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Section } from '../sections';
|
|
2
|
-
import type { Session } from '../../auth';
|
|
1
|
+
import type { Section } from '../sections/index.js';
|
|
2
|
+
import type { Session } from '../../auth/index.js';
|
|
3
3
|
type ConstructorType = {
|
|
4
4
|
type: 'new';
|
|
5
5
|
sectionName: string;
|
|
@@ -106,11 +106,11 @@ export declare class FieldFactory {
|
|
|
106
106
|
groupTitle: string;
|
|
107
107
|
groupOrder: number;
|
|
108
108
|
inputs: {
|
|
109
|
-
type: import("../types").FieldType;
|
|
109
|
+
type: import("../types/index.js").FieldType;
|
|
110
110
|
name: string;
|
|
111
111
|
label: string;
|
|
112
112
|
required: boolean;
|
|
113
|
-
conditionalFields: import("../types").ConditionalField[];
|
|
113
|
+
conditionalFields: import("../types/index.js").ConditionalField[];
|
|
114
114
|
readonly: boolean;
|
|
115
115
|
defaultValue: any;
|
|
116
116
|
value: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldFactory.d.ts","sourceRoot":"","sources":["../../../src/core/factories/FieldFactory.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"FieldFactory.d.ts","sourceRoot":"","sources":["../../../src/core/factories/FieldFactory.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAGnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,KAAK,eAAe,GACd;IACI,IAAI,EAAE,KAAK,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,KAAK,CAAA;CACjB,GACD;IACI,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B,CAAA;AAEP,qBAAa,YAAY;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,OAAO,CAA0B;IACzC,OAAO,CAAC,MAAM,CAAyC;IACvD,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,aAAa,CAAa;IAClC,SAAS,CAAC,IAAI,EAAE,KAAK,GAAG,MAAM,CAAA;IAC9B,SAAS,CAAC,WAAW,EAAE,MAAM,CAAA;IAC7B,OAAO,CAAC,YAAY,CAA4B;IAGhD;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAY;IAEjD;;OAEG;gBACS,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,eAAe;IASnE;;OAEG;IACU,UAAU;YAUT,aAAa;YASb,qBAAqB;IAkEnC;;;;OAIG;YACW,qBAAqB;IAuCnC;;;;OAIG;YACW,cAAc;IAuB5B;;;;OAIG;YACW,YAAY;IAgB1B,OAAO,CAAC,kBAAkB;IAa1B;;OAEG;IACU,cAAc;IAqB3B;;;OAGG;IACH,OAAO,CAAC,UAAU;IA4ElB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;;OAGG;IACI,gBAAgB;;;;;;;;;;;;;;;IAmEvB,IAAI,WAAW,IAAI,OAAO,GAAG,SAAS,CAErC;IACD,IAAI,YAAY,IAAI,MAAM,CAEzB;IACD,IAAI,KAAK,IAAI,OAAO,CAEnB;CACJ"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { sql } from 'drizzle-orm';
|
|
2
|
-
import { db } from '../../db/client';
|
|
3
|
-
import { SectionFactory } from './SectionFactory';
|
|
4
|
-
import { SimpleSection, HasItemsSection, CategorySection } from '../sections';
|
|
5
|
-
import { checkboxField, SelectField, SelectMultipleField } from '../fields';
|
|
6
|
-
import { is } from '../helpers';
|
|
2
|
+
import { db } from '../../db/client.js';
|
|
3
|
+
import { SectionFactory } from './SectionFactory.js';
|
|
4
|
+
import { SimpleSection, HasItemsSection, CategorySection } from '../sections/index.js';
|
|
5
|
+
import { checkboxField, SelectField, SelectMultipleField } from '../fields/index.js';
|
|
6
|
+
import { is } from '../helpers/index.js';
|
|
7
7
|
import { cloneDeep } from 'lodash-es';
|
|
8
8
|
import chalk from 'chalk';
|
|
9
9
|
export class FieldFactory {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HasItemsSection, SimpleSection, CategorySection } from '../sections';
|
|
2
|
-
import type { CategorySectionConfig, HasItemsSectionConfig, SimpleSectionConfig } from '../sections';
|
|
3
|
-
import type { SectionTypes } from '../types';
|
|
1
|
+
import { HasItemsSection, SimpleSection, CategorySection } from '../sections/index.js';
|
|
2
|
+
import type { CategorySectionConfig, HasItemsSectionConfig, SimpleSectionConfig } from '../sections/index.js';
|
|
3
|
+
import type { SectionTypes } from '../types/index.js';
|
|
4
4
|
type AnySectionConfig = HasItemsSectionConfig | SimpleSectionConfig | CategorySectionConfig;
|
|
5
5
|
export declare class SectionFactory {
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionFactory.d.ts","sourceRoot":"","sources":["../../../src/core/factories/SectionFactory.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SectionFactory.d.ts","sourceRoot":"","sources":["../../../src/core/factories/SectionFactory.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtF,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC7G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AA+CrD,KAAK,gBAAgB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,qBAAqB,CAAA;AAY3F,qBAAa,cAAc;IACvB;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,aAAa,WAAiD;IAE9E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAw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AAE,MAAM,CAAA;QACZ,IAAI,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAA;QACpC,KAAK,EAAE;YACH,EAAE,EAAE,MAAM,CAAA;YACV,YAAY,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;SACjC,CAAA;KACJ,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAKpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,MAAM,eAAe,GAAG,aAAa,GAAG,eAAe,CAAA;QAC9D,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KACrB,GAAG,eAAe,GAAG,aAAa,GAAG,eAAe;IAYrD;;;;;;;;;OASG;mBACkB,GAAG;IA6FxB;;;;OAIG;mBACkB,eAAe;IAuHpC,OAAO,CAAC,MAAM,CAAC,YAAY;IA+D3B,OAAO,CAAC,MAAM,CAAC,IAAI;CAatB"}
|
|
@@ -5,11 +5,11 @@ import chalk from 'chalk';
|
|
|
5
5
|
import { eq } from 'drizzle-orm';
|
|
6
6
|
import chokidar from 'chokidar';
|
|
7
7
|
import fs from 'fs';
|
|
8
|
-
import { db } from '../../db/client';
|
|
9
|
-
import { AdminPrivilegesTable } from '../../db/schema';
|
|
10
|
-
import { getCMSConfig } from '../config';
|
|
8
|
+
import { db } from '../../db/client.js';
|
|
9
|
+
import { AdminPrivilegesTable } from '../../db/schema.js';
|
|
10
|
+
import { getCMSConfig } from '../config/index.js';
|
|
11
11
|
const cmsConfig = getCMSConfig();
|
|
12
|
-
const hotMarkerFile = resolve(process.cwd(), 'next-cms-sectioninfo.
|
|
12
|
+
const hotMarkerFile = resolve(process.cwd(), 'next-cms-sectioninfo.js');
|
|
13
13
|
const safeRequire = (id) => {
|
|
14
14
|
const req = eval('require');
|
|
15
15
|
return req(id);
|
|
@@ -25,7 +25,7 @@ let tsLoaderRegistered = false;
|
|
|
25
25
|
* @returns The default export of the section file.
|
|
26
26
|
*/
|
|
27
27
|
const requireModuleRuntime = (absPath) => {
|
|
28
|
-
const isTs = absPath.endsWith('.
|
|
28
|
+
const isTs = absPath.endsWith('.js') || absPath.endsWith('.cts') || absPath.endsWith('.mts');
|
|
29
29
|
if (isTs && !tsLoaderRegistered) {
|
|
30
30
|
try {
|
|
31
31
|
const { register } = safeRequire('esbuild-register/dist/node');
|
|
@@ -270,7 +270,7 @@ export class SectionFactory {
|
|
|
270
270
|
}
|
|
271
271
|
const sections = [];
|
|
272
272
|
try {
|
|
273
|
-
const sectionFiles = await glob('**/*.section.
|
|
273
|
+
const sectionFiles = await glob('**/*.section.js', {
|
|
274
274
|
cwd: cmsConfig.sectionsFolder,
|
|
275
275
|
});
|
|
276
276
|
for (const file of sectionFiles) {
|
|
@@ -349,7 +349,7 @@ export class SectionFactory {
|
|
|
349
349
|
if (!this.isDev || this.watcherStarted)
|
|
350
350
|
return;
|
|
351
351
|
this.watcherStarted = true;
|
|
352
|
-
const watcher = chokidar.watch('**/*.section.
|
|
352
|
+
const watcher = chokidar.watch('**/*.section.js', {
|
|
353
353
|
cwd: cmsConfig.sectionsFolder,
|
|
354
354
|
ignoreInitial: true,
|
|
355
355
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { FieldFactory } from './FieldFactory';
|
|
2
|
-
export { SectionFactory } from './SectionFactory';
|
|
1
|
+
export { FieldFactory } from './FieldFactory.js';
|
|
2
|
+
export { SectionFactory } from './SectionFactory.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/factories/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/factories/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { FieldFactory } from './FieldFactory';
|
|
2
|
-
export { SectionFactory } from './SectionFactory';
|
|
1
|
+
export { FieldFactory } from './FieldFactory.js';
|
|
2
|
+
export { SectionFactory } from './SectionFactory.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BaseFieldConfig } from './field';
|
|
2
|
-
import { Field } from './field';
|
|
3
|
-
import { entityKind } from '../helpers';
|
|
1
|
+
import type { BaseFieldConfig } from './field.js';
|
|
2
|
+
import { Field } from './field.js';
|
|
3
|
+
import { entityKind } from '../helpers/index.js';
|
|
4
4
|
import * as z from 'zod';
|
|
5
5
|
declare const configSchema: z.ZodObject<{
|
|
6
6
|
defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodInt]>>;
|
|
@@ -20,7 +20,7 @@ export declare class CheckboxField extends Field<'checkbox', Config> {
|
|
|
20
20
|
name: string;
|
|
21
21
|
label: string;
|
|
22
22
|
required: boolean;
|
|
23
|
-
conditionalFields: import("../types").ConditionalField[];
|
|
23
|
+
conditionalFields: import("../types/index.js").ConditionalField[];
|
|
24
24
|
readonly: boolean;
|
|
25
25
|
defaultValue: any;
|
|
26
26
|
value: any;
|
|
@@ -33,7 +33,7 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
33
33
|
label: z.ZodOptional<z.ZodString>;
|
|
34
34
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
35
35
|
order: z.ZodOptional<z.ZodNumber>;
|
|
36
|
-
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types").ConditionalRule, import("../types").ConditionalRule>>>;
|
|
36
|
+
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").ConditionalRule, import("../types/index.js").ConditionalRule>>>;
|
|
37
37
|
adminGenerated: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodLiteral<false>, z.ZodLiteral<"readonly">]>>;
|
|
38
38
|
}, z.core.$strict>;
|
|
39
39
|
declare const checkboxFieldConfigSchema: z.ZodObject<{
|
|
@@ -44,7 +44,7 @@ declare const checkboxFieldConfigSchema: z.ZodObject<{
|
|
|
44
44
|
label: z.ZodOptional<z.ZodString>;
|
|
45
45
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
46
46
|
order: z.ZodOptional<z.ZodNumber>;
|
|
47
|
-
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types").ConditionalRule, import("../types").ConditionalRule>>>;
|
|
47
|
+
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").ConditionalRule, import("../types/index.js").ConditionalRule>>>;
|
|
48
48
|
adminGenerated: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodLiteral<false>, z.ZodLiteral<"readonly">]>>;
|
|
49
49
|
}, z.core.$strict>;
|
|
50
50
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/core/fields/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/core/fields/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,KAAK,EAAyB,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAExB,QAAA,MAAM,YAAY;;kBAEhB,CAAA;AAEF,KAAK,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAE1C,qBAAa,aAAc,SAAQ,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC;IACxD,gBAAyB,CAAC,UAAU,CAAC,EAAE,MAAM,CAAkB;gBACnD,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;IAI3C;;OAEG;IACH,QAAQ,IAAI,OAAO;IAMnB,aAAa;IAEb,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,eAAe;;;;;;;;;;CAK3B;AAED,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAEpF,QAAA,MAAM,aAAa;;;;;;;;kBAGjB,CAAA;AAEF,QAAA,MAAM,yBAAyB;;;;;;;;;;kBAI7B,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG,mBAAmB,CAmBvF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Field, baseFieldConfigSchema } from './field';
|
|
2
|
-
import { entityKind } from '../helpers';
|
|
1
|
+
import { Field, baseFieldConfigSchema } from './field.js';
|
|
2
|
+
import { entityKind } from '../helpers/index.js';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
const configSchema = z.strictObject({
|
|
5
5
|
defaultValue: z.union([z.boolean(), z.int().positive()]).optional().describe('The default value of the field'),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BaseFieldConfig } from './field';
|
|
2
|
-
import { Field } from './field';
|
|
3
|
-
import { entityKind } from '../helpers';
|
|
1
|
+
import type { BaseFieldConfig } from './field.js';
|
|
2
|
+
import { Field } from './field.js';
|
|
3
|
+
import { entityKind } from '../helpers/index.js';
|
|
4
4
|
import * as z from 'zod';
|
|
5
5
|
declare const configSchema: z.ZodObject<{
|
|
6
6
|
/**
|
|
@@ -25,7 +25,7 @@ export declare class ColorField extends Field<'color', Config> {
|
|
|
25
25
|
name: string;
|
|
26
26
|
label: string;
|
|
27
27
|
required: boolean;
|
|
28
|
-
conditionalFields: import("../types").ConditionalField[];
|
|
28
|
+
conditionalFields: import("../types/index.js").ConditionalField[];
|
|
29
29
|
readonly: boolean;
|
|
30
30
|
defaultValue: any;
|
|
31
31
|
value: any;
|
|
@@ -49,7 +49,7 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
49
49
|
label: z.ZodOptional<z.ZodString>;
|
|
50
50
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
51
51
|
order: z.ZodOptional<z.ZodNumber>;
|
|
52
|
-
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types").ConditionalRule, import("../types").ConditionalRule>>>;
|
|
52
|
+
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").ConditionalRule, import("../types/index.js").ConditionalRule>>>;
|
|
53
53
|
adminGenerated: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodLiteral<false>, z.ZodLiteral<"readonly">]>>;
|
|
54
54
|
}, z.core.$strict>;
|
|
55
55
|
declare const colorFieldConfigSchema: z.ZodObject<{
|
|
@@ -65,7 +65,7 @@ declare const colorFieldConfigSchema: z.ZodObject<{
|
|
|
65
65
|
label: z.ZodOptional<z.ZodString>;
|
|
66
66
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
67
67
|
order: z.ZodOptional<z.ZodNumber>;
|
|
68
|
-
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types").ConditionalRule, import("../types").ConditionalRule>>>;
|
|
68
|
+
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").ConditionalRule, import("../types/index.js").ConditionalRule>>>;
|
|
69
69
|
adminGenerated: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodLiteral<false>, z.ZodLiteral<"readonly">]>>;
|
|
70
70
|
}, z.core.$strict>;
|
|
71
71
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/core/fields/color.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/core/fields/color.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,KAAK,EAAyB,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAExB,QAAA,MAAM,YAAY;IACd;;;;OAIG;;kBAEL,CAAA;AAEF,KAAK,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAE1C,qBAAa,UAAW,SAAQ,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC;IAClD,gBAAyB,CAAC,UAAU,CAAC,EAAE,MAAM,CAAe;IAC5D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAoB;IACzC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;gBACtB,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;IAO3C;;OAEG;IACH,QAAQ,IAAI,MAAM,GAAG,SAAS;IAIrB,eAAe;;;;;;;;;;IAMxB,aAAa;IAWJ,kBAAkB,IAAI,OAAO;IAOtC;;OAEG;IACG,oBAAoB;CAQ7B;AAED,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAE9E,QAAA,MAAM,aAAa;IAnEf;;;;OAIG;;;;;;;;kBAkEL,CAAA;AAEF,QAAA,MAAM,sBAAsB;;;IAxExB;;;;OAIG;;;;;;;;kBAwEL,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG,gBAAgB,CAmBjF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Field, baseFieldConfigSchema } from './field';
|
|
2
|
-
import { entityKind } from '../helpers';
|
|
1
|
+
import { Field, baseFieldConfigSchema } from './field.js';
|
|
2
|
+
import { entityKind } from '../helpers/index.js';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
const configSchema = z.strictObject({
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BaseFieldConfig } from './field';
|
|
2
|
-
import { Field } from './field';
|
|
3
|
-
import { entityKind } from '../helpers';
|
|
1
|
+
import type { BaseFieldConfig } from './field.js';
|
|
2
|
+
import { Field } from './field.js';
|
|
3
|
+
import { entityKind } from '../helpers/index.js';
|
|
4
4
|
import * as z from 'zod';
|
|
5
5
|
declare const configSchema: z.ZodObject<{
|
|
6
6
|
format: z.ZodOptional<z.ZodEnum<{
|
|
@@ -31,7 +31,7 @@ export declare class DateField extends Field<'date', Config> {
|
|
|
31
31
|
name: string;
|
|
32
32
|
label: string;
|
|
33
33
|
required: boolean;
|
|
34
|
-
conditionalFields: import("../types").ConditionalField[];
|
|
34
|
+
conditionalFields: import("../types/index.js").ConditionalField[];
|
|
35
35
|
readonly: boolean;
|
|
36
36
|
defaultValue: any;
|
|
37
37
|
value: any;
|
|
@@ -60,7 +60,7 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
60
60
|
label: z.ZodOptional<z.ZodString>;
|
|
61
61
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
62
62
|
order: z.ZodOptional<z.ZodNumber>;
|
|
63
|
-
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types").ConditionalRule, import("../types").ConditionalRule>>>;
|
|
63
|
+
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").ConditionalRule, import("../types/index.js").ConditionalRule>>>;
|
|
64
64
|
adminGenerated: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodLiteral<false>, z.ZodLiteral<"readonly">]>>;
|
|
65
65
|
}, z.core.$strict>;
|
|
66
66
|
declare const dateFieldConfigSchema: z.ZodObject<{
|
|
@@ -81,7 +81,7 @@ declare const dateFieldConfigSchema: z.ZodObject<{
|
|
|
81
81
|
label: z.ZodOptional<z.ZodString>;
|
|
82
82
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
83
83
|
order: z.ZodOptional<z.ZodNumber>;
|
|
84
|
-
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types").ConditionalRule, import("../types").ConditionalRule>>>;
|
|
84
|
+
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").ConditionalRule, import("../types/index.js").ConditionalRule>>>;
|
|
85
85
|
adminGenerated: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodLiteral<false>, z.ZodLiteral<"readonly">]>>;
|
|
86
86
|
}, z.core.$strict>;
|
|
87
87
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src/core/fields/date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src/core/fields/date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,KAAK,EAAyB,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAExB,QAAA,MAAM,YAAY;;;;;;IAEd;;;;OAIG;;kBAEL,CAAA;AAEF,KAAK,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAE1C,qBAAa,SAAU,SAAQ,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC;IAChD,gBAAyB,CAAC,UAAU,CAAC,EAAE,MAAM,CAAc;IAC3D,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,CAAA;IAClD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAkB;gBACpC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;IAU3C;;OAEG;IACH,QAAQ,IAAI,MAAM;IAYT,eAAe;;;;;;;;;;;IAOxB,aAAa;IAWJ,kBAAkB,IAAI,OAAO;IAOtC;;OAEG;IACG,oBAAoB;CAU7B;AAED,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAE5E,QAAA,MAAM,aAAa;;;;;;IAjFf;;;;OAIG;;;;;;;;kBAgFL,CAAA;AAEF,QAAA,MAAM,qBAAqB;;;;;;;;IAtFvB;;;;OAIG;;;;;;;;kBAsFL,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG,eAAe,CAmB/E"}
|
package/dist/core/fields/date.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Field, baseFieldConfigSchema } from './field';
|
|
2
|
-
import { entityKind } from '../helpers';
|
|
1
|
+
import { Field, baseFieldConfigSchema } from './field.js';
|
|
2
|
+
import { entityKind } from '../helpers/index.js';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
const configSchema = z.strictObject({
|
|
5
5
|
format: z.enum(['date', 'datetime', 'timestamp']).optional().describe('The format of the date field'),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BaseFieldConfig } from './field';
|
|
2
|
-
import { entityKind } from '../helpers';
|
|
1
|
+
import type { BaseFieldConfig } from './field.js';
|
|
2
|
+
import { entityKind } from '../helpers/index.js';
|
|
3
3
|
import * as z from 'zod';
|
|
4
|
-
import { FileField } from './fileField';
|
|
4
|
+
import { FileField } from './fileField.js';
|
|
5
5
|
declare const configSchema: z.ZodObject<{
|
|
6
6
|
/**
|
|
7
7
|
* Maximum file size
|
|
@@ -67,7 +67,7 @@ export declare class DocumentField extends FileField<'document', Config> {
|
|
|
67
67
|
name: string;
|
|
68
68
|
label: string;
|
|
69
69
|
required: boolean;
|
|
70
|
-
conditionalFields: import("../types").ConditionalField[];
|
|
70
|
+
conditionalFields: import("../types/index.js").ConditionalField[];
|
|
71
71
|
readonly: boolean;
|
|
72
72
|
defaultValue: any;
|
|
73
73
|
value: any;
|
|
@@ -135,7 +135,7 @@ declare const optionsSchema: z.ZodObject<{
|
|
|
135
135
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
136
136
|
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
137
137
|
order: z.ZodOptional<z.ZodNumber>;
|
|
138
|
-
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types").ConditionalRule, import("../types").ConditionalRule>>>;
|
|
138
|
+
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").ConditionalRule, import("../types/index.js").ConditionalRule>>>;
|
|
139
139
|
adminGenerated: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodLiteral<false>, z.ZodLiteral<"readonly">]>>;
|
|
140
140
|
}, z.core.$strict>;
|
|
141
141
|
declare const documentFieldConfigSchema: z.ZodObject<{
|
|
@@ -161,7 +161,7 @@ declare const documentFieldConfigSchema: z.ZodObject<{
|
|
|
161
161
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
162
162
|
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
163
163
|
order: z.ZodOptional<z.ZodNumber>;
|
|
164
|
-
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types").ConditionalRule, import("../types").ConditionalRule>>>;
|
|
164
|
+
conditionalRules: z.ZodOptional<z.ZodArray<z.ZodCustom<import("../types/index.js").ConditionalRule, import("../types/index.js").ConditionalRule>>>;
|
|
165
165
|
adminGenerated: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodLiteral<false>, z.ZodLiteral<"readonly">]>>;
|
|
166
166
|
}, z.core.$strict>;
|
|
167
167
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/core/fields/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/core/fields/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAIxB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAQ1C,QAAA,MAAM,YAAY;IACd;;;;;;;OAOG;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;kBAEL,CAAA;AAEF,KAAK,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAE1C,qBAAa,aAAc,SAAQ,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5D,gBAAyB,CAAC,UAAU,CAAC,EAAE,MAAM,CAAkB;IAC/D,QAAQ,CAAC,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,CAAA;IACzD,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAA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R3B;;;;;;;OAOG;;;;;;;;;;;;;;;kBAuRL,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG,mBAAmB,CAmBvF"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { baseFieldConfigSchema } from './field';
|
|
2
|
-
import { entityKind } from '../helpers';
|
|
1
|
+
import { baseFieldConfigSchema } from './field.js';
|
|
2
|
+
import { entityKind } from '../helpers/index.js';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
import fs from 'fs';
|
|
5
5
|
import { customAlphabet } from 'nanoid';
|
|
6
6
|
import path from 'path';
|
|
7
|
-
import { FileField } from './fileField';
|
|
8
|
-
import { getCMSConfig } from '../config';
|
|
7
|
+
import { FileField } from './fileField.js';
|
|
8
|
+
import { getCMSConfig } from '../config/index.js';
|
|
9
9
|
const maxFileSizeSchema = z.strictObject({
|
|
10
10
|
size: z.number().describe('Maximum file size'),
|
|
11
11
|
unit: z.enum(['kb', 'mb']).describe('Size unit'),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Field, FieldConfig } from '.';
|
|
2
|
-
import type { Prettify } from '../types';
|
|
1
|
+
import type { Field, FieldConfig } from './index.js';
|
|
2
|
+
import type { Prettify } from '../types/index.js';
|
|
3
3
|
export type FieldGroupOptions = {
|
|
4
4
|
title?: string;
|
|
5
5
|
order?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-group.d.ts","sourceRoot":"","sources":["../../../src/core/fields/field-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"field-group.d.ts","sourceRoot":"","sources":["../../../src/core/fields/field-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAEjD,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,WAAW,EAAE,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,iBAAiB,CAAC,GAAG;IACzD,IAAI,EAAE,aAAa,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,KAAK,EAAE,CAAA;CAClB,CAAA;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,iBAAiB,GAAG,gBAAgB,CAKrE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { entityKind } from '../helpers';
|
|
2
|
-
import type { ConditionalField, ConditionalRule, FieldType } from '../types';
|
|
1
|
+
import { entityKind } from '../helpers/index.js';
|
|
2
|
+
import type { ConditionalField, ConditionalRule, FieldType } from '../types/index.js';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
/**
|
|
5
5
|
* The Field class is used in the submit class to handle submission of the field
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/core/fields/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/core/fields/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,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G,OAAO,CAAC,IAAI,CAAC;IAIzC,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIhD;;OAEG;IACH,QAAQ,CAAC,QAAQ,IAAI,GAAG;IAExB,cAAc,IAAI,GAAG;IAIrB;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,QAAQ,CAAC,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9C;;;OAGG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAY1C,eAAe;;;;;;;;;;IAaf,kBAAkB,IAAI,OAAO;IAI7B;;OAEG;IACH,aAAa,IAAI,OAAO;CAa3B;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAGpE,eAAO,MAAM,qBAAqB,+CAA8B,CAAA;AAEhE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;IAM9B;;;;OAIG;;IAEH;;;;OAIG;;kBAEL,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,CAAC,iBAAiB,SAAS,MAAM,GAAG,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,GAC1G,iBAAiB,CAAA;AAErB;;GAEG;AACH,UAAU,QAAQ,CAAC,KAAK,SAAS,SAAS,CAAE,SAAQ,eAAe,CAAC,EAAE,CAAC;IACnE,IAAI,EAAE,KAAK,CAAA;CACd"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Field } from './field';
|
|
2
|
-
import { entityKind } from '../helpers';
|
|
1
|
+
import { Field } from './field.js';
|
|
2
|
+
import { entityKind } from '../helpers/index.js';
|
|
3
3
|
type FileType = 'photo' | 'video' | 'document';
|
|
4
4
|
export declare abstract class FileField<TType extends FileType = FileType, TExtraFieldConfig extends object = object> extends Field<TType, TExtraFieldConfig> {
|
|
5
5
|
static readonly [entityKind]: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileField.d.ts","sourceRoot":"","sources":["../../../src/core/fields/fileField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"fileField.d.ts","sourceRoot":"","sources":["../../../src/core/fields/fileField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAEhD,KAAK,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAA;AAC9C,8BAAsB,SAAS,CAC3B,KAAK,SAAS,QAAQ,GAAG,QAAQ,EACjC,iBAAiB,SAAS,MAAM,GAAG,MAAM,CAC3C,SAAQ,KAAK,CAAC,KAAK,EAAE,iBAAiB,CAAC;IACrC,gBAAyB,CAAC,UAAU,CAAC,EAAE,MAAM,CAAc;IAC3D,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAA;IAC7B;;OAEG;IACH,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IACrC,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IACzC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;CACrC"}
|