@inf-monkeys-tech/monkeys 1.0.42 → 1.0.44
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/lib/contracts/menu.d.ts +18 -0
- package/lib/contracts/menu.d.ts.map +1 -1
- package/lib/contracts/menu.js +2 -0
- package/lib/contracts/menu.js.map +1 -1
- package/lib/contracts/semantic.d.ts +2 -0
- package/lib/contracts/semantic.d.ts.map +1 -1
- package/lib/contracts/tenant.d.ts +7 -0
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +1 -0
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/esm/contracts/index.mjs +5 -2
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +24 -5
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +24 -5
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +5 -2
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/menu-definition-set.schema.json +6 -0
- package/lib/json-schema/menu-definition.schema.json +6 -0
- package/lib/json-schema/menu-runtime-bundle.schema.json +6 -0
- package/lib/json-schema/product-declaration.schema.json +6 -0
- package/lib/json-schema/tenant-product-config.schema.json +9 -0
- package/lib/json-schema/tenant-runtime-config.schema.json +9 -0
- package/lib/runtime/menu-compiler.d.ts +2 -0
- package/lib/runtime/menu-compiler.d.ts.map +1 -1
- package/lib/runtime/menu-compiler.js +9 -3
- package/lib/runtime/menu-compiler.js.map +1 -1
- package/lib/schemas/index.d.ts +14 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/test/fixtures/tenant-product-config.public.json +2 -1
|
@@ -9044,7 +9044,8 @@ var MenuGroupNodeSchema = z8.object({
|
|
|
9044
9044
|
...MenuNodeBaseShape,
|
|
9045
9045
|
kind: z8.literal("group"),
|
|
9046
9046
|
label: LocalizedTextSchema.optional(),
|
|
9047
|
-
iconRef: ContractIdentifierSchema.optional()
|
|
9047
|
+
iconRef: ContractIdentifierSchema.optional(),
|
|
9048
|
+
disabled: z8.boolean().optional()
|
|
9048
9049
|
}).strict();
|
|
9049
9050
|
var MenuDividerNodeSchema = z8.object({
|
|
9050
9051
|
...MenuNodeBaseShape,
|
|
@@ -9056,6 +9057,7 @@ var MenuItemNodeSchema = z8.object({
|
|
|
9056
9057
|
label: LocalizedTextSchema,
|
|
9057
9058
|
iconRef: ContractIdentifierSchema.optional(),
|
|
9058
9059
|
tone: z8.enum(["default", "danger"]).optional(),
|
|
9060
|
+
disabled: z8.boolean().optional(),
|
|
9059
9061
|
requiredPermission: ContractIdentifierSchema.optional(),
|
|
9060
9062
|
behavior: MenuBehaviorSchema
|
|
9061
9063
|
}).strict();
|
|
@@ -9919,7 +9921,11 @@ var compileMenuRuntimeBundle = (input) => {
|
|
|
9919
9921
|
);
|
|
9920
9922
|
}
|
|
9921
9923
|
const compiledNodes = definition.nodes.map((node, nodeIndex) => {
|
|
9922
|
-
if (node.kind
|
|
9924
|
+
if (node.kind === "divider") return node;
|
|
9925
|
+
if (node.kind === "group") {
|
|
9926
|
+
const { disabled: disabled2, ...presentation2 } = node;
|
|
9927
|
+
return disabled2 === true ? { ...presentation2, disabled: disabled2 } : presentation2;
|
|
9928
|
+
}
|
|
9923
9929
|
const nodePath = `definitions[${definitionIndex}].nodes[${nodeIndex}]`;
|
|
9924
9930
|
if (node.requiredPermission && !knownPermissions.has(node.requiredPermission)) {
|
|
9925
9931
|
throw new MenuCompilationError(
|
|
@@ -9981,9 +9987,15 @@ var compileMenuRuntimeBundle = (input) => {
|
|
|
9981
9987
|
});
|
|
9982
9988
|
}
|
|
9983
9989
|
if (definition.applicationId === applicationId) requestedTargetKeys.add(identity);
|
|
9984
|
-
const {
|
|
9990
|
+
const {
|
|
9991
|
+
requiredPermission: requiredPermission2,
|
|
9992
|
+
behavior: _behavior2,
|
|
9993
|
+
disabled: disabled2,
|
|
9994
|
+
...presentation2
|
|
9995
|
+
} = node;
|
|
9985
9996
|
return CompiledMenuItemNodeSchema.parse({
|
|
9986
9997
|
...presentation2,
|
|
9998
|
+
...disabled2 === true ? { disabled: disabled2 } : {},
|
|
9987
9999
|
behavior: {
|
|
9988
10000
|
kind: "navigate",
|
|
9989
10001
|
page: node.behavior.page,
|
|
@@ -10005,9 +10017,15 @@ var compileMenuRuntimeBundle = (input) => {
|
|
|
10005
10017
|
validatePermissionCodes(access.permissionAllOf, knownPermissions, `${nodePath}.targetAccess.permissionAllOf`);
|
|
10006
10018
|
validatePermissionCodes(access.permissionAnyOf, knownPermissions, `${nodePath}.targetAccess.permissionAnyOf`);
|
|
10007
10019
|
const actionInput = node.behavior.input ? validateInput(node.behavior.input, action.inputSchemaRef, inputValidators, `${nodePath}.behavior.input`) : void 0;
|
|
10008
|
-
const {
|
|
10020
|
+
const {
|
|
10021
|
+
requiredPermission,
|
|
10022
|
+
behavior: _behavior,
|
|
10023
|
+
disabled,
|
|
10024
|
+
...presentation
|
|
10025
|
+
} = node;
|
|
10009
10026
|
return CompiledMenuItemNodeSchema.parse({
|
|
10010
10027
|
...presentation,
|
|
10028
|
+
...disabled === true ? { disabled } : {},
|
|
10011
10029
|
behavior: { kind: "action", actionRef: node.behavior.actionRef, input: actionInput },
|
|
10012
10030
|
access: { ...access, requiredPermission }
|
|
10013
10031
|
});
|
|
@@ -13334,7 +13352,8 @@ var TenantApplicationConfigSchema = z11.object({
|
|
|
13334
13352
|
logo: AssetVariantsSchema.optional(),
|
|
13335
13353
|
brandDisplayMode: z11.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
|
|
13336
13354
|
density: z11.enum(["compact", "default", "comfortable"]).optional(),
|
|
13337
|
-
sessionCentric: z11.boolean().optional()
|
|
13355
|
+
sessionCentric: z11.boolean().optional(),
|
|
13356
|
+
quickStartEnabled: z11.boolean().optional()
|
|
13338
13357
|
}).strict().optional()
|
|
13339
13358
|
}).strict(),
|
|
13340
13359
|
landingPage: TenantLandingPageConfigSchema.optional(),
|