jitz-sharepoint-utilities 2.0.11 → 2.0.14

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 (60) hide show
  1. package/data/context/Repository.ts +1 -1
  2. package/package.json +1 -1
  3. package/lib/common/IModels.d.ts +0 -40
  4. package/lib/common/IModels.js +0 -2
  5. package/lib/common/IObjects.d.ts +0 -72
  6. package/lib/common/IObjects.js +0 -30
  7. package/lib/controls/JitzGrid.d.ts +0 -75
  8. package/lib/controls/JitzGrid.js +0 -606
  9. package/lib/controls/JitzImage.d.ts +0 -14
  10. package/lib/controls/JitzImage.js +0 -37
  11. package/lib/controls/JitzPeoplePicker.d.ts +0 -49
  12. package/lib/controls/JitzPeoplePicker.js +0 -311
  13. package/lib/controls/JitzPersonInfo.d.ts +0 -32
  14. package/lib/controls/JitzPersonInfo.js +0 -98
  15. package/lib/controls/JitzPersona.d.ts +0 -23
  16. package/lib/controls/JitzPersona.js +0 -48
  17. package/lib/data/context/CommonRepository.d.ts +0 -17
  18. package/lib/data/context/CommonRepository.js +0 -287
  19. package/lib/data/context/JitzContext.d.ts +0 -13
  20. package/lib/data/context/JitzContext.js +0 -80
  21. package/lib/data/context/JitzSPContext.d.ts +0 -8
  22. package/lib/data/context/JitzSPContext.js +0 -58
  23. package/lib/data/context/JitzSPHttpClient.d.ts +0 -14
  24. package/lib/data/context/JitzSPHttpClient.js +0 -173
  25. package/lib/data/context/List.d.ts +0 -39
  26. package/lib/data/context/List.js +0 -492
  27. package/lib/data/context/Repository.d.ts +0 -22
  28. package/lib/data/context/Repository.js +0 -486
  29. package/lib/data/interfaces/ICommonRepository.d.ts +0 -6
  30. package/lib/data/interfaces/ICommonRepository.js +0 -2
  31. package/lib/data/interfaces/IJitzContext.d.ts +0 -10
  32. package/lib/data/interfaces/IJitzContext.js +0 -2
  33. package/lib/data/interfaces/IJitzSPContext.d.ts +0 -6
  34. package/lib/data/interfaces/IJitzSPContext.js +0 -2
  35. package/lib/data/interfaces/IJitzSPHttpClient.d.ts +0 -6
  36. package/lib/data/interfaces/IJitzSPHttpClient.js +0 -2
  37. package/lib/data/interfaces/IList.d.ts +0 -26
  38. package/lib/data/interfaces/IList.js +0 -2
  39. package/lib/data/interfaces/IModels.d.ts +0 -32
  40. package/lib/data/interfaces/IModels.js +0 -2
  41. package/lib/data/interfaces/IRepository.d.ts +0 -17
  42. package/lib/data/interfaces/IRepository.js +0 -2
  43. package/lib/jitzHttpClient.d.ts +0 -11
  44. package/lib/jitzHttpClient.js +0 -37
  45. package/lib/jitzSPHttpClient.d.ts +0 -30
  46. package/lib/jitzSPHttpClient.js +0 -193
  47. package/lib/repositories/CommonRepository.d.ts +0 -17
  48. package/lib/repositories/CommonRepository.js +0 -288
  49. package/lib/repositories/ICommonRepository.d.ts +0 -6
  50. package/lib/repositories/ICommonRepository.js +0 -2
  51. package/lib/repositories/IRepository.d.ts +0 -13
  52. package/lib/repositories/IRepository.js +0 -2
  53. package/lib/repositories/Repository.d.ts +0 -18
  54. package/lib/repositories/Repository.js +0 -394
  55. package/lib/services/GraphService.d.ts +0 -10
  56. package/lib/services/GraphService.js +0 -105
  57. package/lib/services/UserService.d.ts +0 -15
  58. package/lib/services/UserService.js +0 -202
  59. package/lib/services/UtilityService.d.ts +0 -29
  60. package/lib/services/UtilityService.js +0 -254
@@ -332,7 +332,7 @@ export default class Repository<T extends IModel> implements IRepository<T> {
332
332
  if (response.status >= 200 && response.status < 300) {
333
333
  return item;
334
334
  } else {
335
- console.log(JSON.stringify(response));
335
+ // console.log(JSON.stringify(response));
336
336
  return Promise.reject(new Error(JSON.stringify(response)));
337
337
  }
338
338
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jitz-sharepoint-utilities",
3
- "version": "2.0.11",
3
+ "version": "2.0.14",
4
4
  "description": "Essential SharePoint utilities for SharePoint Add-in and SPFx development",
5
5
  "author": "Jithendra Mani",
6
6
  "license": "ISC",
@@ -1,40 +0,0 @@
1
- export interface IModel {
2
- Id?: number;
3
- Title?: string;
4
- AuthorId?: number;
5
- Author?: IPersonOrGroup;
6
- Created?: string;
7
- Modified?: string;
8
- __metadata?: {};
9
- }
10
- export interface IMultiUserFieldId {
11
- results: number[];
12
- }
13
- export interface IMultiUserField {
14
- results: IPersonOrGroup[];
15
- }
16
- export interface IListItemsMetadata<T> {
17
- __next: string;
18
- results: T[];
19
- }
20
- export interface IEmail {
21
- properties: {
22
- From?: string;
23
- To: {
24
- results: string[];
25
- };
26
- Body: string;
27
- Subject: string;
28
- __metadata?: {};
29
- };
30
- }
31
- export interface IPersonOrGroup {
32
- Id: number;
33
- Title: string;
34
- EMail: string;
35
- Email: string;
36
- Name: string;
37
- LoginName: string;
38
- IsGroup: boolean;
39
- Groups?: IPersonOrGroup[];
40
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,72 +0,0 @@
1
- import { IPersona } from "@fluentui/react";
2
- export interface IJitzAlertNotificationProps {
3
- hideMe: boolean;
4
- isDraggable: boolean;
5
- title: string;
6
- message: string;
7
- shouldRedirectOnClose: boolean;
8
- onClose?: () => void;
9
- }
10
- export interface IJitzAlertNotificationState {
11
- }
12
- export interface IJitzPeoplePickerState {
13
- currentPicker?: number | string;
14
- delayResults?: boolean;
15
- disabled: boolean;
16
- selectedItems: any[];
17
- }
18
- export interface IPeopleSearchProps {
19
- JobTitle: string;
20
- PictureURL: string;
21
- PreferredName: string;
22
- }
23
- export interface IUserEntityData {
24
- IsAltSecIdPresent: string;
25
- ObjectId: string;
26
- Title: string;
27
- Email: string;
28
- MobilePhone: string;
29
- OtherMails: string;
30
- Department: string;
31
- }
32
- export interface IClientPeoplePickerSearchUser {
33
- Key: string;
34
- Description: string;
35
- DisplayText: string;
36
- EntityType: string;
37
- Title: string;
38
- ProviderDisplayName: string;
39
- ProviderName: string;
40
- IsResolved: boolean;
41
- EntityData: IUserEntityData;
42
- MultipleMatches: any[];
43
- }
44
- export interface IEnsureUser {
45
- Email: string;
46
- Id: number;
47
- IsEmailAuthenticationGuestUser: boolean;
48
- IsHiddenInUI: boolean;
49
- IsShareByEmailGuestUser: boolean;
50
- IsSiteAdmin: boolean;
51
- LoginName: string;
52
- PrincipalType: number;
53
- Title: string;
54
- UserId: {
55
- NameId: string;
56
- NameIdIssuer: string;
57
- };
58
- }
59
- export interface IEnsurableSharePointUser extends IClientPeoplePickerSearchUser, IEnsureUser {
60
- imageUrl?: string;
61
- }
62
- export declare class SharePointUserPersona implements IPersona {
63
- private _user;
64
- get User(): IEnsurableSharePointUser;
65
- set User(user: IEnsurableSharePointUser);
66
- constructor(user: IEnsurableSharePointUser);
67
- primaryText: string;
68
- secondaryText: string;
69
- tertiaryText: string;
70
- imageUrl: string;
71
- imageShouldFadeIn: boolean;
72
- }
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SharePointUserPersona = void 0;
4
- var SharePointUserPersona = /** @class */ (function () {
5
- function SharePointUserPersona(user) {
6
- this.User = user;
7
- }
8
- Object.defineProperty(SharePointUserPersona.prototype, "User", {
9
- get: function () {
10
- return this._user;
11
- },
12
- set: function (user) {
13
- this._user = user;
14
- this.primaryText = user.Title;
15
- //this.secondaryText = user.EntityData.Title;
16
- //this.tertiaryText = user.EntityData.Department;
17
- this.imageShouldFadeIn = true;
18
- // if (this.User.Key != undefined)
19
- // this.imageUrl = `/_layouts/15/userphoto.aspx?size=S&accountname=${this.User.Key.substr(
20
- // this.User.Key.lastIndexOf("|") + 1
21
- // )}`;
22
- // else
23
- // this.imageUrl = `/_layouts/15/userphoto.aspx?size=S&accountname=${this.User.Email}`;
24
- },
25
- enumerable: false,
26
- configurable: true
27
- });
28
- return SharePointUserPersona;
29
- }());
30
- exports.SharePointUserPersona = SharePointUserPersona;
@@ -1,75 +0,0 @@
1
- import * as React from "react";
2
- import { IColumn, SelectionMode } from "@fluentui/react";
3
- import { IList } from "../data/interfaces/IList";
4
- import { IModel } from "../common/IModels";
5
- import IJitzContext from "../data/interfaces/IJitzContext";
6
- export declare enum SortOrder {
7
- Asc = "asc",
8
- Desc = "desc"
9
- }
10
- export declare enum DisplayMode {
11
- Grid = "Grid",
12
- Tile = "Tile"
13
- }
14
- export interface IJitzGridState<T extends IModel> {
15
- list: IList<T>;
16
- listForDownload: IList<T>;
17
- items: any[];
18
- showingItems: any[];
19
- rawData: any[];
20
- showingRawData: any[];
21
- exportData: any[];
22
- totalCount: number;
23
- columns?: IColumn[];
24
- selectedItems?: {};
25
- displayMode?: DisplayMode;
26
- filterQuery?: string;
27
- isItIndexedSearch?: boolean;
28
- isItIndexedDownload?: boolean;
29
- hasNextPage?: boolean;
30
- hasNextPageToDownload?: boolean;
31
- processing?: boolean;
32
- downloading?: boolean;
33
- }
34
- export interface IJitzGridProps<T extends IModel> {
35
- context: IJitzContext;
36
- list: IList<T>;
37
- filterQuery?: string;
38
- orderBy?: string;
39
- displayFields?: string[];
40
- exportFields?: string[];
41
- hasExport?: boolean;
42
- pageSize?: number;
43
- renderCustomColumns?: (content: any, fieldName: string, rowItem?: any) => React.ReactElement<{}>;
44
- modifyColumns?: (columns: IColumn[]) => IColumn[];
45
- onItemSelect?: (items: any) => void;
46
- onItemInvoked?: (item: any, index: number | undefined) => void;
47
- selectionMode?: SelectionMode;
48
- noRecordsMessage?: string;
49
- noRecordsMessageCssClass?: string;
50
- tileComponent?: (content: any) => React.ReactElement<{}>;
51
- refreshedOn?: Date;
52
- displayMode?: DisplayMode;
53
- downloadFileName?: string;
54
- }
55
- export declare class JitzGrid<T extends IModel> extends React.Component<IJitzGridProps<T>, IJitzGridState<T>> {
56
- private _selection;
57
- constructor(props: IJitzGridProps<T>);
58
- private _getSelectedItems;
59
- private getSortOrderString;
60
- private hasKey;
61
- private initalLoad;
62
- private loadMore;
63
- componentDidMount(): void;
64
- componentWillReceiveProps(nextProps: IJitzGridProps<T>): Promise<void>;
65
- downloadData: () => Promise<void>;
66
- initiateDownload: () => Promise<void>;
67
- continueDownload: (list: IList<T>) => Promise<void>;
68
- render(): React.JSX.Element;
69
- private itemSelected;
70
- private _buildColumns;
71
- private _renderItemColumn;
72
- private _onColumnClick;
73
- private _onColumnHeaderContextMenu;
74
- private _onItemInvoked;
75
- }