@siliconst/metaui 1.4.13 → 1.4.14

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 (92) hide show
  1. package/package.json +1 -1
  2. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js +50 -3
  3. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost-dbg.js.map +1 -1
  4. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts +1 -1
  5. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.d.ts.map +1 -1
  6. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js +1 -1
  7. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.js.map +1 -1
  8. package/src/nz/co/siliconst/ui5/metaui/controls/DynamicHost.ts +57 -4
  9. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js +44 -2
  10. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost-dbg.js.map +1 -1
  11. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts +4 -0
  12. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.d.ts.map +1 -1
  13. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js +1 -1
  14. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.js.map +1 -1
  15. package/src/nz/co/siliconst/ui5/metaui/controls/host/GeneratorHost.ts +51 -4
  16. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js +16 -1
  17. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate-dbg.js.map +1 -1
  18. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts +6 -0
  19. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.d.ts.map +1 -1
  20. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js +1 -1
  21. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.js.map +1 -1
  22. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts +16 -1
  23. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate-dbg.js.map +1 -1
  24. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.js.map +1 -1
  25. package/src/nz/co/siliconst/ui5/metaui/controls/host/delegates/ValidationDelegate.ts +2 -2
  26. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry-dbg.js +47 -0
  27. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry-dbg.js.map +1 -0
  28. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.d.ts +23 -0
  29. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.d.ts.map +1 -0
  30. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.js +2 -0
  31. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.js.map +1 -0
  32. package/src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.ts +45 -0
  33. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js +17 -0
  34. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer-dbg.js.map +1 -1
  35. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts +10 -1
  36. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.d.ts.map +1 -1
  37. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js +1 -1
  38. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.js.map +1 -1
  39. package/src/nz/co/siliconst/ui5/metaui/core/SchemaNormalizer.ts +19 -1
  40. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema-dbg.js.map +1 -1
  41. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts +7 -0
  42. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.d.ts.map +1 -1
  43. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchema.ts +9 -0
  44. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin-dbg.js +2 -0
  45. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin-dbg.js.map +1 -0
  46. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.d.ts +23 -0
  47. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.d.ts.map +1 -0
  48. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.js +2 -0
  49. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.js.map +1 -0
  50. package/src/nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin.ts +23 -0
  51. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js +6 -1
  52. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout-dbg.js.map +1 -1
  53. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.d.ts.map +1 -1
  54. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js +1 -1
  55. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.js.map +1 -1
  56. package/src/nz/co/siliconst/ui5/metaui/layouts/FormLayout.ts +6 -1
  57. package/src/nz/co/siliconst/ui5/metaui/library-preload.js +14 -6
  58. package/src/nz/co/siliconst/ui5/metaui/library-preload.js.map +1 -1
  59. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js +29 -17
  60. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin-dbg.js.map +1 -1
  61. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.d.ts.map +1 -1
  62. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js +1 -1
  63. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.js.map +1 -1
  64. package/src/nz/co/siliconst/ui5/metaui/plugins/controls/MultiInputPlugin.ts +32 -15
  65. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder-dbg.js +226 -0
  66. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder-dbg.js.map +1 -0
  67. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.d.ts +63 -0
  68. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.d.ts.map +1 -0
  69. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.js +2 -0
  70. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.js.map +1 -0
  71. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerBuilder.ts +233 -0
  72. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver-dbg.js +43 -0
  73. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver-dbg.js.map +1 -0
  74. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.d.ts +15 -0
  75. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.d.ts.map +1 -0
  76. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.js +2 -0
  77. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.js.map +1 -0
  78. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerRefResolver.ts +37 -0
  79. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper-dbg.js +37 -0
  80. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper-dbg.js.map +1 -0
  81. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.d.ts +18 -0
  82. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.d.ts.map +1 -0
  83. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.js +2 -0
  84. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.js.map +1 -0
  85. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerTypeMapper.ts +28 -0
  86. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper-dbg.js +84 -0
  87. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper-dbg.js.map +1 -0
  88. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.d.ts +27 -0
  89. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.d.ts.map +1 -0
  90. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.js +2 -0
  91. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.js.map +1 -0
  92. package/src/nz/co/siliconst/ui5/metaui/swagger/SwaggerUIMapper.ts +80 -0
@@ -6,6 +6,9 @@ sap.ui.define(["sap/m/Dialog", "sap/m/Button", "../../../utils/Logger"], functio
6
6
  * Extracts all popup and dialog generation logic from the Host control.
7
7
  */
8
8
  class DialogDelegate {
9
+ activeDialog = null;
10
+ requestedWidth = "auto";
11
+
9
12
  /**
10
13
  * Initializes a new DialogDelegate to handle dialog-based rendering.
11
14
  * @param host The parent DynamicHost or GeneratorHost control.
@@ -18,10 +21,11 @@ sap.ui.define(["sap/m/Dialog", "sap/m/Button", "../../../utils/Logger"], functio
18
21
  * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.
19
22
  * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.
20
23
  */
21
- openInDialog(title = "Form", submitButtonText = "OK", isGenerated, cancelButtonText = "Cancel", dialogWidth = "800px", parentView) {
24
+ openInDialog(title = "Form", submitButtonText = "OK", isGenerated, cancelButtonText = "Cancel", dialogWidth = "auto", parentView) {
22
25
  // UI5 PURITY: Do not manually force generate() here.
23
26
  // Opening the dialog mounts the host, natively firing onBeforeRendering() which triggers generation cleanly.
24
27
 
28
+ this.requestedWidth = dialogWidth;
25
29
  const dialog = new Dialog({
26
30
  title: title,
27
31
  contentWidth: dialogWidth,
@@ -53,14 +57,25 @@ sap.ui.define(["sap/m/Dialog", "sap/m/Button", "../../../utils/Logger"], functio
53
57
  }
54
58
  }),
55
59
  afterClose: () => {
60
+ this.activeDialog = null;
56
61
  dialog.destroy();
57
62
  }
58
63
  });
64
+ this.activeDialog = dialog;
59
65
  if (parentView && typeof parentView.addDependent === "function") {
60
66
  parentView.addDependent(dialog);
61
67
  }
62
68
  dialog.open();
63
69
  }
70
+
71
+ /**
72
+ * Allows the Engine to retroactively expand the dialog once the schema is fully parsed.
73
+ */
74
+ updateDialogWidthDynamically(optimalWidth) {
75
+ if (this.activeDialog && this.requestedWidth === "auto" && optimalWidth !== "auto") {
76
+ this.activeDialog.setContentWidth(optimalWidth);
77
+ }
78
+ }
64
79
  }
65
80
  var __exports = {
66
81
  __esModule: true
@@ -1 +1 @@
1
- {"version":3,"file":"DialogDelegate-dbg.js","names":["Logger","_____utils_Logger","DialogDelegate","constructor","host","openInDialog","title","submitButtonText","isGenerated","cancelButtonText","dialogWidth","parentView","dialog","Dialog","contentWidth","content","beginButton","Button","text","type","press","success","triggerSubmit","close","err","error","message","fireEvent","fieldPath","endButton","afterClose","destroy","addDependent","open","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: Record<string, unknown>): this;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n\n /**\n * Initializes a new DialogDelegate to handle dialog-based rendering.\n * @param host The parent DynamicHost or GeneratorHost control.\n */\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean, cancelButtonText: string = \"Cancel\", dialogWidth: string = \"800px\", parentView?: Control): void {\n // UI5 PURITY: Do not manually force generate() here.\n // Opening the dialog mounts the host, natively firing onBeforeRendering() which triggers generation cleanly.\n\n const dialog = new Dialog({\n title: title,\n contentWidth: dialogWidth,\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: cancelButtonText,\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n dialog.destroy();\n }\n });\n\n if (parentView && typeof parentView.addDependent === \"function\") {\n parentView.addDependent(dialog);\n }\n\n dialog.open();\n }\n}\n"],"mappings":";;;QAGSA,MAAM,GAAAC,iBAAA;EAQf;AACA;AACA;EACO,MAAMC,cAAc,CAAC;IAGxB;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAA2B,EAAE;MACrC,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;AACA;IACWC,YAAYA,CAACC,KAAa,GAAG,MAAM,EAAEC,gBAAwB,GAAG,IAAI,EAAEC,WAAoB,EAAEC,gBAAwB,GAAG,QAAQ,EAAEC,WAAmB,GAAG,OAAO,EAAEC,UAAoB,EAAQ;MAC/L;MACA;;MAEA,MAAMC,MAAM,GAAG,IAAIC,MAAM,CAAC;QACtBP,KAAK,EAAEA,KAAK;QACZQ,YAAY,EAA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List":[]}
1
+ {"version":3,"file":"DialogDelegate-dbg.js","names":["Logger","_____utils_Logger","DialogDelegate","activeDialog","requestedWidth","constructor","host","openInDialog","title","submitButtonText","isGenerated","cancelButtonText","dialogWidth","parentView","dialog","Dialog","contentWidth","content","beginButton","Button","text","type","press","success","triggerSubmit","close","err","error","message","fireEvent","fieldPath","endButton","afterClose","destroy","addDependent","open","updateDialogWidthDynamically","optimalWidth","setContentWidth","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: Record<string, unknown>): this;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n private activeDialog: Dialog | null = null;\n private requestedWidth: string = \"auto\";\n\n /**\n * Initializes a new DialogDelegate to handle dialog-based rendering.\n * @param host The parent DynamicHost or GeneratorHost control.\n */\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean, cancelButtonText: string = \"Cancel\", dialogWidth: string = \"auto\", parentView?: Control): void {\n // UI5 PURITY: Do not manually force generate() here.\n // Opening the dialog mounts the host, natively firing onBeforeRendering() which triggers generation cleanly.\n\n this.requestedWidth = dialogWidth;\n const dialog = new Dialog({\n title: title,\n contentWidth: dialogWidth,\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: cancelButtonText,\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n this.activeDialog = null;\n dialog.destroy();\n }\n });\n\n this.activeDialog = dialog;\n\n if (parentView && typeof parentView.addDependent === \"function\") {\n parentView.addDependent(dialog);\n }\n\n dialog.open();\n }\n\n /**\n * Allows the Engine to retroactively expand the dialog once the schema is fully parsed.\n */\n public updateDialogWidthDynamically(optimalWidth: string): void {\n if (this.activeDialog && this.requestedWidth === \"auto\" && optimalWidth !== \"auto\") {\n this.activeDialog.setContentWidth(optimalWidth);\n }\n }\n}\n"],"mappings":";;;QAGSA,MAAM,GAAAC,iBAAA;EAQf;AACA;AACA;EACO,MAAMC,cAAc,CAAC;IAEhBC,YAAY,GAAkB,IAAI;IAClCC,cAAc,GAAW,MAAM;;IAEvC;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAA2B,EAAE;MACrC,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;AACA;IACWC,YAAYA,CAACC,KAAa,GAAG,MAAM,EAAEC,gBAAwB,GAAG,IAAI,EAAEC,WAAoB,EAAEC,gBAAwB,GAAG,QAAQ,EAAEC,WAAmB,GAAG,MAAM,EAAEC,UAAoB,EAAQ;MAC9L;MACA;;MAEA,IAAI,CAACT,cAAc,GAAGQ,WAAW;MACjC,MAAME,MAAM,GAAG,IAAIC,MAAM,CAAC;QACtBP,KAAK,EAAEA,KAAK;QACZQ,YAAY,EAAEJ,WAAW;QACzBK,OAAO,EAAE,CAAC,IAAI,CAACX,IAAI,CAAC;QAAE;QACtBY,WAAW,EAAE,IAAIC,MAAM,CAAC;UACpBC,IAAI,EAAEX,gBAAgB;UACtBY,IAAI,EAAE,YAAY;UAClBC,KAAK,EAAEA,CAAA,KAAM;YACT,IAAI;cAC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AAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAArC,cAAA,GAAAA,cAAA;EAAA,OAAAqC,SAAA;AAAA","ignoreList":[]}
@@ -10,6 +10,8 @@ declare module "nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegat
10
10
  */
11
11
  export class DialogDelegate {
12
12
  private host;
13
+ private activeDialog;
14
+ private requestedWidth;
13
15
  /**
14
16
  * Initializes a new DialogDelegate to handle dialog-based rendering.
15
17
  * @param host The parent DynamicHost or GeneratorHost control.
@@ -20,6 +22,10 @@ declare module "nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegat
20
22
  * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.
21
23
  */
22
24
  openInDialog(title: string, submitButtonText: string, isGenerated: boolean, cancelButtonText?: string, dialogWidth?: string, parentView?: Control): void;
25
+ /**
26
+ * Allows the Engine to retroactively expand the dialog once the schema is fully parsed.
27
+ */
28
+ updateDialogWidthDynamically(optimalWidth: string): void;
23
29
  }
24
30
  }
25
31
  //# sourceMappingURL=DialogDelegate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DialogDelegate.d.ts","sourceRoot":"../../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,mEAAmE,CAAC;IAGnF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAG1C,UAAiB,WAAW;QACxB,QAAQ,IAAI,IAAI,CAAC;QACjB,aAAa,IAAI,OAAO,CAAC;QACzB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;KAC5E;IAED;;OAEG;IACH,MAAa,cAAc;QACvB,OAAO,CAAC,IAAI,CAAwB;QAEpC;;;WAGG;oBACS,IAAI,EAAE,WAAW,GAAG,OAAO;QAIvC;;;WAGG;QACI,YAAY,CAAC,KAAK,EAAE,MAAe,EAAE,gBAAgB,EAAE,MAAa,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,GAAE,MAAiB,EAAE,WAAW,GAAE,MAAgB,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI;KAyCrM;CAEA"}
1
+ {"version":3,"file":"DialogDelegate.d.ts","sourceRoot":"../../../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/controls/host/delegates/DialogDelegate.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,mEAAmE,CAAC;IAGnF,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAG1C,UAAiB,WAAW;QACxB,QAAQ,IAAI,IAAI,CAAC;QACjB,aAAa,IAAI,OAAO,CAAC;QACzB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;KAC5E;IAED;;OAEG;IACH,MAAa,cAAc;QACvB,OAAO,CAAC,IAAI,CAAwB;QACpC,OAAO,CAAC,YAAY,CAAuB;QAC3C,OAAO,CAAC,cAAc,CAAkB;QAExC;;;WAGG;oBACS,IAAI,EAAE,WAAW,GAAG,OAAO;QAIvC;;;WAGG;QACI,YAAY,CAAC,KAAK,EAAE,MAAe,EAAE,gBAAgB,EAAE,MAAa,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,GAAE,MAAiB,EAAE,WAAW,GAAE,MAAe,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI;QA8CjM;;WAEG;QACI,4BAA4B,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;KAKlE;CAEA"}
@@ -1,2 +1,2 @@
1
- sap.ui.define(["sap/m/Dialog","sap/m/Button","../../../utils/Logger"],function(e,t,o){"use strict";const s=o["Logger"];class n{constructor(e){this.host=e}openInDialog(o="Form",n="OK",i,r="Cancel",a="800px",c){const l=new e({title:o,contentWidth:a,content:[this.host],beginButton:new t({text:n,type:"Emphasized",press:()=>{try{const e=this.host.triggerSubmit();if(e){l.close()}}catch(e){s.error("[MetaUI] Catastrophic error during validation/submit pipeline",e.message,"DialogDelegate");this.host.fireEvent("validationError",{fieldPath:"root",message:e.message})}}}),endButton:new t({text:r,press:()=>{this.host.fireEvent("cancel");l.close()}}),afterClose:()=>{l.destroy()}});if(c&&typeof c.addDependent==="function"){c.addDependent(l)}l.open()}}var i={__esModule:true};i.DialogDelegate=n;return i});
1
+ sap.ui.define(["sap/m/Dialog","sap/m/Button","../../../utils/Logger"],function(t,e,i){"use strict";const o=i["Logger"];class s{activeDialog=null;requestedWidth="auto";constructor(t){this.host=t}openInDialog(i="Form",s="OK",a,n="Cancel",r="auto",l){this.requestedWidth=r;const h=new t({title:i,contentWidth:r,content:[this.host],beginButton:new e({text:s,type:"Emphasized",press:()=>{try{const t=this.host.triggerSubmit();if(t){h.close()}}catch(t){o.error("[MetaUI] Catastrophic error during validation/submit pipeline",t.message,"DialogDelegate");this.host.fireEvent("validationError",{fieldPath:"root",message:t.message})}}}),endButton:new e({text:n,press:()=>{this.host.fireEvent("cancel");h.close()}}),afterClose:()=>{this.activeDialog=null;h.destroy()}});this.activeDialog=h;if(l&&typeof l.addDependent==="function"){l.addDependent(h)}h.open()}updateDialogWidthDynamically(t){if(this.activeDialog&&this.requestedWidth==="auto"&&t!=="auto"){this.activeDialog.setContentWidth(t)}}}var a={__esModule:true};a.DialogDelegate=s;return a});
2
2
  //# sourceMappingURL=DialogDelegate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DialogDelegate.js","names":["Logger","_____utils_Logger","DialogDelegate","constructor","host","this","openInDialog","title","submitButtonText","isGenerated","cancelButtonText","dialogWidth","parentView","dialog","Dialog","contentWidth","content","beginButton","Button","text","type","press","success","triggerSubmit","close","err","error","message","fireEvent","fieldPath","endButton","afterClose","destroy","addDependent","open","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: Record<string, unknown>): this;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n\n /**\n * Initializes a new DialogDelegate to handle dialog-based rendering.\n * @param host The parent DynamicHost or GeneratorHost control.\n */\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean, cancelButtonText: string = \"Cancel\", dialogWidth: string = \"800px\", parentView?: Control): void {\n // UI5 PURITY: Do not manually force generate() here.\n // Opening the dialog mounts the host, natively firing onBeforeRendering() which triggers generation cleanly.\n\n const dialog = new Dialog({\n title: title,\n contentWidth: dialogWidth,\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: cancelButtonText,\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n dialog.destroy();\n }\n });\n\n if (parentView && typeof parentView.addDependent === \"function\") {\n parentView.addDependent(dialog);\n }\n\n dialog.open();\n }\n}\n"],"mappings":"yGAGSA,EAAMC,EAAA,UAWR,MAAMC,EAOTC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAMOE,aAAaC,EAAgB,OAAQC,EAA2B,KAAMC,EAAsBC,EAA2B,SAAUC,EAAsB,QAASC,GAInK,MAAMC,EAAS,IAAIC,EAAO,CACtBP,MAAOA,EACPQ,aAAcJ,EACdK,QAAS,CAACX,KAAKD,MACfa,YAAa,IAAIC,EAAO,CACpBC,KAAMX,EACNY,KAAM,aACNC,MAAOA,KACH,IACI,MAAMC,EAAUjB,KAAKD,KAAKmB,gBAC1B,GAAID,EAAS,CACTT,EAAOW,OACX,CACJ,CAAE,MAAOC,GACLzB,EAAO0B,MAAM,gEAAkED,EAAcE,QAAS,kBACtGtB,KAAKD,KAAKwB,UAAU,kBAAmB,CAAEC,UAAW,OAAQF,QAAUF,EAAcE,SACxF,KAGRG,UAAW,IAAIZ,EAAO,CAClBC,KAAMT,EACNW,MAAOA,KACHhB,KAAKD,KAAKwB,UAAU,UACpBf,EAAOW,WAGfO,WAAYA,KACRlB,EAAOmB,aAIf,GAAIpB,UAAqBA,EAAWqB,eAAiB,WAAY,CAC7DrB,EAAWqB,aAAapB,EAC5B,CAEAA,EAAOqB,MACX,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAjC,iBAAA,OAAAiC,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"DialogDelegate.js","names":["Logger","_____utils_Logger","DialogDelegate","activeDialog","requestedWidth","constructor","host","this","openInDialog","title","submitButtonText","isGenerated","cancelButtonText","dialogWidth","parentView","dialog","Dialog","contentWidth","content","beginButton","Button","text","type","press","success","triggerSubmit","close","err","error","message","fireEvent","fieldPath","endButton","afterClose","destroy","addDependent","open","updateDialogWidthDynamically","optimalWidth","setContentWidth","__exports","__esModule"],"sources":["DialogDelegate.ts"],"sourcesContent":["import Dialog from \"sap/m/Dialog\";\nimport Button from \"sap/m/Button\";\nimport Control from \"sap/ui/core/Control\";\nimport { Logger } from \"../../../utils/Logger\";\n\nexport interface IHostDialog {\n generate(): void;\n triggerSubmit(): boolean;\n fireEvent(eventName: string, parameters?: Record<string, unknown>): this;\n}\n\n/**\n * Extracts all popup and dialog generation logic from the Host control.\n */\nexport class DialogDelegate {\n private host: IHostDialog & Control;\n private activeDialog: Dialog | null = null;\n private requestedWidth: string = \"auto\";\n\n /**\n * Initializes a new DialogDelegate to handle dialog-based rendering.\n * @param host The parent DynamicHost or GeneratorHost control.\n */\n constructor(host: IHostDialog & Control) {\n this.host = host;\n }\n\n /**\n * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.\n * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.\n */\n public openInDialog(title: string = \"Form\", submitButtonText: string = \"OK\", isGenerated: boolean, cancelButtonText: string = \"Cancel\", dialogWidth: string = \"auto\", parentView?: Control): void {\n // UI5 PURITY: Do not manually force generate() here.\n // Opening the dialog mounts the host, natively firing onBeforeRendering() which triggers generation cleanly.\n\n this.requestedWidth = dialogWidth;\n const dialog = new Dialog({\n title: title,\n contentWidth: dialogWidth,\n content: [this.host], // Mount host inside the dialog\n beginButton: new Button({\n text: submitButtonText,\n type: \"Emphasized\",\n press: () => {\n try {\n const success = this.host.triggerSubmit();\n if (success) {\n dialog.close();\n }\n } catch (err) {\n Logger.error(\"[MetaUI] Catastrophic error during validation/submit pipeline\", (err as Error).message, \"DialogDelegate\");\n this.host.fireEvent(\"validationError\", { fieldPath: \"root\", message: (err as Error).message });\n }\n }\n }),\n endButton: new Button({\n text: cancelButtonText,\n press: () => {\n this.host.fireEvent(\"cancel\");\n dialog.close();\n }\n }),\n afterClose: () => {\n this.activeDialog = null;\n dialog.destroy();\n }\n });\n\n this.activeDialog = dialog;\n\n if (parentView && typeof parentView.addDependent === \"function\") {\n parentView.addDependent(dialog);\n }\n\n dialog.open();\n }\n\n /**\n * Allows the Engine to retroactively expand the dialog once the schema is fully parsed.\n */\n public updateDialogWidthDynamically(optimalWidth: string): void {\n if (this.activeDialog && this.requestedWidth === \"auto\" && optimalWidth !== \"auto\") {\n this.activeDialog.setContentWidth(optimalWidth);\n }\n }\n}\n"],"mappings":"yGAGSA,EAAMC,EAAA,UAWR,MAAMC,EAEDC,aAA8B,KAC9BC,eAAyB,OAMjCC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAMOE,aAAaC,EAAgB,OAAQC,EAA2B,KAAMC,EAAsBC,EAA2B,SAAUC,EAAsB,OAAQC,GAIlKP,KAAKH,eAAiBS,EACtB,MAAME,EAAS,IAAIC,EAAO,CACtBP,MAAOA,EACPQ,aAAcJ,EACdK,QAAS,CAACX,KAAKD,MACfa,YAAa,IAAIC,EAAO,CACpBC,KAAMX,EACNY,KAAM,aACNC,MAAOA,KACH,IACI,MAAMC,EAAUjB,KAAKD,KAAKmB,gBAC1B,GAAID,EAAS,CACTT,EAAOW,OACX,CACJ,CAAE,MAAOC,GACL3B,EAAO4B,MAAM,gEAAkED,EAAcE,QAAS,kBACtGtB,KAAKD,KAAKwB,UAAU,kBAAmB,CAAEC,UAAW,OAAQF,QAAUF,EAAcE,SACxF,KAGRG,UAAW,IAAIZ,EAAO,CAClBC,KAAMT,EACNW,MAAOA,KACHhB,KAAKD,KAAKwB,UAAU,UACpBf,EAAOW,WAGfO,WAAYA,KACR1B,KAAKJ,aAAe,KACpBY,EAAOmB,aAIf3B,KAAKJ,aAAeY,EAEpB,GAAID,UAAqBA,EAAWqB,eAAiB,WAAY,CAC7DrB,EAAWqB,aAAapB,EAC5B,CAEAA,EAAOqB,MACX,CAKOC,6BAA6BC,GAChC,GAAI/B,KAAKJ,cAAgBI,KAAKH,iBAAmB,QAAUkC,IAAiB,OAAQ,CAChF/B,KAAKJ,aAAaoC,gBAAgBD,EACtC,CACJ,EACH,IAAAE,EAAA,CAAAC,WAAA,MAAAD,EAAAtC,iBAAA,OAAAsC,CAAA","ignoreList":[]}
@@ -14,6 +14,8 @@ export interface IHostDialog {
14
14
  */
15
15
  export class DialogDelegate {
16
16
  private host: IHostDialog & Control;
17
+ private activeDialog: Dialog | null = null;
18
+ private requestedWidth: string = "auto";
17
19
 
18
20
  /**
19
21
  * Initializes a new DialogDelegate to handle dialog-based rendering.
@@ -27,10 +29,11 @@ export class DialogDelegate {
27
29
  * Dialog Modality: Opens the generated layout inside a sap.m.Dialog.
28
30
  * Automatically wires up customizable submit (default: 'OK') and 'Cancel' buttons.
29
31
  */
30
- public openInDialog(title: string = "Form", submitButtonText: string = "OK", isGenerated: boolean, cancelButtonText: string = "Cancel", dialogWidth: string = "800px", parentView?: Control): void {
32
+ public openInDialog(title: string = "Form", submitButtonText: string = "OK", isGenerated: boolean, cancelButtonText: string = "Cancel", dialogWidth: string = "auto", parentView?: Control): void {
31
33
  // UI5 PURITY: Do not manually force generate() here.
32
34
  // Opening the dialog mounts the host, natively firing onBeforeRendering() which triggers generation cleanly.
33
35
 
36
+ this.requestedWidth = dialogWidth;
34
37
  const dialog = new Dialog({
35
38
  title: title,
36
39
  contentWidth: dialogWidth,
@@ -58,14 +61,26 @@ export class DialogDelegate {
58
61
  }
59
62
  }),
60
63
  afterClose: () => {
64
+ this.activeDialog = null;
61
65
  dialog.destroy();
62
66
  }
63
67
  });
64
68
 
69
+ this.activeDialog = dialog;
70
+
65
71
  if (parentView && typeof parentView.addDependent === "function") {
66
72
  parentView.addDependent(dialog);
67
73
  }
68
74
 
69
75
  dialog.open();
70
76
  }
77
+
78
+ /**
79
+ * Allows the Engine to retroactively expand the dialog once the schema is fully parsed.
80
+ */
81
+ public updateDialogWidthDynamically(optimalWidth: string): void {
82
+ if (this.activeDialog && this.requestedWidth === "auto" && optimalWidth !== "auto") {
83
+ this.activeDialog.setContentWidth(optimalWidth);
84
+ }
85
+ }
71
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationDelegate-dbg.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m => \n m.getTarget() === target && \n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":";;;QAISA,MAAM,GAAAC,iBAAA;EAUf;AACA;AACA;EACO,MAAMC,kBAAkB,CAAC;IAG5B;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAAqB,EAAE;MAC/B,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;AACA;AACA;IACWC,cAAcA,CAACC,OAAgB,EAAQ;MAC1C;IAAA;;IAGJ;AACJ;AACA;IACWC,gBAAgBA,CAACD,OAAgB,EAAQ;MAC5C;IAAA;IAGGE,iBAAiBA,CAAA,EAAS;MAC7B,MAAMC,YAAY,GAAG,IAAI,CAACL,IAAI,CAACM,eAAe,CAAC,CAAC;MAChD,IAAID,YAAY,IAAI,IAAI,CAACL,IAAI,CAACO,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5D,MAAMC,cAAc,GAAGC,SAAS;QAChC,MAAMC,QAAQ,GAAGF,cAAc,CAACG,eAAe,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC;QAC3D,MAAMC,gBAAgB,GAAGH,QAAQ,CAACI,MAAM,CAAEC,CAA8B,IACpEA,CAAC,CAACC,mBAAmB,CAAC,CAAC,IAAID,CAAC,CAACC,mBAAmB,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC,KAAKZ,YAAY,CAACa,QAAQ,CAAC,CAAC,CAACD,KAAK,CAAC,CACjG,CAAC;QACD,IAAIJ,gBAAgB,IAAIA,gBAAgB,CAACM,MAAM,GAAG,CAAC,EAAE;UACjDX,cAAc,CAACY,cAAc,CAACP,gBAAgB,CAAC;QACnD;MACJ;IACJ;;IAEA;AACJ;AACA;IACWQ,WAAWA,CAACC,IAAY,EAAEC,IAAY,EAAQ;MACjD,MAAMC,UAAU,GAAGF,IAAI,GAAG,IAAIA,IAAI,C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AAW,EAAE;MACjB,CAAC,CAAC;MAEF,IAAI,CAACjD,IAAI,CAACkD,cAAc,CAAC,UAAU,EAAEJ,SAAS,CAAC;IACnD;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAArD,kBAAA,GAAAA,kBAAA;EAAA,OAAAqD,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"ValidationDelegate-dbg.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m =>\n m.getTarget() === target &&\n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":";;;QAISA,MAAM,GAAAC,iBAAA;EAUf;AACA;AACA;EACO,MAAMC,kBAAkB,CAAC;IAG5B;AACJ;AACA;AACA;IACIC,WAAWA,CAACC,IAAqB,EAAE;MAC/B,IAAI,CAACA,IAAI,GAAGA,IAAI;IACpB;;IAEA;AACJ;AACA;AACA;AACA;IACWC,cAAcA,CAACC,OAAgB,EAAQ;MAC1C;IAAA;;IAGJ;AACJ;AACA;IACWC,gBAAgBA,CAACD,OAAgB,EAAQ;MAC5C;IAAA;IAGGE,iBAAiBA,CAAA,EAAS;MAC7B,MAAMC,YAAY,GAAG,IAAI,CAACL,IAAI,CAACM,eAAe,CAAC,CAAC;MAChD,IAAID,YAAY,IAAI,IAAI,CAACL,IAAI,CAACO,WAAW,CAAC,mBAAmB,CAAC,EAAE;QAC5D,MAAMC,cAAc,GAAGC,SAAS;QAChC,MAAMC,QAAQ,GAAGF,cAAc,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tCA,CAAC,CAAC2B,SAAS,CAAC,CAAC,KAAKP,MAAM,IACxBpB,CAAC,CAAC4B,OAAO,CAAC,CAAC,KAAK,aAAa,IAC7B5B,CAAC,CAACC,mBAAmB,CAAC,CAAC,EAAEC,KAAK,CAAC,CAAC,KAAKwB,WACzC,CAAC;MAED,IAAI5B,gBAAgB,CAACM,MAAM,GAAG,CAAC,EAAE;QAC7BV,SAAS,CAACW,cAAc,CAACP,gBAAgB,CAAC;MAC9C;IACJ;;IAEA;AACJ;AACA;IACW+B,kBAAkBA,CAACC,KAAY,EAAQ;MAC1CjD,MAAM,CAACiD,KAAK,CAAC,wEAAwE,EAAEA,KAAK,CAACf,OAAO,EAAE,oBAAoB,CAAC;MAE3H,MAAMgB,SAAS,GAAG,IAAIC,kBAAkB,CAAC;QACrCC,KAAK,EAAE,sBAAsB;QAC7BC,WAAW,EAAE;MACjB,CAAC,CAAC;MAEF,IAAI,CAACjD,IAAI,CAACkD,cAAc,CAAC,UAAU,EAAEJ,SAAS,CAAC;IACnD;EACJ;EAAC,IAAAK,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAArD,kBAAA,GAAAA,kBAAA;EAAA,OAAAqD,SAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationDelegate.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","this","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m => \n m.getTarget() === target && \n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":"sLAISA,EAAMC,EAA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AOOC,iBAAiBF,GACpB,GAAItC,KAAKD,KAAKQ,YAAY,uBAAyB,KAAM,CACrD,MACJ,CAEA,MAAMF,EAAeL,KAAKD,KAAKO,kBAC/B,IAAKD,EAAc,CACf,MACJ,CAEA,MAAM8B,EAAS,IAAIG,EAAUb,QAAQ,MAAO,MAC5C,MAAMgB,EAAcpC,EAAaa,WAAWD,QAC5C,MAAMP,EAAWD,EAAUE,kBAAkBC,UAE7C,MAAMC,EAAmBH,EAASI,OAAOC,GACrCA,EAAE2B,cAAgBP,GAClBpB,EAAE4B,YAAc,eAChB5B,EAAEC,uBAAuBC,UAAYwB,GAGzC,GAAI5B,EAAiBM,OAAS,EAAG,CAC7BV,EAAUW,eAAeP,EAC7B,CACJ,CAKO+B,mBAAmBC,GACtBlD,EAAOkD,MAAM,yEAA0EA,EAAMf,QAAS,sBAEtG,MAAMgB,EAAY,IAAIC,EAAmB,CACrCC,MAAO,uBACPC,YAAa,kGAGjBjD,KAAKD,KAAKmD,eAAe,WAAYJ,EACzC,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAtD,qBAAA,OAAAsD,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"ValidationDelegate.js","names":["Logger","_____utils_Logger","ValidationDelegate","constructor","host","this","registerObject","control","unregisterObject","removeAllMessages","stateManager","getStateManager","getProperty","messageManager","Messaging","messages","getMessageModel","getData","messagesToRemove","filter","m","getMessageProcessor","getId","getModel","length","removeMessages","pushMessage","path","text","targetPath","replace","displayText","warn","addMessages","Message","message","type","coreLibrary","MessageType","Error","target","processor","addCustomError","fieldPath","code","clearCustomError","processorId","getTarget","getCode","mountCrashBoundary","error","errorPage","IllustratedMessage","title","description","setAggregation","__exports","__esModule"],"sources":["ValidationDelegate.ts"],"sourcesContent":["import IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport Messaging from \"sap/ui/core/Messaging\";\nimport Control from \"sap/ui/core/Control\";\nimport { StateManager } from \"../../../core/StateManager\";\nimport { Logger } from \"../../../utils/Logger\";\nimport Message from \"sap/ui/core/message/Message\";\nimport coreLibrary from \"sap/ui/core/library\";\n\nexport interface IHostValidation {\n getProperty(name: string): unknown;\n setAggregation(aggregationName: string, object: sap.ui.core.Control, suppressInvalidate?: boolean): this;\n getStateManager(): StateManager | null;\n}\n\n/**\n * Handles Fiori MessageManager integration and provides a standardized Error Boundary UI fallback.\n */\nexport class ValidationDelegate {\n private host: IHostValidation;\n\n /**\n * Initializes the ValidationDelegate for registering controls to the global MessageManager.\n * @param host The parent host interface.\n */\n constructor(host: IHostValidation) {\n this.host = host;\n }\n\n /**\n * Registers a control and all its children with the global MessageManager.\n * (Deprecated: Native registration causes UI5 to aggressively clear custom schema validation messages \n * on every keystroke. MetaUI handles valueState manually via plugins).\n */\n public registerObject(control: Control): void {\n // Do nothing to prevent UI5 from hijacking valueState and clearing our manual messages\n }\n\n /**\n * Unregisters a control from the global MessageManager.\n */\n public unregisterObject(control: Control): void {\n // Do nothing\n }\n\n public removeAllMessages(): void {\n const stateManager = this.host.getStateManager();\n if (stateManager && this.host.getProperty(\"useMessageManager\")) {\n const messageManager = Messaging;\n const messages = messageManager.getMessageModel().getData();\n const messagesToRemove = messages.filter((m: sap.ui.core.message.Message) =>\n m.getMessageProcessor() && m.getMessageProcessor().getId() === stateManager.getModel().getId()\n );\n if (messagesToRemove && messagesToRemove.length > 0) {\n messageManager.removeMessages(messagesToRemove);\n }\n }\n }\n\n /**\n * Pushes a validation message to the console, and optionally to the MessageManager.\n */\n public pushMessage(path: string, text: string): void {\n const targetPath = path ? `/${path.replace(/^\\//, \"\")}` : \"\";\n const displayText = path ? `Field '${path}': ${text}` : text;\n\n if (path) {\n Logger.warn(`[MetaUI Validation Error] ${displayText}`);\n } else {\n Logger.warn(`[MetaUI Validation Error] Global - ${text}`);\n }\n\n if (this.host.getProperty(\"useMessageManager\") === true) {\n const messageManager = Messaging;\n const stateManager = this.host.getStateManager();\n messageManager.addMessages(new Message({\n message: displayText,\n type: coreLibrary.MessageType.Error,\n target: targetPath,\n processor: stateManager?.getModel()\n }));\n }\n }\n\n /**\n * Imperatively invalidates a field and highlights it with an error message.\n * Uses a specific 'CustomError' code to distinguish it from internal schema validations.\n * \n * @param fieldPath The internal JSON path of the field to highlight.\n * @param message The custom error message to display.\n */\n public addCustomError(fieldPath: string, message: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n Messaging.addMessages(new Message({\n message: message,\n type: coreLibrary.MessageType.Error,\n target: `/${fieldPath.replace(/^\\//, \"\")}`,\n processor: stateManager.getModel(),\n code: \"CustomError\"\n }));\n }\n\n /**\n * Reverts a custom error state on a field, safely ignoring native schema validations.\n * \n * @param fieldPath The internal JSON path of the field to clear.\n */\n public clearCustomError(fieldPath: string): void {\n if (this.host.getProperty(\"useMessageManager\") !== true) {\n return;\n }\n\n const stateManager = this.host.getStateManager();\n if (!stateManager) {\n return;\n }\n\n const target = `/${fieldPath.replace(/^\\//, \"\")}`;\n const processorId = stateManager.getModel().getId();\n const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];\n\n const messagesToRemove = messages.filter(m =>\n m.getTarget() === target &&\n m.getCode() === \"CustomError\" &&\n m.getMessageProcessor()?.getId() === processorId\n );\n\n if (messagesToRemove.length > 0) {\n Messaging.removeMessages(messagesToRemove);\n }\n }\n\n /**\n * Triggers a visual Error Page (Crash Boundary) when generation catastrophically fails.\n */\n public mountCrashBoundary(error: Error): void {\n Logger.error(\"[MetaUI] Engine failed to generate layout. Preventing Launchpad crash.\", error.message, \"ValidationDelegate\");\n\n const errorPage = new IllustratedMessage({\n title: \"UI Generation Failed\",\n description: \"The dynamic schema could not be rendered. Please check the Fiori console for diagnostic logs.\"\n });\n\n this.host.setAggregation(\"_content\", errorPage);\n }\n}\n"],"mappings":"sLAISA,EAAMC,EAAA,UAaR,MAAMC,EAOTC,YAAYC,GACRC,KAAKD,KAAOA,CAChB,CAOO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AM,CACrD,MACJ,CAEA,MAAMF,EAAeL,KAAKD,KAAKO,kBAC/B,IAAKD,EAAc,CACf,MACJ,CAEA,MAAM8B,EAAS,IAAIG,EAAUb,QAAQ,MAAO,MAC5C,MAAMgB,EAAcpC,EAAaa,WAAWD,QAC5C,MAAMP,EAAWD,EAAUE,kBAAkBC,UAE7C,MAAMC,EAAmBH,EAASI,OAAOC,GACrCA,EAAE2B,cAAgBP,GAClBpB,EAAE4B,YAAc,eAChB5B,EAAEC,uBAAuBC,UAAYwB,GAGzC,GAAI5B,EAAiBM,OAAS,EAAG,CAC7BV,EAAUW,eAAeP,EAC7B,CACJ,CAKO+B,mBAAmBC,GACtBlD,EAAOkD,MAAM,yEAA0EA,EAAMf,QAAS,sBAEtG,MAAMgB,EAAY,IAAIC,EAAmB,CACrCC,MAAO,uBACPC,YAAa,kGAGjBjD,KAAKD,KAAKmD,eAAe,WAAYJ,EACzC,EACH,IAAAK,EAAA,CAAAC,WAAA,MAAAD,EAAAtD,qBAAA,OAAAsD,CAAA","ignoreList":[]}
@@ -126,8 +126,8 @@ export class ValidationDelegate {
126
126
  const processorId = stateManager.getModel().getId();
127
127
  const messages = Messaging.getMessageModel().getData() as sap.ui.core.message.Message[];
128
128
 
129
- const messagesToRemove = messages.filter(m =>
130
- m.getTarget() === target &&
129
+ const messagesToRemove = messages.filter(m =>
130
+ m.getTarget() === target &&
131
131
  m.getCode() === "CustomError" &&
132
132
  m.getMessageProcessor()?.getId() === processorId
133
133
  );
@@ -0,0 +1,47 @@
1
+ sap.ui.define(["./SchemaNormalizer", "../swagger/SwaggerBuilder", "../utils/Logger"], function (___SchemaNormalizer, ___swagger_SwaggerBuilder, ___utils_Logger) {
2
+ "use strict";
3
+
4
+ /**
5
+ * @file SchemaBuilderRegistry.ts
6
+ * @description Singleton registry for Schema Builder plugins.
7
+ * Routes unknown JSON payloads to the appropriate parser plugin.
8
+ */
9
+ const SchemaNormalizer = ___SchemaNormalizer["SchemaNormalizer"];
10
+ const SwaggerBuilder = ___swagger_SwaggerBuilder["SwaggerBuilder"];
11
+ const Logger = ___utils_Logger["Logger"];
12
+ class SchemaBuilderRegistry {
13
+ static _plugins = [new SwaggerBuilder(), new SchemaNormalizer()];
14
+
15
+ /**
16
+ * Registers a new schema builder plugin into the engine.
17
+ * @param plugin An instance of ISchemaBuilderPlugin
18
+ */
19
+ static register(plugin) {
20
+ this._plugins.push(plugin);
21
+ }
22
+
23
+ /**
24
+ * Finds the first registered plugin that claims it can handle the payload.
25
+ * @param rawSchema The raw JSON schema object to inspect.
26
+ * @returns The matching plugin instance, or null if none match.
27
+ */
28
+ static getBuilderFor(rawSchema) {
29
+ if (!rawSchema || typeof rawSchema !== "object") {
30
+ return null;
31
+ }
32
+ for (const plugin of this._plugins) {
33
+ if (plugin.canHandle(rawSchema)) {
34
+ return plugin;
35
+ }
36
+ }
37
+ Logger.warn("[SchemaBuilderRegistry]", "No suitable Schema Builder plugin found for the provided payload.");
38
+ return null;
39
+ }
40
+ }
41
+ var __exports = {
42
+ __esModule: true
43
+ };
44
+ __exports.SchemaBuilderRegistry = SchemaBuilderRegistry;
45
+ return __exports;
46
+ });
47
+ //# sourceMappingURL=SchemaBuilderRegistry-dbg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaBuilderRegistry-dbg.js","names":["SchemaNormalizer","___SchemaNormalizer","SwaggerBuilder","___swagger_SwaggerBuilder","Logger","___utils_Logger","SchemaBuilderRegistry","_plugins","register","plugin","push","getBuilderFor","rawSchema","canHandle","warn","__exports","__esModule"],"sources":["SchemaBuilderRegistry.ts"],"sourcesContent":["/**\n * @file SchemaBuilderRegistry.ts\n * @description Singleton registry for Schema Builder plugins.\n * Routes unknown JSON payloads to the appropriate parser plugin.\n */\n\nimport { ISchemaBuilderPlugin } from \"../interfaces/ISchemaBuilderPlugin\";\nimport { SchemaNormalizer } from \"./SchemaNormalizer\";\nimport { SwaggerBuilder } from \"../swagger/SwaggerBuilder\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class SchemaBuilderRegistry {\n private static _plugins: ISchemaBuilderPlugin[] = [\n new SwaggerBuilder(),\n new SchemaNormalizer()\n ];\n\n /**\n * Registers a new schema builder plugin into the engine.\n * @param plugin An instance of ISchemaBuilderPlugin\n */\n public static register(plugin: ISchemaBuilderPlugin): void {\n this._plugins.push(plugin);\n }\n\n /**\n * Finds the first registered plugin that claims it can handle the payload.\n * @param rawSchema The raw JSON schema object to inspect.\n * @returns The matching plugin instance, or null if none match.\n */\n public static getBuilderFor(rawSchema: any): ISchemaBuilderPlugin | null {\n if (!rawSchema || typeof rawSchema !== \"object\") {\n return null;\n }\n\n for (const plugin of this._plugins) {\n if (plugin.canHandle(rawSchema)) {\n return plugin;\n }\n }\n \n Logger.warn(\"[SchemaBuilderRegistry]\", \"No suitable Schema Builder plugin found for the provided payload.\");\n return null;\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;AACA;EAJA,MAOSA,gBAAgB,GAAAC,mBAAA;EAAA,MAChBC,cAAc,GAAAC,yBAAA;EAAA,MACdC,MAAM,GAAAC,eAAA;EAER,MAAMC,qBAAqB,CAAC;IAC/B,OAAeC,QAAQ,GAA2B,CAC9C,IAAIL,cAAc,CAAC,CAAC,EACpB,IAAIF,gBAAgB,CAAC,CAAC,CACzB;;IAED;AACJ;AACA;AACA;IACI,OAAcQ,QAAQA,CAACC,MAA4B,EAAQ;MACvD,IAAI,CAACF,QAAQ,CAACG,IAAI,CAACD,MAAM,CAAC;IAC9B;;IAEA;AACJ;AACA;AACA;AACA;IACI,OAAcE,aAAaA,CAACC,SAAc,EAA+B;MACrE,IAAI,CAACA,SAAS,IAAI,OAAOA,SAAS,KAAK,QAAQ,EAAE;QAC7C,OAAO,IAAI;MACf;MAEA,KAAK,MAAMH,MAAM,IAAI,IAAI,CAACF,QAAQ,EAAE;QAChC,IAAIE,MAAM,CAACI,SAAS,CAACD,SAAS,CAAC,EAAE;UAC7B,OAAOH,MAAM;QACjB;MACJ;MAEAL,MAAM,CAACU,IAAI,CAAC,yBAAyB,EAAE,mEAAmE,CAAC;MAC3G,OAAO,IAAI;IACf;EACJ;EAAC,IAAAC,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAAT,qBAAA,GAAAA,qBAAA;EAAA,OAAAS,SAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ declare module "nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry" {
2
+ /**
3
+ * @file SchemaBuilderRegistry.ts
4
+ * @description Singleton registry for Schema Builder plugins.
5
+ * Routes unknown JSON payloads to the appropriate parser plugin.
6
+ */
7
+ import { ISchemaBuilderPlugin } from "nz/co/siliconst/ui5/metaui/interfaces/ISchemaBuilderPlugin";
8
+ export class SchemaBuilderRegistry {
9
+ private static _plugins;
10
+ /**
11
+ * Registers a new schema builder plugin into the engine.
12
+ * @param plugin An instance of ISchemaBuilderPlugin
13
+ */
14
+ static register(plugin: ISchemaBuilderPlugin): void;
15
+ /**
16
+ * Finds the first registered plugin that claims it can handle the payload.
17
+ * @param rawSchema The raw JSON schema object to inspect.
18
+ * @returns The matching plugin instance, or null if none match.
19
+ */
20
+ static getBuilderFor(rawSchema: any): ISchemaBuilderPlugin | null;
21
+ }
22
+ }
23
+ //# sourceMappingURL=SchemaBuilderRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaBuilderRegistry.d.ts","sourceRoot":"../../../../../../../..","sources":["src/nz/co/siliconst/ui5/metaui/core/SchemaBuilderRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,uDAAuD,CAAC;IACvE;;;;OAIG;IAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;IAKlG,MAAa,qBAAqB;QAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAGrB;QAEF;;;WAGG;eACW,QAAQ,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI;QAI1D;;;;WAIG;eACW,aAAa,CAAC,SAAS,EAAE,GAAG,GAAG,oBAAoB,GAAG,IAAI;KAc3E;CAEA"}
@@ -0,0 +1,2 @@
1
+ sap.ui.define(["./SchemaNormalizer","../swagger/SwaggerBuilder","../utils/Logger"],function(e,r,i){"use strict";const t=e["SchemaNormalizer"];const s=r["SwaggerBuilder"];const u=i["Logger"];class n{static _plugins=[new s,new t];static register(e){this._plugins.push(e)}static getBuilderFor(e){if(!e||typeof e!=="object"){return null}for(const r of this._plugins){if(r.canHandle(e)){return r}}u.warn("[SchemaBuilderRegistry]","No suitable Schema Builder plugin found for the provided payload.");return null}}var a={__esModule:true};a.SchemaBuilderRegistry=n;return a});
2
+ //# sourceMappingURL=SchemaBuilderRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaBuilderRegistry.js","names":["SchemaNormalizer","___SchemaNormalizer","SwaggerBuilder","___swagger_SwaggerBuilder","Logger","___utils_Logger","SchemaBuilderRegistry","static","register","plugin","this","_plugins","push","getBuilderFor","rawSchema","canHandle","warn","__exports","__esModule"],"sources":["SchemaBuilderRegistry.ts"],"sourcesContent":["/**\n * @file SchemaBuilderRegistry.ts\n * @description Singleton registry for Schema Builder plugins.\n * Routes unknown JSON payloads to the appropriate parser plugin.\n */\n\nimport { ISchemaBuilderPlugin } from \"../interfaces/ISchemaBuilderPlugin\";\nimport { SchemaNormalizer } from \"./SchemaNormalizer\";\nimport { SwaggerBuilder } from \"../swagger/SwaggerBuilder\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class SchemaBuilderRegistry {\n private static _plugins: ISchemaBuilderPlugin[] = [\n new SwaggerBuilder(),\n new SchemaNormalizer()\n ];\n\n /**\n * Registers a new schema builder plugin into the engine.\n * @param plugin An instance of ISchemaBuilderPlugin\n */\n public static register(plugin: ISchemaBuilderPlugin): void {\n this._plugins.push(plugin);\n }\n\n /**\n * Finds the first registered plugin that claims it can handle the payload.\n * @param rawSchema The raw JSON schema object to inspect.\n * @returns The matching plugin instance, or null if none match.\n */\n public static getBuilderFor(rawSchema: any): ISchemaBuilderPlugin | null {\n if (!rawSchema || typeof rawSchema !== \"object\") {\n return null;\n }\n\n for (const plugin of this._plugins) {\n if (plugin.canHandle(rawSchema)) {\n return plugin;\n }\n }\n \n Logger.warn(\"[SchemaBuilderRegistry]\", \"No suitable Schema Builder plugin found for the provided payload.\");\n return null;\n }\n}\n"],"mappings":"gHAAA,MAOSA,EAAgBC,EAAA,0BAChBC,EAAcC,EAAA,wBACdC,EAAMC,EAAA,UAER,MAAMC,EACTC,gBAAkD,CAC9C,IAAIL,EACJ,IAAIF,GAOR,eAAcQ,CAASC,GACnBC,KAAKC,SAASC,KAAKH,EACvB,CAOA,oBAAcI,CAAcC,GACxB,IAAKA,UAAoBA,IAAc,SAAU,CAC7C,OAAO,IACX,CAEA,IAAK,MAAML,KAAUC,KAAKC,SAAU,CAChC,GAAIF,EAAOM,UAAUD,GAAY,CAC7B,OAAOL,CACX,CACJ,CAEAL,EAAOY,KAAK,0BAA2B,qEACvC,OAAO,IACX,EACH,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAX,wBAAA,OAAAW,CAAA","ignoreList":[]}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @file SchemaBuilderRegistry.ts
3
+ * @description Singleton registry for Schema Builder plugins.
4
+ * Routes unknown JSON payloads to the appropriate parser plugin.
5
+ */
6
+
7
+ import { ISchemaBuilderPlugin } from "../interfaces/ISchemaBuilderPlugin";
8
+ import { SchemaNormalizer } from "./SchemaNormalizer";
9
+ import { SwaggerBuilder } from "../swagger/SwaggerBuilder";
10
+ import { Logger } from "../utils/Logger";
11
+
12
+ export class SchemaBuilderRegistry {
13
+ private static _plugins: ISchemaBuilderPlugin[] = [
14
+ new SwaggerBuilder(),
15
+ new SchemaNormalizer()
16
+ ];
17
+
18
+ /**
19
+ * Registers a new schema builder plugin into the engine.
20
+ * @param plugin An instance of ISchemaBuilderPlugin
21
+ */
22
+ public static register(plugin: ISchemaBuilderPlugin): void {
23
+ this._plugins.push(plugin);
24
+ }
25
+
26
+ /**
27
+ * Finds the first registered plugin that claims it can handle the payload.
28
+ * @param rawSchema The raw JSON schema object to inspect.
29
+ * @returns The matching plugin instance, or null if none match.
30
+ */
31
+ public static getBuilderFor(rawSchema: any): ISchemaBuilderPlugin | null {
32
+ if (!rawSchema || typeof rawSchema !== "object") {
33
+ return null;
34
+ }
35
+
36
+ for (const plugin of this._plugins) {
37
+ if (plugin.canHandle(rawSchema)) {
38
+ return plugin;
39
+ }
40
+ }
41
+
42
+ Logger.warn("[SchemaBuilderRegistry]", "No suitable Schema Builder plugin found for the provided payload.");
43
+ return null;
44
+ }
45
+ }
@@ -7,6 +7,23 @@ sap.ui.define(["../utils/Logger"], function (___utils_Logger) {
7
7
  */
8
8
  const Logger = ___utils_Logger["Logger"];
9
9
  class SchemaNormalizer {
10
+ /**
11
+ * ISchemaBuilderPlugin Contract
12
+ */
13
+ canHandle(rawSchema) {
14
+ // MetaUI native schemas almost always have properties, items, or a layoutStrategy
15
+ // This acts as a fallback for native schemas.
16
+ if (rawSchema.openapi || rawSchema.swagger) return false;
17
+ return true;
18
+ }
19
+
20
+ /**
21
+ * ISchemaBuilderPlugin Contract
22
+ */
23
+ build(rawSchema) {
24
+ return SchemaNormalizer.normalize(rawSchema);
25
+ }
26
+
10
27
  /**
11
28
  * Validates that the provided raw payload conforms to the required ISchema structures.
12
29
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaNormalizer-dbg.js","names":["Logger","___utils_Logger","SchemaNormalizer","normalize","rawSchema","data","schemaObj","trim","JSON","parse","e","msg","message","error","Error","Array","isArray","inferSchemaFromData","normalized","title","type","items","layoutStrategy","uiLayout","additionalProperties","targetProperties","properties","inferred","deepMergeProperties","requiredKeys","required","normalizeProperties","normalizePropertyMetadata","base","override","merged","key","Object","keys","overrideVal","baseVal","normalizedProps","isRequired","includes","prop","keyName","ui","label","generateLabel","isKey","readOnly","widget","valueHelp","enum","undefined","visibleOn","enabledOn","format","validators","formatter","args","rows","fullWidth","dialogButtonText","maxLength","minLength","minimum","maximum","pattern","precision","scale","multipleOf","name","spaced","replace","split","filter","w","length","map","word","charAt","toUpperCase","slice","toLowerCase","join","schema","inferPropertiesFromObject","obj","val","nestedProps","resolveScope","scope","startsWith","meta","bindingPath","propKey","pathSegments","current","debug","stringify","i","segment","__exports","__esModule"],"sources":["SchemaNormalizer.ts"],"sourcesContent":["/**\n * @file SchemaNormalizer.ts\n * @description Transforms and validates incoming JSON payloads into the strict v2 ISchema dictionary matrix.\n */\n\nimport { ISchema, IPropertyMetadata, FieldType } from \"../interfaces/ISchema\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class SchemaNormalizer {\n\n /**\n * Validates that the provided raw payload conforms to the required ISchema structures.\n */\n public static normalize(rawSchema?: unknown, data?: unknown): ISchema {\n let schemaObj = rawSchema;\n\n if (typeof schemaObj === \"string\") {\n if (!schemaObj.trim()) {\n schemaObj = null;\n } else {\n try {\n schemaObj = JSON.parse(schemaObj);\n } catch (e) {\n const msg = \"Failed to parse schema string: \" + (e as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n }\n\n if (!schemaObj || typeof schemaObj !== 'object' || Array.isArray(schemaObj)) {\n return this.inferSchemaFromData(data);\n }\n\n try {\n // It is an object. Ensure it conforms to v2 structure.\n const normalized: ISchema = {\n title: schemaObj.title,\n type: schemaObj.type || (schemaObj.items ? \"array\" : \"object\"),\n layoutStrategy: schemaObj.layoutStrategy,\n uiLayout: schemaObj.uiLayout,\n additionalProperties: schemaObj.additionalProperties\n };\n\n let targetProperties = schemaObj.properties || {};\n\n if (schemaObj.additionalProperties === true && data) {\n const inferred = this.inferSchemaFromData(data);\n if (inferred.type === \"object\" && inferred.properties) {\n targetProperties = this.deepMergeProperties(inferred.properties, targetProperties);\n } else if (inferred.type === \"array\" && inferred.items && inferred.items.properties) {\n // Array schema merging could be added here if we want full support.\n }\n }\n\n if (normalized.type === \"object\") {\n const requiredKeys = Array.isArray(schemaObj.required) ? schemaObj.required : [];\n normalized.properties = this.normalizeProperties(targetProperties, requiredKeys);\n } else if (normalized.type === \"array\") {\n // Future expansion: array deep merge\n normalized.items = this.normalizePropertyMetadata(schemaObj.items || { type: \"object\", properties: {} }, \"items\", false);\n }\n\n return normalized;\n } catch (error) {\n const msg = \"Critical error normalizing schema object: \" + (error as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n\n /**\n * Recursively deep merges an inferred schema over a base schema.\n * @param base The base property dictionary.\n * @param override The overriding inferred dictionary.\n * @returns A new deeply merged property dictionary.\n */\n private static deepMergeProperties(base: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown> {\n const merged = { ...base };\n for (const key of Object.keys(override)) {\n const overrideVal = override[key];\n const baseVal = merged[key];\n\n if (baseVal && typeof baseVal === \"object\" && !Array.isArray(baseVal) &&\n overrideVal && typeof overrideVal === \"object\" && !Array.isArray(overrideVal)) {\n merged[key] = this.deepMergeProperties(baseVal, overrideVal);\n } else {\n merged[key] = overrideVal;\n }\n }\n return merged;\n }\n\n /**\n * Normalizes a collection of properties.\n * @param properties The raw properties map.\n * @param requiredKeys An optional array of keys that are required by the parent object.\n * @returns A map of strict IPropertyMetadata objects.\n */\n private static normalizeProperties(properties: Record<string, unknown>, requiredKeys: string[] = []): Record<string, IPropertyMetadata> {\n const normalizedProps: Record<string, IPropertyMetadata> = {};\n for (const key of Object.keys(properties)) {\n const isRequired = requiredKeys.includes(key);\n normalizedProps[key] = this.normalizePropertyMetadata(properties[key], key, isRequired);\n }\n return normalizedProps;\n }\n\n /**\n * Normalizes a single property against the ISchema specification.\n * @param prop The raw property definition.\n * @param keyName The string key name for generating default labels.\n * @param isRequired Indicates if the parent object mandated this property as required.\n * @returns A strict IPropertyMetadata instance.\n */\n private static normalizePropertyMetadata(prop: Record<string, unknown>, keyName: string, isRequired: boolean = false): IPropertyMetadata {\n const normalized: IPropertyMetadata = {\n type: prop.type || \"string\",\n ui: {\n label: prop.ui?.label || this.generateLabel(keyName),\n isKey: !!prop.ui?.isKey,\n readOnly: !!prop.ui?.readOnly,\n widget: prop.ui?.widget || (prop.valueHelp || prop.enum ? \"select\" : undefined),\n visibleOn: prop.ui?.visibleOn,\n enabledOn: prop.ui?.enabledOn,\n format: prop.ui?.format,\n validators: prop.ui?.validators,\n formatter: prop.ui?.formatter,\n args: prop.ui?.args,\n rows: prop.ui?.rows,\n fullWidth: prop.ui?.fullWidth,\n dialogButtonText: prop.ui?.dialogButtonText\n },\n required: isRequired || !!prop.required,\n maxLength: prop.maxLength as number,\n minLength: prop.minLength as number,\n minimum: prop.minimum,\n maximum: prop.maximum,\n pattern: prop.pattern,\n precision: prop.precision,\n scale: prop.scale,\n multipleOf: prop.multipleOf as number,\n valueHelp: prop.valueHelp,\n enum: prop.enum\n };\n\n if (normalized.type === \"object\" && prop.properties) {\n const requiredKeys = Array.isArray(prop.required) ? prop.required : [];\n normalized.properties = this.normalizeProperties(prop.properties as Record<string, unknown>, requiredKeys);\n normalized.uiLayout = prop.uiLayout;\n } else if (normalized.type === \"array\" && prop.items) {\n normalized.items = this.normalizePropertyMetadata(prop.items as Record<string, unknown>, \"items\", false);\n normalized.uiLayout = prop.uiLayout;\n }\n\n return normalized;\n }\n\n /**\n * Generates a Title Case label from camelCase or snake_case technical names.\n */\n private static generateLabel(name: string): string {\n if (!name) return \"\";\n let spaced = name.replace(/([A-Z])/g, \" $1\").replace(/_/g, \" \");\n return spaced.split(' ')\n .filter(w => w.length > 0)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ')\n .trim();\n }\n\n /**\n * Infers a v2 ISchema structure dynamically from a plain data payload.\n */\n public static inferSchemaFromData(data: unknown): ISchema {\n const schema: ISchema = { type: \"object\", properties: {}, layoutStrategy: \"compact\", title: \"\" };\n\n if (!data || typeof data !== \"object\") {\n return schema;\n }\n\n if (Array.isArray(data)) {\n schema.type = \"array\";\n if (data.length > 0 && typeof data[0] !== \"object\") {\n schema.layoutStrategy = \"compact\";\n schema.items = { type: typeof data[0] as FieldType };\n } else {\n schema.layoutStrategy = \"table\";\n schema.items = {\n type: \"object\",\n layoutStrategy: \"compact\",\n properties: data.length > 0 ? this.inferPropertiesFromObject(data[0] as Record<string, unknown>) : {}\n };\n }\n } else {\n schema.type = \"object\";\n schema.properties = this.inferPropertiesFromObject(data);\n }\n\n return schema;\n }\n\n /**\n * Infers field metadata recursively from a raw data object.\n * @param obj The raw JavaScript object.\n * @returns A dictionary of inferred IPropertyMetadata.\n */\n private static inferPropertiesFromObject(obj: Record<string, unknown>): Record<string, IPropertyMetadata> {\n const properties: Record<string, IPropertyMetadata> = {};\n if (!obj || typeof obj !== \"object\") return properties;\n\n for (const key of Object.keys(obj)) {\n const val = obj[key];\n if (val === null || val === undefined) continue;\n\n let type: FieldType = \"string\";\n let items: IPropertyMetadata | undefined;\n let nestedProps: Record<string, IPropertyMetadata> | undefined;\n\n if (typeof val === \"number\") type = \"number\";\n else if (typeof val === \"boolean\") type = \"boolean\";\n else if (Array.isArray(val)) {\n type = \"array\";\n if (val.length > 0 && typeof val[0] !== \"object\") {\n items = {\n type: typeof val[0] as FieldType\n };\n } else {\n items = {\n type: \"object\",\n properties: val.length > 0 ? this.inferPropertiesFromObject(val[0] as Record<string, unknown>) : {}\n };\n }\n } else if (typeof val === \"object\") {\n type = \"object\";\n nestedProps = this.inferPropertiesFromObject(val);\n }\n\n properties[key] = {\n type,\n items,\n properties: nestedProps,\n ui: {\n label: this.generateLabel(key),\n isKey: false,\n readOnly: false,\n widget: type === \"array\" && items?.type !== \"object\" ? \"multiInput\" : undefined\n }\n };\n }\n\n return properties;\n }\n\n /**\n * Resolves a JSON Schema scope (e.g. '#/properties/header/properties/id')\n * against the ISchema, returning the PropertyMetadata and the UI5 binding path.\n */\n public static resolveScope(schema: ISchema, scope: string): { meta: IPropertyMetadata | undefined, bindingPath: string, propKey: string } {\n if (!scope || !scope.startsWith(\"#/properties/\")) {\n return { meta: undefined, bindingPath: scope || \"\", propKey: scope || \"\" };\n }\n \n const pathSegments = scope.replace(\"#/properties/\", \"\").split(\"/properties/\");\n let current: Record<string, IPropertyMetadata> | undefined = schema.properties;\n let meta: IPropertyMetadata | undefined;\n \n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Resolving scope '${scope}' with segments: ${JSON.stringify(pathSegments)}`, \"SchemaNormalizer\");\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Root schema keys: ${Object.keys(schema.properties || {})}`, \"SchemaNormalizer\");\n\n for (let i = 0; i < pathSegments.length; i++) {\n const segment = pathSegments[i];\n if (!current) {\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `current is undefined at segment '${segment}'`, \"SchemaNormalizer\");\n meta = undefined;\n break;\n }\n meta = current[segment];\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Segment '${segment}' resolved to meta: ${!!meta}. Available keys in current: ${Object.keys(current)}`, \"SchemaNormalizer\");\n if (i < pathSegments.length - 1) {\n current = meta?.properties;\n }\n }\n \n const bindingPath = pathSegments.join(\"/\");\n const propKey = scope.replace(\"#/properties/\", \"\"); // The original raw string for logging\n \n return {\n meta,\n bindingPath,\n propKey\n };\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAMSA,MAAM,GAAAC,eAAA;EAER,MAAMC,gBAAgB,CAAC;IAE1B;AACJ;AACA;IACI,OAAcC,SAASA,CAACC,SAAmB,EAAEC,IAAc,EAAW;MAClE,IAAIC,SAAS,GAAGF,SAAS;MAEzB,IAAI,OAAOE,SAAS,KAAK,QAAQ,EAAE;QAC/B,IAAI,CAACA,SAAS,CAACC,IAAI,CAAC,CAAC,EAAE;UACnBD,SAAS,GAAG,IAAI;QACpB,CAAC,MAAM;UACH,IAAI;YACAA,SAAS,GAAGE,IAAI,CAACC,KAAK,CAACH,SAAS,CAAC;UACrC,CAAC,CAAC,OAAOI,CAAC,EAAE;YACR,MAAMC,GAAG,GAAG,iCAAiC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,MAAMqE,WAAW,GAAGE,YAAY,CAACZ,IAAI,CAAC,GAAG,CAAC;MAC1C,MAAMW,OAAO,GAAGJ,KAAK,CAAClB,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;;MAEpD,OAAO;QACHoB,IAAI;QACJC,WAAW;QACXC;MACJ,CAAC;IACL;EACJ;EAAC,IAAAO,SAAA;IAAAC,UAAA;EAAA;EAAAD,SAAA,CAAArG,gBAAA,GAAAA,gBAAA;EAAA,OAAAqG,SAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"SchemaNormalizer-dbg.js","names":["Logger","___utils_Logger","SchemaNormalizer","canHandle","rawSchema","openapi","swagger","build","normalize","data","schemaObj","trim","JSON","parse","e","msg","message","error","Error","Array","isArray","inferSchemaFromData","normalized","title","type","items","layoutStrategy","uiLayout","additionalProperties","targetProperties","properties","inferred","deepMergeProperties","requiredKeys","required","normalizeProperties","normalizePropertyMetadata","base","override","merged","key","Object","keys","overrideVal","baseVal","normalizedProps","isRequired","includes","prop","keyName","ui","label","generateLabel","isKey","readOnly","widget","valueHelp","enum","undefined","visibleOn","enabledOn","format","validators","formatter","args","rows","fullWidth","dialogButtonText","maxLength","minLength","minimum","maximum","pattern","precision","scale","multipleOf","name","spaced","replace","split","filter","w","length","map","word","charAt","toUpperCase","slice","toLowerCase","join","schema","inferPropertiesFromObject","obj","val","nestedProps","resolveScope","scope","startsWith","meta","bindingPath","propKey","pathSegments","current","debug","stringify","i","segment","__exports","__esModule"],"sources":["SchemaNormalizer.ts"],"sourcesContent":["/**\n * @file SchemaNormalizer.ts\n * @description Transforms and validates incoming JSON payloads into the strict v2 ISchema dictionary matrix.\n */\n\nimport { ISchema, IPropertyMetadata, FieldType } from \"../interfaces/ISchema\";\nimport { ISchemaBuilderPlugin } from \"../interfaces/ISchemaBuilderPlugin\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class SchemaNormalizer implements ISchemaBuilderPlugin {\n\n /**\n * ISchemaBuilderPlugin Contract\n */\n public canHandle(rawSchema: any): boolean {\n // MetaUI native schemas almost always have properties, items, or a layoutStrategy\n // This acts as a fallback for native schemas.\n if (rawSchema.openapi || rawSchema.swagger) return false; \n return true;\n }\n\n /**\n * ISchemaBuilderPlugin Contract\n */\n public build(rawSchema: any): ISchema {\n return SchemaNormalizer.normalize(rawSchema);\n }\n\n /**\n * Validates that the provided raw payload conforms to the required ISchema structures.\n */\n public static normalize(rawSchema?: unknown, data?: unknown): ISchema {\n let schemaObj = rawSchema;\n\n if (typeof schemaObj === \"string\") {\n if (!schemaObj.trim()) {\n schemaObj = null;\n } else {\n try {\n schemaObj = JSON.parse(schemaObj);\n } catch (e) {\n const msg = \"Failed to parse schema string: \" + (e as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n }\n\n if (!schemaObj || typeof schemaObj !== 'object' || Array.isArray(schemaObj)) {\n return this.inferSchemaFromData(data);\n }\n\n try {\n // It is an object. Ensure it conforms to v2 structure.\n const normalized: ISchema = {\n title: schemaObj.title,\n type: schemaObj.type || (schemaObj.items ? \"array\" : \"object\"),\n layoutStrategy: schemaObj.layoutStrategy,\n uiLayout: schemaObj.uiLayout,\n additionalProperties: schemaObj.additionalProperties\n };\n\n let targetProperties = schemaObj.properties || {};\n\n if (schemaObj.additionalProperties === true && data) {\n const inferred = this.inferSchemaFromData(data);\n if (inferred.type === \"object\" && inferred.properties) {\n targetProperties = this.deepMergeProperties(inferred.properties, targetProperties);\n } else if (inferred.type === \"array\" && inferred.items && inferred.items.properties) {\n // Array schema merging could be added here if we want full support.\n }\n }\n\n if (normalized.type === \"object\") {\n const requiredKeys = Array.isArray(schemaObj.required) ? schemaObj.required : [];\n normalized.properties = this.normalizeProperties(targetProperties, requiredKeys);\n } else if (normalized.type === \"array\") {\n // Future expansion: array deep merge\n normalized.items = this.normalizePropertyMetadata(schemaObj.items || { type: \"object\", properties: {} }, \"items\", false);\n }\n\n return normalized;\n } catch (error) {\n const msg = \"Critical error normalizing schema object: \" + (error as Error).message;\n Logger.error(\"[MetaUI SchemaNormalizer]\", msg);\n throw new Error(msg);\n }\n }\n\n /**\n * Recursively deep merges an inferred schema over a base schema.\n * @param base The base property dictionary.\n * @param override The overriding inferred dictionary.\n * @returns A new deeply merged property dictionary.\n */\n private static deepMergeProperties(base: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown> {\n const merged = { ...base };\n for (const key of Object.keys(override)) {\n const overrideVal = override[key];\n const baseVal = merged[key];\n\n if (baseVal && typeof baseVal === \"object\" && !Array.isArray(baseVal) &&\n overrideVal && typeof overrideVal === \"object\" && !Array.isArray(overrideVal)) {\n merged[key] = this.deepMergeProperties(baseVal, overrideVal);\n } else {\n merged[key] = overrideVal;\n }\n }\n return merged;\n }\n\n /**\n * Normalizes a collection of properties.\n * @param properties The raw properties map.\n * @param requiredKeys An optional array of keys that are required by the parent object.\n * @returns A map of strict IPropertyMetadata objects.\n */\n private static normalizeProperties(properties: Record<string, unknown>, requiredKeys: string[] = []): Record<string, IPropertyMetadata> {\n const normalizedProps: Record<string, IPropertyMetadata> = {};\n for (const key of Object.keys(properties)) {\n const isRequired = requiredKeys.includes(key);\n normalizedProps[key] = this.normalizePropertyMetadata(properties[key], key, isRequired);\n }\n return normalizedProps;\n }\n\n /**\n * Normalizes a single property against the ISchema specification.\n * @param prop The raw property definition.\n * @param keyName The string key name for generating default labels.\n * @param isRequired Indicates if the parent object mandated this property as required.\n * @returns A strict IPropertyMetadata instance.\n */\n private static normalizePropertyMetadata(prop: Record<string, unknown>, keyName: string, isRequired: boolean = false): IPropertyMetadata {\n const normalized: IPropertyMetadata = {\n type: prop.type || \"string\",\n ui: {\n label: prop.ui?.label || this.generateLabel(keyName),\n isKey: !!prop.ui?.isKey,\n readOnly: !!prop.ui?.readOnly,\n widget: prop.ui?.widget || (prop.valueHelp || prop.enum ? \"select\" : undefined),\n visibleOn: prop.ui?.visibleOn,\n enabledOn: prop.ui?.enabledOn,\n format: prop.ui?.format,\n validators: prop.ui?.validators,\n formatter: prop.ui?.formatter,\n args: prop.ui?.args,\n rows: prop.ui?.rows,\n fullWidth: prop.ui?.fullWidth,\n dialogButtonText: prop.ui?.dialogButtonText\n },\n required: isRequired || !!prop.required,\n maxLength: prop.maxLength as number,\n minLength: prop.minLength as number,\n minimum: prop.minimum,\n maximum: prop.maximum,\n pattern: prop.pattern,\n precision: prop.precision,\n scale: prop.scale,\n multipleOf: prop.multipleOf as number,\n valueHelp: prop.valueHelp,\n enum: prop.enum\n };\n\n if (normalized.type === \"object\" && prop.properties) {\n const requiredKeys = Array.isArray(prop.required) ? prop.required : [];\n normalized.properties = this.normalizeProperties(prop.properties as Record<string, unknown>, requiredKeys);\n normalized.uiLayout = prop.uiLayout;\n } else if (normalized.type === \"array\" && prop.items) {\n normalized.items = this.normalizePropertyMetadata(prop.items as Record<string, unknown>, \"items\", false);\n normalized.uiLayout = prop.uiLayout;\n }\n\n return normalized;\n }\n\n /**\n * Generates a Title Case label from camelCase or snake_case technical names.\n */\n private static generateLabel(name: string): string {\n if (!name) return \"\";\n let spaced = name.replace(/([A-Z])/g, \" $1\").replace(/_/g, \" \");\n return spaced.split(' ')\n .filter(w => w.length > 0)\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ')\n .trim();\n }\n\n /**\n * Infers a v2 ISchema structure dynamically from a plain data payload.\n */\n public static inferSchemaFromData(data: unknown): ISchema {\n const schema: ISchema = { type: \"object\", properties: {}, layoutStrategy: \"compact\", title: \"\" };\n\n if (!data || typeof data !== \"object\") {\n return schema;\n }\n\n if (Array.isArray(data)) {\n schema.type = \"array\";\n if (data.length > 0 && typeof data[0] !== \"object\") {\n schema.layoutStrategy = \"compact\";\n schema.items = { type: typeof data[0] as FieldType };\n } else {\n schema.layoutStrategy = \"table\";\n schema.items = {\n type: \"object\",\n layoutStrategy: \"compact\",\n properties: data.length > 0 ? this.inferPropertiesFromObject(data[0] as Record<string, unknown>) : {}\n };\n }\n } else {\n schema.type = \"object\";\n schema.properties = this.inferPropertiesFromObject(data);\n }\n\n return schema;\n }\n\n /**\n * Infers field metadata recursively from a raw data object.\n * @param obj The raw JavaScript object.\n * @returns A dictionary of inferred IPropertyMetadata.\n */\n private static inferPropertiesFromObject(obj: Record<string, unknown>): Record<string, IPropertyMetadata> {\n const properties: Record<string, IPropertyMetadata> = {};\n if (!obj || typeof obj !== \"object\") return properties;\n\n for (const key of Object.keys(obj)) {\n const val = obj[key];\n if (val === null || val === undefined) continue;\n\n let type: FieldType = \"string\";\n let items: IPropertyMetadata | undefined;\n let nestedProps: Record<string, IPropertyMetadata> | undefined;\n\n if (typeof val === \"number\") type = \"number\";\n else if (typeof val === \"boolean\") type = \"boolean\";\n else if (Array.isArray(val)) {\n type = \"array\";\n if (val.length > 0 && typeof val[0] !== \"object\") {\n items = {\n type: typeof val[0] as FieldType\n };\n } else {\n items = {\n type: \"object\",\n properties: val.length > 0 ? this.inferPropertiesFromObject(val[0] as Record<string, unknown>) : {}\n };\n }\n } else if (typeof val === \"object\") {\n type = \"object\";\n nestedProps = this.inferPropertiesFromObject(val);\n }\n\n properties[key] = {\n type,\n items,\n properties: nestedProps,\n ui: {\n label: this.generateLabel(key),\n isKey: false,\n readOnly: false,\n widget: type === \"array\" && items?.type !== \"object\" ? \"multiInput\" : undefined\n }\n };\n }\n\n return properties;\n }\n\n /**\n * Resolves a JSON Schema scope (e.g. '#/properties/header/properties/id')\n * against the ISchema, returning the PropertyMetadata and the UI5 binding path.\n */\n public static resolveScope(schema: ISchema, scope: string): { meta: IPropertyMetadata | undefined, bindingPath: string, propKey: string } {\n if (!scope || !scope.startsWith(\"#/properties/\")) {\n return { meta: undefined, bindingPath: scope || \"\", propKey: scope || \"\" };\n }\n \n const pathSegments = scope.replace(\"#/properties/\", \"\").split(\"/properties/\");\n let current: Record<string, IPropertyMetadata> | undefined = schema.properties;\n let meta: IPropertyMetadata | undefined;\n \n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Resolving scope '${scope}' with segments: ${JSON.stringify(pathSegments)}`, \"SchemaNormalizer\");\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Root schema keys: ${Object.keys(schema.properties || {})}`, \"SchemaNormalizer\");\n\n for (let i = 0; i < pathSegments.length; i++) {\n const segment = pathSegments[i];\n if (!current) {\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `current is undefined at segment '${segment}'`, \"SchemaNormalizer\");\n meta = undefined;\n break;\n }\n meta = current[segment];\n Logger.debug(\"[MetaUI SchemaNormalizer]\", `Segment '${segment}' resolved to meta: ${!!meta}. Available keys in current: ${Object.keys(current)}`, \"SchemaNormalizer\");\n if (i < pathSegments.length - 1) {\n current = meta?.properties;\n }\n }\n \n const bindingPath = pathSegments.join(\"/\");\n const propKey = scope.replace(\"#/properties/\", \"\"); // The original raw string for logging\n \n return {\n meta,\n bindingPath,\n propKey\n };\n }\n}\n"],"mappings":";;;EAAA;AACA;AACA;AACA;EAHA,MAOSA,MAAM,GAAAC,eAAA;EAER,MAAMC,gBAAgB,CAAiC;IAE1D;AACJ;AACA;IACWC,SAASA,CAACC,SAAc,EAAW;MACtC;MACA;MACA,IAAIA,SAAS,CAACC,OAAO,IAAID,SAAS,CAACE,OAAO,EAAE,OAAO,KAAK;MACxD,OAAO,IAAI;IACf;;IAEA;AACJ;AACA;IACWC,KAAKA,CAACH,SAAc,EAAW;MAClC,OAAOF,gBAAgB,CAACM,SAAS,CAACJ,SAAS,CAAC;IAChD;;IAEA;AACJ;AACA;IACI,OAAcI,SAASA,CAACJ,SAAmB,EAAEK,IAAc,EAAW;MAClE,IAAIC,SAAS,GAAGN,SAAS;MAEzB,IAAI,OAAOM,SAAS,KAAK,QAAQ,EAAE;QAC/B,IAAI,CAACA,SAAS,CAACC,IAAI,CAAC,CAAC,EAAE;UACnBD,SAAS,GAAG,IAAI;QACpB,CAAC,MAAM;UACH,IAAI;YACAA,SAAS,GAAGE,IAAI,CAACC,KAAK,CAACH,SAAS,CAAC;U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