@crystaldesign/diva-core 25.13.0-beta.47 → 25.13.0-beta.49
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-d32a45e0.js → ModalsWrapper-6061c474.js} +2 -2
- package/build/esm/{index-dc581f1a.js → index-224952c5.js} +1 -1
- package/build/esm/{index-c83b3aba.js → index-d45d17fd.js} +5 -5
- package/build/esm/index.js +1 -1
- package/build/umd/558.diva-core.umd.min.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-d45d17fd.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';
|
|
@@ -52,7 +52,7 @@ import '@storybook/addon-actions';
|
|
|
52
52
|
import '@mui/styles';
|
|
53
53
|
|
|
54
54
|
var overlay = "overlay-hhcfc";
|
|
55
|
-
var css_248z$1 = ".overlay-hhcfc {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255, 0.6);\n z-index:
|
|
55
|
+
var css_248z$1 = ".overlay-hhcfc {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255, 0.6);\n z-index: 14500;\n justify-content: center;\n align-items: center;\n position: absolute;\n}\n";
|
|
56
56
|
styleInject(css_248z$1);
|
|
57
57
|
|
|
58
58
|
var wrapper = "wrapper-myuaV";
|
|
@@ -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-d45d17fd.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-beta.
|
|
49
|
+
const env = {"STAGE":"production","VERSION":"25.13.0-beta.49"};
|
|
50
50
|
try {
|
|
51
51
|
if (process) {
|
|
52
52
|
process.env = Object.assign({}, process.env);
|
|
@@ -9373,7 +9373,7 @@ function styleInject(css, ref) {
|
|
|
9373
9373
|
|
|
9374
9374
|
var overlay$2 = "overlay-X3zhH";
|
|
9375
9375
|
var loading = "loading-kAuhm";
|
|
9376
|
-
var css_248z$5 = ".overlay-X3zhH {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255, 0.6);\n z-index:
|
|
9376
|
+
var css_248z$5 = ".overlay-X3zhH {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255, 0.6);\n z-index: 15000;\n justify-content: center;\n align-items: center;\n position: absolute;\n}\n\n.loading-kAuhm {\n margin: 0 auto;\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n}\n.loading-kAuhm div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 64px;\n height: 64px;\n margin: 8px;\n border: 8px solid #b6b6b6;\n border-radius: 50%;\n animation: loading-kAuhm 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: #b6b6b6 transparent transparent transparent;\n}\n.loading-kAuhm div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.loading-kAuhm div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.loading-kAuhm div:nth-child(3) {\n animation-delay: -0.15s;\n}\n@keyframes loading-kAuhm {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n";
|
|
9377
9377
|
styleInject(css_248z$5);
|
|
9378
9378
|
|
|
9379
9379
|
var LOG$3 = getLogger('Framework', 'loadDependency');
|
|
@@ -9659,7 +9659,7 @@ var DrawerMenu = observer(MobileDrawer);
|
|
|
9659
9659
|
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; }
|
|
9660
9660
|
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; }
|
|
9661
9661
|
var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
|
|
9662
|
-
return import('./ModalsWrapper-
|
|
9662
|
+
return import('./ModalsWrapper-6061c474.js');
|
|
9663
9663
|
});
|
|
9664
9664
|
function Fullscreen(_ref) {
|
|
9665
9665
|
var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
|
|
@@ -10119,10 +10119,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
10119
10119
|
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; }
|
|
10120
10120
|
var LOG$2 = getLogger('Framework', 'Root');
|
|
10121
10121
|
var LazyAuth = /*#__PURE__*/React.lazy(function () {
|
|
10122
|
-
return import('./index-
|
|
10122
|
+
return import('./index-224952c5.js');
|
|
10123
10123
|
});
|
|
10124
10124
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
10125
|
-
return import('./ModalsWrapper-
|
|
10125
|
+
return import('./ModalsWrapper-6061c474.js');
|
|
10126
10126
|
});
|
|
10127
10127
|
function ContentComponent() {
|
|
10128
10128
|
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-d45d17fd.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';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 558.diva-core.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[558],{6558:(e,n,t)=>{t.r(n),t.d(n,{default:()=>ModalsWrapper});var i=t(7363),o=t(9420),r=t(9226),l=t(3335),a=t(8781),d=t(9400),s=t(4415),c=t(1824),u=t(9763),m=t(3379),p=t.n(m),h=t(7795),v=t.n(h),x=t(569),f=t.n(x),g=t(3565),y=t.n(g),b=t(9216),j=t.n(b),k=t(4589),Z=t.n(k),w=t(5297),P={};P.styleTagTransform=Z(),P.setAttributes=y(),P.insert=f().bind(null,"head"),P.domAPI=v(),P.insertStyleElement=j();p()(w.Z,P);w.Z&&w.Z.locals&&w.Z.locals;var C=t(789),S=t(4988),I=t(5054),E={};E.styleTagTransform=Z(),E.setAttributes=y(),E.insert=f().bind(null,"head"),E.domAPI=v(),E.insertStyleElement=j();p()(I.ZP,E);I.ZP&&I.ZP.locals&&I.ZP.locals;var F=t(7514);const D=(0,o.Pi)((function Progress(e){var n=e.children,t=e.progress,o=(0,i.useState)(),r=(0,S.Z)(o,2),l=r[0],a=r[1];return(0,i.useEffect)((function(){a(t)}),[t]),(0,F.jsxs)("div",{className:I.YS,children:[!!n&&n,(0,F.jsx)("div",{className:I.l9,children:(0,F.jsx)("div",{className:I.YJ,style:{width:100*(null!=l?l:0)+"%"},children:(0,F.jsx)("div",{className:I.zn})})})]})}));var z=t(3697),A=t(1682),M=t(8623);const W=(0,o.Pi)((function Modal(){var e,n,t=(0,r.KH)().contentStore,o=(0,C.$G)().t,m=function onAccept(e){var n,i=t.modal;t.closeModal(),null==i||null===(n=i.callback)||void 0===n||n.call(i,!i.content||e)},p=function onReject(){var e,n=t.modal;t.closeModal(),null==n||null===(e=n.callback)||void 0===e||e.call(n,!1)};(0,i.useEffect)((function(){return document.addEventListener("keydown",h,!1),function(){document.removeEventListener("keydown",h,!1)}}),[]);var h=(0,i.useCallback)((function(e){if(t.modal)if("Enter"!==e.key||t.modal.doNotAcceptOnEnter)"ESC"!==e.key&&"Escape"!=e.key||(p(),e.preventDefault());else{var n=document.getElementById("diva-modal-form");if(!n)return;m(new FormData(n)),e.preventDefault()}}),[]);if(!t.modal)return(0,F.jsx)(F.Fragment,{});var v=(0,M.ZN)(t.modal),x="string"==typeof v.text?o(v.text):v.text,f=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(s.Z,{style:v.maxWidth?{maxWidth:v.maxWidth}:void 0,children:v.iFrame?(0,F.jsx)(IFrame,{link:v.iFrame}):"string"==typeof x&&null==v.content?(0,F.jsx)(c.Z,{component:"div",dangerouslySetInnerHTML:{__html:function tryDecodeURIComponent(e){try{return decodeURIComponent(e)}catch(n){return e}}(x)}}):(0,F.jsxs)(c.Z,{component:"div",children:[x,v.content&&t.modal.content]})}),(v.reject||v.accept)&&(0,F.jsxs)(d.Z,{children:[v.reject&&(0,F.jsx)(l.Z,{color:"primary",onClick:p,children:"string"==typeof v.reject?o(v.reject):o("modal.reject")}),v.accept&&(0,F.jsx)(l.Z,{color:"primary",type:"submit",id:"diva-dialog-submitbtn",children:"string"==typeof v.accept?o(v.accept):o("modal.accept")})]}),!!(v.image||void 0!==v.progress||null!==(e=v.actions)&&void 0!==e&&e.length)&&(0,F.jsxs)("div",{style:{margin:10},children:[v.image&&(0,F.jsx)("img",{src:v.image,style:{maxWidth:480}}),void 0!==v.progress&&(0,F.jsx)(D,{progress:v.progress}),null===(n=v.actions)||void 0===n?void 0:n.map((function(e){var n;return(0,F.jsx)(l.Z,{fullWidth:!0,style:{marginBottom:10},variant:null!==(n=e.variant)&&void 0!==n?n:"contained",color:"primary",onClick:function onClick(){return function onSelect(e,n){var i,o=t.modal;0!=n&&t.closeModal(),null==o||null===(i=o.callback)||void 0===i||i.call(o,e)}(e.id,e.closeable)},children:o(e.text)})}))]})]}),g=!0===v.fullscreen||"mobile"==v.fullscreen&&t.containerDimensions.isMobile;return(0,F.jsx)("div",{className:w.I,id:"diva-dialog",children:(0,F.jsxs)(a.Z,{open:!0,disablePortal:!0,hideBackdrop:!0,disableEnforceFocus:!0,style:{position:"absolute",zIndex:0},maxWidth:"lg",fullScreen:g,PaperProps:{style:{width:v.width,height:v.height}},children:[(0,F.jsx)(u.Z,{children:"string"==typeof v.title?o(v.title):v.title}),v.rejectByIcon&&(0,F.jsx)(z.Z,{onClick:p,style:{position:"absolute",right:8,top:8,zIndex:1000001},size:"large",children:(0,F.jsx)(A.Z,{})}),v.dontRenderForm&&f,!v.dontRenderForm&&(0,F.jsx)("form",{id:"diva-modal-form",autoComplete:"off",onSubmit:function onSubmit(e){e.preventDefault(),m(new FormData(e.target))},children:f})]})})}));function IFrame(e){var n=e.link;return(0,F.jsx)("iframe",{style:{border:0,width:"100%",height:"99%"},src:n})}function ModalsWrapper(){return(0,F.jsx)(W,{})}},5297:(e,n,t)=>{t.d(n,{I:()=>a,Z:()=>d});var i=t(8081),o=t.n(i),r=t(3645),l=t.n(r)()(o());l.push([e.id,".index-module--AtOcs {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255, 0.6);\n z-index:
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[558],{6558:(e,n,t)=>{t.r(n),t.d(n,{default:()=>ModalsWrapper});var i=t(7363),o=t(9420),r=t(9226),l=t(3335),a=t(8781),d=t(9400),s=t(4415),c=t(1824),u=t(9763),m=t(3379),p=t.n(m),h=t(7795),v=t.n(h),x=t(569),f=t.n(x),g=t(3565),y=t.n(g),b=t(9216),j=t.n(b),k=t(4589),Z=t.n(k),w=t(5297),P={};P.styleTagTransform=Z(),P.setAttributes=y(),P.insert=f().bind(null,"head"),P.domAPI=v(),P.insertStyleElement=j();p()(w.Z,P);w.Z&&w.Z.locals&&w.Z.locals;var C=t(789),S=t(4988),I=t(5054),E={};E.styleTagTransform=Z(),E.setAttributes=y(),E.insert=f().bind(null,"head"),E.domAPI=v(),E.insertStyleElement=j();p()(I.ZP,E);I.ZP&&I.ZP.locals&&I.ZP.locals;var F=t(7514);const D=(0,o.Pi)((function Progress(e){var n=e.children,t=e.progress,o=(0,i.useState)(),r=(0,S.Z)(o,2),l=r[0],a=r[1];return(0,i.useEffect)((function(){a(t)}),[t]),(0,F.jsxs)("div",{className:I.YS,children:[!!n&&n,(0,F.jsx)("div",{className:I.l9,children:(0,F.jsx)("div",{className:I.YJ,style:{width:100*(null!=l?l:0)+"%"},children:(0,F.jsx)("div",{className:I.zn})})})]})}));var z=t(3697),A=t(1682),M=t(8623);const W=(0,o.Pi)((function Modal(){var e,n,t=(0,r.KH)().contentStore,o=(0,C.$G)().t,m=function onAccept(e){var n,i=t.modal;t.closeModal(),null==i||null===(n=i.callback)||void 0===n||n.call(i,!i.content||e)},p=function onReject(){var e,n=t.modal;t.closeModal(),null==n||null===(e=n.callback)||void 0===e||e.call(n,!1)};(0,i.useEffect)((function(){return document.addEventListener("keydown",h,!1),function(){document.removeEventListener("keydown",h,!1)}}),[]);var h=(0,i.useCallback)((function(e){if(t.modal)if("Enter"!==e.key||t.modal.doNotAcceptOnEnter)"ESC"!==e.key&&"Escape"!=e.key||(p(),e.preventDefault());else{var n=document.getElementById("diva-modal-form");if(!n)return;m(new FormData(n)),e.preventDefault()}}),[]);if(!t.modal)return(0,F.jsx)(F.Fragment,{});var v=(0,M.ZN)(t.modal),x="string"==typeof v.text?o(v.text):v.text,f=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(s.Z,{style:v.maxWidth?{maxWidth:v.maxWidth}:void 0,children:v.iFrame?(0,F.jsx)(IFrame,{link:v.iFrame}):"string"==typeof x&&null==v.content?(0,F.jsx)(c.Z,{component:"div",dangerouslySetInnerHTML:{__html:function tryDecodeURIComponent(e){try{return decodeURIComponent(e)}catch(n){return e}}(x)}}):(0,F.jsxs)(c.Z,{component:"div",children:[x,v.content&&t.modal.content]})}),(v.reject||v.accept)&&(0,F.jsxs)(d.Z,{children:[v.reject&&(0,F.jsx)(l.Z,{color:"primary",onClick:p,children:"string"==typeof v.reject?o(v.reject):o("modal.reject")}),v.accept&&(0,F.jsx)(l.Z,{color:"primary",type:"submit",id:"diva-dialog-submitbtn",children:"string"==typeof v.accept?o(v.accept):o("modal.accept")})]}),!!(v.image||void 0!==v.progress||null!==(e=v.actions)&&void 0!==e&&e.length)&&(0,F.jsxs)("div",{style:{margin:10},children:[v.image&&(0,F.jsx)("img",{src:v.image,style:{maxWidth:480}}),void 0!==v.progress&&(0,F.jsx)(D,{progress:v.progress}),null===(n=v.actions)||void 0===n?void 0:n.map((function(e){var n;return(0,F.jsx)(l.Z,{fullWidth:!0,style:{marginBottom:10},variant:null!==(n=e.variant)&&void 0!==n?n:"contained",color:"primary",onClick:function onClick(){return function onSelect(e,n){var i,o=t.modal;0!=n&&t.closeModal(),null==o||null===(i=o.callback)||void 0===i||i.call(o,e)}(e.id,e.closeable)},children:o(e.text)})}))]})]}),g=!0===v.fullscreen||"mobile"==v.fullscreen&&t.containerDimensions.isMobile;return(0,F.jsx)("div",{className:w.I,id:"diva-dialog",children:(0,F.jsxs)(a.Z,{open:!0,disablePortal:!0,hideBackdrop:!0,disableEnforceFocus:!0,style:{position:"absolute",zIndex:0},maxWidth:"lg",fullScreen:g,PaperProps:{style:{width:v.width,height:v.height}},children:[(0,F.jsx)(u.Z,{children:"string"==typeof v.title?o(v.title):v.title}),v.rejectByIcon&&(0,F.jsx)(z.Z,{onClick:p,style:{position:"absolute",right:8,top:8,zIndex:1000001},size:"large",children:(0,F.jsx)(A.Z,{})}),v.dontRenderForm&&f,!v.dontRenderForm&&(0,F.jsx)("form",{id:"diva-modal-form",autoComplete:"off",onSubmit:function onSubmit(e){e.preventDefault(),m(new FormData(e.target))},children:f})]})})}));function IFrame(e){var n=e.link;return(0,F.jsx)("iframe",{style:{border:0,width:"100%",height:"99%"},src:n})}function ModalsWrapper(){return(0,F.jsx)(W,{})}},5297:(e,n,t)=>{t.d(n,{I:()=>a,Z:()=>d});var i=t(8081),o=t.n(i),r=t(3645),l=t.n(r)()(o());l.push([e.id,".index-module--AtOcs {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255, 0.6);\n z-index: 14500;\n justify-content: center;\n align-items: center;\n position: absolute;\n}\n",""]);var a="index-module--AtOcs";const d=l},5054:(e,n,t)=>{t.d(n,{YJ:()=>s,YS:()=>a,ZP:()=>u,l9:()=>d,zn:()=>c});var i=t(8081),o=t.n(i),r=t(3645),l=t.n(r)()(o());l.push([e.id,".index-module--Pww9z {\n display: flex;\n width: 100%;\n}\n\n.index-module--thPSh {\n height: 10px;\n position: relative;\n border-radius: 5px;\n width: 100%;\n}\n\n@keyframes index-module--_9_PO {\n from {\n background-position-x: 0;\n }\n to {\n background-position-x: 113px;\n }\n}\n\n.index-module--HhvXv {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n transition: width 0.4s ease-out;\n overflow: hidden;\n border-radius: 5px;\n}\n.index-module--f7imw {\n border-radius: 5px;\n height: 100%;\n background-color: var(--diva-theme-palette-primary-main);\n background-image: repeating-linear-gradient(\n 45deg,\n transparent,\n transparent 10px,\n var(--diva-theme-palette-secondary-dark) 10px,\n var(--diva-theme-palette-secondary-dark) 20px\n );\n animation: index-module--_9_PO 4s linear infinite;\n will-change: background-position;\n}\n",""]);var a="index-module--Pww9z",d="index-module--thPSh",s="index-module--HhvXv",c="index-module--f7imw";const u=l}}]);
|