Code Monkey home page Code Monkey logo

microsoft / vsts-extension-color-control Goto Github PK

View Code? Open in Web Editor NEW
17.0 22.0 28.0 2.15 MB

This is an example of a custom control extension for use in on-premise instances of Visual Studio Team Services on the work item form.

Home Page: https://marketplace.visualstudio.com/items?itemName=ms-devlabs.color-form-control

License: MIT License

JavaScript 15.35% HTML 1.47% TypeScript 79.83% CSS 3.36%
vsts tfs work-item-control vsts-extension

vsts-extension-color-control's Introduction

NOTE: This extension has been deprecated. The code is still available but there will be no updates moving forward. Feel free to use the code as-is to build something on your own.

Custom Control for the Work Item Form

Learn how to build your own custom control for the work item form.

Usage

  1. Clone the repository.

  2. Open the Command Prompt and change to the directory where you cloned the project. For instance, if it is cloned in a folder called "extensions" and saved as "vsts-sample-wit-custom-control", you will navigate to the following command line.

     > cd C:\extensions\vsts-sample-wit-custom-control
    
  3. Run npm install to install required local dependencies.

  4. Run npm build:dev

  5. Run npm run package:dev.

  6. Run npm run dev - to start webpack dev server

  7. Go to your personal Marketplace.

  8. Click the Marketplace icon in the upper righthand corner.

  9. Click "Browse local extensions" in the dropdown.

  10. Scroll down and click on the "Manage Extensions" widget.

  11. Click the button "Upload new extension".

  12. Browse to the .vsix file generated when you packaged your extension.

  13. Select the extension, and then click "Open". Click "Upload" when the button activates.

  14. Hover over the extension when it appears in the list, and click "Install".

You have now installed the extension inside your collection. You are now able to put the control on the work item form.

A work item type is defined by XML, including the layout of the work item form. As part of the walkthrough, you will add the control to the layout. Read more information on WebLayout XML. In this example, we will add the control to the Agile "user story".

  1. Open the Developer Command Prompt. Export the XML file to your desktop with command shown below.

    witadmin exportwitd /collection:CollectionURL /p:Project /n:TypeName /f:FileName
    
  2. This creates a file in the directory that you specified. Inside this file, navigate to the section called "Work Item Extensions". This section shows the documentation of the control such as the inputs and ids. All this information was defined in the manifest, vss-extension.json.

        <!--**********************************Work Item Extensions***************************
    

Extension: Name: color-form-control Id: ms-devlabs.color-form-control

Control contribution:
	Id: ms-devlabs.color-form-control.color-control-contribution
	Description: Add custom colors and labels for picklist fields.
	Inputs:
		Id: FieldName
		Description: The field must have allowed values.
		Type: WorkItemField
		Field Type: String; Integer
		Data Type: String
		IsRequired: true

		Id: Labels
		Description: 
		Data Type: String
		IsRequired: false

		Id: Colors
		Description: 
		Data Type: String
		IsRequired: false
```
  1. Add an extension tag below the "Work Item Extensions" section as shown below to make your control available to work item form.

       <!--**********************************Work Item Extensions***************************
       ...
    
       Note: For more information on work item extensions use the following topic:
       http://go.microsoft.com/fwlink/?LinkId=816513
       -->
    
       <Extensions>
           <Extension Id="ms-devlabs.color-form-control" />
       </Extensions>
  2. Find your extension ID in the "Work Item Extensions" section:

        <!--**********************************Work Item Extensions***************************
    

Extension: Name: color-form-control Id: ms-devlabs.color-form-control ... ```

  1. This extension is a contribution, so you add it with a contribution tag in place of the tag. This example adds the "ControlContribution" to the "Planning" group.

    <Page Id="Details">
    ...
        <Section>
        ...
            <Group Id="Planning">
            ...
                <ControlContribution Label="Priority" Id="ms-devlabs.color-form-control.color-control-contribution"
                    <Inputs>
                        <Input Id="FieldName" Value="Microsoft.VSTS.Common.Priority" />
                    </Inputs>
                </ControlContribution>
    
                <Control Label="Risk" Type="FieldControl" FieldName="Microsoft.VSTS.Common.Risk" />
  2. Finally, import this .xml file, using witadmin.

    witadmin importwitd /collection:CollectionURL /p:Project /f:FileName
    

Make changes to the control

If you make changes to your extension files, you need to compile the Typescript and create the .vsix file again (steps 4-7 in the "Package & Upload to the marketplace" section).

Instead of re-installing the extension, you can replace the extension with the new .vsix package. Right-click the extension in the "Manage Extensions" page and click "Update". You do not need to make changes to your XML file again.

Make API calls to the work item form service

Reading data from VSTS/TFS server is a common REST API task for a work item control. The VSS SDK provides a set of services for these REST APIs. To use the service, import it into the typescript file.

import * as VSSService from "VSS/Service";
import * as WitService from "TFS/WorkItemTracking/Services";
import * as ExtensionContracts from "TFS/WorkItemTracking/ExtensionContracts";
import * as Q from "q";

To enable Intellisense in Visual Studio Code, include the type definition file index.d.ts. Once you've added this definition file, it shows all functions available in the VSS SDK.

/// <reference path="../typings/index.d.ts" />

Commonly Needed

API Functions Usage
VSSService VSS.getConfiguration() Returns the XML which defines the work item type. Used in the sample to read the inputs of the control to describe its behavior.
WitService getService() Returns an instance of the server to make calls.
getFieldValue() Returns the field's current value.
setFieldValue() Returns the field's current value using your control.
getAllowedFieldValues() Returns the allowed values, or the items in a dropdown, of a field.

How to invoke methods on a service call

Create an instance of the work item service to get information about the work item. Use one of the service's functions to get information about the field. This example asks for the allowed values of a field.

WitService.WorkItemFormService.getservice().then(
        (service) => {
            service.getAllowedFieldValues(this._fieldName), (allowedValues: string[]) => {
                // do something
            }
        }
)

Recommendation: use Q with service calls

To wait on the response of multiple calls, you can use Q. This example shows how to ask for the allowed values and the current value associated with a field using the Q.spread function. You can make two parallel requests, and the code will not be executed until both services have returned a response.

WitService.WorkItemFormService.getService().then(
            (service) => {
                Q.spread<any, any>(
                    [service.getAllowedFieldValues(this._fieldName), service.getFieldValue(this._fieldName)],
                    (allowedValues: string[], currentValue: (string | number)) => {
                        //do something
                    }
                )
            }
)

Structure

/scripts            - Typescript code for extension
/img                - Image assets for extension and description
/typings            - Typescript typings

index.html          - Main entry point
vss-extension.json  - Extension manifest

Grunt

Five basic grunt tasks are defined:

  • build - Compiles TS files in scripts folder
  • package-dev - Builds the development version of the vsix package
  • package-release - Builds the release version of the vsix package
  • publish-dev - Publishes the development version of the extension to the marketplace using tfx-cli
  • publish-release - Publishes the release version of the extension to the marketplace using tfx-cli

VS Code

The included .vscode config allows you to open and build the project using VS Code.

Unit Testing

The project is setup for unit testing using mocha, chai, and the karma test runner. A simple example unit test is included in scripts/logic/messageHelper.tests.ts. To run tests just execute:

grunt test

vsts-extension-color-control's People

Contributors

alychow avatar aminti avatar cschleiden avatar dependabot[bot] avatar joserady avatar madkoo avatar microsoft-github-policy-service[bot] avatar mmanela avatar mohitbagra avatar molausson avatar msftgits avatar nelsondaniel avatar ostreifel avatar witwf-interns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vsts-extension-color-control's Issues

I couldn't work in on-premise

Hi,

I am using Azure DevOps Server 2019 but I couldn't work with this extension.

        <Group Label="Details">
          <ControlContribution Id="ms-devlabs.color-form-control" Label="Priority" >
            <Inputs>
                <Input Id="FieldName" Value="Microsoft.VSTS.Common.Priority" />
            </Inputs>
        </ControlContribution>

error message
The 'Id' attribute is invalid - The value 'ms-devlabs.color-form-control' is invalid according to its datatype 'http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef:ContributionIdType' - The Pattern constraint failed.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.

Product Backlog Item.txt
Capture

[object Object] displayed instead of list options

We use the color control plugin for our Priority field in Azure DevOps. On occasion, instead of listing out the four priority options, we get a javascript looking error that says [object Object]:

image

Our color names and definitions are the following:

image

The error appears intermittently, usually when creating a new work item that hasn't been saved yet.

Colors

The colors are not showing up on the card on the Kapan board. I just see the name of the pic list, not the color that it was assigned to. So when adding in the field on the tile in the Kapan board there is no visual of color just the physical name. that it was selected. Also, there is no way to clear it out. We are trying to use this as a flagging option.

Unable to build node_modules/@types/node/base.d.ts(72,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'Require', but here has type must be of type 'Require', but here has type 'NodeRequire'.

When running grunt package-dev I'm getting the following error -

node_modules/@types/node/base.d.ts(72,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'Require', but here has type must be of type 'Require', but here has type 'NodeRequire'.

Steps to duplicate:

  1. Import project cloned/downloaded from git hub into VS Code
    https://github.com/microsoft/vsts-extension-color-control

  2. Open Terminal in VS Code - cd C:\extensions\vsts-sample-wit-custom-control

  3. Run npm install to install required local dependencies.

  4. Run npm install -g grunt to install a global copy of grunt (unless it's already installed).

  5. Run grunt package-dev.

Getting the error:

node_modules/@types/node/base.d.ts(72,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'Require', but here has type must be of type 'Require', but here has type 'NodeRequire'.

I was having several compile errors until I run through the following -

npm uninstall -g [email protected]
npm i [email protected]
npm install typings --global
typings install --global dt~es6-shim
then I added to tsconfig.json - "lib": ["es2015", "dom"] to compilerOptions .
npm install @types/[email protected] --save-exact
npm i -D @types/[email protected]

Now I'm just dealing with the error above - any help would be appreciated. Using Visual Studio Code.

Thanks

color-form-control by ms-devlabs is taking longer than expected to load.

I am a user of TFS, and when I view any page that has color-form-control by ms-devlabs, I get a warning:
"color-form-control by ms-devlabs is taking longer than expected to load."

It never loads.

this was working two days ago.
Nothing on my machine/browser has changed.
Nothing to my knowledge has been changed on server side.
Cleared browser cache, no help.
Rebooted browser machine, no help.

Any direction is appreciated.

image

backing field does not have allowed values

Hi,

I try to create a selection for the business value, but if i update my work item i have this message :
"The backing field doest not have allowed values, for more information click here"

I follow the screenshot on the business value from this : https://marketplace.visualstudio.com/items?itemName=ms-devlabs.color-form-control&ssr=false#overview
But i haven't the same behavior that the priority field :/

With the priority field i can put a list of values, but with business value no...

i made a mistake somewhere ?

PS: sorry for my bad english

Colors Reference

Where do we find the colors reference for specifying colors other than the examples??

Unable to remove selection

We have the extension implemented and for the most part we like it. However, we often delete the value for the field and leave it empty. That is a specific indicator for us that it needs to be addressed later. With the Color Control, we have no way of 'unpicking' an option.

Expected behavior:
image
If we click on a field that is already selected, we want it to be unselected. Leaving no options selected. The backing field should be empty and nothing should be selected like below.
image

COLOR PICKER IGNORING SPECIFIED LIST COLORS

I have two integer lists for complexity & risk with values that range 1-5.
Regardless of color values I specify, either via HTML name or hex, the color picker is choosing its own colors which are the same for each of these controls.

          <Control Label="Complexity" Type="LabelControl" />
          <ControlContribution Label=" " Id="ms-devlabs.color-form-control.color-control-contribution">
            <Inputs>
              <Input Id="FieldName" Value="ARMS.Complexity" />
              <Input Id="Colors" Value="#f7072f,#f79307,#ebf707,#07aff7,#07f7c3" />
            </Inputs>
          </ControlContribution>
          <Control Label="Risk" Type="LabelControl" />
          <ControlContribution Label=" " Id="ms-devlabs.color-form-control.color-control-contribution">
            <Inputs>
              <Input Id="FieldName" Value="ARMS.Risk" />
              <Input Id="Colors" Value="#f7072f,#f79307,#ebf707,#07aff7,#07f7c3" />
            </Inputs>
          </ControlContribution>

Results in:
2018-01-30 17_24_54-features
2018-01-30 17_24_25-features

TIA!

Extend Look and Feel

Nice Control, and I need it for different fields.
At the moment I use Picklists with string fields to do this.

may be two things to extend:

  1. give an option to render the list as dropdown (I my Case I have 3 of this fields with about 5-7 values nad so it takes a lot of space)
  2. May be make the colors optional means not display a color if you do not fill in values

Thanks

Erik

error while trying to upload extension to market : "The stated category 'Plan and track' is no longer supported."

Problem: When I try to upload extension to official marketplace it gives an error saying that "The stated category 'Plan and track' is no longer supported" and doesn't accept package

Solution: Edit "vss-extension.json" file and replace

"categories": [
"Plan and track"
],

with one of the valid values namely: Azure Repos, Azure Boards, Azure Pipelines, Azure Test Plans, and Azure Artifacts.
Source: https://docs.microsoft.com/en-us/azure/devops/extend/develop/manifest?view=azure-devops

Build Error - TS2403: Subsequent variable declarations must have the same type.

Getting an error when running grunt package-dev. I can manually fix the error, but that just spits out another error.

**grunt package-dev
Running "ts:build" (ts) task
Compiling...
Using tsc v2.6.1
node_modules/@types/node/index.d.ts(73,13): error TS2403: Subsequent variable declarations must have the same type.  Variable 'require' must be of type 'Require', but here has type 'NodeRequire'.
node_modules/@types/react/index.d.ts(165,11): error TS2559: Type 'Component<P, S>' has no properties in common with type 'ComponentLifecycle<P, S>'.
typings/globals/knockout/index.d.ts(6,2): error TS2411: Property 'notifySubscribers' of type '(valueToWrite?: T, event?: string) => void' is not assignable to string index type 'KnockoutBindingHandle
r'.
typings/globals/knockout/index.d.ts(16,2): error TS2411: Property 'equalityComparer' of type '(a: any, b: any) => boolean' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(21,5): error TS2411: Property 'indexOf' of type '(searchElement: T, fromIndex?: number) => number' is not assignable to string index type 'KnockoutBindingHandler'.

typings/globals/knockout/index.d.ts(22,5): error TS2411: Property 'slice' of type '(start: number, end?: number) => T[]' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(23,5): error TS2411: Property 'splice' of type '{ (start: number): T[]; (start: number, deleteCount: number, ...items: T[]): T[]; }' is not assignable to string in
dex type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(25,5): error TS2411: Property 'pop' of type '() => T' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(26,5): error TS2411: Property 'push' of type '(...items: T[]) => void' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(27,5): error TS2411: Property 'shift' of type '() => T' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(28,5): error TS2411: Property 'unshift' of type '(...items: T[]) => number' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(29,5): error TS2411: Property 'reverse' of type '() => KnockoutObservableArray<T>' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(30,5): error TS2411: Property 'sort' of type '{ (): KnockoutObservableArray<T>; (compareFunction: (left: T, right: T) => number): KnockoutObser...' is not assignab
le to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(36,5): error TS2411: Property 'replace' of type '(oldItem: T, newItem: T) => void' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(38,5): error TS2411: Property 'remove' of type '{ (item: T): T[]; (removeFunction: (item: T) => boolean): T[]; }' is not assignable to string index type 'KnockoutB
indingHandler'.
typings/globals/knockout/index.d.ts(40,5): error TS2411: Property 'removeAll' of type '{ (items: T[]): T[]; (): T[]; }' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(43,5): error TS2411: Property 'destroy' of type '{ (item: T): void; (destroyFunction: (item: T) => boolean): void; }' is not assignable to string index type 'Knock
outBindingHandler'.
typings/globals/knockout/index.d.ts(45,5): error TS2411: Property 'destroyAll' of type '{ (items: T[]): void; (): void; }' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(60,2): error TS2411: Property 'subscribe' of type '{ (callback: (newValue: T) => void, target?: any, event?: string): KnockoutSubscription; <TEvent>...' is not ass
ignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(62,2): error TS2411: Property 'extend' of type '(requestedExtenders: { [key: string]: any; }) => KnockoutSubscribable<T>' is not assignable to string index type 'K
nockoutBindingHandler'.
typings/globals/knockout/index.d.ts(63,2): error TS2411: Property 'getSubscriptionsCount' of type '() => number' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(77,2): error TS2411: Property 'dispose' of type '() => void' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(78,2): error TS2411: Property 'isActive' of type '() => boolean' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(79,2): error TS2411: Property 'getDependenciesCount' of type '() => number' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(80,5): error TS2411: Property 'extend' of type '(requestedExtenders: { [key: string]: any; }) => KnockoutComputed<T>' is not assignable to string index type 'Knock
outBindingHandler'.
typings/globals/knockout/index.d.ts(90,5): error TS2411: Property 'extend' of type '(requestedExtenders: { [key: string]: any; }) => KnockoutObservableArray<T>' is not assignable to string index type
 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(103,2): error TS2411: Property 'peek' of type '() => T' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(104,2): error TS2411: Property 'valueHasMutated' of type '() => void' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(105,2): error TS2411: Property 'valueWillMutate' of type '() => void' is not assignable to string index type 'KnockoutBindingHandler'.
typings/globals/knockout/index.d.ts(106,5): error TS2411: Property 'extend' of type '(requestedExtenders: { [key: string]: any; }) => KnockoutObservable<T>' is not assignable to string index type 'Kn
ockoutBindingHandler'.
typings/globals/vss/index.d.ts(3247,14): error TS2559: Type 'TemplateViewModel' has no properties in common with type 'EnhancementOptions'.
typings/globals/vss/index.d.ts(9305,14): error TS2415: Class 'ComboDateBehavior' incorrectly extends base class 'BaseComboBehavior'.
  Types of property 'getValue' are incompatible.
    Type '() => Date' is not assignable to type '<TValue>() => TValue'.
      Type 'Date' is not assignable to type 'TValue'.
typings/globals/vss/index.d.ts(9385,14): error TS2415: Class 'ComboMultiValueBehavior' incorrectly extends base class 'ComboListBehavior'.
  Types of property 'getValue' are incompatible.
    Type '() => string[]' is not assignable to type '<TValue>() => TValue'.
      Type 'string[]' is not assignable to type 'TValue'.
typings/globals/vss/index.d.ts(9551,14): error TS2417: Class static side 'typeof DialogO' incorrectly extends base class static side 'typeof AjaxPanelO'.
  Types of property 'create' are incompatible.
    Type '<T extends Dialog>(dialogType: new (options: any) => T, options?: any) => T' is not assignable to type '<TControl extends Control<any>, TOptions>(controlType: new (options: TOptions) => TCo
ntrol, conta...'.
      Types of parameters 'dialogType' and 'controlType' are incompatible.
        Type 'new (options: TOptions) => TControl' is not assignable to type 'new (options: any) => Dialog'.
          Type 'TControl' is not assignable to type 'Dialog'.
            Type 'Control<any>' is not assignable to type 'Dialog'.
              Property '_title' is missing in type 'Control<any>'.

>> 34 non-emit-preventing type warnings
>> Error: tsc return code: 2
Warning: Task "ts:build" failed. Use --force to continue.

Aborted due to warnings.

Color picklist control by Microsoft DevLabs failed to load.

Some of the guest users to our Azure DevOps Services ("cloud") organization are coming across the below error when trying to load a work item type that contains the custom Color picklist control.

The error message they are receiving is, "Color picklist control by Microsoft DevLabs failed to load."

Our internal users and other guest users have not been able to reproduce this issue. Guest users are users who are guest accounts on the Azure Active Directory our DevOps collection is connected to.

Any troubleshooting steps for this issue, along with common reasons why the multivalue control fails to load, would be much appreciated!

We've had the guest users try multiple different browsers (Edge, IE, Chrome, and Firefox), InPrivate browsing mode, and clearing all browser data to no avail.

failed to load

Business value

When I try to use it with Business Value I get : The backing field does not have allowed values

With priority it is OK

Color Control Read-only

Is there a way to make this color picklist control read-only? I would want to set the field value and color based on the value of another field

Conflicting Global Lists

Applies to Azure DevOps Services. If you use the extension on a field reference, and that field reference is used across multiple work items, then the list of field values and colors is combined. Work item template definitions should be modularized and should not combine global list values from different work item template definitions.

Unable to build

Hello, I'm quite new to VS Code, NPM and typescript projects, so I'm stumbling my way through this. I spent a couple of hours trying to get this to build. I got a lot of warnings about out of date packages, so I updated the versions in package.json.

It would be fantastic if someone could nudge me in the right direction.

`grunt package-dev
Running "ts:build" (ts) task
Compiling...
Using tsc v2.9.2
node_modules/@types/jquery/index.d.ts(33,14): error TS2300: Duplicate identifier 'jQuery'.
node_modules/@types/jquery/index.d.ts(40,15): error TS2451: Cannot redeclare block-scoped variable 'jQuery'.
node_modules/@types/jquery/index.d.ts(41,15): error TS2451: Cannot redeclare block-scoped variable '$'.
node_modules/@types/jquery/index.d.ts(51,5): error TS2717: Subsequent property declarations must have the same type. Property 'ajaxSettings' must be of type 'JQueryAjaxSettings', but here has type 'AjaxSettings'.
node_modules/@types/jquery/index.d.ts(61,5): error TS2717: Subsequent property declarations must have the same type. Property 'Deferred' must be of type '(beforeStart?: (deferred: JQueryDeferred) => any) => JQueryDeferred', but here has type 'DeferredStatic'.
node_modules/@types/jquery/index.d.ts(62,5): error TS2717: Subsequent property declarations must have the same type. Property 'Event' must be of type 'JQueryEventConstructor', but here has type 'EventStatic'.
node_modules/@types/jquery/index.d.ts(71,5): error TS2717: Subsequent property declarations must have the same type. Property 'cssHooks' must be of type '{ [key: string]: any; }', but here has type 'PlainObject<CSSHook>'.
node_modules/@types/jquery/index.d.ts(79,5): error TS2717: Subsequent property declarations must have the same type. Property 'cssNumber' must be of type 'any', but here has type 'PlainObject'.
node_modules/@types/jquery/index.d.ts(81,14): error TS2687: All declarations of 'fn' must have identical modifiers.
node_modules/@types/jquery/index.d.ts(81,14): error TS2717: Subsequent property declarations must have the same type. Property 'fn' must be of type 'any', but here has type 'JQuery'.
node_modules/@types/jquery/index.d.ts(82,5): error TS2717: Subsequent property declarations must have the same type. Property 'fx' must be of type '{ tick: () => void; interval: number; stop: () => void; speeds: { slow: number; fast: number; }; ...', but here has type '{ interval: number; off: boolean; step: PlainObject<AnimationHook>; }'.
node_modules/@types/jquery/index.d.ts(229,5): error TS2717: Subsequent property declarations must have the same type. Property 'support' must be of type 'JQuerySupport', but here has type 'PlainObject'.
node_modules/@types/jquery/index.d.ts(6183,5): error TS2300: Duplicate identifier 'param'.
node_modules/@types/jquery/index.d.ts(55666,5): error TS2375: Duplicate number index signature.
node_modules/@types/jquery/index.d.ts(62411,5): error TS2374: Duplicate string index signature.
node_modules/@types/knockout/index.d.ts(237,5): error TS2717: Subsequent property declarations must have the same type. Property 'init' must be of type '(element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewM...', but here has type '(element: E, valueAccessor: () => V, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel:...'.
node_modules/@types/knockout/index.d.ts(238,5): error TS2717: Subsequent property declarations must have the same type. Property 'update' must be of type '(element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewM...', but here has type '(element: E, valueAccessor: () => V, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel:...'.
node_modules/@types/knockout/index.d.ts(245,5): error TS2374: Duplicate string index signature.
node_modules/@types/knockout/index.d.ts(322,5): error TS2717: Subsequent property declarations must have the same type. Property 'domData' must be of type '{ get(node: Element, key: string): any; set(node: Element, key: string, value: any): void; getAll...', but here has type '{ get(node: Node, key: string): any; set(node: Node, key: string, value: any): void; getAll(node:...'.
node_modules/@types/knockout/index.d.ts(336,5): error TS2717: Subsequent property declarations must have the same type. Property 'domNodeDisposal' must be of type '{ addDisposeCallback(node: Element, callback: Function): void; removeDisposeCallback(node: Elemen...', but here has type '{ addDisposeCallback(node: Node, callback: Function): void; removeDisposeCallback(node: Node, cal...'.
node_modules/@types/knockout/index.d.ts(421,5): error TS2717: Subsequent property declarations must have the same type. Property 'status' must be of type 'string', but here has type '"added" | "deleted" | "retained"'.
node_modules/@types/knockout/index.d.ts(662,5): error TS2717: Subsequent property declarations must have the same type. Property 'selectExtensions' must be of type '{ readValue(element: HTMLElement): any; writeValue(element: HTMLElement, value: any): void; }', but here has type '{ readValue(element: HTMLElement): any; writeValue(element: HTMLElement, value: any, allowUnset?:...'.
node_modules/@types/knockout/index.d.ts(784,14): error TS2300: Duplicate identifier 'ko'.
node_modules/@types/node/index.d.ts(243,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'Require', but here has type 'NodeRequire'.
node_modules/@types/node/index.d.ts(815,38): error TS2304: Cannot find name 'Set'.
node_modules/@types/node/index.d.ts(7170,5): error TS2300: Duplicate identifier 'export='.
node_modules/@types/react/index.d.ts(27,22): error TS2307: Cannot find module 'csstype'.
node_modules/@types/requirejs/index.d.ts(38,11): error TS2300: Duplicate identifier 'mod'.
node_modules/@types/requirejs/index.d.ts(100,2): error TS2717: Subsequent property declarations must have the same type. Property 'shim' must be of type '{ [key: string]: RequireShim; }', but here has type '{ [key: string]: string[] | RequireShim; }'.
node_modules/@types/requirejs/index.d.ts(215,2): error TS2717: Subsequent property declarations must have the same type. Property 'urlArgs' must be of type 'string', but here has type 'string | ((id: string, url: string) => string)'.
scripts/app.ts(32,1): error TS2304: Cannot find name 'VSS'.
scripts/app.ts(32,14): error TS2304: Cannot find name 'VSS'.
scripts/control.ts(51,24): error TS2304: Cannot find name 'VSS'.
scripts/control.ts(57,21): error TS2345: Argument of type 'Promise[]' is not assignable to parameter of type 'IPromise[]'.
Type 'Promise' is not assignable to type 'IPromise'.
Types of property 'then' are incompatible.
Type '<TResult1 = Object, TResult2 = never>(onfulfilled?: (value: Object) => TResult1 | PromiseLike<TRe...' is not assignable to type '(onFulfill?: (value: any) => U | IPromise, onReject?: (error: any) => U | IPromise) => I...'.
Types of parameters 'onfulfilled' and 'onFulfill' are incompatible.
Type 'U | IPromise' is not assignable to type 'U | PromiseLike'.
Type 'IPromise' is not assignable to type 'U | PromiseLike'.
Type 'IPromise' is not assignable to type 'PromiseLike'.
Types of property 'then' are incompatible.
Type '(onFulfill?: (value: U) => U | IPromise, onReject?: (error: any) => U | IPromise) => IPr...' is not assignable to type '<TResult1 = U, TResult2 = never>(onfulfilled?: (value: U) => TResult1 | PromiseLike, on...'.
Types of parameters 'onFulfill' and 'onfulfilled' are incompatible.
Type 'TResult1 | PromiseLike' is not assignable to type 'TResult2 | IPromise'.
Type 'TResult1' is not assignable to type 'TResult2 | IPromise'.
Type 'TResult1' is not assignable to type 'IPromise'.
scripts/control.ts(113,9): error TS2304: Cannot find name 'VSS'.
typings/globals/jquery/index.d.ts(3,11): error TS2430: Interface 'JQueryAjaxSettings' incorrectly extends interface 'AjaxSettings'.
Types of property 'beforeSend' are incompatible.
Type '(jqXHR: JQueryXHR, settings: JQueryAjaxSettings) => any' is not assignable to type '(this: any, jqXHR: jqXHR, settings: AjaxSettings) => false | void'.
Types of parameters 'jqXHR' and 'jqXHR' are incompatible.
Type 'jqXHR' is not assignable to type 'JQueryXHR'.
Property 'error' is missing in type 'jqXHR'.
typings/globals/jquery/index.d.ts(147,11): error TS2320: Interface 'JQueryXHR' cannot simultaneously extend types 'JQueryPromise' and 'jqXHR'.
Named property 'always' of types 'JQueryPromise' and 'jqXHR' are not identical.
typings/globals/jquery/index.d.ts(147,11): error TS2320: Interface 'JQueryXHR' cannot simultaneously extend types 'JQueryPromise' and 'jqXHR'.
Named property 'catch' of types 'JQueryPromise' and 'jqXHR' are not identical.
typings/globals/jquery/index.d.ts(147,11): error TS2320: Interface 'JQueryXHR' cannot simultaneously extend types 'JQueryPromise' and 'jqXHR'.
Named property 'done' of types 'JQueryPromise' and 'jqXHR' are not identical.
typings/globals/jquery/index.d.ts(147,11): error TS2320: Interface 'JQueryXHR' cannot simultaneously extend types 'JQueryPromise' and 'jqXHR'.
Named property 'fail' of types 'JQueryPromise' and 'jqXHR' are not identical.
typings/globals/jquery/index.d.ts(147,11): error TS2320: Interface 'JQueryXHR' cannot simultaneously extend types 'JQueryPromise' and 'jqXHR'.
Named property 'pipe' of types 'JQueryPromise' and 'jqXHR' are not identical.
typings/globals/jquery/index.d.ts(147,11): error TS2320: Interface 'JQueryXHR' cannot simultaneously extend types 'JQueryPromise' and 'jqXHR'.
Named property 'progress' of types 'JQueryPromise' and 'jqXHR' are not identical.
typings/globals/jquery/index.d.ts(147,11): error TS2320: Interface 'JQueryXHR' cannot simultaneously extend types 'JQueryPromise' and 'jqXHR'.
Named property 'state' of types 'JQueryPromise' and 'jqXHR' are not identical.
typings/globals/jquery/index.d.ts(147,11): error TS2320: Interface 'JQueryXHR' cannot simultaneously extend types 'XMLHttpRequest' and 'jqXHR'.
Named property 'responseXML' of types 'XMLHttpRequest' and 'jqXHR' are not identical.
typings/globals/jquery/index.d.ts(175,11): error TS2430: Interface 'JQueryCallback' incorrectly extends interface 'Callbacks'.
Types of property 'add' are incompatible.
Type '{ (callbacks: Function): JQueryCallback; (callbacks: Function[]): JQueryCallback; }' is not assignable to type '(callback: TypeOrArray, ...callbacks: TypeOrArray[]) => this'.
Type 'JQueryCallback' is not assignable to type 'this'.
typings/globals/jquery/index.d.ts(290,11): error TS2320: Interface 'JQueryPromise' cannot simultaneously extend types 'JQueryGenericPromise' and 'Promise<T, any, any>'.
Named property 'then' of types 'JQueryGenericPromise' and 'Promise<T, any, any>' are not identical.
typings/globals/jquery/index.d.ts(330,11): error TS2320: Interface 'JQueryDeferred' cannot simultaneously extend types 'JQueryGenericPromise' and 'Deferred<T, any, any>'.
Named property 'then' of types 'JQueryGenericPromise' and 'Deferred<T, any, any>' are not identical.
typings/globals/jquery/index.d.ts(541,11): error TS2430: Interface 'JQueryAnimationOptions' incorrectly extends interface 'EffectsOptions'.
Types of property 'complete' are incompatible.
Type 'Function' is not assignable to type '(this: Element) => void'.
Type 'Function' provides no match for the signature '(this: Element): void'.
typings/globals/jquery/index.d.ts(689,5): error TS2300: Duplicate identifier 'param'.
typings/globals/jquery/index.d.ts(936,5): error TS2687: All declarations of 'fn' must have identical modifiers.
typings/globals/jquery/index.d.ts(3214,14): error TS2300: Duplicate identifier 'jQuery'.
typings/globals/jquery/index.d.ts(3216,13): error TS2451: Cannot redeclare block-scoped variable 'jQuery'.
typings/globals/jquery/index.d.ts(3217,13): error TS2451: Cannot redeclare block-scoped variable '$'.
typings/globals/knockout/index.d.ts(671,11): error TS2300: Duplicate identifier 'ko'.
typings/globals/require/index.d.ts(9,11): error TS2300: Duplicate identifier 'export='.
typings/globals/require/index.d.ts(9,11): error TS2300: Duplicate identifier 'mod'.

56 non-emit-preventing type warnings
Error: tsc return code: 2
Warning: Task "ts:build" failed. Use --force to continue.

Aborted due to warnings.`

Colour names/definitions

I was wondering which set of colour names is defined for this control?

I am trying to work out the best colours to use but not sure what all of the options are or where they are defined.

Ideally, I'd like to know the names of the below colours (from the query charts):
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.