@privyid/persona 0.10.0 → 0.12.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/components/avatar/Avatar.vue +1 -0
- package/dist/components/avatar/Avatar.vue.d.ts +13 -13
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/badge/Badge.vue +48 -8
- package/dist/components/badge/Badge.vue.d.ts +3 -2
- package/dist/components/badge/index.d.ts +1 -2
- package/dist/components/banner/Banner.vue +19 -7
- package/dist/components/banner/Banner.vue.d.ts +1 -1
- package/dist/components/banner/index.d.ts +1 -1
- package/dist/components/breadcrumbs/BreadcrumbItem.vue +1 -0
- package/dist/components/breadcrumbs/BreadcrumbItem.vue.d.ts +1 -1
- package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue +3 -0
- package/dist/components/breadcrumbs/index.d.ts +1 -1
- package/dist/components/button/Button.vue +69 -11
- package/dist/components/button/Button.vue.d.ts +4 -4
- package/dist/components/button/index.d.ts +4 -4
- package/dist/components/button-group/ButtonGroup.vue +11 -18
- package/dist/components/button-group/index.d.ts +6 -0
- package/dist/components/button-group/index.mjs +1 -0
- package/dist/components/calendar/Calendar.vue +8 -3
- package/dist/components/calendar/Calendar.vue.d.ts +31 -31
- package/dist/components/calendar/adapter/adapter.d.ts +1 -1
- package/dist/components/calendar/adapter/date.mjs +1 -1
- package/dist/components/camera/Camera.vue +7 -3
- package/dist/components/camera/Camera.vue.d.ts +19 -19
- package/dist/components/camera/adapter/adapter.d.ts +2 -2
- package/dist/components/camera/adapter/liveness.mjs +1 -1
- package/dist/components/caption/Caption.vue +1 -0
- package/dist/components/caption/index.d.ts +1 -1
- package/dist/components/card/Card.vue +9 -3
- package/dist/components/card/Card.vue.d.ts +5 -5
- package/dist/components/card/CardSection.vue.d.ts +2 -2
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/chart/Chart.vue +1 -0
- package/dist/components/chart/ChartVal.vue.d.ts +2 -2
- package/dist/components/chart/adapter/index.d.ts +1 -1
- package/dist/components/chart/index.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.vue +15 -6
- package/dist/components/checkbox/Checkbox.vue.d.ts +13 -13
- package/dist/components/collapse/Collapse.vue +2 -1
- package/dist/components/collapse/Collapse.vue.d.ts +1 -1
- package/dist/components/contextual-bar/ContextualBar.vue +15 -3
- package/dist/components/contextual-bar/ContextualBar.vue.d.ts +11 -11
- package/dist/components/contextual-bar/index.d.ts +1 -1
- package/dist/components/cropper/Cropper.vue +3 -2
- package/dist/components/cropper/Cropper.vue.d.ts +20 -20
- package/dist/components/cropper/utils/use-pinch.mjs +10 -2
- package/dist/components/datepicker/Datepicker.vue +2 -1
- package/dist/components/datepicker/Datepicker.vue.d.ts +16 -16
- package/dist/components/dialog/Dialog.vue.d.ts +2 -2
- package/dist/components/dialog/DialogFooter.vue +2 -2
- package/dist/components/dialog/DialogFooter.vue.d.ts +7 -7
- package/dist/components/dialog/index.d.ts +11 -16
- package/dist/components/divider/Divider.vue +8 -2
- package/dist/components/dot/Dot.vue +12 -2
- package/dist/components/dot/Dot.vue.d.ts +3 -2
- package/dist/components/dot/index.d.ts +1 -2
- package/dist/components/dropdown/Dropdown.vue +2 -0
- package/dist/components/dropdown/Dropdown.vue.d.ts +8 -8
- package/dist/components/dropdown/DropdownItem.vue +5 -1
- package/dist/components/dropdown/DropdownItem.vue.d.ts +3 -3
- package/dist/components/dropdown-subitem/DropdownSubitem.vue.d.ts +3 -3
- package/dist/components/dropzone/Dropzone.vue.d.ts +12 -12
- package/dist/components/dropzone/index.d.ts +1 -1
- package/dist/components/filterbar/Filterbar.vue +7 -6
- package/dist/components/filterbar/Filterbar.vue.d.ts +3 -3
- package/dist/components/filterbar/index.d.ts +1 -1
- package/dist/components/filterbar/pinned/{Date.vue.d.ts → PinnedDate.vue.d.ts} +8 -8
- package/dist/components/filterbar/pinned/{Multiselect.vue.d.ts → PinnedMultiselect.vue.d.ts} +5 -5
- package/dist/components/filterbar/pinned/{Select.vue.d.ts → PinnedSelect.vue.d.ts} +10 -10
- package/dist/components/filterbar/pinned/{Toggle.vue.d.ts → PinnedToggle.vue.d.ts} +11 -11
- package/dist/components/form-group/FormGroup.vue +9 -4
- package/dist/components/form-group/FormGroup.vue.d.ts +2 -2
- package/dist/components/global/context.d.ts +1 -1
- package/dist/components/global/use-singleton.d.ts +2 -2
- package/dist/components/global/utils/queue.d.ts +2 -2
- package/dist/components/heading/Heading.vue +6 -0
- package/dist/components/heading/index.d.ts +3 -3
- package/dist/components/input/Input.vue +68 -19
- package/dist/components/input/Input.vue.d.ts +3 -3
- package/dist/components/input-file/InputFile.vue +13 -2
- package/dist/components/input-file/InputFile.vue.d.ts +12 -12
- package/dist/components/input-group/InputGroup.vue +55 -41
- package/dist/components/input-group/InputGroupAddon.vue +10 -11
- package/dist/components/input-group/index.d.ts +6 -0
- package/dist/components/input-group/index.mjs +1 -0
- package/dist/components/input-password/InputPassword.vue +3 -1
- package/dist/components/input-pin/InputPin.vue +3 -3
- package/dist/components/input-pin/InputPin.vue.d.ts +4 -4
- package/dist/components/input-range/InputRange.vue +8 -5
- package/dist/components/input-range/InputRange.vue.d.ts +11 -11
- package/dist/components/input-range/utils/use-drag.mjs +5 -1
- package/dist/components/label/Label.vue +34 -7
- package/dist/components/label/Label.vue.d.ts +4 -5
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/label/index.mjs +0 -0
- package/dist/components/main/Main.vue +18 -3
- package/dist/components/modal/Modal.vue +19 -6
- package/dist/components/modal/Modal.vue.d.ts +9 -9
- package/dist/components/nav/Nav.vue +24 -8
- package/dist/components/nav/Nav.vue.d.ts +2 -2
- package/dist/components/nav/NavForm.vue +1 -1
- package/dist/components/nav/NavItem.vue +2 -0
- package/dist/components/nav/NavItem.vue.d.ts +6 -6
- package/dist/components/nav/NavItemDropdown.vue +20 -2
- package/dist/components/nav/NavItemDropdown.vue.d.ts +26 -3
- package/dist/components/nav/NavSubItem.vue +4 -0
- package/dist/components/nav/NavSubItem.vue.d.ts +2 -2
- package/dist/components/nav/index.d.ts +2 -2
- package/dist/components/navbar/Navbar.vue +5 -2
- package/dist/components/navbar/Navbar.vue.d.ts +5 -5
- package/dist/components/navbar/NavbarBrand.vue +2 -1
- package/dist/components/navbar/NavbarBrand.vue.d.ts +2 -2
- package/dist/components/navbar/NavbarNav.vue +10 -5
- package/dist/components/navbar/NavbarNav.vue.d.ts +2 -2
- package/dist/components/navbar/NavbarToggle.vue +2 -1
- package/dist/components/navbar/index.d.ts +1 -1
- package/dist/components/overlay/Overlay.vue +2 -1
- package/dist/components/page/Page.vue +13 -9
- package/dist/components/page/Page.vue.d.ts +3 -3
- package/dist/components/pagination/Pagination.vue +16 -9
- package/dist/components/pagination/Pagination.vue.d.ts +5 -5
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pagination/index.mjs +1 -1
- package/dist/components/pagination/utils/calculate-page.d.ts +1 -1
- package/dist/components/pdf-helipad/PdfHelipad.vue +0 -2
- package/dist/components/pdf-helipad/PdfHelipad.vue.d.ts +1 -1
- package/dist/components/pdf-object/PdfObject.vue +3 -1
- package/dist/components/pdf-object/PdfObject.vue.d.ts +20 -20
- package/dist/components/pdf-object/PdfObjectAddon.vue +1 -0
- package/dist/components/pdf-object/PdfObjectDebugger.vue +4 -1
- package/dist/components/pdf-object/PdfObjectDebugger.vue.d.ts +5 -5
- package/dist/components/pdf-object/index.d.ts +5 -5
- package/dist/components/pdf-object/utils/overlap.d.ts +1 -1
- package/dist/components/pdf-object/utils/position.d.ts +2 -2
- package/dist/components/pdf-text/PdfText.vue.d.ts +5 -5
- package/dist/components/pdf-viewer/PdfError.vue +20 -3
- package/dist/components/pdf-viewer/PdfLoading.vue +1 -1
- package/dist/components/pdf-viewer/PdfNavigation.vue +9 -5
- package/dist/components/pdf-viewer/PdfViewer.vue +7 -1
- package/dist/components/pdf-viewer/PdfViewer.vue.d.ts +12 -12
- package/dist/components/pdf-viewer/index.d.ts +1 -1
- package/dist/components/pdf-viewer/utils/use-viewer.d.ts +7 -7
- package/dist/components/progress/Progress.vue +15 -7
- package/dist/components/progress/Progress.vue.d.ts +2 -2
- package/dist/components/radio/Radio.vue +17 -6
- package/dist/components/radio/Radio.vue.d.ts +9 -9
- package/dist/components/radio/index.d.ts +1 -1
- package/dist/components/select/Select.vue +10 -1
- package/dist/components/select/Select.vue.d.ts +11 -11
- package/dist/components/select/adapter/async-adapter.d.ts +2 -2
- package/dist/components/sidebar/Sidebar.vue +10 -4
- package/dist/components/sidebar/Sidebar.vue.d.ts +3 -3
- package/dist/components/sidebar/SidebarBrand.vue +2 -1
- package/dist/components/sidebar/SidebarBrand.vue.d.ts +2 -2
- package/dist/components/sidebar/SidebarNav.vue +5 -17
- package/dist/components/sidebar/SidebarNav.vue.d.ts +4 -4
- package/dist/components/sidebar/index.d.ts +1 -1
- package/dist/components/sidebar-menu/SidebarMenu.vue +1 -1
- package/dist/components/sidebar-menu/SidebarMenu.vue.d.ts +4 -4
- package/dist/components/signature-draw/SignatureDraw.vue.d.ts +3 -3
- package/dist/components/signature-draw/SignatureDrawDesktop.vue +4 -1
- package/dist/components/signature-draw/SignatureDrawDesktop.vue.d.ts +3 -3
- package/dist/components/signature-draw/SignatureDrawMobile.vue +5 -0
- package/dist/components/signature-draw/SignatureDrawMobile.vue.d.ts +3 -3
- package/dist/components/signature-draw/utils/canvas.d.ts +1 -1
- package/dist/components/signature-draw/utils/smooth-line.mjs +15 -0
- package/dist/components/signature-draw/utils/use-draw.mjs +5 -1
- package/dist/components/signature-text/SignatureText.vue +9 -4
- package/dist/components/signature-text/SignatureText.vue.d.ts +16 -7
- package/dist/components/steps/Step.vue.d.ts +5 -5
- package/dist/components/steps/Steps.vue.d.ts +1 -1
- package/dist/components/steps/index.d.ts +9 -9
- package/dist/components/steps/utils/hook.d.ts +1 -1
- package/dist/components/strengthbar/Strengthbar.vue +4 -0
- package/dist/components/subheading/Subheading.vue +1 -1
- package/dist/components/subheading/Subheading.vue.d.ts +2 -2
- package/dist/components/subheading/index.d.ts +1 -1
- package/dist/components/table/Table.vue +69 -1
- package/dist/components/table/Table.vue.d.ts +18 -9
- package/dist/components/tabs/Tabs.vue +4 -1
- package/dist/components/tabs/Tabs.vue.d.ts +2 -2
- package/dist/components/text/Text.vue.d.ts +2 -2
- package/dist/components/text/index.d.ts +1 -1
- package/dist/components/textarea/Textarea.vue +8 -7
- package/dist/components/textarea/Textarea.vue.d.ts +5 -5
- package/dist/components/toast/Toast.vue +17 -3
- package/dist/components/toast/Toast.vue.d.ts +1 -1
- package/dist/components/toast/ToastContainer.vue.d.ts +4 -4
- package/dist/components/toast/index.d.ts +2 -2
- package/dist/components/toggle/Toggle.vue +17 -7
- package/dist/components/toggle/Toggle.vue.d.ts +12 -12
- package/dist/components/tooltip/Tooltip.vue +6 -2
- package/dist/components/tooltip/Tooltip.vue.d.ts +7 -7
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.mjs +1 -1
- package/dist/components/tooltip/utils/create-handler.d.ts +1 -1
- package/dist/components/tour/Tour.vue.d.ts +3 -3
- package/dist/components/tour/TourDialog.vue +11 -3
- package/dist/components/tour/TourDialog.vue.d.ts +8 -8
- package/dist/components/tour/TourHighlight.vue.d.ts +2 -2
- package/dist/components/tour/core/base.d.ts +1 -1
- package/dist/components/tour/core/base.mjs +15 -0
- package/dist/components/tour/core/step/action.d.ts +4 -4
- package/dist/components/tour/core/step.d.ts +3 -3
- package/dist/components/tour/core/step.mjs +19 -0
- package/dist/components/tour/core/story.d.ts +1 -1
- package/dist/components/tour/core/story.mjs +81 -0
- package/dist/components/tour/core/tour.d.ts +1 -1
- package/dist/components/tour/core/tour.mjs +56 -2
- package/dist/components/truncate/Truncate.vue +8 -0
- package/dist/components/utils/base64.mjs +1 -1
- package/dist/components/utils/value.d.ts +4 -4
- package/dist/components/wizard/Wizard.vue.d.ts +6 -6
- package/dist/components/wizard/WizardBody.vue.d.ts +1 -1
- package/dist/components/wizard/WizardStep.vue.d.ts +4 -4
- package/dist/module.json +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +16 -14
- package/dist/components/badge/assets/images/img-guide-badge.svg +0 -1
- package/dist/components/card/assets/images/img-card-callout-01.svg +0 -1
- package/dist/components/contextual-bar/assets/images/img-background-contextualbar.svg +0 -14
- package/dist/components/contextual-bar/assets/images/img-bg-contextualbar.svg +0 -19
- package/dist/components/cropper/assets/sample-1.jpg +0 -0
- package/dist/components/modal/assets/images/img-modal-banner-sheet.jpg +0 -0
- package/dist/components/pdf-helipad/assets/helicopter.svg +0 -1
- package/dist/components/pdf-object-text/PdfObjectText.vue +0 -170
- package/dist/components/pdf-object-text/PdfObjectText.vue.d.ts +0 -140
- package/dist/components/pdf-object-text/utils/text-to-image.d.ts +0 -51
- package/dist/components/pdf-object-text/utils/text-to-image.mjs +0 -77
- package/dist/components/pdf-viewer/assets/Calibrator-v3.pdf +8 -99519
- package/dist/components/pdf-viewer/assets/Calibrator-v3_protected.pdf +0 -0
- package/dist/components/pdf-viewer/assets/fixed-vs-fit.svg +0 -186
- package/dist/components/pdf-viewer/assets/sample-3.pdf +0 -0
- package/dist/components/pdf-viewer/assets/sample-with-sign.pdf +0 -0
- package/dist/components/pdf-viewer/assets/sample.pdf +0 -18304
- package/dist/components/sidebar/assets/images/icon-flag.svg +0 -1
- package/dist/components/sidebar/assets/images/logo-privy-icon.svg +0 -1
- package/dist/components/sidebar/assets/images/logo-privy.svg +0 -1
- package/dist/components/sidebar-menu/assets/images/img-flag.svg +0 -1
- package/dist/components/signature-draw/assets/empty-img.png +0 -0
- package/dist/components/signature-text/sample/sample-signature.png +0 -0
- /package/dist/components/filterbar/pinned/{Date.vue → PinnedDate.vue} +0 -0
- /package/dist/components/filterbar/pinned/{Multiselect.vue → PinnedMultiselect.vue} +0 -0
- /package/dist/components/filterbar/pinned/{Select.vue → PinnedSelect.vue} +0 -0
- /package/dist/components/filterbar/pinned/{Toggle.vue → PinnedToggle.vue} +0 -0
|
@@ -12,7 +12,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
12
12
|
};
|
|
13
13
|
target: {
|
|
14
14
|
type: PropType<HTMLElement>;
|
|
15
|
-
default:
|
|
15
|
+
default: undefined;
|
|
16
16
|
};
|
|
17
17
|
placement: {
|
|
18
18
|
type: PropType<Placement>;
|
|
@@ -21,7 +21,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
21
21
|
}, {
|
|
22
22
|
isShow: import("vue-demi").Ref<boolean>;
|
|
23
23
|
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
24
|
-
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("
|
|
24
|
+
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("show" | "update:modelValue" | "hide")[], "show" | "update:modelValue" | "hide", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
25
25
|
modelValue: {
|
|
26
26
|
type: BooleanConstructor;
|
|
27
27
|
default: boolean;
|
|
@@ -32,20 +32,20 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
32
32
|
};
|
|
33
33
|
target: {
|
|
34
34
|
type: PropType<HTMLElement>;
|
|
35
|
-
default:
|
|
35
|
+
default: undefined;
|
|
36
36
|
};
|
|
37
37
|
placement: {
|
|
38
38
|
type: PropType<Placement>;
|
|
39
39
|
default: string;
|
|
40
40
|
};
|
|
41
41
|
}>> & {
|
|
42
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
43
|
-
onShow?: (...args: any[]) => any;
|
|
44
|
-
onHide?: (...args: any[]) => any;
|
|
42
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
43
|
+
onShow?: ((...args: any[]) => any) | undefined;
|
|
44
|
+
onHide?: ((...args: any[]) => any) | undefined;
|
|
45
45
|
}, {
|
|
46
|
-
target: HTMLElement;
|
|
47
46
|
color: ColorVariant;
|
|
48
47
|
modelValue: boolean;
|
|
48
|
+
target: HTMLElement;
|
|
49
49
|
placement: Placement;
|
|
50
50
|
}>;
|
|
51
51
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Placement } from '@floating-ui/dom';
|
|
2
2
|
import { Directive } from 'vue-demi';
|
|
3
|
-
export
|
|
3
|
+
export type ColorVariant = 'black' | 'white';
|
|
4
4
|
export interface TooltipOptions {
|
|
5
5
|
text: string;
|
|
6
6
|
color: ColorVariant;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
parseAction,
|
|
6
6
|
parseText,
|
|
7
7
|
parseColor
|
|
8
|
-
} from "./utils/parse-bindings";
|
|
8
|
+
} from "./utils/parse-bindings.mjs";
|
|
9
9
|
const handleClick = createHandler("click", "toggle", true);
|
|
10
10
|
const handleMouseEnter = createHandler("hover", "show");
|
|
11
11
|
const handleMouseLeave = createHandler("hover", "hide");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import TourDialog from './TourDialog.vue';
|
|
2
|
-
|
|
2
|
+
type TourDialogProps = Partial<InstanceType<typeof TourDialog>['$props']>;
|
|
3
3
|
declare const _default: import("vue-demi").DefineComponent<{}, {
|
|
4
4
|
isShow: import("vue-demi").Ref<boolean>;
|
|
5
5
|
dialog: import("vue-demi").ShallowRef<any>;
|
|
6
|
-
target: import("vue-demi").ShallowRef<HTMLElement>;
|
|
6
|
+
target: import("vue-demi").ShallowRef<HTMLElement | undefined>;
|
|
7
7
|
show: (targetEl: HTMLElement, options: TourDialogProps) => void;
|
|
8
8
|
hide: () => void;
|
|
9
|
-
config: import("vue-demi").ShallowRef<Partial<any
|
|
9
|
+
config: import("vue-demi").ShallowRef<Partial<any> | undefined>;
|
|
10
10
|
}, {}, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{}>>, {}>;
|
|
11
11
|
export default _default;
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
data-testid="tour-control-finish"
|
|
66
66
|
size="xs"
|
|
67
67
|
variant="solid"
|
|
68
|
-
color="
|
|
68
|
+
color="info"
|
|
69
69
|
@click="$emit('next', $event)">
|
|
70
70
|
{{ finishLabel }}
|
|
71
71
|
</p-button>
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
data-testid="tour-control-next"
|
|
75
75
|
size="xs"
|
|
76
76
|
variant="solid"
|
|
77
|
-
color="
|
|
77
|
+
color="info"
|
|
78
78
|
@click="$emit('next', $event)">
|
|
79
79
|
{{ nextLabel }}
|
|
80
80
|
</p-button>
|
|
@@ -158,11 +158,13 @@ export default defineComponent({
|
|
|
158
158
|
<style lang="postcss">
|
|
159
159
|
.tour {
|
|
160
160
|
&__dialog {
|
|
161
|
-
@apply rounded bg-
|
|
161
|
+
@apply rounded bg-inverse w-full max-w-xs z-[100] overflow-hidden relative shadow-sm;
|
|
162
|
+
@apply dark:bg-dark-inverse;
|
|
162
163
|
}
|
|
163
164
|
|
|
164
165
|
&__image {
|
|
165
166
|
@apply max-w-full h-auto object-cover bg-default;
|
|
167
|
+
@apply dark:bg-dark-default;
|
|
166
168
|
}
|
|
167
169
|
|
|
168
170
|
&__body {
|
|
@@ -170,6 +172,7 @@ export default defineComponent({
|
|
|
170
172
|
|
|
171
173
|
> * {
|
|
172
174
|
@apply text-on-emphasis;
|
|
175
|
+
@apply dark:text-dark-on-emphasis;
|
|
173
176
|
}
|
|
174
177
|
}
|
|
175
178
|
|
|
@@ -179,6 +182,7 @@ export default defineComponent({
|
|
|
179
182
|
|
|
180
183
|
&__meta {
|
|
181
184
|
@apply text-xs text-muted flex-shrink-0;
|
|
185
|
+
@apply dark:text-dark-muted;
|
|
182
186
|
}
|
|
183
187
|
|
|
184
188
|
&__controls {
|
|
@@ -186,18 +190,22 @@ export default defineComponent({
|
|
|
186
190
|
|
|
187
191
|
> .btn--variant-link.btn--default {
|
|
188
192
|
@apply text-on-emphasis hover:text-on-emphasis focus:text-on-emphasis;
|
|
193
|
+
@apply dark:text-dark-on-emphasis hover:dark:text-dark-on-emphasis focus:dark:text-dark-on-emphasis;
|
|
189
194
|
}
|
|
190
195
|
|
|
191
196
|
> .tour__divider {
|
|
192
197
|
@apply text-on-emphasis;
|
|
198
|
+
@apply dark:text-dark-on-emphasis;
|
|
193
199
|
}
|
|
194
200
|
}
|
|
195
201
|
|
|
196
202
|
&__dismiss {
|
|
197
203
|
@apply absolute top-3 right-3 hover:cursor-pointer text-on-emphasis/30 hover:text-on-emphasis/50;
|
|
204
|
+
@apply dark:text-dark-on-emphasis/30 hover:dark:text-dark-on-emphasis/50;
|
|
198
205
|
|
|
199
206
|
.tour--image & {
|
|
200
207
|
@apply text-default/30 hover:text-default/50;
|
|
208
|
+
@apply dark:text-dark-default/30 hover:dark:text-dark-default/50;
|
|
201
209
|
}
|
|
202
210
|
}
|
|
203
211
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
2
2
|
title: {
|
|
3
3
|
type: StringConstructor;
|
|
4
|
-
default:
|
|
4
|
+
default: undefined;
|
|
5
5
|
};
|
|
6
6
|
text: {
|
|
7
7
|
type: StringConstructor;
|
|
@@ -9,7 +9,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
9
9
|
};
|
|
10
10
|
image: {
|
|
11
11
|
type: StringConstructor;
|
|
12
|
-
default:
|
|
12
|
+
default: undefined;
|
|
13
13
|
};
|
|
14
14
|
highlight: {
|
|
15
15
|
type: BooleanConstructor;
|
|
@@ -46,7 +46,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
46
46
|
}, {}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("next" | "prev" | "dismiss")[], "next" | "prev" | "dismiss", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
47
47
|
title: {
|
|
48
48
|
type: StringConstructor;
|
|
49
|
-
default:
|
|
49
|
+
default: undefined;
|
|
50
50
|
};
|
|
51
51
|
text: {
|
|
52
52
|
type: StringConstructor;
|
|
@@ -54,7 +54,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
54
54
|
};
|
|
55
55
|
image: {
|
|
56
56
|
type: StringConstructor;
|
|
57
|
-
default:
|
|
57
|
+
default: undefined;
|
|
58
58
|
};
|
|
59
59
|
highlight: {
|
|
60
60
|
type: BooleanConstructor;
|
|
@@ -89,13 +89,13 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
89
89
|
default: string;
|
|
90
90
|
};
|
|
91
91
|
}>> & {
|
|
92
|
-
onNext?: (...args: any[]) => any;
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
onNext?: ((...args: any[]) => any) | undefined;
|
|
93
|
+
onDismiss?: ((...args: any[]) => any) | undefined;
|
|
94
|
+
onPrev?: ((...args: any[]) => any) | undefined;
|
|
95
95
|
}, {
|
|
96
96
|
image: string;
|
|
97
|
-
dismissable: boolean;
|
|
98
97
|
text: string;
|
|
98
|
+
dismissable: boolean;
|
|
99
99
|
title: string;
|
|
100
100
|
step: number;
|
|
101
101
|
highlight: boolean;
|
|
@@ -2,12 +2,12 @@ import { PropType } from 'vue-demi';
|
|
|
2
2
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
3
3
|
target: {
|
|
4
4
|
type: PropType<HTMLElement>;
|
|
5
|
-
default:
|
|
5
|
+
default: undefined;
|
|
6
6
|
};
|
|
7
7
|
}, {}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
8
8
|
target: {
|
|
9
9
|
type: PropType<HTMLElement>;
|
|
10
|
-
default:
|
|
10
|
+
default: undefined;
|
|
11
11
|
};
|
|
12
12
|
}>>, {
|
|
13
13
|
target: HTMLElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hook } from '../../steps/utils/hook';
|
|
2
|
-
export
|
|
2
|
+
export type TourActionHook = (to: AbstractTour, from: AbstractTour) => boolean | Promise<boolean>;
|
|
3
3
|
export declare enum TourDirection {
|
|
4
4
|
FORWARD = 1,
|
|
5
5
|
BACKWARD = -1
|
|
@@ -23,18 +23,33 @@ export class AbstractTour {
|
|
|
23
23
|
this.parent = parent;
|
|
24
24
|
return this;
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Get options with parent options as fallback
|
|
28
|
+
*/
|
|
26
29
|
getOptions() {
|
|
27
30
|
return defu(this.options, this.parent?.getOptions());
|
|
28
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Set tour direction
|
|
34
|
+
* @param direction 1 for forward (next) and -1 for backward (prev)
|
|
35
|
+
*/
|
|
29
36
|
setDirection(direction) {
|
|
30
37
|
this.direction = direction;
|
|
31
38
|
return this;
|
|
32
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Attach to parent
|
|
42
|
+
* @param parent Parent Instance
|
|
43
|
+
*/
|
|
33
44
|
attach(parent) {
|
|
34
45
|
parent.onPrevHooks.add(this.runOnPrevHooks);
|
|
35
46
|
parent.onNextHooks.add(this.runOnNextHooks);
|
|
36
47
|
return this;
|
|
37
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Deattach from parent
|
|
51
|
+
* @param parent Parent Instance
|
|
52
|
+
*/
|
|
38
53
|
detach(parent) {
|
|
39
54
|
parent.onPrevHooks.remove(this.runOnPrevHooks);
|
|
40
55
|
parent.onNextHooks.remove(this.runOnNextHooks);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type UE from '@testing-library/user-event';
|
|
2
2
|
import { AbstractStep } from '../step';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export
|
|
3
|
+
type UserEvent = ReturnType<typeof UE['setup']>;
|
|
4
|
+
type ExtractParams<F> = F extends (T: Element, ...args: infer P) => Promise<void> ? P : unknown[];
|
|
5
|
+
export type EventType = 'click' | 'dblClick' | 'tripleClick' | 'type' | 'hover' | 'unhover' | 'clear';
|
|
6
|
+
export type ParamsOf<E extends EventType> = ExtractParams<UserEvent[E]>;
|
|
7
7
|
export interface ActionOptions<E extends EventType> {
|
|
8
8
|
target: string;
|
|
9
9
|
action: E;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AbstractTour } from './base';
|
|
2
2
|
import type { Tour, TourOptions } from './tour';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
3
|
+
type Merge<A, B> = Omit<A, keyof B> & B;
|
|
4
|
+
type BaseOptions = Partial<Omit<TourOptions, 'onFinished'>>;
|
|
5
|
+
export type OnCleanup = (cleanupFn: () => unknown) => unknown;
|
|
6
6
|
export declare abstract class AbstractStep<Option> extends AbstractTour<Merge<BaseOptions, Option>> {
|
|
7
7
|
protected parent?: Tour;
|
|
8
8
|
protected cleanFns: Array<() => unknown>;
|
|
@@ -7,23 +7,42 @@ export class AbstractStep extends AbstractTour {
|
|
|
7
7
|
async dispose() {
|
|
8
8
|
return await Promise.allSettled(this.cleanFns.map((clean) => clean()));
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Run function before unmounted
|
|
12
|
+
* @param cleanFn clean function
|
|
13
|
+
*/
|
|
10
14
|
onCleanup(cleanFn) {
|
|
11
15
|
this.cleanFns.push(cleanFn);
|
|
12
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Start this step
|
|
19
|
+
*/
|
|
13
20
|
async start() {
|
|
14
21
|
this.attach(this.parent);
|
|
15
22
|
await this.run();
|
|
16
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Stop this step
|
|
26
|
+
*/
|
|
17
27
|
async stop() {
|
|
18
28
|
await this.dispose();
|
|
19
29
|
this.detach(this.parent);
|
|
20
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Trigger next to parent
|
|
33
|
+
*/
|
|
21
34
|
async next() {
|
|
22
35
|
await this.parent.next();
|
|
23
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Trigger prev to parent
|
|
39
|
+
*/
|
|
24
40
|
async prev() {
|
|
25
41
|
await this.parent.prev();
|
|
26
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Trigger next or prev following the direction
|
|
45
|
+
*/
|
|
27
46
|
async ahead() {
|
|
28
47
|
return await (this.direction === TourDirection.BACKWARD ? this.prev() : this.next());
|
|
29
48
|
}
|
|
@@ -2,7 +2,7 @@ import { Tour } from './tour';
|
|
|
2
2
|
import type { ConditionalOptions } from './step/conditional';
|
|
3
3
|
import type { DialogOptions } from './step/dialog';
|
|
4
4
|
import type { ActionOptions, EventType, ParamsOf } from './step/action';
|
|
5
|
-
|
|
5
|
+
type TourBuilderCallback = (tour: TourStory) => unknown;
|
|
6
6
|
/**
|
|
7
7
|
* Tour with additional function to build a tour stories
|
|
8
8
|
*/
|
|
@@ -14,6 +14,10 @@ export class TourStory extends Tour {
|
|
|
14
14
|
image
|
|
15
15
|
})) : this.add(new StepDialog(targetOrOption));
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Delay or Wait, setTimout equivalent
|
|
19
|
+
* @param duration duration in milliseconds
|
|
20
|
+
*/
|
|
17
21
|
delay(duration) {
|
|
18
22
|
return this.add(new StepDelay({ duration }));
|
|
19
23
|
}
|
|
@@ -24,33 +28,81 @@ export class TourStory extends Tour {
|
|
|
24
28
|
params
|
|
25
29
|
})) : this.add(new StepAction(targetOrOption));
|
|
26
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Trigger click to target element
|
|
33
|
+
* @param target Target querySelector
|
|
34
|
+
*/
|
|
27
35
|
click(target) {
|
|
28
36
|
return this.action(target, "click");
|
|
29
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Trigger double click to target element
|
|
40
|
+
* @param target Target querySelector
|
|
41
|
+
*/
|
|
30
42
|
dblClick(target) {
|
|
31
43
|
return this.action(target, "dblClick");
|
|
32
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Trigger triple click to target element
|
|
47
|
+
* @param target Target querySelector
|
|
48
|
+
*/
|
|
33
49
|
tripleClick(target) {
|
|
34
50
|
return this.action(target, "tripleClick");
|
|
35
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Trigger hover to target element
|
|
54
|
+
* @param target Target querySelector
|
|
55
|
+
*/
|
|
36
56
|
hover(target) {
|
|
37
57
|
return this.action(target, "hover");
|
|
38
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Trigger unhover (blur) to target element
|
|
61
|
+
* @param target Target querySelector
|
|
62
|
+
*/
|
|
39
63
|
unhover(target) {
|
|
40
64
|
return this.action(target, "unhover");
|
|
41
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Trigger blur (unhover) to target element
|
|
68
|
+
* @param target Target querySelector
|
|
69
|
+
*/
|
|
42
70
|
blur(target) {
|
|
43
71
|
return this.unhover(target);
|
|
44
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Remotely typing target input
|
|
75
|
+
* @param target Target querySelector
|
|
76
|
+
*/
|
|
45
77
|
type(target, text) {
|
|
46
78
|
return this.action(target, "type", text);
|
|
47
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Clear input text
|
|
82
|
+
* @param target Target querySelector
|
|
83
|
+
*/
|
|
48
84
|
clear(target) {
|
|
49
85
|
return this.action(target, "clear");
|
|
50
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Redirect to url
|
|
89
|
+
* @param url target url
|
|
90
|
+
* @param backUrl target url when back button clicked
|
|
91
|
+
*/
|
|
51
92
|
visit(url, backUrl) {
|
|
52
93
|
return this.add(new StepVisit({ url, backUrl }));
|
|
53
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Run steps only when condition meet, skip if not
|
|
97
|
+
* @param condition Ref or Function to check
|
|
98
|
+
* @param buildTour
|
|
99
|
+
* @example
|
|
100
|
+
* tour.runIf(() => window.matchMedia("(max-width: 700px)").matches, (tour) => {
|
|
101
|
+
* return tour
|
|
102
|
+
* .click('#mobile-only')
|
|
103
|
+
* .dialog('#mobile-only', 'Hello World')
|
|
104
|
+
* })
|
|
105
|
+
*/
|
|
54
106
|
runIf(condition, buildTour) {
|
|
55
107
|
const tour = new TourStory();
|
|
56
108
|
return this.add(new StepCondition({
|
|
@@ -58,6 +110,21 @@ export class TourStory extends Tour {
|
|
|
58
110
|
tour: buildTour(tour) ?? tour
|
|
59
111
|
}));
|
|
60
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Run else if, this must be used after runIf.
|
|
115
|
+
* @param condition
|
|
116
|
+
* @param buildTour
|
|
117
|
+
* @example
|
|
118
|
+
* tour.runIf(() => window.matchMedia("(max-width: 700px)").matches, (tour) => {
|
|
119
|
+
* return tour
|
|
120
|
+
* .click('#mobile-only')
|
|
121
|
+
* .dialog('#mobile-only', 'Hello World')
|
|
122
|
+
* }).runElseIf(() => window.matchMedia("(max-width: 1000px), (tour) => {
|
|
123
|
+
* return tour
|
|
124
|
+
* .click('#tablet-only')
|
|
125
|
+
* .dialog('#tablet-only', 'Hello World')*
|
|
126
|
+
* })
|
|
127
|
+
*/
|
|
61
128
|
runElseIf(condition, buildTour) {
|
|
62
129
|
const step = this.steps.at(-1);
|
|
63
130
|
if (!(step instanceof StepCondition) || !step.canChain())
|
|
@@ -70,6 +137,20 @@ export class TourStory extends Tour {
|
|
|
70
137
|
});
|
|
71
138
|
return this;
|
|
72
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Run else condition, this must be used after runElse
|
|
142
|
+
* @param buildTour
|
|
143
|
+
* @example
|
|
144
|
+
* tour.runIf(() => window.matchMedia("(max-width: 700px)").matches, (tour) => {
|
|
145
|
+
* return tour
|
|
146
|
+
* .click('#mobile-only')
|
|
147
|
+
* .dialog('#mobile-only', 'Hello World')
|
|
148
|
+
* }).runElse((tour) => {
|
|
149
|
+
* return tour
|
|
150
|
+
* .click('#not-mobile')
|
|
151
|
+
* .dialog('#not-mobile', 'Hello World')*
|
|
152
|
+
* })
|
|
153
|
+
*/
|
|
73
154
|
runElse(buildTour) {
|
|
74
155
|
const step = this.steps.at(-1);
|
|
75
156
|
if (!(step instanceof StepCondition) || !step.canChain())
|
|
@@ -78,7 +78,7 @@ export declare class Tour extends AbstractTour<TourOptions> {
|
|
|
78
78
|
/**
|
|
79
79
|
* Get current step instance
|
|
80
80
|
*/
|
|
81
|
-
protected getCurrentStep(): AbstractTour<BaseTourOptions
|
|
81
|
+
protected getCurrentStep(): AbstractTour<BaseTourOptions> | undefined;
|
|
82
82
|
/**
|
|
83
83
|
* Run "on-finished" hooks
|
|
84
84
|
*/
|
|
@@ -3,7 +3,7 @@ import { isNumber } from "lodash-es";
|
|
|
3
3
|
import {
|
|
4
4
|
AbstractTour,
|
|
5
5
|
TourDirection
|
|
6
|
-
} from "./base";
|
|
6
|
+
} from "./base.mjs";
|
|
7
7
|
export class Tour extends AbstractTour {
|
|
8
8
|
constructor(options) {
|
|
9
9
|
super(options);
|
|
@@ -24,18 +24,33 @@ export class Tour extends AbstractTour {
|
|
|
24
24
|
if (typeof options?.onFinished === "function")
|
|
25
25
|
this.onFinishedHooks.unshift(options.onFinished);
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Get current step index
|
|
29
|
+
*/
|
|
27
30
|
getIndex() {
|
|
28
31
|
return this.getRealIndex() + (this.parent?.getIndex() ?? 0);
|
|
29
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Get total Step
|
|
35
|
+
*/
|
|
30
36
|
getTotal() {
|
|
31
37
|
return this.parent?.getTotal() ?? this.getTotalChild();
|
|
32
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Get list of steps
|
|
41
|
+
*/
|
|
33
42
|
getSteps() {
|
|
34
43
|
return this.steps;
|
|
35
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Get running status
|
|
47
|
+
*/
|
|
36
48
|
isRunning() {
|
|
37
49
|
return this.running;
|
|
38
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Count total step, including Sub-Tour
|
|
53
|
+
*/
|
|
39
54
|
getTotalChild() {
|
|
40
55
|
let total = 0;
|
|
41
56
|
for (const step of this.steps) {
|
|
@@ -43,6 +58,9 @@ export class Tour extends AbstractTour {
|
|
|
43
58
|
}
|
|
44
59
|
return total;
|
|
45
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Calculate real index, including Sub-Tour
|
|
63
|
+
*/
|
|
46
64
|
getRealIndex() {
|
|
47
65
|
let index = this.index;
|
|
48
66
|
for (let i = 0; i < this.index; i++) {
|
|
@@ -52,12 +70,21 @@ export class Tour extends AbstractTour {
|
|
|
52
70
|
}
|
|
53
71
|
return index;
|
|
54
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Get current step instance
|
|
75
|
+
*/
|
|
55
76
|
getCurrentStep() {
|
|
56
77
|
return this.steps.at(this.index);
|
|
57
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Run "on-finished" hooks
|
|
81
|
+
*/
|
|
58
82
|
async runOnFinishedHooks() {
|
|
59
|
-
await Promise.allSettled(this.onFinishedHooks.map((hook) => hook()));
|
|
83
|
+
await Promise.allSettled(this.onFinishedHooks.map(async (hook) => await hook()));
|
|
60
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Execute current step
|
|
87
|
+
*/
|
|
61
88
|
async run() {
|
|
62
89
|
const step = this.getCurrentStep();
|
|
63
90
|
try {
|
|
@@ -73,6 +100,9 @@ export class Tour extends AbstractTour {
|
|
|
73
100
|
await this.stop();
|
|
74
101
|
}
|
|
75
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Goto previous step
|
|
105
|
+
*/
|
|
76
106
|
async prev(skipHook = false) {
|
|
77
107
|
const toIndex = this.index - 1;
|
|
78
108
|
const from = this.steps.at(this.index);
|
|
@@ -86,6 +116,9 @@ export class Tour extends AbstractTour {
|
|
|
86
116
|
await this.run();
|
|
87
117
|
}
|
|
88
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Goto next step
|
|
121
|
+
*/
|
|
89
122
|
async next(skipHook = false) {
|
|
90
123
|
const toIndex = this.index + 1;
|
|
91
124
|
const from = this.steps.at(this.index);
|
|
@@ -100,10 +133,16 @@ export class Tour extends AbstractTour {
|
|
|
100
133
|
await this.finish();
|
|
101
134
|
}
|
|
102
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Finishing step
|
|
138
|
+
*/
|
|
103
139
|
async finish() {
|
|
104
140
|
await this.runOnFinishedHooks();
|
|
105
141
|
await (this.parent ? this.parent.next() : this.stop());
|
|
106
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Show and start the tour
|
|
145
|
+
*/
|
|
107
146
|
async start() {
|
|
108
147
|
this.running = true;
|
|
109
148
|
this.index = this.direction === TourDirection.BACKWARD ? this.steps.length - 1 : 0;
|
|
@@ -111,21 +150,36 @@ export class Tour extends AbstractTour {
|
|
|
111
150
|
this.attach(this.parent);
|
|
112
151
|
await this.run();
|
|
113
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Hide and stop the tour
|
|
155
|
+
*/
|
|
114
156
|
async stop() {
|
|
115
157
|
await this.getCurrentStep().stop();
|
|
116
158
|
if (this.parent)
|
|
117
159
|
this.detach(this.parent);
|
|
118
160
|
this.running = false;
|
|
119
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Find index by name or by instance
|
|
164
|
+
* @param id
|
|
165
|
+
*/
|
|
120
166
|
findIndex(id) {
|
|
121
167
|
if (id instanceof AbstractTour)
|
|
122
168
|
return this.steps.indexOf(id);
|
|
123
169
|
return this.steps.findIndex((item) => item.name === id);
|
|
124
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Add Tour Step
|
|
173
|
+
* @param step Step instance
|
|
174
|
+
*/
|
|
125
175
|
add(step) {
|
|
126
176
|
this.steps.push(step.setParent(this));
|
|
127
177
|
return this;
|
|
128
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Remove Step
|
|
181
|
+
* @param id number of index, name or symbol
|
|
182
|
+
*/
|
|
129
183
|
remove(id) {
|
|
130
184
|
if (!id && this.parent)
|
|
131
185
|
this.parent.remove(this);
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
mode="out-in">
|
|
5
5
|
<span
|
|
6
6
|
:key="`${expand}`"
|
|
7
|
+
class="truncate"
|
|
7
8
|
data-testid="truncate">
|
|
8
9
|
{{ viewText }}
|
|
9
10
|
<template v-if="expandable && text.length > maxLength">
|
|
@@ -73,3 +74,10 @@ export default defineComponent({
|
|
|
73
74
|
}
|
|
74
75
|
});
|
|
75
76
|
</script>
|
|
77
|
+
|
|
78
|
+
<style lang="postcss">
|
|
79
|
+
.truncate {
|
|
80
|
+
@apply text-default;
|
|
81
|
+
@apply dark:text-dark-default;
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -22,7 +22,7 @@ export function fromBase64(dataurl, filename, mimeType) {
|
|
|
22
22
|
if (!dataurl)
|
|
23
23
|
return;
|
|
24
24
|
try {
|
|
25
|
-
const name = filename ?? new Date().toISOString();
|
|
25
|
+
const name = filename ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
26
26
|
const [meta, body] = dataurl.split(",");
|
|
27
27
|
const mime = mimeType ?? meta.match(/:(.*?);/)[1];
|
|
28
28
|
const buffer = window.atob(body);
|