@mark1russell7/guidebook-preparedness 0.7.49 → 0.7.50
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/build/index.d.ts.map +1 -1
- package/build/index.js +19 -1
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- package/src/data/persons.ts +21 -0
- package/src/data/steps.ts +4 -2
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/data/sources.ts","../src/data/steps.ts","../src/data/gaps.ts","../src/data/coverage.ts","../src/data/rules.ts","../src/data/chart.ts","../src/data/topics.ts","../src/data/units.ts","../src/data/tab-units.ts","../src/data/bundles.ts","../src/data/media.ts","../src/index.ts"],"mappings":";;;;;qBAOa;;qBAKA,kBAAkB;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/data/sources.ts","../src/data/steps.ts","../src/data/gaps.ts","../src/data/coverage.ts","../src/data/rules.ts","../src/data/chart.ts","../src/data/topics.ts","../src/data/units.ts","../src/data/tab-units.ts","../src/data/bundles.ts","../src/data/media.ts","../src/index.ts"],"mappings":";;;;;qBAOa;;qBAKA,kBAAkB;;qBCwFlB,qBAAqB;;;;;qBAoiBrB,oBAAoB;;qBAgSpB,gBAAgB;;qBC55BhB,eAAe;;;;;qBCLf;;qBCEA,gBAAgB;;qBCwBhB;;qBAGA;;;;;qBAQA,iBAAiB;;qBCrCjB;;qBAyDA,iBAAiB;;qBCshFjB,sBAAsB;;qBCg+DtB,oBAAoB;;qBC7iJpB;;;;;;qBAOA;;qBAKA,kBAAkB;;;;;;qBAyBlB,gBAAgB;;qBCvChB,sBAAsB;;qBA8CtB,eAAe,SAAS,QAAQ,OAAO;WAAuB;WAA6B;;;;;;;;;qBAY3F,cAAc,SAAS;WAA0B,MAAM;WAAqB,MAAM;WAAqB;;;;;;qBAYvG,sBAAsB;;;;;qBCrDtB;;;;;qBAmBA;;qBAGA;;qBAGA;;;qBAIA;qBAEA,eAAe;;qBAGf,kBAAkB;;qBAGlB,OAAO"}
|
package/build/index.js
CHANGED
|
@@ -534,6 +534,22 @@ function hazardsOf(steps) {
|
|
|
534
534
|
};
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
|
+
// src/data/persons.ts
|
|
538
|
+
/** The groups of persons that each step protects, by the `id` of the step. A test holds that each key is the id of a step. */
|
|
539
|
+
const STEP_PERSONS = {
|
|
540
|
+
"met.tropical.hurricane.warned.neighbors": ["older-adult"],
|
|
541
|
+
"met.tropical.hurricane.P3.mold": ["child"],
|
|
542
|
+
"met.heat.extreme.P1.check": ["older-adult"],
|
|
543
|
+
"fire.structure.ready.children": ["child"],
|
|
544
|
+
"fire.wildfire.P1.n95": ["infant", "child"],
|
|
545
|
+
"infra.supply-chain.food.ready.household": ["infant"],
|
|
546
|
+
"infra.supply-chain.food.P2.formula": ["infant"],
|
|
547
|
+
"cbrne.nuclear-detonation.P2.pregnant-care": ["pregnant"],
|
|
548
|
+
"security.armed-conflict.P3.children": ["child"],
|
|
549
|
+
"water.main.P1.unsafe": ["infant"],
|
|
550
|
+
"network.access.P5.teach-children": ["child"],
|
|
551
|
+
"food.retail.P3.share-by-need": ["child"]
|
|
552
|
+
};
|
|
537
553
|
// src/data/uses.ts
|
|
538
554
|
const WEATHER_RADIO = "communication.noaa-radio";
|
|
539
555
|
const AM_FM_RADIO = "communication.am-fm-radio";
|
|
@@ -586,7 +602,7 @@ const STEP_USES = {
|
|
|
586
602
|
// src/data/steps.ts
|
|
587
603
|
/**
|
|
588
604
|
* This function makes the steps of a key from its rows. The order of a step is its position among the rows of its phase.
|
|
589
|
-
* The items that a step uses come from `STEP_USES`, by the id of the step.
|
|
605
|
+
* The items that a step uses come from `STEP_USES`, and its groups of persons come from `STEP_PERSONS`, by the id of the step.
|
|
590
606
|
*/
|
|
591
607
|
function stepsOf(on, rows) {
|
|
592
608
|
const count = /* @__PURE__ */ new Map();
|
|
@@ -596,6 +612,7 @@ function stepsOf(on, rows) {
|
|
|
596
612
|
count.set(phase, order);
|
|
597
613
|
const id = `${on}.${phase}.${name}`;
|
|
598
614
|
const uses = STEP_USES[id];
|
|
615
|
+
const persons = STEP_PERSONS[id];
|
|
599
616
|
return {
|
|
600
617
|
id,
|
|
601
618
|
on,
|
|
@@ -603,6 +620,7 @@ function stepsOf(on, rows) {
|
|
|
603
620
|
needs,
|
|
604
621
|
do: action,
|
|
605
622
|
...uses === void 0 ? {} : { uses },
|
|
623
|
+
...persons === void 0 ? {} : { persons },
|
|
606
624
|
order,
|
|
607
625
|
sources,
|
|
608
626
|
...reasoning === void 0 ? {} : { reasoning },
|