siam-ui-utils 3.1.0 → 3.1.2

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 (96) hide show
  1. package/dist/CustomBootstrap.js +9 -9
  2. package/dist/_virtual/_commonjsHelpers.js +7 -7
  3. package/dist/_virtual/events.js +6 -6
  4. package/dist/_virtual/events2.js +5 -5
  5. package/dist/_virtual/index.js +8 -8
  6. package/dist/_virtual/index2.js +5 -5
  7. package/dist/assets/img/copiar.png.js +5 -5
  8. package/dist/assets/img/take-photo.jpg.js +5 -5
  9. package/dist/constants.js +9 -9
  10. package/dist/copy-link/index.js +60 -60
  11. package/dist/copy-link/styles.css +37 -37
  12. package/dist/custom-input/CustomInputCheckbox.js +37 -37
  13. package/dist/custom-input/CustomInputCurrency.js +84 -84
  14. package/dist/custom-input/CustomInputFile.js +47 -47
  15. package/dist/custom-input/CustomInputRadio.js +68 -68
  16. package/dist/custom-input/constant.js +5 -5
  17. package/dist/custom-input/index.js +12 -12
  18. package/dist/drag-and-dropzone/DropzoneComponent.js +83 -83
  19. package/dist/drag-and-dropzone/config.js +59 -59
  20. package/dist/drag-and-dropzone/index.js +39 -39
  21. package/dist/dropzone/Input.js +77 -77
  22. package/dist/dropzone/Layout.js +50 -50
  23. package/dist/dropzone/Preview.js +117 -117
  24. package/dist/dropzone/SubmitButton.js +34 -34
  25. package/dist/dropzone/assets/cancel.svg.js +5 -5
  26. package/dist/dropzone/assets/remove.svg.js +5 -5
  27. package/dist/dropzone/assets/restart.svg.js +5 -5
  28. package/dist/dropzone/index.js +514 -514
  29. package/dist/dropzone/utils.js +93 -93
  30. package/dist/dropzone-uploader/base/index.js +135 -135
  31. package/dist/dropzone-uploader/index.js +7 -7
  32. package/dist/dropzone-uploader/styled/index.js +148 -148
  33. package/dist/iconos/constants-svg.js +666 -666
  34. package/dist/iconos/icon-button-svg.js +50 -50
  35. package/dist/iconos/index.js +24 -24
  36. package/dist/iconos/styled-icon.js +26 -26
  37. package/dist/index.js +4 -4
  38. package/dist/intl-messages/index.js +11 -11
  39. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +8 -8
  40. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +13 -13
  41. package/dist/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +8 -8
  42. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +13 -13
  43. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +9 -9
  44. package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js +77 -0
  45. package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js.map +1 -0
  46. package/dist/node_modules/@neolution-ch/reactstrap/esm/Button.js +111 -111
  47. package/dist/node_modules/@neolution-ch/reactstrap/esm/CloseButton.js +106 -106
  48. package/dist/node_modules/@neolution-ch/reactstrap/esm/Col.js +125 -125
  49. package/dist/node_modules/@neolution-ch/reactstrap/esm/FormGroup.js +75 -75
  50. package/dist/node_modules/@neolution-ch/reactstrap/esm/Input.js +225 -225
  51. package/dist/node_modules/@neolution-ch/reactstrap/esm/Label.js +122 -122
  52. package/dist/node_modules/@neolution-ch/reactstrap/esm/Row.js +83 -83
  53. package/dist/node_modules/@neolution-ch/reactstrap/esm/utils.js +68 -68
  54. package/dist/node_modules/classnames/index.js +62 -62
  55. package/dist/node_modules/dom-helpers/esm/addClass.js +10 -10
  56. package/dist/node_modules/dom-helpers/esm/hasClass.js +8 -8
  57. package/dist/node_modules/dom-helpers/esm/removeClass.js +16 -16
  58. package/dist/node_modules/dropzone/dist/dropzone.js +1968 -1968
  59. package/dist/node_modules/events/events.js +372 -372
  60. package/dist/node_modules/just-extend/index.esm.js +43 -43
  61. package/dist/node_modules/react-transition-group/esm/CSSTransition.js +275 -275
  62. package/dist/node_modules/react-transition-group/esm/Transition.js +441 -441
  63. package/dist/node_modules/react-transition-group/esm/TransitionGroup.js +146 -146
  64. package/dist/node_modules/react-transition-group/esm/TransitionGroupContext.js +6 -6
  65. package/dist/node_modules/react-transition-group/esm/config.js +7 -7
  66. package/dist/node_modules/react-transition-group/esm/utils/ChildMapping.js +100 -100
  67. package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +24 -24
  68. package/dist/node_modules/react-transition-group/esm/utils/reflow.js +7 -7
  69. package/dist/react-notifications/Notification.js +73 -73
  70. package/dist/react-notifications/NotificationContainer.js +59 -59
  71. package/dist/react-notifications/NotificationManager.js +174 -174
  72. package/dist/react-notifications/Notifications.js +72 -72
  73. package/dist/react-notifications/constants.js +26 -26
  74. package/dist/react-notifications/index.js +11 -11
  75. package/dist/select/custom-select/constants.js +8 -8
  76. package/dist/select/custom-select/index.js +89 -89
  77. package/dist/select/custom-select-input/index.js +12 -12
  78. package/dist/select/index.js +9 -9
  79. package/dist/select/multi-select/badge-label-multi-select.js +29 -29
  80. package/dist/select/multi-select/index.css +36 -36
  81. package/dist/select/multi-select/index.js +171 -171
  82. package/dist/select/multi-select/index.js.map +1 -1
  83. package/dist/select/multi-select/styled-component.js +23 -23
  84. package/dist/select/multi-select/styled-component.js.map +1 -1
  85. package/dist/timer/index.js +60 -60
  86. package/dist/timer/styles.css +58 -58
  87. package/dist/tomar-foto/index.js +62 -62
  88. package/dist/view-layout/button-editor.js +14 -14
  89. package/dist/view-layout/constants.js +11 -11
  90. package/dist/view-layout/editor-layer.js +28 -28
  91. package/dist/view-layout/index.js +53 -53
  92. package/dist/view-layout/slot-wrapper.js +39 -39
  93. package/dist/view-layout/styles.css +126 -126
  94. package/dist/where-by-room/index.js +20 -20
  95. package/dist/where-by-room/room.js +78 -78
  96. package/package.json +1 -4
@@ -1,146 +1,146 @@
1
- import _objectWithoutPropertiesLoose from "../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";
2
- import _extends from "../../@babel/runtime/helpers/esm/extends.js";
3
- import _assertThisInitialized from "../../@babel/runtime/helpers/esm/assertThisInitialized.js";
4
- import _inheritsLoose from "../../@babel/runtime/helpers/esm/inheritsLoose.js";
5
- import PropTypes from "prop-types";
6
- import React from "react";
7
- import TransitionGroupContext from "./TransitionGroupContext.js";
8
- import { getInitialChildMapping, getNextChildMapping, getChildMapping } from "./utils/ChildMapping.js";
9
- var define_process_env_default = {};
10
- var values = Object.values || function(obj) {
11
- return Object.keys(obj).map(function(k) {
12
- return obj[k];
13
- });
14
- };
15
- var defaultProps = {
16
- component: "div",
17
- childFactory: function childFactory(child) {
18
- return child;
19
- }
20
- };
21
- var TransitionGroup = /* @__PURE__ */ (function(_React$Component) {
22
- _inheritsLoose(TransitionGroup2, _React$Component);
23
- function TransitionGroup2(props, context) {
24
- var _this;
25
- _this = _React$Component.call(this, props, context) || this;
26
- var handleExited = _this.handleExited.bind(_assertThisInitialized(_this));
27
- _this.state = {
28
- contextValue: {
29
- isMounting: true
30
- },
31
- handleExited,
32
- firstRender: true
33
- };
34
- return _this;
35
- }
36
- var _proto = TransitionGroup2.prototype;
37
- _proto.componentDidMount = function componentDidMount() {
38
- this.mounted = true;
39
- this.setState({
40
- contextValue: {
41
- isMounting: false
42
- }
43
- });
44
- };
45
- _proto.componentWillUnmount = function componentWillUnmount() {
46
- this.mounted = false;
47
- };
48
- TransitionGroup2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
49
- var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender;
50
- return {
51
- children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
52
- firstRender: false
53
- };
54
- };
55
- _proto.handleExited = function handleExited(child, node) {
56
- var currentChildMapping = getChildMapping(this.props.children);
57
- if (child.key in currentChildMapping) return;
58
- if (child.props.onExited) {
59
- child.props.onExited(node);
60
- }
61
- if (this.mounted) {
62
- this.setState(function(state) {
63
- var children = _extends({}, state.children);
64
- delete children[child.key];
65
- return {
66
- children
67
- };
68
- });
69
- }
70
- };
71
- _proto.render = function render() {
72
- var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
73
- var contextValue = this.state.contextValue;
74
- var children = values(this.state.children).map(childFactory2);
75
- delete props.appear;
76
- delete props.enter;
77
- delete props.exit;
78
- if (Component === null) {
79
- return /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, {
80
- value: contextValue
81
- }, children);
82
- }
83
- return /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, {
84
- value: contextValue
85
- }, /* @__PURE__ */ React.createElement(Component, props, children));
86
- };
87
- return TransitionGroup2;
88
- })(React.Component);
89
- TransitionGroup.propTypes = define_process_env_default.NODE_ENV !== "production" ? {
90
- /**
91
- * `<TransitionGroup>` renders a `<div>` by default. You can change this
92
- * behavior by providing a `component` prop.
93
- * If you use React v16+ and would like to avoid a wrapping `<div>` element
94
- * you can pass in `component={null}`. This is useful if the wrapping div
95
- * borks your css styles.
96
- */
97
- component: PropTypes.any,
98
- /**
99
- * A set of `<Transition>` components, that are toggled `in` and out as they
100
- * leave. the `<TransitionGroup>` will inject specific transition props, so
101
- * remember to spread them through if you are wrapping the `<Transition>` as
102
- * with our `<Fade>` example.
103
- *
104
- * While this component is meant for multiple `Transition` or `CSSTransition`
105
- * children, sometimes you may want to have a single transition child with
106
- * content that you want to be transitioned out and in when you change it
107
- * (e.g. routes, images etc.) In that case you can change the `key` prop of
108
- * the transition child as you change its content, this will cause
109
- * `TransitionGroup` to transition the child out and back in.
110
- */
111
- children: PropTypes.node,
112
- /**
113
- * A convenience prop that enables or disables appear animations
114
- * for all children. Note that specifying this will override any defaults set
115
- * on individual children Transitions.
116
- */
117
- appear: PropTypes.bool,
118
- /**
119
- * A convenience prop that enables or disables enter animations
120
- * for all children. Note that specifying this will override any defaults set
121
- * on individual children Transitions.
122
- */
123
- enter: PropTypes.bool,
124
- /**
125
- * A convenience prop that enables or disables exit animations
126
- * for all children. Note that specifying this will override any defaults set
127
- * on individual children Transitions.
128
- */
129
- exit: PropTypes.bool,
130
- /**
131
- * You may need to apply reactive updates to a child as it is exiting.
132
- * This is generally done by using `cloneElement` however in the case of an exiting
133
- * child the element has already been removed and not accessible to the consumer.
134
- *
135
- * If you do need to update a child as it leaves you can provide a `childFactory`
136
- * to wrap every child, even the ones that are leaving.
137
- *
138
- * @type Function(child: ReactElement) -> ReactElement
139
- */
140
- childFactory: PropTypes.func
141
- } : {};
142
- TransitionGroup.defaultProps = defaultProps;
143
- export {
144
- TransitionGroup as default
145
- };
146
- //# sourceMappingURL=TransitionGroup.js.map
1
+ import _objectWithoutPropertiesLoose from "../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";
2
+ import _extends from "../../@babel/runtime/helpers/esm/extends.js";
3
+ import _assertThisInitialized from "../../@babel/runtime/helpers/esm/assertThisInitialized.js";
4
+ import _inheritsLoose from "../../@babel/runtime/helpers/esm/inheritsLoose.js";
5
+ import PropTypes from "prop-types";
6
+ import React from "react";
7
+ import TransitionGroupContext from "./TransitionGroupContext.js";
8
+ import { getInitialChildMapping, getNextChildMapping, getChildMapping } from "./utils/ChildMapping.js";
9
+ var define_process_env_default = {};
10
+ var values = Object.values || function(obj) {
11
+ return Object.keys(obj).map(function(k) {
12
+ return obj[k];
13
+ });
14
+ };
15
+ var defaultProps = {
16
+ component: "div",
17
+ childFactory: function childFactory(child) {
18
+ return child;
19
+ }
20
+ };
21
+ var TransitionGroup = /* @__PURE__ */ (function(_React$Component) {
22
+ _inheritsLoose(TransitionGroup2, _React$Component);
23
+ function TransitionGroup2(props, context) {
24
+ var _this;
25
+ _this = _React$Component.call(this, props, context) || this;
26
+ var handleExited = _this.handleExited.bind(_assertThisInitialized(_this));
27
+ _this.state = {
28
+ contextValue: {
29
+ isMounting: true
30
+ },
31
+ handleExited,
32
+ firstRender: true
33
+ };
34
+ return _this;
35
+ }
36
+ var _proto = TransitionGroup2.prototype;
37
+ _proto.componentDidMount = function componentDidMount() {
38
+ this.mounted = true;
39
+ this.setState({
40
+ contextValue: {
41
+ isMounting: false
42
+ }
43
+ });
44
+ };
45
+ _proto.componentWillUnmount = function componentWillUnmount() {
46
+ this.mounted = false;
47
+ };
48
+ TransitionGroup2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
49
+ var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender;
50
+ return {
51
+ children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
52
+ firstRender: false
53
+ };
54
+ };
55
+ _proto.handleExited = function handleExited(child, node) {
56
+ var currentChildMapping = getChildMapping(this.props.children);
57
+ if (child.key in currentChildMapping) return;
58
+ if (child.props.onExited) {
59
+ child.props.onExited(node);
60
+ }
61
+ if (this.mounted) {
62
+ this.setState(function(state) {
63
+ var children = _extends({}, state.children);
64
+ delete children[child.key];
65
+ return {
66
+ children
67
+ };
68
+ });
69
+ }
70
+ };
71
+ _proto.render = function render() {
72
+ var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
73
+ var contextValue = this.state.contextValue;
74
+ var children = values(this.state.children).map(childFactory2);
75
+ delete props.appear;
76
+ delete props.enter;
77
+ delete props.exit;
78
+ if (Component === null) {
79
+ return /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, {
80
+ value: contextValue
81
+ }, children);
82
+ }
83
+ return /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, {
84
+ value: contextValue
85
+ }, /* @__PURE__ */ React.createElement(Component, props, children));
86
+ };
87
+ return TransitionGroup2;
88
+ })(React.Component);
89
+ TransitionGroup.propTypes = define_process_env_default.NODE_ENV !== "production" ? {
90
+ /**
91
+ * `<TransitionGroup>` renders a `<div>` by default. You can change this
92
+ * behavior by providing a `component` prop.
93
+ * If you use React v16+ and would like to avoid a wrapping `<div>` element
94
+ * you can pass in `component={null}`. This is useful if the wrapping div
95
+ * borks your css styles.
96
+ */
97
+ component: PropTypes.any,
98
+ /**
99
+ * A set of `<Transition>` components, that are toggled `in` and out as they
100
+ * leave. the `<TransitionGroup>` will inject specific transition props, so
101
+ * remember to spread them through if you are wrapping the `<Transition>` as
102
+ * with our `<Fade>` example.
103
+ *
104
+ * While this component is meant for multiple `Transition` or `CSSTransition`
105
+ * children, sometimes you may want to have a single transition child with
106
+ * content that you want to be transitioned out and in when you change it
107
+ * (e.g. routes, images etc.) In that case you can change the `key` prop of
108
+ * the transition child as you change its content, this will cause
109
+ * `TransitionGroup` to transition the child out and back in.
110
+ */
111
+ children: PropTypes.node,
112
+ /**
113
+ * A convenience prop that enables or disables appear animations
114
+ * for all children. Note that specifying this will override any defaults set
115
+ * on individual children Transitions.
116
+ */
117
+ appear: PropTypes.bool,
118
+ /**
119
+ * A convenience prop that enables or disables enter animations
120
+ * for all children. Note that specifying this will override any defaults set
121
+ * on individual children Transitions.
122
+ */
123
+ enter: PropTypes.bool,
124
+ /**
125
+ * A convenience prop that enables or disables exit animations
126
+ * for all children. Note that specifying this will override any defaults set
127
+ * on individual children Transitions.
128
+ */
129
+ exit: PropTypes.bool,
130
+ /**
131
+ * You may need to apply reactive updates to a child as it is exiting.
132
+ * This is generally done by using `cloneElement` however in the case of an exiting
133
+ * child the element has already been removed and not accessible to the consumer.
134
+ *
135
+ * If you do need to update a child as it leaves you can provide a `childFactory`
136
+ * to wrap every child, even the ones that are leaving.
137
+ *
138
+ * @type Function(child: ReactElement) -> ReactElement
139
+ */
140
+ childFactory: PropTypes.func
141
+ } : {};
142
+ TransitionGroup.defaultProps = defaultProps;
143
+ export {
144
+ TransitionGroup as default
145
+ };
146
+ //# sourceMappingURL=TransitionGroup.js.map
@@ -1,6 +1,6 @@
1
- import React from "react";
2
- const TransitionGroupContext = React.createContext(null);
3
- export {
4
- TransitionGroupContext as default
5
- };
6
- //# sourceMappingURL=TransitionGroupContext.js.map
1
+ import React from "react";
2
+ const TransitionGroupContext = React.createContext(null);
3
+ export {
4
+ TransitionGroupContext as default
5
+ };
6
+ //# sourceMappingURL=TransitionGroupContext.js.map
@@ -1,7 +1,7 @@
1
- const config = {
2
- disabled: false
3
- };
4
- export {
5
- config as default
6
- };
7
- //# sourceMappingURL=config.js.map
1
+ const config = {
2
+ disabled: false
3
+ };
4
+ export {
5
+ config as default
6
+ };
7
+ //# sourceMappingURL=config.js.map
@@ -1,100 +1,100 @@
1
- import { isValidElement, cloneElement, Children } from "react";
2
- function getChildMapping(children, mapFn) {
3
- var mapper = function mapper2(child) {
4
- return mapFn && isValidElement(child) ? mapFn(child) : child;
5
- };
6
- var result = /* @__PURE__ */ Object.create(null);
7
- if (children) Children.map(children, function(c) {
8
- return c;
9
- }).forEach(function(child) {
10
- result[child.key] = mapper(child);
11
- });
12
- return result;
13
- }
14
- function mergeChildMappings(prev, next) {
15
- prev = prev || {};
16
- next = next || {};
17
- function getValueForKey(key) {
18
- return key in next ? next[key] : prev[key];
19
- }
20
- var nextKeysPending = /* @__PURE__ */ Object.create(null);
21
- var pendingKeys = [];
22
- for (var prevKey in prev) {
23
- if (prevKey in next) {
24
- if (pendingKeys.length) {
25
- nextKeysPending[prevKey] = pendingKeys;
26
- pendingKeys = [];
27
- }
28
- } else {
29
- pendingKeys.push(prevKey);
30
- }
31
- }
32
- var i;
33
- var childMapping = {};
34
- for (var nextKey in next) {
35
- if (nextKeysPending[nextKey]) {
36
- for (i = 0; i < nextKeysPending[nextKey].length; i++) {
37
- var pendingNextKey = nextKeysPending[nextKey][i];
38
- childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
39
- }
40
- }
41
- childMapping[nextKey] = getValueForKey(nextKey);
42
- }
43
- for (i = 0; i < pendingKeys.length; i++) {
44
- childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
45
- }
46
- return childMapping;
47
- }
48
- function getProp(child, prop, props) {
49
- return props[prop] != null ? props[prop] : child.props[prop];
50
- }
51
- function getInitialChildMapping(props, onExited) {
52
- return getChildMapping(props.children, function(child) {
53
- return cloneElement(child, {
54
- onExited: onExited.bind(null, child),
55
- in: true,
56
- appear: getProp(child, "appear", props),
57
- enter: getProp(child, "enter", props),
58
- exit: getProp(child, "exit", props)
59
- });
60
- });
61
- }
62
- function getNextChildMapping(nextProps, prevChildMapping, onExited) {
63
- var nextChildMapping = getChildMapping(nextProps.children);
64
- var children = mergeChildMappings(prevChildMapping, nextChildMapping);
65
- Object.keys(children).forEach(function(key) {
66
- var child = children[key];
67
- if (!isValidElement(child)) return;
68
- var hasPrev = key in prevChildMapping;
69
- var hasNext = key in nextChildMapping;
70
- var prevChild = prevChildMapping[key];
71
- var isLeaving = isValidElement(prevChild) && !prevChild.props.in;
72
- if (hasNext && (!hasPrev || isLeaving)) {
73
- children[key] = cloneElement(child, {
74
- onExited: onExited.bind(null, child),
75
- in: true,
76
- exit: getProp(child, "exit", nextProps),
77
- enter: getProp(child, "enter", nextProps)
78
- });
79
- } else if (!hasNext && hasPrev && !isLeaving) {
80
- children[key] = cloneElement(child, {
81
- in: false
82
- });
83
- } else if (hasNext && hasPrev && isValidElement(prevChild)) {
84
- children[key] = cloneElement(child, {
85
- onExited: onExited.bind(null, child),
86
- in: prevChild.props.in,
87
- exit: getProp(child, "exit", nextProps),
88
- enter: getProp(child, "enter", nextProps)
89
- });
90
- }
91
- });
92
- return children;
93
- }
94
- export {
95
- getChildMapping,
96
- getInitialChildMapping,
97
- getNextChildMapping,
98
- mergeChildMappings
99
- };
100
- //# sourceMappingURL=ChildMapping.js.map
1
+ import { isValidElement, cloneElement, Children } from "react";
2
+ function getChildMapping(children, mapFn) {
3
+ var mapper = function mapper2(child) {
4
+ return mapFn && isValidElement(child) ? mapFn(child) : child;
5
+ };
6
+ var result = /* @__PURE__ */ Object.create(null);
7
+ if (children) Children.map(children, function(c) {
8
+ return c;
9
+ }).forEach(function(child) {
10
+ result[child.key] = mapper(child);
11
+ });
12
+ return result;
13
+ }
14
+ function mergeChildMappings(prev, next) {
15
+ prev = prev || {};
16
+ next = next || {};
17
+ function getValueForKey(key) {
18
+ return key in next ? next[key] : prev[key];
19
+ }
20
+ var nextKeysPending = /* @__PURE__ */ Object.create(null);
21
+ var pendingKeys = [];
22
+ for (var prevKey in prev) {
23
+ if (prevKey in next) {
24
+ if (pendingKeys.length) {
25
+ nextKeysPending[prevKey] = pendingKeys;
26
+ pendingKeys = [];
27
+ }
28
+ } else {
29
+ pendingKeys.push(prevKey);
30
+ }
31
+ }
32
+ var i;
33
+ var childMapping = {};
34
+ for (var nextKey in next) {
35
+ if (nextKeysPending[nextKey]) {
36
+ for (i = 0; i < nextKeysPending[nextKey].length; i++) {
37
+ var pendingNextKey = nextKeysPending[nextKey][i];
38
+ childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
39
+ }
40
+ }
41
+ childMapping[nextKey] = getValueForKey(nextKey);
42
+ }
43
+ for (i = 0; i < pendingKeys.length; i++) {
44
+ childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
45
+ }
46
+ return childMapping;
47
+ }
48
+ function getProp(child, prop, props) {
49
+ return props[prop] != null ? props[prop] : child.props[prop];
50
+ }
51
+ function getInitialChildMapping(props, onExited) {
52
+ return getChildMapping(props.children, function(child) {
53
+ return cloneElement(child, {
54
+ onExited: onExited.bind(null, child),
55
+ in: true,
56
+ appear: getProp(child, "appear", props),
57
+ enter: getProp(child, "enter", props),
58
+ exit: getProp(child, "exit", props)
59
+ });
60
+ });
61
+ }
62
+ function getNextChildMapping(nextProps, prevChildMapping, onExited) {
63
+ var nextChildMapping = getChildMapping(nextProps.children);
64
+ var children = mergeChildMappings(prevChildMapping, nextChildMapping);
65
+ Object.keys(children).forEach(function(key) {
66
+ var child = children[key];
67
+ if (!isValidElement(child)) return;
68
+ var hasPrev = key in prevChildMapping;
69
+ var hasNext = key in nextChildMapping;
70
+ var prevChild = prevChildMapping[key];
71
+ var isLeaving = isValidElement(prevChild) && !prevChild.props.in;
72
+ if (hasNext && (!hasPrev || isLeaving)) {
73
+ children[key] = cloneElement(child, {
74
+ onExited: onExited.bind(null, child),
75
+ in: true,
76
+ exit: getProp(child, "exit", nextProps),
77
+ enter: getProp(child, "enter", nextProps)
78
+ });
79
+ } else if (!hasNext && hasPrev && !isLeaving) {
80
+ children[key] = cloneElement(child, {
81
+ in: false
82
+ });
83
+ } else if (hasNext && hasPrev && isValidElement(prevChild)) {
84
+ children[key] = cloneElement(child, {
85
+ onExited: onExited.bind(null, child),
86
+ in: prevChild.props.in,
87
+ exit: getProp(child, "exit", nextProps),
88
+ enter: getProp(child, "enter", nextProps)
89
+ });
90
+ }
91
+ });
92
+ return children;
93
+ }
94
+ export {
95
+ getChildMapping,
96
+ getInitialChildMapping,
97
+ getNextChildMapping,
98
+ mergeChildMappings
99
+ };
100
+ //# sourceMappingURL=ChildMapping.js.map
@@ -1,24 +1,24 @@
1
- import PropTypes from "prop-types";
2
- var define_process_env_default = {};
3
- var timeoutsShape = define_process_env_default.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
4
- enter: PropTypes.number,
5
- exit: PropTypes.number,
6
- appear: PropTypes.number
7
- }).isRequired]) : null;
8
- var classNamesShape = define_process_env_default.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
9
- enter: PropTypes.string,
10
- exit: PropTypes.string,
11
- active: PropTypes.string
12
- }), PropTypes.shape({
13
- enter: PropTypes.string,
14
- enterDone: PropTypes.string,
15
- enterActive: PropTypes.string,
16
- exit: PropTypes.string,
17
- exitDone: PropTypes.string,
18
- exitActive: PropTypes.string
19
- })]) : null;
20
- export {
21
- classNamesShape,
22
- timeoutsShape
23
- };
24
- //# sourceMappingURL=PropTypes.js.map
1
+ import PropTypes from "prop-types";
2
+ var define_process_env_default = {};
3
+ var timeoutsShape = define_process_env_default.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
4
+ enter: PropTypes.number,
5
+ exit: PropTypes.number,
6
+ appear: PropTypes.number
7
+ }).isRequired]) : null;
8
+ var classNamesShape = define_process_env_default.NODE_ENV !== "production" ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
9
+ enter: PropTypes.string,
10
+ exit: PropTypes.string,
11
+ active: PropTypes.string
12
+ }), PropTypes.shape({
13
+ enter: PropTypes.string,
14
+ enterDone: PropTypes.string,
15
+ enterActive: PropTypes.string,
16
+ exit: PropTypes.string,
17
+ exitDone: PropTypes.string,
18
+ exitActive: PropTypes.string
19
+ })]) : null;
20
+ export {
21
+ classNamesShape,
22
+ timeoutsShape
23
+ };
24
+ //# sourceMappingURL=PropTypes.js.map
@@ -1,7 +1,7 @@
1
- var forceReflow = function forceReflow2(node) {
2
- return node.scrollTop;
3
- };
4
- export {
5
- forceReflow
6
- };
7
- //# sourceMappingURL=reflow.js.map
1
+ var forceReflow = function forceReflow2(node) {
2
+ return node.scrollTop;
3
+ };
4
+ export {
5
+ forceReflow
6
+ };
7
+ //# sourceMappingURL=reflow.js.map