@crystaldesign/diva-core 26.5.0-beta.46 → 26.5.0-beta.48

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, u as useDivaCoreContext } from './index-bb670cad.js';
1
+ import { s as styleInject, u as useDivaCoreContext } from './index-3eb0eec0.js';
2
2
  import { useState, useEffect, useCallback } from 'react';
3
3
  import { observer } from 'mobx-react-lite';
4
4
  import Button from '@mui/material/Button';
@@ -45,7 +45,7 @@ import { actions } from '@storybook/addon-actions';
45
45
  import * as Styles from '@mui/styles';
46
46
 
47
47
  (function() {
48
- const env = {"STAGE":"production","VERSION":"26.5.0-beta.46"};
48
+ const env = {"STAGE":"production","VERSION":"26.5.0-beta.48"};
49
49
  try {
50
50
  if (process) {
51
51
  process.env = Object.assign({}, process.env);
@@ -8546,48 +8546,51 @@ var AIHandler = /*#__PURE__*/function () {
8546
8546
  }, {
8547
8547
  key: "getPrompts",
8548
8548
  value: function () {
8549
- var _getPrompts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
8549
+ var _getPrompts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
8550
8550
  var url, res, resData;
8551
8551
  return _regeneratorRuntime.wrap(function _callee$(_context) {
8552
8552
  while (1) switch (_context.prev = _context.next) {
8553
8553
  case 0:
8554
8554
  url = new URL(this.aiService + '/room-renderings');
8555
8555
  url.searchParams.append('organizationId', this.organizationId);
8556
- _context.prev = 2;
8557
- _context.next = 5;
8556
+ if (options !== null && options !== void 0 && options.includeProductRooms) {
8557
+ url.searchParams.append('includeProductRooms', 'true');
8558
+ }
8559
+ _context.prev = 3;
8560
+ _context.next = 6;
8558
8561
  return fetch(url.toString(), {
8559
8562
  headers: {
8560
8563
  Authorization: 'Bearer ' + this.jwt,
8561
8564
  'Content-Type': 'application/json'
8562
8565
  }
8563
8566
  });
8564
- case 5:
8567
+ case 6:
8565
8568
  res = _context.sent;
8566
- _context.next = 8;
8569
+ _context.next = 9;
8567
8570
  return res.json();
8568
- case 8:
8571
+ case 9:
8569
8572
  resData = _context.sent;
8570
- _context.next = 14;
8573
+ _context.next = 15;
8571
8574
  break;
8572
- case 11:
8573
- _context.prev = 11;
8574
- _context.t0 = _context["catch"](2);
8575
+ case 12:
8576
+ _context.prev = 12;
8577
+ _context.t0 = _context["catch"](3);
8575
8578
  throw new Error('Could not fetch Prompts ' + _context.t0.message);
8576
- case 14:
8579
+ case 15:
8577
8580
  if (!res.ok) {
8578
- _context.next = 16;
8581
+ _context.next = 17;
8579
8582
  break;
8580
8583
  }
8581
8584
  return _context.abrupt("return", resData);
8582
- case 16:
8583
- throw new Error(resData.error);
8584
8585
  case 17:
8586
+ throw new Error(resData.error);
8587
+ case 18:
8585
8588
  case "end":
8586
8589
  return _context.stop();
8587
8590
  }
8588
- }, _callee, this, [[2, 11]]);
8591
+ }, _callee, this, [[3, 12]]);
8589
8592
  }));
8590
- function getPrompts() {
8593
+ function getPrompts(_x) {
8591
8594
  return _getPrompts.apply(this, arguments);
8592
8595
  }
8593
8596
  return getPrompts;
@@ -10371,7 +10374,7 @@ var DrawerMenu$1 = observer(DrawerMenu);
10371
10374
  function ownKeys$4(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; }
10372
10375
  function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10373
10376
  var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
10374
- return import('./ModalsWrapper-26164be5.js');
10377
+ return import('./ModalsWrapper-a56664d5.js');
10375
10378
  });
10376
10379
  function Fullscreen(_ref) {
10377
10380
  var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
@@ -10831,10 +10834,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
10831
10834
  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; }
10832
10835
  var LOG$2 = getLogger('Framework', 'Root');
10833
10836
  var LazyAuth = /*#__PURE__*/React.lazy(function () {
10834
- return import('./index-b0908efb.js');
10837
+ return import('./index-b36f36ee.js');
10835
10838
  });
10836
10839
  var LazyModals = /*#__PURE__*/React.lazy(function () {
10837
- return import('./ModalsWrapper-26164be5.js');
10840
+ return import('./ModalsWrapper-a56664d5.js');
10838
10841
  });
10839
10842
  function ContentComponent() {
10840
10843
  var context = useDivaCoreContext();
@@ -1,4 +1,4 @@
1
- import { s as styleInject, u as useDivaCoreContext, g as getLogger } from './index-bb670cad.js';
1
+ import { s as styleInject, u as useDivaCoreContext, g as getLogger } from './index-3eb0eec0.js';
2
2
  import { forwardRef, useState, useRef, useEffect, useMemo } from 'react';
3
3
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
4
4
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
@@ -1,4 +1,4 @@
1
- export { c as AnalyticsHandler, A as AuthorizationHandler, e as ClientArticleHandler, C as Content, f as DivaMockProvider, D as DrawerMenuComponent, H as HelpButton, O as ONE_DAY_UNIX, d as OrganizationHandler, P as ProductHandler, R as RequestStatus, S as SupportHandler, b as default, g as getLogger, i as i18n, h as storyBookCoreMock, a as useDivaCore } from './index-bb670cad.js';
1
+ export { c as AnalyticsHandler, A as AuthorizationHandler, e as ClientArticleHandler, C as Content, f as DivaMockProvider, D as DrawerMenuComponent, H as HelpButton, O as ONE_DAY_UNIX, d as OrganizationHandler, P as ProductHandler, R as RequestStatus, S as SupportHandler, b as default, g as getLogger, i as i18n, h as storyBookCoreMock, a as useDivaCore } from './index-3eb0eec0.js';
2
2
  export { DivaError, default as DivaUtils } from '@crystaldesign/diva-utils';
3
3
  export { Trans, useTranslation } from 'react-i18next';
4
4
  export * from '@crystaldesign/basket-model';
@@ -5,6 +5,8 @@ export declare class AIHandler {
5
5
  private get aiService();
6
6
  private get jwt();
7
7
  private get organizationId();
8
- getPrompts(): Promise<any>;
8
+ getPrompts(options?: {
9
+ includeProductRooms?: boolean;
10
+ }): Promise<any>;
9
11
  }
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/handler/AIHandler/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,qBAAa,SAAS;IACR,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC,OAAO,KAAK,SAAS,GAEpB;IAED,OAAO,KAAK,GAAG,GAEd;IAED,OAAO,KAAK,cAAc,GAEzB;IAEK,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;CAqBjC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/handler/AIHandler/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,qBAAa,SAAS;IACR,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC,OAAO,KAAK,SAAS,GAEpB;IAED,OAAO,KAAK,GAAG,GAEd;IAED,OAAO,KAAK,cAAc,GAEzB;IAEK,UAAU,CAAC,OAAO,CAAC,EAAE;QAAE,mBAAmB,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAwB5E"}