@fluentui/react-charting 5.11.0 → 5.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.json +36 -1
  2. package/CHANGELOG.md +13 -2
  3. package/dist/react-charting.js +1 -1
  4. package/dist/react-charting.min.js +1 -1
  5. package/lib/TreeChart.d.ts +1 -0
  6. package/lib/TreeChart.js +2 -0
  7. package/lib/TreeChart.js.map +1 -0
  8. package/lib/Utilities.d.ts +1 -1
  9. package/lib/Utilities.js +4 -2
  10. package/lib/Utilities.js.map +1 -1
  11. package/lib/components/TreeChart/TreeChart.base.d.ts +18 -0
  12. package/lib/components/TreeChart/TreeChart.base.js +239 -0
  13. package/lib/components/TreeChart/TreeChart.base.js.map +1 -0
  14. package/lib/components/TreeChart/TreeChart.d.ts +3 -0
  15. package/lib/components/TreeChart/TreeChart.js +5 -0
  16. package/lib/components/TreeChart/TreeChart.js.map +1 -0
  17. package/lib/components/TreeChart/TreeChart.styles.d.ts +2 -0
  18. package/lib/components/TreeChart/TreeChart.styles.js +20 -0
  19. package/lib/components/TreeChart/TreeChart.styles.js.map +1 -0
  20. package/lib/components/TreeChart/TreeChart.types.d.ts +88 -0
  21. package/lib/components/TreeChart/TreeChart.types.js +11 -0
  22. package/lib/components/TreeChart/TreeChart.types.js.map +1 -0
  23. package/lib/components/TreeChart/index.d.ts +2 -0
  24. package/lib/components/TreeChart/index.js +3 -0
  25. package/lib/components/TreeChart/index.js.map +1 -0
  26. package/lib/index.d.ts +1 -0
  27. package/lib/index.js +1 -0
  28. package/lib/index.js.map +1 -1
  29. package/lib/version.js +1 -1
  30. package/lib/version.js.map +1 -1
  31. package/lib-amd/TreeChart.d.ts +1 -0
  32. package/lib-amd/TreeChart.js +6 -0
  33. package/lib-amd/TreeChart.js.map +1 -0
  34. package/lib-amd/Utilities.d.ts +1 -1
  35. package/lib-amd/Utilities.js +3 -1
  36. package/lib-amd/Utilities.js.map +1 -1
  37. package/lib-amd/components/TreeChart/TreeChart.base.d.ts +18 -0
  38. package/lib-amd/components/TreeChart/TreeChart.base.js +238 -0
  39. package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -0
  40. package/lib-amd/components/TreeChart/TreeChart.d.ts +3 -0
  41. package/lib-amd/components/TreeChart/TreeChart.js +7 -0
  42. package/lib-amd/components/TreeChart/TreeChart.js.map +1 -0
  43. package/lib-amd/components/TreeChart/TreeChart.styles.d.ts +2 -0
  44. package/lib-amd/components/TreeChart/TreeChart.styles.js +25 -0
  45. package/lib-amd/components/TreeChart/TreeChart.styles.js.map +1 -0
  46. package/lib-amd/components/TreeChart/TreeChart.types.d.ts +88 -0
  47. package/lib-amd/components/TreeChart/TreeChart.types.js +16 -0
  48. package/lib-amd/components/TreeChart/TreeChart.types.js.map +1 -0
  49. package/lib-amd/components/TreeChart/index.d.ts +2 -0
  50. package/lib-amd/components/TreeChart/index.js +7 -0
  51. package/lib-amd/components/TreeChart/index.js.map +1 -0
  52. package/lib-amd/index.d.ts +1 -0
  53. package/lib-amd/index.js +2 -1
  54. package/lib-amd/index.js.map +1 -1
  55. package/lib-amd/version.js +1 -1
  56. package/lib-amd/version.js.map +1 -1
  57. package/lib-commonjs/TreeChart.d.ts +1 -0
  58. package/lib-commonjs/TreeChart.js +5 -0
  59. package/lib-commonjs/TreeChart.js.map +1 -0
  60. package/lib-commonjs/Utilities.d.ts +1 -1
  61. package/lib-commonjs/Utilities.js +6 -4
  62. package/lib-commonjs/Utilities.js.map +1 -1
  63. package/lib-commonjs/components/TreeChart/TreeChart.base.d.ts +18 -0
  64. package/lib-commonjs/components/TreeChart/TreeChart.base.js +242 -0
  65. package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -0
  66. package/lib-commonjs/components/TreeChart/TreeChart.d.ts +3 -0
  67. package/lib-commonjs/components/TreeChart/TreeChart.js +8 -0
  68. package/lib-commonjs/components/TreeChart/TreeChart.js.map +1 -0
  69. package/lib-commonjs/components/TreeChart/TreeChart.styles.d.ts +2 -0
  70. package/lib-commonjs/components/TreeChart/TreeChart.styles.js +24 -0
  71. package/lib-commonjs/components/TreeChart/TreeChart.styles.js.map +1 -0
  72. package/lib-commonjs/components/TreeChart/TreeChart.types.d.ts +88 -0
  73. package/lib-commonjs/components/TreeChart/TreeChart.types.js +14 -0
  74. package/lib-commonjs/components/TreeChart/TreeChart.types.js.map +1 -0
  75. package/lib-commonjs/components/TreeChart/index.d.ts +2 -0
  76. package/lib-commonjs/components/TreeChart/index.js +6 -0
  77. package/lib-commonjs/components/TreeChart/index.js.map +1 -0
  78. package/lib-commonjs/index.d.ts +1 -0
  79. package/lib-commonjs/index.js +1 -0
  80. package/lib-commonjs/index.js.map +1 -1
  81. package/lib-commonjs/version.js +1 -1
  82. package/lib-commonjs/version.js.map +1 -1
  83. package/package.json +6 -4
  84. package/src/components/TreeChart/TreeChart.types.ts +89 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TreeChart/index.ts"],"names":[],"mappings":";;;IAAA,2CAA4B;IAC5B,iDAAkC","sourcesContent":["export * from './TreeChart';\nexport * from './TreeChart.types';\n"]}
@@ -13,5 +13,6 @@ export * from './types/index';
13
13
  export * from './utilities/ChartHoverCard/index';
14
14
  export * from './HeatMapChart';
15
15
  export * from './SankeyChart';
16
+ export * from './TreeChart';
16
17
  export * from './Sparkline';
17
18
  import './version';
package/lib-amd/index.js CHANGED
@@ -1,4 +1,4 @@
1
- define(["require", "exports", "tslib", "./HorizontalBarChart", "./DonutChart", "./Legends", "./LineChart", "./AreaChart", "./PieChart", "./StackedBarChart", "./VerticalBarChart", "./VerticalStackedBarChart", "./GroupedVerticalBarChart", "./CartesianChart", "./types/index", "./utilities/ChartHoverCard/index", "./HeatMapChart", "./SankeyChart", "./Sparkline", "./version"], function (require, exports, tslib_1, HorizontalBarChart_1, DonutChart_1, Legends_1, LineChart_1, AreaChart_1, PieChart_1, StackedBarChart_1, VerticalBarChart_1, VerticalStackedBarChart_1, GroupedVerticalBarChart_1, CartesianChart_1, index_1, index_2, HeatMapChart_1, SankeyChart_1, Sparkline_1) {
1
+ define(["require", "exports", "tslib", "./HorizontalBarChart", "./DonutChart", "./Legends", "./LineChart", "./AreaChart", "./PieChart", "./StackedBarChart", "./VerticalBarChart", "./VerticalStackedBarChart", "./GroupedVerticalBarChart", "./CartesianChart", "./types/index", "./utilities/ChartHoverCard/index", "./HeatMapChart", "./SankeyChart", "./TreeChart", "./Sparkline", "./version"], function (require, exports, tslib_1, HorizontalBarChart_1, DonutChart_1, Legends_1, LineChart_1, AreaChart_1, PieChart_1, StackedBarChart_1, VerticalBarChart_1, VerticalStackedBarChart_1, GroupedVerticalBarChart_1, CartesianChart_1, index_1, index_2, HeatMapChart_1, SankeyChart_1, TreeChart_1, Sparkline_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  tslib_1.__exportStar(HorizontalBarChart_1, exports);
@@ -16,6 +16,7 @@ define(["require", "exports", "tslib", "./HorizontalBarChart", "./DonutChart", "
16
16
  tslib_1.__exportStar(index_2, exports);
17
17
  tslib_1.__exportStar(HeatMapChart_1, exports);
18
18
  tslib_1.__exportStar(SankeyChart_1, exports);
19
+ tslib_1.__exportStar(TreeChart_1, exports);
19
20
  tslib_1.__exportStar(Sparkline_1, exports);
20
21
  });
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;IAAA,oDAAqC;IACrC,4CAA6B;IAC7B,yCAA0B;IAC1B,2CAA4B;IAC5B,2CAA4B;IAC5B,0CAA2B;IAC3B,iDAAkC;IAClC,kDAAmC;IACnC,yDAA0C;IAC1C,yDAA0C;IAC1C,gDAAiC;IACjC,uCAA8B;IAC9B,uCAAiD;IACjD,8CAA+B;IAC/B,6CAA8B;IAC9B,2CAA4B","sourcesContent":["export * from './HorizontalBarChart';\nexport * from './DonutChart';\nexport * from './Legends';\nexport * from './LineChart';\nexport * from './AreaChart';\nexport * from './PieChart';\nexport * from './StackedBarChart';\nexport * from './VerticalBarChart';\nexport * from './VerticalStackedBarChart';\nexport * from './GroupedVerticalBarChart';\nexport * from './CartesianChart';\nexport * from './types/index';\nexport * from './utilities/ChartHoverCard/index';\nexport * from './HeatMapChart';\nexport * from './SankeyChart';\nexport * from './Sparkline';\n\nimport './version';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;IAAA,oDAAqC;IACrC,4CAA6B;IAC7B,yCAA0B;IAC1B,2CAA4B;IAC5B,2CAA4B;IAC5B,0CAA2B;IAC3B,iDAAkC;IAClC,kDAAmC;IACnC,yDAA0C;IAC1C,yDAA0C;IAC1C,gDAAiC;IACjC,uCAA8B;IAC9B,uCAAiD;IACjD,8CAA+B;IAC/B,6CAA8B;IAC9B,2CAA4B;IAC5B,2CAA4B","sourcesContent":["export * from './HorizontalBarChart';\nexport * from './DonutChart';\nexport * from './Legends';\nexport * from './LineChart';\nexport * from './AreaChart';\nexport * from './PieChart';\nexport * from './StackedBarChart';\nexport * from './VerticalBarChart';\nexport * from './VerticalStackedBarChart';\nexport * from './GroupedVerticalBarChart';\nexport * from './CartesianChart';\nexport * from './types/index';\nexport * from './utilities/ChartHoverCard/index';\nexport * from './HeatMapChart';\nexport * from './SankeyChart';\nexport * from './TreeChart';\nexport * from './Sparkline';\n\nimport './version';\n"]}
@@ -1,6 +1,6 @@
1
1
  define(["require", "exports", "@fluentui/set-version"], function (require, exports, set_version_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- set_version_1.setVersion('@fluentui/react-charting', '5.11.0');
4
+ set_version_1.setVersion('@fluentui/react-charting', '5.12.0');
5
5
  });
6
6
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":";;;IAGA,wBAAU,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-charting', '5.11.0');"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":";;;IAGA,wBAAU,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-charting', '5.12.0');"]}
@@ -0,0 +1 @@
1
+ export * from './components/TreeChart/index';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./components/TreeChart/index"), exports);
5
+ //# sourceMappingURL=TreeChart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeChart.js","sourceRoot":"../src/","sources":["TreeChart.ts"],"names":[],"mappings":";;;AAAA,uEAA6C","sourcesContent":["export * from './components/TreeChart/index';\n"]}
@@ -1,2 +1,2 @@
1
- export { Async, AutoScroll, BaseComponent, Customizations, Customizer, CustomizerContext, DATA_IS_SCROLLABLE_ATTRIBUTE, DATA_PORTAL_ATTRIBUTE, DelayedRender, EventGroup, FabricPerformance, FocusRects, GlobalSettings, IsFocusVisibleClassName, KeyCodes, Rectangle, SELECTION_CHANGE, Selection, SelectionDirection, SelectionMode, addDirectionalKeyCode, addElementAtIndex, allowOverscrollOnElement, allowScrollOnElement, anchorProperties, appendFunction, arraysEqual, asAsync, assertNever, assign, audioProperties, baseElementEvents, baseElementProperties, buttonProperties, calculatePrecision, classNamesFunction, colGroupProperties, colProperties, composeComponentAs, composeRenderFunction, createArray, createMemoizer, createMergedRef, css, customizable, disableBodyScroll, divProperties, doesElementContainFocus, elementContains, elementContainsAttribute, enableBodyScroll, extendComponent, filteredAssign, find, findElementRecursive, findIndex, findScrollableParent, fitContentToBounds, flatten, focusAsync, focusFirstChild, formProperties, format, getChildren, getDistanceBetweenPoints, getDocument, getElementIndexPath, getFirstFocusable, getFirstTabbable, getFirstVisibleElementFromSelector, getFocusableByIndexPath, getId, getInitials, getLanguage, getLastFocusable, getLastTabbable, getNativeElementProps, getNativeProps, getNextElement, getParent, getPreviousElement, getPropsWithDefaults, getRTL, getRTLSafeKeyCode, getRect, getResourceUrl, getScrollbarWidth, getVirtualParent, getWindow, hasHorizontalOverflow, hasOverflow, hasVerticalOverflow, hoistMethods, hoistStatics, htmlElementProperties, iframeProperties, imageProperties, imgProperties, initializeComponentRef, initializeFocusRects, inputProperties, isControlled, isDirectionalKeyCode, isElementFocusSubZone, isElementFocusZone, isElementTabbable, isElementVisible, isElementVisibleAndNotHidden, isIE11, isIOS, isMac, isVirtualElement, labelProperties, liProperties, mapEnumByName, memoize, memoizeFunction, merge, mergeAriaAttributeValues, mergeCustomizations, mergeScopedSettings, mergeSettings, modalize, nullRender, olProperties, omit, on, optionProperties, portalContainsElement, precisionRound, raiseClick, removeIndex, replaceElement, resetControlledWarnings, resetIds, resetMemoizations, safeRequestAnimationFrame, safeSetTimeout, selectProperties, setBaseUrl, setFocusVisibility, setLanguage, setMemoizeWeakMap, setPortalAttribute, setRTL, setSSR, setVirtualParent, setWarningCallback, shallowCompare, shouldWrapFocus, styled, tableProperties, tdProperties, textAreaProperties, thProperties, toMatrix, trProperties, unhoistMethods, useCustomizationSettings, useFocusRects, values, videoProperties, warn, warnConditionallyRequiredProps, warnControlledUsage, warnDeprecations, warnMutuallyExclusive, } from '@fluentui/react/lib-commonjs/Utilities';
1
+ export { Async, AutoScroll, BaseComponent, Customizations, Customizer, CustomizerContext, DATA_IS_SCROLLABLE_ATTRIBUTE, DATA_PORTAL_ATTRIBUTE, DelayedRender, EventGroup, FabricPerformance, FocusRects, GlobalSettings, IsFocusVisibleClassName, KeyCodes, Rectangle, SELECTION_CHANGE, Selection, SelectionDirection, SelectionMode, addDirectionalKeyCode, addElementAtIndex, allowOverscrollOnElement, allowScrollOnElement, anchorProperties, appendFunction, arraysEqual, asAsync, assertNever, assign, audioProperties, baseElementEvents, baseElementProperties, buttonProperties, calculatePrecision, canUseDOM, classNamesFunction, colGroupProperties, colProperties, composeComponentAs, composeRenderFunction, createArray, createMemoizer, createMergedRef, css, customizable, disableBodyScroll, divProperties, doesElementContainFocus, elementContains, elementContainsAttribute, enableBodyScroll, extendComponent, filteredAssign, find, findElementRecursive, findIndex, findScrollableParent, fitContentToBounds, flatten, focusAsync, focusFirstChild, formProperties, format, getChildren, getDistanceBetweenPoints, getDocument, getElementIndexPath, getFirstFocusable, getFirstTabbable, getFirstVisibleElementFromSelector, getFocusableByIndexPath, getId, getInitials, getLanguage, getLastFocusable, getLastTabbable, getNativeElementProps, getNativeProps, getNextElement, getParent, getPreviousElement, getPropsWithDefaults, getRTL, getRTLSafeKeyCode, getRect, getResourceUrl, getScrollbarWidth, getVirtualParent, getWindow, hasHorizontalOverflow, hasOverflow, hasVerticalOverflow, hoistMethods, hoistStatics, htmlElementProperties, iframeProperties, imageProperties, imgProperties, initializeComponentRef, initializeFocusRects, inputProperties, isControlled, isDirectionalKeyCode, isElementFocusSubZone, isElementFocusZone, isElementTabbable, isElementVisible, isElementVisibleAndNotHidden, isIE11, isIOS, isMac, isVirtualElement, labelProperties, liProperties, mapEnumByName, memoize, memoizeFunction, merge, mergeAriaAttributeValues, mergeCustomizations, mergeScopedSettings, mergeSettings, modalize, nullRender, olProperties, omit, on, optionProperties, portalContainsElement, precisionRound, raiseClick, removeIndex, replaceElement, resetControlledWarnings, resetIds, resetMemoizations, safeRequestAnimationFrame, safeSetTimeout, selectProperties, setBaseUrl, setFocusVisibility, setLanguage, setMemoizeWeakMap, setPortalAttribute, setRTL, setSSR, setVirtualParent, setWarningCallback, shallowCompare, shouldWrapFocus, styled, tableProperties, tdProperties, textAreaProperties, thProperties, toMatrix, trProperties, unhoistMethods, useCustomizationSettings, useFocusRects, values, videoProperties, warn, warnConditionallyRequiredProps, warnControlledUsage, warnDeprecations, warnMutuallyExclusive, } from '@fluentui/react/lib-commonjs/Utilities';
2
2
  export type { FitMode, IAsAsyncOptions, IBaseProps, ICancelable, IChangeDescription, IChangeEventCallback, IClassNames, IClassNamesFunctionOptions, IComponentAs, IComponentAsProps, ICssInput, ICustomizableProps, ICustomizations, ICustomizerContext, ICustomizerProps, IDeclaredEventsByName, IDelayedRenderProps, IDelayedRenderState, IDictionary, IDisposable, IEventRecord, IEventRecordList, IEventRecordsByName, IFitContentToBoundsOptions, IObjectWithKey, IPerfData, IPerfMeasurement, IPerfSummary, IPoint, IPropsWithStyles, IRectangle, IRefObject, IRenderComponent, IRenderFunction, ISelection, ISelectionOptions, ISelectionOptionsWithRequiredGetKey, ISerializableObject, ISettings, ISettingsFunction, ISettingsMap, ISize, IStyleFunction, IStyleFunctionOrObject, IVirtualElement, IWarnControlledUsageParams, Omit, Point, RefObject, Settings, SettingsFunction, StyleFunction, } from '@fluentui/react/lib-commonjs/Utilities';
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.elementContainsAttribute = exports.elementContains = exports.doesElementContainFocus = exports.divProperties = exports.disableBodyScroll = exports.customizable = exports.css = exports.createMergedRef = exports.createMemoizer = exports.createArray = exports.composeRenderFunction = exports.composeComponentAs = exports.colProperties = exports.colGroupProperties = exports.classNamesFunction = exports.calculatePrecision = exports.buttonProperties = exports.baseElementProperties = exports.baseElementEvents = exports.audioProperties = exports.assign = exports.assertNever = exports.asAsync = exports.arraysEqual = exports.appendFunction = exports.anchorProperties = exports.allowScrollOnElement = exports.allowOverscrollOnElement = exports.addElementAtIndex = exports.addDirectionalKeyCode = exports.SelectionMode = exports.SelectionDirection = exports.Selection = exports.SELECTION_CHANGE = exports.Rectangle = exports.KeyCodes = exports.IsFocusVisibleClassName = exports.GlobalSettings = exports.FocusRects = exports.FabricPerformance = exports.EventGroup = exports.DelayedRender = exports.DATA_PORTAL_ATTRIBUTE = exports.DATA_IS_SCROLLABLE_ATTRIBUTE = exports.CustomizerContext = exports.Customizer = exports.Customizations = exports.BaseComponent = exports.AutoScroll = exports.Async = void 0;
4
- exports.initializeFocusRects = exports.initializeComponentRef = exports.imgProperties = exports.imageProperties = exports.iframeProperties = exports.htmlElementProperties = exports.hoistStatics = exports.hoistMethods = exports.hasVerticalOverflow = exports.hasOverflow = exports.hasHorizontalOverflow = exports.getWindow = exports.getVirtualParent = exports.getScrollbarWidth = exports.getResourceUrl = exports.getRect = exports.getRTLSafeKeyCode = exports.getRTL = exports.getPropsWithDefaults = exports.getPreviousElement = exports.getParent = exports.getNextElement = exports.getNativeProps = exports.getNativeElementProps = exports.getLastTabbable = exports.getLastFocusable = exports.getLanguage = exports.getInitials = exports.getId = exports.getFocusableByIndexPath = exports.getFirstVisibleElementFromSelector = exports.getFirstTabbable = exports.getFirstFocusable = exports.getElementIndexPath = exports.getDocument = exports.getDistanceBetweenPoints = exports.getChildren = exports.format = exports.formProperties = exports.focusFirstChild = exports.focusAsync = exports.flatten = exports.fitContentToBounds = exports.findScrollableParent = exports.findIndex = exports.findElementRecursive = exports.find = exports.filteredAssign = exports.extendComponent = exports.enableBodyScroll = void 0;
5
- exports.shouldWrapFocus = exports.shallowCompare = exports.setWarningCallback = exports.setVirtualParent = exports.setSSR = exports.setRTL = exports.setPortalAttribute = exports.setMemoizeWeakMap = exports.setLanguage = exports.setFocusVisibility = exports.setBaseUrl = exports.selectProperties = exports.safeSetTimeout = exports.safeRequestAnimationFrame = exports.resetMemoizations = exports.resetIds = exports.resetControlledWarnings = exports.replaceElement = exports.removeIndex = exports.raiseClick = exports.precisionRound = exports.portalContainsElement = exports.optionProperties = exports.on = exports.omit = exports.olProperties = exports.nullRender = exports.modalize = exports.mergeSettings = exports.mergeScopedSettings = exports.mergeCustomizations = exports.mergeAriaAttributeValues = exports.merge = exports.memoizeFunction = exports.memoize = exports.mapEnumByName = exports.liProperties = exports.labelProperties = exports.isVirtualElement = exports.isMac = exports.isIOS = exports.isIE11 = exports.isElementVisibleAndNotHidden = exports.isElementVisible = exports.isElementTabbable = exports.isElementFocusZone = exports.isElementFocusSubZone = exports.isDirectionalKeyCode = exports.isControlled = exports.inputProperties = void 0;
6
- exports.warnMutuallyExclusive = exports.warnDeprecations = exports.warnControlledUsage = exports.warnConditionallyRequiredProps = exports.warn = exports.videoProperties = exports.values = exports.useFocusRects = exports.useCustomizationSettings = exports.unhoistMethods = exports.trProperties = exports.toMatrix = exports.thProperties = exports.textAreaProperties = exports.tdProperties = exports.tableProperties = exports.styled = void 0;
3
+ exports.elementContains = exports.doesElementContainFocus = exports.divProperties = exports.disableBodyScroll = exports.customizable = exports.css = exports.createMergedRef = exports.createMemoizer = exports.createArray = exports.composeRenderFunction = exports.composeComponentAs = exports.colProperties = exports.colGroupProperties = exports.classNamesFunction = exports.canUseDOM = exports.calculatePrecision = exports.buttonProperties = exports.baseElementProperties = exports.baseElementEvents = exports.audioProperties = exports.assign = exports.assertNever = exports.asAsync = exports.arraysEqual = exports.appendFunction = exports.anchorProperties = exports.allowScrollOnElement = exports.allowOverscrollOnElement = exports.addElementAtIndex = exports.addDirectionalKeyCode = exports.SelectionMode = exports.SelectionDirection = exports.Selection = exports.SELECTION_CHANGE = exports.Rectangle = exports.KeyCodes = exports.IsFocusVisibleClassName = exports.GlobalSettings = exports.FocusRects = exports.FabricPerformance = exports.EventGroup = exports.DelayedRender = exports.DATA_PORTAL_ATTRIBUTE = exports.DATA_IS_SCROLLABLE_ATTRIBUTE = exports.CustomizerContext = exports.Customizer = exports.Customizations = exports.BaseComponent = exports.AutoScroll = exports.Async = void 0;
4
+ exports.initializeComponentRef = exports.imgProperties = exports.imageProperties = exports.iframeProperties = exports.htmlElementProperties = exports.hoistStatics = exports.hoistMethods = exports.hasVerticalOverflow = exports.hasOverflow = exports.hasHorizontalOverflow = exports.getWindow = exports.getVirtualParent = exports.getScrollbarWidth = exports.getResourceUrl = exports.getRect = exports.getRTLSafeKeyCode = exports.getRTL = exports.getPropsWithDefaults = exports.getPreviousElement = exports.getParent = exports.getNextElement = exports.getNativeProps = exports.getNativeElementProps = exports.getLastTabbable = exports.getLastFocusable = exports.getLanguage = exports.getInitials = exports.getId = exports.getFocusableByIndexPath = exports.getFirstVisibleElementFromSelector = exports.getFirstTabbable = exports.getFirstFocusable = exports.getElementIndexPath = exports.getDocument = exports.getDistanceBetweenPoints = exports.getChildren = exports.format = exports.formProperties = exports.focusFirstChild = exports.focusAsync = exports.flatten = exports.fitContentToBounds = exports.findScrollableParent = exports.findIndex = exports.findElementRecursive = exports.find = exports.filteredAssign = exports.extendComponent = exports.enableBodyScroll = exports.elementContainsAttribute = void 0;
5
+ exports.shallowCompare = exports.setWarningCallback = exports.setVirtualParent = exports.setSSR = exports.setRTL = exports.setPortalAttribute = exports.setMemoizeWeakMap = exports.setLanguage = exports.setFocusVisibility = exports.setBaseUrl = exports.selectProperties = exports.safeSetTimeout = exports.safeRequestAnimationFrame = exports.resetMemoizations = exports.resetIds = exports.resetControlledWarnings = exports.replaceElement = exports.removeIndex = exports.raiseClick = exports.precisionRound = exports.portalContainsElement = exports.optionProperties = exports.on = exports.omit = exports.olProperties = exports.nullRender = exports.modalize = exports.mergeSettings = exports.mergeScopedSettings = exports.mergeCustomizations = exports.mergeAriaAttributeValues = exports.merge = exports.memoizeFunction = exports.memoize = exports.mapEnumByName = exports.liProperties = exports.labelProperties = exports.isVirtualElement = exports.isMac = exports.isIOS = exports.isIE11 = exports.isElementVisibleAndNotHidden = exports.isElementVisible = exports.isElementTabbable = exports.isElementFocusZone = exports.isElementFocusSubZone = exports.isDirectionalKeyCode = exports.isControlled = exports.inputProperties = exports.initializeFocusRects = void 0;
6
+ exports.warnMutuallyExclusive = exports.warnDeprecations = exports.warnControlledUsage = exports.warnConditionallyRequiredProps = exports.warn = exports.videoProperties = exports.values = exports.useFocusRects = exports.useCustomizationSettings = exports.unhoistMethods = exports.trProperties = exports.toMatrix = exports.thProperties = exports.textAreaProperties = exports.tdProperties = exports.tableProperties = exports.styled = exports.shouldWrapFocus = void 0;
7
7
  var Utilities_1 = require("@fluentui/react/lib-commonjs/Utilities");
8
8
  Object.defineProperty(exports, "Async", { enumerable: true, get: function () { return Utilities_1.Async; } });
9
9
  Object.defineProperty(exports, "AutoScroll", { enumerable: true, get: function () { return Utilities_1.AutoScroll; } });
@@ -42,6 +42,7 @@ Object.defineProperty(exports, "baseElementEvents", { enumerable: true, get: fun
42
42
  Object.defineProperty(exports, "baseElementProperties", { enumerable: true, get: function () { return Utilities_1.baseElementProperties; } });
43
43
  Object.defineProperty(exports, "buttonProperties", { enumerable: true, get: function () { return Utilities_1.buttonProperties; } });
44
44
  Object.defineProperty(exports, "calculatePrecision", { enumerable: true, get: function () { return Utilities_1.calculatePrecision; } });
45
+ Object.defineProperty(exports, "canUseDOM", { enumerable: true, get: function () { return Utilities_1.canUseDOM; } });
45
46
  Object.defineProperty(exports, "classNamesFunction", { enumerable: true, get: function () { return Utilities_1.classNamesFunction; } });
46
47
  Object.defineProperty(exports, "colGroupProperties", { enumerable: true, get: function () { return Utilities_1.colGroupProperties; } });
47
48
  Object.defineProperty(exports, "colProperties", { enumerable: true, get: function () { return Utilities_1.colProperties; } });
@@ -158,6 +159,7 @@ Object.defineProperty(exports, "setLanguage", { enumerable: true, get: function
158
159
  Object.defineProperty(exports, "setMemoizeWeakMap", { enumerable: true, get: function () { return Utilities_1.setMemoizeWeakMap; } });
159
160
  Object.defineProperty(exports, "setPortalAttribute", { enumerable: true, get: function () { return Utilities_1.setPortalAttribute; } });
160
161
  Object.defineProperty(exports, "setRTL", { enumerable: true, get: function () { return Utilities_1.setRTL; } });
162
+ // eslint-disable-next-line deprecation/deprecation
161
163
  Object.defineProperty(exports, "setSSR", { enumerable: true, get: function () { return Utilities_1.setSSR; } });
162
164
  Object.defineProperty(exports, "setVirtualParent", { enumerable: true, get: function () { return Utilities_1.setVirtualParent; } });
163
165
  Object.defineProperty(exports, "setWarningCallback", { enumerable: true, get: function () { return Utilities_1.setWarningCallback; } });
@@ -1 +1 @@
1
- {"version":3,"file":"Utilities.js","sourceRoot":"../src/","sources":["Utilities.ts"],"names":[],"mappings":";;;;;;AAAA,2DAgLuC;AA/KrC,kGAAA,KAAK,OAAA;AACL,uGAAA,UAAU,OAAA;AACV,mDAAmD;AACnD,0GAAA,aAAa,OAAA;AACb,2GAAA,cAAc,OAAA;AACd,mDAAmD;AACnD,uGAAA,UAAU,OAAA;AACV,8GAAA,iBAAiB,OAAA;AACjB,yHAAA,4BAA4B,OAAA;AAC5B,kHAAA,qBAAqB,OAAA;AACrB,0GAAA,aAAa,OAAA;AACb,uGAAA,UAAU,OAAA;AACV,8GAAA,iBAAiB,OAAA;AACjB,uGAAA,UAAU,OAAA;AACV,2GAAA,cAAc,OAAA;AACd,oHAAA,uBAAuB,OAAA;AACvB,qGAAA,QAAQ,OAAA;AACR,sGAAA,SAAS,OAAA;AACT,6GAAA,gBAAgB,OAAA;AAChB,sGAAA,SAAS,OAAA;AACT,+GAAA,kBAAkB,OAAA;AAClB,0GAAA,aAAa,OAAA;AACb,kHAAA,qBAAqB,OAAA;AACrB,8GAAA,iBAAiB,OAAA;AACjB,qHAAA,wBAAwB,OAAA;AACxB,iHAAA,oBAAoB,OAAA;AACpB,6GAAA,gBAAgB,OAAA;AAChB,2GAAA,cAAc,OAAA;AACd,wGAAA,WAAW,OAAA;AACX,oGAAA,OAAO,OAAA;AACP,wGAAA,WAAW,OAAA;AACX,mGAAA,MAAM,OAAA;AACN,4GAAA,eAAe,OAAA;AACf,8GAAA,iBAAiB,OAAA;AACjB,kHAAA,qBAAqB,OAAA;AACrB,6GAAA,gBAAgB,OAAA;AAChB,+GAAA,kBAAkB,OAAA;AAClB,+GAAA,kBAAkB,OAAA;AAClB,+GAAA,kBAAkB,OAAA;AAClB,0GAAA,aAAa,OAAA;AACb,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,OAAA;AACX,2GAAA,cAAc,OAAA;AACd,oHAAA,uBAAuB,OAAA;AACvB,qGAAA,QAAQ,OAAA;AACR,8GAAA,iBAAiB,OAAA;AACjB,sHAAA,yBAAyB,OAAA;AACzB,2GAAA,cAAc,OAAA;AACd,6GAAA,gBAAgB,OAAA;AAChB,mDAAmD;AACnD,uGAAA,UAAU,OAAA;AACV,+GAAA,kBAAkB,OAAA;AAClB,mDAAmD;AACnD,wGAAA,WAAW,OAAA;AACX,8GAAA,iBAAiB,OAAA;AACjB,+GAAA,kBAAkB,OAAA;AAClB,mGAAA,MAAM,OAAA;AACN,mGAAA,MAAM,OAAA;AACN,6GAAA,gBAAgB,OAAA;AAChB,+GAAA,kBAAkB,OAAA;AAClB,2GAAA,cAAc,OAAA;AACd,4GAAA,eAAe,OAAA;AACf,mGAAA,MAAM,OAAA;AACN,4GAAA,eAAe,OAAA;AACf,yGAAA,YAAY,OAAA;AACZ,+GAAA,kBAAkB,OAAA;AAClB,yGAAA,YAAY,OAAA;AACZ,qGAAA,QAAQ,OAAA;AACR,yGAAA,YAAY,OAAA;AACZ,2GAAA,cAAc,OAAA;AACd,qHAAA,wBAAwB,OAAA;AACxB,0GAAA,aAAa,OAAA;AACb,mGAAA,MAAM,OAAA;AACN,4GAAA,eAAe,OAAA;AACf,iGAAA,IAAI,OAAA;AACJ,2HAAA,8BAA8B,OAAA;AAC9B,gHAAA,mBAAmB,OAAA;AACnB,6GAAA,gBAAgB,OAAA;AAChB,kHAAA,qBAAqB,OAAA","sourcesContent":["export {\n Async,\n AutoScroll,\n // eslint-disable-next-line deprecation/deprecation\n BaseComponent,\n Customizations,\n // eslint-disable-next-line deprecation/deprecation\n Customizer,\n CustomizerContext,\n DATA_IS_SCROLLABLE_ATTRIBUTE,\n DATA_PORTAL_ATTRIBUTE,\n DelayedRender,\n EventGroup,\n FabricPerformance,\n FocusRects,\n GlobalSettings,\n IsFocusVisibleClassName,\n KeyCodes,\n Rectangle,\n SELECTION_CHANGE,\n Selection,\n SelectionDirection,\n SelectionMode,\n addDirectionalKeyCode,\n addElementAtIndex,\n allowOverscrollOnElement,\n allowScrollOnElement,\n anchorProperties,\n appendFunction,\n arraysEqual,\n asAsync,\n assertNever,\n assign,\n audioProperties,\n baseElementEvents,\n baseElementProperties,\n buttonProperties,\n calculatePrecision,\n classNamesFunction,\n colGroupProperties,\n colProperties,\n composeComponentAs,\n composeRenderFunction,\n createArray,\n createMemoizer,\n createMergedRef,\n css,\n customizable,\n disableBodyScroll,\n divProperties,\n doesElementContainFocus,\n elementContains,\n elementContainsAttribute,\n enableBodyScroll,\n extendComponent,\n filteredAssign,\n find,\n findElementRecursive,\n findIndex,\n findScrollableParent,\n fitContentToBounds,\n flatten,\n focusAsync,\n focusFirstChild,\n formProperties,\n format,\n getChildren,\n getDistanceBetweenPoints,\n getDocument,\n getElementIndexPath,\n getFirstFocusable,\n getFirstTabbable,\n getFirstVisibleElementFromSelector,\n getFocusableByIndexPath,\n getId,\n getInitials,\n getLanguage,\n getLastFocusable,\n getLastTabbable,\n getNativeElementProps,\n getNativeProps,\n getNextElement,\n getParent,\n getPreviousElement,\n getPropsWithDefaults,\n getRTL,\n getRTLSafeKeyCode,\n getRect,\n // eslint-disable-next-line deprecation/deprecation\n getResourceUrl,\n getScrollbarWidth,\n getVirtualParent,\n getWindow,\n hasHorizontalOverflow,\n hasOverflow,\n hasVerticalOverflow,\n hoistMethods,\n hoistStatics,\n htmlElementProperties,\n iframeProperties,\n // eslint-disable-next-line deprecation/deprecation\n imageProperties,\n imgProperties,\n initializeComponentRef,\n // eslint-disable-next-line deprecation/deprecation\n initializeFocusRects,\n inputProperties,\n isControlled,\n isDirectionalKeyCode,\n isElementFocusSubZone,\n isElementFocusZone,\n isElementTabbable,\n isElementVisible,\n isElementVisibleAndNotHidden,\n isIE11,\n isIOS,\n isMac,\n isVirtualElement,\n labelProperties,\n liProperties,\n mapEnumByName,\n memoize,\n memoizeFunction,\n merge,\n mergeAriaAttributeValues,\n mergeCustomizations,\n mergeScopedSettings,\n mergeSettings,\n modalize,\n nullRender,\n olProperties,\n omit,\n on,\n optionProperties,\n portalContainsElement,\n precisionRound,\n // eslint-disable-next-line deprecation/deprecation\n raiseClick,\n removeIndex,\n replaceElement,\n resetControlledWarnings,\n resetIds,\n resetMemoizations,\n safeRequestAnimationFrame,\n safeSetTimeout,\n selectProperties,\n // eslint-disable-next-line deprecation/deprecation\n setBaseUrl,\n setFocusVisibility,\n // eslint-disable-next-line deprecation/deprecation\n setLanguage,\n setMemoizeWeakMap,\n setPortalAttribute,\n setRTL,\n setSSR,\n setVirtualParent,\n setWarningCallback,\n shallowCompare,\n shouldWrapFocus,\n styled,\n tableProperties,\n tdProperties,\n textAreaProperties,\n thProperties,\n toMatrix,\n trProperties,\n unhoistMethods,\n useCustomizationSettings,\n useFocusRects,\n values,\n videoProperties,\n warn,\n warnConditionallyRequiredProps,\n warnControlledUsage,\n warnDeprecations,\n warnMutuallyExclusive,\n} from '@fluentui/react/lib/Utilities';\nexport type {\n FitMode,\n IAsAsyncOptions,\n IBaseProps,\n ICancelable,\n IChangeDescription,\n IChangeEventCallback,\n // eslint-disable-next-line deprecation/deprecation\n IClassNames,\n IClassNamesFunctionOptions,\n IComponentAs,\n IComponentAsProps,\n ICssInput,\n ICustomizableProps,\n ICustomizations,\n ICustomizerContext,\n ICustomizerProps,\n IDeclaredEventsByName,\n IDelayedRenderProps,\n IDelayedRenderState,\n IDictionary,\n IDisposable,\n IEventRecord,\n IEventRecordList,\n IEventRecordsByName,\n IFitContentToBoundsOptions,\n IObjectWithKey,\n IPerfData,\n IPerfMeasurement,\n IPerfSummary,\n // eslint-disable-next-line deprecation/deprecation\n IPoint,\n IPropsWithStyles,\n IRectangle,\n IRefObject,\n IRenderComponent,\n IRenderFunction,\n ISelection,\n ISelectionOptions,\n ISelectionOptionsWithRequiredGetKey,\n ISerializableObject,\n ISettings,\n ISettingsFunction,\n ISettingsMap,\n ISize,\n IStyleFunction,\n IStyleFunctionOrObject,\n IVirtualElement,\n IWarnControlledUsageParams,\n // eslint-disable-next-line deprecation/deprecation\n Omit,\n Point,\n RefObject,\n // eslint-disable-next-line deprecation/deprecation\n Settings,\n // eslint-disable-next-line deprecation/deprecation\n SettingsFunction,\n StyleFunction,\n} from '@fluentui/react/lib/Utilities';\n"]}
1
+ {"version":3,"file":"Utilities.js","sourceRoot":"../src/","sources":["Utilities.ts"],"names":[],"mappings":";;;;;;AAAA,2DAkLuC;AAjLrC,kGAAA,KAAK,OAAA;AACL,uGAAA,UAAU,OAAA;AACV,mDAAmD;AACnD,0GAAA,aAAa,OAAA;AACb,2GAAA,cAAc,OAAA;AACd,mDAAmD;AACnD,uGAAA,UAAU,OAAA;AACV,8GAAA,iBAAiB,OAAA;AACjB,yHAAA,4BAA4B,OAAA;AAC5B,kHAAA,qBAAqB,OAAA;AACrB,0GAAA,aAAa,OAAA;AACb,uGAAA,UAAU,OAAA;AACV,8GAAA,iBAAiB,OAAA;AACjB,uGAAA,UAAU,OAAA;AACV,2GAAA,cAAc,OAAA;AACd,oHAAA,uBAAuB,OAAA;AACvB,qGAAA,QAAQ,OAAA;AACR,sGAAA,SAAS,OAAA;AACT,6GAAA,gBAAgB,OAAA;AAChB,sGAAA,SAAS,OAAA;AACT,+GAAA,kBAAkB,OAAA;AAClB,0GAAA,aAAa,OAAA;AACb,kHAAA,qBAAqB,OAAA;AACrB,8GAAA,iBAAiB,OAAA;AACjB,qHAAA,wBAAwB,OAAA;AACxB,iHAAA,oBAAoB,OAAA;AACpB,6GAAA,gBAAgB,OAAA;AAChB,2GAAA,cAAc,OAAA;AACd,wGAAA,WAAW,OAAA;AACX,oGAAA,OAAO,OAAA;AACP,wGAAA,WAAW,OAAA;AACX,mGAAA,MAAM,OAAA;AACN,4GAAA,eAAe,OAAA;AACf,8GAAA,iBAAiB,OAAA;AACjB,kHAAA,qBAAqB,OAAA;AACrB,6GAAA,gBAAgB,OAAA;AAChB,+GAAA,kBAAkB,OAAA;AAClB,sGAA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AA,qBAAqB,OAAA;AACrB,2GAAA,cAAc,OAAA;AACd,mDAAmD;AACnD,uGAAA,UAAU,OAAA;AACV,wGAAA,WAAW,OAAA;AACX,2GAAA,cAAc,OAAA;AACd,oHAAA,uBAAuB,OAAA;AACvB,qGAAA,QAAQ,OAAA;AACR,8GAAA,iBAAiB,OAAA;AACjB,sHAAA,yBAAyB,OAAA;AACzB,2GAAA,cAAc,OAAA;AACd,6GAAA,gBAAgB,OAAA;AAChB,mDAAmD;AACnD,uGAAA,UAAU,OAAA;AACV,+GAAA,kBAAkB,OAAA;AAClB,mDAAmD;AACnD,wGAAA,WAAW,OAAA;AACX,8GAAA,iBAAiB,OAAA;AACjB,+GAAA,kBAAkB,OAAA;AAClB,mGAAA,MAAM,OAAA;AACN,mDAAmD;AACnD,mGAAA,MAAM,OAAA;AACN,6GAAA,gBAAgB,OAAA;AAChB,+GAAA,kBAAkB,OAAA;AAClB,2GAAA,cAAc,OAAA;AACd,4GAAA,eAAe,OAAA;AACf,mGAAA,MAAM,OAAA;AACN,4GAAA,eAAe,OAAA;AACf,yGAAA,YAAY,OAAA;AACZ,+GAAA,kBAAkB,OAAA;AAClB,yGAAA,YAAY,OAAA;AACZ,qGAAA,QAAQ,OAAA;AACR,yGAAA,YAAY,OAAA;AACZ,2GAAA,cAAc,OAAA;AACd,qHAAA,wBAAwB,OAAA;AACxB,0GAAA,aAAa,OAAA;AACb,mGAAA,MAAM,OAAA;AACN,4GAAA,eAAe,OAAA;AACf,iGAAA,IAAI,OAAA;AACJ,2HAAA,8BAA8B,OAAA;AAC9B,gHAAA,mBAAmB,OAAA;AACnB,6GAAA,gBAAgB,OAAA;AAChB,kHAAA,qBAAqB,OAAA","sourcesContent":["export {\n Async,\n AutoScroll,\n // eslint-disable-next-line deprecation/deprecation\n BaseComponent,\n Customizations,\n // eslint-disable-next-line deprecation/deprecation\n Customizer,\n CustomizerContext,\n DATA_IS_SCROLLABLE_ATTRIBUTE,\n DATA_PORTAL_ATTRIBUTE,\n DelayedRender,\n EventGroup,\n FabricPerformance,\n FocusRects,\n GlobalSettings,\n IsFocusVisibleClassName,\n KeyCodes,\n Rectangle,\n SELECTION_CHANGE,\n Selection,\n SelectionDirection,\n SelectionMode,\n addDirectionalKeyCode,\n addElementAtIndex,\n allowOverscrollOnElement,\n allowScrollOnElement,\n anchorProperties,\n appendFunction,\n arraysEqual,\n asAsync,\n assertNever,\n assign,\n audioProperties,\n baseElementEvents,\n baseElementProperties,\n buttonProperties,\n calculatePrecision,\n canUseDOM,\n classNamesFunction,\n colGroupProperties,\n colProperties,\n composeComponentAs,\n composeRenderFunction,\n createArray,\n createMemoizer,\n createMergedRef,\n css,\n customizable,\n disableBodyScroll,\n divProperties,\n doesElementContainFocus,\n elementContains,\n elementContainsAttribute,\n enableBodyScroll,\n extendComponent,\n filteredAssign,\n find,\n findElementRecursive,\n findIndex,\n findScrollableParent,\n fitContentToBounds,\n flatten,\n focusAsync,\n focusFirstChild,\n formProperties,\n format,\n getChildren,\n getDistanceBetweenPoints,\n getDocument,\n getElementIndexPath,\n getFirstFocusable,\n getFirstTabbable,\n getFirstVisibleElementFromSelector,\n getFocusableByIndexPath,\n getId,\n getInitials,\n getLanguage,\n getLastFocusable,\n getLastTabbable,\n getNativeElementProps,\n getNativeProps,\n getNextElement,\n getParent,\n getPreviousElement,\n getPropsWithDefaults,\n getRTL,\n getRTLSafeKeyCode,\n getRect,\n // eslint-disable-next-line deprecation/deprecation\n getResourceUrl,\n getScrollbarWidth,\n getVirtualParent,\n getWindow,\n hasHorizontalOverflow,\n hasOverflow,\n hasVerticalOverflow,\n hoistMethods,\n hoistStatics,\n htmlElementProperties,\n iframeProperties,\n // eslint-disable-next-line deprecation/deprecation\n imageProperties,\n imgProperties,\n initializeComponentRef,\n // eslint-disable-next-line deprecation/deprecation\n initializeFocusRects,\n inputProperties,\n isControlled,\n isDirectionalKeyCode,\n isElementFocusSubZone,\n isElementFocusZone,\n isElementTabbable,\n isElementVisible,\n isElementVisibleAndNotHidden,\n isIE11,\n isIOS,\n isMac,\n isVirtualElement,\n labelProperties,\n liProperties,\n mapEnumByName,\n memoize,\n memoizeFunction,\n merge,\n mergeAriaAttributeValues,\n mergeCustomizations,\n mergeScopedSettings,\n mergeSettings,\n modalize,\n nullRender,\n olProperties,\n omit,\n on,\n optionProperties,\n portalContainsElement,\n precisionRound,\n // eslint-disable-next-line deprecation/deprecation\n raiseClick,\n removeIndex,\n replaceElement,\n resetControlledWarnings,\n resetIds,\n resetMemoizations,\n safeRequestAnimationFrame,\n safeSetTimeout,\n selectProperties,\n // eslint-disable-next-line deprecation/deprecation\n setBaseUrl,\n setFocusVisibility,\n // eslint-disable-next-line deprecation/deprecation\n setLanguage,\n setMemoizeWeakMap,\n setPortalAttribute,\n setRTL,\n // eslint-disable-next-line deprecation/deprecation\n setSSR,\n setVirtualParent,\n setWarningCallback,\n shallowCompare,\n shouldWrapFocus,\n styled,\n tableProperties,\n tdProperties,\n textAreaProperties,\n thProperties,\n toMatrix,\n trProperties,\n unhoistMethods,\n useCustomizationSettings,\n useFocusRects,\n values,\n videoProperties,\n warn,\n warnConditionallyRequiredProps,\n warnControlledUsage,\n warnDeprecations,\n warnMutuallyExclusive,\n} from '@fluentui/react/lib/Utilities';\nexport type {\n FitMode,\n IAsAsyncOptions,\n IBaseProps,\n ICancelable,\n IChangeDescription,\n IChangeEventCallback,\n // eslint-disable-next-line deprecation/deprecation\n IClassNames,\n IClassNamesFunctionOptions,\n IComponentAs,\n IComponentAsProps,\n ICssInput,\n ICustomizableProps,\n ICustomizations,\n ICustomizerContext,\n ICustomizerProps,\n IDeclaredEventsByName,\n IDelayedRenderProps,\n IDelayedRenderState,\n IDictionary,\n IDisposable,\n IEventRecord,\n IEventRecordList,\n IEventRecordsByName,\n IFitContentToBoundsOptions,\n IObjectWithKey,\n IPerfData,\n IPerfMeasurement,\n IPerfSummary,\n // eslint-disable-next-line deprecation/deprecation\n IPoint,\n IPropsWithStyles,\n IRectangle,\n IRefObject,\n IRenderComponent,\n IRenderFunction,\n ISelection,\n ISelectionOptions,\n ISelectionOptionsWithRequiredGetKey,\n ISerializableObject,\n ISettings,\n ISettingsFunction,\n ISettingsMap,\n ISize,\n IStyleFunction,\n IStyleFunctionOrObject,\n IVirtualElement,\n IWarnControlledUsageParams,\n // eslint-disable-next-line deprecation/deprecation\n Omit,\n Point,\n RefObject,\n // eslint-disable-next-line deprecation/deprecation\n Settings,\n // eslint-disable-next-line deprecation/deprecation\n SettingsFunction,\n StyleFunction,\n} from '@fluentui/react/lib/Utilities';\n"]}
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { ITreeProps, ITreeState } from '../../index';
3
+ export declare class TreeChartBase extends React.Component<ITreeProps, ITreeState> {
4
+ private _treeData;
5
+ private _width;
6
+ private _height;
7
+ private _composition;
8
+ private _classNames;
9
+ private _rootElem;
10
+ private _margin;
11
+ private _nodeElements;
12
+ private _linkElements;
13
+ private _treeTraversal;
14
+ constructor(props: ITreeProps);
15
+ componentDidMount(): void;
16
+ createTreeChart(): void;
17
+ render(): JSX.Element;
18
+ }
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TreeChartBase = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var React = require("react");
6
+ var d3_selection_1 = require("d3-selection");
7
+ var d3_hierarchy_1 = require("d3-hierarchy");
8
+ var Utilities_1 = require("@fluentui/react/lib-commonjs/Utilities");
9
+ var react_focus_1 = require("@fluentui/react-focus");
10
+ var getClassNames = Utilities_1.classNamesFunction();
11
+ // Create a parent class for common tree components
12
+ var StandardTree = /** @class */ (function () {
13
+ function StandardTree(treeData, styleClassNames, _nodeElements, _linkElements) {
14
+ if (_nodeElements === void 0) { _nodeElements = []; }
15
+ if (_linkElements === void 0) { _linkElements = []; }
16
+ this._nodeElements = [];
17
+ this._linkElements = [];
18
+ this.treeData = treeData;
19
+ this.styleClassNames = styleClassNames;
20
+ this._nodeElements = _nodeElements;
21
+ this._linkElements = _linkElements;
22
+ }
23
+ // Append node elements
24
+ // nodeId to create unique key
25
+ StandardTree.prototype.addNodeShapetoSVG = function (name, subname, metricName, xCoordinate, yCoordinate, fillColor, rectangleWidth, rectangleHeight, nodeId, parentInfo) {
26
+ var ariaLabel = "nodeId: " + nodeId + " \nnodeMainText: " + name + "\nsubText " + subname + " " + parentInfo;
27
+ this._nodeElements.push(React.createElement("rect", { width: rectangleWidth, height: rectangleHeight, x: xCoordinate, y: yCoordinate, tabIndex: 0, role: 'text', "data-is-focusable": true, "aria-label": ariaLabel, className: this.styleClassNames.rectNode, stroke: fillColor, key: "" + nodeId + this.styleClassNames.rectNode }));
28
+ // Text position y = y + rectHeight/2, 2 is ratio for depth
29
+ // Text position x = x + rectWidth/2, 2 is ratio for length
30
+ // Sub-text position x = x + rectWidth/2, 2 is ratio for length
31
+ var subValue = metricName !== undefined ? (React.createElement("tspan", { className: this.styleClassNames.rectmetricText, dy: "1.4em", x: xCoordinate + rectangleWidth / 2 }, metricName)) : (React.createElement("tspan", { className: this.styleClassNames.rectSubText, dy: "1.4em", x: xCoordinate + rectangleWidth / 2 }, subname));
32
+ this._nodeElements.push(React.createElement("text", { textAnchor: "middle", className: metricName !== undefined ? this.styleClassNames.rectSubText : this.styleClassNames.rectText, dy: metricName !== undefined ? yCoordinate + rectangleHeight / 2.5 : yCoordinate + rectangleHeight / 2, x: xCoordinate + rectangleWidth / 2, key: "" + nodeId + this.styleClassNames.rectText },
33
+ name,
34
+ subValue));
35
+ };
36
+ // Create a rectangular path from parent to the child nodes
37
+ StandardTree.prototype.createPathLink = function (parentX, parentY, childX, childY, leaf, rectWidth, rectHeight, gap) {
38
+ // gap adds ratio for parent.y to child.y
39
+ var path = "M" + (childX + rectWidth / 2) + "," + (childY - gap) + " H" + (parentX + rectWidth / 2) + " V" + (parentY + rectHeight + gap / 2);
40
+ var leafpath = "M" + (parentX + rectWidth / 2) + "," + (parentY + rectHeight + gap / 2) + " V" + (parentY + gap * 5) + " H" + parentX + " H" + (parentX + rectWidth);
41
+ // based on the type of node return leafpath or path element
42
+ return leaf ? leafpath : path;
43
+ };
44
+ // Append path link element
45
+ StandardTree.prototype.addLinktoSVG = function (nodeId, parentX, parentY, childX, childY, leaf, rectWidth, rectHeight, gap) {
46
+ this._linkElements.push(React.createElement("path", { className: this.styleClassNames.link, d: this.createPathLink(parentX, parentY, childX, childY, leaf, rectWidth, rectHeight, gap), key: "" + nodeId + this.styleClassNames.link }));
47
+ };
48
+ return StandardTree;
49
+ }());
50
+ // Create child class to Add Tree component based on treeHeight
51
+ var LayeredTree = /** @class */ (function (_super) {
52
+ tslib_1.__extends(LayeredTree, _super);
53
+ function LayeredTree(treeData, composition, styleClassNames, _nodeElements, _linkElements, _treeTraversal) {
54
+ if (_nodeElements === void 0) { _nodeElements = []; }
55
+ if (_linkElements === void 0) { _linkElements = []; }
56
+ var _this = _super.call(this, treeData, styleClassNames, _nodeElements, _linkElements) || this;
57
+ _this.composition = composition;
58
+ _this._treeTraversal = _treeTraversal;
59
+ return _this;
60
+ }
61
+ LayeredTree.prototype.createTree = function () {
62
+ var _a, _b, _c, _d;
63
+ var root = d3_hierarchy_1.hierarchy(this.treeData, function (d) {
64
+ return d.children;
65
+ });
66
+ // Find tree Height
67
+ var treeHeight = (root === null || root === void 0 ? void 0 : root.height) + 1;
68
+ // Create tree layout, width: 70, height: 90 and add node separation
69
+ var treemap = d3_hierarchy_1.tree()
70
+ .nodeSize([75, 50])
71
+ .separation(function (a, b) {
72
+ return a.parent === root && b.parent === root ? 3.5 : 1;
73
+ });
74
+ // Assigns the x and y position for the nodes
75
+ var treeData = treemap(root);
76
+ // Compute the new tree layout.
77
+ var nodes = treeData.descendants();
78
+ // Normalize for fixed-depth and width
79
+ // Normalise y coordinate by depth of each node by a factor of 130
80
+ // Normalise x coordinate by start coordinate 0 with 450
81
+ nodes.forEach(function (d) {
82
+ d.y = d.depth === 0 ? 10 : d.depth * 130;
83
+ d.x += 400;
84
+ });
85
+ // <------------------ Traversal section ------------------>
86
+ // Create tree data structure
87
+ var treeDataStructure = [];
88
+ var TreeID = 0;
89
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
90
+ var createTreeDataStructure = function (d) {
91
+ var _a, _b;
92
+ d.id = TreeID;
93
+ treeDataStructure.push({
94
+ id: TreeID,
95
+ children: d.children,
96
+ dataName: d.data.name,
97
+ subName: d.data.subname,
98
+ metricName: (_a = d.data) === null || _a === void 0 ? void 0 : _a.metric,
99
+ fill: d.data.fill,
100
+ x: d.x,
101
+ y: d.y,
102
+ parentID: (_b = d.parent) === null || _b === void 0 ? void 0 : _b.id,
103
+ });
104
+ TreeID++;
105
+ };
106
+ this._treeTraversal === 0
107
+ ? root.each(function (d) {
108
+ createTreeDataStructure(d);
109
+ })
110
+ : root.eachBefore(function (d) {
111
+ createTreeDataStructure(d);
112
+ });
113
+ var rectHeight = 70;
114
+ var rectWidth = 220;
115
+ var gap = 20;
116
+ var parentSet = new Set();
117
+ for (var _i = 0, treeDataStructure_1 = treeDataStructure; _i < treeDataStructure_1.length; _i++) {
118
+ var d = treeDataStructure_1[_i];
119
+ var parentInfo = d.id === 0
120
+ ? 'Root Node'
121
+ : "Parent info parentId: " + d.parentID + "\n " + treeDataStructure[d.parentID].dataName + "\n " + treeDataStructure[d.parentID].subName;
122
+ // check for leaf nodes
123
+ if (!d.children && !parentSet.has(d.parentID) && treeHeight === 3) {
124
+ var newWidth = (rectWidth - gap) / 2;
125
+ var newHeight = 70;
126
+ parentSet.add(d.parentID);
127
+ // <------------------ Links section ------------------>
128
+ this.addLinktoSVG(d.id, treeDataStructure[d.parentID].x, treeDataStructure[d.parentID].y, treeDataStructure[d.id].x, treeDataStructure[d.id].y, true, rectWidth, rectHeight, gap);
129
+ // <------------------ Nodes section ------------------>
130
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
131
+ var children = (_a = treeDataStructure[d.parentID]) === null || _a === void 0 ? void 0 : _a.children;
132
+ var dx1 = (_b = treeDataStructure[d.parentID]) === null || _b === void 0 ? void 0 : _b.x;
133
+ var dx2 = ((_c = treeDataStructure[d.parentID]) === null || _c === void 0 ? void 0 : _c.x) + newWidth + gap;
134
+ var dy = (_d = children[0]) === null || _d === void 0 ? void 0 : _d.y;
135
+ for (var itr = 0; itr < children.length; ++itr) {
136
+ var child = children[itr];
137
+ // Given Composition
138
+ if (this.composition !== undefined) {
139
+ // For compact compostion
140
+ if (this.composition === 0) {
141
+ this.addNodeShapetoSVG(child.data.name, child.data.subname, child.data.metricName, itr % 2 === 0 ? dx1 : dx2, dy, child.data.fill, children.length === 1 ? rectWidth : newWidth, rectHeight, child.id, parentInfo);
142
+ if (itr % 2 === 1) {
143
+ dy += newHeight + gap;
144
+ }
145
+ }
146
+ // For long compostion
147
+ else {
148
+ this.addNodeShapetoSVG(child.data.name, child.data.subname, child.data.metricName, dx1, dy, child.data.fill, rectWidth, rectHeight, child.id, parentInfo);
149
+ dy += newHeight + gap;
150
+ }
151
+ }
152
+ // Automatic Node Composition
153
+ else {
154
+ if (children.length > 2) {
155
+ this.addNodeShapetoSVG(child.data.name, child.data.subname, child.data.metricName, itr % 2 === 0 ? dx1 : dx2, dy, child.data.fill, children.length === 1 ? rectWidth : newWidth, rectHeight, child.id, parentInfo);
156
+ if (itr % 2 === 1) {
157
+ dy += newHeight + gap;
158
+ }
159
+ }
160
+ else {
161
+ this.addNodeShapetoSVG(child.data.name, child.data.subname, child.data.metricName, dx1, dy, child.data.fill, rectWidth, rectHeight, child.id, parentInfo);
162
+ dy += newHeight + gap;
163
+ }
164
+ }
165
+ }
166
+ }
167
+ if (d.children || treeHeight <= 2) {
168
+ // <------------------ Nodes section ------------------>
169
+ this.addNodeShapetoSVG(d.dataName, d.subName, d.metricName, d.x, d.y, d.fill, rectWidth, rectHeight, d.id, parentInfo);
170
+ // <------------------ Links section ------------------>
171
+ if (d.id !== 0) {
172
+ this.addLinktoSVG(d.id, treeDataStructure[d.parentID].x, treeDataStructure[d.parentID].y, treeDataStructure[d.id].x, treeDataStructure[d.id].y, false, rectWidth, rectHeight, gap);
173
+ }
174
+ }
175
+ }
176
+ };
177
+ return LayeredTree;
178
+ }(StandardTree));
179
+ var TreeChartBase = /** @class */ (function (_super) {
180
+ tslib_1.__extends(TreeChartBase, _super);
181
+ function TreeChartBase(props) {
182
+ var _a;
183
+ var _this = _super.call(this, props) || this;
184
+ _this._nodeElements = [];
185
+ _this._linkElements = [];
186
+ _this._margin = { top: 30, right: 20, bottom: 30, left: 50 };
187
+ _this._width = _this.props.width || 1200;
188
+ _this._height = _this.props.height || 700;
189
+ _this._treeData = _this.props.treeData;
190
+ _this._composition = (_a = _this.props) === null || _a === void 0 ? void 0 : _a.composition;
191
+ _this._treeTraversal = _this.props.treeTraversal;
192
+ _this.state = {
193
+ _width: _this._width || 1000,
194
+ _height: _this._height || 700,
195
+ };
196
+ return _this;
197
+ }
198
+ TreeChartBase.prototype.componentDidMount = function () {
199
+ var _a = this.props, theme = _a.theme, className = _a.className, styles = _a.styles;
200
+ // Get classNames to create component styling
201
+ this._classNames = getClassNames(styles, {
202
+ theme: theme,
203
+ className: className,
204
+ });
205
+ // Call createTreeChart function in componentDidMount
206
+ this.createTreeChart();
207
+ var reducedHeight = this._rootElem && this._rootElem.offsetHeight / 5;
208
+ this.setState({
209
+ _width: (this._rootElem && this._rootElem.offsetWidth),
210
+ _height: (this._rootElem && this._rootElem.offsetHeight - reducedHeight),
211
+ });
212
+ };
213
+ TreeChartBase.prototype.createTreeChart = function () {
214
+ var svg = d3_selection_1.select('.svgTree');
215
+ // Set SVG width and height
216
+ svg
217
+ .attr('width', this.state._width - this._margin.left - this._margin.right)
218
+ .attr('height', this.state._height - this._margin.top - this._margin.bottom);
219
+ // Create styleClass object to access it in parent class
220
+ var styleClassNames = {
221
+ link: this._classNames.link,
222
+ rectNode: this._classNames.rectNode,
223
+ rectText: this._classNames.rectText,
224
+ rectSubText: this._classNames.rectSubText,
225
+ rectmetricText: this._classNames.rectMetricText,
226
+ };
227
+ // Instantiate inherited class and call createTree function for the object
228
+ var treeObject = new LayeredTree(this._treeData, this._composition, styleClassNames, this._nodeElements, this._linkElements, this._treeTraversal);
229
+ treeObject.createTree();
230
+ };
231
+ TreeChartBase.prototype.render = function () {
232
+ var _this = this;
233
+ return (React.createElement(react_focus_1.FocusZone, null,
234
+ React.createElement("div", { className: "svgTreeDiv", ref: function (rootElem) { return (_this._rootElem = rootElem); } },
235
+ React.createElement("svg", { className: "svgTree" },
236
+ React.createElement("g", { className: "svgNode" }, this._nodeElements.map(function (element) { return element; })),
237
+ React.createElement("g", { className: "svgLink" }, this._linkElements.map(function (element) { return element; }))))));
238
+ };
239
+ return TreeChartBase;
240
+ }(React.Component));
241
+ exports.TreeChartBase = TreeChartBase;
242
+ //# sourceMappingURL=TreeChart.base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeChart.base.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,6CAAsC;AACtC,6CAA+C;AAC/C,2DAAmE;AAEnE,qDAAkD;AAWlD,IAAM,aAAa,GAAG,8BAAkB,EAAgC,CAAC;AAEzE,mDAAmD;AACnD;IAaE,sBACE,QAA6B,EAC7B,eAAkH,EAClH,aAA0F,EAC1F,aAAyD;QADzD,8BAAA,EAAA,kBAA0F;QAC1F,8BAAA,EAAA,kBAAyD;QAPnD,kBAAa,GAA2E,EAAE,CAAC;QAC3F,kBAAa,GAA0C,EAAE,CAAC;QAQhE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,uBAAuB;IACvB,8BAA8B;IACvB,wCAAiB,GAAxB,UACE,IAAY,EACZ,OAAe,EACf,UAA8B,EAC9B,WAAmB,EACnB,WA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 'd3-selection';\nimport { hierarchy, tree } from 'd3-hierarchy';\nimport { classNamesFunction } from '@fluentui/react/lib/Utilities';\nimport { IProcessedStyleSet } from '@fluentui/react/lib/Styling';\nimport { FocusZone } from '@fluentui/react-focus';\n\nimport {\n ITreeProps,\n ITreeState,\n ITreeDataStructure,\n ITreeChartDataPoint,\n ITreeStyleProps,\n ITreeStyles,\n} from '../../index';\n\nconst getClassNames = classNamesFunction<ITreeStyleProps, ITreeStyles>();\n\n// Create a parent class for common tree components\nclass StandardTree {\n public treeData: ITreeChartDataPoint;\n public styleClassNames: {\n rectmetricText: string | undefined;\n rectSubText: string | undefined;\n link: string;\n rectNode: string;\n rectText: string;\n };\n\n private _nodeElements: Array<React.SVGProps<SVGRectElement> | React.SVGProps<SVGTextElement>> = [];\n private _linkElements: Array<React.SVGProps<SVGPathElement>> = [];\n\n constructor(\n treeData: ITreeChartDataPoint,\n styleClassNames: { link: string; rectNode: string; rectText: string; rectSubText: string; rectmetricText: string },\n _nodeElements: Array<React.SVGProps<SVGRectElement> | React.SVGProps<SVGTextElement>> = [],\n _linkElements: Array<React.SVGProps<SVGPathElement>> = [],\n ) {\n this.treeData = treeData;\n this.styleClassNames = styleClassNames;\n this._nodeElements = _nodeElements;\n this._linkElements = _linkElements;\n }\n\n // Append node elements\n // nodeId to create unique key\n public addNodeShapetoSVG(\n name: string,\n subname: string,\n metricName: string | undefined,\n xCoordinate: number,\n yCoordinate: number,\n fillColor: string,\n rectangleWidth: number,\n rectangleHeight: number,\n nodeId: number,\n parentInfo: string,\n ) {\n const ariaLabel = `nodeId: ${nodeId} \\nnodeMainText: ${name}\\nsubText ${subname} ${parentInfo}`;\n this._nodeElements.push(\n <rect\n width={rectangleWidth}\n height={rectangleHeight}\n x={xCoordinate}\n y={yCoordinate}\n tabIndex={0}\n role={'text'}\n data-is-focusable={true}\n aria-label={ariaLabel}\n className={this.styleClassNames.rectNode}\n stroke={fillColor}\n key={`${nodeId}${this.styleClassNames.rectNode}`}\n />,\n );\n\n // Text position y = y + rectHeight/2, 2 is ratio for depth\n // Text position x = x + rectWidth/2, 2 is ratio for length\n // Sub-text position x = x + rectWidth/2, 2 is ratio for length\n\n const subValue =\n metricName !== undefined ? (\n <tspan className={this.styleClassNames.rectmetricText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {metricName}\n </tspan>\n ) : (\n <tspan className={this.styleClassNames.rectSubText} dy=\"1.4em\" x={xCoordinate + rectangleWidth / 2}>\n {subname}\n </tspan>\n );\n\n this._nodeElements.push(\n <text\n textAnchor=\"middle\"\n className={metricName !== undefined ? this.styleClassNames.rectSubText : this.styleClassNames.rectText}\n dy={metricName !== undefined ? yCoordinate + rectangleHeight / 2.5 : yCoordinate + rectangleHeight / 2}\n x={xCoordinate + rectangleWidth / 2}\n key={`${nodeId}${this.styleClassNames.rectText}`}\n >\n {name}\n {subValue}\n </text>,\n );\n }\n\n // Create a rectangular path from parent to the child nodes\n public createPathLink(\n parentX: number,\n parentY: number,\n childX: number,\n childY: number,\n leaf: boolean,\n rectWidth: number,\n rectHeight: number,\n gap: number,\n ): string {\n // gap adds ratio for parent.y to child.y\n const path = `M${childX + rectWidth / 2},${childY - gap} H${parentX + rectWidth / 2} V${\n parentY + rectHeight + gap / 2\n }`;\n const leafpath = `M${parentX + rectWidth / 2},${parentY + rectHeight + gap / 2} V${\n parentY + gap * 5\n } H${parentX} H${parentX + rectWidth}`;\n\n // based on the type of node return leafpath or path element\n return leaf ? leafpath : path;\n }\n\n // Append path link element\n public addLinktoSVG(\n nodeId: number,\n parentX: number,\n parentY: number,\n childX: number,\n childY: number,\n leaf: boolean,\n rectWidth: number,\n rectHeight: number,\n gap: number,\n ) {\n this._linkElements.push(\n <path\n className={this.styleClassNames.link}\n d={this.createPathLink(parentX, parentY, childX, childY, leaf, rectWidth, rectHeight, gap)}\n key={`${nodeId}${this.styleClassNames.link}`}\n />,\n );\n }\n}\n\n// Create child class to Add Tree component based on treeHeight\nclass LayeredTree extends StandardTree {\n public composition: number | undefined;\n private _treeTraversal: number | undefined;\n constructor(\n treeData: ITreeChartDataPoint,\n composition: number | undefined,\n styleClassNames: { link: string; rectNode: string; rectText: string; rectSubText: string; rectmetricText: string },\n _nodeElements: Array<React.SVGProps<SVGRectElement> | React.SVGProps<SVGTextElement>> = [],\n _linkElements: Array<React.SVGProps<SVGPathElement>> = [],\n _treeTraversal: number | undefined,\n ) {\n super(treeData, styleClassNames, _nodeElements, _linkElements);\n this.composition = composition;\n this._treeTraversal = _treeTraversal;\n }\n public createTree() {\n const root = hierarchy(this.treeData, d => {\n return d.children;\n });\n\n // Find tree Height\n const treeHeight = root?.height + 1;\n\n // Create tree layout, width: 70, height: 90 and add node separation\n const treemap = tree()\n .nodeSize([75, 50])\n .separation((a, b) => {\n return a.parent === root && b.parent === root ? 3.5 : 1;\n });\n\n // Assigns the x and y position for the nodes\n const treeData = treemap(root);\n\n // Compute the new tree layout.\n const nodes = treeData.descendants();\n\n // Normalize for fixed-depth and width\n // Normalise y coordinate by depth of each node by a factor of 130\n // Normalise x coordinate by start coordinate 0 with 450\n nodes.forEach(d => {\n d.y = d.depth === 0 ? 10 : d.depth * 130;\n d.x += 400;\n });\n\n // <------------------ Traversal section ------------------>\n\n // Create tree data structure\n const treeDataStructure: Array<ITreeDataStructure> = [];\n let TreeID: number = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const createTreeDataStructure = (d: any) => {\n d.id = TreeID;\n treeDataStructure.push({\n id: TreeID,\n children: d.children,\n dataName: d.data.name,\n subName: d.data.subname,\n metricName: d.data?.metric,\n fill: d.data.fill,\n x: d.x,\n y: d.y,\n parentID: d.parent?.id,\n });\n TreeID++;\n };\n\n this._treeTraversal === 0\n ? root.each(d => {\n createTreeDataStructure(d);\n })\n : root.eachBefore(d => {\n createTreeDataStructure(d);\n });\n\n const rectHeight = 70;\n const rectWidth = 220;\n const gap: number = 20;\n const parentSet = new Set();\n\n for (const d of treeDataStructure) {\n const parentInfo =\n d.id === 0\n ? 'Root Node'\n : `Parent info parentId: ${d.parentID}\n ${treeDataStructure[d.parentID].dataName}\n ${treeDataStructure[d.parentID].subName}`;\n\n // check for leaf nodes\n if (!d.children && !parentSet.has(d.parentID) && treeHeight === 3) {\n const newWidth = (rectWidth - gap) / 2;\n const newHeight = 70;\n parentSet.add(d.parentID);\n\n // <------------------ Links section ------------------>\n this.addLinktoSVG(\n d.id,\n treeDataStructure[d.parentID].x,\n treeDataStructure[d.parentID].y,\n treeDataStructure[d.id].x,\n treeDataStructure[d.id].y,\n true,\n rectWidth,\n rectHeight,\n gap,\n );\n\n // <------------------ Nodes section ------------------>\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const children: any = treeDataStructure[d.parentID]?.children;\n\n const dx1: number = treeDataStructure[d.parentID]?.x;\n const dx2: number = treeDataStructure[d.parentID]?.x + newWidth + gap;\n let dy: number = children[0]?.y;\n\n for (let itr = 0; itr < children.length; ++itr) {\n const child = children[itr];\n\n // Given Composition\n if (this.composition !== undefined) {\n // For compact compostion\n if (this.composition === 0) {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.metricName,\n itr % 2 === 0 ? dx1 : dx2,\n dy,\n child.data.fill,\n children.length === 1 ? rectWidth : newWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n if (itr % 2 === 1) {\n dy += newHeight + gap;\n }\n }\n // For long compostion\n else {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.metricName,\n dx1,\n dy,\n child.data.fill,\n rectWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n dy += newHeight + gap;\n }\n }\n\n // Automatic Node Composition\n else {\n if (children.length > 2) {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.metricName,\n itr % 2 === 0 ? dx1 : dx2,\n dy,\n child.data.fill,\n children.length === 1 ? rectWidth : newWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n if (itr % 2 === 1) {\n dy += newHeight + gap;\n }\n } else {\n this.addNodeShapetoSVG(\n child.data.name,\n child.data.subname,\n child.data.metricName,\n dx1,\n dy,\n child.data.fill,\n rectWidth,\n rectHeight,\n child.id,\n parentInfo,\n );\n dy += newHeight + gap;\n }\n }\n }\n }\n\n if (d.children || treeHeight <= 2) {\n // <------------------ Nodes section ------------------>\n this.addNodeShapetoSVG(\n d.dataName,\n d.subName,\n d.metricName,\n d.x,\n d.y,\n d.fill,\n rectWidth,\n rectHeight,\n d.id,\n parentInfo,\n );\n\n // <------------------ Links section ------------------>\n if (d.id !== 0) {\n this.addLinktoSVG(\n d.id,\n treeDataStructure[d.parentID].x,\n treeDataStructure[d.parentID].y,\n treeDataStructure[d.id].x,\n treeDataStructure[d.id].y,\n false,\n rectWidth,\n rectHeight,\n gap,\n );\n }\n }\n }\n }\n}\n\nexport class TreeChartBase extends React.Component<ITreeProps, ITreeState> {\n private _treeData: ITreeChartDataPoint;\n private _width: number | undefined;\n private _height: number | undefined;\n private _composition: number | undefined;\n private _classNames: IProcessedStyleSet<ITreeStyles>;\n private _rootElem: HTMLElement | null;\n private _margin: { left: number; right: number; top: number; bottom: number };\n private _nodeElements: Array<React.SVGProps<SVGRectElement> | React.SVGProps<SVGTextElement>> = [];\n private _linkElements: Array<React.SVGProps<SVGPathElement>> = [];\n private _treeTraversal: number | undefined;\n\n constructor(props: ITreeProps) {\n super(props);\n this._margin = { top: 30, right: 20, bottom: 30, left: 50 };\n this._width = this.props.width || 1200;\n this._height = this.props.height || 700;\n this._treeData = this.props.treeData;\n this._composition = this.props?.composition;\n this._treeTraversal = this.props.treeTraversal;\n\n this.state = {\n _width: this._width || 1000,\n _height: this._height || 700,\n };\n }\n\n public componentDidMount() {\n const { theme, className, styles } = this.props;\n // Get classNames to create component styling\n this._classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n });\n // Call createTreeChart function in componentDidMount\n this.createTreeChart();\n const reducedHeight = this._rootElem && this._rootElem.offsetHeight / 5;\n this.setState({\n _width: (this._rootElem && this._rootElem!.offsetWidth)!,\n _height: (this._rootElem && this._rootElem!.offsetHeight - reducedHeight!)!,\n });\n }\n\n public createTreeChart() {\n const svg = select('.svgTree');\n\n // Set SVG width and height\n svg\n .attr('width', this.state._width - this._margin.left - this._margin.right)\n .attr('height', this.state._height - this._margin.top - this._margin.bottom);\n\n // Create styleClass object to access it in parent class\n const styleClassNames = {\n link: this._classNames.link,\n rectNode: this._classNames.rectNode,\n rectText: this._classNames.rectText,\n rectSubText: this._classNames.rectSubText,\n rectmetricText: this._classNames.rectMetricText,\n };\n\n // Instantiate inherited class and call createTree function for the object\n const treeObject = new LayeredTree(\n this._treeData,\n this._composition,\n styleClassNames,\n this._nodeElements,\n this._linkElements,\n this._treeTraversal,\n );\n treeObject.createTree();\n }\n\n public render(): JSX.Element {\n return (\n <FocusZone>\n <div className=\"svgTreeDiv\" ref={(rootElem: HTMLElement | null) => (this._rootElem = rootElem)}>\n <svg className=\"svgTree\">\n <g className=\"svgNode\">{this._nodeElements.map(element => element)}</g>\n <g className=\"svgLink\">{this._linkElements.map(element => element)}</g>\n </svg>\n </div>\n </FocusZone>\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { ITreeProps } from './TreeChart.types';
3
+ export declare const TreeChart: React.FunctionComponent<ITreeProps>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TreeChart = void 0;
4
+ var Utilities_1 = require("@fluentui/react/lib-commonjs/Utilities");
5
+ var TreeChart_base_1 = require("./TreeChart.base");
6
+ var TreeChart_styles_1 = require("./TreeChart.styles");
7
+ exports.TreeChart = Utilities_1.styled(TreeChart_base_1.TreeChartBase, TreeChart_styles_1.getStyles);
8
+ //# sourceMappingURL=TreeChart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeChart.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.tsx"],"names":[],"mappings":";;;AACA,2DAAuD;AAEvD,mDAAiD;AACjD,uDAA+C;AAElC,QAAA,SAAS,GAAwC,kBAAM,CAClE,8BAAa,EACb,4BAAS,CACV,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '@fluentui/react/lib/Utilities';\nimport { ITreeStyles, ITreeProps, ITreeStyleProps } from './TreeChart.types';\nimport { TreeChartBase } from './TreeChart.base';\nimport { getStyles } from './TreeChart.styles';\n\nexport const TreeChart: React.FunctionComponent<ITreeProps> = styled<ITreeProps, ITreeStyleProps, ITreeStyles>(\n TreeChartBase,\n getStyles,\n);\n"]}
@@ -0,0 +1,2 @@
1
+ import { ITreeStyleProps, ITreeStyles } from './TreeChart.types';
2
+ export declare const getStyles: (props: ITreeStyleProps) => ITreeStyles;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStyles = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var getStyles = function (props) {
6
+ return {
7
+ link: {
8
+ fill: 'none',
9
+ stroke: '#A1A1A1',
10
+ strokeWidth: '2px',
11
+ },
12
+ rectNode: {
13
+ strokeWidth: '2px',
14
+ fill: 'white',
15
+ padding: '10px',
16
+ rx: '2px',
17
+ },
18
+ rectText: tslib_1.__assign({ fill: 'black' }, props.theme.fonts.large),
19
+ rectSubText: tslib_1.__assign({ fill: '#484644' }, props.theme.fonts.medium),
20
+ rectMetricText: tslib_1.__assign({ fill: '#000000' }, props.theme.fonts.xLarge),
21
+ };
22
+ };
23
+ exports.getStyles = getStyles;
24
+ //# sourceMappingURL=TreeChart.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeChart.styles.js","sourceRoot":"../src/","sources":["components/TreeChart/TreeChart.styles.ts"],"names":[],"mappings":";;;;AAEO,IAAM,SAAS,GAAG,UAAC,KAAsB;IAC9C,OAAO;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,KAAK;SACnB;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,KAAK;YAClB,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,MAAM;YACf,EAAE,EAAE,KAAK;SACV;QACD,QAAQ,qBACN,IAAI,EAAE,OAAO,IACV,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,KAAK,CAC5B;QACD,WAAW,qBACT,IAAI,EAAE,SAAS,IACZ,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,MAAM,CAC7B;QACD,cAAc,qBACZ,IAAI,EAAE,SAAS,IACZ,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,MAAM,CAC7B;KACF,CAAC;AACJ,CAAC,CAAC;AA1BW,QAAA,SAAS,aA0BpB","sourcesContent":["import { ITreeStyleProps, ITreeStyles } from './TreeChart.types';\n\nexport const getStyles = (props: ITreeStyleProps): ITreeStyles => {\n return {\n link: {\n fill: 'none',\n stroke: '#A1A1A1',\n strokeWidth: '2px',\n },\n rectNode: {\n strokeWidth: '2px',\n fill: 'white',\n padding: '10px',\n rx: '2px',\n },\n rectText: {\n fill: 'black',\n ...props.theme!.fonts.large,\n },\n rectSubText: {\n fill: '#484644',\n ...props.theme!.fonts.medium,\n },\n rectMetricText: {\n fill: '#000000',\n ...props.theme!.fonts.xLarge,\n },\n };\n};\n"]}