@itilite/iui-user-management 0.0.13 → 0.0.15
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/index.js +48 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +48 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +3 -3
- package/dist/style.css.map +0 -1
package/dist/index.js
CHANGED
|
@@ -191,7 +191,7 @@ function toVal(mix) {
|
|
|
191
191
|
return str;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
function clsx
|
|
194
|
+
function clsx() {
|
|
195
195
|
var i = 0,
|
|
196
196
|
tmp,
|
|
197
197
|
x,
|
|
@@ -351,6 +351,51 @@ var commonLoadOptions = function commonLoadOptions(search, loadedOptions, _ref)
|
|
|
351
351
|
return Promise.reject(e);
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
+
var commonLoadOptionsUM = function commonLoadOptionsUM(search, loadedOptions, _ref2) {
|
|
355
|
+
var page = _ref2.page,
|
|
356
|
+
tabelName = _ref2.tabelName,
|
|
357
|
+
placeholder = _ref2.placeholder,
|
|
358
|
+
defaultData = _ref2.defaultData;
|
|
359
|
+
|
|
360
|
+
try {
|
|
361
|
+
return Promise.resolve(_catch(function () {
|
|
362
|
+
var url = userAddEditUrl.dropdownList() + ("?page=" + page + "&table_name=" + tabelName + "&search=" + search);
|
|
363
|
+
return Promise.resolve(api.get(url).then(function (res) {
|
|
364
|
+
return res.data;
|
|
365
|
+
})).then(function (response) {
|
|
366
|
+
var arrList = response.results.filter(function (item) {
|
|
367
|
+
return item.name !== defaultData;
|
|
368
|
+
});
|
|
369
|
+
var mappedValue = arrList.map(function (item) {
|
|
370
|
+
return {
|
|
371
|
+
value: item.id,
|
|
372
|
+
label: item.name
|
|
373
|
+
};
|
|
374
|
+
});
|
|
375
|
+
return {
|
|
376
|
+
options: mappedValue,
|
|
377
|
+
hasMore: !!response.next,
|
|
378
|
+
additional: {
|
|
379
|
+
page: page + 1,
|
|
380
|
+
tabelName: tabelName
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
});
|
|
384
|
+
}, function () {
|
|
385
|
+
return {
|
|
386
|
+
options: [],
|
|
387
|
+
hasMore: false,
|
|
388
|
+
additional: {
|
|
389
|
+
page: 1,
|
|
390
|
+
tabelName: tabelName,
|
|
391
|
+
placeholder: placeholder
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
}));
|
|
395
|
+
} catch (e) {
|
|
396
|
+
return Promise.reject(e);
|
|
397
|
+
}
|
|
398
|
+
};
|
|
354
399
|
var currencyLoadOptions = function currencyLoadOptions(search, loadedOptions, _ref3) {
|
|
355
400
|
var page = _ref3.page;
|
|
356
401
|
|
|
@@ -8787,7 +8832,7 @@ function MoveUserDialog(_ref) {
|
|
|
8787
8832
|
name: name,
|
|
8788
8833
|
isMove: isMove,
|
|
8789
8834
|
customSelectHandler: customSelectHandler,
|
|
8790
|
-
loadOption:
|
|
8835
|
+
loadOption: commonLoadOptionsUM,
|
|
8791
8836
|
isError: isError,
|
|
8792
8837
|
errorMsg: "Please select " + (name === null || name === void 0 ? void 0 : name.toLowerCase()) + ".",
|
|
8793
8838
|
placeHolderCheck: name !== undefined && name === ''
|
|
@@ -8912,7 +8957,7 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
8912
8957
|
};
|
|
8913
8958
|
|
|
8914
8959
|
var validation = {
|
|
8915
|
-
regexOnChange: /^[A-
|
|
8960
|
+
regexOnChange: /^[(A-Z)(a-z)(0-9)&'\-_.,/: ]*$/,
|
|
8916
8961
|
regexOnBlur: null,
|
|
8917
8962
|
maxLimit: '',
|
|
8918
8963
|
minLimit: '',
|