@dexteel/mesf-core 4.4.2 → 4.4.3

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.esm.js CHANGED
@@ -7929,11 +7929,25 @@ var CustomOptionsComponent = function (_a) {
7929
7929
  var css$1 = "/* ContextMenu.css */\n.context-menu {\n position: absolute;\n z-index: 1000;\n background-color: #fff;\n border: 1px solid #ddd;\n box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);\n border-radius: 4px;\n overflow: hidden;\n}\n\n .context-menu ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .context-menu li {\n padding: 8px 15px;\n cursor: pointer;\n border-bottom: 1px solid #eee;\n background-color: #fff;\n color: #333;\n font-size: 14px;\n }\n\n .context-menu li:hover {\n background-color: #f5f5f5;\n }\n\n\n";
7930
7930
  n(css$1,{});
7931
7931
 
7932
+ var tagColors = [
7933
+ '#2E4053',
7934
+ '#5D6D7E',
7935
+ '#85929E',
7936
+ '#A93226',
7937
+ '#CD6155',
7938
+ '#2ECC71',
7939
+ '#58D68D',
7940
+ '#239B56',
7941
+ '#7D3C98',
7942
+ '#C39BD3' // Lavanda
7943
+ ];
7944
+
7932
7945
  var TagSelectionModal = function (_a) {
7933
7946
  var isOpen = _a.isOpen; _a.onClose; var onTagSelect = _a.onTagSelect;
7934
7947
  var _b = useState(true), isLoading = _b[0], setIsLoading = _b[1];
7935
7948
  var _c = useState([]), treeData = _c[0], setTreeData = _c[1];
7936
7949
  var _d = useState([]), expanded = _d[0], setExpanded = _d[1];
7950
+ var currentColorIndex = useRef(0);
7937
7951
  useEffect(function () {
7938
7952
  var loadData = function () { return __awaiter(void 0, void 0, void 0, function () {
7939
7953
  var children;
@@ -7954,6 +7968,11 @@ var TagSelectionModal = function (_a) {
7954
7968
  }); };
7955
7969
  loadData();
7956
7970
  }, [isOpen]);
7971
+ var getColor = function () {
7972
+ var color = tagColors[currentColorIndex.current];
7973
+ currentColorIndex.current = (currentColorIndex.current + 1) % tagColors.length;
7974
+ return color;
7975
+ };
7957
7976
  var fetchChildren = function (tagName, depth, maxDepth) {
7958
7977
  if (depth === void 0) { depth = 0; }
7959
7978
  if (maxDepth === void 0) { maxDepth = 3; }
@@ -7991,7 +8010,7 @@ var TagSelectionModal = function (_a) {
7991
8010
  tagId: dbTag.tagId,
7992
8011
  tagName: dbTag.tagName,
7993
8012
  tagType: dbTag.tagType,
7994
- color: '#FF0000',
8013
+ color: getColor(),
7995
8014
  autoScale: true,
7996
8015
  minScale: null,
7997
8016
  maxScale: null,
@@ -8493,7 +8512,7 @@ var Trending = function (_a) {
8493
8512
  return React__default.createElement("p", null,
8494
8513
  "Error: ",
8495
8514
  error);
8496
- return (React__default.createElement(Grid$1, { container: true, style: { width: '95svw', height: '84svh', margin: 0 } },
8515
+ return (React__default.createElement(Grid$1, { container: true, style: { width: '95svw', height: '81svh', margin: 0 } },
8497
8516
  React__default.createElement(Grid$1, { item: true, xs: 12, style: { height: '15%' } },
8498
8517
  React__default.createElement(Grid$1, { container: true, justify: "space-between", alignItems: "center", style: { height: '100%' } },
8499
8518
  React__default.createElement(Grid$1, { item: true, xs: 3 },
@@ -0,0 +1 @@
1
+ export declare const tagColors: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexteel/mesf-core",
3
- "version": "4.4.2",
3
+ "version": "4.4.3",
4
4
  "author": "Dexteel Team",
5
5
  "module": "dist/index.esm.js",
6
6
  "typings": "dist/index.d.ts",