dattatable 2.10.4 → 2.10.5
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/itemForm.d.ts +4 -0
- package/build/common/itemForm.js +34 -18
- package/dist/dattatable.js +835 -835
- 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 +5 -4
- package/docs/classes/List.html +4 -4
- 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/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/IHeaderProps.html +2 -2
- package/docs/interfaces/IInstallProps.html +2 -2
- package/docs/interfaces/IItemFormCreateProps.html +3 -2
- package/docs/interfaces/IItemFormEditProps.html +3 -2
- package/docs/interfaces/IItemFormTab.html +2 -2
- package/docs/interfaces/IItemFormTabInfo.html +2 -2
- package/docs/interfaces/IItemFormViewProps.html +3 -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/IShowDialogProps.html +2 -2
- package/docs/interfaces/ITiles.html +2 -2
- package/docs/interfaces/ITilesProps.html +2 -2
- package/docs/variables/DattaTable.html +1 -1
- package/docs/variables/ListSecurityDefaultGroups.html +1 -1
- package/package.json +54 -54
|
@@ -18,6 +18,7 @@ export interface IItemFormTabInfo {
|
|
|
18
18
|
}
|
|
19
19
|
/** Create Item Properties */
|
|
20
20
|
export interface IItemFormCreateProps {
|
|
21
|
+
elForm?: HTMLElement;
|
|
21
22
|
info?: Helper.IListFormResult;
|
|
22
23
|
onCreateEditForm?: (props: Components.IListFormEditProps) => Components.IListFormEditProps;
|
|
23
24
|
onFormButtonsRendering?: (buttons: Components.IButtonProps[]) => Components.IButtonProps[];
|
|
@@ -34,6 +35,7 @@ export interface IItemFormCreateProps {
|
|
|
34
35
|
}
|
|
35
36
|
/** Edit Item Properties */
|
|
36
37
|
export interface IItemFormEditProps {
|
|
38
|
+
elForm?: HTMLElement;
|
|
37
39
|
info?: Helper.IListFormResult;
|
|
38
40
|
itemId: number;
|
|
39
41
|
onCreateEditForm?: (props: Components.IListFormEditProps) => Components.IListFormEditProps;
|
|
@@ -51,6 +53,7 @@ export interface IItemFormEditProps {
|
|
|
51
53
|
}
|
|
52
54
|
/** View Item Properties */
|
|
53
55
|
export interface IItemFormViewProps {
|
|
56
|
+
elForm?: HTMLElement;
|
|
54
57
|
info?: Helper.IListFormResult;
|
|
55
58
|
itemId: number;
|
|
56
59
|
onCreateViewForm?: (props: Components.IListFormDisplayProps) => Components.IListFormDisplayProps;
|
|
@@ -67,6 +70,7 @@ export interface IItemFormViewProps {
|
|
|
67
70
|
* Item Form
|
|
68
71
|
*/
|
|
69
72
|
export declare class ItemForm {
|
|
73
|
+
private static _elForm;
|
|
70
74
|
private static _onCreateEditForm;
|
|
71
75
|
private static _onCreateViewForm;
|
|
72
76
|
private static _onFormButtonsRendering;
|
package/build/common/itemForm.js
CHANGED
|
@@ -101,6 +101,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
101
101
|
if (props === void 0) { props = {}; }
|
|
102
102
|
// Set the properties
|
|
103
103
|
this._controlMode = gd_sprest_bs_1.SPTypes.ControlMode.New;
|
|
104
|
+
this._elForm = props.elForm;
|
|
104
105
|
this._info = props.info;
|
|
105
106
|
this._onCreateEditForm = props.onCreateEditForm;
|
|
106
107
|
this._onFormButtonsRendering = props.onFormButtonsRendering;
|
|
@@ -120,6 +121,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
120
121
|
ItemForm.edit = function (props) {
|
|
121
122
|
// Set the properties
|
|
122
123
|
this._controlMode = gd_sprest_bs_1.SPTypes.ControlMode.Edit;
|
|
124
|
+
this._elForm = props.elForm;
|
|
123
125
|
this._info = props.info;
|
|
124
126
|
this._onCreateEditForm = props.onCreateEditForm;
|
|
125
127
|
this._onFormButtonsRendering = props.onFormButtonsRendering;
|
|
@@ -153,6 +155,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
153
155
|
ItemForm.view = function (props) {
|
|
154
156
|
// Set the properties
|
|
155
157
|
this._controlMode = gd_sprest_bs_1.SPTypes.ControlMode.Display;
|
|
158
|
+
this._elForm = props.elForm;
|
|
156
159
|
this._info = props.info;
|
|
157
160
|
this._onCreateViewForm = props.onCreateViewForm;
|
|
158
161
|
this._onFormButtonsRendering = props.onFormButtonsRendering;
|
|
@@ -322,31 +325,43 @@ var ItemForm = /** @class */ (function () {
|
|
|
322
325
|
};
|
|
323
326
|
// Renders the form
|
|
324
327
|
ItemForm.renderForm = function () {
|
|
325
|
-
//
|
|
326
|
-
(this.
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
//
|
|
334
|
-
this.
|
|
328
|
+
// See if we are not rendering to a custom element
|
|
329
|
+
if (this._elForm == null) {
|
|
330
|
+
// Clear the form
|
|
331
|
+
(this._useModal ? _1.Modal : _1.CanvasForm).clear();
|
|
332
|
+
// Set the header
|
|
333
|
+
(this._useModal ? _1.Modal : _1.CanvasForm).setHeader('<h5 class="m-0">' + (this._info.item ? this._info.item.Title : "Create Item") + '</h5>');
|
|
334
|
+
// Call the header event
|
|
335
|
+
this._onSetHeader ? this._onSetHeader(this._useModal ? _1.Modal.HeaderElement : _1.CanvasForm.HeaderElement) : null;
|
|
336
|
+
// See if we are rendering tabs
|
|
337
|
+
if (this._tabInfo) {
|
|
338
|
+
// Render the tabs
|
|
339
|
+
this.renderTabs();
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
// Render the form based on the type
|
|
343
|
+
var elForm = this.IsDisplay ? this.renderDisplayForm() : this.renderEditForm();
|
|
344
|
+
// Update the body
|
|
345
|
+
(this._useModal ? _1.Modal : _1.CanvasForm).setBody(elForm);
|
|
346
|
+
}
|
|
347
|
+
// Render the footer
|
|
348
|
+
this.renderFooter();
|
|
349
|
+
// Call the event
|
|
350
|
+
this._onShowForm ? this._onShowForm(this._useModal ? _1.Modal : _1.CanvasForm) : null;
|
|
351
|
+
// Show the form
|
|
352
|
+
(this._useModal ? _1.Modal : _1.CanvasForm).show();
|
|
335
353
|
}
|
|
336
354
|
else {
|
|
337
355
|
// Render the form based on the type
|
|
338
356
|
var elForm = this.IsDisplay ? this.renderDisplayForm() : this.renderEditForm();
|
|
339
|
-
//
|
|
340
|
-
(
|
|
357
|
+
// Copy the elements
|
|
358
|
+
for (var i = 0; i < elForm.children.length; i++) {
|
|
359
|
+
// Append the element
|
|
360
|
+
this._elForm.appendChild(elForm.children[i]);
|
|
361
|
+
}
|
|
341
362
|
}
|
|
342
|
-
// Render the footer
|
|
343
|
-
this.renderFooter();
|
|
344
|
-
// Call the event
|
|
345
|
-
this._onShowForm ? this._onShowForm(this._useModal ? _1.Modal : _1.CanvasForm) : null;
|
|
346
363
|
// Close the dialog
|
|
347
364
|
_1.LoadingDialog.hide();
|
|
348
|
-
// Show the form
|
|
349
|
-
(this._useModal ? _1.Modal : _1.CanvasForm).show();
|
|
350
365
|
};
|
|
351
366
|
// Generates a tab
|
|
352
367
|
ItemForm.renderTabs = function () {
|
|
@@ -513,6 +528,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
513
528
|
}
|
|
514
529
|
});
|
|
515
530
|
};
|
|
531
|
+
ItemForm._elForm = null;
|
|
516
532
|
ItemForm._onCreateEditForm = null;
|
|
517
533
|
ItemForm._onCreateViewForm = null;
|
|
518
534
|
ItemForm._onFormButtonsRendering = null;
|