azure-boards-ui 2.236.0 → 2.237.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Common/ColorUtilities.js +1 -1
- package/Common/ColorUtilities.min.js +1 -1
- package/Components/WorkItemState/WorkItemState.Props.js +1 -0
- package/Components/WorkItemState/WorkItemState.js +2 -2
- package/Components/WorkItemState/WorkItemState.min.js +1 -1
- package/Components/WorkItemTypeIcon/WorkItemTypeIcon.js +1 -1
- package/Components/WorkItemTypeIcon/WorkItemTypeIcon.min.js +1 -1
- package/package.json +4 -4
package/Common/ColorUtilities.js
CHANGED
|
@@ -30,7 +30,7 @@ export function parseColor(rawColor, alphaRequired, defaultColor) {
|
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
32
|
// remove transparency
|
|
33
|
-
rawColor = "#"
|
|
33
|
+
rawColor = "#".concat(rawColor.substring(rawColor.length - 6));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
return rawColor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var COLOR_TRANSPARENT="transparent",COLOR_WHITE="ffffff",hexColorMatcher=/^[0-9a-fA-F]+$/;function parseColor(r,t,e){return void 0===t&&(t=!1),void 0===e&&(e=COLOR_WHITE),r=8===(r=3!==(r="undefined"===(r="#"===(r=r||e)[0]?r.substring(1):r)?e:r).length&&4!==r.length&&6!==r.length||!hexColorMatcher.test(r)?r:"#"+r).length&&hexColorMatcher.test(r)?t?"#"+r:"#"
|
|
1
|
+
var COLOR_TRANSPARENT="transparent",COLOR_WHITE="ffffff",hexColorMatcher=/^[0-9a-fA-F]+$/;function parseColor(r,t,e){return void 0===t&&(t=!1),void 0===e&&(e=COLOR_WHITE),r=8===(r=3!==(r="undefined"===(r="#"===(r=r||e)[0]?r.substring(1):r)?e:r).length&&4!==r.length&&6!==r.length||!hexColorMatcher.test(r)?r:"#"+r).length&&hexColorMatcher.test(r)?t?"#"+r:"#".concat(r.substring(r.length-6)):r}function hexToRgb(r){if(7!==r.length||"#"!==r[0])throw new Error("Expected color in format #aabbcc");return[parseInt(r.substr(1,2),16),parseInt(r.substr(3,2),16),parseInt(r.substr(5,2),16)]}export{COLOR_TRANSPARENT,COLOR_WHITE,parseColor,hexToRgb};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -44,11 +44,11 @@ function getBorderColor(stateFillColor) {
|
|
|
44
44
|
}
|
|
45
45
|
function parseStateBorderColor(rawColor) {
|
|
46
46
|
if (rawColor.startsWith("var(")) {
|
|
47
|
-
return "rgba("
|
|
47
|
+
return "rgba(".concat(rawColor, ", 0.3)");
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
50
50
|
var borderColorHex = parseColor(rawColor);
|
|
51
51
|
var borderColorRGB = hexToRgb(borderColorHex);
|
|
52
|
-
return "rgba("
|
|
52
|
+
return "rgba(".concat(borderColorRGB[0], ", ").concat(borderColorRGB[1], ", ").concat(borderColorRGB[2], ", 0.3)");
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign}from"tslib";import"azure-devops-ui/CommonImports";import"azure-devops-ui/Core/core.css";import"./WorkItemState.css";import*as React from"react";import{getId}from"azure-devops-ui/Core/Util/Object";import{Observer}from"azure-devops-ui/Observer";import{Tooltip}from"azure-devops-ui/TooltipEx";import{css}from"azure-devops-ui/Util";import{COLOR_TRANSPARENT,COLOR_WHITE,hexToRgb,parseColor}from"../../Common/ColorUtilities";var DefaultWorkItemStateColor="5688E0",WorkItemState=function(e){var a,t=e.data,i=e.className,l=e.hideText;return t?(a=getId("work-item-state-color-tooltip"),React.createElement(Observer,{data:t},function(e){var t=e.data.name,e=e.data.fill||DefaultWorkItemStateColor,r=parseColor(e),e=getBorderColor(e),o=l?{"aria-label":t}:void 0,r=React.createElement("div",__assign({className:css("work-item-state-circle",!l&&"withText"),style:{backgroundColor:r,borderColor:e}},o));return React.createElement("div",{className:css("wit-ui-control work-item-state",i)},l?React.createElement(Tooltip,{id:a,text:t,addAriaDescribedBy:!0},r):r,!l&&React.createElement(Tooltip,{id:a,overflowOnly:!0,text:t},React.createElement("div",{className:"work-item-state-name"},React.createElement("span",null,t))))})):null};function getBorderColor(e){return parseStateBorderColor(e===COLOR_WHITE||e===COLOR_TRANSPARENT?DefaultWorkItemStateColor:e)}function parseStateBorderColor(e){return e.startsWith("var(")?"rgba("
|
|
1
|
+
import{__assign}from"tslib";import"azure-devops-ui/CommonImports";import"azure-devops-ui/Core/core.css";import"./WorkItemState.css";import*as React from"react";import{getId}from"azure-devops-ui/Core/Util/Object";import{Observer}from"azure-devops-ui/Observer";import{Tooltip}from"azure-devops-ui/TooltipEx";import{css}from"azure-devops-ui/Util";import{COLOR_TRANSPARENT,COLOR_WHITE,hexToRgb,parseColor}from"../../Common/ColorUtilities";var DefaultWorkItemStateColor="5688E0",WorkItemState=function(e){var a,t=e.data,i=e.className,l=e.hideText;return t?(a=getId("work-item-state-color-tooltip"),React.createElement(Observer,{data:t},function(e){var t=e.data.name,e=e.data.fill||DefaultWorkItemStateColor,r=parseColor(e),e=getBorderColor(e),o=l?{"aria-label":t}:void 0,r=React.createElement("div",__assign({className:css("work-item-state-circle",!l&&"withText"),style:{backgroundColor:r,borderColor:e}},o));return React.createElement("div",{className:css("wit-ui-control work-item-state",i)},l?React.createElement(Tooltip,{id:a,text:t,addAriaDescribedBy:!0},r):r,!l&&React.createElement(Tooltip,{id:a,overflowOnly:!0,text:t},React.createElement("div",{className:"work-item-state-name"},React.createElement("span",null,t))))})):null};function getBorderColor(e){return parseStateBorderColor(e===COLOR_WHITE||e===COLOR_TRANSPARENT?DefaultWorkItemStateColor:e)}function parseStateBorderColor(e){return e.startsWith("var(")?"rgba(".concat(e,", 0.3)"):(e=parseColor(e),e=hexToRgb(e),"rgba(".concat(e[0],", ").concat(e[1],", ").concat(e[2],", 0.3)"))}export{WorkItemState};
|
|
@@ -25,7 +25,7 @@ export function getWorkItemTypeIconProps(props) {
|
|
|
25
25
|
var data = props.data, className = props.className, size = props.size, suppressAriaLabel = props.suppressAriaLabel, suppressTooltip = props.suppressTooltip;
|
|
26
26
|
var showDefault = !data || data.icon === "__default__" || data.color === "__default__";
|
|
27
27
|
var iconClassName = data && ICONNAME_TO_CLASSNAME_MAPPINGS[data.icon];
|
|
28
|
-
var iconName = showDefault || !iconClassName ? "ClipboardSolid" : "bowtie-icon bowtie-"
|
|
28
|
+
var iconName = showDefault || !iconClassName ? "ClipboardSolid" : "bowtie-icon bowtie-".concat(iconClassName);
|
|
29
29
|
var iconColor = (!showDefault && parseColor(data.color)) || undefined;
|
|
30
30
|
var workItemTypeName = (data && data.workItemTypeName) || "";
|
|
31
31
|
var tooltipHostId = getId("work-item-type-icon-tooltip");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign}from"tslib";import"azure-devops-ui/CommonImports";import"azure-devops-ui/Core/core.css";import"./WorkItemTypeIcon.css";import*as React from"react";import{getId}from"azure-devops-ui/Core/Util/Object";import{Icon}from"azure-devops-ui/Icon";import{Observer}from"azure-devops-ui/Observer";import{css}from"azure-devops-ui/Util";import{parseColor}from"../../Common/ColorUtilities";import{TypeIconSize}from"./WorkItemTypeIcon.Props";var WorkItemTypeIcon=function(e){return React.createElement(Observer,{data:e.data},function(o){o=o.data;return React.createElement(Icon,__assign({},getWorkItemTypeIconProps(__assign(__assign({},e),{data:o}))))})};function getWorkItemTypeIconProps(o){var e=o.data,s=o.className,t=o.size,i=o.suppressAriaLabel,o=o.suppressTooltip,r=!e||"__default__"===e.icon||"__default__"===e.color,n=e&&ICONNAME_TO_CLASSNAME_MAPPINGS[e.icon],c=r||!n?"ClipboardSolid":"bowtie-icon bowtie-"
|
|
1
|
+
import{__assign}from"tslib";import"azure-devops-ui/CommonImports";import"azure-devops-ui/Core/core.css";import"./WorkItemTypeIcon.css";import*as React from"react";import{getId}from"azure-devops-ui/Core/Util/Object";import{Icon}from"azure-devops-ui/Icon";import{Observer}from"azure-devops-ui/Observer";import{css}from"azure-devops-ui/Util";import{parseColor}from"../../Common/ColorUtilities";import{TypeIconSize}from"./WorkItemTypeIcon.Props";var WorkItemTypeIcon=function(e){return React.createElement(Observer,{data:e.data},function(o){o=o.data;return React.createElement(Icon,__assign({},getWorkItemTypeIconProps(__assign(__assign({},e),{data:o}))))})};function getWorkItemTypeIconProps(o){var e=o.data,s=o.className,t=o.size,i=o.suppressAriaLabel,o=o.suppressTooltip,r=!e||"__default__"===e.icon||"__default__"===e.color,n=e&&ICONNAME_TO_CLASSNAME_MAPPINGS[e.icon],c=r||!n?"ClipboardSolid":"bowtie-icon bowtie-".concat(n),a=!r&&parseColor(e.color)||void 0,e=e&&e.workItemTypeName||"",l=getId("work-item-type-icon-tooltip");return{iconName:r||!n?c:void 0,className:css("work-item-type-icon",s,getSizeCssClass(t),r?"default":c),ariaDescribedBy:l,ariaLabel:i?void 0:e,style:{color:a},tooltipProps:o?void 0:{id:l,text:e}}}function getSizeCssClass(o){switch(o){case TypeIconSize.small:return"small";case TypeIconSize.large:return"large";default:TypeIconSize.normal;return"normal"}}var ICONNAME_TO_CLASSNAME_MAPPINGS={icon_crown:"symbol-crown",icon_trophy:"symbol-trophy",icon_list:"symbol-list",icon_book:"symbol-book",icon_sticky_note:"symbol-stickynote",icon_clipboard:"symbol-task",icon_insect:"symbol-bug",icon_traffic_cone:"symbol-impediment",icon_chat_bubble:"symbol-review",icon_flame:"symbol-flame",icon_megaphone:"symbol-ask",icon_test_plan:"test-plan",icon_test_suite:"test-suite",icon_test_case:"test-case",icon_test_step:"test-step",icon_test_parameter:"test-parameter",icon_code_review:"symbol-review-request",icon_code_response:"symbol-review-response",icon_review:"symbol-feedback-request",icon_response:"symbol-feedback-response",icon_ribbon:"symbol-ribbon",icon_chart:"symbol-finance",icon_headphone:"symbol-headphone",icon_key:"symbol-key",icon_airplane:"symbol-airplane",icon_car:"symbol-car",icon_diamond:"symbol-diamond",icon_asterisk:"symbol-asterisk",icon_database_storage:"symbol-storage-database",icon_government:"symbol-government",icon_gavel:"symbol-decision",icon_parachute:"symbol-parachute",icon_paint_brush:"symbol-paint-brush",icon_palette:"symbol-color-palette",icon_gear:"settings-gear",icon_check_box:"status-success-box",icon_gift:"package-fill",icon_test_beaker:"test-fill",icon_broken_lightbulb:"symbol-defect",icon_clipboard_issue:"symbol-issue",icon_github:"brand-github",icon_pull_request:"tfvc-pull-request",icon_github_issue:"status-error-outline"};export{WorkItemTypeIcon,getWorkItemTypeIconProps};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azure-boards-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.237.0",
|
|
4
4
|
"description": "React components for building web UI in Azure Boards",
|
|
5
5
|
"author": "Microsoft Corporation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://developer.microsoft.com/azure-devops",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"azure-devops-ui": "2.
|
|
14
|
-
"tslib": "~
|
|
13
|
+
"azure-devops-ui": "2.237.0",
|
|
14
|
+
"tslib": "~2.6.2"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": "^16.8.1",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"sass": "^1.56.1",
|
|
31
31
|
"sassdoc": "^2.7.4",
|
|
32
32
|
"shelljs": "~0.8.5",
|
|
33
|
-
"typescript": "
|
|
33
|
+
"typescript": "4.5.2",
|
|
34
34
|
"uglify-js": "~3.17.4"
|
|
35
35
|
},
|
|
36
36
|
"overrides": {
|