@kong-ui-public/analytics-chart 2.4.7 → 2.5.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/dist/style.css CHANGED
@@ -1 +1 @@
1
- .locked[data-v-d8d2d0cd]{cursor:move}.tooltip-container[data-v-d8d2d0cd]{background-color:#fff;border-radius:3px;box-shadow:0 5px 15px #0000001f,0 5px 10px #0000003d;max-width:425px;min-width:250px;position:absolute;transition:all .2s cubic-bezier(.25,.8,.25,1);z-index:999}.tooltip-container .tooltip-title[data-v-d8d2d0cd]{border-bottom:1px solid rgba(0,0,0,.1);display:flex;flex-direction:column;margin:8px;min-height:24px;padding-bottom:8px}.tooltip-container .tooltip-title .title[data-v-d8d2d0cd]{font-size:16px;font-weight:600}.tooltip-container .tooltip-title .subtitle[data-v-d8d2d0cd]{font-size:14px;margin-top:8px}.tooltip-container .tooltip-title .drag-icon[data-v-d8d2d0cd]{margin-top:6px;position:absolute;right:0;top:0}ul.tooltip[data-v-d8d2d0cd]{list-style:none;margin:0;max-height:300px;min-width:250px;overflow-y:auto;padding-left:0;-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-width:auto}ul.tooltip[data-v-d8d2d0cd] ::-webkit-scrollbar{width:8px}ul.tooltip[data-v-d8d2d0cd] ::-webkit-scrollbar-track{background:transparent}ul.tooltip[data-v-d8d2d0cd] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}ul.tooltip li[data-v-d8d2d0cd]{display:flex;font-size:14px;line-height:1;margin:8px}ul.tooltip li[data-v-d8d2d0cd]:last-child{padding-bottom:8px}ul.tooltip .display-label[data-v-d8d2d0cd]{max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ul.tooltip .display-value[data-v-d8d2d0cd]{margin-left:auto;padding-left:8px;white-space:nowrap}ul.tooltip .tooltip-legend[data-v-d8d2d0cd]{display:inline-flex;flex-direction:row;height:15px;margin-right:8px;width:3px}.legend-container[data-v-554b4d9c]{display:flex;margin:6px 0 0;max-height:inherit;overflow-x:hidden;overflow-y:auto;padding-left:0;-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-width:auto}.legend-container[data-v-554b4d9c] ::-webkit-scrollbar{width:8px}.legend-container[data-v-554b4d9c] ::-webkit-scrollbar-track{background:transparent}.legend-container[data-v-554b4d9c] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}.legend-container.vertical[data-v-554b4d9c]{flex-direction:column;justify-content:flex-start;max-height:90%;max-width:15%;min-width:10%;padding-left:12px;row-gap:16px}.legend-container.vertical .truncate-label[data-v-554b4d9c]{max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.vertical li .legend[data-v-554b4d9c]{margin-top:4px}@media (max-width: 767px){.legend-container.vertical[data-v-554b4d9c]{column-gap:12px;display:grid;grid-template-columns:repeat(auto-fit,12ch);height:40px;justify-content:center;max-width:99%!important}.legend-container.vertical .sub-label[data-v-554b4d9c]{display:none}}.legend-container.horizontal[data-v-554b4d9c]{column-gap:12px;display:grid;height:var(--1c6c065c);justify-content:center;width:99%}.legend-container.horizontal .truncate-label[data-v-554b4d9c]{max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.horizontal li[data-v-554b4d9c]{align-items:center;margin-top:0}.legend-container.horizontal li .label[data-v-554b4d9c]{line-height:24px;white-space:nowrap}.legend-container li[data-v-554b4d9c]{align-items:start;cursor:pointer;display:flex;line-height:1}.legend-container li .legend[data-v-554b4d9c]{flex:0 0 14px;height:3px;margin-right:6px}.legend-container li .label[data-v-554b4d9c]{font-size:12px}.legend-container li .sub-label[data-v-554b4d9c]{font-size:12px;line-height:16px;word-break:none}.legend-container li .strike-through[data-v-554b4d9c]{text-decoration:line-through}.chart-parent[data-v-fdeee739]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-fdeee739]{flex-direction:column}.chart-parent.column .chart-container[data-v-fdeee739]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-fdeee739]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-fdeee739]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-fdeee739]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-fdeee739]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-fdeee739]{flex:1 1 auto;position:relative}.chart-container[data-v-fdeee739]{overflow:auto;-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-width:auto}.chart-container[data-v-fdeee739] ::-webkit-scrollbar{width:8px}.chart-container[data-v-fdeee739] ::-webkit-scrollbar-track{background:transparent}.chart-container[data-v-fdeee739] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}.chart-container .chart-body[data-v-fdeee739]{height:100%}.chart-container[data-v-fdeee739]::-webkit-scrollbar-track{background-color:#fff;border-radius:10px}.chart-container[data-v-fdeee739]::-webkit-scrollbar{width:10px}.chart-container[data-v-fdeee739]::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}.axis[data-v-fdeee739]{left:0;pointer-events:none;position:absolute;top:0;z-index:99}.axis-tooltip[data-v-fdeee739]{background-color:#3a3f51;color:#fff;padding:4px 8px;position:absolute;width:max-content;z-index:100}.tooltip-boundary[data-v-fdeee739]{height:100%;left:0;position:relative;top:0;width:100%}.chart-parent[data-v-b3095003]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-b3095003]{flex-direction:column}.chart-parent.column .chart-container[data-v-b3095003]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-b3095003]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-b3095003]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-b3095003]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-b3095003]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-b3095003]{flex:1 1 auto;position:relative}.chart-parent[data-v-3abbf084]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-3abbf084]{flex-direction:column}.chart-parent.column .chart-container[data-v-3abbf084]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-3abbf084]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-3abbf084]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-3abbf084]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-3abbf084]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-3abbf084]{flex:1 1 auto;position:relative}.kong-ui-public-csv-export-modal .modal-container{min-width:580px}.kong-ui-public-csv-export-modal .modal-container .selected-range{font-size:14px}.kong-ui-public-csv-export-modal .modal-container .text-muted{color:#00000073!important;font-size:14px}.kong-ui-public-csv-export-modal .modal-container .vitals-table{font-size:14px;margin-bottom:20px;margin-top:6px;width:100%}.kong-ui-public-csv-export-modal .modal-container .k-table thead{border-top:1px solid #e0e4ea;height:auto}.kong-ui-public-csv-export-modal .modal-container .modal-footer .vitals-report-export-button{display:inline-flex}.analytics-chart-shell[data-v-dcb1de1f],.simple-chart-shell[data-v-dcb1de1f]{border-radius:4px;display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-dcb1de1f],.simple-chart-shell .chart-empty-state[data-v-dcb1de1f]{display:flex;flex-direction:column;height:100%;justify-content:center}.analytics-chart-shell[data-v-dcb1de1f]{height:100%;width:100%}.analytics-chart-shell .analytics-chart-parent[data-v-dcb1de1f]{height:inherit;width:inherit}.analytics-chart-shell .chart-empty-state[data-v-dcb1de1f]{padding:20px 0 16px}.analytics-chart-shell .chart-header[data-v-dcb1de1f]{align-items:center;display:flex;justify-content:flex-start;padding-bottom:16px}.analytics-chart-shell .chart-header .chart-header-icons-wrapper[data-v-dcb1de1f]{display:flex;justify-content:end}.analytics-chart-shell .chart-header .chart-export-button[data-v-dcb1de1f]{display:flex;margin-left:auto;margin-right:0}.analytics-chart-shell .chart-title[data-v-dcb1de1f]{font-size:16px;font-weight:600}.analytics-chart-shell .tooltip[data-v-dcb1de1f]{display:flex;margin-left:12px;margin-top:2px}.chart-parent[data-v-5871cb7a]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-5871cb7a]{flex-direction:column}.chart-parent.column .chart-container[data-v-5871cb7a]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-5871cb7a]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-5871cb7a]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-5871cb7a]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-5871cb7a]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-5871cb7a]{flex:1 1 auto;position:relative}.chart-parent[data-v-5871cb7a]{height:auto;margin:0;padding:0;width:auto}.chart-parent .chart-container[data-v-5871cb7a]{margin:0;max-height:100px;max-width:100px;padding:0}.chart-parent .chart-totals-flex[data-v-5871cb7a]{align-items:center;display:flex;flex-direction:column;height:100px;justify-content:center;padding:24px 0 0;position:absolute;width:100px;z-index:2}.chart-parent .chart-totals-flex .metric-large[data-v-5871cb7a]{font-size:20px;font-weight:500;line-height:28px}.chart-parent .chart-totals-flex .metric-small[data-v-5871cb7a]{color:#6c7489;font-size:10px;font-weight:400;line-height:12px}.analytics-chart-shell[data-v-cb92de46],.simple-chart-shell[data-v-cb92de46]{border-radius:4px;display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-cb92de46],.simple-chart-shell .chart-empty-state[data-v-cb92de46]{display:flex;flex-direction:column;height:100%;justify-content:center}.simple-chart-shell[data-v-cb92de46]{margin:0;padding:0}.simple-chart-shell .chart-empty-state[data-v-cb92de46]{display:flex;flex-direction:column;height:100px;justify-content:center;width:100px}.simple-chart-shell .chart-empty-state[data-v-cb92de46] .empty-state-title{font-size:12px;line-height:16px;margin:0}.kong-ui-public-top-n-table[data-v-0387c1c9]{border:none!important;padding:0!important}.kong-ui-public-top-n-table .top-n-card-title[data-v-0387c1c9]{font-size:16px}.kong-ui-public-top-n-table .top-n-card-description[data-v-0387c1c9]{color:#6c7489;font-size:12px;text-align:right}.kong-ui-public-top-n-table[data-v-0387c1c9] .k-card-actions{align-self:baseline;display:flex;line-height:22px}.kong-ui-public-top-n-table .top-n-table[data-v-0387c1c9]{display:flex;flex-direction:column;width:100%}.kong-ui-public-top-n-table .top-n-table .table-headings[data-v-0387c1c9]{font-size:14px;font-weight:600;line-height:24px}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-0387c1c9]{align-self:stretch;border-bottom:1px solid #e0e4ea;display:flex;justify-content:space-between}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-0387c1c9]:last-of-type{border-bottom:none}.kong-ui-public-top-n-table .top-n-table .column-1[data-v-0387c1c9]{padding:0 24px 12px 0}.kong-ui-public-top-n-table .top-n-table .column-2[data-v-0387c1c9]{flex:1;max-width:110px;padding:0 0 12px}.kong-ui-public-top-n-table .top-n-table .table-body .table-row[data-v-0387c1c9]:first-of-type{border-top:1px solid #e0e4ea}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-0387c1c9],.kong-ui-public-top-n-table .top-n-table .table-body .column-2[data-v-0387c1c9]{padding-top:12px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-0387c1c9]{color:#3a3f51;font-size:14px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-0387c1c9] a{color:#0044f4;font-weight:700;text-decoration:none}.kong-ui-public-top-n-table.kong-card.border{border-radius:4px;padding:20px}.kong-ui-public-top-n-table.kong-card.border .k-card-header{align-items:baseline;margin-bottom:0!important}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title{margin-bottom:16px}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title h4{font-size:16px;font-weight:600}
1
+ .locked[data-v-d8d2d0cd]{cursor:move}.tooltip-container[data-v-d8d2d0cd]{background-color:#fff;border-radius:3px;box-shadow:0 5px 15px #0000001f,0 5px 10px #0000003d;max-width:425px;min-width:250px;position:absolute;transition:all .2s cubic-bezier(.25,.8,.25,1);z-index:999}.tooltip-container .tooltip-title[data-v-d8d2d0cd]{border-bottom:1px solid rgba(0,0,0,.1);display:flex;flex-direction:column;margin:8px;min-height:24px;padding-bottom:8px}.tooltip-container .tooltip-title .title[data-v-d8d2d0cd]{font-size:16px;font-weight:600}.tooltip-container .tooltip-title .subtitle[data-v-d8d2d0cd]{font-size:14px;margin-top:8px}.tooltip-container .tooltip-title .drag-icon[data-v-d8d2d0cd]{margin-top:6px;position:absolute;right:0;top:0}ul.tooltip[data-v-d8d2d0cd]{list-style:none;margin:0;max-height:300px;min-width:250px;overflow-y:auto;padding-left:0;-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-width:auto}ul.tooltip[data-v-d8d2d0cd] ::-webkit-scrollbar{width:8px}ul.tooltip[data-v-d8d2d0cd] ::-webkit-scrollbar-track{background:transparent}ul.tooltip[data-v-d8d2d0cd] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}ul.tooltip li[data-v-d8d2d0cd]{display:flex;font-size:14px;line-height:1;margin:8px}ul.tooltip li[data-v-d8d2d0cd]:last-child{padding-bottom:8px}ul.tooltip .display-label[data-v-d8d2d0cd]{max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ul.tooltip .display-value[data-v-d8d2d0cd]{margin-left:auto;padding-left:8px;white-space:nowrap}ul.tooltip .tooltip-legend[data-v-d8d2d0cd]{display:inline-flex;flex-direction:row;height:15px;margin-right:8px;width:3px}.legend-container[data-v-554b4d9c]{display:flex;margin:6px 0 0;max-height:inherit;overflow-x:hidden;overflow-y:auto;padding-left:0;-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-width:auto}.legend-container[data-v-554b4d9c] ::-webkit-scrollbar{width:8px}.legend-container[data-v-554b4d9c] ::-webkit-scrollbar-track{background:transparent}.legend-container[data-v-554b4d9c] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}.legend-container.vertical[data-v-554b4d9c]{flex-direction:column;justify-content:flex-start;max-height:90%;max-width:15%;min-width:10%;padding-left:12px;row-gap:16px}.legend-container.vertical .truncate-label[data-v-554b4d9c]{max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.vertical li .legend[data-v-554b4d9c]{margin-top:4px}@media (max-width: 767px){.legend-container.vertical[data-v-554b4d9c]{column-gap:12px;display:grid;grid-template-columns:repeat(auto-fit,12ch);height:40px;justify-content:center;max-width:99%!important}.legend-container.vertical .sub-label[data-v-554b4d9c]{display:none}}.legend-container.horizontal[data-v-554b4d9c]{column-gap:12px;display:grid;height:var(--1c6c065c);justify-content:center;width:99%}.legend-container.horizontal .truncate-label[data-v-554b4d9c]{max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.horizontal li[data-v-554b4d9c]{align-items:center;margin-top:0}.legend-container.horizontal li .label[data-v-554b4d9c]{line-height:24px;white-space:nowrap}.legend-container li[data-v-554b4d9c]{align-items:start;cursor:pointer;display:flex;line-height:1}.legend-container li .legend[data-v-554b4d9c]{flex:0 0 14px;height:3px;margin-right:6px}.legend-container li .label[data-v-554b4d9c]{font-size:12px}.legend-container li .sub-label[data-v-554b4d9c]{font-size:12px;line-height:16px;word-break:none}.legend-container li .strike-through[data-v-554b4d9c]{text-decoration:line-through}.chart-parent[data-v-fdeee739]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-fdeee739]{flex-direction:column}.chart-parent.column .chart-container[data-v-fdeee739]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-fdeee739]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-fdeee739]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-fdeee739]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-fdeee739]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-fdeee739]{flex:1 1 auto;position:relative}.chart-container[data-v-fdeee739]{overflow:auto;-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-width:auto}.chart-container[data-v-fdeee739] ::-webkit-scrollbar{width:8px}.chart-container[data-v-fdeee739] ::-webkit-scrollbar-track{background:transparent}.chart-container[data-v-fdeee739] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}.chart-container .chart-body[data-v-fdeee739]{height:100%}.chart-container[data-v-fdeee739]::-webkit-scrollbar-track{background-color:#fff;border-radius:10px}.chart-container[data-v-fdeee739]::-webkit-scrollbar{width:10px}.chart-container[data-v-fdeee739]::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}.axis[data-v-fdeee739]{left:0;pointer-events:none;position:absolute;top:0;z-index:99}.axis-tooltip[data-v-fdeee739]{background-color:#3a3f51;color:#fff;padding:4px 8px;position:absolute;width:max-content;z-index:100}.tooltip-boundary[data-v-fdeee739]{height:100%;left:0;position:relative;top:0;width:100%}.chart-parent[data-v-b3095003]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-b3095003]{flex-direction:column}.chart-parent.column .chart-container[data-v-b3095003]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-b3095003]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-b3095003]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-b3095003]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-b3095003]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-b3095003]{flex:1 1 auto;position:relative}.chart-parent[data-v-3abbf084]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-3abbf084]{flex-direction:column}.chart-parent.column .chart-container[data-v-3abbf084]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-3abbf084]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-3abbf084]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-3abbf084]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-3abbf084]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-3abbf084]{flex:1 1 auto;position:relative}.kong-ui-public-csv-export-modal .modal-container{min-width:580px}.kong-ui-public-csv-export-modal .modal-container .selected-range{font-size:14px}.kong-ui-public-csv-export-modal .modal-container .text-muted{color:#00000073!important;font-size:14px}.kong-ui-public-csv-export-modal .modal-container .vitals-table{font-size:14px;margin-bottom:20px;margin-top:6px;width:100%}.kong-ui-public-csv-export-modal .modal-container .k-table thead{border-top:1px solid #e0e4ea;height:auto}.kong-ui-public-csv-export-modal .modal-container .modal-footer .vitals-report-export-button{display:inline-flex}.analytics-chart-shell[data-v-dcb1de1f],.simple-chart-shell[data-v-dcb1de1f]{border-radius:4px;display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-dcb1de1f],.simple-chart-shell .chart-empty-state[data-v-dcb1de1f]{display:flex;flex-direction:column;height:100%;justify-content:center}.analytics-chart-shell[data-v-dcb1de1f]{height:100%;width:100%}.analytics-chart-shell .analytics-chart-parent[data-v-dcb1de1f]{height:inherit;width:inherit}.analytics-chart-shell .chart-empty-state[data-v-dcb1de1f]{padding:20px 0 16px}.analytics-chart-shell .chart-header[data-v-dcb1de1f]{align-items:center;display:flex;justify-content:flex-start;padding-bottom:16px}.analytics-chart-shell .chart-header .chart-header-icons-wrapper[data-v-dcb1de1f]{display:flex;justify-content:end}.analytics-chart-shell .chart-header .chart-export-button[data-v-dcb1de1f]{display:flex;margin-left:auto;margin-right:0}.analytics-chart-shell .chart-title[data-v-dcb1de1f]{font-size:16px;font-weight:600}.analytics-chart-shell .tooltip[data-v-dcb1de1f]{display:flex;margin-left:12px;margin-top:2px}.chart-parent[data-v-5871cb7a]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-5871cb7a]{flex-direction:column}.chart-parent.column .chart-container[data-v-5871cb7a]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-5871cb7a]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-5871cb7a]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-5871cb7a]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-5871cb7a]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-5871cb7a]{flex:1 1 auto;position:relative}.chart-parent[data-v-5871cb7a]{height:auto;margin:0;padding:0;width:auto}.chart-parent .chart-container[data-v-5871cb7a]{margin:0;max-height:100px;max-width:100px;padding:0}.chart-parent .chart-totals-flex[data-v-5871cb7a]{align-items:center;display:flex;flex-direction:column;height:100px;justify-content:center;padding:24px 0 0;position:absolute;width:100px;z-index:2}.chart-parent .chart-totals-flex .metric-large[data-v-5871cb7a]{font-size:20px;font-weight:500;line-height:28px}.chart-parent .chart-totals-flex .metric-small[data-v-5871cb7a]{color:#6c7489;font-size:10px;font-weight:400;line-height:12px}.analytics-chart-shell[data-v-cb92de46],.simple-chart-shell[data-v-cb92de46]{border-radius:4px;display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-cb92de46],.simple-chart-shell .chart-empty-state[data-v-cb92de46]{display:flex;flex-direction:column;height:100%;justify-content:center}.simple-chart-shell[data-v-cb92de46]{margin:0;padding:0}.simple-chart-shell .chart-empty-state[data-v-cb92de46]{display:flex;flex-direction:column;height:100px;justify-content:center;width:100px}.simple-chart-shell .chart-empty-state[data-v-cb92de46] .empty-state-title{font-size:12px;line-height:16px;margin:0}.kong-ui-public-top-n-table[data-v-840224c1]{border:none!important;height:100%;padding:0!important}.kong-ui-public-top-n-table .top-n-card-title[data-v-840224c1]{font-size:16px}.kong-ui-public-top-n-table .top-n-card-description[data-v-840224c1]{color:#6c7489;font-size:12px;text-align:right}.kong-ui-public-top-n-table[data-v-840224c1] .k-card-actions{align-self:baseline;display:flex;line-height:22px}.kong-ui-public-top-n-table[data-v-840224c1] .card-content{overflow-y:auto;-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-width:auto}.kong-ui-public-top-n-table[data-v-840224c1] .card-content ::-webkit-scrollbar{width:8px}.kong-ui-public-top-n-table[data-v-840224c1] .card-content ::-webkit-scrollbar-track{background:transparent}.kong-ui-public-top-n-table[data-v-840224c1] .card-content ::-webkit-scrollbar-thumb{background-color:#e0e4ea;border-radius:10px}.kong-ui-public-top-n-table .top-n-table[data-v-840224c1]{display:flex;flex-direction:column;max-height:100%;width:100%}.kong-ui-public-top-n-table .top-n-table .table-headings[data-v-840224c1]{flex-shrink:0;font-size:14px;font-weight:600;line-height:24px}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-840224c1]{align-self:stretch;border-bottom:1px solid #e0e4ea;display:flex;justify-content:space-between}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-840224c1]:last-of-type{border-bottom:none}.kong-ui-public-top-n-table .top-n-table .column-1[data-v-840224c1]{padding:0 24px 12px 0}.kong-ui-public-top-n-table .top-n-table .column-2[data-v-840224c1]{flex:1;max-width:110px;padding:0 0 12px}.kong-ui-public-top-n-table .top-n-table .table-body[data-v-840224c1]{overflow-y:auto}.kong-ui-public-top-n-table .top-n-table .table-body .table-row[data-v-840224c1]:first-of-type{border-top:1px solid #e0e4ea}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-840224c1],.kong-ui-public-top-n-table .top-n-table .table-body .column-2[data-v-840224c1]{padding-top:12px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-840224c1]{color:#3a3f51;font-size:14px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-840224c1] a{color:#0044f4;font-weight:700;text-decoration:none}.kong-ui-public-top-n-table.kong-card.border{border-radius:4px;padding:20px}.kong-ui-public-top-n-table.kong-card.border .k-card-header{align-items:baseline;margin-bottom:0!important}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title{margin-bottom:16px}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title h4{font-size:16px;font-weight:600}
@@ -125,4 +125,10 @@ export interface DatasetLabel {
125
125
  name: string;
126
126
  id: string;
127
127
  }
128
+ export interface TopNTableRecord {
129
+ id: string;
130
+ name: string;
131
+ deleted: boolean;
132
+ dimension: string;
133
+ }
128
134
  //# sourceMappingURL=chart-data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chart-data.d.ts","sourceRoot":"","sources":["../../../src/types/chart-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAG3D,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAEvI,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,CAAC,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACvC;AAED,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAA;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,KAAK,EAAE,gBAAgB,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAAE,kBAAkB,KAAK,MAAM,CAAA;AAExF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAA;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,kBAAkB,CAAC,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAAC;IACrD;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;OAEG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAA;IACtB;;OAEG;IACH,kBAAkB,CAAC,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAAC;IACrD;;OAEG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ"}
1
+ {"version":3,"file":"chart-data.d.ts","sourceRoot":"","sources":["../../../src/types/chart-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAG3D,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAEvI,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,CAAC,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACvC;AAED,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAA;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,KAAK,EAAE,gBAAgB,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAAE,kBAAkB,KAAK,MAAM,CAAA;AAExF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAA;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,kBAAkB,CAAC,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAAC;IACrD;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;OAEG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAA;IACtB;;OAEG;IACH,kBAAkB,CAAC,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAAC;IACrD;;OAEG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB"}
@@ -22877,7 +22877,7 @@ const Uk = ["id"], Yk = /* @__PURE__ */ he({
22877
22877
  ]), 1024);
22878
22878
  };
22879
22879
  }
22880
- }), LO = /* @__PURE__ */ wn(bO, [["__scopeId", "data-v-0387c1c9"]]), _f = "#e0e4ea", yO = {
22880
+ }), LO = /* @__PURE__ */ wn(bO, [["__scopeId", "data-v-840224c1"]]), _f = "#e0e4ea", yO = {
22881
22881
  100: ["#c8e2fd", "#80bfff", "#4da6ff", "#1a8cff", "#0072e5", "#0059b2"],
22882
22882
  200: ["#ceedd2", "#9edca6", "#89d595", "#6fcc83", "#44c26b", "#0bb652", "#0ca84a", "#169643", "#196e33", "#1b572a"],
22883
22883
  300: ["#fff4db", "#ffe9b8", "#ffe2a1", "#ffd982", "#ffd062", "#fdc53b", "#f4bb1e", "#e8b00b", "#d9a30f", "#c89407"],
@@ -41,4 +41,4 @@ License: MIT
41
41
  `&&P!=="\r"&&P!==`\r
42
42
  `&&(P=`
43
43
  `);var I=0,rt=!1;this.parse=function(U,bt,dt){if(typeof U!="string")throw new Error("Input must be a string");var W=U.length,L=O.length,F=P.length,j=E.length,Z=k(Y),K=[],N=[],A=[],Q=I=0;if(!U)return ue();if(M.header&&!bt){var q=U.split(P)[0].split(O),vt=[],ut={},Pt=!1;for(var _t in q){var et=q[_t];k(M.transformHeader)&&(et=M.transformHeader(et,_t));var xt=et,Ft=ut[et]||0;for(0<Ft&&(Pt=!0,xt=et+"_"+Ft),ut[et]=Ft+1;vt.includes(xt);)xt=xt+"_"+Ft;vt.push(xt)}if(Pt){var Se=U.split(P);Se[0]=vt.join(O),U=Se.join(P)}}if($||$!==!1&&U.indexOf(D)===-1){for(var Ae=U.split(P),ye=0;ye<Ae.length;ye++){if(A=Ae[ye],I+=A.length,ye!==Ae.length-1)I+=P.length;else if(dt)return ue();if(!E||A.substring(0,j)!==E){if(Z){if(K=[],en(A.split(O)),be(),rt)return ue()}else en(A.split(O));if(G&&G<=ye)return K=K.slice(0,G),ue(!0)}}return ue()}for(var It=U.indexOf(O,I),Ut=U.indexOf(P,I),tn=new RegExp(g(z)+g(D),"g"),kt=U.indexOf(D,I);;)if(U[I]!==D)if(E&&A.length===0&&U.substring(I,I+j)===E){if(Ut===-1)return ue();I=Ut+F,Ut=U.indexOf(P,I),It=U.indexOf(O,I)}else if(It!==-1&&(It<Ut||Ut===-1))A.push(U.substring(I,It)),I=It+L,It=U.indexOf(O,I);else{if(Ut===-1)break;if(A.push(U.substring(I,Ut)),Ie(Ut+F),Z&&(be(),rt))return ue();if(G&&K.length>=G)return ue(!0)}else for(kt=I,I++;;){if((kt=U.indexOf(D,kt+1))===-1)return dt||N.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:K.length,index:I}),ke();if(kt===W-1)return ke(U.substring(I,kt).replace(tn,D));if(D!==z||U[kt+1]!==z){if(D===z||kt===0||U[kt-1]!==z){It!==-1&&It<kt+1&&(It=U.indexOf(O,kt+1)),Ut!==-1&&Ut<kt+1&&(Ut=U.indexOf(P,kt+1));var Sn=_e(Ut===-1?It:Math.min(It,Ut));if(U.substr(kt+1+Sn,L)===O){A.push(U.substring(I,kt).replace(tn,D)),U[I=kt+1+Sn+L]!==D&&(kt=U.indexOf(D,I)),It=U.indexOf(O,I),Ut=U.indexOf(P,I);break}var Le=_e(Ut);if(U.substring(kt+1+Le,kt+1+Le+F)===P){if(A.push(U.substring(I,kt).replace(tn,D)),Ie(kt+1+Le+F),It=U.indexOf(O,I),kt=U.indexOf(D,I),Z&&(be(),rt))return ue();if(G&&K.length>=G)return ue(!0);break}N.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:K.length,index:I}),kt++}}else kt++}return ke();function en(Qt){K.push(Qt),Q=I}function _e(Qt){var _a=0;if(Qt!==-1){var vi=U.substring(kt+1,Qt);vi&&vi.trim()===""&&(_a=vi.length)}return _a}function ke(Qt){return dt||(Qt===void 0&&(Qt=U.substring(I)),A.push(Qt),I=W,en(A),Z&&be()),ue()}function Ie(Qt){I=Qt,en(A),A=[],Ut=U.indexOf(P,I)}function ue(Qt){return{data:K,errors:N,meta:{delimiter:O,linebreak:P,aborted:rt,truncated:!!Qt,cursor:Q+(bt||0)}}}function be(){Y(ue()),K=[],N=[]}},this.abort=function(){rt=!0},this.getCharIndex=function(){return I}}function v(M){var D=M.data,O=s[D.workerId],P=!1;if(D.error)O.userError(D.error,D.file);else if(D.results&&D.results.data){var E={abort:function(){P=!0,m(D.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:w,resume:w};if(k(O.userStep)){for(var Y=0;Y<D.results.data.length&&(O.userStep({data:D.results.data[Y],errors:D.results.errors,meta:D.results.meta},E),!P);Y++);delete D.results}else k(O.userChunk)&&(O.userChunk(D.results,E,D.file),delete D.results)}D.finished&&!P&&m(D.workerId,D.results)}function m(M,D){var O=s[M];k(O.userComplete)&&O.userComplete(D),O.terminate(),delete s[M]}function w(){throw new Error("Not implemented.")}function T(M){if(typeof M!="object"||M===null)return M;var D=Array.isArray(M)?[]:{};for(var O in M)D[O]=T(M[O]);return D}function S(M,D){return function(){M.apply(D,arguments)}}function k(M){return typeof M=="function"}return a&&(i.onmessage=function(M){var D=M.data;if(l.WORKER_ID===void 0&&D&&(l.WORKER_ID=D.workerId),typeof D.input=="string")i.postMessage({workerId:l.WORKER_ID,results:l.parse(D.input,D.config),finished:!0});else if(i.File&&D.input instanceof File||D.input instanceof Object){var O=l.parse(D.input,D.config);O&&i.postMessage({workerId:l.WORKER_ID,results:O,finished:!0})}}),(d.prototype=Object.create(u.prototype)).constructor=d,(f.prototype=Object.create(u.prototype)).constructor=f,(p.prototype=Object.create(p.prototype)).constructor=p,(b.prototype=Object.create(u.prototype)).constructor=b,l})})(ep);var LC=ep.exports;const IC=["id"],NC=h.defineComponent({__name:"VueJsonCsv",props:{data:{type:Array,required:!0},fields:{type:Array,required:!1,default:null},labels:{type:Object,required:!1,default:null},filename:{type:String,default:"report-data.csv"},delimiter:{type:String,default:",",required:!1},separatorExcel:{type:Boolean,default:!1},encoding:{type:String,default:"utf-8"},testing:{type:Boolean,required:!1,default:!1}},emits:["export-started","export-finished"],setup(n,{emit:t}){const e=t,i=n,r=h.computed(()=>`export_${new Date().getTime()}`),a=h.computed(()=>{const u=l();return u.length?u:null}),s=()=>{const u=i.labels;if(typeof i.fields!==Xn.Object)throw new Error("Labels needs to be a object containing key / value pairs.");return typeof u===Xn.Object?d=>nC(d,(f,p)=>u[p]||p):d=>d},o=()=>{const u=i.fields;if(typeof i.fields!==Xn.Object&&!Array.isArray(u))throw new Error("Fields needs to be an array of strings.");return Array.isArray(u)?d=>RC(d,u):d=>d},l=()=>{if(typeof i.fields===Xn.Undefined&&typeof i.labels===Xn.Undefined)return i.data;const u=s(),d=o();return i.data.map(f=>u(d(f)))},c=()=>{if(!(a!=null&&a.value)){console.warn("No data to export");return}e("export-started",a.value);let u=LC.unparse(a.value,Object.assign({delimiter:i.delimiter,encoding:i.encoding}));if(i.separatorExcel&&(u="SEP="+i.delimiter+`\r
44
- `+u),i.encoding==="utf-8"&&(u="\uFEFF"+u),e("export-finished",i.filename),!i.testing){const d=new Blob([u],{type:"text/csv;charset="+i.encoding});AC.saveAs(d,i.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:r.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,IC))}}),FC=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(i,r)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(NC,{data:i.rows,fields:e.value,filename:i.filename,labels:i.headers},{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3},8,["data","fields","filename","labels"])]))}}),UC={class:"kong-ui-public-csv-export-modal"},BC={key:0,class:"selected-range"},YC={key:1,class:"text-muted",tag:"span"},np=3,ip=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=St.useI18n(),i=n,r=t,a=`${i.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,s=h.ref(!0),o=h.computed(()=>{var x,g;return!!((g=(x=i.chartData)==null?void 0:x.data)!=null&&g.length)}),l=h.ref(1),c=h.computed(()=>p.value.rows.length),u=St.useChartSelectedRange(h.toRef(i,"chartData")),d=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(np,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),f=()=>{r("toggleModal",!1)},p=h.computed(()=>{var T,S,k;if(!o.value||!((T=i.chartData)!=null&&T.meta.metric_names))return{headers:[],rows:[],csvHeaders:{}};const x=i.chartData.data.some(M=>M.timestamp!==i.chartData.data[0].timestamp),g=i.chartData.data.map(M=>{const D=new Date(M.timestamp);return{...Object.keys(M.event).reduce((P,E)=>{if(E in i.chartData.meta.display){const Y=M.event[E],G=i.chartData.meta.display[E];P[E]=Y&&G&&G[Y].name||M.event[E]}else P[E]=M.event[E];return P},{}),...x?{timestamp:ko(D,"yyyy-MM-dd HH:mm:ss"),tzOffset:ko(D,"XXX")}:{}}});let y=[];x&&(y=[{label:e.t("csvExport.Timestamp"),key:"timestamp"},{label:e.t("csvExport.UtcOffset"),key:"tzOffset"}]);const v="display"in i.chartData.meta&&((S=i.chartData.meta)!=null&&S.display)?(k=i.chartData.meta)==null?void 0:k.display:{},m=[...y,...Object.keys(v).map(M=>({label:e.t(`chartLabels.${M}`),key:M})),...i.chartData.meta.metric_names.map(M=>({label:e.t(`chartLabels.${M}`),key:M}))],w=m.reduce((M,D)=>(M[D.key]=D.label,M),{});return{headers:m,csvHeaders:w,rows:g}}),b=()=>{const{rows:x}=p.value;return s.value=!1,{total:Number(x.length)||0,data:x.slice(0,np)}};return h.watch(p,()=>{l.value++}),(x,g)=>{const y=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KTable"),m=h.resolveComponent("KButton"),w=h.resolveComponent("KModal");return h.openBlock(),h.createElementBlock("div",UC,[h.createVNode(w,{class:"vitals-report","data-testid":"csv-export-modal","show-dismiss-icon":"",title:h.unref(e).t("csvExport.exportPreview"),visible:"",onCancel:f,onKeyup:h.withKeys(f,["esc"])},{default:h.withCtx(()=>{var T;return[h.createElementVNode("div",null,[o.value?(h.openBlock(),h.createElementBlock("div",BC,[h.createElementVNode("p",null,h.toDisplayString(x.modalDescription?x.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(h.unref(u)),1)])):h.createCommentVNode("",!0),h.createVNode(v,{class:"vitals-table","disable-pagination":"","disable-sorting":"",fetcher:b,"fetcher-cache-key":String(l.value),"has-hover":!1,headers:((T=p.value)==null?void 0:T.headers)||[]},{"empty-state":h.withCtx(()=>[h.createVNode(y,{"action-button-visible":!1},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),default:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!s.value&&o.value?(h.openBlock(),h.createElementBlock("div",YC,h.toDisplayString(d.value),1)):h.createCommentVNode("",!0)])]}),"footer-actions":h.withCtx(()=>[h.createVNode(m,{appearance:"tertiary",class:"cancel-btn",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(FC,{class:"vitals-report-export-button",filename:a,headers:p.value.csvHeaders,rows:p.value.rows},{default:h.withCtx(()=>[h.createVNode(m,{appearance:"primary","data-testid":"csv-download-button",disabled:s.value||!o.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.downloadButton")),1)]),_:1},8,["disabled"])]),_:1},8,["headers","rows"])]),_:1},8,["title"])])}}}),rp=h.defineComponent({__name:"CsvExportButton",props:{data:{type:Object,required:!0},text:{type:String,required:!1,default:void 0},buttonAppearance:{type:String,required:!1,default:()=>"tertiary"},filenamePrefix:{type:String,required:!1,default:void 0}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>t.filenamePrefix||e.t("csvExport.defaultFilename")),r=h.ref(!1),a=o=>{r.value=o},s=()=>{a(!0)};return(o,l)=>{const c=h.resolveComponent("KButton");return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(c,{appearance:n.buttonAppearance,class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(s,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.text||h.unref(e).t("csvExport.exportButton")),1)]),_:1},8,["appearance"]),r.value?(h.openBlock(),h.createBlock(ip,{key:0,"chart-data":n.data,filename:i.value,onToggleModal:a},null,8,["chart-data","filename"])):h.createCommentVNode("",!0)],64)}}}),WC={class:"analytics-chart-shell"},zC={key:0,class:"chart-header"},HC={key:0,class:"chart-title"},$C={class:"chart-header-icons-wrapper"},jC={key:1,class:"chart-export-button"},VC={key:2,class:"analytics-chart-parent"},qC=h.defineComponent({__name:"AnalyticsChart",props:{allowCsvExport:{type:Boolean,required:!1,default:!1},chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!1,default:""},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:""},filenamePrefix:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},syntheticsDataKey:{type:String,required:!1,default:""},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.toRef(t,"chartData"),r=h.computed(()=>p.value?St.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Ce},h.toRef(t,"chartData")).value:St.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Ce},h.toRef(t,"chartData")).value),a=h.computed(()=>{var M;return(M=t.chartData)!=null&&M.meta?"start_ms"in t.chartData.meta?t.chartData.meta.end_ms-t.chartData.meta.start_ms:void 0:0}),s=h.computed(()=>{var M;return(M=t.chartData.meta)!=null&&M.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),o=h.computed(()=>t.showLegendValues&&t.legendPosition!==Wt.Bottom),{legendValues:l}=St.useChartLegendValues(r,t.chartOptions.type,s),c=h.computed(()=>{var M,D,O;return((O=(D=(M=t.chartData)==null?void 0:M.meta)==null?void 0:D.limit)==null?void 0:O.toString())||null}),u=h.computed(()=>{var M,D;return((D=(M=t.chartData)==null?void 0:M.meta)==null?void 0:D.truncated)||!1}),d=e.t("limitedResultsShown",{maxReturned:c.value}),f=h.computed(()=>[ne.VERTICAL_BAR.toString(),ne.HORIZONTAL_BAR.toString()].includes(t.chartOptions.type)),p=h.computed(()=>[ne.TIMESERIES_BAR,ne.TIMESERIES_LINE].some(M=>M===t.chartOptions.type)),b=h.computed(()=>t.chartOptions.type===ne.DOUGHNUT),x=h.computed(()=>t.chartOptions.type.includes("Vertical")?"vertical":"horizontal"),g=h.computed(()=>{var O,P,E;if(!((O=t.chartData)!=null&&O.meta.metric_names)||!((P=t.chartData)!=null&&P.meta.metric_units))return;const M=t.chartData.meta.metric_names[0],D=t.chartData.meta.metric_units[M];return((E=t.chartOptions)==null?void 0:E.metricAxesTitle)||e.te(`metricAxisTitles.${M}`)&&e.te(`chartUnits.${D}`)&&e.t(`metricAxisTitles.${M}`,{unit:e.t(`chartUnits.${D}`,{plural:"s"})})||void 0}),y=h.computed(()=>{const M=p.value?"Time":Object.keys(t.chartData.meta.display||t.chartData.meta.metric_names)[0];return t.chartOptions.dimensionAxesTitle||e.te(`chartLabels.${M}`)&&e.t(`chartLabels.${M}`)||void 0}),v=h.computed(()=>{const M=Ml(Number(t.chartData.meta.granularity_ms));return e.t(`granularityAxisTitles.${M}`)}),m=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),w=h.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),T=h.computed(()=>p.value?Ew(r.value):t.chartData&&t.chartData.meta&&t.chartData.data.length),S=h.computed(()=>T.value&&u.value&&c.value||t.chartTitle||t.allowCsvExport&&T.value),k=h.computed(()=>t.chartData.meta.granularity_ms?Ml(t.chartData.meta.granularity_ms)||lt.HOURLY:Ml(new Date(t.chartData.data[1].timestamp).getTime()-new Date(t.chartData.data[0].timestamp).getTime())||lt.HOURLY);return h.provide("showLegendValues",o),h.provide("legendPosition",h.toRef(t,"legendPosition")),(M,D)=>{const O=h.resolveComponent("KTooltip"),P=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",WC,[S.value?(h.openBlock(),h.createElementBlock("div",zC,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",HC,h.toDisplayString(n.chartTitle),1)):h.createCommentVNode("",!0),h.createElementVNode("div",$C,[T.value&&u.value&&c.value?(h.openBlock(),h.createBlock(O,{key:0,class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(d)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(fD),{color:h.unref(pD),decorative:"",size:h.unref(gD)},null,8,["color","size"])]),_:1})):h.createCommentVNode("",!0)]),n.allowCsvExport&&T.value?(h.openBlock(),h.createElementBlock("div",jC,[h.createVNode(rp,{data:i.value,"filename-prefix":n.filenamePrefix},null,8,["data","filename-prefix"])])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),T.value?(h.openBlock(),h.createElementBlock("div",VC,[p.value?(h.openBlock(),h.createBlock(tC,{key:0,"chart-data":r.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"dataset-colors":n.chartOptions.chartDatasetColors,"dimension-axes-title":v.value,fill:n.chartOptions.fill,granularity:k.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":a.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dataset-colors","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","tooltip-title","type"])):f.value?(h.openBlock(),h.createBlock(YD,{key:1,annotations:n.showAnnotations,"chart-data":r.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"data-testid":"bar-chart-container","dimension-axes-title":y.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,orientation:x.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["annotations","chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","stacked","synthetics-data-key","tooltip-title"])):b.value?(h.openBlock(),h.createBlock(ZD,{key:2,"chart-data":r.value,"dataset-colors":n.chartOptions.chartDatasetColors,fill:n.chartOptions.fill,"legend-position":n.legendPosition,"legend-values":h.unref(l),"metric-unit":s.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["chart-data","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(P,{key:1,"action-button-visible":!1,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(m.value),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.value),1)]),_:1}))])}}}),XC=Je(qC,[["__scopeId","data-v-dcb1de1f"]]),GC={class:"chart-parent","data-testid":"doughnut-chart-parent"},KC={class:"chart-totals-flex"},QC={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},ZC=h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:li.Hidden},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Ce},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.ref(Dn()),r=h.computed(()=>[t.chartData.datasets.reduce((b,x)=>(b.labels.push(x.label),b.borderColor.push(x.backgroundColor),b.backgroundColor.push(x.backgroundColor),b.data.push(x.data.reduce((g,y)=>g+y,0)),b),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),a=h.computed(()=>({...t.chartData,datasets:r.value}));St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const s={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},o=h.ref(),l=h.computed(()=>{var p;return rr((p=r==null?void 0:r.value[0])==null?void 0:p.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var p,b;return rr(((p=r==null?void 0:r.value[0])==null?void 0:p.data[0])+((b=r==null?void 0:r.value[0])==null?void 0:b.data[1]),{capital:!0})}),u=h.computed(()=>{var p;return`color: ${(p=r==null?void 0:r.value[0])==null?void 0:p.backgroundColor[t.numerator]}`}),d=h.computed(()=>[li.Full,li.SingleMetric].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay===li.Full);return(p,b)=>(h.openBlock(),h.createElementBlock("div",GC,[h.createElementVNode("div",KC,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",QC,h.toDisplayString(h.unref(e).t("total"))+": "+h.toDisplayString(c.value),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({height:n.height,width:n.width})},[h.createVNode(h.unref(qh),{ref_key:"chartInstance",ref:o,"chart-id":i.value,data:a.value,options:s},null,8,["chart-id","data","options"])],4)]))}}),JC=Je(ZC,[["__scopeId","data-v-5871cb7a"]]),tS={class:"simple-chart-shell"},eS={key:1,class:"analytics-chart-parent"},nS=Je(h.defineComponent({__name:"SimpleChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},emptyStateTitle:{type:String,required:!1,default:""},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>{var c;const l=St.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||Ce},h.toRef(t,"chartData")).value;return(c=t.chartOptions)!=null&&c.reverseDataset&&(l==null||l.datasets.reverse()),l}),r=h.computed(()=>{var l;return(l=t.chartData.meta)!=null&&l.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),a=h.computed(()=>t.chartOptions.type===na.GAUGE),s=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),o=h.computed(()=>t.chartData&&t.chartData.meta&&t.chartData.data.length);return(l,c)=>{const u=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",tS,[o.value?(h.openBlock(),h.createElementBlock("div",eS,[a.value?(h.openBlock(),h.createBlock(JC,{key:0,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":r.value,numerator:n.chartOptions.numerator,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","numerator","synthetics-data-key","width"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(u,{key:0,"action-button-visible":!0,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(s.value),1)]),_:1}))])}}}),[["__scopeId","data-v-cb92de46"]]),iS={class:"top-n-card-title","data-testid":"top-n-card-title"},rS={class:"top-n-card-description","data-testid":"top-n-card-description"},aS={key:3,class:"top-n-table","data-testid":"top-n-table"},sS={class:"table-headings"},oS={class:"table-row"},lS={class:"column-1"},cS={class:"column-2"},uS={class:"table-body","data-testid":"top-n-data"},dS=["data-testid"],fS={class:"column-1"},hS={class:"column-2"},pS=Je(h.defineComponent({__name:"TopNTable",props:{title:{type:String,required:!0},description:{type:String,default:""},data:{type:Object,required:!0},emptyStateTitle:{type:String,default:""},isLoading:{type:Boolean,default:!1}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>t.data.data),r=h.computed(()=>{var b;return!!((b=i.value)!=null&&b.length)}),a=h.computed(()=>{var b,x;return(b=t.data.meta)!=null&&b.display&&((x=Object.keys(t.data.meta.display))==null?void 0:x[0])||""}),s=h.computed(()=>a.value?t.data.meta.display[a.value]:{}),o=h.computed(()=>{var b,x;return(x=(b=t.data.meta)==null?void 0:b.metric_names)!=null&&x.length?t.data.meta.metric_names[0]:""}),l=h.computed(()=>o.value?e.t(`chartLabels.${o.value}`)||o.value:""),c=h.computed(()=>{if(!r.value)return"";if(t.data.meta){if(s.value&&!Object.keys(s.value).length)return e.t("topNTable.errors.display");if(!o.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.meta");return""}),u=b=>{const x=b.event;return String(x[a.value])},d=b=>{const x=u(b),g=s.value&&s.value[x];return g?g.name:"-"},f=b=>{const x=u(b),g=s.value&&s.value[x];return g?!!g.deleted:!1},p=b=>{if(!o.value)return"–";const g=b.event[o.value];return g?rr(g,{capital:!0,round:!0}):"–"};return(b,x)=>{const g=h.resolveComponent("KEmptyState"),y=h.resolveComponent("KSkeleton"),v=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(v,{class:"kong-ui-public-top-n-table"},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(g,{key:0,"action-button-visible":!1,"data-testid":"top-n-error-state","icon-variant":"error"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(y,{key:1,"table-columns":2,type:"table"})):r.value?(h.openBlock(),h.createElementBlock("div",aS,[h.createElementVNode("div",sS,[h.createElementVNode("div",oS,[h.createElementVNode("div",lS,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",cS,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",uS,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(i.value,(m,w)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${w}`,class:"table-row","data-testid":`row-${u(m)}`},[h.createElementVNode("div",fS,[h.renderSlot(b.$slots,"name",{record:{id:u(m),name:d(m),deleted:f(m),dimension:a.value}},()=>[h.createTextVNode(h.toDisplayString(d(m)),1)],!0)]),h.createElementVNode("div",hS,"   "+h.toDisplayString(p(m)),1)],8,dS))),128))])])):(h.openBlock(),h.createBlock(g,{key:2,"action-button-visible":!1,"data-testid":"top-n-empty-state"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.emptyStateTitle||h.unref(e).t("topNTable.defaultEmptyStateTitle")),1)]),_:1}))]),_:2},[n.title?{name:"title",fn:h.withCtx(()=>[h.createElementVNode("div",iS,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",rS,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1024)}}}),[["__scopeId","data-v-0387c1c9"]]),Xl="#e0e4ea",gS={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},dr=(n,t)=>{let e=1;const i=gS[n],r=new Map;for(const a of t)r.set(a,i[e]),e=e%(i.length-1)+1;return r.set(-1,i[0]),r},ap=new Map([[100,dr("100",[100,101,102,103])],[200,dr("200",[200,201,202,203,204,205,206,207,208,226])],[300,dr("300",[300,301,302,303,304,305,307,308])],[400,dr("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,dr("500",[500,501,502,503,504,505,506,507,508,510,511])]]),sp=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,i=ap.get(e);return i===void 0?Xl:i.get(t)??i.get(-1)??Xl},mS=n=>{const t=sp(n);return{solid:t,light:t}};st.AnalyticsChart=XC,st.ChartLegendPosition=Wt,st.ChartMetricDisplay=li,st.ChartTypes=ne,st.ChartTypesSimple=na,st.CsvExportButton=rp,st.CsvExportModal=ip,st.DECIMAL_DISPLAY=wf,st.FONT_SIZE_REGULAR=Tf,st.FONT_SIZE_SMALL=_f,st.MAX_LABEL_LENGTH=sa,st.OTHERS_COLOR=q_,st.SimpleChart=nS,st.TopNTable=pS,st.ValidType=Xn,st.accessibleGrey=Df,st.apiRequestStatusCodeColors=Cf,st.codesInSpec=ap,st.darkenColor=oa,st.datavisPalette=Ce,st.errorRateColors=j_,st.formatTime=aa,st.latencyColors=V_,st.lightGrey=Xl,st.lookupColor=X_,st.lookupDatavisColor=ui,st.lookupStatusCodeCategoryColor=mS,st.lookupStatusCodeColor=sp,st.numberFormatter=ra,st.statusCodeBadgeBackgroundColor=H_,st.trafficColors=$_,Object.defineProperty(st,Symbol.toStringTag,{value:"Module"})});
44
+ `+u),i.encoding==="utf-8"&&(u="\uFEFF"+u),e("export-finished",i.filename),!i.testing){const d=new Blob([u],{type:"text/csv;charset="+i.encoding});AC.saveAs(d,i.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:r.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,IC))}}),FC=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(i,r)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(NC,{data:i.rows,fields:e.value,filename:i.filename,labels:i.headers},{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3},8,["data","fields","filename","labels"])]))}}),UC={class:"kong-ui-public-csv-export-modal"},BC={key:0,class:"selected-range"},YC={key:1,class:"text-muted",tag:"span"},np=3,ip=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=St.useI18n(),i=n,r=t,a=`${i.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,s=h.ref(!0),o=h.computed(()=>{var x,g;return!!((g=(x=i.chartData)==null?void 0:x.data)!=null&&g.length)}),l=h.ref(1),c=h.computed(()=>p.value.rows.length),u=St.useChartSelectedRange(h.toRef(i,"chartData")),d=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(np,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),f=()=>{r("toggleModal",!1)},p=h.computed(()=>{var T,S,k;if(!o.value||!((T=i.chartData)!=null&&T.meta.metric_names))return{headers:[],rows:[],csvHeaders:{}};const x=i.chartData.data.some(M=>M.timestamp!==i.chartData.data[0].timestamp),g=i.chartData.data.map(M=>{const D=new Date(M.timestamp);return{...Object.keys(M.event).reduce((P,E)=>{if(E in i.chartData.meta.display){const Y=M.event[E],G=i.chartData.meta.display[E];P[E]=Y&&G&&G[Y].name||M.event[E]}else P[E]=M.event[E];return P},{}),...x?{timestamp:ko(D,"yyyy-MM-dd HH:mm:ss"),tzOffset:ko(D,"XXX")}:{}}});let y=[];x&&(y=[{label:e.t("csvExport.Timestamp"),key:"timestamp"},{label:e.t("csvExport.UtcOffset"),key:"tzOffset"}]);const v="display"in i.chartData.meta&&((S=i.chartData.meta)!=null&&S.display)?(k=i.chartData.meta)==null?void 0:k.display:{},m=[...y,...Object.keys(v).map(M=>({label:e.t(`chartLabels.${M}`),key:M})),...i.chartData.meta.metric_names.map(M=>({label:e.t(`chartLabels.${M}`),key:M}))],w=m.reduce((M,D)=>(M[D.key]=D.label,M),{});return{headers:m,csvHeaders:w,rows:g}}),b=()=>{const{rows:x}=p.value;return s.value=!1,{total:Number(x.length)||0,data:x.slice(0,np)}};return h.watch(p,()=>{l.value++}),(x,g)=>{const y=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KTable"),m=h.resolveComponent("KButton"),w=h.resolveComponent("KModal");return h.openBlock(),h.createElementBlock("div",UC,[h.createVNode(w,{class:"vitals-report","data-testid":"csv-export-modal","show-dismiss-icon":"",title:h.unref(e).t("csvExport.exportPreview"),visible:"",onCancel:f,onKeyup:h.withKeys(f,["esc"])},{default:h.withCtx(()=>{var T;return[h.createElementVNode("div",null,[o.value?(h.openBlock(),h.createElementBlock("div",BC,[h.createElementVNode("p",null,h.toDisplayString(x.modalDescription?x.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(h.unref(u)),1)])):h.createCommentVNode("",!0),h.createVNode(v,{class:"vitals-table","disable-pagination":"","disable-sorting":"",fetcher:b,"fetcher-cache-key":String(l.value),"has-hover":!1,headers:((T=p.value)==null?void 0:T.headers)||[]},{"empty-state":h.withCtx(()=>[h.createVNode(y,{"action-button-visible":!1},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),default:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!s.value&&o.value?(h.openBlock(),h.createElementBlock("div",YC,h.toDisplayString(d.value),1)):h.createCommentVNode("",!0)])]}),"footer-actions":h.withCtx(()=>[h.createVNode(m,{appearance:"tertiary",class:"cancel-btn",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(FC,{class:"vitals-report-export-button",filename:a,headers:p.value.csvHeaders,rows:p.value.rows},{default:h.withCtx(()=>[h.createVNode(m,{appearance:"primary","data-testid":"csv-download-button",disabled:s.value||!o.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.downloadButton")),1)]),_:1},8,["disabled"])]),_:1},8,["headers","rows"])]),_:1},8,["title"])])}}}),rp=h.defineComponent({__name:"CsvExportButton",props:{data:{type:Object,required:!0},text:{type:String,required:!1,default:void 0},buttonAppearance:{type:String,required:!1,default:()=>"tertiary"},filenamePrefix:{type:String,required:!1,default:void 0}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>t.filenamePrefix||e.t("csvExport.defaultFilename")),r=h.ref(!1),a=o=>{r.value=o},s=()=>{a(!0)};return(o,l)=>{const c=h.resolveComponent("KButton");return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(c,{appearance:n.buttonAppearance,class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(s,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.text||h.unref(e).t("csvExport.exportButton")),1)]),_:1},8,["appearance"]),r.value?(h.openBlock(),h.createBlock(ip,{key:0,"chart-data":n.data,filename:i.value,onToggleModal:a},null,8,["chart-data","filename"])):h.createCommentVNode("",!0)],64)}}}),WC={class:"analytics-chart-shell"},zC={key:0,class:"chart-header"},HC={key:0,class:"chart-title"},$C={class:"chart-header-icons-wrapper"},jC={key:1,class:"chart-export-button"},VC={key:2,class:"analytics-chart-parent"},qC=h.defineComponent({__name:"AnalyticsChart",props:{allowCsvExport:{type:Boolean,required:!1,default:!1},chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!1,default:""},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:""},filenamePrefix:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Wt.Right},syntheticsDataKey:{type:String,required:!1,default:""},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.toRef(t,"chartData"),r=h.computed(()=>p.value?St.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Ce},h.toRef(t,"chartData")).value:St.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Ce},h.toRef(t,"chartData")).value),a=h.computed(()=>{var M;return(M=t.chartData)!=null&&M.meta?"start_ms"in t.chartData.meta?t.chartData.meta.end_ms-t.chartData.meta.start_ms:void 0:0}),s=h.computed(()=>{var M;return(M=t.chartData.meta)!=null&&M.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),o=h.computed(()=>t.showLegendValues&&t.legendPosition!==Wt.Bottom),{legendValues:l}=St.useChartLegendValues(r,t.chartOptions.type,s),c=h.computed(()=>{var M,D,O;return((O=(D=(M=t.chartData)==null?void 0:M.meta)==null?void 0:D.limit)==null?void 0:O.toString())||null}),u=h.computed(()=>{var M,D;return((D=(M=t.chartData)==null?void 0:M.meta)==null?void 0:D.truncated)||!1}),d=e.t("limitedResultsShown",{maxReturned:c.value}),f=h.computed(()=>[ne.VERTICAL_BAR.toString(),ne.HORIZONTAL_BAR.toString()].includes(t.chartOptions.type)),p=h.computed(()=>[ne.TIMESERIES_BAR,ne.TIMESERIES_LINE].some(M=>M===t.chartOptions.type)),b=h.computed(()=>t.chartOptions.type===ne.DOUGHNUT),x=h.computed(()=>t.chartOptions.type.includes("Vertical")?"vertical":"horizontal"),g=h.computed(()=>{var O,P,E;if(!((O=t.chartData)!=null&&O.meta.metric_names)||!((P=t.chartData)!=null&&P.meta.metric_units))return;const M=t.chartData.meta.metric_names[0],D=t.chartData.meta.metric_units[M];return((E=t.chartOptions)==null?void 0:E.metricAxesTitle)||e.te(`metricAxisTitles.${M}`)&&e.te(`chartUnits.${D}`)&&e.t(`metricAxisTitles.${M}`,{unit:e.t(`chartUnits.${D}`,{plural:"s"})})||void 0}),y=h.computed(()=>{const M=p.value?"Time":Object.keys(t.chartData.meta.display||t.chartData.meta.metric_names)[0];return t.chartOptions.dimensionAxesTitle||e.te(`chartLabels.${M}`)&&e.t(`chartLabels.${M}`)||void 0}),v=h.computed(()=>{const M=Ml(Number(t.chartData.meta.granularity_ms));return e.t(`granularityAxisTitles.${M}`)}),m=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),w=h.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),T=h.computed(()=>p.value?Ew(r.value):t.chartData&&t.chartData.meta&&t.chartData.data.length),S=h.computed(()=>T.value&&u.value&&c.value||t.chartTitle||t.allowCsvExport&&T.value),k=h.computed(()=>t.chartData.meta.granularity_ms?Ml(t.chartData.meta.granularity_ms)||lt.HOURLY:Ml(new Date(t.chartData.data[1].timestamp).getTime()-new Date(t.chartData.data[0].timestamp).getTime())||lt.HOURLY);return h.provide("showLegendValues",o),h.provide("legendPosition",h.toRef(t,"legendPosition")),(M,D)=>{const O=h.resolveComponent("KTooltip"),P=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",WC,[S.value?(h.openBlock(),h.createElementBlock("div",zC,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",HC,h.toDisplayString(n.chartTitle),1)):h.createCommentVNode("",!0),h.createElementVNode("div",$C,[T.value&&u.value&&c.value?(h.openBlock(),h.createBlock(O,{key:0,class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(d)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(fD),{color:h.unref(pD),decorative:"",size:h.unref(gD)},null,8,["color","size"])]),_:1})):h.createCommentVNode("",!0)]),n.allowCsvExport&&T.value?(h.openBlock(),h.createElementBlock("div",jC,[h.createVNode(rp,{data:i.value,"filename-prefix":n.filenamePrefix},null,8,["data","filename-prefix"])])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),T.value?(h.openBlock(),h.createElementBlock("div",VC,[p.value?(h.openBlock(),h.createBlock(tC,{key:0,"chart-data":r.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"dataset-colors":n.chartOptions.chartDatasetColors,"dimension-axes-title":v.value,fill:n.chartOptions.fill,granularity:k.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":a.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dataset-colors","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","tooltip-title","type"])):f.value?(h.openBlock(),h.createBlock(YD,{key:1,annotations:n.showAnnotations,"chart-data":r.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"data-testid":"bar-chart-container","dimension-axes-title":y.value,"legend-values":h.unref(l),"metric-axes-title":g.value,"metric-unit":s.value,orientation:x.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["annotations","chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","stacked","synthetics-data-key","tooltip-title"])):b.value?(h.openBlock(),h.createBlock(ZD,{key:2,"chart-data":r.value,"dataset-colors":n.chartOptions.chartDatasetColors,fill:n.chartOptions.fill,"legend-position":n.legendPosition,"legend-values":h.unref(l),"metric-unit":s.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["chart-data","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(P,{key:1,"action-button-visible":!1,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(m.value),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(w.value),1)]),_:1}))])}}}),XC=Je(qC,[["__scopeId","data-v-dcb1de1f"]]),GC={class:"chart-parent","data-testid":"doughnut-chart-parent"},KC={class:"chart-totals-flex"},QC={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},ZC=h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:li.Hidden},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Ce},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.ref(Dn()),r=h.computed(()=>[t.chartData.datasets.reduce((b,x)=>(b.labels.push(x.label),b.borderColor.push(x.backgroundColor),b.backgroundColor.push(x.backgroundColor),b.data.push(x.data.reduce((g,y)=>g+y,0)),b),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),a=h.computed(()=>({...t.chartData,datasets:r.value}));St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const s={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},o=h.ref(),l=h.computed(()=>{var p;return rr((p=r==null?void 0:r.value[0])==null?void 0:p.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var p,b;return rr(((p=r==null?void 0:r.value[0])==null?void 0:p.data[0])+((b=r==null?void 0:r.value[0])==null?void 0:b.data[1]),{capital:!0})}),u=h.computed(()=>{var p;return`color: ${(p=r==null?void 0:r.value[0])==null?void 0:p.backgroundColor[t.numerator]}`}),d=h.computed(()=>[li.Full,li.SingleMetric].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay===li.Full);return(p,b)=>(h.openBlock(),h.createElementBlock("div",GC,[h.createElementVNode("div",KC,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",QC,h.toDisplayString(h.unref(e).t("total"))+": "+h.toDisplayString(c.value),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({height:n.height,width:n.width})},[h.createVNode(h.unref(qh),{ref_key:"chartInstance",ref:o,"chart-id":i.value,data:a.value,options:s},null,8,["chart-id","data","options"])],4)]))}}),JC=Je(ZC,[["__scopeId","data-v-5871cb7a"]]),tS={class:"simple-chart-shell"},eS={key:1,class:"analytics-chart-parent"},nS=Je(h.defineComponent({__name:"SimpleChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},emptyStateTitle:{type:String,required:!1,default:""},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>{var c;const l=St.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||Ce},h.toRef(t,"chartData")).value;return(c=t.chartOptions)!=null&&c.reverseDataset&&(l==null||l.datasets.reverse()),l}),r=h.computed(()=>{var l;return(l=t.chartData.meta)!=null&&l.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),a=h.computed(()=>t.chartOptions.type===na.GAUGE),s=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),o=h.computed(()=>t.chartData&&t.chartData.meta&&t.chartData.data.length);return(l,c)=>{const u=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",tS,[o.value?(h.openBlock(),h.createElementBlock("div",eS,[a.value?(h.openBlock(),h.createBlock(JC,{key:0,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":r.value,numerator:n.chartOptions.numerator,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","numerator","synthetics-data-key","width"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(u,{key:0,"action-button-visible":!0,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(s.value),1)]),_:1}))])}}}),[["__scopeId","data-v-cb92de46"]]),iS={class:"top-n-card-title","data-testid":"top-n-card-title"},rS={class:"top-n-card-description","data-testid":"top-n-card-description"},aS={key:3,class:"top-n-table","data-testid":"top-n-table"},sS={class:"table-headings"},oS={class:"table-row"},lS={class:"column-1"},cS={class:"column-2"},uS={class:"table-body","data-testid":"top-n-data"},dS=["data-testid"],fS={class:"column-1"},hS={class:"column-2"},pS=Je(h.defineComponent({__name:"TopNTable",props:{title:{type:String,required:!0},description:{type:String,default:""},data:{type:Object,required:!0},emptyStateTitle:{type:String,default:""},isLoading:{type:Boolean,default:!1}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>t.data.data),r=h.computed(()=>{var b;return!!((b=i.value)!=null&&b.length)}),a=h.computed(()=>{var b,x;return(b=t.data.meta)!=null&&b.display&&((x=Object.keys(t.data.meta.display))==null?void 0:x[0])||""}),s=h.computed(()=>a.value?t.data.meta.display[a.value]:{}),o=h.computed(()=>{var b,x;return(x=(b=t.data.meta)==null?void 0:b.metric_names)!=null&&x.length?t.data.meta.metric_names[0]:""}),l=h.computed(()=>o.value?e.t(`chartLabels.${o.value}`)||o.value:""),c=h.computed(()=>{if(!r.value)return"";if(t.data.meta){if(s.value&&!Object.keys(s.value).length)return e.t("topNTable.errors.display");if(!o.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.meta");return""}),u=b=>{const x=b.event;return String(x[a.value])},d=b=>{const x=u(b),g=s.value&&s.value[x];return g?g.name:"-"},f=b=>{const x=u(b),g=s.value&&s.value[x];return g?!!g.deleted:!1},p=b=>{if(!o.value)return"–";const g=b.event[o.value];return g?rr(g,{capital:!0,round:!0}):"–"};return(b,x)=>{const g=h.resolveComponent("KEmptyState"),y=h.resolveComponent("KSkeleton"),v=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(v,{class:"kong-ui-public-top-n-table"},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(g,{key:0,"action-button-visible":!1,"data-testid":"top-n-error-state","icon-variant":"error"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(y,{key:1,"table-columns":2,type:"table"})):r.value?(h.openBlock(),h.createElementBlock("div",aS,[h.createElementVNode("div",sS,[h.createElementVNode("div",oS,[h.createElementVNode("div",lS,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",cS,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",uS,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(i.value,(m,w)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${w}`,class:"table-row","data-testid":`row-${u(m)}`},[h.createElementVNode("div",fS,[h.renderSlot(b.$slots,"name",{record:{id:u(m),name:d(m),deleted:f(m),dimension:a.value}},()=>[h.createTextVNode(h.toDisplayString(d(m)),1)],!0)]),h.createElementVNode("div",hS,"   "+h.toDisplayString(p(m)),1)],8,dS))),128))])])):(h.openBlock(),h.createBlock(g,{key:2,"action-button-visible":!1,"data-testid":"top-n-empty-state"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.emptyStateTitle||h.unref(e).t("topNTable.defaultEmptyStateTitle")),1)]),_:1}))]),_:2},[n.title?{name:"title",fn:h.withCtx(()=>[h.createElementVNode("div",iS,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",rS,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1024)}}}),[["__scopeId","data-v-840224c1"]]),Xl="#e0e4ea",gS={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},dr=(n,t)=>{let e=1;const i=gS[n],r=new Map;for(const a of t)r.set(a,i[e]),e=e%(i.length-1)+1;return r.set(-1,i[0]),r},ap=new Map([[100,dr("100",[100,101,102,103])],[200,dr("200",[200,201,202,203,204,205,206,207,208,226])],[300,dr("300",[300,301,302,303,304,305,307,308])],[400,dr("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,dr("500",[500,501,502,503,504,505,506,507,508,510,511])]]),sp=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,i=ap.get(e);return i===void 0?Xl:i.get(t)??i.get(-1)??Xl},mS=n=>{const t=sp(n);return{solid:t,light:t}};st.AnalyticsChart=XC,st.ChartLegendPosition=Wt,st.ChartMetricDisplay=li,st.ChartTypes=ne,st.ChartTypesSimple=na,st.CsvExportButton=rp,st.CsvExportModal=ip,st.DECIMAL_DISPLAY=wf,st.FONT_SIZE_REGULAR=Tf,st.FONT_SIZE_SMALL=_f,st.MAX_LABEL_LENGTH=sa,st.OTHERS_COLOR=q_,st.SimpleChart=nS,st.TopNTable=pS,st.ValidType=Xn,st.accessibleGrey=Df,st.apiRequestStatusCodeColors=Cf,st.codesInSpec=ap,st.darkenColor=oa,st.datavisPalette=Ce,st.errorRateColors=j_,st.formatTime=aa,st.latencyColors=V_,st.lightGrey=Xl,st.lookupColor=X_,st.lookupDatavisColor=ui,st.lookupStatusCodeCategoryColor=mS,st.lookupStatusCodeColor=sp,st.numberFormatter=ra,st.statusCodeBadgeBackgroundColor=H_,st.trafficColors=$_,Object.defineProperty(st,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/analytics-chart",
3
- "version": "2.4.7",
3
+ "version": "2.5.0",
4
4
  "type": "module",
5
5
  "main": "./dist/vitals-chart.umd.js",
6
6
  "module": "./dist/vitals-chart.es.js",
@@ -65,7 +65,7 @@
65
65
  "pretty-bytes": "^6.1.1",
66
66
  "uuid": "^9.0.1",
67
67
  "vue-chartjs": "^5.3.0",
68
- "@kong-ui-public/analytics-utilities": "^1.3.1"
68
+ "@kong-ui-public/analytics-utilities": "^1.4.0"
69
69
  },
70
70
  "distSizeChecker": {
71
71
  "warningLimit": "1.35MB",