cja-phoenix 1.2.29 → 1.2.34
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/module.json +1 -1
- package/dist/runtime/components/CjaButton.d.vue.ts +8 -8
- package/dist/runtime/components/CjaButton.vue +7 -24
- package/dist/runtime/components/CjaButton.vue.d.ts +8 -8
- package/dist/runtime/components/form/SelectInput.d.vue.ts +1 -1
- package/dist/runtime/components/form/SelectInput.vue.d.ts +1 -1
- package/dist/runtime/components/form/SelectionTiles.d.vue.ts +1 -1
- package/dist/runtime/components/form/SelectionTiles.vue.d.ts +1 -1
- package/dist/runtime/utils/getAbTestVersion.d.ts +1 -1
- package/dist/runtime/utils/getAbTestVersion.js +12 -5
- package/dist/runtime/utils/updateForm.d.ts +1 -1
- package/dist/runtime/utils/updateForm.js +17 -20
- package/dist/runtime/utils/updateMarketingConsent.d.ts +1 -1
- package/dist/runtime/utils/updateMarketingConsent.js +4 -3
- package/dist/runtime/utils/uploadFile.d.ts +1 -1
- package/dist/runtime/utils/uploadFile.js +7 -9
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { AnchorHTMLAttributes } from
|
|
2
|
-
import type { Icon } from
|
|
1
|
+
import type { AnchorHTMLAttributes } from "vue";
|
|
2
|
+
import type { Icon } from "../types/Icon.js";
|
|
3
3
|
type __VLS_Props = {
|
|
4
|
-
type?:
|
|
5
|
-
color?:
|
|
6
|
-
textAlign?:
|
|
7
|
-
size?:
|
|
4
|
+
type?: "primary" | "secondary" | "tertiary";
|
|
5
|
+
color?: "blue" | "orange" | "white" | "light-blue" | "gradient-green-blue";
|
|
6
|
+
textAlign?: "center" | "left" | "right";
|
|
7
|
+
size?: "sm" | "md" | "lg";
|
|
8
8
|
shadow?: boolean;
|
|
9
9
|
iconRight?: Icon;
|
|
10
10
|
iconLeft?: Icon;
|
|
11
11
|
iconOnly?: boolean;
|
|
12
12
|
loading?: boolean;
|
|
13
|
-
href?: AnchorHTMLAttributes[
|
|
14
|
-
target?: AnchorHTMLAttributes[
|
|
13
|
+
href?: AnchorHTMLAttributes["href"];
|
|
14
|
+
target?: AnchorHTMLAttributes["target"];
|
|
15
15
|
};
|
|
16
16
|
declare var __VLS_12: {};
|
|
17
17
|
type __VLS_Slots = {} & {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
|
+
external
|
|
3
4
|
:is="href ? NuxtLink : 'button'"
|
|
4
5
|
class="cja-btn"
|
|
5
6
|
:href="href"
|
|
@@ -12,32 +13,14 @@
|
|
|
12
13
|
{ 'btn-loading': loading, 'btn-shadow': shadow, 'icon-only': iconOnly }
|
|
13
14
|
]"
|
|
14
15
|
>
|
|
15
|
-
<Transition
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
v-if="loading"
|
|
21
|
-
class="spinner"
|
|
22
|
-
/>
|
|
23
|
-
<div
|
|
24
|
-
v-else
|
|
25
|
-
class="text-wrapper"
|
|
26
|
-
>
|
|
27
|
-
<span
|
|
28
|
-
v-if="iconLeft"
|
|
29
|
-
:class="iconLeft"
|
|
30
|
-
/>
|
|
31
|
-
<span
|
|
32
|
-
v-if="!iconOnly"
|
|
33
|
-
class="text"
|
|
34
|
-
>
|
|
16
|
+
<Transition name="fade" mode="out-in">
|
|
17
|
+
<div v-if="loading" class="spinner" />
|
|
18
|
+
<div v-else class="text-wrapper">
|
|
19
|
+
<span v-if="iconLeft" :class="iconLeft" />
|
|
20
|
+
<span v-if="!iconOnly" class="text">
|
|
35
21
|
<slot />
|
|
36
22
|
</span>
|
|
37
|
-
<span
|
|
38
|
-
v-if="iconRight"
|
|
39
|
-
:class="iconRight"
|
|
40
|
-
/>
|
|
23
|
+
<span v-if="iconRight" :class="iconRight" />
|
|
41
24
|
</div>
|
|
42
25
|
</Transition>
|
|
43
26
|
</component>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { AnchorHTMLAttributes } from
|
|
2
|
-
import type { Icon } from
|
|
1
|
+
import type { AnchorHTMLAttributes } from "vue";
|
|
2
|
+
import type { Icon } from "../types/Icon.js";
|
|
3
3
|
type __VLS_Props = {
|
|
4
|
-
type?:
|
|
5
|
-
color?:
|
|
6
|
-
textAlign?:
|
|
7
|
-
size?:
|
|
4
|
+
type?: "primary" | "secondary" | "tertiary";
|
|
5
|
+
color?: "blue" | "orange" | "white" | "light-blue" | "gradient-green-blue";
|
|
6
|
+
textAlign?: "center" | "left" | "right";
|
|
7
|
+
size?: "sm" | "md" | "lg";
|
|
8
8
|
shadow?: boolean;
|
|
9
9
|
iconRight?: Icon;
|
|
10
10
|
iconLeft?: Icon;
|
|
11
11
|
iconOnly?: boolean;
|
|
12
12
|
loading?: boolean;
|
|
13
|
-
href?: AnchorHTMLAttributes[
|
|
14
|
-
target?: AnchorHTMLAttributes[
|
|
13
|
+
href?: AnchorHTMLAttributes["href"];
|
|
14
|
+
target?: AnchorHTMLAttributes["target"];
|
|
15
15
|
};
|
|
16
16
|
declare var __VLS_12: {};
|
|
17
17
|
type __VLS_Slots = {} & {
|
|
@@ -36,8 +36,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
36
36
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
37
37
|
}>, {
|
|
38
38
|
placeholder: string;
|
|
39
|
-
disabled: boolean | "true" | "false";
|
|
40
39
|
size: "sm" | "md" | "lg";
|
|
40
|
+
disabled: boolean | "true" | "false";
|
|
41
41
|
errorDisplay: boolean;
|
|
42
42
|
validationMode: "change" | "blur" | "none";
|
|
43
43
|
layout: "vertical" | "horizontal";
|
|
@@ -36,8 +36,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
36
36
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
37
37
|
}>, {
|
|
38
38
|
placeholder: string;
|
|
39
|
-
disabled: boolean | "true" | "false";
|
|
40
39
|
size: "sm" | "md" | "lg";
|
|
40
|
+
disabled: boolean | "true" | "false";
|
|
41
41
|
errorDisplay: boolean;
|
|
42
42
|
validationMode: "change" | "blur" | "none";
|
|
43
43
|
layout: "vertical" | "horizontal";
|
|
@@ -35,10 +35,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
35
35
|
"onClick:option"?: ((...args: any[]) => any) | undefined;
|
|
36
36
|
}>, {
|
|
37
37
|
size: "sm" | "md" | "lg";
|
|
38
|
-
icon: Icon;
|
|
39
38
|
errorDisplay: boolean;
|
|
40
39
|
validationMode: "change" | "none";
|
|
41
40
|
layout: "list" | "grid" | "image";
|
|
41
|
+
icon: Icon;
|
|
42
42
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
43
43
|
declare const _default: typeof __VLS_export;
|
|
44
44
|
export default _default;
|
|
@@ -35,10 +35,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
35
35
|
"onClick:option"?: ((...args: any[]) => any) | undefined;
|
|
36
36
|
}>, {
|
|
37
37
|
size: "sm" | "md" | "lg";
|
|
38
|
-
icon: Icon;
|
|
39
38
|
errorDisplay: boolean;
|
|
40
39
|
validationMode: "change" | "none";
|
|
41
40
|
layout: "list" | "grid" | "image";
|
|
41
|
+
icon: Icon;
|
|
42
42
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
43
43
|
declare const _default: typeof __VLS_export;
|
|
44
44
|
export default _default;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
useRuntimeConfig,
|
|
3
|
+
useCookie,
|
|
4
|
+
updateForm,
|
|
5
|
+
useRequestFetch
|
|
6
|
+
} from "#imports";
|
|
2
7
|
export const getAbTestVersion = async (journeyId, config) => {
|
|
3
8
|
const { apiURL } = useRuntimeConfig().public;
|
|
9
|
+
const requestFetch = useRequestFetch();
|
|
4
10
|
const abTestCookie = useCookie(`abTestVersion_${config.experiment}`);
|
|
5
|
-
const fetchAbTestVersion = async () =>
|
|
11
|
+
const fetchAbTestVersion = async () => requestFetch("/core/apis/data/abTestServiceLookup", {
|
|
12
|
+
baseURL: apiURL,
|
|
6
13
|
method: "post",
|
|
7
|
-
body:
|
|
14
|
+
body: {
|
|
8
15
|
experimentName: config.experiment,
|
|
9
16
|
journeyId
|
|
10
|
-
}
|
|
11
|
-
}).then(
|
|
17
|
+
}
|
|
18
|
+
}).then(async (d) => {
|
|
12
19
|
const abTestVersion = d.version || "control";
|
|
13
20
|
abTestCookie.value = abTestVersion;
|
|
14
21
|
await updateForm({
|
|
@@ -2,26 +2,23 @@ import { useRoute, useRuntimeConfig } from "#imports";
|
|
|
2
2
|
export const updateForm = (options) => {
|
|
3
3
|
const { apiURL } = useRuntimeConfig().public;
|
|
4
4
|
const route = useRoute();
|
|
5
|
-
return fetch(
|
|
5
|
+
return $fetch("/core/apis/data/updateForm", {
|
|
6
|
+
baseURL: apiURL,
|
|
6
7
|
method: "PUT",
|
|
7
|
-
body:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
}).filter(([_, v]) => v != null)
|
|
24
|
-
)
|
|
25
|
-
)
|
|
8
|
+
body: {
|
|
9
|
+
eventType: options.eventType || "STEP_CHANGED",
|
|
10
|
+
isActionEvent: true,
|
|
11
|
+
journeyId: options.journeyId,
|
|
12
|
+
stepName: options.stepName,
|
|
13
|
+
isCompleted: options.isCompleted || false,
|
|
14
|
+
sentToDialer: options.sentToDialer || true,
|
|
15
|
+
lastStepNumber: options.step,
|
|
16
|
+
lastStepType: options.formType,
|
|
17
|
+
lastStepUrl: route.fullPath,
|
|
18
|
+
data: {
|
|
19
|
+
...options.payload,
|
|
20
|
+
formType: options.formType
|
|
21
|
+
}
|
|
22
|
+
}
|
|
26
23
|
});
|
|
27
24
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { useRuntimeConfig } from "#imports";
|
|
2
2
|
export const updateMarketingConsent = (options) => {
|
|
3
3
|
const { apiURL } = useRuntimeConfig().public;
|
|
4
|
-
return fetch(
|
|
4
|
+
return $fetch("/core/apis/data/verifyConsent", {
|
|
5
|
+
baseURL: apiURL,
|
|
5
6
|
method: "POST",
|
|
6
|
-
body:
|
|
7
|
+
body: {
|
|
7
8
|
email: options.email,
|
|
8
9
|
currentPageUrl: location.origin + location.pathname,
|
|
9
10
|
journeyId: options.journeyId
|
|
10
|
-
}
|
|
11
|
+
}
|
|
11
12
|
});
|
|
12
13
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { useRuntimeConfig } from "#imports";
|
|
2
2
|
export const uploadFile = (options) => {
|
|
3
3
|
const { apiURL } = useRuntimeConfig().public;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"path",
|
|
7
|
-
`${options.basePath}/${options.journeyId}/${options.fileName}.${options.extension}`
|
|
8
|
-
);
|
|
9
|
-
data.append("file", options.file);
|
|
10
|
-
data.append("bucketName", options.bucketName);
|
|
11
|
-
return fetch(new URL("/core/apis/data/saveFileToS3", apiURL), {
|
|
4
|
+
return $fetch("/core/apis/data/saveFileToS3", {
|
|
5
|
+
baseURL: apiURL,
|
|
12
6
|
method: "POST",
|
|
13
|
-
body:
|
|
7
|
+
body: {
|
|
8
|
+
path: `${options.basePath}/${options.journeyId}/${options.fileName}.${options.extension}`,
|
|
9
|
+
file: options.file,
|
|
10
|
+
bucketName: options.bucketName
|
|
11
|
+
}
|
|
14
12
|
});
|
|
15
13
|
};
|