@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 {};
@@ -68,18 +68,13 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
68
68
  };
69
69
 
70
70
  function _extends() {
71
- _extends = Object.assign ? Object.assign.bind() : function (target) {
72
- for (var i = 1; i < arguments.length; i++) {
73
- var source = arguments[i];
74
- for (var key in source) {
75
- if (Object.prototype.hasOwnProperty.call(source, key)) {
76
- target[key] = source[key];
77
- }
78
- }
71
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
72
+ for (var e = 1; e < arguments.length; e++) {
73
+ var t = arguments[e];
74
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
79
75
  }
80
- return target;
81
- };
82
- return _extends.apply(this, arguments);
76
+ return n;
77
+ }, _extends.apply(null, arguments);
83
78
  }
84
79
 
85
80
  function _typeof(o) {
@@ -108,19 +103,13 @@ function toPropertyKey(t) {
108
103
  return "symbol" == _typeof(i) ? i : i + "";
109
104
  }
110
105
 
111
- function _defineProperty(obj, key, value) {
112
- key = toPropertyKey(key);
113
- if (key in obj) {
114
- Object.defineProperty(obj, key, {
115
- value: value,
116
- enumerable: true,
117
- configurable: true,
118
- writable: true
119
- });
120
- } else {
121
- obj[key] = value;
122
- }
123
- return obj;
106
+ function _defineProperty(e, r, t) {
107
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
108
+ value: t,
109
+ enumerable: !0,
110
+ configurable: !0,
111
+ writable: !0
112
+ }) : e[r] = t, e;
124
113
  }
125
114
 
126
115
  function ownKeys(e, r) {
@@ -145,60 +134,45 @@ function _objectSpread2(e) {
145
134
  return e;
146
135
  }
147
136
 
148
- function _classCallCheck(instance, Constructor) {
149
- if (!(instance instanceof Constructor)) {
150
- throw new TypeError("Cannot call a class as a function");
151
- }
137
+ function _classCallCheck(a, n) {
138
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
152
139
  }
153
140
 
154
- function _defineProperties(target, props) {
155
- for (var i = 0; i < props.length; i++) {
156
- var descriptor = props[i];
157
- descriptor.enumerable = descriptor.enumerable || false;
158
- descriptor.configurable = true;
159
- if ("value" in descriptor) descriptor.writable = true;
160
- Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
141
+ function _defineProperties(e, r) {
142
+ for (var t = 0; t < r.length; t++) {
143
+ var o = r[t];
144
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
161
145
  }
162
146
  }
163
- function _createClass(Constructor, protoProps, staticProps) {
164
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
165
- if (staticProps) _defineProperties(Constructor, staticProps);
166
- Object.defineProperty(Constructor, "prototype", {
167
- writable: false
168
- });
169
- return Constructor;
147
+ function _createClass(e, r, t) {
148
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
149
+ writable: !1
150
+ }), e;
170
151
  }
171
152
 
172
- function _setPrototypeOf(o, p) {
173
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
174
- o.__proto__ = p;
175
- return o;
176
- };
177
- return _setPrototypeOf(o, p);
153
+ function _setPrototypeOf(t, e) {
154
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
155
+ return t.__proto__ = e, t;
156
+ }, _setPrototypeOf(t, e);
178
157
  }
179
158
 
180
- function _inherits(subClass, superClass) {
181
- if (typeof superClass !== "function" && superClass !== null) {
182
- throw new TypeError("Super expression must either be null or a function");
183
- }
184
- subClass.prototype = Object.create(superClass && superClass.prototype, {
159
+ function _inherits(t, e) {
160
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
161
+ t.prototype = Object.create(e && e.prototype, {
185
162
  constructor: {
186
- value: subClass,
187
- writable: true,
188
- configurable: true
163
+ value: t,
164
+ writable: !0,
165
+ configurable: !0
189
166
  }
190
- });
191
- Object.defineProperty(subClass, "prototype", {
192
- writable: false
193
- });
194
- if (superClass) _setPrototypeOf(subClass, superClass);
167
+ }), Object.defineProperty(t, "prototype", {
168
+ writable: !1
169
+ }), e && _setPrototypeOf(t, e);
195
170
  }
196
171
 
197
- function _getPrototypeOf(o) {
198
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
199
- return o.__proto__ || Object.getPrototypeOf(o);
200
- };
201
- return _getPrototypeOf(o);
172
+ function _getPrototypeOf(t) {
173
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
174
+ return t.__proto__ || Object.getPrototypeOf(t);
175
+ }, _getPrototypeOf(t);
202
176
  }
203
177
 
204
178
  function _isNativeReflectConstruct() {
@@ -210,66 +184,58 @@ function _isNativeReflectConstruct() {
210
184
  })();
211
185
  }
212
186
 
213
- function _assertThisInitialized(self) {
214
- if (self === void 0) {
215
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
216
- }
217
- return self;
187
+ function _assertThisInitialized(e) {
188
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
189
+ return e;
218
190
  }
219
191
 
220
- function _possibleConstructorReturn(self, call) {
221
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
222
- return call;
223
- } else if (call !== void 0) {
224
- throw new TypeError("Derived constructors may only return object or undefined");
225
- }
226
- return _assertThisInitialized(self);
192
+ function _possibleConstructorReturn(t, e) {
193
+ if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
194
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
195
+ return _assertThisInitialized(t);
227
196
  }
228
197
 
229
- function _createSuper(Derived) {
230
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
231
- return function _createSuperInternal() {
232
- var Super = _getPrototypeOf(Derived),
233
- result;
234
- if (hasNativeReflectConstruct) {
235
- var NewTarget = _getPrototypeOf(this).constructor;
236
- result = Reflect.construct(Super, arguments, NewTarget);
237
- } else {
238
- result = Super.apply(this, arguments);
239
- }
240
- return _possibleConstructorReturn(this, result);
198
+ function _createSuper(t) {
199
+ var r = _isNativeReflectConstruct();
200
+ return function () {
201
+ var e,
202
+ o = _getPrototypeOf(t);
203
+ if (r) {
204
+ var s = _getPrototypeOf(this).constructor;
205
+ e = Reflect.construct(o, arguments, s);
206
+ } else e = o.apply(this, arguments);
207
+ return _possibleConstructorReturn(this, e);
241
208
  };
242
209
  }
243
210
 
244
- function _arrayLikeToArray(arr, len) {
245
- if (len == null || len > arr.length) len = arr.length;
246
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
247
- return arr2;
211
+ function _arrayLikeToArray(r, a) {
212
+ (null == a || a > r.length) && (a = r.length);
213
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
214
+ return n;
248
215
  }
249
216
 
250
- function _arrayWithoutHoles(arr) {
251
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
217
+ function _arrayWithoutHoles(r) {
218
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
252
219
  }
253
220
 
254
- function _iterableToArray(iter) {
255
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
221
+ function _iterableToArray(r) {
222
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
256
223
  }
257
224
 
258
- function _unsupportedIterableToArray(o, minLen) {
259
- if (!o) return;
260
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
261
- var n = Object.prototype.toString.call(o).slice(8, -1);
262
- if (n === "Object" && o.constructor) n = o.constructor.name;
263
- if (n === "Map" || n === "Set") return Array.from(o);
264
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
225
+ function _unsupportedIterableToArray(r, a) {
226
+ if (r) {
227
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
228
+ var t = {}.toString.call(r).slice(8, -1);
229
+ 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;
230
+ }
265
231
  }
266
232
 
267
233
  function _nonIterableSpread() {
268
234
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
269
235
  }
270
236
 
271
- function _toConsumableArray(arr) {
272
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
237
+ function _toConsumableArray(r) {
238
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
273
239
  }
274
240
 
275
241
  /*
@@ -3070,8 +3036,8 @@ if (process.env.NODE_ENV !== 'production') {
3070
3036
  }
3071
3037
  }
3072
3038
 
3073
- function _arrayWithHoles(arr) {
3074
- if (Array.isArray(arr)) return arr;
3039
+ function _arrayWithHoles(r) {
3040
+ if (Array.isArray(r)) return r;
3075
3041
  }
3076
3042
 
3077
3043
  function _iterableToArrayLimit(r, l) {
@@ -3106,45 +3072,36 @@ function _nonIterableRest() {
3106
3072
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3107
3073
  }
3108
3074
 
3109
- function _slicedToArray(arr, i) {
3110
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
3075
+ function _slicedToArray(r, e) {
3076
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
3111
3077
  }
3112
3078
 
3113
- function _objectWithoutPropertiesLoose(source, excluded) {
3114
- if (source == null) return {};
3115
- var target = {};
3116
- for (var key in source) {
3117
- if (Object.prototype.hasOwnProperty.call(source, key)) {
3118
- if (excluded.indexOf(key) >= 0) continue;
3119
- target[key] = source[key];
3120
- }
3079
+ function _objectWithoutPropertiesLoose(r, e) {
3080
+ if (null == r) return {};
3081
+ var t = {};
3082
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
3083
+ if (e.indexOf(n) >= 0) continue;
3084
+ t[n] = r[n];
3121
3085
  }
3122
- return target;
3086
+ return t;
3123
3087
  }
3124
3088
 
3125
- function _objectWithoutProperties(source, excluded) {
3126
- if (source == null) return {};
3127
- var target = _objectWithoutPropertiesLoose(source, excluded);
3128
- var key, i;
3089
+ function _objectWithoutProperties(e, t) {
3090
+ if (null == e) return {};
3091
+ var o,
3092
+ r,
3093
+ i = _objectWithoutPropertiesLoose(e, t);
3129
3094
  if (Object.getOwnPropertySymbols) {
3130
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
3131
- for (i = 0; i < sourceSymbolKeys.length; i++) {
3132
- key = sourceSymbolKeys[i];
3133
- if (excluded.indexOf(key) >= 0) continue;
3134
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
3135
- target[key] = source[key];
3136
- }
3095
+ var n = Object.getOwnPropertySymbols(e);
3096
+ for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
3137
3097
  }
3138
- return target;
3098
+ return i;
3139
3099
  }
3140
3100
 
3141
- function _taggedTemplateLiteral(strings, raw) {
3142
- if (!raw) {
3143
- raw = strings.slice(0);
3144
- }
3145
- return Object.freeze(Object.defineProperties(strings, {
3101
+ function _taggedTemplateLiteral(e, t) {
3102
+ return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
3146
3103
  raw: {
3147
- value: Object.freeze(raw)
3104
+ value: Object.freeze(t)
3148
3105
  }
3149
3106
  }));
3150
3107
  }