@ixo/editor 6.20.0 → 6.21.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.
@@ -30954,6 +30954,21 @@ function buildBidRows(bids, grantees) {
30954
30954
  });
30955
30955
  }
30956
30956
 
30957
+ // src/mantine/blocks/action/actionTypes/_shared/dataExport/buildGranteeRows.ts
30958
+ function buildGranteeRows(grantees, namesByDid = {}) {
30959
+ return grantees.map((grantee) => {
30960
+ const did = grantee.did || "";
30961
+ return {
30962
+ name: namesByDid[did] || "",
30963
+ did,
30964
+ address: grantee.address,
30965
+ role: grantee.role,
30966
+ agentQuota: grantee.agentQuota ?? "",
30967
+ maxAmount: Array.isArray(grantee.maxAmount) ? grantee.maxAmount.map((coin) => `${coin.amount} ${coin.denom}`).join("; ") : ""
30968
+ };
30969
+ });
30970
+ }
30971
+
30957
30972
  // src/mantine/blocks/action/actionTypes/_shared/dataExport/buildClaimRows.ts
30958
30973
  function claimStatus(claim) {
30959
30974
  if (claim.approved) return "approved";
@@ -33526,6 +33541,13 @@ var CollectionUsersFlowDetail = ({
33526
33541
  listOnLoadRef.current = false;
33527
33542
  runList();
33528
33543
  }, [runList]);
33544
+ const handleDownloadGranteesCsv = useCallback111(() => {
33545
+ const namesByDid = {};
33546
+ for (const [did, profile] of Object.entries(granteeProfilesByDid)) {
33547
+ if (profile?.displayname) namesByDid[did] = profile.displayname;
33548
+ }
33549
+ downloadArrayAsCsv(buildGranteeRows(listGrantees, namesByDid), { filename: `collection-members-${collectionId || "collection"}.csv` });
33550
+ }, [listGrantees, granteeProfilesByDid, collectionId]);
33529
33551
  useEffect113(() => {
33530
33552
  let mounted = true;
33531
33553
  const dids = Array.from(new Set(listGrantees.map(getGranteeDid).filter(Boolean)));
@@ -33711,7 +33733,7 @@ var CollectionUsersFlowDetail = ({
33711
33733
  { label: "Bids", value: "bids" }
33712
33734
  ]
33713
33735
  }
33714
- ), !configMissing && section === "list" && /* @__PURE__ */ React318.createElement(Stack210, { gap: "sm" }, /* @__PURE__ */ React318.createElement(Group115, { justify: "space-between", align: "center" }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 600 }, "Grantees"), /* @__PURE__ */ React318.createElement(ActionIcon46, { variant: "subtle", color: "gray", size: "sm", onClick: handleManualRefreshList, disabled: isRunning || !adminAddress }, /* @__PURE__ */ React318.createElement(IconRefresh9, { size: 16 }))), isRunning && lastOp !== "add" && lastOp !== "revoke" && /* @__PURE__ */ React318.createElement(Group115, { gap: "xs", justify: "center", py: "sm" }, /* @__PURE__ */ React318.createElement(Loader61, { size: "xs" }), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "Loading grantees\u2026")), !isRunning && listGrantees.length === 0 && /* @__PURE__ */ React318.createElement(Text198, { size: "sm", c: "dimmed", ta: "center", py: "sm" }, "No grantees hold a constraint for this collection yet."), listGrantees.map((grantee) => {
33736
+ ), !configMissing && section === "list" && /* @__PURE__ */ React318.createElement(Stack210, { gap: "sm" }, /* @__PURE__ */ React318.createElement(Group115, { justify: "space-between", align: "center" }, /* @__PURE__ */ React318.createElement(Text198, { size: "sm", fw: 600 }, "Grantees"), /* @__PURE__ */ React318.createElement(Group115, { gap: 4 }, /* @__PURE__ */ React318.createElement(DownloadCsvButton, { onDownload: handleDownloadGranteesCsv, disabled: isRunning || listGrantees.length === 0, label: "Download members CSV" }), /* @__PURE__ */ React318.createElement(ActionIcon46, { variant: "subtle", color: "gray", size: "sm", onClick: handleManualRefreshList, disabled: isRunning || !adminAddress }, /* @__PURE__ */ React318.createElement(IconRefresh9, { size: 16 })))), isRunning && lastOp !== "add" && lastOp !== "revoke" && /* @__PURE__ */ React318.createElement(Group115, { gap: "xs", justify: "center", py: "sm" }, /* @__PURE__ */ React318.createElement(Loader61, { size: "xs" }), /* @__PURE__ */ React318.createElement(Text198, { size: "xs", c: "dimmed" }, "Loading grantees\u2026")), !isRunning && listGrantees.length === 0 && /* @__PURE__ */ React318.createElement(Text198, { size: "sm", c: "dimmed", ta: "center", py: "sm" }, "No grantees hold a constraint for this collection yet."), listGrantees.map((grantee) => {
33715
33737
  const isTarget = revokeTarget?.address === grantee.address && revokeTarget?.role === grantee.role;
33716
33738
  const granteeDid = getGranteeDid(grantee);
33717
33739
  const profile = granteeProfilesByDid[granteeDid];
@@ -51632,4 +51654,4 @@ export {
51632
51654
  ixoGraphQLClient,
51633
51655
  getEntity
51634
51656
  };
51635
- //# sourceMappingURL=chunk-VDSKJX74.js.map
51657
+ //# sourceMappingURL=chunk-I4NSQ7X4.js.map