@artibet/react-mui-components 3.8.13 → 3.8.14

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.
Files changed (2) hide show
  1. package/hooks/index.js +1 -1
  2. package/package.json +1 -1
package/hooks/index.js CHANGED
@@ -1 +1 @@
1
- import r,{useState as n,useCallback as e}from"react";import t from"nprogress";import{router as o}from"@inertiajs/react";function i(r,n){(null==n||n>r.length)&&(n=r.length);for(var e=0,t=Array(n);e<n;e++)t[e]=r[e];return t}function s(r,n,e){return(n=function(r){var n=function(r,n){if("object"!=typeof r||!r)return r;var e=r[Symbol.toPrimitive];if(void 0!==e){var t=e.call(r,n);if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(r)}(r,"string");return"symbol"==typeof n?n:n+""}(n))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function u(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),e.push.apply(e,t)}return e}function a(r){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?u(Object(e),!0).forEach((function(n){s(r,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))}))}return r}function c(r,n){return function(r){if(Array.isArray(r))return r}(r)||function(r,n){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var t,o,i,s,u=[],a=!0,c=!1;try{if(i=(e=e.call(r)).next,0===n);else for(;!(a=(t=i.call(e)).done)&&(u.push(t.value),u.length!==n);a=!0);}catch(r){c=!0,o=r}finally{try{if(!a&&null!=e.return&&(s=e.return(),Object(s)!==s))return}finally{if(c)throw o}}return u}}(r,n)||function(r,n){if(r){if("string"==typeof r)return i(r,n);var e={}.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(r,n):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}!function(r,n){void 0===n&&(n={});var e=n.insertAt;if("undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===e&&t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r))}}("#nprogress {\r\n pointer-events: none;\r\n}\r\n\r\n#nprogress .bar {\r\n background: #29d;\r\n position: fixed;\r\n z-index: 99999;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 4px;\r\n}\r\n\r\n/* Fancy blur effect */\r\n#nprogress .peg {\r\n display: block;\r\n position: absolute;\r\n right: 0px;\r\n width: 100px;\r\n height: 100%;\r\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\r\n opacity: 1.0;\r\n -webkit-transform: rotate(3deg) translate(0px, -4px);\r\n -ms-transform: rotate(3deg) translate(0px, -4px);\r\n transform: rotate(3deg) translate(0px, -4px);\r\n}\r\n\r\n/* Remove these to get rid of the spinner */\r\n#nprogress .spinner {\r\n display: block;\r\n position: fixed;\r\n z-index: 1031;\r\n top: 15px;\r\n right: 15px;\r\n}\r\n\r\n#nprogress .spinner-icon {\r\n width: 18px;\r\n height: 18px;\r\n box-sizing: border-box;\r\n border: solid 2px transparent;\r\n border-top-color: #29d;\r\n border-left-color: #29d;\r\n border-radius: 50%;\r\n -webkit-animation: nprogress-spinner 400ms linear infinite;\r\n animation: nprogress-spinner 400ms linear infinite;\r\n}\r\n\r\n.nprogress-custom-parent {\r\n overflow: hidden;\r\n position: relative;\r\n}\r\n\r\n.nprogress-custom-parent #nprogress .spinner,\r\n.nprogress-custom-parent #nprogress .bar {\r\n position: absolute;\r\n}\r\n\r\n@-webkit-keyframes nprogress-spinner {\r\n 0% {\r\n -webkit-transform: rotate(0deg);\r\n }\r\n\r\n 100% {\r\n -webkit-transform: rotate(360deg);\r\n }\r\n}\r\n\r\n@keyframes nprogress-spinner {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}");var l=function(){var n=c(r.useState(!1),2),e=n[0],o=n[1];return{loader:e,startLoader:function(){o(!0),t.start()},stopLoader:function(){o(!1),t.done()}}},p=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=c(n(!1),2),i=t[0],s=t[1],u=c(n(r),2),l=u[0],p=u[1],f=c(n(!1),2),d=f[0],g=f[1],b=e((function(){p(null),s(!0)}),[]),m=e((function(r){p(r),s(!0)}),[]),h=e((function(){d||(s(!1),p(null))}),[d]);return{isOpen:i,data:l,processing:d,create:b,edit:m,close:h,submit:function(r,n,e){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{preserveScroll:!0,onFinish:function(){}};g(!0),o[r](n,e,a(a({},t),{},{onFinish:function(r){function n(){return r.apply(this,arguments)}return n.toString=function(){return r.toString()},n}((function(){g(!1),onFinish()})),onSuccess:function(){return h()}}))},isEdit:!!l}},f=function(){var r=c(n(!1),2),t=r[0],i=r[1],s=c(n(null),2),u=s[0],l=s[1],p=c(n(!1),2),f=p[0],d=p[1],g=e((function(){l(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null),i(!0)}),[]),b=e((function(){f||(i(!1),l(null))}),[f]);return{isOpen:t,data:u,processing:f,open:g,close:b,execute:function(r,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{preserveScroll:!0};d(!0),o[r](n,a(a({},e),{},{onSuccess:function(){return b()},onFinish:function(){return d(!1)}}))},putRequest:function(r,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{preserveScroll:!0};d(!0),o.put(r,n,a(a({},e),{},{onSuccess:function(){return b()},onFinish:function(){return d(!1)}}))},postRequest:function(r,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{preserveScroll:!0};d(!0),o.post(r,n,a(a({},e),{},{onSuccess:function(){return b()},onFinish:function(){return d(!1)}}))},deleteRequest:function(r,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{preserveScroll:!0};d(!0),o.delete(n,a(a({},e),{},{onSuccess:function(){return b()},onFinish:function(){return d(!1)}}))}}};export{f as useConfirm,l as useLoader,p as useModalForm};
1
+ import r,{useState as n,useCallback as e}from"react";import t from"nprogress";import{router as o}from"@inertiajs/react";function i(r,n){(null==n||n>r.length)&&(n=r.length);for(var e=0,t=Array(n);e<n;e++)t[e]=r[e];return t}function s(r,n,e){return(n=function(r){var n=function(r,n){if("object"!=typeof r||!r)return r;var e=r[Symbol.toPrimitive];if(void 0!==e){var t=e.call(r,n);if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(r)}(r,"string");return"symbol"==typeof n?n:n+""}(n))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function u(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),e.push.apply(e,t)}return e}function a(r){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?u(Object(e),!0).forEach((function(n){s(r,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))}))}return r}function c(r,n){return function(r){if(Array.isArray(r))return r}(r)||function(r,n){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var t,o,i,s,u=[],a=!0,c=!1;try{if(i=(e=e.call(r)).next,0===n);else for(;!(a=(t=i.call(e)).done)&&(u.push(t.value),u.length!==n);a=!0);}catch(r){c=!0,o=r}finally{try{if(!a&&null!=e.return&&(s=e.return(),Object(s)!==s))return}finally{if(c)throw o}}return u}}(r,n)||function(r,n){if(r){if("string"==typeof r)return i(r,n);var e={}.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(r,n):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}!function(r,n){void 0===n&&(n={});var e=n.insertAt;if("undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===e&&t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r))}}("#nprogress {\r\n pointer-events: none;\r\n}\r\n\r\n#nprogress .bar {\r\n background: #29d;\r\n position: fixed;\r\n z-index: 99999;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 4px;\r\n}\r\n\r\n/* Fancy blur effect */\r\n#nprogress .peg {\r\n display: block;\r\n position: absolute;\r\n right: 0px;\r\n width: 100px;\r\n height: 100%;\r\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\r\n opacity: 1.0;\r\n -webkit-transform: rotate(3deg) translate(0px, -4px);\r\n -ms-transform: rotate(3deg) translate(0px, -4px);\r\n transform: rotate(3deg) translate(0px, -4px);\r\n}\r\n\r\n/* Remove these to get rid of the spinner */\r\n#nprogress .spinner {\r\n display: block;\r\n position: fixed;\r\n z-index: 1031;\r\n top: 15px;\r\n right: 15px;\r\n}\r\n\r\n#nprogress .spinner-icon {\r\n width: 18px;\r\n height: 18px;\r\n box-sizing: border-box;\r\n border: solid 2px transparent;\r\n border-top-color: #29d;\r\n border-left-color: #29d;\r\n border-radius: 50%;\r\n -webkit-animation: nprogress-spinner 400ms linear infinite;\r\n animation: nprogress-spinner 400ms linear infinite;\r\n}\r\n\r\n.nprogress-custom-parent {\r\n overflow: hidden;\r\n position: relative;\r\n}\r\n\r\n.nprogress-custom-parent #nprogress .spinner,\r\n.nprogress-custom-parent #nprogress .bar {\r\n position: absolute;\r\n}\r\n\r\n@-webkit-keyframes nprogress-spinner {\r\n 0% {\r\n -webkit-transform: rotate(0deg);\r\n }\r\n\r\n 100% {\r\n -webkit-transform: rotate(360deg);\r\n }\r\n}\r\n\r\n@keyframes nprogress-spinner {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}");var l=function(){var n=c(r.useState(!1),2),e=n[0],o=n[1];return{loader:e,startLoader:function(){o(!0),t.start()},stopLoader:function(){o(!1),t.done()}}},p=["onFinish","onSuccess","preserveScroll"],f=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=c(n(!1),2),i=t[0],s=t[1],u=c(n(r),2),l=u[0],f=u[1],d=c(n(!1),2),g=d[0],b=d[1],v=e((function(){f(null),s(!0)}),[]),m=e((function(r){f(r),s(!0)}),[]),h=e((function(){g||(s(!1),f(null))}),[g]);return{isOpen:i,data:l,processing:g,create:v,edit:m,close:h,submit:function(r,n,e){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};b(!0);var i=t.onFinish,s=void 0===i?function(){}:i,u=t.onSuccess,c=void 0===u?function(){}:u,l=t.preserveScroll,f=void 0===l||l,d=function(r,n){if(null==r)return{};var e,t,o=function(r,n){if(null==r)return{};var e={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(-1!==n.indexOf(t))continue;e[t]=r[t]}return e}(r,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t<i.length;t++)e=i[t],-1===n.indexOf(e)&&{}.propertyIsEnumerable.call(r,e)&&(o[e]=r[e])}return o}(t,p);o[r](n,e,a(a({},d),{},{preserveScroll:f,onFinish:function(){b(!1),s()},onSuccess:function(r){h(),c(r)}}))},isEdit:!!l}},d=function(){var r=c(n(!1),2),t=r[0],i=r[1],s=c(n(null),2),u=s[0],l=s[1],p=c(n(!1),2),f=p[0],d=p[1],g=e((function(){l(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null),i(!0)}),[]),b=e((function(){f||(i(!1),l(null))}),[f]);return{isOpen:t,data:u,processing:f,open:g,close:b,execute:function(r,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{preserveScroll:!0};d(!0),o[r](n,a(a({},e),{},{onSuccess:function(){return b()},onFinish:function(){return d(!1)}}))},putRequest:function(r,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{preserveScroll:!0};d(!0),o.put(r,n,a(a({},e),{},{onSuccess:function(){return b()},onFinish:function(){return d(!1)}}))},postRequest:function(r,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{preserveScroll:!0};d(!0),o.post(r,n,a(a({},e),{},{onSuccess:function(){return b()},onFinish:function(){return d(!1)}}))},deleteRequest:function(r,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{preserveScroll:!0};d(!0),o.delete(n,a(a({},e),{},{onSuccess:function(){return b()},onFinish:function(){return d(!1)}}))}}};export{d as useConfirm,l as useLoader,f as useModalForm};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artibet/react-mui-components",
3
- "version": "3.8.13",
3
+ "version": "3.8.14",
4
4
  "description": "Various react components build with mui library",
5
5
  "main": "./core/index.js",
6
6
  "scripts": {