@true-engineering/true-react-common-ui-kit 3.45.1 → 3.45.3

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.
@@ -1985,6 +1985,21 @@
1985
1985
  }
1986
1986
  };
1987
1987
  var phoneInfo = [
1988
+ {
1989
+ countryEn: "Abkhazia",
1990
+ countryRu: "Абхазия",
1991
+ countryCode: "AB",
1992
+ phoneMask: "999 999-99-99",
1993
+ dialCode: "7",
1994
+ areaCodes: [
1995
+ "840",
1996
+ "940"
1997
+ ],
1998
+ fullCodes: [
1999
+ "7840",
2000
+ "7940"
2001
+ ]
2002
+ },
1988
2003
  {
1989
2004
  countryEn: "Afghanistan",
1990
2005
  countryRu: "Афганистан",
@@ -3782,6 +3797,16 @@
3782
3797
  "82"
3783
3798
  ]
3784
3799
  },
3800
+ {
3801
+ countryCode: "OS",
3802
+ countryEn: "South Ossetia",
3803
+ countryRu: "Южная Осетия",
3804
+ phoneMask: "999 999-99-99",
3805
+ dialCode: "7",
3806
+ fullCodes: [
3807
+ "7"
3808
+ ]
3809
+ },
3785
3810
  {
3786
3811
  countryEn: "South Sudan",
3787
3812
  countryRu: "Южный Судан",
@@ -25707,8 +25732,24 @@
25707
25732
  ZM,
25708
25733
  ZW
25709
25734
  };
25735
+ const AB = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 341.3"><path fill="#FFF" d="M0 0h512v341.3H0z"/><g fill="#6DA544"><path d="M0 0h512v48.8H0zM0 97.5h512v48.8H0zM0 195h512v48.8H0zM0 292.6h512v48.8H0z"/></g><path fill="#D80027" d="M0 0h256v146.3H0z"/><path fill="#FFF" d="m116.9 114.4-7.5-14.8V69.9L128 59l18.6 10.9v22.3l7.4-7.4 4.2 3-4.2 11.8-14.9 14.8z"/><circle fill="#FFF" cx="82" cy="82.8" r="5.4"/><circle fill="#FFF" cx="90.8" cy="61.7" r="5.4"/><circle fill="#FFF" cx="106.6" cy="46.2" r="5.4"/><circle fill="#FFF" cx="128" cy="40.8" r="5.4"/><circle fill="#FFF" cx="149.4" cy="46.2" r="5.4"/><circle fill="#FFF" cx="165.2" cy="61.7" r="5.4"/><circle fill="#FFF" cx="174" cy="82.8" r="5.4"/></svg>';
25736
+ const OS = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 450 300"><path fill="#FFF" d="M0 0h450v300H0z"/><path fill="red" d="M0 100h450v200H0z"/><path fill="#FFDF00" d="M0 200h450v100H0z"/></svg>';
25737
+ var customFlags = {
25738
+ /**
25739
+ * Абхазия
25740
+ */
25741
+ AB,
25742
+ /**
25743
+ * Южная осетия
25744
+ */
25745
+ OS
25746
+ };
25710
25747
  var useStyles$l = createThemedStyles("Flag", {
25711
25748
  root: {
25749
+ display: "flex",
25750
+ width: "100%",
25751
+ height: "100%",
25752
+ boxSizing: "border-box",
25712
25753
  // приходится хардкодить в компоненте, тк либа Flags выдает флаги с 2-3 пиксельным отступом снизу
25713
25754
  // если будет нужно, то можно вынести border на уровень пропсов
25714
25755
  border: [
@@ -25728,17 +25769,29 @@
25728
25769
  var classes = useStyles$l({
25729
25770
  theme: tweakStyles
25730
25771
  });
25731
- var CC2 = countryCode.toUpperCase();
25732
- var TheFlag = countryFlagIcons.hasFlag(CC2) ? Flags[CC2] : function() {
25772
+ var countryFlagKey = countryCode.toUpperCase();
25773
+ var hasFlagInLibrary = countryFlagIcons.hasFlag(countryFlagKey);
25774
+ if (hasFlagInLibrary) {
25775
+ var FlagComponent = Flags[countryFlagKey];
25733
25776
  return /* @__PURE__ */ jsx("div", {
25734
- className: classes.noFlag,
25735
- children: /* @__PURE__ */ jsx(Icon, {
25736
- type: "minus"
25737
- })
25777
+ className: classes.root,
25778
+ children: /* @__PURE__ */ jsx(FlagComponent, {})
25738
25779
  });
25739
- };
25740
- return /* @__PURE__ */ jsx(TheFlag, {
25741
- className: classes.root
25780
+ }
25781
+ var CustomFlag = customFlags[countryFlagKey];
25782
+ if (CustomFlag !== void 0) {
25783
+ return /* @__PURE__ */ jsx("div", {
25784
+ className: classes.root,
25785
+ dangerouslySetInnerHTML: {
25786
+ __html: CustomFlag
25787
+ }
25788
+ });
25789
+ }
25790
+ return /* @__PURE__ */ jsx("div", {
25791
+ className: classes.noFlag,
25792
+ children: /* @__PURE__ */ jsx(Icon, {
25793
+ type: "minus"
25794
+ })
25742
25795
  });
25743
25796
  };
25744
25797
  var DEFAULT_DATE_FORMAT = "dd.MM.yyyy";
@@ -28706,6 +28759,7 @@
28706
28759
  var _value_countryCode;
28707
28760
  return (_value_countryCode = value === null || value === void 0 ? void 0 : value.countryCode) !== null && _value_countryCode !== void 0 ? _value_countryCode : getCountryCodeFromPhone(phoneWithCode);
28708
28761
  }, [
28762
+ value.countryCode,
28709
28763
  value.dialCode,
28710
28764
  value.phoneNumber
28711
28765
  ]);