@mikezimm/fps-library-v2
Version:
Library of reusable typescript/javascript functions, interfaces and constants
148 lines (146 loc) • 11.7 kB
JavaScript
/**
* CodeAnalizerComment: Updated 1 imports on 2024-09-22 14:49:52
* Update:: import { LetterGroups5Label } to '@mikezimm/fps-core-v7/lib/logic/Strings/drillParse/getLetterBuckets;'
*/
/**
* CodeAnalizerComment: Updated 15 imports on 2024-09-21 23:07:24
* Update:: import { ITrimB4 } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { ITrimAfter } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { ITrimLink } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { ITrimSpecial } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { ITrimTimes } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { ITrimWords } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { ITrimNumbers } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { DoNotExpandLinkColumns } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { DoNotExpandTrimB4 } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { DoNotExpandTrimAfter } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { DoNotExpandTrimWords } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { DoNotExpandTrimTimes } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { DoNotExpandTrimNumbers } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { DoNotExpandTrimSpecial } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
* Update:: import { DoNotFetchSpecial } to '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2;'
*/
import * as React from 'react';
// import { escape } from '@microsoft/sp-lodash-subset';
import { PivotItem, } from '@fluentui/react/lib/Pivot';
import { DoNotExpandLinkColumns, DoNotExpandTrimB4, DoNotExpandTrimAfter, DoNotExpandTrimWords, DoNotExpandTrimTimes, DoNotExpandTrimNumbers, DoNotExpandTrimSpecial, DoNotFetchSpecial } from '@mikezimm/fps-core-v7/lib/components/molecules/source-props/Lists/getVX/IGetInterfaceV2';
import { LetterGroups5Label } from '@mikezimm/fps-core-v7/lib/logic/Strings/drillParse/getLetterBuckets';
const padRight40 = { paddingRight: '40px' };
export function getHelpStringFunctions() {
const WebPartHelpElement = React.createElement(PivotItem, { headerText: 'String', itemIcon: 'Variable' },
React.createElement("div", { className: 'fps-pph-content' },
React.createElement("div", { className: 'fps-pph-topic' }, "String Functions are like calculated columns without the work."),
React.createElement("div", null,
"The goal of String functions are to make strings shorter for both ",
React.createElement("b", null, "refiners"),
" and ",
React.createElement("b", null, "views"),
"."),
React.createElement("div", null, "Can be applied to columns to modify the values for this webpart - like an ad-hoc calculated column but more."),
React.createElement("div", null, "For example, lets say you want to show the initials of the Editor (Modified By)"),
React.createElement("div", null,
"To get the full name of the editor, use ",
React.createElement("b", null, "Editor/Title")),
React.createElement("div", null,
"To get their initials instead, use ",
React.createElement("b", null,
"Editor/Title",
React.createElement("span", { style: { color: 'green' } }, "/Initials"))),
React.createElement("div", { style: { display: 'flex', flexWrap: 'wrap' } },
React.createElement("div", { style: padRight40 },
React.createElement("div", { className: 'fps-pph-topic' }, "Split before character"),
React.createElement("ul", null, DoNotExpandTrimB4.map((rule, idx) => React.createElement("li", { key: idx }, '/' + rule)))),
React.createElement("div", null,
React.createElement("div", { style: padRight40 },
React.createElement("div", { className: 'fps-pph-topic' }, "Split after character"),
React.createElement("ul", null, DoNotExpandTrimAfter.map((rule, idx) => React.createElement("li", { key: idx }, '/' + rule)))),
React.createElement("div", { style: padRight40 },
React.createElement("div", { className: 'fps-pph-topic', title: "Special Labels, do NOT add to your column names" }, "Special labels"),
React.createElement("ul", null, DoNotFetchSpecial.map((rule, idx) => React.createElement("li", { key: idx }, '/' + rule))))),
React.createElement("div", { style: padRight40 },
React.createElement("div", { className: 'fps-pph-topic' }, "Link/Multi columns"),
React.createElement("ul", null, DoNotExpandLinkColumns.map((rule, idx) => React.createElement("li", { key: idx }, '/' + rule)))),
React.createElement("div", { style: padRight40 },
React.createElement("div", { className: 'fps-pph-topic', title: "These will convert to numbers" }, "Number columns - LOCAL"),
React.createElement("ul", null, DoNotExpandTrimNumbers.map((rule, idx) => React.createElement("li", { key: idx }, '/' + rule)))),
React.createElement("div", { style: padRight40 },
React.createElement("div", { className: 'fps-pph-topic' }, "Words"),
React.createElement("ul", null, DoNotExpandTrimWords.map((rule, idx) => React.createElement("li", { key: idx }, '/' + rule)))),
React.createElement("div", { style: padRight40 },
React.createElement("div", { className: 'fps-pph-topic' }, "Initials"),
React.createElement("ul", null, DoNotExpandTrimSpecial.map((rule, idx) => React.createElement("li", { key: idx }, '/' + rule)))),
React.createElement("div", { style: padRight40 },
React.createElement("div", { className: 'fps-pph-topic', title: "These automatically convert to your Local Time" }, "Time columns - LOCAL"),
React.createElement("ul", null, DoNotExpandTrimTimes.map((rule, idx) => React.createElement("li", { key: idx }, '/' + rule))))),
React.createElement("div", { className: 'fps-pph-topic' }, "Notes: "),
React.createElement("div", null,
"Words ending in ",
React.createElement("b", null, "Capital C"),
" - the C stands for Characters so FirstWord2C = First 2 characters of the first word"),
React.createElement("div", null,
"Words ending in ",
React.createElement("b", null, "Capital D"),
" - includes digits so InitalsD includes all Initials AND numbers"),
React.createElement("div", null,
React.createElement("b", null, "????-MM-DD"),
" vs ",
React.createElement("b", null, "MM-DD"),
": ???? version will only show year if it is not current year. 'MM-DD' version will never show year - USE AT OWN RISK"),
React.createElement("div", null,
React.createElement("b", null, "For numbers like /Billions"),
", ",
React.createElement("b", null, "1D"),
" variant will show value using 1 decimal place. Otherwise will show no decimal places."),
React.createElement("li", null, "NOTE that these are strings which can impact the order since strings will be sorted by the first letter first."),
React.createElement("div", null,
React.createElement("b", null, "Special Labels"),
" ",
DoNotFetchSpecial.join(', ')),
React.createElement("div", null, "Special Labels are Created and Modified Date-User labels like: 2022-02-07: BK"),
React.createElement("div", null, `at this time, 'TrimB42ndDot', 'FirstAcronym', 'SecondAcronym' are not implimented :( `),
React.createElement("div", null,
React.createElement("b", null, "Object."),
" : If string column is parsable JSON: ",
React.createElement("b", null, "ColumnName/Object.propKey"),
" to get the value for propKey in Text column called 'ColumnName'"),
React.createElement("div", { className: 'fps-pph-topic' }, "/FirstInFirst5Buckets and /FirstInLast5Buckets "),
React.createElement("div", null,
"Groups words into these buckets: ",
LetterGroups5Label.join(' '),
" "),
React.createElement("div", null,
"FirstIn",
React.createElement("b", null, "First"),
"5Buckets will look at the First Letter in the ",
React.createElement("b", null, "FIRST"),
" Word and Group into the above buckets."),
React.createElement("div", null,
"FirstIn",
React.createElement("b", null, "Last"),
"5Buckets will look at the First Letter in the ",
React.createElement("b", null, "LAST"),
" Word and Group into the above buckets."),
React.createElement("div", { className: 'fps-pph-topic' }, "/Breadcrumb"),
React.createElement("div", null, "This can be applied to any string column and will do the following:"),
React.createElement("ol", null,
React.createElement("li", null,
"Remove any slashes ",
`/`,
" at the beginning and end of a column or property."),
React.createElement("li", null,
"Remove any slashes ",
`\\`,
" at the beginning and end of a column or property."),
React.createElement("li", null,
"The replace any slashes with the ",
`>`,
" symbol")),
React.createElement("div", null, "Some common examples could be:"),
React.createElement("ul", null,
React.createElement("li", { style: { fontWeight: 600 } }, "folderString/Breadcrumb - Folder level breadcrumb"),
React.createElement("li", { style: { fontWeight: 600 } }, "FileRef/Breadcrumb - Full File Url breadcrumb"),
React.createElement("li", { style: { fontWeight: 600 } }, "goToItemPreview/Breadcrumb"),
React.createElement("li", { style: { fontWeight: 600 } }, "goToFolderLink/Breadcrumb"))));
return WebPartHelpElement;
}
//# sourceMappingURL=StringFunctions.js.map