dattatable 1.5.2 → 1.5.6
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/modal.d.ts +1 -0
- package/build/common/modal.js +2 -0
- package/build/documents.d.ts +2 -2
- package/build/documents.js +18 -7
- package/dist/dattatable.js +423 -423
- package/dist/dattatable.min.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/CanvasForm.html +1 -1
- package/docs/classes/Dashboard.html +2 -2
- package/docs/classes/DataTable.html +2 -2
- package/docs/classes/Documents.html +5 -5
- package/docs/classes/FilterSlideout.html +1 -1
- package/docs/classes/Footer.html +1 -1
- package/docs/classes/Header.html +1 -1
- package/docs/classes/InstallationRequired.html +1 -1
- package/docs/classes/ItemForm.html +3 -3
- package/docs/classes/LoadingDialog.html +1 -1
- package/docs/classes/Modal.html +1 -1
- package/docs/classes/Navigation.html +1 -1
- package/docs/enums/ActionButtonTypes.html +1 -1
- package/docs/interfaces/IDashboardProps.html +1 -1
- package/docs/interfaces/IDataTable.html +1 -1
- package/docs/interfaces/IDataTableProps.html +1 -1
- package/docs/interfaces/IDocumentsProps.html +1 -1
- package/docs/interfaces/IFilterItem.html +1 -1
- package/docs/interfaces/IFilterProps.html +1 -1
- package/docs/interfaces/IFooterProps.html +1 -1
- package/docs/interfaces/IHeaderProps.html +1 -1
- package/docs/interfaces/IItemFormCreateProps.html +1 -1
- package/docs/interfaces/IItemFormEditProps.html +1 -1
- package/docs/interfaces/IItemFormViewProps.html +1 -1
- package/docs/interfaces/IShowDialogProps.html +1 -1
- package/docs/modules.html +1 -1
- package/package.json +2 -2
- package/pnpm-lock.yaml +16 -16
package/build/common/modal.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare class Modal {
|
|
|
17
17
|
static setAutoClose(value: boolean): void;
|
|
18
18
|
static setBackdrop(value: boolean): void;
|
|
19
19
|
static setBody(content: any): void;
|
|
20
|
+
static setCloseButtonVisibility(showFl: boolean): void;
|
|
20
21
|
static setCloseEvent(event: any): void;
|
|
21
22
|
static setFocus(value: boolean): void;
|
|
22
23
|
static setFooter(content: any): void;
|
package/build/common/modal.js
CHANGED
|
@@ -95,6 +95,8 @@ var Modal = /** @class */ (function () {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
+
// Sets the close button visibility
|
|
99
|
+
Modal.setCloseButtonVisibility = function (showFl) { this._modal.setCloseButtonVisibility(showFl); };
|
|
98
100
|
// Sets the close event
|
|
99
101
|
Modal.setCloseEvent = function (event) { this._onCloseEvent = event; };
|
|
100
102
|
// Sets the focus option
|
package/build/documents.d.ts
CHANGED
|
@@ -45,8 +45,8 @@ export interface IDocumentsProps {
|
|
|
45
45
|
onNavigationRendering?: (props: Components.INavbarProps) => void;
|
|
46
46
|
onNavigationRendered?: (nav: Components.INavbar) => void;
|
|
47
47
|
onRefresh?: () => void;
|
|
48
|
-
onRendered?: () => void;
|
|
49
|
-
onSearchRendered?: (el
|
|
48
|
+
onRendered?: (el?: HTMLElement) => void;
|
|
49
|
+
onSearchRendered?: (el?: HTMLElement) => void;
|
|
50
50
|
onShowFilter?: Function;
|
|
51
51
|
table?: {
|
|
52
52
|
columns?: Components.ITableColumn[];
|
package/build/documents.js
CHANGED
|
@@ -206,7 +206,7 @@ var Documents = /** @class */ (function () {
|
|
|
206
206
|
// Get the file contents
|
|
207
207
|
(0, gd_sprest_bs_1.Web)().getFileByServerRelativeUrl(file.ServerRelativeUrl).content().execute(function (data) {
|
|
208
208
|
// Copy the file
|
|
209
|
-
(0, gd_sprest_bs_1.
|
|
209
|
+
(0, gd_sprest_bs_1.Web)().getFolderByServerRelativeUrl(_this._rootFolder.ServerRelativeUrl).Files().add(file.Name, true, data).execute(resolve, resolve);
|
|
210
210
|
});
|
|
211
211
|
});
|
|
212
212
|
}).then(function () {
|
|
@@ -221,7 +221,7 @@ var Documents = /** @class */ (function () {
|
|
|
221
221
|
var file_1 = item.data;
|
|
222
222
|
file_1.content().execute(function (data) {
|
|
223
223
|
// Copy the file
|
|
224
|
-
(0, gd_sprest_bs_1.
|
|
224
|
+
(0, gd_sprest_bs_1.Web)().getFolderByServerRelativeUrl(_this._rootFolder.ServerRelativeUrl).Files().add(file_1.Name, true, data).execute(function () {
|
|
225
225
|
// Close the dialog
|
|
226
226
|
loadingDialog_1.LoadingDialog.hide();
|
|
227
227
|
// Refresh the page
|
|
@@ -327,7 +327,15 @@ var Documents = /** @class */ (function () {
|
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
329
|
// Return the dropdown items
|
|
330
|
-
return items
|
|
330
|
+
return items.sort(function (a, b) {
|
|
331
|
+
if (a.text < b.text) {
|
|
332
|
+
return -1;
|
|
333
|
+
}
|
|
334
|
+
if (a.text > b.text) {
|
|
335
|
+
return 1;
|
|
336
|
+
}
|
|
337
|
+
return 0;
|
|
338
|
+
});
|
|
331
339
|
};
|
|
332
340
|
// Generates the table properties
|
|
333
341
|
Documents.prototype.generateTableProps = function () {
|
|
@@ -393,8 +401,8 @@ var Documents = /** @class */ (function () {
|
|
|
393
401
|
// Render the file
|
|
394
402
|
_this.renderFileIcon(el, _this.getFileName(file));
|
|
395
403
|
// Set the filter/sort value
|
|
396
|
-
el.setAttribute("data-filter", _this.getFileName(file));
|
|
397
|
-
el.setAttribute("data-sort", _this.getFileName(file));
|
|
404
|
+
el.setAttribute("data-filter", (0, methods_1.getFileExt)(_this.getFileName(file)));
|
|
405
|
+
el.setAttribute("data-sort", (0, methods_1.getFileExt)(_this.getFileName(file)));
|
|
398
406
|
// Call the custom event
|
|
399
407
|
customEvent ? customEvent(el, col, file) : null;
|
|
400
408
|
};
|
|
@@ -560,7 +568,7 @@ var Documents = /** @class */ (function () {
|
|
|
560
568
|
// Render the table
|
|
561
569
|
_this.renderTable();
|
|
562
570
|
// Call the render event
|
|
563
|
-
_this._props.onRendered ? _this._props.onRendered() : null;
|
|
571
|
+
_this._props.onRendered ? _this._props.onRendered(_this._el) : null;
|
|
564
572
|
// Resolve the promise
|
|
565
573
|
resolve();
|
|
566
574
|
}, reject);
|
|
@@ -804,6 +812,7 @@ var Documents = /** @class */ (function () {
|
|
|
804
812
|
span.title = "Binary File";
|
|
805
813
|
break;
|
|
806
814
|
// Code
|
|
815
|
+
case "app":
|
|
807
816
|
case "asp":
|
|
808
817
|
case "aspx":
|
|
809
818
|
case "css":
|
|
@@ -815,6 +824,8 @@ var Documents = /** @class */ (function () {
|
|
|
815
824
|
case "mht":
|
|
816
825
|
case "mhtml":
|
|
817
826
|
case "scss":
|
|
827
|
+
case "sppkg":
|
|
828
|
+
case "wsp":
|
|
818
829
|
case "xml":
|
|
819
830
|
case "yaml":
|
|
820
831
|
span.appendChild((0, fileEarmarkCode_1.fileEarmarkCode)(size));
|
|
@@ -1091,7 +1102,7 @@ var Documents = /** @class */ (function () {
|
|
|
1091
1102
|
}
|
|
1092
1103
|
else {
|
|
1093
1104
|
// Upload the file to the objective folder
|
|
1094
|
-
|
|
1105
|
+
(0, gd_sprest_bs_1.Web)().getFolderByServerRelativeUrl(_this._rootFolder.ServerRelativeUrl).Files().add(fileInfo.name, true, fileInfo.data).execute(resolve, reject);
|
|
1095
1106
|
}
|
|
1096
1107
|
});
|
|
1097
1108
|
};
|