@finema/core 1.4.104 → 1.4.106

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.104",
3
+ "version": "1.4.106",
4
4
  "configKey": "core",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.7.4"
package/dist/module.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineNuxtModule, createResolver, installModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
2
2
 
3
3
  const name = "@finema/core";
4
- const version = "1.4.104";
4
+ const version = "1.4.106";
5
5
 
6
6
  const colors = {
7
7
  black: "#20243E",
@@ -161,6 +161,14 @@
161
161
  v-bind="getFieldBinding(option)"
162
162
  v-on="option.on ?? {}"
163
163
  />
164
+ <component
165
+ :is="option.component"
166
+ v-else-if="option.type === INPUT_TYPES.COMPONENT"
167
+ :class="option.class"
168
+ :form="form"
169
+ v-bind="getFieldBinding(option)"
170
+ v-on="option.on ?? {}"
171
+ />
164
172
  </template>
165
173
  </div>
166
174
  </template>
@@ -36,8 +36,20 @@
36
36
  :class="[ui.imageItem.onPreview.actionBtnClass]"
37
37
  @click="handleDeleteFile"
38
38
  />
39
- <Modal v-model="isPreviewOpen" :title="selectedFile?.name">
40
- <img :src="upload.data.value[responseKey]" alt="image-preview" />
39
+ <Modal v-model="isPreviewOpen" size="xl">
40
+ <div class="absolute -top-8 left-0 flex w-full justify-between text-gray-600">
41
+ <p>{{ selectedFile?.name }}</p>
42
+ <Icon
43
+ name="i-heroicons-x-mark"
44
+ class="size-6 cursor-pointer hover:text-gray-400"
45
+ @click="() => (isPreviewOpen = false)"
46
+ />
47
+ </div>
48
+ <img
49
+ :src="upload.data.value[responseKey]"
50
+ alt="image-preview"
51
+ class="w-full rounded-lg"
52
+ />
41
53
  </Modal>
42
54
  </div>
43
55
  </div>
@@ -38,7 +38,8 @@ export declare const enum INPUT_TYPES {
38
38
  UPLOAD_DROPZONE_AUTO = "UPLOAD_DROPZONE_AUTO",
39
39
  UPLOAD_DROPZONE_AUTO_MULTIPLE = "UPLOAD_DROPZONE_AUTO_MULTIPLE",
40
40
  UPLOAD_DROPZONE_IMAGE_AUTO_MULTIPLE = "UPLOAD_DROPZONE_IMAGE_AUTO_MULTIPLE",
41
- WYSIWYG = "WYSIWYG"
41
+ WYSIWYG = "WYSIWYG",
42
+ COMPONENT = "COMPONENT"
42
43
  }
43
44
  export interface IFieldProps {
44
45
  form?: FormContext;
@@ -67,4 +68,4 @@ export interface IFormFieldBase<I extends INPUT_TYPES, P extends IFieldProps, O>
67
68
  props: P;
68
69
  on?: O;
69
70
  }
70
- export type IFormField = ITextField | INumberField | IStaticField | ICheckboxField | IRadioField | ISelectField | IToggleField | ITextareaField | IDateTimeField | IDateTimeRangeField | IUploadFileClassicField | IUploadFileField | IUploadDropzoneField | IUploadDropzoneAutoField | IUploadDropzoneAutoMultipleField | IUploadDropzoneImageAutoMultipleField | IWYSIWYGField;
71
+ export type IFormField = ITextField | INumberField | IStaticField | ICheckboxField | IRadioField | ISelectField | IToggleField | ITextareaField | IDateTimeField | IDateTimeRangeField | IUploadFileClassicField | IUploadFileField | IUploadDropzoneField | IUploadDropzoneAutoField | IUploadDropzoneAutoMultipleField | IUploadDropzoneImageAutoMultipleField | IWYSIWYGField | IFormFieldBase<INPUT_TYPES.COMPONENT, any, any>;
@@ -20,5 +20,6 @@ export var INPUT_TYPES = /* @__PURE__ */ ((INPUT_TYPES2) => {
20
20
  INPUT_TYPES2["UPLOAD_DROPZONE_AUTO_MULTIPLE"] = "UPLOAD_DROPZONE_AUTO_MULTIPLE";
21
21
  INPUT_TYPES2["UPLOAD_DROPZONE_IMAGE_AUTO_MULTIPLE"] = "UPLOAD_DROPZONE_IMAGE_AUTO_MULTIPLE";
22
22
  INPUT_TYPES2["WYSIWYG"] = "WYSIWYG";
23
+ INPUT_TYPES2["COMPONENT"] = "COMPONENT";
23
24
  return INPUT_TYPES2;
24
25
  })(INPUT_TYPES || {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.104",
3
+ "version": "1.4.106",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",