@acorex-platform/module-workplacesafety-management-client 0.0.21

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 (27) hide show
  1. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts.mjs +1646 -0
  2. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram-widget-view.component-C-qrrqOV.mjs +203 -0
  4. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram-widget-view.component-C-qrrqOV.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.service-BBhH7KP1.mjs +119 -0
  6. package/fesm2022/acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.service-BBhH7KP1.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-workplacesafety-management-client-hazard-ppe-rule-status.provider-o4bAwYcq.mjs +42 -0
  8. package/fesm2022/acorex-platform-module-workplacesafety-management-client-hazard-ppe-rule-status.provider-o4bAwYcq.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-workplacesafety-management-client-hazard-risk-ppe-rule-status.provider-DtqzcWh0.mjs +42 -0
  10. package/fesm2022/acorex-platform-module-workplacesafety-management-client-hazard-risk-ppe-rule-status.provider-DtqzcWh0.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-workplacesafety-management-client-hazard-risk-status.provider-B6IkRYbW.mjs +42 -0
  12. package/fesm2022/acorex-platform-module-workplacesafety-management-client-hazard-risk-status.provider-B6IkRYbW.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-workplacesafety-management-client-index-kF37zgd4.mjs +1900 -0
  14. package/fesm2022/acorex-platform-module-workplacesafety-management-client-index-kF37zgd4.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-workplacesafety-management-client-preview-control-hierarchy-diagram.command-C2X3VpEt.mjs +175 -0
  16. package/fesm2022/acorex-platform-module-workplacesafety-management-client-preview-control-hierarchy-diagram.command-C2X3VpEt.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-workplacesafety-management-client-publish-safety-plan.command-Ci-zcrmO.mjs +106 -0
  18. package/fesm2022/acorex-platform-module-workplacesafety-management-client-publish-safety-plan.command-Ci-zcrmO.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-status.provider-BpWx3gIf.mjs +51 -0
  20. package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-status.provider-BpWx3gIf.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-BJsg3pHZ.mjs +461 -0
  22. package/fesm2022/acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-BJsg3pHZ.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-workplacesafety-management-client.mjs +461 -0
  24. package/fesm2022/acorex-platform-module-workplacesafety-management-client.mjs.map +1 -0
  25. package/package.json +28 -0
  26. package/types/acorex-platform-module-workplacesafety-management-client-contracts.d.ts +1111 -0
  27. package/types/acorex-platform-module-workplacesafety-management-client.d.ts +20 -0
@@ -0,0 +1,1111 @@
1
+ import { AXPSystemStatusType, AXPMultiLanguageString, AXPCategoryListItem } from '@acorex-platform/framework-shared/core';
2
+ import { AXPEntityModel } from '@acorex-platform/framework-shared/entity';
3
+ import { AXMMetaDataBuilderValue } from '@acorex-platform/module-data-management-contracts';
4
+
5
+ declare const WORKPLACE_SAFETY_GHS_SYMBOL_OPTIONS: readonly [{
6
+ readonly id: "GHS01";
7
+ readonly title: "GHS01 — Exploding bomb";
8
+ readonly description: "Explosion, blast or projection hazard.";
9
+ readonly imageUrl: "/assets/workplacesafety-management/ghs/explos.gif";
10
+ }, {
11
+ readonly id: "GHS02";
12
+ readonly title: "GHS02 — Flame";
13
+ readonly description: "Flammable liquids, solids and gases; including self-reactive substances.";
14
+ readonly imageUrl: "/assets/workplacesafety-management/ghs/flamme.gif";
15
+ }, {
16
+ readonly id: "GHS03";
17
+ readonly title: "GHS03 — Flame over circle";
18
+ readonly description: "Oxidising liquids, solids and gases; may cause or intensify fire.";
19
+ readonly imageUrl: "/assets/workplacesafety-management/ghs/rondflam.gif";
20
+ }, {
21
+ readonly id: "GHS04";
22
+ readonly title: "GHS04 — Gas cylinder";
23
+ readonly description: "Gases under pressure.";
24
+ readonly imageUrl: "/assets/workplacesafety-management/ghs/bottle.gif";
25
+ }, {
26
+ readonly id: "GHS05";
27
+ readonly title: "GHS05 — Skull and crossbones";
28
+ readonly description: "Fatal or toxic if swallowed, inhaled or in contact with skin.";
29
+ readonly imageUrl: "/assets/workplacesafety-management/ghs/skull.gif";
30
+ }, {
31
+ readonly id: "GHS06";
32
+ readonly title: "GHS06 — Exclamation mark";
33
+ readonly description: "Low level toxicity; irritant or harmful to health.";
34
+ readonly imageUrl: "/assets/workplacesafety-management/ghs/exclam.gif";
35
+ }, {
36
+ readonly id: "GHS07";
37
+ readonly title: "GHS07 — Corrosion";
38
+ readonly description: "Corrosive chemicals; may cause severe skin and eye damage.";
39
+ readonly imageUrl: "/assets/workplacesafety-management/ghs/acid_red.gif";
40
+ }, {
41
+ readonly id: "GHS08";
42
+ readonly title: "GHS08 — Health hazard";
43
+ readonly description: "Chronic health hazards; carcinogenicity, mutagenicity, reproductive toxicity.";
44
+ readonly imageUrl: "/assets/workplacesafety-management/ghs/silhouete.gif";
45
+ }, {
46
+ readonly id: "GHS09";
47
+ readonly title: "GHS09 — Environment";
48
+ readonly description: "Hazardous to aquatic life and the environment.";
49
+ readonly imageUrl: "/assets/workplacesafety-management/ghs/Aquatic-pollut-red.gif";
50
+ }];
51
+ type WorkplaceSafetyGhsSymbolId = (typeof WORKPLACE_SAFETY_GHS_SYMBOL_OPTIONS)[number]['id'];
52
+
53
+ /**
54
+ * Safety & Risk capabilities used by this module.
55
+ * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
56
+ */
57
+ declare const AXPSafetyRiskPermissionKeys: {
58
+ readonly Access: "SafetyRisk:Permission:Access";
59
+ readonly MaintainSafety: "SafetyRisk:Permission:MaintainSafety";
60
+ readonly MaintainRisk: "SafetyRisk:Permission:MaintainRisk";
61
+ readonly MaintainHealth: "SafetyRisk:Permission:MaintainHealth";
62
+ readonly MaintainAssessments: "SafetyRisk:Permission:MaintainAssessments";
63
+ readonly Setup: "SafetyRisk:Permission:Setup";
64
+ };
65
+ /**
66
+ * @deprecated Prefer {@link AXPSafetyRiskPermissionKeys}.
67
+ * Legacy nested shape kept so existing imports compile during migration.
68
+ */
69
+ declare const AXMWorkplaceSafetyManagementPermissionKeys: {
70
+ readonly WorkplaceSafetyManagement: {
71
+ readonly Management: "SafetyRisk:Permission:Access";
72
+ readonly Hazard: {
73
+ readonly Management: "SafetyRisk:Permission:MaintainSafety";
74
+ readonly View: "SafetyRisk:Permission:MaintainSafety";
75
+ readonly Create: "SafetyRisk:Permission:MaintainSafety";
76
+ readonly Update: "SafetyRisk:Permission:MaintainSafety";
77
+ readonly Delete: "SafetyRisk:Permission:MaintainSafety";
78
+ };
79
+ readonly HazardRegister: {
80
+ readonly Management: "SafetyRisk:Permission:MaintainSafety";
81
+ readonly View: "SafetyRisk:Permission:MaintainSafety";
82
+ readonly Create: "SafetyRisk:Permission:MaintainSafety";
83
+ readonly Update: "SafetyRisk:Permission:MaintainSafety";
84
+ readonly Delete: "SafetyRisk:Permission:MaintainSafety";
85
+ };
86
+ readonly PpeItem: {
87
+ readonly Management: "SafetyRisk:Permission:MaintainSafety";
88
+ readonly View: "SafetyRisk:Permission:MaintainSafety";
89
+ readonly Create: "SafetyRisk:Permission:MaintainSafety";
90
+ readonly Update: "SafetyRisk:Permission:MaintainSafety";
91
+ readonly Delete: "SafetyRisk:Permission:MaintainSafety";
92
+ };
93
+ readonly HazardPpeRule: {
94
+ readonly Management: "SafetyRisk:Permission:MaintainSafety";
95
+ readonly View: "SafetyRisk:Permission:MaintainSafety";
96
+ readonly Create: "SafetyRisk:Permission:MaintainSafety";
97
+ readonly Update: "SafetyRisk:Permission:MaintainSafety";
98
+ readonly Delete: "SafetyRisk:Permission:MaintainSafety";
99
+ };
100
+ readonly HazardRisk: {
101
+ readonly Management: "SafetyRisk:Permission:MaintainSafety";
102
+ readonly View: "SafetyRisk:Permission:MaintainSafety";
103
+ readonly Create: "SafetyRisk:Permission:MaintainSafety";
104
+ readonly Update: "SafetyRisk:Permission:MaintainSafety";
105
+ readonly Delete: "SafetyRisk:Permission:MaintainSafety";
106
+ };
107
+ readonly HazardRiskPpeRule: {
108
+ readonly Management: "SafetyRisk:Permission:MaintainSafety";
109
+ readonly View: "SafetyRisk:Permission:MaintainSafety";
110
+ readonly Create: "SafetyRisk:Permission:MaintainSafety";
111
+ readonly Update: "SafetyRisk:Permission:MaintainSafety";
112
+ readonly Delete: "SafetyRisk:Permission:MaintainSafety";
113
+ };
114
+ readonly ControlHierarchyLevels: {
115
+ readonly Management: "SafetyRisk:Permission:Setup";
116
+ };
117
+ readonly ControlMeasure: {
118
+ readonly Management: "SafetyRisk:Permission:MaintainSafety";
119
+ readonly View: "SafetyRisk:Permission:MaintainSafety";
120
+ readonly Create: "SafetyRisk:Permission:MaintainSafety";
121
+ readonly Update: "SafetyRisk:Permission:MaintainSafety";
122
+ readonly Delete: "SafetyRisk:Permission:MaintainSafety";
123
+ };
124
+ readonly SafetyPlan: {
125
+ readonly Management: "SafetyRisk:Permission:MaintainSafety";
126
+ readonly View: "SafetyRisk:Permission:MaintainSafety";
127
+ readonly Create: "SafetyRisk:Permission:MaintainSafety";
128
+ readonly Update: "SafetyRisk:Permission:MaintainSafety";
129
+ readonly Delete: "SafetyRisk:Permission:MaintainSafety";
130
+ };
131
+ readonly SafetyPlanType: {
132
+ readonly Management: "WorkplaceSafetyManagement:Permission:SafetyPlanType.Management";
133
+ readonly View: "WorkplaceSafetyManagement:Permission:SafetyPlanType.View";
134
+ readonly Create: "WorkplaceSafetyManagement:Permission:SafetyPlanType.Create";
135
+ readonly Update: "WorkplaceSafetyManagement:Permission:SafetyPlanType.Update";
136
+ readonly Delete: "WorkplaceSafetyManagement:Permission:SafetyPlanType.Delete";
137
+ };
138
+ readonly SafetyPlanTypeSection: {
139
+ readonly Management: "WorkplaceSafetyManagement:Permission:SafetyPlanTypeSection.Management";
140
+ readonly View: "WorkplaceSafetyManagement:Permission:SafetyPlanTypeSection.View";
141
+ readonly Create: "WorkplaceSafetyManagement:Permission:SafetyPlanTypeSection.Create";
142
+ readonly Update: "WorkplaceSafetyManagement:Permission:SafetyPlanTypeSection.Update";
143
+ readonly Delete: "WorkplaceSafetyManagement:Permission:SafetyPlanTypeSection.Delete";
144
+ };
145
+ readonly SectionType: {
146
+ readonly Management: "SafetyRisk:Permission:Setup";
147
+ readonly View: "SafetyRisk:Permission:Setup";
148
+ readonly Create: "SafetyRisk:Permission:Setup";
149
+ readonly Update: "SafetyRisk:Permission:Setup";
150
+ readonly Delete: "SafetyRisk:Permission:Setup";
151
+ };
152
+ readonly SafetyPlanSection: {
153
+ readonly Management: "SafetyRisk:Permission:MaintainSafety";
154
+ readonly View: "SafetyRisk:Permission:MaintainSafety";
155
+ readonly Create: "SafetyRisk:Permission:MaintainSafety";
156
+ readonly Update: "SafetyRisk:Permission:MaintainSafety";
157
+ readonly Delete: "SafetyRisk:Permission:MaintainSafety";
158
+ };
159
+ };
160
+ };
161
+
162
+ declare const AXMWorkplaceSafetyManagementCommandKeys: {
163
+ readonly SafetyPlan: {
164
+ readonly Publish: "WorkplaceSafetyManagement.SafetyPlan:Publish";
165
+ readonly ChangeType: "WorkplaceSafetyManagement.SafetyPlan:ChangeType";
166
+ };
167
+ };
168
+
169
+ declare const AXMWorkplaceSafetyManagementMenuKeys: {
170
+ readonly Root: "WorkplaceSafetyManagement:Menu";
171
+ readonly SafetyPlans: "WorkplaceSafetyManagement:Menu:SafetyPlans";
172
+ readonly SafetyPlanSections: "WorkplaceSafetyManagement:Menu:SafetyPlanSections";
173
+ readonly SectionTypes: "WorkplaceSafetyManagement:Menu:SectionTypes";
174
+ readonly WorkStepTypes: "WorkplaceSafetyManagement:Menu:WorkStepTypes";
175
+ readonly SafetyPlanTypes: "WorkplaceSafetyManagement:Menu:SafetyPlanTypes";
176
+ readonly SafetyPlanTypeSections: "WorkplaceSafetyManagement:Menu:SafetyPlanTypeSections";
177
+ readonly Configuration: "WorkplaceSafetyManagement:Menu:Configuration";
178
+ };
179
+
180
+ declare const RootConfig: {
181
+ config: {
182
+ readonly i18n: "workplacesafety-management";
183
+ readonly module: "WorkplaceSafetyManagement";
184
+ };
185
+ module: {
186
+ name: "WorkplaceSafetyManagement";
187
+ title: string;
188
+ icon: string;
189
+ };
190
+ entities: {
191
+ hazard: {
192
+ name: string;
193
+ source: string;
194
+ title: string;
195
+ titlePlural: string;
196
+ icon: string;
197
+ };
198
+ hazardRegister: {
199
+ name: string;
200
+ source: string;
201
+ title: string;
202
+ titlePlural: string;
203
+ icon: string;
204
+ };
205
+ ppeItem: {
206
+ name: string;
207
+ source: string;
208
+ title: string;
209
+ titlePlural: string;
210
+ icon: string;
211
+ };
212
+ hazardPpeRule: {
213
+ name: string;
214
+ source: string;
215
+ title: string;
216
+ titlePlural: string;
217
+ icon: string;
218
+ };
219
+ hazardRisk: {
220
+ name: string;
221
+ source: string;
222
+ title: string;
223
+ titlePlural: string;
224
+ icon: string;
225
+ };
226
+ hazardRiskPpeRule: {
227
+ name: string;
228
+ source: string;
229
+ title: string;
230
+ titlePlural: string;
231
+ icon: string;
232
+ };
233
+ controlHierarchyLevels: {
234
+ name: string;
235
+ source: string;
236
+ title: string;
237
+ titlePlural: string;
238
+ icon: string;
239
+ };
240
+ controlMeasure: {
241
+ name: string;
242
+ source: string;
243
+ title: string;
244
+ titlePlural: string;
245
+ icon: string;
246
+ };
247
+ safetyPlan: {
248
+ name: string;
249
+ source: string;
250
+ title: string;
251
+ titlePlural: string;
252
+ icon: string;
253
+ };
254
+ safetyPlanType: {
255
+ name: string;
256
+ source: string;
257
+ title: string;
258
+ titlePlural: string;
259
+ icon: string;
260
+ };
261
+ safetyPlanTypeSection: {
262
+ name: string;
263
+ source: string;
264
+ title: string;
265
+ titlePlural: string;
266
+ icon: string;
267
+ };
268
+ sectionType: {
269
+ name: string;
270
+ source: string;
271
+ title: string;
272
+ titlePlural: string;
273
+ icon: string;
274
+ };
275
+ safetyTemplate: {
276
+ name: string;
277
+ source: string;
278
+ title: string;
279
+ titlePlural: string;
280
+ icon: string;
281
+ };
282
+ safetyPlanSection: {
283
+ name: string;
284
+ source: string;
285
+ title: string;
286
+ titlePlural: string;
287
+ icon: string;
288
+ };
289
+ workStepType: {
290
+ name: string;
291
+ source: string;
292
+ title: string;
293
+ titlePlural: string;
294
+ icon: string;
295
+ };
296
+ safetyPlanWorkStep: {
297
+ name: string;
298
+ source: string;
299
+ title: string;
300
+ titlePlural: string;
301
+ icon: string;
302
+ };
303
+ };
304
+ queries: {
305
+ dashboard: {
306
+ openHazardsKpi: string;
307
+ highRisksKpi: string;
308
+ activeSafetyPlansKpi: string;
309
+ take5ChecklistsKpi: string;
310
+ take5CompletedKpi: string;
311
+ hazardsByCategoryDonut: string;
312
+ risksByRatingBar: string;
313
+ plansByTypeBar: string;
314
+ hazardsByStatusBar: string;
315
+ ppeCoverageDonut: string;
316
+ };
317
+ };
318
+ };
319
+
320
+ declare enum AXMHazardPpeRuleRequirementType {
321
+ Required = "required",
322
+ Recommended = "recommended",
323
+ Conditional = "conditional"
324
+ }
325
+ interface AXMWorkplaceSafetyManagementHazardPpeRuleEntityModel extends AXPEntityModel<string> {
326
+ code: string;
327
+ hazardId: string;
328
+ hazard?: {
329
+ id: string;
330
+ title?: string;
331
+ code?: string;
332
+ };
333
+ ppeItemId: string;
334
+ ppeItem?: {
335
+ id: string;
336
+ title?: string;
337
+ code?: string;
338
+ };
339
+ requirementType: AXMHazardPpeRuleRequirementType;
340
+ conditionNote?: string;
341
+ usageInstruction?: string;
342
+ sortOrder?: number;
343
+ status?: AXPSystemStatusType.Active | AXPSystemStatusType.Inactive;
344
+ }
345
+
346
+ declare const WORKPLACE_SAFETY_HAZARD_PPE_RULE_REQUIREMENT_TYPE_OPTIONS: readonly [{
347
+ readonly id: AXMHazardPpeRuleRequirementType.Required;
348
+ readonly title: "@workplacesafety-management:hazard-ppe-rules.entities.hazard-ppe-rule.fields.requirement-type.options.required";
349
+ }, {
350
+ readonly id: AXMHazardPpeRuleRequirementType.Recommended;
351
+ readonly title: "@workplacesafety-management:hazard-ppe-rules.entities.hazard-ppe-rule.fields.requirement-type.options.recommended";
352
+ }, {
353
+ readonly id: AXMHazardPpeRuleRequirementType.Conditional;
354
+ readonly title: "@workplacesafety-management:hazard-ppe-rules.entities.hazard-ppe-rule.fields.requirement-type.options.conditional";
355
+ }];
356
+
357
+ /** Risk rating entity key in the risk-management module. */
358
+ declare const RISK_MANAGEMENT_RISK_RATING_ENTITY = "RiskManagement.RiskRating";
359
+ /** Risk matrix cell entity key in the risk-management module. */
360
+ declare const RISK_MANAGEMENT_RISK_MATRIX_CELL_ENTITY = "RiskManagement.RiskMatrixCell";
361
+ /** Hazard catalog scope for risk matrix lookup filtering. */
362
+ declare const RISK_MANAGEMENT_HAZARD_CATALOG_SCOPE = "risk-management.hazard";
363
+
364
+ type AXMSafetyTemplateType$1 = 'SWMS' | 'JSA' | 'Forms' | 'Permits' | 'Plans';
365
+ declare const WORKPLACE_SAFETY_TEMPLATE_TYPE_OPTIONS: ReadonlyArray<{
366
+ id: AXMSafetyTemplateType$1;
367
+ title: string;
368
+ }>;
369
+
370
+ /** Stable semantic keys for built-in section types (used by dependencies and lookups). */
371
+ type AXMSectionTypeCode = 'Hazard' | 'HazardRisk' | 'Ppe' | 'PpeHazards' | 'HazardRiskPpe' | 'Control' | 'HierarchyLevel' | 'RiskMatrix' | 'Custom' | 'StepTable';
372
+ interface AXMWorkplaceSafetyManagementSectionTypeEntityModel extends AXPEntityModel<string> {
373
+ /** Business code (seeded built-ins use the title with spaces removed; new rows use `section-type-code`). */
374
+ code: string;
375
+ title: string;
376
+ description?: string;
377
+ /**
378
+ * When false (default), a safety plan may include this section type at most once.
379
+ * Custom / free-form types may set true to allow duplicates.
380
+ */
381
+ isRepeatable?: boolean;
382
+ /** Managed by the archive plugin (`isArchived`). */
383
+ isArchived?: boolean;
384
+ }
385
+ /** Embedded section type snapshot on safety plan section items. */
386
+ interface AXMSectionTypeSnapshot {
387
+ id: string;
388
+ title?: string;
389
+ code?: string;
390
+ description?: string;
391
+ sectionTypeKey?: string;
392
+ itemEntityName?: string;
393
+ /** When true, a safety plan may include this section type more than once. */
394
+ isRepeatable?: boolean;
395
+ }
396
+
397
+ /** Stable IDs for seeded built-in section types (shared by server mocks and client lookups). */
398
+ declare const WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS: {
399
+ readonly hazard: "c1d2e3f4-a5b6-4789-c001-000000000001";
400
+ readonly hazardRisk: "c1d2e3f4-a5b6-4789-c001-000000000002";
401
+ readonly ppe: "c1d2e3f4-a5b6-4789-c001-000000000003";
402
+ readonly control: "c1d2e3f4-a5b6-4789-c001-000000000004";
403
+ readonly hierarchyLevel: "c1d2e3f4-a5b6-4789-c001-000000000005";
404
+ readonly custom: "c1d2e3f4-a5b6-4789-c001-000000000006";
405
+ readonly ppeHazards: "c1d2e3f4-a5b6-4789-c001-000000000007";
406
+ readonly riskMatrix: "c1d2e3f4-a5b6-4789-c001-000000000008";
407
+ readonly hazardRiskPpe: "c1d2e3f4-a5b6-4789-c001-000000000009";
408
+ readonly stepTable: "c1d2e3f4-a5b6-4789-c001-00000000000a";
409
+ };
410
+ interface AXMBuiltInSectionTypeMeta {
411
+ sectionTypeKey: AXMSectionTypeCode;
412
+ itemEntityName?: string;
413
+ /** When true, a safety plan may include this section type more than once. */
414
+ isRepeatable?: boolean;
415
+ }
416
+ /** Maps section type codes to the entity that supplies selectable items. */
417
+ declare const WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE: Readonly<Record<AXMSectionTypeCode, string | undefined>>;
418
+ /** Built-in section types resolved by stable section type id. */
419
+ declare const WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID: Readonly<Record<string, AXMBuiltInSectionTypeMeta>>;
420
+ /** Default entity so the lookup widget mounts before a section type is chosen. */
421
+ declare const WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_FALLBACK: string;
422
+ declare function resolveSectionTypeKey(sectionTypeId: string | undefined, snapshot?: AXMSectionTypeSnapshot): AXMSectionTypeCode | undefined;
423
+ declare function resolveSectionItemEntityName(sectionTypeId: string | undefined, snapshot?: AXMSectionTypeSnapshot): string | undefined;
424
+ /** Adds runtime lookup metadata (`sectionTypeKey`, `itemEntityName`) from built-in id map. */
425
+ declare function enrichSectionTypeSnapshot(sectionTypeId: string | undefined, snapshot?: AXMSectionTypeSnapshot): AXMSectionTypeSnapshot | undefined;
426
+ /**
427
+ * For repeater / nested FormField widgets — `>` walks up to the row where `sectionType` is exposed.
428
+ */
429
+ declare const WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_EXPRESSION: string;
430
+ /**
431
+ * For flat dialog / dynamic forms — sibling fields share the same context (no parent path).
432
+ */
433
+ declare const WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_EXPRESSION_SIBLING: string;
434
+
435
+ /**
436
+ * Column definition shared by WorkStepType (template) and SafetyPlanWorkStep (snapshot).
437
+ * Each column is backed by a SectionType (lookup options + item entity mapping).
438
+ */
439
+ interface AXMStepTableColumnDef {
440
+ /** Selected SectionType id — stable cell key for this column. */
441
+ sectionTypeId: string;
442
+ sectionType?: AXMSectionTypeSnapshot;
443
+ /** Optional display override; defaults to section type title. */
444
+ title?: string;
445
+ sortOrder: number;
446
+ required?: boolean;
447
+ }
448
+ interface AXMWorkplaceSafetyManagementWorkStepTypeEntityModel extends AXPEntityModel<string> {
449
+ code: string;
450
+ title: string;
451
+ description?: string;
452
+ /** Default column schema copied onto new SafetyPlanWorkStep rows. */
453
+ columns: AXMStepTableColumnDef[];
454
+ isArchived?: boolean;
455
+ }
456
+ interface AXMWorkStepTypeSnapshot {
457
+ id: string;
458
+ title?: string;
459
+ code?: string;
460
+ }
461
+
462
+ interface AXMStepTableCellRef {
463
+ id: string;
464
+ title?: string;
465
+ code?: string;
466
+ }
467
+ /** One cell value keyed by column (`sectionTypeId`). */
468
+ interface AXMStepTableCellValue {
469
+ columnKey: string;
470
+ textValue?: string;
471
+ numberValue?: number;
472
+ refIds?: string[];
473
+ refs?: AXMStepTableCellRef[];
474
+ }
475
+ /** @deprecated Prefer cells on SafetyPlanWorkStep row entity — kept for transitional builders. */
476
+ interface AXMStepTableRow {
477
+ id: string;
478
+ sortOrder: number;
479
+ cells: AXMStepTableCellValue[];
480
+ }
481
+ /**
482
+ * One Step Table data row under a SafetyPlanSection.
483
+ * Column schema comes from the section’s selected Work Step (WorkStepType).
484
+ */
485
+ interface AXMWorkplaceSafetyManagementSafetyPlanWorkStepEntityModel extends AXPEntityModel<string> {
486
+ /** Business code from identifier rule `safety-plan-work-step-code` (`SPWS-{seq:4}`). */
487
+ code: string;
488
+ safetyPlanId: string;
489
+ safetyPlan?: {
490
+ id: string;
491
+ title?: string;
492
+ code?: string;
493
+ };
494
+ /** Parent SafetyPlanSection of type Step Table. */
495
+ safetyPlanSectionId: string;
496
+ safetyPlanSection?: {
497
+ id: string;
498
+ title?: string;
499
+ code?: string;
500
+ };
501
+ /** Selected Work Step (WorkStepType) for this section’s table. */
502
+ workStepTypeId: string;
503
+ workStepType?: AXMWorkStepTypeSnapshot;
504
+ /** Optional display label (defaults to row order / first cell). */
505
+ title?: string;
506
+ /** Optional column snapshot at save time (display / history). */
507
+ columns?: AXMStepTableColumnDef[];
508
+ /** Cell values for this single table row. */
509
+ cells: AXMStepTableCellValue[];
510
+ sortOrder?: number;
511
+ isArchived?: boolean;
512
+ }
513
+
514
+ /** One Step Table body row in the section builder. */
515
+ interface AXMSafetyPlanStepTableRowBuilderPayload {
516
+ cells: AXMStepTableCellValue[];
517
+ /** Persisted business code when loaded from storage. */
518
+ code?: string;
519
+ sortOrder?: number;
520
+ title?: string;
521
+ }
522
+ interface AXMSafetyPlanSectionBuilderItemValue {
523
+ id: string;
524
+ itemIds: string[];
525
+ items?: {
526
+ id: string;
527
+ title?: string;
528
+ code?: string;
529
+ }[];
530
+ /** Step Table body row (one SafetyPlanWorkStep entity). */
531
+ stepTableRow?: AXMSafetyPlanStepTableRowBuilderPayload;
532
+ }
533
+ interface AXMSafetyPlanSectionBuilderSectionValue {
534
+ id: string;
535
+ sectionTypeId: string;
536
+ sectionType?: AXMSectionTypeSnapshot;
537
+ title: string;
538
+ description?: string;
539
+ safetyPlanId?: string;
540
+ /** Persisted business code (`SPS-{seq:4}`) when loaded from storage. */
541
+ code?: string;
542
+ /** Originating SafetyPlanTypeSection id (independent copy after save). */
543
+ sourceSafetyPlanTypeSectionId?: string;
544
+ /** Display / persistence order. */
545
+ sortOrder?: number;
546
+ /** When true, section came from a default type template and must remain. */
547
+ required?: boolean;
548
+ /**
549
+ * Step Table only — selected Work Step (WorkStepType) that defines columns.
550
+ * Required before rows can be added.
551
+ */
552
+ workStepTypeId?: string;
553
+ workStepType?: AXMWorkStepTypeSnapshot;
554
+ /** Columns loaded from the selected Work Step configuration. */
555
+ columns?: AXMStepTableColumnDef[];
556
+ items: AXMSafetyPlanSectionBuilderItemValue[];
557
+ }
558
+ interface AXMSafetyPlanSectionBuilderValue {
559
+ sections: AXMSafetyPlanSectionBuilderSectionValue[];
560
+ }
561
+
562
+ /** Parent section type whose selected item IDs constrain the child lookup. */
563
+ interface AXMSectionTypeParentFilterDependency {
564
+ kind: 'parentFilter';
565
+ parentSectionTypeKey: AXMSectionTypeCode;
566
+ /** Field on the child lookup entity used for filtering (e.g. `hazardId`). */
567
+ filterField: string;
568
+ }
569
+ /** Child lookup is filtered by IDs derived from parent entity records (e.g. `riskMatrixId` on HazardRisk). */
570
+ interface AXMSectionTypeDerivedFilterDependency {
571
+ kind: 'derivedFromParent';
572
+ parentSectionTypeKey: AXMSectionTypeCode;
573
+ /** Field path on the parent entity record used to resolve filter values. */
574
+ resolveField: 'riskMatrixId' | 'controlMeasureIds';
575
+ /** Field on the child lookup entity (typically `id`). */
576
+ filterField: string;
577
+ }
578
+ type AXMSectionTypeDependency = AXMSectionTypeParentFilterDependency | AXMSectionTypeDerivedFilterDependency;
579
+ /** Declarative section-type dependencies resolved from prior sections in plan order. */
580
+ declare const WORKPLACE_SAFETY_SECTION_TYPE_DEPENDENCIES: Partial<Record<AXMSectionTypeCode, AXMSectionTypeDependency>>;
581
+ /** Section types cleared when upstream hazard selections change. */
582
+ declare const WORKPLACE_SAFETY_DOWNSTREAM_FROM_HAZARD: readonly AXMSectionTypeCode[];
583
+ /** Section types cleared when upstream hazard-risk selections change. */
584
+ declare const WORKPLACE_SAFETY_DOWNSTREAM_FROM_HAZARD_RISK: readonly AXMSectionTypeCode[];
585
+ type AXMHazardRiskRecordLoader = (hazardRiskIds: string[]) => Promise<Record<string, unknown>[]>;
586
+ declare const PARENT_HAZARD_IDS_CONTEXT_KEY = "parentHazardIds";
587
+ declare const PARENT_HAZARD_RISK_IDS_CONTEXT_KEY = "parentHazardRiskIds";
588
+ /** Expose paths when a section type is selected (shared by entity repeater and builder dialog). */
589
+ declare const WORKPLACE_SAFETY_SECTION_TYPE_LOOKUP_EXPOSE: {
590
+ source: string;
591
+ target: string;
592
+ }[];
593
+ /** Auto-fill section description when section type is selected. */
594
+ declare const WORKPLACE_SAFETY_SECTION_TYPE_DESCRIPTION_SYNC_TRIGGERS: {
595
+ event: string;
596
+ action: string;
597
+ }[];
598
+ /** Auto-fill section title when section type is selected. */
599
+ declare const WORKPLACE_SAFETY_SECTION_TYPE_TITLE_SYNC_TRIGGERS: {
600
+ event: string;
601
+ action: string;
602
+ }[];
603
+ /** Shared lookup widget options for section type pickers (builder dialog and entity forms). */
604
+ declare const WORKPLACE_SAFETY_SECTION_TYPE_LOOKUP_WIDGET_OPTIONS: Record<string, unknown>;
605
+ declare function getSectionTypeDependency(sectionTypeKey: string | undefined): AXMSectionTypeDependency | undefined;
606
+ declare function sectionTypeKeyFromSection(section: Pick<AXMSafetyPlanSectionBuilderSectionValue, 'sectionType' | 'sectionTypeId'>): AXMSectionTypeCode | undefined;
607
+ /** Collects item IDs from sections up to `sectionIndex` whose type matches `parentSectionTypeKey`. */
608
+ declare function resolveParentItemIds(sections: AXMSafetyPlanSectionBuilderSectionValue[], sectionIndex: number, parentSectionTypeKey: AXMSectionTypeCode): string[];
609
+ /** Collects hazard IDs from earlier sections and Hazard rows in the current section. */
610
+ declare function resolveParentHazardIds(sections: AXMSafetyPlanSectionBuilderSectionValue[], sectionIndex: number, parentSectionTypeKey?: AXMSectionTypeCode): string[];
611
+ /** Collects hazard-risk IDs from prior HazardRisk sections up to `sectionIndex`. */
612
+ declare function resolveParentHazardRiskIds(sections: AXMSafetyPlanSectionBuilderSectionValue[], sectionIndex: number): string[];
613
+ /**
614
+ * When upstream hazard or hazard-risk selections change, clears item rows in later dependent sections.
615
+ */
616
+ declare function clearDependentItemsOnParentChange(previous: AXMSafetyPlanSectionBuilderValue, next: AXMSafetyPlanSectionBuilderValue): AXMSafetyPlanSectionBuilderValue;
617
+ declare function extractRiskMatrixIdsFromHazardRisks(records: Record<string, unknown>[]): string[];
618
+ declare function extractControlMeasureIdsFromHazardRisks(records: Record<string, unknown>[]): string[];
619
+ declare function resolveSafetyPlanSectionItemFilter(sectionTypeId: string, parentHazardIds: string[], parentHazardRiskIds?: string[]): Record<string, unknown> | null;
620
+ declare function resolveSafetyPlanSectionItemFilterAsync(sectionTypeId: string, sections: AXMSafetyPlanSectionBuilderSectionValue[], sectionIndex: number, loadHazardRisks: AXMHazardRiskRecordLoader): Promise<Record<string, unknown> | null>;
621
+ /** Clears item selection when section type changes in item dialog context. */
622
+ declare const WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_CLEAR_ON_SECTION_TYPE_TRIGGERS: {
623
+ event: string;
624
+ action: string;
625
+ }[];
626
+ /**
627
+ * Reloads lookup data after section type is resolved (`sectionType.id`, `itemEntityName`).
628
+ */
629
+ declare const WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_REFRESH_ON_SECTION_TYPE_EXPOSE_TRIGGERS: {
630
+ event: string;
631
+ action: string;
632
+ }[];
633
+ declare const WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_SECTION_TYPE_TRIGGERS: {
634
+ event: string;
635
+ action: string;
636
+ }[];
637
+ /** Shared item lookup options for builder item dialog (`sectionType.*` in dialog context). */
638
+ declare function buildSafetyPlanSectionItemLookupOptions(entityExpression: string, options?: {
639
+ /** Context path to section type id, e.g. `sectionType.id`. */
640
+ sectionTypeIdPath?: string;
641
+ /** Dialog context key for upstream hazard IDs (read at runtime; do not embed IDs in options). */
642
+ parentHazardIdsContextKey?: string;
643
+ /** Dialog context key for upstream hazard-risk IDs. */
644
+ parentHazardRiskIdsContextKey?: string;
645
+ defaultPlaceholderKey?: string;
646
+ }): Record<string, unknown>;
647
+ /** Lookup options with entity data-selector popup UI (`look: 'lookup'`). */
648
+ declare function buildSafetyPlanSectionItemSelectorOptions(entityExpression: string, options?: Parameters<typeof buildSafetyPlanSectionItemLookupOptions>[1]): Record<string, unknown>;
649
+ declare function resolveSafetyPlanSectionItemColumns(sectionTypeId: string): string[];
650
+ declare function resolveSafetyPlanSectionItemEntityKey(sectionTypeId: string, sectionType?: AXMSectionTypeSnapshot): string | undefined;
651
+ declare function mapSafetyPlanSectionSelectedItems(sectionTypeId: string, selectedItems: Array<Record<string, unknown>>): Array<{
652
+ id: string;
653
+ title?: string;
654
+ code?: string;
655
+ }>;
656
+ declare function dedupeSafetyPlanSectionItemSelection(item: AXMSafetyPlanSectionBuilderItemValue): AXMSafetyPlanSectionBuilderItemValue;
657
+ declare function isPpeRuleSectionTypeId(sectionTypeId: string): boolean;
658
+
659
+ /** Component key for the safety plan Sections page tab. Register via AXP_PAGE_COMPONENT_PROVIDER. */
660
+ declare const SAFETY_PLAN_SECTIONS_PAGE_COMPONENT_KEY = "safety-plan-sections-page";
661
+
662
+ /** Section type row managed via repeater on Safety Plan Type Section. */
663
+ interface AXMWorkplaceSafetyManagementSafetyPlanTypeSectionTypeItemModel {
664
+ sectionTypeId: string;
665
+ sectionType?: {
666
+ id: string;
667
+ title?: string;
668
+ code?: string;
669
+ };
670
+ }
671
+ interface AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel extends AXPEntityModel<string> {
672
+ safetyPlanTypeId: string;
673
+ safetyPlanType?: {
674
+ id: string;
675
+ title?: string;
676
+ code?: string;
677
+ };
678
+ /** Display title for this section configuration. */
679
+ title: string;
680
+ /**
681
+ * Section types managed via repeater (`allowReorder`).
682
+ * Each row holds a `sectionTypeId` LookupBox selection.
683
+ */
684
+ sectionTypeIds?: AXMWorkplaceSafetyManagementSafetyPlanTypeSectionTypeItemModel[];
685
+ /** List sort order only (hidden / not edited in create-update UI). */
686
+ sortOrder?: number;
687
+ isDefault?: boolean;
688
+ /** Managed by the archive plugin (`isArchived`). Active when false. */
689
+ isArchived?: boolean;
690
+ }
691
+
692
+ interface AXMSafetyPlanSectionStructureItem {
693
+ id: string;
694
+ sectionTypeId: string;
695
+ sectionType?: {
696
+ id: string;
697
+ title?: string;
698
+ code?: string;
699
+ };
700
+ title: string;
701
+ description?: string;
702
+ /** Links the plan section back to the type template it was created from. */
703
+ sourceSafetyPlanTypeSectionId?: string;
704
+ /** Display / persistence order (1-based). */
705
+ sortOrder: number;
706
+ /** True when sourced from an `isDefault` type section — must remain on the plan. */
707
+ required?: boolean;
708
+ items: Array<{
709
+ id: string;
710
+ itemIds: string[];
711
+ items?: {
712
+ id: string;
713
+ title?: string;
714
+ code?: string;
715
+ }[];
716
+ }>;
717
+ safetyPlanId?: string;
718
+ code?: string;
719
+ }
720
+ interface AXMSafetyPlanSectionStructureValue {
721
+ sections: AXMSafetyPlanSectionStructureItem[];
722
+ }
723
+ interface AXMSafetyPlanSectionStructureValidationContext {
724
+ /** Section type ids allowed for this plan type (from its type-section config). */
725
+ allowedSectionTypeIds: readonly string[];
726
+ /** Source type-section ids that must remain present. */
727
+ requiredSourceTypeSectionIds: readonly string[];
728
+ /** Section type ids that may appear more than once on a plan. */
729
+ repeatableSectionTypeIds?: readonly string[];
730
+ }
731
+ type AXMSafetyPlanSectionStructureValidationIssueCode = 'REQUIRED_SECTION_MISSING' | 'SECTION_TYPE_NOT_ALLOWED' | 'DUPLICATE_NON_REPEATABLE_SECTION' | 'INVALID_TYPE_SECTION_TEMPLATE' | 'INVALID_SORT_ORDER';
732
+ interface AXMSafetyPlanSectionStructureValidationIssue {
733
+ code: AXMSafetyPlanSectionStructureValidationIssueCode;
734
+ messageKey: string;
735
+ details?: Record<string, unknown>;
736
+ }
737
+ /** True when a type-section row is marked as the plan-type default template. */
738
+ declare function isSafetyPlanTypeSectionDefault(row: {
739
+ isDefault?: unknown;
740
+ } | null | undefined): boolean;
741
+ /** Extracts a stable entity id from a raw lookup / context value. */
742
+ declare function resolveEntityRefId(raw: unknown): string | null;
743
+ /**
744
+ * Builds an empty editable section structure from SafetyPlanTypeSection rows for one plan type.
745
+ *
746
+ * Uses `isDefault` rows when present; otherwise falls back to all active rows for that type
747
+ * (so a mis-flagged template still produces a structure). One plan section per `sectionTypeIds`
748
+ * entry, titled from the Section Type, ordered by type-section `sortOrder` then repeater order.
749
+ */
750
+ declare function buildSectionStructureFromTypeSections(typeSections: readonly AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel[], options?: {
751
+ createId?: () => string;
752
+ }): AXMSafetyPlanSectionStructureValue;
753
+ /**
754
+ * Removes accidental duplicate plan sections.
755
+ * Non-repeatable section types are kept once (first wins); repeatable types may appear more than once.
756
+ * Reassigns contiguous 1-based `sortOrder` to preserve display order.
757
+ */
758
+ declare function dedupeSafetyPlanSectionStructure<T extends AXMSafetyPlanSectionStructureValue | AXMSafetyPlanSectionBuilderValue>(structure: T, options?: {
759
+ repeatableSectionTypeIds?: readonly string[];
760
+ }): T;
761
+ declare function collectAllowedSectionTypeIds(typeSections: readonly AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel[]): string[];
762
+ declare function collectRequiredSourceTypeSectionIds(typeSections: readonly AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel[]): string[];
763
+ /**
764
+ * Validates that a plan-type section template does not list the same
765
+ * non-repeatable section type more than once (across rows and within a single row's repeater).
766
+ */
767
+ declare function validateSafetyPlanTypeSectionTemplate(typeSections: readonly AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel[], repeatableSectionTypeIds?: readonly string[]): AXMSafetyPlanSectionStructureValidationIssue[];
768
+ declare function validateSafetyPlanSectionStructure(structure: AXMSafetyPlanSectionStructureValue | AXMSafetyPlanSectionBuilderValue | null | undefined, context: AXMSafetyPlanSectionStructureValidationContext): AXMSafetyPlanSectionStructureValidationIssue[];
769
+ declare function toBuilderValueFromStructure(structure: AXMSafetyPlanSectionStructureValue): AXMSafetyPlanSectionBuilderValue;
770
+
771
+ /**
772
+ * Shared helpers for Safety Plan Section uniqueness (section type per plan).
773
+ * Leaf module — imports only other contract leaves (no client/server layers).
774
+ */
775
+ declare const SAFETY_PLAN_SECTION_DUPLICATE_SECTION_TYPE_MESSAGE_KEY = "@workplacesafety-management:safety-plan-sections.messages.duplicate-section-type";
776
+ /** Stable API / middleware error code for duplicate section type in a plan. */
777
+ declare const SAFETY_PLAN_SECTION_DUPLICATE_SECTION_TYPE_CODE = "SAFETY_PLAN_SECTION_DUPLICATE_SECTION_TYPE";
778
+ interface AXMSafetyPlanSectionTypeIdentity {
779
+ id?: string;
780
+ sectionTypeId?: unknown;
781
+ sectionType?: {
782
+ id?: unknown;
783
+ isRepeatable?: boolean;
784
+ };
785
+ }
786
+ interface AXMSafetyPlanSectionTypeUniquenessOptions {
787
+ /** Section ids to ignore (e.g. the row being edited). */
788
+ excludeSectionId?: string;
789
+ /**
790
+ * Section type ids that may appear more than once in a plan.
791
+ * Types not listed are treated as non-repeatable unless the section type
792
+ * snapshot / built-in map marks them repeatable.
793
+ */
794
+ repeatableSectionTypeIds?: readonly string[];
795
+ }
796
+ /** Resolves the section type id from a plan section identity or nested snapshot. */
797
+ declare function resolveSafetyPlanSectionTypeId(section: Pick<AXMSafetyPlanSectionTypeIdentity, 'sectionTypeId' | 'sectionType'>): string;
798
+ /**
799
+ * True when this section type may appear more than once in a Safety Plan.
800
+ * Checks (in order): snapshot flag, explicit allow-list, built-in section type meta.
801
+ */
802
+ declare function isSafetyPlanSectionTypeRepeatable(sectionTypeId: string, options?: {
803
+ repeatableSectionTypeIds?: readonly string[];
804
+ sectionType?: {
805
+ isRepeatable?: boolean;
806
+ };
807
+ }): boolean;
808
+ /** Built-in section type ids that are always treated as repeatable. */
809
+ declare function collectBuiltInRepeatableSectionTypeIds(): string[];
810
+ /**
811
+ * Returns the first duplicate non-repeatable `sectionTypeId` in the list, or `null`
812
+ * when all non-repeatable types are unique. Empty / missing section type ids are ignored.
813
+ * Repeatable section types are allowed to appear more than once.
814
+ */
815
+ declare function findDuplicateSafetyPlanSectionTypeId(sections: readonly AXMSafetyPlanSectionTypeIdentity[], options?: AXMSafetyPlanSectionTypeUniquenessOptions): string | null;
816
+ /**
817
+ * True when `sectionTypeId` already appears on another section in the collection
818
+ * and the type is not repeatable.
819
+ */
820
+ declare function safetyPlanSectionTypeAlreadyExists(sections: readonly AXMSafetyPlanSectionTypeIdentity[], sectionTypeId: string, options?: AXMSafetyPlanSectionTypeUniquenessOptions & {
821
+ sectionType?: {
822
+ isRepeatable?: boolean;
823
+ };
824
+ }): boolean;
825
+
826
+ /** True when the section type is the Step Table host for SafetyPlanWorkStep rows. */
827
+ declare function isStepTableSectionType(sectionTypeId: string | undefined, snapshot?: AXMSectionTypeSnapshot): boolean;
828
+ /** Stable key used on cells for this column (`sectionTypeId`). */
829
+ declare function stepTableColumnKey(column: AXMStepTableColumnDef): string;
830
+ declare function stepTableColumnTitle(column: AXMStepTableColumnDef): string;
831
+ /** Resolves the catalog entity for a column from its SectionType mapping. */
832
+ declare function resolveStepTableColumnLookupEntity(column: AXMStepTableColumnDef): string | undefined;
833
+ /** Multi-select when the mapped section type typically holds many items. */
834
+ declare function isStepTableColumnMultiLookup(column: AXMStepTableColumnDef): boolean;
835
+ declare function sortStepTableColumns(columns: readonly AXMStepTableColumnDef[]): AXMStepTableColumnDef[];
836
+ declare function createEmptyStepTableRow(columns: readonly AXMStepTableColumnDef[], sortOrder?: number): AXMStepTableRow;
837
+ declare function createEmptyStepTableCell(columnKey: string): AXMStepTableCellValue;
838
+ /** Builds a new work-step payload from a WorkStepType (columns snapshot + one empty row). */
839
+ declare function buildWorkStepContentFromType(type: Pick<AXMWorkplaceSafetyManagementWorkStepTypeEntityModel, 'columns'>): {
840
+ columns: AXMStepTableColumnDef[];
841
+ rows: AXMStepTableRow[];
842
+ };
843
+ declare function normalizeStepTableColumns(columns: readonly AXMStepTableColumnDef[] | null | undefined): AXMStepTableColumnDef[];
844
+ declare function normalizeStepTableRows(rows: readonly AXMStepTableRow[] | null | undefined, columns: readonly AXMStepTableColumnDef[]): AXMStepTableRow[];
845
+ declare function toWorkStepBuilderPayload(entity: AXMWorkplaceSafetyManagementSafetyPlanWorkStepEntityModel): {
846
+ id: string;
847
+ code?: string;
848
+ workStepTypeId: string;
849
+ workStepType?: {
850
+ id: string;
851
+ title?: string;
852
+ code?: string;
853
+ };
854
+ title?: string;
855
+ columns: AXMStepTableColumnDef[];
856
+ cells: AXMStepTableCellValue[];
857
+ sortOrder?: number;
858
+ };
859
+
860
+ /** Stable IDs for seeded Work Step Types (shared by server mocks and client). */
861
+ declare const WORKPLACE_SAFETY_BUILT_IN_WORK_STEP_TYPE_IDS: {
862
+ readonly generalTask: "c1d2e5f4-a5b6-4789-d001-000000000001";
863
+ readonly sitePreparation: "c1d2e5f4-a5b6-4789-d001-000000000002";
864
+ readonly performWork: "c1d2e5f4-a5b6-4789-d001-000000000003";
865
+ };
866
+
867
+ interface AXMControlHierarchyLevelItemModel {
868
+ title: AXPMultiLanguageString;
869
+ description?: AXPMultiLanguageString;
870
+ /** Display color for hierarchy diagram visualizations. */
871
+ color?: string;
872
+ /**
873
+ * Optional explicit row order. When omitted, repeater array index defines order
874
+ * (`AXPRepeaterWidgetEditComponent` + `allowReorder`).
875
+ */
876
+ order?: number;
877
+ }
878
+ interface AXMWorkplaceSafetyManagementControlHierarchyLevelsEntityModel extends AXPEntityModel<string> {
879
+ /** Business code from identifier rule `control-hierarchy-levels-code` (`CHL-{seq:4}`). */
880
+ code: string;
881
+ title: AXPMultiLanguageString;
882
+ description?: AXPMultiLanguageString;
883
+ /** Hierarchy level items managed via repeater. */
884
+ itemIds?: AXMControlHierarchyLevelItemModel[];
885
+ }
886
+
887
+ interface AXMWorkplaceSafetyManagementControlMeasureEntityModel extends AXPEntityModel<string> {
888
+ /** Business code from identifier rule `control-measure-code` (`CM-{seq:4}`). */
889
+ code: string;
890
+ title: AXPMultiLanguageString;
891
+ instruction?: AXPMultiLanguageString;
892
+ status?: string;
893
+ }
894
+
895
+ type AXMHazardStatus = AXPSystemStatusType.Draft | AXPSystemStatusType.Active | AXPSystemStatusType.Inactive | AXPSystemStatusType.Archived;
896
+ interface AXMWorkplaceSafetyManagementHazardEntityModel extends AXPEntityModel<string> {
897
+ /** Business code from identifier rule `hazard-code` (`HAZ-{date:YYYY}-{seq:4}`). */
898
+ code: string;
899
+ title: string;
900
+ description?: string;
901
+ categoryIds?: string[];
902
+ categories?: AXPCategoryListItem[];
903
+ templateId?: string;
904
+ template?: {
905
+ id: string;
906
+ title?: string;
907
+ };
908
+ safetyDataSheetAvailable?: boolean;
909
+ ghsIds?: string[];
910
+ /** Hazard-level metadata field definitions (configured via meta-data-builder). */
911
+ metaDataList?: AXMMetaDataBuilderValue;
912
+ status: AXMHazardStatus;
913
+ }
914
+
915
+ declare enum AXMHazardRegisterContextType {
916
+ Asset = "asset",
917
+ Site = "site",
918
+ WorkOrder = "work-order",
919
+ Project = "project"
920
+ }
921
+ interface AXMWorkplaceSafetyManagementHazardRegisterEntityModel extends AXPEntityModel<string> {
922
+ /** Business code from identifier rule `hazard-register-code` (`HR-{date:YYYY}-{seq:4}`). */
923
+ code: string;
924
+ title: string;
925
+ description?: string;
926
+ /** Hazard category id (`WorkplaceSafetyManagement.HazardCategory`). */
927
+ registerType: string;
928
+ registerTypeCategory?: {
929
+ id: string;
930
+ title?: string;
931
+ code?: string;
932
+ };
933
+ hazardId: string;
934
+ hazard?: {
935
+ id: string;
936
+ title?: string;
937
+ code?: string;
938
+ };
939
+ /** Merged hazard + category metadata field values keyed by field name. */
940
+ metaDataForm?: Record<string, unknown>;
941
+ contextType: AXMHazardRegisterContextType;
942
+ contextId: string;
943
+ }
944
+
945
+ interface AXMWorkplaceSafetyManagementHazardRiskEntityModel extends AXPEntityModel<string> {
946
+ code: string;
947
+ hazardId: string;
948
+ hazard?: {
949
+ id: string;
950
+ title?: string;
951
+ code?: string;
952
+ };
953
+ riskMatrixId: string;
954
+ riskMatrix?: {
955
+ id: string;
956
+ title?: string;
957
+ code?: string;
958
+ };
959
+ title: string;
960
+ description?: string;
961
+ defaultInitialRiskRatingId?: string;
962
+ defaultInitialRiskRating?: {
963
+ id: string;
964
+ title?: string;
965
+ code?: string;
966
+ };
967
+ defaultResidualRiskRatingId?: string;
968
+ defaultResidualRiskRating?: {
969
+ id: string;
970
+ title?: string;
971
+ code?: string;
972
+ };
973
+ status?: AXPSystemStatusType.Active | AXPSystemStatusType.Inactive;
974
+ }
975
+
976
+ interface AXMWorkplaceSafetyManagementHazardRiskPpeRuleEntityModel extends AXPEntityModel<string> {
977
+ hazardRiskId: string;
978
+ hazardRisk?: {
979
+ id: string;
980
+ title?: string;
981
+ code?: string;
982
+ };
983
+ ppeItemId: string;
984
+ ppeItem?: {
985
+ id: string;
986
+ title?: string;
987
+ code?: string;
988
+ };
989
+ requirementType: AXMHazardPpeRuleRequirementType;
990
+ conditionNote?: string;
991
+ usageInstruction?: string;
992
+ status?: AXPSystemStatusType.Active | AXPSystemStatusType.Inactive;
993
+ }
994
+
995
+ interface AXMWorkplaceSafetyManagementPpeItemEntityModel extends AXPEntityModel<string> {
996
+ code: string;
997
+ title: AXPMultiLanguageString;
998
+ description?: AXPMultiLanguageString;
999
+ categoryIds?: string[];
1000
+ categories?: AXPCategoryListItem[];
1001
+ serialNumber?: string;
1002
+ icon?: string;
1003
+ status?: string;
1004
+ }
1005
+
1006
+ type AXMSafetyPlanStatus = AXPSystemStatusType.Draft | AXPSystemStatusType.Published | AXPSystemStatusType.Archived;
1007
+ interface AXMWorkplaceSafetyManagementSafetyPlanEntityModel extends AXPEntityModel<string> {
1008
+ /** Business code from identifier rule `safety-plan-code` (`SP-{seq:4}`). */
1009
+ code: string;
1010
+ title: string;
1011
+ description?: string;
1012
+ safetyPlanTypeId: string;
1013
+ safetyPlanType?: {
1014
+ id: string;
1015
+ title?: string;
1016
+ code?: string;
1017
+ };
1018
+ status?: AXMSafetyPlanStatus;
1019
+ /** When true, a published plan can be cloned into a new draft plan. */
1020
+ allowClone?: boolean;
1021
+ publishedAt?: string;
1022
+ publishedById?: string;
1023
+ publishedBy?: {
1024
+ id: string;
1025
+ displayName?: string;
1026
+ };
1027
+ /**
1028
+ * Form-only editable section structure loaded from the selected plan type defaults
1029
+ * (create) or from saved SafetyPlanSection rows (edit). Not persisted on the plan document.
1030
+ */
1031
+ sectionStructure?: AXMSafetyPlanSectionStructureValue | AXMSafetyPlanSectionBuilderValue;
1032
+ /** @deprecated Prefer {@link sectionStructure}; kept for wizard page field compatibility. */
1033
+ sections?: AXMSafetyPlanSectionBuilderValue;
1034
+ }
1035
+
1036
+ interface AXMWorkplaceSafetyManagementSafetyPlanSectionItemModel {
1037
+ sectionTypeId: string;
1038
+ sectionType?: {
1039
+ id: string;
1040
+ title?: string;
1041
+ code?: string;
1042
+ };
1043
+ /**
1044
+ * Step Table only — selected Work Step (WorkStepType) that defines table columns.
1045
+ * Persisted on the section items slot alongside row entity ids.
1046
+ */
1047
+ workStepTypeId?: string;
1048
+ workStepType?: {
1049
+ id: string;
1050
+ title?: string;
1051
+ code?: string;
1052
+ };
1053
+ itemIds?: string[];
1054
+ items?: {
1055
+ id: string;
1056
+ title?: string;
1057
+ code?: string;
1058
+ }[];
1059
+ }
1060
+ interface AXMWorkplaceSafetyManagementSafetyPlanSectionEntityModel extends AXPEntityModel<string> {
1061
+ /** Business code from identifier rule `safety-plan-section-code` (`SPS-{seq:4}`). */
1062
+ code: string;
1063
+ safetyPlanId: string;
1064
+ safetyPlan?: {
1065
+ id: string;
1066
+ title?: string;
1067
+ code?: string;
1068
+ };
1069
+ title: string;
1070
+ description?: string;
1071
+ /** Section line items managed via repeater (embedded value objects). */
1072
+ items: AXMWorkplaceSafetyManagementSafetyPlanSectionItemModel[];
1073
+ /**
1074
+ * SafetyPlanTypeSection this row was created from.
1075
+ * Stored as a snapshot link only — later type-section edits do not affect this plan.
1076
+ */
1077
+ sourceSafetyPlanTypeSectionId?: string;
1078
+ /** List / display order within the plan. */
1079
+ sortOrder?: number;
1080
+ /** Managed by the archive plugin (`isArchived`). */
1081
+ isArchived?: boolean;
1082
+ }
1083
+
1084
+ interface AXMWorkplaceSafetyManagementSafetyPlanTypeEntityModel extends AXPEntityModel<string> {
1085
+ /** Business code from identifier rule `safety-plan-type-code` (`SPT-{seq:4}`). */
1086
+ code: string;
1087
+ title: string;
1088
+ description?: string;
1089
+ /** Managed by the archive plugin (`isArchived`). Active when false. */
1090
+ isArchived?: boolean;
1091
+ }
1092
+
1093
+ type AXMSafetyTemplateType = 'SWMS' | 'JSA' | 'Forms' | 'Permits' | 'Plans';
1094
+ interface AXMWorkplaceSafetyManagementSafetyTemplateEntityModel extends AXPEntityModel<string> {
1095
+ /** Business code from identifier rule `safety-template-code` (`ST-{seq:4}`). */
1096
+ code: string;
1097
+ title: string;
1098
+ description?: string;
1099
+ templateType: AXMSafetyTemplateType;
1100
+ /** Managed by the archive plugin (`isArchived`). */
1101
+ isArchived?: boolean;
1102
+ sectionIds: string[];
1103
+ sections?: {
1104
+ id: string;
1105
+ title: string;
1106
+ code?: string;
1107
+ }[];
1108
+ }
1109
+
1110
+ export { AXMHazardPpeRuleRequirementType, AXMHazardRegisterContextType, AXMWorkplaceSafetyManagementCommandKeys, AXMWorkplaceSafetyManagementMenuKeys, AXMWorkplaceSafetyManagementPermissionKeys, AXPSafetyRiskPermissionKeys, PARENT_HAZARD_IDS_CONTEXT_KEY, PARENT_HAZARD_RISK_IDS_CONTEXT_KEY, RISK_MANAGEMENT_HAZARD_CATALOG_SCOPE, RISK_MANAGEMENT_RISK_MATRIX_CELL_ENTITY, RISK_MANAGEMENT_RISK_RATING_ENTITY, RootConfig, SAFETY_PLAN_SECTIONS_PAGE_COMPONENT_KEY, SAFETY_PLAN_SECTION_DUPLICATE_SECTION_TYPE_CODE, SAFETY_PLAN_SECTION_DUPLICATE_SECTION_TYPE_MESSAGE_KEY, WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_BY_ID, WORKPLACE_SAFETY_BUILT_IN_SECTION_TYPE_IDS, WORKPLACE_SAFETY_BUILT_IN_WORK_STEP_TYPE_IDS, WORKPLACE_SAFETY_DOWNSTREAM_FROM_HAZARD, WORKPLACE_SAFETY_DOWNSTREAM_FROM_HAZARD_RISK, WORKPLACE_SAFETY_GHS_SYMBOL_OPTIONS, WORKPLACE_SAFETY_HAZARD_PPE_RULE_REQUIREMENT_TYPE_OPTIONS, WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_CLEAR_ON_SECTION_TYPE_TRIGGERS, WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_REFRESH_ON_SECTION_TYPE_EXPOSE_TRIGGERS, WORKPLACE_SAFETY_SECTION_ITEM_LOOKUP_SECTION_TYPE_TRIGGERS, WORKPLACE_SAFETY_SECTION_TYPE_DEPENDENCIES, WORKPLACE_SAFETY_SECTION_TYPE_DESCRIPTION_SYNC_TRIGGERS, WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_BY_CODE, WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_EXPRESSION, WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_EXPRESSION_SIBLING, WORKPLACE_SAFETY_SECTION_TYPE_ENTITY_FALLBACK, WORKPLACE_SAFETY_SECTION_TYPE_LOOKUP_EXPOSE, WORKPLACE_SAFETY_SECTION_TYPE_LOOKUP_WIDGET_OPTIONS, WORKPLACE_SAFETY_SECTION_TYPE_TITLE_SYNC_TRIGGERS, WORKPLACE_SAFETY_TEMPLATE_TYPE_OPTIONS, buildSafetyPlanSectionItemLookupOptions, buildSafetyPlanSectionItemSelectorOptions, buildSectionStructureFromTypeSections, buildWorkStepContentFromType, clearDependentItemsOnParentChange, collectAllowedSectionTypeIds, collectBuiltInRepeatableSectionTypeIds, collectRequiredSourceTypeSectionIds, createEmptyStepTableCell, createEmptyStepTableRow, dedupeSafetyPlanSectionItemSelection, dedupeSafetyPlanSectionStructure, enrichSectionTypeSnapshot, extractControlMeasureIdsFromHazardRisks, extractRiskMatrixIdsFromHazardRisks, findDuplicateSafetyPlanSectionTypeId, getSectionTypeDependency, isPpeRuleSectionTypeId, isSafetyPlanSectionTypeRepeatable, isSafetyPlanTypeSectionDefault, isStepTableColumnMultiLookup, isStepTableSectionType, mapSafetyPlanSectionSelectedItems, normalizeStepTableColumns, normalizeStepTableRows, resolveEntityRefId, resolveParentHazardIds, resolveParentHazardRiskIds, resolveParentItemIds, resolveSafetyPlanSectionItemColumns, resolveSafetyPlanSectionItemEntityKey, resolveSafetyPlanSectionItemFilter, resolveSafetyPlanSectionItemFilterAsync, resolveSafetyPlanSectionTypeId, resolveSectionItemEntityName, resolveSectionTypeKey, resolveStepTableColumnLookupEntity, safetyPlanSectionTypeAlreadyExists, sectionTypeKeyFromSection, sortStepTableColumns, stepTableColumnKey, stepTableColumnTitle, toBuilderValueFromStructure, toWorkStepBuilderPayload, validateSafetyPlanSectionStructure, validateSafetyPlanTypeSectionTemplate };
1111
+ export type { AXMBuiltInSectionTypeMeta, AXMControlHierarchyLevelItemModel, AXMHazardRiskRecordLoader, AXMHazardStatus, AXMSafetyPlanSectionBuilderItemValue, AXMSafetyPlanSectionBuilderSectionValue, AXMSafetyPlanSectionBuilderValue, AXMSafetyPlanSectionStructureItem, AXMSafetyPlanSectionStructureValidationContext, AXMSafetyPlanSectionStructureValidationIssue, AXMSafetyPlanSectionStructureValidationIssueCode, AXMSafetyPlanSectionStructureValue, AXMSafetyPlanSectionTypeIdentity, AXMSafetyPlanSectionTypeUniquenessOptions, AXMSafetyPlanStatus, AXMSafetyPlanStepTableRowBuilderPayload, AXMSafetyTemplateType, AXMSectionTypeCode, AXMSectionTypeDependency, AXMSectionTypeDerivedFilterDependency, AXMSectionTypeParentFilterDependency, AXMSectionTypeSnapshot, AXMStepTableCellRef, AXMStepTableCellValue, AXMStepTableColumnDef, AXMStepTableRow, AXMWorkStepTypeSnapshot, AXMWorkplaceSafetyManagementControlHierarchyLevelsEntityModel, AXMWorkplaceSafetyManagementControlMeasureEntityModel, AXMWorkplaceSafetyManagementHazardEntityModel, AXMWorkplaceSafetyManagementHazardPpeRuleEntityModel, AXMWorkplaceSafetyManagementHazardRegisterEntityModel, AXMWorkplaceSafetyManagementHazardRiskEntityModel, AXMWorkplaceSafetyManagementHazardRiskPpeRuleEntityModel, AXMWorkplaceSafetyManagementPpeItemEntityModel, AXMWorkplaceSafetyManagementSafetyPlanEntityModel, AXMWorkplaceSafetyManagementSafetyPlanSectionEntityModel, AXMWorkplaceSafetyManagementSafetyPlanSectionItemModel, AXMWorkplaceSafetyManagementSafetyPlanTypeEntityModel, AXMWorkplaceSafetyManagementSafetyPlanTypeSectionEntityModel, AXMWorkplaceSafetyManagementSafetyPlanTypeSectionTypeItemModel, AXMWorkplaceSafetyManagementSafetyPlanWorkStepEntityModel, AXMWorkplaceSafetyManagementSafetyTemplateEntityModel, AXMWorkplaceSafetyManagementSectionTypeEntityModel, AXMWorkplaceSafetyManagementWorkStepTypeEntityModel, WorkplaceSafetyGhsSymbolId };