dattatable 2.11.33 → 2.11.35
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/dashboard/navigation.js +23 -23
- package/build/dashboard/table.d.ts +5 -1
- package/build/dashboard/table.js +19 -0
- package/dist/dattatable.js +857 -857
- 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 +5 -4
- 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 +13 -13
- 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 +3 -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
|
@@ -19,12 +19,31 @@ var Navigation = /** @class */ (function () {
|
|
|
19
19
|
}
|
|
20
20
|
// Renders the component
|
|
21
21
|
Navigation.prototype.render = function () {
|
|
22
|
-
|
|
22
|
+
// See if an icon is defined
|
|
23
|
+
var brand;
|
|
24
|
+
if (this._props.iconType) {
|
|
25
|
+
// Set the icon
|
|
26
|
+
var size = this._props.iconSize || 32;
|
|
27
|
+
var icon = typeof (this._props.iconType) === "function" ? this._props.iconType(size) : this._props.iconType;
|
|
28
|
+
// Set the text
|
|
29
|
+
var text = document.createElement("div");
|
|
30
|
+
text.classList.add("ms-2");
|
|
31
|
+
text.append(this._props.title || "");
|
|
32
|
+
// Set the brand
|
|
33
|
+
brand = document.createElement("div");
|
|
34
|
+
brand.classList.add("d-flex");
|
|
35
|
+
brand.appendChild(icon);
|
|
36
|
+
brand.appendChild(text);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
// Set the brand
|
|
40
|
+
brand = this._props.title;
|
|
41
|
+
}
|
|
23
42
|
// Define the default props
|
|
24
43
|
var props = {
|
|
25
|
-
|
|
44
|
+
brand: brand,
|
|
26
45
|
className: this._props.className,
|
|
27
|
-
|
|
46
|
+
el: this._props.el,
|
|
28
47
|
enableSearch: this._props.hideSearch != null ? !this._props.hideSearch : null,
|
|
29
48
|
items: this._props.items,
|
|
30
49
|
itemsEnd: this._props.itemsEnd,
|
|
@@ -38,26 +57,7 @@ var Navigation = /** @class */ (function () {
|
|
|
38
57
|
// Update the collapse visibility
|
|
39
58
|
el.classList.remove("navbar-expand-lg");
|
|
40
59
|
el.classList.add("navbar-expand-sm");
|
|
41
|
-
|
|
42
|
-
if (_this._props.iconType) {
|
|
43
|
-
// Clear the title
|
|
44
|
-
//el.innerHTML = "";
|
|
45
|
-
debugger;
|
|
46
|
-
// Set the icon
|
|
47
|
-
var size = _this._props.iconSize || 32;
|
|
48
|
-
var icon = typeof (_this._props.iconType) === "function" ? _this._props.iconType(size) : _this._props.iconType;
|
|
49
|
-
// Set the text
|
|
50
|
-
var text = document.createElement("div");
|
|
51
|
-
text.classList.add("h5");
|
|
52
|
-
text.classList.add("ms-2");
|
|
53
|
-
text.append(_this._props.title || "");
|
|
54
|
-
// Add the icon
|
|
55
|
-
var elIcon = document.createElement("div");
|
|
56
|
-
elIcon.classList.add("d-flex");
|
|
57
|
-
elIcon.appendChild(icon);
|
|
58
|
-
elIcon.appendChild(text);
|
|
59
|
-
el.appendChild(elIcon);
|
|
60
|
-
}
|
|
60
|
+
el.classList.add("rounded-top");
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
// Call the rendering event
|
|
@@ -5,6 +5,7 @@ import "datatables.net-bs5";
|
|
|
5
5
|
* Data Table
|
|
6
6
|
*/
|
|
7
7
|
export interface IDataTable {
|
|
8
|
+
addRow: (row: any) => void;
|
|
8
9
|
datatable: any;
|
|
9
10
|
filter: (idx: number, value?: string) => void;
|
|
10
11
|
filterExact: (idx: number, value?: string) => void;
|
|
@@ -19,7 +20,9 @@ export interface IDataTable {
|
|
|
19
20
|
*/
|
|
20
21
|
export interface IDataTableProps {
|
|
21
22
|
className?: string;
|
|
22
|
-
columns: Components.ITableColumn
|
|
23
|
+
columns: (Components.ITableColumn & {
|
|
24
|
+
footer?: string;
|
|
25
|
+
})[];
|
|
23
26
|
dtProps?: any;
|
|
24
27
|
el: HTMLElement;
|
|
25
28
|
onRendering?: (dtProps: any) => any;
|
|
@@ -33,6 +36,7 @@ export declare class DataTable implements IDataTable {
|
|
|
33
36
|
private _datatable;
|
|
34
37
|
private _props;
|
|
35
38
|
constructor(props: IDataTableProps);
|
|
39
|
+
addRow(row: any): void;
|
|
36
40
|
private applyPlugin;
|
|
37
41
|
/** Public Interface */
|
|
38
42
|
get datatable(): any;
|
package/build/dashboard/table.js
CHANGED
|
@@ -57,6 +57,25 @@ var DataTable = /** @class */ (function () {
|
|
|
57
57
|
// Render the table
|
|
58
58
|
this.refresh(props.rows);
|
|
59
59
|
}
|
|
60
|
+
// Adds a row to the table
|
|
61
|
+
DataTable.prototype.addRow = function (row) {
|
|
62
|
+
// See if this is an array
|
|
63
|
+
if (row && typeof (row.length) === "number") {
|
|
64
|
+
// Add the row
|
|
65
|
+
this._datatable.row.add(row).draw(false);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
var newRow = [];
|
|
69
|
+
// Parse the columns
|
|
70
|
+
for (var i = 0; i < this._props.columns.length; i++) {
|
|
71
|
+
var column = this._props.columns[i];
|
|
72
|
+
// Append the value
|
|
73
|
+
newRow.push(row[column.name] || "");
|
|
74
|
+
}
|
|
75
|
+
// Add the row
|
|
76
|
+
this._datatable.row.add(newRow).draw(false);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
60
79
|
// Applies the datatables.net plugin
|
|
61
80
|
DataTable.prototype.applyPlugin = function (table) {
|
|
62
81
|
var _this = this;
|