@acorex-platform/module-platform-management-client 0.0.38 → 0.0.48

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 (87) hide show
  1. package/fesm2022/{acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-BGVhn6wv.mjs → acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-YuJijjKh.mjs} +465 -101
  2. package/fesm2022/acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-YuJijjKh.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-command-definition.mjs +20 -0
  4. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-command-definition.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-access-policy.mjs +20 -0
  6. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-access-policy.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-definition.mjs +1499 -30
  8. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-definition.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-module-definition.mjs +396 -0
  10. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-module-definition.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-plugin-definition.mjs +20 -0
  12. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-plugin-definition.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-query-definition.mjs +49 -1
  14. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-query-definition.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-token.mjs +20 -0
  16. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-token.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-widget.mjs +20 -0
  18. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entities-widget.mjs.map +1 -1
  19. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-BOwC5Ns9.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-HWczTPH2.mjs} +15 -8
  20. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-HWczTPH2.mjs.map +1 -0
  21. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-CdvQlwAk.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-C3B1_QMs.mjs} +16 -2
  22. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-C3B1_QMs.mjs.map +1 -0
  23. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-Dye4aSKE.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-BPkJloHy.mjs} +16 -2
  24. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-BPkJloHy.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs +1621 -0
  26. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs +299 -0
  28. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-CwU5hMjI.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-BxABTl8L.mjs} +16 -2
  30. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-BxABTl8L.mjs.map +1 -0
  31. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-DGK684Q1.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-Cv6HVQOU.mjs} +45 -3
  32. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-Cv6HVQOU.mjs.map +1 -0
  33. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-DI_k6-ha.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-BV8iSuoK.mjs} +16 -2
  34. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-BV8iSuoK.mjs.map +1 -0
  35. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-C18msniH.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-BYH6SIqU.mjs} +16 -2
  36. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-BYH6SIqU.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog.mjs +1 -1
  38. package/fesm2022/acorex-platform-module-platform-management-client-contracts.mjs +1664 -1
  39. package/fesm2022/acorex-platform-module-platform-management-client-contracts.mjs.map +1 -1
  40. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs +586 -0
  41. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs.map +1 -0
  42. package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query.command-9Ku7C1BC.mjs → acorex-platform-module-platform-management-client-create-user-query.command-Bh49QHkl.mjs} +374 -324
  43. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.command-Bh49QHkl.mjs.map +1 -0
  44. package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.component-BgBWob9p.mjs +329 -0
  45. package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.component-BgBWob9p.mjs.map +1 -0
  46. package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.provider-hLzgoJu3.mjs +23 -0
  47. package/fesm2022/acorex-platform-module-platform-management-client-entity-definition-form-page.provider-hLzgoJu3.mjs.map +1 -0
  48. package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs +197 -0
  49. package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs.map +1 -0
  50. package/fesm2022/acorex-platform-module-platform-management-client-local-entities.mjs +1 -0
  51. package/fesm2022/acorex-platform-module-platform-management-client-local-entities.mjs.map +1 -1
  52. package/fesm2022/{acorex-platform-module-platform-management-client-menu-list.component-uF5w1c7t.mjs → acorex-platform-module-platform-management-client-menu-list.component-iMEnFPEY.mjs} +2 -2
  53. package/fesm2022/{acorex-platform-module-platform-management-client-menu-list.component-uF5w1c7t.mjs.map → acorex-platform-module-platform-management-client-menu-list.component-iMEnFPEY.mjs.map} +1 -1
  54. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs +45 -0
  55. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs.map +1 -0
  56. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BW2pBOeg.mjs +166 -0
  57. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BW2pBOeg.mjs.map +1 -0
  58. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs +45 -0
  59. package/fesm2022/acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs.map +1 -0
  60. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-B0g6dweQ.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DRkE2a7n.mjs} +2 -2
  61. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-B0g6dweQ.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DRkE2a7n.mjs.map} +1 -1
  62. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-A0v5MWRU.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-CXI6fJi3.mjs} +2 -3
  63. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-A0v5MWRU.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-CXI6fJi3.mjs.map} +1 -1
  64. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-RR5zcsnI.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-C3iHgoC2.mjs} +2 -2
  65. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-RR5zcsnI.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-C3iHgoC2.mjs.map} +1 -1
  66. package/fesm2022/acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs +144 -0
  67. package/fesm2022/acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs.map +1 -0
  68. package/fesm2022/acorex-platform-module-platform-management-client.mjs +1 -1
  69. package/package.json +7 -3
  70. package/types/acorex-platform-module-platform-management-client-contracts-entities-module-definition.d.ts +5 -0
  71. package/types/acorex-platform-module-platform-management-client-contracts.d.ts +225 -5
  72. package/types/acorex-platform-module-platform-management-client.d.ts +35 -3
  73. package/fesm2022/acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-BGVhn6wv.mjs.map +0 -1
  74. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-BOwC5Ns9.mjs.map +0 -1
  75. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-CdvQlwAk.mjs.map +0 -1
  76. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-Dye4aSKE.mjs.map +0 -1
  77. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-CcJ58vfr.mjs +0 -158
  78. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-CcJ58vfr.mjs.map +0 -1
  79. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-CwU5hMjI.mjs.map +0 -1
  80. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-DGK684Q1.mjs.map +0 -1
  81. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-DI_k6-ha.mjs.map +0 -1
  82. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-C18msniH.mjs.map +0 -1
  83. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.command-9Ku7C1BC.mjs.map +0 -1
  84. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.types-DdygAori.mjs +0 -71
  85. package/fesm2022/acorex-platform-module-platform-management-client-create-user-query.types-DdygAori.mjs.map +0 -1
  86. package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-DjStd3a8.mjs +0 -136
  87. package/fesm2022/acorex-platform-module-platform-management-client-list-registered-entities.query-DjStd3a8.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-B0g6dweQ.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/rest-api-generator-widget/rest-api-generator-widget-column.component.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport type { AXRestApiOutput } from '@acorex/components/rest-api-generator';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { formatRestApiSummary } from './parse-http-request.util';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-rest-api-generator-widget-column',\n template: `\n @if (summary()) {\n <span class=\"text-xs font-medium\" [title]=\"summary()\">{{ summary() }}</span>\n }\n <!-- ----- Empty request ----- -->\n @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXMRestApiGeneratorWidgetColumnComponent extends AXPValueWidgetComponent<AXRestApiOutput> {\n //#region ----- Computed Properties -----\n\n protected readonly summary = computed(() => formatRestApiSummary(this.getValue()));\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;AAQA;AAEA;AAeM,MAAO,wCAAyC,SAAQ,uBAAwC,CAAA;AAbtG,IAAA,WAAA,GAAA;;;AAgBqB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,oBAAoB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oFAAC;AAGnF,IAAA;8GANY,wCAAwC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wCAAwC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXzC;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGU,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBAbpD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sCAAsC;AAChD,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DRkE2a7n.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/rest-api-generator-widget/rest-api-generator-widget-column.component.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport type { AXRestApiOutput } from '@acorex/components/rest-api-generator';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { formatRestApiSummary } from './parse-http-request.util';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-rest-api-generator-widget-column',\n template: `\n @if (summary()) {\n <span class=\"text-xs font-medium\" [title]=\"summary()\">{{ summary() }}</span>\n }\n <!-- ----- Empty request ----- -->\n @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXMRestApiGeneratorWidgetColumnComponent extends AXPValueWidgetComponent<AXRestApiOutput> {\n //#region ----- Computed Properties -----\n\n protected readonly summary = computed(() => formatRestApiSummary(this.getValue()));\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;AAQA;AAEA;AAeM,MAAO,wCAAyC,SAAQ,uBAAwC,CAAA;AAbtG,IAAA,WAAA,GAAA;;;AAgBqB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,oBAAoB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oFAAC;AAGnF,IAAA;8GANY,wCAAwC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wCAAwC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXzC;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGU,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBAbpD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sCAAsC;AAChD,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;"}
@@ -13,8 +13,7 @@ import * as i0 from '@angular/core';
13
13
  import { inject, DestroyRef, signal, computed, ChangeDetectionStrategy, Component } from '@angular/core';
14
14
  import * as i1 from '@angular/forms';
15
15
  import { FormsModule } from '@angular/forms';
16
- import { C as CREATE_USER_QUERY_I18N } from './acorex-platform-module-platform-management-client-create-user-query.types-DdygAori.mjs';
17
- import { c as createEmptyRestApiOutput, n as normalizeRestApiOutput, h as hasParsedContent, a as REST_API_GENERATOR_IMPORT_DEBOUNCE_MS, p as parseHttpRequest } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-BGVhn6wv.mjs';
16
+ import { C as CREATE_USER_QUERY_I18N, c as createEmptyRestApiOutput, n as normalizeRestApiOutput, h as hasParsedContent, f as REST_API_GENERATOR_IMPORT_DEBOUNCE_MS, p as parseHttpRequest } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-YuJijjKh.mjs';
18
17
 
19
18
  //#region ----- Imports -----
20
19
  //#endregion
@@ -175,4 +174,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
175
174
  }], ctorParameters: () => [] });
176
175
 
177
176
  export { AXMRestApiGeneratorWidgetEditComponent };
178
- //# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-A0v5MWRU.mjs.map
177
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-CXI6fJi3.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-A0v5MWRU.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/rest-api-generator-widget/rest-api-generator-widget-edit.component.ts","../../../../libs/modules/platform-management/client/src/lib/features/rest-api-generator-widget/rest-api-generator-widget-edit.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport type { AXRestApiOutput } from '@acorex/components/rest-api-generator';\nimport { AXRestApiGeneratorComponent } from '@acorex/components/rest-api-generator';\nimport { AXValueChangedEvent } from '@acorex/cdk/common';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXTextAreaModule } from '@acorex/components/text-area';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DestroyRef, computed, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { CREATE_USER_QUERY_I18N } from '../query-definition/create-user-query.types';\nimport {\n REST_API_GENERATOR_IMPORT_DEBOUNCE_MS,\n} from './rest-api-generator-widget.constants';\nimport {\n createEmptyRestApiOutput,\n hasParsedContent,\n normalizeRestApiOutput,\n parseHttpRequest,\n} from './parse-http-request.util';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-rest-api-generator-widget-edit',\n templateUrl: './rest-api-generator-widget-edit.component.html',\n styleUrl: './rest-api-generator-widget-edit.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'block w-full',\n },\n imports: [\n CommonModule,\n FormsModule,\n AXButtonModule,\n AXTextAreaModule,\n AXTranslationModule,\n AXRestApiGeneratorComponent,\n ],\n})\nexport class AXMRestApiGeneratorWidgetEditComponent extends AXPValueWidgetComponent<AXRestApiOutput> {\n //#region ----- Services & Dependencies -----\n\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n private readonly destroyRef = inject(DestroyRef);\n\n //#endregion\n\n //#region ----- Constants -----\n\n protected readonly importI18n = CREATE_USER_QUERY_I18N.import;\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly importText = signal('');\n protected readonly boundRequest = signal<AXRestApiOutput>(createEmptyRestApiOutput());\n protected readonly revision = signal(0);\n protected readonly revisionKeys = computed(() => [this.revision()]);\n private suppressGeneratorChange = false;\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n private parseTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n super();\n this.destroyRef.onDestroy(() => this.clearParseTimer());\n }\n\n override ngOnInit(): void {\n super.ngOnInit();\n this.boundRequest.set(normalizeRestApiOutput(this.getValue()));\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onImportModelChange(value: unknown): void {\n const text = this.coerceImportText(value);\n this.importText.set(text);\n this.scheduleDebouncedParse(text);\n }\n\n protected onImportTextChanged(event: AXValueChangedEvent<string>): void {\n const text = this.coerceImportText(event.value);\n this.importText.set(text);\n if (event.isUserInteraction === false) {\n return;\n }\n this.scheduleDebouncedParse(text);\n }\n\n protected onApplyImport(): void {\n this.clearParseTimer();\n void this.applyParsedText(this.importText(), true);\n }\n\n protected onGeneratorChange(value: AXRestApiOutput): void {\n const next = normalizeRestApiOutput(value);\n if (this.suppressGeneratorChange) {\n if (hasParsedContent(next)) {\n this.boundRequest.set(next);\n this.setValue(next);\n }\n return;\n }\n this.boundRequest.set(next);\n this.setValue(next);\n }\n\n //#endregion\n\n //#region ----- Import -----\n\n private scheduleDebouncedParse(text: string): void {\n this.clearParseTimer();\n this.parseTimer = setTimeout(() => {\n this.parseTimer = null;\n void this.applyParsedText(text, false);\n }, REST_API_GENERATOR_IMPORT_DEBOUNCE_MS);\n }\n\n private clearParseTimer(): void {\n if (this.parseTimer != null) {\n clearTimeout(this.parseTimer);\n this.parseTimer = null;\n }\n }\n\n private coerceImportText(value: unknown): string {\n if (typeof value === 'string') {\n return value;\n }\n if (value != null && typeof value === 'object' && 'value' in value) {\n const inner = (value as { value: unknown }).value;\n if (typeof inner === 'string') {\n return inner;\n }\n }\n return '';\n }\n\n private async applyParsedText(text: string, showError: boolean): Promise<void> {\n const result = parseHttpRequest(text);\n if (!result.ok) {\n if (showError) {\n await this.showParseError();\n }\n return;\n }\n\n this.applyRequest(result.value);\n }\n\n private applyRequest(value: AXRestApiOutput): void {\n const next = normalizeRestApiOutput(value);\n if (this.isSameRequest(next, this.boundRequest())) {\n this.setValue(next);\n return;\n }\n\n this.suppressGeneratorChange = true;\n this.boundRequest.set(next);\n this.setValue(next);\n this.revision.update((current) => current + 1);\n window.setTimeout(() => {\n this.suppressGeneratorChange = false;\n }, 100);\n }\n\n private isSameRequest(left: AXRestApiOutput, right: AXRestApiOutput): boolean {\n return JSON.stringify(this.stripTempIds(left)) === JSON.stringify(this.stripTempIds(right));\n }\n\n private stripTempIds(value: AXRestApiOutput): unknown {\n return {\n url: value.url,\n method: value.method,\n body: value.body,\n headers: value.headers,\n queries: value.queries.map((item) => {\n const copy = { ...item };\n delete copy.tempId;\n return copy;\n }),\n };\n }\n\n private async showParseError(): Promise<void> {\n const message = await this.translationService.translateAsync(this.importI18n.parseFailed);\n this.toastService.show({\n color: 'warning',\n content: message,\n closeButton: true,\n timeOut: 4000,\n timeOutProgress: true,\n });\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-rest-api-generator-widget\">\n <!-- ----- Import from cURL, fetch, HTTP, JSON, or URL ----- -->\n <div class=\"axm-rest-api-generator-widget__import\">\n <div class=\"axm-rest-api-generator-widget__import-header\">\n <span class=\"axm-rest-api-generator-widget__import-title\">\n {{ importI18n.title | translate | async }}\n </span>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n class=\"ax-sm\"\n [text]=\"(importI18n.apply | translate | async) ?? ''\"\n (onClick)=\"onApplyImport()\"\n ></ax-button>\n </div>\n <ax-text-area\n [ngModel]=\"importText()\"\n (ngModelChange)=\"onImportModelChange($event)\"\n (onValueChanged)=\"onImportTextChanged($event)\"\n [rows]=\"4\"\n [placeholder]=\"(importI18n.placeholder | translate | async) ?? ''\"\n ></ax-text-area>\n </div>\n\n <!-- ----- Visual REST request builder ----- -->\n @for (rev of revisionKeys(); track rev) {\n <ax-rest-api-generator [value]=\"boundRequest()\" (onValueChange)=\"onGeneratorChange($event)\">\n </ax-rest-api-generator>\n }\n</div>\n"],"names":["i2","i4"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAyBA;AAEA;AAmBM,MAAO,sCAAuC,SAAQ,uBAAwC,CAAA;AA6BlG,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AA3BQ,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;;AAM7B,QAAA,IAAA,CAAA,UAAU,GAAG,sBAAsB,CAAC,MAAM;;;QAM1C,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,EAAE;uFAAC;AACvB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAkB,wBAAwB,EAAE;yFAAC;QAClE,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,CAAC;qFAAC;QACpB,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;yFAAC;QAC3D,IAAA,CAAA,uBAAuB,GAAG,KAAK;;;QAM/B,IAAA,CAAA,UAAU,GAAyC,IAAI;AAI7D,QAAA,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,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGlB,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBAjBlD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oCAAoC,EAAA,eAAA,EAG7B,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,cAAc;qBACtB,EAAA,OAAA,EACQ;wBACP,YAAY;wBACZ,WAAW;wBACX,cAAc;wBACd,gBAAgB;wBAChB,mBAAmB;wBACnB,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,snCAAA,EAAA,MAAA,EAAA,CAAA,y9BAAA,CAAA,EAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-CXI6fJi3.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/rest-api-generator-widget/rest-api-generator-widget-edit.component.ts","../../../../libs/modules/platform-management/client/src/lib/features/rest-api-generator-widget/rest-api-generator-widget-edit.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport type { AXRestApiOutput } from '@acorex/components/rest-api-generator';\nimport { AXRestApiGeneratorComponent } from '@acorex/components/rest-api-generator';\nimport { AXValueChangedEvent } from '@acorex/cdk/common';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXTextAreaModule } from '@acorex/components/text-area';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DestroyRef, computed, inject, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { CREATE_USER_QUERY_I18N } from '../query-definition/create-user-query.types';\nimport {\n REST_API_GENERATOR_IMPORT_DEBOUNCE_MS,\n} from './rest-api-generator-widget.constants';\nimport {\n createEmptyRestApiOutput,\n hasParsedContent,\n normalizeRestApiOutput,\n parseHttpRequest,\n} from './parse-http-request.util';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-rest-api-generator-widget-edit',\n templateUrl: './rest-api-generator-widget-edit.component.html',\n styleUrl: './rest-api-generator-widget-edit.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'block w-full',\n },\n imports: [\n CommonModule,\n FormsModule,\n AXButtonModule,\n AXTextAreaModule,\n AXTranslationModule,\n AXRestApiGeneratorComponent,\n ],\n})\nexport class AXMRestApiGeneratorWidgetEditComponent extends AXPValueWidgetComponent<AXRestApiOutput> {\n //#region ----- Services & Dependencies -----\n\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n private readonly destroyRef = inject(DestroyRef);\n\n //#endregion\n\n //#region ----- Constants -----\n\n protected readonly importI18n = CREATE_USER_QUERY_I18N.import;\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly importText = signal('');\n protected readonly boundRequest = signal<AXRestApiOutput>(createEmptyRestApiOutput());\n protected readonly revision = signal(0);\n protected readonly revisionKeys = computed(() => [this.revision()]);\n private suppressGeneratorChange = false;\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n private parseTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n super();\n this.destroyRef.onDestroy(() => this.clearParseTimer());\n }\n\n override ngOnInit(): void {\n super.ngOnInit();\n this.boundRequest.set(normalizeRestApiOutput(this.getValue()));\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onImportModelChange(value: unknown): void {\n const text = this.coerceImportText(value);\n this.importText.set(text);\n this.scheduleDebouncedParse(text);\n }\n\n protected onImportTextChanged(event: AXValueChangedEvent<string>): void {\n const text = this.coerceImportText(event.value);\n this.importText.set(text);\n if (event.isUserInteraction === false) {\n return;\n }\n this.scheduleDebouncedParse(text);\n }\n\n protected onApplyImport(): void {\n this.clearParseTimer();\n void this.applyParsedText(this.importText(), true);\n }\n\n protected onGeneratorChange(value: AXRestApiOutput): void {\n const next = normalizeRestApiOutput(value);\n if (this.suppressGeneratorChange) {\n if (hasParsedContent(next)) {\n this.boundRequest.set(next);\n this.setValue(next);\n }\n return;\n }\n this.boundRequest.set(next);\n this.setValue(next);\n }\n\n //#endregion\n\n //#region ----- Import -----\n\n private scheduleDebouncedParse(text: string): void {\n this.clearParseTimer();\n this.parseTimer = setTimeout(() => {\n this.parseTimer = null;\n void this.applyParsedText(text, false);\n }, REST_API_GENERATOR_IMPORT_DEBOUNCE_MS);\n }\n\n private clearParseTimer(): void {\n if (this.parseTimer != null) {\n clearTimeout(this.parseTimer);\n this.parseTimer = null;\n }\n }\n\n private coerceImportText(value: unknown): string {\n if (typeof value === 'string') {\n return value;\n }\n if (value != null && typeof value === 'object' && 'value' in value) {\n const inner = (value as { value: unknown }).value;\n if (typeof inner === 'string') {\n return inner;\n }\n }\n return '';\n }\n\n private async applyParsedText(text: string, showError: boolean): Promise<void> {\n const result = parseHttpRequest(text);\n if (!result.ok) {\n if (showError) {\n await this.showParseError();\n }\n return;\n }\n\n this.applyRequest(result.value);\n }\n\n private applyRequest(value: AXRestApiOutput): void {\n const next = normalizeRestApiOutput(value);\n if (this.isSameRequest(next, this.boundRequest())) {\n this.setValue(next);\n return;\n }\n\n this.suppressGeneratorChange = true;\n this.boundRequest.set(next);\n this.setValue(next);\n this.revision.update((current) => current + 1);\n window.setTimeout(() => {\n this.suppressGeneratorChange = false;\n }, 100);\n }\n\n private isSameRequest(left: AXRestApiOutput, right: AXRestApiOutput): boolean {\n return JSON.stringify(this.stripTempIds(left)) === JSON.stringify(this.stripTempIds(right));\n }\n\n private stripTempIds(value: AXRestApiOutput): unknown {\n return {\n url: value.url,\n method: value.method,\n body: value.body,\n headers: value.headers,\n queries: value.queries.map((item) => {\n const copy = { ...item };\n delete copy.tempId;\n return copy;\n }),\n };\n }\n\n private async showParseError(): Promise<void> {\n const message = await this.translationService.translateAsync(this.importI18n.parseFailed);\n this.toastService.show({\n color: 'warning',\n content: message,\n closeButton: true,\n timeOut: 4000,\n timeOutProgress: true,\n });\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-rest-api-generator-widget\">\n <!-- ----- Import from cURL, fetch, HTTP, JSON, or URL ----- -->\n <div class=\"axm-rest-api-generator-widget__import\">\n <div class=\"axm-rest-api-generator-widget__import-header\">\n <span class=\"axm-rest-api-generator-widget__import-title\">\n {{ importI18n.title | translate | async }}\n </span>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n class=\"ax-sm\"\n [text]=\"(importI18n.apply | translate | async) ?? ''\"\n (onClick)=\"onApplyImport()\"\n ></ax-button>\n </div>\n <ax-text-area\n [ngModel]=\"importText()\"\n (ngModelChange)=\"onImportModelChange($event)\"\n (onValueChanged)=\"onImportTextChanged($event)\"\n [rows]=\"4\"\n [placeholder]=\"(importI18n.placeholder | translate | async) ?? ''\"\n ></ax-text-area>\n </div>\n\n <!-- ----- Visual REST request builder ----- -->\n @for (rev of revisionKeys(); track rev) {\n <ax-rest-api-generator [value]=\"boundRequest()\" (onValueChange)=\"onGeneratorChange($event)\">\n </ax-rest-api-generator>\n }\n</div>\n"],"names":["i2","i4"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAyBA;AAEA;AAmBM,MAAO,sCAAuC,SAAQ,uBAAwC,CAAA;AA6BlG,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AA3BQ,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;;AAM7B,QAAA,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AAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,EAAA,SAAA,EAAA,aAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,gBAAA,EAAA,gBAAA,EAAA,WAAA,EAAA,SAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAChB,mBAAmB,+BACnB,2BAA2B,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGlB,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBAjBlD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oCAAoC,EAAA,eAAA,EAG7B,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,cAAc;qBACtB,EAAA,OAAA,EACQ;wBACP,YAAY;wBACZ,WAAW;wBACX,cAAc;wBACd,gBAAgB;wBAChB,mBAAmB;wBACnB,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,snCAAA,EAAA,MAAA,EAAA,CAAA,y9BAAA,CAAA,EAAA;;;"}
@@ -1,7 +1,7 @@
1
1
  import { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
2
2
  import * as i0 from '@angular/core';
3
3
  import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { f as formatRestApiSummary } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-BGVhn6wv.mjs';
4
+ import { g as formatRestApiSummary } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-YuJijjKh.mjs';
5
5
 
6
6
  //#region ----- Imports -----
7
7
  //#endregion
@@ -42,4 +42,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
42
42
  }] });
43
43
 
44
44
  export { AXMRestApiGeneratorWidgetViewComponent };
45
- //# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-RR5zcsnI.mjs.map
45
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-C3iHgoC2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-RR5zcsnI.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/rest-api-generator-widget/rest-api-generator-widget-view.component.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport type { AXRestApiOutput } from '@acorex/components/rest-api-generator';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { formatRestApiSummary } from './parse-http-request.util';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-rest-api-generator-widget-view',\n template: `\n @if (summary()) {\n <span class=\"text-xs font-medium\" [title]=\"summary()\">{{ summary() }}</span>\n }\n <!-- ----- Empty request ----- -->\n @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXMRestApiGeneratorWidgetViewComponent extends AXPValueWidgetComponent<AXRestApiOutput> {\n //#region ----- Computed Properties -----\n\n protected readonly summary = computed(() => formatRestApiSummary(this.getValue()));\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;AAQA;AAEA;AAeM,MAAO,sCAAuC,SAAQ,uBAAwC,CAAA;AAbpG,IAAA,WAAA,GAAA;;;AAgBqB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,oBAAoB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oFAAC;AAGnF,IAAA;8GANY,sCAAsC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sCAAsC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXvC;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGU,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBAblD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oCAAoC;AAC9C,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-C3iHgoC2.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/rest-api-generator-widget/rest-api-generator-widget-view.component.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport type { AXRestApiOutput } from '@acorex/components/rest-api-generator';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { formatRestApiSummary } from './parse-http-request.util';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-rest-api-generator-widget-view',\n template: `\n @if (summary()) {\n <span class=\"text-xs font-medium\" [title]=\"summary()\">{{ summary() }}</span>\n }\n <!-- ----- Empty request ----- -->\n @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXMRestApiGeneratorWidgetViewComponent extends AXPValueWidgetComponent<AXRestApiOutput> {\n //#region ----- Computed Properties -----\n\n protected readonly summary = computed(() => formatRestApiSummary(this.getValue()));\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;AAQA;AAEA;AAeM,MAAO,sCAAuC,SAAQ,uBAAwC,CAAA;AAbpG,IAAA,WAAA,GAAA;;;AAgBqB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,oBAAoB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oFAAC;AAGnF,IAAA;8GANY,sCAAsC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sCAAsC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXvC;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGU,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBAblD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oCAAoC;AAC9C,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;"}
@@ -0,0 +1,144 @@
1
+ import { extractRequestErrorInfo, platformErrorI18nKey } from '@acorex-platform/framework-client/common';
2
+ import { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';
3
+ import { AXPQueryService } from '@acorex-platform/framework-client/runtime';
4
+ import { resolveEntityActionCommandInput, entityActionDataRecord } from '@acorex-platform/framework-shared/runtime';
5
+ import { AXToastService } from '@acorex/components/toast';
6
+ import { AXTranslationService } from '@acorex/core/translation';
7
+ import * as i0 from '@angular/core';
8
+ import { inject, Injectable } from '@angular/core';
9
+
10
+ //#region ----- Imports -----
11
+ //#endregion
12
+ //#region ----- Constants -----
13
+ const RUN_USER_QUERY_I18N = {
14
+ dialogTitle: '@platform-management:query-definitions.run.dialog.title',
15
+ missingName: '@platform-management:query-definitions.run.messages.missing-name',
16
+ failedTitle: '@platform-management:query-definitions.run.messages.failed.title',
17
+ failedContent: '@platform-management:query-definitions.run.messages.failed.content',
18
+ errorTitle: '@platform-management:query-definitions.run.messages.error.title',
19
+ errorContent: '@platform-management:query-definitions.run.messages.error.content',
20
+ };
21
+ //#endregion
22
+ //#region ----- Command -----
23
+ /**
24
+ * Runs a QueryDefinition by name and shows the runtime envelope in a json-viewer dialog.
25
+ */
26
+ class AXMRunUserQueryCommand {
27
+ constructor() {
28
+ //#region ----- Services & Dependencies -----
29
+ this.queryService = inject(AXPQueryService);
30
+ this.layoutBuilder = inject(AXPLayoutBuilderService);
31
+ this.toastService = inject(AXToastService);
32
+ this.translationService = inject(AXTranslationService);
33
+ }
34
+ //#endregion
35
+ //#region ----- Execution -----
36
+ async execute(input = {}) {
37
+ const { queryName, queryTitle } = resolveRunQueryInput(input);
38
+ const displayName = queryTitle || queryName;
39
+ if (!queryName) {
40
+ const message = await this.translationService.translateAsync(RUN_USER_QUERY_I18N.missingName);
41
+ this.showWarning(message);
42
+ return { success: false, message: { text: message } };
43
+ }
44
+ try {
45
+ const result = await this.queryService.fetch(queryName, {});
46
+ if (result == null) {
47
+ const title = await this.translationService.translateAsync(RUN_USER_QUERY_I18N.failedTitle);
48
+ const content = await this.translationService.translateAsync(RUN_USER_QUERY_I18N.failedContent, {
49
+ params: { name: displayName },
50
+ });
51
+ this.showWarning(content, title);
52
+ return { success: false, message: { text: content } };
53
+ }
54
+ const dialogTitle = await this.translationService.translateAsync(RUN_USER_QUERY_I18N.dialogTitle, {
55
+ params: { name: displayName },
56
+ });
57
+ await this.layoutBuilder
58
+ .create()
59
+ .dialog((dialog) => {
60
+ dialog
61
+ .setTitle(dialogTitle)
62
+ .setSize('xl')
63
+ .setCloseButton(true)
64
+ .content((content) => {
65
+ content.customWidget('json-viewer', (widget) => {
66
+ widget.path('value');
67
+ });
68
+ })
69
+ .setContext({
70
+ value: result,
71
+ })
72
+ .setActions((actions) => {
73
+ actions.cancel('@general:actions.close.title');
74
+ });
75
+ })
76
+ .show();
77
+ return {
78
+ success: true,
79
+ kind: 'object',
80
+ data: result,
81
+ metadata: { refresh: false },
82
+ };
83
+ }
84
+ catch (error) {
85
+ const title = await this.translationService.translateAsync(RUN_USER_QUERY_I18N.errorTitle);
86
+ const message = await this.translateRunError(error);
87
+ this.toastService.show({
88
+ color: 'danger',
89
+ title,
90
+ content: message,
91
+ closeButton: true,
92
+ timeOut: 5000,
93
+ timeOutProgress: true,
94
+ });
95
+ return { success: false, message: { text: message } };
96
+ }
97
+ }
98
+ //#endregion
99
+ //#region ----- Helpers -----
100
+ showWarning(content, title) {
101
+ this.toastService.show({
102
+ color: 'warning',
103
+ title,
104
+ content,
105
+ closeButton: true,
106
+ timeOut: 5000,
107
+ timeOutProgress: true,
108
+ });
109
+ }
110
+ async translateRunError(error) {
111
+ const info = extractRequestErrorInfo(error);
112
+ const mapped = platformErrorI18nKey(info?.code);
113
+ if (mapped) {
114
+ return this.translationService.translateAsync(mapped);
115
+ }
116
+ return this.translationService.translateAsync(RUN_USER_QUERY_I18N.errorContent);
117
+ }
118
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRunUserQueryCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
119
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRunUserQueryCommand, providedIn: 'root' }); }
120
+ }
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRunUserQueryCommand, decorators: [{
122
+ type: Injectable,
123
+ args: [{ providedIn: 'root' }]
124
+ }] });
125
+ //#endregion
126
+ //#region ----- Helpers -----
127
+ function resolveRunQueryInput(input) {
128
+ const resolved = resolveEntityActionCommandInput(input);
129
+ const data = entityActionDataRecord(resolved.data) ?? {};
130
+ const options = (resolved.options ?? {});
131
+ const queryName = asNonEmptyString(options['queryName']) ?? asNonEmptyString(data['name']) ?? '';
132
+ const queryTitle = asNonEmptyString(options['queryTitle']) ?? asNonEmptyString(data['catalogTitle']) ?? queryName;
133
+ return { queryName, queryTitle };
134
+ }
135
+ function asNonEmptyString(value) {
136
+ if (typeof value !== 'string') {
137
+ return undefined;
138
+ }
139
+ const trimmed = value.trim();
140
+ return trimmed.length > 0 ? trimmed : undefined;
141
+ }
142
+
143
+ export { AXMRunUserQueryCommand };
144
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/query-definition/run-user-query.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { extractRequestErrorInfo, platformErrorI18nKey } from '@acorex-platform/framework-client/common';\nimport { AXPLayoutBuilderService, type IWidgetBuilder } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPQueryService } from '@acorex-platform/framework-client/runtime';\nimport {\n entityActionDataRecord,\n resolveEntityActionCommandInput,\n type AXPCommand,\n type AXPCommandExecuteResultPromise,\n type AXPEntityActionCommandInput,\n} from '@acorex-platform/framework-shared/runtime';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { Injectable, inject } from '@angular/core';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst RUN_USER_QUERY_I18N = {\n dialogTitle: '@platform-management:query-definitions.run.dialog.title',\n missingName: '@platform-management:query-definitions.run.messages.missing-name',\n failedTitle: '@platform-management:query-definitions.run.messages.failed.title',\n failedContent: '@platform-management:query-definitions.run.messages.failed.content',\n errorTitle: '@platform-management:query-definitions.run.messages.error.title',\n errorContent: '@platform-management:query-definitions.run.messages.error.content',\n} as const;\n\n//#endregion\n\n//#region ----- Command -----\n\n/**\n * Runs a QueryDefinition by name and shows the runtime envelope in a json-viewer dialog.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMRunUserQueryCommand implements AXPCommand<AXPEntityActionCommandInput> {\n //#region ----- Services & Dependencies -----\n\n private readonly queryService = inject(AXPQueryService);\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Execution -----\n\n async execute(input: AXPEntityActionCommandInput = {}): AXPCommandExecuteResultPromise {\n const { queryName, queryTitle } = resolveRunQueryInput(input);\n const displayName = queryTitle || queryName;\n\n if (!queryName) {\n const message = await this.translationService.translateAsync(RUN_USER_QUERY_I18N.missingName);\n this.showWarning(message);\n return { success: false, message: { text: message } };\n }\n\n try {\n const result = await this.queryService.fetch(queryName, {});\n if (result == null) {\n const title = await this.translationService.translateAsync(RUN_USER_QUERY_I18N.failedTitle);\n const content = await this.translationService.translateAsync(RUN_USER_QUERY_I18N.failedContent, {\n params: { name: displayName },\n });\n this.showWarning(content, title);\n return { success: false, message: { text: content } };\n }\n\n const dialogTitle = await this.translationService.translateAsync(RUN_USER_QUERY_I18N.dialogTitle, {\n params: { name: displayName },\n });\n\n await this.layoutBuilder\n .create()\n .dialog((dialog) => {\n dialog\n .setTitle(dialogTitle)\n .setSize('xl')\n .setCloseButton(true)\n .content((content) => {\n content.customWidget('json-viewer', (widget: IWidgetBuilder) => {\n widget.path('value');\n });\n })\n .setContext({\n value: result,\n })\n .setActions((actions) => {\n actions.cancel('@general:actions.close.title');\n });\n })\n .show();\n\n return {\n success: true,\n kind: 'object',\n data: result,\n metadata: { refresh: false },\n };\n } catch (error: unknown) {\n const title = await this.translationService.translateAsync(RUN_USER_QUERY_I18N.errorTitle);\n const message = await this.translateRunError(error);\n this.toastService.show({\n color: 'danger',\n title,\n content: message,\n closeButton: true,\n timeOut: 5000,\n timeOutProgress: true,\n });\n return { success: false, message: { text: message } };\n }\n }\n\n //#endregion\n\n //#region ----- Helpers -----\n\n private showWarning(content: string, title?: string): void {\n this.toastService.show({\n color: 'warning',\n title,\n content,\n closeButton: true,\n timeOut: 5000,\n timeOutProgress: true,\n });\n }\n\n private async translateRunError(error: unknown): Promise<string> {\n const info = extractRequestErrorInfo(error);\n const mapped = platformErrorI18nKey(info?.code);\n if (mapped) {\n return this.translationService.translateAsync(mapped);\n }\n\n return this.translationService.translateAsync(RUN_USER_QUERY_I18N.errorContent);\n }\n\n //#endregion\n}\n\n//#endregion\n\n//#region ----- Helpers -----\n\nfunction resolveRunQueryInput(input: AXPEntityActionCommandInput): { queryName: string; queryTitle: string } {\n const resolved = resolveEntityActionCommandInput(input);\n const data = entityActionDataRecord(resolved.data) ?? {};\n const options = (resolved.options ?? {}) as Record<string, unknown>;\n\n const queryName = asNonEmptyString(options['queryName']) ?? asNonEmptyString(data['name']) ?? '';\n const queryTitle =\n asNonEmptyString(options['queryTitle']) ?? asNonEmptyString(data['catalogTitle']) ?? queryName;\n\n return { queryName, queryTitle };\n}\n\nfunction asNonEmptyString(value: unknown): string | undefined {\n if (typeof value !== 'string') {\n return undefined;\n }\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n}\n\n//#endregion\n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M,GAAG,CAAC,GAAG,OAAO,GAAG,SAAS;AACjD;;"}
@@ -1,2 +1,2 @@
1
- export { b as AXMPlatformManagementModule, d as AXPWorkflowDesignerComponent, e as AXPWorkflowPaletteItemDragDirective, g as AXP_WORKFLOW_PALETTE_MIME, i as arrangeWorkflowDiagram, j as cloneDiagram, k as connectorPath, l as createNodeFromPaletteItem, m as createPortsFromPalette, o as createWorkflowConnectorId, q as createWorkflowNodeId, r as createWorkflowPortId, s as defaultCanConnectRequest, t as findConnector, u as findNode, v as findPort, w as parsePaletteItemDragPayload, x as portAnchorOnNode, y as portCanvasPosition, z as routeOrthogonalConnector, B as snapPoint, C as snapScalar } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-BGVhn6wv.mjs';
1
+ export { i as AXMPlatformManagementModule, j as AXPWorkflowDesignerComponent, k as AXPWorkflowPaletteItemDragDirective, l as AXP_WORKFLOW_PALETTE_MIME, m as arrangeWorkflowDiagram, o as cloneDiagram, q as connectorPath, r as connectorRoutePoints, s as createNodeFromPaletteItem, t as createPortsFromPalette, u as createWorkflowConnectorId, v as createWorkflowNodeId, w as createWorkflowPortId, x as defaultCanConnectRequest, y as findConnector, z as findNode, B as findPort, D as longestConnectorSegment, E as offsetPointOffSegment, F as parsePaletteItemDragPayload, G as portAnchorOnNode, H as portCanvasPosition, I as routeOrthogonalConnector, J as snapPoint, K as snapScalar } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-YuJijjKh.mjs';
2
2
  //# sourceMappingURL=acorex-platform-module-platform-management-client.mjs.map
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@acorex-platform/module-platform-management-client",
3
- "version": "0.0.38",
3
+ "version": "0.0.48",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@acorex-platform/module-dashboard-management-client": "0.0.38",
7
- "@acorex-platform/module-system-insight-client": "0.0.38",
6
+ "@acorex-platform/module-dashboard-management-client": "0.0.48",
7
+ "@acorex-platform/module-system-insight-client": "0.0.48",
8
8
  "@angular/common": "^21.0.0 || ^22.0.0",
9
9
  "@angular/core": "^21.0.0 || ^22.0.0",
10
10
  "@angular/service-worker": "^21.0.0 || ^22.0.0"
@@ -38,6 +38,10 @@
38
38
  "types": "./types/acorex-platform-module-platform-management-client-contracts-entities-entity-definition.d.ts",
39
39
  "default": "./fesm2022/acorex-platform-module-platform-management-client-contracts-entities-entity-definition.mjs"
40
40
  },
41
+ "./contracts/entities/module-definition": {
42
+ "types": "./types/acorex-platform-module-platform-management-client-contracts-entities-module-definition.d.ts",
43
+ "default": "./fesm2022/acorex-platform-module-platform-management-client-contracts-entities-module-definition.mjs"
44
+ },
41
45
  "./contracts/entities/plugin-definition": {
42
46
  "types": "./types/acorex-platform-module-platform-management-client-contracts-entities-plugin-definition.d.ts",
43
47
  "default": "./fesm2022/acorex-platform-module-platform-management-client-contracts-entities-plugin-definition.mjs"
@@ -0,0 +1,5 @@
1
+ import { AXPEntity } from '@acorex-platform/framework-shared/entity';
2
+
3
+ declare function moduleDefinitionEntityFactory(): Promise<AXPEntity | null>;
4
+
5
+ export { moduleDefinitionEntityFactory };
@@ -1,6 +1,6 @@
1
- import { AXPCategoryListItem } from '@acorex-platform/framework-shared/core';
2
- import { AXPEntityModel } from '@acorex-platform/framework-shared/entity';
3
- import { AXPCommandCapability, AXPPropertyDefinition, AXPQueryRegistryRecord, AXPPluginRegistryRecord, AXPWidgetRegistryRecord } from '@acorex-platform/framework-shared/domain';
1
+ import { AXPModuleManifest, AXPCategoryListItem, AXPModuleType, AXPFilterDefinition } from '@acorex-platform/framework-shared/core';
2
+ import { AXPEntityModel, AXPEntityAggregateMeasure, AXPEntity } from '@acorex-platform/framework-shared/entity';
3
+ import { AXPCommandCapability, AXPPropertyDefinition, AXPQueryRegistryRecord, AXPPluginRegistryRecord, AXPWidgetRegistryRecord, AXPEntityDefinition } from '@acorex-platform/framework-shared/domain';
4
4
 
5
5
  declare const AXPPlatformManagementFeatureKeys: {
6
6
  readonly MenuCustomization: "PlatformManagement:Feature:menu-customization";
@@ -15,6 +15,7 @@ declare const AXPPlatformManagementMenuKeys: {
15
15
  readonly Glossary: "platform-management:menu:glossary";
16
16
  readonly UserMenuManagement: "platform-management:user:menus";
17
17
  readonly MenuManagement: "platform-management:menus";
18
+ readonly ModuleDefinitions: "platform-management:menu:module-definitions";
18
19
  readonly EntityDefinitions: "platform-management:menu:entity-definitions";
19
20
  readonly CommandDefinitions: "platform-management:menu:command-definitions";
20
21
  readonly QueryDefinitions: "platform-management:menu:query-definitions";
@@ -84,6 +85,12 @@ declare const RootConfig: {
84
85
  readonly title: `@${string}:tokens.entities.token.title`;
85
86
  readonly icon: "fa-light fa-object-exclude";
86
87
  };
88
+ readonly moduleDefinition: {
89
+ readonly name: "ModuleDefinition";
90
+ readonly title: `@${string}:module-definitions.entities.module-definition.title`;
91
+ readonly titlePlural: `@${string}:module-definitions.entities.module-definition.title-plural`;
92
+ readonly icon: "fa-light fa-layer-group";
93
+ };
87
94
  readonly commandDefinition: {
88
95
  readonly name: "CommandDefinition";
89
96
  readonly title: `@${string}:command-definitions.entities.command-definition.title`;
@@ -150,6 +157,12 @@ declare const RootConfig: {
150
157
  };
151
158
  };
152
159
 
160
+ /**
161
+ * Platform Management Module Manifest.
162
+ * Defines module metadata, features, and provider references.
163
+ */
164
+ declare const PlatformManagementManifest: AXPModuleManifest;
165
+
153
166
  /** Public server command: reload in-memory entity schemas from domain definitions. */
154
167
  declare const AXM_RELOAD_RUNTIME_MEMORY_COMMAND_KEY = "PlatformManagement:ReloadRuntimeMemory";
155
168
  interface AXMReloadRuntimeMemoryResult {
@@ -247,6 +260,23 @@ interface AXMTokenResolveResult {
247
260
  dataType?: string;
248
261
  }
249
262
 
263
+ /**
264
+ * Row shape in `PlatformManagement.ModuleDefinition`.
265
+ * Seeded from each module/extension `contracts/src/manifest.ts`.
266
+ */
267
+ interface AXMModuleDefinitionEntityModel extends AXPEntityModel<string> {
268
+ name: string;
269
+ version: string;
270
+ title: string;
271
+ description?: string;
272
+ icon?: string;
273
+ i18n?: string;
274
+ dependencies?: string[];
275
+ required?: boolean;
276
+ type?: AXPModuleType;
277
+ domain?: string;
278
+ }
279
+
250
280
  interface AXMCommandDefinitionEntityModel extends AXPEntityModel<string> {
251
281
  name: string;
252
282
  active: boolean;
@@ -261,9 +291,41 @@ interface AXMCommandDefinitionEntityModel extends AXPEntityModel<string> {
261
291
  categories?: unknown[];
262
292
  }
263
293
 
294
+ type AXPUserQueryPersistedSourceKind = 'entity';
295
+ /** Slice of the query-builder value persisted on a user QueryDefinition. */
296
+ interface AXPUserQueryBuilderValue {
297
+ columns?: string[];
298
+ where?: AXPFilterDefinition;
299
+ sort?: Array<{
300
+ field: string;
301
+ dir: 'asc' | 'desc';
302
+ }>;
303
+ groupBy?: string[];
304
+ aggregates?: Array<{
305
+ function: string;
306
+ field?: string;
307
+ alias?: string;
308
+ distinct?: boolean;
309
+ }>;
310
+ outputType?: string;
311
+ }
312
+ interface AXPUserQueryEntitySourceSpec {
313
+ kind: AXPUserQueryPersistedSourceKind;
314
+ entityName: string;
315
+ fields: string[];
316
+ fieldGroups?: Record<string, string[]>;
317
+ /** Query-builder payload (where + aggregates). */
318
+ query?: AXPUserQueryBuilderValue;
319
+ /** Resolved scalar measure for `kind: 'value'`. */
320
+ measure?: AXPEntityAggregateMeasure;
321
+ }
322
+ type AXPUserQuerySourceSpec = AXPUserQueryEntitySourceSpec;
323
+
264
324
  interface AXMQueryDefinitionEntityModel extends AXPEntityModel<string>, Omit<AXPQueryRegistryRecord, 'name' | 'active'> {
265
325
  name: string;
266
326
  active: boolean;
327
+ /** User-authored source (entity + frozen predicates). Omitted on coded catalog rows. */
328
+ source?: AXPUserQuerySourceSpec;
267
329
  }
268
330
 
269
331
  interface AXMPluginDefinitionEntityModel extends AXPEntityModel<string>, Omit<AXPPluginRegistryRecord, 'name' | 'active'> {
@@ -287,6 +349,43 @@ interface AXMEntityDefinitionEntityModel extends AXPEntityModel<string> {
287
349
  content?: Record<string, unknown>;
288
350
  }
289
351
 
352
+ type AssembleEntityDefinitionResult = {
353
+ ok: true;
354
+ record: Record<string, unknown>;
355
+ } | {
356
+ ok: false;
357
+ message: string;
358
+ code: string;
359
+ };
360
+ declare const ENTITY_DEFINITION_CREATE_ERROR: {
361
+ readonly nameRequired: `@${string}:entity-definitions.messages.name-required`;
362
+ readonly moduleRequired: `@${string}:entity-definitions.messages.module-required`;
363
+ readonly nameInvalid: `@${string}:entity-definitions.messages.name-invalid`;
364
+ readonly nameDuplicate: `@${string}:entity-definitions.messages.name-duplicate`;
365
+ };
366
+ /**
367
+ * Turns a create/update-form payload into the EntityDefinition store shape
368
+ * `{ name: Module.Entity, content: AXPEntity }`.
369
+ */
370
+ declare function assembleEntityDefinitionStoreRecord(input: Record<string, unknown>, previous?: Record<string, unknown> | null): AssembleEntityDefinitionResult;
371
+ /**
372
+ * Maps stored `AXPEntity` content back onto the wizard form fields
373
+ * (repeaters, JSON editors, identity extras).
374
+ */
375
+ declare function flattenEntityContentToDesignerForm(content: Record<string, unknown> | null | undefined): Record<string, unknown>;
376
+ declare function flattenProperties(value: unknown): Record<string, unknown>[];
377
+
378
+ /** Schema step: plugins, groups, and properties. */
379
+ declare const ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY = "entity-definition-schema-page";
380
+ /** Surfaces step: columns, layouts, actions, related entities. */
381
+ declare const ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY = "entity-definition-surfaces-page";
382
+ declare const ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES: readonly ["plugins", "groups", "properties"];
383
+ declare const ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES: readonly ["columns", "relatedEntities", "createSections", "createProperties", "listActions", "singleActions", "pages", "rules", "validations", "commandsJson", "queriesJson"];
384
+ declare const ENTITY_DEFINITION_DESIGNER_FORM_KEYS: readonly ["title", "icon", "module", "parentKey", "searchTags", "formatIndividual", "formatPlural", "formatDisplayName", "formatSearchTitle", "formatSearchDescription", "categoryEntity", "categoryTextField", "categoryValueField", "plugins", "groups", "properties", "columns", "relatedEntities", "createSections", "createProperties", "listActions", "singleActions", "pages", "rules", "validations", "commandsJson", "queriesJson"];
385
+
386
+ declare function buildEntityDefinitionEntity(): AXPEntity;
387
+ declare function entityDefinitionEntityFactory(): Promise<AXPEntity | null>;
388
+
290
389
  /**
291
390
  * Platform-wide row governing read/write access expressions for an entity
292
391
  * (exact name or pattern such as `SystemInsight.*` / `*`).
@@ -301,5 +400,126 @@ interface AXMPlatformManagementEntityAccessPolicyEntityModel extends AXPEntityMo
301
400
  description?: string;
302
401
  }
303
402
 
304
- export { AXM_REINDEX_QUICK_SEARCH_CHECKPOINT_OVERLAP_HOURS, AXM_REINDEX_QUICK_SEARCH_COMMAND_KEY, AXM_REINDEX_QUICK_SEARCH_JOB_CAPABILITIES, AXM_REINDEX_QUICK_SEARCH_LOOKBACK_HOURS, AXM_REINDEX_QUICK_SEARCH_SCHEDULE_CRON, AXM_RELOAD_RUNTIME_MEMORY_COMMAND_KEY, AXM_TOKEN_RESOLVE_COMMAND_KEY, AXPApplicationsPlatformPermissionKeys, AXPPlatformManagementFeatureKeys, AXPPlatformManagementMenuKeys, AXPPlatformManagementPermissionKeys, RootConfig };
305
- export type { AXMCommandDefinitionEntityModel, AXMEntityDefinitionEntityModel, AXMPlatformManagementEntityAccessPolicyEntityModel, AXMPluginDefinitionEntityModel, AXMQueryDefinitionEntityModel, AXMReindexQuickSearchInput, AXMReindexQuickSearchResult, AXMReloadRuntimeMemoryResult, AXMTokenDataType, AXMTokenEntityModel, AXMTokenFormat, AXMTokenKind, AXMTokenResolveRequest, AXMTokenResolveResult, AXMWidgetEntityModel };
403
+ declare const AXMPlatformExplorerQueryKeys: {
404
+ readonly ListModules: "PlatformManagement:Explorer:ListModules";
405
+ readonly GetModule: "PlatformManagement:Explorer:GetModule";
406
+ readonly GetEntity: "PlatformManagement:Explorer:GetEntity";
407
+ readonly GetCatalogItem: "PlatformManagement:Explorer:GetCatalogItem";
408
+ };
409
+ type AXMPlatformExplorerCatalogKind = 'command' | 'query' | 'plugin' | 'widget';
410
+
411
+ interface AXMPlatformExplorerListModulesInput {
412
+ search?: string;
413
+ }
414
+ interface AXMPlatformExplorerGetModuleInput {
415
+ module: string;
416
+ }
417
+ interface AXMPlatformExplorerGetEntityInput {
418
+ module: string;
419
+ entity: string;
420
+ }
421
+ interface AXMPlatformExplorerGetCatalogItemInput {
422
+ kind: AXMPlatformExplorerCatalogKind;
423
+ name: string;
424
+ }
425
+ interface AXMPlatformExplorerModuleSummary {
426
+ name: string;
427
+ entityCount: number;
428
+ commandCount: number;
429
+ queryCount: number;
430
+ pluginCount: number;
431
+ widgetCount: number;
432
+ /** Non-empty category folders under this module (tree childrenCount). */
433
+ categoryCount: number;
434
+ }
435
+ interface AXMPlatformExplorerEntitySummary {
436
+ module: string;
437
+ name: string;
438
+ fullName: string;
439
+ title?: string;
440
+ icon?: string;
441
+ pluginNames: string[];
442
+ }
443
+ /** Lookup field vs `relatedEntities` layout on the host entity. */
444
+ type AXMPlatformExplorerRelationKind = 'lookup' | 'related';
445
+ interface AXMPlatformExplorerEntityGraphProperty {
446
+ name: string;
447
+ kind?: 'pk';
448
+ }
449
+ interface AXMPlatformExplorerEntityGraphNode {
450
+ fullName: string;
451
+ module: string;
452
+ name: string;
453
+ title?: string;
454
+ icon?: string;
455
+ /** True when the node lives in another module than the catalog being viewed. */
456
+ external: boolean;
457
+ /** Non-lookup properties. Lookup/FK fields stay on connectors, not on the card. */
458
+ properties?: AXMPlatformExplorerEntityGraphProperty[];
459
+ }
460
+ interface AXMPlatformExplorerEntityGraphEdge {
461
+ from: string;
462
+ to: string;
463
+ kind: AXMPlatformExplorerRelationKind;
464
+ /** Property name (lookup) or related-entity title/name. */
465
+ label?: string;
466
+ }
467
+ interface AXMPlatformExplorerEntityGraph {
468
+ nodes: AXMPlatformExplorerEntityGraphNode[];
469
+ edges: AXMPlatformExplorerEntityGraphEdge[];
470
+ }
471
+ interface AXMPlatformExplorerNamedItem {
472
+ name: string;
473
+ title?: string;
474
+ description?: string;
475
+ icon?: string;
476
+ module?: string;
477
+ executionMode?: string;
478
+ type?: string;
479
+ }
480
+ interface AXMPlatformExplorerModuleCatalog {
481
+ name: string;
482
+ entities: AXMPlatformExplorerEntitySummary[];
483
+ commands: AXMPlatformExplorerNamedItem[];
484
+ queries: AXMPlatformExplorerNamedItem[];
485
+ plugins: AXMPlatformExplorerNamedItem[];
486
+ widgets: AXMPlatformExplorerNamedItem[];
487
+ /** Entity relationship diagram for the module Entities folder. */
488
+ entityGraph: AXMPlatformExplorerEntityGraph;
489
+ }
490
+ interface AXMPlatformExplorerResolvedPlugin {
491
+ name: string;
492
+ title?: string;
493
+ description?: string;
494
+ sourceModule?: string;
495
+ order?: number;
496
+ options?: unknown;
497
+ optionDefinitions?: unknown;
498
+ contributionsJson?: string;
499
+ }
500
+ interface AXMPlatformExplorerEntityDetail {
501
+ summary: AXMPlatformExplorerEntitySummary;
502
+ /** Full serializable {@link AXPEntity} stored as EntityDefinition.content. */
503
+ layout: AXPEntity;
504
+ /** Domain-normalized definition (fields + plugins) from the layout. */
505
+ normalized: AXPEntityDefinition | null;
506
+ plugins: AXMPlatformExplorerResolvedPlugin[];
507
+ /**
508
+ * Widget catalog name → bound-value {@link AXMWidgetEntityModel.dataType}
509
+ * (`defineWidget({ dataType })`). Entity `schema.dataType` is often omitted.
510
+ */
511
+ widgetDataTypes: Record<string, string>;
512
+ }
513
+ interface AXMPlatformExplorerCatalogItem {
514
+ kind: AXMPlatformExplorerCatalogKind;
515
+ command?: AXMCommandDefinitionEntityModel;
516
+ query?: AXMQueryDefinitionEntityModel;
517
+ plugin?: AXMPluginDefinitionEntityModel;
518
+ widget?: AXMWidgetEntityModel;
519
+ }
520
+ interface AXMPlatformExplorerModuleListResult {
521
+ items: AXMPlatformExplorerModuleSummary[];
522
+ }
523
+
524
+ export { AXMPlatformExplorerQueryKeys, AXM_REINDEX_QUICK_SEARCH_CHECKPOINT_OVERLAP_HOURS, AXM_REINDEX_QUICK_SEARCH_COMMAND_KEY, AXM_REINDEX_QUICK_SEARCH_JOB_CAPABILITIES, AXM_REINDEX_QUICK_SEARCH_LOOKBACK_HOURS, AXM_REINDEX_QUICK_SEARCH_SCHEDULE_CRON, AXM_RELOAD_RUNTIME_MEMORY_COMMAND_KEY, AXM_TOKEN_RESOLVE_COMMAND_KEY, AXPApplicationsPlatformPermissionKeys, AXPPlatformManagementFeatureKeys, AXPPlatformManagementMenuKeys, AXPPlatformManagementPermissionKeys, ENTITY_DEFINITION_CREATE_ERROR, ENTITY_DEFINITION_DESIGNER_FORM_KEYS, ENTITY_DEFINITION_SCHEMA_PAGE_COMPONENT_KEY, ENTITY_DEFINITION_SCHEMA_PROPERTY_NAMES, ENTITY_DEFINITION_SURFACES_PAGE_COMPONENT_KEY, ENTITY_DEFINITION_SURFACES_PROPERTY_NAMES, PlatformManagementManifest, RootConfig, assembleEntityDefinitionStoreRecord, buildEntityDefinitionEntity, entityDefinitionEntityFactory, flattenEntityContentToDesignerForm, flattenProperties };
525
+ export type { AXMCommandDefinitionEntityModel, AXMEntityDefinitionEntityModel, AXMModuleDefinitionEntityModel, AXMPlatformExplorerCatalogItem, AXMPlatformExplorerCatalogKind, AXMPlatformExplorerEntityDetail, AXMPlatformExplorerEntityGraph, AXMPlatformExplorerEntityGraphEdge, AXMPlatformExplorerEntityGraphNode, AXMPlatformExplorerEntityGraphProperty, AXMPlatformExplorerEntitySummary, AXMPlatformExplorerGetCatalogItemInput, AXMPlatformExplorerGetEntityInput, AXMPlatformExplorerGetModuleInput, AXMPlatformExplorerListModulesInput, AXMPlatformExplorerModuleCatalog, AXMPlatformExplorerModuleListResult, AXMPlatformExplorerModuleSummary, AXMPlatformExplorerNamedItem, AXMPlatformExplorerRelationKind, AXMPlatformExplorerResolvedPlugin, AXMPlatformManagementEntityAccessPolicyEntityModel, AXMPluginDefinitionEntityModel, AXMQueryDefinitionEntityModel, AXMReindexQuickSearchInput, AXMReindexQuickSearchResult, AXMReloadRuntimeMemoryResult, AXMTokenDataType, AXMTokenEntityModel, AXMTokenFormat, AXMTokenKind, AXMTokenResolveRequest, AXMTokenResolveResult, AXMWidgetEntityModel, AXPUserQueryBuilderValue, AXPUserQueryEntitySourceSpec, AXPUserQuerySourceSpec, AssembleEntityDefinitionResult };