@plumile/ui-backoffice 0.1.54 → 0.1.56

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 (40) hide show
  1. package/lib/esm/backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.js +26 -0
  2. package/lib/esm/backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.js.map +1 -0
  3. package/lib/esm/backoffice/molecules/backoffice_detail_layout/backofficeDetailLayout.css.js +11 -0
  4. package/lib/esm/backoffice/molecules/backoffice_detail_layout/backofficeDetailLayout.css.js.map +1 -0
  5. package/lib/esm/backoffice/molecules/backoffice_detail_layout/backofficeDetailLayout.css.ts.vanilla-D0P3CDXC.css +1 -0
  6. package/lib/esm/backoffice/molecules/backoffice_form_section/BackofficeFormSection.js +23 -0
  7. package/lib/esm/backoffice/molecules/backoffice_form_section/BackofficeFormSection.js.map +1 -0
  8. package/lib/esm/backoffice/molecules/backoffice_form_section/backofficeFormSection.css.js +9 -0
  9. package/lib/esm/backoffice/molecules/backoffice_form_section/backofficeFormSection.css.js.map +1 -0
  10. package/lib/esm/backoffice/molecules/backoffice_form_section/backofficeFormSection.css.ts.vanilla-B2riteFJ.css +1 -0
  11. package/lib/esm/backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.js +33 -0
  12. package/lib/esm/backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.js.map +1 -0
  13. package/lib/esm/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.js +10 -0
  14. package/lib/esm/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.js.map +1 -0
  15. package/lib/esm/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.ts.vanilla-Cn8nymLF.css +1 -0
  16. package/lib/esm/index.js +23 -8
  17. package/lib/esm/index.js.map +1 -1
  18. package/lib/esm/shared/agentJobRequestFormatting.js +36 -0
  19. package/lib/esm/shared/agentJobRequestFormatting.js.map +1 -0
  20. package/lib/esm/shared/agentText.js +13 -0
  21. package/lib/esm/shared/agentText.js.map +1 -0
  22. package/lib/types/backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.d.ts +10 -0
  23. package/lib/types/backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.d.ts.map +1 -0
  24. package/lib/types/backoffice/molecules/backoffice_detail_layout/backofficeDetailLayout.css.d.ts +7 -0
  25. package/lib/types/backoffice/molecules/backoffice_detail_layout/backofficeDetailLayout.css.d.ts.map +1 -0
  26. package/lib/types/backoffice/molecules/backoffice_form_section/BackofficeFormSection.d.ts +10 -0
  27. package/lib/types/backoffice/molecules/backoffice_form_section/BackofficeFormSection.d.ts.map +1 -0
  28. package/lib/types/backoffice/molecules/backoffice_form_section/backofficeFormSection.css.d.ts +5 -0
  29. package/lib/types/backoffice/molecules/backoffice_form_section/backofficeFormSection.css.d.ts.map +1 -0
  30. package/lib/types/backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.d.ts +13 -0
  31. package/lib/types/backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.d.ts.map +1 -0
  32. package/lib/types/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.d.ts +6 -0
  33. package/lib/types/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.d.ts.map +1 -0
  34. package/lib/types/index.d.ts +5 -0
  35. package/lib/types/index.d.ts.map +1 -1
  36. package/lib/types/shared/agentJobRequestFormatting.d.ts +6 -0
  37. package/lib/types/shared/agentJobRequestFormatting.d.ts.map +1 -0
  38. package/lib/types/shared/agentText.d.ts +3 -0
  39. package/lib/types/shared/agentText.d.ts.map +1 -0
  40. package/package.json +8 -3
@@ -0,0 +1,26 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { cx as s } from "@plumile/ui";
3
+ import { stacked as m, container as n, layout as o, primary as t, secondary as h, header as f } from "./backofficeDetailLayout.css.js";
4
+ const p = ({
5
+ header: l,
6
+ content: i,
7
+ aside: c,
8
+ className: d
9
+ }) => {
10
+ let a = null;
11
+ return l != null && (a = /* @__PURE__ */ e("div", { className: f, children: l })), c == null ? /* @__PURE__ */ r("div", { className: s(n, d), children: [
12
+ a,
13
+ /* @__PURE__ */ e("div", { className: m, children: i })
14
+ ] }) : /* @__PURE__ */ r("div", { className: s(n, d), children: [
15
+ a,
16
+ /* @__PURE__ */ r("div", { className: o, children: [
17
+ /* @__PURE__ */ e("div", { className: t, children: i }),
18
+ /* @__PURE__ */ e("aside", { className: h, children: c })
19
+ ] })
20
+ ] });
21
+ };
22
+ export {
23
+ p as BackofficeDetailLayout,
24
+ p as default
25
+ };
26
+ //# sourceMappingURL=BackofficeDetailLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackofficeDetailLayout.js","sources":["../../../../../src/backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.tsx"],"sourcesContent":["import { type JSX, type ReactNode } from 'react';\nimport { cx } from '@plumile/ui';\n\nimport * as styles from './backofficeDetailLayout.css.js';\n\nexport type BackofficeDetailLayoutProps = {\n header: ReactNode;\n content: ReactNode;\n aside?: ReactNode;\n className?: string;\n};\n\nexport const BackofficeDetailLayout = ({\n header,\n content,\n aside,\n className,\n}: BackofficeDetailLayoutProps): JSX.Element => {\n let headerNode: JSX.Element | null = null;\n if (header != null) {\n headerNode = <div className={styles.header}>{header}</div>;\n }\n\n if (aside == null) {\n return (\n <div className={cx(styles.container, className)}>\n {headerNode}\n <div className={styles.stacked}>{content}</div>\n </div>\n );\n }\n\n return (\n <div className={cx(styles.container, className)}>\n {headerNode}\n <div className={styles.layout}>\n <div className={styles.primary}>{content}</div>\n <aside className={styles.secondary}>{aside}</aside>\n </div>\n </div>\n );\n};\n\nexport default BackofficeDetailLayout;\n"],"names":["BackofficeDetailLayout","header","content","aside","className","headerNode","jsx","styles.header","cx","styles.container","styles.stacked","jsxs","styles.layout","styles.primary","styles.secondary"],"mappings":";;;AAYO,MAAMA,IAAyB,CAAC;AAAA,EAAA,QACrCC;AAAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AACF,MAAgD;AAC9C,MAAIC,IAAiC;AAKrC,SAJIJ,KAAU,SACZI,IAAa,gBAAAC,EAAC,OAAA,EAAI,WAAWC,GAAgB,UAAAN,GAAO,IAGlDE,KAAS,yBAER,OAAA,EAAI,WAAWK,EAAGC,GAAkBL,CAAS,GAC3C,UAAA;AAAA,IAAAC;AAAA,IACD,gBAAAC,EAAC,OAAA,EAAI,WAAWI,GAAiB,UAAAR,EAAA,CAAQ;AAAA,EAAA,GAC3C,sBAKD,OAAA,EAAI,WAAWM,EAAGC,GAAkBL,CAAS,GAC3C,UAAA;AAAA,IAAAC;AAAA,IACD,gBAAAM,EAAC,OAAA,EAAI,WAAWC,GACd,UAAA;AAAA,MAAA,gBAAAN,EAAC,OAAA,EAAI,WAAWO,GAAiB,UAAAX,GAAQ;AAAA,MACzC,gBAAAI,EAAC,SAAA,EAAM,WAAWQ,GAAmB,UAAAX,EAAA,CAAM;AAAA,IAAA,EAAA,CAC7C;AAAA,EAAA,GACF;AAEJ;"}
@@ -0,0 +1,11 @@
1
+ /* empty css */
2
+ var a = "_1who7yn0", o = "_1who7yn1", n = "_1who7yn2", y = "_1who7yn3", h = "_1who7yn4", e = "_1who7yn5";
3
+ export {
4
+ a as container,
5
+ o as header,
6
+ n as layout,
7
+ y as primary,
8
+ h as secondary,
9
+ e as stacked
10
+ };
11
+ //# sourceMappingURL=backofficeDetailLayout.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backofficeDetailLayout.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1 @@
1
+ ._1who7yn0{display:flex;flex-direction:column;gap:var(--kronex-spacing-4)}._1who7yn1{display:flex;flex-direction:column;gap:var(--kronex-spacing-2)}._1who7yn2{display:grid;grid-template-columns:var(--kronex-gridTemplateColumns-detailAside320);align-items:flex-start;gap:var(--kronex-spacing-4)}._1who7yn3{display:flex;flex-direction:column;gap:var(--kronex-spacing-4);min-width:0}._1who7yn4{display:flex;flex-direction:column;gap:var(--kronex-spacing-3)}._1who7yn5{display:flex;flex-direction:column;gap:var(--kronex-spacing-4)}@media screen and (max-width:1024px){._1who7yn2{grid-template-columns:var(--kronex-gridTemplateColumns-detailSingle)}}
@@ -0,0 +1,23 @@
1
+ import { jsxs as e, jsx as l } from "react/jsx-runtime";
2
+ import { cx as n } from "@plumile/ui";
3
+ import { header as o, title as i, description as t, container as h } from "./backofficeFormSection.css.js";
4
+ const x = ({
5
+ title: r,
6
+ description: a,
7
+ children: m,
8
+ className: c
9
+ }) => {
10
+ const s = r != null && r.trim() !== "" || a != null && a.trim() !== "";
11
+ return /* @__PURE__ */ e("section", { className: n(h, c), children: [
12
+ s && /* @__PURE__ */ e("div", { className: o, children: [
13
+ r != null && r.trim() !== "" && /* @__PURE__ */ l("h3", { className: i, children: r }),
14
+ a != null && a.trim() !== "" && /* @__PURE__ */ l("p", { className: t, children: a })
15
+ ] }),
16
+ m
17
+ ] });
18
+ };
19
+ export {
20
+ x as BackofficeFormSection,
21
+ x as default
22
+ };
23
+ //# sourceMappingURL=BackofficeFormSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackofficeFormSection.js","sources":["../../../../../src/backoffice/molecules/backoffice_form_section/BackofficeFormSection.tsx"],"sourcesContent":["import { type JSX, type ReactNode } from 'react';\nimport { cx } from '@plumile/ui';\n\nimport * as styles from './backofficeFormSection.css.js';\n\nexport type BackofficeFormSectionProps = {\n title?: string;\n description?: string;\n children: ReactNode;\n className?: string;\n};\n\nexport const BackofficeFormSection = ({\n title,\n description,\n children,\n className,\n}: BackofficeFormSectionProps): JSX.Element => {\n const hasHeader =\n (title != null && title.trim() !== '') ||\n (description != null && description.trim() !== '');\n\n return (\n <section className={cx(styles.container, className)}>\n {hasHeader && (\n <div className={styles.header}>\n {title != null && title.trim() !== '' && (\n <h3 className={styles.title}>{title}</h3>\n )}\n {description != null && description.trim() !== '' && (\n <p className={styles.description}>{description}</p>\n )}\n </div>\n )}\n {children}\n </section>\n );\n};\n\nexport default BackofficeFormSection;\n"],"names":["BackofficeFormSection","title","description","children","className","hasHeader","cx","styles.container","jsxs","styles.header","styles.title","jsx","styles.description"],"mappings":";;;AAYO,MAAMA,IAAwB,CAAC;AAAA,EAAA,OACpCC;AAAAA,EAAA,aACAC;AAAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,MAA+C;AAC7C,QAAMC,IACHJ,KAAS,QAAQA,EAAM,KAAA,MAAW,MAClCC,KAAe,QAAQA,EAAY,KAAA,MAAW;AAEjD,2BACG,WAAA,EAAQ,WAAWI,EAAGC,GAAkBH,CAAS,GAC/C,UAAA;AAAA,IAAAC,KACC,gBAAAG,EAAC,OAAA,EAAI,WAAWC,GACb,UAAA;AAAA,MAAAR,KAAS,QAAQA,EAAM,KAAA,MAAW,wBAChC,MAAA,EAAG,WAAWS,GAAe,UAAAT,EAAA,CAAM;AAAA,MAErCC,KAAe,QAAQA,EAAY,KAAA,MAAW,MAC7C,gBAAAS,EAAC,KAAA,EAAE,WAAWC,GAAqB,UAAAV,EAAA,CAAY;AAAA,IAAA,GAEnD;AAAA,IAEDC;AAAA,EAAA,GACH;AAEJ;"}
@@ -0,0 +1,9 @@
1
+ /* empty css */
2
+ var n = "w9nf050", a = "w9nf051", e = "w9nf052", t = "w9nf053";
3
+ export {
4
+ n as container,
5
+ t as description,
6
+ a as header,
7
+ e as title
8
+ };
9
+ //# sourceMappingURL=backofficeFormSection.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backofficeFormSection.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1 @@
1
+ .w9nf050{display:flex;flex-direction:column;gap:var(--kronex-spacing-3);padding:var(--kronex-spacing-4);border-radius:var(--kronex-borderRadius-lg);border-width:var(--kronex-borderWidth-default);border-style:solid;border-color:var(--kronex-colors-borderSubtle);background-color:var(--kronex-colors-surface)}.w9nf051{display:flex;flex-direction:column;gap:var(--kronex-spacing-1)}.w9nf052{font-size:var(--kronex-fontSize-base);font-weight:var(--kronex-fontWeight-semibold);color:var(--kronex-colors-text);margin:0}.w9nf053{font-size:var(--kronex-fontSize-sm);color:var(--kronex-colors-textSecondary);margin:0}
@@ -0,0 +1,33 @@
1
+ import { jsxs as l, jsx as m } from "react/jsx-runtime";
2
+ import { cx as u } from "@plumile/ui";
3
+ import { topRow as h, left as p, right as f, chipsRow as t, container as v } from "./backofficeTableToolbar.css.js";
4
+ const T = ({
5
+ searchSlot: n,
6
+ filtersSlot: i,
7
+ sortSlot: s,
8
+ refreshSlot: c,
9
+ ctaSlot: a,
10
+ chipsSlot: e,
11
+ className: d
12
+ }) => {
13
+ const r = n != null || i != null || s != null || c != null || a != null, o = e != null;
14
+ return !r && !o ? null : /* @__PURE__ */ l("div", { className: u(v, d), children: [
15
+ r && /* @__PURE__ */ l("div", { className: h, children: [
16
+ /* @__PURE__ */ l("div", { className: p, children: [
17
+ n,
18
+ i,
19
+ s
20
+ ] }),
21
+ /* @__PURE__ */ l("div", { className: f, children: [
22
+ c,
23
+ a
24
+ ] })
25
+ ] }),
26
+ o && /* @__PURE__ */ m("div", { className: t, children: e })
27
+ ] });
28
+ };
29
+ export {
30
+ T as BackofficeTableToolbar,
31
+ T as default
32
+ };
33
+ //# sourceMappingURL=BackofficeTableToolbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackofficeTableToolbar.js","sources":["../../../../../src/backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.tsx"],"sourcesContent":["import { type JSX, type ReactNode } from 'react';\n\nimport { cx } from '@plumile/ui';\n\nimport * as styles from './backofficeTableToolbar.css.js';\n\nexport type BackofficeTableToolbarProps = {\n searchSlot?: ReactNode;\n filtersSlot?: ReactNode;\n sortSlot?: ReactNode;\n refreshSlot?: ReactNode;\n ctaSlot?: ReactNode;\n chipsSlot?: ReactNode;\n className?: string;\n};\n\nexport const BackofficeTableToolbar = ({\n searchSlot,\n filtersSlot,\n sortSlot,\n refreshSlot,\n ctaSlot,\n chipsSlot,\n className,\n}: BackofficeTableToolbarProps): JSX.Element | null => {\n const showTop =\n searchSlot != null ||\n filtersSlot != null ||\n sortSlot != null ||\n refreshSlot != null ||\n ctaSlot != null;\n\n const showChips = chipsSlot != null;\n\n if (!showTop && !showChips) {\n return null;\n }\n\n return (\n <div className={cx(styles.container, className)}>\n {showTop && (\n <div className={styles.topRow}>\n <div className={styles.left}>\n {searchSlot}\n {filtersSlot}\n {sortSlot}\n </div>\n <div className={styles.right}>\n {refreshSlot}\n {ctaSlot}\n </div>\n </div>\n )}\n {showChips && <div className={styles.chipsRow}>{chipsSlot}</div>}\n </div>\n );\n};\n\nexport default BackofficeTableToolbar;\n"],"names":["BackofficeTableToolbar","searchSlot","filtersSlot","sortSlot","refreshSlot","ctaSlot","chipsSlot","className","showTop","showChips","cx","styles.container","jsxs","styles.topRow","styles.left","styles.right","jsx","styles.chipsRow"],"mappings":";;;AAgBO,MAAMA,IAAyB,CAAC;AAAA,EACrC,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AACF,MAAuD;AACrD,QAAMC,IACJP,KAAc,QACdC,KAAe,QACfC,KAAY,QACZC,KAAe,QACfC,KAAW,MAEPI,IAAYH,KAAa;AAE/B,SAAI,CAACE,KAAW,CAACC,IACR,yBAIN,OAAA,EAAI,WAAWC,EAAGC,GAAkBJ,CAAS,GAC3C,UAAA;AAAA,IAAAC,KACC,gBAAAI,EAAC,OAAA,EAAI,WAAWC,GACd,UAAA;AAAA,MAAA,gBAAAD,EAAC,OAAA,EAAI,WAAWE,GACb,UAAA;AAAA,QAAAb;AAAA,QACAC;AAAA,QACAC;AAAA,MAAA,GACH;AAAA,MACA,gBAAAS,EAAC,OAAA,EAAI,WAAWG,GACb,UAAA;AAAA,QAAAX;AAAA,QACAC;AAAA,MAAA,EAAA,CACH;AAAA,IAAA,GACF;AAAA,IAEDI,KAAa,gBAAAO,EAAC,OAAA,EAAI,WAAWC,GAAkB,UAAAX,EAAA,CAAU;AAAA,EAAA,GAC5D;AAEJ;"}
@@ -0,0 +1,10 @@
1
+ /* empty css */
2
+ var r = "_1m9719t0", a = "_1m9719t1", m = "_1m9719t2", o = "_1m9719t3", v = "_1m9719t4";
3
+ export {
4
+ v as chipsRow,
5
+ r as container,
6
+ m as left,
7
+ o as right,
8
+ a as topRow
9
+ };
10
+ //# sourceMappingURL=backofficeTableToolbar.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backofficeTableToolbar.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1 @@
1
+ ._1m9719t0{display:flex;flex-direction:column;gap:var(--kronex-spacing-3);width:100%}._1m9719t1{display:flex;justify-content:space-between;gap:var(--kronex-spacing-3);flex-wrap:wrap;align-items:center}._1m9719t2{display:flex;align-items:center;gap:var(--kronex-spacing-2);flex-wrap:wrap;min-width:0;flex:1}._1m9719t3{display:flex;align-items:center;gap:var(--kronex-spacing-2);flex-wrap:wrap}._1m9719t4{display:flex;align-items:center;flex-wrap:wrap;gap:var(--kronex-spacing-2);padding-top:var(--kronex-spacing-2);border-top-width:var(--kronex-borderWidth-px);border-top-style:solid;border-top-color:var(--kronex-colors-borderSubtle)}@media screen and (max-width:640px){._1m9719t1{align-items:stretch;flex-direction:column}}
package/lib/esm/index.js CHANGED
@@ -1,11 +1,26 @@
1
- import { BackofficeKeyValueList as f } from "./backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.js";
2
- import { BackofficePageHeader as r } from "./backoffice/molecules/backoffice_page_header/BackofficePageHeader.js";
3
- import { BackofficeEmptyState as c } from "./backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js";
4
- import { BackofficeRelationsMenu as m } from "./backoffice/molecules/backoffice_relations_menu/BackofficeRelationsMenu.js";
1
+ import { BackofficeKeyValueList as r } from "./backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.js";
2
+ import { BackofficeDetailLayout as f } from "./backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.js";
3
+ import { BackofficePageHeader as i } from "./backoffice/molecules/backoffice_page_header/BackofficePageHeader.js";
4
+ import { BackofficeEmptyState as m } from "./backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js";
5
+ import { BackofficeFormSection as n } from "./backoffice/molecules/backoffice_form_section/BackofficeFormSection.js";
6
+ import { BackofficeRelationsMenu as x } from "./backoffice/molecules/backoffice_relations_menu/BackofficeRelationsMenu.js";
7
+ import { BackofficeTableToolbar as u } from "./backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.js";
8
+ import { FALLBACK_REFERENCE as b, formatNullableCurrency as s, formatNullableNumber as g, formatNullableString as A, formatStringList as E } from "./shared/agentJobRequestFormatting.js";
9
+ import { sanitizeAgentAnswer as N, sanitizeAgentMarkdown as y } from "./shared/agentText.js";
5
10
  export {
6
- c as BackofficeEmptyState,
7
- f as BackofficeKeyValueList,
8
- r as BackofficePageHeader,
9
- m as BackofficeRelationsMenu
11
+ f as BackofficeDetailLayout,
12
+ m as BackofficeEmptyState,
13
+ n as BackofficeFormSection,
14
+ r as BackofficeKeyValueList,
15
+ i as BackofficePageHeader,
16
+ x as BackofficeRelationsMenu,
17
+ u as BackofficeTableToolbar,
18
+ b as FALLBACK_REFERENCE,
19
+ s as formatNullableCurrency,
20
+ g as formatNullableNumber,
21
+ A as formatNullableString,
22
+ E as formatStringList,
23
+ N as sanitizeAgentAnswer,
24
+ y as sanitizeAgentMarkdown
10
25
  };
11
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -0,0 +1,36 @@
1
+ const E = "—";
2
+ function e(r) {
3
+ return r == null || r.trim().length === 0 ? "—" : r;
4
+ }
5
+ function u(r) {
6
+ return r == null ? "—" : Number.isFinite(r) ? r.toLocaleString() : String(r);
7
+ }
8
+ function m(r) {
9
+ return r.length === 0 ? "—" : r.join(", ");
10
+ }
11
+ function o(r, n = "USD", i) {
12
+ if (r == null)
13
+ return "—";
14
+ const t = Number(r);
15
+ if (!Number.isFinite(t))
16
+ return "—";
17
+ try {
18
+ return new Intl.NumberFormat(i, {
19
+ style: "currency",
20
+ currency: n,
21
+ currencyDisplay: "symbol",
22
+ minimumFractionDigits: 2,
23
+ maximumFractionDigits: 2
24
+ }).format(t);
25
+ } catch {
26
+ return t.toString();
27
+ }
28
+ }
29
+ export {
30
+ E as FALLBACK_REFERENCE,
31
+ o as formatNullableCurrency,
32
+ u as formatNullableNumber,
33
+ e as formatNullableString,
34
+ m as formatStringList
35
+ };
36
+ //# sourceMappingURL=agentJobRequestFormatting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentJobRequestFormatting.js","sources":["../../../src/shared/agentJobRequestFormatting.ts"],"sourcesContent":["export const FALLBACK_REFERENCE = '—';\n\n/**\n * Returns a display-safe string or a fallback glyph when the value is absent.\n */\nexport function formatNullableString(value: string | null | undefined): string {\n if (value == null) {\n return FALLBACK_REFERENCE;\n }\n\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n return FALLBACK_REFERENCE;\n }\n\n return value;\n}\n\n/**\n * Formats numeric values for UI display while preserving a fallback for nullish input.\n */\nexport function formatNullableNumber(value: number | null | undefined): string {\n if (value == null) {\n return FALLBACK_REFERENCE;\n }\n\n if (Number.isFinite(value)) {\n return value.toLocaleString();\n }\n\n return String(value);\n}\n\n/**\n * Joins a list of labels for display or returns the fallback when the list is empty.\n */\nexport function formatStringList(values: readonly string[]): string {\n if (values.length === 0) {\n return FALLBACK_REFERENCE;\n }\n\n return values.join(', ');\n}\n\n/**\n * Formats a currency amount with locale-aware separators and a null-safe fallback.\n */\nexport function formatNullableCurrency(\n value: number | null | undefined,\n currency = 'USD',\n locale?: string,\n): string {\n if (value == null) {\n return FALLBACK_REFERENCE;\n }\n\n const numeric = Number(value);\n if (!Number.isFinite(numeric)) {\n return FALLBACK_REFERENCE;\n }\n\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n currencyDisplay: 'symbol',\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n }).format(numeric);\n } catch {\n return numeric.toString();\n }\n}\n"],"names":["FALLBACK_REFERENCE","formatNullableString","value","formatNullableNumber","formatStringList","values","formatNullableCurrency","currency","locale","numeric"],"mappings":"AAAO,MAAMA,IAAqB;AAK3B,SAASC,EAAqBC,GAA0C;AAM7E,SALIA,KAAS,QAIGA,EAAM,KAAA,EACV,WAAW,IACd,MAGFA;AACT;AAKO,SAASC,EAAqBD,GAA0C;AAC7E,SAAIA,KAAS,OACJ,MAGL,OAAO,SAASA,CAAK,IAChBA,EAAM,eAAA,IAGR,OAAOA,CAAK;AACrB;AAKO,SAASE,EAAiBC,GAAmC;AAClE,SAAIA,EAAO,WAAW,IACb,MAGFA,EAAO,KAAK,IAAI;AACzB;AAKO,SAASC,EACdJ,GACAK,IAAW,OACXC,GACQ;AACR,MAAIN,KAAS;AACX,WAAO;AAGT,QAAMO,IAAU,OAAOP,CAAK;AAC5B,MAAI,CAAC,OAAO,SAASO,CAAO;AAC1B,WAAO;AAGT,MAAI;AACF,WAAO,IAAI,KAAK,aAAaD,GAAQ;AAAA,MACnC,OAAO;AAAA,MACP,UAAAD;AAAA,MACA,iBAAiB;AAAA,MACjB,uBAAuB;AAAA,MACvB,uBAAuB;AAAA,IAAA,CACxB,EAAE,OAAOE,CAAO;AAAA,EACnB,QAAQ;AACN,WAAOA,EAAQ,SAAA;AAAA,EACjB;AACF;"}
@@ -0,0 +1,13 @@
1
+ function r(t) {
2
+ const n = t?.trim();
3
+ return n == null || n === "" ? null : n;
4
+ }
5
+ function e(t) {
6
+ const n = t?.trim();
7
+ return n == null || n === "" ? null : n;
8
+ }
9
+ export {
10
+ e as sanitizeAgentAnswer,
11
+ r as sanitizeAgentMarkdown
12
+ };
13
+ //# sourceMappingURL=agentText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentText.js","sources":["../../../src/shared/agentText.ts"],"sourcesContent":["/**\n * Trims markdown content and normalizes empty values to null.\n */\nexport function sanitizeAgentMarkdown(\n content: string | null | undefined,\n): string | null {\n const trimmed = content?.trim();\n if (trimmed == null || trimmed === '') {\n return null;\n }\n\n return trimmed;\n}\n\n/**\n * Trims plain-text answers and normalizes empty values to null.\n */\nexport function sanitizeAgentAnswer(\n answer: string | null | undefined,\n): string | null {\n const trimmed = answer?.trim();\n if (trimmed == null || trimmed === '') {\n return null;\n }\n\n return trimmed;\n}\n"],"names":["sanitizeAgentMarkdown","content","trimmed","sanitizeAgentAnswer","answer"],"mappings":"AAGO,SAASA,EACdC,GACe;AACf,QAAMC,IAAUD,GAAS,KAAA;AACzB,SAAIC,KAAW,QAAQA,MAAY,KAC1B,OAGFA;AACT;AAKO,SAASC,EACdC,GACe;AACf,QAAMF,IAAUE,GAAQ,KAAA;AACxB,SAAIF,KAAW,QAAQA,MAAY,KAC1B,OAGFA;AACT;"}
@@ -0,0 +1,10 @@
1
+ import { type JSX, type ReactNode } from 'react';
2
+ export type BackofficeDetailLayoutProps = {
3
+ header: ReactNode;
4
+ content: ReactNode;
5
+ aside?: ReactNode;
6
+ className?: string;
7
+ };
8
+ export declare const BackofficeDetailLayout: ({ header, content, aside, className, }: BackofficeDetailLayoutProps) => JSX.Element;
9
+ export default BackofficeDetailLayout;
10
+ //# sourceMappingURL=BackofficeDetailLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackofficeDetailLayout.d.ts","sourceRoot":"","sources":["../../../../../src/backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKjD,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,wCAKpC,2BAA2B,KAAG,GAAG,CAAC,OAwBpC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const container: string;
2
+ export declare const header: string;
3
+ export declare const layout: string;
4
+ export declare const primary: string;
5
+ export declare const secondary: string;
6
+ export declare const stacked: string;
7
+ //# sourceMappingURL=backofficeDetailLayout.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backofficeDetailLayout.css.d.ts","sourceRoot":"","sources":["../../../../../src/backoffice/molecules/backoffice_detail_layout/backofficeDetailLayout.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,QAIpB,CAAC;AAEH,eAAO,MAAM,MAAM,QAIjB,CAAC;AAEH,eAAO,MAAM,MAAM,QAUjB,CAAC;AAEH,eAAO,MAAM,OAAO,QAKlB,CAAC;AAEH,eAAO,MAAM,SAAS,QAIpB,CAAC;AAEH,eAAO,MAAM,OAAO,QAIlB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type JSX, type ReactNode } from 'react';
2
+ export type BackofficeFormSectionProps = {
3
+ title?: string;
4
+ description?: string;
5
+ children: ReactNode;
6
+ className?: string;
7
+ };
8
+ export declare const BackofficeFormSection: ({ title, description, children, className, }: BackofficeFormSectionProps) => JSX.Element;
9
+ export default BackofficeFormSection;
10
+ //# sourceMappingURL=BackofficeFormSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackofficeFormSection.d.ts","sourceRoot":"","sources":["../../../../../src/backoffice/molecules/backoffice_form_section/BackofficeFormSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKjD,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,8CAKnC,0BAA0B,KAAG,GAAG,CAAC,OAoBnC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const container: string;
2
+ export declare const header: string;
3
+ export declare const title: string;
4
+ export declare const description: string;
5
+ //# sourceMappingURL=backofficeFormSection.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backofficeFormSection.css.d.ts","sourceRoot":"","sources":["../../../../../src/backoffice/molecules/backoffice_form_section/backofficeFormSection.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,QAUpB,CAAC;AAEH,eAAO,MAAM,MAAM,QAIjB,CAAC;AAEH,eAAO,MAAM,KAAK,QAKhB,CAAC;AAEH,eAAO,MAAM,WAAW,QAItB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type JSX, type ReactNode } from 'react';
2
+ export type BackofficeTableToolbarProps = {
3
+ searchSlot?: ReactNode;
4
+ filtersSlot?: ReactNode;
5
+ sortSlot?: ReactNode;
6
+ refreshSlot?: ReactNode;
7
+ ctaSlot?: ReactNode;
8
+ chipsSlot?: ReactNode;
9
+ className?: string;
10
+ };
11
+ export declare const BackofficeTableToolbar: ({ searchSlot, filtersSlot, sortSlot, refreshSlot, ctaSlot, chipsSlot, className, }: BackofficeTableToolbarProps) => JSX.Element | null;
12
+ export default BackofficeTableToolbar;
13
+ //# sourceMappingURL=BackofficeTableToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackofficeTableToolbar.d.ts","sourceRoot":"","sources":["../../../../../src/backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMjD,MAAM,MAAM,2BAA2B,GAAG;IACxC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,oFAQpC,2BAA2B,KAAG,GAAG,CAAC,OAAO,GAAG,IAgC9C,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const container: string;
2
+ export declare const topRow: string;
3
+ export declare const left: string;
4
+ export declare const right: string;
5
+ export declare const chipsRow: string;
6
+ //# sourceMappingURL=backofficeTableToolbar.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backofficeTableToolbar.css.d.ts","sourceRoot":"","sources":["../../../../../src/backoffice/molecules/backoffice_table_toolbar/backofficeTableToolbar.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,QAKpB,CAAC;AAEH,eAAO,MAAM,MAAM,QAYjB,CAAC;AAEH,eAAO,MAAM,IAAI,QAOf,CAAC;AAEH,eAAO,MAAM,KAAK,QAKhB,CAAC;AAEH,eAAO,MAAM,QAAQ,QASnB,CAAC"}
@@ -1,5 +1,10 @@
1
1
  export * from './backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.js';
2
+ export * from './backoffice/molecules/backoffice_detail_layout/BackofficeDetailLayout.js';
2
3
  export * from './backoffice/molecules/backoffice_page_header/BackofficePageHeader.js';
3
4
  export * from './backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js';
5
+ export * from './backoffice/molecules/backoffice_form_section/BackofficeFormSection.js';
4
6
  export * from './backoffice/molecules/backoffice_relations_menu/BackofficeRelationsMenu.js';
7
+ export * from './backoffice/molecules/backoffice_table_toolbar/BackofficeTableToolbar.js';
8
+ export * from './shared/agentJobRequestFormatting.js';
9
+ export * from './shared/agentText.js';
5
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4EAA4E,CAAC;AAC3F,cAAc,uEAAuE,CAAC;AACtF,cAAc,uEAAuE,CAAC;AACtF,cAAc,6EAA6E,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4EAA4E,CAAC;AAC3F,cAAc,2EAA2E,CAAC;AAC1F,cAAc,uEAAuE,CAAC;AACtF,cAAc,uEAAuE,CAAC;AACtF,cAAc,yEAAyE,CAAC;AACxF,cAAc,6EAA6E,CAAC;AAC5F,cAAc,2EAA2E,CAAC;AAC1F,cAAc,uCAAuC,CAAC;AACtD,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const FALLBACK_REFERENCE = "\u2014";
2
+ export declare function formatNullableString(value: string | null | undefined): string;
3
+ export declare function formatNullableNumber(value: number | null | undefined): string;
4
+ export declare function formatStringList(values: readonly string[]): string;
5
+ export declare function formatNullableCurrency(value: number | null | undefined, currency?: string, locale?: string): string;
6
+ //# sourceMappingURL=agentJobRequestFormatting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentJobRequestFormatting.d.ts","sourceRoot":"","sources":["../../../src/shared/agentJobRequestFormatting.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,WAAM,CAAC;AAKtC,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAW7E;AAKD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAU7E;AAKD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAMlE;AAKD,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,QAAQ,SAAQ,EAChB,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAqBR"}
@@ -0,0 +1,3 @@
1
+ export declare function sanitizeAgentMarkdown(content: string | null | undefined): string | null;
2
+ export declare function sanitizeAgentAnswer(answer: string | null | undefined): string | null;
3
+ //# sourceMappingURL=agentText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentText.d.ts","sourceRoot":"","sources":["../../../src/shared/agentText.ts"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACjC,MAAM,GAAG,IAAI,CAOf;AAKD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,MAAM,GAAG,IAAI,CAOf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumile/ui-backoffice",
3
- "version": "0.1.54",
3
+ "version": "0.1.56",
4
4
  "description": "Shared backoffice UI components for Plumile applications",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -19,6 +19,11 @@
19
19
  "import": "./lib/esm/backoffice/*.js",
20
20
  "default": "./lib/esm/backoffice/*.js"
21
21
  },
22
+ "./shared/*": {
23
+ "types": "./lib/types/shared/*.d.ts",
24
+ "import": "./lib/esm/shared/*.js",
25
+ "default": "./lib/esm/shared/*.js"
26
+ },
22
27
  "./package.json": "./package.json"
23
28
  },
24
29
  "sideEffects": true,
@@ -52,8 +57,8 @@
52
57
  "npm": ">=8.0.0"
53
58
  },
54
59
  "dependencies": {
55
- "@plumile/router": "^0.1.54",
56
- "@plumile/ui": "^0.1.54",
60
+ "@plumile/router": "^0.1.56",
61
+ "@plumile/ui": "^0.1.56",
57
62
  "tslib": "^2.8.1"
58
63
  },
59
64
  "devDependencies": {