dattatable 1.8.6 → 1.8.7
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/comments.d.ts +24 -0
- package/build/comments.js +234 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +3 -0
- package/dist/dattatable.js +12 -1
- package/dist/dattatable.min.js +1 -1
- package/docs/assets/main.js +2 -2
- package/docs/assets/search.js +1 -1
- package/docs/classes/CanvasForm.html +1 -1
- package/docs/classes/Comments.html +3 -0
- 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/index.html +1 -1
- package/docs/interfaces/ICommentsItem.html +1 -0
- 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/IItemFormTab.html +1 -1
- package/docs/interfaces/IItemFormTabInfo.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 +5 -5
- package/pnpm-lock.yaml +371 -418
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Helper } from "gd-sprest-bs";
|
|
2
|
+
export interface ICommentsItem {
|
|
3
|
+
AuthorId: number;
|
|
4
|
+
Author: {
|
|
5
|
+
Id: number;
|
|
6
|
+
EMail: string;
|
|
7
|
+
Title: string;
|
|
8
|
+
};
|
|
9
|
+
Comment: string;
|
|
10
|
+
Created: string;
|
|
11
|
+
Title: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Comments
|
|
15
|
+
*/
|
|
16
|
+
export declare class Comments {
|
|
17
|
+
private static _listId;
|
|
18
|
+
static add(item: any, comment: string): PromiseLike<void>;
|
|
19
|
+
static configuration(cfg?: Helper.ISPConfig): Helper.ISPConfig;
|
|
20
|
+
static init(listName: string): PromiseLike<void>;
|
|
21
|
+
private static load;
|
|
22
|
+
static new(item: any): void;
|
|
23
|
+
static view(item: any): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Comments = void 0;
|
|
4
|
+
var gd_sprest_bs_1 = require("gd-sprest-bs");
|
|
5
|
+
var moment = require("moment");
|
|
6
|
+
var canvas_1 = require("./common/canvas");
|
|
7
|
+
var loadingDialog_1 = require("./common/loadingDialog");
|
|
8
|
+
var modal_1 = require("./common/modal");
|
|
9
|
+
// List Name
|
|
10
|
+
var LIST_NAME = "Comments";
|
|
11
|
+
/**
|
|
12
|
+
* Comments
|
|
13
|
+
*/
|
|
14
|
+
var Comments = /** @class */ (function () {
|
|
15
|
+
function Comments() {
|
|
16
|
+
}
|
|
17
|
+
// Adds a comment to an item
|
|
18
|
+
Comments.add = function (item, comment) {
|
|
19
|
+
var _this = this;
|
|
20
|
+
// Return a promise
|
|
21
|
+
return new Promise(function (resolve, reject) {
|
|
22
|
+
// Ensure a comment exists
|
|
23
|
+
if (comment) {
|
|
24
|
+
// Show a loading dialog
|
|
25
|
+
loadingDialog_1.LoadingDialog.setHeader("Adding Comment");
|
|
26
|
+
loadingDialog_1.LoadingDialog.setBody("This dialog will close after the comment is added.");
|
|
27
|
+
loadingDialog_1.LoadingDialog.show();
|
|
28
|
+
// Add the item
|
|
29
|
+
(0, gd_sprest_bs_1.List)(LIST_NAME).Items().add({
|
|
30
|
+
Comment: comment,
|
|
31
|
+
Title: _this._listId + "|" + item.Id
|
|
32
|
+
}).execute(function () {
|
|
33
|
+
// Hide the loading dialog
|
|
34
|
+
loadingDialog_1.LoadingDialog.hide();
|
|
35
|
+
// Resolve the request
|
|
36
|
+
resolve();
|
|
37
|
+
}, reject);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
// Resolve the request
|
|
41
|
+
resolve();
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
// Configuration
|
|
46
|
+
Comments.configuration = function (cfg) {
|
|
47
|
+
var commentsCfg = gd_sprest_bs_1.Helper.SPConfig({
|
|
48
|
+
ListCfg: [
|
|
49
|
+
{
|
|
50
|
+
ListInformation: {
|
|
51
|
+
Title: LIST_NAME,
|
|
52
|
+
BaseTemplate: gd_sprest_bs_1.SPTypes.ListTemplateType.GenericList,
|
|
53
|
+
Hidden: true,
|
|
54
|
+
NoCrawl: true
|
|
55
|
+
},
|
|
56
|
+
TitleFieldDisplayName: "Comment ID",
|
|
57
|
+
TitleFieldIndexed: true,
|
|
58
|
+
CustomFields: [
|
|
59
|
+
{
|
|
60
|
+
name: "Comment",
|
|
61
|
+
title: "Comment",
|
|
62
|
+
type: gd_sprest_bs_1.Helper.SPCfgFieldType.Note,
|
|
63
|
+
noteType: gd_sprest_bs_1.SPTypes.FieldNoteType.TextOnly
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
ViewInformation: [
|
|
67
|
+
{
|
|
68
|
+
ViewName: "All Items",
|
|
69
|
+
ViewQuery: "Author eq [Me]",
|
|
70
|
+
ViewFields: ["LinkTitle", "Comment", "Author", "Created"]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
// Append the comments to the configuration if it exists
|
|
77
|
+
if (cfg && cfg._configuration.ListCfg && cfg._configuration.ListCfg.length > 0) {
|
|
78
|
+
// Append the list configuration
|
|
79
|
+
cfg._configuration.ListCfg = cfg._configuration.ListCfg.concat(commentsCfg._configuration.ListCfg);
|
|
80
|
+
}
|
|
81
|
+
// Return the configuration
|
|
82
|
+
return cfg || commentsCfg;
|
|
83
|
+
};
|
|
84
|
+
// Initialization of the component
|
|
85
|
+
Comments.init = function (listName) {
|
|
86
|
+
var _this = this;
|
|
87
|
+
// Return a promise
|
|
88
|
+
return new Promise(function (resolve, reject) {
|
|
89
|
+
// Load the List Information
|
|
90
|
+
(0, gd_sprest_bs_1.List)(listName).execute(function (list) {
|
|
91
|
+
// Set the list id
|
|
92
|
+
_this._listId = list.Id;
|
|
93
|
+
// Resolve the request
|
|
94
|
+
resolve();
|
|
95
|
+
}, reject);
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
// Loads the comments for the item
|
|
99
|
+
Comments.load = function (item) {
|
|
100
|
+
var _this = this;
|
|
101
|
+
// Return a promise
|
|
102
|
+
return new Promise(function (resolve, reject) {
|
|
103
|
+
// Ensure a list id exists
|
|
104
|
+
if (_this._listId) {
|
|
105
|
+
// Load the comments for this item
|
|
106
|
+
(0, gd_sprest_bs_1.List)(LIST_NAME).Items().query({
|
|
107
|
+
Expand: ["Author"],
|
|
108
|
+
Filter: "Title eq '" + _this._listId + "|" + item.Id + "'",
|
|
109
|
+
OrderBy: ["Created desc"],
|
|
110
|
+
Select: ["Id", "Comment", "Created", "Title", "Author/Id", "Author/EMail", "Author/Title"]
|
|
111
|
+
}).execute(function (items) {
|
|
112
|
+
// Resolve the request
|
|
113
|
+
resolve(items.results);
|
|
114
|
+
}, reject);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
// Reject the request
|
|
118
|
+
reject("The target list doesn't exist. Please initialize the component before using it.");
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
// Displays the new comment form
|
|
123
|
+
Comments.new = function (item) {
|
|
124
|
+
var _this = this;
|
|
125
|
+
// Clear the modal dialog
|
|
126
|
+
modal_1.Modal.clear();
|
|
127
|
+
// Hide the close button
|
|
128
|
+
modal_1.Modal.setCloseButtonVisibility(false);
|
|
129
|
+
// Set the header
|
|
130
|
+
modal_1.Modal.setHeader("Add Comment");
|
|
131
|
+
// Create the form
|
|
132
|
+
var form = gd_sprest_bs_1.Components.Form({
|
|
133
|
+
el: modal_1.Modal.BodyElement,
|
|
134
|
+
controls: [{
|
|
135
|
+
name: "comment",
|
|
136
|
+
label: "Comment",
|
|
137
|
+
type: gd_sprest_bs_1.Components.FormControlTypes.TextArea,
|
|
138
|
+
rows: 10,
|
|
139
|
+
required: true,
|
|
140
|
+
errorMessage: "A value is required"
|
|
141
|
+
}]
|
|
142
|
+
});
|
|
143
|
+
// Set the footer
|
|
144
|
+
gd_sprest_bs_1.Components.TooltipGroup({
|
|
145
|
+
el: modal_1.Modal.FooterElement,
|
|
146
|
+
tooltips: [
|
|
147
|
+
{
|
|
148
|
+
content: "Click to add a comment to the request.",
|
|
149
|
+
btnProps: {
|
|
150
|
+
text: "Add",
|
|
151
|
+
type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSuccess,
|
|
152
|
+
onClick: function () {
|
|
153
|
+
// Ensure the form is valid
|
|
154
|
+
if (form.isValid()) {
|
|
155
|
+
// Hide the modal
|
|
156
|
+
modal_1.Modal.hide();
|
|
157
|
+
// Add the comment
|
|
158
|
+
_this.add(item, form.getValues()["comment"]).then(function () {
|
|
159
|
+
// View the comments
|
|
160
|
+
_this.view(item);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
content: "Closes this dialog and views the comments",
|
|
168
|
+
btnProps: {
|
|
169
|
+
text: "Close",
|
|
170
|
+
type: gd_sprest_bs_1.Components.ButtonTypes.OutlineDanger,
|
|
171
|
+
onClick: function () {
|
|
172
|
+
// Hide the modal
|
|
173
|
+
modal_1.Modal.hide();
|
|
174
|
+
// Show the canvas form
|
|
175
|
+
canvas_1.CanvasForm.show();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
});
|
|
181
|
+
// Show the form
|
|
182
|
+
modal_1.Modal.show();
|
|
183
|
+
};
|
|
184
|
+
// Displays the comments in a canvas form
|
|
185
|
+
Comments.view = function (item) {
|
|
186
|
+
var _this = this;
|
|
187
|
+
// Display a loading dialog
|
|
188
|
+
loadingDialog_1.LoadingDialog.setHeader("Loading Comments");
|
|
189
|
+
loadingDialog_1.LoadingDialog.setBody("This dialog will close after the comments are loaded.");
|
|
190
|
+
loadingDialog_1.LoadingDialog.show();
|
|
191
|
+
// Load the items
|
|
192
|
+
this.load(item).then(function (comments) {
|
|
193
|
+
// Clear the form
|
|
194
|
+
canvas_1.CanvasForm.clear();
|
|
195
|
+
// Set the header
|
|
196
|
+
canvas_1.CanvasForm.setHeader("<h5>Comments</h5>");
|
|
197
|
+
// Render a nav
|
|
198
|
+
gd_sprest_bs_1.Components.Navbar({
|
|
199
|
+
el: canvas_1.CanvasForm.BodyElement,
|
|
200
|
+
itemsEnd: [{
|
|
201
|
+
text: "+ Add Comment",
|
|
202
|
+
onClick: function () {
|
|
203
|
+
// Hide the form
|
|
204
|
+
canvas_1.CanvasForm.hide();
|
|
205
|
+
// Display a modal to add the comment
|
|
206
|
+
_this.new(item);
|
|
207
|
+
}
|
|
208
|
+
}]
|
|
209
|
+
});
|
|
210
|
+
// Parse the comments
|
|
211
|
+
for (var i = 0; i < comments.length; i++) {
|
|
212
|
+
var comment = comments[i];
|
|
213
|
+
// Render a toast
|
|
214
|
+
gd_sprest_bs_1.Components.Toast({
|
|
215
|
+
el: canvas_1.CanvasForm.BodyElement,
|
|
216
|
+
headerText: comment.Author.Title,
|
|
217
|
+
mutedText: moment(new Date(comment.Created)).toString(),
|
|
218
|
+
body: (comment.Comment || "").replace(/\r?\n/g, '<br />'),
|
|
219
|
+
options: {
|
|
220
|
+
animation: true,
|
|
221
|
+
autohide: false
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
// Hide the dialog
|
|
226
|
+
loadingDialog_1.LoadingDialog.hide();
|
|
227
|
+
// Show the canvas form
|
|
228
|
+
canvas_1.CanvasForm.show();
|
|
229
|
+
});
|
|
230
|
+
};
|
|
231
|
+
Comments._listId = null;
|
|
232
|
+
return Comments;
|
|
233
|
+
}());
|
|
234
|
+
exports.Comments = Comments;
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
var Common = require("./common");
|
|
18
18
|
__exportStar(require("./common"), exports);
|
|
19
|
+
var comments_1 = require("./comments");
|
|
20
|
+
__exportStar(require("./comments"), exports);
|
|
19
21
|
var dashboard_1 = require("./dashboard");
|
|
20
22
|
__exportStar(require("./dashboard"), exports);
|
|
21
23
|
var documents_1 = require("./documents");
|
|
@@ -28,6 +30,7 @@ require("./styles");
|
|
|
28
30
|
window["DattaTable"] = {
|
|
29
31
|
ActionButtonTypes: documents_1.ActionButtonTypes,
|
|
30
32
|
Common: Common,
|
|
33
|
+
Comments: comments_1.Comments,
|
|
31
34
|
Dashboard: dashboard_1.Dashboard,
|
|
32
35
|
Documents: documents_1.Documents,
|
|
33
36
|
ItemForm: itemForm_1.ItemForm
|
package/dist/dattatable.js
CHANGED
|
@@ -9,6 +9,17 @@
|
|
|
9
9
|
/******/ (() => { // webpackBootstrap
|
|
10
10
|
/******/ var __webpack_modules__ = ({
|
|
11
11
|
|
|
12
|
+
/***/ "./build/comments.js":
|
|
13
|
+
/*!***************************!*\
|
|
14
|
+
!*** ./build/comments.js ***!
|
|
15
|
+
\***************************/
|
|
16
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
17
|
+
|
|
18
|
+
"use strict";
|
|
19
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Comments = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.6.0/node_modules/gd-sprest-bs/build/index.js\");\r\nvar moment = __webpack_require__(/*! moment */ \"./node_modules/.pnpm/moment@2.29.3/node_modules/moment/moment.js\");\r\nvar canvas_1 = __webpack_require__(/*! ./common/canvas */ \"./build/common/canvas.js\");\r\nvar loadingDialog_1 = __webpack_require__(/*! ./common/loadingDialog */ \"./build/common/loadingDialog.js\");\r\nvar modal_1 = __webpack_require__(/*! ./common/modal */ \"./build/common/modal.js\");\r\n// List Name\r\nvar LIST_NAME = \"Comments\";\r\n/**\r\n * Comments\r\n */\r\nvar Comments = /** @class */ (function () {\r\n function Comments() {\r\n }\r\n // Adds a comment to an item\r\n Comments.add = function (item, comment) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure a comment exists\r\n if (comment) {\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Adding Comment\");\r\n loadingDialog_1.LoadingDialog.setBody(\"This dialog will close after the comment is added.\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Add the item\r\n (0, gd_sprest_bs_1.List)(LIST_NAME).Items().add({\r\n Comment: comment,\r\n Title: _this._listId + \"|\" + item.Id\r\n }).execute(function () {\r\n // Hide the loading dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the request\r\n resolve();\r\n }\r\n });\r\n };\r\n // Configuration\r\n Comments.configuration = function (cfg) {\r\n var commentsCfg = gd_sprest_bs_1.Helper.SPConfig({\r\n ListCfg: [\r\n {\r\n ListInformation: {\r\n Title: LIST_NAME,\r\n BaseTemplate: gd_sprest_bs_1.SPTypes.ListTemplateType.GenericList,\r\n Hidden: true,\r\n NoCrawl: true\r\n },\r\n TitleFieldDisplayName: \"Comment ID\",\r\n TitleFieldIndexed: true,\r\n CustomFields: [\r\n {\r\n name: \"Comment\",\r\n title: \"Comment\",\r\n type: gd_sprest_bs_1.Helper.SPCfgFieldType.Note,\r\n noteType: gd_sprest_bs_1.SPTypes.FieldNoteType.TextOnly\r\n }\r\n ],\r\n ViewInformation: [\r\n {\r\n ViewName: \"All Items\",\r\n ViewQuery: \"Author eq [Me]\",\r\n ViewFields: [\"LinkTitle\", \"Comment\", \"Author\", \"Created\"]\r\n }\r\n ]\r\n }\r\n ]\r\n });\r\n // Append the comments to the configuration if it exists\r\n if (cfg && cfg._configuration.ListCfg && cfg._configuration.ListCfg.length > 0) {\r\n // Append the list configuration\r\n cfg._configuration.ListCfg = cfg._configuration.ListCfg.concat(commentsCfg._configuration.ListCfg);\r\n }\r\n // Return the configuration\r\n return cfg || commentsCfg;\r\n };\r\n // Initialization of the component\r\n Comments.init = function (listName) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the List Information\r\n (0, gd_sprest_bs_1.List)(listName).execute(function (list) {\r\n // Set the list id\r\n _this._listId = list.Id;\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n });\r\n };\r\n // Loads the comments for the item\r\n Comments.load = function (item) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure a list id exists\r\n if (_this._listId) {\r\n // Load the comments for this item\r\n (0, gd_sprest_bs_1.List)(LIST_NAME).Items().query({\r\n Expand: [\"Author\"],\r\n Filter: \"Title eq '\" + _this._listId + \"|\" + item.Id + \"'\",\r\n OrderBy: [\"Created desc\"],\r\n Select: [\"Id\", \"Comment\", \"Created\", \"Title\", \"Author/Id\", \"Author/EMail\", \"Author/Title\"]\r\n }).execute(function (items) {\r\n // Resolve the request\r\n resolve(items.results);\r\n }, reject);\r\n }\r\n else {\r\n // Reject the request\r\n reject(\"The target list doesn't exist. Please initialize the component before using it.\");\r\n }\r\n });\r\n };\r\n // Displays the new comment form\r\n Comments.new = function (item) {\r\n var _this = this;\r\n // Clear the modal dialog\r\n modal_1.Modal.clear();\r\n // Hide the close button\r\n modal_1.Modal.setCloseButtonVisibility(false);\r\n // Set the header\r\n modal_1.Modal.setHeader(\"Add Comment\");\r\n // Create the form\r\n var form = gd_sprest_bs_1.Components.Form({\r\n el: modal_1.Modal.BodyElement,\r\n controls: [{\r\n name: \"comment\",\r\n label: \"Comment\",\r\n type: gd_sprest_bs_1.Components.FormControlTypes.TextArea,\r\n rows: 10,\r\n required: true,\r\n errorMessage: \"A value is required\"\r\n }]\r\n });\r\n // Set the footer\r\n gd_sprest_bs_1.Components.TooltipGroup({\r\n el: modal_1.Modal.FooterElement,\r\n tooltips: [\r\n {\r\n content: \"Click to add a comment to the request.\",\r\n btnProps: {\r\n text: \"Add\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSuccess,\r\n onClick: function () {\r\n // Ensure the form is valid\r\n if (form.isValid()) {\r\n // Hide the modal\r\n modal_1.Modal.hide();\r\n // Add the comment\r\n _this.add(item, form.getValues()[\"comment\"]).then(function () {\r\n // View the comments\r\n _this.view(item);\r\n });\r\n }\r\n }\r\n }\r\n },\r\n {\r\n content: \"Closes this dialog and views the comments\",\r\n btnProps: {\r\n text: \"Close\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineDanger,\r\n onClick: function () {\r\n // Hide the modal\r\n modal_1.Modal.hide();\r\n // Show the canvas form\r\n canvas_1.CanvasForm.show();\r\n }\r\n }\r\n }\r\n ]\r\n });\r\n // Show the form\r\n modal_1.Modal.show();\r\n };\r\n // Displays the comments in a canvas form\r\n Comments.view = function (item) {\r\n var _this = this;\r\n // Display a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Loading Comments\");\r\n loadingDialog_1.LoadingDialog.setBody(\"This dialog will close after the comments are loaded.\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Load the items\r\n this.load(item).then(function (comments) {\r\n // Clear the form\r\n canvas_1.CanvasForm.clear();\r\n // Set the header\r\n canvas_1.CanvasForm.setHeader(\"<h5>Comments</h5>\");\r\n // Render a nav\r\n gd_sprest_bs_1.Components.Navbar({\r\n el: canvas_1.CanvasForm.BodyElement,\r\n itemsEnd: [{\r\n text: \"+ Add Comment\",\r\n onClick: function () {\r\n // Hide the form\r\n canvas_1.CanvasForm.hide();\r\n // Display a modal to add the comment\r\n _this.new(item);\r\n }\r\n }]\r\n });\r\n // Parse the comments\r\n for (var i = 0; i < comments.length; i++) {\r\n var comment = comments[i];\r\n // Render a toast\r\n gd_sprest_bs_1.Components.Toast({\r\n el: canvas_1.CanvasForm.BodyElement,\r\n headerText: comment.Author.Title,\r\n mutedText: moment(new Date(comment.Created)).toString(),\r\n body: (comment.Comment || \"\").replace(/\\r?\\n/g, '<br />'),\r\n options: {\r\n animation: true,\r\n autohide: false\r\n }\r\n });\r\n }\r\n // Hide the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Show the canvas form\r\n canvas_1.CanvasForm.show();\r\n });\r\n };\r\n Comments._listId = null;\r\n return Comments;\r\n}());\r\nexports.Comments = Comments;\r\n\n\n//# sourceURL=webpack://dattatable/./build/comments.js?");
|
|
20
|
+
|
|
21
|
+
/***/ }),
|
|
22
|
+
|
|
12
23
|
/***/ "./build/common/canvas.js":
|
|
13
24
|
/*!********************************!*\
|
|
14
25
|
!*** ./build/common/canvas.js ***!
|
|
@@ -159,7 +170,7 @@ eval("\r\nvar __assign = (this && this.__assign) || function () {\r\n __assig
|
|
|
159
170
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
160
171
|
|
|
161
172
|
"use strict";
|
|
162
|
-
eval("\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\nvar Common = __webpack_require__(/*! ./common */ \"./build/common/index.js\");\r\n__exportStar(__webpack_require__(/*! ./common */ \"./build/common/index.js\"), exports);\r\nvar dashboard_1 = __webpack_require__(/*! ./dashboard */ \"./build/dashboard/index.js\");\r\n__exportStar(__webpack_require__(/*! ./dashboard */ \"./build/dashboard/index.js\"), exports);\r\nvar documents_1 = __webpack_require__(/*! ./documents */ \"./build/documents.js\");\r\n__exportStar(__webpack_require__(/*! ./documents */ \"./build/documents.js\"), exports);\r\nvar itemForm_1 = __webpack_require__(/*! ./itemForm */ \"./build/itemForm.js\");\r\n__exportStar(__webpack_require__(/*! ./itemForm */ \"./build/itemForm.js\"), exports);\r\n/** Styling */\r\n__webpack_require__(/*! ./styles */ \"./build/styles.js\");\r\n/** Global Variable */\r\nwindow[\"DattaTable\"] = {\r\n ActionButtonTypes: documents_1.ActionButtonTypes,\r\n Common: Common,\r\n Dashboard: dashboard_1.Dashboard,\r\n Documents: documents_1.Documents,\r\n ItemForm: itemForm_1.ItemForm\r\n};\r\n\n\n//# sourceURL=webpack://dattatable/./build/index.js?");
|
|
173
|
+
eval("\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\nvar Common = __webpack_require__(/*! ./common */ \"./build/common/index.js\");\r\n__exportStar(__webpack_require__(/*! ./common */ \"./build/common/index.js\"), exports);\r\nvar comments_1 = __webpack_require__(/*! ./comments */ \"./build/comments.js\");\r\n__exportStar(__webpack_require__(/*! ./comments */ \"./build/comments.js\"), exports);\r\nvar dashboard_1 = __webpack_require__(/*! ./dashboard */ \"./build/dashboard/index.js\");\r\n__exportStar(__webpack_require__(/*! ./dashboard */ \"./build/dashboard/index.js\"), exports);\r\nvar documents_1 = __webpack_require__(/*! ./documents */ \"./build/documents.js\");\r\n__exportStar(__webpack_require__(/*! ./documents */ \"./build/documents.js\"), exports);\r\nvar itemForm_1 = __webpack_require__(/*! ./itemForm */ \"./build/itemForm.js\");\r\n__exportStar(__webpack_require__(/*! ./itemForm */ \"./build/itemForm.js\"), exports);\r\n/** Styling */\r\n__webpack_require__(/*! ./styles */ \"./build/styles.js\");\r\n/** Global Variable */\r\nwindow[\"DattaTable\"] = {\r\n ActionButtonTypes: documents_1.ActionButtonTypes,\r\n Common: Common,\r\n Comments: comments_1.Comments,\r\n Dashboard: dashboard_1.Dashboard,\r\n Documents: documents_1.Documents,\r\n ItemForm: itemForm_1.ItemForm\r\n};\r\n\n\n//# sourceURL=webpack://dattatable/./build/index.js?");
|
|
163
174
|
|
|
164
175
|
/***/ }),
|
|
165
176
|
|