@mikezimm/fps-core-v7 1.0.15 → 1.0.16
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/logic/Strings/handleBarsContext.d.ts +24 -0
- package/lib/logic/Strings/handleBarsContext.d.ts.map +1 -1
- package/lib/logic/Strings/handleBarsContext.js +58 -63
- package/lib/logic/Strings/handleBarsContext.js.map +1 -1
- package/lib/types/@msft/1.17.3/sp-property-pane.d.ts +67 -0
- package/lib/types/@msft/1.17.3/sp-property-pane.d.ts.map +1 -0
- package/lib/types/@msft/1.17.3/sp-property-pane.js +7 -0
- package/lib/types/@msft/1.17.3/sp-property-pane.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeAnalizerComment: Updated 1 imports on 2024-09-21 23:07:24
|
|
3
|
+
* Update:: import { WebPartContextCopy_15_2 } to '@mikezimm/fps-core-v7/lib/types/@msft/1.15.2/WebPartContext;'
|
|
4
|
+
|
|
5
|
+
*/
|
|
6
|
+
import { WebPartContextCopy_15_2 } from "../../types/@msft/1.15.2/WebPartContext";
|
|
7
|
+
export interface IHandleBarReplacements {
|
|
8
|
+
Pages: string[];
|
|
9
|
+
Lists: string[];
|
|
10
|
+
Users: string[];
|
|
11
|
+
Webs: string[];
|
|
12
|
+
Sites: string[];
|
|
13
|
+
}
|
|
14
|
+
export declare const HandleBarReplacements: IHandleBarReplacements;
|
|
15
|
+
/**
|
|
16
|
+
* Replaces HandleBar style strings with known replacements from context
|
|
17
|
+
*
|
|
18
|
+
* Used first in PageInfo converting web part prop input in relatedItems heading, web, ListTitle and restFilter
|
|
19
|
+
*
|
|
20
|
+
* @param str
|
|
21
|
+
* @param context
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
export declare function replaceHandleBars(str: string, context: WebPartContextCopy_15_2): string;
|
|
1
25
|
//# sourceMappingURL=handleBarsContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleBarsContext.d.ts","sourceRoot":"","sources":["../../../src/logic/Strings/handleBarsContext.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"handleBarsContext.d.ts","sourceRoot":"","sources":["../../../src/logic/Strings/handleBarsContext.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,MAAM,WAAW,sBAAsB;IAErC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;CAEjB;AAED,eAAO,MAAM,qBAAqB,EAAG,sBAQpC,CAAA;AAED;;;;;;;;GAQG;AAGH,wBAAgB,iBAAiB,CAAE,GAAG,EAAE,MAAM,EAAG,OAAO,EAAE,uBAAuB,GAAI,MAAM,CA4C1F"}
|
|
@@ -1,64 +1,59 @@
|
|
|
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
|
-
// newStr = newStr.replace( /{{Today}}/gi , `${ now.toLocaleDateString() }` );
|
|
60
|
-
// return newStr;
|
|
61
|
-
// }
|
|
62
|
-
// }
|
|
63
|
-
// }
|
|
1
|
+
/**
|
|
2
|
+
* CodeAnalizerComment: Updated 1 imports on 2024-09-21 23:07:24
|
|
3
|
+
* Update:: import { WebPartContextCopy_15_2 } to '@mikezimm/fps-core-v7/lib/types/@msft/1.15.2/WebPartContext;'
|
|
4
|
+
|
|
5
|
+
*/
|
|
6
|
+
export const HandleBarReplacements = {
|
|
7
|
+
Pages: ['{{PageId}}'],
|
|
8
|
+
Lists: ['{{ListTitle}}', '{{ListId}}', '{{ListUrl}}'],
|
|
9
|
+
Users: ['{{UserName}}', '{{UserLogin}}', '{{UserEmail}}'],
|
|
10
|
+
Webs: ['{{WebTitle}}', '{{WebUrl}}', '{{SiteId}}'],
|
|
11
|
+
Sites: ['{{SiteTitle}}', '{{SiteUrl}}', '{{SiteId}}'],
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Replaces HandleBar style strings with known replacements from context
|
|
15
|
+
*
|
|
16
|
+
* Used first in PageInfo converting web part prop input in relatedItems heading, web, ListTitle and restFilter
|
|
17
|
+
*
|
|
18
|
+
* @param str
|
|
19
|
+
* @param context
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
export function replaceHandleBars(str, context) {
|
|
23
|
+
if (!str) {
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
if (str.indexOf('{{') === -1 || str.indexOf('}}') === -1) {
|
|
28
|
+
return str;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
let newStr = str.replace(/{{PageId}}/gi, `${context.pageContext.listItem ? context.pageContext.listItem.id.toFixed() : '{{PageId}}'}`);
|
|
32
|
+
if (str.indexOf('{{List') > -1) {
|
|
33
|
+
newStr = newStr.replace(/{{ListTitle}}/gi, `${context.pageContext.list ? context.pageContext.list.title : '{{ListTitle}}'}`);
|
|
34
|
+
newStr = newStr.replace(/{{ListId}}/gi, `${context.pageContext.list ? context.pageContext.list.id : '{{ListId}}'}`);
|
|
35
|
+
newStr = newStr.replace(/{{ListUrl}}/gi, `${context.pageContext.list ? context.pageContext.list.serverRelativeUrl : '{{ListUrl}}'}`);
|
|
36
|
+
}
|
|
37
|
+
if (str.indexOf('{{User') > -1) {
|
|
38
|
+
newStr = newStr.replace(/{{UserName}}/gi, `${context.pageContext.user.displayName}`);
|
|
39
|
+
newStr = newStr.replace(/{{UserLogin}}/gi, `${context.pageContext.user.loginName}`);
|
|
40
|
+
newStr = newStr.replace(/{{UserEmail}}/gi, `${context.pageContext.user.email}`);
|
|
41
|
+
}
|
|
42
|
+
if (str.indexOf('{{Web') > -1) {
|
|
43
|
+
newStr = newStr.replace(/{{WebTitle}}/gi, `${context.pageContext.web.title}`);
|
|
44
|
+
newStr = newStr.replace(/{{WebUrl}}/gi, `${context.pageContext.web.serverRelativeUrl}`);
|
|
45
|
+
newStr = newStr.replace(/{{WebId}}/gi, `${context.pageContext.web.id}`);
|
|
46
|
+
}
|
|
47
|
+
if (str.indexOf('{{Site') > -1) {
|
|
48
|
+
newStr = newStr.replace(/{{SiteTitle}}/gi, `${context.pageContext.web.title}`);
|
|
49
|
+
newStr = newStr.replace(/{{SiteUrl}}/gi, `${context.pageContext.web.serverRelativeUrl}`);
|
|
50
|
+
newStr = newStr.replace(/{{SiteId}}/gi, `${context.pageContext.web.id}`);
|
|
51
|
+
}
|
|
52
|
+
let now = new Date();
|
|
53
|
+
newStr = newStr.replace(/{{Now}}/gi, `${now.toLocaleString()}`);
|
|
54
|
+
newStr = newStr.replace(/{{Today}}/gi, `${now.toLocaleDateString()}`);
|
|
55
|
+
return newStr;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
64
59
|
//# sourceMappingURL=handleBarsContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleBarsContext.js","sourceRoot":"","sources":["../../../src/logic/Strings/handleBarsContext.ts"],"names":[],"mappings":"AAAA,MAAM
|
|
1
|
+
{"version":3,"file":"handleBarsContext.js","sourceRoot":"","sources":["../../../src/logic/Strings/handleBarsContext.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH,MAAM,CAAC,MAAM,qBAAqB,GAA4B;IAE1D,KAAK,EAAE,CAAE,YAAY,CAAE;IACvB,KAAK,EAAE,CAAE,eAAe,EAAE,YAAY,EAAE,aAAa,CAAE;IACvD,KAAK,EAAE,CAAE,cAAc,EAAE,eAAe,EAAE,eAAe,CAAE;IAC3D,IAAI,EAAE,CAAE,cAAc,EAAE,YAAY,EAAE,YAAY,CAAE;IACpD,KAAK,EAAE,CAAE,eAAe,EAAE,aAAa,EAAE,YAAY,CAAE;CAE1D,CAAA;AAED;;;;;;;;GAQG;AAGH,MAAM,UAAU,iBAAiB,CAAE,GAAW,EAAG,OAAgC;IAE7E,IAAK,CAAC,GAAG,EAAG;QAAE,OAAO,EAAE,CAAE;KAAE;SAAM;QAE/B,IAAK,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAG;YAC1D,OAAO,GAAG,CAAC;SAEZ;aAAM;YAEL,IAAI,MAAM,GAAG,GAAG,CAAC,OAAO,CAAE,cAAc,EAAG,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,CAAE,CAAC;YAE1I,IAAK,GAAG,CAAC,OAAO,CAAC,QAAQ,CA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ertyPanePage {
|
|
8
|
+
/**
|
|
9
|
+
* Indicates whether the groups on the PropertyPanePage are displayed as accordion or not.
|
|
10
|
+
*/
|
|
11
|
+
displayGroupsAsAccordion?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* PropertyPane page header.
|
|
14
|
+
*/
|
|
15
|
+
header?: IPropertyPanePageHeader;
|
|
16
|
+
/**
|
|
17
|
+
* List of groups to be displayed on the PropertyPane page.
|
|
18
|
+
*/
|
|
19
|
+
groups: (IPropertyPaneGroup | IPropertyPaneConditionalGroup)[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* PropertyPane header.
|
|
23
|
+
* This header remains same for all the pages.
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export declare interface IPropertyPanePageHeader {
|
|
28
|
+
/**
|
|
29
|
+
* Header to display.
|
|
30
|
+
*/
|
|
31
|
+
description: string;
|
|
32
|
+
/**
|
|
33
|
+
* Image url for the background image.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated This property is not used.
|
|
36
|
+
*/
|
|
37
|
+
image?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Property pane conditional group.
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export declare interface IPropertyPaneConditionalGroup {
|
|
45
|
+
/**
|
|
46
|
+
* Primary group to show
|
|
47
|
+
*/
|
|
48
|
+
primaryGroup: IPropertyPaneGroup;
|
|
49
|
+
/**
|
|
50
|
+
* Secondary group to show
|
|
51
|
+
*/
|
|
52
|
+
secondaryGroup: IPropertyPaneGroup;
|
|
53
|
+
/**
|
|
54
|
+
* Indicating whether the property pane should show primary group or
|
|
55
|
+
* the secondary group.
|
|
56
|
+
*/
|
|
57
|
+
showSecondaryGroup: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Callback when user clicks to show primary group.
|
|
60
|
+
*/
|
|
61
|
+
onShowPrimaryGroup?: () => void;
|
|
62
|
+
/**
|
|
63
|
+
* Callback when user clicks to show secondary group.
|
|
64
|
+
*/
|
|
65
|
+
onShowSecondaryGroup?: () => void;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=sp-property-pane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sp-property-pane.d.ts","sourceRoot":"","sources":["../../../../src/types/@msft/1.17.3/sp-property-pane.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACxC;;OAEG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC;;OAEG;IACH,MAAM,EAAE,CAAC,kBAAkB,GAAG,6BAA6B,CAAC,EAAE,CAAC;CAGhE;AAED;;;;;EAKE;AAEF,MAAM,CAAC,OAAO,WAAW,uBAAuB;IAC9C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID;;;;GAIG;AAEH,MAAM,CAAC,OAAO,WAAW,6BAA6B;IACpD;;OAEG;IACH,YAAY,EAAE,kBAAkB,CAAC;IACjC;;OAEG;IACH,cAAc,EAAE,kBAAkB,CAAC;IACnC;;;OAGG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sp-property-pane.js","sourceRoot":"","sources":["../../../../src/types/@msft/1.17.3/sp-property-pane.ts"],"names":[],"mappings":"AACA;;;;GAIG"}
|
package/package.json
CHANGED