|
| 1 | +import type { DiscourseRelationSettings } from "~/components/settings/utils/zodSchema"; |
| 2 | +/* eslint-disable @typescript-eslint/naming-convention */ // This is for nodePosition keys |
| 3 | + |
| 4 | +// TODO: Delete the original default relations in data/defaultRelations.ts when fully migrated. |
| 5 | +const DEFAULT_RELATIONS_BLOCK_PROPS: DiscourseRelationSettings[] = [ |
| 6 | + { |
| 7 | + id: "informs", |
| 8 | + label: "Informs", |
| 9 | + source: "_EVD-node", |
| 10 | + destination: "_QUE-node", |
| 11 | + complement: "Informed By", |
| 12 | + ifConditions: [ |
| 13 | + { |
| 14 | + triples: [ |
| 15 | + ["Page", "is a", "source"], |
| 16 | + ["Block", "references", "Page"], |
| 17 | + ["Block", "is in page", "ParentPage"], |
| 18 | + ["ParentPage", "is a", "destination"], |
| 19 | + ], |
| 20 | + nodePositions: { |
| 21 | + "0": "100 57", |
| 22 | + "1": "100 208", |
| 23 | + "2": "100 345", |
| 24 | + source: "281 57", |
| 25 | + destination: "281 345", |
| 26 | + }, |
| 27 | + }, |
| 28 | + ], |
| 29 | + }, |
| 30 | + { |
| 31 | + id: "supports", |
| 32 | + label: "Supports", |
| 33 | + source: "_EVD-node", |
| 34 | + destination: "_CLM-node", |
| 35 | + complement: "Supported By", |
| 36 | + ifConditions: [ |
| 37 | + { |
| 38 | + triples: [ |
| 39 | + ["Page", "is a", "source"], |
| 40 | + ["Block", "references", "Page"], |
| 41 | + ["SBlock", "references", "SPage"], |
| 42 | + ["SPage", "has title", "SupportedBy"], |
| 43 | + ["SBlock", "has child", "Block"], |
| 44 | + ["PBlock", "references", "ParentPage"], |
| 45 | + ["PBlock", "has child", "SBlock"], |
| 46 | + ["ParentPage", "is a", "destination"], |
| 47 | + ], |
| 48 | + nodePositions: { |
| 49 | + "0": "250 325", |
| 50 | + "1": "100 325", |
| 51 | + "2": "100 200", |
| 52 | + "3": "250 200", |
| 53 | + "4": "400 200", |
| 54 | + "5": "100 75", |
| 55 | + "6": "250 75", |
| 56 | + source: "400 325", |
| 57 | + destination: "400 75", |
| 58 | + }, |
| 59 | + }, |
| 60 | + { |
| 61 | + triples: [ |
| 62 | + ["Page", "is a", "destination"], |
| 63 | + ["Block", "references", "Page"], |
| 64 | + ["SBlock", "references", "SPage"], |
| 65 | + ["SPage", "has title", "Supports"], |
| 66 | + ["SBlock", "has child", "Block"], |
| 67 | + ["PBlock", "references", "ParentPage"], |
| 68 | + ["PBlock", "has child", "SBlock"], |
| 69 | + ["ParentPage", "is a", "source"], |
| 70 | + ], |
| 71 | + nodePositions: { |
| 72 | + "7": "250 325", |
| 73 | + "8": "100 325", |
| 74 | + "9": "100 200", |
| 75 | + "10": "250 200", |
| 76 | + "11": "400 200", |
| 77 | + "12": "100 75", |
| 78 | + "13": "250 75", |
| 79 | + source: "400 75", |
| 80 | + destination: "400 325", |
| 81 | + }, |
| 82 | + }, |
| 83 | + ], |
| 84 | + }, |
| 85 | + { |
| 86 | + id: "opposes", |
| 87 | + label: "Opposes", |
| 88 | + source: "_EVD-node", |
| 89 | + destination: "_CLM-node", |
| 90 | + complement: "Opposed By", |
| 91 | + ifConditions: [ |
| 92 | + { |
| 93 | + triples: [ |
| 94 | + ["Page", "is a", "source"], |
| 95 | + ["Block", "references", "Page"], |
| 96 | + ["SBlock", "references", "SPage"], |
| 97 | + ["SPage", "has title", "OpposedBy"], |
| 98 | + ["SBlock", "has child", "Block"], |
| 99 | + ["PBlock", "references", "ParentPage"], |
| 100 | + ["PBlock", "has child", "SBlock"], |
| 101 | + ["ParentPage", "is a", "destination"], |
| 102 | + ], |
| 103 | + nodePositions: { |
| 104 | + "0": "250 325", |
| 105 | + "1": "100 325", |
| 106 | + "2": "100 200", |
| 107 | + "3": "250 200", |
| 108 | + "4": "400 200", |
| 109 | + "5": "100 75", |
| 110 | + "6": "250 75", |
| 111 | + source: "400 325", |
| 112 | + destination: "400 75", |
| 113 | + }, |
| 114 | + }, |
| 115 | + { |
| 116 | + triples: [ |
| 117 | + ["Page", "is a", "destination"], |
| 118 | + ["Block", "references", "Page"], |
| 119 | + ["SBlock", "references", "SPage"], |
| 120 | + ["SPage", "has title", "Opposes"], |
| 121 | + ["SBlock", "has child", "Block"], |
| 122 | + ["PBlock", "references", "ParentPage"], |
| 123 | + ["PBlock", "has child", "SBlock"], |
| 124 | + ["ParentPage", "is a", "source"], |
| 125 | + ], |
| 126 | + nodePositions: { |
| 127 | + "7": "250 325", |
| 128 | + "8": "100 325", |
| 129 | + "9": "100 200", |
| 130 | + "10": "250 200", |
| 131 | + "11": "400 200", |
| 132 | + "12": "100 75", |
| 133 | + "13": "250 75", |
| 134 | + source: "400 75", |
| 135 | + destination: "400 325", |
| 136 | + }, |
| 137 | + }, |
| 138 | + ], |
| 139 | + }, |
| 140 | +]; |
| 141 | + |
| 142 | +export default DEFAULT_RELATIONS_BLOCK_PROPS; |
0 commit comments