@orderly.network/affiliate 3.0.4 → 3.1.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.
package/dist/index.js CHANGED
@@ -1243,8 +1243,8 @@ var TradingVolumeProgress = (props) => {
1243
1243
  width: `${progressPercentage}%`
1244
1244
  },
1245
1245
  className: ui.cn(
1246
- "oui-tradingVolumeProgress-bar oui-h-full oui-rounded-l-full oui-bg-primary-light",
1247
- progressPercentage === 100 && "oui-rounded-r-full"
1246
+ "oui-tradingVolumeProgress-bar oui-h-full oui-rounded-s-full oui-bg-primary-light",
1247
+ progressPercentage === 100 && "oui-rounded-e-full"
1248
1248
  )
1249
1249
  }
1250
1250
  ) })
@@ -2765,7 +2765,7 @@ var RefereesTableUI = (props) => {
2765
2765
  !record.is_default_rate && /* @__PURE__ */ jsxRuntime.jsx(
2766
2766
  ui.Text,
2767
2767
  {
2768
- className: "oui-refereesTable-reset-btn oui-ml-2 oui-cursor-pointer oui-text-primary-light",
2768
+ className: "oui-refereesTable-reset-btn oui-ms-2 oui-cursor-pointer oui-text-primary-light",
2769
2769
  onClick: () => props.onEditReferee("reset" /* Reset */, record),
2770
2770
  children: t("common.reset")
2771
2771
  }
@@ -3836,7 +3836,7 @@ var AutoHideText = (props) => {
3836
3836
  const maxDisplayW = containerWidth - pWidth;
3837
3837
  let count = 0;
3838
3838
  while (count < text.length) {
3839
- let contentW = getTextWidth(textElement, subText(text, count++)) || maxDisplayW;
3839
+ const contentW = getTextWidth(textElement, subText(text, count++)) || maxDisplayW;
3840
3840
  if (contentW <= maxDisplayW) {
3841
3841
  break;
3842
3842
  }
@@ -3864,18 +3864,25 @@ var AutoHideText = (props) => {
3864
3864
  );
3865
3865
  return `${startText}...${endText}`;
3866
3866
  }, [text, visibleCount, visibleChars]);
3867
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: ui.cn("oui-relative oui-w-full oui-text-end", props.className), children: [
3868
- /* @__PURE__ */ jsxRuntime.jsx(
3869
- "div",
3870
- {
3871
- className: ui.cn(
3872
- "oui-hidden oui-whitespace-nowrap oui-absolute oui-top-0 oui-bottom-0 oui-right-0 oui-left-0"
3867
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3868
+ "div",
3869
+ {
3870
+ ref: containerRef,
3871
+ className: ui.cn("oui-relative oui-w-full oui-text-end", props.className),
3872
+ children: [
3873
+ /* @__PURE__ */ jsxRuntime.jsx(
3874
+ "div",
3875
+ {
3876
+ className: ui.cn(
3877
+ "oui-hidden oui-whitespace-nowrap oui-absolute oui-top-0 oui-bottom-0 oui-end-0 oui-start-0"
3878
+ ),
3879
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { ref: textRef, children: text })
3880
+ }
3873
3881
  ),
3874
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { ref: textRef, children: text })
3875
- }
3876
- ),
3877
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: truncatedText })
3878
- ] });
3882
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: truncatedText })
3883
+ ]
3884
+ }
3885
+ );
3879
3886
  };
3880
3887
  var subText = (text, count) => {
3881
3888
  const start = Math.floor(text.length / 2 - (count > 0 ? count / 2 : 1));
@@ -4579,7 +4586,7 @@ var DesktopLayout = (props) => {
4579
4586
  title: t("affiliate.referralCodes.column.you&Referee"),
4580
4587
  dataIndex: "dffd",
4581
4588
  width: moreColumn ? 120 : 120,
4582
- className: "oui-pr-0",
4589
+ className: "oui-pe-0",
4583
4590
  render: (value, data) => {
4584
4591
  return /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { direction: "row", itemAlign: "center", gap: 1, children: [
4585
4592
  getRate(data),
@@ -4601,14 +4608,14 @@ var DesktopLayout = (props) => {
4601
4608
  title: t("affiliate.referees"),
4602
4609
  dataIndex: "referee_rebate_rate",
4603
4610
  width: 65,
4604
- className: "oui-pr-0",
4611
+ className: "oui-pe-0",
4605
4612
  render: (value, data) => getCount(data).split("/")[0]
4606
4613
  });
4607
4614
  cols.push({
4608
4615
  title: t("affiliate.referralCodes.column.traders"),
4609
4616
  dataIndex: "referrer_rebate_rate",
4610
4617
  width: 65,
4611
- className: "oui-pr-0",
4618
+ className: "oui-pe-0",
4612
4619
  render: (value, data) => getCount(data).split("/")[1]
4613
4620
  });
4614
4621
  } else {
@@ -4616,7 +4623,7 @@ var DesktopLayout = (props) => {
4616
4623
  title: t("affiliate.referralCodes.column.referees&Traders"),
4617
4624
  dataIndex: "total_invites/total_traded",
4618
4625
  width: 120,
4619
- fixed: "left",
4626
+ fixed: "start",
4620
4627
  render: (value, data) => getCount(data)
4621
4628
  });
4622
4629
  }
@@ -4777,7 +4784,7 @@ var EditCodeModal = ui.modal.create((props) => {
4777
4784
  ui.Text,
4778
4785
  {
4779
4786
  className: ui.cn(
4780
- "oui-ml-4 oui-list-item oui-list-outside oui-list-disc oui-text-xs oui-text-base-contrast-36 marker:oui-text-3xs",
4787
+ "oui-ms-4 oui-list-item oui-list-outside oui-list-disc oui-text-xs oui-text-base-contrast-36 marker:oui-text-3xs",
4781
4788
  filedError.length ? "oui-text-danger" : "oui-text-success"
4782
4789
  ),
4783
4790
  children: t("affiliate.referralCode.editCodeModal.helpText.length")
@@ -4787,7 +4794,7 @@ var EditCodeModal = ui.modal.create((props) => {
4787
4794
  ui.Text,
4788
4795
  {
4789
4796
  className: ui.cn(
4790
- "oui-ml-4 oui-list-item oui-list-outside oui-list-disc oui-text-xs oui-text-base-contrast-36 marker:oui-text-3xs",
4797
+ "oui-ms-4 oui-list-item oui-list-outside oui-list-disc oui-text-xs oui-text-base-contrast-36 marker:oui-text-3xs",
4791
4798
  "oui-text-success"
4792
4799
  ),
4793
4800
  children: t("affiliate.referralCode.editCodeModal.helpText.format")
@@ -4860,7 +4867,7 @@ var EditReferralRate = ui.modal.create((props) => {
4860
4867
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-text-xs oui-text-base-contrast-54", children: t("affiliate.referralRate.editRateModal.description") }),
4861
4868
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-text-xs oui-text-base-contrast-80 oui-mt-2 oui-flex", children: [
4862
4869
  t("affiliate.referralRate.editRateModal.label"),
4863
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-text-warning-darken oui-pl-1", children: `${new utils.Decimal(
4870
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-text-warning-darken oui-ps-1", children: `${new utils.Decimal(
4864
4871
  code.max_rebate_rate
4865
4872
  ).mul(100).toFixed(0, utils.Decimal.ROUND_DOWN)}%` })
4866
4873
  ] }),
@@ -5187,7 +5194,7 @@ var CommissionList = (props) => {
5187
5194
  }
5188
5195
  }
5189
5196
  );
5190
- }, [isMobile, props.commission]);
5197
+ }, [columns, isMobile, props.commission, t]);
5191
5198
  return /* @__PURE__ */ jsxRuntime.jsxs(
5192
5199
  ui.Flex,
5193
5200
  {
@@ -5349,7 +5356,7 @@ var RefereesList = (props) => {
5349
5356
  }
5350
5357
  }
5351
5358
  );
5352
- }, [isMobile, props.referees]);
5359
+ }, [columns, isMobile, props.referees, t]);
5353
5360
  return /* @__PURE__ */ jsxRuntime.jsx(
5354
5361
  ui.Flex,
5355
5362
  {
@@ -7038,7 +7045,7 @@ var Tab = (props) => {
7038
7045
  style: {
7039
7046
  position: "absolute",
7040
7047
  top: "50%",
7041
- right: "24px",
7048
+ insetInlineEnd: "24px",
7042
7049
  transform: "translateY(-50%)"
7043
7050
  },
7044
7051
  onClick: (e) => {
@@ -7062,7 +7069,7 @@ var Tab = (props) => {
7062
7069
  style: {
7063
7070
  position: "absolute",
7064
7071
  top: "50%",
7065
- right: "24px",
7072
+ insetInlineEnd: "24px",
7066
7073
  transform: "translateY(-50%)"
7067
7074
  },
7068
7075
  onClick: (e) => {