@oliasoft-open-source/charts-library 5.1.5 → 5.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +0 -3
- package/package.json +1 -1
- package/dist/assets/Color-YHDXOIA2-Bq81z8oe.js +0 -1
- package/dist/assets/DocsRenderer-CFRXHY34-CrxXBgm2.js +0 -580
- package/dist/assets/bar-chart-const-Cgj9sgUU.js +0 -1
- package/dist/assets/bar-chart.stories-CskKjwzY.js +0 -136
- package/dist/assets/chunk-XP5HYGXS-D5tuasO7.js +0 -1
- package/dist/assets/client-DnE3718B.js +0 -1
- package/dist/assets/entry-preview-CqdghNTQ.js +0 -2
- package/dist/assets/entry-preview-docs-Cet2djRm.js +0 -46
- package/dist/assets/get-custom-legend-plugin-example-Bx2dNJXg.js +0 -1
- package/dist/assets/get-draggableData-BuAjVvlk.js +0 -2
- package/dist/assets/iframe-Covr22ew.js +0 -217
- package/dist/assets/index-BhTLYoCu.js +0 -24
- package/dist/assets/index-CgYGpm1H.js +0 -1
- package/dist/assets/index-DHw5ixvP.js +0 -1
- package/dist/assets/index-Dytf1aFS.js +0 -8
- package/dist/assets/index-YTOF1_EJ.js +0 -9
- package/dist/assets/index-uDG1oqxT.js +0 -1
- package/dist/assets/jsx-runtime-W3oueGCa.js +0 -9
- package/dist/assets/legend-C1G_eM07.js +0 -1367
- package/dist/assets/legend-context-D335GXn0.js +0 -68
- package/dist/assets/line-chart-Df7xumu-.js +0 -6
- package/dist/assets/line-chart.stories-mXxv_jdM.js +0 -1162
- package/dist/assets/line-chart.test-case.stories-MkRygT1i.js +0 -430
- package/dist/assets/pie-chart.stories-CKrEnHPR.js +0 -45
- package/dist/assets/preview-CtUZNZ56.js +0 -2
- package/dist/assets/preview-DD_OYowb.js +0 -1
- package/dist/assets/preview-sKP0fxxa.js +0 -3
- package/dist/assets/react-18-BdgjDjvZ.js +0 -1
- package/dist/assets/scatter-chart.stories-DTnV_CPW.js +0 -41
- package/dist/assets/test-utils-BBHUGUfi.js +0 -9
- package/dist/bar-chart/bar-chart-const.d.ts +0 -2
- package/dist/bar-chart/bar-chart-default-props.d.ts +0 -2
- package/dist/bar-chart/bar-chart.d.ts +0 -3
- package/dist/bar-chart/bar-chart.interface.d.ts +0 -96
- package/dist/bar-chart/utils/get-bar-chart-data-labels.d.ts +0 -10
- package/dist/bar-chart/utils/get-bar-chart-scales.d.ts +0 -3
- package/dist/bar-chart/utils/get-bar-chart-tooltips.d.ts +0 -6
- package/dist/bar-chart/utils/use-bar-chart-config.d.ts +0 -13
- package/dist/bar-chart/utils/use-bar-chart-options.d.ts +0 -55
- package/dist/common/common.interface.d.ts +0 -210
- package/dist/common/controls-portal.d.ts +0 -7
- package/dist/common/enums.d.ts +0 -10
- package/dist/common/helpers/chart-border-plugin.d.ts +0 -16
- package/dist/common/helpers/chart-consts.d.ts +0 -39
- package/dist/common/helpers/chart-utils.d.ts +0 -86
- package/dist/common/helpers/container.d.ts +0 -18
- package/dist/common/helpers/custom-format-number.d.ts +0 -1
- package/dist/common/helpers/download-pgn.d.ts +0 -3
- package/dist/common/helpers/enums.d.ts +0 -80
- package/dist/common/helpers/get-chart-annotation.d.ts +0 -91
- package/dist/common/helpers/get-custom-legend-plugin-example.d.ts +0 -8
- package/dist/common/helpers/get-draggableData.d.ts +0 -18
- package/dist/common/helpers/range/estimate-data-series-have-close-values.d.ts +0 -8
- package/dist/common/helpers/range/range.d.ts +0 -33
- package/dist/common/helpers/text.d.ts +0 -1
- package/dist/common/helpers/to-annotation.d.ts +0 -4
- package/dist/common/hooks/use-generated-labels.d.ts +0 -4
- package/dist/common/hooks/use-legend-state.d.ts +0 -28
- package/dist/common/hooks/use-legend.d.ts +0 -4
- package/dist/common/hooks/use-reset.d.ts +0 -3
- package/dist/common/hooks/use-update-annotations.d.ts +0 -7
- package/dist/common/legend-component/legend-dropzone.d.ts +0 -3
- package/dist/common/legend-component/legend-interface.d.ts +0 -48
- package/dist/common/legend-component/legend-item/LegendItemLine.d.ts +0 -5
- package/dist/common/legend-component/legend-item/legend-item.d.ts +0 -3
- package/dist/common/legend-component/legend-panel.d.ts +0 -3
- package/dist/common/legend-component/legend.d.ts +0 -3
- package/dist/common/legend-component/state/legend-action-types.d.ts +0 -3
- package/dist/common/legend-component/state/legend-context.d.ts +0 -14
- package/dist/common/legend-component/state/legend-state-reducer.d.ts +0 -30
- package/dist/common/legend-component/utils/create-style-object.d.ts +0 -27
- package/dist/common/legend-component/utils/get-generated-labels.d.ts +0 -2
- package/dist/common/plugins/annotation-dragger-plugin/annotation-dragger-plugin.d.ts +0 -15
- package/dist/common/plugins/annotation-dragger-plugin/enums.d.ts +0 -20
- package/dist/common/plugins/annotation-dragger-plugin/event-helpers.d.ts +0 -6
- package/dist/common/plugins/annotation-dragger-plugin/helpers.d.ts +0 -53
- package/dist/common/plugins/annotation-dragger-plugin/point-annotation-label.d.ts +0 -5
- package/dist/common/plugins/ellipsis-annotation-plugin/compute-ellipse-geometry.d.ts +0 -9
- package/dist/common/plugins/ellipsis-annotation-plugin/ellipsis-annotation-plugin.d.ts +0 -18
- package/dist/common/plugins/gradient-background-plugin/enums.d.ts +0 -10
- package/dist/common/plugins/gradient-background-plugin/gradient-background-plugin.d.ts +0 -2
- package/dist/favicon.svg +0 -1
- package/dist/iframe.html +0 -666
- package/dist/index.html +0 -149
- package/dist/index.json +0 -1
- package/dist/line-chart/constants/default-translations.d.ts +0 -25
- package/dist/line-chart/constants/line-chart-consts.d.ts +0 -13
- package/dist/line-chart/controls/axes-options/axes-options-interfaces.d.ts +0 -57
- package/dist/line-chart/controls/axes-options/axes-options.d.ts +0 -6
- package/dist/line-chart/controls/axes-options/axes-validation.d.ts +0 -8
- package/dist/line-chart/controls/controls-interfaces.d.ts +0 -20
- package/dist/line-chart/controls/controls.d.ts +0 -3
- package/dist/line-chart/controls/drag-options-interfaces.d.ts +0 -14
- package/dist/line-chart/controls/drag-options.d.ts +0 -23
- package/dist/line-chart/controls/line-options.d.ts +0 -19
- package/dist/line-chart/hooks/use-chart-functions.d.ts +0 -33
- package/dist/line-chart/hooks/use-chart-options.d.ts +0 -16
- package/dist/line-chart/hooks/use-chart-plugins.d.ts +0 -7
- package/dist/line-chart/hooks/use-chart-state.d.ts +0 -12
- package/dist/line-chart/hooks/use-toggle-handler.d.ts +0 -12
- package/dist/line-chart/initialize/config.d.ts +0 -12
- package/dist/line-chart/initialize/initialize-line-chart.d.ts +0 -12
- package/dist/line-chart/line-chart-get-default-props.d.ts +0 -2
- package/dist/line-chart/line-chart.d.ts +0 -3
- package/dist/line-chart/line-chart.interface.d.ts +0 -150
- package/dist/line-chart/plugins/chart-area-text-plugin.d.ts +0 -17
- package/dist/line-chart/plugins/line-chart.minor-gridlines-plugin.d.ts +0 -8
- package/dist/line-chart/plugins/plugin-constants.d.ts +0 -11
- package/dist/line-chart/plugins/plugins.interface.d.ts +0 -9
- package/dist/line-chart/state/action-types.d.ts +0 -12
- package/dist/line-chart/state/helpers.d.ts +0 -13
- package/dist/line-chart/state/initial-state.d.ts +0 -11
- package/dist/line-chart/state/line-chart-reducer.d.ts +0 -2
- package/dist/line-chart/state/manage-state-in-local-storage.d.ts +0 -15
- package/dist/line-chart/state/state.interfaces.d.ts +0 -26
- package/dist/line-chart/utils/axis-formatting/axis-formatting.d.ts +0 -2
- package/dist/line-chart/utils/axis-scales/axis-scales.d.ts +0 -9
- package/dist/line-chart/utils/check-custom-option/check-custom-option.d.ts +0 -12
- package/dist/line-chart/utils/datalabels-alignment/datalabels-alignment.interface.d.ts +0 -20
- package/dist/line-chart/utils/datalabels-alignment/get-alignment-condition.d.ts +0 -8
- package/dist/line-chart/utils/datalabels-alignment/get-alignment-data.d.ts +0 -11
- package/dist/line-chart/utils/datalabels-alignment/get-datalabels-position.d.ts +0 -6
- package/dist/line-chart/utils/enums.d.ts +0 -4
- package/dist/line-chart/utils/generate-line-chart-datasets.d.ts +0 -8
- package/dist/line-chart/utils/get-annotations-data.d.ts +0 -1
- package/dist/line-chart/utils/get-axes-data-from-metasets.d.ts +0 -1
- package/dist/line-chart/utils/get-axes-ranges-from-chart.d.ts +0 -9
- package/dist/line-chart/utils/get-axis-range-by-type.d.ts +0 -10
- package/dist/line-chart/utils/get-generated-labels.d.ts +0 -2
- package/dist/line-chart/utils/get-line-chart-data-labels.d.ts +0 -16
- package/dist/line-chart/utils/get-line-chart-scales.d.ts +0 -4
- package/dist/line-chart/utils/get-line-chart-tooltips.d.ts +0 -34
- package/dist/line-chart/utils/line-chart-utils.d.ts +0 -24
- package/dist/line-chart/utils/translations/get-translations.d.ts +0 -8
- package/dist/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/nunito-sans-bold.woff2 +0 -0
- package/dist/nunito-sans-italic.woff2 +0 -0
- package/dist/nunito-sans-regular.woff2 +0 -0
- package/dist/pie-chart/pie-chart-defalut-props.interface.d.ts +0 -50
- package/dist/pie-chart/pie-chart-get-default-props.d.ts +0 -3
- package/dist/pie-chart/pie-chart.d.ts +0 -3
- package/dist/pie-chart/pie-chart.interface.d.ts +0 -70
- package/dist/pie-chart/use-pie-chart-config.d.ts +0 -42
- package/dist/project.json +0 -1
- package/dist/sb-addons/actions-1/manager-bundle.js +0 -3
- package/dist/sb-addons/docs-2/manager-bundle.js +0 -242
- package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-dark-mode-esm-preset-3/manager-bundle.js +0 -5
- package/dist/sb-common-assets/favicon.svg +0 -1
- package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/dist/sb-manager/globals-module-info.js +0 -1051
- package/dist/sb-manager/globals-runtime.js +0 -41591
- package/dist/sb-manager/globals.js +0 -48
- package/dist/sb-manager/runtime.js +0 -12048
- package/dist/scatter-chart/hooks/use-scatter-chart-config.d.ts +0 -113
- package/dist/scatter-chart/scatter-chart-default-props.interface.d.ts +0 -71
- package/dist/scatter-chart/scatter-chart-get-default-props.d.ts +0 -3
- package/dist/scatter-chart/scatter-chart.d.ts +0 -3
- package/dist/scatter-chart/scatter-chart.interface.d.ts +0 -81
- package/dist/scatter-chart/utils/get-scales-config.d.ts +0 -49
- package/dist/scatter-chart/utils/get-tooltip-config.d.ts +0 -21
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as Oe,g as Ue}from"./index-YTOF1_EJ.js";import{r as Pe}from"./index-BhTLYoCu.js";function Se(p,y){for(var v=0;v<y.length;v++){const d=y[v];if(typeof d!="string"&&!Array.isArray(d)){for(const h in d)if(h!=="default"&&!(h in p)){const l=Object.getOwnPropertyDescriptor(d,h);l&&Object.defineProperty(p,h,l.get?l:{enumerable:!0,get:()=>d[h]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}var A={exports:{}},u={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-dom-test-utils.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var z;function Re(){if(z)return u;z=1;var p=Oe(),y=Pe();function v(e){var n=e,t=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(t=n.return),e=n.return;while(e)}return n.tag===3?t:null}function d(e){if(v(e)!==e)throw Error("Unable to find node on an unmounted component.")}function h(e){var n=e.alternate;if(!n){if(n=v(e),n===null)throw Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var t=e,r=n;;){var i=t.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){t=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===t)return d(i),e;if(s===r)return d(i),n;s=s.sibling}throw Error("Unable to find node on an unmounted component.")}if(t.return!==r.return)t=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===t){o=!0,t=i,r=s;break}if(a===r){o=!0,r=i,t=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===t){o=!0,t=s,r=i;break}if(a===r){o=!0,r=s,t=i;break}a=a.sibling}if(!o)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(t.alternate!==r)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(t.tag!==3)throw Error("Unable to find node on an unmounted component.");return t.stateNode.current===t?e:n}var l=Object.assign;function P(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function k(){return!0}function K(){return!1}function c(e){function n(t,r,i,s,o){this._reactName=t,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?k:K,this.isPropagationStopped=K,this}return l(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():typeof t.returnValue!="unknown"&&(t.returnValue=!1),this.isDefaultPrevented=k)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=k)},persist:function(){},isPersistent:k}),n}var g={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$=c(g),w=l({},g,{view:0,detail:0});c(w);var S,R,C,_=l({},w,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:I,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==C&&(C&&e.type==="mousemove"?(S=e.screenX-C.screenX,R=e.screenY-C.screenY):R=S=0,C=e),S)},movementY:function(e){return"movementY"in e?e.movementY:R}});c(_);var G=l({},_,{dataTransfer:0});c(G);var J=l({},w,{relatedTarget:0});c(J);var Q=l({},g,{animationName:0,elapsedTime:0,pseudoElement:0});c(Q);var ee=l({},g,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}});c(ee);var te=l({},g,{data:0});c(te);var ne={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},re={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},oe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ie(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=oe[e])?!!n[e]:!1}function I(){return ie}var se=l({},w,{key:function(e){if(e.key){var n=ne[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=P(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?re[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:I,charCode:function(e){return e.type==="keypress"?P(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?P(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}});c(se);var ae=l({},_,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0});c(ae);var ue=l({},w,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:I});c(ue);var le=l({},g,{propertyName:0,elapsedTime:0,pseudoElement:0});c(le);var ce=l({},_,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0});c(ce);function pe(e,n,t,r,i,s,o,a,b){var f=Array.prototype.slice.call(arguments,3);try{n.apply(t,f)}catch(Me){this.onError(Me)}}var E=!1,T=null,M=!1,N=null,de={onError:function(e){E=!0,T=e}};function fe(e,n,t,r,i,s,o,a,b){E=!1,T=null,pe.apply(de,arguments)}function he(e,n,t,r,i,s,o,a,b){if(fe.apply(this,arguments),E){if(E){var f=T;E=!1,T=null}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.");M||(M=!0,N=f)}}var L=Array.isArray,D=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,me=D[0],ye=D[1],ve=D[2],ge=D[3],we=D[4],Ce=p.unstable_act;function Ee(){}function De(e,n){if(!e)return[];if(e=h(e),!e)return[];for(var t=e,r=[];;){if(t.tag===5||t.tag===6||t.tag===1||t.tag===0){var i=t.stateNode;n(i)&&r.push(i)}if(t.child)t.child.return=t,t=t.child;else{if(t===e)return r;for(;!t.sibling;){if(!t.return||t.return===e)return r;t=t.return}t.sibling.return=t.return,t=t.sibling}}}function m(e,n){if(e&&!e._reactInternals){var t=String(e);throw e=L(e)?"an array":e&&e.nodeType===1&&e.tagName?"a DOM node":t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t,Error(n+"(...): the first argument must be a React class instance. Instead received: "+(e+"."))}}function O(e){return!(!e||e.nodeType!==1||!e.tagName)}function x(e){return O(e)?!1:e!=null&&typeof e.render=="function"&&typeof e.setState=="function"}function W(e,n){return x(e)?e._reactInternals.type===n:!1}function U(e,n){return m(e,"findAllInRenderedTree"),e?De(e._reactInternals,n):[]}function Y(e,n){return m(e,"scryRenderedDOMComponentsWithClass"),U(e,function(t){if(O(t)){var r=t.className;typeof r!="string"&&(r=t.getAttribute("class")||"");var i=r.split(/\s+/);if(!L(n)){if(n===void 0)throw Error("TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument.");n=n.split(/\s+/)}return n.every(function(s){return i.indexOf(s)!==-1})}return!1})}function X(e,n){return m(e,"scryRenderedDOMComponentsWithTag"),U(e,function(t){return O(t)&&t.tagName.toUpperCase()===n.toUpperCase()})}function F(e,n){return m(e,"scryRenderedComponentsWithType"),U(e,function(t){return W(t,n)})}function j(e,n,t){var r=e.type||"unknown-event";e.currentTarget=ye(t),he(r,n,void 0,e),e.currentTarget=null}function q(e,n,t){for(var r=[];e;){r.push(e);do e=e.return;while(e&&e.tag!==5);e=e||null}for(e=r.length;0<e--;)n(r[e],"captured",t);for(e=0;e<r.length;e++)n(r[e],"bubbled",t)}function V(e,n){var t=e.stateNode;if(!t)return null;var r=ve(t);if(!r)return null;t=r[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(t&&typeof t!="function")throw Error("Expected `"+n+"` listener to be a function, instead got a value of `"+typeof t+"` type.");return t}function be(e,n,t){e&&t&&t._reactName&&(n=V(e,t._reactName))&&(t._dispatchListeners==null&&(t._dispatchListeners=[]),t._dispatchInstances==null&&(t._dispatchInstances=[]),t._dispatchListeners.push(n),t._dispatchInstances.push(e))}function ke(e,n,t){var r=t._reactName;n==="captured"&&(r+="Capture"),(n=V(e,r))&&(t._dispatchListeners==null&&(t._dispatchListeners=[]),t._dispatchInstances==null&&(t._dispatchInstances=[]),t._dispatchListeners.push(n),t._dispatchInstances.push(e))}var B={},_e=new Set(["mouseEnter","mouseLeave","pointerEnter","pointerLeave"]);function Te(e){return function(n,t){if(p.isValidElement(n))throw Error("TestUtils.Simulate expected a DOM node as the first argument but received a React element. Pass the DOM node you wish to simulate the event on instead. Note that TestUtils.Simulate will not work if you are using shallow rendering.");if(x(n))throw Error("TestUtils.Simulate expected a DOM node as the first argument but received a component instance. Pass the DOM node you wish to simulate the event on instead.");var r="on"+e[0].toUpperCase()+e.slice(1),i=new Ee;i.target=n,i.type=e.toLowerCase();var s=me(n),o=new $(r,i.type,s,i,n);o.persist(),l(o,t),_e.has(e)?o&&o._reactName&&be(o._targetInst,null,o):o&&o._reactName&&q(o._targetInst,ke,o),y.unstable_batchedUpdates(function(){if(ge(n),o){var a=o._dispatchListeners,b=o._dispatchInstances;if(L(a))for(var f=0;f<a.length&&!o.isPropagationStopped();f++)j(o,a[f],b[f]);else a&&j(o,a,b);o._dispatchListeners=null,o._dispatchInstances=null,o.isPersistent()||o.constructor.release(o)}if(M)throw a=N,M=!1,N=null,a}),we()}}return"blur cancel click close contextMenu copy cut auxClick doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play pointerCancel pointerDown pointerUp rateChange reset resize seeked submit touchCancel touchEnd touchStart volumeChange drag dragEnter dragExit dragLeave dragOver mouseMove mouseOut mouseOver pointerMove pointerOut pointerOver scroll toggle touchMove wheel abort animationEnd animationIteration animationStart canPlay canPlayThrough durationChange emptied encrypted ended error gotPointerCapture load loadedData loadedMetadata loadStart lostPointerCapture playing progress seeking stalled suspend timeUpdate transitionEnd waiting mouseEnter mouseLeave pointerEnter pointerLeave change select beforeInput compositionEnd compositionStart compositionUpdate".split(" ").forEach(function(e){B[e]=Te(e)}),u.Simulate=B,u.act=Ce,u.findAllInRenderedTree=U,u.findRenderedComponentWithType=function(e,n){if(m(e,"findRenderedComponentWithType"),e=F(e,n),e.length!==1)throw Error("Did not find exactly one match (found: "+e.length+") for componentType:"+n);return e[0]},u.findRenderedDOMComponentWithClass=function(e,n){if(m(e,"findRenderedDOMComponentWithClass"),e=Y(e,n),e.length!==1)throw Error("Did not find exactly one match (found: "+e.length+") for class:"+n);return e[0]},u.findRenderedDOMComponentWithTag=function(e,n){if(m(e,"findRenderedDOMComponentWithTag"),e=X(e,n),e.length!==1)throw Error("Did not find exactly one match (found: "+e.length+") for tag:"+n);return e[0]},u.isCompositeComponent=x,u.isCompositeComponentWithType=W,u.isDOMComponent=O,u.isDOMComponentElement=function(e){return!!(e&&p.isValidElement(e)&&e.tagName)},u.isElement=function(e){return p.isValidElement(e)},u.isElementOfType=function(e,n){return p.isValidElement(e)&&e.type===n},u.mockComponent=function(e,n){return n=n||e.mockTagName||"div",e.prototype.render.mockImplementation(function(){return p.createElement(n,null,this.props.children)}),this},u.nativeTouchData=function(e,n){return{touches:[{pageX:e,pageY:n}]}},u.renderIntoDocument=function(e){var n=document.createElement("div");return y.render(e,n)},u.scryRenderedComponentsWithType=F,u.scryRenderedDOMComponentsWithClass=Y,u.scryRenderedDOMComponentsWithTag=X,u.traverseTwoPhase=q,u}var H;function Ie(){return H||(H=1,A.exports=Re()),A.exports}var Z=Ie();const Ne=Ue(Z),Ae=Se({__proto__:null,default:Ne},[Z]);export{Ae as t};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { ChartDataset } from 'chart.js';
|
|
2
|
-
import { ICommonAdditionalAxesOptions, ICommonAnnotations, ICommonAnnotationsData, ICommonAxis, ICommonChartOptions, ICommonCustomLegend, ICommonData, ICommonDataset, ICommonDataValue, ICommonDragData, ICommonGraph, ICommonInteractions, ICommonLegend, ICommonOptions, ICommonScales, ICommonStyling, ICommonTooltip } from '../common/common.interface';
|
|
3
|
-
import { IChartGraph } from '../common/helpers/chart-utils';
|
|
4
|
-
import { ChartType } from '../common/helpers/enums';
|
|
5
|
-
export interface IBarStyling extends ICommonStyling {
|
|
6
|
-
squareAspectRatio?: boolean;
|
|
7
|
-
layoutPadding?: string | number | {
|
|
8
|
-
top: number;
|
|
9
|
-
bottom: number;
|
|
10
|
-
left: number;
|
|
11
|
-
right: number;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export interface IBarLegend extends ICommonLegend {
|
|
15
|
-
customLegend?: ICommonCustomLegend<any>;
|
|
16
|
-
}
|
|
17
|
-
export interface IBarAxes {
|
|
18
|
-
x: ICommonAxis<'top' | 'bottom'>[];
|
|
19
|
-
y: ICommonAxis<'left' | 'right'>[];
|
|
20
|
-
[key: string]: ICommonAxis[];
|
|
21
|
-
}
|
|
22
|
-
export interface IBarAdditionalAxesOptions extends ICommonAdditionalAxesOptions {
|
|
23
|
-
stackedX?: boolean;
|
|
24
|
-
stackedY?: boolean;
|
|
25
|
-
}
|
|
26
|
-
export interface IBarOptions extends ICommonOptions {
|
|
27
|
-
direction: 'vertical' | 'horizontal';
|
|
28
|
-
axes: IBarAxes;
|
|
29
|
-
scales?: ICommonScales;
|
|
30
|
-
additionalAxesOptions?: IBarAdditionalAxesOptions;
|
|
31
|
-
chartStyling: IBarStyling;
|
|
32
|
-
graph?: ICommonGraph;
|
|
33
|
-
annotations?: ICommonAnnotations;
|
|
34
|
-
legend?: IBarLegend;
|
|
35
|
-
dragData?: ICommonDragData;
|
|
36
|
-
}
|
|
37
|
-
export interface IBarChartDataset extends ICommonDataset {
|
|
38
|
-
isAnnotation?: boolean;
|
|
39
|
-
annotationIndex?: number;
|
|
40
|
-
borderSkipped?: boolean;
|
|
41
|
-
borderRadius?: number;
|
|
42
|
-
xAxisID?: string;
|
|
43
|
-
yAxisID?: string;
|
|
44
|
-
hidden?: boolean;
|
|
45
|
-
displayGroup?: string | number;
|
|
46
|
-
type?: ChartType.Bar;
|
|
47
|
-
}
|
|
48
|
-
export interface IBarChartBaseData {
|
|
49
|
-
labels: string[];
|
|
50
|
-
datasets: IBarChartDataset[];
|
|
51
|
-
}
|
|
52
|
-
export interface IBarChartData extends ICommonData {
|
|
53
|
-
testId?: string;
|
|
54
|
-
controlsPortalId?: string;
|
|
55
|
-
data: IBarChartBaseData;
|
|
56
|
-
options: IBarOptions;
|
|
57
|
-
}
|
|
58
|
-
export interface IBarChartProps {
|
|
59
|
-
chart: IBarChartData;
|
|
60
|
-
}
|
|
61
|
-
export interface IBarDefaultProps {
|
|
62
|
-
testId: string;
|
|
63
|
-
controlsPortalId: string;
|
|
64
|
-
data: IBarChartBaseData;
|
|
65
|
-
options: {
|
|
66
|
-
title?: string | string[];
|
|
67
|
-
direction: 'vertical' | 'horizontal';
|
|
68
|
-
axes: IBarAxes;
|
|
69
|
-
additionalAxesOptions: IBarAdditionalAxesOptions;
|
|
70
|
-
chartStyling: IBarStyling;
|
|
71
|
-
tooltip: ICommonTooltip;
|
|
72
|
-
graph: IChartGraph;
|
|
73
|
-
scales?: ICommonScales;
|
|
74
|
-
annotations: {
|
|
75
|
-
showAnnotations: boolean;
|
|
76
|
-
controlAnnotation: boolean;
|
|
77
|
-
annotationsData: ICommonAnnotationsData[];
|
|
78
|
-
};
|
|
79
|
-
legend: IBarLegend;
|
|
80
|
-
chartOptions: ICommonChartOptions;
|
|
81
|
-
interactions: ICommonInteractions;
|
|
82
|
-
dragData: ICommonDragData;
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
export interface IGenerateBarChartDataset extends ChartDataset<'bar', ICommonDataValue[]> {
|
|
86
|
-
borderColor: string;
|
|
87
|
-
backgroundColor: string | string[];
|
|
88
|
-
borderDash?: number[];
|
|
89
|
-
borderWidth?: number;
|
|
90
|
-
annotationType?: string;
|
|
91
|
-
hideLegend?: boolean;
|
|
92
|
-
displayGroup?: string | number;
|
|
93
|
-
isAnnotation?: boolean;
|
|
94
|
-
annotationIndex?: number;
|
|
95
|
-
}
|
|
96
|
-
export type TGenerateBarChartDatasets = IGenerateBarChartDataset[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IBarOptions } from '../bar-chart.interface.ts';
|
|
2
|
-
type ExtendedDisplayOptions = 'auto' | boolean;
|
|
3
|
-
export interface IExtendedDataLabelsOptions {
|
|
4
|
-
display: ExtendedDisplayOptions;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Returns the data labels configuration for a bar chart.
|
|
8
|
-
*/
|
|
9
|
-
declare const getBarChartDataLabels: (options: IBarOptions) => IExtendedDataLabelsOptions;
|
|
10
|
-
export default getBarChartDataLabels;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { RefObject } from '../../../../node_modules/react';
|
|
2
|
-
import { ActiveElement, Chart, ChartEvent } from 'chart.js';
|
|
3
|
-
import { IBarDefaultProps, IBarOptions, TGenerateBarChartDatasets } from '../bar-chart.interface';
|
|
4
|
-
import { ICommonHoveredItems } from '../../common/common.interface';
|
|
5
|
-
export interface IGenerateBarChartDatasetsProps {
|
|
6
|
-
datasets: TGenerateBarChartDatasets;
|
|
7
|
-
options: IBarOptions;
|
|
8
|
-
}
|
|
9
|
-
export declare const useBarChartConfig: (chartRef: RefObject<Chart>, chart: IBarDefaultProps) => {
|
|
10
|
-
generatedDatasets: TGenerateBarChartDatasets;
|
|
11
|
-
onClick: (_evt: ChartEvent, _elements: ActiveElement[], chartInstance: Chart) => void;
|
|
12
|
-
onHover: (evt: ChartEvent, hoveredItems: ICommonHoveredItems[]) => void;
|
|
13
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { MutableRefObject } from '../../../../node_modules/react';
|
|
2
|
-
import { Chart } from 'chart.js';
|
|
3
|
-
import { AxisType, ChartHoverMode } from '../../common/helpers/enums';
|
|
4
|
-
import { IBarDefaultProps } from '../bar-chart.interface';
|
|
5
|
-
export interface IUseBarChartOptionsProps {
|
|
6
|
-
chart: IBarDefaultProps;
|
|
7
|
-
chartRef: MutableRefObject<Chart | null>;
|
|
8
|
-
}
|
|
9
|
-
export declare const useBarChartOptions: ({ chart, chartRef, }: IUseBarChartOptionsProps) => {
|
|
10
|
-
onClick: (_evt: import('chart.js').ChartEvent, _elements: import('chart.js').ActiveElement[], chartInstance: Chart) => void;
|
|
11
|
-
onHover: (evt: import('chart.js').ChartEvent, hoveredItems: import('../../common/common.interface').ICommonHoveredItems[]) => void;
|
|
12
|
-
indexAxis: AxisType;
|
|
13
|
-
maintainAspectRatio: boolean | undefined;
|
|
14
|
-
animation: false | {
|
|
15
|
-
duration: number;
|
|
16
|
-
} | undefined;
|
|
17
|
-
hover: {
|
|
18
|
-
mode: ChartHoverMode;
|
|
19
|
-
intersect: boolean;
|
|
20
|
-
};
|
|
21
|
-
scales: any;
|
|
22
|
-
plugins: {
|
|
23
|
-
title: {
|
|
24
|
-
display: boolean;
|
|
25
|
-
text: string | string[];
|
|
26
|
-
} | {
|
|
27
|
-
display?: undefined;
|
|
28
|
-
text?: undefined;
|
|
29
|
-
};
|
|
30
|
-
datalabels: import('./get-bar-chart-data-labels').IExtendedDataLabelsOptions;
|
|
31
|
-
annotation: {
|
|
32
|
-
annotations: {};
|
|
33
|
-
};
|
|
34
|
-
tooltip: Record<string, any>;
|
|
35
|
-
legend: {
|
|
36
|
-
display: boolean;
|
|
37
|
-
events: never[];
|
|
38
|
-
position: any;
|
|
39
|
-
align: "center" | "start" | "end";
|
|
40
|
-
labels: {
|
|
41
|
-
boxHeight: number;
|
|
42
|
-
boxWidth: number | undefined;
|
|
43
|
-
usePointStyle: boolean | undefined;
|
|
44
|
-
};
|
|
45
|
-
onClick: (_: import('../../common/common.interface').UnusedParameter, legendItem: import('chart.js').LegendItem) => void;
|
|
46
|
-
};
|
|
47
|
-
customLegendPlugin: {
|
|
48
|
-
htmlLegend: any;
|
|
49
|
-
};
|
|
50
|
-
chartAreaBorder: {
|
|
51
|
-
borderColor: string;
|
|
52
|
-
};
|
|
53
|
-
dragData: false | object | import('../../common/helpers/get-draggableData').IDraggableData | undefined;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import { ChartEvent, ChartTypeRegistry, LinearScaleOptions, Plugin } from 'chart.js';
|
|
2
|
-
import { LabelOptions } from 'chartjs-plugin-annotation';
|
|
3
|
-
import { GradientDirection } from './plugins/gradient-background-plugin/enums';
|
|
4
|
-
import { AnnotationType, DragAxis } from './plugins/annotation-dragger-plugin/enums';
|
|
5
|
-
import { AlignOptions, Position } from './helpers/enums';
|
|
6
|
-
export type TAxisPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
-
export interface ICommonDataValue {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
label?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface ICommonDataset {
|
|
13
|
-
label?: string;
|
|
14
|
-
borderColor?: string;
|
|
15
|
-
backgroundColor?: string | string[];
|
|
16
|
-
borderWidth?: number;
|
|
17
|
-
data: ICommonDataValue[];
|
|
18
|
-
hidden?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface ICommonScales extends Partial<Record<string, LinearScaleOptions>> {
|
|
21
|
-
x: LinearScaleOptions;
|
|
22
|
-
y: LinearScaleOptions;
|
|
23
|
-
}
|
|
24
|
-
export interface ICommonAnnotationElement {
|
|
25
|
-
display: boolean;
|
|
26
|
-
annotationIndex: number;
|
|
27
|
-
label: {
|
|
28
|
-
options: LabelOptions;
|
|
29
|
-
content: string;
|
|
30
|
-
};
|
|
31
|
-
options: {
|
|
32
|
-
id?: string;
|
|
33
|
-
scaleID?: string;
|
|
34
|
-
borderColor?: string;
|
|
35
|
-
borderWidth?: number;
|
|
36
|
-
radius?: number;
|
|
37
|
-
label?: {
|
|
38
|
-
content?: string;
|
|
39
|
-
position?: string;
|
|
40
|
-
enabled?: boolean;
|
|
41
|
-
xAdjust?: number;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
export interface ICoordinates {
|
|
46
|
-
x: number;
|
|
47
|
-
y: number;
|
|
48
|
-
}
|
|
49
|
-
export interface ICommonAnnotationsData {
|
|
50
|
-
display?: boolean;
|
|
51
|
-
hideLegend?: boolean;
|
|
52
|
-
id?: string;
|
|
53
|
-
adjustScaleRange: boolean;
|
|
54
|
-
annotationAxis: 'x' | 'y';
|
|
55
|
-
rotation: number;
|
|
56
|
-
color: string;
|
|
57
|
-
endValue: number;
|
|
58
|
-
borderWidth?: number;
|
|
59
|
-
backgroundColor?: string;
|
|
60
|
-
label: string;
|
|
61
|
-
labelConfig?: Record<string, any>;
|
|
62
|
-
type: AnnotationType;
|
|
63
|
-
value: number;
|
|
64
|
-
xMin: number;
|
|
65
|
-
xMax: number;
|
|
66
|
-
yMin: number;
|
|
67
|
-
yMax: number;
|
|
68
|
-
xValue?: number;
|
|
69
|
-
yValue?: number;
|
|
70
|
-
radius?: number;
|
|
71
|
-
enableDrag?: boolean;
|
|
72
|
-
onDragStart?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
73
|
-
onDrag?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
74
|
-
onDragEnd?: (coordinates: ICoordinates, annotation: ICommonAnnotationsData) => void;
|
|
75
|
-
dragAxis?: DragAxis;
|
|
76
|
-
pointStyle?: string;
|
|
77
|
-
resizable?: boolean;
|
|
78
|
-
dragRange?: {
|
|
79
|
-
x?: [number, number];
|
|
80
|
-
y?: [number, number];
|
|
81
|
-
};
|
|
82
|
-
displayDragCoordinates?: boolean;
|
|
83
|
-
xScaleID?: string;
|
|
84
|
-
yScaleID?: string;
|
|
85
|
-
}
|
|
86
|
-
export interface ICommonGradientColor {
|
|
87
|
-
offset: number;
|
|
88
|
-
color: string;
|
|
89
|
-
}
|
|
90
|
-
export interface ICommonGradient {
|
|
91
|
-
display: boolean;
|
|
92
|
-
gradientColors?: ICommonGradientColor[];
|
|
93
|
-
direction?: GradientDirection;
|
|
94
|
-
}
|
|
95
|
-
export interface ICommonStyling {
|
|
96
|
-
width?: number | string;
|
|
97
|
-
height?: number | string;
|
|
98
|
-
maintainAspectRatio?: boolean;
|
|
99
|
-
staticChartHeight?: boolean;
|
|
100
|
-
performanceMode?: boolean;
|
|
101
|
-
gradient?: ICommonGradient;
|
|
102
|
-
}
|
|
103
|
-
export interface ICommonLegend {
|
|
104
|
-
display: boolean;
|
|
105
|
-
position: Position;
|
|
106
|
-
align: AlignOptions;
|
|
107
|
-
}
|
|
108
|
-
export interface ICommonTooltip {
|
|
109
|
-
tooltips: boolean;
|
|
110
|
-
showLabelsInTooltips: boolean;
|
|
111
|
-
scientificNotation: boolean;
|
|
112
|
-
}
|
|
113
|
-
export interface ICommonAdditionalAxesOptions {
|
|
114
|
-
chartScaleType?: 'linear' | 'logarithmic';
|
|
115
|
-
reverse: boolean;
|
|
116
|
-
beginAtZero: boolean;
|
|
117
|
-
stepSize?: number;
|
|
118
|
-
stacked?: boolean;
|
|
119
|
-
suggestedMin?: number;
|
|
120
|
-
suggestedMax?: number;
|
|
121
|
-
min?: number;
|
|
122
|
-
max?: number;
|
|
123
|
-
}
|
|
124
|
-
export interface ICommonAnnotation {
|
|
125
|
-
showLabel: boolean;
|
|
126
|
-
text: string | string[];
|
|
127
|
-
position: string;
|
|
128
|
-
fontSize: number;
|
|
129
|
-
xOffset: number;
|
|
130
|
-
yOffset: number;
|
|
131
|
-
maxWidth: number;
|
|
132
|
-
lineHeight: number;
|
|
133
|
-
}
|
|
134
|
-
export interface ICommonAnnotations {
|
|
135
|
-
showAnnotations?: boolean;
|
|
136
|
-
controlAnnotation?: boolean;
|
|
137
|
-
enableDragAnnotation?: boolean;
|
|
138
|
-
annotationsData?: ICommonAnnotationsData[];
|
|
139
|
-
labelAnnotation?: ICommonAnnotation;
|
|
140
|
-
}
|
|
141
|
-
export interface ICommonGraph {
|
|
142
|
-
lineTension?: number;
|
|
143
|
-
spanGaps?: boolean;
|
|
144
|
-
showDataLabels?: boolean;
|
|
145
|
-
showMinorGridlines?: boolean;
|
|
146
|
-
}
|
|
147
|
-
export interface ICommonInteractions {
|
|
148
|
-
onLegendClick?: (text: string, hidden: boolean) => void;
|
|
149
|
-
onHover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: any[]) => void;
|
|
150
|
-
onUnhover?: (event?: ChartEvent, datasetIndex?: number, index?: number, generatedDataset?: any[]) => void;
|
|
151
|
-
}
|
|
152
|
-
export interface ICommonCustomLegend<T extends keyof ChartTypeRegistry> {
|
|
153
|
-
customLegendPlugin: Plugin<T> | null;
|
|
154
|
-
customLegendContainerID: string;
|
|
155
|
-
}
|
|
156
|
-
export interface ICommonChartOptions {
|
|
157
|
-
enableZoom: boolean;
|
|
158
|
-
enablePan: boolean;
|
|
159
|
-
}
|
|
160
|
-
export interface ICommonDragData {
|
|
161
|
-
enableDragData?: boolean;
|
|
162
|
-
showTooltip?: boolean;
|
|
163
|
-
roundPoints?: boolean;
|
|
164
|
-
dragX?: boolean;
|
|
165
|
-
dragY?: boolean;
|
|
166
|
-
onDragStart?: () => void;
|
|
167
|
-
onDrag?: () => void;
|
|
168
|
-
onDragEnd?: () => void;
|
|
169
|
-
}
|
|
170
|
-
export interface ICommonOptions {
|
|
171
|
-
title?: string | string[];
|
|
172
|
-
chartStyling?: ICommonStyling;
|
|
173
|
-
tooltip?: ICommonTooltip;
|
|
174
|
-
legend?: ICommonLegend;
|
|
175
|
-
chartOptions?: ICommonChartOptions;
|
|
176
|
-
interactions?: ICommonInteractions;
|
|
177
|
-
dragData?: ICommonDragData;
|
|
178
|
-
annotations?: ICommonAnnotations;
|
|
179
|
-
}
|
|
180
|
-
export interface ICommonData {
|
|
181
|
-
testId?: string;
|
|
182
|
-
data?: {
|
|
183
|
-
labels?: string[];
|
|
184
|
-
datasets?: ICommonDataset[];
|
|
185
|
-
};
|
|
186
|
-
options: ICommonOptions;
|
|
187
|
-
}
|
|
188
|
-
export interface ICommonHoveredItems {
|
|
189
|
-
index: number;
|
|
190
|
-
datasetIndex: number;
|
|
191
|
-
}
|
|
192
|
-
export interface ICommonChartPlugins {
|
|
193
|
-
legend: {
|
|
194
|
-
position: TAxisPosition;
|
|
195
|
-
};
|
|
196
|
-
title: {
|
|
197
|
-
display: boolean;
|
|
198
|
-
text: string;
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
export interface ICommonAxis<PositionType = any> {
|
|
202
|
-
label: string;
|
|
203
|
-
position: PositionType;
|
|
204
|
-
color: string | string[];
|
|
205
|
-
unit?: string;
|
|
206
|
-
gridLines?: boolean;
|
|
207
|
-
stepSize?: number;
|
|
208
|
-
}
|
|
209
|
-
export type UnusedParameter = unknown | any;
|
|
210
|
-
export type TPrimitive = string | number | boolean | null;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from '../../../node_modules/react';
|
|
2
|
-
interface ControlsPortalProps {
|
|
3
|
-
children: ReactElement;
|
|
4
|
-
controlsPortalId: string;
|
|
5
|
-
}
|
|
6
|
-
declare const ControlsPortal: ({ children, controlsPortalId, }: ControlsPortalProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default ControlsPortal;
|
package/dist/common/enums.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Chart } from 'chart.js';
|
|
2
|
-
import { UnusedParameter } from '../common.interface';
|
|
3
|
-
interface IChartAreaBorderPluginOptions {
|
|
4
|
-
borderColor: string;
|
|
5
|
-
borderWidth: number;
|
|
6
|
-
borderDash: number[];
|
|
7
|
-
borderDashOffset?: number;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Chart border plugin config
|
|
11
|
-
*/
|
|
12
|
-
export declare const chartAreaBorderPlugin: {
|
|
13
|
-
id: string;
|
|
14
|
-
beforeDraw(chart: Chart, _: UnusedParameter, options: IChartAreaBorderPluginOptions): void;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ICommonGradientColor } from '../common.interface';
|
|
2
|
-
export declare const BORDER_WIDTH: {
|
|
3
|
-
ZERO: number;
|
|
4
|
-
INITIAL: number;
|
|
5
|
-
HOVERED: number;
|
|
6
|
-
POINT_HOVERED: number;
|
|
7
|
-
};
|
|
8
|
-
export declare const BORDER_COLOR = "rgba(0,0,0,0.1)";
|
|
9
|
-
export declare const ANNOTATION_DASH: number[];
|
|
10
|
-
export declare const DEFAULT_FONT_SIZE = 12;
|
|
11
|
-
export declare const DEFAULT_FONT_FAMILY = "\"Roobert\", \"Noto Sans\", sans-serif";
|
|
12
|
-
export declare const DEFAULT_COLOR = "hsl(60, 10.34482759%, 12.5%)";
|
|
13
|
-
export declare const LEGEND_LABEL_BOX_SIZE = 12;
|
|
14
|
-
export declare const TOOLTIP_PADDING = 8;
|
|
15
|
-
export declare const TOOLTIP_BOX_PADDING = 4;
|
|
16
|
-
export declare const TRANSPARENT = "transparent";
|
|
17
|
-
export declare const LOGARITHMIC_STEPS: number[];
|
|
18
|
-
export declare const COLORS: string[];
|
|
19
|
-
/**
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @desc equivalent of 0.6 rgba alpha chanel
|
|
22
|
-
*/
|
|
23
|
-
export declare const ALPHA_CHANEL = "99";
|
|
24
|
-
/**
|
|
25
|
-
* @type {number}
|
|
26
|
-
* @desc #FFFFFF as decimal number
|
|
27
|
-
*/
|
|
28
|
-
export declare const WHITE_COLOR_AS_DECIMAL = 16777215;
|
|
29
|
-
export declare const AUTO = "auto";
|
|
30
|
-
export declare const ANIMATION_DURATION: {
|
|
31
|
-
NO: number;
|
|
32
|
-
SLOW: number;
|
|
33
|
-
FAST: number;
|
|
34
|
-
};
|
|
35
|
-
export declare const DEFAULT_CHART_NAME = "new_chart";
|
|
36
|
-
export declare const CUSTOM_LEGEND_PLUGIN_NAME = "htmlLegend";
|
|
37
|
-
export declare const DECIMAL_POINT_TOLERANCE = 9;
|
|
38
|
-
export declare const MAX_DECIMAL_DIFF: number;
|
|
39
|
-
export declare const GRADIENT_COLORS: ICommonGradientColor[];
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { ChartTypeRegistry, LegendItem, Plugin } from 'chart.js';
|
|
2
|
-
import { ICommonCustomLegend, UnusedParameter } from '../common.interface';
|
|
3
|
-
import { Position } from './enums';
|
|
4
|
-
export interface IChartGraph {
|
|
5
|
-
showMinorGridlines: boolean;
|
|
6
|
-
}
|
|
7
|
-
interface IOptions {
|
|
8
|
-
title?: string | string[];
|
|
9
|
-
legend?: {
|
|
10
|
-
position: Position;
|
|
11
|
-
display?: boolean;
|
|
12
|
-
align?: string;
|
|
13
|
-
usePointStyle?: boolean;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
interface IStyling {
|
|
17
|
-
width?: string | number;
|
|
18
|
-
height?: string | number;
|
|
19
|
-
squareAspectRatio?: number | boolean;
|
|
20
|
-
maintainAspectRatio?: boolean;
|
|
21
|
-
staticChartHeight?: boolean;
|
|
22
|
-
performanceMode?: boolean;
|
|
23
|
-
}
|
|
24
|
-
interface IAxis {
|
|
25
|
-
label?: string;
|
|
26
|
-
}
|
|
27
|
-
interface ILegend {
|
|
28
|
-
customLegend?: ICommonCustomLegend<any>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @param { graph } graph - graph data from chart options
|
|
32
|
-
* @param { legend } legend
|
|
33
|
-
* @return {[]}
|
|
34
|
-
*/
|
|
35
|
-
export declare const getPlugins: <T extends keyof ChartTypeRegistry>(graph: IChartGraph, legend: ILegend) => Plugin<T>[] | any;
|
|
36
|
-
/**
|
|
37
|
-
* @param {string[]} colors - color schema
|
|
38
|
-
* @return {string} - random color
|
|
39
|
-
*/
|
|
40
|
-
export declare const generateRandomColor: (colors: string[]) => string[];
|
|
41
|
-
/**
|
|
42
|
-
* @param {ICommonChartOptions} options - chart options object
|
|
43
|
-
* @return {{color: (string|undefined), display: boolean, text}|{}}
|
|
44
|
-
*/
|
|
45
|
-
export declare const getTitle: (options: IOptions) => {
|
|
46
|
-
display: boolean;
|
|
47
|
-
text: string | string[];
|
|
48
|
-
} | {
|
|
49
|
-
display?: undefined;
|
|
50
|
-
text?: undefined;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* @function isVertical
|
|
54
|
-
*/
|
|
55
|
-
export declare const isVertical: (direction: "vertical" | "horizontal") => direction is "vertical";
|
|
56
|
-
/**
|
|
57
|
-
* @param {'x'|'y'} axisType
|
|
58
|
-
* @param {number} i - index
|
|
59
|
-
* @return {'top'|'bottom'|'left'|'right'|*}
|
|
60
|
-
*/
|
|
61
|
-
export declare const getAxisPosition: (axisType: string, i: number) => Position;
|
|
62
|
-
/**
|
|
63
|
-
* @param {chartStyling} chartStyling
|
|
64
|
-
* @param {Object} styles - styles imported form .less file
|
|
65
|
-
* @return {string} - class name
|
|
66
|
-
*/
|
|
67
|
-
export declare const getClassName: (chartStyling: IStyling, styles: Record<string, string>) => string;
|
|
68
|
-
export declare const getLegend: (options: IOptions, clickHandler: (_: UnusedParameter, legendItem: LegendItem) => void) => {
|
|
69
|
-
position: any;
|
|
70
|
-
display: boolean | undefined;
|
|
71
|
-
align: "center" | "start" | "end";
|
|
72
|
-
labels: {
|
|
73
|
-
boxHeight: number;
|
|
74
|
-
boxWidth: number | undefined;
|
|
75
|
-
usePointStyle: boolean | undefined;
|
|
76
|
-
};
|
|
77
|
-
onClick: (_: UnusedParameter, legendItem: LegendItem) => void;
|
|
78
|
-
};
|
|
79
|
-
export declare const afterLabelCallback: (tooltipItem: Record<string, any>) => string;
|
|
80
|
-
export declare const getTooltipLabel: (tooltipItem: Record<string, any>, showLabelsInTooltips: boolean) => string;
|
|
81
|
-
export declare const sanitize: (str: string) => string;
|
|
82
|
-
export declare const getChartFileName: (axes?: IAxis[]) => string;
|
|
83
|
-
export declare const setDefaultTheme: () => void;
|
|
84
|
-
export declare const isNilOrEmpty: <T>(value: T | null | undefined) => boolean;
|
|
85
|
-
export declare const isEmptyString: (value: string) => value is "";
|
|
86
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from '../../../../node_modules/react';
|
|
2
|
-
interface ContainerProps {
|
|
3
|
-
style?: CSSProperties;
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
margin?: boolean;
|
|
6
|
-
deprecatedMessage?: string;
|
|
7
|
-
warningMessage?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const Container: {
|
|
10
|
-
({ style, children, margin, deprecatedMessage, warningMessage, }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
defaultProps: {
|
|
12
|
-
style: {};
|
|
13
|
-
margin: boolean;
|
|
14
|
-
deprecatedMessage: null;
|
|
15
|
-
warningMessage: null;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const customFormatNumber: (labelNumber: number, scientificNotation: boolean) => string;
|