@mikezimm/fps-core-v7 1.0.78 → 1.0.79
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/lib/components/atoms/Users/createIUserFromUser.d.ts +12 -0
- package/lib/components/atoms/Users/createIUserFromUser.d.ts.map +1 -1
- package/lib/components/atoms/Users/createIUserFromUser.js +20 -0
- package/lib/components/atoms/Users/createIUserFromUser.js.map +1 -1
- package/lib/logic/DOM/Headings/Interfaces.d.ts +17 -0
- package/lib/logic/DOM/Headings/Interfaces.d.ts.map +1 -0
- package/lib/logic/DOM/Headings/Interfaces.js +17 -0
- package/lib/logic/DOM/Headings/Interfaces.js.map +1 -0
- package/lib/logic/DOM/Headings/functions.d.ts +34 -0
- package/lib/logic/DOM/Headings/functions.d.ts.map +1 -0
- package/lib/logic/DOM/Headings/functions.js +131 -0
- package/lib/logic/DOM/Headings/functions.js.map +1 -0
- package/lib/logic/DOM/Search/domSearch.d.ts +3 -0
- package/lib/logic/DOM/Search/domSearch.d.ts.map +1 -0
- package/lib/logic/DOM/Search/domSearch.js +105 -0
- package/lib/logic/DOM/Search/domSearch.js.map +1 -0
- package/lib/logic/DOM/Search/tagParentSection.d.ts +31 -0
- package/lib/logic/DOM/Search/tagParentSection.d.ts.map +1 -0
- package/lib/logic/DOM/Search/tagParentSection.js +66 -0
- package/lib/logic/DOM/Search/tagParentSection.js.map +1 -0
- package/lib/logic/DOM/Tags/Interfaces.d.ts +37 -0
- package/lib/logic/DOM/Tags/Interfaces.d.ts.map +1 -0
- package/lib/logic/DOM/Tags/Interfaces.js +8 -0
- package/lib/logic/DOM/Tags/Interfaces.js.map +1 -0
- package/lib/logic/DOM/Tags/functions.d.ts +11 -0
- package/lib/logic/DOM/Tags/functions.d.ts.map +1 -0
- package/lib/logic/DOM/Tags/functions.js +45 -0
- package/lib/logic/DOM/Tags/functions.js.map +1 -0
- package/lib/logic/DOM/Tags/regexHtmlTags.d.ts +15 -0
- package/lib/logic/DOM/Tags/regexHtmlTags.d.ts.map +1 -0
- package/lib/logic/DOM/Tags/regexHtmlTags.js +86 -0
- package/lib/logic/DOM/Tags/regexHtmlTags.js.map +1 -0
- package/lib/restAPIs/logging/Analytics/getAnalyticsAPI.d.ts +1 -1
- package/lib/restAPIs/logging/Analytics/getAnalyticsAPI.js +1 -1
- package/lib/restAPIs/logging/Analytics/saveAnalyticsAPI.d.ts +2 -2
- package/lib/restAPIs/logging/Analytics/saveAnalyticsAPI.js +2 -2
- package/lib/restAPIs/logging/Errors/saveErrorToLog.d.ts +1 -1
- package/lib/restAPIs/logging/Errors/saveErrorToLog.js +1 -1
- package/lib/restAPIs/logging/Permissions/savePermissionAnalyticsAPI.d.ts +1 -1
- package/lib/restAPIs/logging/Permissions/savePermissionAnalyticsAPI.js +1 -1
- package/lib/restAPIs/logging/Permissions/savePermissionHistory.d.ts +1 -1
- package/lib/restAPIs/logging/Permissions/savePermissionHistory.js +1 -1
- package/lib/restAPIs/logging/Provisioning/saveProvisioning.d.ts +1 -1
- package/lib/restAPIs/logging/Provisioning/saveProvisioning.js +1 -1
- package/lib/restAPIs/logging/interfaces/RailConstants.d.ts +1 -1
- package/lib/restAPIs/logging/interfaces/RailConstants.js +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,18 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { ISiteUserInfo } from "../../../types/@pnp/@2.14.0/sp/site-users";
|
|
8
8
|
import { IUser } from "./IUserInterfaces";
|
|
9
|
+
import { IFpsUsersReturn } from "../../../types/fps-returns/sites/users/IFpsUsersReturn";
|
|
10
|
+
/**
|
|
11
|
+
* createIUsersFromUsersPlural just standardizes the user object so you can for instance pass a Group in and set same property keys as a User
|
|
12
|
+
* Used in PivotTiles and replaces createISiteUsersInfoObjectD which also does some duplicate error handling as the fps-core-v7 SPHTTPFetch
|
|
13
|
+
* Call createIUsersFromUsersPlural to map through the array of users or createIUserFromUser for individual user object
|
|
14
|
+
*
|
|
15
|
+
* import { createIUsersFromUsersPlural, createIUserFromUser } from '@mikezimm/fps-core-v7/lib/components/atoms/Users/createIUserFromUser';
|
|
16
|
+
* @param webUrl
|
|
17
|
+
* @param resultInfo
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
export declare function createIUsersFromUsersArray(webUrl: string, resultInfo: IFpsUsersReturn): IFpsUsersReturn;
|
|
9
21
|
/**
|
|
10
22
|
* user MAY need to be cast as any to avoid this error.
|
|
11
23
|
* casting as unknown or any other type did not work
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIUserFromUser.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Users/createIUserFromUser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"createIUserFromUser.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Users/createIUserFromUser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI1C,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAEzF;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,GAAG,eAAe,CAQxG;AACD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAE,IAAI,EAAE,aAAa,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAK,KAAK,GAAG,IAAI,CAsFvH"}
|
|
@@ -7,6 +7,26 @@
|
|
|
7
7
|
import { checkForLoginName } from "./checkForLoginName";
|
|
8
8
|
import { isGuestUser } from "./checkIsGuest";
|
|
9
9
|
import { makeAbsoluteUrl } from "../../../logic/Strings/getSiteCollectionUrlFromLink";
|
|
10
|
+
/**
|
|
11
|
+
* createIUsersFromUsersPlural just standardizes the user object so you can for instance pass a Group in and set same property keys as a User
|
|
12
|
+
* Used in PivotTiles and replaces createISiteUsersInfoObjectD which also does some duplicate error handling as the fps-core-v7 SPHTTPFetch
|
|
13
|
+
* Call createIUsersFromUsersPlural to map through the array of users or createIUserFromUser for individual user object
|
|
14
|
+
*
|
|
15
|
+
* import { createIUsersFromUsersPlural, createIUserFromUser } from '@mikezimm/fps-core-v7/lib/components/atoms/Users/createIUserFromUser';
|
|
16
|
+
* @param webUrl
|
|
17
|
+
* @param resultInfo
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
export function createIUsersFromUsersArray(webUrl, resultInfo) {
|
|
21
|
+
const newIUsers = [];
|
|
22
|
+
resultInfo.users.map(user => {
|
|
23
|
+
const newuser = createIUserFromUser(user, webUrl, null);
|
|
24
|
+
if (newuser !== null)
|
|
25
|
+
newIUsers.push(newuser);
|
|
26
|
+
});
|
|
27
|
+
resultInfo.users = newIUsers;
|
|
28
|
+
return resultInfo;
|
|
29
|
+
}
|
|
10
30
|
/**
|
|
11
31
|
* user MAY need to be cast as any to avoid this error.
|
|
12
32
|
* casting as unknown or any other type did not work
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIUserFromUser.js","sourceRoot":"","sources":["../../../../src/components/atoms/Users/createIUserFromUser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;
|
|
1
|
+
{"version":3,"file":"createIUserFromUser.js","sourceRoot":"","sources":["../../../../src/components/atoms/Users/createIUserFromUser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAA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 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FROM: src\HeadingCSS_\FPSHeadingFunctions.ts
|
|
3
|
+
*/
|
|
4
|
+
export type IFPSHeadingClass = 'dottedBorder' | 'dashedBorder' | 'solidBorder' | 'doubleBorder' | 'ridgeBorder' | 'insetBorder' | 'outsetBorder' | 'textCenter' | 'heavyTopBotBorder' | 'dottedTopBotBorder' | 'gradiant1' | 'autoNumberh1' | 'autoNumberh2' | 'autoNumberh3' | 'fpsStarBlack' | 'fpsStarWhite' | 'fpsSect' | 'fpsPara' | 'fpsBox' | 'fpsCheckBox' | 'fpsSun' | 'fpsSmile' | 'fpsComet' | 'fpsPupper' | 'fpsKitty' | 'arrowDown' | 'arrowRight' | 'eyeBalls' | 'thumbsUp' | 'transparentTdBorder' | 'lightTdBorder' | 'lightDashedTdBorder';
|
|
5
|
+
export declare const FPSBorderClasses: IFPSHeadingClass[];
|
|
6
|
+
export declare const FPSHeadingNumberClasses: IFPSHeadingClass[];
|
|
7
|
+
export declare const FPSEmojiClasses: IFPSHeadingClass[];
|
|
8
|
+
export declare const FPSMiscClasses: IFPSHeadingClass[];
|
|
9
|
+
export declare const FPSHeadingClasses: IFPSHeadingClass[];
|
|
10
|
+
export declare const changeHeadingStyleProps: string[];
|
|
11
|
+
export interface IMinHeadingStyleProps {
|
|
12
|
+
h1Style: string;
|
|
13
|
+
h2Style: string;
|
|
14
|
+
h3Style: string;
|
|
15
|
+
tabelTdStyle: string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=Interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Interfaces.d.ts","sourceRoot":"","sources":["../../../../src/logic/DOM/Headings/Interfaces.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,cAAc,GAAG,aAAa,GAAG,cAAc,GAAG,aAAa,GAAG,aAAa,GAAG,cAAc,GAChJ,YAAY,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,WAAW,GACvE,cAAc,GAAG,cAAc,GAAG,cAAc,GAChD,cAAc,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,GACvD,QAAQ,GAAG,aAAa,GACxB,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAC7D,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,GACpD,qBAAqB,GAAG,eAAe,GAAG,qBAAqB,CAC9D;AAED,eAAO,MAAM,gBAAgB,EAAE,gBAAgB,EACc,CAAC;AAE9D,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,EACD,CAAC;AAEtD,eAAO,MAAM,eAAe,EAAE,gBAAgB,EAGQ,CAAC;AAEvD,eAAO,MAAM,cAAc,EAAE,gBAAgB,EAAkG,CAAC;AAEhJ,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,EAA+F,CAAC;AAGhJ,eAAO,MAAM,uBAAuB,UAAsC,CAAC;AAG3E,MAAM,WAAW,qBAAqB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FROM: src\HeadingCSS_\FPSHeadingFunctions.ts
|
|
3
|
+
*/
|
|
4
|
+
export const FPSBorderClasses = ['dottedBorder', 'dashedBorder', 'solidBorder', 'doubleBorder', 'ridgeBorder', 'insetBorder', 'outsetBorder',
|
|
5
|
+
'textCenter', 'heavyTopBotBorder', 'dottedTopBotBorder',];
|
|
6
|
+
export const FPSHeadingNumberClasses = ['dottedBorder', 'dashedBorder', 'solidBorder', 'doubleBorder', 'ridgeBorder', 'insetBorder', 'outsetBorder',
|
|
7
|
+
'autoNumberh1', 'autoNumberh2', 'autoNumberh3',];
|
|
8
|
+
export const FPSEmojiClasses = ['fpsStarBlack', 'fpsStarWhite', 'fpsSect', 'fpsPara',
|
|
9
|
+
'fpsBox', 'fpsCheckBox',
|
|
10
|
+
'fpsSun', 'fpsSmile', 'fpsComet', 'fpsPupper', 'fpsKitty',
|
|
11
|
+
'arrowDown', 'arrowRight', 'eyeBalls', 'thumbsUp'];
|
|
12
|
+
export const FPSMiscClasses = ['textCenter', 'gradiant1', 'transparentTdBorder', 'lightTdBorder', 'lightDashedTdBorder'];
|
|
13
|
+
export const FPSHeadingClasses = [...FPSBorderClasses, ...FPSHeadingNumberClasses, ...FPSEmojiClasses, ...FPSMiscClasses];
|
|
14
|
+
//Should match keys of IMinHeadingStyleProps in src\HeadingCSS\FPSHeadingFunctions.ts
|
|
15
|
+
export const changeHeadingStyleProps = ['h1Style', 'h2Style', 'h3Style'];
|
|
16
|
+
;
|
|
17
|
+
//# sourceMappingURL=Interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../../../src/logic/DOM/Headings/Interfaces.ts"],"names":[],"mappings":"AACA;;GAEG;AAYH,MAAM,CAAC,MAAM,gBAAgB,GAAuB,CAAE,cAAc,EAAG,cAAc,EAAG,aAAa,EAAG,cAAc,EAAG,aAAa,EAAG,aAAa,EAAG,cAAc;IACvK,YAAY,EAAG,mBAAmB,EAAG,oBAAoB,EAAI,CAAC;AAE9D,MAAM,CAAC,MAAM,uBAAuB,GAAuB,CAAE,cAAc,EAAG,cAAc,EAAG,aAAa,EAAG,cAAc,EAAG,aAAa,EAAG,aAAa,EAAG,cAAc;IAC9K,cAAc,EAAG,cAAc,EAAG,cAAc,EAAK,CAAC;AAEtD,MAAM,CAAC,MAAM,eAAe,GAAuB,CAAE,cAAc,EAAG,cAAc,EAAG,SAAS,EAAG,SAAS;IAC5G,QAAQ,EAAG,aAAa;IACxB,QAAQ,EAAG,UAAU,EAAG,UAAU,EAAG,WAAW,EAAG,UAAU;IAC7D,WAAW,EAAG,YAAY,EAAG,UAAU,EAAG,UAAU,CAAE,CAAC;AAEvD,MAAM,CAAC,MAAM,cAAc,GAAuB,CAAE,YAAY,EAAG,WAAW,EAAE,qBAAqB,EAAE,eAAe,EAAE,qBAAqB,CAAE,CAAC;AAEhJ,MAAM,CAAC,MAAM,iBAAiB,GAAuB,CAAE,GAAG,gBAAgB,EAAE,GAAG,uBAAuB,EAAE,GAAG,eAAe,EAAE,GAAG,cAAc,CAAE,CAAC;AAEhJ,qFAAqF;AACrF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAE,CAAC;AAQ1E,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IMinHeadingStyleProps, IFPSHeadingClass } from './Interfaces';
|
|
2
|
+
import { IRegExTag } from '../Tags/Interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Processes web part prop heading props and preps to update h2, h3, h4 tag styles. NOTE SharePoint does not have h1 on the page.
|
|
5
|
+
* @param wpProps
|
|
6
|
+
*/
|
|
7
|
+
export declare function applyHeadingCSS(wpProps: IMinHeadingStyleProps): void;
|
|
8
|
+
/**
|
|
9
|
+
* Takes a web part property string and breaks it into classes and raw css and then applies it to tags.
|
|
10
|
+
* @param tagStyle
|
|
11
|
+
* @param regTag
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare function runStyleOnTags(tagStyle: string, regTag: IRegExTag): void;
|
|
15
|
+
/**
|
|
16
|
+
* adds table classes to canvas Tables and updates cell styling
|
|
17
|
+
* @param tabelTdStyle
|
|
18
|
+
*/
|
|
19
|
+
export declare function addTableStyles(tabelTdStyle: string): void;
|
|
20
|
+
export interface IFPSClassesAndStyles {
|
|
21
|
+
classes: IFPSHeadingClass[];
|
|
22
|
+
cssStyles: string[];
|
|
23
|
+
}
|
|
24
|
+
export declare function getClassStyles(tagStyle: string): IFPSClassesAndStyles;
|
|
25
|
+
/**
|
|
26
|
+
* This actually Applies CSS to html page headings h2, h3, h4 per web part props. NOTE SharePoint does not have h1 on the page.
|
|
27
|
+
* @param applyTag
|
|
28
|
+
* @param applyClass
|
|
29
|
+
* @param alertError
|
|
30
|
+
* @param consoleResult
|
|
31
|
+
*/
|
|
32
|
+
export declare function FPSApplyHeadingCSS(applyTag: IRegExTag, applyClass: IFPSHeadingClass[], alertError?: boolean, consoleResult?: boolean): void;
|
|
33
|
+
export declare function FPSApplyHeadingStyle(applyTag: IRegExTag, cssText: string, alertError?: boolean, consoleResult?: boolean): void;
|
|
34
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../src/logic/DOM/Headings/functions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGvE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAM/C;;;GAGG;AACH,wBAAiB,eAAe,CAAE,OAAO,EAAE,qBAAqB,GAAK,IAAI,CAMxE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAK,IAAI,CAI3E;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAE,YAAY,EAAE,MAAM,GAAI,IAAI,CAa3D;AAED,MAAM,WAAW,oBAAoB;IAAG,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE;AAC1F,wBAAgB,cAAc,CAAE,QAAQ,EAAE,MAAM,GAAI,oBAAoB,CAavE;AAGC;;;;;;EAMC;AAEH,wBAAgB,kBAAkB,CAAG,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAG,gBAAgB,EAAE,EAAE,UAAU,GAAE,OAAc,EAAE,aAAa,GAAE,OAAe,GAAK,IAAI,CAgC7J;AAED,wBAAgB,oBAAoB,CAAG,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAG,MAAM,EAAE,UAAU,GAAE,OAAc,EAAE,aAAa,GAAE,OAAe,GAAI,IAAI,CA+B/I"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { FPSApplyTagCSSAndStyles } from '../Tags/functions';
|
|
2
|
+
import { HTMLRegEx, } from '../Tags/regexHtmlTags';
|
|
3
|
+
import { check4This } from '../../Links/CheckSearch';
|
|
4
|
+
// This needs to be moved downstream
|
|
5
|
+
require('@mikezimm/fps-styles/dist/FPSHeadings.css');
|
|
6
|
+
/**
|
|
7
|
+
* Processes web part prop heading props and preps to update h2, h3, h4 tag styles. NOTE SharePoint does not have h1 on the page.
|
|
8
|
+
* @param wpProps
|
|
9
|
+
*/
|
|
10
|
+
export function applyHeadingCSS(wpProps) {
|
|
11
|
+
if (check4This('skipStyleChanges=true') === true) {
|
|
12
|
+
console.log(`skipStyleChanges @ applyHeadingCSS`);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
runStyleOnTags(wpProps.h1Style, HTMLRegEx.h2);
|
|
16
|
+
runStyleOnTags(wpProps.h2Style, HTMLRegEx.h3);
|
|
17
|
+
runStyleOnTags(wpProps.h3Style, HTMLRegEx.h4);
|
|
18
|
+
addTableStyles(wpProps.tabelTdStyle);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Takes a web part property string and breaks it into classes and raw css and then applies it to tags.
|
|
22
|
+
* @param tagStyle
|
|
23
|
+
* @param regTag
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
export function runStyleOnTags(tagStyle, regTag) {
|
|
27
|
+
const { classes, cssStyles } = getClassStyles(tagStyle);
|
|
28
|
+
if (cssStyles.length > 0 || classes.length > 0)
|
|
29
|
+
FPSApplyTagCSSAndStyles(regTag, cssStyles.join(';'), classes, true, false);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* adds table classes to canvas Tables and updates cell styling
|
|
34
|
+
* @param tabelTdStyle
|
|
35
|
+
*/
|
|
36
|
+
export function addTableStyles(tabelTdStyle) {
|
|
37
|
+
const { classes, cssStyles } = getClassStyles(tabelTdStyle);
|
|
38
|
+
let tableEles = Array.from(document.getElementsByClassName(`canvasRteResponsiveTable`));
|
|
39
|
+
tableEles.map(ele => {
|
|
40
|
+
classes.map(classX => {
|
|
41
|
+
if (!ele.classList.contains(classX)) {
|
|
42
|
+
ele.classList.add(classX);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
if (cssStyles.length > 0 || classes.length > 0)
|
|
47
|
+
FPSApplyTagCSSAndStyles(HTMLRegEx.td, cssStyles.join(';'), [], true, false);
|
|
48
|
+
}
|
|
49
|
+
export function getClassStyles(tagStyle) {
|
|
50
|
+
let classes = [];
|
|
51
|
+
let cssStyles = [];
|
|
52
|
+
if (tagStyle) {
|
|
53
|
+
let pieces = tagStyle.split(';');
|
|
54
|
+
pieces.map((piece) => {
|
|
55
|
+
piece = piece.trim();
|
|
56
|
+
if (piece.indexOf('.') === 0) {
|
|
57
|
+
classes.push(piece.replace('.', ''));
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
cssStyles.push(piece);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return { classes: classes, cssStyles: cssStyles };
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* This actually Applies CSS to html page headings h2, h3, h4 per web part props. NOTE SharePoint does not have h1 on the page.
|
|
68
|
+
* @param applyTag
|
|
69
|
+
* @param applyClass
|
|
70
|
+
* @param alertError
|
|
71
|
+
* @param consoleResult
|
|
72
|
+
*/
|
|
73
|
+
export function FPSApplyHeadingCSS(applyTag, applyClass, alertError = true, consoleResult = false) {
|
|
74
|
+
const startTime = new Date();
|
|
75
|
+
let classChanges = [];
|
|
76
|
+
// for (let iteration = 0; iteration < 10000; iteration++) { //Tested this loop on longer page 10,000 times and on my pc took 218 ms. Was noticable to see old and new
|
|
77
|
+
for (let iteration = 0; iteration < 1; iteration++) {
|
|
78
|
+
//Loop through all the tags to find
|
|
79
|
+
applyTag.tags.map(tag => {
|
|
80
|
+
//Get all elements with this tag
|
|
81
|
+
let nodeList = document.getElementsByTagName(tag);
|
|
82
|
+
if (consoleResult && iteration === 0)
|
|
83
|
+
console.log('FPSApplyHeadingCSS found Elements:', tag, nodeList);
|
|
84
|
+
//Loop through all elements for this tag
|
|
85
|
+
if (nodeList && nodeList.length > 0) {
|
|
86
|
+
for (let i = 0; i < nodeList.length; i++) {
|
|
87
|
+
const ele = nodeList[i];
|
|
88
|
+
classChanges.push(ele.innerHTML);
|
|
89
|
+
applyClass.map(thisClass => {
|
|
90
|
+
if (!ele.classList.contains(thisClass)) {
|
|
91
|
+
ele.classList.add(thisClass);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
const endTime = new Date();
|
|
99
|
+
if (consoleResult)
|
|
100
|
+
console.log('FPSApplyHeadingCSS time to apply styles:', endTime.getTime() - startTime.getTime(), applyTag, applyClass);
|
|
101
|
+
}
|
|
102
|
+
export function FPSApplyHeadingStyle(applyTag, cssText, alertError = true, consoleResult = false) {
|
|
103
|
+
const startTime = new Date();
|
|
104
|
+
let classChanges = [];
|
|
105
|
+
for (let iteration = 0; iteration < 1; iteration++) {
|
|
106
|
+
//Loop through all the tags to find
|
|
107
|
+
applyTag.tags.map(tag => {
|
|
108
|
+
//Get all elements with this tag
|
|
109
|
+
let nodeList = document.getElementsByTagName(tag);
|
|
110
|
+
if (consoleResult && iteration === 0)
|
|
111
|
+
console.log('FPSApplyHeadingCSS found Elements:', tag, nodeList);
|
|
112
|
+
//Loop through all elements for this tag
|
|
113
|
+
if (nodeList && nodeList.length > 0) {
|
|
114
|
+
for (let i = 0; i < nodeList.length; i++) {
|
|
115
|
+
const ele = nodeList[i];
|
|
116
|
+
if (ele.style) {
|
|
117
|
+
ele.style.cssText += cssText;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
ele.style.cssText = cssText;
|
|
121
|
+
}
|
|
122
|
+
classChanges.push(ele.innerHTML);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
const endTime = new Date();
|
|
128
|
+
if (consoleResult)
|
|
129
|
+
console.log('FPSApplyHeadingStyle time to apply styles:', endTime.getTime() - startTime.getTime(), applyTag, cssText, classChanges);
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../src/logic/DOM/Headings/functions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,GAAI,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,oCAAoC;AACpC,OAAO,CAAC,2CAA2C,CAAC,CAAC;AAErD;;;GAGG;AACH,MAAM,UAAW,eAAe,CAAE,OAA8B;IAC9D,IAAK,UAAU,CAAE,uBAAuB,CAAC,KAAK,IAAI,EAAG;QAAE,OAAO,CAAC,GAAG,CAAE,oCAAoC,CAAC,CAAC;QAAC,OAAO;KAAE;IACpH,cAAc,CAAE,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,EAAe,CAAE,CAAC;IAC7D,cAAc,CAAE,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,EAAe,CAAE,CAAC;IAC7D,cAAc,CAAE,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,EAAe,CAAE,CAAC;IAC7D,cAAc,CAAE,OAAO,CAAC,YAAY,CAAG,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAE,QAAgB,EAAE,MAAiB;IACjE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,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AC,EAAE,EAAE;oBACxC,MAAM,GAAG,GAAQ,QAAQ,CAAC,CAAC,CAAC,CAAC;oBAC7B,IAAK,GAAG,CAAC,KAAK,EAAG;wBACf,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,OAAO,CAAC;qBAC9B;yBAAM;wBACL,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;qBAC7B;oBACD,YAAY,CAAC,IAAI,CAAE,GAAG,CAAC,SAAS,CAAE,CAAC;iBACpC;aACF;QACH,CAAC,CAAC,CAAC;KACJ;IAED,MAAM,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;IAC3B,IAAK,aAAa;QAAG,OAAO,CAAC,GAAG,CAAC,4CAA4C,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE,EAAG,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAE,CAAC;AAE7J,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function findParentElementLikeThis(e: any, prop: string, value: string, maxHops: number, search: 'begins' | 'ends' | 'contains' | 'exact', alertError?: boolean, consoleResult?: boolean): any;
|
|
2
|
+
export declare function findParentElementPropLikeThis(e: any, prop: string, value: string, maxHops: number, search: 'begins' | 'ends' | 'contains' | 'exact'): any;
|
|
3
|
+
//# sourceMappingURL=domSearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domSearch.d.ts","sourceRoot":"","sources":["../../../../src/logic/DOM/Search/domSearch.ts"],"names":[],"mappings":"AAiBE,wBAAgB,yBAAyB,CAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,EAAE,UAAU,GAAE,OAAc,EAAE,aAAa,GAAE,OAAc,OAqE3M;AAED,wBAAgB,6BAA6B,CAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,OAiBpJ"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This was originally copied from PivotTiles basicElements.tsx file
|
|
3
|
+
*
|
|
4
|
+
* Use like this: let thisID = findParentElementPropLikeThis(e.target, 'id', 'ButtonID', 5, 'begins');
|
|
5
|
+
* Will find element where id begins wtih ButtonID up to 5 parents up.
|
|
6
|
+
* @param e
|
|
7
|
+
* @param prop
|
|
8
|
+
* @param value
|
|
9
|
+
* @param maxHops
|
|
10
|
+
* @param search
|
|
11
|
+
* @param alertError //Alert on error or not found
|
|
12
|
+
* @param consoleResult //Console log result element
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
import { check4This } from '../../Links/CheckSearch';
|
|
16
|
+
export function findParentElementLikeThis(e, prop, value, maxHops, search, alertError = true, consoleResult = true) {
|
|
17
|
+
let result = null;
|
|
18
|
+
let checkElement = e['parentElement'];
|
|
19
|
+
let found = false;
|
|
20
|
+
let foundHops = 0;
|
|
21
|
+
for (let i = 0; i < maxHops; i++) {
|
|
22
|
+
if (found === false) {
|
|
23
|
+
if (checkElement[prop]) {
|
|
24
|
+
foundHops++;
|
|
25
|
+
let parentProp = prop === 'classList' ? checkElement['className'].split(' ') : checkElement[prop];
|
|
26
|
+
if (parentProp) {
|
|
27
|
+
if (prop.toLowerCase() === 'classlist') {
|
|
28
|
+
parentProp = JSON.parse(JSON.stringify(parentProp));
|
|
29
|
+
if (search === 'contains') {
|
|
30
|
+
if (parentProp.indexOf(value) > -1) {
|
|
31
|
+
result = checkElement;
|
|
32
|
+
found = true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else if (search === 'begins') {
|
|
36
|
+
if (parentProp.indexOf(value) === 0) {
|
|
37
|
+
result = checkElement;
|
|
38
|
+
found = true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else if (search === 'ends') {
|
|
42
|
+
if (parentProp.indexOf(value) === parentProp.length - 1) {
|
|
43
|
+
result = checkElement;
|
|
44
|
+
found = true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else if (search === 'exact') {
|
|
48
|
+
if (checkElement['className'] === value) {
|
|
49
|
+
result = checkElement;
|
|
50
|
+
found = true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
else if (search === 'begins') {
|
|
55
|
+
if (parentProp.indexOf(value) === 0) {
|
|
56
|
+
result = checkElement;
|
|
57
|
+
found = true;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else if (search === 'ends') {
|
|
61
|
+
alert('findParentElementPropLikeThis: Error - feature not yet avaialble!');
|
|
62
|
+
}
|
|
63
|
+
else if (search === 'contains') {
|
|
64
|
+
if (parentProp.indexOf(value) > -1) {
|
|
65
|
+
result = checkElement;
|
|
66
|
+
found = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else if (search === 'exact') {
|
|
70
|
+
if (parentProp === value) {
|
|
71
|
+
result = checkElement;
|
|
72
|
+
found = true;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (found === false) {
|
|
78
|
+
checkElement = checkElement['parentElement'];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (found === false && alertError === true) {
|
|
83
|
+
alert('findParentElementPropLikeThis: Could not find parent element - see console.');
|
|
84
|
+
console.log('findParentElementPropLikeThis: found, prop, value, foundHops, maxHops, search', found, prop, value, foundHops, maxHops, search);
|
|
85
|
+
}
|
|
86
|
+
if (consoleResult === true) {
|
|
87
|
+
if (check4This(`fpsDomSearch`) === true)
|
|
88
|
+
console.log('findParentElementPropLikeThis: found, prop, value, foundHops, maxHops, search', found, prop, value, foundHops, maxHops, search);
|
|
89
|
+
}
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
export function findParentElementPropLikeThis(e, prop, value, maxHops, search) {
|
|
93
|
+
let result = findParentElementLikeThis(e, prop, value, maxHops, search);
|
|
94
|
+
let found = result === null ? false : true;
|
|
95
|
+
let propResult = result !== null ? result[prop] : result;
|
|
96
|
+
if (found === false) {
|
|
97
|
+
alert('findParentElementPropLikeThis: Could not find parent element - see console.');
|
|
98
|
+
console.log('findParentElementPropLikeThis: Did not find: prop', prop);
|
|
99
|
+
console.log('findParentElementPropLikeThis: Did not find: value', result[prop]);
|
|
100
|
+
console.log('findParentElementPropLikeThis: Did not find: maxHops', maxHops);
|
|
101
|
+
console.log('findParentElementPropLikeThis: Did not find: search', search);
|
|
102
|
+
}
|
|
103
|
+
return propResult;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=domSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domSearch.js","sourceRoot":"","sources":["../../../../src/logic/DOM/Search/domSearch.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;KAaK;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,UAAU,yBAAyB,CAAE,CAAM,EAAE,IAAY,EAAE,KAAa,EAAE,OAAe,EAAE,MAAgD,EAAE,aAAsB,IAAI,EAAE,gBAAyB,IAAI;IAE1M,IAAI,MAAM,GAAS,IAAI,CAAC;IACxB,IAAI,YAAY,GAAQ,CAAC,CAAC,eAAe,CAAC,CAAC;IAC3C,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAG,CAAC,EAAE,EAAE;QAEjC,IAAK,KAAK,KAAK,KAAK,EAAG;YAErB,IAAK,YAAY,CAAC,IAAI,CAAC,EAAG;gBACxB,SAAS,EAAG,CAA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AE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/E,IAAI,KAAK,GAAG,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAE3C,IAAI,UAAU,GAAG,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAE;IAE1D,IAAK,KAAK,KAAK,KAAK,EAAG;QACrB,KAAK,CAAC,8EAA8E,CAAC,CAAC;QACtF,OAAO,CAAC,GAAG,CAAC,mDAAmD,EAAE,IAAI,CAAG,CAAC;QACzE,OAAO,CAAC,GAAG,CAAC,oDAAoD,EAAE,MAAM,CAAC,IAAI,CAAC,CAAE,CAAC;QACjF,OAAO,CAAC,GAAG,CAAC,sDAAsD,EAAE,OAAO,CAAE,CAAC;QAC9E,OAAO,CAAC,GAAG,CAAC,qDAAqD,EAAE,MAAM,CAAE,CAAC;KAC7E;IAEH,OAAO,UAAU,CAAC;AAElB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Used to find the page's OOTB WebPart Title for Slick Sections styling change
|
|
3
|
+
* https://github.com/mikezimm/Slick-Sections/issues/98
|
|
4
|
+
*/
|
|
5
|
+
export interface IFPSFindParentEle {
|
|
6
|
+
element: HTMLElement | null;
|
|
7
|
+
levels: number;
|
|
8
|
+
status: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const OOTBTitleSectionClass: string;
|
|
11
|
+
export declare const SkipSPOMSFTSectionClasses: string[];
|
|
12
|
+
/**
|
|
13
|
+
* Used to find the page's OOTB WebPart Title for Slick Sections styling change
|
|
14
|
+
* https://github.com/mikezimm/Slick-Sections/issues/98
|
|
15
|
+
*/
|
|
16
|
+
export declare function findParentWithClass(element: HTMLElement, levels: number, className: string): IFPSFindParentEle;
|
|
17
|
+
/**
|
|
18
|
+
* Used to find the page's OOTB WebPart Title for Slick Sections styling change
|
|
19
|
+
* https://github.com/mikezimm/Slick-Sections/issues/98
|
|
20
|
+
*/
|
|
21
|
+
export declare function tagParentElementByClass(element: HTMLElement, levels: number, className: string, addTag: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Used to find the page's OOTB WebPart Title for Slick Sections styling change
|
|
24
|
+
* https://github.com/mikezimm/Slick-Sections/issues/98
|
|
25
|
+
*/
|
|
26
|
+
export declare function tagOOTBWebPartTitleSection(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Used to find the page's OOTB WebPart Title for Slick Sections styling change
|
|
29
|
+
*/
|
|
30
|
+
export declare function findElementWithViewportId(prefix: string, parentNode?: HTMLElement | Document): HTMLElement | null;
|
|
31
|
+
//# sourceMappingURL=tagParentSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tagParentSection.d.ts","sourceRoot":"","sources":["../../../../src/logic/DOM/Search/tagParentSection.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,qBAAqB,EAAE,MAA8B,CAAC;AACnE,eAAO,MAAM,yBAAyB,EAAE,MAAM,EAA8B,CAAC;AAC7E;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,iBAAiB,CAc9G;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,OAAO,CAkB1H;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAOjD;AAED;;GAEG;AAEH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,GAAE,WAAW,GAAG,QAAmB,GAAI,WAAW,GAAG,IAAI,CAc5H"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export const OOTBTitleSectionClass = `parent-to-PageTitle`;
|
|
2
|
+
export const SkipSPOMSFTSectionClasses = [OOTBTitleSectionClass];
|
|
3
|
+
/**
|
|
4
|
+
* Used to find the page's OOTB WebPart Title for Slick Sections styling change
|
|
5
|
+
* https://github.com/mikezimm/Slick-Sections/issues/98
|
|
6
|
+
*/
|
|
7
|
+
export function findParentWithClass(element, levels, className) {
|
|
8
|
+
let currentElement = element;
|
|
9
|
+
let currentLevel = 0;
|
|
10
|
+
while (currentElement && currentLevel < levels) {
|
|
11
|
+
currentElement = currentElement.parentElement;
|
|
12
|
+
currentLevel++;
|
|
13
|
+
if (currentElement && currentElement.classList.contains(className)) {
|
|
14
|
+
return { element: currentElement, levels: currentLevel, status: true };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return { element: currentElement, levels: currentLevel, status: false };
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Used to find the page's OOTB WebPart Title for Slick Sections styling change
|
|
21
|
+
* https://github.com/mikezimm/Slick-Sections/issues/98
|
|
22
|
+
*/
|
|
23
|
+
export function tagParentElementByClass(element, levels, className, addTag) {
|
|
24
|
+
const SectionElement = findParentWithClass(element, levels, className);
|
|
25
|
+
let result = false;
|
|
26
|
+
if (SectionElement.element && SectionElement.status === true) {
|
|
27
|
+
if (SectionElement.element.classList.contains(addTag)) {
|
|
28
|
+
// Do nothing
|
|
29
|
+
}
|
|
30
|
+
else { // Add addTag to classList since it does not yet exist
|
|
31
|
+
SectionElement.element.classList.add(addTag);
|
|
32
|
+
result = true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
console.log(`tagParentElementByClass`, SectionElement.status, SectionElement.levels, className, addTag);
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Used to find the page's OOTB WebPart Title for Slick Sections styling change
|
|
40
|
+
* https://github.com/mikezimm/Slick-Sections/issues/98
|
|
41
|
+
*/
|
|
42
|
+
export function tagOOTBWebPartTitleSection() {
|
|
43
|
+
const TitleElement = findElementWithViewportId(`WebPart.PageTitle.internal`);
|
|
44
|
+
if (TitleElement) {
|
|
45
|
+
tagParentElementByClass(TitleElement, 10, 'CanvasZone', OOTBTitleSectionClass);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Used to find the page's OOTB WebPart Title for Slick Sections styling change
|
|
50
|
+
*/
|
|
51
|
+
// eslint-disable-next-line @rushstack/no-new-null
|
|
52
|
+
export function findElementWithViewportId(prefix, parentNode = document) {
|
|
53
|
+
/**
|
|
54
|
+
* Using this Array.from to eliminate the typescript error:
|
|
55
|
+
* Type 'NodeListOf<HTMLElement>' must have a '[Symbol.iterator]()' method that returns an iterator.ts(2488)
|
|
56
|
+
*/
|
|
57
|
+
const allElements = Array.from(parentNode.querySelectorAll('[data-viewport-id]'));
|
|
58
|
+
for (const element of allElements) {
|
|
59
|
+
const viewportId = element.getAttribute('data-viewport-id');
|
|
60
|
+
if (viewportId && viewportId.startsWith(prefix)) {
|
|
61
|
+
return element;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=tagParentSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tagParentSection.js","sourceRoot":"","sources":["../../../../src/logic/DOM/Search/tagParentSection.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,qBAAqB,GAAW,qBAAqB,CAAC;AACnE,MAAM,CAAC,MAAM,yBAAyB,GAAa,CAAE,qBAAqB,CAAE,CAAC;AAC7E;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAoB,EAAE,MAAc,EAAE,SAAiB;IACzF,IAAI,cAAc,GAAuB,OAAO,CAAC;IACjD,IAAI,YAAY,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ClB,uBAAuB,CAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,qBAAqB,CAAE,CAAC;KAClF;AAEH,CAAC;AAED;;GAEG;AACH,kDAAkD;AAClD,MAAM,UAAU,yBAAyB,CAAC,MAAc,EAAE,aAAqC,QAAQ;IAErG;;;OAGG;IACH,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAc,oBAAoB,CAAC,CAAC,CAAC;IAC/F,KAAK,MAAM,OAAO,IAAI,WAAW,EAAE;QAC/B,MAAM,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;QAC5D,IAAI,UAAU,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YAC7C,OAAO,OAAO,CAAC;SAClB;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migrated from
|
|
3
|
+
* npmFunctions/src\Services\Regex_\htmlTags_.ts
|
|
4
|
+
*
|
|
5
|
+
* Some functions in the file were moved to logic/DOM/Tags
|
|
6
|
+
*/
|
|
7
|
+
export interface IRegExTag {
|
|
8
|
+
key: string;
|
|
9
|
+
desc: string;
|
|
10
|
+
misc?: string;
|
|
11
|
+
tags: string[];
|
|
12
|
+
open: RegExp;
|
|
13
|
+
close: RegExp;
|
|
14
|
+
openG: RegExp;
|
|
15
|
+
closeG: RegExp;
|
|
16
|
+
}
|
|
17
|
+
export interface IHTMLRegEx {
|
|
18
|
+
h1?: IRegExTag;
|
|
19
|
+
h2?: IRegExTag;
|
|
20
|
+
h3?: IRegExTag;
|
|
21
|
+
h4?: IRegExTag;
|
|
22
|
+
h12?: IRegExTag;
|
|
23
|
+
h13?: IRegExTag;
|
|
24
|
+
h14?: IRegExTag;
|
|
25
|
+
p?: IRegExTag;
|
|
26
|
+
div?: IRegExTag;
|
|
27
|
+
li?: IRegExTag;
|
|
28
|
+
a?: IRegExTag;
|
|
29
|
+
mark?: IRegExTag;
|
|
30
|
+
bold?: IRegExTag;
|
|
31
|
+
img?: IRegExTag;
|
|
32
|
+
script?: IRegExTag;
|
|
33
|
+
style?: IRegExTag;
|
|
34
|
+
td?: IRegExTag;
|
|
35
|
+
}
|
|
36
|
+
export type IHTMLRegExKeys = 'h1' | 'h2' | 'h3' | 'h4' | 'h12' | 'h13' | 'h14' | 'p' | 'mark' | 'bold' | 'li' | 'img' | 'td';
|
|
37
|
+
//# sourceMappingURL=Interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Interfaces.d.ts","sourceRoot":"","sources":["../../../../src/logic/DOM/Tags/Interfaces.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,CAAC,CAAC,EAAE,SAAS,CAAC;IACd,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,CAAC,CAAC,EAAE,SAAS,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,EAAE,CAAC,EAAE,SAAS,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../../../src/logic/DOM/Tags/Interfaces.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FROM: src\Services\DOM\Tags\FPSTagFunctions.ts
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Updated from FPSPage Info 2022-07-27.
|
|
6
|
+
*/
|
|
7
|
+
import { IFPSHeadingClass } from '../Headings/Interfaces';
|
|
8
|
+
import { IRegExTag } from './Interfaces';
|
|
9
|
+
export type IFPSKnownStyleClasses = IFPSHeadingClass | string;
|
|
10
|
+
export declare function FPSApplyTagCSSAndStyles(applyTag: IRegExTag, cssText: string, applyClass: IFPSKnownStyleClasses[], alertError?: boolean, consoleResult?: boolean): void;
|
|
11
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../src/logic/DOM/Tags/functions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AAEF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,MAAM,CAAC;AAE9D,wBAAgB,uBAAuB,CAAG,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAG,MAAM,EAAE,UAAU,EAAG,qBAAqB,EAAE,EAAE,UAAU,GAAE,OAAc,EAAE,aAAa,GAAE,OAAe,QA2ChL"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FROM: src\Services\DOM\Tags\FPSTagFunctions.ts
|
|
3
|
+
*/
|
|
4
|
+
export function FPSApplyTagCSSAndStyles(applyTag, cssText, applyClass, alertError = true, consoleResult = false) {
|
|
5
|
+
const startTime = new Date();
|
|
6
|
+
let classChanges = [];
|
|
7
|
+
if (applyTag) {
|
|
8
|
+
// for (let iteration = 0; iteration < 10000; iteration++) { //Tested this loop on longer page 10,000 times and on my pc took 218 ms. Was noticable to see old and new
|
|
9
|
+
for (let iteration = 0; iteration < 1; iteration++) {
|
|
10
|
+
//Loop through all the tags to find
|
|
11
|
+
applyTag.tags.map(tag => {
|
|
12
|
+
//Get all elements with this tag
|
|
13
|
+
let nodeList = document.getElementsByTagName(tag);
|
|
14
|
+
if (consoleResult && iteration === 0)
|
|
15
|
+
console.log('FPSApplyTagCSSAndStyles found Elements:', tag, nodeList);
|
|
16
|
+
//Loop through all elements for this tag
|
|
17
|
+
if (nodeList && nodeList.length > 0) {
|
|
18
|
+
for (let i = 0; i < nodeList.length; i++) {
|
|
19
|
+
const ele = nodeList[i];
|
|
20
|
+
classChanges.push(ele.innerHTML);
|
|
21
|
+
applyClass.map(thisClass => {
|
|
22
|
+
if (!ele.classList.contains(thisClass)) {
|
|
23
|
+
ele.classList.add(thisClass);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
if (ele.style) {
|
|
27
|
+
ele.style.cssText += cssText;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
ele.style.cssText = cssText;
|
|
31
|
+
}
|
|
32
|
+
classChanges.push(ele.innerHTML);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const endTime = new Date();
|
|
38
|
+
if (consoleResult)
|
|
39
|
+
console.log('FPSApplyHeadingCSS time to apply styles:', endTime.getTime() - startTime.getTime(), applyTag, cssText, applyClass);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
console.log('FPSApplyTagCSSAndStyles - ERROR, applyTag is undefined or null!');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../src/logic/DOM/Tags/functions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWF,MAAM,UAAU,uBAAuB,CAAG,QAAmB,EAAE,OAAgB,EAAE,UAAoC,EAAE,aAAsB,IAAI,EAAE,gBAAyB,KAAK;IAC/K,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,IAAI,YAAY,GAAU,EAAE,CAAC;IAE7B,IAAK,QAAQ,EAAG;QACd,uKAAuK;QACvK,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAE,SAAS,EAAE,EAAE;YAElD,mCAAmC;YACnC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAE,GAAG,CAAC,EAAE;gBAEvB,gCAAgC;gBAChC,IAAI,QAAQ,GAAG,QAAQ,CAAC,oBAAoB,CAAE,GAAG,CAAE,CAAC;gBACpD,IAAK,aAAa,IAAI,SAAS,KAAK,CAAC;oBAAG,OAAO,CAAC,GAAG,CAAE,yCAAyC,EAAE,GAAG,EAAE,QAAQ,CAAE,CAAC;gBAEhH,wCAAwC;gBACxC,IAAK,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAG;oBACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBACxC,MAAM,GAAG,GAAQ,QAAQ,CAAC,CAAC,CAAC,CAAC;wBAC7B,YAAY,CAAC,IAAI,CAAE,GAAG,CAAC,SAAS,CAAE,CAAC;wBACnC,UAAU,CAAC,GAAG,CAAG,SAAS,CAAC,EAAE;4BAC3B,IAAK,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAE,SAAS,CAAE,EAAI;gCAC3C,GAAG,CAAC,SAAS,CAAC,GAAG,CAAE,SAAS,CAAE,CAAE;6BACjC;wBACH,CAAC,CAAC,CAAC;wBACH,IAAK,GAAG,CAAC,KAAK,EAAG;4BACf,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,OAAO,CAAC;yBAC9B;6BAAM;4BACL,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;yBAC7B;wBACD,YAAY,CAAC,IAAI,CAAE,GAAG,CAAC,SAAS,CAAE,CAAC;qBACpC;iBACF;YACH,CAAC,CAAC,CAAC;SACJ;QAED,MAAM,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;QAC3B,IAAK,aAAa;YAAG,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE,EAAG,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAI,CAAC;KAE1J;SAAM;QACL,OAAO,CAAC,GAAG,CAAE,iEAAiE,CAAE,CAAC;KAClF;AAEH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FROM src\Services\Regex\htmlTags.ts
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* These are used to parse heading tags out of html strings
|
|
6
|
+
* FPS Page Info SP Service
|
|
7
|
+
* NOTE: h2 in html is really h1 on sharepoint page
|
|
8
|
+
*/
|
|
9
|
+
import { IHTMLRegEx, IRegExTag } from "./Interfaces";
|
|
10
|
+
export declare function createTagRegex(tag: string, misc?: string): IRegExTag;
|
|
11
|
+
export declare const h12RegEx: IRegExTag;
|
|
12
|
+
export declare const h13RegEx: IRegExTag;
|
|
13
|
+
export declare const h14RegEx: IRegExTag;
|
|
14
|
+
export declare const HTMLRegEx: IHTMLRegEx;
|
|
15
|
+
//# sourceMappingURL=regexHtmlTags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regexHtmlTags.d.ts","sourceRoot":"","sources":["../../../../src/logic/DOM/Tags/regexHtmlTags.ts"],"names":[],"mappings":"AACA;;GAEG;AACH;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAqBrD,wBAAgB,cAAc,CAAG,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,MAAW,GAAK,SAAS,CAe5E;AAGD,eAAO,MAAM,QAAQ,EAAE,SAStB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,SAStB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,SAStB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,UAmBvB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FROM src\Services\Regex\htmlTags.ts
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* These are used to parse heading tags out of html strings
|
|
6
|
+
* FPS Page Info SP Service
|
|
7
|
+
* NOTE: h2 in html is really h1 on sharepoint page
|
|
8
|
+
*/
|
|
9
|
+
//This was based upon examples found in react-page-navigation Service.ts file
|
|
10
|
+
// export const RegexHeading14StartG = /<h[1-4](.*?)>/g;
|
|
11
|
+
// export const RegexHeading14StartN = /<h[1-4](.*?)>/;
|
|
12
|
+
// export const RegexHeading14EndG = /<\/h[1-4]>/g;
|
|
13
|
+
// export const RegexHeading13StartG = /<h[1-3](.*?)>/g;
|
|
14
|
+
// export const RegexHeading13StartN = /<h[1-3](.*?)>/;
|
|
15
|
+
// export const RegexHeading13EndG = /<\/h[1-3]>/g;
|
|
16
|
+
// export const RegexHeading12StartG = /<h[1-2](.*?)>/g;
|
|
17
|
+
// export const RegexHeading12StartN = /<h[1-2](.*?)>/;
|
|
18
|
+
// export const RegexHeading12EndG = /<\/h[1-2]>/g;
|
|
19
|
+
const openTagStr = '<tag(.*?)>';
|
|
20
|
+
const closeTagStr = '<\/tag>';
|
|
21
|
+
export function createTagRegex(tag, misc = '') {
|
|
22
|
+
let thisReg = {
|
|
23
|
+
key: tag,
|
|
24
|
+
tags: [tag],
|
|
25
|
+
desc: `Finds ${tag} tags in Html`,
|
|
26
|
+
misc: misc,
|
|
27
|
+
open: new RegExp(openTagStr.replace('tag', tag)),
|
|
28
|
+
close: new RegExp(closeTagStr.replace('tag', tag)),
|
|
29
|
+
openG: new RegExp(openTagStr.replace('tag', tag), 'g'),
|
|
30
|
+
closeG: new RegExp(closeTagStr.replace('tag', tag), 'g'),
|
|
31
|
+
};
|
|
32
|
+
return thisReg;
|
|
33
|
+
}
|
|
34
|
+
const h12Tag = 'h[1-2]';
|
|
35
|
+
export const h12RegEx = {
|
|
36
|
+
key: 'h12',
|
|
37
|
+
tags: ['h1', 'h2'],
|
|
38
|
+
desc: 'Finds h1 tags in Html',
|
|
39
|
+
misc: 'Not sure if SharePoint has any h1 on a page.',
|
|
40
|
+
open: new RegExp(openTagStr.replace('tag', h12Tag)),
|
|
41
|
+
close: new RegExp(closeTagStr.replace('tag', h12Tag)),
|
|
42
|
+
openG: new RegExp(openTagStr.replace('tag', h12Tag), 'g'),
|
|
43
|
+
closeG: new RegExp(closeTagStr.replace('tag', h12Tag), 'g'),
|
|
44
|
+
};
|
|
45
|
+
const h13Tag = 'h[1-3]';
|
|
46
|
+
export const h13RegEx = {
|
|
47
|
+
key: 'h13',
|
|
48
|
+
tags: ['h1', 'h2', 'h3'],
|
|
49
|
+
desc: 'Finds h1, h2 and h3 tags in Html',
|
|
50
|
+
misc: 'SharePoint Headings are one index larger... SharePoint Heading1 is really an h2 tag',
|
|
51
|
+
open: new RegExp(openTagStr.replace('tag', h13Tag)),
|
|
52
|
+
close: new RegExp(closeTagStr.replace('tag', h13Tag)),
|
|
53
|
+
openG: new RegExp(openTagStr.replace('tag', h13Tag), 'g'),
|
|
54
|
+
closeG: new RegExp(closeTagStr.replace('tag', h13Tag), 'g'),
|
|
55
|
+
};
|
|
56
|
+
const h14Tag = 'h[1-4]';
|
|
57
|
+
export const h14RegEx = {
|
|
58
|
+
key: 'h14',
|
|
59
|
+
tags: ['h1', 'h2', 'h3', 'h4'],
|
|
60
|
+
desc: 'Finds h1, h2 , h3 and h4 tags in Html',
|
|
61
|
+
misc: 'SharePoint Headings are one index larger... SharePoint Heading1 is really an h2 tag',
|
|
62
|
+
open: new RegExp(openTagStr.replace('tag', h14Tag)),
|
|
63
|
+
close: new RegExp(closeTagStr.replace('tag', h14Tag)),
|
|
64
|
+
openG: new RegExp(openTagStr.replace('tag', h14Tag), 'g'),
|
|
65
|
+
closeG: new RegExp(closeTagStr.replace('tag', h14Tag), 'g'),
|
|
66
|
+
};
|
|
67
|
+
export const HTMLRegEx = {
|
|
68
|
+
h1: createTagRegex('h1', 'Finds Not sure in SharePoint Pages'),
|
|
69
|
+
h2: createTagRegex('h2', 'Finds Heading1 in SharePoint Pages'),
|
|
70
|
+
h3: createTagRegex('h3', 'Finds Heading2 in SharePoint Pages'),
|
|
71
|
+
h4: createTagRegex('h4', 'Finds Heading3 in SharePoint Pages'),
|
|
72
|
+
h12: h12RegEx,
|
|
73
|
+
h13: h13RegEx,
|
|
74
|
+
h14: h14RegEx,
|
|
75
|
+
p: createTagRegex('p', 'Finds Not sure in SharePoint Pages'),
|
|
76
|
+
div: createTagRegex('div', 'Finds Not sure in SharePoint Pages'),
|
|
77
|
+
li: createTagRegex('li', 'Finds Not sure in SharePoint Pages'),
|
|
78
|
+
a: createTagRegex('a', 'Finds Not sure in SharePoint Pages'),
|
|
79
|
+
mark: createTagRegex('mark', 'Finds Not sure in SharePoint Pages'),
|
|
80
|
+
bold: createTagRegex('bold', 'Finds Not sure in SharePoint Pages'),
|
|
81
|
+
img: createTagRegex('img', 'Finds Not sure in SharePoint Pages'),
|
|
82
|
+
script: createTagRegex('script', 'Finds Not sure in SharePoint Pages'),
|
|
83
|
+
style: createTagRegex('style', 'Finds Not sure in SharePoint Pages'),
|
|
84
|
+
td: createTagRegex('td', 'Finds Table Cells in SharePoint Pages'),
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=regexHtmlTags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regexHtmlTags.js","sourceRoot":"","sources":["../../../../src/logic/DOM/Tags/regexHtmlTags.ts"],"names":[],"mappings":"AACA;;GAEG;AACH;;;;GAIG;AAMH,6EAA6E;AAC7E,wDAAwD;AACxD,uDAAuD;AACvD,mDAAmD;AAEnD,wDAAwD;AACxD,uDAAuD;AACvD,mDAAmD;AAEnD,wDAAwD;AACxD,uDAAuD;AACvD,mDAAmD;AAGnD,MAAM,UAAU,GAAG,YAAY,CAAC;AAChC,MAAM,WAAW,GAAG,SAAS,CAAC;AAE9B,MAAM,UAAU,cAAc,CAAG,GAAW,EAAE,OAAe,EAAE;IAE3D,IAAI,OAAO,GAAc;QACrB,GAAG,EAAE,GAAG;QACR,IAAI,EAAE,CAAE,GAAG,CAAE;QACb,IAAI,EAAE,SAAS,GAAG,eAAe;QACjC,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAE,CAAG;QACnD,KAAK,EAAE,IAAI,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAE,CAAG;QACrD,KAAK,EAAE,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAE,EAAE,GAAG,CAAE;QACxD,MAAM,EAAE,IAAI,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAE,EAAE,GAAG,CAAE;KAC7D,C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cAAc,CAAE,MAAM,EAAE,oCAAoC,CAAC;IACnE,IAAI,EAAE,cAAc,CAAE,MAAM,EAAE,oCAAoC,CAAC;IACnE,GAAG,EAAE,cAAc,CAAE,KAAK,EAAE,oCAAoC,CAAC;IACjE,MAAM,EAAE,cAAc,CAAE,QAAQ,EAAE,oCAAoC,CAAC;IACvE,KAAK,EAAE,cAAc,CAAE,OAAO,EAAE,oCAAoC,CAAC;IACrE,EAAE,EAAE,cAAc,CAAE,IAAI,EAAE,uCAAuC,CAAC;CAErE,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { IFpsSpHttpServiceMIN } from '../../../components/molecules/SpHttp/Sp/IF
|
|
|
8
8
|
* const UniquePermsFilter = 'HasUniqueRoleAssignments eq true';
|
|
9
9
|
* const UniquePermsHiddenFilter = `${ UniquePermsFilter } and Hidden eq false`;
|
|
10
10
|
*
|
|
11
|
-
* import { getAnalyticsAPI } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
11
|
+
* import { getAnalyticsAPI } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Analytics/getAnalyticsAPI";
|
|
12
12
|
*
|
|
13
13
|
* @param sourceProps
|
|
14
14
|
* @param autoExapnd = true is for normal sourceProps, use false if you have custom logic for expands such as Drilldown
|
|
@@ -13,7 +13,7 @@ import { makeAbsoluteUrl } from '../../../logic/Strings/getSiteCollectionUrlFrom
|
|
|
13
13
|
* const UniquePermsFilter = 'HasUniqueRoleAssignments eq true';
|
|
14
14
|
* const UniquePermsHiddenFilter = `${ UniquePermsFilter } and Hidden eq false`;
|
|
15
15
|
*
|
|
16
|
-
* import { getAnalyticsAPI } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
16
|
+
* import { getAnalyticsAPI } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Analytics/getAnalyticsAPI";
|
|
17
17
|
*
|
|
18
18
|
* @param sourceProps
|
|
19
19
|
* @param autoExapnd = true is for normal sourceProps, use false if you have custom logic for expands such as Drilldown
|
|
@@ -6,7 +6,7 @@ import { IFpsSpHttpServiceMIN } from '../../../components/molecules/SpHttp/Sp/IF
|
|
|
6
6
|
* 2025-01-03: Migrated from fps-library-v2/lib/pnpjs/Logging, pnp2/lib/services/sp/perms
|
|
7
7
|
* combination of v2: saveAnalytics2D
|
|
8
8
|
*
|
|
9
|
-
* import { savePermissionHistory } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
9
|
+
* import { savePermissionHistory } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Permissions/savePermissionHistory";
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
export declare function getMinPerformanceString(performanceObj: ILoadPerformance, capMS?: number, capValue?: any): string;
|
|
@@ -21,7 +21,7 @@ export declare function getMinPerformance(performanceObj: ILoadPerformance, capM
|
|
|
21
21
|
/**
|
|
22
22
|
* saveAnalytics4 is the same as 3 except you do not need the WebUrl... it's either Legacy or New depending on the tenant
|
|
23
23
|
*
|
|
24
|
-
* import { saveAnalytics4 } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
24
|
+
* import { saveAnalytics4 } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Analytics/saveAnalyticsAPI";
|
|
25
25
|
*
|
|
26
26
|
* @param analyticsList
|
|
27
27
|
* @param saveObject
|
|
@@ -13,7 +13,7 @@ import { AnalyticsWeb } from '../interfaces/constants';
|
|
|
13
13
|
* 2025-01-03: Migrated from fps-library-v2/lib/pnpjs/Logging, pnp2/lib/services/sp/perms
|
|
14
14
|
* combination of v2: saveAnalytics2D
|
|
15
15
|
*
|
|
16
|
-
* import { savePermissionHistory } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
16
|
+
* import { savePermissionHistory } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Permissions/savePermissionHistory";
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
19
|
export function getMinPerformanceString(performanceObj, capMS = 7000, capValue = 'paused?') {
|
|
@@ -73,7 +73,7 @@ export function getMinPerformance(performanceObj, capMS = 7000, capValue = 'paus
|
|
|
73
73
|
/**
|
|
74
74
|
* saveAnalytics4 is the same as 3 except you do not need the WebUrl... it's either Legacy or New depending on the tenant
|
|
75
75
|
*
|
|
76
|
-
* import { saveAnalytics4 } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
76
|
+
* import { saveAnalytics4 } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Analytics/saveAnalyticsAPI";
|
|
77
77
|
*
|
|
78
78
|
* @param analyticsList
|
|
79
79
|
* @param saveObject
|
|
@@ -3,7 +3,7 @@ import { IFpsSpHttpServiceMIN } from "../../../components/molecules/SpHttp/Sp/IF
|
|
|
3
3
|
/**
|
|
4
4
|
* 2024-12-09: Migrated this function from it's original location here: \components\molecules\process-results\Logging.ts
|
|
5
5
|
*
|
|
6
|
-
* import { saveErrorToLog } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
6
|
+
* import { saveErrorToLog } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Analytics/saveErrorToLog";
|
|
7
7
|
*
|
|
8
8
|
* @param errorInfo
|
|
9
9
|
* @param errorInput
|
|
@@ -4,7 +4,7 @@ import { SecureCDNalyticsWebAbsolute } from "../interfaces/constants";
|
|
|
4
4
|
/**
|
|
5
5
|
* 2024-12-09: Migrated this function from it's original location here: \components\molecules\process-results\Logging.ts
|
|
6
6
|
*
|
|
7
|
-
* import { saveErrorToLog } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
7
|
+
* import { saveErrorToLog } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Analytics/saveErrorToLog";
|
|
8
8
|
*
|
|
9
9
|
* @param errorInfo
|
|
10
10
|
* @param errorInput
|
|
@@ -8,7 +8,7 @@ import { IFpsSpHttpServiceMIN } from '../../../components/molecules/SpHttp/Sp/IF
|
|
|
8
8
|
* 2025-01-03: Migrated from fps-library-v2/lib/pnpjs/Permissions, pnp2/lib/services/sp/perms
|
|
9
9
|
* combination of v2: savePermissionAnalyticsD,
|
|
10
10
|
*
|
|
11
|
-
* import { savePermissionAnalyticsAPI } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
11
|
+
* import { savePermissionAnalyticsAPI } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Permissions/savePermissionAnalyticsAPI";
|
|
12
12
|
*
|
|
13
13
|
*
|
|
14
14
|
* @param analyticsWeb
|
|
@@ -14,7 +14,7 @@ import { makeAbsoluteUrl } from '../../../logic/Strings/getSiteCollectionUrlFrom
|
|
|
14
14
|
* 2025-01-03: Migrated from fps-library-v2/lib/pnpjs/Permissions, pnp2/lib/services/sp/perms
|
|
15
15
|
* combination of v2: savePermissionAnalyticsD,
|
|
16
16
|
*
|
|
17
|
-
* import { savePermissionAnalyticsAPI } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
17
|
+
* import { savePermissionAnalyticsAPI } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Permissions/savePermissionAnalyticsAPI";
|
|
18
18
|
*
|
|
19
19
|
*
|
|
20
20
|
* @param analyticsWeb
|
|
@@ -3,7 +3,7 @@ import { IFpsSpHttpServiceMIN } from '../../../components/molecules/SpHttp/Sp/IF
|
|
|
3
3
|
* 2025-01-03: Migrated from fps-library-v2/lib/pnpjs/Permissions, pnp2/lib/services/sp/perms
|
|
4
4
|
* combination of v2: savePermissionHistoryD, savePermissionAnalyticsD fetchAnalyticsDD
|
|
5
5
|
*
|
|
6
|
-
* import { savePermissionHistory } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
6
|
+
* import { savePermissionHistory } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Permissions/savePermissionHistory";
|
|
7
7
|
*
|
|
8
8
|
*
|
|
9
9
|
* This function is for automatically saving permissions from a web, list or library to list for later comparison.
|
|
@@ -5,7 +5,7 @@ import { getAnalyticsAPI } from '../Analytics/getAnalyticsAPI';
|
|
|
5
5
|
* 2025-01-03: Migrated from fps-library-v2/lib/pnpjs/Permissions, pnp2/lib/services/sp/perms
|
|
6
6
|
* combination of v2: savePermissionHistoryD, savePermissionAnalyticsD fetchAnalyticsDD
|
|
7
7
|
*
|
|
8
|
-
* import { savePermissionHistory } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
8
|
+
* import { savePermissionHistory } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Permissions/savePermissionHistory";
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* This function is for automatically saving permissions from a web, list or library to list for later comparison.
|
|
@@ -17,7 +17,7 @@ import { IFpsSpHttpServiceMIN } from '../../../components/molecules/SpHttp/Sp/IF
|
|
|
17
17
|
* 2025-01-03: Migrated from fps-library-v2/lib/pnpjs/Permissions, pnp2/lib/services/sp/perms
|
|
18
18
|
* combination of v2: saveProvisioningD and pnp2: saveAnalytics4D
|
|
19
19
|
*
|
|
20
|
-
import { saveProvisioning } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
20
|
+
import { saveProvisioning } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Provisioning/saveProvisioning";
|
|
21
21
|
|
|
22
22
|
* @param context : WebPart Context
|
|
23
23
|
* @param analyticsListRailsApply : Which Provisioning was applied => `${ApplyTemplate_Rail_SaveTitle} - v2.0.0.2`
|
|
@@ -16,7 +16,7 @@ import { EasyContentsRailsApply } from '../interfaces/EasyContents';
|
|
|
16
16
|
* 2025-01-03: Migrated from fps-library-v2/lib/pnpjs/Permissions, pnp2/lib/services/sp/perms
|
|
17
17
|
* combination of v2: saveProvisioningD and pnp2: saveAnalytics4D
|
|
18
18
|
*
|
|
19
|
-
import { saveProvisioning } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
19
|
+
import { saveProvisioning } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Provisioning/saveProvisioning";
|
|
20
20
|
|
|
21
21
|
* @param context : WebPart Context
|
|
22
22
|
* @param analyticsListRailsApply : Which Provisioning was applied => `${ApplyTemplate_Rail_SaveTitle} - v2.0.0.2`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Be sure to update your analyticsList and analyticsWeb in en-us.js strings file
|
|
3
3
|
|
|
4
|
-
import { ApplyTemplate_Rail_SaveTitle } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
4
|
+
import { ApplyTemplate_Rail_SaveTitle } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/interfaces/RailConstants";
|
|
5
5
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const ApplyTemplate_Rail_SaveTitle = "Apply Template Rail";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Be sure to update your analyticsList and analyticsWeb in en-us.js strings file
|
|
3
3
|
|
|
4
|
-
import { ApplyTemplate_Rail_SaveTitle } from "@mikezimm/fps-core-v7/lib/restAPIs/
|
|
4
|
+
import { ApplyTemplate_Rail_SaveTitle } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/interfaces/RailConstants";
|
|
5
5
|
|
|
6
6
|
*/
|
|
7
7
|
export const ApplyTemplate_Rail_SaveTitle = 'Apply Template Rail';
|
package/package.json
CHANGED