@mcurros2/microm 1.1.137-0 → 1.1.139-0

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/dist/index.js CHANGED
@@ -4290,8 +4290,14 @@ const $ea58ddf30d0b80dd$export$4a25ee9b30a3b11c = ({ modalProps: modalProps, ani
4290
4290
  children: [
4291
4291
  children,
4292
4292
  modals.map((modal, index)=>{
4293
- var _a, _b;
4293
+ var _a, _b, _c;
4294
4294
  const computedSizes = getModalSize(modal.props.size);
4295
+ const mobileSize = viewportWidth < 768 && [
4296
+ "md",
4297
+ "lg",
4298
+ "xl",
4299
+ "fullscreen"
4300
+ ].includes((_a = modal.initialSize) !== null && _a !== void 0 ? _a : "");
4295
4301
  return (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Modal).Root, {
4296
4302
  opened: modal.opened,
4297
4303
  onClose: ()=>$ea58ddf30d0b80dd$var$__awaiter(void 0, void 0, void 0, function*() {
@@ -4302,8 +4308,8 @@ const $ea58ddf30d0b80dd$export$4a25ee9b30a3b11c = ({ modalProps: modalProps, ani
4302
4308
  zIndex: (index + 1) * 5000,
4303
4309
  returnFocus: false,
4304
4310
  trapFocus: true,
4305
- closeOnClickOutside: (_a = modal.props.closeOnClickOutside) !== null && _a !== void 0 ? _a : false,
4306
- closeOnEscape: (_b = modal.props.closeOnEscape) !== null && _b !== void 0 ? _b : true,
4311
+ closeOnClickOutside: (_b = modal.props.closeOnClickOutside) !== null && _b !== void 0 ? _b : false,
4312
+ closeOnEscape: (_c = modal.props.closeOnEscape) !== null && _c !== void 0 ? _c : true,
4307
4313
  children: [
4308
4314
  (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Modal).Overlay, Object.assign({}, index === modals.length - 1 ? modalProps.overlayProps : transparentOverlay)),
4309
4315
  (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Modal).Content, {
@@ -4319,7 +4325,7 @@ const $ea58ddf30d0b80dd$export$4a25ee9b30a3b11c = ({ modalProps: modalProps, ani
4319
4325
  (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Group), {
4320
4326
  position: "right",
4321
4327
  children: [
4322
- modal.withFullscreenButton && (modal.initialSize !== "fullscreen" || modal.initialSize !== "100%") && (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.ActionIcon), {
4328
+ modal.withFullscreenButton && mobileSize === false && (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.ActionIcon), {
4323
4329
  onClick: (e)=>{
4324
4330
  e.stopPropagation();
4325
4331
  setModals((prev)=>prev.map((m, i)=>{
@@ -6424,10 +6430,18 @@ const $74f29643e1a74520$export$da03655abff5c59b = {
6424
6430
  function $74f29643e1a74520$export$6f2f7bc6c278ece1(props) {
6425
6431
  const { initialLocale: initialLocale } = (0, $b4te3$mantinecore.useComponentDefaultProps)("useLocaleFormat", $74f29643e1a74520$export$da03655abff5c59b, props);
6426
6432
  const [locale, setLocale] = (0, $b4te3$react.useState)(initialLocale);
6427
- const formatValue = (0, $b4te3$react.useCallback)((value, sqlType)=>(0, $7ttm6.formatSQLValue)(value, sqlType, locale), [
6433
+ const formatValue = (0, $b4te3$react.useCallback)(function(value, sqlType) {
6434
+ const result = (0, $7ttm6.formatSQLValue)(value, sqlType, locale);
6435
+ return result;
6436
+ }, [
6428
6437
  locale
6429
6438
  ]);
6430
- const getNativeValue = (0, $b4te3$react.useCallback)((value, sqlType)=>(0, $7ttm6.convertToNativeValue)(value, sqlType), []);
6439
+ const getNativeValue = (0, $b4te3$react.useCallback)(function(value, sqlType) {
6440
+ const result = (0, $7ttm6.convertToNativeValue)(value, sqlType);
6441
+ return result;
6442
+ }, [
6443
+ locale
6444
+ ]); // locale is here so the values captured here are in sync with formatValue
6431
6445
  const formatColumnValue = (0, $b4te3$react.useCallback)((col)=>{
6432
6446
  const result = (0, $7ttm6.formatSQLValue)(col.value, col.type, locale);
6433
6447
  return result === "null" ? "" : result;