cja-phoenix 1.2.4 → 1.2.6
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/assets/scss/mixins/_index.scss +14 -0
- package/dist/runtime/components/form/CheckboxInput.vue +1 -0
- package/dist/runtime/components/form/RadioInput.vue +1 -0
- package/dist/runtime/composables/useFunnelConfig.d.ts +1 -0
- package/dist/runtime/composables/useFunnelConfig.js +1 -0
- package/dist/runtime/composables/useFunnelSummary.d.ts +2 -1
- package/dist/runtime/composables/useFunnelSummary.js +2 -2
- package/dist/runtime/utils/convertDate.d.ts +1 -1
- package/dist/runtime/utils/convertDate.js +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -24,6 +24,20 @@
|
|
|
24
24
|
transition: all 0.4s ease-in-out;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
@mixin funnel-divider {
|
|
28
|
+
margin: 32px 0;
|
|
29
|
+
border-color: $light-grey;
|
|
30
|
+
border-style: solid;
|
|
31
|
+
border-bottom-width: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@mixin funnel-form($width: 360px) {
|
|
35
|
+
display: grid;
|
|
36
|
+
grid-template-columns: min(100%, $width);
|
|
37
|
+
justify-content: center;
|
|
38
|
+
gap: 32px;
|
|
39
|
+
}
|
|
40
|
+
|
|
27
41
|
@mixin fade-transition($duration: 0.6s) {
|
|
28
42
|
.fade-enter-active,
|
|
29
43
|
.fade-leave-active {
|
|
@@ -2,6 +2,7 @@ import { type ComputedRef } from 'vue';
|
|
|
2
2
|
import type { StepData } from '../types/JourneyConfig.js';
|
|
3
3
|
export declare const useFunnelConfig: (structure: ComputedRef<Map<string, string[]>>) => {
|
|
4
4
|
steps: ComputedRef<string[]>;
|
|
5
|
+
structure: ComputedRef<Map<string, string[]>>;
|
|
5
6
|
currentStep: ComputedRef<StepData>;
|
|
6
7
|
totalSteps: ComputedRef<number>;
|
|
7
8
|
getStep: (step: string | number | undefined) => StepData | undefined;
|
|
@@ -3,9 +3,10 @@ import type { StepData } from '../types/JourneyConfig.js';
|
|
|
3
3
|
import type { ComputedRef } from 'vue';
|
|
4
4
|
export declare const useFunnelSummary: (options: {
|
|
5
5
|
currentStep: ComputedRef<StepData>;
|
|
6
|
+
structure: ComputedRef<Map<string, string[]>>;
|
|
6
7
|
store: any;
|
|
7
8
|
}) => {
|
|
8
|
-
stepIncludes: (field: string) =>
|
|
9
|
+
stepIncludes: (field: string) => boolean;
|
|
9
10
|
displayValue: (value: any, options?: SelectOption[]) => any;
|
|
10
11
|
displayLabel: (value: any, label: string) => string;
|
|
11
12
|
displayCurrency: (value: number | undefined) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { formatCurrency, formatPercent } from "../utils/formatValue.js";
|
|
2
2
|
export const useFunnelSummary = (options) => {
|
|
3
|
-
const { currentStep, store } = options;
|
|
4
|
-
const stepIncludes = (field) => currentStep.value.fields.includes(field) || store[field];
|
|
3
|
+
const { currentStep, structure, store } = options;
|
|
4
|
+
const stepIncludes = (field) => (currentStep.value.fields.includes(field) || store[field] !== void 0) && structure.value.values().toArray().flat().includes(field);
|
|
5
5
|
const displayValue = (value, options2) => options2 ? options2.find((o) => o.value == value)?.label ?? "-" : value ?? "-";
|
|
6
6
|
const displayLabel = (value, label) => value !== void 0 ? label : "-";
|
|
7
7
|
const displayCurrency = (value) => value ? formatCurrency(value) : "-";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const convertDate: (date: string, format: "datetime" | "
|
|
1
|
+
export declare const convertDate: (date: string, format: "datetime" | "milliseconds" | "iso" | "object") => string | number | Date | {
|
|
2
2
|
day: number;
|
|
3
3
|
month: number;
|
|
4
4
|
year: number;
|