@dartcom/ui-kit 3.10.0 → 3.10.1
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -12,6 +12,8 @@ var styles$2 = require('@mui/material/styles');
|
|
|
12
12
|
var Typography = require('@mui/material/Typography');
|
|
13
13
|
var Autocomplete = require('@mui/material/Autocomplete');
|
|
14
14
|
var reactDom = require('react-dom');
|
|
15
|
+
var Box = require('@mui/material/Box');
|
|
16
|
+
var Modal = require('@mui/material/Modal');
|
|
15
17
|
var xDatePickers = require('@mui/x-date-pickers');
|
|
16
18
|
var AdapterDateFns = require('@mui/x-date-pickers/AdapterDateFns');
|
|
17
19
|
|
|
@@ -26122,6 +26124,46 @@ const DartcomProviders = ({ children, configOptions, themeOptions }) => {
|
|
|
26122
26124
|
return (jsxRuntime.jsx(SnackbarProvider, { children: jsxRuntime.jsx(QueryProvider, { children: jsxRuntime.jsx(DartcomMobxProvider, { children: jsxRuntime.jsx(DartcomThemeProvider, { themeOptions: themeOptions, children: jsxRuntime.jsx(Provider, { children: jsxRuntime.jsx(DartcomInitializeProvider, { configOptions: configOptions, children: children }) }) }) }) }) }));
|
|
26123
26125
|
};
|
|
26124
26126
|
|
|
26127
|
+
const modalStyle = {
|
|
26128
|
+
position: 'absolute',
|
|
26129
|
+
top: '50%',
|
|
26130
|
+
left: '50%',
|
|
26131
|
+
transform: 'translate(-50%, -50%)',
|
|
26132
|
+
bgcolor: 'background.paper',
|
|
26133
|
+
border: '2px solid #000',
|
|
26134
|
+
boxShadow: 24,
|
|
26135
|
+
p: 4,
|
|
26136
|
+
maxHeight: '90vh',
|
|
26137
|
+
overflowX: 'auto',
|
|
26138
|
+
overflowY: 'auto',
|
|
26139
|
+
};
|
|
26140
|
+
|
|
26141
|
+
const CustomModal = ({ name, children, onClose, onOpen, }) => {
|
|
26142
|
+
const modalId = React__namespace.useId();
|
|
26143
|
+
const { modalStore } = useRootStore();
|
|
26144
|
+
const open = modalStore.getIsVisible(name);
|
|
26145
|
+
React__namespace.useEffect(() => {
|
|
26146
|
+
if (open) {
|
|
26147
|
+
onOpen?.({ name });
|
|
26148
|
+
}
|
|
26149
|
+
}, [open]);
|
|
26150
|
+
return (jsxRuntime.jsx(Modal, { open: open, onClose: () => {
|
|
26151
|
+
modalStore.closeModal(name);
|
|
26152
|
+
onClose?.({ name });
|
|
26153
|
+
}, "aria-labelledby": `modal-${modalId}-title`, "aria-describedby": `modal-${modalId}-description`, children: jsxRuntime.jsx(Box, { sx: ({ breakpoints }) => {
|
|
26154
|
+
return {
|
|
26155
|
+
...modalStyle,
|
|
26156
|
+
[breakpoints.up('sm')]: {
|
|
26157
|
+
minWidth: 400,
|
|
26158
|
+
},
|
|
26159
|
+
[breakpoints.down('sm')]: {
|
|
26160
|
+
minWidth: '80vw',
|
|
26161
|
+
},
|
|
26162
|
+
};
|
|
26163
|
+
}, children: children }) }));
|
|
26164
|
+
};
|
|
26165
|
+
var modal = observer(CustomModal);
|
|
26166
|
+
|
|
26125
26167
|
const r=(t,r,o)=>{if(t&&"reportValidity"in t){const s=get(o,r);t.setCustomValidity(s&&s.message||""),t.reportValidity();}},o$1=(e,t)=>{for(const o in t.fields){const s=t.fields[o];s&&s.ref&&"reportValidity"in s.ref?r(s.ref,o,e):s&&s.refs&&s.refs.forEach(t=>r(t,o,e));}},s=(r,s)=>{s.shouldUseNativeValidation&&o$1(r,s);const n={};for(const o in r){const f=get(s.fields,o),c=Object.assign(r[o]||{},{ref:f&&f.ref});if(i(s.names||Object.keys(r),o)){const r=Object.assign({},get(n,o));set(r,"root",c),set(n,o,r);}else set(n,o,c);}return n},i=(e,t)=>{const r=n(t);return e.some(e=>n(e).match(`^${r}\\.\\d+`))};function n(e){return e.replace(/\]|\[/g,"")}
|
|
26126
26168
|
|
|
26127
26169
|
function o(o,n,s$1){return void 0===s$1&&(s$1={}),function(a,i,c){try{return Promise.resolve(function(t,r){try{var u=(null!=n&&n.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(o["sync"===s$1.mode?"validateSync":"validate"](a,Object.assign({abortEarly:!1},n,{context:i}))).then(function(t){return c.shouldUseNativeValidation&&o$1({},c),{values:s$1.raw?Object.assign({},a):t,errors:{}}}));}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return {values:{},errors:s((o=e,n=!c.shouldUseNativeValidation&&"all"===c.criteriaMode,(o.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var o=e[t.path].types,s=o&&o[t.type];e[t.path]=appendErrors(t.path,n,e,t.type,s?[].concat(s,t.message):t.message);}return e},{})),c)};var o,n;}))}catch(e){return Promise.reject(e)}}}
|
|
@@ -28545,6 +28587,8 @@ exports.LeafletLayer = LeafletLayer;
|
|
|
28545
28587
|
exports.List = CustomList;
|
|
28546
28588
|
exports.Loader = Loader;
|
|
28547
28589
|
exports.LocalizationProvider = Provider;
|
|
28590
|
+
exports.Modal = modal;
|
|
28591
|
+
exports.ModalStore = ModalStore;
|
|
28548
28592
|
exports.NoData = NoData;
|
|
28549
28593
|
exports.QueryProvider = QueryProvider;
|
|
28550
28594
|
exports.Select = CustomSelect;
|
|
@@ -28589,6 +28633,7 @@ exports.getValidLayer = getValidLayer;
|
|
|
28589
28633
|
exports.getWaterAreaLayers = getWaterAreaLayers;
|
|
28590
28634
|
exports.getWaterLinkLayers = getWaterLinkLayers;
|
|
28591
28635
|
exports.imagesPath = imagesPath;
|
|
28636
|
+
exports.modalStyle = modalStyle;
|
|
28592
28637
|
exports.queryClient = queryClient;
|
|
28593
28638
|
exports.rootStore = rootStore;
|
|
28594
28639
|
exports.sourceUrl = sourceUrl;
|