@mikezimm/fps-library-v2 2.0.76 → 2.0.77
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/banner/FPSWebPartClass/runSuperOnInit.js +1 -1
- package/lib/banner/FPSWebPartClass/runSuperOnInit.js.map +1 -1
- package/lib/banner/features/Expando/functions.js +1 -1
- package/lib/banner/features/Expando/functions.js.map +1 -1
- package/lib/banner/features/PageStyle/renderCustStyles.d.ts.map +1 -1
- package/lib/banner/features/PageStyle/renderCustStyles.js +1 -1
- package/lib/banner/features/PageStyle/renderCustStyles.js.map +1 -1
- package/lib/banner/features/PageStyle/setAllSectionStyles.js +1 -1
- package/lib/banner/features/PageStyle/setAllSectionStyles.js.map +1 -1
- package/lib/banner/features/PinMe/FPSPinMenu.js +1 -1
- package/lib/banner/features/PinMe/FPSPinMenu.js.map +1 -1
- package/lib/components/molecules/FullPageBackGround/SectionStyles.js +1 -1
- package/lib/components/molecules/FullPageBackGround/SectionStyles.js.map +1 -1
- package/lib/components/molecules/ReactListV1/component/reactListView.js +1 -1
- package/lib/components/molecules/ReactListV1/component/reactListView.js.map +1 -1
- package/lib/logic/DOM/Headings/Interfaces.d.ts +0 -16
- package/lib/logic/DOM/Headings/Interfaces.d.ts.map +1 -1
- package/lib/logic/DOM/Headings/Interfaces.js +31 -16
- package/lib/logic/DOM/Headings/Interfaces.js.map +1 -1
- package/lib/logic/DOM/Headings/functions.d.ts +0 -38
- package/lib/logic/DOM/Headings/functions.d.ts.map +1 -1
- package/lib/logic/DOM/Headings/functions.js +122 -135
- package/lib/logic/DOM/Headings/functions.js.map +1 -1
- package/lib/logic/DOM/Search/domSearch.d.ts +0 -7
- package/lib/logic/DOM/Search/domSearch.d.ts.map +1 -1
- package/lib/logic/DOM/Search/domSearch.js +80 -109
- package/lib/logic/DOM/Search/domSearch.js.map +1 -1
- package/lib/logic/DOM/Search/tagParentSection.d.ts +0 -30
- package/lib/logic/DOM/Search/tagParentSection.d.ts.map +1 -1
- package/lib/logic/DOM/Search/tagParentSection.js +73 -65
- package/lib/logic/DOM/Search/tagParentSection.js.map +1 -1
- package/lib/logic/DOM/Tags/Interfaces.d.ts +0 -36
- package/lib/logic/DOM/Tags/Interfaces.d.ts.map +1 -1
- package/lib/logic/DOM/Tags/Interfaces.js +37 -7
- package/lib/logic/DOM/Tags/Interfaces.js.map +1 -1
- package/lib/logic/DOM/Tags/functions.d.ts +0 -10
- package/lib/logic/DOM/Tags/functions.d.ts.map +1 -1
- package/lib/logic/DOM/Tags/functions.js +46 -44
- package/lib/logic/DOM/Tags/functions.js.map +1 -1
- package/lib/logic/DOM/Tags/regexHtmlTags.d.ts +0 -14
- package/lib/logic/DOM/Tags/regexHtmlTags.d.ts.map +1 -1
- package/lib/logic/DOM/Tags/regexHtmlTags.js +86 -85
- package/lib/logic/DOM/Tags/regexHtmlTags.js.map +1 -1
- package/lib/logic/indexes/DOMHeadings.d.ts +0 -5
- package/lib/logic/indexes/DOMHeadings.d.ts.map +1 -1
- package/lib/logic/indexes/DOMHeadings.js +5 -4
- package/lib/logic/indexes/DOMHeadings.js.map +1 -1
- package/lib/logic/indexes/DOMSearch.d.ts +0 -2
- package/lib/logic/indexes/DOMSearch.d.ts.map +1 -1
- package/lib/logic/indexes/DOMSearch.js +2 -2
- package/lib/logic/indexes/DOMSearch.js.map +1 -1
- package/lib/logic/indexes/DOMTags.d.ts +0 -6
- package/lib/logic/indexes/DOMTags.d.ts.map +1 -1
- package/lib/logic/indexes/DOMTags.js +6 -4
- package/lib/logic/indexes/DOMTags.js.map +1 -1
- package/lib/pnpjs/Logging/RailConstants.d.ts +1 -1
- package/lib/pnpjs/Logging/RailConstants.js +1 -1
- package/lib/pnpjs/Logging/fetch.d.ts +1 -1
- package/lib/pnpjs/Logging/fetch.js +1 -1
- package/lib/pnpjs/Logging/saveAnalytics.d.ts +3 -3
- package/lib/pnpjs/Logging/saveAnalytics.js +3 -3
- package/lib/pnpjs/Logging/saveErrorToLog.d.ts +1 -1
- package/lib/pnpjs/Logging/saveErrorToLog.js +1 -1
- package/lib/pnpjs/Logging/savePermissionAnalytics.d.ts +1 -1
- package/lib/pnpjs/Logging/savePermissionAnalytics.js +1 -1
- package/lib/pnpjs/Logging/savePermissionHistory.d.ts +1 -1
- package/lib/pnpjs/Logging/savePermissionHistory.js +1 -1
- package/lib/pnpjs/Logging/saveProvisioning.d.ts +1 -1
- package/lib/pnpjs/Logging/saveProvisioning.js +1 -1
- package/lib/pnpjs/Users/logic/createISiteUsersInfoObject.d.ts +11 -0
- package/lib/pnpjs/Users/logic/createISiteUsersInfoObject.d.ts.map +1 -1
- package/lib/pnpjs/Users/logic/createISiteUsersInfoObject.js +11 -0
- package/lib/pnpjs/Users/logic/createISiteUsersInfoObject.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,136 +1,123 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { FPSApplyTagCSSAndStyles } from '../Tags/functions';
|
|
7
|
-
import { HTMLRegEx,
|
|
8
|
-
import {
|
|
9
|
-
//
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
ele.style.cssText = cssText;
|
|
126
|
-
}
|
|
127
|
-
classChanges.push(ele.innerHTML);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
const endTime = new Date();
|
|
133
|
-
if (consoleResult)
|
|
134
|
-
console.log('FPSApplyHeadingStyle time to apply styles:', endTime.getTime() - startTime.getTime(), applyTag, cssText, classChanges);
|
|
135
|
-
}
|
|
1
|
+
// /**
|
|
2
|
+
// * CodeAnalizerComment: Updated 1 imports on 2024-09-21 23:07:24
|
|
3
|
+
// * Update:: import { check4This } to '@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch;'
|
|
4
|
+
// */
|
|
5
|
+
// import { IMinHeadingStyleProps, IFPSHeadingClass } from './Interfaces';
|
|
6
|
+
// import { FPSApplyTagCSSAndStyles } from '../Tags/functions';
|
|
7
|
+
// import { HTMLRegEx, } from '../Tags/regexHtmlTags';
|
|
8
|
+
// import { IRegExTag } from '../Tags/Interfaces';
|
|
9
|
+
// import { check4This } from '@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch';
|
|
10
|
+
// // This needs to be moved downstream
|
|
11
|
+
// require('@mikezimm/fps-styles/dist/FPSHeadings.css');
|
|
12
|
+
// /**
|
|
13
|
+
// * Processes web part prop heading props and preps to update h2, h3, h4 tag styles. NOTE SharePoint does not have h1 on the page.
|
|
14
|
+
// * @param wpProps
|
|
15
|
+
// */
|
|
16
|
+
// export function applyHeadingCSS( wpProps: IMinHeadingStyleProps, ): void {
|
|
17
|
+
// if ( check4This( 'skipStyleChanges=true') === true ) { console.log( `skipStyleChanges @ applyHeadingCSS`); return; }
|
|
18
|
+
// runStyleOnTags( wpProps.h1Style, HTMLRegEx.h2 );
|
|
19
|
+
// runStyleOnTags( wpProps.h2Style, HTMLRegEx.h3 );
|
|
20
|
+
// runStyleOnTags( wpProps.h3Style, HTMLRegEx.h4 );
|
|
21
|
+
// addTableStyles( wpProps.tabelTdStyle, );
|
|
22
|
+
// }
|
|
23
|
+
// /**
|
|
24
|
+
// * Takes a web part property string and breaks it into classes and raw css and then applies it to tags.
|
|
25
|
+
// * @param tagStyle
|
|
26
|
+
// * @param regTag
|
|
27
|
+
// * @returns
|
|
28
|
+
// */
|
|
29
|
+
// export function runStyleOnTags( tagStyle: string, regTag: IRegExTag ) : void {
|
|
30
|
+
// const { classes, cssStyles } = getClassStyles( tagStyle );
|
|
31
|
+
// if ( cssStyles.length > 0 || classes.length > 0 ) FPSApplyTagCSSAndStyles( regTag as IRegExTag, cssStyles.join( ';' ) , classes, true, false, );
|
|
32
|
+
// return;
|
|
33
|
+
// }
|
|
34
|
+
// /**
|
|
35
|
+
// * adds table classes to canvas Tables and updates cell styling
|
|
36
|
+
// * @param tabelTdStyle
|
|
37
|
+
// */
|
|
38
|
+
// export function addTableStyles( tabelTdStyle: string ): void {
|
|
39
|
+
// const { classes, cssStyles } = getClassStyles( tabelTdStyle );
|
|
40
|
+
// let tableEles = Array.from(document.getElementsByClassName(`canvasRteResponsiveTable`));
|
|
41
|
+
// tableEles.map( ele => {
|
|
42
|
+
// classes.map( classX => {
|
|
43
|
+
// if (!ele.classList.contains(classX)) {
|
|
44
|
+
// ele.classList.add(classX);
|
|
45
|
+
// }
|
|
46
|
+
// });
|
|
47
|
+
// });
|
|
48
|
+
// if ( cssStyles.length > 0 || classes.length > 0 ) FPSApplyTagCSSAndStyles( HTMLRegEx.td as IRegExTag, cssStyles.join( ';' ) , [], true, false, );
|
|
49
|
+
// }
|
|
50
|
+
// export interface IFPSClassesAndStyles { classes: IFPSHeadingClass[], cssStyles: string[] }
|
|
51
|
+
// export function getClassStyles( tagStyle: string ): IFPSClassesAndStyles {
|
|
52
|
+
// let classes: IFPSHeadingClass[] = [];
|
|
53
|
+
// let cssStyles: string[] = [];
|
|
54
|
+
// if ( tagStyle ) {
|
|
55
|
+
// let pieces = tagStyle.split(';');
|
|
56
|
+
// pieces.map( ( piece: string ) => {
|
|
57
|
+
// piece = piece.trim();
|
|
58
|
+
// if ( piece.indexOf('.') === 0 ) { classes.push( piece.replace('.','') as IFPSHeadingClass ) ; } else { cssStyles.push( piece ) ; }
|
|
59
|
+
// });
|
|
60
|
+
// }
|
|
61
|
+
// return { classes: classes, cssStyles: cssStyles };
|
|
62
|
+
// }
|
|
63
|
+
// /**
|
|
64
|
+
// * This actually Applies CSS to html page headings h2, h3, h4 per web part props. NOTE SharePoint does not have h1 on the page.
|
|
65
|
+
// * @param applyTag
|
|
66
|
+
// * @param applyClass
|
|
67
|
+
// * @param alertError
|
|
68
|
+
// * @param consoleResult
|
|
69
|
+
// */
|
|
70
|
+
// export function FPSApplyHeadingCSS ( applyTag: IRegExTag, applyClass : IFPSHeadingClass[], alertError: boolean = true, consoleResult: boolean = false ): void {
|
|
71
|
+
// const startTime = new Date();
|
|
72
|
+
// let classChanges: any[] = [];
|
|
73
|
+
// // 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
|
|
74
|
+
// for (let iteration = 0; iteration < 1; iteration++) {
|
|
75
|
+
// //Loop through all the tags to find
|
|
76
|
+
// applyTag.tags.map( tag => {
|
|
77
|
+
// //Get all elements with this tag
|
|
78
|
+
// let nodeList = document.getElementsByTagName( tag );
|
|
79
|
+
// if ( consoleResult && iteration === 0 ) console.log( 'FPSApplyHeadingCSS found Elements:', tag, nodeList );
|
|
80
|
+
// //Loop through all elements for this tag
|
|
81
|
+
// if ( nodeList && nodeList.length > 0 ) {
|
|
82
|
+
// for (let i = 0; i < nodeList.length; i++) {
|
|
83
|
+
// const ele = nodeList[i];
|
|
84
|
+
// classChanges.push( ele.innerHTML );
|
|
85
|
+
// applyClass.map( thisClass => {
|
|
86
|
+
// if ( !ele.classList.contains( thisClass ) ) {
|
|
87
|
+
// ele.classList.add( thisClass ) ;
|
|
88
|
+
// }
|
|
89
|
+
// });
|
|
90
|
+
// }
|
|
91
|
+
// }
|
|
92
|
+
// });
|
|
93
|
+
// }
|
|
94
|
+
// const endTime = new Date();
|
|
95
|
+
// if ( consoleResult ) console.log('FPSApplyHeadingCSS time to apply styles:', endTime.getTime() - startTime.getTime() , applyTag, applyClass );
|
|
96
|
+
// }
|
|
97
|
+
// export function FPSApplyHeadingStyle ( applyTag: IRegExTag, cssText : string, alertError: boolean = true, consoleResult: boolean = false ): void {
|
|
98
|
+
// const startTime = new Date();
|
|
99
|
+
// let classChanges: any[] = [];
|
|
100
|
+
// for (let iteration = 0; iteration < 1; iteration++) {
|
|
101
|
+
// //Loop through all the tags to find
|
|
102
|
+
// applyTag.tags.map( tag => {
|
|
103
|
+
// //Get all elements with this tag
|
|
104
|
+
// let nodeList = document.getElementsByTagName( tag );
|
|
105
|
+
// if ( consoleResult && iteration === 0 ) console.log( 'FPSApplyHeadingCSS found Elements:', tag, nodeList );
|
|
106
|
+
// //Loop through all elements for this tag
|
|
107
|
+
// if ( nodeList && nodeList.length > 0 ) {
|
|
108
|
+
// for (let i = 0; i < nodeList.length; i++) {
|
|
109
|
+
// const ele: any = nodeList[i];
|
|
110
|
+
// if ( ele.style ) {
|
|
111
|
+
// ele.style.cssText += cssText;
|
|
112
|
+
// } else {
|
|
113
|
+
// ele.style.cssText = cssText;
|
|
114
|
+
// }
|
|
115
|
+
// classChanges.push( ele.innerHTML );
|
|
116
|
+
// }
|
|
117
|
+
// }
|
|
118
|
+
// });
|
|
119
|
+
// }
|
|
120
|
+
// const endTime = new Date();
|
|
121
|
+
// if ( consoleResult ) console.log('FPSApplyHeadingStyle time to apply styles:', endTime.getTime() - startTime.getTime() , applyTag, cssText, classChanges );
|
|
122
|
+
// }
|
|
136
123
|
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../src/logic/DOM/Headings/functions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../src/logic/DOM/Headings/functions.ts"],"names":[],"mappings":"AAAA,MAAM;AACN,mEAAmE;AACnE,4FAA4F;AAE5F,MAAM;AAEN,0EAA0E;AAC1E,+DAA+D;AAC/D,uDAAuD;AACvD,kDAAkD;AAClD,kFAAkF;AAElF,uCAAuC;AACvC,wDAAwD;AAExD,MAAM;AACN,qIAAqI;AACrI,oBAAoB;AACpB,MAAM;AACN,8EAA8E;AAC9E,yHAAyH;AACzH,qDAAqD;AACrD,qDAAqD;AACrD,qDAAqD;AACrD,6CAA6C;AAC7C,IAAI;AAEJ,MAAM;AACN,0GAA0G;AAC1G,qBAAqB;AACrB,mBAAmB;AACnB,cAAc;AACd,MAAM;AACN,iFAAiF;AACjF,+DAA+D;AAC/D,qJAAqJ;AACrJ,YAAY;AACZ,IAAI;AAEJ,MAAM;AACN,kEAAkE;AAClE,yBAAyB;AACzB,MAAM;AACN,iEAAiE;AAEjE,mEAAmE;AAEnE,6FAA6F;AAC7F,4BAA4B;AAC5B,+BAA+B;AAC/B,+CAA+C;AAC/C,qCAAqC;AACrC,UAAU;AACV,UAAU;AACV,QAAQ;AACR,sJAAsJ;AACtJ,IAAI;AAEJ,6FAA6F;AAC7F,6EAA6E;AAC7E,0CAA0C;AAC1C,kCAAkC;AAElC,sBAAsB;AACtB,wCAAwC;AACxC,yCAAyC;AACzC,8BAA8B;AAC9B,2IAA2I;AAC3I,UAAU;AACV,MAAM;AAEN,uDAAuD;AACvD,IAAI;AAGJ,QAAQ;AACR,mIAAmI;AACnI,qBAAqB;AACrB,uBAAuB;AACvB,uBAAuB;AACvB,0BAA0B;AAC1B,MAAM;AAEN,mKAAmK;AACnK,kCAAkC;AAClC,kCAAkC;AAElC,4KAA4K;AAC5K,0DAA0D;AAE1D,0CAA0C;AAC1C,kCAAkC;AAElC,yCAAyC;AACzC,6DAA6D;AAC7D,oHAAoH;AAEpH,iDAAiD;AACjD,iDAAiD;AACjD,sDAAsD;AACtD,qCAAqC;AACrC,gDAAgD;AAChD,4CAA4C;AAC5C,6DAA6D;AAC7D,iDAAiD;AACjD,gBAAgB;AAChB,gBAAgB;AAChB,YAAY;AACZ,UAAU;AACV,UAAU;AACV,MAAM;AAEN,gCAAgC;AAChC,mJAAmJ;AAEnJ,IAAI;AAEJ,qJAAqJ;AACrJ,kCAAkC;AAClC,kCAAkC;AAElC,0DAA0D;AAE1D,0CAA0C;AAC1C,kCAAkC;AAElC,yCAAyC;AACzC,6DAA6D;AAC7D,oHAAoH;AAEpH,iDAAiD;AACjD,iDAAiD;AACjD,sDAAsD;AACtD,0CAA0C;AAC1C,+BAA+B;AAC/B,4CAA4C;AAC5C,qBAAqB;AACrB,2CAA2C;AAC3C,cAAc;AACd,gDAAgD;AAChD,YAAY;AACZ,UAAU;AACV,UAAU;AACV,MAAM;AAEN,gCAAgC;AAChC,gKAAgK;AAEhK,IAAI"}
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CodeAnalizerComment: Updated 1 imports on 2024-09-21 23:07:24
|
|
3
|
-
* Update:: import { check4This } to '@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch;'
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
export declare function findParentElementLikeThis(e: any, prop: string, value: string, maxHops: number, search: 'begins' | 'ends' | 'contains' | 'exact', alertError?: boolean, consoleResult?: boolean): any;
|
|
7
|
-
export declare function findParentElementPropLikeThis(e: any, prop: string, value: string, maxHops: number, search: 'begins' | 'ends' | 'contains' | 'exact'): any;
|
|
8
1
|
//# sourceMappingURL=domSearch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domSearch.d.ts","sourceRoot":"","sources":["../../../../src/logic/DOM/Search/domSearch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"domSearch.d.ts","sourceRoot":"","sources":["../../../../src/logic/DOM/Search/domSearch.ts"],"names":[],"mappings":""}
|
|
@@ -1,110 +1,81 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
if (found === false) {
|
|
83
|
-
checkElement = checkElement['parentElement'];
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
if (found === false && alertError === true) {
|
|
88
|
-
alert('findParentElementPropLikeThis: Could not find parent element - see console.');
|
|
89
|
-
console.log('findParentElementPropLikeThis: found, prop, value, foundHops, maxHops, search', found, prop, value, foundHops, maxHops, search);
|
|
90
|
-
}
|
|
91
|
-
if (consoleResult === true) {
|
|
92
|
-
if (check4This(`fpsDomSearch`) === true)
|
|
93
|
-
console.log('findParentElementPropLikeThis: found, prop, value, foundHops, maxHops, search', found, prop, value, foundHops, maxHops, search);
|
|
94
|
-
}
|
|
95
|
-
return result;
|
|
96
|
-
}
|
|
97
|
-
export function findParentElementPropLikeThis(e, prop, value, maxHops, search) {
|
|
98
|
-
let result = findParentElementLikeThis(e, prop, value, maxHops, search);
|
|
99
|
-
let found = result === null ? false : true;
|
|
100
|
-
let propResult = result !== null ? result[prop] : result;
|
|
101
|
-
if (found === false) {
|
|
102
|
-
alert('findParentElementPropLikeThis: Could not find parent element - see console.');
|
|
103
|
-
console.log('findParentElementPropLikeThis: Did not find: prop', prop);
|
|
104
|
-
console.log('findParentElementPropLikeThis: Did not find: value', result[prop]);
|
|
105
|
-
console.log('findParentElementPropLikeThis: Did not find: maxHops', maxHops);
|
|
106
|
-
console.log('findParentElementPropLikeThis: Did not find: search', search);
|
|
107
|
-
}
|
|
108
|
-
return propResult;
|
|
109
|
-
}
|
|
1
|
+
// /**
|
|
2
|
+
// * CodeAnalizerComment: Updated 1 imports on 2024-09-21 23:07:24
|
|
3
|
+
// * Update:: import { check4This } to '@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch;'
|
|
4
|
+
// */
|
|
5
|
+
// /**
|
|
6
|
+
// * This was originally copied from PivotTiles basicElements.tsx file
|
|
7
|
+
// *
|
|
8
|
+
// * Use like this: let thisID = findParentElementPropLikeThis(e.target, 'id', 'ButtonID', 5, 'begins');
|
|
9
|
+
// * Will find element where id begins wtih ButtonID up to 5 parents up.
|
|
10
|
+
// * @param e
|
|
11
|
+
// * @param prop
|
|
12
|
+
// * @param value
|
|
13
|
+
// * @param maxHops
|
|
14
|
+
// * @param search
|
|
15
|
+
// * @param alertError //Alert on error or not found
|
|
16
|
+
// * @param consoleResult //Console log result element
|
|
17
|
+
// *
|
|
18
|
+
// */
|
|
19
|
+
// import { check4This } from '@mikezimm/fps-core-v7/lib/logic/Links/CheckSearch';
|
|
20
|
+
// export function findParentElementLikeThis( e: any, prop: string, value: string, maxHops: number, search: 'begins' | 'ends' | 'contains' | 'exact', alertError: boolean = true, consoleResult: boolean = true ) {
|
|
21
|
+
// let result : any = null;
|
|
22
|
+
// let checkElement: any = e['parentElement'];
|
|
23
|
+
// let found = false;
|
|
24
|
+
// let foundHops = 0;
|
|
25
|
+
// for (let i = 0; i < maxHops ; i++) {
|
|
26
|
+
// if ( found === false ) {
|
|
27
|
+
// if ( checkElement[prop] ) {
|
|
28
|
+
// foundHops ++;
|
|
29
|
+
// let parentProp = prop === 'classList' ? checkElement['className'].split(' ') : checkElement[prop];
|
|
30
|
+
// if ( parentProp ) {
|
|
31
|
+
// if ( prop.toLowerCase() === 'classlist' ) {
|
|
32
|
+
// parentProp = JSON.parse(JSON.stringify(parentProp));
|
|
33
|
+
// if ( search === 'contains' ) {
|
|
34
|
+
// if ( parentProp.indexOf( value ) > - 1 ) {
|
|
35
|
+
// result = checkElement;
|
|
36
|
+
// found = true;
|
|
37
|
+
// }
|
|
38
|
+
// } else if ( search === 'begins' ) {
|
|
39
|
+
// if ( parentProp.indexOf( value ) === 0 ) { result = checkElement; found = true; }
|
|
40
|
+
// } else if ( search === 'ends' ) {
|
|
41
|
+
// if ( parentProp.indexOf( value ) === parentProp.length -1 ) { result = checkElement; found = true; }
|
|
42
|
+
// } else if ( search === 'exact' ) {
|
|
43
|
+
// if ( checkElement['className'] === value ) { result = checkElement; found = true; }
|
|
44
|
+
// }
|
|
45
|
+
// } else if ( search === 'begins' ) {
|
|
46
|
+
// if ( parentProp.indexOf(value) === 0 ) { result = checkElement; found = true; }
|
|
47
|
+
// } else if ( search === 'ends' ) {
|
|
48
|
+
// alert('findParentElementPropLikeThis: Error - feature not yet avaialble!');
|
|
49
|
+
// } else if ( search === 'contains' ) {
|
|
50
|
+
// if ( parentProp.indexOf(value) > -1 ) { result = checkElement; found = true; }
|
|
51
|
+
// } else if ( search === 'exact' ) {
|
|
52
|
+
// if ( parentProp === value ) { result = checkElement; found = true; }
|
|
53
|
+
// }
|
|
54
|
+
// }
|
|
55
|
+
// }
|
|
56
|
+
// if ( found === false ) { checkElement = checkElement['parentElement'] ; }
|
|
57
|
+
// }
|
|
58
|
+
// }
|
|
59
|
+
// if ( found === false && alertError === true ) {
|
|
60
|
+
// alert('findParentElementPropLikeThis: Could not find parent element - see console.');
|
|
61
|
+
// console.log('findParentElementPropLikeThis: found, prop, value, foundHops, maxHops, search', found, prop, value, foundHops, maxHops, search );
|
|
62
|
+
// }
|
|
63
|
+
// if ( consoleResult === true ) {
|
|
64
|
+
// if ( check4This(`fpsDomSearch`) === true ) console.log('findParentElementPropLikeThis: found, prop, value, foundHops, maxHops, search', found, prop, value, foundHops, maxHops, search );
|
|
65
|
+
// }
|
|
66
|
+
// return result;
|
|
67
|
+
// }
|
|
68
|
+
// export function findParentElementPropLikeThis( e: any, prop: string, value: string, maxHops: number, search: 'begins' | 'ends' | 'contains' | 'exact' ) {
|
|
69
|
+
// let result : any = findParentElementLikeThis( e, prop, value, maxHops, search);
|
|
70
|
+
// let found = result === null ? false : true;
|
|
71
|
+
// let propResult = result !== null ? result[prop] : result ;
|
|
72
|
+
// if ( found === false ) {
|
|
73
|
+
// alert('findParentElementPropLikeThis: Could not find parent element - see console.');
|
|
74
|
+
// console.log('findParentElementPropLikeThis: Did not find: prop', prop, );
|
|
75
|
+
// console.log('findParentElementPropLikeThis: Did not find: value', result[prop] );
|
|
76
|
+
// console.log('findParentElementPropLikeThis: Did not find: maxHops', maxHops );
|
|
77
|
+
// console.log('findParentElementPropLikeThis: Did not find: search', search );
|
|
78
|
+
// }
|
|
79
|
+
// return propResult;
|
|
80
|
+
// }
|
|
110
81
|
//# sourceMappingURL=domSearch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domSearch.js","sourceRoot":"","sources":["../../../../src/logic/DOM/Search/domSearch.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"domSearch.js","sourceRoot":"","sources":["../../../../src/logic/DOM/Search/domSearch.ts"],"names":[],"mappings":"AAAA,MAAM;AACN,mEAAmE;AACnE,4FAA4F;AAE5F,MAAM;AAKN,QAAQ;AACR,yEAAyE;AACzE,OAAO;AACP,4GAA4G;AAC5G,8EAA8E;AAC9E,gBAAgB;AAChB,mBAAmB;AACnB,oBAAoB;AACpB,sBAAsB;AACtB,qBAAqB;AACrB,wDAAwD;AACxD,yDAAyD;AACzD,OAAO;AACP,QAAQ;AACR,oFAAoF;AAEpF,qNAAqN;AAErN,+BAA+B;AAC/B,kDAAkD;AAClD,yBAAyB;AACzB,yBAAyB;AAEzB,2CAA2C;AAE3C,iCAAiC;AAEjC,sCAAsC;AACtC,0BAA0B;AAC1B,+GAA+G;AAE/G,gCAAgC;AAChC,0DAA0D;AAC1D,qEAAqE;AACrE,+CAA+C;AAC/C,8DAA8D;AAC9D,2CAA2C;AAC3C,kCAAkC;AAClC,oBAAoB;AAEpB,oDAAoD;AACpD,qGAAqG;AAErG,kDAAkD;AAClD,wHAAwH;AAExH,mDAAmD;AACnD,sGAAsG;AACtG,kBAAkB;AAElB,kDAAkD;AAClD,iGAAiG;AAEjG,gDAAgD;AAChD,6FAA6F;AAE7F,oDAAoD;AACpD,gGAAgG;AAEhG,iDAAiD;AACjD,sFAAsF;AAEtF,gBAAgB;AAEhB,cAAc;AAEd,YAAY;AAEZ,oFAAoF;AAEpF,UAAU;AAEV,QAAQ;AAER,sDAAsD;AACtD,+FAA+F;AAC/F,uJAAuJ;AAEvJ,QAAQ;AACR,sCAAsC;AACtC,kMAAkM;AAClM,QAAQ;AAER,mBAAmB;AAEnB,MAAM;AAEN,8JAA8J;AAE9J,sFAAsF;AACtF,kDAAkD;AAElD,iEAAiE;AAEjE,+BAA+B;AAC/B,+FAA+F;AAC/F,kFAAkF;AAClF,0FAA0F;AAC1F,uFAAuF;AACvF,qFAAqF;AACrF,QAAQ;AAER,uBAAuB;AAEvB,MAAM"}
|
|
@@ -1,31 +1 @@
|
|
|
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
1
|
//# sourceMappingURL=tagParentSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagParentSection.d.ts","sourceRoot":"","sources":["../../../../src/logic/DOM/Search/tagParentSection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tagParentSection.d.ts","sourceRoot":"","sources":["../../../../src/logic/DOM/Search/tagParentSection.ts"],"names":[],"mappings":""}
|