Skip to content

Instantly share code, notes, and snippets.

<script>
export let total = 0;
export let startpage;
export let pagesize = 0;
export let onPageChange;
let currentpage = startpage || 0;
$: totalpages = Math.ceil(total / pagesize);
<script>
import Check from "../Misc/Icons/general/check-24px.svelte";
export let checked;
export let defaultChecked = false;
export let value;
export let onChange;
$: _checked = checked != null ? checked : defaultChecked;
@precyx
precyx / DatePickerStrings_DE.ts
Last active December 19, 2019 08:37
# Datepicker Component Utils and Configurations: **Configurations:** - DatePickerStrings [DE] **Utils:** - FormatDate [DE]
import {IDatePickerStrings} from "office-ui-fabric-react";
export const DayPickerStrings: IDatePickerStrings = {
months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
shortMonths: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
shortDays: ["S", "M", "T", "W", "T", "F", "S"],
@precyx
precyx / StyledFilterNavigation.ts
Created December 19, 2019 08:40
# Some styled components examples
import styled from "styled-components";
export const ButtonBar = styled.div`
/** Sharepoint Reset: Buttons */
input[type="button"],
input[type="reset"],
input[type="submit"],
button {
margin-left: auto;
}
margin-top: 15px;
@precyx
precyx / ClassComponent.ts
Last active January 20, 2020 14:19
# React (TS) Component Types - ClassComponent.ts - FunctionComponent.ts
import * as React from "react";
export interface IMessageProps {}
export interface IMessageState {}
export default class Message extends React.Component<IMessageProps,IMessageState> {
constructor(props: IMessageProps) {
super(props);
}
@precyx
precyx / .prettierrc
Last active July 2, 2020 07:40
# Prettier Config - Tabs (4) - Single Quotes - Bracket Spacing - Semocolons
{
"useTabs": true,
"tabWidth": 4,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "lf"
@precyx
precyx / Get_Term_Labels.xml
Last active December 20, 2019 12:16
# _vti_bin/client.svg/ProcessQuery API Files: - **Get_Term_Labels.xml** - **TermStoreName_Groups_TermSets.xml:** Retrieve the term store name, groups, and term sets - **TermSet_Terms.xml:** Request body to retrieve all terms for the given term set -
<?xml version="1.0" encoding="UTF-8"?>
<Request xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009" AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library">
<Actions>
<ObjectPath Id="8" ObjectPathId="7" />
<ObjectIdentityQuery Id="9" ObjectPathId="7" />
<ObjectPath Id="11" ObjectPathId="10" />
<ObjectIdentityQuery Id="12" ObjectPathId="10" />
<ObjectPath Id="14" ObjectPathId="13" />
<ObjectIdentityQuery Id="15" ObjectPathId="13" />
<Query Id="16" ObjectPathId="13">
@precyx
precyx / TaxonomySvcService.ts
Last active December 27, 2019 07:16
# Taxonomy Snippets, Utils, Notes **Files** - getTermById.ts - hack_term_request_for_multi_lang_support_in_pnp_taxonomy.ts - TaxonomySvcService.ts
import { SPHttpClient, SPHttpClientResponse, ISPHttpClientOptions } from '@microsoft/sp-http';
import { IWebPartContext } from "@microsoft/sp-webpart-base";
export class TaxonomySvcService {
private clientServiceUrl: string;
private context: IWebPartContext;
constructor(context:IWebPartContext) {
this.context = context;