@vchasno/ui-kit 0.2.16 → 0.2.17

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.
@@ -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 {};
@@ -95,19 +95,13 @@ function toPropertyKey(t) {
95
95
  return "symbol" == _typeof(i) ? i : i + "";
96
96
  }
97
97
 
98
- function _defineProperty(obj, key, value) {
99
- key = toPropertyKey(key);
100
- if (key in obj) {
101
- Object.defineProperty(obj, key, {
102
- value: value,
103
- enumerable: true,
104
- configurable: true,
105
- writable: true
106
- });
107
- } else {
108
- obj[key] = value;
109
- }
110
- return obj;
98
+ function _defineProperty(e, r, t) {
99
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
100
+ value: t,
101
+ enumerable: !0,
102
+ configurable: !0,
103
+ writable: !0
104
+ }) : e[r] = t, e;
111
105
  }
112
106
 
113
107
  function ownKeys(e, r) {
@@ -132,8 +126,8 @@ function _objectSpread2(e) {
132
126
  return e;
133
127
  }
134
128
 
135
- function _arrayWithHoles(arr) {
136
- if (Array.isArray(arr)) return arr;
129
+ function _arrayWithHoles(r) {
130
+ if (Array.isArray(r)) return r;
137
131
  }
138
132
 
139
133
  function _iterableToArrayLimit(r, l) {
@@ -164,55 +158,48 @@ function _iterableToArrayLimit(r, l) {
164
158
  }
165
159
  }
166
160
 
167
- function _arrayLikeToArray(arr, len) {
168
- if (len == null || len > arr.length) len = arr.length;
169
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
170
- return arr2;
161
+ function _arrayLikeToArray(r, a) {
162
+ (null == a || a > r.length) && (a = r.length);
163
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
164
+ return n;
171
165
  }
172
166
 
173
- function _unsupportedIterableToArray(o, minLen) {
174
- if (!o) return;
175
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
176
- var n = Object.prototype.toString.call(o).slice(8, -1);
177
- if (n === "Object" && o.constructor) n = o.constructor.name;
178
- if (n === "Map" || n === "Set") return Array.from(o);
179
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
167
+ function _unsupportedIterableToArray(r, a) {
168
+ if (r) {
169
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
170
+ var t = {}.toString.call(r).slice(8, -1);
171
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
172
+ }
180
173
  }
181
174
 
182
175
  function _nonIterableRest() {
183
176
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
184
177
  }
185
178
 
186
- function _slicedToArray(arr, i) {
187
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
179
+ function _slicedToArray(r, e) {
180
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
188
181
  }
189
182
 
190
- function _objectWithoutPropertiesLoose(source, excluded) {
191
- if (source == null) return {};
192
- var target = {};
193
- for (var key in source) {
194
- if (Object.prototype.hasOwnProperty.call(source, key)) {
195
- if (excluded.indexOf(key) >= 0) continue;
196
- target[key] = source[key];
197
- }
183
+ function _objectWithoutPropertiesLoose(r, e) {
184
+ if (null == r) return {};
185
+ var t = {};
186
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
187
+ if (e.indexOf(n) >= 0) continue;
188
+ t[n] = r[n];
198
189
  }
199
- return target;
190
+ return t;
200
191
  }
201
192
 
202
- function _objectWithoutProperties(source, excluded) {
203
- if (source == null) return {};
204
- var target = _objectWithoutPropertiesLoose(source, excluded);
205
- var key, i;
193
+ function _objectWithoutProperties(e, t) {
194
+ if (null == e) return {};
195
+ var o,
196
+ r,
197
+ i = _objectWithoutPropertiesLoose(e, t);
206
198
  if (Object.getOwnPropertySymbols) {
207
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
208
- for (i = 0; i < sourceSymbolKeys.length; i++) {
209
- key = sourceSymbolKeys[i];
210
- if (excluded.indexOf(key) >= 0) continue;
211
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
212
- target[key] = source[key];
213
- }
199
+ var n = Object.getOwnPropertySymbols(e);
200
+ for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
214
201
  }
215
- return target;
202
+ return i;
216
203
  }
217
204
 
218
205
  var _excluded$6 = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
@@ -283,74 +270,54 @@ function useStateManager(_ref) {
283
270
  }
284
271
 
285
272
  function _extends() {
286
- _extends = Object.assign ? Object.assign.bind() : function (target) {
287
- for (var i = 1; i < arguments.length; i++) {
288
- var source = arguments[i];
289
- for (var key in source) {
290
- if (Object.prototype.hasOwnProperty.call(source, key)) {
291
- target[key] = source[key];
292
- }
293
- }
273
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
274
+ for (var e = 1; e < arguments.length; e++) {
275
+ var t = arguments[e];
276
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
294
277
  }
295
- return target;
296
- };
297
- return _extends.apply(this, arguments);
278
+ return n;
279
+ }, _extends.apply(null, arguments);
298
280
  }
299
281
 
300
- function _classCallCheck(instance, Constructor) {
301
- if (!(instance instanceof Constructor)) {
302
- throw new TypeError("Cannot call a class as a function");
303
- }
282
+ function _classCallCheck(a, n) {
283
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
304
284
  }
305
285
 
306
- function _defineProperties(target, props) {
307
- for (var i = 0; i < props.length; i++) {
308
- var descriptor = props[i];
309
- descriptor.enumerable = descriptor.enumerable || false;
310
- descriptor.configurable = true;
311
- if ("value" in descriptor) descriptor.writable = true;
312
- Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
286
+ function _defineProperties(e, r) {
287
+ for (var t = 0; t < r.length; t++) {
288
+ var o = r[t];
289
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
313
290
  }
314
291
  }
315
- function _createClass(Constructor, protoProps, staticProps) {
316
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
317
- if (staticProps) _defineProperties(Constructor, staticProps);
318
- Object.defineProperty(Constructor, "prototype", {
319
- writable: false
320
- });
321
- return Constructor;
292
+ function _createClass(e, r, t) {
293
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
294
+ writable: !1
295
+ }), e;
322
296
  }
323
297
 
324
- function _setPrototypeOf(o, p) {
325
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
326
- o.__proto__ = p;
327
- return o;
328
- };
329
- return _setPrototypeOf(o, p);
298
+ function _setPrototypeOf(t, e) {
299
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
300
+ return t.__proto__ = e, t;
301
+ }, _setPrototypeOf(t, e);
330
302
  }
331
303
 
332
- function _inherits(subClass, superClass) {
333
- if (typeof superClass !== "function" && superClass !== null) {
334
- throw new TypeError("Super expression must either be null or a function");
335
- }
336
- subClass.prototype = Object.create(superClass && superClass.prototype, {
304
+ function _inherits(t, e) {
305
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
306
+ t.prototype = Object.create(e && e.prototype, {
337
307
  constructor: {
338
- value: subClass,
339
- writable: true,
340
- configurable: true
308
+ value: t,
309
+ writable: !0,
310
+ configurable: !0
341
311
  }
342
- });
343
- Object.defineProperty(subClass, "prototype", {
344
- writable: false
345
- });
346
- if (superClass) _setPrototypeOf(subClass, superClass);
312
+ }), Object.defineProperty(t, "prototype", {
313
+ writable: !1
314
+ }), e && _setPrototypeOf(t, e);
347
315
  }
348
316
 
349
- function _getPrototypeOf(o) {
350
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
351
- return o.__proto__ || Object.getPrototypeOf(o);
352
- };
353
- return _getPrototypeOf(o);
317
+ function _getPrototypeOf(t) {
318
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
319
+ return t.__proto__ || Object.getPrototypeOf(t);
320
+ }, _getPrototypeOf(t);
354
321
  }
355
322
 
356
323
  function _isNativeReflectConstruct() {
@@ -362,51 +329,44 @@ function _isNativeReflectConstruct() {
362
329
  })();
363
330
  }
364
331
 
365
- function _assertThisInitialized(self) {
366
- if (self === void 0) {
367
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
368
- }
369
- return self;
332
+ function _assertThisInitialized(e) {
333
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
334
+ return e;
370
335
  }
371
336
 
372
- function _possibleConstructorReturn(self, call) {
373
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
374
- return call;
375
- } else if (call !== void 0) {
376
- throw new TypeError("Derived constructors may only return object or undefined");
377
- }
378
- return _assertThisInitialized(self);
337
+ function _possibleConstructorReturn(t, e) {
338
+ if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
339
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
340
+ return _assertThisInitialized(t);
379
341
  }
380
342
 
381
- function _createSuper(Derived) {
382
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
383
- return function _createSuperInternal() {
384
- var Super = _getPrototypeOf(Derived),
385
- result;
386
- if (hasNativeReflectConstruct) {
387
- var NewTarget = _getPrototypeOf(this).constructor;
388
- result = Reflect.construct(Super, arguments, NewTarget);
389
- } else {
390
- result = Super.apply(this, arguments);
391
- }
392
- return _possibleConstructorReturn(this, result);
343
+ function _createSuper(t) {
344
+ var r = _isNativeReflectConstruct();
345
+ return function () {
346
+ var e,
347
+ o = _getPrototypeOf(t);
348
+ if (r) {
349
+ var s = _getPrototypeOf(this).constructor;
350
+ e = Reflect.construct(o, arguments, s);
351
+ } else e = o.apply(this, arguments);
352
+ return _possibleConstructorReturn(this, e);
393
353
  };
394
354
  }
395
355
 
396
- function _arrayWithoutHoles(arr) {
397
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
356
+ function _arrayWithoutHoles(r) {
357
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
398
358
  }
399
359
 
400
- function _iterableToArray(iter) {
401
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
360
+ function _iterableToArray(r) {
361
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
402
362
  }
403
363
 
404
364
  function _nonIterableSpread() {
405
365
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
406
366
  }
407
367
 
408
- function _toConsumableArray(arr) {
409
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
368
+ function _toConsumableArray(r) {
369
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
410
370
  }
411
371
 
412
372
  /*
@@ -3207,13 +3167,10 @@ if (process.env.NODE_ENV !== 'production') {
3207
3167
  }
3208
3168
  }
3209
3169
 
3210
- function _taggedTemplateLiteral(strings, raw) {
3211
- if (!raw) {
3212
- raw = strings.slice(0);
3213
- }
3214
- return Object.freeze(Object.defineProperties(strings, {
3170
+ function _taggedTemplateLiteral(e, t) {
3171
+ return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
3215
3172
  raw: {
3216
- value: Object.freeze(raw)
3173
+ value: Object.freeze(t)
3217
3174
  }
3218
3175
  }));
3219
3176
  }