@finema/core 3.20.3 → 3.21.0

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": "3.20.3",
3
+ "version": "3.21.0",
4
4
  "configKey": "core",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
package/dist/module.mjs CHANGED
@@ -4,7 +4,7 @@ import * as lodash from 'lodash-es';
4
4
  import * as theme from '../dist/runtime/theme/index.js';
5
5
 
6
6
  const name = "@finema/core";
7
- const version = "3.20.3";
7
+ const version = "3.21.0";
8
8
 
9
9
  const nuxtAppOptions = {
10
10
  head: {
@@ -33,6 +33,7 @@ import FormInputSelect from "./InputSelect/index.vue";
33
33
  import FormInputSelectMultiple from "./InputSelectMultiple/index.vue";
34
34
  import FormInputComponent from "./InputComponent/index.vue";
35
35
  import FormInputRadio from "./InputRadio/index.vue";
36
+ import FormInputRating from "./InputRating/index.vue";
36
37
  import FormInputDateTime from "./InputDateTime/index.vue";
37
38
  import FormInputTime from "./InputTime/index.vue";
38
39
  import FormInputMonth from "./InputMonth/index.vue";
@@ -118,6 +119,10 @@ const componentMap = {
118
119
  component: FormInputRadio,
119
120
  props: {}
120
121
  },
122
+ [INPUT_TYPES.RATING]: {
123
+ component: FormInputRating,
124
+ props: {}
125
+ },
121
126
  [INPUT_TYPES.DATE_TIME]: {
122
127
  component: FormInputDateTime,
123
128
  props: {}
@@ -4,8 +4,8 @@ declare const __VLS_export: import("vue").DefineComponent<IRadioFieldProps, {},
4
4
  }, string, import("vue").PublicProps, Readonly<IRadioFieldProps> & Readonly<{
5
5
  onChange?: ((value: any) => any) | undefined;
6
6
  }>, {
7
- orientation: "horizontal" | "vertical";
8
7
  variant: "list" | "card" | "table";
8
+ orientation: "horizontal" | "vertical";
9
9
  indicator: "start" | "end" | "hidden";
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const _default: typeof __VLS_export;
@@ -4,8 +4,8 @@ declare const __VLS_export: import("vue").DefineComponent<IRadioFieldProps, {},
4
4
  }, string, import("vue").PublicProps, Readonly<IRadioFieldProps> & Readonly<{
5
5
  onChange?: ((value: any) => any) | undefined;
6
6
  }>, {
7
- orientation: "horizontal" | "vertical";
8
7
  variant: "list" | "card" | "table";
8
+ orientation: "horizontal" | "vertical";
9
9
  indicator: "start" | "end" | "hidden";
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,8 @@
1
+ import type { IRatingFieldProps } from '#core/components/Form/InputRating/types';
2
+ declare const __VLS_export: import("vue").DefineComponent<IRatingFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ change: (...args: any[]) => void;
4
+ }, string, import("vue").PublicProps, Readonly<IRatingFieldProps> & Readonly<{
5
+ onChange?: ((...args: any[]) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <FieldWrapper v-bind="wrapperProps">
3
+ <InputRating
4
+ :model-value="value"
5
+ :default-value="defaultValue"
6
+ :disabled="wrapperProps.disabled"
7
+ :readonly="readonly"
8
+ :name="name"
9
+ :icon="icon"
10
+ :empty-icon="emptyIcon"
11
+ :length="length"
12
+ :step="step"
13
+ :color="color"
14
+ :size="size"
15
+ :orientation="orientation"
16
+ :clearable="clearable"
17
+ :hoverable="hoverable"
18
+ :required="required"
19
+ :ui="ui"
20
+ @update:model-value="onChange"
21
+ />
22
+ </FieldWrapper>
23
+ </template>
24
+
25
+ <script setup>
26
+ import { useFieldHOC } from "#core/composables/useForm";
27
+ import FieldWrapper from "#core/components/Form/FieldWrapper.vue";
28
+ const emits = defineEmits(["change"]);
29
+ const props = defineProps({
30
+ icon: { type: null, required: false },
31
+ emptyIcon: { type: null, required: false },
32
+ length: { type: Number, required: false },
33
+ step: { type: Number, required: false },
34
+ color: { type: null, required: false },
35
+ size: { type: null, required: false },
36
+ orientation: { type: null, required: false },
37
+ clearable: { type: Boolean, required: false },
38
+ hoverable: { type: Boolean, required: false },
39
+ defaultValue: { type: Number, required: false },
40
+ form: { type: Object, required: false },
41
+ name: { type: String, required: true },
42
+ errorMessage: { type: String, required: false },
43
+ label: { type: null, required: false },
44
+ description: { type: String, required: false },
45
+ hint: { type: String, required: false },
46
+ rules: { type: null, required: false },
47
+ autoFocus: { type: Boolean, required: false },
48
+ placeholder: { type: String, required: false },
49
+ disabled: { type: Boolean, required: false },
50
+ readonly: { type: Boolean, required: false },
51
+ required: { type: Boolean, required: false },
52
+ help: { type: String, required: false },
53
+ ui: { type: null, required: false }
54
+ });
55
+ const {
56
+ value,
57
+ wrapperProps,
58
+ handleChange
59
+ } = useFieldHOC(props);
60
+ const onChange = (value2) => {
61
+ handleChange(value2);
62
+ emits("change", value2);
63
+ };
64
+ </script>
@@ -0,0 +1,8 @@
1
+ import type { IRatingFieldProps } from '#core/components/Form/InputRating/types';
2
+ declare const __VLS_export: import("vue").DefineComponent<IRatingFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ change: (...args: any[]) => void;
4
+ }, string, import("vue").PublicProps, Readonly<IRatingFieldProps> & Readonly<{
5
+ onChange?: ((...args: any[]) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import type { IFieldProps, IFormFieldBase, INPUT_TYPES } from '#core/components/Form/types';
2
+ import type { InputRatingProps } from '@nuxt/ui';
3
+ export interface IRatingFieldProps extends IFieldProps {
4
+ icon?: InputRatingProps['icon'];
5
+ emptyIcon?: InputRatingProps['emptyIcon'];
6
+ length?: InputRatingProps['length'];
7
+ step?: InputRatingProps['step'];
8
+ color?: InputRatingProps['color'];
9
+ size?: InputRatingProps['size'];
10
+ orientation?: InputRatingProps['orientation'];
11
+ clearable?: InputRatingProps['clearable'];
12
+ hoverable?: InputRatingProps['hoverable'];
13
+ defaultValue?: InputRatingProps['defaultValue'];
14
+ }
15
+ export type IRatingField = IFormFieldBase<INPUT_TYPES.RATING, IRatingFieldProps, {
16
+ change?: (value: number) => void;
17
+ }>;
@@ -22,6 +22,7 @@ import type { IComponentField } from '#core/components/Form/InputComponent/types
22
22
  import type { ITagsField } from '#core/components/Form/InputTags/types';
23
23
  import type { ICurrencyField } from '#core/components/Form/InputCurrency/types';
24
24
  import type { ICheckboxGroupField } from '#core/components/Form/InputCheckboxGroup/types';
25
+ import type { IRatingField } from '#core/components/Form/InputRating/types';
25
26
  export declare enum INPUT_TYPES {
26
27
  TEXT = "TEXT",
27
28
  SEARCH = "SEARCH",
@@ -36,6 +37,7 @@ export declare enum INPUT_TYPES {
36
37
  SELECT = "SELECT",
37
38
  SELECT_MULTIPLE = "SELECT_MULTIPLE",
38
39
  RADIO = "RADIO",
40
+ RATING = "RATING",
39
41
  CHECKBOX = "CHECKBOX",
40
42
  CHECKBOX_GROUP = "CHECKBOX_GROUP",
41
43
  DATE_TIME = "DATE_TIME",
@@ -79,7 +81,7 @@ export interface IFormFieldBase<I extends INPUT_TYPES, P extends IFieldProps, O>
79
81
  props: P;
80
82
  on?: O;
81
83
  }
82
- export type IFormField = ITextField | ISearchField | INumberField | ICurrencyField | ITextareaField | IToggleField | ISelectField | ICheckboxField | ICheckboxGroupField | ISelectMultipleField | IRadioField | IDateTimeField | ITimeField | IMonthField | IDateTimeRangeField | IUploadDropzoneField | IUploadDropzoneAutoField | IUploadDropzoneAutoMultipleField | IUploadImageAutoField | IWYSIWYGField | IComponentField | ITagsField | IFormFieldBase<INPUT_TYPES.COMPONENT, any, any>;
84
+ export type IFormField = ITextField | ISearchField | INumberField | ICurrencyField | ITextareaField | IToggleField | ISelectField | ICheckboxField | ICheckboxGroupField | ISelectMultipleField | IRadioField | IRatingField | IDateTimeField | ITimeField | IMonthField | IDateTimeRangeField | IUploadDropzoneField | IUploadDropzoneAutoField | IUploadDropzoneAutoMultipleField | IUploadImageAutoField | IWYSIWYGField | IComponentField | ITagsField | IFormFieldBase<INPUT_TYPES.COMPONENT, any, any>;
83
85
  export interface IFileValue {
84
86
  url: string;
85
87
  path?: string;
@@ -12,6 +12,7 @@ export var INPUT_TYPES = /* @__PURE__ */ ((INPUT_TYPES2) => {
12
12
  INPUT_TYPES2["SELECT"] = "SELECT";
13
13
  INPUT_TYPES2["SELECT_MULTIPLE"] = "SELECT_MULTIPLE";
14
14
  INPUT_TYPES2["RADIO"] = "RADIO";
15
+ INPUT_TYPES2["RATING"] = "RATING";
15
16
  INPUT_TYPES2["CHECKBOX"] = "CHECKBOX";
16
17
  INPUT_TYPES2["CHECKBOX_GROUP"] = "CHECKBOX_GROUP";
17
18
  INPUT_TYPES2["DATE_TIME"] = "DATE_TIME";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "3.20.3",
3
+ "version": "3.21.0",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",
@@ -43,8 +43,8 @@
43
43
  "@iconify-json/heroicons": "^1.2.2",
44
44
  "@iconify-json/ph": "^1.2.2",
45
45
  "@iconify-json/svg-spinners": "^1.2.2",
46
- "@nuxt/kit": "^4.4.8",
47
- "@nuxt/ui": "^4.8.2",
46
+ "@nuxt/kit": "^4.5.0",
47
+ "@nuxt/ui": "^4.10.0",
48
48
  "@pinia/nuxt": "^0.11.0",
49
49
  "@tailwindcss/typography": "^0.5.0-alpha.3",
50
50
  "@tiptap/extension-text-align": "^3.18.0",