randmarcomps 1.616.0 → 1.618.0

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.
@@ -724,7 +724,7 @@ declare interface OrdersCardProps {
724
724
  export declare function PageHeader({ title, children, className }: PageHeaderProps): JSX.Element;
725
725
 
726
726
  export declare interface PageHeaderProps {
727
- title: string;
727
+ title: React.ReactNode;
728
728
  children?: React.ReactNode;
729
729
  className?: string;
730
730
  }
@@ -938,7 +938,7 @@ export declare interface RmPageHeaderBreadcrumbItem {
938
938
  }
939
939
 
940
940
  export declare interface RmPageHeaderProps {
941
- title: string;
941
+ title: React_2.ReactNode;
942
942
  subtitle?: React_2.ReactNode;
943
943
  breadcrumbs?: RmPageHeaderBreadcrumbItem[];
944
944
  rightTopActions?: React_2.ReactNode;
@@ -14163,6 +14163,17 @@ const emptySplitApi = createApi({
14163
14163
  method: "PUT"
14164
14164
  })
14165
14165
  }),
14166
+ getV4PartnerByApplicationIdAccountVendor: e.query({
14167
+ query: (t) => ({
14168
+ url: `/V4/Partner/${t.applicationId}/Account/Vendor`
14169
+ })
14170
+ }),
14171
+ putV4PartnerByApplicationIdAccountVendor: e.mutation({
14172
+ query: (t) => ({
14173
+ url: `/V4/Partner/${t.applicationId}/Account/Vendor`,
14174
+ method: "PUT"
14175
+ })
14176
+ }),
14166
14177
  putV4PartnerByApplicationIdAccountBilling: e.mutation({
14167
14178
  query: (t) => ({
14168
14179
  url: `/V4/Partner/${t.applicationId}/Account/Billing`,
@@ -14176,12 +14187,6 @@ const emptySplitApi = createApi({
14176
14187
  method: "PUT"
14177
14188
  })
14178
14189
  }),
14179
- putV4PartnerByApplicationIdAccountVendor: e.mutation({
14180
- query: (t) => ({
14181
- url: `/V4/Partner/${t.applicationId}/Account/Vendor`,
14182
- method: "PUT"
14183
- })
14184
- }),
14185
14190
  postV4PartnerByApplicationIdAccountFeedback: e.mutation({
14186
14191
  query: (t) => ({
14187
14192
  url: `/V4/Partner/${t.applicationId}/Account/Feedback`,
@@ -59655,7 +59660,7 @@ const Navbar = forwardRef(
59655
59660
  }
59656
59661
  ),
59657
59662
  /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col", children: [
59658
- /* @__PURE__ */ jsx("main", { className: "flex-1 mt-16", children: e }),
59663
+ /* @__PURE__ */ jsx("main", { className: "mt-16 flex-1 overflow-x-clip", "data-rm-main-content-region": "true", children: e }),
59659
59664
  /* @__PURE__ */ jsx(Toaster, {})
59660
59665
  ] })
59661
59666
  ] }) }) }));
@@ -62058,11 +62063,22 @@ function DataRefreshAssistantCluster({
62058
62063
  }, [t, a, e, n]);
62059
62064
  return /* @__PURE__ */ jsx(RefreshCluster, { ...o, onAssistantClick: s });
62060
62065
  }
62061
- function PageHeader({ title: e, children: t, className: n }) {
62062
- return /* @__PURE__ */ jsx("header", { className: "w-full", children: /* @__PURE__ */ jsx("div", { className: "mx-auto w-full max-w-[1440px] px-6 pt-8", children: /* @__PURE__ */ jsx(Card, { className: cn("rounded-2xl border-border shadow-sm", n), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 p-6 sm:flex-row sm:items-center sm:justify-between", children: [
62063
- /* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold leading-tight tracking-tight text-foreground", children: e }),
62064
- t ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: t }) : null
62065
- ] }) }) }) });
62066
+ const roundToPixel = (e) => Math.round(e * 100) / 100;
62067
+ function getMainContentRegion(e) {
62068
+ return e.closest("main, [data-rm-main-content-region]");
62069
+ }
62070
+ function getRegionBounds(e) {
62071
+ if (e) {
62072
+ const t = e.getBoundingClientRect();
62073
+ return {
62074
+ left: t.left,
62075
+ right: t.right
62076
+ };
62077
+ }
62078
+ return {
62079
+ left: 0,
62080
+ right: document.documentElement.clientWidth
62081
+ };
62066
62082
  }
62067
62083
  function RmPageHeaderBreadcrumbLink({
62068
62084
  item: e,
@@ -62117,30 +62133,52 @@ function RmPageHeader({
62117
62133
  cardClassName: f,
62118
62134
  contentClassName: S
62119
62135
  }) {
62120
- const R = !!(o || a), te = /* @__PURE__ */ jsx("header", { className: cn("w-full", d), children: /* @__PURE__ */ jsx("div", { className: "mx-auto w-full max-w-[1440px] px-6 pt-8", children: /* @__PURE__ */ jsx(Card, { className: cn("rounded-2xl border-border shadow-sm", f), children: /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-6 p-6", S), children: [
62121
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between", children: [
62136
+ const R = React.useRef(null);
62137
+ React.useEffect(() => {
62138
+ if (typeof window > "u") return;
62139
+ const rt = R.current;
62140
+ if (!rt) return;
62141
+ const ot = getMainContentRegion(rt);
62142
+ let it = null;
62143
+ const at = () => {
62144
+ const ut = rt.getBoundingClientRect(), ct = getRegionBounds(ot), dt = roundToPixel(ct.left - ut.left), pt = roundToPixel(ut.right - ct.right);
62145
+ rt.style.marginLeft = `${dt}px`, rt.style.marginRight = `${pt}px`;
62146
+ }, st = () => {
62147
+ it !== null && window.cancelAnimationFrame(it), it = window.requestAnimationFrame(() => {
62148
+ at(), it = null;
62149
+ });
62150
+ };
62151
+ st();
62152
+ const lt = typeof ResizeObserver < "u" ? new ResizeObserver(st) : null;
62153
+ return lt && (lt.observe(rt), lt.observe(document.documentElement), ot && lt.observe(ot)), window.addEventListener("resize", st), window.addEventListener("orientationchange", st), () => {
62154
+ it !== null && window.cancelAnimationFrame(it), lt?.disconnect(), window.removeEventListener("resize", st), window.removeEventListener("orientationchange", st), rt.style.marginLeft = "", rt.style.marginRight = "";
62155
+ };
62156
+ }, []);
62157
+ const te = !!(o || a), A = /* @__PURE__ */ jsxs("header", { className: cn("w-full border-b border-border bg-background", d), children: [
62158
+ /* @__PURE__ */ jsx("div", { className: cn("px-4 py-6 sm:px-6", f), children: /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between", S), children: [
62122
62159
  /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
62123
62160
  n?.length ? /* @__PURE__ */ jsx(RmPageHeaderBreadcrumbs, { items: n }) : null,
62124
62161
  /* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold leading-tight tracking-tight text-foreground", children: e }),
62125
62162
  t ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t }) : null
62126
62163
  ] }),
62127
- R ? /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col items-start gap-2 lg:w-auto lg:min-w-[16rem] lg:items-end", children: [
62164
+ te ? /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col items-start gap-2 lg:w-auto lg:min-w-[16rem] lg:items-end", children: [
62128
62165
  o ? /* @__PURE__ */ jsx("div", { className: "flex w-full flex-wrap items-center justify-start gap-2 lg:justify-end", children: o }) : null,
62129
62166
  a ? /* @__PURE__ */ jsx("div", { className: "flex w-full flex-wrap items-center justify-start gap-2 lg:justify-end", children: a }) : null
62130
62167
  ] }) : null
62131
- ] }),
62132
- s ? /* @__PURE__ */ jsx("div", { className: "border-t border-border pt-4", children: s }) : null
62133
- ] }) }) }) });
62134
- return l ? /* @__PURE__ */ jsx(
62135
- "div",
62168
+ ] }) }),
62169
+ s ? /* @__PURE__ */ jsx("div", { className: "border-t border-border bg-muted/40", children: /* @__PURE__ */ jsx("div", { className: "px-4 py-4 sm:px-6", children: s }) }) : null
62170
+ ] });
62171
+ return l ? /* @__PURE__ */ jsx("div", { ref: R, children: /* @__PURE__ */ jsx("div", { className: cn("sticky top-0 z-20", c), children: A }) }) : /* @__PURE__ */ jsx("div", { ref: R, children: A });
62172
+ }
62173
+ function PageHeader({ title: e, children: t, className: n }) {
62174
+ return /* @__PURE__ */ jsx(
62175
+ RmPageHeader,
62136
62176
  {
62137
- className: cn(
62138
- "sticky top-0 z-20 bg-muted/95 pb-2 backdrop-blur supports-[backdrop-filter]:bg-muted/70",
62139
- c
62140
- ),
62141
- children: te
62177
+ title: e,
62178
+ rightBottomActions: t ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: t }) : void 0,
62179
+ cardClassName: n
62142
62180
  }
62143
- ) : te;
62181
+ );
62144
62182
  }
62145
62183
  function OrderedMap(e) {
62146
62184
  this.content = e;