@leaflink/stash 48.16.0 → 48.16.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/assets/illustrations/FileUpload/csv.svg +1 -1
- package/assets/illustrations/FileUpload/document.svg +1 -17
- package/assets/illustrations/FileUpload/image.svg +1 -1
- package/assets/illustrations/FileUpload/pdf.svg +1 -1
- package/dist/Accordion.js +1 -1
- package/dist/Accordion.js.map +1 -1
- package/dist/Accordion.vue.d.ts +8 -9
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/ActionsDropdown.vue.d.ts +7 -8
- package/dist/AddressSelect.js +42 -38
- package/dist/AddressSelect.js.map +1 -1
- package/dist/AddressSelect.vue.d.ts +10 -11
- package/dist/Alert.js.map +1 -1
- package/dist/Alert.vue.d.ts +6 -7
- package/dist/AppNavigationItem.js +2 -2
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppNavigationItem.vue.d.ts +7 -8
- package/dist/AppSidebar.js +42 -42
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppSidebar.vue.d.ts +8 -9
- package/dist/AppTopbar.js +16 -16
- package/dist/AppTopbar.js.map +1 -1
- package/dist/AppTopbar.vue.d.ts +8 -9
- package/dist/Avatar.js.map +1 -1
- package/dist/Avatar.vue.d.ts +7 -8
- package/dist/Backdrop.vue.d.ts +3 -5
- package/dist/Badge.js +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Badge.vue.d.ts +7 -8
- package/dist/Box.vue.d.ts +6 -7
- package/dist/Box.vue_vue_type_script_setup_true_lang-69e5176b.js.map +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/Button.vue.d.ts +7 -8
- package/dist/ButtonGroup.js +29 -29
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/ButtonGroup.vue.d.ts +8 -9
- package/dist/Card.js.map +1 -1
- package/dist/Card.vue.d.ts +6 -7
- package/dist/CardContent.vue.d.ts +3 -5
- package/dist/CardFooter.vue.d.ts +3 -5
- package/dist/CardHeader.js.map +1 -1
- package/dist/CardHeader.vue.d.ts +3 -4
- package/dist/CardMedia.js +6 -6
- package/dist/CardMedia.js.map +1 -1
- package/dist/CardMedia.vue.d.ts +3 -4
- package/dist/Carousel.js +249 -249
- package/dist/Carousel.js.map +1 -1
- package/dist/Carousel.vue.d.ts +9 -9
- package/dist/Checkbox.js +27 -27
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.vue.d.ts +11 -12
- package/dist/ChevronToggle.js +1 -1
- package/dist/ChevronToggle.vue.d.ts +8 -9
- package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js} +11 -11
- package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js.map → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js.map} +1 -1
- package/dist/Chip.js +30 -30
- package/dist/Chip.js.map +1 -1
- package/dist/Chip.vue.d.ts +9 -10
- package/dist/ConfirmationCodeInput.js +25 -25
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ConfirmationCodeInput.vue.d.ts +8 -9
- package/dist/ContextSwitcher.js +18 -18
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/ContextSwitcher.vue.d.ts +9 -10
- package/dist/Copy.js.map +1 -1
- package/dist/Copy.vue.d.ts +6 -7
- package/dist/CurrencyInput.js +93 -93
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +10 -11
- package/dist/CustomRender.vue.d.ts +3 -15
- package/dist/DataView.js +97 -97
- package/dist/DataView.js.map +1 -1
- package/dist/DataView.vue.d.ts +9 -10
- package/dist/DataViewFilters.js +153 -150
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewFilters.vue.d.ts +9 -10
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewSortButton.vue.d.ts +6 -7
- package/dist/DataViewToolbar.js +27 -27
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DataViewToolbar.vue.d.ts +8 -9
- package/dist/DatePicker.js +738 -738
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePicker.vue.d.ts +11 -12
- package/dist/DescriptionList.js.map +1 -1
- package/dist/DescriptionList.vue.d.ts +6 -7
- package/dist/DescriptionListDetail.vue.d.ts +3 -5
- package/dist/DescriptionListGroup.vue.d.ts +3 -5
- package/dist/DescriptionListTerm.vue.d.ts +3 -5
- package/dist/Dialog.js +44 -44
- package/dist/Dialog.js.map +1 -1
- package/dist/Dialog.vue.d.ts +10 -11
- package/dist/Divider.vue.d.ts +3 -5
- package/dist/Dropdown.js +38 -38
- package/dist/Dropdown.js.map +1 -1
- package/dist/Dropdown.vue.d.ts +9 -10
- package/dist/EmptyState.js +20 -20
- package/dist/EmptyState.js.map +1 -1
- package/dist/EmptyState.vue.d.ts +6 -7
- package/dist/Expand.js +1 -1
- package/dist/Expand.vue.d.ts +8 -9
- package/dist/{Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js → Expand.vue_vue_type_script_setup_true_lang-0f236267.js} +19 -19
- package/dist/Expand.vue_vue_type_script_setup_true_lang-0f236267.js.map +1 -0
- package/dist/Field.vue.d.ts +6 -7
- package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map +1 -1
- package/dist/FileUpload.js +65 -65
- package/dist/FileUpload.js.map +1 -1
- package/dist/FileUpload.vue.d.ts +10 -11
- package/dist/FilterChip.js +27 -27
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterChip.vue.d.ts +8 -9
- package/dist/FilterDrawerItem.js +26 -26
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDrawerItem.vue.d.ts +5 -6
- package/dist/FilterDropdown.js +49 -49
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterDropdown.vue.d.ts +8 -9
- package/dist/FilterSelect.js +23 -23
- package/dist/FilterSelect.js.map +1 -1
- package/dist/FilterSelect.vue.d.ts +8 -9
- package/dist/Filters.js +112 -104
- package/dist/Filters.js.map +1 -1
- package/dist/Filters.vue.d.ts +2204 -65
- package/dist/HttpError.js +42 -42
- package/dist/HttpError.js.map +1 -1
- package/dist/HttpError.vue.d.ts +6 -7
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.vue.d.ts +7 -8
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +8 -9
- package/dist/Illustration.vue.d.ts +6 -7
- package/dist/Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js.map +1 -1
- package/dist/Image.js +47 -47
- package/dist/Image.js.map +1 -1
- package/dist/Image.vue.d.ts +6 -7
- package/dist/InlineEdit.js +34 -34
- package/dist/InlineEdit.js.map +1 -1
- package/dist/InlineEdit.vue.d.ts +9 -10
- package/dist/Input.js +35 -35
- package/dist/Input.js.map +1 -1
- package/dist/Input.vue.d.ts +13 -14
- package/dist/InputOptions.js +33 -33
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +8 -9
- package/dist/IntegrationIcon.js.map +1 -1
- package/dist/IntegrationIcon.vue.d.ts +7 -8
- package/dist/Label.vue.d.ts +6 -7
- package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +1 -1
- package/dist/LicenseChip.js.map +1 -1
- package/dist/LicenseChip.vue.d.ts +6 -7
- package/dist/ListItem.vue.d.ts +225 -95
- package/dist/ListItemCell.vue.d.ts +4 -16
- package/dist/ListView.js +1 -1
- package/dist/ListView.vue.d.ts +5072 -470
- package/dist/Loading.js +16 -16
- package/dist/Loading.js.map +1 -1
- package/dist/Loading.vue.d.ts +3 -5
- package/dist/Logo.js +1 -1
- package/dist/Logo.vue.d.ts +9 -10
- package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js +196 -0
- package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js.map +1 -0
- package/dist/Menu.vue.d.ts +3 -5
- package/dist/MenuItem.vue.d.ts +3 -5
- package/dist/Metric.js.map +1 -1
- package/dist/Metric.vue.d.ts +6 -7
- package/dist/Modal.js +29 -29
- package/dist/Modal.js.map +1 -1
- package/dist/Modal.vue.d.ts +8 -9
- package/dist/Modals.js +8 -7
- package/dist/Modals.js.map +1 -1
- package/dist/Modals.vue.d.ts +3 -5
- package/dist/Module.js.map +1 -1
- package/dist/Module.vue.d.ts +7 -8
- package/dist/ModuleContent.vue.d.ts +3 -5
- package/dist/ModuleFooter.vue.d.ts +3 -5
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/ModuleHeader.vue.d.ts +6 -7
- package/dist/ObfuscateText.js +1 -1
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/ObfuscateText.vue.d.ts +6 -7
- package/dist/PageContent.vue.d.ts +3 -5
- package/dist/PageHeader.js.map +1 -1
- package/dist/PageHeader.vue.d.ts +6 -7
- package/dist/PageNavigation.js +30 -27
- package/dist/PageNavigation.js.map +1 -1
- package/dist/PageNavigation.vue.d.ts +8 -9
- package/dist/Paginate.js +32 -32
- package/dist/Paginate.js.map +1 -1
- package/dist/Paginate.vue.d.ts +8 -9
- package/dist/PlaidLink.js +29 -29
- package/dist/PlaidLink.js.map +1 -1
- package/dist/PlaidLink.vue.d.ts +11 -12
- package/dist/QuickAction.js.map +1 -1
- package/dist/QuickAction.vue.d.ts +4 -5
- package/dist/Radio.vue.d.ts +20 -1
- package/dist/RadioGroup.js +123 -123
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioGroup.vue.d.ts +10 -11
- package/dist/RadioNew.js +102 -102
- package/dist/RadioNew.js.map +1 -1
- package/dist/RadioNew.vue.d.ts +10 -11
- package/dist/RangeInput.vue.d.ts +3 -5
- package/dist/SearchBar.js +36 -36
- package/dist/SearchBar.js.map +1 -1
- package/dist/SearchBar.vue.d.ts +9 -10
- package/dist/Select.js +792 -774
- package/dist/Select.js.map +1 -1
- package/dist/Select.vue.d.ts +14 -15
- package/dist/SelectStatus.js +27 -27
- package/dist/SelectStatus.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +12 -13
- package/dist/Skeleton.js.map +1 -1
- package/dist/Skeleton.vue.d.ts +7 -8
- package/dist/Step.js.map +1 -1
- package/dist/Step.vue.d.ts +7 -8
- package/dist/Stepper.js +19 -19
- package/dist/Stepper.js.map +1 -1
- package/dist/Stepper.vue.d.ts +9 -10
- package/dist/Switch.js +25 -25
- package/dist/Switch.js.map +1 -1
- package/dist/Switch.vue.d.ts +11 -12
- package/dist/Tab.js +2 -2
- package/dist/Tab.vue.d.ts +3 -4
- package/dist/{Tab.vue_vue_type_script_setup_true_lang-69d1b046.js → Tab.vue_vue_type_script_setup_true_lang-9aa53203.js} +5 -3
- package/dist/Tab.vue_vue_type_script_setup_true_lang-9aa53203.js.map +1 -0
- package/dist/Table.js +3 -3
- package/dist/Table.js.map +1 -1
- package/dist/{Table.keys-cf93df19.js → Table.keys-83e4f09b.js} +11 -11
- package/dist/{Table.keys-cf93df19.js.map → Table.keys-83e4f09b.js.map} +1 -1
- package/dist/Table.vue.d.ts +6 -7
- package/dist/TableCell.js +1 -1
- package/dist/TableCell.js.map +1 -1
- package/dist/TableCell.vue.d.ts +6 -7
- package/dist/TableHeaderCell.js +12 -12
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderCell.vue.d.ts +6 -7
- package/dist/TableHeaderRow.js +21 -21
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableHeaderRow.vue.d.ts +8 -9
- package/dist/TableRow.js +42 -42
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRow.vue.d.ts +8 -9
- package/dist/Tabs.js +2 -2
- package/dist/Tabs.vue.d.ts +8 -9
- package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js → Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js} +37 -37
- package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js.map +1 -0
- package/dist/TextEditor.js +565 -565
- package/dist/TextEditor.js.map +1 -1
- package/dist/TextEditor.vue.d.ts +12 -13
- package/dist/Textarea.js +28 -28
- package/dist/Textarea.js.map +1 -1
- package/dist/Textarea.vue.d.ts +10 -11
- package/dist/Timeline.js.map +1 -1
- package/dist/Timeline.vue.d.ts +6 -7
- package/dist/TimelineItem.js +21 -21
- package/dist/TimelineItem.js.map +1 -1
- package/dist/TimelineItem.vue.d.ts +13 -6
- package/dist/Toast.js +134 -134
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.vue.d.ts +6 -7
- package/dist/Toasts.vue.d.ts +3 -5
- package/dist/components.css +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tailwind-base.js.map +1 -1
- package/dist/usePlaidLink.d.ts +1 -6
- package/dist/useScriptTag.d.ts +3 -8
- package/dist/useStepper.d.ts +7 -2
- package/package.json +1 -1
- package/tailwind-base.ts +13 -6
- package/dist/Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map +0 -1
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js +0 -196
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js.map +0 -1
- package/dist/Tab.vue_vue_type_script_setup_true_lang-69d1b046.js.map +0 -1
- package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js.map +0 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { ComponentCustomProps } from 'vue';
|
|
3
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
3
|
import { DefineComponent } from 'vue';
|
|
5
4
|
import { ExtractPropTypes } from 'vue';
|
|
6
5
|
import type { LocationQuery } from 'vue-router';
|
|
7
6
|
import { PropType } from 'vue';
|
|
8
|
-
import {
|
|
7
|
+
import { PublicProps } from 'vue';
|
|
9
8
|
|
|
10
9
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
10
|
|
|
@@ -36,7 +35,7 @@ declare const APPS: {
|
|
|
36
35
|
readonly PAYMENTS: "payments";
|
|
37
36
|
};
|
|
38
37
|
|
|
39
|
-
declare type AppValues = typeof APPS[keyof typeof APPS];
|
|
38
|
+
declare type AppValues = (typeof APPS)[keyof typeof APPS];
|
|
40
39
|
|
|
41
40
|
export declare interface ContextSwitcherProps {
|
|
42
41
|
/**
|
|
@@ -57,13 +56,13 @@ export declare interface ContextSwitcherProps {
|
|
|
57
56
|
routeQuery?: LocationQuery;
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ContextSwitcherProps>, {
|
|
59
|
+
declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ContextSwitcherProps>, {
|
|
61
60
|
portalAccess: () => {
|
|
62
61
|
commercePortal: boolean;
|
|
63
62
|
paymentsPortal: boolean;
|
|
64
63
|
};
|
|
65
64
|
routeQuery: () => {};
|
|
66
|
-
}
|
|
65
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
67
66
|
click: (urlInfo: {
|
|
68
67
|
from: string;
|
|
69
68
|
to: string;
|
|
@@ -72,13 +71,13 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
72
71
|
from: string;
|
|
73
72
|
to: string;
|
|
74
73
|
}) => void;
|
|
75
|
-
}, string,
|
|
74
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ContextSwitcherProps>, {
|
|
76
75
|
portalAccess: () => {
|
|
77
76
|
commercePortal: boolean;
|
|
78
77
|
paymentsPortal: boolean;
|
|
79
78
|
};
|
|
80
79
|
routeQuery: () => {};
|
|
81
|
-
}>>> & {
|
|
80
|
+
}>>> & Readonly<{
|
|
82
81
|
onClick?: ((urlInfo: {
|
|
83
82
|
from: string;
|
|
84
83
|
to: string;
|
|
@@ -87,13 +86,13 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
87
86
|
from: string;
|
|
88
87
|
to: string;
|
|
89
88
|
}) => any) | undefined;
|
|
90
|
-
}
|
|
89
|
+
}>, {
|
|
91
90
|
portalAccess: {
|
|
92
91
|
commercePortal: boolean;
|
|
93
92
|
paymentsPortal: boolean;
|
|
94
93
|
};
|
|
95
94
|
routeQuery: LocationQuery;
|
|
96
|
-
}, {}>;
|
|
95
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
97
96
|
export default _default;
|
|
98
97
|
|
|
99
98
|
export { }
|
package/dist/Copy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Copy.js","sources":["../src/components/Copy/Copy.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, useCssModule } from 'vue';\n\n import { UI_TIMEOUT } from '../../constants';\n import vTooltip from '../../directives/tooltip/tooltip';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n\n export interface CopyProps {\n /**\n * Optional text to display instead of icon.\n */\n text?: string;\n\n /**\n * The value to copy to clipboard.\n */\n value?: string;\n\n /**\n * Sets the copy icon or text to always be visible. By default, icon/text only appears when hovering over slot content.\n */\n visible?: boolean;\n }\n\n const props = withDefaults(defineProps<CopyProps>(), {\n text: undefined,\n value: '', // Todo - We should default this to the content of the default slot so you can do <Copy>631f67a</Copy>.\n visible: false,\n });\n const classes = useCssModule();\n\n // Flag to indicate whether a user successfully copied the text to their clipboard.\n // Note: We reset this flag after a timeout to allow the user to copy the text multiple times.\n const isCopied = ref(false);\n\n const tooltip = computed(() => {\n return isCopied.value ? t('ll.copy.copied') : !props.text ? t('ll.copy.copyToClipboard') : null;\n });\n\n function handleCopy() {\n navigator.clipboard.writeText(props.value);\n isCopied.value = true;\n\n setTimeout(() => {\n isCopied.value = false;\n }, UI_TIMEOUT);\n }\n</script>\n\n<template>\n <div class=\"stash-copy tw-flex tw-items-center\" :class=\"{ [classes.hidden]: !props.visible }\" data-test=\"stash-copy\">\n <!-- @slot Anything you want to render. This is not what will be copied to the clipboard. -->\n <slot></slot>\n <div\n v-tooltip.top=\"tooltip\"\n class=\"stash-copy__copy-zone tw-ml-3 tw-cursor-pointer\"\n :class=\"classes.copy\"\n data-test=\"stash-copy|copy-zone\"\n >\n <Icon\n v-if=\"isCopied\"\n class=\"stash-copy__success-icon tw-text-green-500\"\n name=\"circle-check\"\n data-test=\"stash-copy|success-icon\"\n />\n <Button\n v-else-if=\"props.text\"\n class=\"stash-copy__copy-text\"\n inline\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n >\n {{ props.text }}\n </Button>\n <Icon\n v-else\n class=\"stash-copy__copy-icon\"\n name=\"copy\"\n title=\"Copy to clipboard\"\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n />\n </div>\n </div>\n</template>\n\n<style module>\n .hidden {\n .copy {\n visibility: hidden;\n }\n\n &:hover {\n .copy {\n visibility: visible;\n }\n }\n }\n</style>\n"],"names":["classes","useCssModule","isCopied","ref","tooltip","computed","t","
|
|
1
|
+
{"version":3,"file":"Copy.js","sources":["../src/components/Copy/Copy.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, useCssModule } from 'vue';\n\n import { UI_TIMEOUT } from '../../constants';\n import vTooltip from '../../directives/tooltip/tooltip';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n\n export interface CopyProps {\n /**\n * Optional text to display instead of icon.\n */\n text?: string;\n\n /**\n * The value to copy to clipboard.\n */\n value?: string;\n\n /**\n * Sets the copy icon or text to always be visible. By default, icon/text only appears when hovering over slot content.\n */\n visible?: boolean;\n }\n\n const props = withDefaults(defineProps<CopyProps>(), {\n text: undefined,\n value: '', // Todo - We should default this to the content of the default slot so you can do <Copy>631f67a</Copy>.\n visible: false,\n });\n const classes = useCssModule();\n\n // Flag to indicate whether a user successfully copied the text to their clipboard.\n // Note: We reset this flag after a timeout to allow the user to copy the text multiple times.\n const isCopied = ref(false);\n\n const tooltip = computed(() => {\n return isCopied.value ? t('ll.copy.copied') : !props.text ? t('ll.copy.copyToClipboard') : null;\n });\n\n function handleCopy() {\n navigator.clipboard.writeText(props.value);\n isCopied.value = true;\n\n setTimeout(() => {\n isCopied.value = false;\n }, UI_TIMEOUT);\n }\n</script>\n\n<template>\n <div class=\"stash-copy tw-flex tw-items-center\" :class=\"{ [classes.hidden]: !props.visible }\" data-test=\"stash-copy\">\n <!-- @slot Anything you want to render. This is not what will be copied to the clipboard. -->\n <slot></slot>\n <div\n v-tooltip.top=\"tooltip\"\n class=\"stash-copy__copy-zone tw-ml-3 tw-cursor-pointer\"\n :class=\"classes.copy\"\n data-test=\"stash-copy|copy-zone\"\n >\n <Icon\n v-if=\"isCopied\"\n class=\"stash-copy__success-icon tw-text-green-500\"\n name=\"circle-check\"\n data-test=\"stash-copy|success-icon\"\n />\n <Button\n v-else-if=\"props.text\"\n class=\"stash-copy__copy-text\"\n inline\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n >\n {{ props.text }}\n </Button>\n <Icon\n v-else\n class=\"stash-copy__copy-icon\"\n name=\"copy\"\n title=\"Copy to clipboard\"\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n />\n </div>\n </div>\n</template>\n\n<style module>\n .hidden {\n .copy {\n visibility: hidden;\n }\n\n &:hover {\n .copy {\n visibility: visible;\n }\n }\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","isCopied","ref","tooltip","computed","t","handleCopy","UI_TIMEOUT"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BE,UAAMA,IAAQC,GAKRC,IAAUC,KAIVC,IAAWC,EAAI,EAAK,GAEpBC,IAAUC,EAAS,MAChBH,EAAS,QAAQI,EAAE,gBAAgB,IAAKR,EAAM,OAAsC,OAA/BQ,EAAE,yBAAyB,CACxF;AAED,aAASC,IAAa;AACV,gBAAA,UAAU,UAAUT,EAAM,KAAK,GACzCI,EAAS,QAAQ,IAEjB,WAAW,MAAM;AACf,QAAAA,EAAS,QAAQ;AAAA,SAChBM,CAAU;AAAA,IACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Copy.vue.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { ComponentCustomProps } from 'vue';
|
|
3
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
3
|
import { DefineComponent } from 'vue';
|
|
5
4
|
import { ExtractPropTypes } from 'vue';
|
|
6
5
|
import { PropType } from 'vue';
|
|
7
|
-
import {
|
|
6
|
+
import { PublicProps } from 'vue';
|
|
8
7
|
|
|
9
8
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
9
|
|
|
@@ -48,19 +47,19 @@ export declare interface CopyProps {
|
|
|
48
47
|
visible?: boolean;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyProps>, {
|
|
50
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyProps>, {
|
|
52
51
|
text: undefined;
|
|
53
52
|
value: string;
|
|
54
53
|
visible: boolean;
|
|
55
|
-
}
|
|
54
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyProps>, {
|
|
56
55
|
text: undefined;
|
|
57
56
|
value: string;
|
|
58
57
|
visible: boolean;
|
|
59
|
-
}
|
|
58
|
+
}>>> & Readonly<{}>, {
|
|
60
59
|
text: string;
|
|
61
60
|
value: string;
|
|
62
61
|
visible: boolean;
|
|
63
|
-
}, {}>, {
|
|
62
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
64
63
|
default?(_: {}): any;
|
|
65
64
|
}>;
|
|
66
65
|
export default _default;
|
package/dist/CurrencyInput.js
CHANGED
|
@@ -18,14 +18,14 @@ import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
|
|
|
18
18
|
* (c) 2018-2024 Matthias Stiller
|
|
19
19
|
* @license MIT
|
|
20
20
|
*/
|
|
21
|
-
var
|
|
21
|
+
var y;
|
|
22
22
|
(function(s) {
|
|
23
23
|
s.symbol = "symbol", s.narrowSymbol = "narrowSymbol", s.code = "code", s.name = "name", s.hidden = "hidden";
|
|
24
|
-
})(
|
|
25
|
-
var
|
|
24
|
+
})(y || (y = {}));
|
|
25
|
+
var v;
|
|
26
26
|
(function(s) {
|
|
27
27
|
s.precision = "precision", s.thousands = "thousands", s.millions = "millions", s.billions = "billions";
|
|
28
|
-
})(
|
|
28
|
+
})(v || (v = {}));
|
|
29
29
|
const D = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), M = (s) => s.replace(/^0+(0$|[^0])/, "$1"), E = (s, i) => (s.match(new RegExp(D(i), "g")) || []).length, X = (s, i) => s.substring(0, s.indexOf(i)), P = [
|
|
30
30
|
",",
|
|
31
31
|
".",
|
|
@@ -34,19 +34,19 @@ const D = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), M = (s) => s.replace(
|
|
|
34
34
|
], N = "(0|[1-9]\\d*)";
|
|
35
35
|
class U {
|
|
36
36
|
constructor(i) {
|
|
37
|
-
var t, e, n, g,
|
|
38
|
-
const { currency:
|
|
37
|
+
var t, e, n, g, a, c;
|
|
38
|
+
const { currency: h, currencyDisplay: p, locale: r, precision: o, accountingSign: d, useGrouping: l } = i;
|
|
39
39
|
this.locale = r, this.options = {
|
|
40
|
-
currency:
|
|
40
|
+
currency: h,
|
|
41
41
|
useGrouping: l,
|
|
42
42
|
style: "currency",
|
|
43
|
-
currencySign:
|
|
44
|
-
currencyDisplay: p !==
|
|
43
|
+
currencySign: d ? "accounting" : void 0,
|
|
44
|
+
currencyDisplay: p !== y.hidden ? p : void 0
|
|
45
45
|
};
|
|
46
|
-
const
|
|
47
|
-
this.currency = (t =
|
|
48
|
-
const b = (
|
|
49
|
-
this.prefix = b(
|
|
46
|
+
const u = new Intl.NumberFormat(r, this.options), f = u.formatToParts(123456);
|
|
47
|
+
this.currency = (t = f.find(({ type: m }) => m === "currency")) === null || t === void 0 ? void 0 : t.value, this.digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((m) => m.toLocaleString(r)), this.decimalSymbol = (e = f.find(({ type: m }) => m === "decimal")) === null || e === void 0 ? void 0 : e.value, this.groupingSymbol = (n = f.find(({ type: m }) => m === "group")) === null || n === void 0 ? void 0 : n.value, this.minusSign = (g = u.formatToParts(-1).find(({ type: m }) => m === "minusSign")) === null || g === void 0 ? void 0 : g.value, this.decimalSymbol === void 0 ? this.minimumFractionDigits = this.maximumFractionDigits = 0 : typeof o == "number" ? this.minimumFractionDigits = this.maximumFractionDigits = o : (this.minimumFractionDigits = (a = o == null ? void 0 : o.min) !== null && a !== void 0 ? a : u.resolvedOptions().minimumFractionDigits, this.maximumFractionDigits = (c = o == null ? void 0 : o.max) !== null && c !== void 0 ? c : u.resolvedOptions().maximumFractionDigits);
|
|
48
|
+
const b = (m) => X(m, this.digits[1]), S = (m) => m.substring(m.lastIndexOf(this.decimalSymbol ? this.digits[0] : this.digits[1]) + 1);
|
|
49
|
+
this.prefix = b(u.format(1)), this.suffix = S(u.format(1)), this.negativePrefix = b(u.format(-1)), this.negativeSuffix = S(u.format(-1));
|
|
50
50
|
}
|
|
51
51
|
parse(i) {
|
|
52
52
|
if (i) {
|
|
@@ -116,26 +116,26 @@ class C {
|
|
|
116
116
|
}
|
|
117
117
|
class q extends C {
|
|
118
118
|
conformToMask(i, t = "") {
|
|
119
|
-
const e = this.currencyFormat.isNegative(i), n = (
|
|
120
|
-
if (n(
|
|
119
|
+
const e = this.currencyFormat.isNegative(i), n = (u) => u === "" && e && !(this.currencyFormat.minusSign === void 0 ? t === this.currencyFormat.negativePrefix + this.currencyFormat.negativeSuffix : t === this.currencyFormat.negativePrefix), g = (u) => {
|
|
120
|
+
if (n(u))
|
|
121
121
|
return "";
|
|
122
122
|
if (this.currencyFormat.maximumFractionDigits > 0) {
|
|
123
|
-
if (this.currencyFormat.isFractionIncomplete(
|
|
124
|
-
return
|
|
125
|
-
if (
|
|
126
|
-
return this.currencyFormat.toFraction(
|
|
123
|
+
if (this.currencyFormat.isFractionIncomplete(u))
|
|
124
|
+
return u;
|
|
125
|
+
if (u.startsWith(this.currencyFormat.decimalSymbol))
|
|
126
|
+
return this.currencyFormat.toFraction(u);
|
|
127
127
|
}
|
|
128
128
|
return null;
|
|
129
129
|
};
|
|
130
|
-
let
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
134
|
-
return this.currencyFormat.insertCurrency(
|
|
135
|
-
const [
|
|
136
|
-
return
|
|
137
|
-
numberValue: +`${e ? "-" : ""}${r}.${
|
|
138
|
-
fractionDigits:
|
|
130
|
+
let a = i;
|
|
131
|
+
a = this.currencyFormat.stripCurrency(a, e), a = this.currencyFormat.stripSignLiterals(a);
|
|
132
|
+
const c = g(a);
|
|
133
|
+
if (c != null)
|
|
134
|
+
return this.currencyFormat.insertCurrency(c, e);
|
|
135
|
+
const [h, ...p] = a.split(this.currencyFormat.decimalSymbol), r = M(this.currencyFormat.onlyDigits(h)), o = this.currencyFormat.onlyDigits(p.join("")).substring(0, this.currencyFormat.maximumFractionDigits), d = p.length > 0 && o.length === 0, l = r === "" && e && (this.currencyFormat.minusSign === void 0 ? t === i.slice(0, -2) + this.currencyFormat.negativeSuffix : t === i.slice(0, -1));
|
|
136
|
+
return d || l || n(r) ? t : r.match(/\d+/) ? {
|
|
137
|
+
numberValue: +`${e ? "-" : ""}${r}.${o}`,
|
|
138
|
+
fractionDigits: o
|
|
139
139
|
} : "";
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -183,12 +183,12 @@ class H {
|
|
|
183
183
|
...i
|
|
184
184
|
}, this.options.autoDecimalDigits && (this.options.hideNegligibleDecimalDigitsOnFocus = !1), this.el.getAttribute("inputmode") || this.el.setAttribute("inputmode", this.options.autoDecimalDigits ? "numeric" : "decimal"), this.currencyFormat = new U(this.options), this.numberMask = this.options.autoDecimalDigits ? new Y(this.currencyFormat) : new q(this.currencyFormat);
|
|
185
185
|
const t = {
|
|
186
|
-
[
|
|
187
|
-
[
|
|
188
|
-
[
|
|
189
|
-
[
|
|
186
|
+
[v.precision]: this.currencyFormat.maximumFractionDigits,
|
|
187
|
+
[v.thousands]: 3,
|
|
188
|
+
[v.millions]: 6,
|
|
189
|
+
[v.billions]: 9
|
|
190
190
|
};
|
|
191
|
-
this.valueScaling = this.options.valueScaling ? t[this.options.valueScaling] : void 0, this.valueScalingFractionDigits = this.valueScaling !== void 0 && this.options.valueScaling !==
|
|
191
|
+
this.valueScaling = this.options.valueScaling ? t[this.options.valueScaling] : void 0, this.valueScalingFractionDigits = this.valueScaling !== void 0 && this.options.valueScaling !== v.precision ? this.valueScaling + this.currencyFormat.maximumFractionDigits : this.currencyFormat.maximumFractionDigits, this.minValue = this.getMinValue(), this.maxValue = this.getMaxValue();
|
|
192
192
|
}
|
|
193
193
|
getMinValue() {
|
|
194
194
|
var i, t;
|
|
@@ -215,16 +215,16 @@ class H {
|
|
|
215
215
|
const e = this.numberMask.conformToMask(i, this.formattedValue);
|
|
216
216
|
let n;
|
|
217
217
|
if (typeof e == "object") {
|
|
218
|
-
const { numberValue: g, fractionDigits:
|
|
219
|
-
let { maximumFractionDigits:
|
|
220
|
-
this.focus ?
|
|
218
|
+
const { numberValue: g, fractionDigits: a } = e;
|
|
219
|
+
let { maximumFractionDigits: c, minimumFractionDigits: h } = this.currencyFormat;
|
|
220
|
+
this.focus ? h = t ? a.replace(/0+$/, "").length : Math.min(c, a.length) : Number.isInteger(g) && !this.options.autoDecimalDigits && (this.options.precision === void 0 || h === 0) && (h = c = 0), n = this.toInteger(Math.abs(g)) > Number.MAX_SAFE_INTEGER ? this.formattedValue : this.currencyFormat.format(g, {
|
|
221
221
|
useGrouping: this.options.useGrouping !== !1 && !(this.focus && this.options.hideGroupingSeparatorOnFocus),
|
|
222
|
-
minimumFractionDigits:
|
|
223
|
-
maximumFractionDigits:
|
|
222
|
+
minimumFractionDigits: h,
|
|
223
|
+
maximumFractionDigits: c
|
|
224
224
|
});
|
|
225
225
|
} else
|
|
226
226
|
n = e;
|
|
227
|
-
this.maxValue <= 0 && !this.currencyFormat.isNegative(n) && this.currencyFormat.parse(n) !== 0 && (n = n.replace(this.currencyFormat.prefix, this.currencyFormat.negativePrefix)), this.minValue >= 0 && (n = n.replace(this.currencyFormat.negativePrefix, this.currencyFormat.prefix)), (this.options.currencyDisplay ===
|
|
227
|
+
this.maxValue <= 0 && !this.currencyFormat.isNegative(n) && this.currencyFormat.parse(n) !== 0 && (n = n.replace(this.currencyFormat.prefix, this.currencyFormat.negativePrefix)), this.minValue >= 0 && (n = n.replace(this.currencyFormat.negativePrefix, this.currencyFormat.prefix)), (this.options.currencyDisplay === y.hidden || this.focus && this.options.hideCurrencySymbolOnFocus) && (n = n.replace(this.currencyFormat.negativePrefix, this.currencyFormat.minusSign !== void 0 ? this.currencyFormat.minusSign : "(").replace(this.currencyFormat.negativeSuffix, this.currencyFormat.minusSign !== void 0 ? "" : ")").replace(this.currencyFormat.prefix, "").replace(this.currencyFormat.suffix, "")), this.el.value = n, this.numberValue = this.currencyFormat.parse(n);
|
|
228
228
|
} else
|
|
229
229
|
this.el.value = "", this.numberValue = null;
|
|
230
230
|
this.formattedValue = this.el.value, this.onInput(this.getValue());
|
|
@@ -234,22 +234,22 @@ class H {
|
|
|
234
234
|
const { value: t, selectionStart: e } = this.el, n = i;
|
|
235
235
|
if (e && n.data && P.includes(n.data) && (this.decimalSymbolInsertedAt = e - 1), this.format(t), this.focus && e != null) {
|
|
236
236
|
const g = () => {
|
|
237
|
-
const { prefix:
|
|
238
|
-
let
|
|
239
|
-
const
|
|
237
|
+
const { prefix: a, suffix: c, decimalSymbol: h, maximumFractionDigits: p, groupingSymbol: r } = this.currencyFormat;
|
|
238
|
+
let o = t.length - e;
|
|
239
|
+
const d = this.formattedValue.length;
|
|
240
240
|
if (this.currencyFormat.minusSign === void 0 && (t.startsWith("(") || t.startsWith("-")) && !t.endsWith(")"))
|
|
241
|
-
return
|
|
241
|
+
return d - this.currencyFormat.negativeSuffix.length > 1 ? this.formattedValue.substring(e).length : 1;
|
|
242
242
|
if (this.formattedValue.substring(e, 1) === r && E(this.formattedValue, r) === E(t, r) + 1)
|
|
243
|
-
return
|
|
244
|
-
if (
|
|
243
|
+
return d - o - 1;
|
|
244
|
+
if (d < o)
|
|
245
245
|
return e;
|
|
246
|
-
if (
|
|
247
|
-
const l = t.indexOf(
|
|
248
|
-
if (Math.abs(
|
|
249
|
-
return this.formattedValue.indexOf(
|
|
250
|
-
!this.options.autoDecimalDigits && e > l && this.currencyFormat.onlyDigits(t.substring(l)).length - 1 === p && (
|
|
246
|
+
if (h !== void 0 && t.indexOf(h) !== -1) {
|
|
247
|
+
const l = t.indexOf(h) + 1;
|
|
248
|
+
if (Math.abs(d - t.length) > 1 && e <= l)
|
|
249
|
+
return this.formattedValue.indexOf(h) + 1;
|
|
250
|
+
!this.options.autoDecimalDigits && e > l && this.currencyFormat.onlyDigits(t.substring(l)).length - 1 === p && (o -= 1);
|
|
251
251
|
}
|
|
252
|
-
return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay ===
|
|
252
|
+
return this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === y.hidden ? d - o : Math.max(d - Math.max(o, c.length), a.length);
|
|
253
253
|
};
|
|
254
254
|
this.setCaretPosition(g());
|
|
255
255
|
}
|
|
@@ -270,8 +270,8 @@ class H {
|
|
|
270
270
|
getCaretPositionOnFocus(i, t) {
|
|
271
271
|
if (this.numberValue == null)
|
|
272
272
|
return t;
|
|
273
|
-
const { prefix: e, negativePrefix: n, suffix: g, negativeSuffix:
|
|
274
|
-
if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay ===
|
|
273
|
+
const { prefix: e, negativePrefix: n, suffix: g, negativeSuffix: a, groupingSymbol: c, currency: h } = this.currencyFormat, p = this.numberValue < 0, r = p ? n : e, o = r.length;
|
|
274
|
+
if (this.options.hideCurrencySymbolOnFocus || this.options.currencyDisplay === y.hidden) {
|
|
275
275
|
if (p) {
|
|
276
276
|
if (t <= 1)
|
|
277
277
|
return 1;
|
|
@@ -279,14 +279,14 @@ class H {
|
|
|
279
279
|
return this.formattedValue.length - 1;
|
|
280
280
|
}
|
|
281
281
|
} else {
|
|
282
|
-
const l = p ?
|
|
282
|
+
const l = p ? a.length : g.length;
|
|
283
283
|
if (t >= i.length - l)
|
|
284
284
|
return this.formattedValue.length - l;
|
|
285
|
-
if (t <
|
|
286
|
-
return
|
|
285
|
+
if (t < o)
|
|
286
|
+
return o;
|
|
287
287
|
}
|
|
288
|
-
let
|
|
289
|
-
return this.options.hideCurrencySymbolOnFocus && this.options.currencyDisplay !==
|
|
288
|
+
let d = t;
|
|
289
|
+
return this.options.hideCurrencySymbolOnFocus && this.options.currencyDisplay !== y.hidden && t >= o && h !== void 0 && r.includes(h) && (d -= o, p && (d += 1)), this.options.hideGroupingSeparatorOnFocus && c !== void 0 && (d -= E(i.substring(0, t), c)), d;
|
|
290
290
|
}
|
|
291
291
|
setCaretPosition(i, t = i) {
|
|
292
292
|
this.el.setSelectionRange(i, t);
|
|
@@ -295,30 +295,30 @@ class H {
|
|
|
295
295
|
const J = (s) => s != null && s.matches("input") ? s : s == null ? void 0 : s.querySelector("input");
|
|
296
296
|
function K(s, i) {
|
|
297
297
|
var t, e, n, g;
|
|
298
|
-
let
|
|
299
|
-
const
|
|
300
|
-
return x(
|
|
298
|
+
let a;
|
|
299
|
+
const c = O(null), h = O(null), p = O(null), r = R(), o = (r == null ? void 0 : r.emit) || ((e = (t = r == null ? void 0 : r.proxy) === null || t === void 0 ? void 0 : t.$emit) === null || e === void 0 ? void 0 : e.bind(r == null ? void 0 : r.proxy)), d = (r == null ? void 0 : r.props) || ((n = r == null ? void 0 : r.proxy) === null || n === void 0 ? void 0 : n.$props), l = $.startsWith("3"), u = l && ((g = r == null ? void 0 : r.attrs.modelModifiers) === null || g === void 0 ? void 0 : g.lazy), f = I(() => d == null ? void 0 : d[l ? "modelValue" : "value"]), b = l ? "update:modelValue" : "input", S = u ? "update:modelValue" : "change";
|
|
300
|
+
return x(c, (m) => {
|
|
301
301
|
var V;
|
|
302
|
-
if (
|
|
303
|
-
const _ = J((V =
|
|
304
|
-
_ ? (
|
|
302
|
+
if (m) {
|
|
303
|
+
const _ = J((V = m == null ? void 0 : m.$el) !== null && V !== void 0 ? V : m);
|
|
304
|
+
_ ? (a = new H({
|
|
305
305
|
el: _,
|
|
306
306
|
options: s,
|
|
307
307
|
onInput: (F) => {
|
|
308
|
-
!
|
|
308
|
+
!u && i !== !1 && f.value !== F.number && (o == null || o(b, F.number)), p.value = F.number, h.value = F.formatted;
|
|
309
309
|
},
|
|
310
310
|
onChange: (F) => {
|
|
311
|
-
i !== !1 && (
|
|
311
|
+
i !== !1 && (o == null || o(S, F.number));
|
|
312
312
|
}
|
|
313
|
-
}),
|
|
313
|
+
}), a.setValue(f.value)) : console.error('No input element found. Please make sure that the "inputRef" template ref is properly assigned.');
|
|
314
314
|
} else
|
|
315
|
-
|
|
315
|
+
a = null;
|
|
316
316
|
}), {
|
|
317
|
-
inputRef:
|
|
317
|
+
inputRef: c,
|
|
318
318
|
numberValue: p,
|
|
319
|
-
formattedValue:
|
|
320
|
-
setValue: (
|
|
321
|
-
setOptions: (
|
|
319
|
+
formattedValue: h,
|
|
320
|
+
setValue: (m) => a == null ? void 0 : a.setValue(m),
|
|
321
|
+
setOptions: (m) => a == null ? void 0 : a.setOptions(m)
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
324
|
const gi = /* @__PURE__ */ A({
|
|
@@ -337,9 +337,9 @@ const gi = /* @__PURE__ */ A({
|
|
|
337
337
|
},
|
|
338
338
|
emits: ["update:model-value"],
|
|
339
339
|
setup(s, { expose: i, emit: t }) {
|
|
340
|
-
const e =
|
|
340
|
+
const e = {
|
|
341
341
|
currency: "USD",
|
|
342
|
-
currencyDisplay:
|
|
342
|
+
currencyDisplay: y.hidden,
|
|
343
343
|
precision: 2,
|
|
344
344
|
hideCurrencySymbolOnFocus: !0,
|
|
345
345
|
hideGroupingSeparatorOnFocus: !0,
|
|
@@ -347,34 +347,34 @@ const gi = /* @__PURE__ */ A({
|
|
|
347
347
|
autoDecimalDigits: !0,
|
|
348
348
|
useGrouping: !0,
|
|
349
349
|
accountingSign: !1
|
|
350
|
-
}, g = L(),
|
|
351
|
-
...
|
|
352
|
-
...z(
|
|
353
|
-
})), { inputRef: h, setOptions:
|
|
350
|
+
}, n = s, g = t, a = L(), c = I(() => ({
|
|
351
|
+
...e,
|
|
352
|
+
...z(n.inputOptions) ? {} : n.inputOptions
|
|
353
|
+
})), { inputRef: h, setOptions: p, setValue: r, numberValue: o } = K(c.value, !1);
|
|
354
354
|
i({ inputEl: h }), x(
|
|
355
|
-
() =>
|
|
356
|
-
(
|
|
357
|
-
var
|
|
358
|
-
let
|
|
359
|
-
Object.is(
|
|
355
|
+
() => o.value,
|
|
356
|
+
(l) => {
|
|
357
|
+
var f;
|
|
358
|
+
let u;
|
|
359
|
+
Object.is(l, -0) ? typeof c.value.precision == "number" ? u = "-0." + "0".repeat(c.value.precision) : u = "-0." + "0".repeat(((f = c.value.precision) == null ? void 0 : f.min) || 0) : u = typeof l == "number" ? l.toFixed(2) : l, g("update:model-value", u);
|
|
360
360
|
}
|
|
361
361
|
), x(
|
|
362
|
-
() =>
|
|
363
|
-
(
|
|
364
|
-
let
|
|
365
|
-
typeof
|
|
362
|
+
() => n.modelValue,
|
|
363
|
+
(l) => {
|
|
364
|
+
let u;
|
|
365
|
+
typeof l == "string" ? u = parseFloat(l || "0") : u = l, r(u);
|
|
366
366
|
}
|
|
367
367
|
), x(
|
|
368
|
-
() =>
|
|
368
|
+
() => n.inputOptions,
|
|
369
369
|
() => {
|
|
370
|
-
|
|
370
|
+
p(c.value);
|
|
371
371
|
}
|
|
372
372
|
);
|
|
373
|
-
const
|
|
374
|
-
const { inputOptions:
|
|
375
|
-
return { ...
|
|
373
|
+
const d = I(() => {
|
|
374
|
+
const { inputOptions: l, ...u } = n;
|
|
375
|
+
return { ...u, ...a };
|
|
376
376
|
});
|
|
377
|
-
return (
|
|
377
|
+
return (l, u) => (T(), G(j, w(d.value, {
|
|
378
378
|
ref_key: "inputEl",
|
|
379
379
|
ref: h,
|
|
380
380
|
class: "stash-currency-input",
|