@ironsource/shared-ui 2.1.7-test.1 → 2.1.7-test.3
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/Autocomplete.vue_vue_type_style_index_0_scoped_e361f9fd_lang.css +1 -0
- 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_eb472aa3_lang.css +1 -0
- package/components/autocomplete/Autocomplete.vue.d.ts +5 -0
- package/components/autocomplete/Autocomplete.vue.js +2 -2
- package/components/autocomplete/Autocomplete.vue2.js +57 -45
- package/components/autocomplete/index.d.ts +20 -1
- 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 +95 -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/Autocomplete.vue_vue_type_style_index_0_scoped_a7bfd237_lang.css +0 -1
- 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
|
+
div[data-v-e361f9fd]{display:block}.autocomplete-dropdown[data-v-e361f9fd]{position:relative}.footer[data-v-e361f9fd]{display:flex;justify-content:flex-end;align-items:center;margin-top:var(--spacing-50)}
|
|
@@ -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-eb472aa3],.font-chart-2[data-v-eb472aa3],.font-chart-1[data-v-eb472aa3]{font-family:Inter,sans-serif;font-weight:700}.font-chip-label[data-v-eb472aa3],.font-table-label[data-v-eb472aa3],.font-button[data-v-eb472aa3],.font-heading-6[data-v-eb472aa3],.font-heading-5[data-v-eb472aa3],.font-heading-4[data-v-eb472aa3],.font-heading-3[data-v-eb472aa3],.font-heading-2[data-v-eb472aa3],.font-heading-1[data-v-eb472aa3],.font-title[data-v-eb472aa3]{font-family:Inter,sans-serif;font-weight:600}.font-tab-label1[data-v-eb472aa3],.font-input-label[data-v-eb472aa3],.font-overline[data-v-eb472aa3],.font-subtitle-2[data-v-eb472aa3],.font-subtitle-1[data-v-eb472aa3]{font-family:Inter,sans-serif;font-weight:500}.font-caption[data-v-eb472aa3],.font-body-2[data-v-eb472aa3],.input-container .input[data-v-eb472aa3],.font-body-1[data-v-eb472aa3]{font-family:Inter,sans-serif;font-weight:400}.font-title[data-v-eb472aa3]{font-size:2.5rem;line-height:3rem;letter-spacing:-.055rem}.font-heading-1[data-v-eb472aa3]{font-size:1.5rem;line-height:1.75rem;letter-spacing:-.0285rem}.font-heading-2[data-v-eb472aa3]{font-size:1.125rem;line-height:1.75rem;letter-spacing:-.01575rem}.font-heading-3[data-v-eb472aa3]{font-size:1rem;line-height:1.5rem;letter-spacing:-.011rem}.font-heading-4[data-v-eb472aa3]{font-size:.875rem;line-height:1rem;letter-spacing:unset}.font-heading-5[data-v-eb472aa3]{font-size:.8125rem;line-height:16px;letter-spacing:unset}.font-heading-6[data-v-eb472aa3]{font-size:.75rem;line-height:.75rem;letter-spacing:0}.input-container .input[data-v-eb472aa3],.font-body-1[data-v-eb472aa3]{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-body-2[data-v-eb472aa3]{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-subtitle-1[data-v-eb472aa3]{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-subtitle-2[data-v-eb472aa3]{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-chart-1[data-v-eb472aa3]{font-size:1.5rem;line-height:1.5rem;letter-spacing:-.015rem}.font-chart-2[data-v-eb472aa3]{font-size:1.25rem;line-height:1.25rem;letter-spacing:-.0125rem}.font-button[data-v-eb472aa3]{font-size:.875rem;line-height:1.25rem;letter-spacing:.00875rem}.font-overline[data-v-eb472aa3]{font-size:.75rem;line-height:1rem;letter-spacing:.045rem;text-transform:uppercase}.font-caption[data-v-eb472aa3]{font-size:.75rem;line-height:1rem}.font-table-label[data-v-eb472aa3]{font-size:.8125rem;line-height:1.25rem;letter-spacing:.00813rem}.font-input-label[data-v-eb472aa3]{font-size:.8125rem;line-height:1rem;letter-spacing:.00813rem}.font-tab-label1[data-v-eb472aa3],.font-tab-label2[data-v-eb472aa3]{font-size:.875rem;line-height:1rem}.font-chip-label[data-v-eb472aa3]{font-size:.75rem;line-height:1rem}h1[data-v-eb472aa3],h2[data-v-eb472aa3],h3[data-v-eb472aa3],h4[data-v-eb472aa3],h5[data-v-eb472aa3],h6[data-v-eb472aa3]{margin:0}.disabled .input[data-v-eb472aa3]::placeholder{color:var(--text-disabled)}.disabled .input-container[data-v-eb472aa3]{cursor:no-drop;background-color:var(--action-disabled-background)}.disabled .input-container[data-v-eb472aa3]:hover{outline:1px solid var(--action-outlined-border);background-color:var(--action-disabled-background)}.input-size-small[data-v-eb472aa3]{height:28px}.input-size-medium[data-v-eb472aa3]{height:32px}.input-size-large[data-v-eb472aa3]{height:40px}.input-with-label-container[data-v-eb472aa3]{display:flex;flex-direction:column}.input-container[data-v-eb472aa3]{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-eb472aa3]:hover{outline:1px solid var(--action-active);background-color:var(--action-hover)}.input-container .input[data-v-eb472aa3]{padding:0;width:100%;border:none;background:transparent;color:var(--text-primary);line-height:normal}.input-container .input[data-v-eb472aa3]:focus{outline:none}.input-container .input[data-v-eb472aa3]:disabled{color:var(--text-disabled);cursor:no-drop}.input-container .input.view-only[data-v-eb472aa3]{color:var(--text-disabled)}.input-container .input[type=number][data-v-eb472aa3]::-webkit-inner-spin-button{opacity:.7;transform:scale(1.1)}.input-container .hide-arrows.input[type=number][data-v-eb472aa3]::-webkit-inner-spin-button,.input-container .hide-arrows.input[type=number][data-v-eb472aa3]::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;appearance:none}.input-container .input[type=password][data-v-eb472aa3]{letter-spacing:4px}.input-container[data-v-eb472aa3] ::placeholder{color:var(--text-secondary);letter-spacing:normal}.input-container .label-inside[data-v-eb472aa3]::placeholder{color:var(--text-primary)}.input-container .icon-container[data-v-eb472aa3]{display:flex;align-items:center;color:var(--text-secondary)}.input-container .icon-before[data-v-eb472aa3]{padding-right:var(--spacing-50)}.input-container .icon-after[data-v-eb472aa3]{padding-left:var(--spacing-50)}.prefix-text[data-v-eb472aa3]{color:var(--text-secondary, #646464);margin-right:var(--spacing-50)}.suffix-text[data-v-eb472aa3]{color:var(--text-secondary, #646464)}.focused[data-v-eb472aa3],.focused[data-v-eb472aa3]:hover{outline:2px solid var(--primary-main);background-color:var(--action-hover)}.error-icon.error-icon[data-v-eb472aa3],.error-icon.error-icon[data-v-eb472aa3]:hover{color:var(--error-main)}.label-direction-left[data-v-eb472aa3]{flex-direction:row;align-items:center;justify-content:space-between}.apply-button[data-v-eb472aa3]{cursor:pointer;color:var(--primary-main);width:var(--spacing-250);height:var(--spacing-250)}.inline-error[data-v-eb472aa3]{cursor:pointer;color:var(--error-main);display:flex;justify-content:center;align-items:center}.footer[data-v-eb472aa3]{display:flex;justify-content:flex-end;margin-top:var(--spacing-50)}.footer.footer-absolute[data-v-eb472aa3]{position:absolute;bottom:calc(0px - var(--spacing-300))}.password-visibility-toggle[data-v-eb472aa3]{cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--text-secondary)}.variant-success .input-container[data-v-eb472aa3],.variant-success .input-container[data-v-eb472aa3]:hover{outline:2px solid var(--success-dark)}.variant-error .input-container[data-v-eb472aa3],.variant-error .input-container[data-v-eb472aa3]:hover{outline:2px solid var(--error-main)}.variant-warning .input-container[data-v-eb472aa3],.variant-warning .input-container[data-v-eb472aa3]:hover{outline:2px solid var(--warning-dark)}
|
|
@@ -14,6 +14,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
14
14
|
inlineError?: boolean;
|
|
15
15
|
inlineErrorText?: string;
|
|
16
16
|
maxLength?: number;
|
|
17
|
+
maxLengthCounterPosition?: "inside" | "outside";
|
|
17
18
|
options: unknown[] | {
|
|
18
19
|
id: string;
|
|
19
20
|
text: string;
|
|
@@ -39,6 +40,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
39
40
|
feedbackVariant: any;
|
|
40
41
|
showFeedbackTextIcon: boolean;
|
|
41
42
|
maxLength: any;
|
|
43
|
+
maxLengthCounterPosition: string;
|
|
42
44
|
onSearch: any;
|
|
43
45
|
optionNameKey: string;
|
|
44
46
|
optionsListWidth: any;
|
|
@@ -61,6 +63,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
61
63
|
inlineError?: boolean;
|
|
62
64
|
inlineErrorText?: string;
|
|
63
65
|
maxLength?: number;
|
|
66
|
+
maxLengthCounterPosition?: "inside" | "outside";
|
|
64
67
|
options: unknown[] | {
|
|
65
68
|
id: string;
|
|
66
69
|
text: string;
|
|
@@ -86,6 +89,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
86
89
|
feedbackVariant: any;
|
|
87
90
|
showFeedbackTextIcon: boolean;
|
|
88
91
|
maxLength: any;
|
|
92
|
+
maxLengthCounterPosition: string;
|
|
89
93
|
onSearch: any;
|
|
90
94
|
optionNameKey: string;
|
|
91
95
|
optionsListWidth: any;
|
|
@@ -104,6 +108,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
104
108
|
modelValue: string | number;
|
|
105
109
|
placeholder: string;
|
|
106
110
|
labelDirection: "top" | "inside";
|
|
111
|
+
maxLengthCounterPosition: "inside" | "outside";
|
|
107
112
|
inlineError: boolean;
|
|
108
113
|
inlineErrorText: string;
|
|
109
114
|
feedbackText: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Autocomplete.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../Autocomplete.
|
|
4
|
-
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../Autocomplete.vue_vue_type_style_index_0_scoped_e361f9fd_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e361f9fd"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../Autocomplete.
|
|
2
|
-
import
|
|
1
|
+
import "../../Autocomplete.vue_vue_type_style_index_0_scoped_e361f9fd_lang.css"; import { defineComponent as F, computed as r, ref as h, watchEffect as C, openBlock as s, createElementBlock as x, Fragment as P, createVNode as v, unref as o, withCtx as p, mergeProps as I, isRef as S, renderSlot as B, normalizeProps as E, guardReactiveProps as z, createBlock as g, createCommentVNode as m } from "vue";
|
|
2
|
+
import H from "../dropdown/v4/DropdownV4.vue.js";
|
|
3
3
|
import "../dropdown/v4/DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "../dropdown/v4/IconButtonDropdownTrigger.vue.js";
|
|
5
5
|
import "../dropdown/v4/ChipDropdownTrigger.vue.js";
|
|
@@ -8,14 +8,14 @@ import "../dropdown/v4/ButtonDropdownTrigger.vue.js";
|
|
|
8
8
|
import "../dropdown/v4/ButtonFilterDropdownTrigger.vue.js";
|
|
9
9
|
import "../dropdown/v4/TreeDropdown.vue.js";
|
|
10
10
|
import "../dropdown/v4/OptionV4.vue.js";
|
|
11
|
-
import
|
|
12
|
-
import { useVModel as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
11
|
+
import N from "../input/v4/TextField.vue.js";
|
|
12
|
+
import { useVModel as O } from "@vueuse/core";
|
|
13
|
+
import D from "../shared/FieldHelpText.vue.js";
|
|
14
|
+
import M from "../shared/FieldMaxLength.vue.js";
|
|
15
|
+
const U = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "footer"
|
|
18
|
-
},
|
|
18
|
+
}, ee = /* @__PURE__ */ F({
|
|
19
19
|
__name: "Autocomplete",
|
|
20
20
|
props: {
|
|
21
21
|
modelValue: { default: "" },
|
|
@@ -33,6 +33,7 @@ const N = {
|
|
|
33
33
|
inlineError: { type: Boolean, default: !1 },
|
|
34
34
|
inlineErrorText: { default: "" },
|
|
35
35
|
maxLength: { default: null },
|
|
36
|
+
maxLengthCounterPosition: { default: "inside" },
|
|
36
37
|
options: null,
|
|
37
38
|
displayValue: null,
|
|
38
39
|
optionNameKey: { default: "" },
|
|
@@ -41,40 +42,51 @@ const N = {
|
|
|
41
42
|
testId: { default: "" }
|
|
42
43
|
},
|
|
43
44
|
emits: ["update:modelValue"],
|
|
44
|
-
setup(e, { emit:
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
setup(e, { emit: b }) {
|
|
46
|
+
const t = e, d = O(t, "modelValue", b), k = (a) => {
|
|
47
|
+
a !== void 0 && (d.value = t.displayValue(a));
|
|
48
|
+
}, y = r(() => (d.value || "").length), f = r(
|
|
49
|
+
() => t.maxLength && t.maxLengthCounterPosition === "outside"
|
|
50
|
+
), L = r(() => f.value ? {
|
|
51
|
+
// when counter is shown outside, use native html maxlength attribute (instead of component prop)
|
|
52
|
+
// and render counter separately to avoid space between input and dropdown
|
|
53
|
+
maxlength: t.maxLength
|
|
54
|
+
} : {
|
|
55
|
+
maxLength: t.maxLength,
|
|
56
|
+
maxLengthCounterPosition: t.maxLengthCounterPosition
|
|
57
|
+
}), V = r(
|
|
58
|
+
() => t.feedbackText || f.value
|
|
59
|
+
), w = (a, l) => t.displayValue(a).toLowerCase().replace(/\s+/g, "").includes(l.toLowerCase().replace(/\s+/g, "")), u = r(() => {
|
|
60
|
+
const a = d.value.toString();
|
|
61
|
+
return (t.options || []).filter(
|
|
62
|
+
(l) => t.onSearch !== null ? t.onSearch(l, a) : w(l, a)
|
|
51
63
|
);
|
|
52
|
-
}), n =
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
}), n = h(!1), c = h(!1);
|
|
65
|
+
C(() => {
|
|
66
|
+
t.disabled ? n.value = !1 : c.value && u.value.length ? n.value = !0 : u.value.length === 0 && (n.value = !1);
|
|
55
67
|
});
|
|
56
|
-
const
|
|
57
|
-
|
|
68
|
+
const T = () => {
|
|
69
|
+
t.disabled || !n.value && u.value.length && (n.value = !0);
|
|
58
70
|
};
|
|
59
|
-
return (
|
|
60
|
-
v(
|
|
71
|
+
return (a, l) => (s(), x(P, null, [
|
|
72
|
+
v(o(H), {
|
|
61
73
|
"is-open": n.value,
|
|
62
|
-
"onUpdate:is-open":
|
|
74
|
+
"onUpdate:is-open": l[3] || (l[3] = (i) => n.value = i),
|
|
63
75
|
class: "autocomplete-dropdown",
|
|
64
76
|
"display-value": e.displayValue,
|
|
65
|
-
options:
|
|
77
|
+
options: o(u),
|
|
66
78
|
"option-name-key": e.optionNameKey,
|
|
67
79
|
"options-list-width": e.optionsListWidth,
|
|
68
80
|
disabled: e.disabled,
|
|
69
81
|
"search-auto-focus": !1,
|
|
70
82
|
"full-width": !1,
|
|
71
83
|
"test-id": e.testId,
|
|
72
|
-
"onUpdate:selected":
|
|
84
|
+
"onUpdate:selected": k
|
|
73
85
|
}, {
|
|
74
|
-
"dropdown-trigger":
|
|
75
|
-
v(
|
|
76
|
-
modelValue: d
|
|
77
|
-
"onUpdate:modelValue":
|
|
86
|
+
"dropdown-trigger": p(() => [
|
|
87
|
+
v(o(N), I({
|
|
88
|
+
modelValue: o(d),
|
|
89
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => S(d) ? d.value = i : null),
|
|
78
90
|
class: "autocomplete-field",
|
|
79
91
|
placeholder: e.placeholder,
|
|
80
92
|
disabled: e.disabled,
|
|
@@ -88,35 +100,35 @@ const N = {
|
|
|
88
100
|
"feedback-variant": e.feedbackVariant,
|
|
89
101
|
"show-feedback-text-icon": e.showFeedbackTextIcon,
|
|
90
102
|
"inline-error": e.inlineError,
|
|
91
|
-
"inline-error-text": e.inlineErrorText
|
|
92
|
-
|
|
93
|
-
onFocusin:
|
|
94
|
-
onFocusout:
|
|
95
|
-
onClick:
|
|
96
|
-
}, null,
|
|
103
|
+
"inline-error-text": e.inlineErrorText
|
|
104
|
+
}, o(L), {
|
|
105
|
+
onFocusin: l[1] || (l[1] = (i) => c.value = !0),
|
|
106
|
+
onFocusout: l[2] || (l[2] = (i) => c.value = !1),
|
|
107
|
+
onClick: T
|
|
108
|
+
}), null, 16, ["modelValue", "placeholder", "disabled", "size", "label", "label-direction", "mandatory", "hover-help-text", "hover-help-text-placemen", "test-id", "feedback-variant", "show-feedback-text-icon", "inline-error", "inline-error-text"])
|
|
97
109
|
]),
|
|
98
|
-
default:
|
|
99
|
-
|
|
110
|
+
default: p((i) => [
|
|
111
|
+
B(a.$slots, "default", E(z(i)), void 0, !0)
|
|
100
112
|
]),
|
|
101
113
|
_: 3
|
|
102
114
|
}, 8, ["is-open", "display-value", "options", "option-name-key", "options-list-width", "disabled", "test-id"]),
|
|
103
|
-
|
|
104
|
-
e.feedbackText ? (
|
|
115
|
+
o(V) ? (s(), x("div", U, [
|
|
116
|
+
e.feedbackText ? (s(), g(D, {
|
|
105
117
|
key: 0,
|
|
106
118
|
text: e.feedbackText,
|
|
107
119
|
variant: e.feedbackVariant,
|
|
108
120
|
"show-icon": e.showFeedbackTextIcon,
|
|
109
121
|
"test-id": e.testId
|
|
110
|
-
}, null, 8, ["text", "variant", "show-icon", "test-id"])) :
|
|
111
|
-
|
|
122
|
+
}, null, 8, ["text", "variant", "show-icon", "test-id"])) : m("", !0),
|
|
123
|
+
o(f) ? (s(), g(M, {
|
|
112
124
|
key: 1,
|
|
113
|
-
"current-length":
|
|
125
|
+
"current-length": o(y),
|
|
114
126
|
"max-length": e.maxLength
|
|
115
|
-
}, null, 8, ["current-length", "max-length"])) :
|
|
116
|
-
])) :
|
|
127
|
+
}, null, 8, ["current-length", "max-length"])) : m("", !0)
|
|
128
|
+
])) : m("", !0)
|
|
117
129
|
], 64));
|
|
118
130
|
}
|
|
119
131
|
});
|
|
120
132
|
export {
|
|
121
|
-
|
|
133
|
+
ee as default
|
|
122
134
|
};
|
|
@@ -15,6 +15,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
15
15
|
modelValue: string | number;
|
|
16
16
|
placeholder: string;
|
|
17
17
|
labelDirection: "top" | "inside";
|
|
18
|
+
maxLengthCounterPosition: "inside" | "outside";
|
|
18
19
|
inlineError: boolean;
|
|
19
20
|
inlineErrorText: string;
|
|
20
21
|
feedbackText: string;
|
|
@@ -75,6 +76,10 @@ declare const AutocompleteTypes: () => ({
|
|
|
75
76
|
type: import("vue").PropType<"top" | "inside">;
|
|
76
77
|
default: string;
|
|
77
78
|
};
|
|
79
|
+
maxLengthCounterPosition: {
|
|
80
|
+
type: import("vue").PropType<"inside" | "outside">;
|
|
81
|
+
default: string;
|
|
82
|
+
};
|
|
78
83
|
inlineError: {
|
|
79
84
|
type: import("vue").PropType<boolean>;
|
|
80
85
|
default: boolean;
|
|
@@ -113,7 +118,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
113
118
|
};
|
|
114
119
|
}>> & {
|
|
115
120
|
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
116
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "disabled" | "size" | "mandatory" | "testId" | "hoverHelpText" | "hoverHelpTextPlacement" | "maxLength" | "modelValue" | "placeholder" | "labelDirection" | "inlineError" | "inlineErrorText" | "feedbackText" | "feedbackVariant" | "showFeedbackTextIcon" | "onSearch" | "optionNameKey" | "optionsListWidth">;
|
|
121
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "disabled" | "size" | "mandatory" | "testId" | "hoverHelpText" | "hoverHelpTextPlacement" | "maxLength" | "modelValue" | "placeholder" | "labelDirection" | "maxLengthCounterPosition" | "inlineError" | "inlineErrorText" | "feedbackText" | "feedbackVariant" | "showFeedbackTextIcon" | "onSearch" | "optionNameKey" | "optionsListWidth">;
|
|
117
122
|
$attrs: {
|
|
118
123
|
[x: string]: unknown;
|
|
119
124
|
};
|
|
@@ -179,6 +184,10 @@ declare const AutocompleteTypes: () => ({
|
|
|
179
184
|
type: import("vue").PropType<"top" | "inside">;
|
|
180
185
|
default: string;
|
|
181
186
|
};
|
|
187
|
+
maxLengthCounterPosition: {
|
|
188
|
+
type: import("vue").PropType<"inside" | "outside">;
|
|
189
|
+
default: string;
|
|
190
|
+
};
|
|
182
191
|
inlineError: {
|
|
183
192
|
type: import("vue").PropType<boolean>;
|
|
184
193
|
default: boolean;
|
|
@@ -231,6 +240,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
231
240
|
modelValue: string | number;
|
|
232
241
|
placeholder: string;
|
|
233
242
|
labelDirection: "top" | "inside";
|
|
243
|
+
maxLengthCounterPosition: "inside" | "outside";
|
|
234
244
|
inlineError: boolean;
|
|
235
245
|
inlineErrorText: string;
|
|
236
246
|
feedbackText: string;
|
|
@@ -311,6 +321,10 @@ declare const AutocompleteTypes: () => ({
|
|
|
311
321
|
type: import("vue").PropType<"top" | "inside">;
|
|
312
322
|
default: string;
|
|
313
323
|
};
|
|
324
|
+
maxLengthCounterPosition: {
|
|
325
|
+
type: import("vue").PropType<"inside" | "outside">;
|
|
326
|
+
default: string;
|
|
327
|
+
};
|
|
314
328
|
inlineError: {
|
|
315
329
|
type: import("vue").PropType<boolean>;
|
|
316
330
|
default: boolean;
|
|
@@ -405,6 +419,10 @@ declare const AutocompleteTypes: () => ({
|
|
|
405
419
|
type: import("vue").PropType<"top" | "inside">;
|
|
406
420
|
default: string;
|
|
407
421
|
};
|
|
422
|
+
maxLengthCounterPosition: {
|
|
423
|
+
type: import("vue").PropType<"inside" | "outside">;
|
|
424
|
+
default: string;
|
|
425
|
+
};
|
|
408
426
|
inlineError: {
|
|
409
427
|
type: import("vue").PropType<boolean>;
|
|
410
428
|
default: boolean;
|
|
@@ -457,6 +475,7 @@ declare const AutocompleteTypes: () => ({
|
|
|
457
475
|
modelValue: string | number;
|
|
458
476
|
placeholder: string;
|
|
459
477
|
labelDirection: "top" | "inside";
|
|
478
|
+
maxLengthCounterPosition: "inside" | "outside";
|
|
460
479
|
inlineError: boolean;
|
|
461
480
|
inlineErrorText: string;
|
|
462
481
|
feedbackText: string;
|
|
@@ -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
|
+
};
|