@foodpilot/foods 0.1.21 → 0.1.22

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/dist/main.d.ts CHANGED
@@ -2,7 +2,7 @@ export { AccordionProduct, GenericAccordion } from "./components/Accordion";
2
2
  export { CategoryBox, DottedBox, InfoBox, LineGroupBox, QuoteBox, SolidGreyBox, WarningBox } from "./components/Box";
3
3
  export { TertiaryToggleButton } from "./components/Button";
4
4
  export { TextArrowList, TextTitle, TextTitleGreyIcon } from "./components/Text";
5
- export { PrimaryCheckbox } from "./components/Checkbox";
5
+ export * from "./components/Checkbox";
6
6
  export { PrimaryDialog } from "./components/Dialog";
7
7
  export { NumberField, TextField } from "./components/Field";
8
8
  export { FormBase } from "./components/Form";
package/dist/main.js CHANGED
@@ -27722,7 +27722,31 @@ const vz = (e) => {
27722
27722
  },
27723
27723
  `${a}-${c}`
27724
27724
  )) });
27725
- }, $z = (e) => {
27725
+ }, $z = (e, t, o) => {
27726
+ const r = e.filter((i) => {
27727
+ const a = t[i.id];
27728
+ return t[i.id] = {
27729
+ ...a,
27730
+ state: !1
27731
+ }, !!a;
27732
+ });
27733
+ return Object.entries(t).reduce((i, [a, l]) => {
27734
+ if (l.state) {
27735
+ const c = o({ id: a, displayName: l.name });
27736
+ i.push(c);
27737
+ }
27738
+ return i;
27739
+ }, r);
27740
+ }, Mz = (e, t) => {
27741
+ const o = {}, r = e.reduce((i, a) => (i[a.id] = {
27742
+ name: a.displayName,
27743
+ state: !0
27744
+ }, i), o);
27745
+ return t.reduce((i, a) => (i[a.id] === void 0 && (i[a.id] = {
27746
+ name: a.displayName,
27747
+ state: !1
27748
+ }), i), r);
27749
+ }, kz = (e) => {
27726
27750
  const { t } = Ds(), { isOpen: o, setOpen: r, options: s } = e, { canValidate: i = !0 } = e, a = () => r(!1), l = () => {
27727
27751
  e.onCancel && e.onCancel(), a();
27728
27752
  }, c = () => {
@@ -27782,7 +27806,7 @@ const vz = (e) => {
27782
27806
  }
27783
27807
  }
27784
27808
  );
27785
- }), Mz = (e) => {
27809
+ }), Dz = (e) => {
27786
27810
  const { title: t, unit: o, placeholder: r, value: s, description: i, ...a } = e;
27787
27811
  return /* @__PURE__ */ p.jsxs(
27788
27812
  "div",
@@ -27824,7 +27848,7 @@ const vz = (e) => {
27824
27848
  ]
27825
27849
  }
27826
27850
  );
27827
- }, kz = ql(function(t) {
27851
+ }, Iz = ql(function(t) {
27828
27852
  const { title: o, placeholder: r, value: s, description: i, sx: a, ...l } = t;
27829
27853
  return /* @__PURE__ */ p.jsxs(
27830
27854
  "div",
@@ -27981,7 +28005,7 @@ const vz = (e) => {
27981
28005
  ]
27982
28006
  }
27983
28007
  );
27984
- }, Dz = (e) => {
28008
+ }, _z = (e) => {
27985
28009
  const { title: t, icon: o, pages: r } = e, { t: s } = Ds(), i = 1, a = r.length, [l, c] = ut(i), u = (m) => {
27986
28010
  e.onPageChange != null && e.onPageChange(m), m > a ? c(a) : m < i ? c(i) : c(m);
27987
28011
  }, d = r.map((m) => m.smallIcon), f = r[l - 1], g = Array.isArray(f.content) ? f.content : [f.content];
@@ -46512,7 +46536,7 @@ const z5 = Object.assign(Object.assign({}, Bn), {
46512
46536
  };
46513
46537
  return p.jsxs(fk, Object.assign({ stickyHeader: a || h }, v, { style: Object.assign(Object.assign({}, w), v == null ? void 0 : v.style), sx: (T) => Object.assign({ borderCollapse: "separate", display: u != null && u.startsWith("grid") ? "grid" : void 0 }, Ie(v == null ? void 0 : v.sx, T)), children: [c && p.jsx(cz, Object.assign({}, S)), d === "table-body" || m.isResizingColumn ? p.jsx(q5, Object.assign({}, S)) : p.jsx(xy, Object.assign({}, S)), l && p.jsx(K5, Object.assign({}, S))] }));
46514
46538
  }, dz = (e) => V5(U5(e));
46515
- function Iz(e) {
46539
+ function jz(e) {
46516
46540
  const t = kt(), o = {
46517
46541
  enableDensityToggle: !1,
46518
46542
  //contrôle pas utilisé
@@ -46611,7 +46635,7 @@ function Iz(e) {
46611
46635
  o.enablePagination && /* @__PURE__ */ p.jsx(Jt, { sx: { marginTop: "48px", marginBottom: "32px", marginRight: "32px" }, alignItems: "flex-end", children: /* @__PURE__ */ p.jsx(az, { table: r }) })
46612
46636
  ] });
46613
46637
  }
46614
- function _z(e) {
46638
+ function Fz(e) {
46615
46639
  return /* @__PURE__ */ p.jsx(
46616
46640
  Qe,
46617
46641
  {
@@ -46628,7 +46652,7 @@ function _z(e) {
46628
46652
  );
46629
46653
  }
46630
46654
  const wy = (e) => /* @__PURE__ */ C.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ C.createElement("circle", { cx: 8, cy: 8, r: 8, fill: "white" }), /* @__PURE__ */ C.createElement("path", { d: "M8.00005 1.77777C4.56539 1.77777 1.77783 4.56533 1.77783 7.99999C1.77783 11.4347 4.56539 14.2222 8.00005 14.2222C11.4347 14.2222 14.2223 11.4347 14.2223 7.99999C14.2223 4.56533 11.4347 1.77777 8.00005 1.77777ZM8.62228 11.1111H7.37783V9.86666H8.62228V11.1111ZM8.62228 8.62222H7.37783V4.88888H8.62228V8.62222Z", fill: "#EE3C15" }));
46631
- function jz(e) {
46655
+ function Nz(e) {
46632
46656
  let t;
46633
46657
  switch (e.grade) {
46634
46658
  case "A":
@@ -46706,7 +46730,7 @@ function jz(e) {
46706
46730
  }
46707
46731
  );
46708
46732
  }
46709
- function Fz(e) {
46733
+ function Az(e) {
46710
46734
  const t = kt();
46711
46735
  return /* @__PURE__ */ p.jsx(Qe, { component: "span", children: /* @__PURE__ */ p.jsx(
46712
46736
  nt,
@@ -46722,13 +46746,13 @@ function Fz(e) {
46722
46746
  }
46723
46747
  ) });
46724
46748
  }
46725
- function Nz(e) {
46749
+ function Vz(e) {
46726
46750
  return /* @__PURE__ */ p.jsxs(Jt, { direction: "row", alignItems: "center", children: [
46727
46751
  /* @__PURE__ */ p.jsx(Yt, { variant: "text", endIcon: /* @__PURE__ */ p.jsx(HD, {}), sx: { minWidth: "0", marginRight: "10px" }, children: e.value }),
46728
46752
  e.chain && /* @__PURE__ */ p.jsx(nt, { variant: "white-tag", children: e.tag })
46729
46753
  ] });
46730
46754
  }
46731
- function Az(e) {
46755
+ function Lz(e) {
46732
46756
  const t = kt();
46733
46757
  return /* @__PURE__ */ p.jsxs(Qe, { component: "span", sx: { display: "flex", gap: "8px" }, children: [
46734
46758
  /* @__PURE__ */ p.jsxs(
@@ -46769,7 +46793,7 @@ function Az(e) {
46769
46793
  /* @__PURE__ */ p.jsx(nt, { sx: { display: "inline", color: "#50504D" }, children: e.unit })
46770
46794
  ] });
46771
46795
  }
46772
- const Vz = (e) => {
46796
+ const zz = (e) => {
46773
46797
  const { unit: t, sx: o, ...r } = e;
46774
46798
  return /* @__PURE__ */ p.jsxs(
46775
46799
  "div",
@@ -46797,7 +46821,7 @@ const Vz = (e) => {
46797
46821
  }
46798
46822
  );
46799
46823
  };
46800
- function Lz(e) {
46824
+ function Bz(e) {
46801
46825
  const t = kt(), o = {
46802
46826
  height: "40px",
46803
46827
  padding: "0px 6px 0px 20px",
@@ -46858,7 +46882,7 @@ function Lz(e) {
46858
46882
  }
46859
46883
  );
46860
46884
  }
46861
- function zz(e) {
46885
+ function Hz(e) {
46862
46886
  return e.variant === "themed" ? /* @__PURE__ */ p.jsx(pz, { ...e }) : e.variant === "headless" ? /* @__PURE__ */ p.jsx(sm, { ...e }) : /* @__PURE__ */ p.jsx(sm, { ...e, variant: "themed" });
46863
46887
  }
46864
46888
  function pz(e) {
@@ -46917,7 +46941,7 @@ function sm(e) {
46917
46941
  }
46918
46942
  );
46919
46943
  }
46920
- function Bz(e) {
46944
+ function Wz(e) {
46921
46945
  return /* @__PURE__ */ p.jsxs(
46922
46946
  Qe,
46923
46947
  {
@@ -46984,7 +47008,7 @@ function fz(e) {
46984
47008
  )
46985
47009
  ] });
46986
47010
  }
46987
- const Hz = (e) => {
47011
+ const Uz = (e) => {
46988
47012
  const { size: t, icon: o, body: r } = e, [s, i] = ut(null), a = () => {
46989
47013
  i(null);
46990
47014
  }, l = (u) => {
@@ -47054,7 +47078,7 @@ const Hz = (e) => {
47054
47078
  }
47055
47079
  );
47056
47080
  };
47057
- function Wz(e) {
47081
+ function qz(e) {
47058
47082
  return /* @__PURE__ */ p.jsxs("div", { children: [
47059
47083
  /* @__PURE__ */ p.jsx(nt, { variant: "body-bold", sx: { marginBottom: "16px" }, children: e.header }),
47060
47084
  /* @__PURE__ */ p.jsxs(Jt, { direction: "column", useFlexGap: !0, gap: "12px", children: [
@@ -47080,7 +47104,7 @@ function Wz(e) {
47080
47104
  ] })
47081
47105
  ] });
47082
47106
  }
47083
- function Uz(e) {
47107
+ function Gz(e) {
47084
47108
  return /* @__PURE__ */ p.jsxs(Jt, { direction: "column", useFlexGap: !0, gap: "12px", alignItems: "flex-start", children: [
47085
47109
  /* @__PURE__ */ p.jsx(nt, { variant: "body-bold", children: e.header }),
47086
47110
  /* @__PURE__ */ p.jsx(Jt, { direction: "row", useFlexGap: !0, gap: "8px", flexWrap: "wrap", children: e.values.map((t, o) => /* @__PURE__ */ p.jsxs(
@@ -47101,44 +47125,46 @@ function Uz(e) {
47101
47125
  /* @__PURE__ */ p.jsx(Yt, { variant: "text", startIcon: /* @__PURE__ */ p.jsx(FD, {}), children: e.addText })
47102
47126
  ] });
47103
47127
  }
47104
- const qz = (e) => /* @__PURE__ */ p.jsx(og, { theme: _D, children: e.children });
47128
+ const Yz = (e) => /* @__PURE__ */ p.jsx(og, { theme: _D, children: e.children });
47105
47129
  export {
47106
47130
  hz as AccordionProduct,
47107
- zz as AnchoredPopover,
47108
- _z as ArrayCell,
47109
- Bz as BigPopoverLayout,
47131
+ Hz as AnchoredPopover,
47132
+ Fz as ArrayCell,
47133
+ Wz as BigPopoverLayout,
47110
47134
  Yt as Button,
47111
47135
  vz as CategoryBox,
47112
47136
  yz as DottedBox,
47113
- jz as EcoScoreCell,
47114
- Wz as FixedMultiValueFilter,
47137
+ Nz as EcoScoreCell,
47138
+ qz as FixedMultiValueFilter,
47115
47139
  _D as FoodPilotTheme,
47116
- qz as FoodsThemeProvider,
47117
- Dz as FormBase,
47140
+ Yz as FoodsThemeProvider,
47141
+ _z as FormBase,
47118
47142
  hI as FormTopBar,
47119
47143
  bz as GenericAccordion,
47120
- Fz as GreyTextCell,
47144
+ Az as GreyTextCell,
47121
47145
  fI as IconThread,
47122
47146
  xz as InfoBox,
47123
47147
  Cz as LineGroupBox,
47124
- Nz as LinkCell,
47125
- Iz as MRTGrid,
47126
- Uz as MultiValueFilter,
47127
- Mz as NumberField,
47128
- Az as PointsCell,
47148
+ Vz as LinkCell,
47149
+ jz as MRTGrid,
47150
+ Gz as MultiValueFilter,
47151
+ Dz as NumberField,
47152
+ Lz as PointsCell,
47129
47153
  Ez as PrimaryCheckbox,
47130
- $z as PrimaryDialog,
47154
+ kz as PrimaryDialog,
47131
47155
  wz as QuoteBox,
47132
47156
  Bc as RoundInput,
47133
- Vz as RoundNumberInput,
47134
- Lz as SearchBox,
47157
+ zz as RoundNumberInput,
47158
+ Bz as SearchBox,
47135
47159
  Sz as SolidGreyBox,
47136
47160
  Rz as TertiaryToggleButton,
47137
47161
  Pz as TextArrowList,
47138
- kz as TextField,
47162
+ Iz as TextField,
47139
47163
  aI as TextTitle,
47140
47164
  Oz as TextTitleGreyIcon,
47141
47165
  nt as Typography,
47142
47166
  Tz as WarningBox,
47143
- Hz as WhitePopoverOnIcon
47167
+ Uz as WhitePopoverOnIcon,
47168
+ Mz as anyToCheckbox,
47169
+ $z as checkboxToAny
47144
47170
  };