dattatable 2.6.8 → 2.7.0

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.
Files changed (54) hide show
  1. package/build/common/index.d.ts +1 -0
  2. package/build/common/index.js +1 -0
  3. package/build/common/timeout.d.ts +11 -0
  4. package/build/common/timeout.js +74 -0
  5. package/build/lib.d.ts +1 -0
  6. package/dist/dattatable.js +12 -1
  7. package/dist/dattatable.min.js +1 -1
  8. package/docs/assets/search.js +1 -1
  9. package/docs/classes/AuditLog.html +13 -13
  10. package/docs/classes/CanvasForm.html +17 -17
  11. package/docs/classes/Comments.html +12 -12
  12. package/docs/classes/Dashboard.html +17 -17
  13. package/docs/classes/DataTable.html +11 -11
  14. package/docs/classes/Documents.html +45 -45
  15. package/docs/classes/FilterSlideout.html +14 -14
  16. package/docs/classes/Footer.html +4 -4
  17. package/docs/classes/Header.html +4 -4
  18. package/docs/classes/InstallationRequired.html +12 -12
  19. package/docs/classes/ItemForm.html +47 -47
  20. package/docs/classes/List.html +40 -40
  21. package/docs/classes/LoadingDialog.html +12 -12
  22. package/docs/classes/Modal.html +26 -26
  23. package/docs/classes/Navigation.html +6 -6
  24. package/docs/classes/Timeout.html +141 -0
  25. package/docs/enums/ActionButtonTypes.html +6 -6
  26. package/docs/functions/formatBytes.html +2 -1
  27. package/docs/functions/formatDateValue.html +2 -1
  28. package/docs/functions/formatTimeValue.html +2 -1
  29. package/docs/functions/getFileExt.html +2 -1
  30. package/docs/index.html +1 -0
  31. package/docs/interfaces/IAuditLogItem.html +9 -9
  32. package/docs/interfaces/IAuditLogItemCreation.html +7 -7
  33. package/docs/interfaces/IAuditLogProps.html +5 -5
  34. package/docs/interfaces/IAuditLogViewProps.html +6 -6
  35. package/docs/interfaces/ICommentsItem.html +6 -6
  36. package/docs/interfaces/IDashboardProps.html +14 -14
  37. package/docs/interfaces/IDataTable.html +7 -7
  38. package/docs/interfaces/IDataTableProps.html +6 -6
  39. package/docs/interfaces/IDocumentsProps.html +25 -25
  40. package/docs/interfaces/IFilterItem.html +5 -5
  41. package/docs/interfaces/IFilterProps.html +4 -4
  42. package/docs/interfaces/IFooterProps.html +6 -6
  43. package/docs/interfaces/IHeaderProps.html +5 -5
  44. package/docs/interfaces/IInstallProps.html +4 -4
  45. package/docs/interfaces/IItemFormCreateProps.html +14 -14
  46. package/docs/interfaces/IItemFormEditProps.html +15 -15
  47. package/docs/interfaces/IItemFormTab.html +8 -8
  48. package/docs/interfaces/IItemFormTabInfo.html +3 -3
  49. package/docs/interfaces/IItemFormViewProps.html +12 -12
  50. package/docs/interfaces/IListProps.html +9 -9
  51. package/docs/interfaces/IShowDialogProps.html +7 -7
  52. package/docs/modules.html +2 -0
  53. package/docs/variables/DattaTable.html +3 -2
  54. package/package.json +1 -1
@@ -8,3 +8,4 @@ export * from "./list";
8
8
  export * from "./loadingDialog";
9
9
  export * from "./methods";
10
10
  export * from "./modal";
11
+ export * from "./timeout";
@@ -24,3 +24,4 @@ __exportStar(require("./list"), exports);
24
24
  __exportStar(require("./loadingDialog"), exports);
25
25
  __exportStar(require("./methods"), exports);
26
26
  __exportStar(require("./modal"), exports);
27
+ __exportStar(require("./timeout"), exports);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Timeout
3
+ */
4
+ export declare class Timeout {
5
+ private static _loopId;
6
+ private static _timeout;
7
+ private static checkWeb;
8
+ static setTimer(timeout?: number): void;
9
+ static stop(): void;
10
+ static start(): void;
11
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Timeout = void 0;
4
+ var gd_sprest_bs_1 = require("gd-sprest-bs");
5
+ var modal_1 = require("./modal");
6
+ /**
7
+ * Timeout
8
+ */
9
+ var Timeout = /** @class */ (function () {
10
+ function Timeout() {
11
+ }
12
+ // Shows the canvas
13
+ Timeout.checkWeb = function () {
14
+ var _this = this;
15
+ // Query the current web
16
+ (0, gd_sprest_bs_1.Web)().query({ Select: ["Title"] }).execute(
17
+ // Success
18
+ function () {
19
+ // Log
20
+ console.info("[Timeout] Successfully able to query the current web.");
21
+ },
22
+ // Error getting the web information
23
+ // Display a modal
24
+ function () {
25
+ // Log
26
+ console.error("[Timeout] Error getting the current web.");
27
+ // Clear the modal
28
+ modal_1.Modal.clear();
29
+ // Set the header
30
+ modal_1.Modal.setHeader("Error Loading Web");
31
+ // Set the body
32
+ modal_1.Modal.setBody("There was an error getting the current web. Please refresh the page.");
33
+ // Show the modal
34
+ modal_1.Modal.show();
35
+ // Stop the loop
36
+ _this.stop();
37
+ });
38
+ };
39
+ // Set the timeout value
40
+ // Default value is 300000ms (5 min)
41
+ Timeout.setTimer = function (timeout) {
42
+ if (timeout === void 0) { timeout = 300000; }
43
+ // Update the value
44
+ this._timeout = timeout;
45
+ };
46
+ // Stops the timeout
47
+ Timeout.stop = function () {
48
+ // Ensure the loop id exists
49
+ if (this._loopId) {
50
+ // Stop the loop
51
+ clearInterval(this._loopId);
52
+ // Clear the loop id
53
+ this._loopId = null;
54
+ }
55
+ };
56
+ // Starts the timeout
57
+ Timeout.start = function () {
58
+ // Ensure it's not running
59
+ if (this._loopId > 0) {
60
+ return;
61
+ }
62
+ // Ensure the timer is set
63
+ if (this._timeout == null) {
64
+ // Set the default timer value
65
+ this.setTimer();
66
+ }
67
+ // Start the interval
68
+ this._loopId = setInterval(this.checkWeb, this._timeout);
69
+ };
70
+ Timeout._loopId = null;
71
+ Timeout._timeout = null;
72
+ return Timeout;
73
+ }());
74
+ exports.Timeout = Timeout;
package/build/lib.d.ts CHANGED
@@ -25,4 +25,5 @@ export declare const DattaTable: {
25
25
  formatTimeValue: (value: string, format?: string) => string;
26
26
  getFileExt: (fileName?: string) => string;
27
27
  Modal: typeof Common.Modal;
28
+ Timeout: typeof Common.Timeout;
28
29
  };
@@ -71,7 +71,7 @@ eval("\r\nvar __assign = (this && this.__assign) || function () {\r\n __assig
71
71
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
72
72
 
73
73
  "use strict";
74
- eval("\r\n/** Common Components */\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./canvas */ \"./build/common/canvas.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./comments */ \"./build/common/comments.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./documents */ \"./build/common/documents.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./installRequired */ \"./build/common/installRequired.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./itemForm */ \"./build/common/itemForm.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./list */ \"./build/common/list.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./loadingDialog */ \"./build/common/loadingDialog.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./methods */ \"./build/common/methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modal */ \"./build/common/modal.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/index.js?");
74
+ eval("\r\n/** Common Components */\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./canvas */ \"./build/common/canvas.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./comments */ \"./build/common/comments.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./documents */ \"./build/common/documents.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./installRequired */ \"./build/common/installRequired.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./itemForm */ \"./build/common/itemForm.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./list */ \"./build/common/list.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./loadingDialog */ \"./build/common/loadingDialog.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./methods */ \"./build/common/methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modal */ \"./build/common/modal.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./timeout */ \"./build/common/timeout.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/index.js?");
75
75
 
76
76
  /***/ }),
77
77
 
@@ -141,6 +141,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
141
141
 
142
142
  /***/ }),
143
143
 
144
+ /***/ "./build/common/timeout.js":
145
+ /*!*********************************!*\
146
+ !*** ./build/common/timeout.js ***!
147
+ \*********************************/
148
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
149
+
150
+ "use strict";
151
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Timeout = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.17/node_modules/gd-sprest-bs/build/index.js\");\r\nvar modal_1 = __webpack_require__(/*! ./modal */ \"./build/common/modal.js\");\r\n/**\r\n * Timeout\r\n */\r\nvar Timeout = /** @class */ (function () {\r\n function Timeout() {\r\n }\r\n // Shows the canvas\r\n Timeout.checkWeb = function () {\r\n var _this = this;\r\n // Query the current web\r\n (0, gd_sprest_bs_1.Web)().query({ Select: [\"Title\"] }).execute(\r\n // Success\r\n function () {\r\n // Log\r\n console.info(\"[Timeout] Successfully able to query the current web.\");\r\n }, \r\n // Error getting the web information\r\n // Display a modal\r\n function () {\r\n // Log\r\n console.error(\"[Timeout] Error getting the current web.\");\r\n // Clear the modal\r\n modal_1.Modal.clear();\r\n // Set the header\r\n modal_1.Modal.setHeader(\"Error Loading Web\");\r\n // Set the body\r\n modal_1.Modal.setBody(\"There was an error getting the current web. Please refresh the page.\");\r\n // Show the modal\r\n modal_1.Modal.show();\r\n // Stop the loop\r\n _this.stop();\r\n });\r\n };\r\n // Set the timeout value\r\n // Default value is 300000ms (5 min)\r\n Timeout.setTimer = function (timeout) {\r\n if (timeout === void 0) { timeout = 300000; }\r\n // Update the value\r\n this._timeout = timeout;\r\n };\r\n // Stops the timeout\r\n Timeout.stop = function () {\r\n // Ensure the loop id exists\r\n if (this._loopId) {\r\n // Stop the loop\r\n clearInterval(this._loopId);\r\n // Clear the loop id\r\n this._loopId = null;\r\n }\r\n };\r\n // Starts the timeout\r\n Timeout.start = function () {\r\n // Ensure it's not running\r\n if (this._loopId > 0) {\r\n return;\r\n }\r\n // Ensure the timer is set\r\n if (this._timeout == null) {\r\n // Set the default timer value\r\n this.setTimer();\r\n }\r\n // Start the interval\r\n this._loopId = setInterval(this.checkWeb, this._timeout);\r\n };\r\n Timeout._loopId = null;\r\n Timeout._timeout = null;\r\n return Timeout;\r\n}());\r\nexports.Timeout = Timeout;\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/timeout.js?");
152
+
153
+ /***/ }),
154
+
144
155
  /***/ "./build/dashboard/filter.js":
145
156
  /*!***********************************!*\
146
157
  !*** ./build/dashboard/filter.js ***!