@acorex-platform/module-workplacesafety-management-client 0.0.38 → 0.0.46
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.
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-Ds0Fkspp.mjs → acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-C3a08xjg.mjs} +79 -32
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-C3a08xjg.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-control-hierarchy-levels.mjs +19 -5
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-control-hierarchy-levels.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-control-measure.mjs +19 -5
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-control-measure.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-ppe-rule.mjs +19 -5
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-ppe-rule.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-register.mjs +19 -5
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-register.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-risk.mjs +22 -72
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard-risk.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard.mjs +20 -6
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-hazard.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-ppe-item.mjs +19 -5
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-ppe-item.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-activity.mjs +1516 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-activity.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-section.mjs +82 -12
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-section.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-type-section.mjs +82 -12
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-type-section.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-type.mjs +19 -5
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-type.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan.mjs +39 -6
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-template.mjs +20 -5
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-template.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-section-type.mjs +19 -5
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-section-type.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-work-step-type.mjs +82 -12
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-work-step-type.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-BI4TLvSE.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-C46YEBVd.mjs} +21 -21
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-C46YEBVd.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-hierarchy-levels.entity-COlCNnyK.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-hierarchy-levels.entity-oylKTsgJ.mjs} +16 -2
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-hierarchy-levels.entity-oylKTsgJ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-measure.entity-BrXGzqZU.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-measure.entity-DHm1nRwW.mjs} +16 -2
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-measure.entity-DHm1nRwW.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-ppe-rule.entity-DHJus7OP.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-ppe-rule.entity-DH-hPuAD.mjs} +16 -2
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-ppe-rule.entity-DH-hPuAD.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-register.entity-CogjoDox.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-register.entity-g4AT_IiT.mjs} +16 -2
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-register.entity-g4AT_IiT.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-risk.entity-9UWHmIXV.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-risk.entity-BwNlWbnC.mjs} +18 -72
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-risk.entity-BwNlWbnC.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard.entity-CNPbxULL.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard.entity-Cogwbd1P.mjs} +17 -3
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard.entity-Cogwbd1P.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-ppe-item.entity-D5iOBl3P.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-ppe-item.entity-0xqGaPnk.mjs} +16 -2
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-ppe-item.entity-0xqGaPnk.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-risk-management.integration-CUZIl8zt.mjs +7 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-risk-management.integration-CUZIl8zt.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-activity.entity-CZCYupQT.mjs +324 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-activity.entity-CZCYupQT.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section-dependency-TdIMIkM7.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section-dependency-D0fzHV_L.mjs} +62 -10
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section-dependency-D0fzHV_L.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section.entity-DJAI-7lB.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section.entity-BpziBgGf.mjs} +17 -3
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section.entity-DJAI-7lB.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section.entity-BpziBgGf.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type-section.entity-BGZ1VAW3.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type-section.entity-D8wL0ned.mjs} +17 -3
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type-section.entity-D8wL0ned.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type.entity-B6NYL4xi.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type.entity-DrqQDYn9.mjs} +16 -2
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type.entity-DrqQDYn9.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan.entity-BSUR9jqs.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan.entity-DaRnWCin.mjs} +36 -3
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan.entity-DaRnWCin.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-template.entity-CIHy_hLh.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-template.entity-Coj5Rzry.mjs} +17 -2
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-template.entity-Coj5Rzry.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-section-type.entity-Cs4nIHou.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-section-type.entity-BU5roQ5-.mjs} +16 -2
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-section-type.entity-BU5roQ5-.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-work-step-type.entity-CJFWDOoh.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-work-step-type.entity-DijGV30H.mjs} +17 -3
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-work-step-type.entity-DijGV30H.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts.mjs +144 -168
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-fill-safety-plan.command-lJl0qpvT.mjs +165 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-fill-safety-plan.command-lJl0qpvT.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-hydrate-safety-plan-activity-sections-TrVl3-T6.mjs +240 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-hydrate-safety-plan-activity-sections-TrVl3-T6.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-index-gbDgxqrV.mjs → acorex-platform-module-workplacesafety-management-client-index-CInaiEjw.mjs} +130 -398
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-index-CInaiEjw.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-load-safety-plan-preview-structure-Ce67NSIZ.mjs +136 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-load-safety-plan-preview-structure-Ce67NSIZ.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-local-entities.mjs +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-local-entities.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-preview-safety-plan.command-DJqqiYlD.mjs +102 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-preview-safety-plan.command-DJqqiYlD.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-fill-values.util-RLOdySf7.mjs +33 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-fill-values.util-RLOdySf7.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-CQ2xB7Va.mjs → acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-B9lElhxc.mjs} +252 -72
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-B9lElhxc.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-C0SEJsVM.mjs +185 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-C0SEJsVM.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-CLj3y_JD.mjs → acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-D0aRQHWk.mjs} +30 -94
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-D0aRQHWk.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workplacesafety-management-client.mjs +1 -1
- package/package.json +6 -6
- package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-activity.d.ts +5 -0
- package/types/acorex-platform-module-workplacesafety-management-client-contracts.d.ts +133 -157
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-Ds0Fkspp.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-work-step.mjs +0 -542
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-work-step.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-BI4TLvSE.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-hierarchy-levels.entity-COlCNnyK.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-measure.entity-BrXGzqZU.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-ppe-rule.entity-DHJus7OP.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-register.entity-CogjoDox.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-risk.entity-9UWHmIXV.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard.entity-CNPbxULL.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-ppe-item.entity-D5iOBl3P.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section-dependency-TdIMIkM7.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type-section.entity-BGZ1VAW3.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type.entity-B6NYL4xi.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-work-step.entity-BlCbf5qP.mjs +0 -405
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-work-step.entity-BlCbf5qP.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan.entity-BSUR9jqs.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-template.entity-CIHy_hLh.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-section-type.entity-Cs4nIHou.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-work-step-type.entity-CJFWDOoh.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-index-gbDgxqrV.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-preview-safety-plan.command-BU95c4xb.mjs +0 -254
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-preview-safety-plan.command-BU95c4xb.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-CQ2xB7Va.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-preview.service-DJP41MuL.mjs +0 -36
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-preview.service-DJP41MuL.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-LaN1NIgc.mjs +0 -204
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-LaN1NIgc.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-CLj3y_JD.mjs.map +0 -1
- package/types/acorex-platform-module-workplacesafety-management-client-contracts-entities-safety-plan-work-step.d.ts +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section-dependency-TdIMIkM7.mjs","sources":["../../../../libs/modules/workplacesafety-management/contracts/src/section-type-entity-map.ts","../../../../libs/modules/workplacesafety-management/contracts/src/safety-plan-section-unique-type.util.ts","../../../../libs/modules/workplacesafety-management/contracts/src/safety-plan-section-structure.util.ts","../../../../libs/modules/workplacesafety-management/contracts/src/safety-plan-section-dependency.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport type {\n AXMSectionTypeCode,\n AXMSectionTypeSnapshot,\n} from './entities/section-type/section-type.types';\n\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Built-in section type IDs ----\n\n/** Stable IDs for seeded built-in section types (shared by server mocks and client lookups). */\n\nexport const WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS = {\n hazard: 'c1d2e3f4-a5b6-4789-c001-000000000001',\n\n hazardRisk: 'c1d2e3f4-a5b6-4789-c001-000000000002',\n\n ppe: 'c1d2e3f4-a5b6-4789-c001-000000000003',\n\n control: 'c1d2e3f4-a5b6-4789-c001-000000000004',\n\n hierarchyLevel: 'c1d2e3f4-a5b6-4789-c001-000000000005',\n\n custom: 'c1d2e3f4-a5b6-4789-c001-000000000006',\n\n ppeHazards: 'c1d2e3f4-a5b6-4789-c001-000000000007',\n\n riskMatrix: 'c1d2e3f4-a5b6-4789-c001-000000000008',\n\n hazardRiskPpe: 'c1d2e3f4-a5b6-4789-c001-000000000009',\n\n stepTable: 'c1d2e3f4-a5b6-4789-c001-00000000000a',\n} as const;\n\nexport interface AXMBuiltInSectionTypeMeta {\n sectionTypeKey: AXMSectionTypeCode;\n\n itemEntityName?: string;\n\n /** When true, a safety plan may include this section type more than once. */\n isRepeatable?: boolean;\n}\n\nconst moduleName = RootConfig.module.name;\n\n/** Maps section type codes to the entity that supplies selectable items. */\n\nexport const WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE: Readonly<\n Record<AXMSectionTypeCode, string | undefined>\n> = {\n Hazard: `${moduleName}.${RootConfig.entities.hazard.name}`,\n\n HazardRisk: `${moduleName}.${RootConfig.entities.hazardRisk.name}`,\n\n Ppe: `${moduleName}.${RootConfig.entities.ppeItem.name}`,\n\n PpeHazards: `${moduleName}.${RootConfig.entities.hazardPpeRule.name}`,\n\n HazardRiskPpe: undefined,\n\n Control: `${moduleName}.${RootConfig.entities.controlMeasure.name}`,\n\n HierarchyLevel: `${moduleName}.${RootConfig.entities.controlHierarchyLevels.name}`,\n\n RiskMatrix: 'RiskManagement.RiskMatrixCell',\n\n Custom: undefined,\n\n /** Host section for SafetyPlanWorkStep rows (managed by the section builder, not a catalog picker). */\n StepTable: undefined,\n};\n\n/** Built-in section types resolved by stable section type id. */\n\nexport const WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID: Readonly<\n Record<string, AXMBuiltInSectionTypeMeta>\n> = {\n [WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.hazard]: {\n sectionTypeKey: 'Hazard',\n\n itemEntityName: WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE.Hazard,\n },\n\n [WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.hazardRisk]: {\n sectionTypeKey: 'HazardRisk',\n\n itemEntityName: WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE.HazardRisk,\n },\n\n [WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.ppe]: {\n sectionTypeKey: 'Ppe',\n\n itemEntityName: WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE.Ppe,\n },\n\n [WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.ppeHazards]: {\n sectionTypeKey: 'PpeHazards',\n\n itemEntityName: WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE.PpeHazards,\n },\n\n [WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.hazardRiskPpe]: {\n sectionTypeKey: 'HazardRiskPpe',\n\n itemEntityName: WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE.HazardRiskPpe,\n },\n\n [WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.control]: {\n sectionTypeKey: 'Control',\n\n itemEntityName: WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE.Control,\n },\n\n [WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.hierarchyLevel]: {\n sectionTypeKey: 'HierarchyLevel',\n\n itemEntityName: WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE.HierarchyLevel,\n },\n\n [WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.riskMatrix]: {\n sectionTypeKey: 'RiskMatrix',\n\n itemEntityName: WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE.RiskMatrix,\n },\n\n [WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.custom]: {\n sectionTypeKey: 'Custom',\n\n itemEntityName: WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE.Custom,\n\n isRepeatable: true,\n },\n\n [WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.stepTable]: {\n sectionTypeKey: 'StepTable',\n\n itemEntityName: WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE.StepTable,\n\n isRepeatable: true,\n },\n};\n\n/** Default entity so the lookup widget mounts before a section type is chosen. */\n\nexport const WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_FALLBACK = `${moduleName}.${RootConfig.entities.hazard.name}`;\n\n//#endregion\n\n//#region ---- Snapshot helpers ----\n\nexport function resolveSectionTypeKey(\n sectionTypeId: string | undefined,\n\n snapshot?: AXMSectionTypeSnapshot,\n): AXMSectionTypeCode | undefined {\n const fromSnapshot = snapshot?.sectionTypeKey;\n\n if (typeof fromSnapshot === 'string' && fromSnapshot.length > 0) {\n return fromSnapshot as AXMSectionTypeCode;\n }\n\n if (!sectionTypeId) {\n return undefined;\n }\n\n return WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID[sectionTypeId]\n ?.sectionTypeKey;\n}\n\nexport function resolveSectionItemEntityName(\n sectionTypeId: string | undefined,\n\n snapshot?: AXMSectionTypeSnapshot,\n): string | undefined {\n const fromSnapshot = snapshot?.itemEntityName;\n\n if (typeof fromSnapshot === 'string' && fromSnapshot.length > 0) {\n return fromSnapshot;\n }\n\n if (!sectionTypeId) {\n return undefined;\n }\n\n return WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID[sectionTypeId]\n ?.itemEntityName;\n}\n\n/** Adds runtime lookup metadata (`sectionTypeKey`, `itemEntityName`) from built-in id map. */\n\nexport function enrichSectionTypeSnapshot(\n sectionTypeId: string | undefined,\n\n snapshot?: AXMSectionTypeSnapshot,\n): AXMSectionTypeSnapshot | undefined {\n if (!sectionTypeId) {\n return snapshot;\n }\n\n return {\n ...snapshot,\n\n id: sectionTypeId,\n\n sectionTypeKey: resolveSectionTypeKey(sectionTypeId, snapshot),\n\n itemEntityName: resolveSectionItemEntityName(sectionTypeId, snapshot),\n\n isRepeatable:\n snapshot?.isRepeatable ??\n WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID[sectionTypeId]?.isRepeatable,\n };\n}\n\n//#endregion\n\n//#region ---- Dynamic entity expressions ----\n\nfunction buildSectionTypeEntityExpressionById(\n sectionTypeIdPath: string,\n): string {\n const parts = Object.entries(WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID)\n\n .filter(([, meta]) => meta.itemEntityName)\n\n .map(\n ([id, meta]) =>\n `context.eval('${sectionTypeIdPath}') === '${id}' ? '${meta.itemEntityName}'`,\n );\n\n return `{{ ${parts.join(' : ')} : '${WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_FALLBACK}' }}`;\n}\n\nfunction buildSectionTypeEntityExpressionWithSnapshotFallback(\n sectionTypeIdPath: string,\n itemEntityNamePath: string,\n): string {\n const byId = buildSectionTypeEntityExpressionById(sectionTypeIdPath).slice(3, -2);\n return `{{ context.eval('${itemEntityNamePath}') || (${byId}) }}`;\n}\n\n/**\n * For repeater / nested FormField widgets — `>` walks up to the row where `sectionType` is exposed.\n */\n\nexport const WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_EXPRESSION =\n buildSectionTypeEntityExpressionWithSnapshotFallback(\n '>sectionType.id',\n\n '>sectionType.itemEntityName',\n );\n\n/**\n * For flat dialog / dynamic forms — sibling fields share the same context (no parent path).\n */\nexport const WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_EXPRESSION_SIBLING =\n buildSectionTypeEntityExpressionWithSnapshotFallback(\n 'sectionType.id',\n 'sectionType.itemEntityName',\n );\n\n//#endregion\n","/**\n * Shared helpers for Safety Plan Section type identity (repeatable vs one-off).\n * Leaf module — imports only other contract leaves (no client/server layers).\n */\n\nimport { WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID } from './section-type-entity-map';\n\n//#region ---- Helpers ----\n\nfunction resolveRefId(raw: unknown): string {\n if (typeof raw === 'string' && raw.trim().length > 0) {\n return raw.trim();\n }\n if (typeof raw === 'number' && Number.isFinite(raw)) {\n return String(raw);\n }\n if (raw && typeof raw === 'object') {\n const id = (raw as { id?: unknown }).id;\n if (typeof id === 'string' && id.trim().length > 0) {\n return id.trim();\n }\n }\n return '';\n}\n\n/**\n * True when this section type may appear more than once in a Safety Plan.\n * Checks (in order): snapshot flag, explicit allow-list, built-in section type meta.\n */\nexport function isSafetyPlanSectionTypeRepeatable(\n sectionTypeId: string,\n options?: {\n repeatableSectionTypeIds?: readonly string[];\n sectionType?: { isRepeatable?: boolean };\n },\n): boolean {\n const id = resolveRefId(sectionTypeId);\n if (!id) {\n return false;\n }\n if (options?.sectionType?.isRepeatable === true) {\n return true;\n }\n const allowList = new Set(\n (options?.repeatableSectionTypeIds ?? []).map((entry) => resolveRefId(entry)).filter(Boolean),\n );\n if (allowList.has(id)) {\n return true;\n }\n return WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID[id]?.isRepeatable === true;\n}\n\n/** Built-in section type ids that are always treated as repeatable. */\nexport function collectBuiltInRepeatableSectionTypeIds(): string[] {\n return Object.entries(WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID)\n .filter(([, meta]) => meta.isRepeatable === true)\n .map(([id]) => id);\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { createRandomUuid } from '@acorex-platform/framework-shared/core';\nimport type {\n AXMSafetyPlanSectionBuilderSectionValue,\n AXMSafetyPlanSectionBuilderValue,\n} from './safety-plan-section-builder.types';\nimport type {\n AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel,\n AXMWorkplaceSafetyManagementSafetyPlanTypeSectionTypeItemModel,\n} from './entities/safety-plan-type-section/safety-plan-type-section.types';\nimport type { AXMSectionTypeSnapshot } from './entities/section-type/section-type.types';\nimport { WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID } from './section-type-entity-map';\nimport { isSafetyPlanSectionTypeRepeatable } from './safety-plan-section-unique-type.util';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface AXMSafetyPlanSectionStructureItem {\n id: string;\n sectionTypeId: string;\n sectionType?: AXMSectionTypeSnapshot;\n title: string;\n description?: string;\n /** Links the plan section back to the type template it was created from. */\n sourceSafetyPlanTypeSectionId?: string;\n /** Display / persistence order (1-based). */\n sortOrder: number;\n /** True when sourced from an `isDefault` type section — must remain on the plan. */\n required?: boolean;\n items: Array<{\n id: string;\n itemIds: string[];\n items?: { id: string; title?: string; code?: string }[];\n }>;\n safetyPlanId?: string;\n code?: string;\n}\n\nexport interface AXMSafetyPlanSectionStructureValue {\n sections: AXMSafetyPlanSectionStructureItem[];\n}\n\nexport interface AXMSafetyPlanSectionStructureValidationContext {\n /** Section type ids allowed for this plan type (from its type-section config). */\n allowedSectionTypeIds: readonly string[];\n /** Source type-section ids that must remain present. */\n requiredSourceTypeSectionIds: readonly string[];\n /** Section type ids that may appear more than once on a plan. */\n repeatableSectionTypeIds?: readonly string[];\n}\n\nexport type AXMSafetyPlanSectionStructureValidationIssueCode =\n | 'REQUIRED_SECTION_MISSING'\n | 'SECTION_TYPE_NOT_ALLOWED'\n | 'INVALID_TYPE_SECTION_TEMPLATE'\n | 'INVALID_SORT_ORDER';\n\nexport interface AXMSafetyPlanSectionStructureValidationIssue {\n code: AXMSafetyPlanSectionStructureValidationIssueCode;\n messageKey: string;\n details?: Record<string, unknown>;\n}\n\n//#endregion\n\n//#region ---- Display helpers ----\n\n/** Coerces a stored string or locale map into a single display string. */\nexport function asSafetyPlanDisplayText(value: unknown): string {\n if (typeof value === 'string') {\n return value.trim();\n }\n if (value && typeof value === 'object' && !Array.isArray(value)) {\n const rec = value as Record<string, unknown>;\n for (const locale of ['en-US', 'en-AU', 'en', 'fa-IR']) {\n const part = rec[locale];\n if (typeof part === 'string' && part.trim()) {\n return part.trim();\n }\n }\n for (const part of Object.values(rec)) {\n if (typeof part === 'string' && part.trim()) {\n return part.trim();\n }\n }\n }\n return '';\n}\n\nexport function buildSectionTypeRelationSnapshot(\n sectionTypeId: string,\n snapshot?: {\n title?: unknown;\n code?: unknown;\n description?: unknown;\n isRepeatable?: unknown;\n } | null,\n): AXMSectionTypeSnapshot {\n const title = asSafetyPlanDisplayText(snapshot?.title);\n const code = asSafetyPlanDisplayText(snapshot?.code);\n const description = asSafetyPlanDisplayText(snapshot?.description);\n return {\n id: sectionTypeId,\n ...(title ? { title } : {}),\n ...(code ? { code } : {}),\n ...(description ? { description } : {}),\n ...(snapshot?.isRepeatable === true ? { isRepeatable: true } : {}),\n };\n}\n\nfunction resolveSectionTypeTitle(\n sectionTypeId: string,\n sectionType?: { title?: unknown; code?: unknown } | null,\n): string {\n const title = asSafetyPlanDisplayText(sectionType?.title);\n if (title) {\n return title;\n }\n const code = asSafetyPlanDisplayText(sectionType?.code);\n if (code) {\n return code;\n }\n const builtIn = WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID[sectionTypeId]?.sectionTypeKey;\n if (builtIn) {\n return builtIn;\n }\n return sectionTypeId;\n}\n\n/**\n * Title persisted on SafetyPlanSection. Never stores a bare UUID — the UI translate\n * pipe treats unknown keys as empty, which made seeded section headers blank.\n */\nexport function resolveSafetyPlanSectionPersistedTitle(\n sectionTitle: unknown,\n sectionTypeId: string,\n snapshot?: { title?: unknown; code?: unknown } | null,\n): string {\n const explicit = asSafetyPlanDisplayText(sectionTitle);\n if (explicit && explicit !== sectionTypeId) {\n return explicit;\n }\n const fromType = resolveSectionTypeTitle(sectionTypeId, snapshot);\n if (fromType && fromType !== sectionTypeId) {\n return fromType;\n }\n return 'Section';\n}\n\n//#endregion\n\n//#region ---- Ref helpers ----\n\n/** True when a type-section row is marked as the plan-type default template. */\nexport function isSafetyPlanTypeSectionDefault(row: { isDefault?: unknown } | null | undefined): boolean {\n const value = row?.isDefault;\n return value === true || value === 1 || value === 'true';\n}\n\n/**\n * Returns the default Safety Plan Type Section (structure) for a plan type.\n * Prefers `isDefault: true`; otherwise the first active row by sortOrder/title.\n */\nexport function resolveDefaultSafetyPlanTypeSection(\n typeSections: readonly AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel[],\n): AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel | null {\n const active = typeSections\n .filter((row) => row && row.isArchived !== true)\n .slice()\n .sort(\n (a, b) =>\n (a.sortOrder ?? 0) - (b.sortOrder ?? 0) || String(a.title ?? '').localeCompare(String(b.title ?? '')),\n );\n if (!active.length) {\n return null;\n }\n return active.find((row) => isSafetyPlanTypeSectionDefault(row)) ?? active[0] ?? null;\n}\n\n/**\n * Narrows type-section rows to the selected structure when `structureId` is set.\n * Falls back to all active rows (caller / build still applies isDefault rules).\n */\nexport function pickSafetyPlanTypeSectionsForStructure(\n typeSections: readonly AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel[],\n structureId?: string | null,\n): AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel[] {\n const active = typeSections.filter((row) => row && row.isArchived !== true);\n const id = typeof structureId === 'string' ? structureId.trim() : '';\n if (!id) {\n return active;\n }\n const selected = active.filter((row) => resolveEntityRefId(row.id) === id);\n return selected.length ? selected : active;\n}\n\n/** Extracts a stable entity id from a raw lookup / context value. */\nexport function resolveEntityRefId(raw: unknown): string | null {\n if (typeof raw === 'string' && raw.trim().length > 0) {\n return raw.trim();\n }\n if (typeof raw === 'number' && Number.isFinite(raw)) {\n return String(raw);\n }\n if (raw && typeof raw === 'object') {\n const id = (raw as { id?: unknown }).id;\n if (typeof id === 'string' && id.trim().length > 0) {\n return id.trim();\n }\n }\n return null;\n}\n\nfunction resolveSectionTypeId(\n typeRow: AXMWorkplaceSafetyManagementSafetyPlanTypeSectionTypeItemModel | null | undefined,\n): string {\n if (!typeRow) {\n return '';\n }\n return (\n resolveEntityRefId(typeRow.sectionTypeId) ??\n resolveEntityRefId(typeRow.sectionType) ??\n resolveEntityRefId(typeRow.sectionType?.id) ??\n ''\n );\n}\n\n//#endregion\n\n//#region ---- Build from type sections ----\n\nlet structureIdSeq = 0;\nfunction nextStructureId(prefix: string): string {\n structureIdSeq += 1;\n const rand = createRandomUuid();\n return prefix ? `${prefix}-${rand}` : rand;\n}\n\n/**\n * Builds an empty editable section structure from SafetyPlanTypeSection rows for one plan type.\n *\n * Uses `isDefault` rows when present; otherwise falls back to all active rows for that type\n * (so a mis-flagged template still produces a structure). One plan section per `sectionTypeIds`\n * entry, titled from the Section Type, ordered by type-section `sortOrder` then repeater order.\n */\nexport function buildSectionStructureFromTypeSections(\n typeSections: readonly AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel[],\n options?: { createId?: () => string },\n): AXMSafetyPlanSectionStructureValue {\n const createId = options?.createId ?? (() => nextStructureId(''));\n const active = typeSections\n .filter((row) => row && row.isArchived !== true)\n .slice()\n .sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0) || String(a.title ?? '').localeCompare(String(b.title ?? '')));\n\n const defaults = active.filter((row) => isSafetyPlanTypeSectionDefault(row));\n const sourceRows = defaults.length > 0 ? defaults : active;\n\n const sections: AXMSafetyPlanSectionStructureItem[] = [];\n const seenSourceTypePairs = new Set<string>();\n let sortOrder = 1;\n\n for (const typeSection of sourceRows) {\n const typeRows = Array.isArray(typeSection.sectionTypeIds) ? typeSection.sectionTypeIds : [];\n if (!typeRows.length) {\n continue;\n }\n\n for (const typeRow of typeRows) {\n const sectionTypeId = resolveSectionTypeId(typeRow);\n if (!sectionTypeId) {\n continue;\n }\n\n // One plan section per (type-section source, section type) — prevents\n // accidental double expansion when the same type is listed twice.\n const sourceId = typeof typeSection.id === 'string' ? typeSection.id : '';\n const pairKey = sourceId ? `${sourceId}|${sectionTypeId}` : sectionTypeId;\n if (seenSourceTypePairs.has(pairKey)) {\n continue;\n }\n seenSourceTypePairs.add(pairKey);\n\n const sectionType = buildSectionTypeRelationSnapshot(sectionTypeId, typeRow.sectionType);\n const sectionId = createId();\n sections.push({\n id: sectionId,\n sectionTypeId,\n sectionType,\n title: resolveSafetyPlanSectionPersistedTitle(undefined, sectionTypeId, sectionType),\n description: asSafetyPlanDisplayText(sectionType.description),\n sourceSafetyPlanTypeSectionId: typeSection.id,\n sortOrder: sortOrder++,\n required: isSafetyPlanTypeSectionDefault(typeSection) || defaults.length === 0,\n items: [\n {\n id: `${sectionId}__item_1`,\n itemIds: [],\n items: [],\n },\n ],\n });\n }\n }\n\n return { sections };\n}\n\n/**\n * Removes accidental ghost rows from double materialization of the same type-section\n * source. Distinct sections of the same type are kept. Reassigns contiguous 1-based\n * `sortOrder` to preserve display order.\n */\nexport function dedupeSafetyPlanSectionStructure<\n T extends AXMSafetyPlanSectionStructureValue | AXMSafetyPlanSectionBuilderValue,\n>(\n structure: T,\n _options?: { repeatableSectionTypeIds?: readonly string[] },\n): T {\n type Section = AXMSafetyPlanSectionStructureItem | AXMSafetyPlanSectionBuilderSectionValue;\n\n const sections: readonly Section[] = Array.isArray(structure?.sections)\n ? (structure.sections as readonly Section[])\n : [];\n const seenSourceTypePairs = new Set<string>();\n const deduped: Section[] = [];\n\n for (const section of sections) {\n const sectionTypeId = resolveEntityRefId(section.sectionTypeId) ?? String(section.sectionTypeId ?? '').trim();\n if (!sectionTypeId) {\n continue;\n }\n\n const sourceId = String(section.sourceSafetyPlanTypeSectionId ?? '').trim();\n const sourcePairKey = sourceId ? `${sourceId}|${sectionTypeId}` : '';\n\n // Same type-section source + section type must never appear twice (double materialization).\n if (sourcePairKey && seenSourceTypePairs.has(sourcePairKey)) {\n continue;\n }\n\n if (sourcePairKey) {\n seenSourceTypePairs.add(sourcePairKey);\n }\n deduped.push(section);\n }\n\n return {\n ...structure,\n sections: deduped.map((section, index) => ({\n ...section,\n sortOrder: index + 1,\n })),\n } as T;\n}\n\nexport function collectAllowedSectionTypeIds(\n typeSections: readonly AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel[],\n): string[] {\n const ids = new Set<string>();\n for (const typeSection of typeSections) {\n if (typeSection.isArchived === true) {\n continue;\n }\n for (const row of typeSection.sectionTypeIds ?? []) {\n const id = resolveSectionTypeId(row);\n if (id) {\n ids.add(id);\n }\n }\n }\n return [...ids];\n}\n\nexport function collectRequiredSourceTypeSectionIds(\n typeSections: readonly AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel[],\n options?: { structureId?: string | null },\n): string[] {\n const structureId =\n typeof options?.structureId === 'string' && options.structureId.trim()\n ? options.structureId.trim()\n : '';\n if (structureId) {\n const selected = typeSections.find(\n (row) => row.isArchived !== true && resolveEntityRefId(row.id) === structureId,\n );\n return selected?.id && typeof selected.id === 'string' ? [selected.id] : [structureId];\n }\n\n return typeSections\n .filter((row) => row.isArchived !== true && isSafetyPlanTypeSectionDefault(row))\n .map((row) => row.id)\n .filter((id): id is string => typeof id === 'string' && id.length > 0);\n}\n\n/**\n * Validates that a plan-type section template does not list the same\n * non-repeatable section type more than once (across rows and within a single row's repeater).\n */\nexport function validateSafetyPlanTypeSectionTemplate(\n typeSections: readonly AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel[],\n repeatableSectionTypeIds: readonly string[] = [],\n): AXMSafetyPlanSectionStructureValidationIssue[] {\n const seen = new Map<string, { title: string; sourceSafetyPlanTypeSectionId?: string }>();\n const issues: AXMSafetyPlanSectionStructureValidationIssue[] = [];\n\n for (const typeSection of typeSections) {\n if (typeSection.isArchived === true) {\n continue;\n }\n for (const row of typeSection.sectionTypeIds ?? []) {\n const sectionTypeId = resolveSectionTypeId(row);\n if (\n !sectionTypeId ||\n isSafetyPlanSectionTypeRepeatable(sectionTypeId, {\n repeatableSectionTypeIds,\n sectionType: row.sectionType as { isRepeatable?: boolean } | undefined,\n })\n ) {\n continue;\n }\n const sectionTypeTitle = resolveSafetyPlanSectionPersistedTitle(\n undefined,\n sectionTypeId,\n row.sectionType,\n );\n if (seen.has(sectionTypeId)) {\n issues.push({\n code: 'INVALID_TYPE_SECTION_TEMPLATE',\n messageKey:\n '@workplacesafety-management:safety-plans.messages.section-structure.invalid-type-template-duplicate',\n details: {\n sectionTypeId,\n sectionTypeTitle,\n sourceSafetyPlanTypeSectionId: typeSection.id,\n previousSourceSafetyPlanTypeSectionId: seen.get(sectionTypeId)?.sourceSafetyPlanTypeSectionId,\n },\n });\n continue;\n }\n seen.set(sectionTypeId, {\n title: sectionTypeTitle,\n sourceSafetyPlanTypeSectionId: typeSection.id,\n });\n }\n }\n\n return issues;\n}\n\n//#endregion\n\n//#region ---- Validation ----\n\nexport function validateSafetyPlanSectionStructure(\n structure: AXMSafetyPlanSectionStructureValue | AXMSafetyPlanSectionBuilderValue | null | undefined,\n context: AXMSafetyPlanSectionStructureValidationContext,\n): AXMSafetyPlanSectionStructureValidationIssue[] {\n const sections = Array.isArray(structure?.sections) ? structure!.sections : [];\n const issues: AXMSafetyPlanSectionStructureValidationIssue[] = [];\n\n const presentSourceIds = new Set(\n sections\n .map((s) => (s as AXMSafetyPlanSectionStructureItem).sourceSafetyPlanTypeSectionId)\n .filter((id): id is string => typeof id === 'string' && id.length > 0),\n );\n\n for (const requiredSourceId of context.requiredSourceTypeSectionIds) {\n if (!presentSourceIds.has(requiredSourceId)) {\n issues.push({\n code: 'REQUIRED_SECTION_MISSING',\n messageKey:\n '@workplacesafety-management:safety-plans.messages.section-structure.required-section-missing',\n details: { sourceSafetyPlanTypeSectionId: requiredSourceId },\n });\n }\n }\n\n const allowed = new Set(context.allowedSectionTypeIds);\n\n const sortOrders: number[] = [];\n for (const section of sections) {\n const sectionTypeId =\n resolveEntityRefId((section as { sectionTypeId?: unknown }).sectionTypeId) ??\n String((section as { sectionTypeId?: string }).sectionTypeId ?? '').trim();\n if (!sectionTypeId) {\n continue;\n }\n\n const sectionType = (section as { sectionType?: { title?: string; code?: string; isRepeatable?: boolean } })\n .sectionType;\n const sectionTypeTitle = resolveSafetyPlanSectionPersistedTitle(\n undefined,\n sectionTypeId,\n sectionType,\n );\n\n if (allowed.size > 0 && !allowed.has(sectionTypeId)) {\n issues.push({\n code: 'SECTION_TYPE_NOT_ALLOWED',\n messageKey:\n '@workplacesafety-management:safety-plans.messages.section-structure.section-type-not-allowed',\n details: { sectionTypeId, sectionTypeTitle, sectionId: (section as { id?: string }).id },\n });\n }\n\n const sortOrder = (section as AXMSafetyPlanSectionStructureItem).sortOrder;\n if (typeof sortOrder === 'number' && Number.isFinite(sortOrder)) {\n sortOrders.push(sortOrder);\n }\n }\n\n if (sortOrders.length !== sections.length) {\n issues.push({\n code: 'INVALID_SORT_ORDER',\n messageKey: '@workplacesafety-management:safety-plans.messages.section-structure.invalid-sort-order',\n });\n } else {\n const unique = new Set(sortOrders);\n if (unique.size !== sortOrders.length) {\n issues.push({\n code: 'INVALID_SORT_ORDER',\n messageKey: '@workplacesafety-management:safety-plans.messages.section-structure.invalid-sort-order',\n details: { reason: 'duplicate' },\n });\n }\n }\n\n return issues;\n}\n\nexport function toBuilderValueFromStructure(\n structure: AXMSafetyPlanSectionStructureValue,\n): AXMSafetyPlanSectionBuilderValue {\n return {\n sections: structure.sections.map((section) => ({\n id: section.id,\n sectionTypeId: section.sectionTypeId,\n sectionType: section.sectionType,\n title: section.title,\n description: section.description ?? '',\n safetyPlanId: section.safetyPlanId,\n code: section.code,\n sourceSafetyPlanTypeSectionId: section.sourceSafetyPlanTypeSectionId,\n sortOrder: section.sortOrder,\n required: section.required,\n items: section.items.map((item) => ({\n id: item.id,\n itemIds: [...(item.itemIds ?? [])],\n items: item.items ? [...item.items] : [],\n })),\n })),\n };\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXMSectionTypeCode, AXMSectionTypeSnapshot } from './entities/section-type/section-type.types';\nimport type {\n AXMSafetyPlanSectionBuilderItemValue,\n AXMSafetyPlanSectionBuilderSectionValue,\n AXMSafetyPlanSectionBuilderValue,\n} from './safety-plan-section-builder.types';\nimport {\n resolveSectionItemEntityName,\n resolveSectionTypeKey,\n WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID,\n WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS,\n} from './section-type-entity-map';\nimport { asSafetyPlanDisplayText } from './safety-plan-section-structure.util';\n\n//#endregion\n\n//#region ---- Dependency config ----\n\n/** Parent section type whose selected item IDs constrain the child lookup. */\nexport interface AXMSectionTypeParentFilterDependency {\n kind: 'parentFilter';\n parentSectionTypeKey: AXMSectionTypeCode;\n /** Field on the child lookup entity used for filtering (e.g. `hazardId`). */\n filterField: string;\n}\n\n/** Child lookup is filtered by IDs derived from parent entity records (e.g. `riskMatrixId` on HazardRisk). */\nexport interface AXMSectionTypeDerivedFilterDependency {\n kind: 'derivedFromParent';\n parentSectionTypeKey: AXMSectionTypeCode;\n /** Field path on the parent entity record used to resolve filter values. */\n resolveField: 'riskMatrixId';\n /** Field on the child lookup entity (typically `id`). */\n filterField: string;\n}\n\nexport type AXMSectionTypeDependency =\n | AXMSectionTypeParentFilterDependency\n | AXMSectionTypeDerivedFilterDependency;\n\n/** Declarative section-type dependencies resolved from prior sections in plan order. */\nexport const WORKPLACE_SAFETY_SECTION_TYPE_DEPENDENCIES: Partial<\n Record<AXMSectionTypeCode, AXMSectionTypeDependency>\n> = {\n HazardRisk: {\n kind: 'parentFilter',\n parentSectionTypeKey: 'Hazard',\n filterField: 'hazardId',\n },\n PpeHazards: {\n kind: 'parentFilter',\n parentSectionTypeKey: 'Hazard',\n filterField: 'hazardId',\n },\n HazardRiskPpe: {\n kind: 'parentFilter',\n parentSectionTypeKey: 'HazardRisk',\n filterField: 'hazardRiskId',\n },\n RiskMatrix: {\n kind: 'derivedFromParent',\n parentSectionTypeKey: 'HazardRisk',\n resolveField: 'riskMatrixId',\n filterField: 'id',\n },\n};\n\n/** Section types cleared when upstream hazard selections change. */\nexport const WORKPLACE_SAFETY_DOWNSTREAM_FROM_HAZARD: readonly AXMSectionTypeCode[] = [\n 'HazardRisk',\n 'PpeHazards',\n 'HazardRiskPpe',\n 'RiskMatrix',\n];\n\n/** Section types cleared when upstream hazard-risk selections change. */\nexport const WORKPLACE_SAFETY_DOWNSTREAM_FROM_HAZARD_RISK: readonly AXMSectionTypeCode[] = [\n 'HazardRiskPpe',\n 'RiskMatrix',\n];\n\nexport type AXMHazardRiskRecordLoader = (hazardRiskIds: string[]) => Promise<Record<string, unknown>[]>;\n\n//#endregion\n\n//#region ---- Lookup helpers ----\n\nexport const PARENT_HAZARD_IDS_CONTEXT_KEY = 'parentHazardIds';\n\nexport const PARENT_HAZARD_RISK_IDS_CONTEXT_KEY = 'parentHazardRiskIds';\n\n/** Expose paths when a section type is selected (shared by entity repeater and builder dialog). */\nexport const WORKPLACE_SAFETY_SECTION_TYPE_LOOKUP_EXPOSE = [\n { source: 'id', target: 'sectionType.id' },\n { source: 'title', target: 'sectionType.title' },\n { source: 'code', target: 'sectionType.code' },\n { source: 'description', target: 'sectionType.description' },\n { source: 'isRepeatable', target: 'sectionType.isRepeatable' },\n];\n\n/** Auto-fill section description when section type is selected. */\nexport const WORKPLACE_SAFETY_SECTION_TYPE_DESCRIPTION_SYNC_TRIGGERS = [\n {\n event: \"{{ events.context('sectionTypeId') }}\",\n action:\n \"{{ const items = widget.output('selectedItems'); const selectedDescription = Array.isArray(items) ? items[0]?.description : undefined; const d = selectedDescription || context.eval('sectionType.description') || ''; context.set('sectionTypeDescription', d); const descriptionWidget = widget.find('sectionTypeDescription'); if (descriptionWidget) { descriptionWidget.setValue(d); } }}\",\n },\n {\n event: \"{{ events.context('sectionType.description') }}\",\n action:\n \"{{ const d = context.eval('sectionType.description') || ''; context.set('sectionTypeDescription', d); const descriptionWidget = widget.find('sectionTypeDescription'); if (descriptionWidget) { descriptionWidget.setValue(d); } }}\",\n },\n];\n\n/** Auto-fill section title when section type is selected. */\nexport const WORKPLACE_SAFETY_SECTION_TYPE_TITLE_SYNC_TRIGGERS = [\n {\n event: \"{{ events.context('sectionTypeId') }}\",\n action:\n \"{{ const items = widget.output('selectedItems'); const selectedTitle = Array.isArray(items) ? items[0]?.title : undefined; const t = selectedTitle || context.eval('sectionType.title') || ''; if (t) { context.set('title', t); const titleWidget = widget.find('title'); if (titleWidget) { titleWidget.setValue(t); } } }}\",\n },\n {\n event: \"{{ events.context('sectionType.title') }}\",\n action:\n \"{{ const t = context.eval('sectionType.title') || ''; if (t) { context.set('title', t); const titleWidget = widget.find('title'); if (titleWidget) { titleWidget.setValue(t); } } }}\",\n },\n];\n\n/** Shared lookup widget options for section type pickers (builder dialog and entity forms). */\nexport const WORKPLACE_SAFETY_SECTION_TYPE_LOOKUP_WIDGET_OPTIONS: Record<string, unknown> = {\n look: 'select',\n allowSearch: true,\n textField: 'code',\n textTemplate: '{code} — {description}',\n valueField: 'id',\n columns: ['code', 'title', 'description'],\n expose: WORKPLACE_SAFETY_SECTION_TYPE_LOOKUP_EXPOSE,\n triggers: [\n ...WORKPLACE_SAFETY_SECTION_TYPE_TITLE_SYNC_TRIGGERS,\n ...WORKPLACE_SAFETY_SECTION_TYPE_DESCRIPTION_SYNC_TRIGGERS,\n ],\n};\n\n//#endregion\n\n//#region ---- Resolver API ----\n\nexport function getSectionTypeDependency(\n sectionTypeKey: string | undefined,\n): AXMSectionTypeDependency | undefined {\n if (!sectionTypeKey) {\n return undefined;\n }\n return WORKPLACE_SAFETY_SECTION_TYPE_DEPENDENCIES[sectionTypeKey as AXMSectionTypeCode];\n}\n\nexport function sectionTypeKeyFromSection(\n section: Pick<AXMSafetyPlanSectionBuilderSectionValue, 'sectionType' | 'sectionTypeId'>,\n): AXMSectionTypeCode | undefined {\n const sectionTypeId = section.sectionTypeId || section.sectionType?.id;\n const key = resolveSectionTypeKey(sectionTypeId, section.sectionType);\n return key;\n}\n\nfunction collectSectionItemIds(\n section: AXMSafetyPlanSectionBuilderSectionValue | undefined,\n sectionTypeKey: AXMSectionTypeCode,\n): string[] {\n if (!section?.items?.length || sectionTypeKeyFromSection(section) !== sectionTypeKey) {\n return [];\n }\n const ids = new Set<string>();\n for (const item of section.items) {\n for (const id of item.itemIds ?? []) {\n if (typeof id === 'string' && id.length > 0) {\n ids.add(id);\n }\n }\n }\n return [...ids];\n}\n\n/** Collects item IDs from sections up to `sectionIndex` whose type matches `parentSectionTypeKey`. */\nexport function resolveParentItemIds(\n sections: AXMSafetyPlanSectionBuilderSectionValue[],\n sectionIndex: number,\n parentSectionTypeKey: AXMSectionTypeCode,\n): string[] {\n const ids = new Set<string>();\n const lastIndex = Math.min(sectionIndex, sections.length - 1);\n for (let index = 0; index <= lastIndex; index += 1) {\n collectSectionItemIds(sections[index], parentSectionTypeKey).forEach((id) => ids.add(id));\n }\n return [...ids];\n}\n\n/** Collects hazard IDs from earlier sections and Hazard rows in the current section. */\nexport function resolveParentHazardIds(\n sections: AXMSafetyPlanSectionBuilderSectionValue[],\n sectionIndex: number,\n parentSectionTypeKey: AXMSectionTypeCode = 'Hazard',\n): string[] {\n return resolveParentItemIds(sections, sectionIndex, parentSectionTypeKey);\n}\n\n/** Collects hazard-risk IDs from prior HazardRisk sections up to `sectionIndex`. */\nexport function resolveParentHazardRiskIds(\n sections: AXMSafetyPlanSectionBuilderSectionValue[],\n sectionIndex: number,\n): string[] {\n return resolveParentItemIds(sections, sectionIndex, 'HazardRisk');\n}\n\nfunction parentItemSignature(\n sections: AXMSafetyPlanSectionBuilderSectionValue[],\n sectionIndex: number,\n parentSectionTypeKey: AXMSectionTypeCode,\n): string {\n return resolveParentItemIds(sections, sectionIndex, parentSectionTypeKey).sort().join('|');\n}\n\nfunction shouldClearSectionOnParentChange(\n section: AXMSafetyPlanSectionBuilderSectionValue,\n sectionIndex: number,\n changeIndex: number,\n parentTypeKey: AXMSectionTypeCode,\n downstreamTypes: readonly AXMSectionTypeCode[],\n): boolean {\n if (sectionIndex < changeIndex) {\n return false;\n }\n const sectionKey = sectionTypeKeyFromSection(section);\n if (!sectionKey || !downstreamTypes.includes(sectionKey)) {\n return false;\n }\n if (sectionIndex === changeIndex && sectionKey === parentTypeKey) {\n return false;\n }\n return section.items.some((item) => (item.itemIds?.length ?? 0) > 0);\n}\n\nfunction clearSectionItems(\n section: AXMSafetyPlanSectionBuilderSectionValue,\n): AXMSafetyPlanSectionBuilderSectionValue {\n return {\n ...section,\n items: section.items.map((item) => ({ ...item, itemIds: [], items: [] })),\n };\n}\n\n/**\n * When upstream hazard or hazard-risk selections change, clears item rows in later dependent sections.\n */\nexport function clearDependentItemsOnParentChange(\n previous: AXMSafetyPlanSectionBuilderValue,\n next: AXMSafetyPlanSectionBuilderValue,\n): AXMSafetyPlanSectionBuilderValue {\n if (!next.sections.length) {\n return next;\n }\n\n let changeIndex = next.sections.length;\n let hazardChanged = false;\n let hazardRiskChanged = false;\n\n for (let index = 0; index < next.sections.length; index += 1) {\n const prevHazardSig = parentItemSignature(previous.sections, index, 'Hazard');\n const nextHazardSig = parentItemSignature(next.sections, index, 'Hazard');\n if (prevHazardSig !== nextHazardSig) {\n changeIndex = Math.min(changeIndex, index);\n hazardChanged = true;\n }\n\n const prevRiskSig = parentItemSignature(previous.sections, index, 'HazardRisk');\n const nextRiskSig = parentItemSignature(next.sections, index, 'HazardRisk');\n if (prevRiskSig !== nextRiskSig) {\n changeIndex = Math.min(changeIndex, index);\n hazardRiskChanged = true;\n }\n }\n\n if (changeIndex === next.sections.length) {\n return next;\n }\n\n return {\n sections: next.sections.map((section, sectionIndex) => {\n const clearFromHazard =\n hazardChanged &&\n shouldClearSectionOnParentChange(\n section,\n sectionIndex,\n changeIndex,\n 'Hazard',\n WORKPLACE_SAFETY_DOWNSTREAM_FROM_HAZARD,\n );\n const clearFromHazardRisk =\n hazardRiskChanged &&\n shouldClearSectionOnParentChange(\n section,\n sectionIndex,\n changeIndex,\n 'HazardRisk',\n WORKPLACE_SAFETY_DOWNSTREAM_FROM_HAZARD_RISK,\n );\n\n if (!clearFromHazard && !clearFromHazardRisk) {\n return section;\n }\n return clearSectionItems(section);\n }),\n };\n}\n\nexport function extractRiskMatrixIdsFromHazardRisks(records: Record<string, unknown>[]): string[] {\n const ids = new Set<string>();\n for (const record of records) {\n const id = record['riskMatrixId'];\n if (typeof id === 'string' && id.length > 0) {\n ids.add(id);\n }\n }\n return [...ids];\n}\n\nfunction buildInFilter(field: string, values: string[]): Record<string, unknown> | null {\n const unique = [...new Set(values.filter((id) => id.length > 0))];\n if (!unique.length) {\n return null;\n }\n return {\n field,\n operator: { type: 'in' },\n value: unique,\n };\n}\n\n/** Filter that matches no records when parent context exists but derived IDs are empty. */\nfunction buildEmptyResultFilter(field: string): Record<string, unknown> {\n return {\n field,\n operator: { type: 'in' },\n value: ['00000000-0000-0000-0000-000000000000'],\n };\n}\n\nexport function resolveSafetyPlanSectionItemFilter(\n sectionTypeId: string,\n parentHazardIds: string[],\n parentHazardRiskIds: string[] = [],\n): Record<string, unknown> | null {\n const sectionTypeKey = resolveSectionTypeKey(sectionTypeId);\n const dependency = getSectionTypeDependency(sectionTypeKey);\n if (!dependency || dependency.kind !== 'parentFilter') {\n return null;\n }\n\n const parentIds =\n dependency.parentSectionTypeKey === 'Hazard' ? parentHazardIds : parentHazardRiskIds;\n if (!parentIds.length) {\n return null;\n }\n\n return buildInFilter(dependency.filterField, parentIds);\n}\n\nexport async function resolveSafetyPlanSectionItemFilterAsync(\n sectionTypeId: string,\n sections: AXMSafetyPlanSectionBuilderSectionValue[],\n sectionIndex: number,\n loadHazardRisks: AXMHazardRiskRecordLoader,\n): Promise<Record<string, unknown> | null> {\n const sectionTypeKey = resolveSectionTypeKey(sectionTypeId);\n const dependency = getSectionTypeDependency(sectionTypeKey);\n if (!dependency) {\n return null;\n }\n\n if (dependency.kind === 'parentFilter') {\n const parentIds = resolveParentItemIds(sections, sectionIndex, dependency.parentSectionTypeKey);\n if (!parentIds.length) {\n return null;\n }\n return buildInFilter(dependency.filterField, parentIds);\n }\n\n const parentIds = resolveParentItemIds(sections, sectionIndex, dependency.parentSectionTypeKey);\n if (!parentIds.length) {\n return null;\n }\n\n const records = await loadHazardRisks(parentIds);\n const derivedIds = extractRiskMatrixIdsFromHazardRisks(records);\n\n if (!derivedIds.length) {\n return buildEmptyResultFilter(dependency.filterField);\n }\n\n return buildInFilter(dependency.filterField, derivedIds);\n}\n\nconst defaultItemIdsPlaceholderKey =\n '@workplacesafety-management:safety-plan-sections.entities.safety-plan-section.fields.item-ids.placeholder';\n\n/** Clears item selection when section type changes in item dialog context. */\nexport const WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_CLEAR_ON_SECTION_TYPE_TRIGGERS = [\n {\n event: \"{{ events.context('sectionType.id') }}\",\n action: \"{{ widget.setValue([]); context.set('items', []); }}\",\n },\n {\n event: \"{{ events.context('sectionTypeId') }}\",\n action: \"{{ widget.setValue([]); context.set('items', []); }}\",\n },\n];\n\n/**\n * Reloads lookup data after section type is resolved (`sectionType.id`, `itemEntityName`).\n */\nexport const WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_REFRESH_ON_SECTION_TYPE_EXPOSE_TRIGGERS = [\n {\n event: \"{{ events.context('sectionType.id') }}\",\n action: '{{ widget.refresh(); }}',\n },\n {\n event: \"{{ events.context('sectionType.itemEntityName') }}\",\n action: '{{ widget.refresh(); }}',\n },\n {\n event: \"{{ events.context('sectionTypeId') }}\",\n action: '{{ widget.refresh(); }}',\n },\n];\n\nexport const WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_SECTION_TYPE_TRIGGERS = [\n ...WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_CLEAR_ON_SECTION_TYPE_TRIGGERS,\n ...WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_REFRESH_ON_SECTION_TYPE_EXPOSE_TRIGGERS,\n];\n\nfunction isPpeRuleSectionType(sectionTypeId: string): boolean {\n return (\n sectionTypeId === WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.ppeHazards ||\n sectionTypeId === WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.hazardRiskPpe\n );\n}\n\nfunction buildSectionTypeItemTextFieldExpression(sectionTypeIdPath: string): string {\n const ppeHazardsId = WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.ppeHazards;\n const hazardRiskPpeId = WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.hazardRiskPpe;\n return `{{ [ '${ppeHazardsId}', '${hazardRiskPpeId}' ].includes(context.eval('${sectionTypeIdPath}')) ? 'ppeItem.title' : 'title' }}`;\n}\n\nfunction buildSectionTypeItemColumnsExpression(sectionTypeIdPath: string): string {\n const ppeHazardsId = WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.ppeHazards;\n const hazardRiskPpeId = WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.hazardRiskPpe;\n const riskMatrixId = WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.riskMatrix;\n return `{{ context.eval('${sectionTypeIdPath}') === '${riskMatrixId}' ? ['code', 'title', 'matrix'] : [ '${ppeHazardsId}', '${hazardRiskPpeId}' ].includes(context.eval('${sectionTypeIdPath}')) ? ['code', 'ppeItem.title', 'requirementType'] : ['code', 'title'] }}`;\n}\n\nfunction buildSectionTypeDependentParentFilter(\n sectionTypeIdPath: string,\n parentIdsContextKey: string,\n parentSectionTypeKey: AXMSectionTypeCode,\n): Record<string, unknown> {\n const dependentSectionTypeIds = (\n Object.entries(WORKPLACE_SAFETY_SECTION_TYPE_DEPENDENCIES) as Array<\n [AXMSectionTypeCode, AXMSectionTypeDependency]\n >\n )\n .filter(([, config]) => config.kind === 'parentFilter' && config.parentSectionTypeKey === parentSectionTypeKey)\n .map(([key]) => {\n const id = Object.entries(WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID).find(\n ([, meta]) => meta.sectionTypeKey === key,\n )?.[0];\n return id ? `'${id}'` : undefined;\n })\n .filter((id): id is string => Boolean(id))\n .join(',');\n\n return {\n field: parentSectionTypeKey === 'Hazard' ? 'hazardId' : 'hazardRiskId',\n operator: { type: 'in' },\n value: `{{ [${dependentSectionTypeIds}].includes(context.eval('${sectionTypeIdPath}')) ? ((context.eval('${parentIdsContextKey}') || []).length ? context.eval('${parentIdsContextKey}') : undefined) : undefined }}`,\n };\n}\n\nfunction buildSectionTypeDependentHazardFilter(\n sectionTypeIdPath: string,\n parentHazardIdsContextKey: string,\n): Record<string, unknown> {\n return buildSectionTypeDependentParentFilter(sectionTypeIdPath, parentHazardIdsContextKey, 'Hazard');\n}\n\nconst sectionItemLookupExpose = [\n { source: 'id', target: 'items.{id}' },\n { source: 'title', target: 'items.{title}' },\n { source: 'code', target: 'items.{code}' },\n { source: 'ppeItem.id', target: 'items.{id}' },\n { source: 'ppeItem.title', target: 'items.{title}' },\n { source: 'ppeItem.code', target: 'items.{code}' },\n];\n\n/** Shared item lookup options for builder item dialog (`sectionType.*` in dialog context). */\nexport function buildSafetyPlanSectionItemLookupOptions(\n entityExpression: string,\n options?: {\n /** Context path to section type id, e.g. `sectionType.id`. */\n sectionTypeIdPath?: string;\n /** Dialog context key for upstream hazard IDs (read at runtime; do not embed IDs in options). */\n parentHazardIdsContextKey?: string;\n /** Dialog context key for upstream hazard-risk IDs. */\n parentHazardRiskIdsContextKey?: string;\n defaultPlaceholderKey?: string;\n },\n): Record<string, unknown> {\n const sectionTypeIdPath = options?.sectionTypeIdPath ?? 'sectionType.id';\n const lookup: Record<string, unknown> = {\n entity: entityExpression,\n look: 'lookup',\n multiple: true,\n allowSearch: true,\n textField: buildSectionTypeItemTextFieldExpression(sectionTypeIdPath),\n columns: buildSectionTypeItemColumnsExpression(sectionTypeIdPath),\n placeholder: options?.defaultPlaceholderKey ?? defaultItemIdsPlaceholderKey,\n expose: sectionItemLookupExpose,\n triggers: WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_SECTION_TYPE_TRIGGERS,\n };\n\n const filters: Record<string, unknown>[] = [];\n if (options?.parentHazardIdsContextKey) {\n filters.push(\n buildSectionTypeDependentHazardFilter(sectionTypeIdPath, options.parentHazardIdsContextKey),\n );\n }\n if (options?.parentHazardRiskIdsContextKey) {\n filters.push(\n buildSectionTypeDependentParentFilter(\n sectionTypeIdPath,\n options.parentHazardRiskIdsContextKey,\n 'HazardRisk',\n ),\n );\n }\n if (filters.length === 1) {\n lookup['filter'] = filters[0];\n } else if (filters.length > 1) {\n lookup['filter'] = { logic: 'and', filters };\n }\n\n return lookup;\n}\n\n/** Lookup options with entity data-selector popup UI (`look: 'lookup'`). */\nexport function buildSafetyPlanSectionItemSelectorOptions(\n entityExpression: string,\n options?: Parameters<typeof buildSafetyPlanSectionItemLookupOptions>[1],\n): Record<string, unknown> {\n return {\n ...buildSafetyPlanSectionItemLookupOptions(entityExpression, options),\n look: 'lookup',\n };\n}\n\n/** Selector column: string names are visible; `{ visible: false }` is queried for widget context only. */\nexport type AXMSafetyPlanSectionItemColumn = string | { name: string; visible?: boolean };\n\nexport function resolveSafetyPlanSectionItemColumns(sectionTypeId: string): AXMSafetyPlanSectionItemColumn[] {\n if (sectionTypeId === WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.ppeHazards) {\n return ['code', 'ppeItem.title', 'requirementType'];\n }\n if (sectionTypeId === WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.hazardRiskPpe) {\n return ['code', 'hazardRisk.title', 'ppeItem.title', 'requirementType'];\n }\n if (sectionTypeId === WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.riskMatrix) {\n return [\n 'code',\n 'title',\n 'matrix',\n { name: 'likelihoodIds', visible: false },\n { name: 'severityIds', visible: false },\n { name: 'likelihoodId', visible: false },\n { name: 'severityId', visible: false },\n { name: 'matrixOrientation', visible: false },\n ];\n }\n return ['code', 'title'];\n}\n\nexport function resolveSafetyPlanSectionItemEntityKey(\n sectionTypeId: string,\n sectionType?: AXMSectionTypeSnapshot,\n): string | undefined {\n return resolveSectionItemEntityName(sectionTypeId, sectionType);\n}\n\nexport function mapSafetyPlanSectionSelectedItems(\n sectionTypeId: string,\n selectedItems: Array<Record<string, unknown>>,\n): Array<{ id: string; title?: string; code?: string }> {\n const isPpeHazards = sectionTypeId === WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.ppeHazards;\n const isHazardRiskPpe = sectionTypeId === WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS.hazardRiskPpe;\n\n return selectedItems\n .map((item) => {\n if (isPpeHazards || isHazardRiskPpe) {\n const ppeItem = item['ppeItem'] as Record<string, unknown> | undefined;\n const id = String(ppeItem?.['id'] ?? item['id'] ?? '');\n return {\n id,\n title: asSafetyPlanDisplayText(ppeItem?.['title']) || undefined,\n code: asSafetyPlanDisplayText(ppeItem?.['code']) || undefined,\n };\n }\n return {\n id: String(item['id'] ?? ''),\n title: asSafetyPlanDisplayText(item['title']) || undefined,\n code: asSafetyPlanDisplayText(item['code']) || undefined,\n };\n })\n .filter((item) => item.id.length > 0);\n}\n\nexport function dedupeSafetyPlanSectionItemSelection(\n item: AXMSafetyPlanSectionBuilderItemValue,\n): AXMSafetyPlanSectionBuilderItemValue {\n const seen = new Set<string>();\n const itemIds: string[] = [];\n const items: NonNullable<AXMSafetyPlanSectionBuilderItemValue['items']> = [];\n\n for (let index = 0; index < (item.itemIds?.length ?? 0); index += 1) {\n const id = item.itemIds?.[index];\n if (typeof id !== 'string' || !id || seen.has(id)) {\n continue;\n }\n seen.add(id);\n itemIds.push(id);\n const snapshot =\n item.items?.find((entry) => entry?.id === id) ??\n (item.items?.[index]?.id === id || !item.items?.[index]?.id ? item.items?.[index] : undefined);\n items.push({\n id,\n title: asSafetyPlanDisplayText(snapshot?.title) || undefined,\n code: asSafetyPlanDisplayText(snapshot?.code) || undefined,\n });\n }\n\n return { ...item, itemIds, items };\n}\n\nexport function isPpeRuleSectionTypeId(sectionTypeId: string): boolean {\n return isPpeRuleSectionType(sectionTypeId);\n}\n\n//#endregion\n"],"names":[],"mappings":";;;AAAA;AASA;AAEA;AAEA;AAEO,MAAM,0CAA0C,GAAG;AACxD,IAAA,MAAM,EAAE,sCAAsC;AAE9C,IAAA,UAAU,EAAE,sCAAsC;AAElD,IAAA,GAAG,EAAE,sCAAsC;AAE3C,IAAA,OAAO,EAAE,sCAAsC;AAE/C,IAAA,cAAc,EAAE,sCAAsC;AAEtD,IAAA,MAAM,EAAE,sCAAsC;AAE9C,IAAA,UAAU,EAAE,sCAAsC;AAElD,IAAA,UAAU,EAAE,sCAAsC;AAElD,IAAA,aAAa,EAAE,sCAAsC;AAErD,IAAA,SAAS,EAAE,sCAAsC;CACzC;AAWV,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;AAEzC;AAEO,MAAM,4CAA4C,GAErD;IACF,MAAM,EAAE,CAAA,EAAG,UAAU,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAA,CAAE;IAE1D,UAAU,EAAE,CAAA,EAAG,UAAU,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAA,CAAE;IAElE,GAAG,EAAE,CAAA,EAAG,UAAU,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAA,CAAE;IAExD,UAAU,EAAE,CAAA,EAAG,UAAU,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAA,CAAE;AAErE,IAAA,aAAa,EAAE,SAAS;IAExB,OAAO,EAAE,CAAA,EAAG,UAAU,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,IA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AAI,CAAC,EAAE,CAAC;AAChB,QAAA,MAAM,QAAQ,GACZ,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC;AAC7C,aAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,SAAS,CAAC;QAChG,KAAK,CAAC,IAAI,CAAC;YACT,EAAE;YACF,KAAK,EAAE,uBAAuB,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,SAAS;YAC5D,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,SAAS;AAC3D,SAAA,CAAC;IACJ;IAEA,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE;AACpC;AAEM,SAAU,sBAAsB,CAAC,aAAqB,EAAA;AAC1D,IAAA,OAAO,oBAAoB,CAAC,aAAa,CAAC;AAC5C;AAEA;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type-section.entity-BGZ1VAW3.mjs","sources":["../../../../libs/modules/workplacesafety-management/contracts/src/entities/safety-plan-type-section/safety-plan-type-section.entity.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPWidgetsList } from '@acorex-platform/framework-shared/core';\nimport {\n AXPEntity,\n createAllQueryView,\n entityMasterCrudActions,\n entityMasterRecordActions,\n} from '@acorex-platform/framework-shared/entity';\n\nimport { RootConfig } from '../../root-config';\nimport { WORKPLACE_SAFETY_SECTION_TYPE_LOOKUP_EXPOSE } from '../../safety-plan-section-dependency';\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst listSortAndFilterOptions = {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n};\n\n/** Flat LookupBox row — same pattern as work-package `workOrderIds`. */\nconst SECTION_TYPE_IDS_REPEATER_CHILDREN = [\n {\n type: AXPWidgetsList.Editors.LookupBox,\n mode: 'edit' as const,\n path: 'sectionTypeId',\n name: 'sectionTypeId',\n options: {\n entity: `${RootConfig.module.name}.${RootConfig.entities.sectionType.name}`,\n look: 'select',\n allowSearch: true,\n textField: 'code',\n textTemplate: '{code} — {description}',\n valueField: 'id',\n columns: ['code', 'title', 'description'],\n expose: WORKPLACE_SAFETY_SECTION_TYPE_LOOKUP_EXPOSE,\n },\n },\n];\n\nconst sectionTypeIdsPropertyLayout = {\n name: 'sectionTypeIds',\n layout: { label: { visible: false }, order: 1, positions: { lg: { colSpan: 12 } } },\n};\n\n//#endregion\n\n//#region ---- Entity factory ----\n\nexport async function safetyPlanTypeSectionEntityFactory(): Promise<AXPEntity | null> {\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.safetyPlanTypeSection.name,\n title: RootConfig.entities.safetyPlanTypeSection.title,\n icon: RootConfig.entities.safetyPlanTypeSection.icon,\n relatedEntities: [],\n formats: {\n individual: RootConfig.entities.safetyPlanTypeSection.title,\n plural: RootConfig.entities.safetyPlanTypeSection.titlePlural,\n searchResult: {\n title: '{{ title }}',\n description: '{{ safetyPlanType.title }}',\n },\n },\n plugins: [{ name: 'archive' }],\n groups: [\n {\n id: 'basic-info',\n title:\n '@workplacesafety-management:safety-plan-type-sections.entities.safety-plan-type-section.groups.basic-info',\n },\n {\n id: 'sections',\n title:\n '@workplacesafety-management:safety-plan-type-sections.entities.safety-plan-type-section.groups.sections',\n },\n ],\n properties: [\n {\n name: 'id',\n title: '@general:terms.common.id',\n groupId: 'basic-info',\n schema: { dataType: 'uuid', visible: false, nullable: false, readonly: true, unique: { enabled: true } },\n },\n {\n name: 'safetyPlanTypeId',\n title:\n '@workplacesafety-management:safety-plan-type-sections.entities.safety-plan-type-section.fields.safety-plan-type.title',\n groupId: 'basic-info',\n options: listSortAndFilterOptions,\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n entity: `${RootConfig.module.name}.${RootConfig.entities.safetyPlanType.name}`,\n look: 'select',\n allowSearch: true,\n textField: 'title',\n valueField: 'id',\n columns: ['code', 'title'],\n expose: [\n { source: 'id', target: 'safetyPlanType.id' },\n { source: 'title', target: 'safetyPlanType.title' },\n { source: 'code', target: 'safetyPlanType.code' },\n ],\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'title',\n title:\n '@workplacesafety-management:safety-plan-type-sections.entities.safety-plan-type-section.fields.title.title',\n groupId: 'basic-info',\n options: listSortAndFilterOptions,\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.TextBox,\n options: {\n placeholder:\n '@workplacesafety-management:safety-plan-type-sections.entities.safety-plan-type-section.fields.title.placeholder',\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'isDefault',\n title:\n '@workplacesafety-management:safety-plan-type-sections.entities.safety-plan-type-section.fields.is-default.title',\n groupId: 'basic-info',\n options: listSortAndFilterOptions,\n schema: {\n dataType: 'boolean',\n defaultValue: false,\n interface: {\n type: AXPWidgetsList.Editors.ToggleSwitch,\n },\n },\n },\n {\n name: 'sectionTypeIds',\n title: '',\n groupId: 'sections',\n options: {\n sort: { enabled: false },\n filter: { advance: { enabled: false }, inline: { enabled: false } },\n },\n schema: {\n dataType: 'array',\n defaultValue: [],\n nullable: true,\n interface: {\n type: AXPWidgetsList.Layouts.RepeaterLayout,\n options: { hasControls: true, allowReorder: true },\n children: [...SECTION_TYPE_IDS_REPEATER_CHILDREN],\n },\n },\n },\n /**\n * List sort order only (hidden / not edited in create-update UI).\n */\n {\n name: 'sortOrder',\n title:\n '@workplacesafety-management:safety-plan-type-sections.entities.safety-plan-type-section.fields.sort-order.title',\n groupId: 'basic-info',\n schema: {\n dataType: 'number',\n visible: false,\n nullable: true,\n readonly: true,\n },\n },\n ],\n columns: [\n { name: 'title', options: { width: '200px', order: 1 } },\n { name: 'sectionTypeIds', options: { width: '280px', order: 2 } },\n { name: 'isDefault', options: { width: '120px', order: 3 } },\n ],\n interfaces: {\n master: {\n create: {\n sections: [{ id: 'basic-info' }, { id: 'sections' }],\n properties: [\n { name: 'safetyPlanTypeId', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },\n { name: 'title', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },\n { name: 'isDefault', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },\n sectionTypeIdsPropertyLayout,\n ],\n },\n update: {\n sections: [{ id: 'basic-info' }, { id: 'sections' }],\n properties: [\n { name: 'safetyPlanTypeId', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },\n { name: 'title', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },\n { name: 'isDefault', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },\n sectionTypeIdsPropertyLayout,\n ],\n },\n single: {\n title: '{{ title }}',\n sections: [\n { id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } },\n { id: 'sections', layout: { positions: { lg: { colSpan: 12 } } } },\n ],\n properties: [\n { name: 'safetyPlanTypeId', layout: { positions: { lg: { colSpan: 12, order: 1 } } } },\n { name: 'title', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },\n { name: 'isDefault', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },\n sectionTypeIdsPropertyLayout,\n ],\n actions: [...entityMasterRecordActions()],\n },\n list: {\n actions: [...entityMasterCrudActions()],\n views: [createAllQueryView({ sorts: [{ name: 'sortOrder', dir: 'asc' }] })],\n },\n },\n },\n };\n\n return entityDef;\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;AAaA;AAEA;AAEA,MAAM,wBAAwB,GAAG;AAC/B,IAAA,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;AACvB,IAAA,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,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C,EAAE,EAAE,EAAE,EAAE;wBAC3E,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE;wBAC9E,4BAA4B;AAC7B,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,GAAG,yBAAyB,EAAE,CAAC;AAC1C,iBAAA;AACD,gBAAA,IAAI,EAAE;AACJ,oBAAA,OAAO,EAAE,CAAC,GAAG,uBAAuB,EAAE,CAAC;oBACvC,KAAK,EAAE,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5E,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;AAEA;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type.entity-B6NYL4xi.mjs","sources":["../../../../libs/modules/workplacesafety-management/contracts/src/entities/safety-plan-type/safety-plan-type.entity.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPWidgetsList } from '@acorex-platform/framework-shared/core';\nimport {\n AXPEntity,\n createAllQueryView,\n entityDetailsCrudActions,\n entityDetailsSimpleCondition,\n entityMasterCrudActions,\n entityMasterRecordActions,\n} from '@acorex-platform/framework-shared/entity';\n\nimport { RootConfig } from '../../root-config';\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst listSortAndFilterOptions = {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n};\n\nconst noteFieldOptions = {\n sort: { enabled: false },\n filter: { advance: { enabled: true }, inline: { enabled: false } },\n};\n\n//#endregion\n\n//#region ---- Entity factory ----\n\nexport async function safetyPlanTypeEntityFactory(): Promise<AXPEntity | null> {\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.safetyPlanType.name,\n title: RootConfig.entities.safetyPlanType.title,\n icon: RootConfig.entities.safetyPlanType.icon,\n formats: {\n individual: RootConfig.entities.safetyPlanType.title,\n plural: RootConfig.entities.safetyPlanType.titlePlural,\n searchResult: {\n title: '{{ title }}',\n description: '{{ code }}',\n },\n },\n plugins: [\n { name: 'identifier', options: { field: 'code', rule: 'safety-plan-type-code' } },\n { name: 'unique-fields', options: { fields: 'code', scope: 'global' } },\n { name: 'archive' },\n ],\n relatedEntities: [\n {\n entity: `${RootConfig.module.name}.${RootConfig.entities.safetyPlanTypeSection.name}`,\n title: RootConfig.entities.safetyPlanTypeSection.titlePlural,\n icon: RootConfig.entities.safetyPlanTypeSection.icon,\n columns: ['title', 'sectionTypeIds', 'isDefault'],\n conditions: [entityDetailsSimpleCondition('safetyPlanTypeId')],\n actions: [...entityDetailsCrudActions('safetyPlanTypeId')],\n excludeProperties: ['safetyPlanTypeId', 'sortOrder'],\n layout: { type: 'page-list', position: 'after', order: 1 },\n },\n ],\n groups: [\n {\n id: 'basic-info',\n title: '@workplacesafety-management:safety-plan-types.entities.safety-plan-type.groups.basic-info',\n },\n ],\n properties: [\n {\n name: 'id',\n title: '@general:terms.common.id',\n groupId: 'basic-info',\n schema: { dataType: 'uuid', visible: false, nullable: false, readonly: true, unique: { enabled: true } },\n },\n {\n name: 'code',\n title: '@workplacesafety-management:safety-plan-types.entities.safety-plan-type.fields.code.title',\n groupId: 'basic-info',\n options: listSortAndFilterOptions,\n schema: {\n dataType: 'string',\n unique: { enabled: true },\n interface: {\n type: AXPWidgetsList.Editors.TextBox,\n options: {\n disabled: true,\n placeholder:\n '@workplacesafety-management:safety-plan-types.entities.safety-plan-type.fields.code.placeholder',\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'title',\n title: '@workplacesafety-management:safety-plan-types.entities.safety-plan-type.fields.title.title',\n groupId: 'basic-info',\n options: listSortAndFilterOptions,\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.TextBox,\n options: {\n placeholder:\n '@workplacesafety-management:safety-plan-types.entities.safety-plan-type.fields.title.placeholder',\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'description',\n title: '@workplacesafety-management:safety-plan-types.entities.safety-plan-type.fields.description.title',\n groupId: 'basic-info',\n options: noteFieldOptions,\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.LargeTextBox,\n options: {\n rows: 2,\n placeholder:\n '@workplacesafety-management:safety-plan-types.entities.safety-plan-type.fields.description.placeholder',\n },\n },\n },\n },\n ],\n columns: [\n { name: 'code', options: { width: '120px', order: 1 } },\n { name: 'title', options: { width: '220px', order: 2 } },\n { name: 'description', options: { width: '280px', order: 3 } },\n ],\n interfaces: {\n master: {\n create: {\n sections: [{ id: 'basic-info' }],\n properties: [\n { name: 'code', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },\n { name: 'title', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },\n { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },\n ],\n },\n update: {\n sections: [{ id: 'basic-info' }],\n properties: [\n { name: 'code', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },\n { name: 'title', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },\n { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },\n ],\n },\n single: {\n title: '{{ title }}',\n sections: [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }],\n properties: [\n { name: 'code', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },\n { name: 'title', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },\n { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },\n ],\n actions: [...entityMasterRecordActions()],\n },\n list: {\n actions: [...entityMasterCrudActions()],\n views: [createAllQueryView({ sorts: [{ name: 'code', dir: 'asc' }] })],\n },\n },\n },\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