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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cja-phoenix",
3
3
  "configKey": "cja-phoenix",
4
- "version": "1.2.4",
4
+ "version": "1.2.6",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -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 {
@@ -141,6 +141,7 @@ defineExpose({ errorMessage, meta, validate });
141
141
 
142
142
  .text-container {
143
143
  user-select: none;
144
+ white-space: pre-line;
144
145
 
145
146
  :deep(a) {
146
147
  color: inherit;
@@ -90,6 +90,7 @@ defineExpose({ errorMessage, meta, validate });
90
90
 
91
91
  .text-container {
92
92
  line-height: 20px;
93
+ white-space: pre-line;
93
94
 
94
95
  a {
95
96
  color: inherit;
@@ -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;
@@ -41,6 +41,7 @@ export const useFunnelConfig = (structure) => {
41
41
  };
42
42
  return {
43
43
  steps,
44
+ structure,
44
45
  currentStep,
45
46
  totalSteps,
46
47
  getStep,
@@ -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) => any;
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" | "miliseconds" | "iso" | "object") => string | number | Date | {
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;
@@ -5,7 +5,7 @@ export const convertDate = (date, format) => {
5
5
  return dateObj;
6
6
  case "iso":
7
7
  return dateObj.toISOString();
8
- case "miliseconds":
8
+ case "milliseconds":
9
9
  return dateObj.getTime();
10
10
  case "object":
11
11
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cja-phoenix",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Phoenix utility",
5
5
  "repository": "comparaja/phoenix",
6
6
  "license": "MIT",