@acorex-platform/module-platform-management-client 2.0.0-next.6 → 2.0.0-next.62

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 (71) hide show
  1. package/fesm2022/{acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CkONcG6P.mjs → acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.mjs} +50 -50
  2. package/fesm2022/{acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CkONcG6P.mjs.map → acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.mjs.map} +1 -1
  3. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-HWczTPH2.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-CbzyYYWN.mjs} +9 -9
  4. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-HWczTPH2.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-acorex-platform-module-platform-management-client-contracts-entity-catalog-CbzyYYWN.mjs.map} +1 -1
  5. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-C3B1_QMs.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-DwENR7lZ.mjs} +2 -2
  6. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-C3B1_QMs.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-command-definition.entity-DwENR7lZ.mjs.map} +1 -1
  7. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-BPkJloHy.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-CXqUxond.mjs} +2 -2
  8. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-BPkJloHy.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-access-policy.entity-CXqUxond.mjs.map} +1 -1
  9. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-NWCJQrKZ.mjs} +2 -2
  10. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-BL1I9pmK.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-entity-definition.entity-NWCJQrKZ.mjs.map} +1 -1
  11. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-CPv52ji_.mjs} +2 -2
  12. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-Cknl0vbc.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-module-definition.entity-CPv52ji_.mjs.map} +1 -1
  13. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-BxABTl8L.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-C0RT988C.mjs} +2 -2
  14. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-BxABTl8L.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-plugin-definition.entity-C0RT988C.mjs.map} +1 -1
  15. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-Cv6HVQOU.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-DOIP7h0R.mjs} +2 -2
  16. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-Cv6HVQOU.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-query-definition.entity-DOIP7h0R.mjs.map} +1 -1
  17. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-BV8iSuoK.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-CgEWIzYU.mjs} +2 -2
  18. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-BV8iSuoK.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-token.entity-CgEWIzYU.mjs.map} +1 -1
  19. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-BYH6SIqU.mjs → acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-CYeauxBL.mjs} +2 -2
  20. package/fesm2022/{acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-BYH6SIqU.mjs.map → acorex-platform-module-platform-management-client-contracts-entity-catalog-widget.entity-CYeauxBL.mjs.map} +1 -1
  21. package/fesm2022/acorex-platform-module-platform-management-client-contracts-entity-catalog.mjs +1 -1
  22. package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs → acorex-platform-module-platform-management-client-create-user-query-contract.util-DYslIuJb.mjs} +1 -1
  23. package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs.map → acorex-platform-module-platform-management-client-create-user-query-contract.util-DYslIuJb.mjs.map} +1 -1
  24. package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query.command-xMXsN4te.mjs → acorex-platform-module-platform-management-client-create-user-query.command-BgG5SEjW.mjs} +3 -3
  25. package/fesm2022/{acorex-platform-module-platform-management-client-create-user-query.command-xMXsN4te.mjs.map → acorex-platform-module-platform-management-client-create-user-query.command-BgG5SEjW.mjs.map} +1 -1
  26. package/fesm2022/{acorex-platform-module-platform-management-client-customize-menu.command-B_Ld4IRz.mjs → acorex-platform-module-platform-management-client-customize-menu.command-DLLZuS10.mjs} +1 -1
  27. package/fesm2022/{acorex-platform-module-platform-management-client-customize-menu.command-B_Ld4IRz.mjs.map → acorex-platform-module-platform-management-client-customize-menu.command-DLLZuS10.mjs.map} +1 -1
  28. package/fesm2022/{acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs → acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-BSYxNi74.mjs} +1 -1
  29. package/fesm2022/{acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-CJVpqPmY.mjs.map → acorex-platform-module-platform-management-client-data-list-pick-entity-item.command-BSYxNi74.mjs.map} +1 -1
  30. package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.component-BgBWob9p.mjs → acorex-platform-module-platform-management-client-entity-definition-form-page.component-D3eE4jLj.mjs} +2 -2
  31. package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.component-BgBWob9p.mjs.map → acorex-platform-module-platform-management-client-entity-definition-form-page.component-D3eE4jLj.mjs.map} +1 -1
  32. package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.provider-hLzgoJu3.mjs → acorex-platform-module-platform-management-client-entity-definition-form-page.provider-DO3W-Hx1.mjs} +2 -2
  33. package/fesm2022/{acorex-platform-module-platform-management-client-entity-definition-form-page.provider-hLzgoJu3.mjs.map → acorex-platform-module-platform-management-client-entity-definition-form-page.provider-DO3W-Hx1.mjs.map} +1 -1
  34. package/fesm2022/{acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs → acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-CZBJ4dXs.mjs} +1 -1
  35. package/fesm2022/{acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-DmGyoy9o.mjs.map → acorex-platform-module-platform-management-client-entity-master-actions-for-ai.util-CZBJ4dXs.mjs.map} +1 -1
  36. package/fesm2022/{acorex-platform-module-platform-management-client-execute-token.command-B_xwW9lb.mjs → acorex-platform-module-platform-management-client-execute-token.command-D-6zPkdc.mjs} +1 -1
  37. package/fesm2022/{acorex-platform-module-platform-management-client-execute-token.command-B_xwW9lb.mjs.map → acorex-platform-module-platform-management-client-execute-token.command-D-6zPkdc.mjs.map} +1 -1
  38. package/fesm2022/{acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs → acorex-platform-module-platform-management-client-list-catalog-scopes.query-BXoGbG82.mjs} +1 -1
  39. package/fesm2022/{acorex-platform-module-platform-management-client-list-catalog-scopes.query-ByhDTWE6.mjs.map → acorex-platform-module-platform-management-client-list-catalog-scopes.query-BXoGbG82.mjs.map} +1 -1
  40. package/fesm2022/{acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs → acorex-platform-module-platform-management-client-list-editor-widgets.query-Bmzf4dYS.mjs} +1 -1
  41. package/fesm2022/{acorex-platform-module-platform-management-client-list-editor-widgets.query-DITPMmbw.mjs.map → acorex-platform-module-platform-management-client-list-editor-widgets.query-Bmzf4dYS.mjs.map} +1 -1
  42. package/fesm2022/{acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs → acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-7_-GTKQw.mjs} +2 -2
  43. package/fesm2022/{acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-2oHMITw-.mjs.map → acorex-platform-module-platform-management-client-list-platform-navigation-for-ai.query-7_-GTKQw.mjs.map} +1 -1
  44. package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs → acorex-platform-module-platform-management-client-list-registered-entities.query-01gokkyo.mjs} +2 -2
  45. package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-entities.query-CZM6JQou.mjs.map → acorex-platform-module-platform-management-client-list-registered-entities.query-01gokkyo.mjs.map} +1 -1
  46. package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-queries.query-C-IfkTel.mjs → acorex-platform-module-platform-management-client-list-registered-queries.query-CqpTep6_.mjs} +1 -1
  47. package/fesm2022/{acorex-platform-module-platform-management-client-list-registered-queries.query-C-IfkTel.mjs.map → acorex-platform-module-platform-management-client-list-registered-queries.query-CqpTep6_.mjs.map} +1 -1
  48. package/fesm2022/{acorex-platform-module-platform-management-client-menu-list.component-Cv8OxxDU.mjs → acorex-platform-module-platform-management-client-menu-list.component-CZf5cHCK.mjs} +4 -4
  49. package/fesm2022/{acorex-platform-module-platform-management-client-menu-list.component-Cv8OxxDU.mjs.map → acorex-platform-module-platform-management-client-menu-list.component-CZf5cHCK.mjs.map} +1 -1
  50. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs → acorex-platform-module-platform-management-client-platform-console-charts.queries-CXoMSE_r.mjs} +2 -2
  51. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-charts.queries-CQ34R13-.mjs.map → acorex-platform-module-platform-management-client-platform-console-charts.queries-CXoMSE_r.mjs.map} +1 -1
  52. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs → acorex-platform-module-platform-management-client-platform-console-data.util-Zh8mHsDg.mjs} +1 -1
  53. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-data.util-BIkULtKk.mjs.map → acorex-platform-module-platform-management-client-platform-console-data.util-Zh8mHsDg.mjs.map} +1 -1
  54. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs → acorex-platform-module-platform-management-client-platform-console-kpi.queries-BfjJfn8V.mjs} +2 -2
  55. package/fesm2022/{acorex-platform-module-platform-management-client-platform-console-kpi.queries-BkPdhVq_.mjs.map → acorex-platform-module-platform-management-client-platform-console-kpi.queries-BfjJfn8V.mjs.map} +1 -1
  56. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs → acorex-platform-module-platform-management-client-query-contract-widget-column.component-2W2BHT3F.mjs} +2 -2
  57. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-column.component-COfOzMGh.mjs.map → acorex-platform-module-platform-management-client-query-contract-widget-column.component-2W2BHT3F.mjs.map} +1 -1
  58. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-edit.component-z_kLoO-q.mjs → acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BEluyLyx.mjs} +5 -5
  59. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-edit.component-z_kLoO-q.mjs.map → acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BEluyLyx.mjs.map} +1 -1
  60. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs → acorex-platform-module-platform-management-client-query-contract-widget-view.component-DkLf08HM.mjs} +2 -2
  61. package/fesm2022/{acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs.map → acorex-platform-module-platform-management-client-query-contract-widget-view.component-DkLf08HM.mjs.map} +1 -1
  62. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DQ4xX4Dy.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-Ctb-F0qE.mjs} +2 -2
  63. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DQ4xX4Dy.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-Ctb-F0qE.mjs.map} +1 -1
  64. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BcppwcSu.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-DMivRLvp.mjs} +4 -4
  65. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BcppwcSu.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-DMivRLvp.mjs.map} +1 -1
  66. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-D-m1uo8s.mjs → acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-DAEUuDBa.mjs} +2 -2
  67. package/fesm2022/{acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-D-m1uo8s.mjs.map → acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-DAEUuDBa.mjs.map} +1 -1
  68. package/fesm2022/{acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs → acorex-platform-module-platform-management-client-run-user-query.command-CmO6zxh8.mjs} +1 -1
  69. package/fesm2022/{acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs.map → acorex-platform-module-platform-management-client-run-user-query.command-CmO6zxh8.mjs.map} +1 -1
  70. package/fesm2022/acorex-platform-module-platform-management-client.mjs +1 -1
  71. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-query-contract-widget-edit.component-z_kLoO-q.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-edit.component.ts","../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-edit.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXDataSource } from '@acorex/cdk/common';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLookupComponent } from '@acorex/components/lookup';\nimport { AXSwitchModule } from '@acorex/components/switch';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, effect, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { isEqual } from 'lodash-es';\n\nimport {\n createDefaultContractCapabilities,\n DEFAULT_USER_QUERY_PAGING,\n isCollectionQueryKind,\n pathsFromFilterSection,\n pathsFromSortSection,\n reconcileContractCapabilities,\n resolveAvailableContractFields,\n selectedFieldPathsFromGroups,\n toFilterSection,\n toSortSection,\n} from '../query-definition/create-user-query-contract.util';\nimport {\n CREATE_USER_QUERY_I18N as i18n,\n type AXPUserQueryContractCapabilities,\n type AXPUserQueryEntityFieldItem,\n} from '../query-definition/create-user-query.types';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface AXPQueryContractFieldOption {\n value: string;\n text: string;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-query-contract-widget-edit',\n templateUrl: './query-contract-widget-edit.component.html',\n styleUrl: './query-contract-widget-edit.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'block w-full',\n },\n imports: [CommonModule, FormsModule, AXLabelModule, AXLookupComponent, AXSwitchModule, AXTranslationModule],\n})\nexport class AXMQueryContractWidgetEditComponent extends AXPValueWidgetComponent<AXPUserQueryContractCapabilities> {\n //#region ----- Constants -----\n\n protected readonly fieldsI18n = i18n.fields;\n protected readonly placeholdersI18n = i18n.placeholders;\n\n //#endregion\n\n //#region ----- State Signals -----\n\n private readonly lastAvailablePaths = signal<string[]>([]);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly catalogFields = computed<AXPUserQueryEntityFieldItem[]>(() => {\n const raw = this.options()['fields'];\n return Array.isArray(raw) ? (raw as AXPUserQueryEntityFieldItem[]) : [];\n });\n\n protected readonly availableFields = computed<AXPUserQueryEntityFieldItem[]>(() => {\n this.contextService.data();\n const fieldGroups = this.contextService.getValue('source.entity.fieldGroups') as\n | Record<string, string[]>\n | undefined;\n return resolveAvailableContractFields(this.catalogFields(), selectedFieldPathsFromGroups(fieldGroups));\n });\n\n protected readonly fieldDataSource = computed(\n () => this.createFieldDataSource(this.availableFields()),\n { equal: isEqual },\n );\n\n protected readonly filterPaths = computed(() => pathsFromFilterSection(this.getValue()?.filter));\n protected readonly sortPaths = computed(() => pathsFromSortSection(this.getValue()?.sort));\n protected readonly pagingEnabled = computed(() => this.getValue()?.paging?.enabled === true);\n protected readonly valueField = computed(() => this.getValue()?.binding?.valueField ?? '');\n protected readonly textField = computed(() => this.getValue()?.binding?.textField ?? '');\n protected readonly isCollection = computed(() => {\n this.contextService.data();\n return isCollectionQueryKind(this.contextService.getValue('contract.kind'));\n });\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const available = this.availableFields();\n const paths = available.map((field) => field.path);\n const boundPath = this.fullPath();\n untracked(() => {\n if (!boundPath) {\n return;\n }\n const current = this.getValue() ?? undefined;\n const previous = this.lastAvailablePaths();\n const next = reconcileContractCapabilities(current, available, previous);\n this.lastAvailablePaths.set(paths);\n if (!current) {\n this.setValue(next);\n return;\n }\n if (!isEqual(current, next)) {\n this.setValue(next);\n }\n });\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onFilterPathsChange(paths: string[] | null | undefined): void {\n this.patchCapabilities({ filter: toFilterSection(this.fieldsByPaths(paths ?? [])) });\n }\n\n protected onSortPathsChange(paths: string[] | null | undefined): void {\n this.patchCapabilities({ sort: toSortSection(this.fieldsByPaths(paths ?? [])) });\n }\n\n protected onPagingChange(enabled: boolean): void {\n const current = this.currentCapabilities();\n this.patchCapabilities({\n paging: enabled\n ? {\n enabled: true,\n definition: {\n ...DEFAULT_USER_QUERY_PAGING.definition,\n ...(current.paging.enabled ? current.paging.definition : {}),\n },\n }\n : { enabled: false },\n });\n }\n\n protected onValueFieldChange(valueField: string | null | undefined): void {\n const current = this.currentCapabilities();\n const next = String(valueField ?? '').trim() || current.binding.valueField;\n this.patchCapabilities({\n binding: { ...current.binding, valueField: next },\n });\n }\n\n protected onTextFieldChange(textField: string | null | undefined): void {\n const current = this.currentCapabilities();\n const next = String(textField ?? '').trim() || current.binding.textField;\n this.patchCapabilities({\n binding: { ...current.binding, textField: next },\n });\n }\n\n //#endregion\n\n //#region ----- Private helpers -----\n\n private currentCapabilities(): AXPUserQueryContractCapabilities {\n return this.getValue() ?? createDefaultContractCapabilities(this.availableFields());\n }\n\n private patchCapabilities(patch: Partial<AXPUserQueryContractCapabilities>): void {\n this.setValue({\n ...this.currentCapabilities(),\n ...patch,\n });\n }\n\n private fieldsByPaths(paths: string[]): AXPUserQueryEntityFieldItem[] {\n const byPath = new Map(this.availableFields().map((field) => [field.path, field]));\n return paths\n .map((path) => String(path ?? '').trim())\n .filter((path) => path.length > 0)\n .map((path) => byPath.get(path) ?? { path, text: path });\n }\n\n private createFieldDataSource(fields: AXPUserQueryEntityFieldItem[]): AXDataSource<AXPQueryContractFieldOption> {\n const items: AXPQueryContractFieldOption[] = fields.map((field) => ({\n value: field.path,\n text: field.text || field.path,\n }));\n\n return new AXDataSource<AXPQueryContractFieldOption>({\n load: () => Promise.resolve({ items, total: items.length }),\n byKey: (key: unknown) => {\n const value = String(key ?? '');\n return items.find((row) => row.value === value) ?? { value, text: value };\n },\n pageSize: 1000,\n key: 'value',\n });\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- Filterable fields callers may send (all kinds) ----- -->\n<div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.filterableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.filterableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"filterPaths()\"\n (ngModelChange)=\"onFilterPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.filterableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n</div>\n\n@if (isCollection()) {\n <!-- ----- Collection sort, paging, and lookup binding ----- -->\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.sortableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.sortableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"sortPaths()\"\n (ngModelChange)=\"onSortPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.sortableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n\n <!-- ----- Paging skip/take contract ----- -->\n <div class=\"axm-query-contract-widget__section axm-query-contract-widget__section--row\">\n <div class=\"axm-query-contract-widget__paging-copy\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.paging | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.paging | translate | async }}\n </p>\n </div>\n <ax-switch\n class=\"ax-sm\"\n [ngModel]=\"pagingEnabled()\"\n (ngModelChange)=\"onPagingChange($event)\"\n ></ax-switch>\n </div>\n\n <!-- ----- Lookup binding value and text fields ----- -->\n <div class=\"axm-query-contract-widget__binding\">\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.valueField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"valueField()\"\n (ngModelChange)=\"onValueFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.textField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"textField()\"\n (ngModelChange)=\"onTextFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n </div>\n}\n"],"names":["i18n","i4"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAwCA;AAEA;AAYM,MAAO,mCAAoC,SAAQ,uBAAyD,CAAA;;;AAgDhH,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AA9CU,QAAA,IAAA,CAAA,UAAU,GAAGA,sBAAI,CAAC,MAAM;AACxB,QAAA,IAAA,CAAA,gBAAgB,GAAGA,sBAAI,CAAC,YAAY;;;QAMtC,IAAA,CAAA,kBAAkB,GAAG,MAAM,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AAA,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;;2FAE/F,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAV/C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gCAAgC,EAAA,eAAA,EAGzB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,cAAc;AACtB,qBAAA,EAAA,OAAA,EACQ,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAAA,QAAA,EAAA,wyGAAA,EAAA,MAAA,EAAA,CAAA,opDAAA,CAAA,EAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-query-contract-widget-edit.component-BEluyLyx.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-edit.component.ts","../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-edit.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXDataSource } from '@acorex/cdk/common';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXLookupComponent } from '@acorex/components/lookup';\nimport { AXSwitchModule } from '@acorex/components/switch';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, effect, signal, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { isEqual } from 'lodash-es';\n\nimport {\n createDefaultContractCapabilities,\n DEFAULT_USER_QUERY_PAGING,\n isCollectionQueryKind,\n pathsFromFilterSection,\n pathsFromSortSection,\n reconcileContractCapabilities,\n resolveAvailableContractFields,\n selectedFieldPathsFromGroups,\n toFilterSection,\n toSortSection,\n} from '../query-definition/create-user-query-contract.util';\nimport {\n CREATE_USER_QUERY_I18N as i18n,\n type AXPUserQueryContractCapabilities,\n type AXPUserQueryEntityFieldItem,\n} from '../query-definition/create-user-query.types';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface AXPQueryContractFieldOption {\n value: string;\n text: string;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-query-contract-widget-edit',\n templateUrl: './query-contract-widget-edit.component.html',\n styleUrl: './query-contract-widget-edit.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'block w-full',\n },\n imports: [CommonModule, FormsModule, AXLabelModule, AXLookupComponent, AXSwitchModule, AXTranslationModule],\n})\nexport class AXMQueryContractWidgetEditComponent extends AXPValueWidgetComponent<AXPUserQueryContractCapabilities> {\n //#region ----- Constants -----\n\n protected readonly fieldsI18n = i18n.fields;\n protected readonly placeholdersI18n = i18n.placeholders;\n\n //#endregion\n\n //#region ----- State Signals -----\n\n private readonly lastAvailablePaths = signal<string[]>([]);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly catalogFields = computed<AXPUserQueryEntityFieldItem[]>(() => {\n const raw = this.options()['fields'];\n return Array.isArray(raw) ? (raw as AXPUserQueryEntityFieldItem[]) : [];\n });\n\n protected readonly availableFields = computed<AXPUserQueryEntityFieldItem[]>(() => {\n this.contextService.data();\n const fieldGroups = this.contextService.getValue('source.entity.fieldGroups') as\n | Record<string, string[]>\n | undefined;\n return resolveAvailableContractFields(this.catalogFields(), selectedFieldPathsFromGroups(fieldGroups));\n });\n\n protected readonly fieldDataSource = computed(\n () => this.createFieldDataSource(this.availableFields()),\n { equal: isEqual },\n );\n\n protected readonly filterPaths = computed(() => pathsFromFilterSection(this.getValue()?.filter));\n protected readonly sortPaths = computed(() => pathsFromSortSection(this.getValue()?.sort));\n protected readonly pagingEnabled = computed(() => this.getValue()?.paging?.enabled === true);\n protected readonly valueField = computed(() => this.getValue()?.binding?.valueField ?? '');\n protected readonly textField = computed(() => this.getValue()?.binding?.textField ?? '');\n protected readonly isCollection = computed(() => {\n this.contextService.data();\n return isCollectionQueryKind(this.contextService.getValue('contract.kind'));\n });\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const available = this.availableFields();\n const paths = available.map((field) => field.path);\n const boundPath = this.fullPath();\n untracked(() => {\n if (!boundPath) {\n return;\n }\n const current = this.getValue() ?? undefined;\n const previous = this.lastAvailablePaths();\n const next = reconcileContractCapabilities(current, available, previous);\n this.lastAvailablePaths.set(paths);\n if (!current) {\n this.setValue(next);\n return;\n }\n if (!isEqual(current, next)) {\n this.setValue(next);\n }\n });\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onFilterPathsChange(paths: string[] | null | undefined): void {\n this.patchCapabilities({ filter: toFilterSection(this.fieldsByPaths(paths ?? [])) });\n }\n\n protected onSortPathsChange(paths: string[] | null | undefined): void {\n this.patchCapabilities({ sort: toSortSection(this.fieldsByPaths(paths ?? [])) });\n }\n\n protected onPagingChange(enabled: boolean): void {\n const current = this.currentCapabilities();\n this.patchCapabilities({\n paging: enabled\n ? {\n enabled: true,\n definition: {\n ...DEFAULT_USER_QUERY_PAGING.definition,\n ...(current.paging.enabled ? current.paging.definition : {}),\n },\n }\n : { enabled: false },\n });\n }\n\n protected onValueFieldChange(valueField: string | null | undefined): void {\n const current = this.currentCapabilities();\n const next = String(valueField ?? '').trim() || current.binding.valueField;\n this.patchCapabilities({\n binding: { ...current.binding, valueField: next },\n });\n }\n\n protected onTextFieldChange(textField: string | null | undefined): void {\n const current = this.currentCapabilities();\n const next = String(textField ?? '').trim() || current.binding.textField;\n this.patchCapabilities({\n binding: { ...current.binding, textField: next },\n });\n }\n\n //#endregion\n\n //#region ----- Private helpers -----\n\n private currentCapabilities(): AXPUserQueryContractCapabilities {\n return this.getValue() ?? createDefaultContractCapabilities(this.availableFields());\n }\n\n private patchCapabilities(patch: Partial<AXPUserQueryContractCapabilities>): void {\n this.setValue({\n ...this.currentCapabilities(),\n ...patch,\n });\n }\n\n private fieldsByPaths(paths: string[]): AXPUserQueryEntityFieldItem[] {\n const byPath = new Map(this.availableFields().map((field) => [field.path, field]));\n return paths\n .map((path) => String(path ?? '').trim())\n .filter((path) => path.length > 0)\n .map((path) => byPath.get(path) ?? { path, text: path });\n }\n\n private createFieldDataSource(fields: AXPUserQueryEntityFieldItem[]): AXDataSource<AXPQueryContractFieldOption> {\n const items: AXPQueryContractFieldOption[] = fields.map((field) => ({\n value: field.path,\n text: field.text || field.path,\n }));\n\n return new AXDataSource<AXPQueryContractFieldOption>({\n load: () => Promise.resolve({ items, total: items.length }),\n byKey: (key: unknown) => {\n const value = String(key ?? '');\n return items.find((row) => row.value === value) ?? { value, text: value };\n },\n pageSize: 1000,\n key: 'value',\n });\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- Filterable fields callers may send (all kinds) ----- -->\n<div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.filterableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.filterableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"filterPaths()\"\n (ngModelChange)=\"onFilterPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.filterableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n</div>\n\n@if (isCollection()) {\n <!-- ----- Collection sort, paging, and lookup binding ----- -->\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.sortableFields | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.sortableFields | translate | async }}\n </p>\n <ax-lookup\n mode=\"multi-select\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"sortPaths()\"\n (ngModelChange)=\"onSortPathsChange($event)\"\n [searchable]=\"true\"\n [placeholder]=\"(placeholdersI18n.sortableFields | translate | async) ?? ''\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n\n <!-- ----- Paging skip/take contract ----- -->\n <div class=\"axm-query-contract-widget__section axm-query-contract-widget__section--row\">\n <div class=\"axm-query-contract-widget__paging-copy\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.paging | translate | async }}\n </ax-label>\n <p class=\"axm-query-contract-widget__hint\">\n {{ placeholdersI18n.paging | translate | async }}\n </p>\n </div>\n <ax-switch\n class=\"ax-sm\"\n [ngModel]=\"pagingEnabled()\"\n (ngModelChange)=\"onPagingChange($event)\"\n ></ax-switch>\n </div>\n\n <!-- ----- Lookup binding value and text fields ----- -->\n <div class=\"axm-query-contract-widget__binding\">\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.valueField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"valueField()\"\n (ngModelChange)=\"onValueFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n <div class=\"axm-query-contract-widget__section\">\n <ax-label class=\"axm-query-contract-widget__title\">\n {{ fieldsI18n.textField | translate | async }}\n </ax-label>\n <ax-lookup\n mode=\"drop-down-list\"\n [dataSource]=\"fieldDataSource()\"\n [ngModel]=\"textField()\"\n (ngModelChange)=\"onTextFieldChange($event)\"\n [searchable]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n look=\"outline\"\n ></ax-lookup>\n </div>\n </div>\n}\n"],"names":["i18n","i4"],"mappings":";;;;;;;;;;;;;;;;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AAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,oBAAA,EAAA,SAAA,EAAA,QAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,cAAc,kSAAE,mBAAmB,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;;2FAE/F,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAV/C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gCAAgC,EAAA,eAAA,EAGzB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,cAAc;AACtB,qBAAA,EAAA,OAAA,EACQ,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,mBAAmB,CAAC,EAAA,QAAA,EAAA,wyGAAA,EAAA,MAAA,EAAA,CAAA,mpDAAA,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 { q as formatContractCapabilitiesSummary } from './acorex-platform-module-platform-management-client-create-user-query-contract.util-D_af2BUi.mjs';
4
+ import { q as formatContractCapabilitiesSummary } from './acorex-platform-module-platform-management-client-create-user-query-contract.util-DYslIuJb.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 { AXMQueryContractWidgetViewComponent };
45
- //# sourceMappingURL=acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs.map
45
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-query-contract-widget-view.component-DkLf08HM.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-query-contract-widget-view.component-DD9ETjFD.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-view.component.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { formatContractCapabilitiesSummary } from '../query-definition/create-user-query-contract.util';\nimport type { AXPUserQueryContractCapabilities } from '../query-definition/create-user-query.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-query-contract-widget-view',\n template: `\n @if (summary()) {\n <span class=\"text-xs font-medium\" [title]=\"summary()\">{{ summary() }}</span>\n }\n <!-- ----- Empty contract capabilities ----- -->\n @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXMQueryContractWidgetViewComponent extends AXPValueWidgetComponent<AXPUserQueryContractCapabilities> {\n //#region ----- Computed Properties -----\n\n protected readonly summary = computed(() => formatContractCapabilitiesSummary(this.getValue()));\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;AAQA;AAEA;AAeM,MAAO,mCAAoC,SAAQ,uBAAyD,CAAA;AAblH,IAAA,WAAA,GAAA;;;AAgBqB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,iCAAiC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oFAAC;AAGhG,IAAA;8GANY,mCAAmC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mCAAmC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXpC;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGU,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAb/C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gCAAgC;AAC1C,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-query-contract-widget-view.component-DkLf08HM.mjs","sources":["../../../../libs/modules/platform-management/client/src/lib/features/query-contract-widget/query-contract-widget-view.component.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\n\nimport { formatContractCapabilitiesSummary } from '../query-definition/create-user-query-contract.util';\nimport type { AXPUserQueryContractCapabilities } from '../query-definition/create-user-query.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-query-contract-widget-view',\n template: `\n @if (summary()) {\n <span class=\"text-xs font-medium\" [title]=\"summary()\">{{ summary() }}</span>\n }\n <!-- ----- Empty contract capabilities ----- -->\n @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXMQueryContractWidgetViewComponent extends AXPValueWidgetComponent<AXPUserQueryContractCapabilities> {\n //#region ----- Computed Properties -----\n\n protected readonly summary = computed(() => formatContractCapabilitiesSummary(this.getValue()));\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;AAQA;AAEA;AAeM,MAAO,mCAAoC,SAAQ,uBAAyD,CAAA;AAblH,IAAA,WAAA,GAAA;;;AAgBqB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,iCAAiC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oFAAC;AAGhG,IAAA;8GANY,mCAAmC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mCAAmC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXpC;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGU,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAb/C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gCAAgC;AAC1C,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;"}
@@ -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 { g as formatRestApiSummary } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CkONcG6P.mjs';
4
+ import { g as formatRestApiSummary } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.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 { AXMRestApiGeneratorWidgetColumnComponent };
45
- //# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DQ4xX4Dy.mjs.map
45
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-Ctb-F0qE.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-rest-api-generator-widget-column.component-DQ4xX4Dy.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-Ctb-F0qE.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,7 +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, 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-CkONcG6P.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-CesvNlI9.mjs';
17
17
 
18
18
  //#region ----- Imports -----
19
19
  //#endregion
@@ -157,7 +157,7 @@ class AXMRestApiGeneratorWidgetEditComponent extends AXPValueWidgetComponent {
157
157
  });
158
158
  }
159
159
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRestApiGeneratorWidgetEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
160
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMRestApiGeneratorWidgetEditComponent, isStandalone: true, selector: "axm-rest-api-generator-widget-edit", host: { classAttribute: "block w-full" }, usesInheritance: true, ngImport: i0, template: "<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", styles: ["@layer properties;.axm-rest-api-generator-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-rest-api-generator-widget__import{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-header{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTextAreaModule }, { kind: "component", type: i3.AXTextAreaComponent, selector: "ax-text-area", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "placeholder", "maxLength", "look", "rows", "allowResize", "showCounter", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXRestApiGeneratorComponent, selector: "ax-rest-api-generator", inputs: ["value"], outputs: ["onValueChange"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
160
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMRestApiGeneratorWidgetEditComponent, isStandalone: true, selector: "axm-rest-api-generator-widget-edit", host: { classAttribute: "block w-full" }, usesInheritance: true, ngImport: i0, template: "<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", styles: ["@layer properties;.axm-rest-api-generator-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-rest-api-generator-widget__import{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-header{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTextAreaModule }, { kind: "component", type: i3.AXTextAreaComponent, selector: "ax-text-area", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "placeholder", "maxLength", "look", "rows", "allowResize", "showCounter", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXRestApiGeneratorComponent, selector: "ax-rest-api-generator", inputs: ["value"], outputs: ["onValueChange"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
161
161
  }
162
162
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRestApiGeneratorWidgetEditComponent, decorators: [{
163
163
  type: Component,
@@ -170,8 +170,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
170
170
  AXTextAreaModule,
171
171
  AXTranslationModule,
172
172
  AXRestApiGeneratorComponent,
173
- ], template: "<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", styles: ["@layer properties;.axm-rest-api-generator-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-rest-api-generator-widget__import{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-header{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
173
+ ], template: "<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", styles: ["@layer properties;.axm-rest-api-generator-widget{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}.axm-rest-api-generator-widget__import{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-header{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.axm-rest-api-generator-widget__import-title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"] }]
174
174
  }], ctorParameters: () => [] });
175
175
 
176
176
  export { AXMRestApiGeneratorWidgetEditComponent };
177
- //# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BcppwcSu.mjs.map
177
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-DMivRLvp.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-rest-api-generator-widget-edit.component-BcppwcSu.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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AW;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-DMivRLvp.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,IAAI,CAAC,UAAU,CAAC,SAAS,CAA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AA,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,w9BAAA,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 { g as formatRestApiSummary } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CkONcG6P.mjs';
4
+ import { g as formatRestApiSummary } from './acorex-platform-module-platform-management-client-acorex-platform-module-platform-management-client-CesvNlI9.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-D-m1uo8s.mjs.map
45
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-DAEUuDBa.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-platform-management-client-rest-api-generator-widget-view.component-D-m1uo8s.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-DAEUuDBa.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;;;"}
@@ -141,4 +141,4 @@ function asNonEmptyString(value) {
141
141
  }
142
142
 
143
143
  export { AXMRunUserQueryCommand };
144
- //# sourceMappingURL=acorex-platform-module-platform-management-client-run-user-query.command-BzNa3B48.mjs.map
144
+ //# sourceMappingURL=acorex-platform-module-platform-management-client-run-user-query.command-CmO6zxh8.mjs.map
@@ -1 +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"],"names":[],"mappings":";;;;;;;;;AAAA;AAgBA;AAEA;AAEA,MAAM,mBAAmB,GAAG;AAC1B,IAAA,WAAW,EAAE,yDAAyD;AACtE,IAAA,WAAW,EAAE,kEAAkE;AAC/E,IAAA,WAAW,EAAE,kEAAkE;AAC/E,IAAA,aAAa,EAAE,oEAAoE;AACnF,IAAA,UAAU,EAAE,iEAAiE;AAC7E,IAAA,YAAY,EAAE,mEAAmE;CACzE;AAEV;AAEA;AAEA;;AAEG;MAEU,sBAAsB,CAAA;AADnC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC;AACtC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAmGnE,IAAA;;;AA7FC,IAAA,MAAM,OAAO,CAAC,KAAA,GAAqC,EAAE,EAAA;QACnD,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,KAAK,CAAC;AAC7D,QAAA,MAAM,WAAW,GAAG,UAAU,IAAI,SAAS;QAE3C,IAAI,CAAC,SAAS,EAAE;AACd,YAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,mBAAmB,CAAC,WAAW,CAAC;AAC7F,YAAA,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;AACzB,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QACvD;AAEA,QAAA,IAAI;AACF,YAAA,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,EAAE;AAC7B,QAAA,OAAO,SAAS;IAClB;AACA,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE;AAC5B,IAAA,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,SAAS;AACjD;;"}
1
+ {"version":3,"file":"acorex-platform-module-platform-management-client-run-user-query.command-CmO6zxh8.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"],"names":[],"mappings":";;;;;;;;;AAAA;AAgBA;AAEA;AAEA,MAAM,mBAAmB,GAAG;AAC1B,IAAA,WAAW,EAAE,yDAAyD;AACtE,IAAA,WAAW,EAAE,kEAAkE;AAC/E,IAAA,WAAW,EAAE,kEAAkE;AAC/E,IAAA,aAAa,EAAE,oEAAoE;AACnF,IAAA,UAAU,EAAE,iEAAiE;AAC7E,IAAA,YAAY,EAAE,mEAAmE;CACzE;AAEV;AAEA;AAEA;;AAEG;MAEU,sBAAsB,CAAA;AADnC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC;AACtC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAmGnE,IAAA;;;AA7FC,IAAA,MAAM,OAAO,CAAC,KAAA,GAAqC,EAAE,EAAA;QACnD,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,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M,SAAS,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE;AAChG,IAAA,MAAM,UAAU,GACd,gBAAgB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,SAAS;AAEhG,IAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE;AAClC;AAEA,SAAS,gBAAgB,CAAC,KAAc,EAAA;AACtC,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,QAAA,OAAO,SAAS;IAClB;AACA,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE;AAC5B,IAAA,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,SAAS;AACjD;;"}
@@ -1,2 +1,2 @@
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-CkONcG6P.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-CesvNlI9.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": "2.0.0-next.6",
3
+ "version": "2.0.0-next.62",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@acorex-platform/module-dashboard-management-client": "2.0.0-next.6",
7
- "@acorex-platform/module-system-insight-client": "2.0.0-next.6",
6
+ "@acorex-platform/module-dashboard-management-client": "2.0.0-next.62",
7
+ "@acorex-platform/module-system-insight-client": "2.0.0-next.62",
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"