@vchasno/ui-kit 0.3.8 → 0.3.9
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/CHANGELOG.md +10 -0
- package/dist/Datepicker/types/components/ProjectsPopover/ProductLink.d.ts +1 -0
- package/dist/Datepicker/types/components/ProjectsPopover/utils.d.ts +2 -1
- package/dist/Menu/types/components/ProjectsPopover/ProductLink.d.ts +1 -0
- package/dist/Menu/types/components/ProjectsPopover/utils.d.ts +2 -1
- package/dist/ProjectsPopover/index.cjs.js +8 -7
- package/dist/ProjectsPopover/index.cjs.js.map +1 -1
- package/dist/ProjectsPopover/index.d.ts +1 -0
- package/dist/ProjectsPopover/index.js +8 -7
- package/dist/ProjectsPopover/index.js.map +1 -1
- package/dist/ProjectsPopover/types/components/ProjectsPopover/ProductLink.d.ts +1 -0
- package/dist/ProjectsPopover/types/components/ProjectsPopover/utils.d.ts +2 -1
- package/dist/Select/types/components/ProjectsPopover/ProductLink.d.ts +1 -0
- package/dist/Select/types/components/ProjectsPopover/utils.d.ts +2 -1
- package/dist/SelectCreatable/types/components/ProjectsPopover/ProductLink.d.ts +1 -0
- package/dist/SelectCreatable/types/components/ProjectsPopover/utils.d.ts +2 -1
- package/dist/Snackbar/index.cjs.js +2 -2
- package/dist/Snackbar/index.js +2 -2
- package/dist/Snackbar/types/components/ProjectsPopover/ProductLink.d.ts +1 -0
- package/dist/Snackbar/types/components/ProjectsPopover/utils.d.ts +2 -1
- package/dist/index.js +2 -2
- package/dist/types/components/ProjectsPopover/ProductLink.d.ts +1 -0
- package/dist/types/components/ProjectsPopover/utils.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.3.9] - 2024-07-28
|
|
11
|
+
|
|
12
|
+
## Added
|
|
13
|
+
|
|
14
|
+
- add urls for ProjectPopover - to customize base url
|
|
15
|
+
|
|
16
|
+
## Fixed
|
|
17
|
+
|
|
18
|
+
- fix MobileAppLinks, FollowUs component min-width styles
|
|
19
|
+
|
|
10
20
|
## [0.3.8] - 2024-07-27
|
|
11
21
|
|
|
12
22
|
## Added
|
|
@@ -7,6 +7,7 @@ export interface ProductLinkProps {
|
|
|
7
7
|
queryParams?: Record<string, string>;
|
|
8
8
|
onLinkClick?: (product: AllProducts, event: React.MouseEvent) => void;
|
|
9
9
|
overrideHint?: (product: AllProducts) => string;
|
|
10
|
+
urls?: Partial<Record<AllProducts, string>>;
|
|
10
11
|
}
|
|
11
12
|
declare const ProductLink: React.FC<ProductLinkProps>;
|
|
12
13
|
export default ProductLink;
|
|
@@ -4,7 +4,8 @@ interface ComposeLinkOptions {
|
|
|
4
4
|
ctxProduct: string;
|
|
5
5
|
targetProduct: AllProducts;
|
|
6
6
|
queryParams?: Record<string, string>;
|
|
7
|
+
urls?: Partial<Record<AllProducts, string>>;
|
|
7
8
|
}
|
|
8
9
|
export declare const composeZakupivliLink: ({ targetProduct, }: Pick<ComposeLinkOptions, 'targetProduct'>) => string;
|
|
9
|
-
export declare const composeLink: ({ targetProduct, ctxProduct, queryParams, edrpou, }: ComposeLinkOptions) => string;
|
|
10
|
+
export declare const composeLink: ({ targetProduct, ctxProduct, queryParams, edrpou, urls, }: ComposeLinkOptions) => string;
|
|
10
11
|
export {};
|
|
@@ -7,6 +7,7 @@ export interface ProductLinkProps {
|
|
|
7
7
|
queryParams?: Record<string, string>;
|
|
8
8
|
onLinkClick?: (product: AllProducts, event: React.MouseEvent) => void;
|
|
9
9
|
overrideHint?: (product: AllProducts) => string;
|
|
10
|
+
urls?: Partial<Record<AllProducts, string>>;
|
|
10
11
|
}
|
|
11
12
|
declare const ProductLink: React.FC<ProductLinkProps>;
|
|
12
13
|
export default ProductLink;
|
|
@@ -4,7 +4,8 @@ interface ComposeLinkOptions {
|
|
|
4
4
|
ctxProduct: string;
|
|
5
5
|
targetProduct: AllProducts;
|
|
6
6
|
queryParams?: Record<string, string>;
|
|
7
|
+
urls?: Partial<Record<AllProducts, string>>;
|
|
7
8
|
}
|
|
8
9
|
export declare const composeZakupivliLink: ({ targetProduct, }: Pick<ComposeLinkOptions, 'targetProduct'>) => string;
|
|
9
|
-
export declare const composeLink: ({ targetProduct, ctxProduct, queryParams, edrpou, }: ComposeLinkOptions) => string;
|
|
10
|
+
export declare const composeLink: ({ targetProduct, ctxProduct, queryParams, edrpou, urls, }: ComposeLinkOptions) => string;
|
|
10
11
|
export {};
|
|
@@ -12561,11 +12561,11 @@ var composeZakupivliLink = function (_a) {
|
|
|
12561
12561
|
return link.href;
|
|
12562
12562
|
};
|
|
12563
12563
|
var composeLink = function (_a) {
|
|
12564
|
-
var targetProduct = _a.targetProduct, ctxProduct = _a.ctxProduct, queryParams = _a.queryParams, edrpou = _a.edrpou;
|
|
12564
|
+
var targetProduct = _a.targetProduct, ctxProduct = _a.ctxProduct, queryParams = _a.queryParams, edrpou = _a.edrpou, urls = _a.urls;
|
|
12565
12565
|
if (zakupivliProductsList.includes(targetProduct)) {
|
|
12566
12566
|
return composeZakupivliLink({ targetProduct: targetProduct });
|
|
12567
12567
|
}
|
|
12568
|
-
var baseUrl = hrefMap[targetProduct];
|
|
12568
|
+
var baseUrl = __assign(__assign({}, hrefMap), urls)[targetProduct];
|
|
12569
12569
|
var link = new URL(baseUrl);
|
|
12570
12570
|
if (edrpou) {
|
|
12571
12571
|
link.searchParams.set('edrpou', edrpou);
|
|
@@ -12582,14 +12582,15 @@ var composeLink = function (_a) {
|
|
|
12582
12582
|
};
|
|
12583
12583
|
|
|
12584
12584
|
var ProductLink = function (_a) {
|
|
12585
|
-
var onLinkClick = _a.onLinkClick, queryParams = _a.queryParams, product = _a.product, ctxProduct = _a.ctxProduct, edrpou = _a.edrpou, overrideHint = _a.overrideHint;
|
|
12585
|
+
var onLinkClick = _a.onLinkClick, queryParams = _a.queryParams, product = _a.product, ctxProduct = _a.ctxProduct, edrpou = _a.edrpou, overrideHint = _a.overrideHint, _b = _a.urls, urls = _b === void 0 ? {} : _b;
|
|
12586
12586
|
var href = composeLink({
|
|
12587
12587
|
ctxProduct: ctxProduct,
|
|
12588
12588
|
edrpou: edrpou,
|
|
12589
12589
|
targetProduct: product,
|
|
12590
12590
|
queryParams: queryParams,
|
|
12591
|
+
urls: urls,
|
|
12591
12592
|
});
|
|
12592
|
-
return (React$1.createElement(BlackTooltip, { title: (overrideHint === null || overrideHint === void 0 ? void 0 : overrideHint(product)) || tooltipHintMap[product] },
|
|
12593
|
+
return (React$1.createElement(BlackTooltip, { disableInteractive: true, title: (overrideHint === null || overrideHint === void 0 ? void 0 : overrideHint(product)) || tooltipHintMap[product] },
|
|
12593
12594
|
React$1.createElement("a", { className: "vchasno-ui-ProjectsPopover__box", href: href, target: "_blank", rel: "noreferrer", onClick: function (event) { return onLinkClick === null || onLinkClick === void 0 ? void 0 : onLinkClick(product, event); } },
|
|
12594
12595
|
isZakupivliProduct(product) && iconMap[product],
|
|
12595
12596
|
isVchasnoProduct(product) && (React$1.createElement(React$1.Fragment, null,
|
|
@@ -12631,7 +12632,7 @@ var getIsProductWithoutSite = function (item) {
|
|
|
12631
12632
|
return vchasnoProductsWithoutSiteList.some(function (product) { return product === item; });
|
|
12632
12633
|
};
|
|
12633
12634
|
var ProjectsPopover = function (_a) {
|
|
12634
|
-
var _b = _a.vchasnoTitle, vchasnoTitle = _b === void 0 ? 'Сервіси Вчасно:' : _b, className = _a.className, _c = _a.zakupivliTitle, zakupivliTitle = _c === void 0 ? 'Сервіси Закупівлі:' : _c, product = _a.product, _d = _a.hideProduct, hideProduct = _d === void 0 ? function () { return false; } : _d, edrpou = _a.edrpou, onLinkClick = _a.onLinkClick, queryParams = _a.queryParams, overrideHint = _a.overrideHint;
|
|
12635
|
+
var _b = _a.vchasnoTitle, vchasnoTitle = _b === void 0 ? 'Сервіси Вчасно:' : _b, className = _a.className, _c = _a.zakupivliTitle, zakupivliTitle = _c === void 0 ? 'Сервіси Закупівлі:' : _c, product = _a.product, _d = _a.hideProduct, hideProduct = _d === void 0 ? function () { return false; } : _d, edrpou = _a.edrpou, onLinkClick = _a.onLinkClick, queryParams = _a.queryParams, overrideHint = _a.overrideHint, urls = _a.urls;
|
|
12635
12636
|
var displayVchasnoProducts = vchasnoProductsList
|
|
12636
12637
|
.filter(function (item) { return item !== product; })
|
|
12637
12638
|
.filter(function (item) { return !getIsProductWithoutSite(item); })
|
|
@@ -12643,12 +12644,12 @@ var ProjectsPopover = function (_a) {
|
|
|
12643
12644
|
display: displayVchasnoProducts.length ? 'flex' : 'none',
|
|
12644
12645
|
} },
|
|
12645
12646
|
React$1.createElement("h3", { className: "vchasno-ui-ProjectsPopover__title" }, vchasnoTitle),
|
|
12646
|
-
displayVchasnoProducts.map(function (key) { return (React$1.createElement(ProductLink, { overrideHint: overrideHint, queryParams: queryParams, onLinkClick: onLinkClick, edrpou: edrpou, ctxProduct: product, key: key, product: key })); })),
|
|
12647
|
+
displayVchasnoProducts.map(function (key) { return (React$1.createElement(ProductLink, { urls: urls, overrideHint: overrideHint, queryParams: queryParams, onLinkClick: onLinkClick, edrpou: edrpou, ctxProduct: product, key: key, product: key })); })),
|
|
12647
12648
|
React$1.createElement("div", { className: "vchasno-ui-ProjectsPopover__products", style: {
|
|
12648
12649
|
display: displayZakupivliProducts.length ? 'flex' : 'none',
|
|
12649
12650
|
} },
|
|
12650
12651
|
React$1.createElement("h3", { className: "vchasno-ui-ProjectsPopover__title" }, zakupivliTitle),
|
|
12651
|
-
displayZakupivliProducts.map(function (key) { return (React$1.createElement(ProductLink, { overrideHint: overrideHint, onLinkClick: onLinkClick, queryParams: queryParams, edrpou: edrpou, ctxProduct: product, key: key, product: key })); })),
|
|
12652
|
+
displayZakupivliProducts.map(function (key) { return (React$1.createElement(ProductLink, { urls: urls, overrideHint: overrideHint, onLinkClick: onLinkClick, queryParams: queryParams, edrpou: edrpou, ctxProduct: product, key: key, product: key })); })),
|
|
12652
12653
|
React$1.createElement("footer", { className: "vchasno-ui-ProjectsPopover__footer" },
|
|
12653
12654
|
"\u0413\u0440\u0443\u043F\u0430 \u043A\u043E\u043C\u043F\u0430\u043D\u0456\u0439\u00A0",
|
|
12654
12655
|
React$1.createElement("a", { target: "_blank", rel: "noreferrer", href: "https://tabularasa.buzz/" }, "Tabula Rasa"),
|