@capillarytech/blaze-ui 5.18.6 → 5.18.7
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/CapGraph/index.js +179 -630
- package/CapGraph/index.js.map +1 -1
- package/CapHamburgerMenu/README.md +234 -0
- package/CapHamburgerMenu/USE_CASES.md +48 -0
- package/CapHamburgerMenu/index.d.ts +6 -0
- package/CapHamburgerMenu/index.d.ts.map +1 -0
- package/CapHamburgerMenu/index.js +567 -613
- package/CapHamburgerMenu/index.js.map +1 -1
- package/CapHamburgerMenu/types.d.ts +161 -0
- package/CapHamburgerMenu/types.d.ts.map +1 -0
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +856 -259
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/CapGraph/README.md +0 -69
- package/CapGraph/USE_CASES.md +0 -66
- package/CapGraph/constants.d.ts +0 -10
- package/CapGraph/constants.d.ts.map +0 -1
- package/CapGraph/index.d.ts +0 -9
- package/CapGraph/index.d.ts.map +0 -1
- package/CapGraph/types.d.ts +0 -55
- package/CapGraph/types.d.ts.map +0 -1
package/CapGraph/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CapGraph/index.js","mappings":";;;;;;;AAAA,kC;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACCA,MAAkG;AAClG,MAAiG;AACjG,MAA+F;AAC/F,MAAkH;AAClH,MAA2G;AAC3G;AACA,MAA2M;AAC3M;AACA;;AAEA;;AAEA;AACA,wBAAwB,kHAAa;AACrC,iBAAiB,uGAAa;AAC9B,iBAAiB,wGAAM;AACvB,6BAA6B,sGAAkB;;AAE/C,aAAa,0GAAG,CAAC,8KAAO;;;;AAIqJ;AAC7K,OAAO,iEAAe,8KAAO,IAAI,qLAAc,GAAG,qLAAc,YAAY,EAAC;;;;;;;;;ACxBhE;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oC;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa,MAAM,mBAAO,CAAC,IAAO,6KAA6K;AAC/M,kBAAkB,UAAU,eAAe,qBAAqB,6BAA6B,0BAA0B,0DAA0D,4EAA4E,OAAO,wDAAwD,gBAAgB,GAAG,WAAW,GAAG,YAAY;;;;;;;;;ACV5V;;AAEb;AACA;AACA,E;;;;;;;ACJA;AACA,+CAA+C,mBAAO,CAAC,KAA4D;AACnH,kCAAkC,mBAAO,CAAC,KAAmD;AAC7F;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACRa;;AAEb;AACA;AACA,cAAc,KAAwC,GAAG,sBAAiB,GAAG,CAAI;AACjF;AACA;AACA;AACA;AACA,gD;;;;;;;;ACTa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oDAAoD;AACpD;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,eAAe;AACf;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,wB;;;;;;;;ACrFa;;AAEb,IAAI,IAAqC;AACzC,EAAE,2CAAqE;AACvE,EAAE,KAAK;AAAA,EAEN;;;;;;;;;ACNY;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,gDAAgD;AAChD;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,iDAAiD,qBAAqB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;ACpFa;;AAEb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;;ACjCa;;AAEb;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;ACjFA;AACO,MAAMA,cAAc,GAAAC,sBAAA,GAAG,GAAG;;AAEjC;AACO,MAAMC,sBAIZ,GAAAD,8BAAA,GAAG;EACFE,SAAS,EAAE;IACTC,QAAQ,EAAE,UAAU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;YACCC,WAAW;YACXC,OAAO;YACPC,cAAc;YACdC,IAAI;YACJC,OAAO;YACPC,MAAM;YACNC,KAAK;YACLC,SAAS;YACTC;UAEF,CAAC,GAAAT,KAAA;UADI1B,IAAI,GAAAzC,6BAAA,CAAAmE,KAAA,EAAA7F,UAAA;QAEP,MAAMuG,WAAW,GAAGT,WAAW,GAC3BC,OAAO,GACP,CAACC,cAAc,IAAI,CAAI/D,KAAK,SAAIC,KAAK,EAAIqB,iBAAiB,CAAC;QAC/D,oBACE,IAAAzD,WAAA,CAAAyE,GAAA,EAAChF,UAAA,CAAAiH,IAAI,EAAApF,QAAA;UAEH6E,IAAI,EAAEA,IAAK;UACXxH,QAAQ,EAAKwD,KAAK,SAAIC,KAAQ;UAC9BrD,KAAK,EAAEqH,OAAO,IAAIC,MAAM,GAAG,CAACD,OAAO,EAAEC,MAAM,CAAC,GAAGM,SAAU;UACzDjE,IAAI,EAAEA,IAAK;UACXuD,OAAO,EAAEQ,WAAY;UACrBH,KAAK,EAAEA;QAAM,GACTjC,IAAI;UAAAO,QAAA,EAEP2B,SAAS,IAAIC,KAAK,iBAAI,IAAAxG,WAAA,CAAAyE,GAAA,EAAChF,UAAA,CAAAmH,KAAK,EAAAtF,QAAA,KAAKkF,KAAK,CAAG;QAAC,IATtCL,IAUD,CAAC;MAEX,CACF,CAAC;IAAA,EACI;EAAC,CACL,CAAC;AAEV,CAAC;AAAC,IAAAU,QAAA,GAAArI,kBAAA,GAEawD,QAAQ,C","sources":["webpack://@capillarytech/blaze-ui/external commonjs2 {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","webpack://@capillarytech/blaze-ui/./components/CapGraph/styles.scss?c92e","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://@capillarytech/blaze-ui/./node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://@capillarytech/blaze-ui/./node_modules/css-loader/dist/runtime/noSourceMaps.js","webpack://@capillarytech/blaze-ui/./components/CapGraph/styles.scss","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/singletonStyleDomAPI.js","webpack://@capillarytech/blaze-ui/./node_modules/react/jsx-runtime.js","webpack://@capillarytech/blaze-ui/./node_modules/css-loader/dist/runtime/api.js","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://@capillarytech/blaze-ui/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://@capillarytech/blaze-ui/./components/CapGraph/constants.ts","webpack://@capillarytech/blaze-ui/external commonjs2 \"bizcharts\"","webpack://@capillarytech/blaze-ui/webpack/bootstrap","webpack://@capillarytech/blaze-ui/webpack/runtime/compat get default export","webpack://@capillarytech/blaze-ui/webpack/runtime/define property getters","webpack://@capillarytech/blaze-ui/webpack/runtime/hasOwnProperty shorthand","webpack://@capillarytech/blaze-ui/webpack/runtime/make namespace object","webpack://@capillarytech/blaze-ui/webpack/runtime/nonce","webpack://@capillarytech/blaze-ui/./components/CapGraph/index.tsx"],"sourcesContent":["module.exports = require(\"react\");","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/singletonStyleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n \n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./styles.scss\";\n \n \n\nvar options = {};\n\n;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./styles.scss\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","\"use strict\";\n\nmodule.exports = function (i) {\n return i[1];\n};","// Imports\nvar ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {};\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join(\"\\n\");\n };\n}();\n\n/* istanbul ignore next */\nfunction apply(styleElement, index, remove, obj) {\n var css;\n if (remove) {\n css = \"\";\n } else {\n css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n }\n\n // For old IE\n /* istanbul ignore if */\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = styleElement.childNodes;\n if (childNodes[index]) {\n styleElement.removeChild(childNodes[index]);\n }\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index]);\n } else {\n styleElement.appendChild(cssNode);\n }\n }\n}\nvar singletonData = {\n singleton: null,\n singletonCounter: 0\n};\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") return {\n update: function update() {},\n remove: function remove() {}\n };\n\n // eslint-disable-next-line no-undef,no-use-before-define\n var styleIndex = singletonData.singletonCounter++;\n var styleElement =\n // eslint-disable-next-line no-undef,no-use-before-define\n singletonData.singleton || (\n // eslint-disable-next-line no-undef,no-use-before-define\n singletonData.singleton = options.insertStyleElement(options));\n return {\n update: function update(obj) {\n apply(styleElement, styleIndex, false, obj);\n },\n remove: function remove(obj) {\n apply(styleElement, styleIndex, true, obj);\n }\n };\n}\nmodule.exports = domAPI;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","import type React from 'react';\n\n/** Default chart height in pixels (BizCharts expects number). */\nexport const DEFAULT_HEIGHT = 400;\n\n/** Default G2 tooltip styles (rem-based, 14px = 1rem). */\nexport const DEFAULT_TOOLTIP_STYLES: {\n g2Tooltip: React.CSSProperties;\n g2TooltipList: React.CSSProperties;\n g2TooltipListItem: React.CSSProperties;\n} = {\n g2Tooltip: {\n position: 'absolute',\n visibility: 'hidden',\n border: '0.071rem solid #efefef',\n backgroundColor: '#fff',\n color: '#46af45',\n opacity: '0.8',\n padding: '0.357rem 1.071rem',\n transition: 'top 200ms, left 200ms',\n },\n g2TooltipList: {\n display: 'flex',\n flexDirection: 'row',\n margin: '0.714rem',\n },\n g2TooltipListItem: {\n marginRight: '0.714rem',\n color: '#000',\n },\n};\n","module.exports = require(\"bizcharts\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","/**\n * CapGraph – chart component built on BizCharts (G2).\n */\n\nimport { Chart, Geom, Axis, Tooltip, Legend, Coord, Guide, Label } from 'bizcharts';\nimport React, { useState, useCallback } from 'react';\n\nimport { DEFAULT_HEIGHT, DEFAULT_TOOLTIP_STYLES } from './constants';\nimport styles from './styles.scss';\nimport type { CapGraphProps } from './types';\n\nconst defaultContainerTpl = () =>\n `<div class=\"g2-tooltip\"><div class=\"g2-tooltip-title\" style=\"margin:10px 0;\"></div><ul class=\"g2-tooltip-list\"></ul></div>`;\n\nconst defaultItemTpl =\n '<li data-index={index}><span style=\"background-color:{color};width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:8px;\"></span>{value}</li>';\n\n// Many optional props + BizCharts children; logic preserved from class component\nconst CapGraph: React.FC<CapGraphProps> = ({\n data,\n xAxis,\n yAxis,\n y1Axis,\n y1AxisProps = {},\n legend,\n g2Tooltip,\n g2TooltipList,\n g2TooltipListItem,\n itemTemplate,\n containerTemplate,\n size,\n scale,\n tooltipData,\n height,\n chartProps = {},\n yAxisProps = {},\n graphList = [],\n xAxisProps = {},\n showGuide,\n coord,\n guide,\n title = null,\n}) => {\n const [tooltipIndex, setTooltipIndex] = useState<number>(0);\n\n const updateTooltipInfo = useCallback((x: number, y: unknown) => {\n setTooltipIndex(x);\n return { name: x, value: y };\n }, []);\n\n let legendType: string = 'circle';\n let legendPosition: string = 'bottom-center';\n let legendProps: Record<string, unknown> = {};\n if (legend) {\n legendType = (legend.marker as string) ?? 'circle';\n legendPosition = (legend.position as string) ?? 'bottom-center';\n const { marker: _m, position: _p, ...rest } = legend;\n legendProps = rest;\n }\n\n const resolvedContainerTpl =\n typeof containerTemplate === 'function' ? containerTemplate : defaultContainerTpl;\n\n const { Text } = Guide;\n\n return (\n <div className={styles['cap-graph-wrapper']} data-testid=\"cap-graph\">\n <Chart height={height ?? DEFAULT_HEIGHT} data={data} forceFit scale={scale} {...chartProps}>\n <Axis name={yAxis} {...yAxisProps} />\n {y1Axis && <Axis name={y1Axis} {...y1AxisProps} />}\n <Axis name={xAxis} {...xAxisProps} />\n\n {coord && <Coord {...coord} />}\n {showGuide && guide && (\n <Guide>\n {data.map((obj, idx) => (\n <Text\n key={(obj.position as string) ?? idx}\n top\n position={obj.position as [string, string]}\n content={obj.content as string}\n style={guide.style}\n />\n ))}\n </Guide>\n )}\n <Tooltip\n offset={50}\n showTitle={false}\n containerTpl={resolvedContainerTpl(tooltipData, tooltipIndex) || defaultContainerTpl}\n itemTpl={itemTemplate ?? defaultItemTpl}\n g2-tooltip={g2Tooltip ?? DEFAULT_TOOLTIP_STYLES.g2Tooltip}\n g2-tooltip-list={g2TooltipList ?? DEFAULT_TOOLTIP_STYLES.g2TooltipList}\n g2-tooltip-list-item={g2TooltipListItem ?? DEFAULT_TOOLTIP_STYLES.g2TooltipListItem}\n />\n <Legend marker={legendType} position={legendPosition} title={title} {...legendProps} />\n {graphList.map(\n ({\n showTooltip,\n tooltip,\n tooltipDisable,\n type,\n groupBy,\n colors,\n shape,\n showlabel,\n label,\n ...rest\n }) => {\n const tooltipProp = showTooltip\n ? tooltip\n : !tooltipDisable && [`${xAxis}*${yAxis}`, updateTooltipInfo];\n return (\n <Geom\n key={type}\n type={type}\n position={`${xAxis}*${yAxis}`}\n color={groupBy && colors ? [groupBy, colors] : undefined}\n size={size}\n tooltip={tooltipProp}\n shape={shape}\n {...rest}\n >\n {showlabel && label && <Label {...label} />}\n </Geom>\n );\n }\n )}\n </Chart>\n </div>\n );\n};\n\nexport default CapGraph;\nexport type { CapGraphProps } from './types';\n"],"names":["DEFAULT_HEIGHT","exports","DEFAULT_TOOLTIP_STYLES","g2Tooltip","position","visibility","border","backgroundColor","color","opacity","padding","transition","g2TooltipList","display","flexDirection","margin","g2TooltipListItem","marginRight","_bizcharts","require","_react","_interopRequireWildcard","_constants","_styles","_interopRequireDefault","_jsxRuntime","_excluded","_excluded2","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_objectWithoutPropertiesLoose","indexOf","defaultContainerTpl","defaultItemTpl","CapGraph","_ref","data","xAxis","yAxis","y1Axis","y1AxisProps","legend","itemTemplate","containerTemplate","size","scale","tooltipData","height","chartProps","yAxisProps","graphList","xAxisProps","showGuide","coord","guide","title","tooltipIndex","setTooltipIndex","useState","updateTooltipInfo","useCallback","x","y","name","value","legendType","legendPosition","legendProps","_ref2","_ref3","marker","rest","resolvedContainerTpl","Text","Guide","jsx","className","styles","children","jsxs","Chart","forceFit","Axis","Coord","map","obj","idx","_ref4","top","content","style","Tooltip","offset","showTitle","containerTpl","itemTpl","Legend","_ref5","showTooltip","tooltip","tooltipDisable","type","groupBy","colors","shape","showlabel","label","tooltipProp","Geom","undefined","Label","_default"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"CapGraph/index.js","mappings":";;;;;;;AAAA,kC;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACa,MAAM,mBAAO,CAAC,IAAO,6KAA6K;AAC/M,kBAAkB,UAAU,eAAe,qBAAqB,6BAA6B,0BAA0B,0DAA0D,4EAA4E,OAAO,wDAAwD,gBAAgB,GAAG,WAAW,GAAG,YAAY;;;;;;;;ACVzW,uC;;;;;;;ACAa;;AAEb,IAAI,IAAqC;AACzC,EAAE,2CAAqE;AACvE,EAAE,KAAK;AAAA,EAEN;;;;;;;;ACND,sC;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;;;;;;;AChBA,IAAAA,UAAA,GAAAC,mBAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,mBAAA;AACA,IAAAG,MAAA,GAAAD,sBAAA,CAAAF,mBAAA;AAA0B,IAAAI,WAAA,GAAAJ,mBAAA;AAAA,MAAAK,SAAA;EAAAC,UAAA;AAR1B;AACA;AACA;AACA;AACA;AAJA,SAAAJ,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAA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external commonjs2 {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","webpack://@capillarytech/blaze-ui/./node_modules/react/cjs/react-jsx-runtime.production.min.js","webpack://@capillarytech/blaze-ui/external commonjs2 \"prop-types\"","webpack://@capillarytech/blaze-ui/./node_modules/react/jsx-runtime.js","webpack://@capillarytech/blaze-ui/external commonjs2 \"bizcharts\"","webpack://@capillarytech/blaze-ui/webpack/bootstrap","webpack://@capillarytech/blaze-ui/./components/CapGraph/index.tsx"],"sourcesContent":["module.exports = require(\"react\");","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","module.exports = require(\"prop-types\");","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","module.exports = require(\"bizcharts\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n *\n * CapGraph\n *\n */\n\nimport { Chart, Geom, Axis, Tooltip, Legend, Coord, Guide, Label } from 'bizcharts';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nconst defaultStyles = {\n g2Tooltip: {\n position: 'absolute',\n visibility: 'hidden',\n border: '1px solid #efefef',\n backgroundColor: '#fff',\n color: '#46af45',\n opacity: '0.8',\n padding: '5px 15px',\n transition: 'top 200ms,left 200ms',\n },\n g2TooltipList: {\n display: 'flex',\n flexDirection: 'row',\n margin: '10px',\n },\n g2TooltipListItem: {\n marginRight: '10px',\n color: '#000',\n },\n};\n\nclass CapGraph extends React.Component {\n state = {\n tooltipIndex: 0, // stores the x-axis value of the data point being hovered on\n };\n\n updateTooltipInfo = (x, y) => {\n this.setState({ tooltipIndex: x });\n return {\n name: x,\n value: y,\n };\n };\n\n render() {\n const {\n data,\n xAxis,\n yAxis,\n y1Axis,\n y1AxisProps,\n legend,\n g2Tooltip,\n g2TooltipList,\n g2TooltipListItem,\n itemTemplate,\n size,\n scale,\n tooltipData,\n height,\n chartProps,\n yAxisProps,\n graphList,\n xAxisProps,\n showGuide,\n coord,\n guide,\n title,\n } = this.props;\n let { containerTemplate } = this.props;\n const { Text } = Guide;\n let legendType = 'circle';\n let legendPosition = 'bottom-center';\n let legendProps = {};\n const defaultHeight = 400;\n const defaultContainerTpl = () =>\n `<div class=\"g2-tooltip\"><div class=\"g2-tooltip-title\" style=\"margin:10px 0;\"></div><ul class=\"g2-tooltip-list\"></ul></div>`;\n const defaultItemTpl =\n '<li data-index={index}><span style=\"background-color:{color};width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:8px;\"></span>{value}</li>';\n\n if (legend) {\n ({ marker: legendType, position: legendPosition, ...legendProps } = legend);\n }\n\n if (typeof containerTemplate !== 'function') {\n containerTemplate = defaultContainerTpl;\n }\n\n return (\n <div>\n <Chart height={height || defaultHeight} data={data} forceFit scale={scale} {...chartProps}>\n <Axis name={yAxis} {...yAxisProps} />\n {y1Axis && <Axis name={y1Axis} {...y1AxisProps} />}\n <Axis name={xAxis} {...xAxisProps} />\n\n {coord && <Coord {...coord} />}\n {showGuide && (\n <Guide>\n {data.map((obj, idx) => (\n <Text\n key={obj.position || idx}\n top\n position={obj.position}\n content={obj.content}\n style={guide.style}\n />\n ))}\n </Guide>\n )}\n <Tooltip\n offset={50}\n showTitle={false}\n containerTpl={\n containerTemplate(tooltipData, this.state.tooltipIndex) || defaultContainerTpl\n }\n itemTpl={itemTemplate || defaultItemTpl}\n g2-tooltip={g2Tooltip || defaultStyles.g2Tooltip}\n g2-tooltip-list={g2TooltipList || defaultStyles.g2TooltipList}\n g2-tooltip-list-item={g2TooltipListItem || defaultStyles.g2TooltipListItem}\n />\n <Legend marker={legendType} position={legendPosition} title={title} {...legendProps} />\n {graphList.map(\n ({\n showTooltip,\n tooltip,\n tooltipDisable,\n type,\n groupBy,\n colors,\n shape,\n showlabel,\n label,\n ...rest\n }) => {\n const tooltipProp = showTooltip\n ? tooltip\n : !tooltipDisable && [`${xAxis}*${yAxis}`, this.updateTooltipInfo];\n return (\n <Geom\n key={type}\n type={type}\n position={`${xAxis}*${yAxis}`}\n color={[groupBy, colors]}\n size={size}\n tooltip={tooltipProp}\n shape={shape}\n {...rest}\n >\n {showlabel && <Label {...label} />}\n </Geom>\n );\n }\n )}\n </Chart>\n </div>\n );\n }\n}\nCapGraph.defaultProps = {\n graphList: [],\n xAxisProps: {},\n yAxisProps: {},\n title: null,\n};\nCapGraph.propTypes = {\n height: PropTypes.number,\n data: PropTypes.array.isRequired,\n xAxis: PropTypes.string.isRequired,\n yAxis: PropTypes.string.isRequired,\n legend: PropTypes.object,\n g2Tooltip: PropTypes.object,\n g2TooltipList: PropTypes.object,\n g2TooltipListItem: PropTypes.object,\n itemTemplate: PropTypes.string,\n containerTemplate: PropTypes.func,\n size: PropTypes.number,\n scale: PropTypes.object,\n tooltipData: PropTypes.object,\n graphList: PropTypes.array,\n yAxisProps: PropTypes.object,\n xAxisProps: PropTypes.object,\n chartProps: PropTypes.object,\n title: PropTypes.object,\n showGuide: PropTypes.bool,\n coord: PropTypes.object,\n guide: PropTypes.object,\n};\n\nexport default CapGraph;\n"],"names":["_bizcharts","require","_propTypes","_interopRequireDefault","_react","_jsxRuntime","_excluded","_excluded2","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_objectWithoutPropertiesLoose","indexOf","defaultStyles","g2Tooltip","position","visibility","border","backgroundColor","color","opacity","padding","transition","g2TooltipList","display","flexDirection","margin","g2TooltipListItem","marginRight","CapGraph","React","Component","constructor","state","tooltipIndex","updateTooltipInfo","x","y","setState","name","value","render","data","xAxis","yAxis","y1Axis","y1AxisProps","legend","itemTemplate","size","scale","tooltipData","height","chartProps","yAxisProps","graphList","xAxisProps","showGuide","coord","guide","title","props","containerTemplate","Text","Guide","legendType","legendPosition","legendProps","defaultHeight","defaultContainerTpl","defaultItemTpl","_legend","marker","jsx","children","jsxs","Chart","forceFit","Axis","Coord","map","obj","idx","top","content","style","Tooltip","offset","showTitle","containerTpl","itemTpl","Legend","_ref","showTooltip","tooltip","tooltipDisable","type","groupBy","colors","shape","showlabel","label","rest","tooltipProp","Geom","Label","defaultProps","propTypes","PropTypes","number","array","isRequired","string","object","func","bool","_default","exports"],"sourceRoot":""}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# CapHamburgerMenu
|
|
2
|
+
|
|
3
|
+
A hamburger menu component for mobile view that provides a drawer-based navigation menu with organization selection, product switching, and sidebar content.
|
|
4
|
+
|
|
5
|
+
## Migration from Ant Design v3 to v6
|
|
6
|
+
|
|
7
|
+
This component has been migrated from Ant Design v3 to v6 with the following changes:
|
|
8
|
+
|
|
9
|
+
### Breaking Changes
|
|
10
|
+
|
|
11
|
+
#### 1. Component Structure Changes
|
|
12
|
+
|
|
13
|
+
| Change | Description | Migration Guide |
|
|
14
|
+
|--------|-------------|-----------------|
|
|
15
|
+
| Class Component → Functional Component | Component converted from class to functional component | No API changes required, internal refactoring only |
|
|
16
|
+
| PropTypes → TypeScript | All PropTypes removed, replaced with TypeScript interfaces | No migration needed, types are now in `types.ts` |
|
|
17
|
+
| styled-components → CSS Modules | Removed styled-components dependency, using CSS Modules | No API changes, styling approach updated internally |
|
|
18
|
+
|
|
19
|
+
#### 2. Ant Design Drawer Component API Changes
|
|
20
|
+
|
|
21
|
+
The component uses `CapDrawer` which handles the `visible` → `open` prop migration internally. No changes needed in consumer code.
|
|
22
|
+
|
|
23
|
+
### Backward Compatibility
|
|
24
|
+
|
|
25
|
+
The component maintains full backward compatibility:
|
|
26
|
+
- All props remain the same
|
|
27
|
+
- Component behavior is unchanged
|
|
28
|
+
- Internal implementation updated to use modern React patterns
|
|
29
|
+
|
|
30
|
+
### Style Changes
|
|
31
|
+
|
|
32
|
+
**Approach**: Most styling uses CSS Modules with design tokens. Some Ant Design overrides remain due to structural requirements:
|
|
33
|
+
|
|
34
|
+
- **Drawer width (75% viewport)**: Cannot be tokenized, uses `:global` override with comment
|
|
35
|
+
- **Custom padding values**: Cannot use single-value tokens, uses CSS Modules
|
|
36
|
+
- **Layout positioning**: Footer positioning requires structural overrides
|
|
37
|
+
|
|
38
|
+
All overrides include `// OVERRIDE:` comments explaining why tokenization is not possible.
|
|
39
|
+
|
|
40
|
+
### Code Improvements
|
|
41
|
+
|
|
42
|
+
1. **Removed PropTypes**: Replaced with TypeScript interfaces in `types.ts`
|
|
43
|
+
2. **Removed defaultProps**: Using destructuring with default values in function arguments
|
|
44
|
+
3. **Converted to functional component**: Modern React hooks (`useState`, `useEffect`, `useMemo`)
|
|
45
|
+
4. **Removed styled-components**: Replaced with CSS Modules
|
|
46
|
+
5. **TypeScript support**: Full type definitions for all props and internal structures
|
|
47
|
+
6. **Improved state management**: Using React hooks for cleaner state handling
|
|
48
|
+
|
|
49
|
+
### What Stayed the Same
|
|
50
|
+
|
|
51
|
+
- All component props and API
|
|
52
|
+
- Component behavior and functionality
|
|
53
|
+
- Sidebar menu structure
|
|
54
|
+
- Organization selection logic
|
|
55
|
+
- Product switching functionality
|
|
56
|
+
- Visual appearance (styling preserved)
|
|
57
|
+
|
|
58
|
+
### What Changed
|
|
59
|
+
|
|
60
|
+
- **Removed**: `PropTypes` (replaced with TypeScript types)
|
|
61
|
+
- **Removed**: `styled-components` dependency (replaced with CSS Modules)
|
|
62
|
+
- **Removed**: Class component syntax (converted to functional component)
|
|
63
|
+
- **Updated**: State management (using React hooks)
|
|
64
|
+
- **Added**: TypeScript type definitions in `types.ts`
|
|
65
|
+
- **Added**: CSS Modules with `styles[classname]` syntax
|
|
66
|
+
|
|
67
|
+
## Props
|
|
68
|
+
|
|
69
|
+
### Standard Props
|
|
70
|
+
|
|
71
|
+
| Prop | Type | Default | Description |
|
|
72
|
+
|------|------|---------|-------------|
|
|
73
|
+
| `goToHome` | `() => void` | - | Function to navigate to home page |
|
|
74
|
+
| `placement` | `'left' \| 'right' \| 'top' \| 'bottom'` | `'left'` | Drawer placement |
|
|
75
|
+
| `productName` | `string` | - | Product name to display in drawer header |
|
|
76
|
+
| `userData` | `UserData` | `{}` | User data including organization and module information |
|
|
77
|
+
| `loadStorageItem` | `(key: string) => string \| number \| null` | - | Function to load item from storage |
|
|
78
|
+
| `changeOrgEntity` | `(orgId: number, ouId?: number) => void` | - | Function to change organization entity |
|
|
79
|
+
| `selectOrganization` | `string` | - | Text for organization selection label |
|
|
80
|
+
| `sidebarContent` | `SidebarMenuItem[]` | `[]` | Sidebar menu content items |
|
|
81
|
+
| `selectedSidebarItem` | `string` | - | Currently selected sidebar item value |
|
|
82
|
+
| `onSidebarClick` | `(item: SidebarMenuItem) => void` | - | Handler for sidebar item click |
|
|
83
|
+
| `noResultsText` | `string` | - | Text to display when no results found |
|
|
84
|
+
| `footer` | `React.ReactElement` | - | Footer element to display in drawer |
|
|
85
|
+
| `screenHeight` | `number` | - | Screen height in pixels (for virtualized list) |
|
|
86
|
+
| `screenWidth` | `number` | - | Screen width in pixels (for virtualized list) |
|
|
87
|
+
| `insights` | `string` | - | Insights product name (for internationalization) |
|
|
88
|
+
| `selectProduct` | `string` | - | Text for product selection label |
|
|
89
|
+
| `defaultSelectedProduct` | `string` | - | Default selected product value |
|
|
90
|
+
|
|
91
|
+
### Type Definitions
|
|
92
|
+
|
|
93
|
+
#### SidebarMenuItem
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
interface SidebarMenuItem {
|
|
97
|
+
label: string;
|
|
98
|
+
value: string;
|
|
99
|
+
children?: SidebarMenuItem[];
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### UserData
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
interface UserData {
|
|
107
|
+
user?: {
|
|
108
|
+
loginName?: string;
|
|
109
|
+
org_id?: string | number;
|
|
110
|
+
proxyOrgList?: Array<{
|
|
111
|
+
orgID: string | number;
|
|
112
|
+
orgName: string;
|
|
113
|
+
ouList?: Array<{
|
|
114
|
+
ouName: string;
|
|
115
|
+
ouID: string | number;
|
|
116
|
+
}>;
|
|
117
|
+
}>;
|
|
118
|
+
accessibleOUList?: Record<string, string | number>;
|
|
119
|
+
};
|
|
120
|
+
currentOrgDetails?: {
|
|
121
|
+
module_details?: Array<{
|
|
122
|
+
name: string;
|
|
123
|
+
namespace: string;
|
|
124
|
+
url: string;
|
|
125
|
+
code: string;
|
|
126
|
+
}>;
|
|
127
|
+
};
|
|
128
|
+
orgDetails?: {
|
|
129
|
+
name?: string;
|
|
130
|
+
org_id?: string | number;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Usage
|
|
136
|
+
|
|
137
|
+
### Basic Example
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
import CapHamburgerMenu from '@capillarytech/blaze-ui/components/CapHamburgerMenu';
|
|
141
|
+
|
|
142
|
+
const MyComponent = () => {
|
|
143
|
+
const sidebarContent = [
|
|
144
|
+
{
|
|
145
|
+
label: 'Dashboard',
|
|
146
|
+
value: 'dashboard',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
label: 'Reports',
|
|
150
|
+
value: 'reports',
|
|
151
|
+
children: [
|
|
152
|
+
{ label: 'Sales Report', value: 'sales-report' },
|
|
153
|
+
{ label: 'Customer Report', value: 'customer-report' },
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
];
|
|
157
|
+
|
|
158
|
+
return (
|
|
159
|
+
<CapHamburgerMenu
|
|
160
|
+
productName="My Product"
|
|
161
|
+
sidebarContent={sidebarContent}
|
|
162
|
+
userData={{
|
|
163
|
+
user: {
|
|
164
|
+
loginName: 'john.doe',
|
|
165
|
+
},
|
|
166
|
+
}}
|
|
167
|
+
loadStorageItem={(key) => localStorage.getItem(key)}
|
|
168
|
+
changeOrgEntity={(orgId, ouId) => {
|
|
169
|
+
console.log('Changed org:', orgId, ouId);
|
|
170
|
+
}}
|
|
171
|
+
selectOrganization="Select Organization"
|
|
172
|
+
onSidebarClick={(item) => {
|
|
173
|
+
console.log('Clicked:', item.value);
|
|
174
|
+
}}
|
|
175
|
+
/>
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### With Organization Selection
|
|
181
|
+
|
|
182
|
+
```tsx
|
|
183
|
+
<CapHamburgerMenu
|
|
184
|
+
productName="Analytics"
|
|
185
|
+
userData={{
|
|
186
|
+
user: {
|
|
187
|
+
loginName: 'user@example.com',
|
|
188
|
+
proxyOrgList: [
|
|
189
|
+
{
|
|
190
|
+
orgID: 1,
|
|
191
|
+
orgName: 'Organization 1',
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
orgID: 2,
|
|
195
|
+
orgName: 'Organization 2',
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
},
|
|
199
|
+
orgDetails: {
|
|
200
|
+
name: 'Organization 1',
|
|
201
|
+
org_id: 1,
|
|
202
|
+
},
|
|
203
|
+
}}
|
|
204
|
+
loadStorageItem={(key) => {
|
|
205
|
+
const value = localStorage.getItem(key);
|
|
206
|
+
return value ? parseInt(value, 10) : null;
|
|
207
|
+
}}
|
|
208
|
+
changeOrgEntity={(orgId, ouId) => {
|
|
209
|
+
localStorage.setItem('orgID', String(orgId));
|
|
210
|
+
if (ouId) {
|
|
211
|
+
localStorage.setItem('ouId', String(ouId));
|
|
212
|
+
}
|
|
213
|
+
}}
|
|
214
|
+
selectOrganization="Select Organization"
|
|
215
|
+
screenHeight={window.innerHeight}
|
|
216
|
+
screenWidth={window.innerWidth}
|
|
217
|
+
/>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Dependencies
|
|
221
|
+
|
|
222
|
+
The component uses the following external packages (already included in `blaze-ui` dependencies):
|
|
223
|
+
|
|
224
|
+
- `react-virtualized`: For virtualized list rendering
|
|
225
|
+
- `semantic-ui-react`: For List component
|
|
226
|
+
- `lodash`: For utility functions (peer dependency)
|
|
227
|
+
|
|
228
|
+
## Notes
|
|
229
|
+
|
|
230
|
+
- The component is designed for mobile views
|
|
231
|
+
- Organization selection uses virtualized lists for performance
|
|
232
|
+
- Product switching navigates to different module URLs
|
|
233
|
+
- Sidebar menu supports nested items with expand/collapse functionality
|
|
234
|
+
- Component uses CSS Modules for styling with design tokens where possible
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Test Cases: CapHamburgerMenu (Antd v3→v6)
|
|
2
|
+
|
|
3
|
+
## Use Cases
|
|
4
|
+
|
|
5
|
+
| ID | Use Case | Props/Config | Expected Visual/Behavior | Priority | Storybook Story | Notes |
|
|
6
|
+
|----|----------|--------------|-------------------------|----------|-----------------|-------|
|
|
7
|
+
| UC-001 | Drawer open/close interactions | Click hamburger icon | Drawer opens from left side, clicking icon again closes drawer, clicking outside closes drawer | P0 | DrawerInteractions | Core functionality - drawer toggle |
|
|
8
|
+
| UC-002 | Sidebar content rendering - empty state | sidebarContent: [] or undefined | No menu items displayed, only header with logo and user info | P1 | EmptySidebar | Empty state handling |
|
|
9
|
+
| UC-003 | Sidebar content rendering - flat menu items | sidebarContent: [{label: "Item1", value: "1"}, {label: "Item2", value: "2"}] | Menu items render as flat list without expand/collapse icons | P0 | FlatMenuItems | Basic menu rendering |
|
|
10
|
+
| UC-004 | Sidebar content rendering - nested menu items | sidebarContent: [{label: "Parent", children: [{label: "Child1", value: "c1"}]}] | Parent item shows chevron icon, first parent expanded by default, children render when expanded | P0 | NestedMenuItems | Expandable menu structure |
|
|
11
|
+
| UC-005 | Menu item expansion/collapse | Click parent menu item with children | Parent item toggles expanded state, chevron icon changes (up/down), children show/hide | P0 | MenuExpansion | Interactive menu behavior |
|
|
12
|
+
| UC-006 | Sidebar item selection | selectedSidebarItem: "item1", onSidebarClick handler | Selected item shows selected styling (blue background, left border), clicking different item calls onSidebarClick, clicking same item does nothing | P0 | SidebarSelection | Selection state and callbacks |
|
|
13
|
+
| UC-007 | Organization selection display - no selection | loadStorageItem returns null/undefined | Shows "Select Organization" placeholder text with logo icon | P1 | OrgDisplayNoSelection | Default state |
|
|
14
|
+
| UC-008 | Organization selection display - org only | loadStorageItem('orgID') returns valid org, no OU | Shows organization name with logo icon, chevron-right icon | P0 | OrgDisplayOrgOnly | Basic org display |
|
|
15
|
+
| UC-009 | Organization selection display - org with OU | loadStorageItem returns org and OU | Shows OU name as primary label, org name as secondary label below, both with ellipsis for overflow | P0 | OrgDisplayWithOU | Nested org structure |
|
|
16
|
+
| UC-010 | Organization selection box open/close | Click organization selection area | Opens CapSlideBox with search input and org list, back button closes slidebox | P0 | OrgSelectionBox | Slidebox interaction |
|
|
17
|
+
| UC-011 | Organization search functionality | Type in search input, orgSearchText state updates | Filters org list by label (case-insensitive), filters OU list within orgs, shows filtered results | P0 | OrgSearch | Search filtering |
|
|
18
|
+
| UC-012 | Organization search - no results | Search query matches no orgs/OUs | Shows no results state with alert icon and noResultsText message | P1 | OrgSearchNoResults | Empty search state |
|
|
19
|
+
| UC-013 | Organization selection - org without OUs | Click org item without accessibleOus | Calls changeOrgEntity with orgID, closes slidebox, updates selected org display | P0 | OrgSelectionSimple | Basic org selection |
|
|
20
|
+
| UC-014 | Organization selection - org with OUs | Click org item with accessibleOus, then click OU | Shows OU list under org, clicking OU calls changeOrgEntity with orgID and ouId, updates display to show OU | P0 | OrgSelectionWithOU | Nested selection flow |
|
|
21
|
+
| UC-015 | Product list display | Click more applications icon | Opens CapSlideBox with product list from module_details, excludes "masters" product, shows insights+ product | P0 | ProductListDisplay | Product list rendering |
|
|
22
|
+
| UC-016 | Product change | Click product item in list | If product.url differs from current pathname, navigates to product.url, closes product list | P0 | ProductChange | Navigation behavior |
|
|
23
|
+
| UC-017 | Product list - selected product | defaultSelectedProduct matches product value | Selected product shows selected styling (blue background, left border) | P1 | ProductSelection | Visual selection state |
|
|
24
|
+
| UC-018 | Header content display | productName, userData.user.loginName provided | Shows more applications icon, logo with productName, user loginName below logo, organization selection | P0 | HeaderContent | Header rendering |
|
|
25
|
+
| UC-019 | Footer display | footer prop provided as React element | Footer renders at bottom of drawer when drawer is open, shows ant-drawer-footer styling | P1 | FooterDisplay | Footer rendering |
|
|
26
|
+
| UC-020 | Placement and styling props | placement: "left" | "right", screenHeight, screenWidth, className | Drawer opens from specified side, org list height calculated from screenHeight, search width from screenWidth, custom className applied | P1 | PlacementAndStyling | Layout and positioning |
|
|
27
|
+
|
|
28
|
+
## Grouping Rationale
|
|
29
|
+
|
|
30
|
+
- **UC-001**: Grouped all drawer open/close interactions (icon click, outside click, toggle)
|
|
31
|
+
- **UC-002-004**: Grouped all sidebar content rendering scenarios (empty, flat, nested)
|
|
32
|
+
- **UC-005**: Single test for expansion/collapse toggle behavior
|
|
33
|
+
- **UC-006**: Single test for selection state and callback handling
|
|
34
|
+
- **UC-007-009**: Grouped all organization display variants (no selection, org only, org+OU)
|
|
35
|
+
- **UC-010**: Single test for slidebox open/close
|
|
36
|
+
- **UC-011-012**: Grouped search functionality and empty state
|
|
37
|
+
- **UC-013-014**: Grouped organization selection scenarios (simple and with OUs)
|
|
38
|
+
- **UC-015-017**: Grouped product list display, change, and selection
|
|
39
|
+
- **UC-018**: Single test for all header content
|
|
40
|
+
- **UC-019**: Single test for footer
|
|
41
|
+
- **UC-020**: Grouped all layout/styling props
|
|
42
|
+
|
|
43
|
+
## Migration Notes (v3→v6)
|
|
44
|
+
|
|
45
|
+
- CapDrawer uses `visible` prop (v3) vs `open` prop (v6) - verify prop name migration
|
|
46
|
+
- Virtualized.List from react-virtualized used for org list - verify if needs migration to react-window or similar
|
|
47
|
+
- Semantic UI List component used - verify if needs migration to Ant Design List
|
|
48
|
+
- componentWillReceiveProps deprecated - verify migration to componentDidUpdate or getDerivedStateFromProps
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CapHamburgerMenuProps } from './types';
|
|
3
|
+
declare const CapHamburgerMenu: React.FC<CapHamburgerMenuProps>;
|
|
4
|
+
export default CapHamburgerMenu;
|
|
5
|
+
export type { CapHamburgerMenuProps } from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapHamburgerMenu/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAgBpE,OAAO,KAAK,EACV,qBAAqB,EAOtB,MAAM,SAAS,CAAC;AAOjB,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAwmBrD,CAAC;AAEF,eAAe,gBAAgB,CAAC;AAChC,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
|