Added jsonValue
This commit is contained in:
parent
5aa9a4cc64
commit
ff1db62ed7
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"@microsoft/generator-sharepoint": {
|
||||
"version": "1.10.0",
|
||||
"version": "1.11.0",
|
||||
"libraryName": "react-content-query",
|
||||
"libraryId": "489c9f8f-8e66-4efb-8365-85279ba91433",
|
||||
"environment": "spo",
|
||||
|
|
|
@ -12,7 +12,7 @@ While the original web part was based on an **XSLT** templating engine, this *Re
|
|||
|
||||
## Used SharePoint Framework Version
|
||||
|
||||
![1.10.0](https://img.shields.io/badge/drop-1.10.0-green.svg)
|
||||
![1.11.0](https://img.shields.io/badge/drop-1.11.0-green.svg)
|
||||
|
||||
## Applies to
|
||||
|
||||
|
@ -28,7 +28,6 @@ react-content-query-web part (Online)|Hugo Bernier ([Tahoe Ninjas](http://tahoen
|
|||
react-content-query-web part (Online)|Paolo Pialorsi ([PiaSys.com](https://piasys.com/), [@PaoloPia](https://twitter.com/PaoloPia?s=20))
|
||||
react-content-query-web part |Simon-Pierre Plante
|
||||
react-content-query-web part (Online)|Abderahman Moujahid
|
||||
|
||||
## Version history
|
||||
|
||||
Version|Date|Comments
|
||||
|
@ -36,7 +35,7 @@ Version|Date|Comments
|
|||
1.0.0|May 04, 2017|Initial release
|
||||
1.0.1|July 23rd 15, 2017|Updated to GA Version
|
||||
1.0.3|August 12, 2017|Added external scripts functionality
|
||||
1.0.4|August 31, 2017|Fixed a bug where tenant sites/subsites were missing from the **Web Url** dropdown
|
||||
1.0.4|August 31, 2017|Fixed a bug where tenant sites/sub-sites were missing from the **Web Url** dropdown
|
||||
1.0.5|September 1st, 2017|Added a **Site Url** parameter next to the **Web Url** parameter in order to narrow down the results
|
||||
1.0.6|September 19, 2017|Upgraded to SharePoint drop 1.2.0 and added the site URL and web URL preselection when adding the web part for the first time on a page. Also fixed a bug with fields that had spaces in their internal names (automatically replaced with `_x0020_` by SharePoint).
|
||||
1.0.7|November 17, 2017|Reverted to drop 1.1.0 in order to keep compatibility for SP2016 on-premise
|
||||
|
@ -47,6 +46,7 @@ Version|Date|Comments
|
|||
1.0.12|April 19, 2020|Upgraded to SPFx 1.10
|
||||
1.0.13|April 28, 2020|Added support for Dynamic Data
|
||||
1.0.14|October 30, 2020|Fixed (lookup-)fields with special characters
|
||||
1.0.15|November 2, 2020|Upgraded to SPFx 1.11; Added support for jsonValue
|
||||
|
||||
## Disclaimer
|
||||
|
||||
|
@ -271,6 +271,7 @@ Property | Description
|
|||
`{{MyField.textValue}}` | Renders the text value of the field, a more readable end-user value to use for display.
|
||||
`{{MyField.htmlValue}}` | Renders the HTML value of the field. For example, a *Link* field HTML value would render something like `<a href="...">My Link Field</a>`
|
||||
`{{MyField.rawValue}}` | Returns the raw value of the field. For example, a *Taxonomy* field raw value would return an object which contains the term `wssId` and its label
|
||||
`{{MyField.jsonValue}}` | Returns a JSON object value of the field. For example, an *Image* field JSON value would return a JSON object which contains the `serverRelativeUrl` property
|
||||
|
||||
##### Handlebars
|
||||
|
||||
|
@ -280,6 +281,7 @@ Property | Description
|
|||
<p>MyUserField text value : {{MyUserField.textValue}}</p>
|
||||
<p>MyUserField html value : {{MyUserField.htmlValue}}</p>
|
||||
<p>MyUserField raw value : {{MyUserField.rawValue}}</p>
|
||||
<p>MyImageField JSON value : {{MyImageField.jsonValue}}</p>
|
||||
</div>
|
||||
{{/each}}
|
||||
```
|
||||
|
@ -291,10 +293,17 @@ Property | Description
|
|||
<p>MyUserField text value : Simon-Pierre Plante</p>
|
||||
<p>MyUserField html value : <a href="..." onclick="...">Simon-Pierre Plante</a></p>
|
||||
<p>MyUserField raw value : 26</p>
|
||||
<p>MyImageField JSON value: [Object] </p>
|
||||
</div>
|
||||
...
|
||||
```
|
||||
|
||||
You can use `JSONValue` to parse complex fields -- such as image fields -- and display images, for example:
|
||||
|
||||
```html
|
||||
<img src="{{MyImageField.jsonValue.serverRelativeUrl}}" />
|
||||
```
|
||||
|
||||
### Including your own external scripts and/or block helpers
|
||||
|
||||
#### Including basic library files
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"solution": {
|
||||
"name": "React Content Query",
|
||||
"id": "00406271-0276-406f-9666-512623eb6709",
|
||||
"version": "1.0.14.0",
|
||||
"version": "1.0.15.0",
|
||||
"isDomainIsolated": false,
|
||||
"includeClientSideAssets": true
|
||||
},
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "react-content-query-webpart",
|
||||
"version": "1.0.12",
|
||||
"version": "1.0.15",
|
||||
"private": true,
|
||||
"main": "lib/index.js",
|
||||
"engines": {
|
||||
|
@ -12,18 +12,14 @@
|
|||
"test": "gulp test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@microsoft/sp-core-library": "1.10.0",
|
||||
"@microsoft/sp-lodash-subset": "1.10.0",
|
||||
"@microsoft/sp-office-ui-fabric-core": "1.10.0",
|
||||
"@microsoft/sp-property-pane": "1.10.0",
|
||||
"@microsoft/sp-webpart-base": "1.10.0",
|
||||
"@microsoft/sp-core-library": "1.11.0",
|
||||
"@microsoft/sp-lodash-subset": "1.11.0",
|
||||
"@microsoft/sp-office-ui-fabric-core": "1.11.0",
|
||||
"@microsoft/sp-property-pane": "1.11.0",
|
||||
"@microsoft/sp-webpart-base": "1.11.0",
|
||||
"@pnp/spfx-controls-react": "^1.17.0",
|
||||
"@pnp/spfx-property-controls": "^1.17.0",
|
||||
"@types/es6-promise": "0.0.33",
|
||||
"@types/handlebars": "4.0.32",
|
||||
"@types/react": "16.8.8",
|
||||
"@types/react-dom": "16.8.3",
|
||||
"@types/webpack-env": "1.13.1",
|
||||
"acorn": ">=5.7.4",
|
||||
"atob": ">=2.1.0",
|
||||
"base64-url": ">=2.0.0",
|
||||
|
@ -52,7 +48,7 @@
|
|||
"morgan": ">=1.9.1",
|
||||
"natives": "^1.1.6",
|
||||
"node.extend": ">=1.1.7",
|
||||
"office-ui-fabric-react": "6.189.2",
|
||||
"office-ui-fabric-react": "6.214.0",
|
||||
"open": ">=6.0.0",
|
||||
"randomatic": ">=3.0.0",
|
||||
"react": "16.8.5",
|
||||
|
@ -68,22 +64,26 @@
|
|||
"devDependencies": {
|
||||
"@microsoft/rush-stack-compiler-2.9": "0.7.16",
|
||||
"@microsoft/rush-stack-compiler-3.3": "0.3.5",
|
||||
"@microsoft/sp-build-web": "1.10.0",
|
||||
"@microsoft/sp-module-interfaces": "1.10.0",
|
||||
"@microsoft/sp-tslint-rules": "1.10.0",
|
||||
"@microsoft/sp-webpart-workbench": "1.10.0",
|
||||
"@microsoft/sp-build-web": "1.11.0",
|
||||
"@microsoft/sp-module-interfaces": "1.11.0",
|
||||
"@microsoft/sp-tslint-rules": "1.11.0",
|
||||
"@microsoft/sp-webpart-workbench": "1.11.0",
|
||||
"@types/chai": "3.4.34",
|
||||
"@types/es6-promise": "0.0.33",
|
||||
"@types/mocha": "2.2.38",
|
||||
"@types/react": "16.8.8",
|
||||
"@types/react-dom": "16.8.3",
|
||||
"@types/webpack-env": "1.13.1",
|
||||
"ajv": "5.2.2",
|
||||
"awesome-typescript-loader": "^3.2.1",
|
||||
"gulp": "~3.9.1",
|
||||
"tslint-microsoft-contrib": "^5.0.0",
|
||||
"unlazy-loader": "^0.1.2",
|
||||
"gulp-sequence": "1.0.0",
|
||||
"gulp-stylelint": "^13.0.0",
|
||||
"jest": "^23.6.0",
|
||||
"stylelint": "^13.0.0",
|
||||
"stylelint-config-standard": "^20.0.0",
|
||||
"stylelint-scss": "^3.14.2"
|
||||
"stylelint-scss": "^3.14.2",
|
||||
"tslint-microsoft-contrib": "^5.0.0",
|
||||
"unlazy-loader": "^0.1.2"
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -29,7 +29,8 @@
|
|||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
|
|
Loading…
Reference in New Issue