@vchasno/ui-kit 0.2.16 → 0.2.18
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/Datepicker/types/components/ProjectsPopover/ProductLink.d.ts +1 -0
- package/dist/Datepicker/types/components/ProjectsPopover/utils.d.ts +2 -1
- package/dist/ProjectsPopover/index.cjs.js +47 -66
- package/dist/ProjectsPopover/index.cjs.js.map +1 -1
- package/dist/ProjectsPopover/index.d.ts +1 -0
- package/dist/ProjectsPopover/index.js +47 -66
- 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/index.cjs.js +95 -138
- package/dist/Select/index.cjs.js.map +1 -1
- package/dist/Select/index.js +95 -138
- package/dist/Select/index.js.map +1 -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/index.cjs.js +95 -138
- package/dist/SelectCreatable/index.cjs.js.map +1 -1
- package/dist/SelectCreatable/index.js +95 -138
- package/dist/SelectCreatable/index.js.map +1 -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/index.js +39 -59
- package/dist/index.js.map +1 -1
- package/dist/types/components/ProjectsPopover/ProductLink.d.ts +1 -0
- package/dist/types/components/ProjectsPopover/utils.d.ts +2 -1
- package/package.json +3 -3
|
@@ -13,6 +13,7 @@ interface ProductLinkProps {
|
|
|
13
13
|
queryParams?: Record<string, string>;
|
|
14
14
|
onLinkClick?: (product: AllProducts, event: React.MouseEvent) => void;
|
|
15
15
|
overrideHint?: (product: AllProducts) => string;
|
|
16
|
+
urls?: Partial<Record<AllProducts, string>>;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
interface ProjectsPopoverProps extends Omit<ProductLinkProps, 'product' | 'ctxProduct'> {
|
|
@@ -158,31 +158,24 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
158
158
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
159
159
|
};
|
|
160
160
|
|
|
161
|
-
function _objectWithoutPropertiesLoose(
|
|
162
|
-
if (
|
|
163
|
-
var
|
|
164
|
-
for (var
|
|
165
|
-
if (
|
|
166
|
-
|
|
167
|
-
target[key] = source[key];
|
|
168
|
-
}
|
|
161
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
162
|
+
if (null == r) return {};
|
|
163
|
+
var t = {};
|
|
164
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
165
|
+
if (e.includes(n)) continue;
|
|
166
|
+
t[n] = r[n];
|
|
169
167
|
}
|
|
170
|
-
return
|
|
168
|
+
return t;
|
|
171
169
|
}
|
|
172
170
|
|
|
173
171
|
function _extends$1() {
|
|
174
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (
|
|
175
|
-
for (var
|
|
176
|
-
var
|
|
177
|
-
for (var
|
|
178
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
179
|
-
target[key] = source[key];
|
|
180
|
-
}
|
|
181
|
-
}
|
|
172
|
+
return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
|
|
173
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
174
|
+
var t = arguments[e];
|
|
175
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
182
176
|
}
|
|
183
|
-
return
|
|
184
|
-
};
|
|
185
|
-
return _extends$1.apply(this, arguments);
|
|
177
|
+
return n;
|
|
178
|
+
}, _extends$1.apply(null, arguments);
|
|
186
179
|
}
|
|
187
180
|
|
|
188
181
|
var propTypes = {exports: {}};
|
|
@@ -1590,11 +1583,9 @@ function deepmerge$1(target, source, options = {
|
|
|
1590
1583
|
const output = options.clone ? _extends$1({}, target) : target;
|
|
1591
1584
|
if (isPlainObject(target) && isPlainObject(source)) {
|
|
1592
1585
|
Object.keys(source).forEach(key => {
|
|
1586
|
+
if (isPlainObject(source[key]) &&
|
|
1593
1587
|
// Avoid prototype pollution
|
|
1594
|
-
|
|
1595
|
-
return;
|
|
1596
|
-
}
|
|
1597
|
-
if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
|
|
1588
|
+
Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
|
|
1598
1589
|
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
|
|
1599
1590
|
output[key] = deepmerge$1(target[key], source[key], options);
|
|
1600
1591
|
} else if (options.clone) {
|
|
@@ -2098,7 +2089,7 @@ function useControlled({
|
|
|
2098
2089
|
current: defaultValue
|
|
2099
2090
|
} = React$1.useRef(defaultProp);
|
|
2100
2091
|
React$1.useEffect(() => {
|
|
2101
|
-
if (!isControlled && defaultValue
|
|
2092
|
+
if (!isControlled && !Object.is(defaultValue, defaultProp)) {
|
|
2102
2093
|
console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\n'));
|
|
2103
2094
|
}
|
|
2104
2095
|
}, [JSON.stringify(defaultProp)]);
|
|
@@ -2527,9 +2518,9 @@ var colorManipulator = {};
|
|
|
2527
2518
|
var interopRequireDefault = {exports: {}};
|
|
2528
2519
|
|
|
2529
2520
|
(function (module) {
|
|
2530
|
-
function _interopRequireDefault(
|
|
2531
|
-
return
|
|
2532
|
-
"default":
|
|
2521
|
+
function _interopRequireDefault(e) {
|
|
2522
|
+
return e && e.__esModule ? e : {
|
|
2523
|
+
"default": e
|
|
2533
2524
|
};
|
|
2534
2525
|
}
|
|
2535
2526
|
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
@@ -2933,18 +2924,13 @@ function require_extends () {
|
|
|
2933
2924
|
hasRequired_extends = 1;
|
|
2934
2925
|
(function (module) {
|
|
2935
2926
|
function _extends() {
|
|
2936
|
-
module.exports = _extends = Object.assign ? Object.assign.bind() : function (
|
|
2937
|
-
for (var
|
|
2938
|
-
var
|
|
2939
|
-
for (var
|
|
2940
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2941
|
-
target[key] = source[key];
|
|
2942
|
-
}
|
|
2943
|
-
}
|
|
2927
|
+
return (module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
2928
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
2929
|
+
var t = arguments[e];
|
|
2930
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
2944
2931
|
}
|
|
2945
|
-
return
|
|
2946
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
2947
|
-
return _extends.apply(this, arguments);
|
|
2932
|
+
return n;
|
|
2933
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _extends.apply(null, arguments);
|
|
2948
2934
|
}
|
|
2949
2935
|
module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
2950
2936
|
} (_extends));
|
|
@@ -2959,16 +2945,14 @@ function requireObjectWithoutPropertiesLoose () {
|
|
|
2959
2945
|
if (hasRequiredObjectWithoutPropertiesLoose) return objectWithoutPropertiesLoose.exports;
|
|
2960
2946
|
hasRequiredObjectWithoutPropertiesLoose = 1;
|
|
2961
2947
|
(function (module) {
|
|
2962
|
-
function _objectWithoutPropertiesLoose(
|
|
2963
|
-
if (
|
|
2964
|
-
var
|
|
2965
|
-
for (var
|
|
2966
|
-
if (
|
|
2967
|
-
|
|
2968
|
-
target[key] = source[key];
|
|
2969
|
-
}
|
|
2948
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
2949
|
+
if (null == r) return {};
|
|
2950
|
+
var t = {};
|
|
2951
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
2952
|
+
if (e.includes(n)) continue;
|
|
2953
|
+
t[n] = r[n];
|
|
2970
2954
|
}
|
|
2971
|
-
return
|
|
2955
|
+
return t;
|
|
2972
2956
|
}
|
|
2973
2957
|
module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
2974
2958
|
} (objectWithoutPropertiesLoose));
|
|
@@ -5934,7 +5918,7 @@ process.env.NODE_ENV !== "production" ? GlobalStyles.propTypes = {
|
|
|
5934
5918
|
} : void 0;
|
|
5935
5919
|
|
|
5936
5920
|
/**
|
|
5937
|
-
* @mui/styled-engine v5.
|
|
5921
|
+
* @mui/styled-engine v5.16.1
|
|
5938
5922
|
*
|
|
5939
5923
|
* @license MIT
|
|
5940
5924
|
* This source code is licensed under the MIT license found in the
|
|
@@ -8247,18 +8231,14 @@ function useThemeProps({
|
|
|
8247
8231
|
});
|
|
8248
8232
|
}
|
|
8249
8233
|
|
|
8250
|
-
function _setPrototypeOf(
|
|
8251
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
};
|
|
8255
|
-
return _setPrototypeOf(o, p);
|
|
8234
|
+
function _setPrototypeOf(t, e) {
|
|
8235
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
8236
|
+
return t.__proto__ = e, t;
|
|
8237
|
+
}, _setPrototypeOf(t, e);
|
|
8256
8238
|
}
|
|
8257
8239
|
|
|
8258
|
-
function _inheritsLoose(
|
|
8259
|
-
|
|
8260
|
-
subClass.prototype.constructor = subClass;
|
|
8261
|
-
_setPrototypeOf(subClass, superClass);
|
|
8240
|
+
function _inheritsLoose(t, o) {
|
|
8241
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
8262
8242
|
}
|
|
8263
8243
|
|
|
8264
8244
|
var config = {
|
|
@@ -12536,11 +12516,11 @@ var composeZakupivliLink = function (_a) {
|
|
|
12536
12516
|
return link.href;
|
|
12537
12517
|
};
|
|
12538
12518
|
var composeLink = function (_a) {
|
|
12539
|
-
var targetProduct = _a.targetProduct, ctxProduct = _a.ctxProduct, queryParams = _a.queryParams, edrpou = _a.edrpou;
|
|
12519
|
+
var targetProduct = _a.targetProduct, ctxProduct = _a.ctxProduct, queryParams = _a.queryParams, edrpou = _a.edrpou, urls = _a.urls;
|
|
12540
12520
|
if (zakupivliProductsList.includes(targetProduct)) {
|
|
12541
12521
|
return composeZakupivliLink({ targetProduct: targetProduct });
|
|
12542
12522
|
}
|
|
12543
|
-
var baseUrl = hrefMap[targetProduct];
|
|
12523
|
+
var baseUrl = __assign(__assign({}, hrefMap), urls)[targetProduct];
|
|
12544
12524
|
var link = new URL(baseUrl);
|
|
12545
12525
|
if (edrpou) {
|
|
12546
12526
|
link.searchParams.set('edrpou', edrpou);
|
|
@@ -12557,14 +12537,15 @@ var composeLink = function (_a) {
|
|
|
12557
12537
|
};
|
|
12558
12538
|
|
|
12559
12539
|
var ProductLink = function (_a) {
|
|
12560
|
-
var onLinkClick = _a.onLinkClick, queryParams = _a.queryParams, product = _a.product, ctxProduct = _a.ctxProduct, edrpou = _a.edrpou, overrideHint = _a.overrideHint;
|
|
12540
|
+
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;
|
|
12561
12541
|
var href = composeLink({
|
|
12562
12542
|
ctxProduct: ctxProduct,
|
|
12563
12543
|
edrpou: edrpou,
|
|
12564
12544
|
targetProduct: product,
|
|
12565
12545
|
queryParams: queryParams,
|
|
12546
|
+
urls: urls,
|
|
12566
12547
|
});
|
|
12567
|
-
return (React__default.createElement(BlackTooltip, { title: (overrideHint === null || overrideHint === void 0 ? void 0 : overrideHint(product)) || tooltipHintMap[product] },
|
|
12548
|
+
return (React__default.createElement(BlackTooltip, { disableInteractive: true, title: (overrideHint === null || overrideHint === void 0 ? void 0 : overrideHint(product)) || tooltipHintMap[product] },
|
|
12568
12549
|
React__default.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); } },
|
|
12569
12550
|
isZakupivliProduct(product) && iconMap[product],
|
|
12570
12551
|
isVchasnoProduct(product) && (React__default.createElement(React__default.Fragment, null,
|
|
@@ -12603,7 +12584,7 @@ var css_248z = ".vchasno-ui-ProjectsPopover {\n display: inline-block;\n w
|
|
|
12603
12584
|
styleInject(css_248z);
|
|
12604
12585
|
|
|
12605
12586
|
var ProjectsPopover = function (_a) {
|
|
12606
|
-
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;
|
|
12587
|
+
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;
|
|
12607
12588
|
var displayVchasnoProducts = vchasnoProductsList
|
|
12608
12589
|
.filter(function (item) { return item !== product; })
|
|
12609
12590
|
.filter(function (item) { return !hideProduct(item); });
|
|
@@ -12614,12 +12595,12 @@ var ProjectsPopover = function (_a) {
|
|
|
12614
12595
|
display: displayVchasnoProducts.length ? 'flex' : 'none',
|
|
12615
12596
|
} },
|
|
12616
12597
|
React__default.createElement("h3", { className: "vchasno-ui-ProjectsPopover__title" }, vchasnoTitle),
|
|
12617
|
-
displayVchasnoProducts.map(function (key) { return (React__default.createElement(ProductLink, { overrideHint: overrideHint, queryParams: queryParams, onLinkClick: onLinkClick, edrpou: edrpou, ctxProduct: product, key: key, product: key })); })),
|
|
12598
|
+
displayVchasnoProducts.map(function (key) { return (React__default.createElement(ProductLink, { urls: urls, overrideHint: overrideHint, queryParams: queryParams, onLinkClick: onLinkClick, edrpou: edrpou, ctxProduct: product, key: key, product: key })); })),
|
|
12618
12599
|
React__default.createElement("div", { className: "vchasno-ui-ProjectsPopover__products", style: {
|
|
12619
12600
|
display: displayZakupivliProducts.length ? 'flex' : 'none',
|
|
12620
12601
|
} },
|
|
12621
12602
|
React__default.createElement("h3", { className: "vchasno-ui-ProjectsPopover__title" }, zakupivliTitle),
|
|
12622
|
-
displayZakupivliProducts.map(function (key) { return (React__default.createElement(ProductLink, { overrideHint: overrideHint, onLinkClick: onLinkClick, queryParams: queryParams, edrpou: edrpou, ctxProduct: product, key: key, product: key })); })),
|
|
12603
|
+
displayZakupivliProducts.map(function (key) { return (React__default.createElement(ProductLink, { urls: urls, overrideHint: overrideHint, onLinkClick: onLinkClick, queryParams: queryParams, edrpou: edrpou, ctxProduct: product, key: key, product: key })); })),
|
|
12623
12604
|
React__default.createElement("footer", { className: "vchasno-ui-ProjectsPopover__footer" },
|
|
12624
12605
|
"\u0413\u0440\u0443\u043F\u0430 \u043A\u043E\u043C\u043F\u0430\u043D\u0456\u0439\u00A0",
|
|
12625
12606
|
React__default.createElement("a", { target: "_blank", rel: "noreferrer", href: "https://tabularasa.buzz/" }, "Tabula Rasa"),
|