dattatable 2.11.29 → 2.11.30
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 -0
- package/build/common/listCfg.js +77 -3
- package/dist/dattatable.js +578 -578
- package/dist/dattatable.min.js +1 -1
- package/docs/assets/search.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 +3 -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/IItemFormSaveProps.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
|
@@ -40,6 +40,7 @@ export interface IValidateLookupsProps {
|
|
|
40
40
|
export declare class ListConfig {
|
|
41
41
|
private static InternalFields;
|
|
42
42
|
static createLookupListData(props: ICreateLookupData): PromiseLike<void>;
|
|
43
|
+
static fixCustomFormatters(webUrl: string, listName: string): PromiseLike<void>;
|
|
43
44
|
static fixMMSFields(webUrl: string, listName: string): PromiseLike<void>;
|
|
44
45
|
static generate(props: IListConfigProps): PromiseLike<IListConfig>;
|
|
45
46
|
static generateLookupListData(props: IGenerateLookupDataProps): PromiseLike<ILookupData[]>;
|
package/build/common/listCfg.js
CHANGED
|
@@ -103,7 +103,67 @@ var ListConfig = /** @class */ (function () {
|
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
105
|
};
|
|
106
|
-
// Fixes the
|
|
106
|
+
// Fixes the custom formatter list id values
|
|
107
|
+
ListConfig.fixCustomFormatters = function (webUrl, listName) {
|
|
108
|
+
// Return a promise
|
|
109
|
+
return new Promise(function (resolve, reject) {
|
|
110
|
+
// Show a loading dialog
|
|
111
|
+
loadingDialog_1.LoadingDialog.setHeader("Validating Custom Formatters");
|
|
112
|
+
loadingDialog_1.LoadingDialog.setBody("Getting the list '" + listName + "' information...");
|
|
113
|
+
loadingDialog_1.LoadingDialog.show();
|
|
114
|
+
// Load the list fields
|
|
115
|
+
(0, gd_sprest_bs_1.Web)(webUrl).Lists(listName).query({ Expand: ["ContentTypes", "Views"], Select: ["Id"] }).execute(function (list) {
|
|
116
|
+
// Parse the content types
|
|
117
|
+
gd_sprest_bs_1.Helper.Executor(list.ContentTypes.results, function (ct) {
|
|
118
|
+
// See if the custom formatter exists and needs the list id
|
|
119
|
+
if (ct.ClientFormCustomFormatter && ct.ClientFormCustomFormatter.indexOf("[[ListId]]") >= 0) {
|
|
120
|
+
// Return a promise
|
|
121
|
+
return new Promise(function (resolve) {
|
|
122
|
+
var customFormatter = ct.ClientFormCustomFormatter;
|
|
123
|
+
// Replace the list id
|
|
124
|
+
while (customFormatter.indexOf("[[ListId]]") >= 0) {
|
|
125
|
+
customFormatter = customFormatter.replace("[[ListId]]", list.Id);
|
|
126
|
+
}
|
|
127
|
+
// Update the content type
|
|
128
|
+
ct.update({
|
|
129
|
+
ClientFormCustomFormatter: customFormatter
|
|
130
|
+
}).execute(resolve, function () {
|
|
131
|
+
// Log the error
|
|
132
|
+
console.error("Error updating the custom formatter for the content type: " + ct.Name);
|
|
133
|
+
// Check the next field
|
|
134
|
+
resolve(null);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}).then(function () {
|
|
139
|
+
// Parse the views
|
|
140
|
+
gd_sprest_bs_1.Helper.Executor(list.Views.results, function (view) {
|
|
141
|
+
// See if the custom formatter exists and needs the list id
|
|
142
|
+
if (view.CustomFormatter && view.CustomFormatter.indexOf("[[ListId]]") >= 0) {
|
|
143
|
+
// Return a promise
|
|
144
|
+
return new Promise(function (resolve) {
|
|
145
|
+
var customFormatter = view.CustomFormatter;
|
|
146
|
+
// Replace the list id
|
|
147
|
+
while (customFormatter.indexOf("[[ListId]]") >= 0) {
|
|
148
|
+
customFormatter = customFormatter.replace("[[ListId]]", list.Id);
|
|
149
|
+
}
|
|
150
|
+
// Update the content type
|
|
151
|
+
view.update({
|
|
152
|
+
CustomFormatter: customFormatter
|
|
153
|
+
}).execute(resolve, function () {
|
|
154
|
+
// Log the error
|
|
155
|
+
console.error("Error updating the custom formatter for the view: " + view.Title);
|
|
156
|
+
// Check the next field
|
|
157
|
+
resolve(null);
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}).then(resolve, reject);
|
|
162
|
+
}, reject);
|
|
163
|
+
}, reject);
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
// Fixes the fields to ensure the list property is configured correctly
|
|
107
167
|
ListConfig.fixMMSFields = function (webUrl, listName) {
|
|
108
168
|
var _this = this;
|
|
109
169
|
// Return a promise
|
|
@@ -263,9 +323,16 @@ var ListConfig = /** @class */ (function () {
|
|
|
263
323
|
});
|
|
264
324
|
}
|
|
265
325
|
}
|
|
326
|
+
// Replace the source list id in the JSON config
|
|
327
|
+
var customFormatter = ct.ClientFormCustomFormatter;
|
|
328
|
+
if (customFormatter) {
|
|
329
|
+
while (customFormatter.indexOf(list.ListId) >= 0) {
|
|
330
|
+
customFormatter = customFormatter.replace(list.ListId, "[[ListId]]");
|
|
331
|
+
}
|
|
332
|
+
}
|
|
266
333
|
// Add the list content type
|
|
267
334
|
cfgProps.ListCfg[0].ContentTypes.push({
|
|
268
|
-
ClientFormCustomFormatter:
|
|
335
|
+
ClientFormCustomFormatter: customFormatter,
|
|
269
336
|
Name: ct.Name,
|
|
270
337
|
Description: ct.Description,
|
|
271
338
|
ParentName: ct.Parent.Name,
|
|
@@ -309,9 +376,16 @@ var ListConfig = /** @class */ (function () {
|
|
|
309
376
|
}
|
|
310
377
|
}
|
|
311
378
|
}
|
|
379
|
+
// Replace the source list id in the JSON config
|
|
380
|
+
var customFormatter = viewInfo.CustomFormatter;
|
|
381
|
+
if (customFormatter) {
|
|
382
|
+
while (customFormatter.indexOf(list.ListId) >= 0) {
|
|
383
|
+
customFormatter = customFormatter.replace(list.ListId, "[[ListId]]");
|
|
384
|
+
}
|
|
385
|
+
}
|
|
312
386
|
// Add the view
|
|
313
387
|
cfgProps.ListCfg[0].ViewInformation.push({
|
|
314
|
-
CustomFormatter:
|
|
388
|
+
CustomFormatter: customFormatter,
|
|
315
389
|
Default: viewInfo.DefaultView,
|
|
316
390
|
Hidden: viewInfo.Hidden,
|
|
317
391
|
JSLink: viewInfo.JSLink,
|