// ******************************************************************************************************************************************************
// * By Dr. Roy C. Davies, March 2023, roy.c.davies@ieee.org
// ******************************************************************************************************************************************************
const code = {
dropdown: `
{ if(e.detail.value) ex1value = e.detail.value; }}>
File
Menu option chosen: {ex1value}
`,
selection: `
Pet
{#each animals as animal, i}
{animal}
{/each}
Menu option chosen: {ex2value===""?"":animals[ex2value]}
Menu option chosen: {ex3value===""?"":animals[ex3value]}
Select Friend
Jenny Hess
Elliot Fu
Stevie Feliciano
Christian
Matt
Justen Kitsune
Menu option chosen: {ex5value}
`,
search_selection: `
Select Country
{#each Object.keys(countries) as key}
{countries[key]}
{/each}
Menu option chosen: {ex4value===""?"":ex4value.toUpperCase()}{ex4value===""?"":" : " + countries[ex4value]}
Menu option chosen: {ex6value}{ex6value===""?"":" : " + states[ex6value]}
Where countries = {"af": "Afghanistan", ... "zw": "Zimbabwe"} and
states = {"AL": "Alabama", ... "WY": "Wyoming"}
`,
unfilterable_search_selection: `
StatesAlabama (unfilterable)AlaskaArizona (unfilterable)Arkansas (unfilterable)CaliforniaOhioOklahoma
Menu option chosen: {ex9value}{ex9value===""?"":" : " + states[ex9value]}
`,
ignore_diacritics: `
Search diacritics by only typing usual vowelsAndréBokmålcafécafeteríachâteaudécolletéÉlyséeFräuleingarçonháčekinrōjūjutsukroužekLa NiñaMāorinégligéepączkiQuébecragoûtŠkodatakahēübervoilàwhekīc Zoë
Menu option chosen: {ex7value}
`,
clearable_selection: `
Note here the tie between the Dropdown and Input elements through the bound values.
Select LanguagesArabicChineseDanishDutchEnglishFrenchGermanGreekHungarianItalianJapaneseKoreanLithuanianPersianPolishPortugueseRussianSpanishSwedishTurkishVietnamese
Menu options chosen: {ex8value}
`,
multiple_selection: `
Menu options chosen: {ex10value}
`,
multiple_search_selection: `
Menu options chosen: {ex11value}
Select Country
{#each Object.keys(countries) as key}
{countries[key]}
{/each}
Menu options chosen: {ex12value}
`,
search_dropdown: `
Select LanguageArabicChineseDanishDutchEnglishFrenchGermanGreekHungarianItalianJapaneseKoreanLithuanianPersianPolishPortugueseRussianSpanishSwedishTurkishVietnamese
`,
search_in_menu: `
Filter Posts
Tag Label
Important
Announcement
Cannot Fix
News
Enhancement
Change Declined
Off Topic
Interesting
Discussion
Menu option chosen: {ex14value}
There seems to be a bug when searching that means that the search text disappears but still reduces the number of options after selecting and deleting options. This bug is in the original as well.
Filter Posts
Tag Label
Important
Announcement
Cannot Fix
News
Enhancement
Change Declined
Off Topic
Interesting
Discussion
Menu options chosen: {ex15value}
`,
inline : `
Show me posts by
Select Friend
Jenny Hess
Elliot Fu
Stevie Feliciano
Christian
Matt
Justen Kitsune
Menu option chosen: {ex16value}
Trending repos
todayAdjust time spanTodayThis WeekThis Month
Menu option chosen: {ex17value}
`,
pointing : `
Home
ShoppingCategoriesClothingMensShirtsPantsJeansShoesWomensDressesShoesBagsHome GoodsBedroomOrderStatusCancellations
Forums
Contact Us
Menu option chosen: {ex18value}
Home
Messages
InboxStarredSent MailDrafts (143)Spam (1009)Trash
Browse
Help
Menu option chosen: {ex19value}
Display DensityComfortableCozyCompactSettingsUpload Settings
Convert Uploaded Files to PDF
Digitize Text from Uploaded Files
Manage AppsKeyboard ShortcutsHelpNewDocumentImageSave As...EditNewDocumentImageSave As...Edit
Menu option chosen: {ex20value}
Filter Posts
Tag Label
Important
Announcement
Cannot Fix
News
Enhancement
Change Declined
Off Topic
Interesting
Discussion
Filter Posts
Tag Label
Important
Announcement
Cannot Fix
News
Enhancement
Change Declined
Off Topic
Interesting
Discussion
Menu option chosen: {ex21value}
Filter Posts
Tag Label
Important
Announcement
Discussion
Filter Posts
Tag Label
Important
Announcement
Discussion
Menu option chosen: {ex22value}
`,
floating : `
ex24value=""}>
Edit Post Remove Post Hide Post
Menu option chosen: {ex24value ? ex24value : ex23value ? ex23value : ""}`,
no_javascript : `
Dropdown
Choice 1Choice 2Choice 3
`,
header : `
Filter
Filter by tag
Important
Announcement
Discussion
`,
divider : `
Filter
Filter by tag
Important
Announcement
Discussion
`,
icon : `
Filter
Filter by tag
Important
Announcement
Discussion
`,
description : `
Filter Tags
Filter by tag
2 new
Important
10 new
Announcement
5 new
Discussion
`,
label : `
FilterSearch issues
Filter by tag
Important
Announcement
Discussion
`,
message : `
LoginError
You must log-in to see all categories
`,
floated : `
Select Type
Important
Announcement
Discussion
`,
input : `
FilterSearch issues
Filter by tag
Important
Announcement
Discussion
`,
image : `
Add User
People You Might Know
Jenny Hess
Elliot Fu
Stevie Feliciano
Your Friends' Friends
Christian
Matt
Justen Kitsune
`,
actionable : `
{
let type = data["text"].split(":")[0];
behavior({type:"toast", settings: {title: type + " Reveal", message: "You need to know: " + data["value"]}})
}
}
}}>
Open me and select actionable itemsSECRET: Select meTRUTH: Select meLIE: Select meI am a selectable entry only
`,
error : `
Dropdown Choice 1Choice 2Choice 3
Dropdown Choice 1Choice 2Choice 3
`,
active : `
Dropdown Choice 1Choice 2
`,
disabled : `
Dropdown Choice 1Choice 2Choice 3
Dropdown Choice 1Choice 2Choice 3
`,
read_only : `
Dropdown Choice 1Choice 2Choice 3
`,
size : `
{#each ["mini", "tiny", "small", "medium", "large"] as size}
{size.charAt(0).toUpperCase() + size.slice(1)}MaleFemale
{/each}
`,
scrolling : `
Select choice
{#each Array.from({length: 15}, (_, i) => i + 1) as choice}
Choice {choice}
{/each}
`,
inverted : `
Select choice
{#each Array.from({length: 9}, (_, i) => i + 1) as choice}
Choice {choice}
{/each}
`,
fluid : `
Link 1
Link 2
All SectionsMoreChoice 1Choice 2Choice 3
`,
height : `
`,
direction : `
MenuLeft123Right123MenuLeftStill Left12323Left 2123
`,
columnar_menu : `
`,
simple : `
GenderMaleFemale
`,
settings : `
`,
change_after_initialisation : `
{test}
`,
change_with_formatting : `
{test2}
`
};
export default code;