diff --git a/docs/_data/apitree.json b/docs/_data/apitree.json index 9fcaf9e6..eb5e4a01 100644 --- a/docs/_data/apitree.json +++ b/docs/_data/apitree.json @@ -18,6 +18,7 @@ "Props", "Snapshot", "State", + "themePalettes", "use" ], "sanddance-react": [ diff --git a/docs/app/css/sanddance-app.css b/docs/app/css/sanddance-app.css index 013ace6a..0f206149 100644 --- a/docs/app/css/sanddance-app.css +++ b/docs/app/css/sanddance-app.css @@ -92,28 +92,37 @@ height: 24px; } .sanddance-explorer-topbar { + border-bottom: 1px solid #ccc; display: grid; grid-template-columns: 250px auto; } +.sanddance-explorer-topbar > div { + align-self: center; } + .sanddance-explorer-topbar .logo { color: #0078d4; - padding-top: 4px; } + display: grid; + grid-template-columns: 50px auto; + height: 24px; } .sanddance-explorer-topbar .logo i { font-size: 24px; - margin-left: 12px; - margin-right: 8px; } + margin-left: 12px; } -.sanddance-explorer-topbar .logo span { +.sanddance-explorer-topbar .logo a { + color: inherit; font-size: 14px; font-weight: bold; - position: relative; - top: -6px; } + line-height: 24px; + text-decoration: none; } .sanddance-explorer-topbar button { margin-right: 1em; min-width: unset; } +.dark-theme .sanddance-explorer-topbar .logo { + color: #00b4f0; } + .sanddance-group { border-top: 1px solid #ccc; padding-bottom: 1.5em; @@ -155,7 +164,7 @@ background-color: #f9f9f9; bottom: 0; display: grid; - grid-template-areas: "stats stats" "tabs bar"; + grid-template-areas: "stats stats" "tabs bar"; grid-template-columns: 50px auto; grid-template-rows: 0fr auto; overflow: hidden; @@ -192,9 +201,6 @@ .sanddance-sidebar.closed { width: 50px; } -.sanddance-sidebar.calculator { - position: relative; } - .sanddance-sidebar.calculator .calculating { background: rgba(249, 249, 249, 0.5); height: 100%; @@ -207,6 +213,19 @@ position: relative; top: 50%; } +.dark-theme .sanddance-sidebar { + background-color: #272727; + color: #fff; } + +.dark-theme .sanddance-sidebar .vbuttons { + background-color: rgba(0, 0, 0, 0.4); } + +.dark-theme .sanddance-sidebar .vbutton.selected { + background-color: #272727; } + +.dark-theme .sanddance-sidebar.calculator .calculating { + background: rgba(39, 39, 39, 0.5); } + .sanddance-datascope { grid-area: stats; background-color: rgba(0, 0, 0, 0.05); @@ -241,13 +260,27 @@ width: 33.333%; } .sanddance-datascope .datascope-button:hover { - background-color: #eff6fc; } + background-color: #0078d4; + color: #fff; } .sanddance-datascope .datascope-button label { cursor: inherit; } .sanddance-datascope.active .datascope-button.selected { - border-color: #000; } + border-color: #0078d4; } + +.dark-theme .sanddance-datascope { + background-color: rgba(0, 0, 0, 0.3); + border-bottom-color: rgba(255, 255, 255, 0.1); } + +.dark-theme .sanddance-datascope .datascope-button { + background-color: #000; + border-color: rgba(255, 255, 255, 0.2); + color: #fff; } + +.dark-theme .sanddance-datascope .datascope-button:hover { + background-color: #0078d4; + color: #fff; } .sanddance-dataItem { background-color: #fff; @@ -261,7 +294,8 @@ word-break: break-all; } .sanddance-dataItem .name-value:hover { - background-color: #eff6fc; } + background-color: #0078d4; + color: #fff; } .sanddance-dataItem .name-value:first-child { border-top: none; } @@ -272,6 +306,16 @@ .sanddance-dataItem .bing-search { text-align: right; } +.dark-theme .sanddance-dataItem { + background-color: #000; + border-color: #222; } + +.dark-theme .sanddance-dataItem .name-value { + border-top-color: #222; } + +.dark-theme .sanddance-dataItem a { + color: #00b4f0; } + .sanddance-dataIndex .index { display: grid; grid-template-columns: 32px auto 32px; @@ -313,6 +357,10 @@ .sanddance-search .search-field { margin-top: 4px; } +.dark-theme .sanddance-search .sanddance-search-expression { + background-color: rgba(0, 0, 0, 0.9); + border-color: rgba(255, 255, 255, 0.2); } + .sanddance-snapshots .snapshot { cursor: pointer; margin-top: 0.5em; @@ -356,67 +404,69 @@ font-size: 13px; grid-template-rows: 50px auto; } -.sanddance-explorer-topbar { - border-bottom: 1px solid #ccc; - padding-top: 8px; } +.sanddance-explorer.dark-theme { + background-color: black; } -.wide { +.sanddance-explorer.dark-theme canvas { + background-color: black; } + +.sanddance-main { display: grid; position: relative; transition: grid-template-columns 350ms cubic-bezier(0.4, 0, 0.2, 1); } -.wide .loading { +.sanddance-main .loading { grid-row-end: span 2; position: relative; } -.wide .loading .ms-Spinner { +.sanddance-main .loading .ms-Spinner { position: absolute; top: 50%; width: 100%; } -.wide .sanddance-view { +.sanddance-main .sanddance-view { display: grid; position: relative; } -.wide .sanddance-layout-unpinned, .wide .sanddance-layout-pinned { +.sanddance-main .sanddance-layout-unpinned, .sanddance-main .sanddance-layout-pinned { position: absolute; top: 0; left: 0; right: 150px; bottom: 0; } -.wide .sanddance-layout-pinned { +.sanddance-main .sanddance-layout-pinned { left: 250px; } -.wide .sanddance-ReactViewer { +.sanddance-main .sanddance-ReactViewer { position: absolute; top: 0; left: -150px; bottom: 0; right: 0; } -.wide.show-center .sanddance-layout-unpinned, .wide.show-center .sanddance-layout-pinned { +.sanddance-main.show-center .sanddance-layout-unpinned, .sanddance-main.show-center .sanddance-layout-pinned { background: linear-gradient(to right, transparent 49%, rgba(255, 0, 255, 0.2), transparent 51%); background-color: rgba(0, 255, 255, 0.1); } -.wide.pinned { +.sanddance-main.pinned { grid-template-columns: 250px auto; grid-template-areas: "side main"; } -.wide.pinned .sanddance-view { +.sanddance-main.pinned .sanddance-view { grid-area: main; } -.wide.pinned .loading { +.sanddance-main.pinned .loading { grid-area: main; grid-row-end: unset; } -.wide.pinned .sanddance-slidePanel { +.sanddance-main.pinned .sanddance-slidePanel { grid-area: side; } -.wide.pinned.closed { +.sanddance-main.pinned.closed { grid-template-columns: 0 auto; } -.wide span.ms-layer { +.sanddance-main span.ms-layer { display: none; } #sanddance-explorer-toolbar { @@ -458,7 +508,6 @@ margin-top: 1em; } .sanddance-viewport { - background-color: #fff; position: absolute; right: 10px; top: -42px; @@ -467,8 +516,13 @@ .sanddance-viewport i { font-size: 20px; } +.dark-theme .sanddance-panel { + background-color: #000; + color: #fff; } + +.sanddance-legend .legend-row:hover { + background-color: #0078d4; + color: #fff; } + .sanddance-sidebar .sanddance-datascope { min-height: 7em; } - -.sanddance-app.dark-theme .wide, .sanddance-app.dark-theme canvas { - background-color: black; } diff --git a/docs/app/js/sanddance-app.js b/docs/app/js/sanddance-app.js index 737bd7cf..c8925138 100644 --- a/docs/app/js/sanddance-app.js +++ b/docs/app/js/sanddance-app.js @@ -81215,7 +81215,7 @@ function _default(_) { div = _.divide || [5, 2], min = _.extent[0], max = _.extent[1], - span = max - min, + span = max - min || Math.abs(min) || 1, step, level, minstep, @@ -81265,7 +81265,7 @@ function _default(_) { return { start: min, - stop: max, + stop: max === min ? min + step : max, step: step }; } @@ -90198,7 +90198,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = _default; function _default(series, order) { - if (!((n = series.length) > 1)) return; + if (!((n = series.length) > 0)) return; for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { for (yp = yn = 0, i = 0; i < n; ++i) { @@ -114669,8 +114669,8 @@ function _default(nodes) { function initializeNodes() { for (var i = 0, n = nodes.length, node; i < n; ++i) { node = nodes[i], node.index = i; - if (!isNaN(node.fx)) node.x = node.fx; - if (!isNaN(node.fy)) node.y = node.fy; + if (node.fx != null) node.x = node.fx; + if (node.fy != null) node.y = node.fy; if (isNaN(node.x) || isNaN(node.y)) { var radius = initialRadius * Math.sqrt(i), @@ -120733,34 +120733,28 @@ var _ResolveFilter = _interopRequireDefault(require("./src/ResolveFilter")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } },{"./src/CrossFilter":"A4lS","./src/ResolveFilter":"Ueah"}],"2nP9":[function(require,module,exports) { module.exports = { - "_args": [ - [ - "vega-lib@4.4.0", - "C:\\src\\_sanddance5\\packages\\sanddance-app" - ] - ], - "_from": "vega-lib@4.4.0", + "_from": "vega-lib@^4.3.0", "_id": "vega-lib@4.4.0", "_inBundle": false, "_integrity": "sha512-bfOsO5wks+ctnJ94fIPWH/B0qocdFs4WZ8teIgjF7m5XE+EVln+1nq9Z+sV7wdw7vftzGg0GAx9UH/kJxyopKg==", "_location": "/vega-lib", "_phantomChildren": {}, "_requested": { - "type": "version", + "type": "range", "registry": true, - "raw": "vega-lib@4.4.0", + "raw": "vega-lib@^4.3.0", "name": "vega-lib", "escapedName": "vega-lib", - "rawSpec": "4.4.0", + "rawSpec": "^4.3.0", "saveSpec": null, - "fetchSpec": "4.4.0" + "fetchSpec": "^4.3.0" }, "_requiredBy": [ "/" ], "_resolved": "https://registry.npmjs.org/vega-lib/-/vega-lib-4.4.0.tgz", - "_spec": "4.4.0", - "_where": "C:\\src\\_sanddance5\\packages\\sanddance-app", + "_shasum": "37d99514c5496a0ce001033bdacb504361ef6880", + "_spec": "vega-lib@^4.3.0", "author": { "name": "UW Interactive Data Lab", "url": "http://idl.cs.washington.edu" @@ -120772,6 +120766,7 @@ module.exports = { "bugs": { "url": "https://github.com/vega/vega-lib/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Jeffrey Heer", @@ -120822,6 +120817,7 @@ module.exports = { "vega-voronoi": "^3.0.0", "vega-wordcloud": "^3.0.0" }, + "deprecated": false, "description": "Include Vega in projects using minimal dependencies.", "devDependencies": { "eslint": "5", @@ -123625,11 +123621,15 @@ function _default(codegen) { utcminutes: fn('getUTCMinutes', DATE, 0), utcseconds: fn('getUTCSeconds', DATE, 0), utcmilliseconds: fn('getUTCMilliseconds', DATE, 0), - // shared sequence functions + // sequence functions length: fn('length', null, -1), + join: fn('join', null), indexof: fn('indexOf', null), lastindexof: fn('lastIndexOf', null), slice: fn('slice', null), + reverse: function (args) { + return '(' + codegen(args[0]) + ').slice().reverse()'; + }, // STRING functions parseFloat: 'parseFloat', parseInt: 'parseInt', @@ -123638,6 +123638,7 @@ function _default(codegen) { substring: fn('substring', STRING), split: fn('split', STRING), replace: fn('replace', STRING), + trim: fn('trim', STRING, 0), // REGEXP functions regexp: REGEXP, test: fn('test', REGEXP), @@ -123666,6 +123667,11 @@ var _vegaUtil = require("vega-util"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function stripQuotes(s) { + var n = s && s.length - 1; + return n && (s[0] === '"' && s[n] === '"' || s[0] === '\'' && s[n] === '\'') ? s.slice(1, -1) : s; +} + function _default(opt) { opt = opt || {}; @@ -123717,9 +123723,9 @@ function _default(opt) { var p = visit(n.property); if (o === fieldvar) { - fields[p] = 1; - } // HACKish... - + // strip quotes to sanitize field name (#1653) + fields[stripQuotes(p)] = 1; + } if (d) memberDepth -= 1; return o + (d ? '.' + p : '[' + p + ']'); @@ -145170,12 +145176,17 @@ class Viewer { getInsight() { const insight = Object.assign({}, this.insight); - insight.signalValues = {}; - this.vegaSpec.signals.forEach(signal => { - insight.signalValues[signal.name] = this.vegaViewGl.signal(signal.name); - }); + insight.signalValues = this.getSignalValues(); return insight; } + /** + * Gets current signal values. + */ + + + getSignalValues() { + return (0, _signals.extractSignalValuesFromView)(this.vegaViewGl, this.vegaSpec); + } } @@ -145470,7 +145481,64 @@ function use(reactDomRender, fabric, vega, deck, layers, luma) { base.reactDomRender = reactDomRender; base.fabric = fabric; } -},{"@msrvida/sanddance-react":"miZu"}],"t+nG":[function(require,module,exports) { +},{"@msrvida/sanddance-react":"miZu"}],"1wxr":[function(require,module,exports) { +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.themePalettes = void 0; +const themePalettes = {}; +exports.themePalettes = themePalettes; +themePalettes[''] = { + themePrimary: '#0078d4', + themeLighterAlt: '#eff6fc', + themeLighter: '#deecf9', + themeLight: '#c7e0f4', + themeTertiary: '#71afe5', + themeSecondary: '#2b88d8', + themeDarkAlt: '#106ebe', + themeDark: '#005a9e', + themeDarker: '#004578', + neutralLighterAlt: '#f8f8f8', + neutralLighter: '#f4f4f4', + neutralLight: '#eaeaea', + neutralQuaternaryAlt: '#dadada', + neutralQuaternary: '#d0d0d0', + neutralTertiaryAlt: '#c8c8c8', + neutralTertiary: '#c2c2c2', + neutralSecondary: '#858585', + neutralPrimaryAlt: '#4b4b4b', + neutralPrimary: '#333333', + neutralDark: '#272727', + black: '#1d1d1d', + white: '#ffffff' +}; +themePalettes['dark-theme'] = { + "themePrimary": "#00b4f0", + "themeLighterAlt": "#00070a", + "themeLighter": "#001d26", + "themeLight": "#003648", + "themeTertiary": "#006c90", + "themeSecondary": "#009ed3", + "themeDarkAlt": "#18bbf1", + "themeDark": "#3ac5f3", + "themeDarker": "#6cd4f6", + "neutralLighterAlt": "#0b0b0b", + "neutralLighter": "#151515", + "neutralLight": "#252525", + "neutralQuaternaryAlt": "#2f2f2f", + "neutralQuaternary": "#373737", + "neutralTertiaryAlt": "#595959", + "neutralTertiary": "#929292", + "neutralSecondary": "#a7a7a7", + "neutralPrimaryAlt": "#b4b4b4", + "neutralPrimary": "#cccccc", + "neutralDark": "#d8d8d8", + "black": "#f5f5f5", + "white": "#000000" +}; +},{}],"t+nG":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -145486,17 +145554,11 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. -let theme; - function IconButton(props) { - if (!theme) { - theme = _base.base.fabric.getTheme(); - } - return React.createElement(_base.base.fabric.IconButton, Object.assign({}, props, { styles: { rootHovered: { - color: theme.palette.themePrimary + color: props.themePalette.themePrimary }, menuIcon: { display: 'none' @@ -145518,6 +145580,7 @@ exports.strings = void 0; // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. const strings = { + appName: "SandDance", bingsearch: "Bing", buttonSelectAll: "Select all", buttonData: "Data browser", @@ -145693,6 +145756,7 @@ function ColorMap(props) { }] }; return React.createElement("div", null, React.createElement(_iconButton.IconButton, { + themePalette: props.themePalette, title: _language.strings.buttonColorSchemeMap, onClick: null, iconName: props.canRemap ? "FiltersSolid" : "Filters", @@ -146064,15 +146128,15 @@ function Chart(props) { key: 'treemap', text: _language.strings.chartTypeTreeMap, checked: props.chart === 'treemap', - disabled: props.disabled - } - // , { - // key: 'stacks', - // text: _language.strings.chartTypeStacks, - // checked: props.chart === 'stacks', - // disabled: props.disabled - // } - ], + disabled: props.disabled //, + // { + // key: 'stacks', + // text: strings.chartTypeStacks, + // checked: props.chart === 'stacks', + // disabled: props.disabled + // } + + }], onChange: (e, o) => props.onChangeChartType(o.key) }))), signals && React.createElement(_group.Group, { label: _language.strings.labelChartTypeOptions @@ -149025,8 +149089,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.initPrefs = initPrefs; -exports.copyPartialInsightToNewState = copyPartialInsightToNewState; -exports.copySignalValuesFromState = copySignalValuesFromState; exports.saveSignalValuePref = saveSignalValuePref; exports.copyPrefToNewState = copyPrefToNewState; exports.savePref = savePref; @@ -149074,74 +149136,6 @@ function initPrefs(prefs, partialInsight) { } } -function copyPartialInsightToNewState(partialInsight, newState) { - if (partialInsight) { - if (partialInsight.colorBin) { - newState.colorBin = partialInsight.colorBin; - } - - if (partialInsight.columns) { - newState.columns = partialInsight.columns; - } - - if (partialInsight.filter) { - newState.filter = partialInsight.filter; - } - - if (partialInsight.scheme) { - newState.scheme = partialInsight.scheme; - } - - if (partialInsight.signalValues) { - if (partialInsight.signalValues[_sanddanceReact.SandDance.constants.BinXSignal]) { - newState.initialXBinCount = partialInsight.signalValues[_sanddanceReact.SandDance.constants.BinXSignal]; - } - - if (partialInsight.signalValues[_sanddanceReact.SandDance.constants.ColorBinCountSignal]) { - newState.initialColorBinCount = partialInsight.signalValues[_sanddanceReact.SandDance.constants.ColorBinCountSignal]; - } - - if (partialInsight.signalValues[_sanddanceReact.SandDance.constants.TreeMapMethod]) { - newState.initialTreeMapMethod = partialInsight.signalValues[_sanddanceReact.SandDance.constants.TreeMapMethod]; - } - - if (partialInsight.signalValues[_sanddanceReact.SandDance.constants.PointSizeSignal]) { - newState.initialPointSize = partialInsight.signalValues[_sanddanceReact.SandDance.constants.PointSizeSignal]; - } - } - - if (partialInsight.chart) { - newState.chart = partialInsight.chart; - } - - if (partialInsight.view) { - newState.view = partialInsight.view; - } - } -} - -function copySignalValuesFromState(state) { - const signalValues = {}; - - if (state.initialPointSize) { - signalValues[_sanddanceReact.SandDance.constants.PointSizeSignal] = state.initialPointSize; - } - - if (state.initialColorBinCount) { - signalValues[_sanddanceReact.SandDance.constants.ColorBinCountSignal] = state.initialColorBinCount; - } - - if (state.initialXBinCount) { - signalValues[_sanddanceReact.SandDance.constants.BinXSignal] = state.initialXBinCount; - } - - if (state.initialTreeMapMethod) { - signalValues[_sanddanceReact.SandDance.constants.TreeMapMethod] = state.initialTreeMapMethod; - } - - return signalValues; -} - function saveSignalValuePref(prefs, chart, role, column, signalName, signalValue) { const partialInsight = savePref(prefs, chart, role, column, { signalValues: {} @@ -149149,14 +149143,14 @@ function saveSignalValuePref(prefs, chart, role, column, signalName, signalValue partialInsight.signalValues[signalName] = signalValue; } -function copyPrefToNewState(prefs, chart, role, columnName, newState) { +function copyPrefToNewState(prefs, chart, role, columnName) { const specTypePrefs = _sanddanceReact.SandDance.VegaDeckGl.util.deepMerge({}, prefs['*'], prefs[chart]); const rolePrefs = _sanddanceReact.SandDance.VegaDeckGl.util.deepMerge({}, specTypePrefs['*'], specTypePrefs[role]); const partialInsight = _sanddanceReact.SandDance.VegaDeckGl.util.deepMerge({}, rolePrefs['*'], rolePrefs[columnName]); - copyPartialInsightToNewState(partialInsight, newState); + return partialInsight; } function savePref(prefs, chart, role, column, partialInsight) { @@ -149303,10 +149297,10 @@ var _dataItem = require("../controls/dataItem"); var _group = require("../controls/group"); -var _language = require("../language"); - var _iconButton = require("../controls/iconButton"); +var _language = require("../language"); + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } // Copyright (c) Microsoft Corporation. All rights reserved. @@ -149330,11 +149324,13 @@ function DataBrowser(props) { }), props.data && !props.data.length && React.createElement("div", null, props.zeroMessage), !!length && React.createElement("div", null, React.createElement("div", { className: "index" }, React.createElement(_iconButton.IconButton, { + themePalette: props.themePalette, iconName: "ChevronLeftMed", onClick: e => activateRecord(index <= 0 ? length - 1 : index - 1), disabled: props.disabled || length === 1, title: _language.strings.buttonPrevDataItem }), React.createElement("span", null, _language.strings.record(index + 1, length)), React.createElement(_iconButton.IconButton, { + themePalette: props.themePalette, iconName: "ChevronRightMed", onClick: e => activateRecord(index >= length - 1 ? 0 : index + 1), disabled: props.disabled || length === 1, @@ -149348,7 +149344,7 @@ function DataBrowser(props) { onSearch: props.onSearch }))); } -},{"react":"mpTF","../controls/dataItem":"/VDe","../controls/group":"gj41","../language":"Zz8c","../controls/iconButton":"t+nG"}],"Y7Nu":[function(require,module,exports) { +},{"react":"mpTF","../controls/dataItem":"/VDe","../controls/group":"gj41","../controls/iconButton":"t+nG","../language":"Zz8c"}],"Y7Nu":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -149364,13 +149360,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. -let theme; - function Button(props) { - if (!theme) { - theme = _base.base.fabric.getTheme(); - } - return React.createElement(_base.base.fabric.DefaultButton, Object.assign({}, props, { styles: { root: { @@ -149383,7 +149373,7 @@ function Button(props) { backgroundColor: "transparent" }, icon: { - color: theme.palette.themePrimary + color: props.themePalette.themePrimary }, label: { fontWeight: "400", @@ -149897,6 +149887,7 @@ function Compact(props) { function DataScopeButton(props) { return React.createElement(_button.Button, { + themePalette: props.themePalette, className: _sanddanceReact.util.classList("datascope-button", props.selectedDataScope === props.dataScopeId && "selected"), disabled: props.disabled, text: props.text, @@ -150141,18 +150132,18 @@ exports.Search = void 0; var React = _interopRequireWildcard(require("react")); -var _base = require("../base"); - var _searchTerm = require("../controls/searchTerm"); -var _sanddanceReact = require("@msrvida/sanddance-react"); - -var _language = require("../language"); +var _base = require("../base"); var _button = require("../controls/button"); var _group = require("../controls/group"); +var _sanddanceReact = require("@msrvida/sanddance-react"); + +var _language = require("../language"); + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } // Copyright (c) Microsoft Corporation. All rights reserved. @@ -150318,11 +150309,13 @@ class Search extends React.Component { searchExpression: ex, column: getColumnWithName(ex.name, this.state.sortedColumns) }), i > 0 && React.createElement(_button.Button, { + themePalette: this.props.themePalette, className: "search-action", iconName: "Cancel", onClick: () => this.deleteExpression(i), text: _language.strings.buttonDeleteExpression })))), this.state.expressions.length < maxClauses && React.createElement("div", null, React.createElement(_button.Button, { + themePalette: this.props.themePalette, className: "search-action", iconName: "Add", onClick: () => this.addExpression(), @@ -150337,7 +150330,7 @@ class Search extends React.Component { } exports.Search = Search; -},{"react":"mpTF","../base":"957y","../controls/searchTerm":"jGjD","@msrvida/sanddance-react":"miZu","../language":"Zz8c","../controls/button":"Y7Nu","../controls/group":"gj41"}],"d6VM":[function(require,module,exports) { +},{"react":"mpTF","../controls/searchTerm":"jGjD","../base":"957y","../controls/button":"Y7Nu","../controls/group":"gj41","@msrvida/sanddance-react":"miZu","../language":"Zz8c"}],"d6VM":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -150450,40 +150443,41 @@ exports.SideTabId = SideTabId; SideTabId[SideTabId["Collapse"] = 7] = "Collapse"; })(SideTabId || (exports.SideTabId = SideTabId = {})); -const sidebuttons = [{ - sideTabId: SideTabId.ChartType, - iconName: "BIDashboard", - title: _language.strings.groupLabelChart -}, { - sideTabId: SideTabId.Color, - iconName: "Color", - title: _language.strings.dialogTitleColor -}, { - sideTabId: SideTabId.Data, - iconName: "Table", - title: _language.strings.buttonData -}, { - sideTabId: SideTabId.Search, - iconName: "Search", - title: _language.strings.dialogTitleSearch -}, { - sideTabId: SideTabId.Snapshots, - iconName: "Camera", - title: _language.strings.dialogTitleSnapshots -}, { - sideTabId: SideTabId.Settings, - iconName: "Settings", - title: _language.strings.dialogTitleChartSettings -}]; - function Sidebar(props) { + const sidebuttons = [{ + sideTabId: SideTabId.ChartType, + iconName: "BIDashboard", + title: _language.strings.groupLabelChart + }, { + sideTabId: SideTabId.Color, + iconName: "Color", + title: _language.strings.dialogTitleColor + }, { + sideTabId: SideTabId.Data, + iconName: "Table", + title: _language.strings.buttonData + }, { + sideTabId: SideTabId.Search, + iconName: "Search", + title: _language.strings.dialogTitleSearch + }, { + sideTabId: SideTabId.Snapshots, + iconName: "Camera", + title: _language.strings.dialogTitleSnapshots + }, { + sideTabId: SideTabId.Settings, + iconName: "Settings", + title: _language.strings.dialogTitleChartSettings + }]; return React.createElement("div", { className: _sanddanceReact.util.classList("sanddance-sidebar", "calculator", props.pinned && "pinned", props.closed && "closed") }, React.createElement(_dataScope.DataScope, Object.assign({}, props.dataScopeProps)), React.createElement("div", { className: "vbuttons" }, React.createElement("div", null, sidebuttons.map((sidebutton, i) => React.createElement(Sidebutton, Object.assign({ key: i - }, props, sidebutton)))), React.createElement("div", null, React.createElement(Sidebutton, Object.assign({}, props, { + }, props, sidebutton, { + themePalette: props.themePalette + })))), React.createElement("div", null, React.createElement(Sidebutton, Object.assign({}, props, { sideTabId: SideTabId.Pin, iconName: props.pinned ? "Pinned" : "Pin", title: props.pinned ? _language.strings.buttonToolbarFloat : _language.strings.buttonToolbarDock @@ -150506,6 +150500,7 @@ function Sidebutton(props) { }, props.badgeText && React.createElement("div", { className: "count" }, props.badgeText), React.createElement(_iconButton.IconButton, { + themePalette: props.themePalette, className: "vbutton", iconName: props.iconName, title: props.title, @@ -150514,62 +150509,7 @@ function Sidebutton(props) { } })); } -},{"react":"mpTF","../base":"957y","./dataScope":"Pl+D","./iconButton":"t+nG","./scrollable":"qTvm","../language":"Zz8c","@msrvida/sanddance-react":"miZu"}],"RkrT":[function(require,module,exports) { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Topbar = Topbar; - -var React = _interopRequireWildcard(require("react")); - -var _base = require("../base"); - -var _button = require("./button"); - -var _sanddanceReact = require("@msrvida/sanddance-react"); - -var _language = require("../language"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. -function Topbar(props) { - const zeroResults = props.selectionState.selectedData && props.selectionState.selectedData.length === 0; - const disabled = !props.loaded; - return React.createElement("div", { - className: "sanddance-explorer-topbar" - }, React.createElement("div", { - className: "logo" - }, React.createElement(_base.base.fabric.Icon, { - iconName: "Blur" - }), React.createElement("span", null, "SandDance")), React.createElement("div", null, React.createElement(_button.Button, { - text: _language.strings.buttonDeselect, - iconName: "Cancel", - disabled: disabled || !props.selectionSearch, - onClick: props.doDeselect - }), React.createElement(_button.Button, { - text: _language.strings.buttonIsolate, - iconName: "Filter", - disabled: disabled || !props.selectionSearch || zeroResults, - onClick: () => props.doFilter(props.selectionSearch) - }), React.createElement(_button.Button, { - text: _language.strings.buttonExclude, - iconName: "ClearFilter", - disabled: disabled || !props.selectionSearch || zeroResults, - onClick: () => props.doFilter(_sanddanceReact.SandDance.searchExpression.invert(props.selectionSearch)) - }), React.createElement(_button.Button, { - text: _language.strings.buttonReset, - iconName: "RemoveFilter", - disabled: disabled || !props.filter, - onClick: props.doUnfilter - }), props.buttons && props.buttons.map((bp, i) => React.createElement(_button.Button, Object.assign({ - key: i - }, bp))))); -} -},{"react":"mpTF","../base":"957y","./button":"Y7Nu","@msrvida/sanddance-react":"miZu","../language":"Zz8c"}],"7sem":[function(require,module,exports) { +},{"react":"mpTF","../base":"957y","./dataScope":"Pl+D","./iconButton":"t+nG","./scrollable":"qTvm","../language":"Zz8c","@msrvida/sanddance-react":"miZu"}],"7sem":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -150585,12 +150525,12 @@ var _dialog = require("../controls/dialog"); var _group = require("../controls/group"); +var _iconButton = require("../controls/iconButton"); + var _sanddanceReact = require("@msrvida/sanddance-react"); var _language = require("../language"); -var _iconButton = require("../controls/iconButton"); - function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } // Copyright (c) Microsoft Corporation. All rights reserved. @@ -150655,7 +150595,6 @@ class Snapshots extends React.Component { this.resize(canvas && canvas.toDataURL("image/png")); const bgColor = canvas && window.getComputedStyle(canvas).backgroundColor; const insight = this.props.explorer.viewer.getInsight(); - console.log(insight); const description = this.props.getDescription && this.props.getDescription(insight) || ''; this.setState({ formHidden: false, @@ -150665,6 +150604,7 @@ class Snapshots extends React.Component { }); } }), React.createElement(_dialog.Dialog, { + minWidth: `${thumbWidth + 64}px`, hidden: this.state.formHidden, onDismiss: () => this.setState({ formHidden: true @@ -150692,6 +150632,7 @@ class Snapshots extends React.Component { const actions = this.props.getActions && this.props.getActions(snapshot, i) || []; actions.push({ iconButtonProps: { + themePalette: this.props.themePalette, title: _language.strings.buttonDeleteSnapshot, onClick: e => this.props.onRemoveSnapshot(i), iconName: "Delete" @@ -150735,7 +150676,68 @@ function Actions(props) { } })); } -},{"react":"mpTF","../base":"957y","../controls/dialog":"0aje","../controls/group":"gj41","@msrvida/sanddance-react":"miZu","../language":"Zz8c","../controls/iconButton":"t+nG"}],"ZEae":[function(require,module,exports) { +},{"react":"mpTF","../base":"957y","../controls/dialog":"0aje","../controls/group":"gj41","../controls/iconButton":"t+nG","@msrvida/sanddance-react":"miZu","../language":"Zz8c"}],"RkrT":[function(require,module,exports) { +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Topbar = Topbar; + +var React = _interopRequireWildcard(require("react")); + +var _base = require("../base"); + +var _button = require("./button"); + +var _sanddanceReact = require("@msrvida/sanddance-react"); + +var _language = require("../language"); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. +function Topbar(props) { + const zeroResults = props.selectionState.selectedData && props.selectionState.selectedData.length === 0; + const disabled = !props.loaded; + return React.createElement("div", { + className: "sanddance-explorer-topbar" + }, React.createElement("div", { + className: "logo" + }, React.createElement(_base.base.fabric.Icon, { + iconName: "Blur" + }), React.createElement("a", { + href: "/SandDance/" + }, _language.strings.appName)), React.createElement("div", null, React.createElement(_button.Button, { + themePalette: props.themePalette, + text: _language.strings.buttonDeselect, + iconName: "Cancel", + disabled: disabled || !props.selectionSearch, + onClick: props.doDeselect + }), React.createElement(_button.Button, { + themePalette: props.themePalette, + text: _language.strings.buttonIsolate, + iconName: "Filter", + disabled: disabled || !props.selectionSearch || zeroResults, + onClick: () => props.doFilter(props.selectionSearch) + }), React.createElement(_button.Button, { + themePalette: props.themePalette, + text: _language.strings.buttonExclude, + iconName: "ClearFilter", + disabled: disabled || !props.selectionSearch || zeroResults, + onClick: () => props.doFilter(_sanddanceReact.SandDance.searchExpression.invert(props.selectionSearch)) + }), React.createElement(_button.Button, { + themePalette: props.themePalette, + text: _language.strings.buttonReset, + iconName: "RemoveFilter", + disabled: disabled || !props.filter, + onClick: props.doUnfilter + }), props.buttons && props.buttons.map((bp, i) => React.createElement(_button.Button, Object.assign({ + key: i + }, bp))))); +} +},{"react":"mpTF","../base":"957y","./button":"Y7Nu","@msrvida/sanddance-react":"miZu","../language":"Zz8c"}],"ZEae":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -150775,11 +150777,13 @@ var _settings = require("./dialogs/settings"); var _sidebar = require("./controls/sidebar"); +var _snapshots = require("./dialogs/snapshots"); + var _language = require("./language"); -var _topbar = require("./controls/topbar"); +var _themes = require("./themes"); -var _snapshots = require("./dialogs/snapshots"); +var _topbar = require("./controls/topbar"); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } @@ -150823,10 +150827,6 @@ class Explorer extends React.Component { errors: null, autoCompleteDistinctValues: {}, colorBin: null, - initialPointSize: null, - initialColorBinCount: null, - initialXBinCount: null, - initialTreeMapMethod: null, dataContent: null, dataFile: null, search: null, @@ -150841,6 +150841,7 @@ class Explorer extends React.Component { scheme: null, columns: null, chart: "scatterplot", + signalValues: null, sideTabId: _sidebar.SideTabId.ChartType, dataScopeId: _dataScope.DataScopeId.AllData, selectedItemIndex: {}, @@ -150862,7 +150863,7 @@ class Explorer extends React.Component { onDataFilter: (dataFilter, filteredData) => { const selectedItemIndex = Object.assign({}, this.state.selectedItemIndex); selectedItemIndex[_dataScope.DataScopeId.FilteredData] = 0; - this.setState({ + this.changeInsight({ filter: dataFilter, filteredData, selectedItemIndex @@ -150924,6 +150925,7 @@ class Explorer extends React.Component { manageColorToolbar() { const canRemap = this.viewer.colorContexts && this.viewer.colorContexts.length > 1; (0, _colorMap.applyColorButtons)(this.viewer.presenter, !!this.state.columns.color, { + themePalette: _themes.themePalettes[this.props.theme || ''], canRemap, isRemap: canRemap && this.viewer.currentColorContext > 0, colorMapHandler: remap => { @@ -150939,21 +150941,20 @@ class Explorer extends React.Component { selectedItemIndex[_dataScope.DataScopeId.AllData] = 0; selectedItemIndex[_dataScope.DataScopeId.FilteredData] = 0; selectedItemIndex[_dataScope.DataScopeId.SelectedData] = 0; - let newState = { + let newState = Object.assign({ chart: null, scheme: null, columns: null, filter: null, filteredData: null, selectedItemIndex - }; + }, partialInsight); this.getColorContext = null; - (0, _partialInsight.copyPartialInsightToNewState)(partialInsight, newState); - this.setState(newState); + this.changeInsight(newState); } load(data, getPartialInsight, prefs) { - this.setState({ + this.changeInsight({ columns: null }); return new Promise((resolve, reject) => { @@ -150963,12 +150964,20 @@ class Explorer extends React.Component { scheme, columns } = columnsAndScheme; + let partialInsight; + this.prefs = prefs || {}; + + if (getPartialInsight) { + partialInsight = getPartialInsight(dataContent.columns); + (0, _partialInsight.initPrefs)(this.prefs, partialInsight); + } + const selectedItemIndex = Object.assign({}, this.state.selectedItemIndex); const sideTabId = _sidebar.SideTabId.ChartType; selectedItemIndex[_dataScope.DataScopeId.AllData] = 0; selectedItemIndex[_dataScope.DataScopeId.FilteredData] = 0; selectedItemIndex[_dataScope.DataScopeId.SelectedData] = 0; - let newState = { + let newState = Object.assign({ dataFile, dataContent, scheme, @@ -150978,17 +150987,9 @@ class Explorer extends React.Component { filteredData: null, selectedItemIndex, sideTabId - }; - this.prefs = prefs || {}; - - if (getPartialInsight) { - const partialInsight = getPartialInsight(dataContent.columns); - (0, _partialInsight.copyPartialInsightToNewState)(partialInsight, newState); - (0, _partialInsight.initPrefs)(this.prefs, partialInsight); - } - + }, partialInsight); this.getColorContext = null; - this.setState(newState); //make sure item is active + this.changeInsight(newState); //make sure item is active this.activateDataBrowserItem(sideTabId, this.state.dataScopeId); resolve(); @@ -151031,9 +151032,7 @@ class Explorer extends React.Component { } } - this.calculate(() => { - this.setState(newState); - }); + this.calculate(() => this.changeInsight(newState)); } calculate(calculating) { @@ -151043,9 +151042,18 @@ class Explorer extends React.Component { } changeView(view) { - this.setState({ + this.changeInsight({ view }); + } //state members which change the insight + + + changeInsight(newState) { + if (!newState.signalValues) { + newState.signalValues = null; + } + + this.setState(newState); } changespecCapabilities(specCapabilities) { @@ -151059,7 +151067,7 @@ class Explorer extends React.Component { const final = () => { columns[role] = column && column.name; - this.setState({ + this.changeInsight({ columns }); }; @@ -151101,7 +151109,7 @@ class Explorer extends React.Component { } columns['facet'] = column.name; - this.setState({ + this.changeInsight({ facets, columns }); @@ -151111,15 +151119,15 @@ class Explorer extends React.Component { case "color": (() => { - const newState = { + let newState = { scheme: options && options.scheme, - initialColorBinCount: null, columns, colorBin: this.state.colorBin }; if (!newState.scheme) { - (0, _partialInsight.copyPrefToNewState)(this.prefs, this.state.chart, 'color', column.name, newState); + const partialInsight = (0, _partialInsight.copyPrefToNewState)(this.prefs, this.state.chart, 'color', column.name); + newState = Object.assign({}, newState, partialInsight); } if (!newState.scheme) { @@ -151133,7 +151141,7 @@ class Explorer extends React.Component { setTimeout(() => { columns['color'] = column.name; this.getColorContext = null; - this.setState(newState); + this.changeInsight(newState); }, 0); }); })(); @@ -151142,13 +151150,12 @@ class Explorer extends React.Component { case 'x': (() => { - const newState = { - initialXBinCount: null, + const partialInsight = (0, _partialInsight.copyPrefToNewState)(this.prefs, this.state.chart, 'x', column.name); + const newState = Object.assign({ columns - }; - (0, _partialInsight.copyPrefToNewState)(this.prefs, this.state.chart, 'x', column.name, newState); + }, partialInsight); columns['x'] = column.name; - this.setState(newState); + this.changeInsight(newState); })(); break; @@ -151236,12 +151243,14 @@ class Explorer extends React.Component { viewerMounted(glDiv) { window.addEventListener("resize", () => { //TODO: throttle events - this.setState({ + this.changeInsight({ size: this.getLayoutDivSize(this.state.toolbarPinned, this.state.toolbarClosed) }); }); this.setState({ - size: this.getLayoutDivSize(this.state.toolbarPinned, this.state.toolbarClosed) + size: this.getLayoutDivSize(this.state.toolbarPinned, this.state.toolbarClosed), + signalValues: this.state.signalValues //keep initialized signalValues + }); } @@ -151303,6 +151312,7 @@ class Explorer extends React.Component { facets, filter, scheme, + signalValues, size, chart, view @@ -151313,7 +151323,7 @@ class Explorer extends React.Component { facets, filter, scheme, - signalValues: (0, _partialInsight.copySignalValuesFromState)(this.state), + signalValues, size, chart, view @@ -151346,9 +151356,12 @@ class Explorer extends React.Component { }, 0); } + const theme = this.props.theme || ''; + const themePalette = _themes.themePalettes[theme]; return React.createElement("div", { - className: "sanddance-explorer" + className: _sanddanceReact.util.classList("sanddance-explorer", this.props.theme) }, React.createElement(_topbar.Topbar, { + themePalette: themePalette, loaded: loaded, doDeselect: this.doDeselect.bind(this), doFilter: this.doFilter.bind(this), @@ -151358,7 +151371,7 @@ class Explorer extends React.Component { selectionState: selectionState, buttons: this.props.topBarButtonProps }), React.createElement("div", { - className: _sanddanceReact.util.classList("wide", this.state.toolbarPinned && "pinned", this.state.toolbarClosed && "closed") + className: _sanddanceReact.util.classList("sanddance-main", this.state.toolbarPinned && "pinned", this.state.toolbarClosed && "closed") }, React.createElement("div", { ref: div => { if (div && !this.layoutDivUnpinned) this.layoutDivUnpinned = div; @@ -151375,14 +151388,16 @@ class Explorer extends React.Component { size: _base.base.fabric.SpinnerSize.large, label: _language.strings.loading })), React.createElement(_sidebar.Sidebar, { + themePalette: themePalette, calculating: !!this.state.calculating, closed: this.state.toolbarClosed, pinned: this.state.toolbarPinned, disabled: !loaded, dataScopeProps: { + themePalette, compact: this.state.toolbarClosed, onCompactClick: () => { - this.setState({ + this.changeInsight({ toolbarClosed: false, size: this.getLayoutDivSize(this.state.toolbarPinned, false) }); @@ -151411,13 +151426,13 @@ class Explorer extends React.Component { } toolbarClosed = !this.state.toolbarClosed; - this.setState({ + this.changeInsight({ dataScopeId, toolbarClosed, size: this.getLayoutDivSize(this.state.toolbarPinned, toolbarClosed) }); } else if (sideTabId === _sidebar.SideTabId.Pin) { - this.setState({ + this.changeInsight({ toolbarPinned: !this.state.toolbarPinned, size: this.getLayoutDivSize(!this.state.toolbarPinned, this.state.toolbarClosed) }); @@ -151459,7 +151474,7 @@ class Explorer extends React.Component { setTimeout(() => { this.getColorContext = null; - this.setState({ + this.changeInsight({ colorBin }); (0, _partialInsight.savePref)(this.prefs, this.state.chart, 'color', this.state.columns.color, { @@ -151496,6 +151511,7 @@ class Explorer extends React.Component { } return React.createElement(_dataBrowser.DataBrowser, { + themePalette: themePalette, disabled: !loaded || this.state.toolbarClosed, columns: this.state.dataContent && this.state.dataContent.columns, data: data, @@ -151526,6 +151542,7 @@ class Explorer extends React.Component { case _sidebar.SideTabId.Search: return React.createElement(_search.Search, { + themePalette: themePalette, disabled: !loaded || this.state.toolbarClosed, initializer: { columns: this.state.dataContent.columns, @@ -151540,6 +151557,7 @@ class Explorer extends React.Component { case _sidebar.SideTabId.Snapshots: return React.createElement(_snapshots.Snapshots, Object.assign({}, this.props.snapshotProps, { + themePalette: themePalette, explorer: this, snapshots: this.state.snapshots, onCreateSnapshot: snapshot => { @@ -151575,15 +151593,17 @@ class Explorer extends React.Component { }, React.createElement("div", { className: "sanddance-viewport" }, React.createElement(_iconButton.IconButton, { + themePalette: themePalette, title: this.state.view === '2d' ? _language.strings.viewType3d : _language.strings.viewType2d, iconName: this.state.view === '2d' ? "Product" : "Page", onClick: () => { const view = this.state.view === '2d' ? '3d' : '2d'; - this.setState({ + this.changeInsight({ view }); } }), React.createElement(_iconButton.IconButton, { + themePalette: themePalette, title: _language.strings.cameraHome, iconName: "PicturePosition", onClick: () => this.viewer.presenter.homeCamera() @@ -151643,7 +151663,7 @@ class Explorer extends React.Component { } exports.Explorer = Explorer; -},{"react":"mpTF","./colorMap":"ZSSH","./base":"957y","./colorScheme":"AKGR","./dialogs/chart":"frKj","./dialogs/color":"Mhm6","./dataLoader":"sKvG","./partialInsight":"A1e3","./dialogs/dataBrowser":"NTik","./controls/dataScope":"Pl+D","./controls/dialog":"0aje","./controls/iconButton":"t+nG","@msrvida/sanddance-react":"miZu","./dialogs/search":"RsgD","./dialogs/settings":"d6VM","./controls/sidebar":"3BOs","./language":"Zz8c","./controls/topbar":"RkrT","./dialogs/snapshots":"7sem"}],"TX8u":[function(require,module,exports) { +},{"react":"mpTF","./colorMap":"ZSSH","./base":"957y","./colorScheme":"AKGR","./dialogs/chart":"frKj","./dialogs/color":"Mhm6","./dataLoader":"sKvG","./partialInsight":"A1e3","./dialogs/dataBrowser":"NTik","./controls/dataScope":"Pl+D","./controls/dialog":"0aje","./controls/iconButton":"t+nG","@msrvida/sanddance-react":"miZu","./dialogs/search":"RsgD","./dialogs/settings":"d6VM","./controls/sidebar":"3BOs","./dialogs/snapshots":"7sem","./language":"Zz8c","./themes":"1wxr","./controls/topbar":"RkrT"}],"TX8u":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -151652,7 +151672,8 @@ Object.defineProperty(exports, "__esModule", { var _exportNames = { SandDance: true, util: true, - use: true + use: true, + themePalettes: true }; Object.defineProperty(exports, "SandDance", { enumerable: true, @@ -151672,11 +151693,19 @@ Object.defineProperty(exports, "use", { return _base.use; } }); +Object.defineProperty(exports, "themePalettes", { + enumerable: true, + get: function () { + return _themes.themePalettes; + } +}); var _sanddanceReact = require("@msrvida/sanddance-react"); var _base = require("./base"); +var _themes = require("./themes"); + var _explorer = require("./explorer"); Object.keys(_explorer).forEach(function (key) { @@ -151689,7 +151718,7 @@ Object.keys(_explorer).forEach(function (key) { } }); }); -},{"@msrvida/sanddance-react":"miZu","./base":"957y","./explorer":"ZEae"}],"xgwM":[function(require,module,exports) { +},{"@msrvida/sanddance-react":"miZu","./base":"957y","./themes":"1wxr","./explorer":"ZEae"}],"xgwM":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -152144,9 +152173,9 @@ var _setVersion = require("./setVersion"); var _setVersion = require("@uifabric/set-version"); -// office-ui-fabric-react@6.154.0 +// office-ui-fabric-react@6.166.1 // Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only. -(0, _setVersion.setVersion)('office-ui-fabric-react', '6.154.0'); //# sourceMappingURL=version.js.map +(0, _setVersion.setVersion)('office-ui-fabric-react', '6.166.1'); //# sourceMappingURL=version.js.map },{"@uifabric/set-version":"c7t6"}],"Jza+":[function(require,module,exports) { "use strict"; @@ -152739,7 +152768,8 @@ function () { this._config = tslib_1.__assign({ injectionMode: InjectionMode.insertNode, defaultPrefix: 'css', - namespace: undefined + namespace: undefined, + cspSettings: undefined }, config); } /** @@ -152922,6 +152952,13 @@ function () { var styleElement = document.createElement('style'); styleElement.setAttribute('data-merge-styles', 'true'); styleElement.type = 'text/css'; + var cspSettings = this._config.cspSettings; + + if (cspSettings) { + if (cspSettings.nonce) { + styleElement.setAttribute('nonce', cspSettings.nonce); + } + } if (this._lastStyleElement && this._lastStyleElement.nextElementSibling) { document.head.insertBefore(styleElement, this._lastStyleElement.nextElementSibling); @@ -153795,9 +153832,9 @@ function keyframes(timeline) { var _setVersion = require("@uifabric/set-version"); -// @uifabric/merge-styles@6.16.1 +// @uifabric/merge-styles@6.17.0 // Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only. -(0, _setVersion.setVersion)('@uifabric/merge-styles', '6.16.1'); //# sourceMappingURL=version.js.map +(0, _setVersion.setVersion)('@uifabric/merge-styles', '6.17.0'); //# sourceMappingURL=version.js.map },{"@uifabric/set-version":"c7t6"}],"/w5w":[function(require,module,exports) { "use strict"; @@ -154063,6 +154100,7 @@ var _object = require("./object"); * (which is passed in in the constructor). * * @public + * {@docCategory EventGroup} */ var EventGroup = /** @class */ @@ -154662,6 +154700,7 @@ var MAX_SCROLL_VELOCITY = 15; * Once you don't want autoscroll any more, just dispose the helper and it will unhook events. * * @public + * {@docCategory AutoScroll} */ var AutoScroll = @@ -154750,6 +154789,7 @@ function () { exports.AutoScroll = AutoScroll; },{"./EventGroup":"n8h2","./scroll":"0oLl","./dom/getRect":"5D9t"}],"1aOi":[function(require,module,exports) { +var process = require("process"); "use strict"; Object.defineProperty(exports, "__esModule", { @@ -154766,7 +154806,7 @@ var _warningCallback = undefined; */ function warn(message) { - if (_warningCallback && "production" !== 'production') { + if (_warningCallback && typeof process !== 'undefined' && "production" !== 'production') { _warningCallback(message); } else if (console && console.warn) { console.warn(message); @@ -154784,7 +154824,8 @@ function warn(message) { function setWarningCallback(warningCallback) { _warningCallback = warningCallback; } //# sourceMappingURL=warn.js.map -},{}],"U3x3":[function(require,module,exports) { +},{"process":"r7L2"}],"U3x3":[function(require,module,exports) { +var process = require("process"); "use strict"; Object.defineProperty(exports, "__esModule", { @@ -154805,7 +154846,7 @@ var _warn = require("./warn"); * @param condition - Whether the condition is met. */ function warnConditionallyRequiredProps(componentName, props, requiredProps, conditionalPropName, condition) { - if (condition === true && "production" !== 'production') { + if (condition === true && typeof process !== 'undefined' && "production" !== 'production') { for (var _i = 0, requiredProps_1 = requiredProps; _i < requiredProps_1.length; _i++) { var requiredPropName = requiredProps_1[_i]; @@ -154815,7 +154856,8 @@ function warnConditionallyRequiredProps(componentName, props, requiredProps, con } } } //# sourceMappingURL=warnConditionallyRequiredProps.js.map -},{"./warn":"1aOi"}],"yHHK":[function(require,module,exports) { +},{"./warn":"1aOi","process":"r7L2"}],"yHHK":[function(require,module,exports) { +var process = require("process"); "use strict"; Object.defineProperty(exports, "__esModule", { @@ -154834,7 +154876,7 @@ var _warn = require("./warn"); * @param exclusiveMap - A map where the key is a parameter, and the value is the other parameter. */ function warnMutuallyExclusive(componentName, props, exclusiveMap) { - if ("production" !== 'production') { + if (typeof process !== 'undefined' && "production" !== 'production') { for (var propName in exclusiveMap) { if (props && propName in props) { var propInExclusiveMapValue = exclusiveMap[propName]; @@ -154846,7 +154888,8 @@ function warnMutuallyExclusive(componentName, props, exclusiveMap) { } } } //# sourceMappingURL=warnMutuallyExclusive.js.map -},{"./warn":"1aOi"}],"eQmD":[function(require,module,exports) { +},{"./warn":"1aOi","process":"r7L2"}],"eQmD":[function(require,module,exports) { +var process = require("process"); "use strict"; Object.defineProperty(exports, "__esModule", { @@ -154866,7 +154909,7 @@ var _warn = require("./warn"); * either null or a replacement prop name. */ function warnDeprecations(componentName, props, deprecationMap) { - if ("production" !== 'production') { + if (typeof process !== 'undefined' && "production" !== 'production') { for (var propName in deprecationMap) { if (props && propName in props) { var deprecationMessage = componentName + " property '" + propName + "' was used but has been deprecated."; @@ -154881,7 +154924,7 @@ function warnDeprecations(componentName, props, deprecationMap) { } } } //# sourceMappingURL=warnDeprecations.js.map -},{"./warn":"1aOi"}],"mtGO":[function(require,module,exports) { +},{"./warn":"1aOi","process":"r7L2"}],"mtGO":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -154916,6 +154959,7 @@ exports.KeyCodes = void 0; * Simulated enum for keycodes. These will get inlined by uglify when used much like an enum * * @public + * {@docCategory KeyCodes} */ var KeyCodes = { backspace: 8, @@ -155171,6 +155215,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; * BaseComponent class, which provides basic helpers for all components. * * @public + * {@docCategory BaseComponent} */ var BaseComponent = /** @class */ @@ -155500,6 +155545,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; * if necessary. * * @public + * {@docCategory DelayedRender} */ var DelayedRender = /** @class */ @@ -155562,6 +155608,7 @@ var RESET_INTERVAL = 3 * 60 * 1000; // auto reset every 3 minutes * Performance helper class for measuring things. * * @public + * {@docCategory FabricPerformance} */ var FabricPerformance = @@ -155643,6 +155690,7 @@ var _counter = 0; * way to observe changes as well when their values change. * * @public + * {@docCategory GlobalSettings} */ var GlobalSettings = @@ -155738,6 +155786,7 @@ exports.Rectangle = void 0; * Rectangle helper class. * * @public + * {@docCategory Rectangle} */ var Rectangle = /** @class */ @@ -156519,8 +156568,6 @@ var tslib_1 = _interopRequireWildcard(require("tslib")); var React = _interopRequireWildcard(require("react")); -var _BaseComponent = require("../BaseComponent"); - var _Customizations = require("./Customizations"); var _CustomizerContext = require("./CustomizerContext"); @@ -156551,8 +156598,6 @@ function (_super) { function Customizer() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this._changeCount = 0; - _this._onCustomizationChange = function () { return _this.forceUpdate(); }; @@ -156586,11 +156631,11 @@ function (_super) { }; return Customizer; -}(_BaseComponent.BaseComponent); //# sourceMappingURL=Customizer.js.map +}(React.Component); //# sourceMappingURL=Customizer.js.map exports.Customizer = Customizer; -},{"tslib":"xgwM","react":"mpTF","../BaseComponent":"EfJk","./Customizations":"PUOB","./CustomizerContext":"/bJt","./mergeCustomizations":"R4Sr"}],"QlrS":[function(require,module,exports) { +},{"tslib":"xgwM","react":"mpTF","./Customizations":"PUOB","./CustomizerContext":"/bJt","./mergeCustomizations":"R4Sr"}],"QlrS":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -157293,14 +157338,17 @@ function getLastFocusable(rootElement, currentElement, includeElementsInFocusZon * @param currentElement - The descendant of rootElement to start the search at. This element is the first one checked, * and iteration continues forward. Typical use passes rootElement.firstChild. * @param includeElementsInFocusZones - true if traversal should go into FocusZone descendants. + * @param checkNode - Include currentElement in search when true. Defaults to true. * @public */ -function getFirstTabbable(rootElement, currentElement, includeElementsInFocusZones) { - return getNextElement(rootElement, currentElement, true - /*checkNode*/ - , false +function getFirstTabbable(rootElement, currentElement, includeElementsInFocusZones, checkNode) { + if (checkNode === void 0) { + checkNode = true; + } + + return getNextElement(rootElement, currentElement, checkNode, false /*suppressParentTraversal*/ , false /*suppressChildTraversal*/ @@ -157317,14 +157365,17 @@ function getFirstTabbable(rootElement, currentElement, includeElementsInFocusZon * @param currentElement - The descendant of rootElement to start the search at. This element is the first one checked, * and iteration continues in reverse. Typical use passes rootElement.lastChild. * @param includeElementsInFocusZones - true if traversal should go into FocusZone descendants. + * @param checkNode - Include currentElement in search when true. Defaults to true. * @public */ -function getLastTabbable(rootElement, currentElement, includeElementsInFocusZones) { - return getPreviousElement(rootElement, currentElement, true - /*checkNode*/ - , false +function getLastTabbable(rootElement, currentElement, includeElementsInFocusZones, checkNode) { + if (checkNode === void 0) { + checkNode = true; + } + + return getPreviousElement(rootElement, currentElement, checkNode, false /*suppressParentTraversal*/ , true /*traverseChildren*/ @@ -157400,7 +157451,7 @@ function getPreviousElement(rootElement, currentElement, checkNode, suppressPare } // Check the current node, if it's not the first traversal. - if (checkNode && isCurrentElementVisible && isElementTabbable(currentElement)) { + if (checkNode && isCurrentElementVisible && isElementTabbable(currentElement, tabbable)) { return currentElement; } // Check its previous sibling. @@ -157423,6 +157474,7 @@ function getPreviousElement(rootElement, currentElement, checkNode, suppressPare * If tabbable is true, the element must have tabIndex != -1. * * @public + * @param checkNode - Include currentElement in search when true. */ @@ -158588,7 +158640,87 @@ function getRTLSafeKeyCode(key) { return key; } //# sourceMappingURL=rtl.js.map -},{"./KeyCodes":"YHig","./dom/getDocument":"NngM","./sessionStorage":"FNaX","@uifabric/merge-styles":"/w5w"}],"jr8d":[function(require,module,exports) { +},{"./KeyCodes":"YHig","./dom/getDocument":"NngM","./sessionStorage":"FNaX","@uifabric/merge-styles":"/w5w"}],"uBzA":[function(require,module,exports) { +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.safeRequestAnimationFrame = void 0; + +var _extendComponent = require("./extendComponent"); + +/** + * Generates a function to be attached to a React component, which can be called + * as a replacement to RAF. In-flight async calls will be auto canceled if the component + * is unmounting before the async code is executed, preventing bugs where code + * accesses things within the component after being unmounted. + */ +var safeRequestAnimationFrame = function (component) { + var activeTimeouts; + return function (cb) { + if (!activeTimeouts) { + activeTimeouts = new Set(); + (0, _extendComponent.extendComponent)(component, { + componentWillUnmount: function () { + activeTimeouts.forEach(function (id) { + return cancelAnimationFrame(id); + }); + } + }); + } + + var timeoutId = requestAnimationFrame(function () { + activeTimeouts.delete(timeoutId); + cb(); + }); + activeTimeouts.add(timeoutId); + }; +}; //# sourceMappingURL=safeRequestAnimationFrame.js.map + + +exports.safeRequestAnimationFrame = safeRequestAnimationFrame; +},{"./extendComponent":"2vjt"}],"LskN":[function(require,module,exports) { +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.safeSetTimeout = void 0; + +var _extendComponent = require("./extendComponent"); + +/** + * Generates a function to be attached to a React component, which can be called + * as a replacement to setTimeout. In-flight async calls will be auto canceled if the component + * is unmounting before the async code is executed, preventing bugs where code + * accesses things within the component after being unmounted. + */ +var safeSetTimeout = function (component) { + var activeTimeouts; + return function (cb, duration) { + if (!activeTimeouts) { + activeTimeouts = new Set(); + (0, _extendComponent.extendComponent)(component, { + componentWillUnmount: function () { + activeTimeouts.forEach(function (id) { + return clearTimeout(id); + }); + } + }); + } + + var timeoutId = setTimeout(function () { + activeTimeouts.delete(timeoutId); + cb(); + }, duration); + activeTimeouts.add(timeoutId); + }; +}; //# sourceMappingURL=safeSetTimeout.js.map + + +exports.safeSetTimeout = safeSetTimeout; +},{"./extendComponent":"2vjt"}],"jr8d":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -158735,7 +158867,10 @@ function styled(Component, baseStyles, getProps, customizable) { if (!this._inCustomizerContext) { _Customizations.Customizations.unobserve(this._onSettingsChanged); } - }; + }; // Function.prototype.name is an ES6 feature, so the cast to any is required until we're + // able to drop IE 11 support and compile with ES6 libs + // tslint:disable-next-line:no-any + Wrapped.displayName = "Styled" + (Component.displayName || Component.name); return Wrapped; @@ -158833,9 +158968,9 @@ Object.keys(_warnMutuallyExclusive).forEach(function (key) { var _setVersion = require("@uifabric/set-version"); -// @uifabric/utilities@6.34.0 +// @uifabric/utilities@6.35.5 // Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only. -(0, _setVersion.setVersion)('@uifabric/utilities', '6.34.0'); //# sourceMappingURL=version.js.map +(0, _setVersion.setVersion)('@uifabric/utilities', '6.35.5'); //# sourceMappingURL=version.js.map },{"@uifabric/set-version":"c7t6"}],"PHCX":[function(require,module,exports) { "use strict"; @@ -159437,6 +159572,32 @@ Object.keys(_rtl).forEach(function (key) { }); }); +var _safeRequestAnimationFrame = require("./safeRequestAnimationFrame"); + +Object.keys(_safeRequestAnimationFrame).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _safeRequestAnimationFrame[key]; + } + }); +}); + +var _safeSetTimeout = require("./safeSetTimeout"); + +Object.keys(_safeSetTimeout).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function () { + return _safeSetTimeout[key]; + } + }); +}); + var _scroll = require("./scroll"); Object.keys(_scroll).forEach(function (key) { @@ -159492,7 +159653,7 @@ Object.keys(_warn).forEach(function (key) { var _setSSR = require("./dom/setSSR"); require("./version"); -},{"./Async":"Jza+","./AutoScroll":"mD02","./BaseComponent":"EfJk","./Context":"oo6l","./DelayedRender":"F1fh","./EventGroup":"n8h2","./FabricPerformance":"+j9V","./GlobalSettings":"hmlX","./KeyCodes":"YHig","./Rectangle":"MdWq","./appendFunction":"eGk/","./aria":"Miyv","./array":"jRHz","./asAsync":"VHwT","./assertNever":"LuVf","./autobind":"CzxO","./classNamesFunction":"cHjD","./createRef":"uNHc","./css":"kL5n","./customizations/Customizations":"PUOB","./customizations/Customizer":"oOPX","./customizations/CustomizerContext":"/bJt","./customizations/customizable":"Ypg4","./customizations/mergeCustomizations":"R4Sr","./customizations/mergeSettings":"Chex","./dom":"P7UA","./extendComponent":"2vjt","./focus":"w6+t","./hoist":"miKP","./hoistStatics":"QlrS","./initializeComponentRef":"Ox+a","./initializeFocusRects":"Si1v","./initials":"CSIR","./keyboard":"5JDb","./language":"sNmC","./math":"07Xj","./memoize":"rzwf","./merge":"J62f","./mobileDetector":"rhvg","./object":"4j10","./osDetector":"0uY0","./overflow":"Zb2f","./properties":"GUga","./resources":"ydPw","./rtl":"9JqE","./scroll":"0oLl","./string":"jr8d","./styled":"f5Br","./warn":"3srd","./dom/setSSR":"/tKH","./version":"RAPn"}],"B5nc":[function(require,module,exports) { +},{"./Async":"Jza+","./AutoScroll":"mD02","./BaseComponent":"EfJk","./Context":"oo6l","./DelayedRender":"F1fh","./EventGroup":"n8h2","./FabricPerformance":"+j9V","./GlobalSettings":"hmlX","./KeyCodes":"YHig","./Rectangle":"MdWq","./appendFunction":"eGk/","./aria":"Miyv","./array":"jRHz","./asAsync":"VHwT","./assertNever":"LuVf","./autobind":"CzxO","./classNamesFunction":"cHjD","./createRef":"uNHc","./css":"kL5n","./customizations/Customizations":"PUOB","./customizations/Customizer":"oOPX","./customizations/CustomizerContext":"/bJt","./customizations/customizable":"Ypg4","./customizations/mergeCustomizations":"R4Sr","./customizations/mergeSettings":"Chex","./dom":"P7UA","./extendComponent":"2vjt","./focus":"w6+t","./hoist":"miKP","./hoistStatics":"QlrS","./initializeComponentRef":"Ox+a","./initializeFocusRects":"Si1v","./initials":"CSIR","./keyboard":"5JDb","./language":"sNmC","./math":"07Xj","./memoize":"rzwf","./merge":"J62f","./mobileDetector":"rhvg","./object":"4j10","./osDetector":"0uY0","./overflow":"Zb2f","./properties":"GUga","./resources":"ydPw","./rtl":"9JqE","./safeRequestAnimationFrame":"uBzA","./safeSetTimeout":"LskN","./scroll":"0oLl","./string":"jr8d","./styled":"f5Br","./warn":"3srd","./dom/setSSR":"/tKH","./version":"RAPn"}],"B5nc":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -159556,6 +159717,7 @@ exports.ImageLoadState = exports.ImageCoverStyle = exports.ImageFit = void 0; /** * The possible methods that can be used to fit the image. + * {@docCategory Image} */ var ImageFit; exports.ImageFit = ImageFit; @@ -159594,6 +159756,7 @@ exports.ImageFit = ImageFit; })(ImageFit || (exports.ImageFit = ImageFit = {})); /** * The cover style to be used on the image + * {@docCategory Image} */ @@ -159611,6 +159774,10 @@ exports.ImageCoverStyle = ImageCoverStyle; ImageCoverStyle[ImageCoverStyle["portrait"] = 1] = "portrait"; })(ImageCoverStyle || (exports.ImageCoverStyle = ImageCoverStyle = {})); +/** + * {@docCategory Image} + */ + var ImageLoadState; exports.ImageLoadState = ImageLoadState; @@ -159835,7 +160002,7 @@ function (_super) { }; ImageBase._svgRegex = /\.svg$/i; return ImageBase; -}(_Utilities.BaseComponent); //# sourceMappingURL=Image.base.js.map +}(React.Component); //# sourceMappingURL=Image.base.js.map exports.ImageBase = ImageBase; @@ -162310,6 +162477,9 @@ var _index = require("../utilities/index"); var _index2 = require("../styles/index"); +/** + * {@docCategory AnimationClassNames} + */ var AnimationClassNames = (0, _index.buildClassMap)(_index2.AnimationStyles); //# sourceMappingURL=AnimationClassNames.js.map exports.AnimationClassNames = AnimationClassNames; @@ -162325,6 +162495,9 @@ var _buildClassMap = require("../utilities/buildClassMap"); var _DefaultFontStyles = require("../styles/DefaultFontStyles"); +/** + * {@docCategory FontClassNames} + */ var FontClassNames = (0, _buildClassMap.buildClassMap)(_DefaultFontStyles.DefaultFontStyles); //# sourceMappingURL=FontClassNames.js.map exports.FontClassNames = FontClassNames; @@ -162423,9 +162596,9 @@ var _ColorClassNames = require("./ColorClassNames"); var _setVersion = require("@uifabric/set-version"); -// @uifabric/styling@6.44.1 +// @uifabric/styling@6.46.0 // Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only. -(0, _setVersion.setVersion)('@uifabric/styling', '6.44.1'); //# sourceMappingURL=version.js.map +(0, _setVersion.setVersion)('@uifabric/styling', '6.46.0'); //# sourceMappingURL=version.js.map },{"@uifabric/set-version":"c7t6"}],"Dytz":[function(require,module,exports) { "use strict"; @@ -162568,7 +162741,7 @@ var getStyles = function (props) { }, maximizeFrame && [classNames.rootMaximizeFrame, { height: '100%', width: '100%' - }], (isCenter || isContain || isCover || isCenterCover) && { + }], isLoaded && shouldFadeIn && !shouldStartVisible && _Styling.AnimationClassNames.fadeIn400, (isCenter || isContain || isCover || isCenterCover) && { position: 'relative' }, className], image: [classNames.image, { @@ -162600,7 +162773,7 @@ var getStyles = function (props) { }, !!width && !!height && { height: '100%', width: '100%' - }], isLoaded && shouldFadeIn && !shouldStartVisible && _Styling.AnimationClassNames.fadeIn400, isLandscape && classNames.imageLandscape, !isLandscape && classNames.imagePortrait, !isLoaded && 'is-notLoaded', shouldFadeIn && 'is-fadeIn', isError && 'is-error'] + }], isLandscape && classNames.imageLandscape, !isLandscape && classNames.imagePortrait, !isLoaded && 'is-notLoaded', shouldFadeIn && 'is-fadeIn', isError && 'is-error'] }; }; //# sourceMappingURL=Image.styles.js.map @@ -162649,9 +162822,6 @@ var _Styling = require("../../Styling"); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } -/* tslint:disable */ - -/* tslint:enable */ var getClassNames = (0, _Utilities.classNamesFunction)(); var IconBase = @@ -162737,7 +162907,7 @@ function (_super) { }; return IconBase; -}(_Utilities.BaseComponent); //# sourceMappingURL=Icon.base.js.map +}(React.PureComponent); //# sourceMappingURL=Icon.base.js.map exports.IconBase = IconBase; @@ -162947,6 +163117,9 @@ exports.ContextualMenuItemType = void 0; var _DirectionalHint = require("../../common/DirectionalHint"); +/** + * {@docCategory ContextualMenu} + */ var ContextualMenuItemType; exports.ContextualMenuItemType = ContextualMenuItemType; @@ -162963,6 +163136,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.FocusZoneDirection = exports.FocusZoneTabbableElements = void 0; + +/** + * {@docCategory FocusZone} + */ var FocusZoneTabbableElements = { /** Tabbing is not allowed */ none: 0, @@ -162973,6 +163150,10 @@ var FocusZoneTabbableElements = { /** Tabbing is allowed only on input elements */ inputOnly: 2 }; +/** + * {@docCategory FocusZone} + */ + exports.FocusZoneTabbableElements = FocusZoneTabbableElements; var FocusZoneDirection; exports.FocusZoneDirection = FocusZoneDirection; @@ -162988,6 +163169,7 @@ exports.FocusZoneDirection = FocusZoneDirection; FocusZoneDirection[FocusZoneDirection["bidirectional"] = 2] = "bidirectional"; })(FocusZoneDirection || (exports.FocusZoneDirection = FocusZoneDirection = {})); //# sourceMappingURL=FocusZone.types.js.map },{}],"3SWL":[function(require,module,exports) { +var process = require("process"); "use strict"; Object.defineProperty(exports, "__esModule", { @@ -163014,6 +163196,9 @@ var NO_HORIZONTAL_WRAP = 'data-no-horizontal-wrap'; var LARGE_DISTANCE_FROM_CENTER = 999999999; var LARGE_NEGATIVE_DISTANCE_FROM_CENTER = -999999999; var _allInstances = {}; + +var _outerZones = new Set(); + var ALLOWED_INPUT_TYPES = ['text', 'number', 'password', 'email', 'tel', 'url', 'search']; var ALLOW_VIRTUAL_ELEMENTS = false; @@ -163057,11 +163242,18 @@ function (_super) { } } + var initialElementFocused = !_this._activeElement; // If the new active element is a child of this zone and received focus, + // update alignment an immediate descendant + if (newActiveElement && newActiveElement !== _this._activeElement) { + if (isImmediateDescendant || initialElementFocused) { + _this._setFocusAlignment(newActiveElement, initialElementFocused); + } + _this._activeElement = newActiveElement; - if (isImmediateDescendant) { - _this._setFocusAlignment(_this._activeElement); + if (initialElementFocused) { + _this._updateTabIndexes(); } } @@ -163084,7 +163276,9 @@ function (_super) { _this._onKeyDownCapture = function (ev) { if (ev.which === _Utilities.KeyCodes.tab) { - _this._updateTabIndexes(); + _outerZones.forEach(function (zone) { + return zone._updateTabIndexes(); + }); } }; @@ -163266,7 +163460,7 @@ function (_super) { (0, _Utilities.initializeComponentRef)(_this); - if ("production" !== 'production') { + if (typeof process !== 'undefined' && "production" !== 'production') { (0, _Utilities.warnDeprecations)('FocusZone', props, { rootProps: undefined, allowTabKey: 'handleTabKey', @@ -163282,6 +163476,12 @@ function (_super) { _this._processingTabKey = false; return _this; } + /** Used for testing purposes only. */ + + + FocusZone.getOuterZones = function () { + return _outerZones.size; + }; FocusZone.prototype.componentDidMount = function () { var root = this._root.current; @@ -163301,8 +163501,14 @@ function (_super) { } if (!this._isInnerZone) { - this._disposables.push((0, _Utilities.on)(windowElement, 'keydown', this._onKeyDownCapture, true), (0, _Utilities.on)(root, 'blur', this._onBlur, true)); - } // Assign initial tab indexes so that we can set initial focus as appropriate. + _outerZones.add(this); + } + + if (windowElement && _outerZones.size === 1) { + this._disposables.push((0, _Utilities.on)(windowElement, 'keydown', this._onKeyDownCapture, true)); + } + + this._disposables.push((0, _Utilities.on)(root, 'blur', this._onBlur, true)); // Assign initial tab indexes so that we can set initial focus as appropriate. this._updateTabIndexes(); @@ -163337,7 +163543,12 @@ function (_super) { }; FocusZone.prototype.componentWillUnmount = function () { - delete _allInstances[this._id]; // Dispose all events. + delete _allInstances[this._id]; + + if (!this._isInnerZone) { + _outerZones.delete(this); + } // Dispose all events. + this._disposables.forEach(function (d) { return d(); @@ -163445,7 +163656,7 @@ function (_super) { var focusedElement = doc.activeElement; // Only update the index path if we are not parked on the root. if (focusedElement !== root) { - var shouldRestoreFocus = (0, _Utilities.elementContains)(root, focusedElement); + var shouldRestoreFocus = (0, _Utilities.elementContains)(root, focusedElement, false); this._lastIndexPath = shouldRestoreFocus ? (0, _Utilities.getElementIndexPath)(root, doc.activeElement) : undefined; } } @@ -163936,7 +164147,7 @@ function (_super) { exports.FocusZone = FocusZone; -},{"tslib":"xgwM","react":"mpTF","./FocusZone.types":"E5Fw","../../Utilities":"B5nc"}],"SJWb":[function(require,module,exports) { +},{"tslib":"xgwM","react":"mpTF","./FocusZone.types":"E5Fw","../../Utilities":"B5nc","process":"r7L2"}],"SJWb":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -164668,6 +164879,23 @@ function _getFlankingEdges(edge) { }; } } +/** + * Retrieve the final value for the return edge of elementRectangle. + * If the elementRectangle is closer to one side of the bounds versus the other, the return edge is flipped to grow inward. + * + * @param elementRectangle + * @param targetEdge + * @param bounds + */ + + +function _finalizeReturnEdge(elementRectangle, returnEdge, bounds) { + if (bounds && Math.abs(_getRelativeEdgeDifference(elementRectangle, bounds, returnEdge)) > Math.abs(_getRelativeEdgeDifference(elementRectangle, bounds, returnEdge * -1))) { + return returnEdge * -1; + } + + return returnEdge; +} /** * Finalizes the element positon based on the hostElement. Only returns the * rectangle values to position such that they are anchored to the target. @@ -164692,11 +164920,8 @@ function _finalizeElementPosition(elementRectangle, hostElement, targetEdge, bou var elementEdge = coverTarget ? targetEdge : targetEdge * -1; var elementEdgeString = _positioning.RectangleEdge[elementEdge]; - var returnEdge = alignmentEdge ? alignmentEdge : _getFlankingEdges(targetEdge).positiveEdge; // if the element is closer to one side of the bounds than the other, flip the return edge to ensure it grows inwards - if (bounds && Math.abs(_getRelativeEdgeDifference(elementRectangle, bounds, returnEdge)) > Math.abs(_getRelativeEdgeDifference(elementRectangle, bounds, returnEdge * -1))) { - returnEdge = returnEdge * -1; - } + var returnEdge = _finalizeReturnEdge(elementRectangle, alignmentEdge ? alignmentEdge : _getFlankingEdges(targetEdge).positiveEdge, bounds); returnValue[elementEdgeString] = _getRelativeEdgeDifference(elementRectangle, hostRect, elementEdge); returnValue[_positioning.RectangleEdge[returnEdge]] = _getRelativeEdgeDifference(elementRectangle, hostRect, returnEdge); @@ -164799,12 +165024,14 @@ function _positionElementWithinBounds(elementToPosition, target, bounding, posit } } -function _finalizeBeakPosition(elementPosition, positionedBeak) { +function _finalizeBeakPosition(elementPosition, positionedBeak, bounds) { var targetEdge = elementPosition.targetEdge * -1; // The "host" element that we will use to help position the beak. var actualElement = new Rectangle(0, elementPosition.elementRectangle.width, 0, elementPosition.elementRectangle.height); - var returnEdge = elementPosition.alignmentEdge ? elementPosition.alignmentEdge : _getFlankingEdges(targetEdge).positiveEdge; var returnValue = {}; + + var returnEdge = _finalizeReturnEdge(elementPosition.elementRectangle, elementPosition.alignmentEdge ? elementPosition.alignmentEdge : _getFlankingEdges(targetEdge).positiveEdge, bounds); + returnValue[_positioning.RectangleEdge[targetEdge]] = _getEdgeValue(positionedBeak, targetEdge); returnValue[_positioning.RectangleEdge[returnEdge]] = _getRelativeEdgeDifference(positionedBeak, actualElement, returnEdge); return { @@ -164949,7 +165176,7 @@ function _positionCallout(props, hostElement, callout, previousPositions) { var beakPositioned = _positionBeak(beakWidth, positionedElement); - var finalizedBeakPosition = _finalizeBeakPosition(positionedElement, beakPositioned); + var finalizedBeakPosition = _finalizeBeakPosition(positionedElement, beakPositioned, boundingRect); return tslib_1.__assign({}, _finalizePositionData(positionedElement, hostElement, boundingRect, props.coverTarget), { beakPosition: finalizedBeakPosition @@ -164961,6 +165188,7 @@ function _positionCallout(props, hostElement, callout, previousPositions) { var __positioningTestPackage = { _finalizePositionData: _finalizePositionData, + _finalizeBeakPosition: _finalizeBeakPosition, _calculateActualBeakWidthInPixels: _calculateActualBeakWidthInPixels, _positionElementWithinBounds: _positionElementWithinBounds, _positionBeak: _positionBeak, @@ -165107,6 +165335,7 @@ function (_super) { var _this = _super.call(this, props) || this; _this._root = React.createRef(); + _this._disposables = []; _this._onKeyDown = function (ev) { switch (ev.which) { @@ -165122,6 +165351,17 @@ function (_super) { } }; + _this._onFocus = function () { + _this._containsFocus = true; + }; + + _this._onBlur = function (ev) { + if (_this._root.current && _this._root.current.contains(ev.relatedTarget)) { + _this._containsFocus = false; + } + }; + + _this._async = new _Utilities.Async(_this); _this.state = { needsVerticalScrollBar: false }; @@ -165133,16 +165373,12 @@ function (_super) { }; Popup.prototype.componentDidMount = function () { - if (!this._root.current) { - return; - } + if (this._root.current) { + this._disposables.push((0, _Utilities.on)(this._root.current, 'focus', this._onFocus, true), (0, _Utilities.on)(this._root.current, 'blur', this._onBlur, true)); - this._events.on(this._root.current, 'focus', this._onFocus, true); - - this._events.on(this._root.current, 'blur', this._onBlur, true); - - if ((0, _Utilities.doesElementContainFocus)(this._root.current)) { - this._containsFocus = true; + if ((0, _Utilities.doesElementContainFocus)(this._root.current)) { + this._containsFocus = true; + } } this._updateScrollBarAsync(); @@ -165150,9 +165386,15 @@ function (_super) { Popup.prototype.componentDidUpdate = function () { this._updateScrollBarAsync(); + + this._async.dispose(); }; Popup.prototype.componentWillUnmount = function () { + this._disposables.forEach(function (dispose) { + return dispose(); + }); + if (this.props.shouldRestoreFocus && this._originalFocusedElement && this._containsFocus && this._originalFocusedElement !== window) { // This slight delay is required so that we can unwind the stack, let react try to mess with focus, and then // apply the correct focus. Without the setTimeout, we end up focusing the correct thing, and then React wants @@ -165228,21 +165470,11 @@ function (_super) { } }; - Popup.prototype._onFocus = function () { - this._containsFocus = true; - }; - - Popup.prototype._onBlur = function (ev) { - if (this._root.current && this._root.current.contains(ev.relatedTarget)) { - this._containsFocus = false; - } - }; - Popup.defaultProps = { shouldRestoreFocus: true }; return Popup; -}(_Utilities.BaseComponent); //# sourceMappingURL=Popup.js.map +}(React.Component); //# sourceMappingURL=Popup.js.map exports.Popup = Popup; @@ -165332,6 +165564,7 @@ function (_super) { _this._hostElement = React.createRef(); _this._calloutElement = React.createRef(); _this._hasListeners = false; + _this._disposables = []; _this.dismiss = function (ev) { var onDismiss = _this.props.onDismiss; @@ -165341,6 +165574,32 @@ function (_super) { } }; + _this._dismissOnScroll = function (ev) { + var preventDismissOnScroll = _this.props.preventDismissOnScroll; + + if (_this.state.positions && !preventDismissOnScroll) { + _this._dismissOnLostFocus(ev); + } + }; + + _this._dismissOnResize = function (ev) { + var preventDismissOnResize = _this.props.preventDismissOnResize; + + if (!preventDismissOnResize) { + _this.dismiss(ev); + } + }; + + _this._dismissOnLostFocus = function (ev) { + var target = ev.target; + var clickedOutsideCallout = _this._hostElement.current && !(0, _Utilities.elementContains)(_this._hostElement.current, target); + var preventDismissOnLostFocus = _this.props.preventDismissOnLostFocus; + + if (!preventDismissOnLostFocus && (!_this._target && clickedOutsideCallout || ev.target !== _this._targetWindow && clickedOutsideCallout && (_this._target.stopPropagation || !_this._target || target !== _this._target && !(0, _Utilities.elementContains)(_this._target, target)))) { + _this.dismiss(ev); + } + }; + _this._setInitialFocus = function () { if (_this.props.setInitialFocus && !_this._didSetInitialFocus && _this.state.positions && _this._calloutElement.current) { _this._didSetInitialFocus = true; @@ -165363,6 +165622,7 @@ function (_super) { _this._setHeightOffsetEveryFrame(); }; + _this._async = new _Utilities.Async(_this); _this._didSetInitialFocus = false; _this.state = { positions: undefined, @@ -165391,10 +165651,27 @@ function (_super) { } }; + CalloutContentBase.prototype.shouldComponentUpdate = function (newProps, newState) { + if (this.props.hidden && newProps.hidden) { + // Do not update when hidden. + return false; + } + + return !(0, _Utilities.shallowCompare)(this.props, newProps) || !(0, _Utilities.shallowCompare)(this.state, newState); + }; + CalloutContentBase.prototype.componentWillMount = function () { this._setTargetWindowAndElement(this._getTarget()); }; + CalloutContentBase.prototype.componentWillUnmount = function () { + this._async.dispose(); + + this._disposables.forEach(function (dispose) { + return dispose(); + }); + }; + CalloutContentBase.prototype.componentWillUpdate = function (newProps) { // If the target element changed, find the new one. If we are tracking target with class name, always find element because we // do not know if fabric has rendered a new element and disposed the old element. @@ -165414,10 +165691,14 @@ function (_super) { if (newProps.finalHeight !== this.props.finalHeight) { this._setHeightOffsetEveryFrame(); - } // if the callout becomes hidden, then remove any positions, bounds that were placed on it. + } // Ensure positioning is recalculated when we are about to show a persisted menu. - if (newProps.hidden && newProps.hidden !== this.props.hidden) { + if (!newProps.hidden && newProps.hidden !== this.props.hidden) { + this._maxHeight = undefined; // Target might have been updated while hidden. + + this._setTargetWindowAndElement(newTarget); + this.setState({ positions: undefined }); @@ -165516,32 +165797,6 @@ function (_super) { return content; }; - CalloutContentBase.prototype._dismissOnScroll = function (ev) { - var preventDismissOnScroll = this.props.preventDismissOnScroll; - - if (this.state.positions && !preventDismissOnScroll) { - this._dismissOnLostFocus(ev); - } - }; - - CalloutContentBase.prototype._dismissOnResize = function (ev) { - var preventDismissOnResize = this.props.preventDismissOnResize; - - if (!preventDismissOnResize) { - this.dismiss(ev); - } - }; - - CalloutContentBase.prototype._dismissOnLostFocus = function (ev) { - var target = ev.target; - var clickedOutsideCallout = this._hostElement.current && !(0, _Utilities.elementContains)(this._hostElement.current, target); - var preventDismissOnLostFocus = this.props.preventDismissOnLostFocus; - - if (!preventDismissOnLostFocus && (!this._target && clickedOutsideCallout || ev.target !== this._targetWindow && clickedOutsideCallout && (this._target.stopPropagation || !this._target || target !== this._target && !(0, _Utilities.elementContains)(this._target, target)))) { - this.dismiss(ev); - } - }; - CalloutContentBase.prototype._addListeners = function () { var _this = this; // This is added so the callout will dismiss when the window is scrolled // but not when something inside the callout is scrolled. The delay seems @@ -165550,27 +165805,18 @@ function (_super) { this._async.setTimeout(function () { - _this._events.on(_this._targetWindow, 'scroll', _this._dismissOnScroll, true); - - _this._events.on(_this._targetWindow, 'resize', _this._dismissOnResize, true); - - _this._events.on(_this._targetWindow.document.documentElement, 'focus', _this._dismissOnLostFocus, true); - - _this._events.on(_this._targetWindow.document.documentElement, 'click', _this._dismissOnLostFocus, true); + _this._disposables.push((0, _Utilities.on)(_this._targetWindow, 'scroll', _this._dismissOnScroll, true), (0, _Utilities.on)(_this._targetWindow, 'resize', _this._dismissOnResize, true), (0, _Utilities.on)(_this._targetWindow.document.documentElement, 'focus', _this._dismissOnLostFocus, true), (0, _Utilities.on)(_this._targetWindow.document.documentElement, 'click', _this._dismissOnLostFocus, true)); _this._hasListeners = true; }, 0); }; CalloutContentBase.prototype._removeListeners = function () { - this._events.off(this._targetWindow, 'scroll', this._dismissOnScroll, true); - - this._events.off(this._targetWindow, 'resize', this._dismissOnResize, true); - - this._events.off(this._targetWindow.document.documentElement, 'focus', this._dismissOnLostFocus, true); - - this._events.off(this._targetWindow.document.documentElement, 'click', this._dismissOnLostFocus, true); + this._disposables.forEach(function (dispose) { + return dispose(); + }); + this._disposables = []; this._hasListeners = false; }; @@ -165776,7 +166022,7 @@ function (_super) { directionalHint: _DirectionalHint.DirectionalHint.bottomAutoEdge }; return CalloutContentBase; -}(_Utilities.BaseComponent); +}(React.Component); exports.CalloutContentBase = CalloutContentBase; @@ -165960,6 +166206,7 @@ function (_super) { var _this = _super.call(this, props) || this; _this._rootElement = React.createRef(); + _this._disposables = []; _this._onMouseDown = function (ev) { _this.setState({ @@ -165994,14 +166241,18 @@ function (_super) { var win = (0, _Utilities.getWindow)(this._rootElement.current); if (win) { - this._events.on(win, 'mousedown', this._onMouseDown, true); - - this._events.on(win, 'keydown', this._onKeyDown, true); + this._disposables.push((0, _Utilities.on)(win, 'mousedown', this._onMouseDown, true), (0, _Utilities.on)(win, 'keydown', this._onKeyDown, true)); } }; + FabricBase.prototype.componentWillUnmount = function () { + this._disposables.forEach(function (dispose) { + return dispose(); + }); + }; + return FabricBase; -}(_Utilities.BaseComponent); //# sourceMappingURL=Fabric.base.js.map +}(React.Component); //# sourceMappingURL=Fabric.base.js.map exports.FabricBase = FabricBase; @@ -166155,6 +166406,7 @@ function getDefaultTarget() { return _defaultHostSelector; } //# sourceMappingURL=Layer.notification.js.map },{}],"9BNs":[function(require,module,exports) { +var process = require("process"); "use strict"; Object.defineProperty(exports, "__esModule", { @@ -166219,9 +166471,11 @@ function (_super) { hasMounted: false }; - _this._warnDeprecations({ - onLayerMounted: 'onLayerDidMount' - }); + if (typeof process !== 'undefined' && "production" !== 'production') { + (0, _Utilities.warnDeprecations)('Layer', props, { + onLayerMounted: 'onLayerDidMount' + }); + } if (_this.props.hostId) { (0, _Layer.registerLayer)(_this.props.hostId, _this); @@ -166411,11 +166665,11 @@ function (_super) { }; LayerBase = tslib_1.__decorate([(0, _Utilities.customizable)('Layer', ['theme', 'hostId'])], LayerBase); return LayerBase; -}(_Utilities.BaseComponent); //# sourceMappingURL=Layer.base.js.map +}(React.Component); //# sourceMappingURL=Layer.base.js.map exports.LayerBase = LayerBase; -},{"tslib":"xgwM","react":"mpTF","react-dom":"J77C","../../Fabric":"IcJL","../../Utilities":"B5nc","./Layer.notification":"zSkE"}],"Xjcp":[function(require,module,exports) { +},{"tslib":"xgwM","react":"mpTF","react-dom":"J77C","../../Fabric":"IcJL","../../Utilities":"B5nc","./Layer.notification":"zSkE","process":"r7L2"}],"Xjcp":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -166520,7 +166774,7 @@ function (_super) { }; return LayerHost; -}(_Utilities.BaseComponent); //# sourceMappingURL=LayerHost.js.map +}(React.Component); //# sourceMappingURL=LayerHost.js.map exports.LayerHost = LayerHost; @@ -166598,8 +166852,6 @@ var tslib_1 = _interopRequireWildcard(require("tslib")); var React = _interopRequireWildcard(require("react")); -var _Utilities = require("../../Utilities"); - var _CalloutContent = require("./CalloutContent"); var _Layer = require("../../Layer"); @@ -166611,8 +166863,8 @@ var Callout = function (_super) { tslib_1.__extends(Callout, _super); - function Callout(props) { - return _super.call(this, props) || this; + function Callout() { + return _super !== null && _super.apply(this, arguments) || this; } Callout.prototype.render = function () { @@ -166625,11 +166877,11 @@ function (_super) { }; return Callout; -}(_Utilities.BaseComponent); //# sourceMappingURL=Callout.js.map +}(React.Component); //# sourceMappingURL=Callout.js.map exports.Callout = Callout; -},{"tslib":"xgwM","react":"mpTF","../../Utilities":"B5nc","./CalloutContent":"HA6h","../../Layer":"sWnj"}],"pSbi":[function(require,module,exports) { +},{"tslib":"xgwM","react":"mpTF","./CalloutContent":"HA6h","../../Layer":"sWnj"}],"pSbi":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -166650,56 +166902,111 @@ var FocusTrapZone = function (_super) { tslib_1.__extends(FocusTrapZone, _super); - function FocusTrapZone() { - var _this = _super !== null && _super.apply(this, arguments) || this; + function FocusTrapZone(props) { + var _this = _super.call(this, props) || this; _this._root = React.createRef(); + _this._firstBumper = React.createRef(); + _this._lastBumper = React.createRef(); + _this._hasFocus = false; + + _this._onRootFocus = function (ev) { + if (_this.props.onFocus) { + _this.props.onFocus(ev); + } + + _this._hasFocus = true; + }; + + _this._onRootBlur = function (ev) { + if (_this.props.onBlur) { + _this.props.onBlur(ev); + } + + var relatedTarget = ev.relatedTarget; + + if (ev.relatedTarget === null) { + // In IE11, due to lack of support, event.relatedTarget is always + // null making every onBlur call to be "outside" of the ComboBox + // even when it's not. Using document.activeElement is another way + // for us to be able to get what the relatedTarget without relying + // on the event + relatedTarget = document.activeElement; + } + + if (!(0, _Utilities.elementContains)(_this._root.current, relatedTarget)) { + _this._hasFocus = false; + } + }; + + _this._onFirstBumperFocus = function () { + _this._onBumperFocus(true); + }; + + _this._onLastBumperFocus = function () { + _this._onBumperFocus(false); + }; + + _this._onBumperFocus = function (isFirstBumper) { + var currentBumper = isFirstBumper === _this._hasFocus ? _this._lastBumper.current : _this._firstBumper.current; + + if (_this._root.current) { + var nextFocusable = isFirstBumper === _this._hasFocus ? (0, _Utilities.getLastTabbable)(_this._root.current, currentBumper, true, false) : (0, _Utilities.getFirstTabbable)(_this._root.current, currentBumper, true, false); + + if (nextFocusable) { + if (_this._isBumper(nextFocusable)) { + // This can happen when FTZ contains no tabbable elements. focus will take care of finding a focusable element in FTZ. + _this.focus(); + } else { + nextFocusable.focus(); + } + } + } + }; _this._onFocusCapture = function (ev) { if (_this.props.onFocusCapture) { _this.props.onFocusCapture(ev); } - if (ev.target !== ev.currentTarget) { + if (ev.target !== ev.currentTarget && !_this._isBumper(ev.target)) { // every time focus changes within the trap zone, remember the focused element so that // it can be restored if focus leaves the pane and returns via keystroke (i.e. via a call to this.focus(true)) _this._previouslyFocusedElementInTrapZone = ev.target; } }; - _this._onKeyboardHandler = function (ev) { - if (_this.props.onKeyDown) { - _this.props.onKeyDown(ev); - } // If the default has been prevented, do not process keyboard events. + _this._forceFocusInTrap = function (ev) { + if (FocusTrapZone._focusStack.length && _this === FocusTrapZone._focusStack[FocusTrapZone._focusStack.length - 1]) { + var focusedElement = document.activeElement; + if (!(0, _Utilities.elementContains)(_this._root.current, focusedElement)) { + _this.focus(); - if (ev.isDefaultPrevented()) { - return; - } + _this._hasFocus = true; // set focus here since we stop event propagation - if (ev.which !== _Utilities.KeyCodes.tab) { - return; - } - - if (!_this._root.current) { - return; - } - - var _firstTabbableChild = (0, _Utilities.getFirstTabbable)(_this._root.current, _this._root.current.firstChild, true); - - var _lastTabbableChild = (0, _Utilities.getLastTabbable)(_this._root.current, _this._root.current.lastChild, true); - - if (ev.shiftKey && _firstTabbableChild === ev.target) { - (0, _Utilities.focusAsync)(_lastTabbableChild); - ev.preventDefault(); - ev.stopPropagation(); - } else if (!ev.shiftKey && _lastTabbableChild === ev.target) { - (0, _Utilities.focusAsync)(_firstTabbableChild); - ev.preventDefault(); - ev.stopPropagation(); + ev.preventDefault(); + ev.stopPropagation(); + } } }; + _this._forceClickInTrap = function (ev) { + if (FocusTrapZone._focusStack.length && _this === FocusTrapZone._focusStack[FocusTrapZone._focusStack.length - 1]) { + var clickedElement = ev.target; + + if (clickedElement && !(0, _Utilities.elementContains)(_this._root.current, clickedElement)) { + _this.focus(); + + _this._hasFocus = true; // set focus here since we stop event propagation + + ev.preventDefault(); + ev.stopPropagation(); + } + } + }; + + (0, _Utilities.initializeComponentRef)(_this); return _this; } @@ -166733,8 +167040,6 @@ function (_super) { }; FocusTrapZone.prototype.componentWillUnmount = function () { - this._events.dispose(); - this._returnFocusToInitiator(); }; @@ -166743,13 +167048,30 @@ function (_super) { className = _a.className, ariaLabelledBy = _a.ariaLabelledBy; var divProps = (0, _Utilities.getNativeProps)(this.props, _Utilities.divProperties); + var bumperProps = { + style: { + pointerEvents: 'none', + position: 'fixed' // 'fixed' prevents browsers from scrolling to bumpers when viewport does not contain them + + }, + tabIndex: 0, + 'aria-hidden': true, + 'data-is-visible': true + }; return React.createElement("div", tslib_1.__assign({}, divProps, { className: className, ref: this._root, "aria-labelledby": ariaLabelledBy, - onKeyDown: this._onKeyboardHandler, - onFocusCapture: this._onFocusCapture - }), this.props.children); + onFocusCapture: this._onFocusCapture, + onFocus: this._onRootFocus, + onBlur: this._onRootBlur + }), React.createElement("div", tslib_1.__assign({}, bumperProps, { + ref: this._firstBumper, + onFocus: this._onFirstBumperFocus + })), this.props.children, React.createElement("div", tslib_1.__assign({}, bumperProps, { + ref: this._lastBumper, + onFocus: this._onLastBumperFocus + }))); }; FocusTrapZone.prototype.focus = function () { @@ -166759,7 +167081,8 @@ function (_super) { if (focusPreviouslyFocusedInnerElement && this._previouslyFocusedElementInTrapZone && (0, _Utilities.elementContains)(this._root.current, this._previouslyFocusedElementInTrapZone)) { // focus on the last item that had focus in the zone before we left the zone - (0, _Utilities.focusAsync)(this._previouslyFocusedElementInTrapZone); + this._focusAsync(this._previouslyFocusedElementInTrapZone); + return; } @@ -166770,13 +167093,22 @@ function (_super) { if (this._root.current) { if (focusSelector) { _firstFocusableChild = this._root.current.querySelector('.' + focusSelector); - } else { - _firstFocusableChild = (0, _Utilities.getNextElement)(this._root.current, this._root.current.firstChild, true, false, false, true); + } // Fall back to first element if query selector did not match any elements. + + + if (!_firstFocusableChild) { + _firstFocusableChild = (0, _Utilities.getNextElement)(this._root.current, this._root.current.firstChild, false, false, false, true); } } if (_firstFocusableChild) { - (0, _Utilities.focusAsync)(_firstFocusableChild); + this._focusAsync(_firstFocusableChild); + } + }; + + FocusTrapZone.prototype._focusAsync = function (element) { + if (!this._isBumper(element)) { + (0, _Utilities.focusAsync)(element); } }; @@ -166790,7 +167122,7 @@ function (_super) { this._previouslyFocusedElementOutsideTrapZone = elementToFocusOnDismiss ? elementToFocusOnDismiss : document.activeElement; - if (!(0, _Utilities.elementContains)(this._root.current, this._previouslyFocusedElementOutsideTrapZone) && !disableFirstFocus) { + if (!disableFirstFocus && !(0, _Utilities.elementContains)(this._root.current, this._previouslyFocusedElementOutsideTrapZone)) { this.focus(); } }; @@ -166805,7 +167137,7 @@ function (_super) { var activeElement = document.activeElement; if (!ignoreExternalFocusing && this._previouslyFocusedElementOutsideTrapZone && typeof this._previouslyFocusedElementOutsideTrapZone.focus === 'function' && ((0, _Utilities.elementContains)(this._root.current, activeElement) || activeElement === document.body)) { - (0, _Utilities.focusAsync)(this._previouslyFocusedElementOutsideTrapZone); + this._focusAsync(this._previouslyFocusedElementOutsideTrapZone); } }; @@ -166815,50 +167147,30 @@ function (_super) { _b = newProps.forceFocusInsideTrap, forceFocusInsideTrap = _b === void 0 ? true : _b; - if (forceFocusInsideTrap && !this._hasFocusHandler) { - this._events.on(window, 'focus', this._forceFocusInTrap, true); - } else if (!forceFocusInsideTrap && this._hasFocusHandler) { - this._events.off(window, 'focus', this._forceFocusInTrap, true); + if (forceFocusInsideTrap && !this._disposeFocusHandler) { + this._disposeFocusHandler = (0, _Utilities.on)(window, 'focus', this._forceFocusInTrap, true); + } else if (!forceFocusInsideTrap && this._disposeFocusHandler) { + this._disposeFocusHandler(); + + this._disposeFocusHandler = undefined; } - this._hasFocusHandler = forceFocusInsideTrap; + if (!isClickableOutsideFocusTrap && !this._disposeClickHandler) { + this._disposeClickHandler = (0, _Utilities.on)(window, 'click', this._forceClickInTrap, true); + } else if (isClickableOutsideFocusTrap && this._disposeClickHandler) { + this._disposeClickHandler(); - if (!isClickableOutsideFocusTrap && !this._hasClickHandler) { - this._events.on(window, 'click', this._forceClickInTrap, true); - } else if (isClickableOutsideFocusTrap && this._hasClickHandler) { - this._events.off(window, 'click', this._forceClickInTrap, true); - } - - this._hasClickHandler = !isClickableOutsideFocusTrap; - }; - - FocusTrapZone.prototype._forceFocusInTrap = function (ev) { - if (FocusTrapZone._focusStack.length && this === FocusTrapZone._focusStack[FocusTrapZone._focusStack.length - 1]) { - var focusedElement = ev.relatedTarget || document.activeElement; - - if (!(0, _Utilities.elementContains)(this._root.current, focusedElement)) { - this.focus(); - ev.preventDefault(); - ev.stopPropagation(); - } + this._disposeClickHandler = undefined; } }; - FocusTrapZone.prototype._forceClickInTrap = function (ev) { - if (FocusTrapZone._focusStack.length && this === FocusTrapZone._focusStack[FocusTrapZone._focusStack.length - 1]) { - var clickedElement = ev.target; - - if (clickedElement && !(0, _Utilities.elementContains)(this._root.current, clickedElement)) { - this.focus(); - ev.preventDefault(); - ev.stopPropagation(); - } - } + FocusTrapZone.prototype._isBumper = function (element) { + return element === this._firstBumper.current || element === this._lastBumper.current; }; FocusTrapZone._focusStack = []; return FocusTrapZone; -}(_Utilities.BaseComponent); //# sourceMappingURL=FocusTrapZone.js.map +}(React.Component); //# sourceMappingURL=FocusTrapZone.js.map exports.FocusTrapZone = FocusTrapZone; @@ -167607,6 +167919,10 @@ function (_super) { return _this; } + ContextualMenuItemWrapper.prototype.shouldComponentUpdate = function (newProps) { + return !(0, _Utilities.shallowCompare)(newProps, this.props); + }; + return ContextualMenuItemWrapper; }(_Utilities.BaseComponent); //# sourceMappingURL=ContextualMenuItemWrapper.js.map @@ -167973,6 +168289,8 @@ exports.KeytipData = void 0; var tslib_1 = _interopRequireWildcard(require("tslib")); +var React = _interopRequireWildcard(require("react")); + var _Utilities = require("../../Utilities"); var _KeytipManager = require("../../utilities/keytips/KeytipManager"); @@ -168034,8 +168352,8 @@ function (_super) { }; /** * Gets the aria- and data- attributes to attach to the component - * @param keytipProps - * @param describedByPrepend + * @param keytipProps - props for Keytip + * @param describedByPrepend - ariaDescribedBy value to prepend */ @@ -168064,11 +168382,11 @@ function (_super) { }; return KeytipData; -}(_Utilities.BaseComponent); //# sourceMappingURL=KeytipData.js.map +}(React.Component); //# sourceMappingURL=KeytipData.js.map exports.KeytipData = KeytipData; -},{"tslib":"xgwM","../../Utilities":"B5nc","../../utilities/keytips/KeytipManager":"qsTL","../../utilities/keytips/KeytipUtils":"LjLQ"}],"/VbL":[function(require,module,exports) { +},{"tslib":"xgwM","react":"mpTF","../../Utilities":"B5nc","../../utilities/keytips/KeytipManager":"qsTL","../../utilities/keytips/KeytipUtils":"LjLQ"}],"/VbL":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -168216,7 +168534,7 @@ function (_super) { onMouseEnter: _this._onItemMouseEnter, onMouseLeave: _this._onItemMouseLeave, onMouseMove: _this._onItemMouseMove, - onKeyDown: itemHasSubmenu ? _this._onItemKeyDown : null + onKeyDown: itemHasSubmenu ? _this._onItemKeyDown : undefined }), React.createElement(ChildrenRenderer, tslib_1.__assign({ componentRef: item.componentRef, item: item, @@ -168312,7 +168630,7 @@ function (_super) { var itemButtonProperties = { className: classNames.root, onClick: this._onItemClick, - onKeyDown: itemHasSubmenu ? this._onItemKeyDown : null, + onKeyDown: itemHasSubmenu ? this._onItemKeyDown : undefined, onMouseEnter: this._onItemMouseEnter, onMouseLeave: this._onItemMouseLeave, onMouseDown: function (ev) { @@ -168699,7 +169017,8 @@ function (_super) { split: true, key: item.key }; - var buttonProps = (0, _Utilities.assign)({}, (0, _Utilities.getNativeProps)(itemProps, _Utilities.buttonProperties), { + + var buttonProps = tslib_1.__assign({}, (0, _Utilities.getNativeProps)(itemProps, _Utilities.buttonProperties), { onMouseEnter: this._onItemMouseEnterIcon, onMouseLeave: onItemMouseLeave ? onItemMouseLeave.bind(this, item) : undefined, onMouseDown: function (ev) { @@ -168710,6 +169029,7 @@ function (_super) { 'data-ktp-execute-target': keytipAttributes['data-ktp-execute-target'], 'aria-hidden': true }); + var itemComponentProps = item.itemProps; return React.createElement("button", tslib_1.__assign({}, buttonProps), React.createElement(ChildrenRenderer, tslib_1.__assign({ componentRef: item.componentRef, @@ -168961,9 +169281,9 @@ function (_super) { /** * Calls `shouldHandleKey` to determine whether the keyboard event should be handled; * if so, stops event propagation and dismisses menu(s). - * @param ev The keyboard event. - * @param shouldHandleKey Returns whether we should handle this keyboard event. - * @param dismissAllMenus If true, dismiss all menus. Otherwise, dismiss only the current menu. + * @param ev - The keyboard event. + * @param shouldHandleKey - Returns whether we should handle this keyboard event. + * @param dismissAllMenus - If true, dismiss all menus. Otherwise, dismiss only the current menu. * Only does anything if `shouldHandleKey` returns true. * @returns Whether the event was handled. */ @@ -169381,7 +169701,7 @@ function (_super) { direction: this._getFocusZoneDirection() }); var hasCheckmarks = canAnyMenuItemsCheck(items); - var submenuProps = this.state.expandedMenuItemKey ? this._getSubmenuProps() : null; + var submenuProps = this.state.expandedMenuItemKey && this.props.hidden !== true ? this._getSubmenuProps() : null; isBeakVisible = isBeakVisible === undefined ? this.props.responsiveMode <= _withResponsiveMode.ResponsiveMode.medium : isBeakVisible; /** * When useTargetWidth is true, get the width of the target element and apply it for the context menu container @@ -169441,7 +169761,6 @@ function (_super) { alignTargetEdge: alignTargetEdge, hidden: this.props.hidden }), React.createElement("div", { - role: "menu", "aria-label": ariaLabel, "aria-labelledby": labelElementId, style: contextMenuStyle, @@ -169487,7 +169806,15 @@ function (_super) { this._previousActiveElement && this._async.setTimeout(function () { _this._previousActiveElement && _this._previousActiveElement.focus(); }, 0); - this._shouldUpdateFocusOnMouseEvent = !this.props.delayUpdateFocusOnHover; + this._shouldUpdateFocusOnMouseEvent = !this.props.delayUpdateFocusOnHover; // We need to dismiss any submenu related state properties, + // so that when the menu is shown again, the submenu is collapsed + + this.setState({ + expandedByMouseClick: undefined, + dismissedMenuItemKey: undefined, + expandedMenuItemKey: undefined, + submenuTarget: undefined + }); }; /** * Gets the focusZoneDirection by using the arrowDirection if specified, @@ -169850,8 +170177,8 @@ function (_super) { }; /** * Returns the item that mathes a given key if any. - * @param key The key of the item to match - * @param items The items to look for the key + * @param key - The key of the item to match + * @param items - The items to look for the key */ @@ -170493,6 +170820,9 @@ function (_super) { _this.props.onKeyDown(ev); } + var isUp = ev.which === _Utilities.KeyCodes.up; + var isDown = ev.which === _Utilities.KeyCodes.down; + if (!ev.defaultPrevented && _this._isValidMenuOpenKey(ev)) { var onMenuClick = _this.props.onMenuClick; @@ -170505,6 +170835,23 @@ function (_super) { ev.preventDefault(); ev.stopPropagation(); } + + if (!(ev.altKey || ev.metaKey) && (isUp || isDown)) { + _this.setState(function (state) { + if (state.menuProps && !state.menuProps.shouldFocusOnMount) { + return { + menuProps: tslib_1.__assign({}, state.menuProps, { + shouldFocusOnMount: true + }) + }; + } + + return state; + }); + + ev.preventDefault(); + ev.stopPropagation(); + } }; _this._onTouchStart = function () { @@ -170550,8 +170897,10 @@ function (_super) { var menuProps = null; if (props.persistMenu && props.menuProps) { - menuProps = props.menuProps; - menuProps.hidden = true; + // Clone props so we don't mutate them. + menuProps = tslib_1.__assign({}, props.menuProps, { + hidden: true + }); } _this.state = { @@ -170946,6 +171295,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.ButtonType = exports.ElementType = void 0; + +/** + * {@docCategory Button} + */ var ElementType; exports.ElementType = ElementType; @@ -170956,6 +171309,10 @@ exports.ElementType = ElementType; ElementType[ElementType["anchor"] = 1] = "anchor"; })(ElementType || (exports.ElementType = ElementType = {})); +/** + * {@docCategory Button} + */ + var ButtonType; exports.ButtonType = ButtonType; @@ -172419,7 +172776,7 @@ function (_super) { }; return LabelBase; -}(_Utilities.BaseComponent); //# sourceMappingURL=Label.base.js.map +}(React.Component); //# sourceMappingURL=Label.base.js.map exports.LabelBase = LabelBase; @@ -172623,8 +172980,8 @@ var ChoiceGroupOptionBase = function (_super) { tslib_1.__extends(ChoiceGroupOptionBase, _super); - function ChoiceGroupOptionBase(props) { - var _this = _super.call(this, props) || this; + function ChoiceGroupOptionBase() { + var _this = _super !== null && _super.apply(this, arguments) || this; _this._inputElement = React.createRef(); @@ -172766,7 +173123,7 @@ function (_super) { }; return ChoiceGroupOptionBase; -}(_Utilities.BaseComponent); //# sourceMappingURL=ChoiceGroupOption.base.js.map +}(React.Component); //# sourceMappingURL=ChoiceGroupOption.base.js.map exports.ChoiceGroupOptionBase = ChoiceGroupOptionBase; @@ -173119,6 +173476,7 @@ Object.keys(_ChoiceGroupOption).forEach(function (key) { }); }); },{"./ChoiceGroupOption":"bWUu"}],"qJ3F":[function(require,module,exports) { +var process = require("process"); "use strict"; Object.defineProperty(exports, "__esModule", { @@ -173195,13 +173553,16 @@ function (_super) { }; }; - _this._warnDeprecations({ - onChanged: 'onChange' - }); + (0, _Utilities.initializeComponentRef)(_this); - _this._warnMutuallyExclusive({ - selectedKey: 'defaultSelectedKey' - }); + if (typeof process !== 'undefined' && "production" !== 'production') { + (0, _Utilities.warnDeprecations)('ChoiceGroup', props, { + onChanged: 'onChange' + }); + (0, _Utilities.warnMutuallyExclusive)('ChoiceGroup', props, { + selectedKey: 'defaultSelectedKey' + }); + } var validDefaultSelectedKey = !!props.options && props.options.some(function (option) { return option.key === props.defaultSelectedKey; @@ -173344,11 +173705,11 @@ function (_super) { options: [] }; return ChoiceGroupBase; -}(_Utilities.BaseComponent); //# sourceMappingURL=ChoiceGroup.base.js.map +}(React.Component); //# sourceMappingURL=ChoiceGroup.base.js.map exports.ChoiceGroupBase = ChoiceGroupBase; -},{"tslib":"xgwM","react":"mpTF","../../Label":"RcoC","../../Utilities":"B5nc","./ChoiceGroupOption/index":"akuc"}],"QO5L":[function(require,module,exports) { +},{"tslib":"xgwM","react":"mpTF","../../Label":"RcoC","../../Utilities":"B5nc","./ChoiceGroupOption/index":"akuc","process":"r7L2"}],"QO5L":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -173589,7 +173950,7 @@ function (_super) { }; /** * Updates the current input value as well as getting a new display value. - * @param newValue The new value from the input + * @param newValue - The new value from the input */ @@ -173763,10 +174124,10 @@ function (_super) { * Autofill should never be set to true if the value is composing. Once compositionEnd is called, then * it should be completed. * See https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent for more information on composition. - * @param newValue - * @param oldValue - * @param isComposing if true then the text is actively being composed and it has not completed. - * @param isComposed if the text is a composed text value. + * @param newValue - new input value + * @param oldValue - old input value + * @param isComposing - if true then the text is actively being composed and it has not completed. + * @param isComposed - if the text is a composed text value. */ @@ -173785,8 +174146,8 @@ function (_super) { * Returns a string that should be used as the display value. * It evaluates this based on whether or not the suggested value starts with the input value * and whether or not autofill is enabled. - * @param inputValue the value that the input currently has. - * @param suggestedDisplayValue the possible full value + * @param inputValue - the value that the input currently has. + * @param suggestedDisplayValue - the possible full value */ @@ -173852,6 +174213,7 @@ Object.keys(_Autofill).forEach(function (key) { }); }); },{"./Autofill":"/42f"}],"QEqz":[function(require,module,exports) { +var process = require("process"); "use strict"; Object.defineProperty(exports, "__esModule", { @@ -173931,9 +174293,13 @@ function (_super) { }, label) : null; }; - _this._warnMutuallyExclusive({ - checked: 'defaultChecked' - }); + (0, _Utilities.initializeComponentRef)(_this); + + if (typeof process !== 'undefined' && "production" !== 'production') { + (0, _Utilities.warnMutuallyExclusive)('Checkbox', props, { + checked: 'defaultChecked' + }); + } _this._id = _this.props.id || (0, _Utilities.getId)('checkbox-'); _this.state = { @@ -174050,11 +174416,11 @@ function (_super) { boxSide: 'start' }; return CheckboxBase; -}(_Utilities.BaseComponent); //# sourceMappingURL=Checkbox.base.js.map +}(React.Component); //# sourceMappingURL=Checkbox.base.js.map exports.CheckboxBase = CheckboxBase; -},{"tslib":"xgwM","react":"mpTF","../../Utilities":"B5nc","../../Icon":"s5pL","../../KeytipData":"9lto"}],"FqBF":[function(require,module,exports) { +},{"tslib":"xgwM","react":"mpTF","../../Utilities":"B5nc","../../Icon":"s5pL","../../KeytipData":"9lto","process":"r7L2"}],"FqBF":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -175107,7 +175473,7 @@ function (_super) { focused: false }); - if (!_this.props.multiSelect) { + if (!_this.props.multiSelect || _this.props.allowFreeform) { _this._submitPendingValue(event); } } @@ -175249,7 +175615,8 @@ function (_super) { disabled: item.disabled, isSelected: isSelected, text: item.text, - render: getOptionComponent + render: getOptionComponent, + data: item.data }); }; /** @@ -175837,6 +176204,7 @@ function (_super) { "aria-label": ariaLabel && !label ? ariaLabel : undefined, "aria-describedby": (0, _Utilities.mergeAriaAttributeValues)(ariaDescribedBy, keytipAttributes['aria-describedby']), "aria-activedescendant": _this._getAriaActiveDescentValue(), + "aria-required": required, "aria-disabled": disabled, "aria-owns": isOpen ? id + '-list' : undefined, spellCheck: false, @@ -176407,27 +176775,32 @@ function (_super) { }; }; /** - * Get the index of the option that is marked as selected + * Get the indices of the options that are marked as selected * @param options - the comboBox options - * @param selectedKeys - the known selected key to find - * @returns - the index of the selected option, -1 if not found + * @param selectedKeys - the known selected keys to find + * @returns - an array of the indices of the selected options, empty array if nothing is selected */ ComboBox.prototype._getSelectedIndices = function (options, selectedKeys) { - var selectedIndices = []; - - if (options === undefined || selectedKeys === undefined) { - return selectedIndices; + if (!options || !selectedKeys) { + return []; } + var selectedIndices = {}; + options.forEach(function (option, index) { + if (option.selected) { + selectedIndices[index] = true; + } + }); + var _loop_1 = function (selectedKey) { var index = (0, _Utilities.findIndex)(options, function (option) { - return option.selected || option.key === selectedKey; + return option.key === selectedKey; }); if (index > -1) { - selectedIndices.push(index); + selectedIndices[index] = true; } }; @@ -176437,7 +176810,7 @@ function (_super) { _loop_1(selectedKey); } - return selectedIndices; + return Object.keys(selectedIndices).map(Number).sort(); }; /** * Reset the selected index by clearing the @@ -176579,7 +176952,7 @@ function (_super) { } else if (currentPendingValueValidIndex !== prevState.currentPendingValueValidIndex && this._indexWithinBounds(currentOptions, currentPendingValueValidIndex)) { // Set new pending index if currentPendingValueValidIndex was changed newPendingIndex = currentPendingValueValidIndex; - } else if (currentPendingValue !== prevState.currentPendingValue && currentPendingValue !== '') { + } else if (currentPendingValue !== prevState.currentPendingValue) { // Set pendingValue in the case it was changed and no index was changed newPendingValue = currentPendingValue; } // Notify when there is a new pending index/value. Also, if there is a pending value, it needs to send undefined. @@ -176684,7 +177057,7 @@ function (_super) { }; /** * Get the styles for the current option. - * @param item Item props for the current option + * @param item - Item props for the current option */ @@ -176694,7 +177067,7 @@ function (_super) { }; /** * Get the styles for the current option. - * @param item Item props for the current option + * @param item - Item props for the current option */ @@ -176798,6 +177171,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.ScrollToMode = void 0; + +/** + * {@docCategory List} + */ var ScrollToMode = { /** * Does not make any consideration to where in the viewport the item should align to. @@ -176907,28 +177284,33 @@ function (_super) { role = _a.role; var _b = pageProps.page, - items = _b.items, + _c = _b.items, + items = _c === void 0 ? [] : _c, startIndex = _b.startIndex, divProps = tslib_1.__rest(pageProps, ["page"]); // only assign list item role if no role is assigned var cellRole = role === undefined ? 'listitem' : 'presentation'; - var cells = (items || []).map(function (item, offset) { - var index = startIndex + offset; + var cells = []; + + for (var i = 0; i < items.length; i++) { + var index = startIndex + i; + var item = items[i]; var itemKey = _this.props.getKey ? _this.props.getKey(item, index) : item && item.key; if (itemKey === null || itemKey === undefined) { itemKey = index; } - return React.createElement("div", { + cells.push(React.createElement("div", { role: cellRole, className: (0, _Utilities.css)('ms-List-cell'), key: itemKey, "data-list-index": index, "data-automationid": "ListCell" - }, onRenderCell && onRenderCell(item, index, _this.state.isScrolling)); - }); + }, onRenderCell && onRenderCell(item, index, _this.state.isScrolling))); + } + return React.createElement("div", tslib_1.__assign({}, divProps), cells); }; @@ -177177,9 +177559,10 @@ function (_super) { List.prototype.render = function () { var _a = this.props, className = _a.className, - role = _a.role; - var _b = this.state.pages, - pages = _b === void 0 ? [] : _b; + _b = _a.role, + role = _b === void 0 ? 'list' : _b; + var _c = this.state.pages, + pages = _c === void 0 ? [] : _c; var pageElements = []; var divProps = (0, _Utilities.getNativeProps)(this.props, _Utilities.divProperties); @@ -177191,7 +177574,7 @@ function (_super) { return React.createElement("div", tslib_1.__assign({ ref: this._root }, divProps, { - role: role === undefined ? 'list' : role, + role: pageElements.length > 0 ? role : undefined, className: (0, _Utilities.css)('ms-List', className) }), React.createElement("div", { ref: this._surface, @@ -177704,13 +178087,6 @@ function (_super) { if (cachedPage && cachedPage.page) { return cachedPage.page; - } // Fill undefined cells because array.map will ignore undefined cells. - - - if (items) { - for (var i = 0; i < items.length; i++) { - items[i] = items[i] || undefined; - } } return { @@ -177786,7 +178162,7 @@ function (_super) { List.defaultProps = { startIndex: 0, onRenderCell: function (item, index, containsFocus) { - return React.createElement("div", null, item && item.name || ''); + return React.createElement(React.Fragment, null, item && item.name || ''); }, renderedWindowsAhead: DEFAULT_RENDERED_WINDOWS_AHEAD, renderedWindowsBehind: DEFAULT_RENDERED_WINDOWS_BEHIND @@ -178007,6 +178383,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.DialogType = void 0; + +/** + * {@docCategory Dialog} + */ var DialogType; exports.DialogType = DialogType; @@ -178086,7 +178466,11 @@ var getStyles = function (props) { }, containerClassName], scrollableContent: [classNames.scrollableContent, { overflowY: 'auto', - flexGrow: 1 + flexGrow: 1, + maxHeight: '100vh', + selectors: (_a = {}, _a['@supports (-webkit-overflow-scrolling: touch)'] = { + maxHeight: window.innerHeight + }, _a) }, scrollableContentClassName], layer: isModeless && [classNames.layer, { position: 'static', @@ -178094,6 +178478,8 @@ var getStyles = function (props) { height: 'unset' }] }; + + var _a; }; //# sourceMappingURL=Modal.styles.js.map @@ -178952,6 +179338,7 @@ var DialogContent = (0, _Utilities.styled)(_DialogContent.DialogContentBase, _Di exports.DialogContent = DialogContent; },{"../../Utilities":"B5nc","./DialogContent.base":"ZWiV","./DialogContent.styles":"VIvE"}],"f+i0":[function(require,module,exports) { +var process = require("process"); "use strict"; Object.defineProperty(exports, "__esModule", { @@ -179031,21 +179418,23 @@ function (_super) { _this._defaultTitleTextId = _this._id + '-title'; _this._defaultSubTextId = _this._id + '-subText'; - _this._warnDeprecations({ - isOpen: 'hidden', - type: 'dialogContentProps.type', - subText: 'dialogContentProps.subText', - contentClassName: 'dialogContentProps.className', - topButtonsProps: 'dialogContentProps.topButtonsProps', - className: 'modalProps.className', - isDarkOverlay: 'modalProps.isDarkOverlay', - isBlocking: 'modalProps.isBlocking', - containerClassName: 'modalProps.containerClassName', - onDismissed: 'modalProps.onDismissed', - onLayerDidMount: 'modalProps.layerProps.onLayerDidMount', - ariaDescribedById: 'modalProps.subtitleAriaId', - ariaLabelledById: 'modalProps.titleAriaId' - }); + if (typeof process !== 'undefined' && "production" !== 'production') { + (0, _Utilities.warnDeprecations)('Dialog', props, { + isOpen: 'hidden', + type: 'dialogContentProps.type', + subText: 'dialogContentProps.subText', + contentClassName: 'dialogContentProps.className', + topButtonsProps: 'dialogContentProps.topButtonsProps', + className: 'modalProps.className', + isDarkOverlay: 'modalProps.isDarkOverlay', + isBlocking: 'modalProps.isBlocking', + containerClassName: 'modalProps.containerClassName', + onDismissed: 'modalProps.onDismissed', + onLayerDidMount: 'modalProps.layerProps.onLayerDidMount', + ariaDescribedById: 'modalProps.subtitleAriaId', + ariaLabelledById: 'modalProps.titleAriaId' + }); + } return _this; } @@ -179135,11 +179524,11 @@ function (_super) { }; DialogBase = tslib_1.__decorate([_withResponsiveMode.withResponsiveMode], DialogBase); return DialogBase; -}(_Utilities.BaseComponent); //# sourceMappingURL=Dialog.base.js.map +}(React.Component); //# sourceMappingURL=Dialog.base.js.map exports.DialogBase = DialogBase; -},{"tslib":"xgwM","react":"mpTF","../../Utilities":"B5nc","./DialogContent.types":"eCHI","../../Modal":"tqHC","../../utilities/decorators/withResponsiveMode":"Q4um","./DialogContent":"DckB"}],"bLVN":[function(require,module,exports) { +},{"tslib":"xgwM","react":"mpTF","../../Utilities":"B5nc","./DialogContent.types":"eCHI","../../Modal":"tqHC","../../utilities/decorators/withResponsiveMode":"Q4um","./DialogContent":"DckB","process":"r7L2"}],"bLVN":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -179427,6 +179816,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.PanelType = void 0; + +/** + * {@docCategory Panel} + */ var PanelType; exports.PanelType = PanelType; @@ -179590,6 +179983,10 @@ function (_super) { }; _this._onRenderNavigation = function (props) { + if (!_this.props.onRenderNavigationContent && !_this.props.onRenderNavigation && !_this.props.hasCloseButton) { + return null; + } + var _a = _this.props.onRenderNavigationContent, onRenderNavigationContent = _a === void 0 ? _this._onRenderNavigationContent : _a; return React.createElement("div", { @@ -179685,6 +180082,10 @@ function (_super) { isAnimating: false }); + if (_this.state.isOpen && _this.props.onOpened) { + _this.props.onOpened(); + } + if (!_this.state.isOpen && _this.props.onDismissed) { _this.props.onDismissed(); } @@ -179828,7 +180229,7 @@ function (_super) { className: _classNames.root }), overlay, React.createElement(_index.FocusTrapZone, tslib_1.__assign({ ignoreExternalFocusing: ignoreExternalFocusing, - forceFocusInsideTrap: isHiddenOnDismiss && !isOpen ? false : forceFocusInsideTrap, + forceFocusInsideTrap: !isBlocking || isHiddenOnDismiss && !isOpen ? false : forceFocusInsideTrap, firstFocusableSelector: firstFocusableSelector, isClickableOutsideFocusTrap: true }, focusTrapZoneProps, { @@ -179857,6 +180258,10 @@ function (_super) { }, function () { _this._async.setTimeout(_this._onTransitionComplete, 200); }); + + if (this.props.onOpen) { + this.props.onOpen(); + } } }; @@ -180101,6 +180506,9 @@ var getStyles = function (props) { width: panelWidth.full, selectors: tslib_1.__assign((_b = {}, _b['@supports (-webkit-overflow-scrolling: touch)'] = { maxHeight: windowHeight + }, _b[_Styling.HighContrastSelector] = { + borderLeft: "3px solid " + palette.neutralLight, + borderRight: "3px solid " + palette.neutralLight }, _b), getPanelBreakpoints(type)) }, type === _Panel.PanelType.smallFluid && { left: panelMargin.none @@ -180261,6 +180669,7 @@ Object.keys(_index).forEach(function (key) { }); }); },{"./components/Panel/index":"hxgY"}],"E+qs":[function(require,module,exports) { +var process = require("process"); "use strict"; Object.defineProperty(exports, "__esModule", { @@ -180319,12 +180728,13 @@ function (_super) { /* ms */ ; _this._sizePosCache = new _DropdownSizePosCache.DropdownSizePosCache(); + _this._requestAnimationFrame = (0, _Utilities.safeRequestAnimationFrame)(_this); /** Render text in dropdown input */ - _this._onRenderTitle = function (item) { + _this._onRenderTitle = function (items) { var _a = _this.props.multiSelectDelimiter, multiSelectDelimiter = _a === void 0 ? ', ' : _a; - var displayTxt = item.map(function (i) { + var displayTxt = items.map(function (i) { return i.text; }).join(multiSelectDelimiter); return React.createElement("span", null, displayTxt); @@ -180475,7 +180885,7 @@ function (_super) { if (_this._focusZone.current) { // Focusing an element can trigger a reflow. Making this wait until there is an animation // frame can improve perf significantly. - _this._async.requestAnimationFrame(function () { + _this._requestAnimationFrame(function () { var selectedIndices = _this.state.selectedIndices; if (selectedIndices && selectedIndices[0] && !_this.props.options[selectedIndices[0]].disabled) { @@ -180517,14 +180927,13 @@ function (_super) { _this._onScroll = function () { if (!_this._isScrollIdle && _this._scrollIdleTimeoutId !== undefined) { - _this._async.clearTimeout(_this._scrollIdleTimeoutId); - + clearTimeout(_this._scrollIdleTimeoutId); _this._scrollIdleTimeoutId = undefined; } else { _this._isScrollIdle = false; } - _this._scrollIdleTimeoutId = _this._async.setTimeout(function () { + _this._scrollIdleTimeoutId = setTimeout(function () { _this._isScrollIdle = true; }, _this._scrollIdleDelay); }; @@ -180873,19 +181282,23 @@ function (_super) { return disabled; }; - _this._warnDeprecations({ - isDisabled: 'disabled', - onChanged: 'onChange', - placeHolder: 'placeholder' - }); + (0, _Utilities.initializeComponentRef)(_this); - _this._warnMutuallyExclusive({ - defaultSelectedKey: 'selectedKey', - defaultSelectedKeys: 'selectedKeys', - selectedKeys: 'selectedKey', - multiSelect: 'defaultSelectedKey', - selectedKey: 'multiSelect' - }); + if (typeof process !== 'undefined' && "production" !== 'production') { + (0, _Utilities.warnDeprecations)('Dropdown', props, { + isDisabled: 'disabled', + onChanged: 'onChange', + placeHolder: 'placeholder', + onRenderPlaceHolder: 'onRenderPlaceholder' + }); + (0, _Utilities.warnMutuallyExclusive)('Dropdown', props, { + defaultSelectedKey: 'selectedKey', + defaultSelectedKeys: 'selectedKeys', + selectedKeys: 'selectedKey', + multiSelect: 'defaultSelectedKey', + selectedKey: 'multiSelect' + }); + } _this._id = props.id || (0, _Utilities.getId)('Dropdown'); _this._isScrollIdle = true; @@ -180910,6 +181323,10 @@ function (_super) { return _this; } + DropdownBase.prototype.componentWillUnmount = function () { + clearTimeout(this._scrollIdleTimeoutId); + }; + DropdownBase.prototype.componentWillReceiveProps = function (newProps) { // In controlled component usage where selectedKey is provided, update the selectedIndex // state if the key or options change. @@ -180963,36 +181380,35 @@ function (_super) { var _this = this; var id = this._id; - var _a = this.props, - className = _a.className, - label = _a.label, - options = _a.options, - ariaLabel = _a.ariaLabel, - required = _a.required, - errorMessage = _a.errorMessage, - multiSelect = _a.multiSelect, - keytipProps = _a.keytipProps, - propStyles = _a.styles, - theme = _a.theme, - panelProps = _a.panelProps, - calloutProps = _a.calloutProps, - _b = _a.onRenderTitle, - onRenderTitle = _b === void 0 ? this._onRenderTitle : _b, - _c = _a.onRenderContainer, - onRenderContainer = _c === void 0 ? this._onRenderContainer : _c, - _d = _a.onRenderPlaceHolder, - onRenderPlaceHolder = _d === void 0 ? this._onRenderPlaceholder : _d, - _e = _a.onRenderCaretDown, - onRenderCaretDown = _e === void 0 ? this._onRenderCaretDown : _e; - var _f = this.state, - isOpen = _f.isOpen, - selectedIndices = _f.selectedIndices, - hasFocus = _f.hasFocus, - calloutRenderEdge = _f.calloutRenderEdge; + var props = this.props; + var className = props.className, + label = props.label, + options = props.options, + ariaLabel = props.ariaLabel, + required = props.required, + errorMessage = props.errorMessage, + multiSelect = props.multiSelect, + keytipProps = props.keytipProps, + propStyles = props.styles, + theme = props.theme, + panelProps = props.panelProps, + calloutProps = props.calloutProps, + _a = props.onRenderTitle, + onRenderTitle = _a === void 0 ? this._onRenderTitle : _a, + _b = props.onRenderContainer, + onRenderContainer = _b === void 0 ? this._onRenderContainer : _b, + _c = props.onRenderCaretDown, + onRenderCaretDown = _c === void 0 ? this._onRenderCaretDown : _c; + var _d = this.state, + isOpen = _d.isOpen, + selectedIndices = _d.selectedIndices, + hasFocus = _d.hasFocus, + calloutRenderEdge = _d.calloutRenderEdge; + var onRenderPlaceholder = props.onRenderPlaceholder || props.onRenderPlaceHolder || this._onRenderPlaceholder; var selectedOptions = this._getAllSelectedOptions(options, selectedIndices); - var divProps = (0, _Utilities.getNativeProps)(this.props, _Utilities.divProperties); + var divProps = (0, _Utilities.getNativeProps)(props, _Utilities.divProperties); var disabled = this._isDisabled(); @@ -181016,7 +181432,7 @@ function (_super) { this._classNames = getClassNames(propStyles, { theme: theme, className: className, - hasError: Boolean(errorMessage && errorMessage.length > 0), + hasError: !!(errorMessage && errorMessage.length > 0), isOpen: isOpen, required: required, disabled: disabled, @@ -181070,10 +181486,10 @@ function (_super) { "aria-posinset": ariaAttrs.ariaPosInSet, "aria-selected": ariaAttrs.ariaSelected }, // If option is selected render title, otherwise render the placeholder text - selectedOptions.length ? onRenderTitle(selectedOptions, _this._onRenderTitle) : onRenderPlaceHolder(_this.props, _this._onRenderPlaceholder)), React.createElement("span", { + selectedOptions.length ? onRenderTitle(selectedOptions, _this._onRenderTitle) : onRenderPlaceholder(props, _this._onRenderPlaceholder)), React.createElement("span", { className: _this._classNames.caretDownWrapper - }, onRenderCaretDown(_this.props, _this._onRenderCaretDown))); - }), isOpen && onRenderContainer(this.props, this._onRenderContainer), errorMessage && errorMessage.length > 0 && React.createElement("div", { + }, onRenderCaretDown(props, _this._onRenderCaretDown))); + }), isOpen && onRenderContainer(props, this._onRenderContainer), errorMessage && errorMessage.length > 0 && React.createElement("div", { className: this._classNames.errorMessage }, errorMessage)); }; @@ -181137,7 +181553,9 @@ function (_super) { var changedOpt = multiSelect ? tslib_1.__assign({}, options[index], { selected: !checked }) : options[index]; - onChange(event, changedOpt, index); + onChange(tslib_1.__assign({}, event, { + target: this._dropDown.current + }), changedOpt, index); } if (onChanged) { @@ -181171,9 +181589,9 @@ function (_super) { }; /** * Finds the next valid Dropdown option and sets the selected index to it. - * @param stepValue Value of how many items the function should traverse. Should be -1 or 1. - * @param index Index of where the search should start - * @param selectedIndex The selectedIndex Dropdown's state + * @param stepValue - Value of how many items the function should traverse. Should be -1 or 1. + * @param index - Index of where the search should start + * @param selectedIndex - The selectedIndex Dropdown's state * @returns The next valid dropdown option's index */ @@ -181382,11 +181800,11 @@ function (_super) { }; DropdownBase = tslib_1.__decorate([_withResponsiveMode.withResponsiveMode], DropdownBase); return DropdownBase; -}(_Utilities.BaseComponent); //# sourceMappingURL=Dropdown.base.js.map +}(React.Component); //# sourceMappingURL=Dropdown.base.js.map exports.DropdownBase = DropdownBase; -},{"tslib":"xgwM","react":"mpTF","../../Utilities":"B5nc","../../Callout":"jp3a","../../Checkbox":"6OuL","../../Button":"XfLs","../../common/DirectionalHint":"+uAU","./Dropdown.types":"3Gtg","./utilities/DropdownSizePosCache":"3RhK","../../FocusZone":"v3nN","../../Icon":"s5pL","../../Label":"RcoC","../../KeytipData":"9lto","../../Panel":"W4Ke","../../utilities/decorators/withResponsiveMode":"Q4um","../../utilities/selectableOption/SelectableOption.types":"yh6c"}],"J4pD":[function(require,module,exports) { +},{"tslib":"xgwM","react":"mpTF","../../Utilities":"B5nc","../../Callout":"jp3a","../../Checkbox":"6OuL","../../Button":"XfLs","../../common/DirectionalHint":"+uAU","./Dropdown.types":"3Gtg","./utilities/DropdownSizePosCache":"3RhK","../../FocusZone":"v3nN","../../Icon":"s5pL","../../Label":"RcoC","../../KeytipData":"9lto","../../Panel":"W4Ke","../../utilities/decorators/withResponsiveMode":"Q4um","../../utilities/selectableOption/SelectableOption.types":"yh6c","process":"r7L2"}],"J4pD":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -181419,14 +181837,11 @@ var GlobalClassNames = { }; var DROPDOWN_HEIGHT = 32; var DROPDOWN_ITEM_HEIGHT = 32; -var highContrastAdjustMixin = { - // highContrastAdjust mixin - '@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: black-on-white)': { - MsHighContrastAdjust: 'none' - } -}; +var highContrastAdjustMixin = (_a = {}, _a[_Styling.HighContrastSelector + ", " + _Styling.HighContrastSelectorWhite.replace('@media ', '')] = { + MsHighContrastAdjust: 'none' +}, _a); var highContrastItemAndTitleStateMixin = { - selectors: tslib_1.__assign((_a = {}, _a[_Styling.HighContrastSelector] = { + selectors: tslib_1.__assign((_b = {}, _b[_Styling.HighContrastSelector] = { backgroundColor: 'Highlight', borderColor: 'Highlight', color: 'HighlightText', @@ -181436,12 +181851,12 @@ var highContrastItemAndTitleStateMixin = { } } - }, _a), highContrastAdjustMixin) + }, _b), highContrastAdjustMixin) }; var highContrastBorderState = { - selectors: (_b = {}, _b[_Styling.HighContrastSelector] = { + selectors: (_c = {}, _c[_Styling.HighContrastSelector] = { borderColor: 'Highlight' - }, _b) + }, _c) }; var getStyles = function (props) { @@ -181648,7 +182063,7 @@ var getStyles = function (props) { exports.getStyles = getStyles; -var _a, _b; //# sourceMappingURL=Dropdown.styles.js.map +var _a, _b, _c; //# sourceMappingURL=Dropdown.styles.js.map },{"tslib":"xgwM","../../Styling":"AHeq"}],"JOVa":[function(require,module,exports) { "use strict"; @@ -181828,7 +182243,7 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-0\"", - src: "url('" + baseUrl + "fabric-icons-0-498a310c.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-0-2a8db1f5.woff') format('woff')" }, icons: { InternetSharing: '\uE704', @@ -181876,6 +182291,7 @@ function initializeIcons(baseUrl, options) { Down: '\uE74B', OEM: '\uE74C', Save: '\uE74E', + ReturnKey: '\uE751', Cloud: '\uE753', Flashlight: '\uE754', CommandPrompt: '\uE756', @@ -181891,6 +182307,7 @@ function initializeIcons(baseUrl, options) { KeyboardClassic: '\uE765', Play: '\uE768', Pause: '\uE769', + InkingTool: '\uE76D', Emoji2: '\uE76E', GripperBarHorizontal: '\uE76F', System: '\uE770', @@ -181902,6 +182319,7 @@ function initializeIcons(baseUrl, options) { Unpin: '\uE77A', Contact: '\uE77B', Memo: '\uE77C', + IncomingCall: '\uE77E', Paste: '\uE77F', WindowsLogo: '\uE782', Error: '\uE783', @@ -181927,10 +182345,7 @@ function initializeIcons(baseUrl, options) { ThumbnailView: '\uE7B6', Package: '\uE7B8', Telemarketer: '\uE7B9', - Warning: '\uE7BA', - Financial: '\uE7BB', - Education: '\uE7BE', - ShoppingCart: '\uE7BF' + Warning: '\uE7BA' } }; (0, _styling.registerIcons)(subset, options); @@ -181962,9 +182377,12 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-1\"", - src: "url('" + baseUrl + "fabric-icons-1-0f021d71.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-1-360e3054.woff') format('woff')" }, icons: { + Financial: '\uE7BB', + Education: '\uE7BE', + ShoppingCart: '\uE7BF', Train: '\uE7C0', Move: '\uE7C2', TouchPointer: '\uE7C9', @@ -182009,6 +182427,7 @@ function initializeIcons(baseUrl, options) { FolderOpen: '\uE838', PinnedFill: '\uE842', RevToggleKey: '\uE845', + USB: '\uE88E', Previous: '\uE892', Next: '\uE893', Sync: '\uE895', @@ -182060,11 +182479,7 @@ function initializeIcons(baseUrl, options) { Like: '\uE8E1', AlignCenter: '\uE8E3', OpenFile: '\uE8E5', - FontDecrease: '\uE8E7', - FontIncrease: '\uE8E8', - FontSize: '\uE8E9', - CellPhone: '\uE8EA', - RepeatAll: '\uE8EE' + FontDecrease: '\uE8E7' } }; (0, _styling.registerIcons)(subset, options); @@ -182096,9 +182511,14 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-2\"", - src: "url('" + baseUrl + "fabric-icons-2-be6a5f70.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-2-8820ef0b.woff') format('woff')" }, icons: { + FontIncrease: '\uE8E8', + FontSize: '\uE8E9', + CellPhone: '\uE8EA', + RepeatOne: '\uE8ED', + RepeatAll: '\uE8EE', Calculator: '\uE8EF', Library: '\uE8F1', PostUpdate: '\uE8F3', @@ -182154,6 +182574,7 @@ function initializeIcons(baseUrl, options) { CalculatorMultiply: '\uE947', CalculatorAddition: '\uE948', CalculatorSubtract: '\uE949', + CalculatorPercentage: '\uE94C', CalculatorEqualTo: '\uE94E', PrintfaxPrinterFile: '\uE956', StorageOptical: '\uE958', @@ -182192,13 +182613,7 @@ function initializeIcons(baseUrl, options) { Sunny: '\uE9BD', CloudWeather: '\uE9BE', Cloudy: '\uE9BF', - PartlyCloudyDay: '\uE9C0', - PartlyCloudyNight: '\uE9C1', - ClearNight: '\uE9C2', - RainShowersDay: '\uE9C3', - Rain: '\uE9C4', - Thunderstorms: '\uE9C6', - RainSnow: '\uE9C7' + PartlyCloudyDay: '\uE9C0' } }; (0, _styling.registerIcons)(subset, options); @@ -182230,9 +182645,15 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-3\"", - src: "url('" + baseUrl + "fabric-icons-3-ccddc9e1.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-3-7c253e01.woff') format('woff')" }, icons: { + PartlyCloudyNight: '\uE9C1', + ClearNight: '\uE9C2', + RainShowersDay: '\uE9C3', + Rain: '\uE9C4', + Thunderstorms: '\uE9C6', + RainSnow: '\uE9C7', Snow: '\uE9C8', BlowingSnow: '\uE9C9', Frigid: '\uE9CA', @@ -182326,13 +182747,7 @@ function initializeIcons(baseUrl, options) { StoreLogo16: '\uEA96', MultiSelectMirrored: '\uEA98', Broom: '\uEA99', - Cocktails: '\uEA9D', - Wines: '\uEABF', - Articles: '\uEAC1', - Cycling: '\uEAC7', - DietPlanNotebook: '\uEAC8', - Pill: '\uEACB', - ExerciseTracker: '\uEACC' + Cocktails: '\uEA9D' } }; (0, _styling.registerIcons)(subset, options); @@ -182364,9 +182779,15 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-4\"", - src: "url('" + baseUrl + "fabric-icons-4-0721c5c2.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-4-15a649f8.woff') format('woff')" }, icons: { + Wines: '\uEABF', + Articles: '\uEAC1', + Cycling: '\uEAC7', + DietPlanNotebook: '\uEAC8', + Pill: '\uEACB', + ExerciseTracker: '\uEACC', HandsFree: '\uEAD0', Medical: '\uEAD4', Running: '\uEADA', @@ -182460,13 +182881,7 @@ function initializeIcons(baseUrl, options) { Documentation: '\uEC17', Badge: '\uEC1B', Giftbox: '\uEC1F', - VisualStudioLogo: '\uEC22', - HomeGroup: '\uEC26', - ExcelLogoInverse: '\uEC28', - WordLogoInverse: '\uEC29', - PowerPointLogoInverse: '\uEC2A', - Cafe: '\uEC32', - SpeedHigh: '\uEC4A' + VisualStudioLogo: '\uEC22' } }; (0, _styling.registerIcons)(subset, options); @@ -182498,9 +182913,15 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-5\"", - src: "url('" + baseUrl + "fabric-icons-5-fca90b7d.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-5-f6de453a.woff') format('woff')" }, icons: { + HomeGroup: '\uEC26', + ExcelLogoInverse: '\uEC28', + WordLogoInverse: '\uEC29', + PowerPointLogoInverse: '\uEC2A', + Cafe: '\uEC32', + SpeedHigh: '\uEC4A', Commitments: '\uEC4D', ThisPC: '\uEC4E', MusicNote: '\uEC4F', @@ -182594,13 +183015,7 @@ function initializeIcons(baseUrl, options) { VoicemailReply: '\uED88', Waffle: '\uED89', RemoveEvent: '\uED8A', - EventInfo: '\uED8B', - ForwardEvent: '\uED8C', - WipePhone: '\uED8D', - AddOnlineMeeting: '\uED8E', - JoinOnlineMeeting: '\uED8F', - RemoveLink: '\uED90', - PeopleBlock: '\uED91' + EventInfo: '\uED8B' } }; (0, _styling.registerIcons)(subset, options); @@ -182632,9 +183047,15 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-6\"", - src: "url('" + baseUrl + "fabric-icons-6-957ed700.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-6-32b702b9.woff') format('woff')" }, icons: { + ForwardEvent: '\uED8C', + WipePhone: '\uED8D', + AddOnlineMeeting: '\uED8E', + JoinOnlineMeeting: '\uED8F', + RemoveLink: '\uED90', + PeopleBlock: '\uED91', PeopleRepeat: '\uED92', PeopleAlert: '\uED93', PeoplePause: '\uED94', @@ -182728,13 +183149,7 @@ function initializeIcons(baseUrl, options) { AssetLibrary: '\uEEB6', DataConnectionLibrary: '\uEEB7', DocLibrary: '\uEEB8', - FormLibrary: '\uEEB9', - FormLibraryMirrored: '\uEEBA', - ReportLibrary: '\uEEBB', - ReportLibraryMirrored: '\uEEBC', - ContactCard: '\uEEBD', - CustomList: '\uEEBE', - CustomListMirrored: '\uEEBF' + FormLibrary: '\uEEB9' } }; (0, _styling.registerIcons)(subset, options); @@ -182766,9 +183181,15 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-7\"", - src: "url('" + baseUrl + "fabric-icons-7-36bda45d.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-7-bbebf62d.woff') format('woff')" }, icons: { + FormLibraryMirrored: '\uEEBA', + ReportLibrary: '\uEEBB', + ReportLibraryMirrored: '\uEEBC', + ContactCard: '\uEEBD', + CustomList: '\uEEBE', + CustomListMirrored: '\uEEBF', IssueTracking: '\uEEC0', IssueTrackingMirrored: '\uEEC1', PictureLibrary: '\uEEC2', @@ -182797,6 +183218,7 @@ function initializeIcons(baseUrl, options) { Header2: '\uEF36', Header3: '\uEF37', Header4: '\uEF38', + RingerSolid: '\uEF3A', Eyedropper: '\uEF3C', MarketDown: '\uEF42', CalendarWorkWeek: '\uEF51', @@ -182861,14 +183283,7 @@ function initializeIcons(baseUrl, options) { PageArrowRight: '\uEFB8', PageRemove: '\uEFBA', Database: '\uEFC7', - CRMServices: '\uEFD2', - EditContact: '\uEFD3', - ConnectContacts: '\uEFD4', - AppIconDefaultAdd: '\uEFDA', - AppIconDefaultList: '\uEFDE', - ActivateOrders: '\uEFE0', - DeactivateOrders: '\uEFE1', - DocumentManagement: '\uEFFC' + DataManagementSettings: '\uEFC8' } }; (0, _styling.registerIcons)(subset, options); @@ -182900,12 +183315,21 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-8\"", - src: "url('" + baseUrl + "fabric-icons-8-58fb017e.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-8-50fd817c.woff') format('woff')" }, icons: { + CRMServices: '\uEFD2', + EditContact: '\uEFD3', + ConnectContacts: '\uEFD4', + AppIconDefaultAdd: '\uEFDA', + AppIconDefaultList: '\uEFDE', + ActivateOrders: '\uEFE0', + DeactivateOrders: '\uEFE1', + DocumentManagement: '\uEFFC', CRMReport: '\uEFFE', KnowledgeArticle: '\uF000', Relationship: '\uF003', + HomeVerify: '\uF00E', ZipFolder: '\uF012', SurveyQuestions: '\uF01B', TextDocument: '\uF029', @@ -182915,6 +183339,7 @@ function initializeIcons(baseUrl, options) { Script: '\uF03A', Archive: '\uF03F', ActivityFeed: '\uF056', + Compare: '\uF057', EventDate: '\uF059', ArrowUpRight: '\uF069', CaretRight: '\uF06B', @@ -182950,6 +183375,8 @@ function initializeIcons(baseUrl, options) { BufferTimeAfter: '\uF0D0', BufferTimeBoth: '\uF0D1', PublishContent: '\uF0D4', + ClipboardList: '\uF0E3', + ClipboardListMirrored: '\uF0E4', CannedChat: '\uF0F2', SkypeForBusinessLogo: '\uF0FC', TabCenter: '\uF100', @@ -182982,6 +183409,7 @@ function initializeIcons(baseUrl, options) { ProgressRingDots: '\uF16A', CaloriesAdd: '\uF172', BranchFork: '\uF173', + AddHome: '\uF17B', MobileReport: '\uF18A', ScaleVolume: '\uF18C', HardDriveGroup: '\uF18F', @@ -182989,20 +183417,7 @@ function initializeIcons(baseUrl, options) { ToggleLeft: '\uF19E', ToggleRight: '\uF19F', TriangleShape: '\uF1A7', - RectangleShape: '\uF1A9', - Trophy2: '\uF1AE', - BucketColor: '\uF1B6', - BucketColorFill: '\uF1B7', - Taskboard: '\uF1C2', - SingleColumn: '\uF1D3', - DoubleColumn: '\uF1D4', - TripleColumn: '\uF1D5', - ColumnLeftTwoThirds: '\uF1D6', - ColumnRightTwoThirds: '\uF1D7', - AccessLogoFill: '\uF1DB', - AnalyticsLogo: '\uF1DE', - AnalyticsQuery: '\uF1DF', - NewAnalyticsQuery: '\uF1E0' + RectangleShape: '\uF1A9' } }; (0, _styling.registerIcons)(subset, options); @@ -183034,9 +183449,22 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-9\"", - src: "url('" + baseUrl + "fabric-icons-9-e5eafdb0.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-9-88060b8a.woff') format('woff')" }, icons: { + Trophy2: '\uF1AE', + BucketColor: '\uF1B6', + BucketColorFill: '\uF1B7', + Taskboard: '\uF1C2', + SingleColumn: '\uF1D3', + DoubleColumn: '\uF1D4', + TripleColumn: '\uF1D5', + ColumnLeftTwoThirds: '\uF1D6', + ColumnRightTwoThirds: '\uF1D7', + AccessLogoFill: '\uF1DB', + AnalyticsLogo: '\uF1DE', + AnalyticsQuery: '\uF1DF', + NewAnalyticsQuery: '\uF1E0', AnalyticsReport: '\uF1E1', WordLogo: '\uF1E3', WordLogoFill: '\uF1E4', @@ -183101,6 +183529,7 @@ function initializeIcons(baseUrl, options) { OfficeVideoLogoFill: '\uF283', ExchangeLogo: '\uF284', ExchangeLogoFill: '\uF285', + Signin: '\uF286', DocumentApproval: '\uF28B', CloneToDesktop: '\uF28C', InstallToDrive: '\uF28D', @@ -183122,21 +183551,7 @@ function initializeIcons(baseUrl, options) { Deploy: '\uF29D', Redeploy: '\uF29E', ServerEnviroment: '\uF29F', - VisioDiagram: '\uF2A0', - HighlightMappedShapes: '\uF2A1', - TextCallout: '\uF2A2', - IconSetsFlag: '\uF2A4', - VisioLogo: '\uF2A7', - VisioLogoFill: '\uF2A8', - VisioDocument: '\uF2A9', - TimelineProgress: '\uF2AA', - TimelineDelivery: '\uF2AB', - Backlog: '\uF2AC', - TeamFavorite: '\uF2AD', - TaskGroup: '\uF2AE', - TaskGroupMirrored: '\uF2AF', - ScopeTemplate: '\uF2B0', - AssessmentGroupTemplate: '\uF2B1' + VisioDiagram: '\uF2A0' } }; (0, _styling.registerIcons)(subset, options); @@ -183168,9 +183583,23 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-10\"", - src: "url('" + baseUrl + "fabric-icons-10-45ab7e58.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-10-1ca3e4a1.woff') format('woff')" }, icons: { + HighlightMappedShapes: '\uF2A1', + TextCallout: '\uF2A2', + IconSetsFlag: '\uF2A4', + VisioLogo: '\uF2A7', + VisioLogoFill: '\uF2A8', + VisioDocument: '\uF2A9', + TimelineProgress: '\uF2AA', + TimelineDelivery: '\uF2AB', + Backlog: '\uF2AC', + TeamFavorite: '\uF2AD', + TaskGroup: '\uF2AE', + TaskGroupMirrored: '\uF2AF', + ScopeTemplate: '\uF2B0', + AssessmentGroupTemplate: '\uF2B1', NewTeamProject: '\uF2B2', CommentAdd: '\uF2B3', CommentNext: '\uF2B4', @@ -183256,21 +183685,7 @@ function initializeIcons(baseUrl, options) { CommentUrgent: '\uF307', Storyboard: '\uF308', DiffInline: '\uF309', - DiffSideBySide: '\uF30A', - ImageDiff: '\uF30B', - ImagePixel: '\uF30C', - FileBug: '\uF30D', - FileCode: '\uF30E', - FileComment: '\uF30F', - BusinessHoursSign: '\uF310', - FileImage: '\uF311', - FileSymlink: '\uF312', - AutoFillTemplate: '\uF313', - WorkItem: '\uF314', - WorkItemBug: '\uF315', - LogRemove: '\uF316', - ColumnOptions: '\uF317', - Packages: '\uF318' + DiffSideBySide: '\uF30A' } }; (0, _styling.registerIcons)(subset, options); @@ -183302,9 +183717,23 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-11\"", - src: "url('" + baseUrl + "fabric-icons-11-1821d7ea.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-11-93bad8ee.woff') format('woff')" }, icons: { + ImageDiff: '\uF30B', + ImagePixel: '\uF30C', + FileBug: '\uF30D', + FileCode: '\uF30E', + FileComment: '\uF30F', + BusinessHoursSign: '\uF310', + FileImage: '\uF311', + FileSymlink: '\uF312', + AutoFillTemplate: '\uF313', + WorkItem: '\uF314', + WorkItemBug: '\uF315', + LogRemove: '\uF316', + ColumnOptions: '\uF317', + Packages: '\uF318', BuildIssue: '\uF319', AssessmentGroup: '\uF31A', VariableGroup: '\uF31B', @@ -183390,21 +183819,7 @@ function initializeIcons(baseUrl, options) { VSTSAltLogo2: '\uF383', FileTypeSolution: '\uF387', WordLogoInverse16: '\uF390', - WordLogo16: '\uF391', - WordLogoFill16: '\uF392', - PowerPointLogoInverse16: '\uF393', - PowerPointLogo16: '\uF394', - PowerPointLogoFill16: '\uF395', - ExcelLogoInverse16: '\uF396', - ExcelLogo16: '\uF397', - ExcelLogoFill16: '\uF398', - OneNoteLogoInverse16: '\uF399', - OneNoteLogo16: '\uF39A', - OneNoteLogoFill16: '\uF39B', - OutlookLogoInverse16: '\uF39C', - OutlookLogo16: '\uF39D', - OutlookLogoFill16: '\uF39E', - PublisherLogoInverse16: '\uF39F' + WordLogo16: '\uF391' } }; (0, _styling.registerIcons)(subset, options); @@ -183436,9 +183851,23 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-12\"", - src: "url('" + baseUrl + "fabric-icons-12-2ceff391.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-12-d9534567.woff') format('woff')" }, icons: { + WordLogoFill16: '\uF392', + PowerPointLogoInverse16: '\uF393', + PowerPointLogo16: '\uF394', + PowerPointLogoFill16: '\uF395', + ExcelLogoInverse16: '\uF396', + ExcelLogo16: '\uF397', + ExcelLogoFill16: '\uF398', + OneNoteLogoInverse16: '\uF399', + OneNoteLogo16: '\uF39A', + OneNoteLogoFill16: '\uF39B', + OutlookLogoInverse16: '\uF39C', + OutlookLogo16: '\uF39D', + OutlookLogoFill16: '\uF39E', + PublisherLogoInverse16: '\uF39F', PublisherLogo16: '\uF3A0', PublisherLogoFill16: '\uF3A1', VisioLogoInverse16: '\uF3A2', @@ -183524,21 +183953,7 @@ function initializeIcons(baseUrl, options) { SwayLogo32: '\uF482', SwayLogoFill32: '\uF483', SwayLogo16: '\uF484', - SwayLogoFill16: '\uF485', - ClassNotebookLogo32: '\uF486', - ClassNotebookLogoFill32: '\uF487', - ClassNotebookLogo16: '\uF488', - ClassNotebookLogoFill16: '\uF489', - ClassNotebookLogoInverse32: '\uF48A', - ClassNotebookLogoInverse16: '\uF48B', - StaffNotebookLogo32: '\uF48C', - StaffNotebookLogoFill32: '\uF48D', - StaffNotebookLogo16: '\uF48E', - StaffNotebookLogoFill16: '\uF48F', - StaffNotebookLogoInverted32: '\uF490', - StaffNotebookLogoInverted16: '\uF491', - KaizalaLogo: '\uF492', - TaskLogo: '\uF493' + SwayLogoFill16: '\uF485' } }; (0, _styling.registerIcons)(subset, options); @@ -183570,9 +183985,23 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-13\"", - src: "url('" + baseUrl + "fabric-icons-13-3151b011.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-13-0b48c801.woff') format('woff')" }, icons: { + ClassNotebookLogo32: '\uF486', + ClassNotebookLogoFill32: '\uF487', + ClassNotebookLogo16: '\uF488', + ClassNotebookLogoFill16: '\uF489', + ClassNotebookLogoInverse32: '\uF48A', + ClassNotebookLogoInverse16: '\uF48B', + StaffNotebookLogo32: '\uF48C', + StaffNotebookLogoFill32: '\uF48D', + StaffNotebookLogo16: '\uF48E', + StaffNotebookLogoFill16: '\uF48F', + StaffNotebookLogoInverted32: '\uF490', + StaffNotebookLogoInverted16: '\uF491', + KaizalaLogo: '\uF492', + TaskLogo: '\uF493', ProtectionCenterLogo32: '\uF494', GallatinLogo: '\uF496', Globe2: '\uF49A', @@ -183586,6 +184015,7 @@ function initializeIcons(baseUrl, options) { Chopsticks: '\uF4A2', SyncOccurence: '\uF4A3', UnsyncOccurence: '\uF4A4', + GIF: '\uF4A9', PrimaryCalendar: '\uF4AE', SearchCalendar: '\uF4AF', VideoOff: '\uF4B0', @@ -183657,22 +184087,7 @@ function initializeIcons(baseUrl, options) { PaddingLeft: '\uF51B', PaddingRight: '\uF51C', NavigationFlipper: '\uF51D', - AlignJustify: '\uF51E', - TextOverflow: '\uF51F', - VisualsFolder: '\uF520', - VisualsStore: '\uF521', - PictureCenter: '\uF522', - PictureFill: '\uF523', - PicturePosition: '\uF524', - PictureStretch: '\uF525', - PictureTile: '\uF526', - Slider: '\uF527', - SliderHandleSize: '\uF528', - DefaultRatio: '\uF529', - NumberSequence: '\uF52A', - GUID: '\uF52B', - ReportAdd: '\uF52C', - DashboardAdd: '\uF52D' + AlignJustify: '\uF51E' } }; (0, _styling.registerIcons)(subset, options); @@ -183704,9 +184119,24 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-14\"", - src: "url('" + baseUrl + "fabric-icons-14-19b735bc.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-14-9a8324a9.woff') format('woff')" }, icons: { + TextOverflow: '\uF51F', + VisualsFolder: '\uF520', + VisualsStore: '\uF521', + PictureCenter: '\uF522', + PictureFill: '\uF523', + PicturePosition: '\uF524', + PictureStretch: '\uF525', + PictureTile: '\uF526', + Slider: '\uF527', + SliderHandleSize: '\uF528', + DefaultRatio: '\uF529', + NumberSequence: '\uF52A', + GUID: '\uF52B', + ReportAdd: '\uF52C', + DashboardAdd: '\uF52D', MapPinSolid: '\uF52E', WebPublish: '\uF52F', PieSingleSolid: '\uF530', @@ -183783,6 +184213,7 @@ function initializeIcons(baseUrl, options) { DeleteRows: '\uF64F', DeleteRowsMirrored: '\uF650', DeleteTable: '\uF651', + AccountBrowser: '\uF652', VersionControlPush: '\uF664', StackedColumnChart2: '\uF666', TripleColumnWide: '\uF66E', @@ -183790,23 +184221,7 @@ function initializeIcons(baseUrl, options) { WhiteBoardApp16: '\uF673', WhiteBoardApp32: '\uF674', InsertSignatureLine: '\uF677', - ArrangeByFrom: '\uF678', - Phishing: '\uF679', - CreateMailRule: '\uF67A', - PublishCourse: '\uF699', - DictionaryRemove: '\uF69A', - UserRemove: '\uF69B', - UserEvent: '\uF69C', - Encryption: '\uF69D', - D365TalentLearn: '\uF6BB', - D365TalentInsight: '\uF6BC', - D365TalentHRCore: '\uF6BD', - BacklogList: '\uF6BF', - ButtonControl: '\uF6C0', - TableGroup: '\uF6D9', - MountainClimbing: '\uF6DB', - TagUnknown: '\uF6DF', - TagUnknownMirror: '\uF6E0' + ArrangeByFrom: '\uF678' } }; (0, _styling.registerIcons)(subset, options); @@ -183838,9 +184253,34 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-15\"", - src: "url('" + baseUrl + "fabric-icons-15-2f8b45d0.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-15-65272067.woff') format('woff')" }, icons: { + Phishing: '\uF679', + CreateMailRule: '\uF67A', + PublishCourse: '\uF699', + DictionaryRemove: '\uF69A', + UserRemove: '\uF69B', + UserEvent: '\uF69C', + Encryption: '\uF69D', + PasswordField: '\uF6AA', + OpenInNewTab: '\uF6AB', + Hide3: '\uF6AC', + VerifiedBrandSolid: '\uF6AD', + MarkAsProtected: '\uF6AE', + AuthenticatorApp: '\uF6B1', + WebTemplate: '\uF6B2', + DefenderTVM: '\uF6B3', + MedalSolid: '\uF6B9', + D365TalentLearn: '\uF6BB', + D365TalentInsight: '\uF6BC', + D365TalentHRCore: '\uF6BD', + BacklogList: '\uF6BF', + ButtonControl: '\uF6C0', + TableGroup: '\uF6D9', + MountainClimbing: '\uF6DB', + TagUnknown: '\uF6DF', + TagUnknownMirror: '\uF6E0', TagUnknown12: '\uF6E1', TagUnknown12Mirror: '\uF6E2', Link12: '\uF6E3', @@ -183883,6 +184323,7 @@ function initializeIcons(baseUrl, options) { PromotedDatabase: '\uF77D', BarChartVerticalFilter: '\uF77E', BarChartVerticalFilterSolid: '\uF77F', + MicrosoftTranslatorLogo: '\uF782', ShowTimeAs: '\uF787', FileRequest: '\uF789', WorkItemAlert: '\uF78F', @@ -183914,33 +184355,7 @@ function initializeIcons(baseUrl, options) { CheckListCheck: '\uF7A9', CheckListTextMirrored: '\uF7AA', CheckListCheckMirrored: '\uF7AB', - NumberSymbol: '\uF7AC', - Coupon: '\uF7BC', - VerifiedBrand: '\uF7BD', - ReleaseGate: '\uF7BE', - ReleaseGateCheck: '\uF7BF', - ReleaseGateError: '\uF7C0', - M365InvoicingLogo: '\uF7C1', - FabricTextHighlightComposite: '\uF7DA', - Dataflows: '\uF7DD', - GenericScanFilled: '\uF7DE', - DiagnosticDataBarTooltip: '\uF7DF', - SaveToMobile: '\uF7E0', - Orientation2: '\uF7E1', - ScreenCast: '\uF7E2', - ShowGrid: '\uF7E3', - SnapToGrid: '\uF7E4', - ContactList: '\uF7E5', - NewMail: '\uF7EA', - EyeShadow: '\uF7EB', - CampaignTemplate: '\uF811', - ChartTemplate: '\uF812', - PageListFilter: '\uF813', - SecondaryNav: '\uF814', - ColumnVerticalSection: '\uF81E', - SkypeCircleSlash: '\uF825', - SkypeSlash: '\uF826', - CustomizeToolbar: '\uF828' + NumberSymbol: '\uF7AC' } }; (0, _styling.registerIcons)(subset, options); @@ -183972,9 +184387,44 @@ function initializeIcons(baseUrl, options) { }, fontFace: { fontFamily: "\"FabricMDL2Icons-16\"", - src: "url('" + baseUrl + "fabric-icons-16-7ed535b6.woff') format('woff')" + src: "url('" + baseUrl + "fabric-icons-16-dff5b9a6.woff') format('woff')" }, icons: { + Coupon: '\uF7BC', + VerifiedBrand: '\uF7BD', + ReleaseGate: '\uF7BE', + ReleaseGateCheck: '\uF7BF', + ReleaseGateError: '\uF7C0', + M365InvoicingLogo: '\uF7C1', + FabricTextHighlightComposite: '\uF7DA', + Dataflows: '\uF7DD', + GenericScanFilled: '\uF7DE', + DiagnosticDataBarTooltip: '\uF7DF', + SaveToMobile: '\uF7E0', + Orientation2: '\uF7E1', + ScreenCast: '\uF7E2', + ShowGrid: '\uF7E3', + SnapToGrid: '\uF7E4', + ContactList: '\uF7E5', + NewMail: '\uF7EA', + EyeShadow: '\uF7EB', + FabricFolderConfirm: '\uF7FF', + InformationBarriers: '\uF803', + CommentActive: '\uF804', + ColumnVerticalSectionEdit: '\uF806', + WavingHand: '\uF807', + ShakeDevice: '\uF80A', + SmartGlassRemote: '\uF80B', + Rotate90Clockwise: '\uF80D', + Rotate90CounterClockwise: '\uF80E', + CampaignTemplate: '\uF811', + ChartTemplate: '\uF812', + PageListFilter: '\uF813', + SecondaryNav: '\uF814', + ColumnVerticalSection: '\uF81E', + SkypeCircleSlash: '\uF825', + SkypeSlash: '\uF826', + CustomizeToolbar: '\uF828', DuplicateRow: '\uF82A', RemoveFromTrash: '\uF82B', MailOptions: '\uF82C', @@ -183986,9 +184436,18 @@ function initializeIcons(baseUrl, options) { PlainText: '\uF834', AccessibiltyChecker: '\uF835', DatabaseSync: '\uF842', + ReservationOrders: '\uF845', TabOneColumn: '\uF849', TabTwoColumn: '\uF84A', TabThreeColumn: '\uF84B', + MicrosoftTranslatorLogoGreen: '\uF852', + MicrosoftTranslatorLogoBlue: '\uF853', + InternalInvestigation: '\uF854', + AppleTVPlay: '\uF859', + AppleTVMonitor: '\uF85A', + AppleTVMicrophone: '\uF85B', + AppleTVMenu: '\uF85C', + AddReaction: '\uF85D', DecreaseIndentLegacy: '\uE290', IncreaseIndentLegacy: '\uE291', SizeLegacy: '\uE2B2' @@ -184025,9 +184484,9 @@ exports.default = _default; var _setVersion = require("@uifabric/set-version"); -// @uifabric/icons@6.4.0 +// @uifabric/icons@6.5.1 // Do not modify this file, the file is generated as part of publish. The checked in version is a placeholder only. -(0, _setVersion.setVersion)('@uifabric/icons', '6.4.0'); //# sourceMappingURL=version.js.map +(0, _setVersion.setVersion)('@uifabric/icons', '6.5.1'); //# sourceMappingURL=version.js.map },{"@uifabric/set-version":"c7t6"}],"uYgI":[function(require,module,exports) { "use strict"; @@ -184727,6 +185186,7 @@ exports.SpinnerType = exports.SpinnerSize = void 0; /** * Possible variations of the spinner circle size. + * {@docCategory Spinner} */ var SpinnerSize; exports.SpinnerSize = SpinnerSize; @@ -184755,6 +185215,7 @@ exports.SpinnerSize = SpinnerSize; /** * Deprecated at v2.0.0, use `SpinnerSize` instead. * @deprecated Use `SpinnerSize` instead. + * {@docCategory Spinner} */ @@ -184814,7 +185275,7 @@ function (_super) { theme = _a.theme, className = _a.className, labelPosition = _a.labelPosition; - var statusMessage = ariaLabel || label; + var statusMessage = ariaLabel; var nativeProps = (0, _Utilities.getNativeProps)(this.props, _Utilities.divProperties, ['size']); // SpinnerType is deprecated. If someone is still using this property, rather than putting the SpinnerType into the ISpinnerStyleProps, // we'll map SpinnerType to its equivalent SpinnerSize and pass that in. Once SpinnerType finally goes away we should delete this. @@ -185024,6 +185485,7 @@ Object.keys(_index).forEach(function (key) { }); }); },{"./components/Spinner/index":"gNZb"}],"xGAm":[function(require,module,exports) { +var process = require("process"); "use strict"; Object.defineProperty(exports, "__esModule", { @@ -185150,16 +185612,20 @@ function (_super) { } }; - _this._warnDeprecations({ - iconClass: 'iconProps', - addonString: 'prefix', - onRenderAddon: 'onRenderPrefix', - onChanged: 'onChange' - }); + (0, _Utilities.initializeComponentRef)(_this); + _this._async = new _Utilities.Async(_this); - _this._warnMutuallyExclusive({ - value: 'defaultValue' - }); + if (typeof process !== 'undefined' && "production" !== 'production') { + (0, _Utilities.warnDeprecations)('TextField', props, { + iconClass: 'iconProps', + addonString: 'prefix', + onRenderAddon: 'onRenderPrefix', + onChanged: 'onChange' + }); + (0, _Utilities.warnMutuallyExclusive)('TextField', props, { + value: 'defaultValue' + }); + } _this._id = props.id || (0, _Utilities.getId)('TextField'); _this._descriptionId = (0, _Utilities.getId)('TextFieldDescription'); @@ -185258,6 +185724,8 @@ function (_super) { TextFieldBase.prototype.componentWillUnmount = function () { this._isMounted = false; + + this._async.dispose(); }; TextFieldBase.prototype.render = function () { @@ -185495,7 +185963,7 @@ function (_super) { onChange: this._onInputChange, className: this._classNames.field, "aria-describedby": this._isDescriptionAvailable ? this._descriptionId : this.props['aria-describedby'], - "aria-invalid": !!this.state.errorMessage, + "aria-invalid": !!this._errorMessage, "aria-label": this.props.ariaLabel, readOnly: this.props.readOnly, onFocus: this._onFocus, @@ -185516,7 +185984,7 @@ function (_super) { className: this._classNames.field, "aria-label": this.props.ariaLabel, "aria-describedby": this._isDescriptionAvailable ? this._descriptionId : this.props['aria-describedby'], - "aria-invalid": !!this.state.errorMessage, + "aria-invalid": !!this._errorMessage, readOnly: this.props.readOnly, onFocus: this._onFocus, onBlur: this._onBlur @@ -185601,11 +186069,11 @@ function (_super) { validateOnLoad: true }; return TextFieldBase; -}(_Utilities.BaseComponent); //# sourceMappingURL=TextField.base.js.map +}(React.Component); //# sourceMappingURL=TextField.base.js.map exports.TextFieldBase = TextFieldBase; -},{"tslib":"xgwM","react":"mpTF","../../Label":"RcoC","../../Icon":"s5pL","../../Utilities":"B5nc"}],"Pj/R":[function(require,module,exports) { +},{"tslib":"xgwM","react":"mpTF","../../Label":"RcoC","../../Icon":"s5pL","../../Utilities":"B5nc","process":"r7L2"}],"Pj/R":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -185685,7 +186153,8 @@ function getStyles(props) { alignItems: 'center', padding: '0 10px', lineHeight: 1, - whiteSpace: 'nowrap' + whiteSpace: 'nowrap', + flexShrink: 0 }; return { root: [classNames.root, theme.fonts.medium, required && classNames.required, disabled && classNames.disabled, focused && classNames.active, multiline && classNames.multiline, borderless && classNames.borderless, underlined && classNames.underlined, _Styling.normalize, { @@ -186238,11 +186707,13 @@ function (_super) { */ - _this._skipComponentRefResolution = true; // Translate mask into charData + _this._skipComponentRefResolution = true; + _this._textField = React.createRef(); + (0, _Utilities.initializeComponentRef)(_this); // Translate mask into charData _this._maskCharData = (0, _inputMask.parseMask)(props.mask, props.maskFormat); // If an initial value is provided, use it to populate the format chars - props.value && _this.setValue(props.value); + props.value !== undefined && _this.setValue(props.value); _this._isFocused = false; _this._moveCursorOnMouseUp = false; _this.state = { @@ -186252,18 +186723,19 @@ function (_super) { } MaskedTextField.prototype.componentWillReceiveProps = function (newProps) { - if (newProps.mask !== this.props.mask) { + if (newProps.mask !== this.props.mask || newProps.value !== this.props.value) { this._maskCharData = (0, _inputMask.parseMask)(newProps.mask, newProps.maskFormat); - this.state = { + newProps.value !== undefined && this.setValue(newProps.value); + this.setState({ displayValue: (0, _inputMask.getMaskDisplay)(newProps.mask, this._maskCharData, newProps.maskChar) - }; + }); } }; MaskedTextField.prototype.componentDidUpdate = function () { // Move the cursor to the start of the mask format on update - if (this.state.maskCursorPosition !== undefined) { - this._textField.setSelectionRange(this.state.maskCursorPosition, this.state.maskCursorPosition); + if (this.state.maskCursorPosition !== undefined && this._textField.current) { + this._textField.current.setSelectionRange(this.state.maskCursorPosition, this.state.maskCursorPosition); } }; @@ -186278,7 +186750,7 @@ function (_super) { onKeyDown: this._onKeyDown, onPaste: this._onPaste, value: this.state.displayValue, - componentRef: this._resolveRef('_textField') + componentRef: this._textField })); }; @@ -186324,39 +186796,47 @@ function (_super) { }; MaskedTextField.prototype.focus = function () { - this._textField && this._textField.focus(); + var current = this._textField.current; + current && current.focus(); }; MaskedTextField.prototype.blur = function () { - this._textField && this._textField.blur(); + var current = this._textField.current; + current && current.blur(); }; MaskedTextField.prototype.select = function () { - this._textField && this._textField.select(); + var current = this._textField.current; + current && current.select(); }; MaskedTextField.prototype.setSelectionStart = function (value) { - this._textField && this._textField.setSelectionStart(value); + var current = this._textField.current; + current && current.setSelectionStart(value); }; MaskedTextField.prototype.setSelectionEnd = function (value) { - this._textField && this._textField.setSelectionEnd(value); + var current = this._textField.current; + current && current.setSelectionEnd(value); }; MaskedTextField.prototype.setSelectionRange = function (start, end) { - this._textField && this._textField.setSelectionRange(start, end); + var current = this._textField.current; + current && current.setSelectionRange(start, end); }; Object.defineProperty(MaskedTextField.prototype, "selectionStart", { get: function () { - return this._textField && this._textField.selectionStart !== null ? this._textField.selectionStart : -1; + var current = this._textField.current; + return current && current.selectionStart !== null ? current.selectionStart : -1; }, enumerable: true, configurable: true }); Object.defineProperty(MaskedTextField.prototype, "selectionEnd", { get: function () { - return this._textField && this._textField.selectionEnd ? this._textField.selectionEnd : -1; + var current = this._textField.current; + return current && current.selectionEnd ? current.selectionEnd : -1; }, enumerable: true, configurable: true @@ -186419,15 +186899,17 @@ function (_super) { }; MaskedTextField.prototype._onBeforeChange = function (value) { + var current = this._textField.current; + if (this.props.onBeforeChange) { this.props.onBeforeChange(value); } - if (this._changeSelectionData === null) { + if (this._changeSelectionData === null && current) { this._changeSelectionData = { changeType: 'default', - selectionStart: this._textField.selectionStart !== null ? this._textField.selectionStart : -1, - selectionEnd: this._textField.selectionEnd !== null ? this._textField.selectionEnd : -1 + selectionStart: current.selectionStart !== null ? current.selectionStart : -1, + selectionEnd: current.selectionEnd !== null ? current.selectionEnd : -1 }; } }; @@ -186513,13 +186995,15 @@ function (_super) { }; MaskedTextField.prototype._onKeyDown = function (event) { + var current = this._textField.current; + if (this.props.onKeyDown) { this.props.onKeyDown(event); } this._changeSelectionData = null; - if (this._textField.value) { + if (current && current.value) { var keyCode = event.keyCode, ctrlKey = event.ctrlKey, metaKey = event.metaKey; // Ignore ctrl and meta keydown @@ -186533,7 +187017,7 @@ function (_super) { var selectionStart = event.target.selectionStart, selectionEnd = event.target.selectionEnd; // Check if backspace or delete press is valid. - if (!(keyCode === _Utilities.KeyCodes.backspace && selectionEnd && selectionEnd > 0) && !(keyCode === _Utilities.KeyCodes.del && selectionStart !== null && selectionStart < this._textField.value.length)) { + if (!(keyCode === _Utilities.KeyCodes.backspace && selectionEnd && selectionEnd > 0) && !(keyCode === _Utilities.KeyCodes.del && selectionStart !== null && selectionStart < current.value.length)) { return; } @@ -186583,7 +187067,7 @@ function (_super) { tslib_1.__decorate([_Utilities.autobind], MaskedTextField.prototype, "_onPaste", null); return MaskedTextField; -}(_Utilities.BaseComponent); //# sourceMappingURL=MaskedTextField.js.map +}(React.Component); //# sourceMappingURL=MaskedTextField.js.map exports.MaskedTextField = MaskedTextField; @@ -187122,7 +187606,6 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var VegaDeckGl = _sanddanceExplorer.SandDance.VegaDeckGl; -var theme; function getViewerOptions(darkTheme, themeColors) { var colors = themeColors && themeColors[darkTheme ? 'dark' : 'light']; @@ -187180,11 +187663,6 @@ function (_React$Component) { dataSource: snapshotOnLoad && snapshotOnLoad.dataSource || props.dataSources[0], darkTheme: props.darkTheme }; - - if (!theme) { - theme = _base.base.fabric.getTheme(); - } - _this.viewerOptions = getViewerOptions(_this.state.darkTheme, props.themeColors); window.addEventListener('hashchange', function (e) { var snapshot = getSnapshotFromHash(); @@ -187195,6 +187673,9 @@ function (_React$Component) { }); } }); + + _this.changeColorScheme(_this.state.darkTheme); + return _this; } @@ -187231,7 +187712,13 @@ function (_React$Component) { key: "updateExplorerViewerOptions", value: function updateExplorerViewerOptions(viewerOptions) { this.viewerOptions = viewerOptions; - this.explorer.updateViewerOptions(this.viewerOptions); + this.explorer && this.explorer.updateViewerOptions(this.viewerOptions); + } + }, { + key: "getThemePalette", + value: function getThemePalette(darkTheme) { + var theme = darkTheme ? 'dark-theme' : ''; + return _sanddanceExplorer.themePalettes[theme]; } }, { key: "changeColorScheme", @@ -187242,16 +187729,22 @@ function (_React$Component) { VegaDeckGl.base.vega.scheme(_sanddanceExplorer.SandDance.constants.ColorScaleNone, function (x) { return VegaDeckGl.util.colorToString(_this3.explorer.viewer.options.colors.defaultCube); }); - this.explorer.viewer.render(this.explorer.viewer.insight, this.explorer.state.dataContent.data); + this.explorer && this.explorer.viewer && this.explorer.viewer.render(this.explorer.viewer.insight, this.explorer.state.dataContent.data); + + _base.base.fabric.loadTheme({ + palette: this.getThemePalette(darkTheme) + }); } }, { key: "render", value: function render() { var _this4 = this; + var themePalette = this.getThemePalette(this.state.darkTheme); return React.createElement("section", { - className: _sanddanceExplorer.util.classList("sanddance-app", this.state.darkTheme && "dark-theme") + className: "sanddance-app" }, React.createElement(_sanddanceExplorer.Explorer, { + theme: this.state.darkTheme && 'dark-theme', snapshotProps: { modifySnapShot: function modifySnapShot(snapshot) { snapshot.dataSource = _this4.state.dataSource; @@ -187297,6 +187790,7 @@ function (_React$Component) { } }), topBarButtonProps: [{ + themePalette: themePalette, text: this.state.darkTheme ? _language.strings.buttonThemeLight : _language.strings.buttonThemeDark, iconName: this.state.darkTheme ? "Sunny" : "ClearNight", onClick: function onClick() { diff --git a/docs/dist/sanddance/v1/sanddance.js b/docs/dist/sanddance/v1/sanddance.js index 8d9a5fbf..dca1751e 100644 --- a/docs/dist/sanddance/v1/sanddance.js +++ b/docs/dist/sanddance/v1/sanddance.js @@ -199,7 +199,7 @@ }); function unwrapExports (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x.default : x; + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; } function createCommonjsModule(fn, module) { @@ -10184,12 +10184,15 @@ void main(void) { */ getInsight() { const insight = Object.assign({}, this.insight); - insight.signalValues = {}; - this.vegaSpec.signals.forEach(signal => { - insight.signalValues[signal.name] = this.vegaViewGl.signal(signal.name); - }); + insight.signalValues = this.getSignalValues(); return insight; } + /** + * Gets current signal values. + */ + getSignalValues() { + return extractSignalValuesFromView(this.vegaViewGl, this.vegaSpec); + } } // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/docs/docs/sanddance-explorer/v1/api/explorer.md b/docs/docs/sanddance-explorer/v1/api/explorer.md index 26d33283..22301ae3 100644 --- a/docs/docs/sanddance-explorer/v1/api/explorer.md +++ b/docs/docs/sanddance-explorer/v1/api/explorer.md @@ -133,6 +133,24 @@ void ---------- +### changeInsight(newState) + +```typescript +public changeInsight(newState: Partial): void; +``` + +**Parameters** + +| Name | Type | +| -------- | ---------------------------------------- | +| newState | Partial<[State][InterfaceDeclaration-7]> | + +**Return type** + +void + +---------- + ### changespecCapabilities(specCapabilities) ```typescript @@ -254,10 +272,12 @@ public prefs: Prefs; [MethodDeclaration-3]: explorer#changecharttypechart [MethodDeclaration-4]: explorer#calculatecalculating [MethodDeclaration-5]: explorer#changeviewview -[MethodDeclaration-6]: explorer#changespeccapabilitiesspeccapabilities -[MethodDeclaration-7]: explorer#changecolumnmappingrole-column-options -[MethodDeclaration-8]: explorer#componentdidmount -[MethodDeclaration-9]: explorer#render +[MethodDeclaration-6]: explorer#changeinsightnewstate +[InterfaceDeclaration-7]: ../index#state +[MethodDeclaration-7]: explorer#changespeccapabilitiesspeccapabilities +[MethodDeclaration-8]: explorer#changecolumnmappingrole-column-options +[MethodDeclaration-9]: explorer#componentdidmount +[MethodDeclaration-10]: explorer#render [PropertyDeclaration-0]: explorer#viewer [PropertyDeclaration-1]: explorer#vieweroptions [PropertyDeclaration-2]: explorer#discardcolorcontextupdates diff --git a/docs/docs/sanddance-explorer/v1/api/index.md b/docs/docs/sanddance-explorer/v1/api/index.md index 044b72dc..b53561c4 100644 --- a/docs/docs/sanddance-explorer/v1/api/index.md +++ b/docs/docs/sanddance-explorer/v1/api/index.md @@ -114,6 +114,7 @@ interface Prefs { ```typescript interface Props { + theme?: string; viewerOptions?: Partial; initialView?: View; mounted?: (explorer: Explorer) => any; @@ -128,6 +129,7 @@ interface Props { | Name | Type | Optional | | ----------------- | ---------------------------------------- | -------- | +| theme | string | true | | viewerOptions | Partial | true | | initialView | View | true | | mounted | (explorer: Explorer) => any | true | @@ -141,36 +143,28 @@ interface Props { ### State ```typescript -interface State { +interface State extends Insight { calculating: () => void; errors: string[]; autoCompleteDistinctValues: AutoCompleteDistinctValues; search: SearchExpressionGroup[]; - filter: Search; filteredData: object[]; toolbarClosed: boolean; toolbarPinned: boolean; - view: View; dataFile: DataFile; dataContent: DataContent; specCapabilities: SpecCapabilities; - facets: Facets; - scheme: string; - chart: Chart; - columns: InsightColumns; - size: Size; - colorBin: ColorBin; sideTabId: SideTabId; dataScopeId: DataScopeId; selectedItemIndex: { [key: number]: number; }; - initialPointSize: number; - initialColorBinCount: number; - initialXBinCount: number; - initialTreeMapMethod: string; snapshots: Snapshot[]; } ``` +**Extends** + +Insight + **Properties** | Name | Type | Optional | @@ -179,27 +173,15 @@ interface State { | errors | string[] | false | | autoCompleteDistinctValues | AutoCompleteDistinctValues | false | | search | SearchExpressionGroup[] | false | -| filter | Search | false | | filteredData | object[] | false | | toolbarClosed | boolean | false | | toolbarPinned | boolean | false | -| view | View | false | | dataFile | [DataFile][InterfaceDeclaration-1] | false | | dataContent | [DataContent][InterfaceDeclaration-0] | false | | specCapabilities | SpecCapabilities | false | -| facets | Facets | false | -| scheme | string | false | -| chart | Chart | false | -| columns | InsightColumns | false | -| size | Size | false | -| colorBin | ColorBin | false | | sideTabId | SideTabId | false | | dataScopeId | DataScopeId | false | | selectedItemIndex | { [key: number]: number; } | false | -| initialPointSize | number | false | -| initialColorBinCount | number | false | -| initialXBinCount | number | false | -| initialTreeMapMethod | string | false | | snapshots | [Snapshot][InterfaceDeclaration-2][] | false | ## Classes @@ -207,6 +189,18 @@ interface State { ### [Explorer][ClassDeclaration-0] +## Variables + +### themePalettes + +```typescript +const themePalettes: { [theme: string]: Partial; }; +``` + +**Type** + +{ [theme: string]: Partial; } + [SourceFile-0]: index#indextsx [FunctionDeclaration-0]: index#use [InterfaceDeclaration-0]: index#datacontent @@ -218,4 +212,5 @@ interface State { [InterfaceDeclaration-1]: index#datafile [InterfaceDeclaration-0]: index#datacontent [InterfaceDeclaration-2]: index#snapshot -[ClassDeclaration-0]: explorer#explorer \ No newline at end of file +[ClassDeclaration-0]: explorer#explorer +[VariableDeclaration-0]: index#themepalettes \ No newline at end of file diff --git a/docs/docs/sanddance/v1/api/viewer.md b/docs/docs/sanddance/v1/api/viewer.md index 22088038..658e01cb 100644 --- a/docs/docs/sanddance/v1/api/viewer.md +++ b/docs/docs/sanddance/v1/api/viewer.md @@ -198,6 +198,20 @@ public getInsight(): Insight; [Insight][InterfaceDeclaration-8] +---------- + +### getSignalValues() + +Gets current signal values. + +```typescript +public getSignalValues(): SignalValues; +``` + +**Return type** + +[SignalValues][InterfaceDeclaration-11] + ## Properties ### specCapabilities @@ -331,6 +345,8 @@ number [MethodDeclaration-17]: viewer#deactivate [MethodDeclaration-18]: viewer#getinsight [InterfaceDeclaration-8]: types#insight +[MethodDeclaration-19]: viewer#getsignalvalues +[InterfaceDeclaration-11]: types#signalvalues [PropertyDeclaration-16]: viewer#speccapabilities [InterfaceDeclaration-13]: types#speccapabilities [PropertyDeclaration-17]: viewer#options diff --git a/docs/index.html b/docs/index.html index 71998da6..bf972b1f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -20,12 +20,12 @@ Smooth animated transitions between views help you to maintain context as you in

Changelog

    -
  • March 2019 - Initial release to GitHub.
  • +
  • April 2019 - Initial release to GitHub.

Roadmap

  • PowerBI custom visual based on this new architecture.
  • -
  • Additional views, such as treemaps & 3d stacks.
  • +
  • Additional views, such as stacks.
  • Code examples and tutorials.

Dependencies

diff --git a/docs/tests/es6/js/sanddance.js b/docs/tests/es6/js/sanddance.js index 9bdb59bd..1323b108 100644 --- a/docs/tests/es6/js/sanddance.js +++ b/docs/tests/es6/js/sanddance.js @@ -81211,7 +81211,7 @@ function _default(_) { div = _.divide || [5, 2], min = _.extent[0], max = _.extent[1], - span = max - min, + span = max - min || Math.abs(min) || 1, step, level, minstep, @@ -81261,7 +81261,7 @@ function _default(_) { return { start: min, - stop: max, + stop: max === min ? min + step : max, step: step }; } @@ -90194,7 +90194,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = _default; function _default(series, order) { - if (!((n = series.length) > 1)) return; + if (!((n = series.length) > 0)) return; for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { for (yp = yn = 0, i = 0; i < n; ++i) { @@ -114665,8 +114665,8 @@ function _default(nodes) { function initializeNodes() { for (var i = 0, n = nodes.length, node; i < n; ++i) { node = nodes[i], node.index = i; - if (!isNaN(node.fx)) node.x = node.fx; - if (!isNaN(node.fy)) node.y = node.fy; + if (node.fx != null) node.x = node.fx; + if (node.fy != null) node.y = node.fy; if (isNaN(node.x) || isNaN(node.y)) { var radius = initialRadius * Math.sqrt(i), @@ -120729,12 +120729,6 @@ var _ResolveFilter = _interopRequireDefault(require("./src/ResolveFilter")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } },{"./src/CrossFilter":"Ony7","./src/ResolveFilter":"Ik0p"}],"q4S0":[function(require,module,exports) { module.exports = { - "_args": [ - [ - "vega-lib@4.3.0", - "C:\\src\\_sanddance5\\packages\\sanddance-test-es6" - ] - ], "_from": "vega-lib@4.3.0", "_id": "vega-lib@4.3.0", "_inBundle": false, @@ -120755,8 +120749,9 @@ module.exports = { "/" ], "_resolved": "https://registry.npmjs.org/vega-lib/-/vega-lib-4.3.0.tgz", - "_spec": "4.3.0", - "_where": "C:\\src\\_sanddance5\\packages\\sanddance-test-es6", + "_shasum": "b17bea4393a281db3e647e665b9e97aa793ccfd6", + "_spec": "vega-lib@4.3.0", + "_where": "C:\\src\\_SandDanceMaster\\packages\\sanddance-test-es6", "author": { "name": "UW Interactive Data Lab", "url": "http://idl.cs.washington.edu" @@ -120768,6 +120763,7 @@ module.exports = { "bugs": { "url": "https://github.com/vega/vega-lib/issues" }, + "bundleDependencies": false, "contributors": [ { "name": "Jeffrey Heer", @@ -120818,6 +120814,7 @@ module.exports = { "vega-voronoi": "^3.0.0", "vega-wordcloud": "^3.0.0" }, + "deprecated": false, "description": "Include Vega in projects using minimal dependencies.", "devDependencies": { "eslint": "5", @@ -123621,11 +123618,15 @@ function _default(codegen) { utcminutes: fn('getUTCMinutes', DATE, 0), utcseconds: fn('getUTCSeconds', DATE, 0), utcmilliseconds: fn('getUTCMilliseconds', DATE, 0), - // shared sequence functions + // sequence functions length: fn('length', null, -1), + join: fn('join', null), indexof: fn('indexOf', null), lastindexof: fn('lastIndexOf', null), slice: fn('slice', null), + reverse: function (args) { + return '(' + codegen(args[0]) + ').slice().reverse()'; + }, // STRING functions parseFloat: 'parseFloat', parseInt: 'parseInt', @@ -123634,6 +123635,7 @@ function _default(codegen) { substring: fn('substring', STRING), split: fn('split', STRING), replace: fn('replace', STRING), + trim: fn('trim', STRING, 0), // REGEXP functions regexp: REGEXP, test: fn('test', REGEXP), @@ -123662,6 +123664,11 @@ var _vegaUtil = require("vega-util"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function stripQuotes(s) { + var n = s && s.length - 1; + return n && (s[0] === '"' && s[n] === '"' || s[0] === '\'' && s[n] === '\'') ? s.slice(1, -1) : s; +} + function _default(opt) { opt = opt || {}; @@ -123713,9 +123720,9 @@ function _default(opt) { var p = visit(n.property); if (o === fieldvar) { - fields[p] = 1; - } // HACKish... - + // strip quotes to sanitize field name (#1653) + fields[stripQuotes(p)] = 1; + } if (d) memberDepth -= 1; return o + (d ? '.' + p : '[' + p + ']'); @@ -145166,12 +145173,17 @@ class Viewer { getInsight() { const insight = Object.assign({}, this.insight); - insight.signalValues = {}; - this.vegaSpec.signals.forEach(signal => { - insight.signalValues[signal.name] = this.vegaViewGl.signal(signal.name); - }); + insight.signalValues = this.getSignalValues(); return insight; } + /** + * Gets current signal values. + */ + + + getSignalValues() { + return (0, _signals.extractSignalValuesFromView)(this.vegaViewGl, this.vegaSpec); + } } diff --git a/packages/sanddance-app/src/sanddanceApp.tsx b/packages/sanddance-app/src/sanddanceApp.tsx index 369ec591..c9f7ed68 100644 --- a/packages/sanddance-app/src/sanddanceApp.tsx +++ b/packages/sanddance-app/src/sanddanceApp.tsx @@ -10,7 +10,7 @@ import { SandDance, Snapshot, themePalettes - } from '@msrvida/sanddance-explorer'; +} from '@msrvida/sanddance-explorer'; import { strings } from './language'; export interface Props {