dattatable 2.10.63 → 2.10.65
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/build/common/listCfg.d.ts +1 -1
- package/build/common/listCfg.js +13 -18
- package/dist/dattatable.js +581 -581
- package/dist/dattatable.min.js +1 -1
- package/docs/classes/Accordion.html +2 -2
- package/docs/classes/AuditLog.html +2 -2
- package/docs/classes/CanvasForm.html +2 -2
- package/docs/classes/Comments.html +2 -2
- package/docs/classes/Dashboard.html +4 -4
- package/docs/classes/DataTable.html +3 -3
- package/docs/classes/Documents.html +6 -6
- package/docs/classes/FilterSlideout.html +2 -2
- package/docs/classes/Footer.html +2 -2
- package/docs/classes/Header.html +2 -2
- package/docs/classes/InstallationRequired.html +2 -2
- package/docs/classes/ItemForm.html +4 -4
- package/docs/classes/List.html +4 -4
- package/docs/classes/ListConfig.html +2 -2
- package/docs/classes/ListSecurity.html +2 -2
- package/docs/classes/LoadingDialog.html +2 -2
- package/docs/classes/Modal.html +2 -2
- package/docs/classes/Navigation.html +3 -3
- package/docs/classes/Tiles.html +2 -2
- package/docs/classes/Timeout.html +2 -2
- package/docs/enums/ActionButtonTypes.html +2 -2
- package/docs/functions/formatBytes.html +1 -1
- package/docs/functions/formatDateValue.html +1 -1
- package/docs/functions/formatTimeValue.html +1 -1
- package/docs/functions/getContextInfo.html +1 -1
- package/docs/functions/getFileExt.html +1 -1
- package/docs/functions/waitForTheme.html +1 -1
- package/docs/interfaces/IAccordion.html +2 -2
- package/docs/interfaces/IAccordionProps.html +2 -2
- package/docs/interfaces/IAuditLogItem.html +2 -2
- package/docs/interfaces/IAuditLogItemCreation.html +2 -2
- package/docs/interfaces/IAuditLogProps.html +2 -2
- package/docs/interfaces/IAuditLogViewProps.html +2 -2
- package/docs/interfaces/ICommentsItem.html +2 -2
- package/docs/interfaces/ICreateLookupData.html +2 -2
- package/docs/interfaces/IDashboardProps.html +2 -2
- package/docs/interfaces/IDataTable.html +2 -2
- package/docs/interfaces/IDataTableProps.html +2 -2
- package/docs/interfaces/IDocumentsProps.html +2 -2
- package/docs/interfaces/IFilterItem.html +2 -2
- package/docs/interfaces/IFilterProps.html +2 -2
- package/docs/interfaces/IFooterProps.html +2 -2
- package/docs/interfaces/IGenerateLookupDataProps.html +2 -2
- package/docs/interfaces/IHeaderProps.html +2 -2
- package/docs/interfaces/IInstallProps.html +2 -2
- package/docs/interfaces/IItemFormCreateProps.html +2 -2
- package/docs/interfaces/IItemFormEditProps.html +2 -2
- package/docs/interfaces/IItemFormTab.html +2 -2
- package/docs/interfaces/IItemFormTabInfo.html +2 -2
- package/docs/interfaces/IItemFormViewProps.html +2 -2
- package/docs/interfaces/IListConfig.html +2 -2
- package/docs/interfaces/IListConfigProps.html +2 -2
- package/docs/interfaces/IListProps.html +2 -2
- package/docs/interfaces/IListSecurity.html +2 -2
- package/docs/interfaces/IListSecurityItem.html +2 -2
- package/docs/interfaces/ILookupData.html +2 -2
- package/docs/interfaces/IShowDialogProps.html +2 -2
- package/docs/interfaces/ITiles.html +2 -2
- package/docs/interfaces/ITilesProps.html +2 -2
- package/docs/interfaces/IValidateLookupsProps.html +2 -2
- package/docs/variables/DattaTable.html +1 -1
- package/docs/variables/ListSecurityDefaultGroups.html +1 -1
- package/package.json +2 -2
package/build/common/listCfg.js
CHANGED
|
@@ -36,16 +36,6 @@ var ListConfig = /** @class */ (function () {
|
|
|
36
36
|
gd_sprest_bs_1.Helper.Executor(props.lookupData, function (lookupData) {
|
|
37
37
|
// Update the dialog
|
|
38
38
|
props.showDialog ? loadingDialog_1.LoadingDialog.setBody("Getting the list: " + lookupData.list) : null;
|
|
39
|
-
// Get the items
|
|
40
|
-
var items = null;
|
|
41
|
-
try {
|
|
42
|
-
items = gd_sprest_bs_1.Helper.parse(lookupData.items).results;
|
|
43
|
-
}
|
|
44
|
-
catch (_a) {
|
|
45
|
-
// Unable to parse the data
|
|
46
|
-
console.error("List data corrupt for: " + lookupData.list);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
39
|
// Return a promise
|
|
50
40
|
return new Promise(function (resolve) {
|
|
51
41
|
// Update the dialog
|
|
@@ -57,22 +47,20 @@ var ListConfig = /** @class */ (function () {
|
|
|
57
47
|
props.showDialog ? loadingDialog_1.LoadingDialog.setBody("Importing the list data: " + lookupData.list) : null;
|
|
58
48
|
var _loop_1 = function (i) {
|
|
59
49
|
var addItem = true;
|
|
60
|
-
var
|
|
50
|
+
var value = lookupData.items[i];
|
|
61
51
|
// See if the items exists
|
|
62
52
|
currItems.results.find(function (a) {
|
|
63
53
|
// See if the item exists
|
|
64
|
-
if (a[lookupData.field] ==
|
|
54
|
+
if (a[lookupData.field] == value) {
|
|
65
55
|
// Set the flag
|
|
66
56
|
addItem = false;
|
|
67
57
|
}
|
|
68
58
|
});
|
|
69
59
|
// See if we are adding the item
|
|
70
60
|
if (addItem) {
|
|
71
|
-
// Default the Title field value
|
|
72
|
-
var dstItem = { Title: item["Title"] };
|
|
73
|
-
// Set the lookup field value
|
|
74
|
-
dstItem[lookupData.field] = item[lookupData.field];
|
|
75
61
|
// Create the item
|
|
62
|
+
var dstItem = {};
|
|
63
|
+
dstItem[lookupData.field] = value;
|
|
76
64
|
dstList.Items().add(dstItem).batch(function (item) {
|
|
77
65
|
// Log
|
|
78
66
|
console.log("[" + lookupData.list + "] Item added: " + item[lookupData.field]);
|
|
@@ -80,7 +68,7 @@ var ListConfig = /** @class */ (function () {
|
|
|
80
68
|
}
|
|
81
69
|
};
|
|
82
70
|
// Parse the list items
|
|
83
|
-
for (var i = 0; i < items.length; i++) {
|
|
71
|
+
for (var i = 0; i < lookupData.items.length; i++) {
|
|
84
72
|
_loop_1(i);
|
|
85
73
|
}
|
|
86
74
|
// Execute the batch job
|
|
@@ -368,10 +356,17 @@ var ListConfig = /** @class */ (function () {
|
|
|
368
356
|
Top: 5000,
|
|
369
357
|
OrderBy: ["Id"]
|
|
370
358
|
}).execute(function (items) {
|
|
359
|
+
var values = [];
|
|
360
|
+
// Parse the items
|
|
361
|
+
for (var i = 0; i < items.results.length; i++) {
|
|
362
|
+
// Add the value
|
|
363
|
+
var value = items.results[i][lookupField.LookupField];
|
|
364
|
+
value ? values.push(value) : null;
|
|
365
|
+
}
|
|
371
366
|
// Save the item data
|
|
372
367
|
lookupListData.push({
|
|
373
368
|
field: lookupField.LookupField,
|
|
374
|
-
items:
|
|
369
|
+
items: values.sort(),
|
|
375
370
|
list: list.Title
|
|
376
371
|
});
|
|
377
372
|
// Set the flag
|