@fluentui/react-charting 5.10.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 (139) hide show
  1. package/CHANGELOG.json +72 -1
  2. package/CHANGELOG.md +32 -2
  3. package/dist/react-charting.js +1 -1
  4. package/dist/react-charting.min.js +1 -1
  5. package/lib/Sparkline.d.ts +1 -0
  6. package/lib/Sparkline.js +2 -0
  7. package/lib/Sparkline.js.map +1 -0
  8. package/lib/TreeChart.d.ts +1 -0
  9. package/lib/TreeChart.js +2 -0
  10. package/lib/TreeChart.js.map +1 -0
  11. package/lib/Utilities.d.ts +1 -1
  12. package/lib/Utilities.js +4 -2
  13. package/lib/Utilities.js.map +1 -1
  14. package/lib/components/Sparkline/Sparkline.base.d.ts +18 -0
  15. package/lib/components/Sparkline/Sparkline.base.js +65 -0
  16. package/lib/components/Sparkline/Sparkline.base.js.map +1 -0
  17. package/lib/components/Sparkline/Sparkline.d.ts +3 -0
  18. package/lib/components/Sparkline/Sparkline.js +6 -0
  19. package/lib/components/Sparkline/Sparkline.js.map +1 -0
  20. package/lib/components/Sparkline/Sparkline.styles.d.ts +2 -0
  21. package/lib/components/Sparkline/Sparkline.styles.js +10 -0
  22. package/lib/components/Sparkline/Sparkline.styles.js.map +1 -0
  23. package/lib/components/Sparkline/Sparkline.types.d.ts +46 -0
  24. package/lib/components/Sparkline/Sparkline.types.js +2 -0
  25. package/lib/components/Sparkline/Sparkline.types.js.map +1 -0
  26. package/lib/components/Sparkline/index.d.ts +2 -0
  27. package/lib/components/Sparkline/index.js +3 -0
  28. package/lib/components/Sparkline/index.js.map +1 -0
  29. package/lib/components/TreeChart/TreeChart.base.d.ts +18 -0
  30. package/lib/components/TreeChart/TreeChart.base.js +239 -0
  31. package/lib/components/TreeChart/TreeChart.base.js.map +1 -0
  32. package/lib/components/TreeChart/TreeChart.d.ts +3 -0
  33. package/lib/components/TreeChart/TreeChart.js +5 -0
  34. package/lib/components/TreeChart/TreeChart.js.map +1 -0
  35. package/lib/components/TreeChart/TreeChart.styles.d.ts +2 -0
  36. package/lib/components/TreeChart/TreeChart.styles.js +20 -0
  37. package/lib/components/TreeChart/TreeChart.styles.js.map +1 -0
  38. package/lib/components/TreeChart/TreeChart.types.d.ts +88 -0
  39. package/lib/components/TreeChart/TreeChart.types.js +11 -0
  40. package/lib/components/TreeChart/TreeChart.types.js.map +1 -0
  41. package/lib/components/TreeChart/index.d.ts +2 -0
  42. package/lib/components/TreeChart/index.js +3 -0
  43. package/lib/components/TreeChart/index.js.map +1 -0
  44. package/lib/index.d.ts +2 -0
  45. package/lib/index.js +2 -0
  46. package/lib/index.js.map +1 -1
  47. package/lib/version.js +1 -1
  48. package/lib/version.js.map +1 -1
  49. package/lib-amd/Sparkline.d.ts +1 -0
  50. package/lib-amd/Sparkline.js +6 -0
  51. package/lib-amd/Sparkline.js.map +1 -0
  52. package/lib-amd/TreeChart.d.ts +1 -0
  53. package/lib-amd/TreeChart.js +6 -0
  54. package/lib-amd/TreeChart.js.map +1 -0
  55. package/lib-amd/Utilities.d.ts +1 -1
  56. package/lib-amd/Utilities.js +3 -1
  57. package/lib-amd/Utilities.js.map +1 -1
  58. package/lib-amd/components/Sparkline/Sparkline.base.d.ts +18 -0
  59. package/lib-amd/components/Sparkline/Sparkline.base.js +63 -0
  60. package/lib-amd/components/Sparkline/Sparkline.base.js.map +1 -0
  61. package/lib-amd/components/Sparkline/Sparkline.d.ts +3 -0
  62. package/lib-amd/components/Sparkline/Sparkline.js +8 -0
  63. package/lib-amd/components/Sparkline/Sparkline.js.map +1 -0
  64. package/lib-amd/components/Sparkline/Sparkline.styles.d.ts +2 -0
  65. package/lib-amd/components/Sparkline/Sparkline.styles.js +15 -0
  66. package/lib-amd/components/Sparkline/Sparkline.styles.js.map +1 -0
  67. package/lib-amd/components/Sparkline/Sparkline.types.d.ts +46 -0
  68. package/lib-amd/components/Sparkline/Sparkline.types.js +5 -0
  69. package/lib-amd/components/Sparkline/Sparkline.types.js.map +1 -0
  70. package/lib-amd/components/Sparkline/index.d.ts +2 -0
  71. package/lib-amd/components/Sparkline/index.js +7 -0
  72. package/lib-amd/components/Sparkline/index.js.map +1 -0
  73. package/lib-amd/components/TreeChart/TreeChart.base.d.ts +18 -0
  74. package/lib-amd/components/TreeChart/TreeChart.base.js +238 -0
  75. package/lib-amd/components/TreeChart/TreeChart.base.js.map +1 -0
  76. package/lib-amd/components/TreeChart/TreeChart.d.ts +3 -0
  77. package/lib-amd/components/TreeChart/TreeChart.js +7 -0
  78. package/lib-amd/components/TreeChart/TreeChart.js.map +1 -0
  79. package/lib-amd/components/TreeChart/TreeChart.styles.d.ts +2 -0
  80. package/lib-amd/components/TreeChart/TreeChart.styles.js +25 -0
  81. package/lib-amd/components/TreeChart/TreeChart.styles.js.map +1 -0
  82. package/lib-amd/components/TreeChart/TreeChart.types.d.ts +88 -0
  83. package/lib-amd/components/TreeChart/TreeChart.types.js +16 -0
  84. package/lib-amd/components/TreeChart/TreeChart.types.js.map +1 -0
  85. package/lib-amd/components/TreeChart/index.d.ts +2 -0
  86. package/lib-amd/components/TreeChart/index.js +7 -0
  87. package/lib-amd/components/TreeChart/index.js.map +1 -0
  88. package/lib-amd/index.d.ts +2 -0
  89. package/lib-amd/index.js +3 -1
  90. package/lib-amd/index.js.map +1 -1
  91. package/lib-amd/version.js +1 -1
  92. package/lib-amd/version.js.map +1 -1
  93. package/lib-commonjs/Sparkline.d.ts +1 -0
  94. package/lib-commonjs/Sparkline.js +5 -0
  95. package/lib-commonjs/Sparkline.js.map +1 -0
  96. package/lib-commonjs/TreeChart.d.ts +1 -0
  97. package/lib-commonjs/TreeChart.js +5 -0
  98. package/lib-commonjs/TreeChart.js.map +1 -0
  99. package/lib-commonjs/Utilities.d.ts +1 -1
  100. package/lib-commonjs/Utilities.js +6 -4
  101. package/lib-commonjs/Utilities.js.map +1 -1
  102. package/lib-commonjs/components/Sparkline/Sparkline.base.d.ts +18 -0
  103. package/lib-commonjs/components/Sparkline/Sparkline.base.js +68 -0
  104. package/lib-commonjs/components/Sparkline/Sparkline.base.js.map +1 -0
  105. package/lib-commonjs/components/Sparkline/Sparkline.d.ts +3 -0
  106. package/lib-commonjs/components/Sparkline/Sparkline.js +9 -0
  107. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -0
  108. package/lib-commonjs/components/Sparkline/Sparkline.styles.d.ts +2 -0
  109. package/lib-commonjs/components/Sparkline/Sparkline.styles.js +14 -0
  110. package/lib-commonjs/components/Sparkline/Sparkline.styles.js.map +1 -0
  111. package/lib-commonjs/components/Sparkline/Sparkline.types.d.ts +46 -0
  112. package/lib-commonjs/components/Sparkline/Sparkline.types.js +3 -0
  113. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -0
  114. package/lib-commonjs/components/Sparkline/index.d.ts +2 -0
  115. package/lib-commonjs/components/Sparkline/index.js +6 -0
  116. package/lib-commonjs/components/Sparkline/index.js.map +1 -0
  117. package/lib-commonjs/components/TreeChart/TreeChart.base.d.ts +18 -0
  118. package/lib-commonjs/components/TreeChart/TreeChart.base.js +242 -0
  119. package/lib-commonjs/components/TreeChart/TreeChart.base.js.map +1 -0
  120. package/lib-commonjs/components/TreeChart/TreeChart.d.ts +3 -0
  121. package/lib-commonjs/components/TreeChart/TreeChart.js +8 -0
  122. package/lib-commonjs/components/TreeChart/TreeChart.js.map +1 -0
  123. package/lib-commonjs/components/TreeChart/TreeChart.styles.d.ts +2 -0
  124. package/lib-commonjs/components/TreeChart/TreeChart.styles.js +24 -0
  125. package/lib-commonjs/components/TreeChart/TreeChart.styles.js.map +1 -0
  126. package/lib-commonjs/components/TreeChart/TreeChart.types.d.ts +88 -0
  127. package/lib-commonjs/components/TreeChart/TreeChart.types.js +14 -0
  128. package/lib-commonjs/components/TreeChart/TreeChart.types.js.map +1 -0
  129. package/lib-commonjs/components/TreeChart/index.d.ts +2 -0
  130. package/lib-commonjs/components/TreeChart/index.js +6 -0
  131. package/lib-commonjs/components/TreeChart/index.js.map +1 -0
  132. package/lib-commonjs/index.d.ts +2 -0
  133. package/lib-commonjs/index.js +2 -0
  134. package/lib-commonjs/index.js.map +1 -1
  135. package/lib-commonjs/version.js +1 -1
  136. package/lib-commonjs/version.js.map +1 -1
  137. package/package.json +6 -4
  138. package/src/components/Sparkline/Sparkline.types.ts +55 -0
  139. package/src/components/TreeChart/TreeChart.types.ts +89 -0
@@ -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;A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AA;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;AAC5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,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 { ILineChartDataPoint } from '../../types/IDataPoint';
3
+ import { ISparklineProps } from '../../index';
4
+ export interface ISparklineState {
5
+ _points: ILineChartDataPoint[] | null;
6
+ _width: number;
7
+ _height: number;
8
+ }
9
+ export declare class SparklineBase extends React.Component<ISparklineProps, ISparklineState> {
10
+ private margin;
11
+ private x;
12
+ private y;
13
+ private area;
14
+ constructor(props: ISparklineProps);
15
+ componentDidMount(): void;
16
+ drawSparkline(): JSX.Element;
17
+ render(): JSX.Element;
18
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SparklineBase = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var React = require("react");
6
+ var d3_scale_1 = require("d3-scale");
7
+ var d3_shape_1 = require("d3-shape");
8
+ var d3_array_1 = require("d3-array");
9
+ var react_focus_1 = require("@fluentui/react-focus");
10
+ var Utilities_1 = require("@fluentui/react/lib-commonjs/Utilities");
11
+ var getClassNames = Utilities_1.classNamesFunction();
12
+ var SparklineBase = /** @class */ (function (_super) {
13
+ tslib_1.__extends(SparklineBase, _super);
14
+ function SparklineBase(props) {
15
+ var _this = _super.call(this, props) || this;
16
+ _this.margin = {
17
+ top: 2,
18
+ right: 0,
19
+ bottom: 0,
20
+ left: 0,
21
+ };
22
+ _this.state = {
23
+ _points: null,
24
+ _width: _this.props.width || 80,
25
+ _height: _this.props.height || 20 + _this.margin.bottom + _this.margin.top,
26
+ };
27
+ return _this;
28
+ }
29
+ SparklineBase.prototype.componentDidMount = function () {
30
+ var _this = this;
31
+ var area = d3_shape_1.area()
32
+ /* eslint-disable @typescript-eslint/no-explicit-any */
33
+ .x(function (d) { return _this.x(d.x); })
34
+ .y0(this.state._height)
35
+ /* eslint-disable @typescript-eslint/no-explicit-any */
36
+ .y1(function (d) { return _this.y(d.y); })
37
+ .curve(d3_shape_1.curveMonotoneX);
38
+ this.area = area;
39
+ var points = this.props.data.lineChartData[0].data;
40
+ /* eslint-disable @typescript-eslint/no-explicit-any */
41
+ var _a = d3_array_1.extent(points, function (d) { return d.x; }), xMin = _a[0], xMax = _a[1];
42
+ this.x = d3_scale_1.scaleLinear()
43
+ .domain([xMin, xMax])
44
+ .range([this.margin.left, this.state._width - this.margin.right]);
45
+ this.y = d3_scale_1.scaleLinear()
46
+ /* eslint-disable @typescript-eslint/no-explicit-any */
47
+ .domain([0, d3_array_1.max(points, function (d) { return d.y; })])
48
+ .range([this.state._height - this.margin.bottom, this.margin.top]);
49
+ this.setState({
50
+ _points: points,
51
+ });
52
+ };
53
+ SparklineBase.prototype.drawSparkline = function () {
54
+ return (React.createElement("path", { className: "area", d: this.area(this.state._points), opacity: 1, fillOpacity: 0.2, fill: this.props.data.lineChartData[0].color, strokeWidth: 2, stroke: this.props.data.lineChartData[0].color, "aria-label": "Sparkline with label " + this.props.data.lineChartData[0].legend }));
55
+ };
56
+ SparklineBase.prototype.render = function () {
57
+ var classNames = getClassNames(this.props.styles, {
58
+ theme: this.props.theme,
59
+ });
60
+ return (React.createElement(react_focus_1.FocusZone, { direction: react_focus_1.FocusZoneDirection.horizontal, isCircularNavigation: true, className: classNames.inlineBlock },
61
+ React.createElement("div", { className: classNames.inlineBlock },
62
+ this.state._width >= 50 && this.state._height >= 16 ? (React.createElement("svg", { width: this.state._width, height: this.state._height, tabIndex: 0 }, this.state._points ? this.drawSparkline() : null)) : (React.createElement(React.Fragment, null)),
63
+ this.props.showLegend && this.props.data.lineChartData[0].legend ? (React.createElement("span", { role: "text", className: classNames.titleText, tabIndex: 0 }, this.props.data.lineChartData[0].legend)) : (React.createElement(React.Fragment, null)))));
64
+ };
65
+ return SparklineBase;
66
+ }(React.Component));
67
+ exports.SparklineBase = SparklineBase;
68
+ //# sourceMappingURL=Sparkline.base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sparkline.base.js","sourceRoot":"../src/","sources":["components/Sparkline/Sparkline.base.tsx"],"names":[],"mappings":";;;;AAAA,6BAA+B;AAC/B,qCAAwD;AACxD,qCAA8E;AAC9E,qCAA4D;AAC5D,qDAAsE;AAEtE,2DAAmE;AAEnE,IAAM,aAAa,GAAG,8BAAkB,EAA0C,CAAC;AAQn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EAAE,IAAI,CAAC,KAAK,CAAC,KAAM;SACzB,CAAC,CAAC;QACH,OAAO,CACL,oBAAC,uBAAS,IACR,SAAS,EAAE,gCAAkB,CAAC,UAAU,EACxC,oBAAoB,EAAE,IAAI,EAC1B,SAAS,EAAE,UAAU,CAAC,WAAW;YAEjC,6BAAK,SAAS,EAAE,UAAU,CAAC,WAAW;gBACnC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,CACrD,6BAAK,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,IACnE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,IAAI,CAC7C,CACP,CAAC,CAAC,CAAC,CACF,yCAAK,CACN;gBACA,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,IAAK,CAAC,aAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CACpE,8BAAM,IAAI,EAAC,MAAM,EAAC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,QAAQ,EAAE,CAAC,IAC3D,IAAI,CAAC,KAAK,CAAC,IAAK,CAAC,aAAc,CAAC,CAAC,CAAC,CAAC,MAAO,CACtC,CACR,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CACG,CACI,CACb,CAAC;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AAhGD,CAAmC,KAAK,CAAC,SAAS,GAgGjD;AAhGY,sCAAa","sourcesContent":["import * as React from 'react';\nimport { scaleLinear as d3ScaleLinear } from 'd3-scale';\nimport { area as d3Area, curveMonotoneX as d3CurveMonotoneX } from 'd3-shape';\nimport { max as d3Max, extent as d3Extent } from 'd3-array';\nimport { FocusZone, FocusZoneDirection } from '@fluentui/react-focus';\nimport { ILineChartDataPoint } from '../../types/IDataPoint';\nimport { classNamesFunction } from '@fluentui/react/lib/Utilities';\nimport { ISparklineProps, ISparklineStyleProps, ISparklineStyles } from '../../index';\nconst getClassNames = classNamesFunction<ISparklineStyleProps, ISparklineStyles>();\n\nexport interface ISparklineState {\n _points: ILineChartDataPoint[] | null;\n _width: number;\n _height: number;\n}\n\nexport class SparklineBase extends React.Component<ISparklineProps, ISparklineState> {\n private margin = {\n top: 2,\n right: 0,\n bottom: 0,\n left: 0,\n };\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n private x: any;\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n private y: any;\n private area: any;\n\n constructor(props: ISparklineProps) {\n super(props);\n this.state = {\n _points: null,\n _width: this.props.width! || 80,\n _height: this.props.height! || 20 + this.margin.bottom + this.margin.top,\n };\n }\n\n public componentDidMount() {\n const area = d3Area()\n /* eslint-disable @typescript-eslint/no-explicit-any */\n .x((d: any) => this.x(d.x))\n .y0(this.state._height)\n /* eslint-disable @typescript-eslint/no-explicit-any */\n .y1((d: any) => this.y(d.y))\n .curve(d3CurveMonotoneX);\n this.area = area;\n\n const points = this.props.data!.lineChartData![0].data;\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const [xMin, xMax] = d3Extent(points, (d: any) => d.x);\n\n this.x = d3ScaleLinear()\n .domain([xMin, xMax])\n .range([this.margin.left!, this.state._width - this.margin.right!]);\n this.y = d3ScaleLinear()\n /* eslint-disable @typescript-eslint/no-explicit-any */\n .domain([0, d3Max(points, (d: any) => d.y)])\n .range([this.state._height - this.margin.bottom!, this.margin.top!]);\n\n this.setState({\n _points: points,\n });\n }\n\n public drawSparkline() {\n return (\n <path\n className=\"area\"\n d={this.area(this.state._points)}\n opacity={1}\n fillOpacity={0.2}\n fill={this.props.data!.lineChartData![0].color!}\n strokeWidth={2}\n stroke={this.props.data!.lineChartData![0].color!}\n aria-label={`Sparkline with label ${this.props.data!.lineChartData![0].legend!}`}\n />\n );\n }\n\n public render() {\n const classNames = getClassNames(this.props.styles!, {\n theme: this.props.theme!,\n });\n return (\n <FocusZone\n direction={FocusZoneDirection.horizontal}\n isCircularNavigation={true}\n className={classNames.inlineBlock}\n >\n <div className={classNames.inlineBlock}>\n {this.state._width >= 50 && this.state._height >= 16 ? (\n <svg width={this.state._width} height={this.state._height} tabIndex={0}>\n {this.state._points ? this.drawSparkline() : null}\n </svg>\n ) : (\n <></>\n )}\n {this.props.showLegend && this.props.data!.lineChartData![0].legend ? (\n <span role=\"text\" className={classNames.titleText} tabIndex={0}>\n {this.props.data!.lineChartData![0].legend!}\n </span>\n ) : (\n <></>\n )}\n </div>\n </FocusZone>\n );\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { ISparklineProps } from '../../index';
3
+ export declare const Sparkline: React.FunctionComponent<ISparklineProps>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Sparkline = void 0;
4
+ var Utilities_1 = require("@fluentui/react/lib-commonjs/Utilities");
5
+ var Sparkline_base_1 = require("./Sparkline.base");
6
+ var Sparkline_styles_1 = require("./Sparkline.styles");
7
+ // Create a Sparkline variant which uses these default styles and this styled subcomponent.
8
+ exports.Sparkline = Utilities_1.styled(Sparkline_base_1.SparklineBase, Sparkline_styles_1.getStyles);
9
+ //# sourceMappingURL=Sparkline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sparkline.js","sourceRoot":"../src/","sources":["components/Sparkline/Sparkline.tsx"],"names":[],"mappings":";;;AACA,2DAAuD;AAEvD,mDAAiD;AACjD,uDAA+C;AAE/C,2FAA2F;AAC9E,QAAA,SAAS,GAA6C,kBAAM,CAIvE,8BAAa,EAAE,4BAAS,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { styled } from '@fluentui/react/lib/Utilities';\nimport { ISparklineStyles, ISparklineProps, ISparklineStyleProps } from '../../index';\nimport { SparklineBase } from './Sparkline.base';\nimport { getStyles } from './Sparkline.styles';\n\n// Create a Sparkline variant which uses these default styles and this styled subcomponent.\nexport const Sparkline: React.FunctionComponent<ISparklineProps> = styled<\n ISparklineProps,\n ISparklineStyleProps,\n ISparklineStyles\n>(SparklineBase, getStyles);\n"]}
@@ -0,0 +1,2 @@
1
+ import { ISparklineStyleProps, ISparklineStyles } from './Sparkline.types';
2
+ export declare const getStyles: (props: ISparklineStyleProps) => ISparklineStyles;
@@ -0,0 +1,14 @@
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
+ inlineBlock: {
8
+ display: 'inline',
9
+ },
10
+ titleText: tslib_1.__assign({ marginLeft: '8px', textAlign: 'center' }, props.theme.fonts.smallPlus),
11
+ };
12
+ };
13
+ exports.getStyles = getStyles;
14
+ //# sourceMappingURL=Sparkline.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sparkline.styles.js","sourceRoot":"../src/","sources":["components/Sparkline/Sparkline.styles.ts"],"names":[],"mappings":";;;;AAEO,IAAM,SAAS,GAAG,UAAC,KAA2B;IACnD,OAAO;QACL,WAAW,EAAE;YACX,OAAO,EAAE,QAAQ;SAClB;QACD,SAAS,qBACP,UAAU,EAAE,KAAK,EACjB,SAAS,EAAE,QAAQ,IAChB,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,SAAS,CAChC;KACF,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,SAAS,aAWpB","sourcesContent":["import { ISparklineStyleProps, ISparklineStyles } from './Sparkline.types';\n\nexport const getStyles = (props: ISparklineStyleProps): ISparklineStyles => {\n return {\n inlineBlock: {\n display: 'inline',\n },\n titleText: {\n marginLeft: '8px',\n textAlign: 'center',\n ...props.theme!.fonts.smallPlus,\n },\n };\n};\n"]}
@@ -0,0 +1,46 @@
1
+ import { ITheme, IStyle } from '@fluentui/react/lib/Styling';
2
+ import { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';
3
+ import { IChartProps } from '../../types/IDataPoint';
4
+ import { ICartesianChartStyleProps } from '../CommonComponents/index';
5
+ export interface ISparklineStyleProps extends ICartesianChartStyleProps {
6
+ }
7
+ export interface ISparklineProps {
8
+ /**
9
+ * An array of chart data points for the Sparkline chart
10
+ */
11
+ data?: IChartProps;
12
+ /**
13
+ * Width of chart
14
+ * * @default 80
15
+ */
16
+ width?: number;
17
+ /**
18
+ * Height of chart
19
+ * @default 20
20
+ */
21
+ height?: number;
22
+ /**
23
+ * Additional CSS class(es) to apply to the SparklineChart.
24
+ */
25
+ className?: string;
26
+ /**
27
+ * Theme (provided through customization.)
28
+ */
29
+ theme?: ITheme;
30
+ /**
31
+ * The prop used to define the culture to localized the numbers
32
+ */
33
+ culture?: string;
34
+ /**
35
+ * Prop used to determine whether to show the legend or not
36
+ */
37
+ showLegend?: boolean;
38
+ /**
39
+ * Call to provide customized styling that will layer on top of the variant rules.
40
+ */
41
+ styles?: IStyleFunctionOrObject<ISparklineStyleProps, ISparklineStyles>;
42
+ }
43
+ export interface ISparklineStyles {
44
+ inlineBlock?: IStyle;
45
+ titleText?: IStyle;
46
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Sparkline.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sparkline.types.js","sourceRoot":"../src/","sources":["components/Sparkline/Sparkline.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ITheme, IStyle } from '@fluentui/react/lib/Styling';\nimport { IStyleFunctionOrObject } from '@fluentui/react/lib/Utilities';\nimport { IChartProps } from '../../types/IDataPoint';\nimport { ICartesianChartStyleProps } from '../CommonComponents/index';\n\nexport interface ISparklineStyleProps extends ICartesianChartStyleProps {}\n\nexport interface ISparklineProps {\n /**\n * An array of chart data points for the Sparkline chart\n */\n data?: IChartProps;\n\n /**\n * Width of chart\n * * @default 80\n */\n width?: number;\n\n /**\n * Height of chart\n * @default 20\n */\n height?: number;\n\n /**\n * Additional CSS class(es) to apply to the SparklineChart.\n */\n className?: string;\n\n /**\n * Theme (provided through customization.)\n */\n theme?: ITheme;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * Prop used to determine whether to show the legend or not\n */\n showLegend?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IStyleFunctionOrObject<ISparklineStyleProps, ISparklineStyles>;\n}\n\nexport interface ISparklineStyles {\n inlineBlock?: IStyle;\n titleText?: IStyle;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './Sparkline';
2
+ export * from './Sparkline.types';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./Sparkline"), exports);
5
+ tslib_1.__exportStar(require("./Sparkline.types"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Sparkline/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,4DAAkC","sourcesContent":["export * from './Sparkline';\nexport * from './Sparkline.types';\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