@redneckz/wildless-cms-uni-blocks 0.14.5 → 0.14.6
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/bin/migration-scripts/0.13.5.js +14 -11
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +167 -91
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Depository/Depository.d.ts +6 -0
- package/bundle/components/Depository/DepositoryContent.d.ts +2 -0
- package/bundle/components/Depository/DepositoryItem.d.ts +3 -0
- package/bundle/components/Depository/useDepository.d.ts +9 -0
- package/bundle/ui-kit/Pagination/Pagination.d.ts +8 -0
- package/bundle/ui-kit/Pagination/renderPages.d.ts +3 -0
- package/bundle/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
- package/bundle/utils/convertTimestampToDate.d.ts +1 -0
- package/dist/components/ApplicationForm/renderRegion.js +1 -1
- package/dist/components/ApplicationForm/renderRegionDepartment.js +1 -1
- package/dist/components/ApplicationForm/renderWedDataOrganization.js +2 -2
- package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +7 -7
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Depository/Depository.d.ts +6 -0
- package/dist/components/Depository/Depository.js +19 -0
- package/dist/components/Depository/Depository.js.map +1 -0
- package/dist/components/Depository/DepositoryContent.d.ts +2 -0
- package/dist/components/Depository/DepositoryContent.js +2 -0
- package/dist/components/Depository/DepositoryContent.js.map +1 -0
- package/dist/components/Depository/DepositoryItem.d.ts +3 -0
- package/dist/components/Depository/DepositoryItem.js +12 -0
- package/dist/components/Depository/DepositoryItem.js.map +1 -0
- package/dist/components/Depository/useDepository.d.ts +9 -0
- package/dist/components/Depository/useDepository.js +10 -0
- package/dist/components/Depository/useDepository.js.map +1 -0
- package/dist/ui-kit/Input/Input.js +7 -1
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/Pagination/Pagination.d.ts +8 -0
- package/dist/ui-kit/Pagination/Pagination.js +31 -0
- package/dist/ui-kit/Pagination/Pagination.js.map +1 -0
- package/dist/ui-kit/Pagination/renderPages.d.ts +3 -0
- package/dist/ui-kit/Pagination/renderPages.js +18 -0
- package/dist/ui-kit/Pagination/renderPages.js.map +1 -0
- package/dist/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
- package/dist/ui-kit/Pagination/shouldRenderPage.js +9 -0
- package/dist/ui-kit/Pagination/shouldRenderPage.js.map +1 -0
- package/dist/ui-kit/Select/filterOptions.js +1 -10
- package/dist/ui-kit/Select/filterOptions.js.map +1 -1
- package/dist/utils/convertTimestampToDate.d.ts +1 -0
- package/dist/utils/convertTimestampToDate.js +16 -0
- package/dist/utils/convertTimestampToDate.js.map +1 -0
- package/dist/utils/fetchMultitudeJSON.js +1 -1
- package/dist/utils/fetchMultitudeJSON.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/renderRegion.js +1 -1
- package/lib/components/ApplicationForm/renderRegionDepartment.js +1 -1
- package/lib/components/ApplicationForm/renderWedDataOrganization.js +2 -2
- package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +7 -7
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Depository/Depository.d.ts +6 -0
- package/lib/components/Depository/Depository.fixture.d.ts +6 -0
- package/lib/components/Depository/Depository.js +17 -0
- package/lib/components/Depository/Depository.js.map +1 -0
- package/lib/components/Depository/DepositoryContent.d.ts +2 -0
- package/lib/components/Depository/DepositoryContent.js +2 -0
- package/lib/components/Depository/DepositoryContent.js.map +1 -0
- package/lib/components/Depository/DepositoryItem.d.ts +3 -0
- package/lib/components/Depository/DepositoryItem.js +9 -0
- package/lib/components/Depository/DepositoryItem.js.map +1 -0
- package/lib/components/Depository/useDepository.d.ts +9 -0
- package/lib/components/Depository/useDepository.js +7 -0
- package/lib/components/Depository/useDepository.js.map +1 -0
- package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +1 -0
- package/lib/ui-kit/Input/Input.js +8 -2
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/Pagination/Pagination.d.ts +8 -0
- package/lib/ui-kit/Pagination/Pagination.js +28 -0
- package/lib/ui-kit/Pagination/Pagination.js.map +1 -0
- package/lib/ui-kit/Pagination/renderPages.d.ts +3 -0
- package/lib/ui-kit/Pagination/renderPages.js +15 -0
- package/lib/ui-kit/Pagination/renderPages.js.map +1 -0
- package/lib/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
- package/lib/ui-kit/Pagination/shouldRenderPage.js +6 -0
- package/lib/ui-kit/Pagination/shouldRenderPage.js.map +1 -0
- package/lib/ui-kit/Select/filterOptions.js +1 -10
- package/lib/ui-kit/Select/filterOptions.js.map +1 -1
- package/lib/utils/convertTimestampToDate.d.ts +1 -0
- package/lib/utils/convertTimestampToDate.js +13 -0
- package/lib/utils/convertTimestampToDate.js.map +1 -0
- package/lib/utils/fetchMultitudeJSON.js +1 -1
- package/lib/utils/fetchMultitudeJSON.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +91 -91
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Depository/Depository.d.ts +6 -0
- package/mobile/bundle/components/Depository/DepositoryContent.d.ts +2 -0
- package/mobile/bundle/components/Depository/DepositoryItem.d.ts +3 -0
- package/mobile/bundle/components/Depository/useDepository.d.ts +9 -0
- package/mobile/bundle/ui-kit/Pagination/Pagination.d.ts +8 -0
- package/mobile/bundle/ui-kit/Pagination/renderPages.d.ts +3 -0
- package/mobile/bundle/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
- package/mobile/bundle/utils/convertTimestampToDate.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/renderRegion.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +2 -2
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +7 -7
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Depository/Depository.d.ts +6 -0
- package/mobile/dist/components/Depository/Depository.js +19 -0
- package/mobile/dist/components/Depository/Depository.js.map +1 -0
- package/mobile/dist/components/Depository/DepositoryContent.d.ts +2 -0
- package/mobile/dist/components/Depository/DepositoryContent.js +2 -0
- package/mobile/dist/components/Depository/DepositoryContent.js.map +1 -0
- package/mobile/dist/components/Depository/DepositoryItem.d.ts +3 -0
- package/mobile/dist/components/Depository/DepositoryItem.js +12 -0
- package/mobile/dist/components/Depository/DepositoryItem.js.map +1 -0
- package/mobile/dist/components/Depository/useDepository.d.ts +9 -0
- package/mobile/dist/components/Depository/useDepository.js +10 -0
- package/mobile/dist/components/Depository/useDepository.js.map +1 -0
- package/mobile/dist/ui-kit/Input/Input.js +7 -1
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/Pagination/Pagination.d.ts +8 -0
- package/mobile/dist/ui-kit/Pagination/Pagination.js +31 -0
- package/mobile/dist/ui-kit/Pagination/Pagination.js.map +1 -0
- package/mobile/dist/ui-kit/Pagination/renderPages.d.ts +3 -0
- package/mobile/dist/ui-kit/Pagination/renderPages.js +18 -0
- package/mobile/dist/ui-kit/Pagination/renderPages.js.map +1 -0
- package/mobile/dist/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
- package/mobile/dist/ui-kit/Pagination/shouldRenderPage.js +9 -0
- package/mobile/dist/ui-kit/Pagination/shouldRenderPage.js.map +1 -0
- package/mobile/dist/ui-kit/Select/filterOptions.js +1 -10
- package/mobile/dist/ui-kit/Select/filterOptions.js.map +1 -1
- package/mobile/dist/utils/convertTimestampToDate.d.ts +1 -0
- package/mobile/dist/utils/convertTimestampToDate.js +16 -0
- package/mobile/dist/utils/convertTimestampToDate.js.map +1 -0
- package/mobile/dist/utils/fetchMultitudeJSON.js +1 -1
- package/mobile/dist/utils/fetchMultitudeJSON.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/renderRegion.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +2 -2
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +7 -7
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Depository/Depository.d.ts +6 -0
- package/mobile/lib/components/Depository/Depository.js +17 -0
- package/mobile/lib/components/Depository/Depository.js.map +1 -0
- package/mobile/lib/components/Depository/DepositoryContent.d.ts +2 -0
- package/mobile/lib/components/Depository/DepositoryContent.js +2 -0
- package/mobile/lib/components/Depository/DepositoryContent.js.map +1 -0
- package/mobile/lib/components/Depository/DepositoryItem.d.ts +3 -0
- package/mobile/lib/components/Depository/DepositoryItem.js +9 -0
- package/mobile/lib/components/Depository/DepositoryItem.js.map +1 -0
- package/mobile/lib/components/Depository/useDepository.d.ts +9 -0
- package/mobile/lib/components/Depository/useDepository.js +7 -0
- package/mobile/lib/components/Depository/useDepository.js.map +1 -0
- package/mobile/lib/ui-kit/Input/Input.js +8 -2
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/Pagination/Pagination.d.ts +8 -0
- package/mobile/lib/ui-kit/Pagination/Pagination.js +28 -0
- package/mobile/lib/ui-kit/Pagination/Pagination.js.map +1 -0
- package/mobile/lib/ui-kit/Pagination/renderPages.d.ts +3 -0
- package/mobile/lib/ui-kit/Pagination/renderPages.js +15 -0
- package/mobile/lib/ui-kit/Pagination/renderPages.js.map +1 -0
- package/mobile/lib/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
- package/mobile/lib/ui-kit/Pagination/shouldRenderPage.js +6 -0
- package/mobile/lib/ui-kit/Pagination/shouldRenderPage.js.map +1 -0
- package/mobile/lib/ui-kit/Select/filterOptions.js +1 -10
- package/mobile/lib/ui-kit/Select/filterOptions.js.map +1 -1
- package/mobile/lib/utils/convertTimestampToDate.d.ts +1 -0
- package/mobile/lib/utils/convertTimestampToDate.js +13 -0
- package/mobile/lib/utils/convertTimestampToDate.js.map +1 -0
- package/mobile/lib/utils/fetchMultitudeJSON.js +1 -1
- package/mobile/lib/utils/fetchMultitudeJSON.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +1 -1
- package/mobile/src/components/ApplicationForm/renderRegion.tsx +2 -2
- package/mobile/src/components/ApplicationForm/renderRegionDepartment.tsx +2 -2
- package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +5 -5
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +24 -22
- package/mobile/src/components/Depository/Depository.example.json +1 -0
- package/mobile/src/components/Depository/Depository.tsx +43 -0
- package/mobile/src/components/Depository/Depository.ui.json +1 -0
- package/mobile/src/components/Depository/DepositoryContent.ts +3 -0
- package/mobile/src/components/Depository/DepositoryItem.tsx +21 -0
- package/mobile/src/components/Depository/useDepository.ts +23 -0
- package/mobile/src/ui-kit/Input/Input.tsx +9 -2
- package/mobile/src/ui-kit/Pagination/Pagination.tsx +87 -0
- package/mobile/src/ui-kit/Pagination/renderPages.tsx +33 -0
- package/mobile/src/ui-kit/Pagination/shouldRenderPage.ts +8 -0
- package/mobile/src/ui-kit/Select/filterOptions.ts +1 -11
- package/mobile/src/utils/convertTimestampToDate.ts +15 -0
- package/mobile/src/utils/fetchMultitudeJSON.ts +1 -1
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +1 -1
- package/src/components/ApplicationForm/renderRegion.tsx +2 -2
- package/src/components/ApplicationForm/renderRegionDepartment.tsx +2 -2
- package/src/components/ApplicationForm/renderWedDataOrganization.tsx +5 -5
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +24 -22
- package/src/components/Blocks.ts +2 -0
- package/src/components/Depository/Depository.example.json +1 -0
- package/src/components/Depository/Depository.fixture.tsx +10 -0
- package/src/components/Depository/Depository.tsx +43 -0
- package/src/components/Depository/Depository.ui.json +1 -0
- package/src/components/Depository/DepositoryContent.ts +3 -0
- package/src/components/Depository/DepositoryItem.tsx +21 -0
- package/src/components/Depository/useDepository.ts +23 -0
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +23 -3
- package/src/ui-kit/Input/Input.tsx +9 -2
- package/src/ui-kit/Pagination/Pagination.tsx +87 -0
- package/src/ui-kit/Pagination/renderPages.tsx +33 -0
- package/src/ui-kit/Pagination/shouldRenderPage.ts +8 -0
- package/src/ui-kit/Select/filterOptions.ts +1 -11
- package/src/utils/convertTimestampToDate.ts +15 -0
- package/src/utils/fetchMultitudeJSON.ts +1 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -692,14 +692,20 @@
|
|
|
692
692
|
};
|
|
693
693
|
|
|
694
694
|
const Input = JSX(({ key, className = '', inputClassName = '', id, name, type = 'text', label, placeholder, value = '', valid = true, children, onChange, onFocus, onBlur, pattern, autoFocus = false, }) => {
|
|
695
|
+
const inputRef = useRef(null);
|
|
695
696
|
const handleChange = useCallback((e) => {
|
|
696
697
|
onChange && onChange(e.target?.value || '');
|
|
697
698
|
}, [onChange]);
|
|
699
|
+
useEffect(() => {
|
|
700
|
+
if (autoFocus) {
|
|
701
|
+
inputRef.current?.focus();
|
|
702
|
+
}
|
|
703
|
+
}, [autoFocus, inputRef]);
|
|
698
704
|
const paddingStyle = children ? 'pr-3xl' : '';
|
|
699
705
|
const validStyle = valid
|
|
700
706
|
? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
|
|
701
707
|
: 'border-error';
|
|
702
|
-
return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) })) : null, jsx("input", { className: style('w-full border rounded-md text-primary-text outline-none p-m', paddingStyle, validStyle, inputClassName), id: id, name: name || id, placeholder: placeholder, type: type, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern
|
|
708
|
+
return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) })) : null, jsx("input", { ref: inputRef, className: style('w-full border rounded-md text-primary-text outline-none p-m', paddingStyle, validStyle, inputClassName), id: id, name: name || id, placeholder: placeholder, type: type, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern }, key)] }), children] }));
|
|
703
709
|
});
|
|
704
710
|
|
|
705
711
|
const InputControl = JSX(({ className, label, value = '', error, onChange, onBlur }) => (jsxs("div", { className: className, children: [jsx(Input, { type: "text", "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), jsx("div", { className: "h-2", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null })] })));
|
|
@@ -819,88 +825,11 @@
|
|
|
819
825
|
close: () => defaultEventBus.fire('popup', { type: 'close' }),
|
|
820
826
|
});
|
|
821
827
|
|
|
822
|
-
const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
|
|
823
|
-
const desc = (cmp) => (a, b) => -cmp(a, b);
|
|
824
|
-
|
|
825
|
-
const JARO_WINKLER_P = 0.1;
|
|
826
|
-
const JARO_WINKLER_MAX_L = 4;
|
|
827
|
-
const jaroWinklerDistance = (s1) => (s2) => {
|
|
828
|
-
if (s1 === s2) {
|
|
829
|
-
return 1;
|
|
830
|
-
}
|
|
831
|
-
if (!s1 || !s2) {
|
|
832
|
-
return 0;
|
|
833
|
-
}
|
|
834
|
-
const { m, s1Matches, s2Matches } = computeM(s1, s2);
|
|
835
|
-
if (m === 0) {
|
|
836
|
-
return 0;
|
|
837
|
-
}
|
|
838
|
-
const t = computeT(s1, s2, { s1Matches, s2Matches });
|
|
839
|
-
const jaroWeight = (m / s1.length + m / s2.length + (m - t / 2) / m) / 3;
|
|
840
|
-
const winklerWeight = jaroWeight > 0.7 ? computePrefixL(s1, s2) * JARO_WINKLER_P : 0;
|
|
841
|
-
return jaroWeight + winklerWeight * (1 - jaroWeight);
|
|
842
|
-
};
|
|
843
|
-
function computeM(s1, s2) {
|
|
844
|
-
const range = Math.max(0, Math.floor(Math.max(s1.length, s2.length) / 2) - 1);
|
|
845
|
-
const s1Matches = new Array(s1.length);
|
|
846
|
-
const s2Matches = new Array(s2.length);
|
|
847
|
-
let m = 0;
|
|
848
|
-
for (let i = 0; i < s1.length; i++) {
|
|
849
|
-
const low = Math.max(0, i - range);
|
|
850
|
-
const high = Math.min(i + range, s2.length - 1);
|
|
851
|
-
for (let j = low; j <= high; j++) {
|
|
852
|
-
if (s1Matches[i] || s2Matches[j] || s1[i] !== s2[j]) {
|
|
853
|
-
continue;
|
|
854
|
-
}
|
|
855
|
-
m++;
|
|
856
|
-
s1Matches[i] = true;
|
|
857
|
-
s2Matches[j] = true;
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
return { m, s1Matches, s2Matches };
|
|
861
|
-
}
|
|
862
|
-
function computeT(s1, s2, { s1Matches, s2Matches }) {
|
|
863
|
-
let t = 0;
|
|
864
|
-
for (let i = 0, k = 0; i < s1.length; i++) {
|
|
865
|
-
if (!s1Matches[i]) {
|
|
866
|
-
continue;
|
|
867
|
-
}
|
|
868
|
-
let j = k;
|
|
869
|
-
for (; j < s2.length; j++) {
|
|
870
|
-
if (s2Matches[j]) {
|
|
871
|
-
k = j + 1;
|
|
872
|
-
break;
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
if (s1[i] !== s2[j]) {
|
|
876
|
-
t++;
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
return t;
|
|
880
|
-
}
|
|
881
|
-
function computePrefixL(s1, s2) {
|
|
882
|
-
let prefixL = 0;
|
|
883
|
-
while (s1[prefixL] === s2[prefixL] && prefixL < JARO_WINKLER_MAX_L) {
|
|
884
|
-
prefixL++;
|
|
885
|
-
}
|
|
886
|
-
return prefixL;
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
function zip(firstCol, ...restCols) {
|
|
890
|
-
return firstCol.map((firstEl, rowIndex) => [firstEl, ...restCols.map((col) => col[rowIndex])]);
|
|
891
|
-
}
|
|
892
|
-
|
|
893
828
|
const filterOptions = (options, query) => {
|
|
894
829
|
if (!options?.length || !query?.trim()) {
|
|
895
830
|
return options;
|
|
896
831
|
}
|
|
897
|
-
|
|
898
|
-
.map((_) => _.text?.toLowerCase())
|
|
899
|
-
.map(jaroWinklerDistance(query?.trim().toLowerCase()));
|
|
900
|
-
return zip(options, ranking)
|
|
901
|
-
.filter(([, rank]) => rank >= 0.5)
|
|
902
|
-
.sort(desc(compareBy(([, rank]) => rank)))
|
|
903
|
-
.map(([option]) => option);
|
|
832
|
+
return options.filter((_) => _.text?.toLocaleLowerCase().includes(query?.trim().toLocaleLowerCase()));
|
|
904
833
|
};
|
|
905
834
|
|
|
906
835
|
const SelectPopup = JSX(({ popupRef, options, value, query, onChange }) => options?.length ? (jsx("div", { className: "bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]", role: "listbox", ref: popupRef, children: filterOptions(options, query).map((option) => (jsxs("div", { className: "flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative", role: "option", "aria-selected": option.key === value?.key, onClick: () => onChange && onChange(option), children: [jsx("span", { className: "min-h-6", children: formatOption(option) }), jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", className: style('absolute right-4 pt-3xs', option.key === value?.key ? '' : 'hidden') })] }, option.key))) })) : null);
|
|
@@ -1008,7 +937,7 @@
|
|
|
1008
937
|
|
|
1009
938
|
const renderBusinessCardDataOrganization = (field) => (jsxs("div", { className: "@xl:flex @xl:justify-between @xl:gap-lg", children: [jsxs("div", { className: "@xl:w-1/2 space-y-s", children: [jsx(InputControl, { className: "shrink-0 w-full", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { className: "shrink-0 w-full", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: "@xl:w-1/2 space-y-s", children: [jsx(PhoneInputControl, { className: "shrink-0 w-full", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { className: "shrink-0 w-full", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })] })] }));
|
|
1010
939
|
|
|
1011
|
-
const renderRegion$1 = ({ regions, field }) => (jsx(SelectControl, { className: "w-full", label: "\
|
|
940
|
+
const renderRegion$1 = ({ regions, field }) => (jsx(SelectControl, { className: "w-full", label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }));
|
|
1012
941
|
|
|
1013
942
|
const initialFormState$3 = {
|
|
1014
943
|
name: '',
|
|
@@ -1126,7 +1055,7 @@
|
|
|
1126
1055
|
|
|
1127
1056
|
const renderCreditParameters = (field) => (jsxs("div", { className: "border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg", children: [jsxs("div", { className: "@xl:w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m", font: "font-light", children: "\u0421\u0443\u043C\u043C\u0430, \u20BD" }) }), jsx(InputRange, { items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') })] }), jsxs("div", { className: "@xl:w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m", font: "font-light", children: "\u0421\u0440\u043E\u043A, \u043C\u0435\u0441\u044F\u0446\u0435\u0432" }) }), jsx(InputRange, { items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') })] })] }));
|
|
1128
1057
|
|
|
1129
|
-
const renderRegionDepartment = ({ regions, branches, field }) => (jsxs("div", { className: "@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0", children: [jsx("div", { className: "@xl:w-1/2", children: jsx(SelectControl, { label: "\
|
|
1058
|
+
const renderRegionDepartment = ({ regions, branches, field }) => (jsxs("div", { className: "@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0", children: [jsx("div", { className: "@xl:w-1/2", children: jsx(SelectControl, { label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }), jsx("div", { className: "@xl:w-1/2", children: jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: branches.map(({ branchCode = '', address = '' }) => ({
|
|
1130
1059
|
key: branchCode,
|
|
1131
1060
|
text: address,
|
|
1132
1061
|
})), ...withValidator(field('department'), defaultValidator) }) })] }));
|
|
@@ -1255,7 +1184,7 @@
|
|
|
1255
1184
|
|
|
1256
1185
|
const renderWedDataOrganization = (field, regions) => {
|
|
1257
1186
|
const isCurrencyControl = field('vedTypes').value === 'currencyControl';
|
|
1258
|
-
return (jsxs("div", { children: [
|
|
1187
|
+
return (jsxs("div", { children: [isCurrencyControl ? (jsx(SelectControl, { className: "mb-s", label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) })) : null, jsxs("div", { className: "@xl:grid @xl:grid-cols-2 @xl:gap-x-lg", children: [isCurrencyControl ? (jsx(InputControl, { className: "w-full mb-s", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })) : null, jsx(InputControl, { className: "w-full mb-s", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { className: "w-full mb-s", label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { className: "w-full mb-s", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), !isCurrencyControl ? (jsx(InputControl, { className: "w-full mb-s", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })) : null] })] }));
|
|
1259
1188
|
};
|
|
1260
1189
|
|
|
1261
1190
|
const activeTextareaStyles = 'hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text';
|
|
@@ -1366,18 +1295,20 @@
|
|
|
1366
1295
|
|
|
1367
1296
|
const defaultIconSize = 44;
|
|
1368
1297
|
|
|
1369
|
-
const
|
|
1370
|
-
|
|
1298
|
+
const AlignStyles = 'text-center';
|
|
1299
|
+
|
|
1300
|
+
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [title ? jsx(Heading, { headingType: "h3", as: "h2", className: AlignStyles, title: title }) : null, benefitList?.length ? (jsx("div", { className: "flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl", role: "list", children: benefitList.map(renderBenefit) })) : null] })));
|
|
1301
|
+
const renderBenefit = (benefit, i) => (jsxs("div", { className: "flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]", role: "listitem", children: [benefit?.icon?.icon ? (jsx(RoundedIcon, { className: "shrink-0", defaultIconSize: defaultIconSize, iconBgVersion: benefit?.iconBgVersion || '', ...benefit?.icon })) : null, benefit?.icon?.src ? jsx(Img, { className: "shrink-0", image: benefit.icon }) : null, benefit?.label ? (jsxs("div", { className: "@sm:h-full", children: [jsx(Heading, { headingType: "h6", children: benefit.label }), renderDescription$3(benefit.description)] })) : null] }, String(i)));
|
|
1371
1302
|
const renderDescription$3 = (description) => {
|
|
1372
1303
|
const benefitType = description?.benefitType || null;
|
|
1373
|
-
return description && benefitType ? (jsx("div", { className: "mt-
|
|
1304
|
+
return description && benefitType ? (jsx("div", { className: "mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80", children: benefitType === 'list'
|
|
1374
1305
|
? renderListBenefit(description)
|
|
1375
1306
|
: renderTextBenefit(description) })) : null;
|
|
1376
1307
|
};
|
|
1377
|
-
const renderTextBenefit = (description) => description?.name ? (jsx(
|
|
1308
|
+
const renderTextBenefit = (description) => description?.name ? (jsx(Text, { size: "text-l", color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: description.name })) : null;
|
|
1378
1309
|
const renderListBenefit = (description) => {
|
|
1379
1310
|
const listStyleType = description?.bullets ? 'list-disc pl-3xl' : '';
|
|
1380
|
-
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx(
|
|
1311
|
+
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: jsx(Text, { size: "text-l", color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: _ }) }, `benefitListItem-${i}`))) })) : null;
|
|
1381
1312
|
};
|
|
1382
1313
|
|
|
1383
1314
|
const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical ? 'flex-col gap-xs justify-items-stretch' : 'flex-wrap gap-lg sm:gap-m', className), children: buttons.map(renderButton(buttonClassName)) })) : null;
|
|
@@ -1450,8 +1381,6 @@
|
|
|
1450
1381
|
return (jsxs(BlockWrapper, { className: style(isEmbedded ? '@container-normal' : '', className), defaultPadding: isEmbedded ? '' : 'p-6xl', version: version, isTheme: isTheme, ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { size: versionStyle.descriptionSize, font: versionStyle.descriptionWeight, align: align, ...descriptionStyle, children: description })) : null] }));
|
|
1451
1382
|
});
|
|
1452
1383
|
|
|
1453
|
-
const AlignStyles = 'text-center';
|
|
1454
|
-
|
|
1455
1384
|
const Bonus = JSX(({ className = '', title, description, bonusItems = [], align = AlignStyles, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "mb-xl", isEmbedded: true, title: title, description: description, headlineVersion: "M", align: align }), jsx("div", { className: "flex flex-wrap w-full", children: bonusItems.length > 0
|
|
1456
1385
|
? bonusItems.map((_, i) => (jsxs("div", { className: "mb-3xl last:mb-0 sm:space-y-xs flex flex-col grow w-full p-4xl sm:p-m @xl:w-[49%] border border-gray", children: [jsx("div", { className: "grow", children: jsx(Headline, { title: _?.title, description: _?.description, headlineVersion: "S", isEmbedded: true, align: "text-left" }) }), jsxs("div", { className: "flex justify-center sm:justify-between sm:items-end", children: [jsx("div", { className: "hidden sm:block", children: renderButtonsSection(_?.buttons) }), _.bonusItemContent?.bonusType
|
|
1457
1386
|
? renderBonusItemContent(_.bonusItemContent)
|
|
@@ -3113,11 +3042,15 @@
|
|
|
3113
3042
|
|
|
3114
3043
|
async function fetchMultitudeJSON(...urls) {
|
|
3115
3044
|
const fetchPromises = urls.map((url) => fetchJSON(url));
|
|
3116
|
-
return
|
|
3045
|
+
return Promise.all(fetchPromises);
|
|
3117
3046
|
}
|
|
3118
3047
|
|
|
3119
3048
|
const unique = (list) => [...new Set(list)];
|
|
3120
3049
|
|
|
3050
|
+
function zip(firstCol, ...restCols) {
|
|
3051
|
+
return firstCol.map((firstEl, rowIndex) => [firstEl, ...restCols.map((col) => col[rowIndex])]);
|
|
3052
|
+
}
|
|
3053
|
+
|
|
3121
3054
|
const getChildSourceBook = (blocks) => blocks?.filter(hasSourceBook).map(({ content: { sourceBook } }) => sourceBook);
|
|
3122
3055
|
const hasSourceBook = (block) => Boolean(block && block.content && typeof block.content.sourceBook === 'string');
|
|
3123
3056
|
|
|
@@ -3165,6 +3098,81 @@
|
|
|
3165
3098
|
sourceBook: sourceBookSchema,
|
|
3166
3099
|
});
|
|
3167
3100
|
|
|
3101
|
+
const checkPageRange = (page, currentPage, totalPages) => (currentPage <= 3 && page <= currentPage + 3) ||
|
|
3102
|
+
(currentPage >= totalPages - 1 && page >= totalPages - 4);
|
|
3103
|
+
const shouldRenderPage = (page, currentPage, totalPages) => (page < currentPage && page >= currentPage - 2) ||
|
|
3104
|
+
(page <= currentPage + 2 && page > currentPage) ||
|
|
3105
|
+
checkPageRange(page, currentPage, totalPages);
|
|
3106
|
+
|
|
3107
|
+
const renderPages = (pagesParams, index) => {
|
|
3108
|
+
const { currentPage, onPageChange, totalPages } = pagesParams;
|
|
3109
|
+
const page = index + 1;
|
|
3110
|
+
if (page === currentPage) {
|
|
3111
|
+
return (jsx("div", { "aria-current": "true", className: "py-m px-lg bg-green-light text-white rounded-md", children: page }, String(index)));
|
|
3112
|
+
}
|
|
3113
|
+
if (page !== 1 && page !== totalPages && shouldRenderPage(page, currentPage, totalPages)) {
|
|
3114
|
+
return (jsx("div", { onClick: () => onPageChange(page), className: paginationBlockStyle, "aria-label": `Страница ${page}`, children: page }, String(index)));
|
|
3115
|
+
}
|
|
3116
|
+
return null;
|
|
3117
|
+
};
|
|
3118
|
+
|
|
3119
|
+
const paginationBlockStyle = 'py-m px-lg rounded-md cursor-pointer hover:bg-green-more-dark hover:text-white';
|
|
3120
|
+
const ICON_SIZE$1 = { width: '24', height: '24' };
|
|
3121
|
+
const Pagination = ({ currentPage, onPageChange, totalPages }) => {
|
|
3122
|
+
const handlePrevPage = useCallback(() => {
|
|
3123
|
+
if (currentPage > 1) {
|
|
3124
|
+
onPageChange(currentPage - 1);
|
|
3125
|
+
}
|
|
3126
|
+
}, [currentPage]);
|
|
3127
|
+
const handleNextPage = useCallback(() => {
|
|
3128
|
+
if (currentPage < totalPages - 1) {
|
|
3129
|
+
onPageChange(currentPage + 1);
|
|
3130
|
+
}
|
|
3131
|
+
}, [currentPage, totalPages]);
|
|
3132
|
+
const handleFirstPage = useCallback(() => onPageChange(1), []);
|
|
3133
|
+
const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
|
|
3134
|
+
const pages = useMemo(() => new Array(totalPages).fill({
|
|
3135
|
+
currentPage,
|
|
3136
|
+
onPageChange,
|
|
3137
|
+
totalPages,
|
|
3138
|
+
}), [totalPages, currentPage]);
|
|
3139
|
+
return (jsx("div", { className: "mt-3xl flex items-center select-none", role: "navigation", "aria-label": "\u041F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044F", children: jsxs("div", { className: "flex gap-m items-center", children: [jsx("div", { onClick: handlePrevPage, children: jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE$1 }) }), jsxs("div", { className: "flex gap-xs", children: [currentPage > 1 ? (jsx("div", { onClick: handleFirstPage, className: paginationBlockStyle, "aria-label": "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 1", children: "1" })) : null, currentPage > 4 ? jsx("div", { className: "py-m px-s", children: "..." }) : null, pages.map(renderPages), currentPage < totalPages - 3 ? jsx("div", { className: "py-m px-s", children: "..." }) : null, currentPage < totalPages ? (jsx("div", { onClick: handleLastPage, className: paginationBlockStyle, "aria-label": `Страница ${totalPages}}`, children: totalPages })) : null] }), jsx("div", { onClick: handleNextPage, children: jsx(Icon, { className: "rotate-180", name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === totalPages), ...ICON_SIZE$1 }) })] }) }));
|
|
3140
|
+
};
|
|
3141
|
+
const getIconStyle = (condition) => condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
|
|
3142
|
+
|
|
3143
|
+
const convertTimestampToDate = (timestamp) => {
|
|
3144
|
+
const date = new Date(timestamp * 1000);
|
|
3145
|
+
let dd = date.getDate();
|
|
3146
|
+
if (dd < 10) {
|
|
3147
|
+
dd = '0' + dd;
|
|
3148
|
+
}
|
|
3149
|
+
let mm = date.getMonth() + 1;
|
|
3150
|
+
if (mm < 10) {
|
|
3151
|
+
mm = '0' + mm;
|
|
3152
|
+
}
|
|
3153
|
+
return dd + '.' + mm + '.' + date.getFullYear();
|
|
3154
|
+
};
|
|
3155
|
+
|
|
3156
|
+
const DepositoryItem = ({ title, timestamp = 0, publicId }) => {
|
|
3157
|
+
const link = useLink();
|
|
3158
|
+
const { href } = link({ href: `/api/v1/depository/${publicId}/file` });
|
|
3159
|
+
return (jsxs("div", { className: "grid grid-cols-12 py-lg border-gray border-opacity-50 border-b", children: [jsx("div", { className: "col-span-2 text-m", children: jsx("span", { children: convertTimestampToDate(timestamp) }) }), jsx("div", { className: "col-span-10 text-h6 hover:text-primary-active", children: jsx("a", { href: href, download: true, "aria-label": "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", children: title }) })] }, publicId));
|
|
3160
|
+
};
|
|
3161
|
+
|
|
3162
|
+
const useDepository = (size, page) => {
|
|
3163
|
+
const { data } = useAsyncData(`/api/v1/depository?page=${page}&size=${size}`, fetchJSONUnsafe);
|
|
3164
|
+
return { items: data?.content, totalPages: data?.totalPages };
|
|
3165
|
+
};
|
|
3166
|
+
|
|
3167
|
+
const DEFAULT_ITEMS_COUNT = 10;
|
|
3168
|
+
const Depository = JSX(({ className, ...rest }) => {
|
|
3169
|
+
const [currentPage, setCurrentPage] = useState(0);
|
|
3170
|
+
const [itemCount] = useState(DEFAULT_ITEMS_COUNT);
|
|
3171
|
+
const { totalPages = 0, items } = useDepository(itemCount, currentPage);
|
|
3172
|
+
const handleChangePage = useCallback((page) => setCurrentPage(page - 1), []);
|
|
3173
|
+
return (jsx(BlockWrapper, { className: style(className, 'container p-4xl'), ...rest, children: jsxs("div", { className: "flex flex-col", children: [jsxs("div", { className: "grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b", children: [jsx("span", { className: "col-span-2 text-gray text-m", children: "\u0414\u0430\u0442\u0430" }), jsx("span", { className: "col-span-10 text-gray text-m", children: "\u0422\u0435\u043C\u0430" })] }), items?.map((params) => (jsx(DepositoryItem, { ...params }, String(params.publicId)))), jsx(Pagination, { currentPage: currentPage + 1, onPageChange: handleChangePage, totalPages: totalPages + 1 })] }) }));
|
|
3174
|
+
});
|
|
3175
|
+
|
|
3168
3176
|
const renderErrorContent = (error) => {
|
|
3169
3177
|
if (error?.contentType === 'Image' && error?.image) {
|
|
3170
3178
|
return jsx(Img, { image: error.image });
|
|
@@ -3398,6 +3406,73 @@
|
|
|
3398
3406
|
}, deps);
|
|
3399
3407
|
}
|
|
3400
3408
|
|
|
3409
|
+
const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
|
|
3410
|
+
const desc = (cmp) => (a, b) => -cmp(a, b);
|
|
3411
|
+
|
|
3412
|
+
const JARO_WINKLER_P = 0.1;
|
|
3413
|
+
const JARO_WINKLER_MAX_L = 4;
|
|
3414
|
+
const jaroWinklerDistance = (s1) => (s2) => {
|
|
3415
|
+
if (s1 === s2) {
|
|
3416
|
+
return 1;
|
|
3417
|
+
}
|
|
3418
|
+
if (!s1 || !s2) {
|
|
3419
|
+
return 0;
|
|
3420
|
+
}
|
|
3421
|
+
const { m, s1Matches, s2Matches } = computeM(s1, s2);
|
|
3422
|
+
if (m === 0) {
|
|
3423
|
+
return 0;
|
|
3424
|
+
}
|
|
3425
|
+
const t = computeT(s1, s2, { s1Matches, s2Matches });
|
|
3426
|
+
const jaroWeight = (m / s1.length + m / s2.length + (m - t / 2) / m) / 3;
|
|
3427
|
+
const winklerWeight = jaroWeight > 0.7 ? computePrefixL(s1, s2) * JARO_WINKLER_P : 0;
|
|
3428
|
+
return jaroWeight + winklerWeight * (1 - jaroWeight);
|
|
3429
|
+
};
|
|
3430
|
+
function computeM(s1, s2) {
|
|
3431
|
+
const range = Math.max(0, Math.floor(Math.max(s1.length, s2.length) / 2) - 1);
|
|
3432
|
+
const s1Matches = new Array(s1.length);
|
|
3433
|
+
const s2Matches = new Array(s2.length);
|
|
3434
|
+
let m = 0;
|
|
3435
|
+
for (let i = 0; i < s1.length; i++) {
|
|
3436
|
+
const low = Math.max(0, i - range);
|
|
3437
|
+
const high = Math.min(i + range, s2.length - 1);
|
|
3438
|
+
for (let j = low; j <= high; j++) {
|
|
3439
|
+
if (s1Matches[i] || s2Matches[j] || s1[i] !== s2[j]) {
|
|
3440
|
+
continue;
|
|
3441
|
+
}
|
|
3442
|
+
m++;
|
|
3443
|
+
s1Matches[i] = true;
|
|
3444
|
+
s2Matches[j] = true;
|
|
3445
|
+
}
|
|
3446
|
+
}
|
|
3447
|
+
return { m, s1Matches, s2Matches };
|
|
3448
|
+
}
|
|
3449
|
+
function computeT(s1, s2, { s1Matches, s2Matches }) {
|
|
3450
|
+
let t = 0;
|
|
3451
|
+
for (let i = 0, k = 0; i < s1.length; i++) {
|
|
3452
|
+
if (!s1Matches[i]) {
|
|
3453
|
+
continue;
|
|
3454
|
+
}
|
|
3455
|
+
let j = k;
|
|
3456
|
+
for (; j < s2.length; j++) {
|
|
3457
|
+
if (s2Matches[j]) {
|
|
3458
|
+
k = j + 1;
|
|
3459
|
+
break;
|
|
3460
|
+
}
|
|
3461
|
+
}
|
|
3462
|
+
if (s1[i] !== s2[j]) {
|
|
3463
|
+
t++;
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3466
|
+
return t;
|
|
3467
|
+
}
|
|
3468
|
+
function computePrefixL(s1, s2) {
|
|
3469
|
+
let prefixL = 0;
|
|
3470
|
+
while (s1[prefixL] === s2[prefixL] && prefixL < JARO_WINKLER_MAX_L) {
|
|
3471
|
+
prefixL++;
|
|
3472
|
+
}
|
|
3473
|
+
return prefixL;
|
|
3474
|
+
}
|
|
3475
|
+
|
|
3401
3476
|
const joinMaps = (aggregate, emptyVal) => (acc, map) => {
|
|
3402
3477
|
for (const [key, b] of map) {
|
|
3403
3478
|
acc.set(key, aggregate(acc.get(key) || emptyVal, b));
|
|
@@ -5099,6 +5174,7 @@
|
|
|
5099
5174
|
CarouselTariffsCard,
|
|
5100
5175
|
ComparisonTable,
|
|
5101
5176
|
ContactsBlock,
|
|
5177
|
+
Depository,
|
|
5102
5178
|
DepositFiltration,
|
|
5103
5179
|
ErrorBlock,
|
|
5104
5180
|
ExchangeRateTile,
|
|
@@ -5371,7 +5447,7 @@
|
|
|
5371
5447
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
|
|
5372
5448
|
}
|
|
5373
5449
|
|
|
5374
|
-
const packageVersion = "0.14.
|
|
5450
|
+
const packageVersion = "0.14.6";
|
|
5375
5451
|
|
|
5376
5452
|
exports.Blocks = Blocks;
|
|
5377
5453
|
exports.ContentPage = ContentPage;
|