All files / src options.js

51.72% Statements 15/29
100% Branches 0/0
100% Functions 0/0
100% Lines 15/15

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252  1x                             1x                                                                     1x                             1x                     1x                     1x                             1x                     1x         1x                                         1x                                           1x                                             1x                             1x                             1x                                       1x                                
 
export const ViewStrategies = [
  {
    label: 'Specify Static Center, No zoom on resize',
    value: 'static',
  },
  {
    label: 'Specify Lat/Lng Viewport, Zoom to fit on resize',
    value: 'viewport',
  },
  {
    label: 'Set Map Center from Variables, No Zoom on resize',
    value: 'variables',
  },
]
 
export const BaseTilesets = [
  {
    label: '[Blank Tileset]',
    value: null,
  },
  {
    label: 'ArcGIS Default Set',
    value: 'arcgis',
  },
  {
    label: 'Open Topography Map',
    value: 'opentopomap',
  },
  {
    label: 'USGS Satellite Imagery',
    value: 'usgs',
  },
  {
    label: 'ESRI World Shaded Relief',
    value: 'esri.shaded',
  },
  {
    label: 'Geoportail France',
    value: 'geoportail',
  },
  {
    label: 'CartoDB DarkMatter (Labeled)',
    value: 'cartodb.labeled',
  },
  {
    label: 'CartoDB DarkMatter (No Labels)',
    value: 'cartodb.unlabeled',
  },
]
 
export const TopologySources = [
  {
    label: "Manual (Local JSON)",
    value: "json"
  },
  {
    label: "Load from URL",
    value: "url"
  },
  {
    label: "Autodetect from Data",
    value: "autodetect"
  }
]
 
export const PoliticalBoundaryTilesets = [
  {
    label: '[No Political Boundaries]',
    value: null,
  },
  {
    label: '"Toner" Political Boundaries (Unlabeled)',
    value: 'toner.boundaries',
  },
]
 
export const PoliticalLabelTilesets = [
  {
    label: '[No Political Labels]',
    value: null,
  },
  {
    label: '"Toner" Political Labels',
    value: 'toner.labels',
  },
]
 
export const LegendPositionOptions = [
  {
    label: 'Bottom Right',
    value: 'bottomright',
  },
  {
    label: 'Bottom Left',
    value: 'bottomleft',
  },
  {
    label: 'Top Right',
    value: 'topright',
  },
]
 
export const LegendBehaviorOptions = [
  {
    label: 'Visible',
    value: 'visible',
  },
  {
    label: 'Minimized',
    value: 'minimized',
  },
];
 
export const monospacedFontSize = '10pt';
 
/**
 * An SVG image of a gauge with a rim and needle indicator.
 */
const svgGauge = `
  <svg xmlns="http://www.w3.org/2000/svg"
      role="graphics-symbol"
      aria-labelledby="Rate"
      width="24"
      height="24"
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      stroke-linecap="round"
      stroke-linejoin="round"
      class="lucide lucide-gauge"
  >
      <path d="m12 14 4-4"/>
      <path d="M3.34 19a10 10 0 1 1 17.32 0"/>
  </svg>
`;
 
/**
 * An SVG image of an arrow pointing right, meeting with a vertical line at the arrow's point.
 */
export const svgArrowRightToLine = `
  <svg xmlns="http://www.w3.org/2000/svg"
    role="graphics-symbol"
    aria-labelledby="In Volume"
    width="24"
    height="24"
    viewBox="0 0 24 24"
    fill="none"
    stroke="currentColor"
    stroke-width="2"
    stroke-linecap="round"
    stroke-linejoin="round"
    class="lucide lucide-arrow-right-to-line"
  >
    <path d="M17 12H3"/>
    <path d="m11 18 6-6-6-6"/>
    <path d="M21 5v14"/>
  </svg>`;
 
  /**
   * An SVG image of an arrow pointing left, away from a vertical line at the arrow's base.
   */
  export const svgArrowLeftFromLine = `
    <svg xmlns="http://www.w3.org/2000/svg"
      role="graphics-symbol"
      aria-labelledby="Out Volume"
      width="24"
      height="24"
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      stroke-width="2"
      stroke-linecap="round"
      stroke-linejoin="round"
      class="lucide lucide-arrow-left-from-line"
    >
      <path d="m9 6-6 6 6 6"/>
      <path d="M3 12h14"/>
      <path d="M21 19V5"/>
    </svg>
  `;
 
/**
 * The default tooltip markup to render for nodes.
 */
export const defaultNodeTooltip = `
  <div class="flow-tooltip">
    <strong>\${name}</strong>
  </div>
  <div class="flow-tooltip">
    <strong>${svgArrowRightToLine} \${inValue}</strong>
  </div>
  <div class="flow-tooltip">
    <strong>${svgArrowLeftFromLine} \${outValue}</strong>
  </div>
`;
 
/**
 * The initial/default markup to render for custom node tooltip markup.
 */
export const defaultCustomNodeTooltip = `
  <div class="flow-tooltip">
    <strong>\${name}</strong>
  </div>
  <div class="flow-tooltip">
    <strong>In Volume: \${inValue}</strong>
  </div>
  <div class="flow-tooltip">
    <strong>Out Volume: \${outValue}</strong>
  </div>
`;
 
/**
 * The initial/default markup to render for custom edge tooltip markup.
 */
export const defaultCustomEdgeTooltip = `
  <div class="flow-tooltip">
    <strong>
      \${forward.from} → \${forward.to}
      <br />
      Rate: \${forward.dataPoint}
    </strong>
  </div>
  <div class="flow-tooltip">
    <span>
      \${reverse.from} → \${reverse.to}
      <br />
      Rate: \${reverse.dataPoint}
    </span>
  </div>
`;
 
/**
 * The default tooltip markup to render for edges.
 */
export const defaultEdgeTooltip = `
  <div class="flow-tooltip">
    <strong>
      \${forward.from} → \${forward.to}
      <br />
      ${svgGauge} \${forward.dataPoint}
    </strong>
  </div>
  <div class="flow-tooltip">
    <span>
      \${reverse.from} → \${reverse.to}
      <br />
      ${svgGauge} \${reverse.dataPoint}
    </span>
  </div>
`;