@crystaldesign/content-box 24.11.0-beta.36 → 24.11.0-beta.37

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.
@@ -1,4 +1,4 @@
1
- import { s as styleInject, a as usePdpState, S as STATES, f as footerWrapper, p as posFixed, b as posAbsolute, c as button, d as buttonCenter } from './index-fb24a900.js';
1
+ import { s as styleInject, a as usePdpState, S as STATES, f as footerWrapper, p as posFixed, b as posAbsolute, c as button, d as buttonCenter } from './index-25d6a86f.js';
2
2
  import classNames from 'classnames';
3
3
  import { observer } from 'mobx-react-lite';
4
4
  import 'react';
@@ -1,11 +1,11 @@
1
1
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
2
2
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
3
3
  import _regeneratorRuntime from '@babel/runtime/regenerator';
4
- import { s as styleInject } from './index-fb24a900.js';
4
+ import { s as styleInject } from './index-25d6a86f.js';
5
5
  import { getLogger, useTranslation, useDivaCore } from '@crystaldesign/diva-core';
6
6
  import React, { useMemo, useState, useEffect } from 'react';
7
7
  import classNames from 'classnames';
8
- import ArViewer from './index-be5cc71d.js';
8
+ import ArViewer from './index-c18dafa0.js';
9
9
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
10
  import '@babel/runtime/helpers/defineProperty';
11
11
  import 'mobx-react-lite';
@@ -65,7 +65,7 @@ var MediaViewer = function MediaViewer(_ref) {
65
65
  setMedias(mediasData);
66
66
  }, [mediasData]);
67
67
  useEffect(function () {
68
- if (!keepOldZoomIcons) import('./zoom.module-18ffc3ce.js');
68
+ if (!keepOldZoomIcons) import('./zoom.module-02f69688.js');
69
69
  }, []);
70
70
  useEffect(function () {
71
71
  var _medias$map;
@@ -152,7 +152,7 @@ var MediaViewer = function MediaViewer(_ref) {
152
152
  /****************************Helper functions ****************************************/
153
153
 
154
154
  var loadSirv = /*#__PURE__*/function () {
155
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(components, medias) {
155
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(components, medias) {
156
156
  return _regeneratorRuntime.wrap(function _callee$(_context) {
157
157
  while (1) switch (_context.prev = _context.next) {
158
158
  case 0:
@@ -239,7 +239,7 @@ var getThumb = function getThumb(media) {
239
239
  src: thumb
240
240
  }, thumb)
241
241
  });
242
- } else if ( /*#__PURE__*/React.isValidElement(thumb)) {
242
+ } else if (/*#__PURE__*/React.isValidElement(thumb)) {
243
243
  return thumb = /*#__PURE__*/jsx("smv-thumbnail", {
244
244
  children: thumb
245
245
  });
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
3
3
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
4
  import _regeneratorRuntime from '@babel/runtime/regenerator';
5
- import { s as styleInject, u as useApiInterface, G as Group } from './index-fb24a900.js';
5
+ import { s as styleInject, u as useApiInterface, G as Group } from './index-25d6a86f.js';
6
6
  import { useRef, useEffect, useState } from 'react';
7
7
  import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
8
8
  import { createPortal } from 'react-dom';
@@ -81,7 +81,7 @@ var DragAndDropOptionValues = function DragAndDropOptionValues(_ref) {
81
81
  selectedClassification: currentProuduct[groupKey]
82
82
  });
83
83
  var onDragEnd = /*#__PURE__*/function () {
84
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(result) {
84
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(result) {
85
85
  var dragBackwards, fromGroupIndex, toGropIndex, fromGroupCodex, toGroupCodex, valuesToUpdate, nowWeMove, i, value, codex, repairedVariants, promises, _i, product, patch, _codex2, products;
86
86
  return _regeneratorRuntime.wrap(function _callee$(_context) {
87
87
  while (1) switch (_context.prev = _context.next) {
@@ -278,7 +278,7 @@ var DragAndDrop = function DragAndDrop(_ref) {
278
278
  var _useApiInterface = useApiInterface(),
279
279
  fetchData = _useApiInterface.fetchData;
280
280
  var onDragEnd = /*#__PURE__*/function () {
281
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(result) {
281
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(result) {
282
282
  var dragBackwards, keys, fromGroupCodex, toGroupCodex, groupsNewPos, i, nowWeMove, key, repairedVariants, jsonPatchObject, promises, _i, product, products;
283
283
  return _regeneratorRuntime.wrap(function _callee$(_context) {
284
284
  while (1) switch (_context.prev = _context.next) {
@@ -209,7 +209,7 @@ var _excluded$3 = ["pdpState"];
209
209
  function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
210
210
  function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
211
211
  var Checkpoint = /*#__PURE__*/React.lazy(function () {
212
- return import('./index-3f137977.js');
212
+ return import('./index-9a0ca116.js');
213
213
  });
214
214
  var InfoSlider = function InfoSlider(_ref) {
215
215
  var _pdpState$infoTabs$ma, _pdpState$infoTabs;
@@ -308,7 +308,7 @@ var RotationIcon = function RotationIcon(props) {
308
308
  var _useTranslation = useTranslation(),
309
309
  t = _useTranslation.t;
310
310
  var onClick = /*#__PURE__*/function () {
311
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
311
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
312
312
  return _regeneratorRuntime.wrap(function _callee$(_context) {
313
313
  while (1) switch (_context.prev = _context.next) {
314
314
  case 0:
@@ -420,7 +420,7 @@ function useApiInterface() {
420
420
  basketService = _useDivaCore$state$ap.basketService,
421
421
  jwt = _useDivaCore$state.jwt;
422
422
  var getDataCache = /*#__PURE__*/function () {
423
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(queryString, useWebServiceApi) {
423
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(queryString, useWebServiceApi) {
424
424
  var myQS, data;
425
425
  return _regeneratorRuntime.wrap(function _callee$(_context) {
426
426
  while (1) switch (_context.prev = _context.next) {
@@ -449,7 +449,7 @@ function useApiInterface() {
449
449
  };
450
450
  }();
451
451
  var fetchData = /*#__PURE__*/function () {
452
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(queryString, useWebServiceApi) {
452
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(queryString, useWebServiceApi) {
453
453
  var method,
454
454
  body,
455
455
  url,
@@ -629,7 +629,7 @@ var PdpState = /*#__PURE__*/function () {
629
629
  _defineProperty(this, "fetchData", void 0);
630
630
  _defineProperty(this, "validateIsActive", false);
631
631
  _defineProperty(this, "getProductById", /*#__PURE__*/function () {
632
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(productId, dontUseCache) {
632
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(productId, dontUseCache) {
633
633
  var _productData$;
634
634
  var query, productData, parentId, queryVariants, variants;
635
635
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -717,7 +717,7 @@ var PdpState = /*#__PURE__*/function () {
717
717
  _this.updateProductsState(STATES[oldState], 'deny');
718
718
  });
719
719
  _defineProperty(this, "updateProductsState", /*#__PURE__*/function () {
720
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(statusConfig, type) {
720
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(statusConfig, type) {
721
721
  var _statusConfig$permiss, _STATUSCONFIG$general;
722
722
  var newIndex, permissions, permitted, promises;
723
723
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
@@ -902,7 +902,7 @@ var PdpState = /*#__PURE__*/function () {
902
902
  }, {
903
903
  key: "loadVariants",
904
904
  value: function () {
905
- var _loadVariants = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
905
+ var _loadVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
906
906
  var _this$product7,
907
907
  _orderSet$Favorites,
908
908
  _this2 = this;
@@ -1195,10 +1195,10 @@ var useContentBoxState = function useContentBoxState() {
1195
1195
  function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1196
1196
  function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1197
1197
  var CheckpointFooter = /*#__PURE__*/React.lazy(function () {
1198
- return import('./index-ad7d2af7.js');
1198
+ return import('./index-01492b56.js');
1199
1199
  });
1200
1200
  var FunctionsFooter = /*#__PURE__*/React.lazy(function () {
1201
- return import('./index-a8a61d89.js');
1201
+ return import('./index-9ca9271c.js');
1202
1202
  });
1203
1203
  var Footer = function Footer(_ref) {
1204
1204
  _objectDestructuringEmpty(_ref);
@@ -1296,6 +1296,7 @@ var Footer = function Footer(_ref) {
1296
1296
  })
1297
1297
  })
1298
1298
  }), /*#__PURE__*/jsx("div", {
1299
+ "data-test-id": "to-configurator",
1299
1300
  onClick: onClickCta1,
1300
1301
  className: classNames(button, buttonCenter),
1301
1302
  children: cta1Text !== null && cta1Text !== void 0 ? cta1Text : t('pdp.jump_to_configurator')
@@ -1680,7 +1681,7 @@ var OptionHeader = function OptionHeader(_ref) {
1680
1681
  function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1681
1682
  function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1682
1683
  var DragAndDrop = /*#__PURE__*/React.lazy(function () {
1683
- return import('./index-aabfbe3d.js');
1684
+ return import('./index-1397aa7f.js');
1684
1685
  });
1685
1686
  var VariantFields = function VariantFields(_ref) {
1686
1687
  var variants = _ref.variants,
@@ -1980,6 +1981,7 @@ var GalleryProduct = function GalleryProduct(_ref) {
1980
1981
  return media.functionType === 'ART';
1981
1982
  })) === null || _curProduct$media === void 0 ? void 0 : _curProduct$media.url) !== null && _curProduct$media$fin !== void 0 ? _curProduct$media$fin : curProduct.image) !== null && _ref2 !== void 0 ? _ref2 : curProduct.image2D;
1982
1983
  return /*#__PURE__*/jsxs("div", {
1984
+ "data-test-id": "gallery-product",
1983
1985
  onClick: function onClick() {
1984
1986
  return _onClick(curProduct._id);
1985
1987
  },
@@ -2026,7 +2028,7 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
2026
2028
  function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2027
2029
  var renderItem = function renderItem(item) {
2028
2030
  var usecase = 'renderContextBox';
2029
- if ( /*#__PURE__*/React.isValidElement(item.content)) {
2031
+ if (/*#__PURE__*/React.isValidElement(item.content)) {
2030
2032
  usecase = 'renderJsx';
2031
2033
  }
2032
2034
  switch (usecase) {
@@ -2069,7 +2071,7 @@ var SliderContainer = function SliderContainer(_ref) {
2069
2071
  bulletClass: 'paginationTitle',
2070
2072
  bulletActiveClass: 'paginationTitleSel',
2071
2073
  renderBullet: function renderBullet(index, className) {
2072
- return ReactDOMServer.renderToStaticMarkup( /*#__PURE__*/jsxs("div", {
2074
+ return ReactDOMServer.renderToStaticMarkup(/*#__PURE__*/jsxs("div", {
2073
2075
  className: classNames(className),
2074
2076
  children: [/*#__PURE__*/jsx("div", {
2075
2077
  children: contents[index].title
@@ -2155,10 +2157,10 @@ var CloseButtonContainer = function CloseButtonContainer(_ref) {
2155
2157
  function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2156
2158
  function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2157
2159
  var ArViewer = /*#__PURE__*/React.lazy(function () {
2158
- return import('./index-be5cc71d.js');
2160
+ return import('./index-c18dafa0.js');
2159
2161
  });
2160
2162
  var MediaViewer = /*#__PURE__*/React.lazy(function () {
2161
- return import('./index-87477322.js');
2163
+ return import('./index-09696d12.js');
2162
2164
  });
2163
2165
  var ContentBox$1 = function ContentBox(props) {
2164
2166
  var _useContentBoxState = useContentBoxState(),
@@ -1,4 +1,4 @@
1
- import { s as styleInject, a as usePdpState } from './index-fb24a900.js';
1
+ import { s as styleInject, a as usePdpState } from './index-25d6a86f.js';
2
2
  import { observer } from 'mobx-react-lite';
3
3
  import 'react';
4
4
  import { useTranslation, DivaUtils } from '@crystaldesign/diva-core';
@@ -1,4 +1,4 @@
1
- import { s as styleInject, a as usePdpState, f as footerWrapper, p as posFixed, b as posAbsolute, c as button, e as buttonLeft, d as buttonCenter } from './index-fb24a900.js';
1
+ import { s as styleInject, a as usePdpState, f as footerWrapper, p as posFixed, b as posAbsolute, c as button, e as buttonLeft, d as buttonCenter } from './index-25d6a86f.js';
2
2
  import classNames from 'classnames';
3
3
  import { observer } from 'mobx-react-lite';
4
4
  import 'react';
@@ -1,5 +1,5 @@
1
1
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
- import { s as styleInject } from './index-fb24a900.js';
2
+ import { s as styleInject } from './index-25d6a86f.js';
3
3
  import { useState } from 'react';
4
4
  import { useDivaCore, useTranslation } from '@crystaldesign/diva-core';
5
5
  import QRCode from 'react-qr-code';
@@ -1,5 +1,5 @@
1
1
  import '@babel/runtime/helpers/defineProperty';
2
- export { C as ContentBoxComponent, g as default } from './index-fb24a900.js';
2
+ export { C as ContentBoxComponent, g as default } from './index-25d6a86f.js';
3
3
  import 'react';
4
4
  import 'react/jsx-runtime';
5
5
  import '@babel/runtime/helpers/slicedToArray';
@@ -1,4 +1,4 @@
1
- import { s as styleInject } from './index-fb24a900.js';
1
+ import { s as styleInject } from './index-25d6a86f.js';
2
2
  import '@babel/runtime/helpers/defineProperty';
3
3
  import 'react';
4
4
  import 'react/jsx-runtime';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/GalleryProduct/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAOlD,QAAA,MAAM,cAAc,qHASjB,mBAAmB,gBA6ErB,CAAC;AAMF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/GalleryProduct/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAOlD,QAAA,MAAM,cAAc,qHASjB,mBAAmB,gBAkFrB,CAAC;AAMF,eAAe,cAAc,CAAC"}