@mikezimm/fps-core-v7 1.0.88 → 1.0.90

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.
@@ -1,5 +1,5 @@
1
1
  export const PackageNameFpsCv7 = 'fps-core-v7';
2
- export const PackageVersionFpsCv7 = '1.0.88';
3
- export const PackageVersionLabelFpsCv7 = 'fps-core-v7@1.0.88';
4
- export const PackageVersionTimeFpsCv7 = '1/17/2025, 1:13:11 AM EST';
2
+ export const PackageVersionFpsCv7 = '1.0.90';
3
+ export const PackageVersionLabelFpsCv7 = 'fps-core-v7@1.0.90';
4
+ export const PackageVersionTimeFpsCv7 = '1/19/2025, 2:15:47 AM EST';
5
5
  //# sourceMappingURL=PackageVersion.js.map
@@ -8,5 +8,5 @@
8
8
  *
9
9
  *
10
10
  */
11
- export declare function getEmailFromLoginName(uName: string): string | null;
11
+ export declare function getEmailFromLoginName(LoginName?: string): string | null;
12
12
  //# sourceMappingURL=getEmailFromLoginName.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getEmailFromLoginName.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Users/getEmailFromLoginName.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AAEH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAI,MAAM,GAAG,IAAI,CAiBnE"}
1
+ {"version":3,"file":"getEmailFromLoginName.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Users/getEmailFromLoginName.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AAGH,wBAAgB,qBAAqB,CAAC,SAAS,GAAE,MAAW,GAAI,MAAM,GAAG,IAAI,CAiB5E"}
@@ -8,17 +8,18 @@
8
8
  *
9
9
  *
10
10
  */
11
- export function getEmailFromLoginName(uName) {
11
+ // Added this just in case the LoginName was null or undefined
12
+ export function getEmailFromLoginName(LoginName = '') {
12
13
  let result = null;
13
- if (uName.indexOf('|') > -1 && uName.indexOf('@') > 0) {
14
+ if (LoginName.indexOf('|') > -1 && LoginName.indexOf('@') > 0) {
14
15
  //This is an ID structure from reading in from the list: "i:0#.f|membership|clicky.mcclickster@tenant.onmicrosoft.com"
15
- let uProps = uName.split('|');
16
+ let uProps = LoginName.split('|');
16
17
  let expectedEmailIndex = 2;
17
18
  if (uProps.length === 3 && uProps[expectedEmailIndex].indexOf('@') > -1) {
18
19
  result = uProps[expectedEmailIndex];
19
20
  }
20
21
  else {
21
- alert('Not able to find email from this user name: ' + uName);
22
+ alert('Not able to find email from this user name: ' + LoginName);
22
23
  }
23
24
  }
24
25
  return result;
@@ -1 +1 @@
1
- {"version":3,"file":"getEmailFromLoginName.js","sourceRoot":"","sources":["../../../../src/components/atoms/Users/getEmailFromLoginName.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AAEH,MAAM,UAAU,qBAAqB,CAAC,KAAa;IAEjD,IAAI,MAAM,GAAG,IAAI,CAAC;IAElB,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACrD,uHAAuH;QACvH,IAAI,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,kBAAkB,GAAG,CAAC,CAAC;QAC3B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE;YACvE,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;SACrC;aAAM;YACL,KAAK,CAAC,8CAA8C,GAAG,KAAK,CAAC,CAAC;SAC/D;KACF;IAED,OAAO,MAAM,CAAC;AAEhB,CAAC"}
1
+ {"version":3,"file":"getEmailFromLoginName.js","sourceRoot":"","sources":["../../../../src/components/atoms/Users/getEmailFromLoginName.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AAEH,8DAA8D;AAC9D,MAAM,UAAU,qBAAqB,CAAC,YAAoB,EAAE;IAE1D,IAAI,MAAM,GAAG,IAAI,CAAC;IAElB,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QAC7D,uHAAuH;QACvH,IAAI,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,kBAAkB,GAAG,CAAC,CAAC;QAC3B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE;YACvE,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;SACrC;aAAM;YACL,KAAK,CAAC,8CAA8C,GAAG,SAAS,CAAC,CAAC;SACnE;KACF;IAED,OAAO,MAAM,CAAC;AAEhB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { IFpsSpHttpServiceMIN } from "../../../SpHttp/Sp/IFpsSpHttpServiceMIN";
2
+ import { ISourceProps } from "../../ISourceProps";
3
+ /**
4
+ * import { createGroupsSource } from '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Users/createGroupSource';
5
+ * @param webUrl
6
+ * @param fpsSpService
7
+ * @returns
8
+ */
9
+ export declare function createUsersSource(webUrl: string, fpsSpService: IFpsSpHttpServiceMIN): ISourceProps;
10
+ export declare const DefaultUsersSource: ISourceProps;
11
+ //# sourceMappingURL=createUsersSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createUsersSource.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/source-props/createSources/Users/createUsersSource.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAE/E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;;;GAKG;AAEH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,oBAAoB,GAAG,YAAY,CAUlG;AAED,eAAO,MAAM,kBAAkB,EAAE,YAgBL,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { getSiteCollectionUrlFromLink } from "../../../../../logic/Strings/getSiteCollectionUrlFromLink";
2
+ import { makeid } from "../../../../../logic/Strings/guids";
3
+ import { UserSelectsExtra } from "../../../../../restAPIs/sites/users/UserSelects";
4
+ import { createSeriesSort } from "../../createOrderBy";
5
+ import { getExpandColumns } from "../../Lists/getVX/getExpandV2";
6
+ import { CurrentTenant } from "../../WindowLocationConstants";
7
+ /**
8
+ * import { createGroupsSource } from '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Users/createGroupSource';
9
+ * @param webUrl
10
+ * @param fpsSpService
11
+ * @returns
12
+ */
13
+ export function createUsersSource(webUrl, fpsSpService) {
14
+ let Source = DefaultUsersSource;
15
+ Source.webUrl = webUrl;
16
+ Source.absoluteWebUrl = getSiteCollectionUrlFromLink(webUrl);
17
+ // Opted against this option since it may cause other issues... just adding to FPSFetchStatus
18
+ // Source.webRelativeLink = webRelativeLink.indexOf('/') === 0 ? webRelativeLink : `/${webRelativeLink}`;
19
+ // https://github.com/fps-solutions/Item-Ninja/issues/51 - need to add fpsSpService after parsing
20
+ Source = JSON.parse(JSON.stringify(Source));
21
+ Source.fpsSpService = fpsSpService;
22
+ return Source;
23
+ }
24
+ export const DefaultUsersSource = {
25
+ refreshId: makeid(5),
26
+ key: 'users',
27
+ defType: 'Users',
28
+ fpsContentType: ['user'],
29
+ tenant: CurrentTenant,
30
+ webUrl: ``,
31
+ webRelativeLink: '',
32
+ viewItemLink: ``,
33
+ columns: UserSelectsExtra,
34
+ searchProps: UserSelectsExtra,
35
+ selectThese: UserSelectsExtra,
36
+ expandThese: getExpandColumns(UserSelectsExtra),
37
+ defSearchButtons: [],
38
+ orderBy: createSeriesSort('Title'),
39
+ performanceSettings: { label: 'Users', updateMiliseconds: true, includeMsStr: true, op: 'fetch' },
40
+ };
41
+ //# sourceMappingURL=createUsersSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createUsersSource.js","sourceRoot":"","sources":["../../../../../../src/components/molecules/source-props/createSources/Users/createUsersSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAEnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D;;;;;GAKG;AAEH,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,YAAkC;IAClF,IAAI,MAAM,GAAiB,kBAAkB,CAAC;IAC9C,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,cAAc,GAAG,4BAA4B,CAAE,MAAM,CAAE,CAAC;IAC/D,6FAA6F;IAC7F,yGAAyG;IACzG,iGAAiG;IACjG,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5C,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAiB;IAC9C,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IACpB,GAAG,EAAE,OAAO;IACZ,OAAO,EAAE,OAAO;IAChB,cAAc,EAAE,CAAE,MAAM,CAAE;IAC1B,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,EAAE;IACV,eAAe,EAAE,EAAE;IACnB,YAAY,EAAE,EAAE;IAChB,O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AAW,qBAAqB,CAAE,WAAW,CAAQ,CAAC;IAElE,IAAK,CAAC,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;QAC3B,OAAO,MAAM,CAAC;KAEf;SAAM;QAEL,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAK,WAAW,KAAK,sBAAsB,CAAC,WAAW,EAAE,EAAG;YAC1D,MAAM,GAAG,YAAY,CAAE,GAAG,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;SAExD;aAAM,IAAK,WAAW,KAAK,qBAAqB,CAAC,WAAW,EAAE,EAAG;YAChE,MAAM,GAAG,WAAW,CAAE,GAAG,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;SACvD;QAED,MAAM,UAAU,GAAG,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,MAAM,SAAS,GAAG,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3D,UAAU,CAAC,GAAG,CAAE,CAAE,KAAK,EAAE,KAAK,EAAG,EAAE;YACjC,IAAK,KAAK,CAAC,OAAO,CAAE,MAAM,CAAC,WAAW,EAAE,CAAE,GAAG,CAAC,CAAC,EAAG;gBAAE,MAAM,GAAG,SAAS,CAAE,KAAK,CAAE,CAAE;aAAE;QACrF,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;KACf;AAEH,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * 2025-01-17: Migrated from SP-API-Tester
3
+ * The purpose of this function is to
4
+ * 1. Take a rich text field from a list item
5
+ * 2. Strip any Div tags from the string
6
+ * if onlyStripOutterTags === true, then it only strips the outter HTML tags from the RichText field
7
+ * if you set this to false, it may also strip any inner tags from things like analytics with rich text tags in the json
8
+ * onlyStripOutterTags has only been tested in it's default state for SP-API-Tester
9
+ * For example... zzzRichText1: '<div class="ExternalClassA265D727B17142199E957A374E3FD155">{html: "<span>Hello</span>" }'
10
+ * onlyStripOutterTags === true should return: {html: "<span>Hello</span>" }
11
+ * onlyStripOutterTags !== true should return: {html: "Hello" }
12
+ * 3. Decode any Html Entities
13
+ * 4. Try to convert the remaining string into a JSON object
14
+ *
15
+ * @param richTextValue
16
+ * @param onlyStripOutterTags
17
+ * @returns
18
+ */
19
+ export declare function parseRichTextFieldAsJsonObject(richTextValue: string, onlyStripOutterTags?: boolean): any;
20
+ //# sourceMappingURL=parseRichTextFieldAsJsonObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseRichTextFieldAsJsonObject.d.ts","sourceRoot":"","sources":["../../../src/logic/Strings/parseRichTextFieldAsJsonObject.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,8BAA8B,CAAC,aAAa,EAAE,MAAM,EAAE,mBAAmB,GAAE,OAAc,GAAI,GAAG,CAiB/G"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * 2025-01-17: Migrated from SP-API-Tester
3
+ * The purpose of this function is to
4
+ * 1. Take a rich text field from a list item
5
+ * 2. Strip any Div tags from the string
6
+ * if onlyStripOutterTags === true, then it only strips the outter HTML tags from the RichText field
7
+ * if you set this to false, it may also strip any inner tags from things like analytics with rich text tags in the json
8
+ * onlyStripOutterTags has only been tested in it's default state for SP-API-Tester
9
+ * For example... zzzRichText1: '<div class="ExternalClassA265D727B17142199E957A374E3FD155">{html: "<span>Hello</span>" }'
10
+ * onlyStripOutterTags === true should return: {html: "<span>Hello</span>" }
11
+ * onlyStripOutterTags !== true should return: {html: "Hello" }
12
+ * 3. Decode any Html Entities
13
+ * 4. Try to convert the remaining string into a JSON object
14
+ *
15
+ * @param richTextValue
16
+ * @param onlyStripOutterTags
17
+ * @returns
18
+ */
19
+ export function parseRichTextFieldAsJsonObject(richTextValue, onlyStripOutterTags = true) {
20
+ // Step 1: Strip HTML tags
21
+ if (!richTextValue)
22
+ return null;
23
+ const strippedValue = onlyStripOutterTags === true ? richTextValue.replace(/^<[^>]+>|<[^>]+>$/g, '') : richTextValue.replace(/<\/?[^>]+(>|$)/g, '');
24
+ // Step 2: Decode HTML entities
25
+ const decodedValue = decodeHtmlEntities(strippedValue);
26
+ // Step 3: Parse JSON
27
+ try {
28
+ const jsonObject = JSON.parse(decodedValue);
29
+ return jsonObject;
30
+ }
31
+ catch (error) {
32
+ console.error('Failed to parse JSON:', error);
33
+ return null;
34
+ }
35
+ }
36
+ function decodeHtmlEntities(htmlString) {
37
+ // Create a temporary DOM element to decode HTML entities
38
+ const textarea = document.createElement('textarea');
39
+ textarea.innerHTML = htmlString;
40
+ const value = `${textarea.value}`;
41
+ return value;
42
+ }
43
+ //# sourceMappingURL=parseRichTextFieldAsJsonObject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseRichTextFieldAsJsonObject.js","sourceRoot":"","sources":["../../../src/logic/Strings/parseRichTextFieldAsJsonObject.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,8BAA8B,CAAC,aAAqB,EAAE,sBAA+B,IAAI;IACvG,0BAA0B;IAC1B,IAAK,CAAC,aAAa;QAAG,OAAO,IAAI,CAAC;IAElC,MAAM,aAAa,GAAG,mBAAmB,KAAK,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;IAEpJ,+BAA+B;IAC/B,MAAM,YAAY,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAEvD,qBAAqB;IACrB,IAAI;QACF,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC5C,OAAO,UAAU,CAAC;KACnB;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;KACb;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,UAAkB;IAC5C,yDAAyD;IACzD,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACpD,QAAQ,CAAC,SAAS,GAAG,UAAU,CAAC;IAChC,MAAM,KAAK,GAAG,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;IAElC,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { ISourceProps } from '../../../components/molecules/source-props/ISourceProps';
2
2
  import { IFpsUsersReturn } from '../../../types/fps-returns/sites/users/IFpsUsersReturn';
3
- export declare function getSiteAdminsAPI(sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsUsersReturn>;
4
- export declare function getSiteUsersAPI(sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined): Promise<IFpsUsersReturn>;
3
+ export type IProfileImageSize = 'S' | 'M' | 'L';
4
+ export declare function getSiteAdminsAPI(sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined, size?: IProfileImageSize): Promise<IFpsUsersReturn>;
5
+ export declare function getSiteUsersAPI(sourceProps: ISourceProps, alertMe: boolean | undefined, consoleLog: boolean | undefined, size?: IProfileImageSize): Promise<IFpsUsersReturn>;
5
6
  //# sourceMappingURL=getSiteUsersAPI.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSiteUsersAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/sites/users/getSiteUsersAPI.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAuB,MAAM,yDAAyD,CAAC;AAG5G,OAAO,EAAE,eAAe,EAAG,MAAM,wDAAwD,CAAC;AAI1F,wBAAsB,gBAAgB,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAK5J;AAED,wBAAsB,eAAe,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,GAAK,OAAO,CAAC,eAAe,CAAC,CAqD3J"}
1
+ {"version":3,"file":"getSiteUsersAPI.d.ts","sourceRoot":"","sources":["../../../../src/restAPIs/sites/users/getSiteUsersAPI.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAuB,MAAM,yDAAyD,CAAC;AAG5G,OAAO,EAAE,eAAe,EAAG,MAAM,wDAAwD,CAAC;AAO1F,MAAM,MAAM,iBAAiB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEhD,wBAAsB,gBAAgB,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,EAAE,IAAI,CAAC,EAAE,iBAAiB,GAAK,OAAO,CAAC,eAAe,CAAC,CAKtL;AAED,wBAAsB,eAAe,CAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,EAAE,IAAI,GAAE,iBAAuB,GAAI,OAAO,CAAC,eAAe,CAAC,CA8DzL"}
@@ -5,13 +5,15 @@ import { getCollectionUrl } from '../../../logic/Links/getSPOUrl';
5
5
  import { getAbsoluteWebUrlFromSourceProps } from '../../../logic/Strings/getAbssoluteWebUrlFromSourceProps';
6
6
  import { createErrorFpsUsersReturn } from '../../../components/molecules/process-results/createEmptyFpsUsersReturn';
7
7
  import { MinUserSelect } from '../../../types/fps-returns/sites/users/UserSelect';
8
- export async function getSiteAdminsAPI(sourceProps, alertMe, consoleLog) {
8
+ import { CurrentOrigin } from '../../../components/molecules/source-props/WindowLocationConstants';
9
+ import { getEmailFromLoginName } from '../../../components/atoms/Users/getEmailFromLoginName';
10
+ export async function getSiteAdminsAPI(sourceProps, alertMe, consoleLog, size) {
9
11
  const restFilter = 'IsSiteAdmin eq true';
10
- const results = await getSiteUsersAPI({ ...sourceProps, ...{ restFilter: restFilter } }, alertMe, consoleLog);
12
+ const results = await getSiteUsersAPI({ ...sourceProps, ...{ restFilter: restFilter } }, alertMe, consoleLog, size);
11
13
  results.unifiedPerformanceOps.fetch.label.replace('users', 'admins');
12
14
  return results;
13
15
  }
14
- export async function getSiteUsersAPI(sourceProps, alertMe, consoleLog) {
16
+ export async function getSiteUsersAPI(sourceProps, alertMe, consoleLog, size = 'M') {
15
17
  const { restFilter, selectThese, } = sourceProps;
16
18
  // 2024-12-05: Added this because some places like PivotTiles had absoluteWebUrl in webUrl prop... so just taking care of differences
17
19
  const useUrl = getAbsoluteWebUrlFromSourceProps(sourceProps);
@@ -48,6 +50,14 @@ export async function getSiteUsersAPI(sourceProps, alertMe, consoleLog) {
48
50
  // result.fpsContentType = [ 'user' ];
49
51
  result.unifiedPerformanceOps.fetch.label = `users-${collectionName}`;
50
52
  // result.unifiedPerformanceOps.fetch.c = result.users.length;
53
+ /**
54
+ * Added and tested this loop in ReactJSON2 sample webpart for the fps-PeoplePicker component
55
+ */
56
+ result.users = result.users.map((user) => {
57
+ // was originally passing back the 'AccountName' property as an alternate but that does not exist on this API return so using the LoginName
58
+ const imageUrl = `${CurrentOrigin}/_layouts/15/userphoto.aspx?size=${size || 'L'}&accountname=${user.Email ? user.Email : getEmailFromLoginName(user.LoginName)}`;
59
+ return { ...user, imageUrl: imageUrl };
60
+ });
51
61
  // initialResult.users.map( user => {
52
62
  // if (!user.LoginName && user.Name) { user.LoginName = user.Name; }
53
63
  // if (!user.Email && user.EMail) { user.Email = user.EMail; }
@@ -1 +1 @@
1
- {"version":3,"file":"getSiteUsersAPI.js","sourceRoot":"","sources":["../../../../src/restAPIs/sites/users/getSiteUsersAPI.ts"],"names":[],"mappings":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AE,MAAM,CAAE,CAAA;KAAE;IAAA,CAAC;IAEjI,OAAO,MAAM,CAAC;AAEhB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikezimm/fps-core-v7",
3
- "version": "1.0.88",
3
+ "version": "1.0.90",
4
4
  "description": "Library of reusable core interfaces, types and constants migrated from fps-library-v2",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -15,7 +15,8 @@
15
15
  "start": "webpack-dev-server --config ./webpack.config.cjs",
16
16
  "clean": "del-cli \"./?(dist|lib)\"",
17
17
  "lint": "eslint ./src --ext .ts",
18
- "version": "ts-node generate-version.ts"
18
+ "z-publish": "echo \"! ! ! ! ! ! ! ! !\" && echo. && echo. && echo \"PLEASE PUSH YOUR COMMIT IN GITHUB DESKTOP!\" && echo. && echo. && timeout /t 16",
19
+ "version": "ts-node generate-version.ts npm run z-publish"
19
20
  },
20
21
  "repository": {
21
22
  "type": "git",