@inf-monkeys-tech/monkeys 1.0.35 → 1.0.37

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.
Files changed (63) hide show
  1. package/lib/contracts/common.d.ts +2 -1
  2. package/lib/contracts/common.d.ts.map +1 -1
  3. package/lib/contracts/common.js.map +1 -1
  4. package/lib/contracts/index.d.ts +1 -0
  5. package/lib/contracts/index.d.ts.map +1 -1
  6. package/lib/contracts/index.js +1 -0
  7. package/lib/contracts/index.js.map +1 -1
  8. package/lib/contracts/menu.d.ts +790 -0
  9. package/lib/contracts/menu.d.ts.map +1 -0
  10. package/lib/contracts/menu.js +319 -0
  11. package/lib/contracts/menu.js.map +1 -0
  12. package/lib/contracts/page.d.ts +6 -0
  13. package/lib/contracts/page.d.ts.map +1 -1
  14. package/lib/contracts/page.js +6 -0
  15. package/lib/contracts/page.js.map +1 -1
  16. package/lib/contracts/semantic.d.ts +59 -0
  17. package/lib/contracts/semantic.d.ts.map +1 -1
  18. package/lib/contracts/semantic.js +2 -0
  19. package/lib/contracts/semantic.js.map +1 -1
  20. package/lib/contracts/tenant.d.ts +445 -4
  21. package/lib/contracts/tenant.d.ts.map +1 -1
  22. package/lib/contracts/tenant.js +113 -2
  23. package/lib/contracts/tenant.js.map +1 -1
  24. package/lib/esm/contracts/index.mjs +1166 -746
  25. package/lib/esm/contracts/index.mjs.map +1 -1
  26. package/lib/esm/index.mjs +1692 -749
  27. package/lib/esm/index.mjs.map +1 -1
  28. package/lib/esm/runtime/index.mjs +1234 -342
  29. package/lib/esm/runtime/index.mjs.map +1 -1
  30. package/lib/esm/schemas/index.mjs +1158 -746
  31. package/lib/esm/schemas/index.mjs.map +1 -1
  32. package/lib/json-schema/index.json +3 -0
  33. package/lib/json-schema/menu-definition-set.schema.json +411 -0
  34. package/lib/json-schema/menu-definition.schema.json +385 -0
  35. package/lib/json-schema/menu-runtime-bundle.schema.json +541 -0
  36. package/lib/json-schema/page-definition.schema.json +14 -0
  37. package/lib/json-schema/page-runtime-descriptor.schema.json +14 -0
  38. package/lib/json-schema/product-declaration.schema.json +369 -1
  39. package/lib/json-schema/tenant-product-config.schema.json +537 -2
  40. package/lib/json-schema/tenant-runtime-config.schema.json +667 -2
  41. package/lib/runtime/declaration-compiler.d.ts +2 -0
  42. package/lib/runtime/declaration-compiler.d.ts.map +1 -1
  43. package/lib/runtime/declaration-compiler.js +4 -0
  44. package/lib/runtime/declaration-compiler.js.map +1 -1
  45. package/lib/runtime/index.d.ts +1 -0
  46. package/lib/runtime/index.d.ts.map +1 -1
  47. package/lib/runtime/index.js +1 -0
  48. package/lib/runtime/index.js.map +1 -1
  49. package/lib/runtime/menu-compiler.d.ts +58 -0
  50. package/lib/runtime/menu-compiler.d.ts.map +1 -0
  51. package/lib/runtime/menu-compiler.js +436 -0
  52. package/lib/runtime/menu-compiler.js.map +1 -0
  53. package/lib/runtime/tenant-config.d.ts +2 -0
  54. package/lib/runtime/tenant-config.d.ts.map +1 -1
  55. package/lib/runtime/tenant-config.js +1 -0
  56. package/lib/runtime/tenant-config.js.map +1 -1
  57. package/lib/schemas/index.d.ts +477 -3
  58. package/lib/schemas/index.d.ts.map +1 -1
  59. package/lib/schemas/index.js +46 -2
  60. package/lib/schemas/index.js.map +1 -1
  61. package/package.json +1 -1
  62. package/test/fixtures/current-user-menu-profile.v1.json +22 -0
  63. package/test/fixtures/menu-definition.v1.json +41 -0
@@ -232,6 +232,381 @@
232
232
  "type": "string"
233
233
  }
234
234
  },
235
+ "menus": {
236
+ "anyOf": [
237
+ {
238
+ "type": "string",
239
+ "const": "*"
240
+ },
241
+ {
242
+ "type": "object",
243
+ "properties": {
244
+ "version": {
245
+ "type": "number",
246
+ "const": 1
247
+ },
248
+ "definitions": {
249
+ "maxItems": 128,
250
+ "type": "array",
251
+ "items": {
252
+ "type": "object",
253
+ "properties": {
254
+ "contract": {
255
+ "type": "string",
256
+ "const": "MenuDefinition"
257
+ },
258
+ "version": {
259
+ "type": "number",
260
+ "const": 1
261
+ },
262
+ "applicationId": {
263
+ "type": "string",
264
+ "minLength": 1,
265
+ "maxLength": 256
266
+ },
267
+ "surface": {
268
+ "type": "string",
269
+ "minLength": 1,
270
+ "maxLength": 256
271
+ },
272
+ "menuId": {
273
+ "type": "string",
274
+ "minLength": 1,
275
+ "maxLength": 256
276
+ },
277
+ "nodes": {
278
+ "maxItems": 1024,
279
+ "type": "array",
280
+ "items": {
281
+ "anyOf": [
282
+ {
283
+ "type": "object",
284
+ "properties": {
285
+ "nodeId": {
286
+ "type": "string",
287
+ "minLength": 1,
288
+ "maxLength": 256
289
+ },
290
+ "parentNodeId": {
291
+ "type": "string",
292
+ "minLength": 1,
293
+ "maxLength": 256
294
+ },
295
+ "order": {
296
+ "type": "integer",
297
+ "minimum": -1000000,
298
+ "maximum": 1000000
299
+ },
300
+ "kind": {
301
+ "type": "string",
302
+ "const": "group"
303
+ },
304
+ "label": {
305
+ "anyOf": [
306
+ {
307
+ "type": "string",
308
+ "minLength": 1
309
+ },
310
+ {
311
+ "type": "object",
312
+ "propertyNames": {
313
+ "type": "string",
314
+ "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
315
+ },
316
+ "additionalProperties": {
317
+ "type": "string",
318
+ "minLength": 1
319
+ }
320
+ }
321
+ ]
322
+ },
323
+ "iconRef": {
324
+ "type": "string",
325
+ "minLength": 1,
326
+ "maxLength": 256
327
+ }
328
+ },
329
+ "required": [
330
+ "nodeId",
331
+ "order",
332
+ "kind"
333
+ ],
334
+ "additionalProperties": false
335
+ },
336
+ {
337
+ "type": "object",
338
+ "properties": {
339
+ "nodeId": {
340
+ "type": "string",
341
+ "minLength": 1,
342
+ "maxLength": 256
343
+ },
344
+ "parentNodeId": {
345
+ "type": "string",
346
+ "minLength": 1,
347
+ "maxLength": 256
348
+ },
349
+ "order": {
350
+ "type": "integer",
351
+ "minimum": -1000000,
352
+ "maximum": 1000000
353
+ },
354
+ "kind": {
355
+ "type": "string",
356
+ "const": "divider"
357
+ }
358
+ },
359
+ "required": [
360
+ "nodeId",
361
+ "order",
362
+ "kind"
363
+ ],
364
+ "additionalProperties": false
365
+ },
366
+ {
367
+ "type": "object",
368
+ "properties": {
369
+ "nodeId": {
370
+ "type": "string",
371
+ "minLength": 1,
372
+ "maxLength": 256
373
+ },
374
+ "parentNodeId": {
375
+ "type": "string",
376
+ "minLength": 1,
377
+ "maxLength": 256
378
+ },
379
+ "order": {
380
+ "type": "integer",
381
+ "minimum": -1000000,
382
+ "maximum": 1000000
383
+ },
384
+ "kind": {
385
+ "type": "string",
386
+ "const": "item"
387
+ },
388
+ "label": {
389
+ "anyOf": [
390
+ {
391
+ "type": "string",
392
+ "minLength": 1
393
+ },
394
+ {
395
+ "type": "object",
396
+ "propertyNames": {
397
+ "type": "string",
398
+ "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
399
+ },
400
+ "additionalProperties": {
401
+ "type": "string",
402
+ "minLength": 1
403
+ }
404
+ }
405
+ ]
406
+ },
407
+ "iconRef": {
408
+ "type": "string",
409
+ "minLength": 1,
410
+ "maxLength": 256
411
+ },
412
+ "tone": {
413
+ "type": "string",
414
+ "enum": [
415
+ "default",
416
+ "danger"
417
+ ]
418
+ },
419
+ "requiredPermission": {
420
+ "type": "string",
421
+ "minLength": 1,
422
+ "maxLength": 256
423
+ },
424
+ "behavior": {
425
+ "anyOf": [
426
+ {
427
+ "type": "object",
428
+ "properties": {
429
+ "kind": {
430
+ "type": "string",
431
+ "const": "navigate"
432
+ },
433
+ "page": {
434
+ "type": "object",
435
+ "properties": {
436
+ "applicationId": {
437
+ "type": "string",
438
+ "minLength": 1,
439
+ "maxLength": 256
440
+ },
441
+ "pageId": {
442
+ "type": "string",
443
+ "minLength": 1,
444
+ "maxLength": 256
445
+ }
446
+ },
447
+ "required": [
448
+ "applicationId",
449
+ "pageId"
450
+ ],
451
+ "additionalProperties": false
452
+ },
453
+ "activationId": {
454
+ "type": "string",
455
+ "minLength": 1,
456
+ "maxLength": 256
457
+ },
458
+ "input": {
459
+ "anyOf": [
460
+ {
461
+ "type": "object",
462
+ "properties": {
463
+ "exposure": {
464
+ "type": "string",
465
+ "const": "client"
466
+ },
467
+ "value": {
468
+ "type": "object",
469
+ "propertyNames": {
470
+ "type": "string"
471
+ },
472
+ "additionalProperties": {
473
+ "$ref": "#/$defs/__schema0"
474
+ }
475
+ }
476
+ },
477
+ "required": [
478
+ "exposure",
479
+ "value"
480
+ ],
481
+ "additionalProperties": false
482
+ },
483
+ {
484
+ "type": "object",
485
+ "properties": {
486
+ "exposure": {
487
+ "type": "string",
488
+ "const": "server"
489
+ },
490
+ "value": {
491
+ "type": "object",
492
+ "propertyNames": {
493
+ "type": "string"
494
+ },
495
+ "additionalProperties": {
496
+ "$ref": "#/$defs/__schema0"
497
+ }
498
+ }
499
+ },
500
+ "required": [
501
+ "exposure",
502
+ "value"
503
+ ],
504
+ "additionalProperties": false
505
+ }
506
+ ]
507
+ }
508
+ },
509
+ "required": [
510
+ "kind",
511
+ "page"
512
+ ],
513
+ "additionalProperties": false
514
+ },
515
+ {
516
+ "type": "object",
517
+ "properties": {
518
+ "kind": {
519
+ "type": "string",
520
+ "const": "action"
521
+ },
522
+ "actionRef": {
523
+ "type": "string",
524
+ "minLength": 1,
525
+ "maxLength": 256
526
+ },
527
+ "input": {
528
+ "type": "object",
529
+ "propertyNames": {
530
+ "type": "string"
531
+ },
532
+ "additionalProperties": {
533
+ "$ref": "#/$defs/__schema0"
534
+ }
535
+ }
536
+ },
537
+ "required": [
538
+ "kind",
539
+ "actionRef"
540
+ ],
541
+ "additionalProperties": false
542
+ }
543
+ ]
544
+ }
545
+ },
546
+ "required": [
547
+ "nodeId",
548
+ "order",
549
+ "kind",
550
+ "label",
551
+ "behavior"
552
+ ],
553
+ "additionalProperties": false
554
+ }
555
+ ]
556
+ }
557
+ },
558
+ "contributions": {
559
+ "default": [],
560
+ "maxItems": 1024,
561
+ "type": "array",
562
+ "items": {
563
+ "type": "object",
564
+ "properties": {
565
+ "providerId": {
566
+ "type": "string",
567
+ "minLength": 1,
568
+ "maxLength": 256
569
+ },
570
+ "parentNodeId": {
571
+ "type": "string",
572
+ "minLength": 1,
573
+ "maxLength": 256
574
+ },
575
+ "order": {
576
+ "type": "integer",
577
+ "minimum": -1000000,
578
+ "maximum": 1000000
579
+ }
580
+ },
581
+ "required": [
582
+ "providerId",
583
+ "order"
584
+ ],
585
+ "additionalProperties": false
586
+ }
587
+ }
588
+ },
589
+ "required": [
590
+ "contract",
591
+ "version",
592
+ "applicationId",
593
+ "surface",
594
+ "menuId",
595
+ "nodes",
596
+ "contributions"
597
+ ],
598
+ "additionalProperties": false
599
+ }
600
+ }
601
+ },
602
+ "required": [
603
+ "version",
604
+ "definitions"
605
+ ],
606
+ "additionalProperties": false
607
+ }
608
+ ]
609
+ },
235
610
  "applicationConfig": {
236
611
  "type": "object",
237
612
  "properties": {
@@ -729,9 +1104,155 @@
729
1104
  "type": "array",
730
1105
  "items": {
731
1106
  "type": "string",
732
- "minLength": 1,
733
- "maxLength": 256
1107
+ "enum": [
1108
+ "dark-mode",
1109
+ "language",
1110
+ "settings",
1111
+ "logout"
1112
+ ]
734
1113
  }
1114
+ },
1115
+ {
1116
+ "type": "object",
1117
+ "properties": {
1118
+ "version": {
1119
+ "type": "number",
1120
+ "const": 1
1121
+ },
1122
+ "sections": {
1123
+ "maxItems": 20,
1124
+ "type": "array",
1125
+ "items": {
1126
+ "type": "object",
1127
+ "properties": {
1128
+ "id": {
1129
+ "type": "string",
1130
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1131
+ },
1132
+ "label": {
1133
+ "anyOf": [
1134
+ {
1135
+ "type": "string",
1136
+ "minLength": 1
1137
+ },
1138
+ {
1139
+ "type": "object",
1140
+ "propertyNames": {
1141
+ "type": "string",
1142
+ "minLength": 1
1143
+ },
1144
+ "additionalProperties": {
1145
+ "type": "string",
1146
+ "minLength": 1
1147
+ }
1148
+ }
1149
+ ]
1150
+ },
1151
+ "dividerBefore": {
1152
+ "type": "boolean"
1153
+ },
1154
+ "items": {
1155
+ "type": "array",
1156
+ "items": {
1157
+ "anyOf": [
1158
+ {
1159
+ "type": "object",
1160
+ "properties": {
1161
+ "id": {
1162
+ "type": "string",
1163
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1164
+ },
1165
+ "kind": {
1166
+ "type": "string",
1167
+ "const": "navigation"
1168
+ },
1169
+ "ref": {
1170
+ "type": "string",
1171
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1172
+ }
1173
+ },
1174
+ "required": [
1175
+ "id",
1176
+ "kind",
1177
+ "ref"
1178
+ ],
1179
+ "additionalProperties": false
1180
+ },
1181
+ {
1182
+ "type": "object",
1183
+ "properties": {
1184
+ "id": {
1185
+ "type": "string",
1186
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1187
+ },
1188
+ "kind": {
1189
+ "type": "string",
1190
+ "const": "control"
1191
+ },
1192
+ "ref": {
1193
+ "type": "string",
1194
+ "enum": [
1195
+ "dark-mode",
1196
+ "language"
1197
+ ]
1198
+ }
1199
+ },
1200
+ "required": [
1201
+ "id",
1202
+ "kind",
1203
+ "ref"
1204
+ ],
1205
+ "additionalProperties": false
1206
+ },
1207
+ {
1208
+ "type": "object",
1209
+ "properties": {
1210
+ "id": {
1211
+ "type": "string",
1212
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
1213
+ },
1214
+ "kind": {
1215
+ "type": "string",
1216
+ "const": "action"
1217
+ },
1218
+ "ref": {
1219
+ "type": "string",
1220
+ "enum": [
1221
+ "logout"
1222
+ ]
1223
+ },
1224
+ "tone": {
1225
+ "type": "string",
1226
+ "enum": [
1227
+ "default",
1228
+ "danger"
1229
+ ]
1230
+ }
1231
+ },
1232
+ "required": [
1233
+ "id",
1234
+ "kind",
1235
+ "ref"
1236
+ ],
1237
+ "additionalProperties": false
1238
+ }
1239
+ ]
1240
+ }
1241
+ }
1242
+ },
1243
+ "required": [
1244
+ "id",
1245
+ "items"
1246
+ ],
1247
+ "additionalProperties": false
1248
+ }
1249
+ }
1250
+ },
1251
+ "required": [
1252
+ "version",
1253
+ "sections"
1254
+ ],
1255
+ "additionalProperties": false
735
1256
  }
736
1257
  ]
737
1258
  },
@@ -1412,6 +1933,20 @@
1412
1933
  ],
1413
1934
  "additionalProperties": false
1414
1935
  },
1936
+ "input": {
1937
+ "type": "object",
1938
+ "properties": {
1939
+ "schemaRef": {
1940
+ "type": "string",
1941
+ "minLength": 1,
1942
+ "maxLength": 256
1943
+ }
1944
+ },
1945
+ "required": [
1946
+ "schemaRef"
1947
+ ],
1948
+ "additionalProperties": false
1949
+ },
1415
1950
  "rendererConfig": {
1416
1951
  "type": "object",
1417
1952
  "properties": {