Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async loadEvents() {
try {
// Teste Properties
if (!this.props.list || !this.props.siteUrl || !this.props.eventStartDate.value || !this.props.eventEndDate.value) return;
this.userListPermissions = await this.spService.getUserPermissions(this.props.siteUrl, this.props.list);
const eventsData: IEventData[] = await this.spService.getEvents(escape(this.props.siteUrl), escape(this.props.list), this.props.eventStartDate.value, this.props.eventEndDate.value);
this.setState({ eventData: eventsData, hasError: false, errorMessage: "" });
} catch (error) {
this.setState({ hasError: true, errorMessage: error.message, isloading: false });
}
}
/**
iconText='Configure your web part'
description='Please configure the web part.'
buttonLabel='Configure'
hideButton={this.props.displayMode === DisplayMode.Read}
onConfigure={() => this._onConfigure()} />
}
{/* Show description web part property, when set */}
{this.props.sitekey &&
<div>
<p>
</p>
{ this.captcha = el; } }
sitekey={escape(this.props.sitekey)}
onChange={this.onChange} />
<p>
</p><p> { this._messageContainer = elm; }}>
</p>
<p></p>
this.buttonClicked()} />
</div>
}
);
}
return;
// Handling the top placeholder
if (!this._topPlaceholder) {
this._topPlaceholder = this.context.placeholderProvider.tryCreateContent(
PlaceholderName.Top,
{
onDispose: this._onDispose
});
}
if (this._topPlaceholder && this._topPlaceholder.domElement) {
this._topPlaceholder.domElement.innerHTML = `
<div class="${styles.app}">
<div class="ms-bgColor-themeDark ms-fontColor-white ${styles.header}">
<i aria-hidden="true" class="ms-Icon ms-Icon--Info"></i> ${escape(strings.Message)}
<a href="${this._viewUrl}">${escape(strings.GoToList)}</a>
</div>
</div>`;
}
}
public render(): React.ReactElement {
return (
<div>
<div>
{escape(this.props.organisationName)}
</div>
<div>
<div>Managers</div>
<ul>
{this.state.managers.map((manager, index) => (
<li>
<button> this.onProfileLinkClick(manager.UserUrl)}>
<div>
<div>
<img src="{this.getProfilePhoto(manager.PictureUrl)}" role="presentation" alt="">
</div>
<div>
<div>{manager.DisplayName}</div>
<div>{manager.Title}</div>
</div>
</div></button></li></ul></div></div>
public render(): void {
this.domElement.innerHTML = `
<div class="${styles.helloWorld}">
<div class="${styles.container}">
<div class="ms-Grid-row ms-bgColor-themeDark ms-fontColor-white ${styles.row}">
<div class="ms-Grid-col ms-u-lg10 ms-u-xl8 ms-u-xlPush2 ms-u-lgPush1">
<span class="ms-font-xl ms-fontColor-white">Welcome to SharePoint!</span>
<p class="ms-font-l ms-fontColor-white">Customize SharePoint experiences using Web Parts.</p>
<p class="ms-font-l ms-fontColor-white">${escape(this.properties.description)}</p>
<a class="${styles.button}" href="https://aka.ms/spfx">
<span class="${styles.label}">Learn more</span>
</a>
<p class="ms-font-l ms-fontColor-white">Textbox value: ${this.properties.textboxField}</p>
<p class="ms-font-l ms-fontColor-white">Multi-line Textbox value: ${this.properties.multilineTextboxField}</p>
<p class="ms-font-l ms-fontColor-white">Checkbox checked: ${this.properties.checkboxField}</p>
<p class="ms-font-l ms-fontColor-white">Dropdown selected value: ${this.properties.dropdownField}</p>
<p class="ms-font-l ms-fontColor-white">Slider value: ${this.properties.sliderField}</p>
<p class="ms-font-l ms-fontColor-white">Toggle on: ${this.properties.toggleField}</p>
</div>
</div>
</div>
</div>`;
}
<table width="100%" cellspacing="0" class="display ${styles.helloWorld}">
<thead>
<tr>
<th>ID</th>
<th>Business unit</th>
<th>Category</th>
<th>Status</th>
<th>Due date</th>
<th>Assigned to</th>
</tr>
</thead>
</table>`;
$('table', this.domElement).DataTable({
'ajax': {
'url': `../../_api/web/lists/getbytitle('${escape(this.properties.listName)}')/items?$select=ID,BusinessUnit,Category,Status,DueDate,AssignedTo/Title&$expand=AssignedTo/Title`,
'headers': { 'Accept': 'application/json;odata=nometadata' },
'dataSrc': (data: { value: IRequestItem[] }): any[][] => {
return data.value.map((item: IRequestItem): any[] => {
return [
item.ID,
item.BusinessUnit,
item.Category,
item.Status,
new Date(item.DueDate),
item.AssignedTo.Title
];
});
}
},
columnDefs: [{
targets: 4,
<p>
<input value="{this.props.commentText}"> { this.inputElement = elt; }}
onChange={e => this.props.onChangeComment(e.target.value)}
/>
<button> {
this.props.onAddComment(this.inputElement.value);
}}
className={styles.button}>{strings.AddButtonLabel}</button>
<button>
{strings.CancelButtonLabel}
</button>
<button>
{strings.RefreshButtonLabel}
</button>
</p><div>{escape(this.props.title)}</div>
<p></p>
<div>{this.props.message}</div>
);
}
}
public render(): void {
this.domElement.innerHTML = `
<div class="${styles.helloWorld}">
<div class="${styles.container}">
<div class="ms-Grid-row ms-bgColor-themeDark ms-fontColor-white ${styles.row}">
<div class="ms-Grid-col ms-u-lg10 ms-u-xl8 ms-u-xlPush2 ms-u-lgPush1">
<span class="ms-font-xl ms-fontColor-white">Welcome to SharePoint!</span>
<p class="ms-font-l ms-fontColor-white">Customize SharePoint experiences using Web Parts.</p>
<p class="ms-font-l ms-fontColor-white">${escape(this.properties.description)}</p>
<a class="${styles.button}" href="https://aka.ms/spfx">
<span class="${styles.label}">Learn more</span>
</a>
</div>
</div>
</div>
</div>`;
}