cja-phoenix 1.2.46 → 1.2.47

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.46",
4
+ "version": "1.2.47",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,21 +1,22 @@
1
- import { type Ref, type InputHTMLAttributes } from 'vue';
2
- import type { Lazy, Schema } from 'yup';
1
+ import { type Ref, type InputHTMLAttributes } from "vue";
2
+ import type { Lazy, Schema } from "yup";
3
3
  type __VLS_Props = {
4
- id?: InputHTMLAttributes['id'];
5
- layout?: 'vertical' | 'horizontal';
6
- size?: 'sm' | 'md' | 'lg';
4
+ id?: InputHTMLAttributes["id"];
5
+ layout?: "vertical" | "horizontal";
6
+ size?: "sm" | "md" | "lg";
7
7
  title?: string;
8
8
  label?: string;
9
9
  tooltip?: string;
10
10
  placeholder?: string;
11
11
  errorDisplay?: boolean;
12
12
  description?: string;
13
- disabled?: InputHTMLAttributes['disabled'];
13
+ disabled?: InputHTMLAttributes["disabled"];
14
14
  validation?: Schema | Lazy<any>;
15
- validationMode?: 'change' | 'none';
16
- variant?: 'white' | 'blue';
15
+ validationMode?: "change" | "none";
16
+ variant?: "white" | "blue";
17
17
  accept?: string[];
18
18
  hasDelete?: boolean;
19
+ modal?: any;
19
20
  };
20
21
  type __VLS_ModelProps = {
21
22
  modelValue: any;
@@ -2,7 +2,7 @@
2
2
  <FormStructureContainer v-bind="{ layout }">
3
3
  <FormStructureTitle
4
4
  v-if="title"
5
- v-bind="{ title, tooltip, size, disabled }"
5
+ v-bind="{ title, tooltip, size, disabled, modal }"
6
6
  />
7
7
 
8
8
  <div
@@ -18,10 +18,7 @@
18
18
  ]"
19
19
  @click="handleInput"
20
20
  >
21
- <span
22
- v-if="variant == 'white'"
23
- class="m-cgg-icon--document"
24
- />
21
+ <span v-if="variant == 'white'" class="m-cgg-icon--document" />
25
22
  <div class="input-text-wrapper">
26
23
  <div class="input-text">
27
24
  {{
@@ -30,19 +27,13 @@
30
27
  </div>
31
28
  </div>
32
29
  <div class="icon-wrapper">
33
- <span
34
- v-if="!model?.name"
35
- class="m-cgg-icon--upload"
36
- />
30
+ <span v-if="!model?.name" class="m-cgg-icon--upload" />
37
31
  <span
38
32
  v-else-if="model?.name && hasDelete"
39
33
  class="m-cgg-icon--cross"
40
34
  @click.stop="deleteFile"
41
35
  />
42
- <span
43
- v-else-if="model?.name"
44
- class="m-cgg-icon--change"
45
- />
36
+ <span v-else-if="model?.name" class="m-cgg-icon--change" />
46
37
  </div>
47
38
  </div>
48
39
 
@@ -54,7 +45,7 @@
54
45
  :aria-label="label || title"
55
46
  :accept="accept?.map((a) => `.${a}`).join(',')"
56
47
  @change="updateFile"
57
- >
48
+ />
58
49
 
59
50
  <FormStructureDescription
60
51
  v-if="description"
@@ -86,7 +77,8 @@ const props = defineProps({
86
77
  validationMode: { type: String, required: false, default: "change" },
87
78
  variant: { type: String, required: false, default: "white" },
88
79
  accept: { type: Array, required: false },
89
- hasDelete: { type: Boolean, required: false }
80
+ hasDelete: { type: Boolean, required: false },
81
+ modal: { type: null, required: false }
90
82
  });
91
83
  const model = defineModel({
92
84
  required: true
@@ -1,21 +1,22 @@
1
- import { type Ref, type InputHTMLAttributes } from 'vue';
2
- import type { Lazy, Schema } from 'yup';
1
+ import { type Ref, type InputHTMLAttributes } from "vue";
2
+ import type { Lazy, Schema } from "yup";
3
3
  type __VLS_Props = {
4
- id?: InputHTMLAttributes['id'];
5
- layout?: 'vertical' | 'horizontal';
6
- size?: 'sm' | 'md' | 'lg';
4
+ id?: InputHTMLAttributes["id"];
5
+ layout?: "vertical" | "horizontal";
6
+ size?: "sm" | "md" | "lg";
7
7
  title?: string;
8
8
  label?: string;
9
9
  tooltip?: string;
10
10
  placeholder?: string;
11
11
  errorDisplay?: boolean;
12
12
  description?: string;
13
- disabled?: InputHTMLAttributes['disabled'];
13
+ disabled?: InputHTMLAttributes["disabled"];
14
14
  validation?: Schema | Lazy<any>;
15
- validationMode?: 'change' | 'none';
16
- variant?: 'white' | 'blue';
15
+ validationMode?: "change" | "none";
16
+ variant?: "white" | "blue";
17
17
  accept?: string[];
18
18
  hasDelete?: boolean;
19
+ modal?: any;
19
20
  };
20
21
  type __VLS_ModelProps = {
21
22
  modelValue: any;
@@ -4,6 +4,7 @@ type __VLS_Props = {
4
4
  tooltip?: string;
5
5
  disabled?: InputHTMLAttributes["disabled"];
6
6
  size?: "sm" | "md" | "lg";
7
+ modal?: any;
7
8
  };
8
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
10
  size: "sm" | "md" | "lg";
@@ -2,9 +2,10 @@
2
2
  <div v-if="title" class="input-title" :class="[`size-${size}`, { disabled }]">
3
3
  <span>{{ title }}</span>
4
4
  <span
5
- v-if="tooltip"
5
+ v-if="tooltip || modal"
6
6
  v-tippy="{ content: tooltip }"
7
7
  class="tooltip m-cgg-icon--question"
8
+ @click="modal?.openModal()"
8
9
  />
9
10
  </div>
10
11
  </template>
@@ -14,7 +15,8 @@ defineProps({
14
15
  title: { type: String, required: true },
15
16
  tooltip: { type: String, required: false },
16
17
  disabled: { type: null, required: false },
17
- size: { type: String, required: false, default: "md" }
18
+ size: { type: String, required: false, default: "md" },
19
+ modal: { type: null, required: false }
18
20
  });
19
21
  </script>
20
22
 
@@ -30,6 +32,7 @@ defineProps({
30
32
  .tooltip {
31
33
  font-size: 18px;
32
34
  color: $main-blue;
35
+ cursor: pointer;
33
36
 
34
37
  @include screen-md-min {
35
38
  font-size: 20px;
@@ -4,6 +4,7 @@ type __VLS_Props = {
4
4
  tooltip?: string;
5
5
  disabled?: InputHTMLAttributes["disabled"];
6
6
  size?: "sm" | "md" | "lg";
7
+ modal?: any;
7
8
  };
8
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
10
  size: "sm" | "md" | "lg";
@@ -1,6 +1,6 @@
1
1
  export declare const uploadFile: (options: {
2
2
  basePath: string;
3
- journeyId: string;
3
+ journeyId: string | undefined;
4
4
  file: Blob;
5
5
  fileName: string;
6
6
  extension: string;
@@ -1,13 +1,16 @@
1
1
  import { useRuntimeConfig } from "#imports";
2
2
  export const uploadFile = (options) => {
3
3
  const { apiURL } = useRuntimeConfig().public;
4
+ const body = new FormData();
5
+ body.append("file", options.file);
6
+ body.append(
7
+ "path",
8
+ `${options.basePath}/${options.journeyId}/${options.fileName}.${options.extension}`
9
+ );
10
+ body.append("bucketName", options.bucketName);
4
11
  return $fetch("/core/apis/data/saveFileToS3", {
5
12
  baseURL: apiURL,
6
13
  method: "POST",
7
- body: {
8
- path: `${options.basePath}/${options.journeyId}/${options.fileName}.${options.extension}`,
9
- file: options.file,
10
- bucketName: options.bucketName
11
- }
14
+ body
12
15
  });
13
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cja-phoenix",
3
- "version": "1.2.46",
3
+ "version": "1.2.47",
4
4
  "description": "Phoenix utility",
5
5
  "repository": {
6
6
  "type": "git",