@mikezimm/fps-library-v2 1.0.184 → 1.0.185
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/CHANGELOG.md +3 -0
- package/lib/components/molecules/RelatedItems/RelatedPropsHelp.d.ts +3 -0
- package/lib/components/molecules/RelatedItems/RelatedPropsHelp.d.ts.map +1 -0
- package/lib/components/molecules/RelatedItems/RelatedPropsHelp.js +92 -0
- package/lib/components/molecules/RelatedItems/RelatedPropsHelp.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,9 @@ npm install @mikezimm/fps-library-v2@1.0.184
|
|
|
11
11
|
|
|
12
12
|
NOTE: TURN BACK ON STRICT NULL CHECKS - turned off for PropPaneCols
|
|
13
13
|
|
|
14
|
+
## 1.0.185 - 2023-May-14: add getWebPartHelpElementRelatedProps
|
|
15
|
+
- add getWebPartHelpElementRelatedProps in src\components\molecules\RelatedItems\RelatedPropsHelp.tsx
|
|
16
|
+
|
|
14
17
|
## 1.0.184 - 2023-May-14: add _doHeadingStyles
|
|
15
18
|
- add _doHeadingStyles to class Interface
|
|
16
19
|
- add _doHeadingStyles default = false to main class
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelatedPropsHelp.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/RelatedItems/RelatedPropsHelp.tsx"],"names":[],"mappings":";AAkCA,wBAAgB,4BAA4B,IAAO,GAAG,CAAC,OAAO,CAsD7D"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
// import ReactJson from "react-json-view";
|
|
3
|
+
import { PivotItem, } from 'office-ui-fabric-react/lib/Pivot';
|
|
4
|
+
import ReactJson from "react-json-view";
|
|
5
|
+
import { HandleBarReplacements } from '../../../logic/Strings/handleBarsContext';
|
|
6
|
+
// import {HandleBarReplacements, } from '../fpsReferences';
|
|
7
|
+
// export function putObjectIntoJSON ( obj: any, name: string = null ): JSX.Element {
|
|
8
|
+
// // return <ReactJson src={ obj } name={ 'panelItem' } collapsed={ true } displayDataTypes={ true } displayObjectSize={ true } enableClipboard={ true } style={{ padding: '20px 0px' }}/>;
|
|
9
|
+
// return <ReactJson src={ obj } name={ name } collapsed={ false } displayDataTypes={ false } displayObjectSize={ false } enableClipboard={ true } style={{ padding: '20px 0px' }} theme= { 'rjv-default' } indentWidth={ 2}/>;
|
|
10
|
+
// }
|
|
11
|
+
/**
|
|
12
|
+
* FPS Slick Sections Notes:
|
|
13
|
+
*
|
|
14
|
+
* ForceWhite does NOT work on collapsible sections.... might at first but if you collapse then expand, no go because web part does not re-apply the classes to the web parts.
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
const SampleRelatedInfoProps = {
|
|
18
|
+
description: 'Standards',
|
|
19
|
+
showItems: true,
|
|
20
|
+
isExpanded: true,
|
|
21
|
+
web: '/sites/financemanual/manual',
|
|
22
|
+
listTitle: 'Site Pages',
|
|
23
|
+
restFilter: 'StandardDocumentsId eq {{PageId}}',
|
|
24
|
+
linkProp: 'File/ServerRelativeUrl',
|
|
25
|
+
displayProp: 'Title',
|
|
26
|
+
itemsStyle: '{ escape( `"fontWeight":600,"color":"yellow"` )}',
|
|
27
|
+
};
|
|
28
|
+
const padRight40 = { paddingRight: '40px' };
|
|
29
|
+
const ReactCSSPropsNote = React.createElement("span", { style: { color: 'darkred', fontWeight: 500 } }, "React.CSSProperties string like (with quotes):");
|
|
30
|
+
export function getWebPartHelpElementRelated() {
|
|
31
|
+
const WebPartHelpElement = React.createElement(PivotItem, { headerText: 'RelatedInfo' },
|
|
32
|
+
React.createElement("div", { className: 'fps-pph-content' },
|
|
33
|
+
React.createElement("div", { className: 'fps-pph-topic' }, "Related Info is a way to show items that are related to this page."),
|
|
34
|
+
React.createElement("div", null,
|
|
35
|
+
React.createElement("li", null,
|
|
36
|
+
React.createElement("b", null, "showItems - "),
|
|
37
|
+
"Enable or Disable this feature"),
|
|
38
|
+
React.createElement("li", null,
|
|
39
|
+
React.createElement("b", null, "description - "),
|
|
40
|
+
"Heading for this feature - clickable to expand/collapse"),
|
|
41
|
+
React.createElement("li", null,
|
|
42
|
+
React.createElement("b", null, "web - "),
|
|
43
|
+
"Server Relative Url of list-item you are relating to"),
|
|
44
|
+
React.createElement("li", null,
|
|
45
|
+
React.createElement("b", null, "listTitle - "),
|
|
46
|
+
"List Title which has the related info"),
|
|
47
|
+
React.createElement("li", null,
|
|
48
|
+
React.createElement("b", null, "restFilter - "),
|
|
49
|
+
"rest based filter - see context-based substitutions below"),
|
|
50
|
+
React.createElement("li", null,
|
|
51
|
+
React.createElement("b", null, "linkProp - "),
|
|
52
|
+
"Static/Internal name of the field with the go-to link. Leave empty to not have it clickable."),
|
|
53
|
+
React.createElement("li", null,
|
|
54
|
+
React.createElement("b", null, "displayProp - "),
|
|
55
|
+
"Static/Internal name of the field with the related info text"),
|
|
56
|
+
React.createElement("li", null,
|
|
57
|
+
React.createElement("b", null, "isExpanded - "),
|
|
58
|
+
"Default state when loading the page"),
|
|
59
|
+
React.createElement("li", null,
|
|
60
|
+
React.createElement("b", null, "itemsStyle - "),
|
|
61
|
+
" ",
|
|
62
|
+
ReactCSSPropsNote,
|
|
63
|
+
" ",
|
|
64
|
+
`"fontWeight":600,"color":"yellow"`,
|
|
65
|
+
" ")),
|
|
66
|
+
React.createElement("div", { style: { display: 'flex', flexDirection: 'row' } },
|
|
67
|
+
React.createElement("div", null,
|
|
68
|
+
React.createElement("div", { className: 'fps-pph-topic' }, "Sample of tested settings."),
|
|
69
|
+
React.createElement(ReactJson, { src: SampleRelatedInfoProps, name: 'Sample Props', collapsed: false, displayDataTypes: false, displayObjectSize: false, enableClipboard: true, style: { padding: '20px 0px' }, theme: 'rjv-default', indentWidth: 2 })),
|
|
70
|
+
React.createElement("div", null,
|
|
71
|
+
React.createElement("h3", null, "This will do the following"),
|
|
72
|
+
React.createElement("ol", null,
|
|
73
|
+
React.createElement("li", null, "showItems == true > enables feature"),
|
|
74
|
+
React.createElement("li", null, "Sets the heading for this section to Standards"),
|
|
75
|
+
React.createElement("li", null, "Sets default visibility to Expanded"),
|
|
76
|
+
React.createElement("li", null, "Gets related info from web: /sites/financemanual/manual"),
|
|
77
|
+
React.createElement("li", null, "Gets related info from Library: Site Pages"),
|
|
78
|
+
React.createElement("li", null,
|
|
79
|
+
"Gets items where the lookup column StandardDocuments has the same value as the current ",
|
|
80
|
+
`site's`,
|
|
81
|
+
" PageId"),
|
|
82
|
+
React.createElement("li", null, "Sets the goto link location as File/ServerRelativeUrl. You could also use a text column for the link or build up a link to anything"),
|
|
83
|
+
React.createElement("li", null, "Sets the display text of the link to the Title of the lookup item")))),
|
|
84
|
+
React.createElement("div", { className: 'fps-pph-topic' }, "Use the following subsitutions to customize restFilters."),
|
|
85
|
+
React.createElement("div", { style: { display: 'flex' } }, Object.keys(HandleBarReplacements).map(key => {
|
|
86
|
+
return React.createElement("div", { key: key, style: padRight40 },
|
|
87
|
+
React.createElement("div", { className: 'fps-pph-topic' }, key),
|
|
88
|
+
React.createElement("ul", null, HandleBarReplacements[key].map((rule) => React.createElement("li", { key: rule }, rule))));
|
|
89
|
+
}))));
|
|
90
|
+
return WebPartHelpElement;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=RelatedPropsHelp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelatedPropsHelp.js","sourceRoot":"","sources":["../../../../src/components/molecules/RelatedItems/RelatedPropsHelp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,2CAA2C;AAC3C,OAAO,EAAG,SAAS,GAAG,MAAM,kCAAkC,CAAC;AAC/D,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,4DAA4D;AAC5D,qFAAqF;AACrF,8LAA8L;AAC9L,iOAAiO;AAC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