@crystaldesign/diva-core 25.13.0-rc.12 → 25.13.0-rc.13

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-86eb9e6f.js';
1
+ import { s as styleInject, u as useDivaCoreContext } from './index-bd058900.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';
@@ -1,4 +1,4 @@
1
- import { s as styleInject, u as useDivaCoreContext, g as getLogger } from './index-86eb9e6f.js';
1
+ import { s as styleInject, u as useDivaCoreContext, g as getLogger } from './index-bd058900.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';
@@ -46,7 +46,7 @@ import { actions } from '@storybook/addon-actions';
46
46
  import * as Styles from '@mui/styles';
47
47
 
48
48
  (function() {
49
- const env = {"STAGE":"production","VERSION":"25.13.0-rc.12"};
49
+ const env = {"STAGE":"production","VERSION":"25.13.0-rc.13"};
50
50
  try {
51
51
  if (process) {
52
52
  process.env = Object.assign({}, process.env);
@@ -870,31 +870,31 @@ var ConfigurationStore = /*#__PURE__*/function () {
870
870
  }, {
871
871
  key: "theme",
872
872
  get: function get() {
873
- var _this$_configuration9, _this$root$dataStore$, _ref, _orgTheme$main, _theme$palette, _ref2, _orgTheme$light, _theme$palette2, _ref3, _orgTheme$dark, _theme$palette3, _theme$palette$primar, _theme$palette4, _ref4, _ref5, _theme$palette$second, _theme$palette5, _theme$palette6, _ref6, _ref7, _theme$palette$second2, _theme$palette7, _theme$palette8, _ref8, _ref9, _theme$palette$second3, _theme$palette9, _theme$palette10, _ref10, _theme$palette$second4, _theme$palette11, _theme$palette12, _theme$palette$text$p, _theme$palette13, _theme$palette$text$s, _theme$palette14, _theme$typography$fon, _theme$typography, _theme$components;
873
+ var _this$_configuration9, _this$root$dataStore$, _theme$palette, _theme$palette2, _theme$palette3, _theme$palette4, _theme$palette5, _theme$palette6, _theme$palette7, _theme$palette8, _theme$palette9, _theme$palette10, _theme$palette11, _theme$palette12, _theme$palette13, _theme$palette14, _theme$typography, _theme$components;
874
874
  var theme = (_this$_configuration9 = this._configuration) === null || _this$_configuration9 === void 0 ? void 0 : _this$_configuration9.theme;
875
875
  var orgTheme = (_this$root$dataStore$ = this.root.dataStore.organization) === null || _this$root$dataStore$ === void 0 || (_this$root$dataStore$ = _this$root$dataStore$.settings) === null || _this$root$dataStore$ === void 0 ? void 0 : _this$root$dataStore$.theme;
876
876
 
877
877
  // Apply organization theme overrides if they exist
878
878
  var palette = {
879
879
  primary: {
880
- main: (_ref = (_orgTheme$main = orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.main) !== null && _orgTheme$main !== void 0 ? _orgTheme$main : theme === null || theme === void 0 || (_theme$palette = theme.palette) === null || _theme$palette === void 0 || (_theme$palette = _theme$palette.primary) === null || _theme$palette === void 0 ? void 0 : _theme$palette.main) !== null && _ref !== void 0 ? _ref : defaultTheme.palette.primary.main,
881
- light: (_ref2 = (_orgTheme$light = orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.light) !== null && _orgTheme$light !== void 0 ? _orgTheme$light : theme === null || theme === void 0 || (_theme$palette2 = theme.palette) === null || _theme$palette2 === void 0 || (_theme$palette2 = _theme$palette2.primary) === null || _theme$palette2 === void 0 ? void 0 : _theme$palette2.light) !== null && _ref2 !== void 0 ? _ref2 : defaultTheme.palette.primary.light,
882
- dark: (_ref3 = (_orgTheme$dark = orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.dark) !== null && _orgTheme$dark !== void 0 ? _orgTheme$dark : theme === null || theme === void 0 || (_theme$palette3 = theme.palette) === null || _theme$palette3 === void 0 || (_theme$palette3 = _theme$palette3.primary) === null || _theme$palette3 === void 0 ? void 0 : _theme$palette3.dark) !== null && _ref3 !== void 0 ? _ref3 : defaultTheme.palette.primary.dark,
883
- contrastText: (_theme$palette$primar = theme === null || theme === void 0 || (_theme$palette4 = theme.palette) === null || _theme$palette4 === void 0 || (_theme$palette4 = _theme$palette4.primary) === null || _theme$palette4 === void 0 ? void 0 : _theme$palette4.contrastText) !== null && _theme$palette$primar !== void 0 ? _theme$palette$primar : defaultTheme.palette.primary.contrastText
880
+ main: (orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.main) || (theme === null || theme === void 0 || (_theme$palette = theme.palette) === null || _theme$palette === void 0 || (_theme$palette = _theme$palette.primary) === null || _theme$palette === void 0 ? void 0 : _theme$palette.main) || defaultTheme.palette.primary.main,
881
+ light: (orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.light) || (theme === null || theme === void 0 || (_theme$palette2 = theme.palette) === null || _theme$palette2 === void 0 || (_theme$palette2 = _theme$palette2.primary) === null || _theme$palette2 === void 0 ? void 0 : _theme$palette2.light) || defaultTheme.palette.primary.light,
882
+ dark: (orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.dark) || (theme === null || theme === void 0 || (_theme$palette3 = theme.palette) === null || _theme$palette3 === void 0 || (_theme$palette3 = _theme$palette3.primary) === null || _theme$palette3 === void 0 ? void 0 : _theme$palette3.dark) || defaultTheme.palette.primary.dark,
883
+ contrastText: (theme === null || theme === void 0 || (_theme$palette4 = theme.palette) === null || _theme$palette4 === void 0 || (_theme$palette4 = _theme$palette4.primary) === null || _theme$palette4 === void 0 ? void 0 : _theme$palette4.contrastText) || defaultTheme.palette.primary.contrastText
884
884
  },
885
885
  secondary: {
886
- main: (_ref4 = (_ref5 = (_theme$palette$second = theme === null || theme === void 0 || (_theme$palette5 = theme.palette) === null || _theme$palette5 === void 0 || (_theme$palette5 = _theme$palette5.secondary) === null || _theme$palette5 === void 0 ? void 0 : _theme$palette5.main) !== null && _theme$palette$second !== void 0 ? _theme$palette$second : orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.main) !== null && _ref5 !== void 0 ? _ref5 : theme === null || theme === void 0 || (_theme$palette6 = theme.palette) === null || _theme$palette6 === void 0 || (_theme$palette6 = _theme$palette6.primary) === null || _theme$palette6 === void 0 ? void 0 : _theme$palette6.main) !== null && _ref4 !== void 0 ? _ref4 : defaultTheme.palette.secondary.main,
887
- light: (_ref6 = (_ref7 = (_theme$palette$second2 = theme === null || theme === void 0 || (_theme$palette7 = theme.palette) === null || _theme$palette7 === void 0 || (_theme$palette7 = _theme$palette7.secondary) === null || _theme$palette7 === void 0 ? void 0 : _theme$palette7.light) !== null && _theme$palette$second2 !== void 0 ? _theme$palette$second2 : orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.light) !== null && _ref7 !== void 0 ? _ref7 : theme === null || theme === void 0 || (_theme$palette8 = theme.palette) === null || _theme$palette8 === void 0 || (_theme$palette8 = _theme$palette8.primary) === null || _theme$palette8 === void 0 ? void 0 : _theme$palette8.light) !== null && _ref6 !== void 0 ? _ref6 : defaultTheme.palette.secondary.light,
888
- dark: (_ref8 = (_ref9 = (_theme$palette$second3 = theme === null || theme === void 0 || (_theme$palette9 = theme.palette) === null || _theme$palette9 === void 0 || (_theme$palette9 = _theme$palette9.secondary) === null || _theme$palette9 === void 0 ? void 0 : _theme$palette9.dark) !== null && _theme$palette$second3 !== void 0 ? _theme$palette$second3 : orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.dark) !== null && _ref9 !== void 0 ? _ref9 : theme === null || theme === void 0 || (_theme$palette10 = theme.palette) === null || _theme$palette10 === void 0 || (_theme$palette10 = _theme$palette10.primary) === null || _theme$palette10 === void 0 ? void 0 : _theme$palette10.dark) !== null && _ref8 !== void 0 ? _ref8 : defaultTheme.palette.secondary.dark,
889
- contrastText: (_ref10 = (_theme$palette$second4 = theme === null || theme === void 0 || (_theme$palette11 = theme.palette) === null || _theme$palette11 === void 0 || (_theme$palette11 = _theme$palette11.secondary) === null || _theme$palette11 === void 0 ? void 0 : _theme$palette11.contrastText) !== null && _theme$palette$second4 !== void 0 ? _theme$palette$second4 : theme === null || theme === void 0 || (_theme$palette12 = theme.palette) === null || _theme$palette12 === void 0 || (_theme$palette12 = _theme$palette12.primary) === null || _theme$palette12 === void 0 ? void 0 : _theme$palette12.contrastText) !== null && _ref10 !== void 0 ? _ref10 : defaultTheme.palette.secondary.contrastText
886
+ main: (theme === null || theme === void 0 || (_theme$palette5 = theme.palette) === null || _theme$palette5 === void 0 || (_theme$palette5 = _theme$palette5.secondary) === null || _theme$palette5 === void 0 ? void 0 : _theme$palette5.main) || (orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.main) || (theme === null || theme === void 0 || (_theme$palette6 = theme.palette) === null || _theme$palette6 === void 0 || (_theme$palette6 = _theme$palette6.primary) === null || _theme$palette6 === void 0 ? void 0 : _theme$palette6.main) || defaultTheme.palette.secondary.main,
887
+ light: (theme === null || theme === void 0 || (_theme$palette7 = theme.palette) === null || _theme$palette7 === void 0 || (_theme$palette7 = _theme$palette7.secondary) === null || _theme$palette7 === void 0 ? void 0 : _theme$palette7.light) || (orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.light) || (theme === null || theme === void 0 || (_theme$palette8 = theme.palette) === null || _theme$palette8 === void 0 || (_theme$palette8 = _theme$palette8.primary) === null || _theme$palette8 === void 0 ? void 0 : _theme$palette8.light) || defaultTheme.palette.secondary.light,
888
+ dark: (theme === null || theme === void 0 || (_theme$palette9 = theme.palette) === null || _theme$palette9 === void 0 || (_theme$palette9 = _theme$palette9.secondary) === null || _theme$palette9 === void 0 ? void 0 : _theme$palette9.dark) || (orgTheme === null || orgTheme === void 0 ? void 0 : orgTheme.dark) || (theme === null || theme === void 0 || (_theme$palette10 = theme.palette) === null || _theme$palette10 === void 0 || (_theme$palette10 = _theme$palette10.primary) === null || _theme$palette10 === void 0 ? void 0 : _theme$palette10.dark) || defaultTheme.palette.secondary.dark,
889
+ contrastText: (theme === null || theme === void 0 || (_theme$palette11 = theme.palette) === null || _theme$palette11 === void 0 || (_theme$palette11 = _theme$palette11.secondary) === null || _theme$palette11 === void 0 ? void 0 : _theme$palette11.contrastText) || (theme === null || theme === void 0 || (_theme$palette12 = theme.palette) === null || _theme$palette12 === void 0 || (_theme$palette12 = _theme$palette12.primary) === null || _theme$palette12 === void 0 ? void 0 : _theme$palette12.contrastText) || defaultTheme.palette.secondary.contrastText
890
890
  },
891
891
  text: {
892
- primary: (_theme$palette$text$p = theme === null || theme === void 0 || (_theme$palette13 = theme.palette) === null || _theme$palette13 === void 0 || (_theme$palette13 = _theme$palette13.text) === null || _theme$palette13 === void 0 ? void 0 : _theme$palette13.primary) !== null && _theme$palette$text$p !== void 0 ? _theme$palette$text$p : defaultTheme.palette.text.primary,
893
- secondary: (_theme$palette$text$s = theme === null || theme === void 0 || (_theme$palette14 = theme.palette) === null || _theme$palette14 === void 0 || (_theme$palette14 = _theme$palette14.text) === null || _theme$palette14 === void 0 ? void 0 : _theme$palette14.secondary) !== null && _theme$palette$text$s !== void 0 ? _theme$palette$text$s : defaultTheme.palette.text.secondary
892
+ primary: (theme === null || theme === void 0 || (_theme$palette13 = theme.palette) === null || _theme$palette13 === void 0 || (_theme$palette13 = _theme$palette13.text) === null || _theme$palette13 === void 0 ? void 0 : _theme$palette13.primary) || defaultTheme.palette.text.primary,
893
+ secondary: (theme === null || theme === void 0 || (_theme$palette14 = theme.palette) === null || _theme$palette14 === void 0 || (_theme$palette14 = _theme$palette14.text) === null || _theme$palette14 === void 0 ? void 0 : _theme$palette14.secondary) || defaultTheme.palette.text.secondary
894
894
  }
895
895
  };
896
896
  var typography = {
897
- fontFamily: (_theme$typography$fon = theme === null || theme === void 0 || (_theme$typography = theme.typography) === null || _theme$typography === void 0 ? void 0 : _theme$typography.fontFamily) !== null && _theme$typography$fon !== void 0 ? _theme$typography$fon : defaultTheme.typography.fontFamily
897
+ fontFamily: (theme === null || theme === void 0 || (_theme$typography = theme.typography) === null || _theme$typography === void 0 ? void 0 : _theme$typography.fontFamily) || defaultTheme.typography.fontFamily
898
898
  };
899
899
  var components = (_theme$components = theme === null || theme === void 0 ? void 0 : theme.components) !== null && _theme$components !== void 0 ? _theme$components : defaultTheme.components;
900
900
 
@@ -917,10 +917,10 @@ var ConfigurationStore = /*#__PURE__*/function () {
917
917
  var root = document.documentElement;
918
918
 
919
919
  // Apply custom variables without prefix
920
- Object.entries(customCssVariables).forEach(function (_ref11) {
921
- var _ref12 = _slicedToArray(_ref11, 2),
922
- key = _ref12[0],
923
- value = _ref12[1];
920
+ Object.entries(customCssVariables).forEach(function (_ref) {
921
+ var _ref2 = _slicedToArray(_ref, 2),
922
+ key = _ref2[0],
923
+ value = _ref2[1];
924
924
  if (key && value) {
925
925
  // Ensure variable name starts with --
926
926
  var varName = key.startsWith('--') ? key : "--".concat(key);
@@ -1109,12 +1109,12 @@ var ConfigurationStore = /*#__PURE__*/function () {
1109
1109
  }, {
1110
1110
  key: "fetchConfiguration",
1111
1111
  value: function () {
1112
- var _fetchConfiguration = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref13) {
1113
- var identifier, type, domain, _ref13$organizationId, organizationId, configuration, types, settingsKeys, _i, _types, subType;
1112
+ var _fetchConfiguration = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
1113
+ var identifier, type, domain, _ref3$organizationId, organizationId, configuration, types, settingsKeys, _i, _types, subType;
1114
1114
  return _regeneratorRuntime.wrap(function _callee$(_context) {
1115
1115
  while (1) switch (_context.prev = _context.next) {
1116
1116
  case 0:
1117
- identifier = _ref13.identifier, type = _ref13.type, domain = _ref13.domain, _ref13$organizationId = _ref13.organizationId, organizationId = _ref13$organizationId === void 0 ? this.root.dataStore.organizationId : _ref13$organizationId;
1117
+ identifier = _ref3.identifier, type = _ref3.type, domain = _ref3.domain, _ref3$organizationId = _ref3.organizationId, organizationId = _ref3$organizationId === void 0 ? this.root.dataStore.organizationId : _ref3$organizationId;
1118
1118
  LOG$d.debug("Fetching configuration for ".concat(type, " ").concat(identifier !== null && identifier !== void 0 ? identifier : '', " ").concat(domain !== null && domain !== void 0 ? domain : '', " ").concat(organizationId));
1119
1119
  configuration = this.configurationCache.get(type + identifier + organizationId);
1120
1120
  if (!configuration) {
@@ -9656,7 +9656,7 @@ var DrawerMenu = observer(MobileDrawer);
9656
9656
  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; }
9657
9657
  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; }
9658
9658
  var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
9659
- return import('./ModalsWrapper-3bd07331.js');
9659
+ return import('./ModalsWrapper-9011d5c7.js');
9660
9660
  });
9661
9661
  function Fullscreen(_ref) {
9662
9662
  var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
@@ -10116,10 +10116,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
10116
10116
  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; }
10117
10117
  var LOG$2 = getLogger('Framework', 'Root');
10118
10118
  var LazyAuth = /*#__PURE__*/React.lazy(function () {
10119
- return import('./index-af656688.js');
10119
+ return import('./index-31768386.js');
10120
10120
  });
10121
10121
  var LazyModals = /*#__PURE__*/React.lazy(function () {
10122
- return import('./ModalsWrapper-3bd07331.js');
10122
+ return import('./ModalsWrapper-9011d5c7.js');
10123
10123
  });
10124
10124
  function ContentComponent() {
10125
10125
  var context = useDivaCoreContext();
@@ -1,4 +1,4 @@
1
- export { b as AnalyticsHandler, A as AuthorizationHandler, d as ClientArticleHandler, C as Content, e as DivaMockProvider, H as HelpButton, O as ONE_DAY_UNIX, c as OrganizationHandler, P as ProductHandler, R as RequestStatus, S as SupportHandler, D as default, g as getLogger, f as storyBookCoreMock, a as useDivaCore } from './index-86eb9e6f.js';
1
+ export { b as AnalyticsHandler, A as AuthorizationHandler, d as ClientArticleHandler, C as Content, e as DivaMockProvider, H as HelpButton, O as ONE_DAY_UNIX, c as OrganizationHandler, P as ProductHandler, R as RequestStatus, S as SupportHandler, D as default, g as getLogger, f as storyBookCoreMock, a as useDivaCore } from './index-bd058900.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';