-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOrgChartDemo.json
1 lines (1 loc) · 13 KB
/
OrgChartDemo.json
1
{"uuid":"bac2a00e-ced2-11ef-87f5-7f4681406426","page":{"id":362328103,"data":{"appState":"[\"~#iR\",[\"^ \",\"n\",\"appTemplate\",\"v\",[\"^ \",\"appMaxWidth\",\"none\",\"appStyles\",\"\",\"appTesting\",null,\"appThemeId\",null,\"appThemeModeId\",null,\"appThemeName\",null,\"createdAt\",null,\"customComponentCollections\",[[\"^ \",\"collectionName\",\"ReactOrgChart\",\"collectionRevisionUuid\",\"1660f4bf-6d90-4caf-af03-53c713a2577d\",\"collectionUuid\",\"31816e97-3269-440d-852e-d544e562e06b\"]],\"customDocumentTitle\",\"\",\"customDocumentTitleEnabled\",false,\"customShortcuts\",[],\"experimentalDataTabEnabled\",true,\"experimentalFeatures\",[\"^ \",\"disableMultiplayerEditing\",false,\"multiplayerEditingEnabled\",false,\"sourceControlTemplateDehydration\",false],\"folders\",[\"~#iL\",[]],\"formAppSettings\",[\"^ \",\"customRedirectUrl\",\"\"],\"inAppRetoolPillAppearance\",\"NO_OVERRIDE\",\"instrumentationEnabled\",false,\"internationalizationSettings\",[\"^ \",\"internationalizationEnabled\",false,\"internationalizationFiles\",[]],\"isFetching\",false,\"isFormApp\",false,\"isGlobalWidget\",false,\"isMobileApp\",false,\"loadingIndicatorsDisabled\",false,\"markdownLinkBehavior\",\"auto\",\"mobileAppSettings\",[\"^ \",\"displaySetting\",[\"^ \",\"landscapeMode\",false,\"tabletMode\",false],\"mobileOfflineModeBannerMode\",\"default\",\"mobileOfflineModeDelaySync\",false,\"mobileOfflineModeEnabled\",false],\"mobileOfflineAssets\",[],\"multiScreenMobileApp\",false,\"notificationsSettings\",[\"^ \",\"globalQueryShowFailureToast\",true,\"globalQueryShowSuccessToast\",false,\"globalQueryToastDuration\",4.5,\"globalToastPosition\",\"bottomRight\"],\"pageCodeFolders\",[\"^ \"],\"pageLoadValueOverrides\",[\"^E\",[]],\"plugins\",[\"~#iOM\",[\"OrgChartData\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"OrgChartData\",\"uuid\",null,\"type\",\"function\",\"subtype\",\"Function\",\"namespace\",null,\"resourceName\",null,\"resourceDisplayName\",null,\"template\",[\"^18\",[\"funcBody\",\"const generateDepartmentalTree = () => {\\n const User = () => {\\n const id = chance.guid();\\n const imageUrl = `https://api.dicebear.com/9.x/pixel-art/svg?seed=${id}`;\\n \\n return {\\n id,\\n name: chance.name(),\\n email: chance.email(),\\n position: chance.profession(),\\n imageUrl,\\n parentId: null, // Initially, no parent\\n }\\n };\\n\\n const CEO = User(); // Root node\\n const users = Array.from({ length: 100 }, () => User()); // Create 100 users\\n\\n // Chunk users into departments\\n const departmentSize = 10; // Adjust department size as needed\\n const departments = [];\\n for (let i = 0; i < users.length; i += departmentSize) {\\n departments.push(users.slice(i, i + departmentSize));\\n }\\n\\n // Assign a parent for each department\\n departments.forEach(department => {\\n const departmentParent = department[0]; // Pick the first user as the department parent\\n department.slice(1).forEach(user => {\\n user.parentId = departmentParent.id; // Set parent ID for other users in the department\\n });\\n departmentParent.parentId = CEO.id; // Set department parent to report to the CEO\\n });\\n\\n return [CEO, ...users];\\n};\\n\\nreturn generateDepartmentalTree();\\n\",\"value\",\"\"]],\"style\",null,\"position2\",null,\"mobilePosition2\",null,\"mobileAppPosition\",null,\"tabIndex\",null,\"container\",\"\",\"^7\",\"~m1736269248391\",\"updatedAt\",\"~m1736460341653\",\"folder\",\"\",\"screen\",null]]],\"$main\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"$main\",\"^19\",null,\"^1:\",\"frame\",\"^1;\",\"Frame\",\"^1<\",null,\"^1=\",null,\"^1>\",null,\"^1?\",[\"^18\",[\"type\",\"main\",\"sticky\",null,\"padding\",\"8px 12px\",\"enableFullBleed\",false,\"isHiddenOnDesktop\",false,\"isHiddenOnMobile\",false]],\"^1@\",[\"^18\",[]],\"^1A\",null,\"^1B\",null,\"^1C\",null,\"^1D\",null,\"^1E\",\"\",\"^7\",\"~m1730822437822\",\"^1F\",\"~m1730822437822\",\"^1G\",\"\",\"^1H\",null]]],\"$appStyles\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"$appStyles\",\"^19\",null,\"^1:\",\"setting\",\"^1;\",\"AppStyles\",\"^1<\",null,\"^1=\",null,\"^1>\",null,\"^1?\",[\"^18\",[\"value\",\"\"]],\"^1@\",null,\"^1A\",null,\"^1B\",null,\"^1C\",null,\"^1D\",null,\"^1E\",\"\",\"^7\",\"~m1734112006195\",\"^1F\",\"~m1736460684755\",\"^1G\",\"\",\"^1H\",null]]],\"container1\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"container1\",\"^19\",\"9e619656-e17d-4341-9de0-e277dcbda306\",\"^1:\",\"widget\",\"^1;\",\"ContainerWidget2\",\"^1<\",null,\"^1=\",null,\"^1>\",null,\"^1?\",[\"^18\",[\"_direction\",\"horizontal\",\"_disabledByIndex\",[\"^E\",[\"\"]],\"heightType\",\"auto\",\"currentViewKey\",null,\"iconByIndex\",[],\"_flexWrap\",false,\"clickable\",false,\"_iconByIndex\",[\"^E\",[\"\"]],\"headerPadding\",\"4px 12px\",\"showFooterBorder\",true,\"_align\",\"start\",\"enableFullBleed\",false,\"showBorder\",true,\"hidden\",false,\"showHeader\",true,\"hoistFetching\",true,\"margin\",\"4px 8px\",\"views\",[],\"showInEditor\",false,\"tooltipText\",\"\",\"padding\",\"12px\",\"_justify\",\"start\",\"style\",[\"^18\",[\"background\",\"rgba(0, 0, 0, 1)\",\"headerBackground\",\"surfacePrimary\"]],\"hiddenByIndex\",[],\"_hiddenByIndex\",[\"^E\",[\"\"]],\"currentViewIndex\",null,\"_hasMigratedNestedItems\",true,\"transition\",\"none\",\"showHeaderBorder\",true,\"footerPadding\",\"4px 12px\",\"itemMode\",\"static\",\"_gap\",\"\",\"_tooltipByIndex\",[\"^E\",[\"\"]],\"tooltipByIndex\",[],\"showFooter\",false,\"_viewKeys\",[\"^E\",[\"View 1\"]],\"_type\",\"grid\",\"events\",[\"^18\",[]],\"_ids\",[\"^E\",[\"0f588\"]],\"viewKeys\",[],\"iconPositionByIndex\",[],\"_iconPositionByIndex\",[\"^E\",[\"\"]],\"hovered\",false,\"loading\",false,\"overflowType\",\"hidden\",\"disabled\",false,\"_labels\",[\"^E\",[\"\"]],\"disabledByIndex\",[],\"maintainSpaceWhenHidden\",false,\"showBody\",true,\"labels\",[]]],\"^1@\",[\"^18\",[]],\"^1A\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^1:\",\"grid\",\"^1E\",\"\",\"rowGroup\",\"body\",\"subcontainer\",\"\",\"row\",0,\"col\",1,\"height\",0.9999999999999982,\"width\",10,\"tabNum\",0,\"stackPosition\",[\"^ \",\"ordinal\",0,\"widthType\",\"fixed\",\"^1L\",0,\"^1K\",0]]]],\"^1B\",null,\"^1C\",null,\"^1D\",null,\"^1E\",\"\",\"^7\",\"~m1736280068364\",\"^1F\",\"~m1736460684230\",\"^1G\",\"\",\"^1H\",null]]],\"orgChart1\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"orgChart1\",\"^19\",\"e5ed6e7a-e1c7-4afc-b588-57cae6354f9e\",\"^1:\",\"widget\",\"^1;\",\"DynamicWidget_ReactOrgChart_OrgChart\",\"^1<\",null,\"^1=\",null,\"^1>\",null,\"^1?\",[\"^18\",[\"heightType\",\"fixed\",\"nodeWidth\",\"250\",\"onNodeClick\",\"{}\",\"nodeHeight\",\"160\",\"linkColor\",\"rebeccapurple\",\"layout\",\"top\",\"data\",\"{{ OrgChartData.value }}\",\"neighbourMargin\",\"80\",\"compactMarginPair\",\"100\",\"linkWidth\",\"5\",\"childrenMargin\",\"80\",\"showControls\",false,\"nodeTemplateStyle\",\".container {\\n /*padding-top: 30px;*/\\n margin-left: 1px;\\n border-radius: 6px;\\n overflow: visible;\\n height: <? node.height ?>px;\\n background-color: #FFF;\\n}\\n\\n.content {\\n height: calc(<? node.height ?>px - 32px);\\n}\\n\\n.userpic {\\n width: 60px;\\n height: 60px;\\n margin-top:-20px;\\n background-color: #FFF;\\n margin-left: calc(<? node.width ?>px / 2 - 33px);\\n border-radius: 100px;\\n border: 2px solid <? node.linkColor ?>;\\n}\\n\\n.hr {\\n margin-top: -48px;\\n height: 10px;\\n border-radius: 6px 6px 0 0;\\n background-color: <? node.linkColor ?>;\\n}\\n\\n.footer {\\n display: flex;\\n justify-content: space-between;\\n margin-top: 32px;\\n padding: 5px 15px;\\n}\\n\\n.userinfo {\\n padding: 50px 10px 0;\\n text-align: center;\\n \\n .name {\\n color: #111672;\\n font-size: 16px;\\n font-weight: bold;\\n }\\n\\n .position {\\n color: #404040;\\n font-size: 16px;\\n margin-top: 4px;\\n }\\n}\",\"compactMarginBetween\",\"80\",\"events\",[\"^18\",[]],\"collectionUuid\",\"31816e97-3269-440d-852e-d544e562e06b\",\"nodeTemplate\",\"<div class=\\\"container\\\">\\n <div class=\\\"content\\\">\\n <img class=\\\"userpic\\\" src=\\\"<? user.imageUrl ?>\\\" />\\n <div class=\\\"hr\\\"></div>\\n <div class=\\\"userinfo\\\">\\n <div class=\\\"name\\\">\\n <? user.name ?>\\n </div>\\n <div class=\\\"position\\\">\\n <? user.position ?>\\n </div>\\n </div>\\n <div class=\\\"footer\\\">\\n <div>Manages: <? user._directSubordinates ?> 👤</div>\\n <div>Oversees: <? user._totalSubordinates ?> 👤</div>\\n </div>\\n </div>\\n</div>\",\"siblingsMargin\",\"80\"]],\"^1@\",[\"^18\",[]],\"^1A\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^1:\",\"grid\",\"^1E\",\"container1\",\"^1I\",\"body\",\"^1J\",\"0f588\",\"row\",0,\"col\",0,\"^1K\",16,\"^1L\",12,\"^1M\",0,\"^1N\",[\"^ \",\"^1O\",0,\"^1P\",\"fixed\",\"^1L\",0,\"^1K\",0]]]],\"^1B\",null,\"^1C\",null,\"^1D\",null,\"^1E\",\"\",\"^7\",\"~m1736459014831\",\"^1F\",\"~m1736463053193\",\"^1G\",\"\",\"^1H\",null]]],\"text1\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"text1\",\"^19\",\"249fd355-c7de-4cf5-80a9-d05504c0a4a1\",\"^1:\",\"widget\",\"^1;\",\"TextWidget2\",\"^1<\",null,\"^1=\",null,\"^1>\",null,\"^1?\",[\"^18\",[\"heightType\",\"auto\",\"horizontalAlign\",\"center\",\"hidden\",false,\"imageWidth\",\"fit\",\"margin\",\"4px 8px\",\"showInEditor\",false,\"verticalAlign\",\"center\",\"tooltipText\",\"\",\"value\",\"# Org Chart Demo\",\"disableMarkdown\",false,\"overflowType\",\"scroll\",\"maintainSpaceWhenHidden\",false]],\"^1@\",[\"^18\",[]],\"^1A\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^1:\",\"grid\",\"^1E\",\"container1\",\"^1I\",\"header\",\"^1J\",\"0f588\",\"row\",0,\"col\",0,\"^1K\",1,\"^1L\",12,\"^1M\",0,\"^1N\",null]]],\"^1B\",null,\"^1C\",null,\"^1D\",null,\"^1E\",\"\",\"^7\",\"~m1736460626690\",\"^1F\",\"~m1736460640580\",\"^1G\",\"\",\"^1H\",null]]]]],\"preloadedAppJavaScript\",null,\"preloadedAppJSLinks\",[\"https://cdnjs.cloudflare.com/ajax/libs/chance/1.1.12/chance.min.js\"],\"queryStatusVisibility\",false,\"responsiveLayoutDisabled\",false,\"rootScreen\",null,\"savePlatform\",\"web\",\"shortlink\",null,\"testEntities\",[],\"tests\",[],\"urlFragmentDefinitions\",[\"^E\",[]],\"version\",\"3.133.0\"]]]"},"changesRecord":[{"type":"WIDGET_TEMPLATE_UPDATE","payload":{"plugin":{"id":"orgChart1","type":"widget","uuid":"e5ed6e7a-e1c7-4afc-b588-57cae6354f9e","style":{},"folder":"","subtype":"DynamicWidget_ReactOrgChart_OrgChart","template":{"data":"{{ OrgChartData.value }}","events":{},"layout":"left","linkColor":"rebeccapurple","linkWidth":"5","nodeWidth":"250","heightType":"fixed","nodeHeight":"160","onNodeClick":"{}","nodeTemplate":"<div class=\"container\">\n <div class=\"content\">\n <img class=\"userpic\" src=\"<? user.imageUrl ?>\" />\n <div class=\"hr\"></div>\n <div class=\"userinfo\">\n <div class=\"name\">\n <? user.name ?>\n </div>\n <div class=\"position\">\n <? user.position ?>\n </div>\n </div>\n <div class=\"footer\">\n <div>Manages: <? user._directSubordinates ?> 👤</div>\n <div>Oversees: <? user._totalSubordinates ?> 👤</div>\n </div>\n </div>\n</div>","showControls":false,"childrenMargin":"80","collectionUuid":"31816e97-3269-440d-852e-d544e562e06b","siblingsMargin":"80","neighbourMargin":"80","compactMarginPair":"100","nodeTemplateStyle":".container {\n /*padding-top: 30px;*/\n margin-left: 1px;\n border-radius: 6px;\n overflow: visible;\n height: <? node.height ?>px;\n background-color: #FFF;\n}\n\n.content {\n height: calc(<? node.height ?>px - 32px);\n}\n\n.userpic {\n width: 60px;\n height: 60px;\n margin-top:-20px;\n background-color: #FFF;\n margin-left: calc(<? node.width ?>px / 2 - 33px);\n border-radius: 100px;\n border: 2px solid <? node.linkColor ?>;\n}\n\n.hr {\n margin-top: -48px;\n height: 10px;\n border-radius: 6px 6px 0 0;\n background-color: <? node.linkColor ?>;\n}\n\n.footer {\n display: flex;\n justify-content: space-between;\n margin-top: 32px;\n padding: 5px 15px;\n}\n\n.userinfo {\n padding: 50px 10px 0;\n text-align: center;\n \n .name {\n color: #111672;\n font-size: 16px;\n font-weight: bold;\n }\n\n .position {\n color: #404040;\n font-size: 16px;\n margin-top: 4px;\n }\n}","compactMarginBetween":"80"},"container":"","createdAt":"2025-01-09T21:43:34.831Z","position2":{"col":0,"row":0,"type":"grid","width":12,"height":16,"tabNum":0,"rowGroup":"body","container":"container1","subcontainer":"0f588","stackPosition":{"width":0,"height":0,"ordinal":0,"widthType":"fixed"}},"updatedAt":"2025-01-09T22:11:35.270Z"},"update":{"layout":"top"},"widgetId":"orgChart1","shouldRecalculateTemplate":true},"isUserTriggered":true}],"changesRecordV2":[{"data":{"op":"update","ids":["orgChart1"],"tag":"plugin"},"type":"diff","version":1}],"gitSha":null,"checksum":null,"createdAt":"2025-01-09T22:50:55.344Z","updatedAt":"2025-01-09T22:50:55.344Z","pageId":3803741,"userId":726311},"modules":{}}