@acorex-platform/module-workplacesafety-management-client 0.0.30 → 0.0.33

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 (123) hide show
  1. package/fesm2022/acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-mzaaZ6T3.mjs +549 -0
  2. package/fesm2022/acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-mzaaZ6T3.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-control-hierarchy-levels.mjs +509 -0
  4. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-control-hierarchy-levels.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-control-measure.mjs +297 -0
  6. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-control-measure.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-ppe-rule.mjs +431 -0
  8. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-ppe-rule.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-register.mjs +416 -0
  10. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-register.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-risk.mjs +476 -0
  12. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-risk.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard.mjs +482 -0
  14. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-ppe-item.mjs +345 -0
  16. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-ppe-item.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-section.mjs +1458 -0
  18. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-section.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-type-section.mjs +1313 -0
  20. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-type-section.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-type.mjs +295 -0
  22. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-type.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-work-step.mjs +542 -0
  24. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-work-step.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan.mjs +470 -0
  26. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-template.mjs +369 -0
  28. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-template.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-section-type.mjs +299 -0
  30. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-section-type.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-work-step-type.mjs +1358 -0
  32. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-work-step-type.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-CeTmhod5.mjs +170 -0
  34. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-CeTmhod5.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-hierarchy-levels.entity-Dae2kkZe.mjs +372 -0
  36. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-hierarchy-levels.entity-Dae2kkZe.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-measure.entity-CpNcN6Pf.mjs +160 -0
  38. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-measure.entity-CpNcN6Pf.mjs.map +1 -0
  39. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-ppe-rule.entity-BcsAnO9h.mjs +294 -0
  40. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-ppe-rule.entity-BcsAnO9h.mjs.map +1 -0
  41. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-register.entity-C9wGZ3hB.mjs +279 -0
  42. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-register.entity-C9wGZ3hB.mjs.map +1 -0
  43. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-risk.entity-AUr2GVLU.mjs +339 -0
  44. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-risk.entity-AUr2GVLU.mjs.map +1 -0
  45. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard.entity-J6fveZKA.mjs +345 -0
  46. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard.entity-J6fveZKA.mjs.map +1 -0
  47. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-ppe-item.entity-3fQPlBBf.mjs +208 -0
  48. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-ppe-item.entity-3fQPlBBf.mjs.map +1 -0
  49. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section-dependency-BRGcQo7H.mjs +971 -0
  50. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section-dependency-BRGcQo7H.mjs.map +1 -0
  51. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section.entity-BPx-3rYX.mjs +356 -0
  52. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section.entity-BPx-3rYX.mjs.map +1 -0
  53. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type-section.entity-_nG09ZpE.mjs +211 -0
  54. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type-section.entity-_nG09ZpE.mjs.map +1 -0
  55. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type.entity-CIH7W9R7.mjs +158 -0
  56. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type.entity-CIH7W9R7.mjs.map +1 -0
  57. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-work-step.entity-DmFYsBhI.mjs +405 -0
  58. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-work-step.entity-DmFYsBhI.mjs.map +1 -0
  59. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan.entity-CUDh_ZfQ.mjs +333 -0
  60. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan.entity-CUDh_ZfQ.mjs.map +1 -0
  61. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-template.entity-BxNUXvae.mjs +232 -0
  62. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-template.entity-BxNUXvae.mjs.map +1 -0
  63. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-section-type.entity-73MUyaIk.mjs +162 -0
  64. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-section-type.entity-73MUyaIk.mjs.map +1 -0
  65. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-work-step-type.entity-Ujxum2GY.mjs +256 -0
  66. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-work-step-type.entity-Ujxum2GY.mjs.map +1 -0
  67. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog.mjs +2 -0
  68. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog.mjs.map +1 -0
  69. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts.mjs +739 -806
  70. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts.mjs.map +1 -1
  71. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram-widget-view.component-CnTEwf_l.mjs +93 -0
  72. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram-widget-view.component-CnTEwf_l.mjs.map +1 -0
  73. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.component-BI9VkzNw.mjs +117 -0
  74. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.component-BI9VkzNw.mjs.map +1 -0
  75. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.service-BBhH7KP1.mjs → acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.service-tMrUDnCb.mjs} +48 -1
  76. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.service-tMrUDnCb.mjs.map +1 -0
  77. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-index-kF37zgd4.mjs → acorex-platform-module-workplacesafety-management-client-index-LxP1eZLY.mjs} +391 -92
  78. package/fesm2022/acorex-platform-module-workplacesafety-management-client-index-LxP1eZLY.mjs.map +1 -0
  79. package/fesm2022/acorex-platform-module-workplacesafety-management-client-local-entities.mjs +43 -0
  80. package/fesm2022/acorex-platform-module-workplacesafety-management-client-local-entities.mjs.map +1 -0
  81. package/fesm2022/acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-column.component-D2Mmow12.mjs +42 -0
  82. package/fesm2022/acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-column.component-D2Mmow12.mjs.map +1 -0
  83. package/fesm2022/acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-edit.component-CQtVhCgw.mjs +101 -0
  84. package/fesm2022/acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-edit.component-CQtVhCgw.mjs.map +1 -0
  85. package/fesm2022/acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.service-YS8FHiRu.mjs +221 -0
  86. package/fesm2022/acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.service-YS8FHiRu.mjs.map +1 -0
  87. package/fesm2022/acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.util-2Kl3_3sg.mjs +61 -0
  88. package/fesm2022/acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.util-2Kl3_3sg.mjs.map +1 -0
  89. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-preview-control-hierarchy-diagram.command-C2X3VpEt.mjs → acorex-platform-module-workplacesafety-management-client-preview-control-hierarchy-diagram.command-Dd9xdo_y.mjs} +3 -7
  90. package/fesm2022/acorex-platform-module-workplacesafety-management-client-preview-control-hierarchy-diagram.command-Dd9xdo_y.mjs.map +1 -0
  91. package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-6i0RkG3L.mjs +557 -0
  92. package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-6i0RkG3L.mjs.map +1 -0
  93. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-BJsg3pHZ.mjs → acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-BlPzzCc2.mjs} +13 -25
  94. package/fesm2022/acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-BlPzzCc2.mjs.map +1 -0
  95. package/fesm2022/acorex-platform-module-workplacesafety-management-client.mjs +1 -460
  96. package/fesm2022/acorex-platform-module-workplacesafety-management-client.mjs.map +1 -1
  97. package/package.json +70 -2
  98. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-control-hierarchy-levels.d.ts +5 -0
  99. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-control-measure.d.ts +5 -0
  100. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-ppe-rule.d.ts +5 -0
  101. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-register.d.ts +5 -0
  102. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-risk.d.ts +5 -0
  103. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard.d.ts +5 -0
  104. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-ppe-item.d.ts +5 -0
  105. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-section.d.ts +9 -0
  106. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-type-section.d.ts +5 -0
  107. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-type.d.ts +5 -0
  108. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-work-step.d.ts +5 -0
  109. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan.d.ts +5 -0
  110. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-template.d.ts +5 -0
  111. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-section-type.d.ts +5 -0
  112. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-work-step-type.d.ts +5 -0
  113. package/types/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog.d.ts +10 -0
  114. package/types/acorex-platform-module-workplacesafety-management-client-contracts.d.ts +89 -140
  115. package/types/acorex-platform-module-workplacesafety-management-client-local-entities.d.ts +12 -0
  116. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram-widget-view.component-C-qrrqOV.mjs +0 -203
  117. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram-widget-view.component-C-qrrqOV.mjs.map +0 -1
  118. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.service-BBhH7KP1.mjs.map +0 -1
  119. package/fesm2022/acorex-platform-module-workplacesafety-management-client-hazard-risk-ppe-rule-status.provider-DtqzcWh0.mjs +0 -42
  120. package/fesm2022/acorex-platform-module-workplacesafety-management-client-hazard-risk-ppe-rule-status.provider-DtqzcWh0.mjs.map +0 -1
  121. package/fesm2022/acorex-platform-module-workplacesafety-management-client-index-kF37zgd4.mjs.map +0 -1
  122. package/fesm2022/acorex-platform-module-workplacesafety-management-client-preview-control-hierarchy-diagram.command-C2X3VpEt.mjs.map +0 -1
  123. package/fesm2022/acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-BJsg3pHZ.mjs.map +0 -1
@@ -0,0 +1,557 @@
1
+ import { AXBasePageComponent } from '@acorex/components/page';
2
+ import * as i1 from '@acorex/core/translation';
3
+ import { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';
4
+ import { AsyncPipe } from '@angular/common';
5
+ import * as i0 from '@angular/core';
6
+ import { input, ChangeDetectionStrategy, Component, inject, signal, computed, effect, ViewEncapsulation } from '@angular/core';
7
+ import { n as normalizeSafetyPlanSectionBuilderValue } from './acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-BlPzzCc2.mjs';
8
+ import { A as AXMControlHierarchyDiagramComponent } from './acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.component-BI9VkzNw.mjs';
9
+ import { A as AXMControlHierarchyDiagramService, r as resolveControlHierarchyDiagramViewType } from './acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.service-tMrUDnCb.mjs';
10
+ import { A as AXMPpeItemViewerService, a as AXMPpeItemViewerComponent } from './acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.service-YS8FHiRu.mjs';
11
+ import { r as resolvePpeItemViewerLayout } from './acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.util-2Kl3_3sg.mjs';
12
+ import * as i1$1 from '@acorex/components/loading';
13
+ import { AXLoadingModule } from '@acorex/components/loading';
14
+ import { AXPLayoutBuilderService, AXPLayoutRendererComponent } from '@acorex-platform/framework-client/layout/builder';
15
+ import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
16
+ import { AXPWidgetsList } from '@acorex-platform/framework-shared/core';
17
+ import { isStepTableSectionType, resolveSectionTypeKey, sortStepTableColumns, normalizeStepTableColumns, stepTableColumnTitle, RISK_MANAGEMENT_RISK_MATRIX_CELL_ENTITY, stepTableColumnKey } from '@acorex-platform/module-workplacesafety-management-client/contracts';
18
+ import { cloneDeep } from 'lodash';
19
+ import { resolveEntityRowDisplayText } from '@acorex-platform/framework-client/common';
20
+
21
+ //#region ----- Imports -----
22
+ //#endregion
23
+ //#region ----- Component -----
24
+ class AXMCatalogSectionPreviewComponent {
25
+ constructor() {
26
+ this.items = input([], /* @ts-ignore */
27
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
28
+ }
29
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMCatalogSectionPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMCatalogSectionPreviewComponent, isStandalone: true, selector: "axm-catalog-section-preview", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "axm-catalog-section-preview block" }, ngImport: i0, template: "<div class=\"axm-catalog-section-preview\">\n @if (items().length > 0) {\n <!-- ----- Linked catalog items as a document bullet list ----- -->\n <ul class=\"__list\">\n @for (item of items(); track item.id) {\n <li class=\"__item\">\n <span class=\"__title\">{{ item.title }}</span>\n <!--->\n <!-- ----- Optional business code after the item title ----- -->\n @if (item.code) {\n <span class=\"__code\">({{ item.code }})</span>\n }\n </li>\n }\n </ul>\n }\n <!-- ----- Empty catalog section ----- -->\n @else {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n</div>\n", styles: [".axm-catalog-section-preview .__list{margin:0;list-style-type:disc;padding-inline-start:calc(var(--spacing, .25rem) * 5)}.axm-catalog-section-preview .__item{margin-bottom:var(--spacing, .25rem)}.axm-catalog-section-preview .__code{margin-inline-start:var(--spacing, .25rem);color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-catalog-section-preview .__code{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-catalog-section-preview .__empty{margin:0;color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-catalog-section-preview .__empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
31
+ }
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMCatalogSectionPreviewComponent, decorators: [{
33
+ type: Component,
34
+ args: [{ selector: 'axm-catalog-section-preview', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXTranslationModule, AsyncPipe], host: {
35
+ class: 'axm-catalog-section-preview block',
36
+ }, template: "<div class=\"axm-catalog-section-preview\">\n @if (items().length > 0) {\n <!-- ----- Linked catalog items as a document bullet list ----- -->\n <ul class=\"__list\">\n @for (item of items(); track item.id) {\n <li class=\"__item\">\n <span class=\"__title\">{{ item.title }}</span>\n <!--->\n <!-- ----- Optional business code after the item title ----- -->\n @if (item.code) {\n <span class=\"__code\">({{ item.code }})</span>\n }\n </li>\n }\n </ul>\n }\n <!-- ----- Empty catalog section ----- -->\n @else {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n</div>\n", styles: [".axm-catalog-section-preview .__list{margin:0;list-style-type:disc;padding-inline-start:calc(var(--spacing, .25rem) * 5)}.axm-catalog-section-preview .__item{margin-bottom:var(--spacing, .25rem)}.axm-catalog-section-preview .__code{margin-inline-start:var(--spacing, .25rem);color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-catalog-section-preview .__code{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-catalog-section-preview .__empty{margin:0;color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-catalog-section-preview .__empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
37
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }] } });
38
+
39
+ //#region ----- Imports -----
40
+ //#endregion
41
+ //#region ----- Component -----
42
+ class AXMHierarchySectionPreviewComponent {
43
+ constructor() {
44
+ //#region ----- Services & Dependencies -----
45
+ this.diagramService = inject(AXMControlHierarchyDiagramService);
46
+ //#endregion
47
+ //#region ----- Inputs -----
48
+ this.items = input([], /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
50
+ this.viewType = input(/* @ts-ignore */
51
+ ...(ngDevMode ? [undefined, { debugName: "viewType" }] : /* istanbul ignore next */ []));
52
+ this.showTitle = input(undefined, /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "showTitle" }] : /* istanbul ignore next */ []));
54
+ //#endregion
55
+ //#region ----- State Signals -----
56
+ this.diagramItems = signal([], /* @ts-ignore */
57
+ ...(ngDevMode ? [{ debugName: "diagramItems" }] : /* istanbul ignore next */ []));
58
+ //#endregion
59
+ //#region ----- Computed Properties -----
60
+ this.resolvedViewType = computed(() => resolveControlHierarchyDiagramViewType(this.viewType()), /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "resolvedViewType" }] : /* istanbul ignore next */ []));
62
+ this.resolvedShowTitle = computed(() => this.showTitle() === true, /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "resolvedShowTitle" }] : /* istanbul ignore next */ []));
64
+ //#endregion
65
+ //#region ----- Lifecycle -----
66
+ this.loadItems = effect((onCleanup) => {
67
+ const catalogItems = this.items();
68
+ let cancelled = false;
69
+ onCleanup(() => {
70
+ cancelled = true;
71
+ });
72
+ void this.refresh(catalogItems, () => cancelled);
73
+ }, /* @ts-ignore */
74
+ ...(ngDevMode ? [{ debugName: "loadItems" }] : /* istanbul ignore next */ []));
75
+ }
76
+ //#endregion
77
+ //#region ----- Data Loading -----
78
+ async refresh(catalogItems, isCancelled) {
79
+ if (catalogItems.length === 0) {
80
+ this.diagramItems.set([]);
81
+ return;
82
+ }
83
+ try {
84
+ const loaded = await this.diagramService.loadDiagramItemsByLevelIds(catalogItems.map((item) => item.id));
85
+ if (!isCancelled()) {
86
+ this.diagramItems.set(loaded);
87
+ }
88
+ }
89
+ catch {
90
+ if (!isCancelled()) {
91
+ this.diagramItems.set([]);
92
+ }
93
+ }
94
+ }
95
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMHierarchySectionPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
96
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: AXMHierarchySectionPreviewComponent, isStandalone: true, selector: "axm-hierarchy-section-preview", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, viewType: { classPropertyName: "viewType", publicName: "viewType", isSignal: true, isRequired: false, transformFunction: null }, showTitle: { classPropertyName: "showTitle", publicName: "showTitle", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "axm-hierarchy-section-preview block" }, ngImport: i0, template: "<!-- ----- Control hierarchy diagram using saved section widget options ----- -->\n<axm-control-hierarchy-diagram\n [viewType]=\"resolvedViewType()\"\n [items]=\"diagramItems()\"\n [showTitle]=\"resolvedShowTitle()\"\n [showViewTypeSelector]=\"false\"\n/>\n", styles: [".axm-hierarchy-section-preview{display:block;width:100%}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXMControlHierarchyDiagramComponent, selector: "axm-control-hierarchy-diagram", inputs: ["viewType", "items", "highlightLevelId", "showViewTypeSelector", "showTitle"], outputs: ["viewTypeChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
97
+ }
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMHierarchySectionPreviewComponent, decorators: [{
99
+ type: Component,
100
+ args: [{ selector: 'axm-hierarchy-section-preview', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXMControlHierarchyDiagramComponent], host: {
101
+ class: 'axm-hierarchy-section-preview block',
102
+ }, template: "<!-- ----- Control hierarchy diagram using saved section widget options ----- -->\n<axm-control-hierarchy-diagram\n [viewType]=\"resolvedViewType()\"\n [items]=\"diagramItems()\"\n [showTitle]=\"resolvedShowTitle()\"\n [showViewTypeSelector]=\"false\"\n/>\n", styles: [".axm-hierarchy-section-preview{display:block;width:100%}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
103
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], viewType: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewType", required: false }] }], showTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTitle", required: false }] }] } });
104
+
105
+ //#region ----- Imports -----
106
+ //#endregion
107
+ //#region ----- Component -----
108
+ class AXMPpeSectionPreviewComponent {
109
+ constructor() {
110
+ //#region ----- Services & Dependencies -----
111
+ this.ppeItemViewerService = inject(AXMPpeItemViewerService);
112
+ //#endregion
113
+ //#region ----- Inputs -----
114
+ this.items = input([], /* @ts-ignore */
115
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
116
+ this.layout = input(/* @ts-ignore */
117
+ ...(ngDevMode ? [undefined, { debugName: "layout" }] : /* istanbul ignore next */ []));
118
+ //#endregion
119
+ //#region ----- State Signals -----
120
+ this.loading = signal(false, /* @ts-ignore */
121
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
122
+ this.displayItems = signal([], /* @ts-ignore */
123
+ ...(ngDevMode ? [{ debugName: "displayItems" }] : /* istanbul ignore next */ []));
124
+ this.selectedIds = signal([], /* @ts-ignore */
125
+ ...(ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []));
126
+ this.resolvedLayout = computed(() => resolvePpeItemViewerLayout(this.layout()), /* @ts-ignore */
127
+ ...(ngDevMode ? [{ debugName: "resolvedLayout" }] : /* istanbul ignore next */ []));
128
+ //#endregion
129
+ //#region ----- Lifecycle -----
130
+ this.loadItems = effect((onCleanup) => {
131
+ const catalogItems = this.items();
132
+ let cancelled = false;
133
+ onCleanup(() => {
134
+ cancelled = true;
135
+ });
136
+ void this.refresh(catalogItems, () => cancelled);
137
+ }, /* @ts-ignore */
138
+ ...(ngDevMode ? [{ debugName: "loadItems" }] : /* istanbul ignore next */ []));
139
+ }
140
+ //#endregion
141
+ //#region ----- Event Handlers -----
142
+ onSelectedIdsChange(ids) {
143
+ this.selectedIds.set(ids);
144
+ }
145
+ //#endregion
146
+ //#region ----- Data Loading -----
147
+ async refresh(catalogItems, isCancelled) {
148
+ if (catalogItems.length === 0) {
149
+ this.displayItems.set([]);
150
+ this.loading.set(false);
151
+ return;
152
+ }
153
+ this.loading.set(true);
154
+ const fallback = catalogItems.map((item) => this.toDisplayItem(item));
155
+ try {
156
+ const loaded = await this.ppeItemViewerService.loadDisplayItems(catalogItems.map((item) => item.id));
157
+ if (isCancelled()) {
158
+ return;
159
+ }
160
+ const byId = new Map(loaded.map((row) => [row.id, row]));
161
+ this.displayItems.set(fallback.map((item) => byId.get(item.id) ?? item));
162
+ }
163
+ catch {
164
+ if (!isCancelled()) {
165
+ this.displayItems.set(fallback);
166
+ }
167
+ }
168
+ finally {
169
+ if (!isCancelled()) {
170
+ this.loading.set(false);
171
+ }
172
+ }
173
+ }
174
+ toDisplayItem(item) {
175
+ return {
176
+ id: item.id,
177
+ title: item.title,
178
+ code: item.code,
179
+ imageUrl: null,
180
+ };
181
+ }
182
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPpeSectionPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
183
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: AXMPpeSectionPreviewComponent, isStandalone: true, selector: "axm-ppe-section-preview", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "axm-ppe-section-preview block" }, ngImport: i0, template: "<!-- ----- PPE Item viewer (same component as Questionnaire; checkboxes can be toggled) ----- -->\n<axm-ppe-item-viewer\n [items]=\"displayItems()\"\n [layout]=\"resolvedLayout()\"\n [selectedIds]=\"selectedIds()\"\n [loading]=\"loading()\"\n (selectedIdsChange)=\"onSelectedIdsChange($event)\"\n/>\n", dependencies: [{ kind: "component", type: AXMPpeItemViewerComponent, selector: "axm-ppe-item-viewer", inputs: ["items", "layout", "selectedIds", "loading", "disabled", "readonly", "showControl"], outputs: ["selectedIdsChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
184
+ }
185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPpeSectionPreviewComponent, decorators: [{
186
+ type: Component,
187
+ args: [{ selector: 'axm-ppe-section-preview', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXMPpeItemViewerComponent], host: {
188
+ class: 'axm-ppe-section-preview block',
189
+ }, template: "<!-- ----- PPE Item viewer (same component as Questionnaire; checkboxes can be toggled) ----- -->\n<axm-ppe-item-viewer\n [items]=\"displayItems()\"\n [layout]=\"resolvedLayout()\"\n [selectedIds]=\"selectedIds()\"\n [loading]=\"loading()\"\n (selectedIdsChange)=\"onSelectedIdsChange($event)\"\n/>\n" }]
190
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }] } });
191
+
192
+ //#region ----- Imports -----
193
+ //#endregion
194
+ //#region ----- Display helpers -----
195
+ function toSafetyPlanPreviewDisplayText(value, locale) {
196
+ return resolveEntityRowDisplayText(value, locale).trim();
197
+ }
198
+ function resolveSafetyPlanPreviewSectionTitle(section, locale) {
199
+ return (toSafetyPlanPreviewDisplayText(section.title, locale) ||
200
+ toSafetyPlanPreviewDisplayText(section.sectionType?.title, locale) ||
201
+ toSafetyPlanPreviewDisplayText(section.sectionType?.code, locale));
202
+ }
203
+ /**
204
+ * Maps a section type to a preview renderer. New document kinds (SWMS, JSA, SOP, Permit)
205
+ * can add cases here without changing the editor.
206
+ */
207
+ function resolveSafetyPlanSectionPreviewKind(section) {
208
+ if (isStepTableSectionType(section.sectionTypeId, section.sectionType)) {
209
+ return 'work-step-table';
210
+ }
211
+ if (resolveSectionTypeKey(section.sectionTypeId, section.sectionType) === 'RiskMatrix') {
212
+ return 'risk-matrix';
213
+ }
214
+ if (resolveSectionTypeKey(section.sectionTypeId, section.sectionType) === 'Ppe') {
215
+ return 'ppe';
216
+ }
217
+ if (resolveSectionTypeKey(section.sectionTypeId, section.sectionType) === 'HierarchyLevel') {
218
+ return 'hierarchy';
219
+ }
220
+ return 'catalog';
221
+ }
222
+ /** True when the section has at least one previewable item (catalog row or work-step row). */
223
+ function safetyPlanPreviewSectionHasItems(section) {
224
+ if (isStepTableSectionType(section.sectionTypeId, section.sectionType)) {
225
+ return (section.items ?? []).some((item) => item.stepTableRow != null);
226
+ }
227
+ return collectSafetyPlanPreviewCatalogItems(section, '').length > 0;
228
+ }
229
+ function collectSafetyPlanPreviewCatalogItems(section, locale) {
230
+ const linked = [];
231
+ const seen = new Set();
232
+ for (const slot of section.items ?? []) {
233
+ for (const item of flattenCatalogSlot(slot, locale)) {
234
+ if (!item.id || seen.has(item.id)) {
235
+ continue;
236
+ }
237
+ seen.add(item.id);
238
+ linked.push(item);
239
+ }
240
+ }
241
+ return linked;
242
+ }
243
+ function resolveSafetyPlanPreviewStepTableColumns(section) {
244
+ return sortStepTableColumns(normalizeStepTableColumns(section.columns));
245
+ }
246
+ function formatSafetyPlanPreviewStepTableCell(cell, locale) {
247
+ if (!cell) {
248
+ return '';
249
+ }
250
+ const fromRefs = (cell.refs ?? [])
251
+ .map((ref) => toSafetyPlanPreviewDisplayText(ref.title, locale) || String(ref.code ?? '').trim())
252
+ .filter((text) => text.length > 0);
253
+ if (fromRefs.length) {
254
+ return fromRefs.join(', ');
255
+ }
256
+ const text = cell.textValue?.trim();
257
+ if (text) {
258
+ return text;
259
+ }
260
+ if (typeof cell.numberValue === 'number' && Number.isFinite(cell.numberValue)) {
261
+ return String(cell.numberValue);
262
+ }
263
+ return '';
264
+ }
265
+ function stepTablePreviewColumnLabel(column, locale) {
266
+ return (toSafetyPlanPreviewDisplayText(column.title, locale) ||
267
+ toSafetyPlanPreviewDisplayText(column.sectionType?.title, locale) ||
268
+ stepTableColumnTitle(column));
269
+ }
270
+ function flattenCatalogSlot(slot, locale) {
271
+ const ids = Array.isArray(slot.itemIds) ? slot.itemIds : [];
272
+ const snapshots = Array.isArray(slot.items) ? slot.items : [];
273
+ const items = [];
274
+ for (let index = 0; index < ids.length; index += 1) {
275
+ const id = String(ids[index] ?? '').trim();
276
+ if (!id) {
277
+ continue;
278
+ }
279
+ const snapshot = snapshots.find((entry) => entry?.id === id) ?? snapshots[index];
280
+ const title = toSafetyPlanPreviewDisplayText(snapshot?.title, locale) ||
281
+ String(snapshot?.code ?? '').trim() ||
282
+ id;
283
+ items.push({
284
+ id,
285
+ title,
286
+ code: snapshot?.code,
287
+ });
288
+ }
289
+ if (items.length === 0 && snapshots.length > 0) {
290
+ for (const snapshot of snapshots) {
291
+ const id = String(snapshot?.id ?? '').trim();
292
+ if (!id) {
293
+ continue;
294
+ }
295
+ items.push({
296
+ id,
297
+ title: toSafetyPlanPreviewDisplayText(snapshot.title, locale) || String(snapshot.code ?? '').trim() || id,
298
+ code: snapshot.code,
299
+ });
300
+ }
301
+ }
302
+ return items;
303
+ }
304
+ //#endregion
305
+
306
+ //#region ----- Imports -----
307
+ //#endregion
308
+ //#region ----- Component -----
309
+ class AXMRiskMatrixPreviewComponent {
310
+ constructor() {
311
+ //#region ----- Services & Dependencies -----
312
+ this.entityService = inject(AXPEntityService);
313
+ this.layoutBuilder = inject(AXPLayoutBuilderService);
314
+ this.translationService = inject(AXTranslationService);
315
+ //#endregion
316
+ //#region ----- Inputs -----
317
+ this.items = input([], /* @ts-ignore */
318
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
319
+ //#endregion
320
+ //#region ----- State Signals -----
321
+ this.loading = signal(false, /* @ts-ignore */
322
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
323
+ this.matrices = signal([], /* @ts-ignore */
324
+ ...(ngDevMode ? [{ debugName: "matrices" }] : /* istanbul ignore next */ []));
325
+ //#endregion
326
+ //#region ----- Lifecycle -----
327
+ this.loadItems = effect((onCleanup) => {
328
+ const catalogItems = this.items();
329
+ let cancelled = false;
330
+ onCleanup(() => {
331
+ cancelled = true;
332
+ });
333
+ void this.refresh(catalogItems, () => cancelled);
334
+ }, /* @ts-ignore */
335
+ ...(ngDevMode ? [{ debugName: "loadItems" }] : /* istanbul ignore next */ []));
336
+ }
337
+ //#endregion
338
+ //#region ----- Data Loading -----
339
+ async refresh(catalogItems, isCancelled) {
340
+ if (catalogItems.length === 0) {
341
+ this.matrices.set([]);
342
+ this.loading.set(false);
343
+ return;
344
+ }
345
+ this.loading.set(true);
346
+ try {
347
+ const loaded = await this.queryByIds(catalogItems.map((item) => item.id));
348
+ if (isCancelled()) {
349
+ return;
350
+ }
351
+ const byId = new Map(loaded.map((row) => [row.id, row]));
352
+ const locale = this.translationService.getActiveLang() ?? 'en-US';
353
+ this.matrices.set(catalogItems.flatMap((item) => {
354
+ const row = byId.get(item.id);
355
+ if (!row) {
356
+ return [];
357
+ }
358
+ return [this.toPreviewItem(item, row, locale)];
359
+ }));
360
+ }
361
+ catch {
362
+ if (!isCancelled()) {
363
+ this.matrices.set([]);
364
+ }
365
+ }
366
+ finally {
367
+ if (!isCancelled()) {
368
+ this.loading.set(false);
369
+ }
370
+ }
371
+ }
372
+ async queryByIds(ids) {
373
+ const dataAccessor = this.entityService
374
+ .withEntity(RISK_MANAGEMENT_RISK_MATRIX_CELL_ENTITY)
375
+ .data();
376
+ try {
377
+ const result = await dataAccessor.query({
378
+ skip: 0,
379
+ take: Math.max(ids.length, 100),
380
+ filter: ids.length === 1
381
+ ? { field: 'id', operator: { type: 'equal' }, value: ids[0] }
382
+ : { field: 'id', operator: { type: 'in' }, value: ids },
383
+ });
384
+ return result?.items ?? [];
385
+ }
386
+ catch {
387
+ const loaded = [];
388
+ for (const id of ids) {
389
+ try {
390
+ const row = await dataAccessor.byKey(id);
391
+ if (row) {
392
+ loaded.push(row);
393
+ }
394
+ }
395
+ catch {
396
+ /* skip missing rows */
397
+ }
398
+ }
399
+ return loaded;
400
+ }
401
+ }
402
+ toPreviewItem(catalogItem, row, locale) {
403
+ const code = typeof row.code === 'string' ? row.code.trim() : catalogItem.code;
404
+ return {
405
+ id: catalogItem.id,
406
+ title: toSafetyPlanPreviewDisplayText(row.title, locale) || catalogItem.title,
407
+ code: code && code.length > 0 ? code : undefined,
408
+ context: { ...row },
409
+ layout: cloneDeep(this.buildMatrixLayout()),
410
+ };
411
+ }
412
+ //#endregion
413
+ //#region ----- Layout -----
414
+ buildMatrixLayout() {
415
+ return this.layoutBuilder
416
+ .create()
417
+ .flex((flex) => {
418
+ flex.mode('view').setDirection('column');
419
+ flex.formField('', (field) => {
420
+ field
421
+ .path('matrix')
422
+ .setShowLabel(false)
423
+ .mode('view')
424
+ .customWidget(AXPWidgetsList.Editors.RiskMatrix, { readonly: true });
425
+ });
426
+ })
427
+ .build();
428
+ }
429
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRiskMatrixPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
430
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMRiskMatrixPreviewComponent, isStandalone: true, selector: "axm-risk-matrix-preview", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "axm-risk-matrix-preview block" }, ngImport: i0, template: "<div class=\"axm-risk-matrix-preview\">\n @if (loading()) {\n <!-- ----- Loading indicator while risk matrix records are fetched ----- -->\n <ax-loading></ax-loading>\n }\n <!-- ----- Empty state when no risk matrices are selected ----- -->\n @else if (matrices().length === 0) {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n <!-- ----- Selected risk matrices rendered with the RiskMatrix widget ----- -->\n @else {\n <div class=\"__items\">\n @for (item of matrices(); track item.id) {\n <article class=\"__item\">\n <header class=\"__item-header\">\n <h4 class=\"__item-title\">{{ item.title }}</h4>\n <!--->\n <!-- ----- Optional business code after the matrix title ----- -->\n @if (item.code) {\n <span class=\"__code\">({{ item.code }})</span>\n }\n </header>\n <div class=\"__matrix\">\n <axp-layout-renderer [layout]=\"item.layout\" [context]=\"item.context\" mode=\"view\" look=\"container\" />\n </div>\n </article>\n }\n </div>\n }\n</div>\n", styles: ["@layer properties;.axm-risk-matrix-preview{display:block;width:100%}.axm-risk-matrix-preview .__empty{margin:0;color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-risk-matrix-preview .__empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-risk-matrix-preview .__items{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 6)}.axm-risk-matrix-preview .__item{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-risk-matrix-preview .__item-header{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--spacing, .25rem)}.axm-risk-matrix-preview .__item-title{margin:0;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)}.axm-risk-matrix-preview .__code{color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-risk-matrix-preview .__code{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-risk-matrix-preview .__matrix{width:100%;overflow-x:auto}@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: AXLoadingModule }, { kind: "component", type: i1$1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPLayoutRendererComponent, selector: "axp-layout-renderer", inputs: ["layout", "context", "look", "mode"], outputs: ["contextChange", "contextInitiated", "validityChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
431
+ }
432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRiskMatrixPreviewComponent, decorators: [{
433
+ type: Component,
434
+ args: [{ selector: 'axm-risk-matrix-preview', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, AXLoadingModule, AXTranslationModule, AXPLayoutRendererComponent], host: {
435
+ class: 'axm-risk-matrix-preview block',
436
+ }, template: "<div class=\"axm-risk-matrix-preview\">\n @if (loading()) {\n <!-- ----- Loading indicator while risk matrix records are fetched ----- -->\n <ax-loading></ax-loading>\n }\n <!-- ----- Empty state when no risk matrices are selected ----- -->\n @else if (matrices().length === 0) {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n <!-- ----- Selected risk matrices rendered with the RiskMatrix widget ----- -->\n @else {\n <div class=\"__items\">\n @for (item of matrices(); track item.id) {\n <article class=\"__item\">\n <header class=\"__item-header\">\n <h4 class=\"__item-title\">{{ item.title }}</h4>\n <!--->\n <!-- ----- Optional business code after the matrix title ----- -->\n @if (item.code) {\n <span class=\"__code\">({{ item.code }})</span>\n }\n </header>\n <div class=\"__matrix\">\n <axp-layout-renderer [layout]=\"item.layout\" [context]=\"item.context\" mode=\"view\" look=\"container\" />\n </div>\n </article>\n }\n </div>\n }\n</div>\n", styles: ["@layer properties;.axm-risk-matrix-preview{display:block;width:100%}.axm-risk-matrix-preview .__empty{margin:0;color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-risk-matrix-preview .__empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-risk-matrix-preview .__items{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 6)}.axm-risk-matrix-preview .__item{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2)}.axm-risk-matrix-preview .__item-header{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--spacing, .25rem)}.axm-risk-matrix-preview .__item-title{margin:0;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)}.axm-risk-matrix-preview .__code{color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-risk-matrix-preview .__code{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-risk-matrix-preview .__matrix{width:100%;overflow-x:auto}@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"] }]
437
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }] } });
438
+
439
+ //#region ----- Imports -----
440
+ //#endregion
441
+ //#region ----- Component -----
442
+ class AXMWorkStepTablePreviewComponent {
443
+ constructor() {
444
+ //#region ----- Services & Dependencies -----
445
+ this.translationService = inject(AXTranslationService);
446
+ //#endregion
447
+ //#region ----- Inputs -----
448
+ this.section = input.required(/* @ts-ignore */
449
+ ...(ngDevMode ? [{ debugName: "section" }] : /* istanbul ignore next */ []));
450
+ //#endregion
451
+ //#region ----- Computed Properties -----
452
+ this.columns = computed(() => resolveSafetyPlanPreviewStepTableColumns(this.section()), /* @ts-ignore */
453
+ ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
454
+ this.rows = computed(() => (this.section().items ?? [])
455
+ .map((item) => item.stepTableRow)
456
+ .filter((row) => !!row)
457
+ .sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0)), /* @ts-ignore */
458
+ ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
459
+ }
460
+ //#endregion
461
+ //#region ----- Display -----
462
+ columnLabel(column) {
463
+ return stepTablePreviewColumnLabel(column, this.translationService.getActiveLang() ?? 'en-US');
464
+ }
465
+ cellText(row, column) {
466
+ const key = stepTableColumnKey(column);
467
+ const cell = (row.cells ?? []).find((entry) => entry.columnKey === key);
468
+ return formatSafetyPlanPreviewStepTableCell(cell, this.translationService.getActiveLang() ?? 'en-US');
469
+ }
470
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMWorkStepTablePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
471
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMWorkStepTablePreviewComponent, isStandalone: true, selector: "axm-work-step-table-preview", inputs: { section: { classPropertyName: "section", publicName: "section", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "axm-work-step-table-preview block" }, ngImport: i0, template: "<div class=\"axm-work-step-table-preview\">\n @if (columns().length > 0 && rows().length > 0) {\n <!-- ----- Read-only work-step table ----- -->\n <div class=\"__table-wrap\">\n <table class=\"__table\">\n <thead>\n <tr>\n @for (column of columns(); track column.sectionTypeId) {\n <th>{{ columnLabel(column) }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of rows(); track $index) {\n <tr>\n @for (column of columns(); track column.sectionTypeId) {\n <td>{{ cellText(row, column) }}</td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n <!-- ----- Empty work-step table ----- -->\n @else {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n</div>\n", styles: ["@layer properties;.axm-work-step-table-preview .__table-wrap{overflow-x:auto}.axm-work-step-table-preview .__table{width:100%;border-collapse:collapse;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}.axm-work-step-table-preview .__table th,.axm-work-step-table-preview .__table td{border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);text-align:start;vertical-align:top}.axm-work-step-table-preview .__table th{background-color:rgba(var(--ax-sys-color-surface));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.axm-work-step-table-preview .__empty{margin:0;color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-work-step-table-preview .__empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@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-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
472
+ }
473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMWorkStepTablePreviewComponent, decorators: [{
474
+ type: Component,
475
+ args: [{ selector: 'axm-work-step-table-preview', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXTranslationModule, AsyncPipe], host: {
476
+ class: 'axm-work-step-table-preview block',
477
+ }, template: "<div class=\"axm-work-step-table-preview\">\n @if (columns().length > 0 && rows().length > 0) {\n <!-- ----- Read-only work-step table ----- -->\n <div class=\"__table-wrap\">\n <table class=\"__table\">\n <thead>\n <tr>\n @for (column of columns(); track column.sectionTypeId) {\n <th>{{ columnLabel(column) }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of rows(); track $index) {\n <tr>\n @for (column of columns(); track column.sectionTypeId) {\n <td>{{ cellText(row, column) }}</td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n <!-- ----- Empty work-step table ----- -->\n @else {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n</div>\n", styles: ["@layer properties;.axm-work-step-table-preview .__table-wrap{overflow-x:auto}.axm-work-step-table-preview .__table{width:100%;border-collapse:collapse;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}.axm-work-step-table-preview .__table th,.axm-work-step-table-preview .__table td{border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);text-align:start;vertical-align:top}.axm-work-step-table-preview .__table th{background-color:rgba(var(--ax-sys-color-surface));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.axm-work-step-table-preview .__empty{margin:0;color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-work-step-table-preview .__empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@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-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
478
+ }], propDecorators: { section: [{ type: i0.Input, args: [{ isSignal: true, alias: "section", required: true }] }] } });
479
+
480
+ //#region ----- Imports -----
481
+ //#endregion
482
+ //#region ----- Component -----
483
+ class AXMSafetyPlanSectionPreviewComponent {
484
+ constructor() {
485
+ //#region ----- Services & Dependencies -----
486
+ this.translationService = inject(AXTranslationService);
487
+ //#endregion
488
+ //#region ----- Inputs -----
489
+ this.section = input.required(/* @ts-ignore */
490
+ ...(ngDevMode ? [{ debugName: "section" }] : /* istanbul ignore next */ []));
491
+ //#endregion
492
+ //#region ----- Computed Properties -----
493
+ this.locale = computed(() => this.translationService.getActiveLang() ?? 'en-US', /* @ts-ignore */
494
+ ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
495
+ this.kind = computed(() => resolveSafetyPlanSectionPreviewKind(this.section()), /* @ts-ignore */
496
+ ...(ngDevMode ? [{ debugName: "kind" }] : /* istanbul ignore next */ []));
497
+ this.title = computed(() => resolveSafetyPlanPreviewSectionTitle(this.section(), this.locale()), /* @ts-ignore */
498
+ ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
499
+ this.catalogItems = computed(() => collectSafetyPlanPreviewCatalogItems(this.section(), this.locale()), /* @ts-ignore */
500
+ ...(ngDevMode ? [{ debugName: "catalogItems" }] : /* istanbul ignore next */ []));
501
+ this.hasItems = computed(() => safetyPlanPreviewSectionHasItems(this.section()), /* @ts-ignore */
502
+ ...(ngDevMode ? [{ debugName: "hasItems" }] : /* istanbul ignore next */ []));
503
+ }
504
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMSafetyPlanSectionPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
505
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMSafetyPlanSectionPreviewComponent, isStandalone: true, selector: "axm-safety-plan-section-preview", inputs: { section: { classPropertyName: "section", publicName: "section", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.block": "hasItems()", "hidden": "!hasItems()" }, classAttribute: "axm-safety-plan-section-preview" }, ngImport: i0, template: "@if (hasItems()) {\n <!-- ----- Section with at least one item ----- -->\n <section class=\"axm-safety-plan-section-preview\">\n <header class=\"__header\">\n <h3 class=\"__title\">{{ title() }}</h3>\n </header>\n\n @switch (kind()) {\n @case ('work-step-table') {\n <axm-work-step-table-preview [section]=\"section()\" />\n }\n @case ('risk-matrix') {\n <axm-risk-matrix-preview [items]=\"catalogItems()\" />\n }\n @case ('ppe') {\n <axm-ppe-section-preview [items]=\"catalogItems()\" [layout]=\"section().widgetOptions?.layout\" />\n }\n @case ('hierarchy') {\n <axm-hierarchy-section-preview\n [items]=\"catalogItems()\"\n [viewType]=\"section().widgetOptions?.viewType\"\n [showTitle]=\"section().widgetOptions?.showTitle\"\n />\n }\n @default {\n <axm-catalog-section-preview [items]=\"catalogItems()\" />\n }\n }\n </section>\n}\n", styles: ["@layer properties;.axm-safety-plan-section-preview{display:block}.axm-safety-plan-section-preview .__header{margin-bottom:calc(var(--spacing, .25rem) * 3);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-surface));padding-bottom:calc(var(--spacing, .25rem) * 2)}.axm-safety-plan-section-preview .__title{margin:0;font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@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-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXMCatalogSectionPreviewComponent, selector: "axm-catalog-section-preview", inputs: ["items"] }, { kind: "component", type: AXMHierarchySectionPreviewComponent, selector: "axm-hierarchy-section-preview", inputs: ["items", "viewType", "showTitle"] }, { kind: "component", type: AXMPpeSectionPreviewComponent, selector: "axm-ppe-section-preview", inputs: ["items", "layout"] }, { kind: "component", type: AXMRiskMatrixPreviewComponent, selector: "axm-risk-matrix-preview", inputs: ["items"] }, { kind: "component", type: AXMWorkStepTablePreviewComponent, selector: "axm-work-step-table-preview", inputs: ["section"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
506
+ }
507
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMSafetyPlanSectionPreviewComponent, decorators: [{
508
+ type: Component,
509
+ args: [{ selector: 'axm-safety-plan-section-preview', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
510
+ AXMCatalogSectionPreviewComponent,
511
+ AXMHierarchySectionPreviewComponent,
512
+ AXMPpeSectionPreviewComponent,
513
+ AXMRiskMatrixPreviewComponent,
514
+ AXMWorkStepTablePreviewComponent,
515
+ ], host: {
516
+ class: 'axm-safety-plan-section-preview',
517
+ '[class.block]': 'hasItems()',
518
+ '[hidden]': '!hasItems()',
519
+ }, template: "@if (hasItems()) {\n <!-- ----- Section with at least one item ----- -->\n <section class=\"axm-safety-plan-section-preview\">\n <header class=\"__header\">\n <h3 class=\"__title\">{{ title() }}</h3>\n </header>\n\n @switch (kind()) {\n @case ('work-step-table') {\n <axm-work-step-table-preview [section]=\"section()\" />\n }\n @case ('risk-matrix') {\n <axm-risk-matrix-preview [items]=\"catalogItems()\" />\n }\n @case ('ppe') {\n <axm-ppe-section-preview [items]=\"catalogItems()\" [layout]=\"section().widgetOptions?.layout\" />\n }\n @case ('hierarchy') {\n <axm-hierarchy-section-preview\n [items]=\"catalogItems()\"\n [viewType]=\"section().widgetOptions?.viewType\"\n [showTitle]=\"section().widgetOptions?.showTitle\"\n />\n }\n @default {\n <axm-catalog-section-preview [items]=\"catalogItems()\" />\n }\n }\n </section>\n}\n", styles: ["@layer properties;.axm-safety-plan-section-preview{display:block}.axm-safety-plan-section-preview .__header{margin-bottom:calc(var(--spacing, .25rem) * 3);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:rgba(var(--ax-sys-color-surface));padding-bottom:calc(var(--spacing, .25rem) * 2)}.axm-safety-plan-section-preview .__title{margin:0;font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@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-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
520
+ }], propDecorators: { section: [{ type: i0.Input, args: [{ isSignal: true, alias: "section", required: true }] }] } });
521
+
522
+ //#region ----- Imports -----
523
+ //#endregion
524
+ //#region ----- Component -----
525
+ class AXMSafetyPlanPreviewModalComponent extends AXBasePageComponent {
526
+ constructor() {
527
+ super(...arguments);
528
+ //#region ----- Inputs -----
529
+ this.structure = input({ sections: [] }, /* @ts-ignore */
530
+ ...(ngDevMode ? [{ debugName: "structure" }] : /* istanbul ignore next */ []));
531
+ //#endregion
532
+ //#region ----- Computed Properties -----
533
+ this.sections = computed(() => {
534
+ const raw = this.safeInputValue(this.structure);
535
+ return [...normalizeSafetyPlanSectionBuilderValue(raw).sections]
536
+ .sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0))
537
+ .filter((section) => safetyPlanPreviewSectionHasItems(section));
538
+ }, /* @ts-ignore */
539
+ ...(ngDevMode ? [{ debugName: "sections" }] : /* istanbul ignore next */ []));
540
+ }
541
+ //#endregion
542
+ //#region ----- Helpers -----
543
+ safeInputValue(inputOrValue) {
544
+ return typeof inputOrValue === 'function' ? inputOrValue() : inputOrValue;
545
+ }
546
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMSafetyPlanPreviewModalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
547
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMSafetyPlanPreviewModalComponent, isStandalone: true, selector: "axm-safety-plan-preview-modal", inputs: { structure: { classPropertyName: "structure", publicName: "structure", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "axm-safety-plan-preview-modal-host flex flex-col w-full h-full" }, usesInheritance: true, ngImport: i0, template: "<div class=\"axm-safety-plan-preview-modal __content-area\">\n @if (sections().length === 0) {\n <!-- ----- Empty state when the plan has no sections ----- -->\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty' | translate | async }}\n </p>\n }\n <!-- ----- Read-only document blocks in configured section order ----- -->\n @else {\n <div class=\"__document\">\n @for (section of sections(); track section.id) {\n <axm-safety-plan-section-preview [section]=\"section\" />\n }\n </div>\n }\n</div>\n", styles: ["axm-safety-plan-preview-modal{display:flex;height:100%;max-height:90vh;min-height:0px;width:100%;flex:1;flex-direction:column;overflow:hidden}@media(width>=64rem){axm-safety-plan-preview-modal{max-height:75vh}}.axm-safety-plan-preview-modal{display:flex;min-height:0px;flex:1;flex-direction:column;overflow-y:auto;padding:calc(var(--spacing, .25rem) * 6)}.axm-safety-plan-preview-modal .__empty{margin:0;color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-safety-plan-preview-modal .__empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-safety-plan-preview-modal .__document{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 8)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXMSafetyPlanSectionPreviewComponent, selector: "axm-safety-plan-section-preview", inputs: ["section"] }, { kind: "pipe", type: i1.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
548
+ }
549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMSafetyPlanPreviewModalComponent, decorators: [{
550
+ type: Component,
551
+ args: [{ selector: 'axm-safety-plan-preview-modal', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXTranslationModule, AsyncPipe, AXMSafetyPlanSectionPreviewComponent], host: {
552
+ class: 'axm-safety-plan-preview-modal-host flex flex-col w-full h-full',
553
+ }, template: "<div class=\"axm-safety-plan-preview-modal __content-area\">\n @if (sections().length === 0) {\n <!-- ----- Empty state when the plan has no sections ----- -->\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty' | translate | async }}\n </p>\n }\n <!-- ----- Read-only document blocks in configured section order ----- -->\n @else {\n <div class=\"__document\">\n @for (section of sections(); track section.id) {\n <axm-safety-plan-section-preview [section]=\"section\" />\n }\n </div>\n }\n</div>\n", styles: ["axm-safety-plan-preview-modal{display:flex;height:100%;max-height:90vh;min-height:0px;width:100%;flex:1;flex-direction:column;overflow:hidden}@media(width>=64rem){axm-safety-plan-preview-modal{max-height:75vh}}.axm-safety-plan-preview-modal{display:flex;min-height:0px;flex:1;flex-direction:column;overflow-y:auto;padding:calc(var(--spacing, .25rem) * 6)}.axm-safety-plan-preview-modal .__empty{margin:0;color:rgba(var(--ax-sys-color-text-default))}@supports (color: color-mix(in lab,red,red)){.axm-safety-plan-preview-modal .__empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-text-default)) 80%,transparent)}}.axm-safety-plan-preview-modal .__document{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 8)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
554
+ }], propDecorators: { structure: [{ type: i0.Input, args: [{ isSignal: true, alias: "structure", required: false }] }] } });
555
+
556
+ export { AXMSafetyPlanPreviewModalComponent };
557
+ //# sourceMappingURL=acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-6i0RkG3L.mjs.map