@ironsource/shared-ui 2.1.7-test.1 → 2.1.7-test.2
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/Chart.vue_vue_type_style_index_0_scoped_f06a4764_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_88d4532f_lang.css +1 -0
- package/ChartLegend.vue_vue_type_style_index_0_scoped_efc608f9_lang.css +1 -0
- package/ChartLoader.vue_vue_type_style_index_0_scoped_142c444a_lang.css +1 -0
- package/ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css +1 -0
- package/FieldMaxLength.vue_vue_type_style_index_0_scoped_47877984_lang.css +1 -0
- package/SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css +1 -0
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css +1 -0
- package/SortableList.vue_vue_type_style_index_0_scoped_21842d59_lang.css +1 -0
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_4114ef89_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_052b1a0c_lang.css +1 -0
- package/components/chart/Chart.vue.js +7 -0
- package/components/chart/Chart.vue2.js +281 -0
- package/components/chart/ChartHeader.vue.js +7 -0
- package/components/chart/ChartHeader.vue2.js +51 -0
- package/components/chart/ChartLegend.vue.js +7 -0
- package/components/chart/ChartLegend.vue2.js +65 -0
- package/components/chart/ChartLoader.vue.js +25 -0
- package/components/chart/ChartLoader.vue2.js +0 -0
- package/components/chart/ChartTooltip.vue.js +7 -0
- package/components/chart/ChartTooltip.vue2.js +81 -0
- package/components/chart/composables/useChartValues.js +32 -0
- package/components/chart/composables/useTooltipPosition.js +22 -0
- package/components/chart/consts.js +21 -0
- package/components/chart/index.js +6 -0
- package/components/chart/plugins/HoverVerticalLine.js +12 -0
- package/components/chart/types.js +4 -0
- package/components/chart/utils/formatNumber.js +11 -0
- package/components/chart/utils/utils.js +12 -0
- package/components/input/v4/TextField.vue.d.ts +6 -1
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +91 -90
- package/components/input/v4/index.d.ts +20 -1
- package/components/shared/FieldMaxLength.vue.js +3 -3
- package/components/shared/FieldMaxLength.vue2.js +2 -2
- package/components/shared/commonTypes.d.ts +2 -0
- package/components/sortableList/SortableItem.vue.js +7 -0
- package/components/sortableList/SortableItem.vue2.js +140 -0
- package/components/sortableList/SortableItemLabel.vue.js +7 -0
- package/components/sortableList/SortableItemLabel.vue2.js +60 -0
- package/components/sortableList/SortableList.vue.js +7 -0
- package/components/sortableList/SortableList.vue2.js +120 -0
- package/components/sortableList/composables/useHoverEffect.js +19 -0
- package/components/sortableList/consts.js +4 -0
- package/components/sortableList/index.js +6 -0
- package/components/textArea/v4/TextAreaV4.vue.d.ts +6 -1
- package/components/textArea/v4/TextAreaV4.vue.js +3 -3
- package/components/textArea/v4/TextAreaV4.vue2.js +18 -12
- package/components/textArea/v4/index.d.ts +9 -0
- package/index.d.ts +651 -2
- package/index.js +131 -126
- package/package.json +9 -1
- package/testids/index.js +5 -4
- package/utils/search.js +4 -0
- package/FieldMaxLength.vue_vue_type_style_index_0_scoped_f3c4001a_lang.css +0 -1
- package/TextAreaV4.vue_vue_type_style_index_0_scoped_f3b2c01d_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_a6457440_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-container[data-v-f06a4764]{border:1px solid var(--common-divider);background:var(--background-paper);display:flex;height:388px}.header-wrapper[data-v-f06a4764]{height:76px}.chart-content[data-v-f06a4764]{flex:1}.chart-sidebar[data-v-f06a4764]{border-left:1px solid var(--common-divider)}.chart[data-v-f06a4764]{width:100%;height:312px;position:relative}.chart__canvas[data-v-f06a4764]{width:100%;height:100%}.chart__tooltip[data-v-f06a4764]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-header[data-v-88d4532f]{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 0}.header-texts[data-v-88d4532f]{display:flex;flex-direction:column;color:var(--text-primary);gap:4px}.type-switch[data-v-88d4532f]{display:flex;align-items:center;gap:4px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-legend[data-v-efc608f9]{display:flex;flex-direction:column;width:220px;height:100%;padding-bottom:8px}.search-box[data-v-efc608f9]{padding:12px 12px 4px}.legend[data-v-efc608f9]{overflow-y:auto;color:var(--text-primary)}.legend__list[data-v-efc608f9]{list-style:none;padding:0 12px 0 20px}.legend__list>li[data-v-efc608f9]{display:flex;align-items:center;gap:8px;height:32px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.label[data-v-142c444a]{color:#41454d}.chart-loader[data-v-142c444a]{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:80px 31px 31px}.chart-loader[data-v-142c444a]:after{position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0,rgba(255,255,255,.2) 20%,rgba(255,255,255,.5) 60%,rgba(255,255,255,0));animation:shimmer-142c444a 2s infinite;content:""}@keyframes shimmer-142c444a{to{transform:translate(100%)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.chart-tooltip[data-v-ec636f18]{color:var(--text-primary);background:var(--common-white);box-shadow:0 4px 8px -2px #1018281f;border:1px solid var(--common-divider-elevation-0);border-radius:var(--border-radius-md);padding:calc(var(--spacing-100) - 1px)}.tooltip-title[data-v-ec636f18]{color:var(--text-primary);margin-bottom:var(--spacing-100)}.color-box[data-v-ec636f18]{width:var(--spacing-150);height:var(--spacing-150);border-radius:2px;display:inline-block;margin-right:var(--spacing-100)}.list[data-v-ec636f18]{list-style:none;margin:0;padding:0}.list__item[data-v-ec636f18]{display:flex;align-items:center;margin-bottom:var(--spacing-50);color:var(--text-secondary)}.list__item[data-v-ec636f18]:last-child{margin-bottom:0}.tooltip-footer[data-v-ec636f18]{display:flex;align-items:center;margin-top:var(--spacing-100);color:var(--text-primary)}.flex-grow[data-v-ec636f18]{flex-grow:1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.max-length[data-v-47877984]{display:flex;justify-content:flex-end;color:var(--text-secondary);white-space:nowrap}.max-length__divider[data-v-47877984]{margin:0 -3px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sortable-item[data-v-9dd4d372]{display:flex;position:relative;flex-direction:column;border:1px solid var(--common-divider);border-radius:var(--border-radius-sm);background:var(--background-paper)}.sortable-item--selected[data-v-9dd4d372]{outline:2px solid var(--primary-main);outline-offset:-2px}.sortable-item--hovered[data-v-9dd4d372]{border-color:var(--action-active)}.sortable-item.sortable-drag[data-v-9dd4d372]{border-color:var(--common-divider)!important}.sortable-item.sortable-drag .child-list[data-v-9dd4d372]{display:none}.sortable-item--hovered .drag-allowed .draggable-handle[data-v-9dd4d372],.sortable-item.sortable-drag .drag-allowed .draggable-handle[data-v-9dd4d372]{display:flex}.sortable-item--hovered .drag-allowed .order-num[data-v-9dd4d372],.sortable-item.sortable-drag .drag-allowed .order-num[data-v-9dd4d372]{display:none}.item[data-v-9dd4d372]{height:38px;display:flex;align-items:center}.item__prefix[data-v-9dd4d372]{width:36px;display:flex;align-items:center;justify-content:center}.item__text[data-v-9dd4d372]{flex:1;height:38px;display:flex;align-items:center}.item__menu[data-v-9dd4d372]{width:26px}.country-flag[data-v-9dd4d372]{margin-right:var(--spacing-100)}.child-list[data-v-9dd4d372]{max-height:176px}.child-list ul[data-v-9dd4d372]{list-style:none;display:flex;flex-direction:column;padding-left:16px;padding-right:8px;margin-bottom:4px;gap:2px}.child-list li[data-v-9dd4d372]{min-height:32px;display:flex;align-items:center;border-radius:var(--border-radius-lg);padding:0 8px}.child-list li[data-v-9dd4d372]:hover{cursor:pointer;background:var(--action-selected)}.child-list li.selected[data-v-9dd4d372]{background:var(--action-selected)}.expand-icon[data-v-9dd4d372]{cursor:pointer;padding-right:7px;padding-left:1px;height:38px;display:flex;justify-content:center;align-items:center;color:var(--action-active)}.expand-icon[data-v-9dd4d372]:hover{color:var(--text-primary)}.locked-icon[data-v-9dd4d372]{color:var(--action-active)}.draggable-handle[data-v-9dd4d372]{display:none;align-items:center;justify-content:center;position:absolute;left:0;top:0;width:36px;height:38px;color:var(--action-active)}.draggable-handle[data-v-9dd4d372]:hover{cursor:grab;color:var(--text-primary)}.sortable-ghost[data-v-9dd4d372]{position:relative;outline:none}.sortable-ghost[data-v-9dd4d372]:after{content:"";display:block;position:absolute;z-index:10;inset:-1px;background:rgb(242,242,242);border-radius:var(--border-radius-sm)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.decorated-text[data-v-1386ae20]{border-bottom:1px dashed var(--action-active)}.tooltip-content[data-v-1386ae20]{max-width:260px}.help[data-v-1386ae20]{margin-bottom:8px}.help__title[data-v-1386ae20]{margin-bottom:4px}.help__text[data-v-1386ae20]{color:var(--text-secondary)}.help[data-v-1386ae20]:last-child{margin-bottom:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.list-search[data-v-21842d59]{margin-bottom:var(--spacing-100)}.sortable-list[data-v-21842d59],.locked-list[data-v-21842d59]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:var(--spacing-75);color:var(--text-primary)}.locked-list[data-v-21842d59]{margin-top:var(--spacing-75)}.force-grabbing-cursor *[data-v-21842d59]{cursor:move!important;cursor:-webkit-grabbing!important;cursor:-moz-grabbing!important;cursor:grabbing!important}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";.font-tab-label2[data-v-4114ef89],.font-chart-2[data-v-4114ef89],.font-chart-1[data-v-4114ef89]{font-family:Inter,sans-serif;font-weight:700}.font-chip-label[data-v-4114ef89],.font-table-label[data-v-4114ef89],.font-button[data-v-4114ef89],.font-heading-6[data-v-4114ef89],.font-heading-5[data-v-4114ef89],.font-heading-4[data-v-4114ef89],.font-heading-3[data-v-4114ef89],.font-heading-2[data-v-4114ef89],.font-heading-1[data-v-4114ef89],.font-title[data-v-4114ef89]{font-family:Inter,sans-serif;font-weight:600}.font-tab-label1[data-v-4114ef89],.font-input-label[data-v-4114ef89],.font-overline[data-v-4114ef89],.font-subtitle-2[data-v-4114ef89],.font-subtitle-1[data-v-4114ef89]{font-family:Inter,sans-serif;font-weight:500}.font-caption[data-v-4114ef89],.font-body-2[data-v-4114ef89],.textarea[data-v-4114ef89],.font-body-1[data-v-4114ef89]{font-family:Inter,sans-serif;font-weight:400}.font-title[data-v-4114ef89]{font-size:2.5rem;line-height:3rem;letter-spacing:-.055rem}.font-heading-1[data-v-4114ef89]{font-size:1.5rem;line-height:1.75rem;letter-spacing:-.0285rem}.font-heading-2[data-v-4114ef89]{font-size:1.125rem;line-height:1.75rem;letter-spacing:-.01575rem}.font-heading-3[data-v-4114ef89]{font-size:1rem;line-height:1.5rem;letter-spacing:-.011rem}.font-heading-4[data-v-4114ef89]{font-size:.875rem;line-height:1rem;letter-spacing:unset}.font-heading-5[data-v-4114ef89]{font-size:.8125rem;line-height:16px;letter-spacing:unset}.font-heading-6[data-v-4114ef89]{font-size:.75rem;line-height:.75rem;letter-spacing:0}.textarea[data-v-4114ef89],.font-body-1[data-v-4114ef89]{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-body-2[data-v-4114ef89]{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-subtitle-1[data-v-4114ef89]{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-subtitle-2[data-v-4114ef89]{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-chart-1[data-v-4114ef89]{font-size:1.5rem;line-height:1.5rem;letter-spacing:-.015rem}.font-chart-2[data-v-4114ef89]{font-size:1.25rem;line-height:1.25rem;letter-spacing:-.0125rem}.font-button[data-v-4114ef89]{font-size:.875rem;line-height:1.25rem;letter-spacing:.00875rem}.font-overline[data-v-4114ef89]{font-size:.75rem;line-height:1rem;letter-spacing:.045rem;text-transform:uppercase}.font-caption[data-v-4114ef89]{font-size:.75rem;line-height:1rem}.font-table-label[data-v-4114ef89]{font-size:.8125rem;line-height:1.25rem;letter-spacing:.00813rem}.font-input-label[data-v-4114ef89]{font-size:.8125rem;line-height:1rem;letter-spacing:.00813rem}.font-tab-label1[data-v-4114ef89],.font-tab-label2[data-v-4114ef89]{font-size:.875rem;line-height:1rem}.font-chip-label[data-v-4114ef89]{font-size:.75rem;line-height:1rem}h1[data-v-4114ef89],h2[data-v-4114ef89],h3[data-v-4114ef89],h4[data-v-4114ef89],h5[data-v-4114ef89],h6[data-v-4114ef89]{margin:0}.textarea-field[data-v-4114ef89]{display:flex;flex-direction:column}.textarea-field--counter-inside .max-length-counter[data-v-4114ef89]{position:absolute;right:var(--spacing-75);top:-27px;padding:0 var(--spacing-25);border-radius:var(--border-radius-xs);background:var(--default-main)}.textarea-field--counter-inside .footer[data-v-4114ef89]{position:relative}.textarea[data-v-4114ef89]{flex-grow:1;background:var(--default-main);color:var(--text-primary);padding:var(--spacing-125) var(--spacing-100);height:calc(var(--spacing-900) - 1px);width:100%;border:none;border-radius:var(--border-radius-md);outline:1px solid var(--action-outlined-border);outline-offset:-1px;margin-bottom:1px}.textarea[data-v-4114ef89]:hover{outline:1px solid var(--action-active)}.textarea[data-v-4114ef89]:focus{outline:2px solid var(--primary-main)}.textarea[data-v-4114ef89]::placeholder{color:var(--text-secondary)}.textarea--disabled[data-v-4114ef89]{color:var(--text-disabled)}.textarea--disabled[data-v-4114ef89]::placeholder{color:var(--text-disabled)}.textarea--disabled[data-v-4114ef89]:hover{outline:1px solid var(--action-outlined-border)}.textarea--variant-success[data-v-4114ef89],.textarea--variant-success[data-v-4114ef89]:hover,.textarea--variant-success[data-v-4114ef89]:focus{outline:2px solid var(--success-dark)}.textarea--variant-error[data-v-4114ef89],.textarea--variant-error[data-v-4114ef89]:hover,.textarea--variant-error[data-v-4114ef89]:focus{outline:2px solid var(--error-main)}.textarea--variant-warning[data-v-4114ef89],.textarea--variant-warning[data-v-4114ef89]:hover,.textarea--variant-warning[data-v-4114ef89]:focus{outline:2px solid var(--warning-dark)}.textarea-label[data-v-4114ef89]{flex-grow:initial}.footer[data-v-4114ef89]{display:flex;justify-content:flex-end;align-items:center;margin-top:var(--spacing-50)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";.font-tab-label2[data-v-052b1a0c],.font-chart-2[data-v-052b1a0c],.font-chart-1[data-v-052b1a0c]{font-family:Inter,sans-serif;font-weight:700}.font-chip-label[data-v-052b1a0c],.font-table-label[data-v-052b1a0c],.font-button[data-v-052b1a0c],.font-heading-6[data-v-052b1a0c],.font-heading-5[data-v-052b1a0c],.font-heading-4[data-v-052b1a0c],.font-heading-3[data-v-052b1a0c],.font-heading-2[data-v-052b1a0c],.font-heading-1[data-v-052b1a0c],.font-title[data-v-052b1a0c]{font-family:Inter,sans-serif;font-weight:600}.font-tab-label1[data-v-052b1a0c],.font-input-label[data-v-052b1a0c],.font-overline[data-v-052b1a0c],.font-subtitle-2[data-v-052b1a0c],.font-subtitle-1[data-v-052b1a0c]{font-family:Inter,sans-serif;font-weight:500}.font-caption[data-v-052b1a0c],.font-body-2[data-v-052b1a0c],.input-container .input[data-v-052b1a0c],.font-body-1[data-v-052b1a0c]{font-family:Inter,sans-serif;font-weight:400}.font-title[data-v-052b1a0c]{font-size:2.5rem;line-height:3rem;letter-spacing:-.055rem}.font-heading-1[data-v-052b1a0c]{font-size:1.5rem;line-height:1.75rem;letter-spacing:-.0285rem}.font-heading-2[data-v-052b1a0c]{font-size:1.125rem;line-height:1.75rem;letter-spacing:-.01575rem}.font-heading-3[data-v-052b1a0c]{font-size:1rem;line-height:1.5rem;letter-spacing:-.011rem}.font-heading-4[data-v-052b1a0c]{font-size:.875rem;line-height:1rem;letter-spacing:unset}.font-heading-5[data-v-052b1a0c]{font-size:.8125rem;line-height:16px;letter-spacing:unset}.font-heading-6[data-v-052b1a0c]{font-size:.75rem;line-height:.75rem;letter-spacing:0}.input-container .input[data-v-052b1a0c],.font-body-1[data-v-052b1a0c]{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-body-2[data-v-052b1a0c]{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-subtitle-1[data-v-052b1a0c]{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-subtitle-2[data-v-052b1a0c]{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-chart-1[data-v-052b1a0c]{font-size:1.5rem;line-height:1.5rem;letter-spacing:-.015rem}.font-chart-2[data-v-052b1a0c]{font-size:1.25rem;line-height:1.25rem;letter-spacing:-.0125rem}.font-button[data-v-052b1a0c]{font-size:.875rem;line-height:1.25rem;letter-spacing:.00875rem}.font-overline[data-v-052b1a0c]{font-size:.75rem;line-height:1rem;letter-spacing:.045rem;text-transform:uppercase}.font-caption[data-v-052b1a0c]{font-size:.75rem;line-height:1rem}.font-table-label[data-v-052b1a0c]{font-size:.8125rem;line-height:1.25rem;letter-spacing:.00813rem}.font-input-label[data-v-052b1a0c]{font-size:.8125rem;line-height:1rem;letter-spacing:.00813rem}.font-tab-label1[data-v-052b1a0c],.font-tab-label2[data-v-052b1a0c]{font-size:.875rem;line-height:1rem}.font-chip-label[data-v-052b1a0c]{font-size:.75rem;line-height:1rem}h1[data-v-052b1a0c],h2[data-v-052b1a0c],h3[data-v-052b1a0c],h4[data-v-052b1a0c],h5[data-v-052b1a0c],h6[data-v-052b1a0c]{margin:0}.disabled .input[data-v-052b1a0c]::placeholder{color:var(--text-disabled)}.disabled .input-container[data-v-052b1a0c]{cursor:no-drop;background-color:var(--action-disabled-background)}.disabled .input-container[data-v-052b1a0c]:hover{outline:1px solid var(--action-outlined-border);background-color:var(--action-disabled-background)}.input-size-small[data-v-052b1a0c]{height:28px}.input-size-medium[data-v-052b1a0c]{height:32px}.input-size-large[data-v-052b1a0c]{height:40px}.input-with-label-container[data-v-052b1a0c]{display:flex;flex-direction:column}.input-container[data-v-052b1a0c]{flex-grow:2;display:flex;flex-direction:row;align-items:center;border-radius:var(--border-radius-md);background:var(--default-main);outline:1px solid var(--action-outlined-border);outline-offset:-1px;padding:0 var(--spacing-100);position:relative;gap:var(--spacing-50)}.input-container[data-v-052b1a0c]:hover{outline:1px solid var(--action-active);background-color:var(--action-hover)}.input-container .input[data-v-052b1a0c]{padding:0;width:100%;border:none;background:transparent;color:var(--text-primary);line-height:normal}.input-container .input[data-v-052b1a0c]:focus{outline:none}.input-container .input[data-v-052b1a0c]:disabled{color:var(--text-disabled);cursor:no-drop}.input-container .input.view-only[data-v-052b1a0c]{color:var(--text-disabled)}.input-container .input[type=number][data-v-052b1a0c]::-webkit-inner-spin-button{opacity:.7;transform:scale(1.1)}.input-container .hide-arrows.input[type=number][data-v-052b1a0c]::-webkit-inner-spin-button,.input-container .hide-arrows.input[type=number][data-v-052b1a0c]::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;appearance:none}.input-container .input[type=password][data-v-052b1a0c]{letter-spacing:4px}.input-container[data-v-052b1a0c] ::placeholder{color:var(--text-secondary);letter-spacing:normal}.input-container .label-inside[data-v-052b1a0c]::placeholder{color:var(--text-primary)}.input-container .icon-container[data-v-052b1a0c]{display:flex;align-items:center;color:var(--text-secondary)}.input-container .icon-before[data-v-052b1a0c]{padding-right:var(--spacing-50)}.input-container .icon-after[data-v-052b1a0c]{padding-left:var(--spacing-50)}.prefix-text[data-v-052b1a0c]{color:var(--text-secondary, #646464);margin-right:var(--spacing-50)}.suffix-text[data-v-052b1a0c]{color:var(--text-secondary, #646464)}.focused[data-v-052b1a0c],.focused[data-v-052b1a0c]:hover{outline:2px solid var(--primary-main);background-color:var(--action-hover)}.error-icon.error-icon[data-v-052b1a0c],.error-icon.error-icon[data-v-052b1a0c]:hover{color:var(--error-main)}.label-direction-left[data-v-052b1a0c]{flex-direction:row;align-items:center;justify-content:space-between}.apply-button[data-v-052b1a0c]{cursor:pointer;color:var(--primary-main);width:var(--spacing-250);height:var(--spacing-250)}.inline-error[data-v-052b1a0c]{cursor:pointer;color:var(--error-main);display:flex;justify-content:center;align-items:center}.footer[data-v-052b1a0c]{display:flex;justify-content:flex-end;margin-top:var(--spacing-50)}.footer.footer-absolute[data-v-052b1a0c]{position:absolute;bottom:calc(0px - var(--spacing-300))}.password-visibility-toggle[data-v-052b1a0c]{cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--text-secondary)}.variant-success .input-container[data-v-052b1a0c],.variant-success .input-container[data-v-052b1a0c]:hover{outline:2px solid var(--success-dark)}.variant-error .input-container[data-v-052b1a0c],.variant-error .input-container[data-v-052b1a0c]:hover{outline:2px solid var(--error-main)}.variant-warning .input-container[data-v-052b1a0c],.variant-warning .input-container[data-v-052b1a0c]:hover{outline:2px solid var(--warning-dark)}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import o from "./Chart.vue2.js";
|
|
2
|
+
/* empty css */import _ from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../Chart.vue_vue_type_style_index_0_scoped_f06a4764_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ _(o, [["__scopeId", "data-v-f06a4764"]]);
|
|
5
|
+
export {
|
|
6
|
+
a as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import "../../Chart.vue_vue_type_style_index_0_scoped_f06a4764_lang.css"; import { defineComponent as W, ref as y, computed as r, onMounted as Z, watch as b, nextTick as $, openBlock as d, createElementBlock as C, unref as c, Fragment as G, createElementVNode as u, createVNode as V, isRef as X, normalizeStyle as j, createBlock as g, createCommentVNode as T } from "vue";
|
|
2
|
+
import { useVModel as q } from "@vueuse/core";
|
|
3
|
+
import { Chart as O, ArcElement as J, LineElement as Q, BarElement as Y, PointElement as ee, LineController as te, BarController as ae, PieController as oe, ScatterController as re, CategoryScale as ie, LinearScale as le, Filler as ne, Tooltip as se } from "chart.js";
|
|
4
|
+
import { HoverVerticalLine as de } from "./plugins/HoverVerticalLine.js";
|
|
5
|
+
import { formatValue as D, calcStepSize as ce } from "./utils/utils.js";
|
|
6
|
+
import { DEFAULT_TICK_COUNT as ue, DEFAULT_MIN_VISIBLE as pe, DEFAULT_MAX_VISIBLE as fe, COLOR_PALETTE as me, POINT_BORDER_COLOR as he, TICK_LABEL_COLOR as F, TICK_LABEL_FONT as _, GRID_LINE_COLOR as w } from "./consts.js";
|
|
7
|
+
import { ChartType as n } from "./types.js";
|
|
8
|
+
import { useTooltipPosition as ve } from "./composables/useTooltipPosition.js";
|
|
9
|
+
import ye from "./ChartTooltip.vue.js";
|
|
10
|
+
import be from "./ChartLegend.vue.js";
|
|
11
|
+
import Ce from "./ChartHeader.vue.js";
|
|
12
|
+
import { hexColorToRgba as ge } from "../../utils/color.js";
|
|
13
|
+
import { useChartValues as Te } from "./composables/useChartValues.js";
|
|
14
|
+
import ke from "./ChartLoader.vue.js";
|
|
15
|
+
import Le from "../emptyState/v4/EmptyStateV4.vue.js";
|
|
16
|
+
const xe = { class: "chart-container" }, Se = { class: "chart-content" }, Ie = { class: "header-wrapper" }, Be = { class: "chart" }, Ae = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "chart-sidebar"
|
|
19
|
+
}, We = /* @__PURE__ */ W({
|
|
20
|
+
__name: "Chart",
|
|
21
|
+
props: {
|
|
22
|
+
dataSets: { default: () => [] },
|
|
23
|
+
visibleIds: { default: () => [] },
|
|
24
|
+
chartType: { default: n.Line },
|
|
25
|
+
parsing: { default: void 0 },
|
|
26
|
+
xAxisFormat: { default: "string" },
|
|
27
|
+
yAxisFormat: { default: "number" },
|
|
28
|
+
tickCount: { default: ue },
|
|
29
|
+
header: { default: "" },
|
|
30
|
+
subheader: { default: "" },
|
|
31
|
+
hideLegend: { type: Boolean, default: !1 },
|
|
32
|
+
minVisible: { default: pe },
|
|
33
|
+
maxVisible: { default: fe },
|
|
34
|
+
loading: { type: Boolean, default: !1 },
|
|
35
|
+
noDataIcon: { default: "file-x" },
|
|
36
|
+
noDataTitle: { default: "No data to display" },
|
|
37
|
+
noDataSubtitle: { default: "Search again with different filters" }
|
|
38
|
+
},
|
|
39
|
+
emits: ["update:chartType", "update:visibleIds"],
|
|
40
|
+
setup(a, { emit: k }) {
|
|
41
|
+
const e = a;
|
|
42
|
+
O.register(
|
|
43
|
+
J,
|
|
44
|
+
Q,
|
|
45
|
+
Y,
|
|
46
|
+
ee,
|
|
47
|
+
te,
|
|
48
|
+
ae,
|
|
49
|
+
oe,
|
|
50
|
+
re,
|
|
51
|
+
ie,
|
|
52
|
+
le,
|
|
53
|
+
ne,
|
|
54
|
+
se,
|
|
55
|
+
de
|
|
56
|
+
);
|
|
57
|
+
const m = q(e, "chartType", k), p = y(null);
|
|
58
|
+
let s = null;
|
|
59
|
+
const L = r(() => e.dataSets.length === 0), x = r(() => !e.loading && !L.value), h = () => {
|
|
60
|
+
p.value && (s && s.destroy(), s = new O(p.value, I.value));
|
|
61
|
+
}, N = () => {
|
|
62
|
+
s && (s.data.datasets = v.value, s.options = I.value.options, s.update());
|
|
63
|
+
};
|
|
64
|
+
Z(h), b(() => e.chartType, h), b(x, async (t) => {
|
|
65
|
+
t && (await $(), h());
|
|
66
|
+
}), b([() => e.visibleIds, () => e.dataSets], N);
|
|
67
|
+
const f = r(
|
|
68
|
+
() => e.chartType === n.StackedLine || e.chartType === n.StackedBar
|
|
69
|
+
), P = r(
|
|
70
|
+
() => e.chartType === n.Line || e.chartType === n.StackedLine
|
|
71
|
+
), S = r(
|
|
72
|
+
() => e.dataSets.filter((t) => e.visibleIds.includes(t.id))
|
|
73
|
+
), v = r(() => S.value.map((t, o) => {
|
|
74
|
+
const i = t.color || me[o] || "#000000";
|
|
75
|
+
return {
|
|
76
|
+
...t,
|
|
77
|
+
fill: f.value ? "start" : void 0,
|
|
78
|
+
backgroundColor: ge(
|
|
79
|
+
i,
|
|
80
|
+
e.chartType === n.StackedLine ? 10 : 70
|
|
81
|
+
),
|
|
82
|
+
borderColor: i,
|
|
83
|
+
pointBackgroundColor: i,
|
|
84
|
+
pointHoverBorderColor: i,
|
|
85
|
+
maxBarThickness: 50,
|
|
86
|
+
clip: 5
|
|
87
|
+
// draw a bit outside the chart area
|
|
88
|
+
};
|
|
89
|
+
})), I = r(
|
|
90
|
+
() => ({
|
|
91
|
+
type: e.chartType == n.Bar || e.chartType === n.StackedBar ? "bar" : "line",
|
|
92
|
+
// Chart Data
|
|
93
|
+
data: {
|
|
94
|
+
datasets: v.value
|
|
95
|
+
},
|
|
96
|
+
// Chart Options
|
|
97
|
+
options: {
|
|
98
|
+
parsing: e.parsing,
|
|
99
|
+
interaction: {
|
|
100
|
+
intersect: !1,
|
|
101
|
+
mode: "index",
|
|
102
|
+
axis: "x"
|
|
103
|
+
},
|
|
104
|
+
// plugins
|
|
105
|
+
plugins: {
|
|
106
|
+
legend: { display: !1 },
|
|
107
|
+
title: { display: !1 },
|
|
108
|
+
hoverVerticalLine: P.value,
|
|
109
|
+
// tooltip
|
|
110
|
+
tooltip: {
|
|
111
|
+
enabled: !1,
|
|
112
|
+
position: "average",
|
|
113
|
+
external: ({ tooltip: t }) => {
|
|
114
|
+
l.value = { ...t };
|
|
115
|
+
},
|
|
116
|
+
callbacks: {
|
|
117
|
+
footer: (t) => {
|
|
118
|
+
const o = t.reduce((i, K) => i + (K.parsed.y || 0), 0);
|
|
119
|
+
return ["Total", String(o)];
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
// chart layout
|
|
125
|
+
responsive: !0,
|
|
126
|
+
maintainAspectRatio: !1,
|
|
127
|
+
layout: {
|
|
128
|
+
padding: {
|
|
129
|
+
left: 18,
|
|
130
|
+
top: 18,
|
|
131
|
+
bottom: 13
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
// basic styles
|
|
135
|
+
elements: {
|
|
136
|
+
line: {
|
|
137
|
+
borderWidth: 2,
|
|
138
|
+
tension: 0.3
|
|
139
|
+
},
|
|
140
|
+
point: {
|
|
141
|
+
radius: 1,
|
|
142
|
+
hitRadius: 8,
|
|
143
|
+
borderWidth: 0,
|
|
144
|
+
hoverRadius: 4,
|
|
145
|
+
hoverBorderWidth: 2,
|
|
146
|
+
pointHoverBackgroundColor: he
|
|
147
|
+
},
|
|
148
|
+
bar: {
|
|
149
|
+
borderRadius: 4
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
scales: {
|
|
153
|
+
// Horizontal Axis (X)
|
|
154
|
+
x: {
|
|
155
|
+
beginAtZero: !0,
|
|
156
|
+
border: { display: !1 },
|
|
157
|
+
stacked: f.value,
|
|
158
|
+
// stack on top of each other
|
|
159
|
+
// ticks
|
|
160
|
+
ticks: {
|
|
161
|
+
color: F,
|
|
162
|
+
font: _,
|
|
163
|
+
padding: 4,
|
|
164
|
+
callback: function(t) {
|
|
165
|
+
return D(
|
|
166
|
+
this.getLabelForValue(t),
|
|
167
|
+
e.xAxisFormat
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
// grid lines
|
|
172
|
+
grid: {
|
|
173
|
+
color: w,
|
|
174
|
+
drawOnChartArea: !1,
|
|
175
|
+
drawTicks: !0,
|
|
176
|
+
drawBorder: !1,
|
|
177
|
+
tickLength: 7
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
// Vertical Axis (Y)
|
|
181
|
+
y: {
|
|
182
|
+
beginAtZero: !0,
|
|
183
|
+
border: { display: !1 },
|
|
184
|
+
// hide left borderline
|
|
185
|
+
stacked: f.value,
|
|
186
|
+
// stack on top of each other
|
|
187
|
+
// ticks
|
|
188
|
+
ticks: {
|
|
189
|
+
color: F,
|
|
190
|
+
font: _,
|
|
191
|
+
padding: 8,
|
|
192
|
+
stepSize: R.value,
|
|
193
|
+
min: E.value,
|
|
194
|
+
max: R.value * e.tickCount,
|
|
195
|
+
callback: (t) => D(t, e.yAxisFormat)
|
|
196
|
+
},
|
|
197
|
+
// grid lines
|
|
198
|
+
grid: {
|
|
199
|
+
color: w,
|
|
200
|
+
drawOnChartArea: !0,
|
|
201
|
+
drawTicks: !1
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
})
|
|
207
|
+
), M = r(
|
|
208
|
+
() => v.value.reduce((t, o) => (t[o.id] = o.borderColor, t), {})
|
|
209
|
+
), U = r(() => e.dataSets.map((t) => ({
|
|
210
|
+
id: t.id,
|
|
211
|
+
label: t.label,
|
|
212
|
+
color: M.value[t.id] || null
|
|
213
|
+
}))), B = y(null), l = y(null), { position: A } = ve(
|
|
214
|
+
p,
|
|
215
|
+
B,
|
|
216
|
+
l
|
|
217
|
+
), z = r(() => ({
|
|
218
|
+
left: `${A.value.left}px`,
|
|
219
|
+
top: `${A.value.top}px`,
|
|
220
|
+
opacity: l.value?.opacity || 0
|
|
221
|
+
})), { minValue: E, maxValue: H } = Te({
|
|
222
|
+
parsingConfig: e.parsing,
|
|
223
|
+
dataSets: S,
|
|
224
|
+
isStacked: f
|
|
225
|
+
}), R = r(
|
|
226
|
+
() => ce(E.value, H.value, e.tickCount)
|
|
227
|
+
);
|
|
228
|
+
return (t, o) => (d(), C("div", xe, [
|
|
229
|
+
c(x) ? (d(), C(G, { key: 0 }, [
|
|
230
|
+
u("section", Se, [
|
|
231
|
+
u("div", Ie, [
|
|
232
|
+
V(Ce, {
|
|
233
|
+
"chart-type": c(m),
|
|
234
|
+
"onUpdate:chart-type": o[0] || (o[0] = (i) => X(m) ? m.value = i : null),
|
|
235
|
+
header: a.header,
|
|
236
|
+
subheader: a.subheader
|
|
237
|
+
}, null, 8, ["chart-type", "header", "subheader"])
|
|
238
|
+
]),
|
|
239
|
+
u("div", Be, [
|
|
240
|
+
u("canvas", {
|
|
241
|
+
ref_key: "chartRef",
|
|
242
|
+
ref: p,
|
|
243
|
+
class: "chart__canvas"
|
|
244
|
+
}, null, 512),
|
|
245
|
+
u("div", {
|
|
246
|
+
ref_key: "tooltipRef",
|
|
247
|
+
ref: B,
|
|
248
|
+
class: "chart__tooltip",
|
|
249
|
+
style: j(c(z))
|
|
250
|
+
}, [
|
|
251
|
+
l.value ? (d(), g(ye, {
|
|
252
|
+
key: 0,
|
|
253
|
+
title: String(l.value.title),
|
|
254
|
+
"data-points": l.value.dataPoints,
|
|
255
|
+
"x-axis-format": a.xAxisFormat,
|
|
256
|
+
"y-axis-format": a.yAxisFormat,
|
|
257
|
+
"total-label": l.value.footer[0],
|
|
258
|
+
"total-value": Number(l.value.footer[1])
|
|
259
|
+
}, null, 8, ["title", "data-points", "x-axis-format", "y-axis-format", "total-label", "total-value"])) : T("", !0)
|
|
260
|
+
], 4)
|
|
261
|
+
])
|
|
262
|
+
]),
|
|
263
|
+
a.hideLegend ? T("", !0) : (d(), C("section", Ae, [
|
|
264
|
+
V(be, {
|
|
265
|
+
items: c(U),
|
|
266
|
+
"visible-ids": a.visibleIds,
|
|
267
|
+
"onUpdate:visibleIds": o[1] || (o[1] = (i) => k("update:visibleIds", i))
|
|
268
|
+
}, null, 8, ["items", "visible-ids"])
|
|
269
|
+
]))
|
|
270
|
+
], 64)) : a.loading ? (d(), g(ke, { key: 1 })) : c(L) ? (d(), g(c(Le), {
|
|
271
|
+
key: 2,
|
|
272
|
+
title: a.noDataTitle,
|
|
273
|
+
subtitle: a.noDataSubtitle,
|
|
274
|
+
"icon-name": a.noDataIcon
|
|
275
|
+
}, null, 8, ["title", "subtitle", "icon-name"])) : T("", !0)
|
|
276
|
+
]));
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
export {
|
|
280
|
+
We as default
|
|
281
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./ChartHeader.vue2.js";
|
|
2
|
+
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../ChartHeader.vue_vue_type_style_index_0_scoped_88d4532f_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-88d4532f"]]);
|
|
5
|
+
export {
|
|
6
|
+
s as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "../../ChartHeader.vue_vue_type_style_index_0_scoped_88d4532f_lang.css"; import { defineComponent as f, computed as y, openBlock as T, createElementBlock as V, createElementVNode as _, createVNode as n, unref as t, withCtx as c, createTextVNode as l, toDisplayString as p, isRef as v } from "vue";
|
|
2
|
+
import s from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import x from "../switch/v4/SwitchV4.vue.js";
|
|
4
|
+
import { ChartType as a } from "./types.js";
|
|
5
|
+
const C = { class: "chart-header" }, b = { class: "header-texts" }, N = /* @__PURE__ */ f({
|
|
6
|
+
__name: "ChartHeader",
|
|
7
|
+
props: {
|
|
8
|
+
chartType: { default: a.Line },
|
|
9
|
+
header: { default: "" },
|
|
10
|
+
subheader: { default: "" }
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:chartType"],
|
|
13
|
+
setup(r, { emit: u }) {
|
|
14
|
+
const h = r, d = [
|
|
15
|
+
{ id: a.Line, icon: "chart-line-up" },
|
|
16
|
+
{ id: a.Bar, icon: "chart-bar" },
|
|
17
|
+
{ id: a.StackedLine, icon: "chart-line" }
|
|
18
|
+
], o = y({
|
|
19
|
+
get() {
|
|
20
|
+
return d.find(({ id: e }) => e === h.chartType);
|
|
21
|
+
},
|
|
22
|
+
set(e) {
|
|
23
|
+
u("update:chartType", e.id);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return (e, i) => (T(), V("div", C, [
|
|
27
|
+
_("div", b, [
|
|
28
|
+
n(t(s), { variant: "chart2" }, {
|
|
29
|
+
default: c(() => [
|
|
30
|
+
l(p(r.header), 1)
|
|
31
|
+
]),
|
|
32
|
+
_: 1
|
|
33
|
+
}),
|
|
34
|
+
n(t(s), { variant: "caption" }, {
|
|
35
|
+
default: c(() => [
|
|
36
|
+
l(p(r.subheader), 1)
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
})
|
|
40
|
+
]),
|
|
41
|
+
n(t(x), {
|
|
42
|
+
modelValue: t(o),
|
|
43
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => v(o) ? o.value = m : null),
|
|
44
|
+
options: d
|
|
45
|
+
}, null, 8, ["modelValue"])
|
|
46
|
+
]));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
N as default
|
|
51
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./ChartLegend.vue2.js";
|
|
2
|
+
/* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../ChartLegend.vue_vue_type_style_index_0_scoped_efc608f9_lang.css"; //*');
|
|
4
|
+
const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-efc608f9"]]);
|
|
5
|
+
export {
|
|
6
|
+
c as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import "../../ChartLegend.vue_vue_type_style_index_0_scoped_efc608f9_lang.css"; import { defineComponent as E, ref as T, computed as a, openBlock as d, createElementBlock as n, createElementVNode as c, createVNode as u, unref as l, mergeProps as m, Fragment as y, renderList as S, withCtx as U, createTextVNode as w, toDisplayString as B } from "vue";
|
|
2
|
+
import { useVirtualList as D } from "@vueuse/core";
|
|
3
|
+
import N from "../typography/v4/Typography.vue.js";
|
|
4
|
+
import A from "../checkbox/v4/CheckboxV4.vue.js";
|
|
5
|
+
import F from "../search/v4/SearchV4.vue.js";
|
|
6
|
+
import { DEFAULT_MIN_VISIBLE as H, DEFAULT_MAX_VISIBLE as M } from "./consts.js";
|
|
7
|
+
const P = { class: "chart-legend" }, R = { class: "search-box" }, K = /* @__PURE__ */ E({
|
|
8
|
+
__name: "ChartLegend",
|
|
9
|
+
props: {
|
|
10
|
+
items: { default: () => [] },
|
|
11
|
+
visibleIds: { default: () => [] },
|
|
12
|
+
minVisible: { default: H },
|
|
13
|
+
maxVisible: { default: M }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:visibleIds"],
|
|
16
|
+
setup(p, { emit: b }) {
|
|
17
|
+
const t = p, h = 32, o = T(""), f = a(() => {
|
|
18
|
+
const e = o.value.toLowerCase();
|
|
19
|
+
return t.items.filter(
|
|
20
|
+
(i) => i.label.toLowerCase().includes(e)
|
|
21
|
+
);
|
|
22
|
+
}), r = (e) => t.visibleIds.includes(e.id), v = a(
|
|
23
|
+
() => t.visibleIds.length >= t.maxVisible
|
|
24
|
+
), I = a(
|
|
25
|
+
() => t.visibleIds.length <= t.minVisible
|
|
26
|
+
), _ = (e) => I.value && r(e) || v.value && !r(e), V = (e, i) => {
|
|
27
|
+
b(
|
|
28
|
+
"update:visibleIds",
|
|
29
|
+
e ? [...t.visibleIds, i.id] : t.visibleIds.filter((s) => s !== i.id)
|
|
30
|
+
);
|
|
31
|
+
}, { list: L, containerProps: g, wrapperProps: k } = D(f, {
|
|
32
|
+
itemHeight: h,
|
|
33
|
+
overscan: 10
|
|
34
|
+
});
|
|
35
|
+
return (e, i) => (d(), n("div", P, [
|
|
36
|
+
c("div", R, [
|
|
37
|
+
u(l(F), {
|
|
38
|
+
modelValue: o.value,
|
|
39
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s)
|
|
40
|
+
}, null, 8, ["modelValue"])
|
|
41
|
+
]),
|
|
42
|
+
c("div", m({ class: "legend" }, l(g)), [
|
|
43
|
+
c("ul", m({ class: "legend__list" }, l(k)), [
|
|
44
|
+
(d(!0), n(y, null, S(l(L), ({ data: s, index: C }) => (d(), n("li", { key: C }, [
|
|
45
|
+
u(l(A), {
|
|
46
|
+
color: s.color,
|
|
47
|
+
"is-checked": r(s),
|
|
48
|
+
disabled: _(s),
|
|
49
|
+
"onUpdate:isChecked": (x) => V(x, s)
|
|
50
|
+
}, null, 8, ["color", "is-checked", "disabled", "onUpdate:isChecked"]),
|
|
51
|
+
u(l(N), { variant: "body2" }, {
|
|
52
|
+
default: U(() => [
|
|
53
|
+
w(B(s.label), 1)
|
|
54
|
+
]),
|
|
55
|
+
_: 2
|
|
56
|
+
}, 1024)
|
|
57
|
+
]))), 128))
|
|
58
|
+
], 16)
|
|
59
|
+
], 16)
|
|
60
|
+
]));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export {
|
|
64
|
+
K as default
|
|
65
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { openBlock as o, createElementBlock as c, pushScopeId as r, popScopeId as s, createElementVNode as t } from "vue";
|
|
2
|
+
/* empty css */import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const d = {}, i = (e) => (r("data-v-142c444a"), e = e(), s(), e), n = { class: "chart-loader" }, p = /* @__PURE__ */ i(() => /* @__PURE__ */ t("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
viewBox: "0 0 1072 275",
|
|
6
|
+
preserveAspectRatio: "none",
|
|
7
|
+
width: "100%",
|
|
8
|
+
height: "100%",
|
|
9
|
+
fill: "none"
|
|
10
|
+
}, [
|
|
11
|
+
/* @__PURE__ */ t("path", {
|
|
12
|
+
d: "M499.744 87.7024L499 87.4816C399.137 70.0475 293 138.418 218 173.72C120 219.848 87 235.892 0 275L1072 275C979 -57.3526 836.258 -31.5829 732 59.404C648.885 131.939 570.549 108.704 499.744 87.7024Z",
|
|
13
|
+
fill: "black",
|
|
14
|
+
"fill-opacity": "0.05"
|
|
15
|
+
})
|
|
16
|
+
], -1)), _ = [
|
|
17
|
+
p
|
|
18
|
+
];
|
|
19
|
+
function l(e, h) {
|
|
20
|
+
return o(), c("div", n, _);
|
|
21
|
+
}
|
|
22
|
+
const w = /* @__PURE__ */ a(d, [["render", l], ["__scopeId", "data-v-142c444a"]]);
|
|
23
|
+
export {
|
|
24
|
+
w as default
|
|
25
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import o from "./ChartTooltip.vue2.js";
|
|
2
|
+
/* empty css */import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ec636f18"]]);
|
|
5
|
+
export {
|
|
6
|
+
s as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import "../../ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css"; import { defineComponent as y, computed as b, openBlock as a, createElementBlock as s, createElementVNode as u, createBlock as g, unref as e, withCtx as l, createTextVNode as o, toDisplayString as r, createCommentVNode as f, Fragment as h, renderList as k, normalizeStyle as v, createVNode as d } from "vue";
|
|
2
|
+
import i from "../typography/v4/Typography.vue.js";
|
|
3
|
+
import { formatValue as c } from "./utils/utils.js";
|
|
4
|
+
const F = { class: "chart-tooltip" }, V = { class: "tooltip-title" }, p = { class: "list" }, A = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "tooltip-footer"
|
|
7
|
+
}, T = /* @__PURE__ */ y({
|
|
8
|
+
__name: "ChartTooltip",
|
|
9
|
+
props: {
|
|
10
|
+
title: { default: "" },
|
|
11
|
+
dataPoints: { default: () => [] },
|
|
12
|
+
xAxisFormat: { default: null },
|
|
13
|
+
yAxisFormat: { default: null },
|
|
14
|
+
totalLabel: { default: "Total" },
|
|
15
|
+
totalValue: { default: null }
|
|
16
|
+
},
|
|
17
|
+
setup(t) {
|
|
18
|
+
const m = t, x = b(() => m.xAxisFormat === "date" ? "dateLong" : m.xAxisFormat);
|
|
19
|
+
return (C, _) => (a(), s("div", F, [
|
|
20
|
+
u("div", V, [
|
|
21
|
+
t.title ? (a(), g(e(i), {
|
|
22
|
+
key: 0,
|
|
23
|
+
variant: "subtitle2"
|
|
24
|
+
}, {
|
|
25
|
+
default: l(() => [
|
|
26
|
+
o(r(e(c)(t.title, e(x))), 1)
|
|
27
|
+
]),
|
|
28
|
+
_: 1
|
|
29
|
+
})) : f("", !0)
|
|
30
|
+
]),
|
|
31
|
+
u("ul", p, [
|
|
32
|
+
(a(!0), s(h, null, k(t.dataPoints, (n) => (a(), s("li", {
|
|
33
|
+
key: n.datasetIndex,
|
|
34
|
+
class: "list__item"
|
|
35
|
+
}, [
|
|
36
|
+
u("span", {
|
|
37
|
+
class: "color-box",
|
|
38
|
+
style: v({
|
|
39
|
+
backgroundColor: String(n.dataset.pointBackgroundColor)
|
|
40
|
+
})
|
|
41
|
+
}, null, 4),
|
|
42
|
+
d(e(i), {
|
|
43
|
+
variant: "body2",
|
|
44
|
+
class: "flex-grow"
|
|
45
|
+
}, {
|
|
46
|
+
default: l(() => [
|
|
47
|
+
o(r(n.dataset.label), 1)
|
|
48
|
+
]),
|
|
49
|
+
_: 2
|
|
50
|
+
}, 1024),
|
|
51
|
+
d(e(i), { variant: "body2" }, {
|
|
52
|
+
default: l(() => [
|
|
53
|
+
o(r(e(c)(n.parsed.y, t.yAxisFormat)), 1)
|
|
54
|
+
]),
|
|
55
|
+
_: 2
|
|
56
|
+
}, 1024)
|
|
57
|
+
]))), 128))
|
|
58
|
+
]),
|
|
59
|
+
t.totalValue !== null ? (a(), s("div", A, [
|
|
60
|
+
d(e(i), {
|
|
61
|
+
variant: "body2",
|
|
62
|
+
class: "flex-grow"
|
|
63
|
+
}, {
|
|
64
|
+
default: l(() => [
|
|
65
|
+
o(r(t.totalLabel), 1)
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
}),
|
|
69
|
+
d(e(i), { variant: "body2" }, {
|
|
70
|
+
default: l(() => [
|
|
71
|
+
o(r(e(c)(t.totalValue, t.yAxisFormat)), 1)
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
})
|
|
75
|
+
])) : f("", !0)
|
|
76
|
+
]));
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
export {
|
|
80
|
+
T as default
|
|
81
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { computed as t } from "vue";
|
|
2
|
+
const V = ({
|
|
3
|
+
parsingConfig: s,
|
|
4
|
+
dataSets: m,
|
|
5
|
+
isStacked: v
|
|
6
|
+
}) => {
|
|
7
|
+
const l = (e) => e ? e[s?.yAxisKey] : null, r = (e) => e ? e[s?.xAxisKey] : null, o = t(
|
|
8
|
+
() => m.value.flatMap(
|
|
9
|
+
(e) => e.data.map(l)
|
|
10
|
+
)
|
|
11
|
+
), p = t(() => m.value.reduce((e, n) => (n.data.forEach((a) => {
|
|
12
|
+
const u = String(r(a));
|
|
13
|
+
e[u] || (e[u] = []), e[u].push(l(a));
|
|
14
|
+
}), e), {})), x = t(() => Math.min(0, ...o.value.map(Number))), h = t(() => {
|
|
15
|
+
if (v.value) {
|
|
16
|
+
const e = Object.values(p.value).map(
|
|
17
|
+
(n) => n.reduce((a, u) => a + u, 0)
|
|
18
|
+
);
|
|
19
|
+
return Math.max(...e);
|
|
20
|
+
}
|
|
21
|
+
return Math.max(...o.value.map(Number));
|
|
22
|
+
});
|
|
23
|
+
return {
|
|
24
|
+
getXValue: r,
|
|
25
|
+
getYValue: l,
|
|
26
|
+
minValue: x,
|
|
27
|
+
maxValue: h
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
V as useChartValues
|
|
32
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { computed as c } from "vue";
|
|
2
|
+
import { useElementSize as u } from "@vueuse/core";
|
|
3
|
+
const a = (o, s, n) => {
|
|
4
|
+
const t = u(s);
|
|
5
|
+
return {
|
|
6
|
+
position: c(() => {
|
|
7
|
+
if (!o.value || !n.value)
|
|
8
|
+
return { top: 0, left: 0 };
|
|
9
|
+
const i = o.value.getBoundingClientRect(), { caretX: F, caretY: e } = n.value, E = F + t.width.value + 20 >= i.width, _ = e + t.height.value + -20 >= i.height;
|
|
10
|
+
return {
|
|
11
|
+
left: F + (E ? -(t.width.value + 20) : 20),
|
|
12
|
+
top: e + (_ ? -1 * Math.min(
|
|
13
|
+
e - 8,
|
|
14
|
+
t.height.value + 8
|
|
15
|
+
) : -20)
|
|
16
|
+
};
|
|
17
|
+
})
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
a as useTooltipPosition
|
|
22
|
+
};
|