@kong-ui-public/dashboard-renderer 8.15.23 → 8.16.0

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/README.md CHANGED
@@ -9,6 +9,7 @@ Render Analytics charts on a page from a JSON definition.
9
9
  - [Example](#example)
10
10
  - [Slotted content](#slotted-content)
11
11
  - [Auto-fit row content](#auto-fit-row-content)
12
+ - [CsvExportModal](#csvexportmodal)
12
13
  - [Editable Dashboard Features](#editable-dashboard-features)
13
14
  - [Editable Dashboard Events](#editable-dashboard-events)
14
15
  - [Dashboard Config Schema](#dashboard-config-schema)
@@ -366,6 +367,39 @@ watch(() => config.value.tiles, (tiles) => {
366
367
  />
367
368
  ```
368
369
 
370
+ ## CsvExportModal
371
+
372
+ `CsvExportModal` renders a preview and download action for an export result.
373
+
374
+ | Prop | Type | Required | Description |
375
+ |---|---|---|---|
376
+ | `exportState` | `ExploreExportState` | Yes | Current loading, error, or successful export data. |
377
+ | `filename` | `string` | Yes | Base name used for the generated CSV file. |
378
+ | `modalDescription` | `string` | No | Replaces the default export description. |
379
+
380
+ It emits `closeModal` when cancelled; use it in templates as `@close-modal`.
381
+
382
+ ```vue
383
+ <script setup lang="ts">
384
+ import { ref } from 'vue'
385
+ import { CsvExportModal } from '@kong-ui-public/dashboard-renderer'
386
+ import type { ExploreExportState } from '@kong-ui-public/analytics-utilities'
387
+
388
+ const exportModalVisible = ref(false)
389
+ const exportState = ref<ExploreExportState>({ status: 'loading' })
390
+ </script>
391
+
392
+ <template>
393
+ <CsvExportModal
394
+ v-if="exportModalVisible"
395
+ :export-state="exportState"
396
+ filename="total-requests"
397
+ modal-description="Export for audit review."
398
+ @close-modal="exportModalVisible = false"
399
+ />
400
+ </template>
401
+ ```
402
+
369
403
  ## Editable Dashboard Features
370
404
 
371
405
  When `editable` is enabled:
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as v, ref as p, computed as o, openBlock as q, createBlock as C, withCtx as x, createVNode as g, unref as _ } from "vue";
2
- import { _ as E } from "./index-B1g33-j6.js";
2
+ import { _ as E } from "./index-CqFZ8Md1.js";
3
3
  import { exploreResultToCountryMetrics as M, AnalyticsGeoMap as O } from "@kong-ui-public/analytics-geo-map";
4
4
  import { COUNTRIES as R } from "@kong-ui-public/analytics-utilities";
5
5
  const D = /* @__PURE__ */ v({
@@ -1,15 +1,16 @@
1
- import { C as a, D as R, a as T, b as s, c as L, d as I, E as e, F as D, e as N, G as S, I as r, T as A, f as F } from "./index-B1g33-j6.js";
1
+ import { C as a, a as R, D as T, b as s, c as L, d as I, e, E as D, F as N, f as S, G as o, I as r, T as A, g as F } from "./index-CqFZ8Md1.js";
2
2
  export {
3
3
  a as CP_ID_TOKEN,
4
- R as DASHBOARD_COLS,
5
- T as DEFAULT_TILE_HEIGHT,
6
- s as DEFAULT_TILE_REFRESH_INTERVAL_MS,
7
- L as DashboardRenderer,
8
- I as DashboardTilePreview,
9
- e as ENTITY_ID_TOKEN,
10
- D as FULLSCREEN_LONG_REFRESH_INTERVAL_MS,
11
- N as FULLSCREEN_SHORT_REFRESH_INTERVAL_MS,
12
- S as GridLayout,
4
+ R as CsvExportModal,
5
+ T as DASHBOARD_COLS,
6
+ s as DEFAULT_TILE_HEIGHT,
7
+ L as DEFAULT_TILE_REFRESH_INTERVAL_MS,
8
+ I as DashboardRenderer,
9
+ e as DashboardTilePreview,
10
+ D as ENTITY_ID_TOKEN,
11
+ N as FULLSCREEN_LONG_REFRESH_INTERVAL_MS,
12
+ S as FULLSCREEN_SHORT_REFRESH_INTERVAL_MS,
13
+ o as GridLayout,
13
14
  r as INJECT_QUERY_PROVIDER,
14
15
  A as TIMEFRAME_TOKEN,
15
16
  F as configureAllowedDefinition