@zohodesk/components 1.2.10 → 1.2.11
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/.cli/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +7 -10
- package/.cli/propValidation_report.html +1 -1
- package/README.md +6 -0
- package/coverage/Button/Button.js.html +1 -1
- package/coverage/Button/css/Button.module.css.html +1 -1
- package/coverage/Button/css/cssJSLogic.js.html +1 -1
- package/coverage/Button/css/index.html +1 -1
- package/coverage/Button/index.html +1 -1
- package/coverage/Button/props/defaultProps.js.html +1 -1
- package/coverage/Button/props/index.html +1 -1
- package/coverage/Button/props/propTypes.js.html +1 -1
- package/coverage/Buttongroup/Buttongroup.js.html +1 -1
- package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
- package/coverage/Buttongroup/index.html +1 -1
- package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
- package/coverage/Buttongroup/props/index.html +1 -1
- package/coverage/Buttongroup/props/propTypes.js.html +1 -1
- package/coverage/coverage-final.json +10 -10
- package/coverage/coverage-summary.json +10 -10
- package/coverage/index.html +1 -1
- package/coverage/utils/dummyFunction.js.html +1 -1
- package/coverage/utils/index.html +1 -1
- package/es/MultiSelect/props/propTypes.js +140 -138
- package/es/Select/props/propTypes.js +3 -1
- package/es/v1/Accordion/Accordion.js +3 -2
- package/es/v1/AppContainer/AppContainer.js +75 -92
- package/es/v1/Avatar/Avatar.js +84 -134
- package/es/v1/Card/Card.js +143 -177
- package/es/v1/MultiSelect/MultiSelect.js +1 -0
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +1 -0
- package/es/v1/PopOver/PopOver.js +125 -160
- package/es/v1/Popup/Popup.js +1 -1
- package/es/v1/Provider/AvatarSize.js +13 -0
- package/es/v1/Provider/Config.js +18 -0
- package/es/v1/Provider/CssProvider.js +16 -0
- package/es/v1/Provider/IdProvider.js +66 -0
- package/es/v1/Provider/LibraryContext.js +37 -0
- package/es/v1/Provider/LibraryContextInit.js +3 -0
- package/es/v1/Provider/NumberGenerator/NumberGenerator.js +136 -0
- package/es/v1/Provider/ZindexProvider.js +57 -0
- package/es/v1/Provider/index.js +4 -0
- package/lib/MultiSelect/props/propTypes.js +146 -141
- package/lib/Select/props/propTypes.js +12 -2
- package/lib/v1/Accordion/Accordion.js +3 -1
- package/lib/v1/AppContainer/AppContainer.js +87 -138
- package/lib/v1/Avatar/Avatar.js +130 -186
- package/lib/v1/Card/Card.js +190 -286
- package/lib/v1/MultiSelect/MultiSelect.js +3 -1
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +3 -1
- package/lib/v1/PopOver/PopOver.js +160 -256
- package/lib/v1/Popup/Popup.js +1 -1
- package/lib/v1/Provider/AvatarSize.js +24 -0
- package/lib/v1/Provider/Config.js +27 -0
- package/lib/v1/Provider/CssProvider.js +27 -0
- package/lib/v1/Provider/IdProvider.js +79 -0
- package/lib/v1/Provider/LibraryContext.js +76 -0
- package/lib/v1/Provider/LibraryContextInit.js +15 -0
- package/lib/v1/Provider/NumberGenerator/NumberGenerator.js +174 -0
- package/lib/v1/Provider/ZindexProvider.js +69 -0
- package/lib/v1/Provider/index.js +81 -0
- package/package.json +4 -4
- package/result.json +1 -1
|
@@ -5,9 +5,13 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports.PopOverContainer = PopOverContainer;
|
|
9
|
+
exports.PopOverTarget = PopOverTarget;
|
|
10
|
+
exports["default"] = void 0;
|
|
9
11
|
|
|
10
|
-
var _react =
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _hooks = require("@zohodesk/hooks");
|
|
11
15
|
|
|
12
16
|
var _defaultProps = require("../../PopOver/props/defaultProps");
|
|
13
17
|
|
|
@@ -23,141 +27,91 @@ var _PopOverModule = _interopRequireDefault(require("../../PopOver/PopOver.modul
|
|
|
23
27
|
|
|
24
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
29
|
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
arrowRight = _this$props3.arrowRight,
|
|
112
|
-
arrowLeft = _this$props3.arrowLeft,
|
|
113
|
-
arrowTop = _this$props3.arrowTop,
|
|
114
|
-
arrowBottom = _this$props3.arrowBottom,
|
|
115
|
-
isAnimate = _this$props3.isAnimate,
|
|
116
|
-
isArrow = _this$props3.isArrow,
|
|
117
|
-
arrowPosition = _this$props3.arrowPosition,
|
|
118
|
-
position = _this$props3.position,
|
|
119
|
-
size = _this$props3.size,
|
|
120
|
-
onClick = _this$props3.onClick,
|
|
121
|
-
isPopupReady = _this$props3.isPopupReady;
|
|
122
|
-
|
|
123
|
-
var childrens = _react["default"].Children.map(children, function (child, index) {
|
|
124
|
-
var element = index === 1 ? /*#__PURE__*/_react["default"].cloneElement(child, {
|
|
125
|
-
isPopupOpen: isPopupOpen,
|
|
126
|
-
togglePopup: _this2.togglePopup,
|
|
127
|
-
removeClose: removeClose,
|
|
128
|
-
right: right,
|
|
129
|
-
left: left,
|
|
130
|
-
top: top,
|
|
131
|
-
bottom: bottom,
|
|
132
|
-
arrowRight: arrowRight,
|
|
133
|
-
arrowLeft: arrowLeft,
|
|
134
|
-
arrowTop: arrowTop,
|
|
135
|
-
arrowBottom: arrowBottom,
|
|
136
|
-
boxPosition: position,
|
|
137
|
-
isAnimate: isAnimate,
|
|
138
|
-
isArrow: isArrow,
|
|
139
|
-
arrowPosition: arrowPosition,
|
|
140
|
-
size: size,
|
|
141
|
-
onClick: onClick,
|
|
142
|
-
getRef: _this2.popOverContainerRef,
|
|
143
|
-
isPopupReady: isPopupReady
|
|
144
|
-
}) : /*#__PURE__*/_react["default"].cloneElement(child, {
|
|
145
|
-
isPopupOpen: isPopupOpen,
|
|
146
|
-
togglePopup: _this2.togglePopup,
|
|
147
|
-
removeClose: removeClose,
|
|
148
|
-
getRef: _this2.popOverTargetRef
|
|
149
|
-
});
|
|
150
|
-
return element;
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
154
|
-
className: _PopOverModule["default"].popup
|
|
155
|
-
}, childrens);
|
|
156
|
-
}
|
|
157
|
-
}]);
|
|
158
|
-
|
|
159
|
-
return PopOver;
|
|
160
|
-
}(_react["default"].Component);
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
34
|
+
function PopOver(props) {
|
|
35
|
+
var children = props.children,
|
|
36
|
+
isPopupOpen = props.isPopupOpen,
|
|
37
|
+
removeClose = props.removeClose,
|
|
38
|
+
right = props.right,
|
|
39
|
+
left = props.left,
|
|
40
|
+
top = props.top,
|
|
41
|
+
bottom = props.bottom,
|
|
42
|
+
arrowRight = props.arrowRight,
|
|
43
|
+
arrowLeft = props.arrowLeft,
|
|
44
|
+
arrowTop = props.arrowTop,
|
|
45
|
+
arrowBottom = props.arrowBottom,
|
|
46
|
+
isAnimate = props.isAnimate,
|
|
47
|
+
isArrow = props.isArrow,
|
|
48
|
+
arrowPosition = props.arrowPosition,
|
|
49
|
+
position = props.position,
|
|
50
|
+
size = props.size,
|
|
51
|
+
onClick = props.onClick,
|
|
52
|
+
isPopupReady = props.isPopupReady,
|
|
53
|
+
getTargetRef = props.getTargetRef,
|
|
54
|
+
getContainerRef = props.getContainerRef,
|
|
55
|
+
boxPosition = props.boxPosition,
|
|
56
|
+
onPopupOpen = props.onPopupOpen,
|
|
57
|
+
onPopupClose = props.onPopupClose;
|
|
58
|
+
var popOverTarget = (0, _react.useRef)(null);
|
|
59
|
+
var popOverContainer = (0, _react.useRef)(null);
|
|
60
|
+
|
|
61
|
+
var popOverTargetRef = function popOverTargetRef(el) {
|
|
62
|
+
popOverTarget.current = el;
|
|
63
|
+
getTargetRef(el);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var popOverContainerRef = function popOverContainerRef(el) {
|
|
67
|
+
popOverContainer.current = el;
|
|
68
|
+
getContainerRef(el);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var togglePopup = function togglePopup(e) {
|
|
72
|
+
var togglePopup = props.togglePopup;
|
|
73
|
+
togglePopup(e, boxPosition);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
(0, _hooks.useEffectCallOnlyAfterState)(function () {
|
|
77
|
+
isPopupOpen && onPopupOpen && onPopupOpen();
|
|
78
|
+
!isPopupOpen && onPopupClose && onPopupClose();
|
|
79
|
+
}, [isPopupOpen]);
|
|
80
|
+
|
|
81
|
+
var childrens = _react["default"].Children.map(children, function (child, index) {
|
|
82
|
+
var element = index === 1 ? /*#__PURE__*/_react["default"].cloneElement(child, {
|
|
83
|
+
isPopupOpen: isPopupOpen,
|
|
84
|
+
togglePopup: togglePopup,
|
|
85
|
+
removeClose: removeClose,
|
|
86
|
+
right: right,
|
|
87
|
+
left: left,
|
|
88
|
+
top: top,
|
|
89
|
+
bottom: bottom,
|
|
90
|
+
arrowRight: arrowRight,
|
|
91
|
+
arrowLeft: arrowLeft,
|
|
92
|
+
arrowTop: arrowTop,
|
|
93
|
+
arrowBottom: arrowBottom,
|
|
94
|
+
boxPosition: position,
|
|
95
|
+
isAnimate: isAnimate,
|
|
96
|
+
isArrow: isArrow,
|
|
97
|
+
arrowPosition: arrowPosition,
|
|
98
|
+
size: size,
|
|
99
|
+
onClick: onClick,
|
|
100
|
+
getRef: popOverContainerRef,
|
|
101
|
+
isPopupReady: isPopupReady
|
|
102
|
+
}) : /*#__PURE__*/_react["default"].cloneElement(child, {
|
|
103
|
+
isPopupOpen: isPopupOpen,
|
|
104
|
+
togglePopup: togglePopup,
|
|
105
|
+
removeClose: removeClose,
|
|
106
|
+
getRef: popOverTargetRef
|
|
107
|
+
});
|
|
108
|
+
return element;
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
|
+
className: _PopOverModule["default"].popup
|
|
113
|
+
}, childrens);
|
|
114
|
+
}
|
|
161
115
|
|
|
162
116
|
PopOver.defaultProps = _defaultProps.PopOver_defaultProps;
|
|
163
117
|
PopOver.propTypes = _propTypes.PopOver_propTypes;
|
|
@@ -166,128 +120,78 @@ var _default = (0, _Popup["default"])(PopOver);
|
|
|
166
120
|
|
|
167
121
|
exports["default"] = _default;
|
|
168
122
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
_createClass(PopOverTarget, [{
|
|
185
|
-
key: "getRef",
|
|
186
|
-
value: function getRef(el) {
|
|
187
|
-
var getRef = this.props.getRef;
|
|
188
|
-
getRef(el);
|
|
189
|
-
}
|
|
190
|
-
}, {
|
|
191
|
-
key: "render",
|
|
192
|
-
value: function render() {
|
|
193
|
-
var _this$props4 = this.props,
|
|
194
|
-
children = _this$props4.children,
|
|
195
|
-
togglePopup = _this$props4.togglePopup;
|
|
196
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
197
|
-
className: _PopOverModule["default"].target,
|
|
198
|
-
onClick: togglePopup,
|
|
199
|
-
ref: this.getRef
|
|
200
|
-
}, children);
|
|
201
|
-
}
|
|
202
|
-
}]);
|
|
203
|
-
|
|
204
|
-
return PopOverTarget;
|
|
205
|
-
}(_react["default"].Component);
|
|
123
|
+
function PopOverTarget(props) {
|
|
124
|
+
var children = props.children,
|
|
125
|
+
togglePopup = props.togglePopup;
|
|
126
|
+
|
|
127
|
+
var getRef = function getRef(el) {
|
|
128
|
+
var getRef = props.getRef;
|
|
129
|
+
getRef(el);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
133
|
+
className: _PopOverModule["default"].target,
|
|
134
|
+
onClick: togglePopup,
|
|
135
|
+
ref: getRef
|
|
136
|
+
}, children);
|
|
137
|
+
}
|
|
206
138
|
|
|
207
|
-
exports.PopOverTarget = PopOverTarget;
|
|
208
139
|
PopOverTarget.propTypes = _propTypes.PopOverTarget_propTypes;
|
|
209
140
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
arrowBottom: arrowBottom,
|
|
265
|
-
arrowLeft: arrowLeft,
|
|
266
|
-
arrowPosition: arrowPosition,
|
|
267
|
-
arrowRight: arrowRight,
|
|
268
|
-
arrowTop: arrowTop,
|
|
269
|
-
bottom: bottom,
|
|
270
|
-
boxPosition: boxPosition,
|
|
271
|
-
getRef: getRef,
|
|
272
|
-
isActive: isPopupOpen,
|
|
273
|
-
isAnimate: isAnimate,
|
|
274
|
-
isArrow: isArrow,
|
|
275
|
-
left: left,
|
|
276
|
-
right: right,
|
|
277
|
-
size: size,
|
|
278
|
-
top: top,
|
|
279
|
-
alignBox: "row"
|
|
280
|
-
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
281
|
-
flexible: true,
|
|
282
|
-
shrink: true,
|
|
283
|
-
scroll: "vertical"
|
|
284
|
-
}, children));
|
|
285
|
-
}
|
|
286
|
-
}]);
|
|
287
|
-
|
|
288
|
-
return PopOverContainer;
|
|
289
|
-
}(_react["default"].Component);
|
|
141
|
+
function PopOverContainer(props) {
|
|
142
|
+
var children = props.children,
|
|
143
|
+
isPopupOpen = props.isPopupOpen,
|
|
144
|
+
isAnimate = props.isAnimate,
|
|
145
|
+
isArrow = props.isArrow,
|
|
146
|
+
size = props.size,
|
|
147
|
+
arrowPosition = props.arrowPosition,
|
|
148
|
+
boxPosition = props.boxPosition,
|
|
149
|
+
right = props.right,
|
|
150
|
+
left = props.left,
|
|
151
|
+
top = props.top,
|
|
152
|
+
bottom = props.bottom,
|
|
153
|
+
arrowRight = props.arrowRight,
|
|
154
|
+
arrowLeft = props.arrowLeft,
|
|
155
|
+
arrowTop = props.arrowTop,
|
|
156
|
+
arrowBottom = props.arrowBottom,
|
|
157
|
+
animationStyle = props.animationStyle,
|
|
158
|
+
onClick = props.onClick,
|
|
159
|
+
removeClose = props.removeClose;
|
|
160
|
+
|
|
161
|
+
var getRef = function getRef(el) {
|
|
162
|
+
var getRef = props.getRef;
|
|
163
|
+
getRef && getRef(el);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
var handleClick = function handleClick(e) {
|
|
167
|
+
removeClose && removeClose(e);
|
|
168
|
+
onClick && onClick();
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
172
|
+
animationStyle: animationStyle,
|
|
173
|
+
arrowBottom: arrowBottom,
|
|
174
|
+
arrowLeft: arrowLeft,
|
|
175
|
+
arrowPosition: arrowPosition,
|
|
176
|
+
arrowRight: arrowRight,
|
|
177
|
+
arrowTop: arrowTop,
|
|
178
|
+
bottom: bottom,
|
|
179
|
+
boxPosition: boxPosition,
|
|
180
|
+
getRef: getRef,
|
|
181
|
+
isActive: isPopupOpen,
|
|
182
|
+
isAnimate: isAnimate,
|
|
183
|
+
isArrow: isArrow,
|
|
184
|
+
left: left,
|
|
185
|
+
right: right,
|
|
186
|
+
size: size,
|
|
187
|
+
top: top,
|
|
188
|
+
alignBox: "row"
|
|
189
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
190
|
+
flexible: true,
|
|
191
|
+
shrink: true,
|
|
192
|
+
scroll: "vertical"
|
|
193
|
+
}, children));
|
|
194
|
+
}
|
|
290
195
|
|
|
291
|
-
exports.PopOverContainer = PopOverContainer;
|
|
292
196
|
PopOverContainer.defaultProps = _defaultProps.PopOverContainer_defaultProps;
|
|
293
197
|
PopOverContainer.propTypes = _propTypes.PopOverContainer_propTypes;
|
package/lib/v1/Popup/Popup.js
CHANGED
|
@@ -15,7 +15,7 @@ var _hoistNonReactStatics = _interopRequireDefault(require("hoist-non-react-stat
|
|
|
15
15
|
|
|
16
16
|
var _Common = require("../../utils/Common.js");
|
|
17
17
|
|
|
18
|
-
var _viewPort = _interopRequireDefault(require("
|
|
18
|
+
var _viewPort = _interopRequireDefault(require("../../Popup/viewPort"));
|
|
19
19
|
|
|
20
20
|
var _PositionMapping = require("../../Popup/PositionMapping.json");
|
|
21
21
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = CssProvider;
|
|
7
|
+
|
|
8
|
+
var _avatarsizesModule = _interopRequireDefault(require("../../common/avatarsizes.module.css"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var styleList = {
|
|
13
|
+
small: _avatarsizesModule["default"].small,
|
|
14
|
+
xsmall: _avatarsizesModule["default"].xsmall,
|
|
15
|
+
xxsmall: _avatarsizesModule["default"].xxsmall,
|
|
16
|
+
medium: _avatarsizesModule["default"].medium,
|
|
17
|
+
xmedium: _avatarsizesModule["default"].xmedium,
|
|
18
|
+
large: _avatarsizesModule["default"].large,
|
|
19
|
+
xlarge: _avatarsizesModule["default"].xlarge
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function CssProvider(name) {
|
|
23
|
+
return styleList[name] || '';
|
|
24
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getLibraryConfig = getLibraryConfig;
|
|
7
|
+
exports.setLibraryConfig = setLibraryConfig;
|
|
8
|
+
var id = {
|
|
9
|
+
mobileWidth: 640,
|
|
10
|
+
zindexCounter: 3,
|
|
11
|
+
idCounter: 0,
|
|
12
|
+
idPrefix: 'ZD',
|
|
13
|
+
scrollFetchLimit: 80,
|
|
14
|
+
isReducedMotion: false,
|
|
15
|
+
direction: 'ltr',
|
|
16
|
+
tooltipDebounce: 175,
|
|
17
|
+
getTooltipContainer: function getTooltipContainer() {},
|
|
18
|
+
autoComplete: false
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
function getLibraryConfig(key) {
|
|
22
|
+
return id[key];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function setLibraryConfig(configObj) {
|
|
26
|
+
id = Object.assign({}, id, configObj);
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = CssProvider;
|
|
7
|
+
|
|
8
|
+
var _commonModule = _interopRequireDefault(require("../common/common.module.css"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var styleList = {
|
|
13
|
+
hide: _commonModule["default"].hide,
|
|
14
|
+
isDisabled: _commonModule["default"].disabled,
|
|
15
|
+
isDisable: _commonModule["default"].disable,
|
|
16
|
+
isBlock: _commonModule["default"].blockEvent,
|
|
17
|
+
isFlexible: _commonModule["default"].flexgrow,
|
|
18
|
+
dotted: _commonModule["default"].dotted,
|
|
19
|
+
vMiddle: _commonModule["default"].yMiddle,
|
|
20
|
+
hMiddle: _commonModule["default"].xMiddle,
|
|
21
|
+
smooth: _commonModule["default"].ftsmooth,
|
|
22
|
+
clamp: _commonModule["default"].clamp
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function CssProvider(name) {
|
|
26
|
+
return styleList[name] || '';
|
|
27
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getUniqueId = getUniqueId;
|
|
7
|
+
exports.removeGlobalIdPrefix = removeGlobalIdPrefix;
|
|
8
|
+
exports.setGlobalIdPrefix = setGlobalIdPrefix;
|
|
9
|
+
exports.useUniqueId = useUniqueId;
|
|
10
|
+
|
|
11
|
+
var _NumberGenerator = require("./NumberGenerator/NumberGenerator");
|
|
12
|
+
|
|
13
|
+
var _Config = require("./Config");
|
|
14
|
+
|
|
15
|
+
var globalId = (0, _Config.getLibraryConfig)('idCounter'),
|
|
16
|
+
deletedIndexes = [],
|
|
17
|
+
globalPrefix;
|
|
18
|
+
|
|
19
|
+
function setGlobalIdPrefix(value) {
|
|
20
|
+
globalPrefix = value;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function removeGlobalIdPrefix() {
|
|
24
|
+
globalPrefix = undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function getGlobalIdPrefix() {
|
|
28
|
+
return globalPrefix;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function setGlobalId(id) {
|
|
32
|
+
globalId = id;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function getGlobalId() {
|
|
36
|
+
return globalId;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function setDeletedIndexes(array) {
|
|
40
|
+
deletedIndexes = array;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function getDeletedIndexes() {
|
|
44
|
+
return deletedIndexes;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function callback(_ref) {
|
|
48
|
+
var globalId = _ref.globalId,
|
|
49
|
+
deletedIndexes = _ref.deletedIndexes;
|
|
50
|
+
setGlobalId(globalId);
|
|
51
|
+
setDeletedIndexes(deletedIndexes);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function useUniqueId(prefix) {
|
|
55
|
+
return (0, _NumberGenerator.useNumberGenerator)({
|
|
56
|
+
getGlobalId: getGlobalId,
|
|
57
|
+
prefix: prefix,
|
|
58
|
+
getGlobalPrefix: getGlobalIdPrefix,
|
|
59
|
+
getDeletedIndexes: getDeletedIndexes,
|
|
60
|
+
callback: callback
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function getUniqueId(Component, prefix) {
|
|
65
|
+
return (0, _NumberGenerator.getNumberGenerators)({
|
|
66
|
+
Component: Component,
|
|
67
|
+
prefix: prefix,
|
|
68
|
+
getGlobalPrefix: getGlobalIdPrefix,
|
|
69
|
+
getGlobalId: getGlobalId,
|
|
70
|
+
getDeletedIndexes: getDeletedIndexes,
|
|
71
|
+
callback: callback
|
|
72
|
+
});
|
|
73
|
+
} // let Provider = {
|
|
74
|
+
// docs: {
|
|
75
|
+
// componentGroup: 'Provider',
|
|
76
|
+
// folderName: 'Functions'
|
|
77
|
+
// }
|
|
78
|
+
// };
|
|
79
|
+
// export { Provider };
|