dattatable 2.9.65 → 2.9.67
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/list.d.ts +4 -0
- package/build/common/list.js +41 -3
- package/build/dashboard/accordion.d.ts +2 -1
- package/build/dashboard/filter.d.ts +2 -2
- package/build/dashboard/filter.js +4 -4
- package/build/dashboard/index.js +4 -4
- package/build/dashboard/tiles.d.ts +1 -1
- package/dist/dattatable.js +457 -457
- package/dist/dattatable.min.js +1 -1
- package/docs/assets/navigation.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 +4 -4
- package/docs/classes/List.html +9 -6
- 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 +2 -2
- package/docs/interfaces/IItemFormEditProps.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/IListProps.html +3 -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 +2 -2
- package/pnpm-lock.yaml +0 -3420
package/build/common/list.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Types } from "gd-sprest-bs";
|
|
|
2
2
|
import { IItemFormCreateProps, IItemFormEditProps, IItemFormViewProps } from ".";
|
|
3
3
|
/** List Properties */
|
|
4
4
|
export interface IListProps<T = Types.SP.ListItem> {
|
|
5
|
+
camlQuery?: string;
|
|
5
6
|
itemQuery?: Types.IODataQuery;
|
|
6
7
|
listName: string;
|
|
7
8
|
viewName?: string;
|
|
@@ -18,6 +19,8 @@ export interface IListProps<T = Types.SP.ListItem> {
|
|
|
18
19
|
*/
|
|
19
20
|
export declare class List<T = Types.SP.ListItem> {
|
|
20
21
|
/** Public Properties */
|
|
22
|
+
private _camlQuery;
|
|
23
|
+
get CAMLQuery(): string;
|
|
21
24
|
get EditForm(): import("gd-sprest-bs/src/components/components").IListFormEdit;
|
|
22
25
|
get EditForms(): import("gd-sprest-bs/src/components/components").IListFormEdit[];
|
|
23
26
|
private _listContentTypes;
|
|
@@ -60,6 +63,7 @@ export declare class List<T = Types.SP.ListItem> {
|
|
|
60
63
|
private init;
|
|
61
64
|
private loadItem;
|
|
62
65
|
private loadItems;
|
|
66
|
+
private loadItemsByCAMLQuery;
|
|
63
67
|
private loadItemsByQuery;
|
|
64
68
|
private loadItemsByView;
|
|
65
69
|
newForm(props: IItemFormCreateProps): void;
|
package/build/common/list.js
CHANGED
|
@@ -10,6 +10,9 @@ var List = /** @class */ (function () {
|
|
|
10
10
|
// Constructor
|
|
11
11
|
function List(props) {
|
|
12
12
|
var _this = this;
|
|
13
|
+
/** Public Properties */
|
|
14
|
+
// CAML query
|
|
15
|
+
this._camlQuery = null;
|
|
13
16
|
// List Content Types Information
|
|
14
17
|
this._listContentTypes = null;
|
|
15
18
|
// List Fields Information
|
|
@@ -48,6 +51,7 @@ var List = /** @class */ (function () {
|
|
|
48
51
|
// The request digest value of the target site
|
|
49
52
|
this._requestDigest = null;
|
|
50
53
|
// Save the properties
|
|
54
|
+
this._camlQuery = props.camlQuery;
|
|
51
55
|
this._listName = props.listName;
|
|
52
56
|
this._odata = props.itemQuery;
|
|
53
57
|
this._onInitError = props.onInitError;
|
|
@@ -94,8 +98,12 @@ var List = /** @class */ (function () {
|
|
|
94
98
|
_this._onInitError ? _this._onInitError.apply(_this, args) : null;
|
|
95
99
|
});
|
|
96
100
|
}
|
|
101
|
+
Object.defineProperty(List.prototype, "CAMLQuery", {
|
|
102
|
+
get: function () { return this._camlQuery; },
|
|
103
|
+
enumerable: false,
|
|
104
|
+
configurable: true
|
|
105
|
+
});
|
|
97
106
|
Object.defineProperty(List.prototype, "EditForm", {
|
|
98
|
-
/** Public Properties */
|
|
99
107
|
// Reference to the edit form
|
|
100
108
|
get: function () { return _1.ItemForm.EditForm; },
|
|
101
109
|
enumerable: false,
|
|
@@ -317,8 +325,12 @@ var List = /** @class */ (function () {
|
|
|
317
325
|
};
|
|
318
326
|
// Loads the items
|
|
319
327
|
List.prototype.loadItems = function (query) {
|
|
320
|
-
// See if the
|
|
321
|
-
if (this.
|
|
328
|
+
// See if the caml query exists
|
|
329
|
+
if (this.CAMLQuery) {
|
|
330
|
+
return this.loadItemsByCAMLQuery();
|
|
331
|
+
}
|
|
332
|
+
// Else, see if the view xml exists
|
|
333
|
+
else if (this.ViewXml) {
|
|
322
334
|
// Get the items by the view name
|
|
323
335
|
return this.loadItemsByView();
|
|
324
336
|
}
|
|
@@ -327,6 +339,32 @@ var List = /** @class */ (function () {
|
|
|
327
339
|
return this.loadItemsByQuery(query);
|
|
328
340
|
}
|
|
329
341
|
};
|
|
342
|
+
// Loads the items by CAML query
|
|
343
|
+
List.prototype.loadItemsByCAMLQuery = function () {
|
|
344
|
+
var _this = this;
|
|
345
|
+
// Return a promise
|
|
346
|
+
return new Promise(function (resolve, reject) {
|
|
347
|
+
// See if the items already exist
|
|
348
|
+
if (_this._items) {
|
|
349
|
+
resolve(_this._items);
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
// Query the items
|
|
353
|
+
(0, gd_sprest_bs_1.Web)(_this.WebUrl, { requestDigest: _this._requestDigest }).Lists(_this.ListName).getItemsByQuery(_this.CAMLQuery).execute(function (items) {
|
|
354
|
+
// Save the items
|
|
355
|
+
_this._items = items.results;
|
|
356
|
+
// Resolve the request
|
|
357
|
+
resolve(_this._items);
|
|
358
|
+
}, function () {
|
|
359
|
+
var args = [];
|
|
360
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
361
|
+
args[_i] = arguments[_i];
|
|
362
|
+
}
|
|
363
|
+
// Reject the request
|
|
364
|
+
reject.apply(void 0, args);
|
|
365
|
+
}, true);
|
|
366
|
+
});
|
|
367
|
+
};
|
|
330
368
|
// Loads the items by odata query
|
|
331
369
|
List.prototype.loadItemsByQuery = function (query) {
|
|
332
370
|
var _this = this;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Components } from "gd-sprest-bs";
|
|
1
2
|
export interface IAccordion {
|
|
2
|
-
filter?: (
|
|
3
|
+
filter?: (value: string | string[], item?: Components.ICheckboxGroupItem) => void;
|
|
3
4
|
search?: (value: string) => void;
|
|
4
5
|
}
|
|
5
6
|
export interface IAccordionProps {
|
|
@@ -6,7 +6,7 @@ export interface IFilterItem {
|
|
|
6
6
|
header: string;
|
|
7
7
|
items: Components.ICheckboxGroupItem[];
|
|
8
8
|
multi?: boolean;
|
|
9
|
-
onFilter?: (value: string | string[]) => void;
|
|
9
|
+
onFilter?: (value: string | string[], item?: Components.ICheckboxGroupItem) => void;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Properties
|
|
@@ -14,7 +14,7 @@ export interface IFilterItem {
|
|
|
14
14
|
export interface IFilterProps {
|
|
15
15
|
filters: IFilterItem[];
|
|
16
16
|
onClear?: () => void;
|
|
17
|
-
onFilter?: (value: string | string[]) => void;
|
|
17
|
+
onFilter?: (value: string | string[], item?: Components.ICheckboxGroupItem) => void;
|
|
18
18
|
onRendered?: (el: HTMLElement) => void;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
@@ -93,14 +93,14 @@ var FilterSlideout = /** @class */ (function () {
|
|
|
93
93
|
values.push(items[i].label);
|
|
94
94
|
}
|
|
95
95
|
// Execute the event
|
|
96
|
-
filter.onFilter ? filter.onFilter(values) : null;
|
|
97
|
-
_this._onFilter ? _this._onFilter(values) : null;
|
|
96
|
+
filter.onFilter ? filter.onFilter(values, item) : null;
|
|
97
|
+
_this._onFilter ? _this._onFilter(values, item) : null;
|
|
98
98
|
}
|
|
99
99
|
else {
|
|
100
100
|
var item_1 = value;
|
|
101
101
|
// Execute the event
|
|
102
|
-
filter.onFilter ? filter.onFilter(item_1 ? item_1.label : "") : null;
|
|
103
|
-
_this._onFilter ? _this._onFilter(item_1 ? item_1.label : "") : null;
|
|
102
|
+
filter.onFilter ? filter.onFilter(item_1 ? item_1.label : "", item_1) : null;
|
|
103
|
+
_this._onFilter ? _this._onFilter(item_1 ? item_1.label : "", item_1) : null;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}));
|
package/build/dashboard/index.js
CHANGED
|
@@ -119,10 +119,10 @@ var Dashboard = /** @class */ (function () {
|
|
|
119
119
|
filters: this._props.filters ? this._props.filters.items : [],
|
|
120
120
|
onClear: this._props.filters ? this._props.filters.onClear : null,
|
|
121
121
|
onRendered: this._props.filters ? this._props.filters.onRendered : null,
|
|
122
|
-
onFilter: this.IsAccordion ? function (value) {
|
|
123
|
-
_this._accordion.filter(value);
|
|
124
|
-
} : (this.IsTiles ? function (value) {
|
|
125
|
-
_this._tiles.filter(value);
|
|
122
|
+
onFilter: this.IsAccordion ? function (value, item) {
|
|
123
|
+
_this._accordion.filter(value, item);
|
|
124
|
+
} : (this.IsTiles ? function (value, item) {
|
|
125
|
+
_this._tiles.filter(value, item);
|
|
126
126
|
} : null)
|
|
127
127
|
});
|
|
128
128
|
// Render the template
|