@cdc/dashboard 4.24.5 → 4.24.9-1

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.
Files changed (86) hide show
  1. package/dist/cdcdashboard.js +147572 -128223
  2. package/examples/custom/css/respiratory.css +236 -0
  3. package/examples/custom/js/respiratory.js +242 -0
  4. package/examples/default-multi-dataset-shared-filter.json +1729 -0
  5. package/examples/ed-visits-county-file.json +618 -0
  6. package/examples/filtered-dash.json +6 -21
  7. package/examples/single-state-dashboard-filters.json +421 -0
  8. package/examples/state-level.json +90136 -0
  9. package/examples/state-points.json +10474 -0
  10. package/examples/test-file.json +147 -0
  11. package/examples/testing.json +94456 -0
  12. package/index.html +25 -4
  13. package/package.json +12 -11
  14. package/src/CdcDashboard.tsx +5 -1
  15. package/src/CdcDashboardComponent.tsx +250 -327
  16. package/src/DashboardContext.tsx +15 -1
  17. package/src/_stories/Dashboard.stories.tsx +158 -40
  18. package/src/_stories/_mock/api-filter-chart.json +11 -35
  19. package/src/_stories/_mock/api-filter-map.json +17 -31
  20. package/src/_stories/_mock/bump-chart.json +3554 -0
  21. package/src/_stories/_mock/methodology.json +412 -0
  22. package/src/_stories/_mock/methodologyAPI.ts +90 -0
  23. package/src/_stories/_mock/multi-viz.json +3 -4
  24. package/src/_stories/_mock/pivot-filter.json +14 -12
  25. package/src/_stories/_mock/single-state-dashboard-filters.json +390 -0
  26. package/src/components/CollapsibleVisualizationRow.tsx +44 -0
  27. package/src/components/Column.tsx +1 -1
  28. package/src/components/DashboardFilters/DashboardFilters.tsx +102 -0
  29. package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +218 -0
  30. package/src/components/DashboardFilters/DashboardFiltersEditor/components/DeleteFilterModal.tsx +48 -0
  31. package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +477 -0
  32. package/src/components/DashboardFilters/DashboardFiltersEditor/index.ts +1 -0
  33. package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +191 -0
  34. package/src/components/DashboardFilters/index.ts +3 -0
  35. package/src/components/DataDesignerModal.tsx +9 -9
  36. package/src/components/ExpandCollapseButtons.tsx +20 -0
  37. package/src/components/Header/Header.tsx +1 -102
  38. package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +24 -12
  39. package/src/components/Row.tsx +52 -19
  40. package/src/components/Toggle/Toggle.tsx +2 -4
  41. package/src/components/VisualizationRow.tsx +169 -30
  42. package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +116 -0
  43. package/src/components/VisualizationsPanel/index.ts +1 -0
  44. package/src/components/VisualizationsPanel/visualizations-panel-styles.css +12 -0
  45. package/src/components/Widget.tsx +27 -90
  46. package/src/helpers/FilterBehavior.ts +4 -0
  47. package/src/helpers/addValuesToDashboardFilters.ts +49 -0
  48. package/src/helpers/apiFilterHelpers.ts +103 -0
  49. package/src/helpers/changeFilterActive.ts +39 -0
  50. package/src/helpers/filterData.ts +10 -48
  51. package/src/helpers/generateValuesForFilter.ts +1 -1
  52. package/src/helpers/getAutoLoadVisualization.ts +11 -0
  53. package/src/helpers/getFilteredData.ts +7 -5
  54. package/src/helpers/getVizConfig.ts +23 -2
  55. package/src/helpers/getVizRowColumnLocator.ts +2 -1
  56. package/src/helpers/hasDashboardApplyBehavior.ts +5 -0
  57. package/src/helpers/iconHash.tsx +5 -3
  58. package/src/helpers/loadAPIFilters.ts +74 -0
  59. package/src/helpers/mapDataToConfig.ts +29 -0
  60. package/src/helpers/processData.ts +2 -3
  61. package/src/helpers/reloadURLHelpers.ts +102 -0
  62. package/src/helpers/tests/addValuesToDashboardFilters.test.ts +44 -0
  63. package/src/helpers/tests/apiFilterHelpers.test.ts +155 -0
  64. package/src/helpers/tests/filterData.test.ts +1 -93
  65. package/src/helpers/tests/getFilteredData.test.ts +86 -0
  66. package/src/helpers/tests/loadAPIFiltersWrapper.test.ts +220 -0
  67. package/src/helpers/tests/reloadURLHelpers.test.ts +232 -0
  68. package/src/scss/editor-panel.scss +1 -1
  69. package/src/scss/grid.scss +34 -27
  70. package/src/scss/main.scss +41 -3
  71. package/src/scss/variables.scss +4 -0
  72. package/src/store/dashboard.actions.ts +12 -4
  73. package/src/store/dashboard.reducer.ts +30 -4
  74. package/src/types/APIFilter.ts +1 -5
  75. package/src/types/ConfigRow.ts +2 -0
  76. package/src/types/Dashboard.ts +1 -1
  77. package/src/types/DashboardConfig.ts +2 -4
  78. package/src/types/DashboardFilters.ts +7 -0
  79. package/src/types/InitialState.ts +1 -1
  80. package/src/types/MultiDashboard.ts +2 -2
  81. package/src/types/SharedFilter.ts +4 -6
  82. package/src/types/Tab.ts +1 -1
  83. package/src/components/Filters.tsx +0 -88
  84. package/src/components/Header/FilterModal.tsx +0 -510
  85. package/src/components/VisualizationsPanel.tsx +0 -95
  86. package/src/helpers/getApiFilterKey.ts +0 -5
@@ -2,17 +2,27 @@ import { Dispatch, createContext } from 'react'
2
2
  import { DashboardState } from './store/dashboard.reducer'
3
3
  import DashboardActions from './store/dashboard.actions'
4
4
  import { Tab } from './types/Tab'
5
+ import { MultiDashboardConfig } from './types/MultiDashboard'
6
+ import { SharedFilter } from './types/SharedFilter'
7
+ import { APIFilterDropdowns } from './components/DashboardFilters'
5
8
 
6
9
  type ConfigCTX = DashboardState & {
7
10
  outerContainerRef: (node: any) => void
8
11
  setParentConfig: any
9
12
  isDebug: boolean
13
+ reloadURLData: (newFilters?: SharedFilter[]) => void
14
+ loadAPIFilters: (
15
+ sharedFilters: SharedFilter[],
16
+ dropdowns: APIFilterDropdowns,
17
+ recursiveLimit?: number
18
+ ) => Promise<SharedFilter[]>
19
+ setAPIFilterDropdowns: (dropdowns: APIFilterDropdowns) => void
10
20
  }
11
21
 
12
22
  const firstTab: Tab = 'Dashboard Description'
13
23
 
14
24
  export const initialState = {
15
- data: {},
25
+ data: {} as Record<string, any[]>,
16
26
  loading: false,
17
27
  filteredData: {},
18
28
  preview: false,
@@ -22,7 +32,11 @@ export const initialState = {
22
32
  const initialContext: ConfigCTX = {
23
33
  outerContainerRef: () => {},
24
34
  setParentConfig: () => {},
35
+ setAPIFilterDropdowns: () => {},
36
+ reloadURLData: () => {},
37
+ loadAPIFilters: () => Promise.resolve([]),
25
38
  isDebug: false,
39
+ config: {} as MultiDashboardConfig,
26
40
  ...initialState
27
41
  }
28
42
 
@@ -5,6 +5,7 @@ import APIFiltersChartData from './_mock/api-filter-chart.json'
5
5
  import ExampleConfig_1 from './_mock/dashboard-gallery.json'
6
6
  import ExampleConfig_2 from './_mock/dashboard-2.json'
7
7
  import ExampleConfig_3 from './_mock/dashboard_no_filter.json'
8
+ import SingleStateDashboardFilters from './_mock/single-state-dashboard-filters.json'
8
9
  import Dashboard_Filter from './_mock/dashboard-filter.json'
9
10
  import MultiVizConfig from './_mock/multi-viz.json'
10
11
  import MultiDashboardConfig from './_mock/multi-dashboards.json'
@@ -15,6 +16,12 @@ import { type DashboardConfig as Config } from '../types/DashboardConfig'
15
16
  import { userEvent, within } from '@storybook/testing-library'
16
17
  import ToggleExampleConfig from './_mock/toggle-example.json'
17
18
  import _ from 'lodash'
19
+ import { footnotesSymbols } from '@cdc/core/helpers/footnoteSymbols'
20
+ import FootnotesConfig from '@cdc/core/types/Footnotes'
21
+ import { ConfigRow } from '../types/ConfigRow'
22
+ import BumpChartConfig from './_mock/bump-chart.json'
23
+ import MethodologyConfig from './_mock/methodology.json'
24
+ import methodologyAPI from './_mock/methodologyAPI'
18
25
 
19
26
  const meta: Meta<typeof Dashboard> = {
20
27
  title: 'Components/Pages/Dashboard',
@@ -44,6 +51,13 @@ export const Example_3: Story = {
44
51
  }
45
52
  }
46
53
 
54
+ export const Bump_Chart_Dashboard: Story = {
55
+ args: {
56
+ config: BumpChartConfig,
57
+ isEditor: false
58
+ }
59
+ }
60
+
47
61
  export const Dashboard_Filters: Story = {
48
62
  args: {
49
63
  config: Dashboard_Filter,
@@ -72,6 +86,13 @@ export const PivotFilter: Story = {
72
86
  }
73
87
  }
74
88
 
89
+ export const SingleStateDashboardWithFilters: Story = {
90
+ args: {
91
+ config: SingleStateDashboardFilters,
92
+ isEditor: false
93
+ }
94
+ }
95
+
75
96
  faker.seed(123)
76
97
 
77
98
  const countries = _.times(5, faker.location.country)
@@ -89,20 +110,28 @@ countries.forEach((country, i) => {
89
110
  })
90
111
  })
91
112
 
113
+ const footnoteData = countries.map((country, i) => {
114
+ return { Country: country, symbol: footnotesSymbols[i][0], text: faker.lorem.sentence() }
115
+ })
116
+
92
117
  const multiVizData = {
93
- 'valid-world-data.json': { data }
118
+ 'valid-world-data.json': { data },
119
+ 'footnote-data.json': { data: footnoteData }
94
120
  }
95
121
 
96
- export const MultiVisualization: Story = {
122
+ export const MultiDashboard: Story = {
97
123
  args: {
98
- config: { ...MultiVizConfig, datasets: multiVizData },
124
+ config: MultiDashboardConfig,
99
125
  isEditor: false
100
126
  }
101
127
  }
102
128
 
103
- export const MultiDashboard: Story = {
129
+ const FNrows: ConfigRow[] = [{ ...MultiVizConfig.rows[0], footnotesId: 'footnote123' }]
130
+ const footnoteConfig: Partial<FootnotesConfig> = { dataKey: 'footnote-data.json', dynamicFootnotes: { symbolColumn: 'symbol', textColumn: 'text' }, staticFootnotes: [{ symbol: '**', text: 'This is a static Footnote' }] }
131
+ const FNViz = { ...MultiVizConfig.visualizations, footnote123: footnoteConfig }
132
+ export const Footnotes: Story = {
104
133
  args: {
105
- config: MultiDashboardConfig,
134
+ config: { ...MultiVizConfig, datasets: multiVizData, rows: FNrows, visualizations: FNViz },
106
135
  isEditor: false
107
136
  }
108
137
  }
@@ -112,6 +141,7 @@ const sleep = ms => {
112
141
  }
113
142
 
114
143
  const fetchMock = {
144
+ debug: true,
115
145
  mocks: [
116
146
  {
117
147
  matcher: {
@@ -133,35 +163,18 @@ const fetchMock = {
133
163
  body: [{ IndicatorID: 'indicatorID', Indicator: 'Some Indicator' }]
134
164
  }
135
165
  },
136
- {
137
- matcher: {
138
- name: 'filters',
139
- url: 'path:/api/POC/Filters'
140
- },
141
- response: {
142
- status: 200,
143
- body: {
144
- Years: [{ Year: 1999 }],
145
- DataValueTypes: [{ DataValueType: 'Some Data Value Type', DataValueTypeId: 'dataValueTypeId' }],
146
- StratificationCategories: [{ StratificationCategoryId: 'stratCategoryId', StratificationCategory: 'Some Strat Category' }]
166
+ ...['Year', 'DataValueType', 'StratificationCategory', 'Stratification'].map(filter => {
167
+ return {
168
+ matcher: {
169
+ name: 'filters' + filter,
170
+ url: 'path:/api/POC/Filters/' + filter
171
+ },
172
+ response: {
173
+ status: 200,
174
+ body: _.times(5, i => ({ [filter]: `Some ${filter} ${i}` }))
147
175
  }
148
176
  }
149
- },
150
- {
151
- matcher: {
152
- name: 'stratifications',
153
- url: 'path:/api/POC/stratifications'
154
- },
155
- response: {
156
- status: 200,
157
- body: [
158
- {
159
- StratificationId: 'stratId',
160
- Stratification: 'Some Strat'
161
- }
162
- ]
163
- }
164
- },
177
+ }),
165
178
  {
166
179
  matcher: {
167
180
  name: 'locations',
@@ -207,13 +220,58 @@ const fetchMock = {
207
220
  }
208
221
  ]
209
222
  }
210
- }
223
+ },
224
+ {
225
+ matcher: {
226
+ name: 'methodologyYear',
227
+ url: 'path:/methodology',
228
+ query: {
229
+ $select: 'distinct year'
230
+ }
231
+ },
232
+ response: {
233
+ status: 200,
234
+ body: methodologyAPI('distinct year')
235
+ }
236
+ },
237
+ ...['a', 'b'].map(methodology => {
238
+ return {
239
+ matcher: {
240
+ name: 'methodology' + methodology,
241
+ url: 'path:/methodology',
242
+ query: {
243
+ methodology: `"${methodology}"`
244
+ }
245
+ },
246
+ response: {
247
+ status: 200,
248
+ body: methodologyAPI('*', ['methodology', methodology])
249
+ }
250
+ }
251
+ }),
252
+ ...[1999, 2000, 2012, 2013].map(year => {
253
+ return {
254
+ matcher: {
255
+ name: 'methodology' + year,
256
+ url: 'path:/methodology',
257
+ query: {
258
+ $select: 'distinct methodology',
259
+ year
260
+ }
261
+ },
262
+ response: {
263
+ status: 200,
264
+ body: methodologyAPI('distinct methodology', ['year', year])
265
+ }
266
+ }
267
+ })
211
268
  ]
212
269
  }
213
270
 
214
- export const APIFiltersMap: Story = {
271
+ export const RegressionAPIFiltersMap: Story = {
215
272
  args: {
216
- config: APIFiltersMapData as unknown as Config
273
+ config: APIFiltersMapData as unknown as Config,
274
+ isEditor: false
217
275
  },
218
276
  parameters: {
219
277
  fetchMock
@@ -230,18 +288,19 @@ export const APIFiltersMap: Story = {
230
288
  const indicatorsFilter = canvas.getByLabelText('Indicator', { selector: 'select' })
231
289
  await user.selectOptions(indicatorsFilter, ['indicatorID'])
232
290
  const yearsFilter = canvas.getByLabelText('Year', { selector: 'select' })
233
- await user.selectOptions(yearsFilter, ['1999'])
291
+ await user.selectOptions(yearsFilter, ['Some Year 0'])
234
292
  const stratCategoryFilter = canvas.getByLabelText('View By', { selector: 'select' })
235
- await user.selectOptions(stratCategoryFilter, ['stratCategoryId'])
293
+ await user.selectOptions(stratCategoryFilter, ['Some StratificationCategory 0'])
236
294
  const stratFilter = canvas.getByLabelText('Stratification', { selector: 'select' })
237
- await user.selectOptions(stratFilter, ['stratId'])
295
+ await user.selectOptions(stratFilter, ['Some Stratification 0'])
238
296
  await user.click(canvas.getByText('GO!'))
239
297
  }
240
298
  }
241
299
 
242
- export const APIFiltersChart: Story = {
300
+ export const RegressionAPIFiltersChart: Story = {
243
301
  args: {
244
- config: APIFiltersChartData as unknown as Config
302
+ config: APIFiltersChartData as unknown as Config,
303
+ isEditor: false
245
304
  },
246
305
  parameters: {
247
306
  fetchMock
@@ -260,8 +319,67 @@ export const APIFiltersChart: Story = {
260
319
  const indicatorsFilter = canvas.getByLabelText('Indicator', { selector: 'select' })
261
320
  await user.selectOptions(indicatorsFilter, ['indicatorID'])
262
321
  await user.click(canvas.getByText('GO!'))
322
+ await sleep(1000)
323
+ const yearFilter = canvas.getByLabelText('Year', { selector: 'select' })
324
+ await user.selectOptions(yearFilter, ['Some Year 1'])
325
+ }
326
+ }
327
+
328
+ export const RegressionHiddenFilter: Story = {
329
+ args: {
330
+ config: MethodologyConfig,
331
+ isEditor: false
332
+ },
333
+ parameters: {
334
+ fetchMock
335
+ },
336
+ play: async ({ canvasElement }) => {
337
+ const canvas = within(canvasElement)
338
+ const user = userEvent.setup()
339
+ // play is running before full rendering is complete so sleep function
340
+ // is needed to delay the execution.
341
+ // possible related bug: https://github.com/storybookjs/storybook/issues/18258
342
+ await sleep(1000)
263
343
  const yearFilter = canvas.getByLabelText('Year', { selector: 'select' })
264
344
  await user.selectOptions(yearFilter, ['1999'])
345
+ await user.click(canvas.getByText('GO!'))
346
+ await sleep(500)
347
+ canvas.getAllByText('alabama')
348
+ canvas.getAllByText('alaska')
349
+ canvas.getAllByText('arizona')
350
+ await user.selectOptions(yearFilter, ['2012'])
351
+ await user.click(canvas.getByText('GO!'))
352
+ await sleep(500)
353
+ canvas.getAllByText('new york')
354
+ canvas.getAllByText('new jersey')
355
+ canvas.getAllByText('new mexico')
356
+ }
357
+ }
358
+
359
+ export const RegressionMultiVisualization: Story = {
360
+ args: {
361
+ config: { ...MultiVizConfig, datasets: multiVizData },
362
+ isEditor: false
363
+ },
364
+ play: async ({ canvasElement }) => {
365
+ const canvas = within(canvasElement)
366
+ const user = userEvent.setup()
367
+ // play is running before full rendering is complete so sleep function
368
+ // is needed to delay the execution.
369
+ // possible related bug: https://github.com/storybookjs/storybook/issues/18258
370
+ await sleep(1000)
371
+ const categoryFilter = canvas.getByLabelText('Category', { selector: 'select' })
372
+ canvas.getAllByText('Paraguay')
373
+ canvas.getAllByText('Poland')
374
+ canvas.getAllByText('Iraq')
375
+ await user.selectOptions(categoryFilter, ['category-3'])
376
+ canvas.getAllByText('Paraguay')
377
+ canvas.getAllByText('Ethiopia')
378
+ canvas.getAllByText('Iraq')
379
+ await user.selectOptions(categoryFilter, ['category-1'])
380
+ canvas.getAllByText('Poland')
381
+ canvas.getAllByText('Ethiopia')
382
+ canvas.getAllByText('Curacao')
265
383
  }
266
384
  }
267
385
 
@@ -4,9 +4,6 @@
4
4
  "sharedFilters": [
5
5
  {
6
6
  "key": "Location",
7
- "usedBy": [
8
- "chart1"
9
- ],
10
7
  "type": "urlfilter",
11
8
  "apiFilter": {
12
9
  "apiEndpoint": "http://test.gov/api/poc/locations",
@@ -19,9 +16,6 @@
19
16
  },
20
17
  {
21
18
  "key": "Category",
22
- "usedBy": [
23
- "chart1"
24
- ],
25
19
  "type": "urlfilter",
26
20
  "apiFilter": {
27
21
  "apiEndpoint": "http://test.gov/api/poc/topics",
@@ -34,9 +28,6 @@
34
28
  },
35
29
  {
36
30
  "key": "Indicator",
37
- "usedBy": [
38
- "chart1"
39
- ],
40
31
  "type": "urlfilter",
41
32
  "apiFilter": {
42
33
  "apiEndpoint": "http://test.gov/api/poc/indicators",
@@ -50,15 +41,11 @@
50
41
  },
51
42
  {
52
43
  "key": "Year",
53
- "usedBy": [
54
- "chart1"
55
- ],
56
44
  "type": "urlfilter",
57
45
  "apiFilter": {
58
- "apiEndpoint": "http://test.gov/api/POC/Filters",
46
+ "apiEndpoint": "http://test.gov/api/POC/Filters/Year",
59
47
  "valueSelector": "Year",
60
- "textSelector": "Year",
61
- "heirarchyLookup": "Years"
48
+ "textSelector": "Year"
62
49
  },
63
50
  "queryParameter": "year",
64
51
  "showDropdown": true,
@@ -66,15 +53,11 @@
66
53
  },
67
54
  {
68
55
  "key": "View By",
69
- "usedBy": [
70
- "chart1"
71
- ],
72
56
  "type": "urlfilter",
73
57
  "apiFilter": {
74
- "apiEndpoint": "http://test.gov/api/POC/Filters",
75
- "valueSelector": "StratificationCategoryId",
58
+ "apiEndpoint": "http://test.gov/api/POC/Filters/StratificationCategory",
59
+ "valueSelector": "StratificationCategory",
76
60
  "textSelector": "StratificationCategory",
77
- "heirarchyLookup": "StratificationCategories",
78
61
  "defaultValue": "AGE"
79
62
  },
80
63
  "queryParameter": "stratificationcategoryid",
@@ -83,16 +66,11 @@
83
66
  },
84
67
  {
85
68
  "key": "Data Type",
86
- "usedBy": [
87
- "chart1"
88
- ],
89
69
  "type": "urlfilter",
90
70
  "apiFilter": {
91
- "apiEndpoint": "http://test.gov/api/POC/Filters",
92
- "valueSelector": "DataValueTypeId",
93
- "textSelector": "DataValueType",
94
- "heirarchyLookup": "DataValueTypes"
95
-
71
+ "apiEndpoint": "http://test.gov/api/POC/Filters/DataValueType",
72
+ "valueSelector": "DataValueType",
73
+ "textSelector": "DataValueType"
96
74
  },
97
75
  "queryParameter": "datavaluetypeid",
98
76
  "showDropdown": true,
@@ -130,7 +108,7 @@
130
108
  "filters": {
131
109
  "type": "filter-dropdowns",
132
110
  "visualizationType": "filter-dropdowns",
133
- "hide": [ 3, 4, 5 ]
111
+ "hide": [3, 4, 5]
134
112
  },
135
113
  "header": {
136
114
  "type": "markup-include",
@@ -141,7 +119,7 @@
141
119
  "subfilters": {
142
120
  "type": "filter-dropdowns",
143
121
  "visualizationType": "filter-dropdowns",
144
- "hide": [ 0, 1, 2 ],
122
+ "hide": [0, 1, 2],
145
123
  "autoLoad": true
146
124
  },
147
125
  "chart1": {
@@ -341,9 +319,7 @@
341
319
  },
342
320
  "validated": 4.23,
343
321
  "dynamicMarginTop": 0,
344
- "regions": [
345
- {}
346
- ]
322
+ "regions": [{}]
347
323
  }
348
324
  },
349
325
  "type": "dashboard",
@@ -355,4 +331,4 @@
355
331
  "filterBehavior": "Apply Button",
356
332
  "runtime": {},
357
333
  "uuid": 1684783370106
358
- }
334
+ }
@@ -3,9 +3,7 @@
3
3
  "sharedFilters": [
4
4
  {
5
5
  "key": "Category",
6
- "usedBy": [
7
- "map1"
8
- ],
6
+ "usedBy": ["map1"],
9
7
  "type": "urlfilter",
10
8
  "apiFilter": {
11
9
  "apiEndpoint": "http://test.gov/api/poc/topics",
@@ -18,9 +16,7 @@
18
16
  },
19
17
  {
20
18
  "key": "Indicator",
21
- "usedBy": [
22
- "chart1"
23
- ],
19
+ "usedBy": ["map1"],
24
20
  "type": "urlfilter",
25
21
  "apiFilter": {
26
22
  "apiEndpoint": "http://test.gov/api/poc/indicators",
@@ -34,15 +30,12 @@
34
30
  },
35
31
  {
36
32
  "key": "Year",
37
- "usedBy": [
38
- "map1"
39
- ],
33
+ "usedBy": ["map1"],
40
34
  "type": "urlfilter",
41
35
  "apiFilter": {
42
- "apiEndpoint": "http://test.gov/api/POC/Filters",
36
+ "apiEndpoint": "http://test.gov/api/POC/Filters/Year",
43
37
  "valueSelector": "Year",
44
- "textSelector": "Year",
45
- "heirarchyLookup": "Years"
38
+ "textSelector": "Year"
46
39
  },
47
40
  "queryParameter": "year",
48
41
  "resetLabel": "- Select -",
@@ -51,15 +44,12 @@
51
44
  },
52
45
  {
53
46
  "key": "View By",
54
- "usedBy": [
55
- "map1"
56
- ],
47
+ "usedBy": ["map1"],
57
48
  "type": "urlfilter",
58
49
  "apiFilter": {
59
- "apiEndpoint": "http://test.gov/api/POC/Filters",
60
- "valueSelector": "StratificationCategoryId",
61
- "textSelector": "StratificationCategory",
62
- "heirarchyLookup": "StratificationCategories"
50
+ "apiEndpoint": "http://test.gov/api/POC/Filters/StratificationCategory",
51
+ "valueSelector": "StratificationCategory",
52
+ "textSelector": "StratificationCategory"
63
53
  },
64
54
  "resetLabel": "- Select -",
65
55
  "queryParameter": "stratificationcategoryid",
@@ -68,13 +58,11 @@
68
58
  },
69
59
  {
70
60
  "key": "Stratification",
71
- "usedBy": [
72
- "map1"
73
- ],
61
+ "usedBy": ["map1"],
74
62
  "type": "urlfilter",
75
63
  "apiFilter": {
76
- "apiEndpoint": "http://test.gov/api/POC/stratifications",
77
- "valueSelector": "StratificationId",
64
+ "apiEndpoint": "http://test.gov/api/POC/Filters/Stratification",
65
+ "valueSelector": "Stratification",
78
66
  "textSelector": "Stratification"
79
67
  },
80
68
  "resetLabel": "- Select -",
@@ -149,8 +137,8 @@
149
137
  "suffix": "%",
150
138
  "name": "LowConfidenceLimit",
151
139
  "tooltip": true
152
- },
153
- "additionalColumn2": {
140
+ },
141
+ "additionalColumn2": {
154
142
  "label": "High Confidence Limit",
155
143
  "dataTable": true,
156
144
  "tooltips": false,
@@ -158,7 +146,7 @@
158
146
  "suffix": "%",
159
147
  "name": "HighConfidenceLimit",
160
148
  "tooltip": true
161
- },
149
+ },
162
150
  "navigate": {
163
151
  "name": "link",
164
152
  "tooltip": false,
@@ -173,9 +161,7 @@
173
161
  },
174
162
  "legend": {
175
163
  "descriptions": {},
176
- "specialClasses": [
177
- "NA"
178
- ],
164
+ "specialClasses": ["NA"],
179
165
  "unified": false,
180
166
  "singleColumn": false,
181
167
  "dynamicDescription": false,
@@ -196,4 +182,4 @@
196
182
  "filterBehavior": "Apply Button",
197
183
  "runtime": {},
198
184
  "uuid": 1684783370106
199
- }
185
+ }