Scripts/New-UDillustration.ps1
<# .SYNOPSIS Sample control for UniversalDashboard. .DESCRIPTION Sample control function for UniversalDashboard. This function must have an ID and return a hash table. .PARAMETER Id An id for the component default value will be generated by new-guid. .EXAMPLE PS C:\> New-UDillustration -Name "WorkTime" -HairColor "#2B303A" -PrimaryColor "#D64933" -AccentColor "#0C7C59" -SkinColor "#58A4B0" This will produce the illustration WorkTime and set all the possible parameter options to customise the colours .INPUTS Inputs (if any) .OUTPUTS Output (if any) .NOTES General notes #> function New-UDillustration { param( [Parameter()] [string]$Id = (New-Guid).ToString(), [Parameter()] [ValidateSet( 'AboutMe', 'AboutUsPage', 'AcceptRequest', 'AcceptTerms', 'Account', 'ActiveSupport', 'ADayAtThePark', 'AddFiles', 'AddNotes', 'Address', 'AddToCart', 'AddUser', 'Agreement', 'Aircraft', 'Airport', 'AirSupport', 'Alert', 'Algolia', 'AlienScience', 'Analysis', 'Analytics', 'Android', 'ApartmentRent', 'AppInstallation', 'Appreciation', 'AroundTheWorld', 'Art', 'ArtificialIntelligence', 'Artist', 'ArtLover', 'Astronaut', 'AtWork', 'Authentication', 'Autumn', 'Awards', 'AWholeYear', 'Baby', 'BackInTheDay', 'BackToSchool', 'Balloons', 'Barber', 'Basketball', 'Beach', 'BeerCelebration', 'BeforeDawn', 'BeginChat', 'BeTheHero', 'Bibliophile', 'BirthdayCake', 'Bitcoin', 'BitcoinP2P', 'BlankCanvas', 'Blogging', 'BlogPost', 'Booking', 'BookLover', 'Bookmarks', 'Brainstorming', 'Broadcast', 'BrowserStats', 'Buddies', 'Buffer', 'BugFixing', 'Building', 'BuildingBlocks', 'BusinessDeal', 'Businessman', 'BusinessPlan', 'Businesswoman', 'BusStop', 'ByMyCar', 'Calculator', 'Calendar', 'Calling', 'Campfire', 'Camping', 'Cancel', 'Candidate', 'CareerProgress', 'CautiousDog', 'Celebration', 'Charts', 'Chat', 'Chatting', 'CheckingBoxes', 'Checklist', 'Chef', 'Children', 'Chilling', 'Choice', 'Choose', 'ChristmasStocking', 'ChristmasTree', 'Circles', 'CityDriver', 'CityGirl', 'CloudHosting', 'CloudSync', 'CodeTyping', 'Coding', 'CoffeeBreak', 'Collaboration', 'Collecting', 'Collection', 'Community', 'Completed', 'ComposeMusic', 'Conference', 'ConferenceSpeaker', 'Confirmation', 'Confirmed', 'Connected', 'ConnectedWorld', 'ConnectingTeams', 'ContactUs', 'ContainerShip', 'Contemplating', 'Content', 'ContentCreator', 'Contrast', 'ControlPanel', 'Conversation', 'Convert', 'CountrySide', 'Couple', 'CoWorkers', 'CoWorking', 'Create', 'CreationProcess', 'CreativeTeam', 'CreativeThinking', 'CreativeWoman', 'Creativity', 'CreditCard', 'CreditCardPayment', 'CreditCardPayments', 'CryptoFlowers', 'CustomerSurvey', 'DarkAlley', 'DarkAnalytics', 'Dashboard', 'Data', 'DataPoints', 'DataReport', 'DataTrends', 'Deliveries', 'Delivery', 'Departing', 'Depi', 'DesignCommunity', 'Designer', 'DesignerGirl', 'DesignerLife', 'DesignProcess', 'DesignThinking', 'DesignTools', 'Destination', 'DeveloperActivity', 'Development', 'Devices', 'DigitalNomad', 'Directions', 'Discount', 'Doctor', 'Doctors', 'Documents', 'DogWalking', 'DollPlay', 'DomainNames', 'Done', 'Download', 'Dreamer', 'DroneDelivery', 'DroneRace', 'DuaLipa', 'EasterEggHunt', 'EatingTogether', 'ElectricCar', 'Elements', 'EmailCampaign', 'EmailCapture', 'Emails', 'Empty', 'Envelope', 'Environment', 'Ether', 'Ethereum', 'Events', 'EverydayDesign', 'Exams', 'Experts', 'Exploring', 'FallIsComing', 'Fans', 'FashionBlogging', 'FastCar', 'FastLoading', 'Fatherhood', 'FeaturesOverview', 'FeelingBlue', 'Festivities', 'FileBundle', 'FileSearching', 'FilesSent', 'FilingSystem', 'Filter', 'Finance', 'FinancialData', 'Fingerprint', 'FinishLine', 'Fireworks', 'Firmware', 'FishBowl', 'Fishing', 'FitnessTracker', 'Floating', 'Focus', 'Folder', 'Followers', 'Following', 'FollowMeDrone', 'Forever', 'ForgotPassword', 'ForSale', 'Freelancer', 'Friendship', 'FrozenFigure', 'GameDay', 'Gaming', 'Gardening', 'Gdpr', 'GettingCoffee', 'Gift', 'GiftCard', 'Gifts', 'GirlsJustWannaHaveFun', 'Goal', 'GoingUp', 'GoldenGateBridge', 'GoodDoggy', 'Grades', 'Graduation', 'Grandma', 'GrandSlam', 'GroupChat', 'GroupSelfie', 'Growing', 'GrowthAnalytics', 'Hamburger', 'HangOut', 'Happy2019', 'HappyBirthday', 'HappyWomenDay', 'HavingFun', 'HealthyHabit', 'Heartbroken', 'Hello', 'HighFive', 'Hiking', 'Hire', 'Hiring', 'HomeRun', 'HorrorMovie', 'Houses', 'HouseSearching', 'ICanFly', 'ImageFolder', 'ImagePost', 'Images', 'ImageUpload', 'InboxCleanup', 'Influencer', 'InLove', 'InProgress', 'InstantSupport', 'InstructionManual', 'InSync', 'InteractionDesign', 'InternetOnTheGo', 'Interview', 'InTheOffice', 'InThePool', 'InThought', 'IntoTheNight', 'Investing', 'Invite', 'Japan', 'JasonMask', 'JavaScriptFrameworks', 'JobHunt', 'Jogging', 'Journey', 'Joyride', 'Judge', 'Knowledge', 'LaravelAndVue', 'LateAtNight', 'Launching', 'Learning', 'Lighthouse', 'LiveCollaboration', 'Loading', 'Login', 'Logistics', 'Lost', 'Love', 'LoveIsInTheAir', 'Mail', 'Mailbox', 'MailSent', 'Maintenance', 'MakeItRain', 'MakerLaunch', 'MakeupArtist', 'MakingArt', 'Map', 'MapDark', 'MapLight', 'Marilyn', 'Marketing', 'MayTheForce', 'MediaPlayer', 'Medicine', 'Meditating', 'Meditation', 'Meeting', 'MemoryStorage', 'Messages', 'MessageSent', 'Messaging', 'MessagingFun', 'Messenger', 'Metrics', 'MillennialGirl', 'Mindfulness', 'MindMap', 'MintTea', 'MissedChances', 'MissionImpossible', 'Mobile', 'MobileApps', 'MobileBrowsers', 'MobileLife', 'MobileMarketing', 'MobilePayments', 'MobileTesting', 'ModernLife', 'ModernWoman', 'MomentToRemember', 'Monitor', 'MoreMusic', 'Motherhood', 'MovieNight', 'MovingForward', 'Multitasking', 'Music', 'MyPassword', 'Navigation', 'Nerd', 'NewMessage', 'News', 'Newsletter', 'NightCalls', 'Ninja', 'NoData', 'Notebook', 'NoteList', 'Notes', 'NotFound', 'Notify', 'OffRoad', 'OldDay', 'Onboarding', 'Online', 'OnlineFriends', 'OnlinePage', 'OnlineShopping', 'OnlineWishes', 'OnlineWorld', 'OnTheOffice', 'OnTheWay', 'Opened', 'OpenSource', 'OperatingSystem', 'OrderConfirmed', 'OrdinaryDay', 'OrganizePhotos', 'OrganizeResume', 'OrganizingProjects', 'OuterSpace', 'PageNotFound', 'PairProgramming', 'Palette', 'PassingBy', 'Payments', 'PedestrianCrossing', 'PenTool', 'PeopleSearch', 'PersonalData', 'Personalization', 'PersonalNotes', 'PersonalSettings', 'PersonalSite', 'PersonalTrainer', 'Photo', 'Photocopy', 'Photos', 'PhotoSharing', 'PieChart', 'Pilates', 'PizzaSharing', 'PlainCreditCard', 'PlayfulCat', 'Podcast', 'PodcastAudience', 'Portfolio', 'Post', 'PostingPhoto', 'PostOnline', 'Posts', 'Powerful', 'Preferences', 'Presentation', 'PressPlay', 'PrintingInvoices', 'ProblemSolving', 'Processing', 'ProductHunt', 'ProductTeardown', 'ProductTour', 'Profile', 'ProfileData', 'ProfilePic', 'Programmer', 'Programming', 'Projections', 'PrototypingProcess', 'QaEngineers', 'Questions', 'Queue', 'QuittingTime', 'React', 'ReadingList', 'RealTimeSync', 'Recording', 'Refreshing', 'Relaxation', 'RelaxingAtHome', 'Report', 'Responsive', 'Resume', 'ResumeFolder', 'Revenue', 'RideABicycle', 'Rising', 'Robotics', 'RomanticGetaway', 'RunningWild', 'Safe', 'SantaClaus', 'Savings', 'Schedule', 'Science', 'Scooter', 'ScrumBoard', 'Sculpting', 'Search', 'SearchEngines', 'SecureData', 'SecureServer', 'Security', 'SecurityOn', 'Segment', 'Segmentation', 'Select', 'Selfie', 'SelfieTime', 'Server', 'ServerDown', 'ServerStatus', 'Setup', 'SetupAnalytics', 'SetupWizard', 'Shopping', 'SiteStats', 'Skateboarding', 'SleepAnalysis', 'SmartHome', 'SmileyFace', 'Snowman', 'SocialDashboard', 'SocialGrowth', 'SocialIdeas', 'SocialLife', 'SocialMedia', 'SocialNetworking', 'SocialShare', 'SocialStrategy', 'SocialTree', 'SocialUpdate', 'SoftwareEngineer', 'Specs', 'SpeechToText', 'Spreadsheets', 'StabilityBall', 'Starman', 'Startled', 'StartupLife', 'StaticAssets', 'Statistics', 'StatusUpdate', 'StayingIn', 'StepToTheSun', 'StreetFood', 'StripePayments', 'Studying', 'Subscriber', 'Subway', 'SuccessfulPurchase', 'SunnyDay', 'Superhero', 'SuperThankYou', 'SuperWoman', 'Surfer', 'SwipeProfiles', 'Sync', 'Synchronize', 'Tabs', 'Taken', 'TakingNotes', 'Target', 'Task', 'Tasting', 'Teacher', 'Teaching', 'Team', 'TeamPage', 'TeamSpirit', 'TeamWork', 'TeddyBear', 'Texting', 'Thoughts', 'ThroughTheDesert', 'ThrowDown', 'Timeline', 'TimeManagement', 'ToDo', 'ToDoList', 'Together', 'ToTheStars', 'ToyCar', 'TrackAndField', 'TransferFiles', 'TravelBooking', 'Travelers', 'Traveling', 'Treasure', 'Trip', 'TrueFriends', 'Tweetstorm', 'Typewriter', 'Typing', 'Unboxing', 'UnderConstruction', 'Update', 'Upgrade', 'Upload', 'UploadImage', 'Uploading', 'Upvote', 'UsabilityTesting', 'UserFlow', 'Vault', 'VehicleSale', 'VersionControl', 'VideoCall', 'Videographer', 'VirtualReality', 'VisualData', 'VoiceControl', 'VrChat', 'WalkInTheCity', 'Wallet', 'WallPost', 'Warning', 'Weather', 'WeatherApp', 'WebDevices', 'WebsiteSetup', 'Wedding', 'Welcome', 'Windows', 'WindowShopping', 'WindTurbine', 'Winners', 'WinterDesigner', 'WinterOlympics', 'Wireframing', 'Wishes', 'Wishlist', 'Witch', 'Woman', 'WomenDay', 'WordOfMouth', 'Wordpress', 'WorkChat', 'Working', 'WorkingLate', 'WorkingRemotely', 'Workout', 'WorkTime', 'World', 'XmasSurprise', 'Yacht', 'YoungAndHappy', 'YoutubeTutorial')] [string[]] $Name, [Parameter()] [string]$PrimaryColor, [Parameter()] [string]$AccentColor, [Parameter()] [string]$SkinColor, [Parameter()] [string]$HairColor ) End { @{ # The AssetID of the main JS File assetId = $AssetId # Tell UD this is a plugin isPlugin = $true # This ID must be the same as the one used in the JavaScript to register the control with UD type = "UD-illustration" # An ID is mandatory id = $Id # This is where you can put any other properties. They are passed to the React control's props # The keys are case-sensitive in JS. tag = $Name primarycolor = $PrimaryColor accentcolor = $AccentColor haircolor = $HairColor skincolor = $SkinColor } } } |