@m4l/components 3.1.6 → 3.1.8

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 (203) hide show
  1. package/components/mui_extended/IconButton/index.d.ts +1 -1
  2. package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +2 -4
  3. package/index.js +183 -339
  4. package/node_modules-CQtkw0uG.js +7350 -0
  5. package/package.json +1 -1
  6. package/vendor-AfIOyqRr.js +24636 -0
  7. package/components/AccountPopover/index-BdnzI23R.js +0 -334
  8. package/components/AppBar/index-Dvrx1jsr.js +0 -93
  9. package/components/BaseModule/index-BQ2UIUCy.js +0 -30
  10. package/components/CommonActions/components/ActionCancel/index-DSVEMl41.js +0 -12
  11. package/components/CommonActions/components/ActionFormCancel/index-DMsGH0wx.js +0 -56
  12. package/components/CommonActions/components/ActionFormIntro/index-C8zb7R3W.js +0 -33
  13. package/components/CommonActions/components/ActionIntro/index-BNIG3KAH.js +0 -25
  14. package/components/CommonActions/components/Actions/index-90JsZTzb.js +0 -70
  15. package/components/DataGrid/constants-8L7QgBKi.js +0 -10
  16. package/components/DataGrid/formatters/ColumnBooleanFormatter/index-ZsSxUL_T.js +0 -26
  17. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index-D-gZpvcm.js +0 -22
  18. package/components/DataGrid/formatters/ColumnDateFormatter/index-CKg8CJ6A.js +0 -19
  19. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index-kZGiDU5k.js +0 -23
  20. package/components/DataGrid/formatters/ColumnNestedValueFormatter/index-BslXGK-A.js +0 -14
  21. package/components/DataGrid/formatters/ColumnPointsFormatter/index-BXGW2CsK.js +0 -10
  22. package/components/DataGrid/formatters/ColumnPriceFormatter/index-O11tBykn.js +0 -10
  23. package/components/DataGrid/formatters/ColumnSetCheckFormatter/index-BaCawLr1.js +0 -36
  24. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index-Cq7a-jnE.js +0 -10
  25. package/components/DataGrid/formatters/index-iKq2iRoa.js +0 -13
  26. package/components/DataGrid/index-DGHnRo8z.js +0 -908
  27. package/components/DataGrid/subcomponents/Actions/index-BhBvobKS.js +0 -549
  28. package/components/DataGrid/subcomponents/editors/TextEditor/index-BIFm8akr.js +0 -80
  29. package/components/DragResizeWindow/index-D2jLYExo.js +0 -505
  30. package/components/DynamicFilter/constants-ByqmFATV.js +0 -31
  31. package/components/DynamicFilter/dictionary-D9Z9YGDb.js +0 -51
  32. package/components/DynamicFilter/index-CRmtRWlr.js +0 -116
  33. package/components/DynamicFilter/slots/SlotsEnum-cawFeNzx.js +0 -34
  34. package/components/DynamicFilter/slots/dynamicFilterSlots-CQiB8TmY.js +0 -151
  35. package/components/DynamicFilter/slots/index-l0sNRNKZ.js +0 -1
  36. package/components/DynamicFilter/store/index-DoIifWTk.js +0 -254
  37. package/components/DynamicFilter/subcomponents/AppliedFilterChip/index-DQESCg04.js +0 -60
  38. package/components/DynamicFilter/subcomponents/AppliedFilters/index-CGmflaoY.js +0 -26
  39. package/components/DynamicFilter/subcomponents/DynamicFilterBase/index-BfH6YHNi.js +0 -40
  40. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index-Dv3KjuYK.js +0 -129
  41. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index-BnhNICK4.js +0 -171
  42. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index-CNN6DeHY.js +0 -153
  43. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index-C2dNPFtM.js +0 -146
  44. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index-B03ahaU6.js +0 -114
  45. package/components/DynamicFilter/subcomponents/FieldTypes/index-EF7A6WnZ.js +0 -38
  46. package/components/DynamicFilter/subcomponents/FilterActions/index-CQtA2ELu.js +0 -88
  47. package/components/DynamicFilter/subcomponents/InputFilter/index-EXbXDSZA.js +0 -188
  48. package/components/DynamicFilter/subcomponents/PopoverFilter/index-BX8YCh9v.js +0 -158
  49. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index-DvAYf5-a.js +0 -63
  50. package/components/FieldLabel/index-C8od8D0w.js +0 -54
  51. package/components/GridLayout/index-EPw3AYiQ.js +0 -1044
  52. package/components/GridLayout/subcomponents/Griditem/index-B8Q7iMhr.js +0 -395
  53. package/components/GridLayout/subcomponents/Responsive/index-D6BbBdVx.js +0 -348
  54. package/components/GridLayout/subcomponents/SizeProvider/index-OhbtnEN4.js +0 -71
  55. package/components/HelperText/index-sLK3dYG0.js +0 -50
  56. package/components/Icon/index-BJF_0F6d.js +0 -176
  57. package/components/Image/index-BxphCFC7.js +0 -175
  58. package/components/LanguagePopover/index-CkKie1Ph.js +0 -179
  59. package/components/LinearProgressIndeterminate/index-CTvXOPRx.js +0 -55
  60. package/components/Loadable/index-BMbi9ISF.js +0 -9
  61. package/components/LoadingError/index-BaaPhmyF.js +0 -89
  62. package/components/MFIsolationApp/index-BfHLGDcN.js +0 -169
  63. package/components/MFLoader/index-B8FmSpE7.js +0 -299
  64. package/components/ModalDialog/index-WSVr5sZr.js +0 -77
  65. package/components/NavLink/index-CKgi5l5M.js +0 -55
  66. package/components/NoItemSelected/index-BKsZKc_f.js +0 -54
  67. package/components/ObjectLogs/index-BJkjYQaa.js +0 -233
  68. package/components/PDFViewer/index-Cnbioqzo.js +0 -51
  69. package/components/Page/index-DSSwuNSp.js +0 -117
  70. package/components/PaperForm/index-C1OKDnuY.js +0 -59
  71. package/components/Period/index-DYE7Bj45.js +0 -238
  72. package/components/PrintingSystem/index-BkfHXcTV.js +0 -187
  73. package/components/PrintingSystem/subcomponents/BodyNode/index-Btg2zXVQ.js +0 -49
  74. package/components/PrintingSystem/subcomponents/ChartNode/index-GLjhqKd2.js +0 -105
  75. package/components/PrintingSystem/subcomponents/DividerNode/index-D9T1MWQd.js +0 -20
  76. package/components/PrintingSystem/subcomponents/FooterNode/index-C3LET1ZY.js +0 -49
  77. package/components/PrintingSystem/subcomponents/GridNode/index-BPz7lGvC.js +0 -74
  78. package/components/PrintingSystem/subcomponents/HeaderNode/index-DY4Yci1r.js +0 -49
  79. package/components/PrintingSystem/subcomponents/PaperNode/index-BYoGJll5.js +0 -30
  80. package/components/PrintingSystem/subcomponents/PropertyValueNode/index-vFZ5Skyl.js +0 -47
  81. package/components/PrintingSystem/subcomponents/SectionNode/index-BNqGWpcj.js +0 -49
  82. package/components/PrintingSystem/subcomponents/TextBoxNode/index-wgdfWbfF.js +0 -24
  83. package/components/PropertyValue/index-dwO3Qo0Y.js +0 -264
  84. package/components/Resizeable/index-CHseEYjL.js +0 -20
  85. package/components/ScrollBar/index-BYMy_qJE.js +0 -35
  86. package/components/ScrollToTop/index-TxORk5dB.js +0 -12
  87. package/components/SideBar/index-DqKD_S9_.js +0 -758
  88. package/components/SplitLayout/index-D4lxi0ig.js +0 -89
  89. package/components/ToastContainer/index-jnQcIcV1.js +0 -191
  90. package/components/WrapperComponent/index-BHV-CsDU.js +0 -14
  91. package/components/animate/LoadingScreen/index-CTGGa4Yt.js +0 -70
  92. package/components/animate/MotionContainer/index-eartnWyO.js +0 -34
  93. package/components/animate/MotionLazyContainer/index-Be8osTiG.js +0 -9
  94. package/components/animate/PropagateLoader/index-Bkq8V2SN.js +0 -23
  95. package/components/animate/features-BbnE33u3.js +0 -5
  96. package/components/animate/index-9dC9NmWv.js +0 -89
  97. package/components/animate/variants/bounce-DanQqHAX.js +0 -101
  98. package/components/animate/variants/container-Dmpr6tg5.js +0 -22
  99. package/components/animate/variants/fade-CAOJNn06.js +0 -65
  100. package/components/animate/variants/index-l0sNRNKZ.js +0 -1
  101. package/components/animate/variants/transition-B9W5SWTa.js +0 -20
  102. package/components/areas/components/AreasAdmin/index-BU9AX60_.js +0 -699
  103. package/components/areas/components/AreasViewer/index-CPlZxIzK.js +0 -805
  104. package/components/areas/components/index-l0sNRNKZ.js +0 -1
  105. package/components/areas/constants-rqODZNZe.js +0 -6
  106. package/components/areas/contexts/AreasContext/index-DGguLxcX.js +0 -1110
  107. package/components/areas/contexts/DynamicMFParmsContext/index-22c6E7vK.js +0 -36
  108. package/components/areas/contexts/WindowToolsMFContext/index-DkE30fhm.js +0 -12
  109. package/components/areas/contexts/index-l0sNRNKZ.js +0 -1
  110. package/components/areas/dictionary-YUsP9beq.js +0 -36
  111. package/components/areas/hooks/index-l0sNRNKZ.js +0 -1
  112. package/components/areas/hooks/useAreas/index-DBXtbtIu.js +0 -11
  113. package/components/areas/hooks/useDynamicMFParameters/index-DhbcZPs9.js +0 -12
  114. package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle-BzPD-miW.js +0 -31
  115. package/components/areas/hooks/useWindowToolsMF/index-BECQfhbC.js +0 -10
  116. package/components/areas/icons-CwFr-alN.js +0 -24
  117. package/components/areas/index-B_Odny9h.js +0 -22
  118. package/components/commercial/AppBarCommercial/index-faX1fxjn.js +0 -28
  119. package/components/commercial/SectionCommercial/index-Dspd2Hd7.js +0 -56
  120. package/components/commercial/TopBar/index-zACdM_C0.js +0 -232
  121. package/components/commercial/index-9P0yOdH4.js +0 -81
  122. package/components/formatters/BooleanFormatter/index-PoFZ3r_m.js +0 -44
  123. package/components/formatters/DateFormatter/index-CGcRZ8BA.js +0 -43
  124. package/components/formatters/PointsFormatter/index-C7sR8iqk.js +0 -25
  125. package/components/formatters/PriceFormatter/index-CsvRawmc.js +0 -35
  126. package/components/formatters/UncertaintyFormatter/index-B9ESVEVp.js +0 -29
  127. package/components/formatters/index-CEJ6VCMb.js +0 -109
  128. package/components/hook-form/HelperError/index-DRvAkpwm.js +0 -19
  129. package/components/hook-form/RHFAutocomplete/index-DS57m8AX.js +0 -657
  130. package/components/hook-form/RHFAutocompleteAsync/index-Bu6NYmG_.js +0 -226
  131. package/components/hook-form/RHFCheckbox/index-BsB42rRc.js +0 -132
  132. package/components/hook-form/RHFColorPicker/index-Dox0FPrV.js +0 -191
  133. package/components/hook-form/RHFDateTime/index-ef19Az1N.js +0 -190
  134. package/components/hook-form/RHFMultiCheckbox/index-BARudV1A.js +0 -34
  135. package/components/hook-form/RHFPeriod/index-DyRLTD0w.js +0 -98
  136. package/components/hook-form/RHFRadioGroup/index-pgTLVF9t.js +0 -52
  137. package/components/hook-form/RHFSelect/index-LdwRuFz-.js +0 -29
  138. package/components/hook-form/RHFTextField/index-BgsElxUF.js +0 -337
  139. package/components/hook-form/RHFUpload/index-B6m3ypzh.js +0 -253
  140. package/components/maps/components/GpsTools/index-CeLi75XZ.js +0 -1948
  141. package/components/maps/components/Map/index-D4B8Lfgv.js +0 -2545
  142. package/components/maps/index-Ci-7-FHg.js +0 -7
  143. package/components/modal/WindowBase-CkftshqR.js +0 -44
  144. package/components/modal/WindowConfirm-C5YnzF-B.js +0 -73
  145. package/components/modal/index-CydPIpKZ.js +0 -65
  146. package/components/mui_extended/Accordion/index-jF2uxSmi.js +0 -124
  147. package/components/mui_extended/Avatar/index-CHmsrmfc.js +0 -64
  148. package/components/mui_extended/Badge/index-B_BGIjkQ.js +0 -29
  149. package/components/mui_extended/BoxIcon/index-BUTJ2tKw.js +0 -22
  150. package/components/mui_extended/Breadcrumbs/index-DTS7rOZH.js +0 -86
  151. package/components/mui_extended/Button/index-CgvCim_g.js +0 -222
  152. package/components/mui_extended/CheckBox-H73kpinr.js +0 -76
  153. package/components/mui_extended/CircularProgress/index-Bnnti_G6.js +0 -8
  154. package/components/mui_extended/IconButton/classes/constants-ChY2jKkp.js +0 -4
  155. package/components/mui_extended/IconButton/classes/index-BxjJGAqZ.js +0 -45
  156. package/components/mui_extended/IconButton/index-B8lOMybH.js +0 -117
  157. package/components/mui_extended/IconButton/styledIconButton-fAsbGoFS.js +0 -7
  158. package/components/mui_extended/IconButton/types-l0sNRNKZ.js +0 -1
  159. package/components/mui_extended/LinearProgress/index-CGgW8jq2.js +0 -9
  160. package/components/mui_extended/LinkWithRoute/index-BC2miUjR.js +0 -15
  161. package/components/mui_extended/MenuActions/MenuActions-DA_aS7o5.js +0 -149
  162. package/components/mui_extended/MenuActions/constants-BwsU9chA.js +0 -10
  163. package/components/mui_extended/MenuActions/dictionary-Dj_07puT.js +0 -11
  164. package/components/mui_extended/MenuActions/slots/MenuActionsEnum-Bu-L6eWU.js +0 -13
  165. package/components/mui_extended/MenuActions/slots/MenuActionsSlots-BVp0M8fu.js +0 -47
  166. package/components/mui_extended/Pager/index-Dtk4aUiU.js +0 -257
  167. package/components/mui_extended/Popover/index-Dl1PwIS2.js +0 -153
  168. package/components/mui_extended/Stack/index-CRzpVi2a.js +0 -31
  169. package/components/mui_extended/Tab/index-DmrsMLOq.js +0 -129
  170. package/components/mui_extended/ToggleButton/index-CAnHC1N-.js +0 -18
  171. package/components/mui_extended/Tooltip/index-B8QUytCK.js +0 -42
  172. package/components/mui_extended/Typography/index-DXq1fG8k.js +0 -54
  173. package/components/mui_extended/index-l0sNRNKZ.js +0 -1
  174. package/components/popups/PopupsProvider/index-DhSxmtfJ.js +0 -172
  175. package/components/popups/PopupsViewer/constants-DuyD7aCn.js +0 -4
  176. package/components/popups/PopupsViewer/icons-BUujqqbu.js +0 -7
  177. package/components/popups/PopupsViewer/index-CMI1SK_O.js +0 -172
  178. package/components/popups/PopupsViewer/slots/index-B98CiRLa.js +0 -14
  179. package/components/popups/PopupsViewer/slots/popupsViewerSlots-DOkmuvnx.js +0 -46
  180. package/components/popups/index-l0sNRNKZ.js +0 -1
  181. package/contexts/ModalContext/index-Bp_s1qUm.js +0 -39
  182. package/contexts/RHFormContext/index-BQ0XWrpK.js +0 -78
  183. package/hocs/withToggle/index-C1_DMZD3.js +0 -14
  184. package/hooks/useFormAddEdit/index-dLVQB7hC.js +0 -90
  185. package/hooks/useFormReadyForUpdate/index-B3HygFCM.js +0 -20
  186. package/hooks/useModal/index-69rbrQ0v.js +0 -10
  187. package/hooks/useSizeContainer/index-D4hDjM1P.js +0 -37
  188. package/hooks/useStateRef/index-C3P6ZK3m.js +0 -15
  189. package/hooks/useTab/index-DYRxOmMI.js +0 -12
  190. package/react-data-grid-BfYuZ6AK.js +0 -2606
  191. package/react-draggable-DsCPdgQP.js +0 -811
  192. package/react-json-view-bhqIAaNg.js +0 -2576
  193. package/react-resizable-eBbFl2dX.js +0 -618
  194. package/react-spinners-TpKN9lZg.js +0 -123
  195. package/react-splitter-layout-C-JTsNGs.js +0 -158
  196. package/styles/DynamicFilter-CJFsIegc.js +0 -319
  197. package/styles/MenuActions-lTi-ynPM.js +0 -42
  198. package/styles/index-CqpubQQr.js +0 -1691
  199. package/test/constants_no_mock-CF-669v-.js +0 -4
  200. package/test/getNameDataTestId-BaBTWhBr.js +0 -10
  201. package/utils/index-DiMrtgIu.js +0 -502
  202. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/index.d.ts +0 -0
  203. /package/components/GridLayout/subcomponents/{Griditem → GridItem}/types.d.ts +0 -0
@@ -1,4 +0,0 @@
1
- const TEST_PROP_ID = "data-testid";
2
- export {
3
- TEST_PROP_ID as T
4
- };
@@ -1,10 +0,0 @@
1
- const getNameDataTestId = (ELEMENT_PREFIX, ELEMENT_KEY, ELEMENT_ID) => {
2
- return `${ELEMENT_PREFIX}-${[ELEMENT_KEY]}-${ELEMENT_ID}`;
3
- };
4
- function getPropDataTestId(prefix, keyName) {
5
- return process.env.NODE_ENV !== "production" && prefix && keyName ? { ["data-testid"]: `${prefix}-${[keyName]}` } : {};
6
- }
7
- export {
8
- getPropDataTestId as a,
9
- getNameDataTestId as g
10
- };
@@ -1,502 +0,0 @@
1
- import { generateUtilityClass } from "@mui/material";
2
- import React__default from "react";
3
- function isValidDate(d) {
4
- return d && d instanceof Date && !isNaN(d.getTime());
5
- }
6
- function getComponentUtilityClass(componentName) {
7
- return (slot) => generateUtilityClass(componentName, slot);
8
- }
9
- var domFns = {};
10
- var shims = {};
11
- Object.defineProperty(shims, "__esModule", {
12
- value: true
13
- });
14
- shims.dontSetMe = dontSetMe;
15
- shims.findInArray = findInArray;
16
- shims.int = int;
17
- shims.isFunction = isFunction;
18
- shims.isNum = isNum;
19
- function findInArray(array, callback) {
20
- for (let i = 0, length = array.length; i < length; i++) {
21
- if (callback.apply(callback, [array[i], i, array])) return array[i];
22
- }
23
- }
24
- function isFunction(func) {
25
- return typeof func === "function" || Object.prototype.toString.call(func) === "[object Function]";
26
- }
27
- function isNum(num) {
28
- return typeof num === "number" && !isNaN(num);
29
- }
30
- function int(a) {
31
- return parseInt(a, 10);
32
- }
33
- function dontSetMe(props, propName, componentName) {
34
- if (props[propName]) {
35
- return new Error("Invalid prop ".concat(propName, " passed to ").concat(componentName, " - do not set this, set it on the child."));
36
- }
37
- }
38
- var getPrefix$1 = {};
39
- Object.defineProperty(getPrefix$1, "__esModule", {
40
- value: true
41
- });
42
- getPrefix$1.browserPrefixToKey = browserPrefixToKey;
43
- getPrefix$1.browserPrefixToStyle = browserPrefixToStyle;
44
- getPrefix$1.default = void 0;
45
- getPrefix$1.getPrefix = getPrefix;
46
- const prefixes = ["Moz", "Webkit", "O", "ms"];
47
- function getPrefix() {
48
- var _window$document;
49
- let prop = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
50
- if (typeof window === "undefined") return "";
51
- const style = (_window$document = window.document) === null || _window$document === void 0 || (_window$document = _window$document.documentElement) === null || _window$document === void 0 ? void 0 : _window$document.style;
52
- if (!style) return "";
53
- if (prop in style) return "";
54
- for (let i = 0; i < prefixes.length; i++) {
55
- if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];
56
- }
57
- return "";
58
- }
59
- function browserPrefixToKey(prop, prefix) {
60
- return prefix ? "".concat(prefix).concat(kebabToTitleCase(prop)) : prop;
61
- }
62
- function browserPrefixToStyle(prop, prefix) {
63
- return prefix ? "-".concat(prefix.toLowerCase(), "-").concat(prop) : prop;
64
- }
65
- function kebabToTitleCase(str) {
66
- let out = "";
67
- let shouldCapitalize = true;
68
- for (let i = 0; i < str.length; i++) {
69
- if (shouldCapitalize) {
70
- out += str[i].toUpperCase();
71
- shouldCapitalize = false;
72
- } else if (str[i] === "-") {
73
- shouldCapitalize = true;
74
- } else {
75
- out += str[i];
76
- }
77
- }
78
- return out;
79
- }
80
- getPrefix$1.default = getPrefix();
81
- Object.defineProperty(domFns, "__esModule", {
82
- value: true
83
- });
84
- domFns.addClassName = addClassName;
85
- domFns.addEvent = addEvent;
86
- domFns.addUserSelectStyles = addUserSelectStyles;
87
- domFns.createCSSTransform = createCSSTransform;
88
- domFns.createSVGTransform = createSVGTransform;
89
- domFns.getTouch = getTouch;
90
- domFns.getTouchIdentifier = getTouchIdentifier;
91
- domFns.getTranslation = getTranslation;
92
- domFns.innerHeight = innerHeight;
93
- domFns.innerWidth = innerWidth;
94
- domFns.matchesSelector = matchesSelector;
95
- domFns.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;
96
- domFns.offsetXYFromParent = offsetXYFromParent;
97
- domFns.outerHeight = outerHeight;
98
- domFns.outerWidth = outerWidth;
99
- domFns.removeClassName = removeClassName;
100
- domFns.removeEvent = removeEvent;
101
- domFns.removeUserSelectStyles = removeUserSelectStyles;
102
- var _shims$1 = shims;
103
- var _getPrefix = _interopRequireWildcard(getPrefix$1);
104
- function _getRequireWildcardCache(nodeInterop) {
105
- if (typeof WeakMap !== "function") return null;
106
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
107
- var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
108
- return (_getRequireWildcardCache = function(nodeInterop2) {
109
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
110
- })(nodeInterop);
111
- }
112
- function _interopRequireWildcard(obj, nodeInterop) {
113
- if (obj && obj.__esModule) {
114
- return obj;
115
- }
116
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
117
- return { default: obj };
118
- }
119
- var cache = _getRequireWildcardCache(nodeInterop);
120
- if (cache && cache.has(obj)) {
121
- return cache.get(obj);
122
- }
123
- var newObj = {};
124
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
125
- for (var key in obj) {
126
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
127
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
128
- if (desc && (desc.get || desc.set)) {
129
- Object.defineProperty(newObj, key, desc);
130
- } else {
131
- newObj[key] = obj[key];
132
- }
133
- }
134
- }
135
- newObj.default = obj;
136
- if (cache) {
137
- cache.set(obj, newObj);
138
- }
139
- return newObj;
140
- }
141
- let matchesSelectorFunc = "";
142
- function matchesSelector(el, selector) {
143
- if (!matchesSelectorFunc) {
144
- matchesSelectorFunc = (0, _shims$1.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(method) {
145
- return (0, _shims$1.isFunction)(el[method]);
146
- });
147
- }
148
- if (!(0, _shims$1.isFunction)(el[matchesSelectorFunc])) return false;
149
- return el[matchesSelectorFunc](selector);
150
- }
151
- function matchesSelectorAndParentsTo(el, selector, baseNode) {
152
- let node = el;
153
- do {
154
- if (matchesSelector(node, selector)) return true;
155
- if (node === baseNode) return false;
156
- node = node.parentNode;
157
- } while (node);
158
- return false;
159
- }
160
- function addEvent(el, event, handler, inputOptions) {
161
- if (!el) return;
162
- const options = {
163
- capture: true,
164
- ...inputOptions
165
- };
166
- if (el.addEventListener) {
167
- el.addEventListener(event, handler, options);
168
- } else if (el.attachEvent) {
169
- el.attachEvent("on" + event, handler);
170
- } else {
171
- el["on" + event] = handler;
172
- }
173
- }
174
- function removeEvent(el, event, handler, inputOptions) {
175
- if (!el) return;
176
- const options = {
177
- capture: true,
178
- ...inputOptions
179
- };
180
- if (el.removeEventListener) {
181
- el.removeEventListener(event, handler, options);
182
- } else if (el.detachEvent) {
183
- el.detachEvent("on" + event, handler);
184
- } else {
185
- el["on" + event] = null;
186
- }
187
- }
188
- function outerHeight(node) {
189
- let height = node.clientHeight;
190
- const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
191
- height += (0, _shims$1.int)(computedStyle.borderTopWidth);
192
- height += (0, _shims$1.int)(computedStyle.borderBottomWidth);
193
- return height;
194
- }
195
- function outerWidth(node) {
196
- let width = node.clientWidth;
197
- const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
198
- width += (0, _shims$1.int)(computedStyle.borderLeftWidth);
199
- width += (0, _shims$1.int)(computedStyle.borderRightWidth);
200
- return width;
201
- }
202
- function innerHeight(node) {
203
- let height = node.clientHeight;
204
- const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
205
- height -= (0, _shims$1.int)(computedStyle.paddingTop);
206
- height -= (0, _shims$1.int)(computedStyle.paddingBottom);
207
- return height;
208
- }
209
- function innerWidth(node) {
210
- let width = node.clientWidth;
211
- const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
212
- width -= (0, _shims$1.int)(computedStyle.paddingLeft);
213
- width -= (0, _shims$1.int)(computedStyle.paddingRight);
214
- return width;
215
- }
216
- function offsetXYFromParent(evt, offsetParent, scale) {
217
- const isBody = offsetParent === offsetParent.ownerDocument.body;
218
- const offsetParentRect = isBody ? {
219
- left: 0,
220
- top: 0
221
- } : offsetParent.getBoundingClientRect();
222
- const x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;
223
- const y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;
224
- return {
225
- x,
226
- y
227
- };
228
- }
229
- function createCSSTransform(controlPos, positionOffset) {
230
- const translation = getTranslation(controlPos, positionOffset, "px");
231
- return {
232
- [(0, _getPrefix.browserPrefixToKey)("transform", _getPrefix.default)]: translation
233
- };
234
- }
235
- function createSVGTransform(controlPos, positionOffset) {
236
- const translation = getTranslation(controlPos, positionOffset, "");
237
- return translation;
238
- }
239
- function getTranslation(_ref, positionOffset, unitSuffix) {
240
- let {
241
- x,
242
- y
243
- } = _ref;
244
- let translation = "translate(".concat(x).concat(unitSuffix, ",").concat(y).concat(unitSuffix, ")");
245
- if (positionOffset) {
246
- const defaultX = "".concat(typeof positionOffset.x === "string" ? positionOffset.x : positionOffset.x + unitSuffix);
247
- const defaultY = "".concat(typeof positionOffset.y === "string" ? positionOffset.y : positionOffset.y + unitSuffix);
248
- translation = "translate(".concat(defaultX, ", ").concat(defaultY, ")") + translation;
249
- }
250
- return translation;
251
- }
252
- function getTouch(e, identifier) {
253
- return e.targetTouches && (0, _shims$1.findInArray)(e.targetTouches, (t) => identifier === t.identifier) || e.changedTouches && (0, _shims$1.findInArray)(e.changedTouches, (t) => identifier === t.identifier);
254
- }
255
- function getTouchIdentifier(e) {
256
- if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;
257
- if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;
258
- }
259
- function addUserSelectStyles(doc) {
260
- if (!doc) return;
261
- let styleEl = doc.getElementById("react-draggable-style-el");
262
- if (!styleEl) {
263
- styleEl = doc.createElement("style");
264
- styleEl.type = "text/css";
265
- styleEl.id = "react-draggable-style-el";
266
- styleEl.innerHTML = ".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n";
267
- styleEl.innerHTML += ".react-draggable-transparent-selection *::selection {all: inherit;}\n";
268
- doc.getElementsByTagName("head")[0].appendChild(styleEl);
269
- }
270
- if (doc.body) addClassName(doc.body, "react-draggable-transparent-selection");
271
- }
272
- function removeUserSelectStyles(doc) {
273
- if (!doc) return;
274
- try {
275
- if (doc.body) removeClassName(doc.body, "react-draggable-transparent-selection");
276
- if (doc.selection) {
277
- doc.selection.empty();
278
- } else {
279
- const selection = (doc.defaultView || window).getSelection();
280
- if (selection && selection.type !== "Caret") {
281
- selection.removeAllRanges();
282
- }
283
- }
284
- } catch (e) {
285
- }
286
- }
287
- function addClassName(el, className) {
288
- if (el.classList) {
289
- el.classList.add(className);
290
- } else {
291
- if (!el.className.match(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)")))) {
292
- el.className += " ".concat(className);
293
- }
294
- }
295
- }
296
- function removeClassName(el, className) {
297
- if (el.classList) {
298
- el.classList.remove(className);
299
- } else {
300
- el.className = el.className.replace(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)"), "g"), "");
301
- }
302
- }
303
- var positionFns = {};
304
- Object.defineProperty(positionFns, "__esModule", {
305
- value: true
306
- });
307
- positionFns.canDragX = canDragX;
308
- positionFns.canDragY = canDragY;
309
- positionFns.createCoreData = createCoreData;
310
- positionFns.createDraggableData = createDraggableData;
311
- positionFns.getBoundPosition = getBoundPosition;
312
- positionFns.getControlPosition = getControlPosition;
313
- positionFns.snapToGrid = snapToGrid;
314
- var _shims = shims;
315
- var _domFns = domFns;
316
- function getBoundPosition(draggable, x, y) {
317
- if (!draggable.props.bounds) return [x, y];
318
- let {
319
- bounds
320
- } = draggable.props;
321
- bounds = typeof bounds === "string" ? bounds : cloneBounds(bounds);
322
- const node = findDOMNode(draggable);
323
- if (typeof bounds === "string") {
324
- const {
325
- ownerDocument
326
- } = node;
327
- const ownerWindow = ownerDocument.defaultView;
328
- let boundNode;
329
- if (bounds === "parent") {
330
- boundNode = node.parentNode;
331
- } else {
332
- boundNode = ownerDocument.querySelector(bounds);
333
- }
334
- if (!(boundNode instanceof ownerWindow.HTMLElement)) {
335
- throw new Error('Bounds selector "' + bounds + '" could not find an element.');
336
- }
337
- const boundNodeEl = boundNode;
338
- const nodeStyle = ownerWindow.getComputedStyle(node);
339
- const boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl);
340
- bounds = {
341
- left: -node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingLeft) + (0, _shims.int)(nodeStyle.marginLeft),
342
- top: -node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop),
343
- right: (0, _domFns.innerWidth)(boundNodeEl) - (0, _domFns.outerWidth)(node) - node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight),
344
- bottom: (0, _domFns.innerHeight)(boundNodeEl) - (0, _domFns.outerHeight)(node) - node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingBottom) - (0, _shims.int)(nodeStyle.marginBottom)
345
- };
346
- }
347
- if ((0, _shims.isNum)(bounds.right)) x = Math.min(x, bounds.right);
348
- if ((0, _shims.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom);
349
- if ((0, _shims.isNum)(bounds.left)) x = Math.max(x, bounds.left);
350
- if ((0, _shims.isNum)(bounds.top)) y = Math.max(y, bounds.top);
351
- return [x, y];
352
- }
353
- function snapToGrid(grid, pendingX, pendingY) {
354
- const x = Math.round(pendingX / grid[0]) * grid[0];
355
- const y = Math.round(pendingY / grid[1]) * grid[1];
356
- return [x, y];
357
- }
358
- function canDragX(draggable) {
359
- return draggable.props.axis === "both" || draggable.props.axis === "x";
360
- }
361
- function canDragY(draggable) {
362
- return draggable.props.axis === "both" || draggable.props.axis === "y";
363
- }
364
- function getControlPosition(e, touchIdentifier, draggableCore) {
365
- const touchObj = typeof touchIdentifier === "number" ? (0, _domFns.getTouch)(e, touchIdentifier) : null;
366
- if (typeof touchIdentifier === "number" && !touchObj) return null;
367
- const node = findDOMNode(draggableCore);
368
- const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;
369
- return (0, _domFns.offsetXYFromParent)(touchObj || e, offsetParent, draggableCore.props.scale);
370
- }
371
- function createCoreData(draggable, x, y) {
372
- const isStart = !(0, _shims.isNum)(draggable.lastX);
373
- const node = findDOMNode(draggable);
374
- if (isStart) {
375
- return {
376
- node,
377
- deltaX: 0,
378
- deltaY: 0,
379
- lastX: x,
380
- lastY: y,
381
- x,
382
- y
383
- };
384
- } else {
385
- return {
386
- node,
387
- deltaX: x - draggable.lastX,
388
- deltaY: y - draggable.lastY,
389
- lastX: draggable.lastX,
390
- lastY: draggable.lastY,
391
- x,
392
- y
393
- };
394
- }
395
- }
396
- function createDraggableData(draggable, coreData) {
397
- const scale = draggable.props.scale;
398
- return {
399
- node: coreData.node,
400
- x: draggable.state.x + coreData.deltaX / scale,
401
- y: draggable.state.y + coreData.deltaY / scale,
402
- deltaX: coreData.deltaX / scale,
403
- deltaY: coreData.deltaY / scale,
404
- lastX: draggable.state.x,
405
- lastY: draggable.state.y
406
- };
407
- }
408
- function cloneBounds(bounds) {
409
- return {
410
- left: bounds.left,
411
- top: bounds.top,
412
- right: bounds.right,
413
- bottom: bounds.bottom
414
- };
415
- }
416
- function findDOMNode(draggable) {
417
- const node = draggable.findDOMNode();
418
- if (!node) {
419
- throw new Error("<DraggableCore>: Unmounted during event!");
420
- }
421
- return node;
422
- }
423
- var log$1 = {};
424
- Object.defineProperty(log$1, "__esModule", {
425
- value: true
426
- });
427
- log$1.default = log;
428
- function log() {
429
- }
430
- var utils = {};
431
- utils.__esModule = true;
432
- utils.cloneElement = cloneElement;
433
- var _react = _interopRequireDefault(React__default);
434
- function _interopRequireDefault(obj) {
435
- return obj && obj.__esModule ? obj : { default: obj };
436
- }
437
- function ownKeys(object, enumerableOnly) {
438
- var keys = Object.keys(object);
439
- if (Object.getOwnPropertySymbols) {
440
- var symbols = Object.getOwnPropertySymbols(object);
441
- enumerableOnly && (symbols = symbols.filter(function(sym) {
442
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
443
- })), keys.push.apply(keys, symbols);
444
- }
445
- return keys;
446
- }
447
- function _objectSpread(target) {
448
- for (var i = 1; i < arguments.length; i++) {
449
- var source = null != arguments[i] ? arguments[i] : {};
450
- i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
451
- _defineProperty(target, key, source[key]);
452
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
453
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
454
- });
455
- }
456
- return target;
457
- }
458
- function _defineProperty(obj, key, value) {
459
- key = _toPropertyKey(key);
460
- if (key in obj) {
461
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
462
- } else {
463
- obj[key] = value;
464
- }
465
- return obj;
466
- }
467
- function _toPropertyKey(arg) {
468
- var key = _toPrimitive(arg, "string");
469
- return typeof key === "symbol" ? key : String(key);
470
- }
471
- function _toPrimitive(input, hint) {
472
- if (typeof input !== "object" || input === null) return input;
473
- var prim = input[Symbol.toPrimitive];
474
- if (prim !== void 0) {
475
- var res = prim.call(input, hint || "default");
476
- if (typeof res !== "object") return res;
477
- throw new TypeError("@@toPrimitive must return a primitive value.");
478
- }
479
- return (hint === "string" ? String : Number)(input);
480
- }
481
- function cloneElement(element, props) {
482
- if (props.style && element.props.style) {
483
- props.style = _objectSpread(_objectSpread({}, element.props.style), props.style);
484
- }
485
- if (props.className && element.props.className) {
486
- props.className = element.props.className + " " + props.className;
487
- }
488
- return /* @__PURE__ */ _react.default.cloneElement(element, props);
489
- }
490
- function containerQuery(breakpoints, containerName = "", size = "sm") {
491
- return breakpoints.down(size).replace("@media ", `@container ${containerName} `);
492
- }
493
- export {
494
- containerQuery as c,
495
- domFns as d,
496
- getComponentUtilityClass as g,
497
- isValidDate as i,
498
- log$1 as l,
499
- positionFns as p,
500
- shims as s,
501
- utils as u
502
- };