@leaflink/stash 48.16.1 → 48.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +128 -105
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ConfirmationCodeInput.vue.d.ts +36 -11
- 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,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
|
|
|
@@ -27,23 +26,41 @@ declare type __VLS_WithDefaults<P, D> = {
|
|
|
27
26
|
}> : P[K];
|
|
28
27
|
};
|
|
29
28
|
|
|
30
|
-
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VerificationCodeInputProps>, {
|
|
29
|
+
declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VerificationCodeInputProps>, {
|
|
31
30
|
digitCount: number;
|
|
32
31
|
errorText: undefined;
|
|
33
32
|
successText: undefined;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
33
|
+
hintText: undefined;
|
|
34
|
+
modelValue: undefined;
|
|
35
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
36
|
+
"update:model-value": (value: string | null) => void;
|
|
37
|
+
change: (params: {
|
|
38
|
+
originalEvent: Event;
|
|
39
|
+
value: string | null;
|
|
40
|
+
}) => void;
|
|
41
|
+
focus: (params: Event) => void;
|
|
42
|
+
blur: (params: Event) => void;
|
|
43
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VerificationCodeInputProps>, {
|
|
37
44
|
digitCount: number;
|
|
38
45
|
errorText: undefined;
|
|
39
46
|
successText: undefined;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
47
|
+
hintText: undefined;
|
|
48
|
+
modelValue: undefined;
|
|
49
|
+
}>>> & Readonly<{
|
|
50
|
+
onBlur?: ((params: Event) => any) | undefined;
|
|
51
|
+
onChange?: ((params: {
|
|
52
|
+
originalEvent: Event;
|
|
53
|
+
value: string | null;
|
|
54
|
+
}) => any) | undefined;
|
|
55
|
+
onFocus?: ((params: Event) => any) | undefined;
|
|
56
|
+
"onUpdate:model-value"?: ((value: string | null) => any) | undefined;
|
|
57
|
+
}>, {
|
|
43
58
|
errorText: string;
|
|
59
|
+
hintText: string;
|
|
60
|
+
modelValue: string;
|
|
44
61
|
digitCount: number;
|
|
45
62
|
successText: string;
|
|
46
|
-
}, {}>;
|
|
63
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
47
64
|
export default _default;
|
|
48
65
|
|
|
49
66
|
export declare interface VerificationCodeInputProps {
|
|
@@ -56,6 +73,14 @@ export declare interface VerificationCodeInputProps {
|
|
|
56
73
|
* Success text to display.
|
|
57
74
|
*/
|
|
58
75
|
successText?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Hint text to display.
|
|
78
|
+
*/
|
|
79
|
+
hintText?: string;
|
|
80
|
+
/**
|
|
81
|
+
* One time password/code
|
|
82
|
+
*/
|
|
83
|
+
modelValue?: string;
|
|
59
84
|
}
|
|
60
85
|
|
|
61
86
|
export { }
|
package/dist/ContextSwitcher.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as _, computed as C, resolveComponent as g, openBlock as s, createElementBlock as i, Fragment as u, renderList as x, normalizeClass as d, toDisplayString as f, createBlock as E, withCtx as S, createTextVNode as b } from "vue";
|
|
2
2
|
import { APPS as a } from "./constants.js";
|
|
3
|
-
import { setPersistentItem as
|
|
3
|
+
import { setPersistentItem as T, getPersistentItem as v, removePersistentItem as R } from "./utils/storage.js";
|
|
4
4
|
import "@leaflink/snitch";
|
|
5
5
|
import "./utils/helpers.js";
|
|
6
6
|
import "lodash-es/camelCase";
|
|
7
7
|
import "lodash-es/get";
|
|
8
8
|
import "lodash-es/isFinite";
|
|
9
9
|
import "lodash-es/isPlainObject";
|
|
10
|
-
const
|
|
10
|
+
const N = {
|
|
11
11
|
class: "stash-context-switcher tw-mx-auto tw-flex tw-w-64 tw-rounded-full tw-border tw-border-white/10 tw-bg-purple-700 tw-p-1.5 tw-text-center",
|
|
12
12
|
"data-test": "stash-context-switcher"
|
|
13
|
-
},
|
|
13
|
+
}, B = ["href", "onClick"], h = "-last-session", Q = /* @__PURE__ */ _({
|
|
14
14
|
name: "ll-context-switcher",
|
|
15
15
|
__name: "ContextSwitcher",
|
|
16
16
|
props: {
|
|
@@ -23,8 +23,8 @@ const R = {
|
|
|
23
23
|
routeQuery: { default: () => ({}) }
|
|
24
24
|
},
|
|
25
25
|
emits: ["click", "switch"],
|
|
26
|
-
setup(A, { emit:
|
|
27
|
-
const e = A, y =
|
|
26
|
+
setup(A, { emit: y }) {
|
|
27
|
+
const e = A, p = y, P = C(() => [
|
|
28
28
|
{
|
|
29
29
|
app: a.MARKETPLACE,
|
|
30
30
|
name: e.portalAccess.commercePortal ? "dashboard" : e.limitedAccessUrl,
|
|
@@ -42,33 +42,33 @@ const R = {
|
|
|
42
42
|
const r = window.location.href;
|
|
43
43
|
let t = o.target.href;
|
|
44
44
|
if (e.portalAccess.paymentsPortal && e.portalAccess.commercePortal) {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
45
|
+
const k = `${n === a.PAYMENTS ? a.MARKETPLACE : a.PAYMENTS}${h}`, w = `${n}${h}`;
|
|
46
|
+
T(k, r, { global: !0 });
|
|
47
|
+
const l = v(w, { global: !0 });
|
|
48
|
+
l && (o.preventDefault(), t = l, window.location.href = l, R(w, { global: !0 }));
|
|
49
49
|
}
|
|
50
50
|
p("click", { from: r, to: t }), p("switch", o, { from: r, to: t });
|
|
51
51
|
}
|
|
52
52
|
return (o, n) => {
|
|
53
|
-
const r =
|
|
54
|
-
return s(),
|
|
55
|
-
(s(!0),
|
|
53
|
+
const r = g("router-link");
|
|
54
|
+
return s(), i("div", N, [
|
|
55
|
+
(s(!0), i(u, null, x(P.value, (t) => (s(), i(u, {
|
|
56
56
|
key: t.app
|
|
57
57
|
}, [
|
|
58
|
-
t.hasBaseRoute ? (s(),
|
|
58
|
+
t.hasBaseRoute ? (s(), i("a", {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: d(["tw-w-1/2 tw-cursor-pointer tw-rounded-full tw-py-2.5 tw-font-semibold !tw-capitalize tw-leading-none !tw-no-underline", e.activeApp === t.app ? "tw-text-white tw-bg-royal-500" : "tw-text-ice-500"]),
|
|
61
61
|
href: `/${t.name}`,
|
|
62
62
|
onClick: (c) => m(c, t.app)
|
|
63
|
-
}, f(t.app), 11,
|
|
63
|
+
}, f(t.app), 11, B)) : (s(), E(r, {
|
|
64
64
|
key: 1,
|
|
65
65
|
class: d(["tw-w-1/2 tw-cursor-pointer tw-rounded-full tw-py-2.5 tw-font-semibold !tw-capitalize tw-leading-none !tw-no-underline", e.activeApp === t.app ? "tw-text-white tw-bg-royal-500" : "tw-text-ice-500"]),
|
|
66
66
|
to: { name: t.name, query: o.routeQuery },
|
|
67
67
|
"data-test-route": JSON.stringify({ name: t.name, query: o.routeQuery }),
|
|
68
68
|
onClick: (c) => m(c, t.app)
|
|
69
69
|
}, {
|
|
70
|
-
default:
|
|
71
|
-
|
|
70
|
+
default: S(() => [
|
|
71
|
+
b(f(t.app), 1)
|
|
72
72
|
]),
|
|
73
73
|
_: 2
|
|
74
74
|
}, 1032, ["class", "to", "data-test-route", "onClick"]))
|
|
@@ -78,6 +78,6 @@ const R = {
|
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
export {
|
|
81
|
-
|
|
81
|
+
Q as default
|
|
82
82
|
};
|
|
83
83
|
//# sourceMappingURL=ContextSwitcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextSwitcher.js","sources":["../src/components/ContextSwitcher/ContextSwitcher.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n import type { LocationQuery } from 'vue-router';\n\n import { APPS } from '../../constants';\n import { getPersistentItem, removePersistentItem, setPersistentItem } from '../../utils/storage';\n\n defineOptions({\n name: 'll-context-switcher',\n });\n\n type AppValues = typeof APPS[keyof typeof APPS];\n\n export interface ContextSwitcherProps {\n /**\n * The current app that is active. Choices are 'marketplace' | 'payments'.\n */\n activeApp: AppValues;\n\n /**\n * Portal access to both marketplace and payments.\n */\n portalAccess?: {\n commercePortal: boolean;\n paymentsPortal: boolean;\n };\n\n /**\n * Url to replace the other app if current user does not have portal access.\n */\n limitedAccessUrl: string;\n\n routeQuery?: LocationQuery;\n }\n\n const props = withDefaults(defineProps<ContextSwitcherProps>(), {\n portalAccess: () => ({\n commercePortal: false,\n paymentsPortal: false,\n }),\n routeQuery: () => ({}),\n });\n\n const emit
|
|
1
|
+
{"version":3,"file":"ContextSwitcher.js","sources":["../src/components/ContextSwitcher/ContextSwitcher.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n import type { LocationQuery } from 'vue-router';\n\n import { APPS } from '../../constants';\n import { getPersistentItem, removePersistentItem, setPersistentItem } from '../../utils/storage';\n\n defineOptions({\n name: 'll-context-switcher',\n });\n\n type AppValues = (typeof APPS)[keyof typeof APPS];\n\n export interface ContextSwitcherProps {\n /**\n * The current app that is active. Choices are 'marketplace' | 'payments'.\n */\n activeApp: AppValues;\n\n /**\n * Portal access to both marketplace and payments.\n */\n portalAccess?: {\n commercePortal: boolean;\n paymentsPortal: boolean;\n };\n\n /**\n * Url to replace the other app if current user does not have portal access.\n */\n limitedAccessUrl: string;\n\n routeQuery?: LocationQuery;\n }\n\n const props = withDefaults(defineProps<ContextSwitcherProps>(), {\n portalAccess: () => ({\n commercePortal: false,\n paymentsPortal: false,\n }),\n routeQuery: () => ({}),\n });\n\n const emit = defineEmits<{\n /**\n * Fires on click of the context switcher.\n * @deprecated Use `switch` instead.\n */\n (e: 'click', urlInfo: { from: string; to: string }): void;\n /**\n * Fires on click of the context switcher.\n */\n (e: 'switch', evt: MouseEvent, urlInfo: { from: string; to: string }): void;\n }>();\n\n interface ContextItem {\n app: AppValues;\n name: string;\n hasBaseRoute: boolean;\n }\n\n const CONTEXT_SWITCHER_STORAGE_KEY = '-last-session';\n\n const routes = computed<ContextItem[]>(() => {\n return [\n {\n app: APPS.MARKETPLACE,\n name: props.portalAccess.commercePortal ? 'dashboard' : props.limitedAccessUrl,\n hasBaseRoute: props.portalAccess.commercePortal,\n },\n {\n app: APPS.PAYMENTS,\n name: props.portalAccess.paymentsPortal ? 'payments' : props.limitedAccessUrl,\n hasBaseRoute: false,\n },\n ];\n });\n\n /**\n * Saves the current url in local storage before leaving the current app, if user has access to both apps\n * If a previous session url exists, redirect users there instead then remove the local storage item afterward.\n *\n * @param event - Event from user click.\n * @param app - App name of the clicked link, is a key of `APPS`.\n */\n function handleClick(event: MouseEvent, app: AppValues) {\n if (app === props.activeApp) {\n return;\n }\n\n const currentLocation = window.location.href;\n let destination = (event.target as HTMLAnchorElement).href;\n\n if (props.portalAccess.paymentsPortal && props.portalAccess.commercePortal) {\n const appRoute = app === APPS.PAYMENTS ? APPS.MARKETPLACE : APPS.PAYMENTS;\n const currentSessionName = `${appRoute}${CONTEXT_SWITCHER_STORAGE_KEY}`;\n const prevSessionName = `${app}${CONTEXT_SWITCHER_STORAGE_KEY}`;\n\n // save the current url in local storage\n setPersistentItem(currentSessionName, currentLocation, { global: true });\n\n // get the other app's url from local storage\n const prevSessionUrl = getPersistentItem(prevSessionName, { global: true });\n\n // if it exists, redirect users to such location and remove the item from local storage\n if (prevSessionUrl) {\n event.preventDefault();\n destination = prevSessionUrl;\n window.location.href = prevSessionUrl;\n removePersistentItem(prevSessionName, { global: true });\n }\n }\n\n emit('click', { from: currentLocation, to: destination });\n emit('switch', event, { from: currentLocation, to: destination });\n }\n</script>\n\n<template>\n <div\n class=\"stash-context-switcher tw-mx-auto tw-flex tw-w-64 tw-rounded-full tw-border tw-border-white/10 tw-bg-purple-700 tw-p-1.5 tw-text-center\"\n data-test=\"stash-context-switcher\"\n >\n <template v-for=\"route in routes\" :key=\"route.app\">\n <!-- render anchor tag to override base route in Payments -->\n <a\n v-if=\"route.hasBaseRoute\"\n class=\"tw-w-1/2 tw-cursor-pointer tw-rounded-full tw-py-2.5 tw-font-semibold !tw-capitalize tw-leading-none !tw-no-underline\"\n :class=\"props.activeApp === route.app ? 'tw-text-white tw-bg-royal-500' : 'tw-text-ice-500'\"\n :href=\"`/${route.name}`\"\n @click=\"(evt) => handleClick(evt, route.app)\"\n >\n {{ route.app }}\n </a>\n\n <router-link\n v-else\n class=\"tw-w-1/2 tw-cursor-pointer tw-rounded-full tw-py-2.5 tw-font-semibold !tw-capitalize tw-leading-none !tw-no-underline\"\n :class=\"props.activeApp === route.app ? 'tw-text-white tw-bg-royal-500' : 'tw-text-ice-500'\"\n :to=\"{ name: route.name, query: routeQuery }\"\n :data-test-route=\"JSON.stringify({ name: route.name, query: routeQuery })\"\n @click=\"(evt) => handleClick(evt, route.app)\"\n >\n {{ route.app }}\n </router-link>\n </template>\n </div>\n</template>\n"],"names":["CONTEXT_SWITCHER_STORAGE_KEY","props","__props","emit","__emit","routes","computed","APPS","handleClick","event","app","currentLocation","destination","currentSessionName","prevSessionName","setPersistentItem","prevSessionUrl","getPersistentItem","removePersistentItem"],"mappings":";;;;;;;;;;;;4BA6DQA,IAA+B;;;;;;;;;;;;;;AA1BrC,UAAMC,IAAQC,GAQRC,IAAOC,GAoBPC,IAASC,EAAwB,MAC9B;AAAA,MACL;AAAA,QACE,KAAKC,EAAK;AAAA,QACV,MAAMN,EAAM,aAAa,iBAAiB,cAAcA,EAAM;AAAA,QAC9D,cAAcA,EAAM,aAAa;AAAA,MACnC;AAAA,MACA;AAAA,QACE,KAAKM,EAAK;AAAA,QACV,MAAMN,EAAM,aAAa,iBAAiB,aAAaA,EAAM;AAAA,QAC7D,cAAc;AAAA,MAChB;AAAA,IAAA,CAEH;AASQ,aAAAO,EAAYC,GAAmBC,GAAgB;AAClD,UAAAA,MAAQT,EAAM;AAChB;AAGI,YAAAU,IAAkB,OAAO,SAAS;AACpC,UAAAC,IAAeH,EAAM,OAA6B;AAEtD,UAAIR,EAAM,aAAa,kBAAkBA,EAAM,aAAa,gBAAgB;AAEpE,cAAAY,IAAqB,GADVH,MAAQH,EAAK,WAAWA,EAAK,cAAcA,EAAK,WACxBP,KACnCc,IAAkB,GAAGJ,IAAMV;AAGjC,QAAAe,EAAkBF,GAAoBF,GAAiB,EAAE,QAAQ,GAAM,CAAA;AAGvE,cAAMK,IAAiBC,EAAkBH,GAAiB,EAAE,QAAQ,IAAM;AAG1E,QAAIE,MACFP,EAAM,eAAe,GACPG,IAAAI,GACd,OAAO,SAAS,OAAOA,GACvBE,EAAqBJ,GAAiB,EAAE,QAAQ,GAAM,CAAA;AAAA;AAI1D,MAAAX,EAAK,SAAS,EAAE,MAAMQ,GAAiB,IAAIC,GAAa,GACxDT,EAAK,UAAUM,GAAO,EAAE,MAAME,GAAiB,IAAIC,GAAa;AAAA,IAClE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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;
|