@inf-monkeys-tech/monkeys 1.0.43 → 1.0.45
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/lib/esm/index.mjs
CHANGED
|
@@ -8713,7 +8713,8 @@ var MenuGroupNodeSchema = z10.object({
|
|
|
8713
8713
|
...MenuNodeBaseShape,
|
|
8714
8714
|
kind: z10.literal("group"),
|
|
8715
8715
|
label: LocalizedTextSchema.optional(),
|
|
8716
|
-
iconRef: ContractIdentifierSchema.optional()
|
|
8716
|
+
iconRef: ContractIdentifierSchema.optional(),
|
|
8717
|
+
disabled: z10.boolean().optional()
|
|
8717
8718
|
}).strict();
|
|
8718
8719
|
var MenuDividerNodeSchema = z10.object({
|
|
8719
8720
|
...MenuNodeBaseShape,
|
|
@@ -8725,6 +8726,7 @@ var MenuItemNodeSchema = z10.object({
|
|
|
8725
8726
|
label: LocalizedTextSchema,
|
|
8726
8727
|
iconRef: ContractIdentifierSchema.optional(),
|
|
8727
8728
|
tone: z10.enum(["default", "danger"]).optional(),
|
|
8729
|
+
disabled: z10.boolean().optional(),
|
|
8728
8730
|
requiredPermission: ContractIdentifierSchema.optional(),
|
|
8729
8731
|
behavior: MenuBehaviorSchema
|
|
8730
8732
|
}).strict();
|
|
@@ -11746,7 +11748,8 @@ var TenantApplicationConfigSchema = z13.object({
|
|
|
11746
11748
|
imageThumbnail: z13.boolean().optional(),
|
|
11747
11749
|
pages: z13.object({
|
|
11748
11750
|
allowPageKeys: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]),
|
|
11749
|
-
defaultPageKey: ContractIdentifierSchema.optional()
|
|
11751
|
+
defaultPageKey: ContractIdentifierSchema.optional(),
|
|
11752
|
+
homeEntryEnabled: z13.boolean().optional()
|
|
11750
11753
|
}).strict().optional(),
|
|
11751
11754
|
agent: z13.object({
|
|
11752
11755
|
logo: AssetVariantsSchema.optional(),
|
|
@@ -13734,7 +13737,11 @@ var compileMenuRuntimeBundle = (input) => {
|
|
|
13734
13737
|
);
|
|
13735
13738
|
}
|
|
13736
13739
|
const compiledNodes = definition.nodes.map((node, nodeIndex) => {
|
|
13737
|
-
if (node.kind
|
|
13740
|
+
if (node.kind === "divider") return node;
|
|
13741
|
+
if (node.kind === "group") {
|
|
13742
|
+
const { disabled: disabled2, ...presentation2 } = node;
|
|
13743
|
+
return disabled2 === true ? { ...presentation2, disabled: disabled2 } : presentation2;
|
|
13744
|
+
}
|
|
13738
13745
|
const nodePath = `definitions[${definitionIndex}].nodes[${nodeIndex}]`;
|
|
13739
13746
|
if (node.requiredPermission && !knownPermissions.has(node.requiredPermission)) {
|
|
13740
13747
|
throw new MenuCompilationError(
|
|
@@ -13796,9 +13803,15 @@ var compileMenuRuntimeBundle = (input) => {
|
|
|
13796
13803
|
});
|
|
13797
13804
|
}
|
|
13798
13805
|
if (definition.applicationId === applicationId) requestedTargetKeys.add(identity);
|
|
13799
|
-
const {
|
|
13806
|
+
const {
|
|
13807
|
+
requiredPermission: requiredPermission2,
|
|
13808
|
+
behavior: _behavior2,
|
|
13809
|
+
disabled: disabled2,
|
|
13810
|
+
...presentation2
|
|
13811
|
+
} = node;
|
|
13800
13812
|
return CompiledMenuItemNodeSchema.parse({
|
|
13801
13813
|
...presentation2,
|
|
13814
|
+
...disabled2 === true ? { disabled: disabled2 } : {},
|
|
13802
13815
|
behavior: {
|
|
13803
13816
|
kind: "navigate",
|
|
13804
13817
|
page: node.behavior.page,
|
|
@@ -13820,9 +13833,15 @@ var compileMenuRuntimeBundle = (input) => {
|
|
|
13820
13833
|
validatePermissionCodes(access.permissionAllOf, knownPermissions, `${nodePath}.targetAccess.permissionAllOf`);
|
|
13821
13834
|
validatePermissionCodes(access.permissionAnyOf, knownPermissions, `${nodePath}.targetAccess.permissionAnyOf`);
|
|
13822
13835
|
const actionInput = node.behavior.input ? validateInput(node.behavior.input, action.inputSchemaRef, inputValidators, `${nodePath}.behavior.input`) : void 0;
|
|
13823
|
-
const {
|
|
13836
|
+
const {
|
|
13837
|
+
requiredPermission,
|
|
13838
|
+
behavior: _behavior,
|
|
13839
|
+
disabled,
|
|
13840
|
+
...presentation
|
|
13841
|
+
} = node;
|
|
13824
13842
|
return CompiledMenuItemNodeSchema.parse({
|
|
13825
13843
|
...presentation,
|
|
13844
|
+
...disabled === true ? { disabled } : {},
|
|
13826
13845
|
behavior: { kind: "action", actionRef: node.behavior.actionRef, input: actionInput },
|
|
13827
13846
|
access: { ...access, requiredPermission }
|
|
13828
13847
|
});
|