This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
item.attachmentFiles.select("FileName,ServerRelativeUrl").get().then(function (itemAttachments) { | |
var attachments = itemAttachments.map(function (result) { | |
return NWF$('<img/>', { | |
src: result.ServerRelativeUrl, | |
alt: result.FileName, | |
style: "margin:5px;width:100px;height:100px;float:left;", | |
class: "item-attachment" | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NWF$(document).ready(function () { | |
$pnp.setup({ | |
sp: { | |
headers: { | |
"Accept": "application/json; odata=verbose" | |
} | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import { AadHttpClient, AadHttpClientFactory } from "@microsoft/sp-http"; | |
import { APP_ID } from './constants'; | |
export const useAzureFunctions = (aadHttpClientFactory: AadHttpClientFactory) => { | |
const clientRef = React.useRef<AadHttpClient>(); | |
const getClient = React.useCallback(async () => { | |
if (!aadHttpClientFactory) { | |
return undefined; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Helper wrapper for calling Graph | |
//* based on https://gist.github.com/wobba/37416d3107b85675d896105554b3df28 | |
//* Thank you Mikael Svenson | |
import { WebPartContext } from '@microsoft/sp-webpart-base'; | |
import { GraphError } from '@microsoft/microsoft-graph-client'; | |
import { MSGraphClientV3 } from '@microsoft/sp-http'; | |
export class msgraph { | |
private static _graphClient: MSGraphClientV3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A script to get summary of a SharePoint site page using GPT-3.5 turbo | |
# The script accepts the following parameters: | |
# SiteAbsoluteUrl, PageName | |
Param( | |
[Parameter(Mandatory = $true)] | |
[string]$SiteAbsoluteUrl, | |
[Parameter(Mandatory = $true)] | |
[string]$PageName | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "On pull request" | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
create-task: | |
runs-on: ubuntu-latest | |
steps: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"name": "SPFx", | |
"build": { | |
"dockerfile": "Dockerfile" | |
}, | |
// Set *default* container specific settings.json values on container create. | |
"settings": { | |
"terminal.integrated.shell.linux": "/bin/bash" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:10.22.0 | |
RUN npm i -g gulp@3 yo @microsoft/generator-sharepoint@1.11.0 | |
VOLUME /usr/app/spfx | |
WORKDIR /usr/app/spfx | |
RUN useradd --create-home --shell /bin/bash spfx && \ | |
usermod -aG sudo spfx && \ | |
chown -R spfx:spfx /usr/app/spfx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For better pipelines see - https://www.voitanos.io/blog/sharepoint-framework-azure-pipelines-templates/ | |
parameters: | |
- name: sppkg_file_name | |
type: string | |
default: name_of_the_package.sppkg | |
- name: site_url | |
type: string | |
default: https://contoso.sharepoint.com/sites/teamsite | |
- name: tenant_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SPFx CICD with PnP PowerShell OIDC | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write |
NewerOlder