formlab-mcp 0.6.88 → 0.6.90

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.
@@ -746,7 +746,7 @@ function flNlTabHtml(f) {
746
746
  <div class="card-body nl-stmt">
747
747
  ${eu ? (() => { const es = flNlEuStatement(f); return `<div class="nl-eu-stmt"><strong>INGREDIENTS:</strong> ${es.html || '<span class="nl-dim">No ingredients yet.</span>'}</div>
748
748
  ${_nlSuspectHtml(f) || (es.allergens.length ? '' : '<div class="nl-dim">No EU allergens on the ingredients.</div>')}
749
- <div class="nl-dim nl-hint" data-tip="The 14 EU allergens, from each ingredient’s allergen chips. A name that doesn’t say the allergen gets it added in brackets. Copy gives them in CAPITALS. Add a custom field named label_name to an ingredient to print another name.">By weight, most first. Allergens in bold.</div>`; })() : `<div><strong>INGREDIENTS:</strong> ${esc(s.text) || '<span class="nl-dim">No ingredients yet.</span>'}</div>
749
+ <div class="nl-dim nl-hint" data-tip="The 14 EU allergens from each ingredient’s chips, in CAPITALS on Copy. A label_name custom field prints another name.">By weight, most first. Allergens in bold.</div>`; })() : `<div><strong>INGREDIENTS:</strong> ${esc(s.text) || '<span class="nl-dim">No ingredients yet.</span>'}</div>
750
750
  ${s.contains.length ? `<div class="nl-contains"><strong>CONTAINS:</strong> ${esc(s.contains.join(', '))}.</div>` : ''}${_nlSuspectHtml(f) || (s.contains.length ? '' : '<div class="nl-dim">No major US allergens on the ingredients.</div>')}
751
751
  <div class="nl-dim nl-hint" data-tip="Add a custom field named label_name to an ingredient to print another name here.">By weight, most first. 2% or less grouped.</div>`}
752
752
  </div>
@@ -455,7 +455,7 @@ function flRxApplySolve(fId) {
455
455
  // ---- A batch: as weighed, and (Pro) against the plan ----
456
456
  function flRxBatchStripHtml(b) {
457
457
  if (!b) return '';
458
- const f = (db.formulations || []).find(x => x.id === b.formulationId);
458
+ const f = (typeof flBatchFormula === 'function' ? flBatchFormula(b) : db.formulations.find(x => x.id === b.formulationId));
459
459
  const hasActual = Array.isArray(b.actualComposition) && b.actualComposition.length;
460
460
  const comp = hasActual ? b.actualComposition : (f ? f.composition : []);
461
461
  const found = flRxPairsFor(comp);
@@ -510,7 +510,7 @@ function flRxFormSectionHtml(ing) {
510
510
  <div class="fl-rx-frows" id="fl-rx-frows">${list.map(_flRxFormRowHtml).join('')}</div>
511
511
  <div class="fl-rx-fhead">
512
512
  <button type="button" class="btn btn-secondary btn-sm" onclick="_flRxFormAdd()">+ Add group</button>
513
- <span class="fl-rx-note" data-tip="EEW for a resin, AHEW for a hardener, OH number for a polyol, NCO % for an isocyanate, acid or amine value; groups per molecule (with the MW) for a pure chemical.">As the datasheet quotes it, or groups per molecule for a pure chemical.</span>
513
+ <span class="fl-rx-note" data-tip="EEW, AHEW, OH number, NCO %, acid or amine value; or groups per molecule (with the MW) for a pure chemical.">As the datasheet quotes it, or groups per molecule for a pure chemical.</span>
514
514
  </div>
515
515
  </div>`;
516
516
  }
@@ -794,6 +794,9 @@ function _tpIngredientView(ing) {
794
794
  // the Reactive presets' sums; the datasheet terms (ing.eew, ing.ohv, ing.ncoPct …) null when absent, so
795
795
  // `eew < 200` skips ingredients without one. Custom fields below still win on a name clash.
796
796
  if (typeof flRxViewFields === 'function') Object.assign(out, flRxViewFields(ing));
797
+ // Fragrance (js/fragrance.js): ing.fragranceAllergens (the allergens it contains, by label name) and ing.ifra5A …
798
+ // (its max % in that IFRA category), so `fragranceAllergens contains linalool` and `ifra5A < 0.5` filter the list.
799
+ if (typeof flFrViewFields === 'function') Object.assign(out, flFrViewFields(ing));
797
800
  (ing.customFields || []).forEach(cf => {
798
801
  if (!cf || !cf.name) return;
799
802
  const raw = cf.value;