@finema/core 1.4.2 → 1.4.5

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.
Files changed (32) hide show
  1. package/dist/module.d.mts +3 -0
  2. package/dist/module.d.ts +3 -0
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +47 -2
  5. package/dist/runtime/components/Core.vue +8 -1
  6. package/dist/runtime/components/Form/Fields.vue +10 -10
  7. package/dist/runtime/components/Form/InputDateTime/date_time_field.types.d.ts +8 -0
  8. package/dist/runtime/components/Form/InputDateTime/index.vue +17 -2
  9. package/dist/runtime/components/Form/InputText/index.vue +2 -1
  10. package/dist/runtime/components/Form/InputTextarea/index.vue +2 -1
  11. package/dist/runtime/components/Form/types.d.ts +1 -0
  12. package/dist/runtime/composables/useForm.mjs +1 -0
  13. package/dist/runtime/core.config.d.ts +3 -0
  14. package/dist/runtime/core.config.mjs +4 -1
  15. package/dist/runtime/types/config.d.ts +1 -1
  16. package/dist/runtime/ui.config/checkbox.d.ts +3 -0
  17. package/dist/runtime/ui.config/checkbox.mjs +1 -0
  18. package/dist/runtime/ui.config/formGroup.d.ts +3 -0
  19. package/dist/runtime/ui.config/formGroup.mjs +5 -0
  20. package/dist/runtime/ui.config/input.d.ts +3 -0
  21. package/dist/runtime/ui.config/input.mjs +5 -0
  22. package/dist/runtime/ui.config/select.d.ts +3 -0
  23. package/dist/runtime/ui.config/select.mjs +5 -0
  24. package/dist/runtime/ui.config/selectMenu.d.ts +3 -0
  25. package/dist/runtime/ui.config/selectMenu.mjs +5 -0
  26. package/dist/runtime/ui.config/textarea.d.ts +3 -0
  27. package/dist/runtime/ui.config/textarea.mjs +5 -0
  28. package/dist/runtime/ui.config/toggle.d.ts +3 -0
  29. package/dist/runtime/ui.config/toggle.mjs +5 -0
  30. package/dist/runtime/utils/TimeHelper.mjs +4 -3
  31. package/dist/runtime/utils/TimeHelper.spec.mjs +61 -52
  32. package/package.json +82 -79
package/dist/module.d.mts CHANGED
@@ -3,6 +3,9 @@ import * as _nuxt_schema from '@nuxt/schema';
3
3
  declare const core: {
4
4
  limit_per_page: number;
5
5
  default_primary_key: string;
6
+ date_format: string;
7
+ date_time_format: string;
8
+ time_format: string;
6
9
  };
7
10
 
8
11
  declare const config_core: typeof core;
package/dist/module.d.ts CHANGED
@@ -3,6 +3,9 @@ import * as _nuxt_schema from '@nuxt/schema';
3
3
  declare const core: {
4
4
  limit_per_page: number;
5
5
  default_primary_key: string;
6
+ date_format: string;
7
+ date_time_format: string;
8
+ time_format: string;
6
9
  };
7
10
 
8
11
  declare const config_core: typeof core;
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.2",
3
+ "version": "1.4.5",
4
4
  "configKey": "core",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.7.4"
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, installModule, addPlugin, addComponen
2
2
  import 'lodash-es';
3
3
 
4
4
  const name = "@finema/core";
5
- const version = "1.4.2";
5
+ const version = "1.4.5";
6
6
 
7
7
  const colors = {
8
8
  black: "#20243E",
@@ -181,6 +181,44 @@ const button = {
181
181
 
182
182
  const buttonGroup = {};
183
183
 
184
+ const formGroup = {
185
+ default: {
186
+ size: "lg"
187
+ }
188
+ };
189
+
190
+ const checkbox = {};
191
+
192
+ const input = {
193
+ default: {
194
+ size: "lg"
195
+ }
196
+ };
197
+
198
+ const select = {
199
+ default: {
200
+ size: "lg"
201
+ }
202
+ };
203
+
204
+ const selectMenu = {
205
+ default: {
206
+ size: "lg"
207
+ }
208
+ };
209
+
210
+ const textarea = {
211
+ default: {
212
+ size: "lg"
213
+ }
214
+ };
215
+
216
+ const toggle = {
217
+ default: {
218
+ size: "lg"
219
+ }
220
+ };
221
+
184
222
  const colorModeOptions = {
185
223
  preference: "light"
186
224
  };
@@ -317,7 +355,14 @@ const module = defineNuxtModule({
317
355
  pagination,
318
356
  alert,
319
357
  button,
320
- buttonGroup
358
+ buttonGroup,
359
+ formGroup,
360
+ checkbox,
361
+ input,
362
+ select,
363
+ selectMenu,
364
+ textarea,
365
+ toggle
321
366
  },
322
367
  nuxt.options.appConfig.ui
323
368
  );
@@ -1,4 +1,11 @@
1
1
  <template>
2
+ <NuxtLoadingIndicator :color="color" />
2
3
  <Dialog />
3
4
  </template>
4
- <script lang="ts" setup></script>
5
+ <script lang="ts" setup>
6
+ defineProps({
7
+ color: {
8
+ type: String,
9
+ },
10
+ })
11
+ </script>
@@ -9,63 +9,63 @@
9
9
  v-on="option.on ?? {}"
10
10
  />
11
11
  <FormInputText
12
- v-if="option.type === INPUT_TYPES.TEXT"
12
+ v-else-if="option.type === INPUT_TYPES.TEXT"
13
13
  :form="form"
14
14
  v-bind="option.props"
15
15
  v-on="option.on ?? {}"
16
16
  />
17
17
  <FormInputText
18
- v-if="option.type === INPUT_TYPES.PASSWORD"
18
+ v-else-if="option.type === INPUT_TYPES.PASSWORD"
19
19
  type="password"
20
20
  :form="form"
21
21
  v-bind="option.props"
22
22
  v-on="option.on ?? {}"
23
23
  />
24
24
  <FormInputText
25
- v-if="option.type === INPUT_TYPES.EMAIL"
25
+ v-else-if="option.type === INPUT_TYPES.EMAIL"
26
26
  type="email"
27
27
  :form="form"
28
28
  v-bind="option.props"
29
29
  v-on="option.on ?? {}"
30
30
  />
31
31
  <FormInputTextarea
32
- v-if="option.type === INPUT_TYPES.TEXTAREA"
32
+ v-else-if="option.type === INPUT_TYPES.TEXTAREA"
33
33
  :form="form"
34
34
  v-bind="option.props"
35
35
  v-on="option.on ?? {}"
36
36
  />
37
37
  <FormInputToggle
38
- v-if="option.type === INPUT_TYPES.TOGGLE"
38
+ v-else-if="option.type === INPUT_TYPES.TOGGLE"
39
39
  :form="form"
40
40
  v-bind="option.props"
41
41
  v-on="option.on ?? {}"
42
42
  />
43
43
  <FormInputSelect
44
- v-if="option.type === INPUT_TYPES.SELECT"
44
+ v-else-if="option.type === INPUT_TYPES.SELECT"
45
45
  :form="form"
46
46
  v-bind="option.props"
47
47
  v-on="option.on ?? {}"
48
48
  />
49
49
  <FormInputRadio
50
- v-if="option.type === INPUT_TYPES.RADIO"
50
+ v-else-if="option.type === INPUT_TYPES.RADIO"
51
51
  :form="form"
52
52
  v-bind="option.props"
53
53
  v-on="option.on ?? {}"
54
54
  />
55
55
  <FormInputCheckbox
56
- v-if="option.type === INPUT_TYPES.CHECKBOX"
56
+ v-else-if="option.type === INPUT_TYPES.CHECKBOX"
57
57
  :form="form"
58
58
  v-bind="option.props"
59
59
  v-on="option.on ?? {}"
60
60
  />
61
61
  <FormInputDateTime
62
- v-if="option.type === INPUT_TYPES.DATE_TIME"
62
+ v-else-if="option.type === INPUT_TYPES.DATE_TIME"
63
63
  :form="form"
64
64
  v-bind="option.props"
65
65
  v-on="option.on ?? {}"
66
66
  />
67
67
  <FormInputDateTime
68
- v-if="option.type === INPUT_TYPES.DATE"
68
+ v-else-if="option.type === INPUT_TYPES.DATE"
69
69
  :form="form"
70
70
  v-bind="option.props"
71
71
  :disabled-time="true"
@@ -1,8 +1,16 @@
1
1
  import { type IFieldProps, type IFormFieldBase, type INPUT_TYPES } from '#core/components/Form/types';
2
+ export interface ITimeOption {
3
+ hours?: number | string;
4
+ minutes?: number | string;
5
+ seconds?: number | string;
6
+ }
2
7
  export interface IDateTimeFieldProps extends IFieldProps {
3
8
  disabledTime?: boolean;
4
9
  minDate?: Date | string;
5
10
  maxDate?: Date | string;
11
+ startTime?: ITimeOption;
12
+ minTime?: ITimeOption;
13
+ maxTime?: ITimeOption;
6
14
  }
7
15
  export type IDateTimeField = IFormFieldBase<INPUT_TYPES.DATE_TIME | INPUT_TYPES.DATE, IDateTimeFieldProps, {
8
16
  change: (value: string) => void;
@@ -7,12 +7,27 @@
7
7
  select-text="เลือก"
8
8
  locale="th"
9
9
  :enable-time-picker="!disabledTime"
10
- :placeholder="placeholder || 'เลือกวันที่'"
10
+ :placeholder="wrapperProps.placeholder"
11
11
  :format="format"
12
12
  :min-date="minDate"
13
13
  :max-date="maxDate"
14
+ :min-time="minTime"
15
+ :max-time="maxTime"
16
+ :start-time="startTime"
14
17
  :required="isRequired"
15
- />
18
+ time-picker-inline
19
+ >
20
+ <template #dp-input="{ value: innerValue }">
21
+ <UInput
22
+ icon="i-heroicons-calendar-days"
23
+ type="text"
24
+ :value="innerValue"
25
+ :placeholder="wrapperProps.placeholder"
26
+ :readonly="true"
27
+ input-class="cursor-pointer select-none"
28
+ />
29
+ </template>
30
+ </Datepicker>
16
31
  </FieldWrapper>
17
32
  </template>
18
33
  <script lang="ts" setup>
@@ -4,10 +4,11 @@
4
4
  v-model="value"
5
5
  :disabled="wrapperProps.isDisabled"
6
6
  :name="name"
7
- :placeholder="placeholder ?? props.label"
7
+ :placeholder="wrapperProps.placeholder"
8
8
  :type="isShowPassword ? 'text' : props.type || 'text'"
9
9
  :autofocus="!!autoFocus"
10
10
  :icon="icon"
11
+ :readonly="isReadonly"
11
12
  :ui="ui"
12
13
  />
13
14
  </FieldWrapper>
@@ -5,10 +5,11 @@
5
5
  :disabled="wrapperProps.isDisabled"
6
6
  :name="name"
7
7
  :resize="resize"
8
- :placeholder="placeholder ?? props.label"
8
+ :placeholder="wrapperProps.placeholder"
9
9
  :autofocus="!!autoFocus"
10
10
  :autoresize="autoresize"
11
11
  :rows="rows"
12
+ :readonly="isReadonly"
12
13
  :ui="ui"
13
14
  />
14
15
  </FieldWrapper>
@@ -35,6 +35,7 @@ export interface IFieldProps {
35
35
  classInner?: any;
36
36
  placeholder?: string;
37
37
  isDisabled?: boolean;
38
+ isReadonly?: boolean;
38
39
  isRequired?: boolean;
39
40
  help?: string;
40
41
  ui?: object | any;
@@ -10,6 +10,7 @@ export const useFieldHOC = (newFormProps, opts) => {
10
10
  ...field,
11
11
  wrapperProps: computed(() => ({
12
12
  ...newFormProps,
13
+ placeholder: newFormProps.placeholder || newFormProps.label,
13
14
  errorMessage: field.errorMessage.value
14
15
  }))
15
16
  };
@@ -1,4 +1,7 @@
1
1
  export declare const core: {
2
2
  limit_per_page: number;
3
3
  default_primary_key: string;
4
+ date_format: string;
5
+ date_time_format: string;
6
+ time_format: string;
4
7
  };
@@ -1,4 +1,7 @@
1
1
  export const core = {
2
2
  limit_per_page: 30,
3
- default_primary_key: "id"
3
+ default_primary_key: "id",
4
+ date_format: "yyyy-MM-dd",
5
+ date_time_format: "yyyy-MM-dd HH:mm",
6
+ time_format: "HH:mm"
4
7
  };
@@ -1 +1 @@
1
- export type UIComponentList = 'modal' | 'slideover' | 'dropdown' | 'icon' | 'button' | 'buttonGroup' | 'tabs' | 'card' | 'breadcrumb' | 'badge';
1
+ export type UIComponentList = 'modal' | 'slideover' | 'dropdown' | 'icon' | 'button' | 'buttonGroup' | 'tabs' | 'card' | 'breadcrumb' | 'badge' | 'input';
@@ -0,0 +1,3 @@
1
+ import type { DeepPartial } from '#ui/types';
2
+ import type * as config from '#ui/ui.config';
3
+ export declare const checkbox: DeepPartial<(typeof config)['checkbox']>;
@@ -0,0 +1 @@
1
+ export const checkbox = {};
@@ -0,0 +1,3 @@
1
+ import type { DeepPartial } from '#ui/types';
2
+ import type * as config from '#ui/ui.config';
3
+ export declare const formGroup: DeepPartial<(typeof config)['formGroup']>;
@@ -0,0 +1,5 @@
1
+ export const formGroup = {
2
+ default: {
3
+ size: "lg"
4
+ }
5
+ };
@@ -0,0 +1,3 @@
1
+ import type { DeepPartial } from '#ui/types';
2
+ import type * as config from '#ui/ui.config';
3
+ export declare const input: DeepPartial<(typeof config)['input']>;
@@ -0,0 +1,5 @@
1
+ export const input = {
2
+ default: {
3
+ size: "lg"
4
+ }
5
+ };
@@ -0,0 +1,3 @@
1
+ import type { DeepPartial } from '#ui/types';
2
+ import type * as config from '#ui/ui.config';
3
+ export declare const select: DeepPartial<(typeof config)['select']>;
@@ -0,0 +1,5 @@
1
+ export const select = {
2
+ default: {
3
+ size: "lg"
4
+ }
5
+ };
@@ -0,0 +1,3 @@
1
+ import type { DeepPartial } from '#ui/types';
2
+ import type * as config from '#ui/ui.config';
3
+ export declare const selectMenu: DeepPartial<(typeof config)['selectMenu']>;
@@ -0,0 +1,5 @@
1
+ export const selectMenu = {
2
+ default: {
3
+ size: "lg"
4
+ }
5
+ };
@@ -0,0 +1,3 @@
1
+ import type { DeepPartial } from '#ui/types';
2
+ import type * as config from '#ui/ui.config';
3
+ export declare const textarea: DeepPartial<(typeof config)['textarea']>;
@@ -0,0 +1,5 @@
1
+ export const textarea = {
2
+ default: {
3
+ size: "lg"
4
+ }
5
+ };
@@ -0,0 +1,3 @@
1
+ import type { DeepPartial } from '#ui/types';
2
+ import type * as config from '#ui/ui.config';
3
+ export declare const toggle: DeepPartial<(typeof config)['toggle']>;
@@ -0,0 +1,5 @@
1
+ export const toggle = {
2
+ default: {
3
+ size: "lg"
4
+ }
5
+ };
@@ -1,7 +1,8 @@
1
1
  import { addHours, format, formatISO, isDate, isValid, parse, subHours } from "date-fns";
2
- const dateFormat = "yyyy-MM-dd";
3
- const dateTimeFormat = "yyyy-MM-dd HH:mm";
4
- const timeFormat = "HH:mm";
2
+ import { useCoreConfig } from "#core/composables/useConfig";
3
+ const dateFormat = useCoreConfig().date_format;
4
+ const dateTimeFormat = useCoreConfig().date_time_format;
5
+ const timeFormat = useCoreConfig().time_format;
5
6
  export class TimeHelper {
6
7
  static toUTC = (time) => {
7
8
  if (!time) {
@@ -1,54 +1,63 @@
1
- import { test, assert } from "vitest";
1
+ import { assert, describe, it, vi } from "vitest";
2
2
  import { TimeHelper } from "./TimeHelper.mjs";
3
- test("toUTC should convert time to UTC format", () => {
4
- const inputTime = "2023-12-19 12:00";
5
- const expectedOutput = "2023-12-19 05:00";
6
- const result = TimeHelper.toUTC(inputTime);
7
- assert.equal(result, expectedOutput);
8
- });
9
- test("toLocal should convert time to local format", () => {
10
- const inputTime = "2023-12-19 12:00";
11
- const expectedOutput = "2023-12-19 19:00";
12
- const result = TimeHelper.toLocal(inputTime);
13
- assert.equal(result, expectedOutput);
14
- });
15
- test("getCurrentDate should return the current date in yyyy-MM-dd format", () => {
16
- const expectedOutputRegex = /^\d{4}-\d{2}-\d{2}$/;
17
- const result = TimeHelper.getCurrentDate();
18
- assert.match(result, expectedOutputRegex);
19
- });
20
- test("getDateFormTime should convert time to date format", () => {
21
- const inputTime = "2023-12-19 12:00";
22
- const expectedOutput = "2023-12-19";
23
- const result = TimeHelper.getDateFormTime(inputTime);
24
- assert.equal(result, expectedOutput);
25
- });
26
- test("getDateFormTimeWithLocal should convert time to date format with local time", () => {
27
- const inputTime = "2023-12-19 12:00";
28
- const expectedOutputRegex = /^\d{4}-\d{2}-\d{2}$/;
29
- const result = TimeHelper.getDateFormTimeWithLocal(inputTime);
30
- assert.match(result, expectedOutputRegex);
31
- });
32
- test("getISODateTimeFormTime should convert time to ISO date-time format", () => {
33
- const inputTime = "2023-12-19 14:30";
34
- const expectedOutput = "2023-12-19T14:30:00+07:00";
35
- const result = TimeHelper.getISODateTimeFormTime(inputTime);
36
- assert.equal(result, expectedOutput);
37
- });
38
- test("getDateTimeFormTime should convert time to date-time format", () => {
39
- const inputTime = "2023-12-19 12:00";
40
- const expectedOutputRegex = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/;
41
- const result = TimeHelper.getDateTimeFormTime(inputTime);
42
- assert.match(result, expectedOutputRegex);
43
- });
44
- test("getTimeFormTime should convert time to time format", () => {
45
- const inputTime = "2023-12-19 12:00";
46
- const expectedOutputRegex = /^\d{2}:\d{2}$/;
47
- const result = TimeHelper.getTimeFormTime(inputTime);
48
- assert.match(result, expectedOutputRegex);
49
- });
50
- test("getCurrentDateTime should return the current date and time in yyyy-MM-dd HH:mm format", () => {
51
- const expectedOutputRegex = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/;
52
- const result = TimeHelper.getCurrentDateTime();
53
- assert.match(result, expectedOutputRegex);
3
+ vi.mock("#core/composables/useConfig", () => ({
4
+ useCoreConfig: () => ({
5
+ date_format: "yyyy-MM-dd",
6
+ date_time_format: "yyyy-MM-dd HH:mm",
7
+ time_format: "HH:mm"
8
+ })
9
+ }));
10
+ describe("TimeHelper", async () => {
11
+ it("toUTC should convert time to UTC format", () => {
12
+ const inputTime = "2023-12-19 12:00";
13
+ const expectedOutput = "2023-12-19 05:00";
14
+ const result = TimeHelper.toUTC(inputTime);
15
+ assert.equal(result, expectedOutput);
16
+ });
17
+ it("toLocal should convert time to local format", () => {
18
+ const inputTime = "2023-12-19 12:00";
19
+ const expectedOutput = "2023-12-19 19:00";
20
+ const result = TimeHelper.toLocal(inputTime);
21
+ assert.equal(result, expectedOutput);
22
+ });
23
+ it("getCurrentDate should return the current date in yyyy-MM-dd format", () => {
24
+ const expectedOutputRegex = /^\d{4}-\d{2}-\d{2}$/;
25
+ const result = TimeHelper.getCurrentDate();
26
+ assert.match(result, expectedOutputRegex);
27
+ });
28
+ it("getDateFormTime should convert time to date format", () => {
29
+ const inputTime = "2023-12-19 12:00";
30
+ const expectedOutput = "2023-12-19";
31
+ const result = TimeHelper.getDateFormTime(inputTime);
32
+ assert.equal(result, expectedOutput);
33
+ });
34
+ it("getDateFormTimeWithLocal should convert time to date format with local time", () => {
35
+ const inputTime = "2023-12-19 12:00";
36
+ const expectedOutputRegex = /^\d{4}-\d{2}-\d{2}$/;
37
+ const result = TimeHelper.getDateFormTimeWithLocal(inputTime);
38
+ assert.match(result, expectedOutputRegex);
39
+ });
40
+ it("getISODateTimeFormTime should convert time to ISO date-time format", () => {
41
+ const inputTime = "2023-12-19 14:30";
42
+ const expectedOutput = "2023-12-19T14:30:00+07:00";
43
+ const result = TimeHelper.getISODateTimeFormTime(inputTime);
44
+ assert.equal(result, expectedOutput);
45
+ });
46
+ it("getDateTimeFormTime should convert time to date-time format", () => {
47
+ const inputTime = "2023-12-19 12:00";
48
+ const expectedOutputRegex = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/;
49
+ const result = TimeHelper.getDateTimeFormTime(inputTime);
50
+ assert.match(result, expectedOutputRegex);
51
+ });
52
+ it("getTimeFormTime should convert time to time format", () => {
53
+ const inputTime = "2023-12-19 12:00";
54
+ const expectedOutputRegex = /^\d{2}:\d{2}$/;
55
+ const result = TimeHelper.getTimeFormTime(inputTime);
56
+ assert.match(result, expectedOutputRegex);
57
+ });
58
+ it("getCurrentDateTime should return the current date and time in yyyy-MM-dd HH:mm format", () => {
59
+ const expectedOutputRegex = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$/;
60
+ const result = TimeHelper.getCurrentDateTime();
61
+ assert.match(result, expectedOutputRegex);
62
+ });
54
63
  });
package/package.json CHANGED
@@ -1,79 +1,82 @@
1
- {
2
- "name": "@finema/core",
3
- "version": "1.4.2",
4
- "repository": "https://gitlab.finema.co/finema/ui-kit",
5
- "license": "MIT",
6
- "author": "Finema Dev Core Team",
7
- "type": "module",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/types.d.ts",
11
- "import": "./dist/module.mjs",
12
- "require": "./dist/module.cjs"
13
- }
14
- },
15
- "main": "./dist/module.cjs",
16
- "types": "./dist/types.d.ts",
17
- "files": [
18
- "dist"
19
- ],
20
- "engines": {
21
- "node": ">=18.0.0"
22
- },
23
- "scripts": {
24
- "prepack": "nuxt-module-build build",
25
- "dev": "nuxi dev playground",
26
- "dev:build": "nuxi build playground",
27
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
28
- "lint": "eslint .",
29
- "lint:fix": "eslint . --fix",
30
- "test": "vitest run",
31
- "test:watch": "vitest watch",
32
- "release": "release-it --ci",
33
- "prepare": "husky install"
34
- },
35
- "dependencies": {
36
- "@nuxt/kit": "^3.7.4",
37
- "@nuxt/ui": "^2.11.1",
38
- "@pinia/nuxt": "^0.5.1",
39
- "@vee-validate/nuxt": "^4.12.3",
40
- "@vee-validate/zod": "^4.12.3",
41
- "@vuepic/vue-datepicker": "^7.4.0",
42
- "axios": "^1.6.2",
43
- "date-fns": "^3.0.6",
44
- "i18next": "^23.7.11",
45
- "lodash-es": "^4.17.21",
46
- "nuxt-security": "^1.0.0",
47
- "pinia": "^2.1.7",
48
- "url-join": "^5.0.0",
49
- "zod": "^3.22.4",
50
- "zod-i18n-map": "^2.23.0"
51
- },
52
- "devDependencies": {
53
- "@finema/eslint-config": "^1.2.0",
54
- "@nuxt/devtools": "latest",
55
- "@nuxt/eslint-config": "^0.2.0",
56
- "@nuxt/module-builder": "^0.5.4",
57
- "@nuxt/schema": "^3.7.4",
58
- "@nuxt/test-utils": "^3.9.0",
59
- "@release-it/conventional-changelog": "^8.0.1",
60
- "@types/lodash-es": "^4.17.12",
61
- "@types/node": "^18.18.1",
62
- "changelogen": "^0.5.5",
63
- "eslint": "^8.56.0",
64
- "husky": "^8.0.3",
65
- "lint-staged": "^15.2.0",
66
- "nuxt": "^3.8.2",
67
- "prettier": "^3.1.1",
68
- "release-it": "^17.0.1",
69
- "sass": "^1.69.5",
70
- "stylelint": "^16.0.2",
71
- "stylelint-config-prettier-scss": "^1.0.0",
72
- "stylelint-config-standard-scss": "^12.0.0",
73
- "vitest": "^1.1.0"
74
- },
75
- "lint-staged": {
76
- "*.{ts,vue,tsx,js}": "eslint --fix",
77
- "*.{html,json}": "prettier --write"
78
- }
79
- }
1
+ {
2
+ "name": "@finema/core",
3
+ "version": "1.4.5",
4
+ "repository": "https://gitlab.finema.co/finema/ui-kit",
5
+ "license": "MIT",
6
+ "author": "Finema Dev Core Team",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/types.d.ts",
11
+ "import": "./dist/module.mjs",
12
+ "require": "./dist/module.cjs"
13
+ }
14
+ },
15
+ "main": "./dist/module.cjs",
16
+ "types": "./dist/types.d.ts",
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "engines": {
21
+ "node": ">=18.0.0"
22
+ },
23
+ "scripts": {
24
+ "prepack": "nuxt-module-build build",
25
+ "dev": "nuxi dev playground",
26
+ "dev:build": "nuxi build playground",
27
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
28
+ "lint": "eslint .",
29
+ "lint:fix": "eslint . --fix",
30
+ "test": "vitest run",
31
+ "test:watch": "vitest watch",
32
+ "release": "release-it --ci",
33
+ "prepare": "husky install"
34
+ },
35
+ "dependencies": {
36
+ "@nuxt/kit": "^3.7.4",
37
+ "@nuxt/ui": "^2.11.1",
38
+ "@pinia/nuxt": "^0.5.1",
39
+ "@vee-validate/nuxt": "^4.12.3",
40
+ "@vee-validate/zod": "^4.12.3",
41
+ "@vuepic/vue-datepicker": "^7.4.0",
42
+ "axios": "^1.6.2",
43
+ "date-fns": "^3.0.6",
44
+ "i18next": "^23.7.11",
45
+ "lodash-es": "^4.17.21",
46
+ "nuxt-security": "^1.0.0",
47
+ "pinia": "^2.1.7",
48
+ "url-join": "^5.0.0",
49
+ "zod": "^3.22.4",
50
+ "zod-i18n-map": "^2.23.0"
51
+ },
52
+ "devDependencies": {
53
+ "@finema/eslint-config": "^1.2.0",
54
+ "@nuxt/devtools": "latest",
55
+ "@nuxt/eslint-config": "^0.2.0",
56
+ "@nuxt/module-builder": "^0.5.4",
57
+ "@nuxt/schema": "^3.7.4",
58
+ "@nuxt/test-utils": "^3.9.0",
59
+ "@release-it/conventional-changelog": "^8.0.1",
60
+ "@types/lodash-es": "^4.17.12",
61
+ "@types/node": "^18.18.1",
62
+ "@vue/test-utils": "^2.4.3",
63
+ "changelogen": "^0.5.5",
64
+ "eslint": "^8.56.0",
65
+ "happy-dom": "^12.10.3",
66
+ "husky": "^8.0.3",
67
+ "lint-staged": "^15.2.0",
68
+ "nuxt": "^3.8.2",
69
+ "playwright-core": "^1.40.1",
70
+ "prettier": "^3.1.1",
71
+ "release-it": "^17.0.1",
72
+ "sass": "^1.69.5",
73
+ "stylelint": "^16.0.2",
74
+ "stylelint-config-prettier-scss": "^1.0.0",
75
+ "stylelint-config-standard-scss": "^12.0.0",
76
+ "vitest": "^1.1.0"
77
+ },
78
+ "lint-staged": {
79
+ "*.{ts,vue,tsx,js}": "eslint --fix",
80
+ "*.{html,json}": "prettier --write"
81
+ }
82
+ }