@crystaldesign/diva-core 25.13.0-rc.11 → 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.
- package/build/esm/{ModalsWrapper-df97b3b9.js → ModalsWrapper-9011d5c7.js} +1 -1
- package/build/esm/{index-1be0a6df.js → index-31768386.js} +1 -1
- package/build/esm/{index-b2a24553.js → index-bd058900.js} +23 -23
- package/build/esm/index.js +1 -1
- package/build/umd/diva-core.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as styleInject, u as useDivaCoreContext } from './index-
|
|
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-
|
|
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.
|
|
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$,
|
|
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: (
|
|
881
|
-
light: (
|
|
882
|
-
dark: (
|
|
883
|
-
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: (
|
|
887
|
-
light: (
|
|
888
|
-
dark: (
|
|
889
|
-
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: (
|
|
893
|
-
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: (
|
|
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 (
|
|
921
|
-
var
|
|
922
|
-
key =
|
|
923
|
-
value =
|
|
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(
|
|
1113
|
-
var identifier, type, domain,
|
|
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 =
|
|
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-
|
|
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-
|
|
10119
|
+
return import('./index-31768386.js');
|
|
10120
10120
|
});
|
|
10121
10121
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
10122
|
-
return import('./ModalsWrapper-
|
|
10122
|
+
return import('./ModalsWrapper-9011d5c7.js');
|
|
10123
10123
|
});
|
|
10124
10124
|
function ContentComponent() {
|
|
10125
10125
|
var context = useDivaCoreContext();
|
package/build/esm/index.js
CHANGED
|
@@ -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-
|
|
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';
|