@open-mercato/shared 0.6.7-develop.6604.1.2c49816dff → 0.6.7-develop.6606.1.3b1ec9b1ea
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/lib/version.js
CHANGED
package/dist/lib/version.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/lib/version.ts"],
|
|
4
|
-
"sourcesContent": ["// Build-time generated version\nexport const APP_VERSION = '0.6.7-develop.
|
|
4
|
+
"sourcesContent": ["// Build-time generated version\nexport const APP_VERSION = '0.6.7-develop.6606.1.3b1ec9b1ea'\nexport const appVersion = APP_VERSION\n"],
|
|
5
5
|
"mappings": "AACO,MAAM,cAAc;AACpB,MAAM,aAAa;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -11,7 +11,7 @@ const upsertCustomEntitySchema = z.object({
|
|
|
11
11
|
label: z.string().min(1).max(200),
|
|
12
12
|
description: z.string().max(2e3).optional().nullable(),
|
|
13
13
|
labelField: z.string().min(1).max(100).regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/).optional(),
|
|
14
|
-
defaultEditor: z.enum(["markdown", "simpleMarkdown", "htmlRichText"]).optional(),
|
|
14
|
+
defaultEditor: z.enum(["markdown", "simpleMarkdown", "htmlRichText", "plain"]).optional(),
|
|
15
15
|
showInSidebar: z.boolean().default(false),
|
|
16
16
|
accessRestricted: z.boolean().default(false),
|
|
17
17
|
isActive: z.boolean().optional()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/modules/entities/validators.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod'\nimport { CUSTOM_FIELD_KINDS } from './kinds'\nimport { validationRulesArraySchema } from './validation'\n\nexport const entityIdRegex = /^[a-z0-9_]+:[a-z0-9_]+$/\nexport const fieldsetCodeRegex = /^[a-z0-9_\\-]+$/\n\nexport const upsertCustomEntitySchema = z.object({\n entityId: z.string().regex(\n entityIdRegex,\n 'Enter the entity id in the format: module_name:entity_id with your prefered entity and module names'\n ),\n label: z.string().min(1).max(200),\n description: z.string().max(2000).optional().nullable(),\n labelField: z.string().min(1).max(100).regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/).optional(),\n defaultEditor: z.enum(['markdown','simpleMarkdown','htmlRichText']).optional(),\n showInSidebar: z.boolean().default(false),\n accessRestricted: z.boolean().default(false),\n isActive: z.boolean().optional(),\n})\n\nexport const upsertCustomFieldDefSchema = z.object({\n entityId: z.string().regex(entityIdRegex),\n key: z.string().min(1).max(100).regex(/^[a-z0-9_]+$/, 'snake_case only'),\n kind: z.enum(CUSTOM_FIELD_KINDS),\n configJson: z\n .object({\n // optional UI/behavioral hints\n label: z.string().max(200).optional(),\n description: z.string().max(2000).optional(),\n options: z.array(z.union([z.string(), z.number()])).optional(),\n optionsUrl: z.string().url().optional(),\n multi: z.boolean().optional(),\n editor: z.string().optional(),\n input: z.string().optional(),\n filterable: z.boolean().optional(),\n formEditable: z.boolean().optional(),\n listVisible: z.boolean().optional(),\n priority: z.number().optional(),\n encrypted: z.boolean().optional(),\n relatedEntityId: z.string().optional(),\n dictionaryId: z.string().uuid().optional(),\n dictionaryInlineCreate: z.boolean().optional(),\n // validation rules\n validation: validationRulesArraySchema.optional(),\n fieldset: z.string().regex(fieldsetCodeRegex).optional(),\n group: z\n .object({\n code: z.string().regex(fieldsetCodeRegex),\n title: z.string().max(200).optional(),\n hint: z.string().max(500).optional(),\n })\n .optional(),\n })\n .passthrough()\n .optional(),\n isActive: z.boolean().optional(),\n})\n\nexport const customFieldsetGroupSchema = z.object({\n code: z.string().regex(fieldsetCodeRegex),\n title: z.string().max(200).optional(),\n hint: z.string().max(500).optional(),\n})\n\nexport const customFieldsetSchema = z.object({\n code: z.string().regex(fieldsetCodeRegex),\n label: z.string().min(1).max(255),\n icon: z.string().max(100).optional(),\n description: z.string().max(2000).optional(),\n groups: z.array(customFieldsetGroupSchema).optional(),\n})\n\nexport const customFieldEntityConfigSchema = z.object({\n fieldsets: z.array(customFieldsetSchema).max(20).optional(),\n singleFieldsetPerRecord: z.boolean().optional(),\n})\n\nexport const encryptionFieldRuleSchema = z.object({\n field: z.string().min(1).max(200),\n hashField: z.string().min(1).max(200).optional().nullable(),\n})\n\nexport const upsertEncryptionMapSchema = z.object({\n entityId: z.string().regex(entityIdRegex),\n tenantId: z.string().uuid().nullable().optional(),\n organizationId: z.string().uuid().nullable().optional(),\n fields: z.array(encryptionFieldRuleSchema).min(1),\n isActive: z.boolean().optional(),\n})\n\nexport type UpsertCustomEntityInput = z.infer<typeof upsertCustomEntitySchema>\nexport type UpsertCustomFieldDefInput = z.infer<typeof upsertCustomFieldDefSchema>\nexport type UpsertEncryptionMapInput = z.infer<typeof upsertEncryptionMapSchema>\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,0BAA0B;AACnC,SAAS,kCAAkC;AAEpC,MAAM,gBAAgB;AACtB,MAAM,oBAAoB;AAE1B,MAAM,2BAA2B,EAAE,OAAO;AAAA,EAC/C,UAAU,EAAE,OAAO,EAAE;AAAA,IACnB;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAChC,aAAa,EAAE,OAAO,EAAE,IAAI,GAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EACtD,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,MAAM,0BAA0B,EAAE,SAAS;AAAA,EAClF,eAAe,EAAE,KAAK,CAAC,YAAW,kBAAiB,
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod'\nimport { CUSTOM_FIELD_KINDS } from './kinds'\nimport { validationRulesArraySchema } from './validation'\n\nexport const entityIdRegex = /^[a-z0-9_]+:[a-z0-9_]+$/\nexport const fieldsetCodeRegex = /^[a-z0-9_\\-]+$/\n\nexport const upsertCustomEntitySchema = z.object({\n entityId: z.string().regex(\n entityIdRegex,\n 'Enter the entity id in the format: module_name:entity_id with your prefered entity and module names'\n ),\n label: z.string().min(1).max(200),\n description: z.string().max(2000).optional().nullable(),\n labelField: z.string().min(1).max(100).regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/).optional(),\n defaultEditor: z.enum(['markdown','simpleMarkdown','htmlRichText','plain']).optional(),\n showInSidebar: z.boolean().default(false),\n accessRestricted: z.boolean().default(false),\n isActive: z.boolean().optional(),\n})\n\nexport const upsertCustomFieldDefSchema = z.object({\n entityId: z.string().regex(entityIdRegex),\n key: z.string().min(1).max(100).regex(/^[a-z0-9_]+$/, 'snake_case only'),\n kind: z.enum(CUSTOM_FIELD_KINDS),\n configJson: z\n .object({\n // optional UI/behavioral hints\n label: z.string().max(200).optional(),\n description: z.string().max(2000).optional(),\n options: z.array(z.union([z.string(), z.number()])).optional(),\n optionsUrl: z.string().url().optional(),\n multi: z.boolean().optional(),\n editor: z.string().optional(),\n input: z.string().optional(),\n filterable: z.boolean().optional(),\n formEditable: z.boolean().optional(),\n listVisible: z.boolean().optional(),\n priority: z.number().optional(),\n encrypted: z.boolean().optional(),\n relatedEntityId: z.string().optional(),\n dictionaryId: z.string().uuid().optional(),\n dictionaryInlineCreate: z.boolean().optional(),\n // validation rules\n validation: validationRulesArraySchema.optional(),\n fieldset: z.string().regex(fieldsetCodeRegex).optional(),\n group: z\n .object({\n code: z.string().regex(fieldsetCodeRegex),\n title: z.string().max(200).optional(),\n hint: z.string().max(500).optional(),\n })\n .optional(),\n })\n .passthrough()\n .optional(),\n isActive: z.boolean().optional(),\n})\n\nexport const customFieldsetGroupSchema = z.object({\n code: z.string().regex(fieldsetCodeRegex),\n title: z.string().max(200).optional(),\n hint: z.string().max(500).optional(),\n})\n\nexport const customFieldsetSchema = z.object({\n code: z.string().regex(fieldsetCodeRegex),\n label: z.string().min(1).max(255),\n icon: z.string().max(100).optional(),\n description: z.string().max(2000).optional(),\n groups: z.array(customFieldsetGroupSchema).optional(),\n})\n\nexport const customFieldEntityConfigSchema = z.object({\n fieldsets: z.array(customFieldsetSchema).max(20).optional(),\n singleFieldsetPerRecord: z.boolean().optional(),\n})\n\nexport const encryptionFieldRuleSchema = z.object({\n field: z.string().min(1).max(200),\n hashField: z.string().min(1).max(200).optional().nullable(),\n})\n\nexport const upsertEncryptionMapSchema = z.object({\n entityId: z.string().regex(entityIdRegex),\n tenantId: z.string().uuid().nullable().optional(),\n organizationId: z.string().uuid().nullable().optional(),\n fields: z.array(encryptionFieldRuleSchema).min(1),\n isActive: z.boolean().optional(),\n})\n\nexport type UpsertCustomEntityInput = z.infer<typeof upsertCustomEntitySchema>\nexport type UpsertCustomFieldDefInput = z.infer<typeof upsertCustomFieldDefSchema>\nexport type UpsertEncryptionMapInput = z.infer<typeof upsertEncryptionMapSchema>\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,0BAA0B;AACnC,SAAS,kCAAkC;AAEpC,MAAM,gBAAgB;AACtB,MAAM,oBAAoB;AAE1B,MAAM,2BAA2B,EAAE,OAAO;AAAA,EAC/C,UAAU,EAAE,OAAO,EAAE;AAAA,IACnB;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAChC,aAAa,EAAE,OAAO,EAAE,IAAI,GAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EACtD,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,MAAM,0BAA0B,EAAE,SAAS;AAAA,EAClF,eAAe,EAAE,KAAK,CAAC,YAAW,kBAAiB,gBAAe,OAAO,CAAC,EAAE,SAAS;AAAA,EACrF,eAAe,EAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EACxC,kBAAkB,EAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EAC3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EAAE,OAAO,EAAE,MAAM,aAAa;AAAA,EACxC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EAChD,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;AAAA,EACtD,QAAQ,EAAE,MAAM,yBAAyB,EAAE,IAAI,CAAC;AAAA,EAChD,UAAU,EAAE,QAAQ,EAAE,SAAS;AACjC,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/shared",
|
|
3
|
-
"version": "0.6.7-develop.
|
|
3
|
+
"version": "0.6.7-develop.6606.1.3b1ec9b1ea",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"@mikro-orm/core": "^7.1.5",
|
|
98
98
|
"@mikro-orm/decorators": "^7.1.5",
|
|
99
99
|
"@mikro-orm/postgresql": "^7.1.5",
|
|
100
|
-
"@open-mercato/cache": "0.6.7-develop.
|
|
100
|
+
"@open-mercato/cache": "0.6.7-develop.6606.1.3b1ec9b1ea",
|
|
101
101
|
"@types/sanitize-html": "^2.16.1",
|
|
102
102
|
"dotenv": "^17.4.2",
|
|
103
103
|
"pino": "^10.3.1",
|
|
@@ -13,7 +13,7 @@ export const upsertCustomEntitySchema = z.object({
|
|
|
13
13
|
label: z.string().min(1).max(200),
|
|
14
14
|
description: z.string().max(2000).optional().nullable(),
|
|
15
15
|
labelField: z.string().min(1).max(100).regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/).optional(),
|
|
16
|
-
defaultEditor: z.enum(['markdown','simpleMarkdown','htmlRichText']).optional(),
|
|
16
|
+
defaultEditor: z.enum(['markdown','simpleMarkdown','htmlRichText','plain']).optional(),
|
|
17
17
|
showInSidebar: z.boolean().default(false),
|
|
18
18
|
accessRestricted: z.boolean().default(false),
|
|
19
19
|
isActive: z.boolean().optional(),
|
package/src/modules/entities.ts
CHANGED
|
@@ -51,12 +51,16 @@ export type CustomFieldDefinition = {
|
|
|
51
51
|
formEditable?: boolean
|
|
52
52
|
indexed?: boolean
|
|
53
53
|
listVisible?: boolean
|
|
54
|
+
// Display order within a form/card; lower renders first. When omitted, the
|
|
55
|
+
// installer derives it from the declaration order of the field set.
|
|
56
|
+
priority?: number
|
|
54
57
|
// Optional UI hints for generated forms/filters
|
|
55
58
|
// Editors for multiline-rich text fields:
|
|
56
59
|
// - 'markdown' -> UIW Markdown editor
|
|
57
60
|
// - 'simpleMarkdown' -> minimal toolbar markdown
|
|
58
61
|
// - 'htmlRichText' -> contenteditable rich text
|
|
59
|
-
|
|
62
|
+
// - 'plain' -> plain <textarea> without any rich-text toolbar
|
|
63
|
+
editor?: 'markdown' | 'simpleMarkdown' | 'htmlRichText' | 'plain'
|
|
60
64
|
// Input hint for plain text fields (e.g., tags input when multi=true)
|
|
61
65
|
// Allow additional custom renderers (e.g., listbox from modules)
|
|
62
66
|
input?: string
|