@aloudata/aloudata-design 2.15.13 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AMenu/index.d.ts +3 -0
- package/dist/AMenu/index.js +2 -0
- package/dist/AMenu/style/index.d.ts +2 -0
- package/dist/AMenu/style/index.js +2 -0
- package/dist/AMenu/style/index.less +1 -0
- package/dist/MemberPicker/index.js +16 -5
- package/dist/Modal/index.d.ts +1 -0
- package/dist/Modal/index.js +4 -2
- package/dist/Modal/style/modal.less +28 -0
- package/dist/ald.min.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/dist/index.less +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../../style/index.less';
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
var _excluded = ["value", "type", "onChange", "multiple", "dropdownWidth", "open", "onOpenChange", "placeholder", "className", "allowClear", "disabled", "onClear", "size", "prefix", "lockedIds", "footer", "onCancel", "filterItem"];
|
|
1
|
+
var _excluded = ["value", "type", "onChange", "multiple", "dropdownWidth", "open", "onOpenChange", "placeholder", "className", "allowClear", "disabled", "onClear", "size", "prefix", "lockedIds", "footer", "onCancel", "filterItem", "mode"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
9
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
4
10
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
11
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -54,6 +60,7 @@ var Component = function Component(props) {
|
|
|
54
60
|
footer = props.footer,
|
|
55
61
|
_onCancel = props.onCancel,
|
|
56
62
|
filterItem = props.filterItem,
|
|
63
|
+
propsMode = props.mode,
|
|
57
64
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
58
65
|
var _ConfigProvider$useGe = ConfigProvider.useGetUserList(),
|
|
59
66
|
getUsersByIds = _ConfigProvider$useGe.getUsersByIds,
|
|
@@ -136,7 +143,7 @@ var Component = function Component(props) {
|
|
|
136
143
|
}
|
|
137
144
|
return true;
|
|
138
145
|
});
|
|
139
|
-
}, [searchString, searchUserList, selectedUserList]);
|
|
146
|
+
}, [filterItem, searchString, searchUserList, selectedUserList]);
|
|
140
147
|
useEffect(function () {
|
|
141
148
|
if (!dropdownOpen) return;
|
|
142
149
|
run();
|
|
@@ -187,7 +194,7 @@ var Component = function Component(props) {
|
|
|
187
194
|
setSelectedUserList([].concat(_toConsumableArray(result), _toConsumableArray(valueNotInResult)));
|
|
188
195
|
});
|
|
189
196
|
}
|
|
190
|
-
}, [value, queryByIds]);
|
|
197
|
+
}, [value, queryByIds, prevValue]);
|
|
191
198
|
var onSelectedChange = useCallback(function (users) {
|
|
192
199
|
if (multiple) {
|
|
193
200
|
setSelectedUserList(users);
|
|
@@ -240,13 +247,17 @@ var Component = function Component(props) {
|
|
|
240
247
|
}, [dropdownOpen]);
|
|
241
248
|
var mode = useMemo(function () {
|
|
242
249
|
if (multiple === true) {
|
|
250
|
+
if (_typeof(propsMode) === 'object') return _objectSpread(_objectSpread({}, propsMode || {}), {}, {
|
|
251
|
+
type: 'multiple',
|
|
252
|
+
responsive: _.isNil(propsMode.responsive) ? true : propsMode.responsive
|
|
253
|
+
});
|
|
243
254
|
return {
|
|
244
255
|
type: 'multiple',
|
|
245
256
|
responsive: true
|
|
246
257
|
};
|
|
247
258
|
}
|
|
248
|
-
return multiple ? multiple :
|
|
249
|
-
}, [multiple]);
|
|
259
|
+
return multiple ? multiple : propsMode;
|
|
260
|
+
}, [multiple, propsMode]);
|
|
250
261
|
var selectOpen = typeof open === 'boolean' ? open : dropdownOpen;
|
|
251
262
|
return /*#__PURE__*/React.createElement(AldSelect, _extends({
|
|
252
263
|
prefix: propPrefix
|
package/dist/Modal/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export interface ModalProps extends Omit<AntdModalProps, 'okButtonProps' | 'canc
|
|
|
19
19
|
okButtonProps?: IButtonProps;
|
|
20
20
|
okType?: ButtonType;
|
|
21
21
|
responsiveBounds?: boolean;
|
|
22
|
+
fullscreen?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export interface ModalFuncProps extends Omit<AntdModalFuncProps, 'okButtonProps' | 'cancelButtonProps' | 'okType' | 'icon'> {
|
|
24
25
|
cancelButtonProps?: IButtonProps;
|
package/dist/Modal/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
2
|
var _excluded = ["className", "type", "loading", "size", "disabled", "shape"],
|
|
3
|
-
_excluded2 = ["className", "children", "okType", "width", "closeIcon", "subTitle", "okButtonProps", "cancelButtonProps", "okText", "cancelText", "icon", "title", "paddingLess", "responsiveBounds", "hideHeaderBottomBorder", "virtualScrollBar", "style", "maskClosable"],
|
|
3
|
+
_excluded2 = ["className", "children", "okType", "width", "closeIcon", "subTitle", "okButtonProps", "cancelButtonProps", "okText", "cancelText", "icon", "title", "paddingLess", "responsiveBounds", "hideHeaderBottomBorder", "virtualScrollBar", "style", "maskClosable", "fullscreen"],
|
|
4
4
|
_excluded3 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
|
|
5
5
|
_excluded4 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
|
|
6
6
|
_excluded5 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
|
|
@@ -116,6 +116,7 @@ var OriginModal = function OriginModal(props) {
|
|
|
116
116
|
style = props.style,
|
|
117
117
|
_props$maskClosable = props.maskClosable,
|
|
118
118
|
maskClosable = _props$maskClosable === void 0 ? false : _props$maskClosable,
|
|
119
|
+
fullscreen = props.fullscreen,
|
|
119
120
|
restProps = _objectWithoutProperties(props, _excluded2);
|
|
120
121
|
var responsiveBoundsStyle = useMemo(function () {
|
|
121
122
|
if (!responsiveBounds) {
|
|
@@ -155,7 +156,8 @@ var OriginModal = function OriginModal(props) {
|
|
|
155
156
|
'ald-modal-padding-less': paddingLess,
|
|
156
157
|
'ald-modal-virtual-scroll-bar': virtualScrollBar,
|
|
157
158
|
'ald-modal-hide-header-bottom-border': hideHeaderBottomBorder,
|
|
158
|
-
'ald-modal-responsive-bounds': responsiveBounds
|
|
159
|
+
'ald-modal-responsive-bounds': responsiveBounds,
|
|
160
|
+
'ald-modal-fullscreen': fullscreen
|
|
159
161
|
}),
|
|
160
162
|
okButtonProps: getButtonProps(mergedOkButtonProps, 'primary', okType),
|
|
161
163
|
wrapClassName: classNames(props.wrapClassName, {
|
|
@@ -159,3 +159,31 @@
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
+
|
|
163
|
+
.ald-modal-fullscreen {
|
|
164
|
+
width: 100vw !important;
|
|
165
|
+
margin: 0 !important;
|
|
166
|
+
padding: 0 !important;
|
|
167
|
+
height: 100vh !important;
|
|
168
|
+
max-width: 100vw !important;
|
|
169
|
+
top: 0 !important;
|
|
170
|
+
left: 0 !important;
|
|
171
|
+
|
|
172
|
+
.ant-modal-content {
|
|
173
|
+
border-radius: 0 !important;
|
|
174
|
+
height: 100% !important;
|
|
175
|
+
|
|
176
|
+
.ant-modal-body {
|
|
177
|
+
height: 100% !important;
|
|
178
|
+
max-height: 100% !important;
|
|
179
|
+
padding: 0 !important;
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.ant-modal-header,
|
|
185
|
+
.ant-modal-footer,
|
|
186
|
+
.ant-modal-close {
|
|
187
|
+
display: none;
|
|
188
|
+
}
|
|
189
|
+
}
|