@finema/core 2.41.1 → 2.42.1

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 (35) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/components/Form/FieldWrapper.vue +13 -13
  4. package/dist/runtime/components/Form/Fields.vue +13 -13
  5. package/dist/runtime/components/Form/InputCheckbox/index.vue +18 -18
  6. package/dist/runtime/components/Form/InputComponent/index.vue +1 -1
  7. package/dist/runtime/components/Form/InputDateTime/index.vue +1 -1
  8. package/dist/runtime/components/Form/InputDateTimeRange/index.vue +1 -1
  9. package/dist/runtime/components/Form/InputMonth/index.vue +52 -52
  10. package/dist/runtime/components/Form/InputNumber/index.vue +20 -20
  11. package/dist/runtime/components/Form/InputSelectMultiple/index.vue +43 -43
  12. package/dist/runtime/components/Form/InputTags/index.vue +23 -23
  13. package/dist/runtime/components/Form/InputTextarea/index.vue +18 -18
  14. package/dist/runtime/components/Form/InputTime/index.vue +38 -38
  15. package/dist/runtime/components/Form/InputToggle/index.vue +17 -17
  16. package/dist/runtime/components/Form/InputUploadDropzone/index.vue +30 -30
  17. package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +50 -50
  18. package/dist/runtime/components/Form/fileState/EmptyState.vue +21 -21
  19. package/dist/runtime/components/Form/fileState/FailedState.vue +33 -33
  20. package/dist/runtime/components/Form/fileState/LoadingState.vue +24 -24
  21. package/dist/runtime/components/Form/fileState/PreviewModal.vue +23 -23
  22. package/dist/runtime/components/Form/index.vue +5 -5
  23. package/dist/runtime/components/Image.vue +28 -28
  24. package/dist/runtime/components/Log/index.vue +17 -17
  25. package/dist/runtime/components/Table/Base.vue +67 -67
  26. package/dist/runtime/components/Table/ColumnDate.vue +1 -1
  27. package/dist/runtime/components/Table/ColumnDateTime.vue +1 -1
  28. package/dist/runtime/components/Table/ColumnImage.vue +4 -4
  29. package/dist/runtime/components/Table/ColumnText.vue +1 -1
  30. package/dist/runtime/components/Table/Simple.vue +20 -20
  31. package/dist/runtime/composables/useFlexDeck.d.ts +2 -1
  32. package/dist/runtime/composables/useFlexDeck.js +4 -3
  33. package/dist/runtime/server/tsconfig.json +3 -3
  34. package/dist/runtime/styles/main.css +1 -1
  35. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <Image
3
- class="h-12 rounded"
4
- :src="getValue"
5
- />
2
+ <Image
3
+ class="h-12 rounded"
4
+ :src="getValue"
5
+ />
6
6
  </template>
7
7
 
8
8
  <script setup>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- {{ getValue }}
2
+ {{ getValue }}
3
3
  </template>
4
4
 
5
5
  <script setup>
@@ -1,24 +1,24 @@
1
1
  <template>
2
- <Base
3
- v-bind="$attrs"
4
- :columns="options.columns"
5
- :raw-data="itemsByPage"
6
- :status="options.status"
7
- :page-options="pageOptions"
8
- :is-hide-pagination="options.isHidePagination"
9
- :is-hide-caption="options.isHideCaption"
10
- @page-change="onPageChange"
11
- >
12
- <template
13
- v-for="(_, slot) of $slots"
14
- #[slot]="slotProps"
15
- >
16
- <slot
17
- :name="slot"
18
- v-bind="slotProps || {}"
19
- />
20
- </template>
21
- </Base>
2
+ <Base
3
+ v-bind="$attrs"
4
+ :columns="options.columns"
5
+ :raw-data="itemsByPage"
6
+ :status="options.status"
7
+ :page-options="pageOptions"
8
+ :is-hide-pagination="options.isHidePagination"
9
+ :is-hide-caption="options.isHideCaption"
10
+ @page-change="onPageChange"
11
+ >
12
+ <template
13
+ v-for="(_, slot) of $slots"
14
+ #[slot]="slotProps"
15
+ >
16
+ <slot
17
+ :name="slot"
18
+ v-bind="slotProps || {}"
19
+ />
20
+ </template>
21
+ </Base>
22
22
  </template>
23
23
 
24
24
  <script setup>
@@ -5,6 +5,7 @@ import type { IFlexDeckOptions } from '#core/components/FlexDeck/types';
5
5
  export interface IUseFlexDeck<T = object> {
6
6
  repo: IUsePageLoader<T> | Store<any, any>;
7
7
  options?: (() => Partial<IFlexDeckOptions<T>>) | Partial<IFlexDeckOptions<T>>;
8
+ transformItems?: (items: T[]) => T[];
8
9
  }
9
- export declare const createFlexDeckOptions: <T = object>(repo: IUsePageLoader<T>, options: Partial<IFlexDeckOptions<T>>) => IFlexDeckOptions<T>;
10
+ export declare const createFlexDeckOptions: <T = object>(repo: IUsePageLoader<T>, options: Partial<IFlexDeckOptions<T>>, transformItems?: (items: T[]) => T[]) => IFlexDeckOptions<T>;
10
11
  export declare const useFlexDeck: <T = object>(options: IUseFlexDeck<T>) => ComputedRef<IFlexDeckOptions<T>>;
@@ -1,9 +1,9 @@
1
1
  import { get } from "@vueuse/core";
2
2
  import { computed, useCoreConfig } from "#imports";
3
- export const createFlexDeckOptions = (repo, options) => {
3
+ export const createFlexDeckOptions = (repo, options, transformItems) => {
4
4
  const config = useCoreConfig();
5
5
  return {
6
- rawData: get(repo.fetch.items),
6
+ rawData: transformItems ? transformItems(get(repo.fetch.items)) : get(repo.fetch.items),
7
7
  pageOptions: get(repo.fetch.options),
8
8
  status: get(repo.fetch.status),
9
9
  primary: get(repo.fetch.options).primary || config.default_primary_key,
@@ -14,6 +14,7 @@ export const createFlexDeckOptions = (repo, options) => {
14
14
  export const useFlexDeck = (options) => computed(() => {
15
15
  return createFlexDeckOptions(
16
16
  options.repo,
17
- typeof options.options === "function" ? options.options() : options.options ?? {}
17
+ typeof options.options === "function" ? options.options() : options.options ?? {},
18
+ options.transformItems
18
19
  );
19
20
  });
@@ -1,3 +1,3 @@
1
- {
2
- "extends": "../../../.nuxt/tsconfig.server.json",
3
- }
1
+ {
2
+ "extends": "../../../.nuxt/tsconfig.server.json",
3
+ }
@@ -1 +1 @@
1
- @import "tailwindcss";@import "@nuxt/ui";@plugin "@tailwindcss/typography";@source inline("prose");@theme{--font-sans:"Noto Sans Thai","Noto Sans Thai Looped","Public Sans",sans-serif}@theme static{--color-main:#232c5a;--color-main-50:#f4f4f7;--color-main-100:#e9eaef;--color-main-200:#c8cad6;--color-main-300:#a7abbd;--color-main-400:#656b8c;--color-main-500:#232c5a;--color-main-600:#202851;--color-main-700:#151a36;--color-main-800:#101429;--color-main-900:#0b0d1b;--color-main-950:#0b0d1b;--color-secondary:#ee8b36;--color-secondary-50:#fdf1e7;--color-secondary-100:#f9d6b8;--color-secondary-200:#f5bb89;--color-secondary-300:#f1a05a;--color-secondary-400:#ed852b;--color-secondary-500:#d46b12;--color-secondary-600:#a5540e;--color-secondary-700:#763c0a;--color-secondary-800:#472406;--color-secondary-900:#180c02;--color-info:#0d8cee;--color-info-50:#f3f9fe;--color-info-100:#e7f4fd;--color-info-200:#ebf6ff;--color-info-300:#9ed1f8;--color-info-400:#56aff3;--color-info-500:#0d8cee;--color-info-600:#0c7ed6;--color-info-700:#08548f;--color-info-800:#063f6b;--color-info-900:#042a47;--color-error:#f25555;--color-error-50:#fef7f7;--color-error-100:#feeeee;--color-error-200:#ffdfdf;--color-error-300:#fabbbb;--color-error-400:#f68888;--color-error-500:#f25555;--color-error-600:#da4d4d;--color-error-700:#913333;--color-error-800:#6d2626;--color-error-900:#491a1a;--color-success:#3fb061;--color-success-50:#f5fbf7;--color-success-100:#ecf7ef;--color-success-200:#daeee0;--color-success-300:#b2dfc0;--color-success-400:#79c890;--color-success-500:#3fb061;--color-success-600:#399e57;--color-success-700:#266a3a;--color-success-800:#1c4f2c;--color-success-900:#13351d;--color-warning:#ff9a35;--color-warning-50:#fffaf5;--color-warning-100:#fff5eb;--color-warning-200:#fef1cc;--color-warning-300:#ffd7ae;--color-warning-400:#ffb872;--color-warning-500:#ff9a35;--color-warning-600:#e68b30;--color-warning-700:#995c20;--color-warning-800:#734518;--color-warning-900:#4d2e10}::-webkit-scrollbar{-webkit-appearance:none;height:10px;width:10px}::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:4px;box-shadow:0 0 1px hsla(0,0%,100%,.5)}:root{--dp-font-family:inherit!important}.dp__theme_light{--dp-primary-color:var(--color-main)!important;--dp-primary-disabled-color:var(--color-main-200)!important}#__nuxt,body,html{@apply w-full h-full}
1
+ @import "tailwindcss";@import "@nuxt/ui";@plugin "@tailwindcss/typography";@source inline("prose");@theme{--font-sans:"Noto Sans Thai","Noto Sans Thai Looped","Public Sans",sans-serif}@theme static{--color-main:#232c5a;--color-main-50:#f4f4f7;--color-main-100:#e9eaef;--color-main-200:#c8cad6;--color-main-300:#a7abbd;--color-main-400:#656b8c;--color-main-500:#232c5a;--color-main-600:#202851;--color-main-700:#151a36;--color-main-800:#101429;--color-main-900:#0b0d1b;--color-main-950:#0b0d1b;--color-secondary:#ee8b36;--color-secondary-50:#fdf1e7;--color-secondary-100:#f9d6b8;--color-secondary-200:#f5bb89;--color-secondary-300:#f1a05a;--color-secondary-400:#ed852b;--color-secondary-500:#d46b12;--color-secondary-600:#a5540e;--color-secondary-700:#763c0a;--color-secondary-800:#472406;--color-secondary-900:#180c02;--color-info:#0d8cee;--color-info-50:#f3f9fe;--color-info-100:#e7f4fd;--color-info-200:#ebf6ff;--color-info-300:#9ed1f8;--color-info-400:#56aff3;--color-info-500:#0d8cee;--color-info-600:#0c7ed6;--color-info-700:#08548f;--color-info-800:#063f6b;--color-info-900:#042a47;--color-error:#f25555;--color-error-50:#fef7f7;--color-error-100:#feeeee;--color-error-200:#ffdfdf;--color-error-300:#fabbbb;--color-error-400:#f68888;--color-error-500:#f25555;--color-error-600:#da4d4d;--color-error-700:#913333;--color-error-800:#6d2626;--color-error-900:#491a1a;--color-success:#3fb061;--color-success-50:#f5fbf7;--color-success-100:#ecf7ef;--color-success-200:#daeee0;--color-success-300:#b2dfc0;--color-success-400:#79c890;--color-success-500:#3fb061;--color-success-600:#399e57;--color-success-700:#266a3a;--color-success-800:#1c4f2c;--color-success-900:#13351d;--color-warning:#ff9a35;--color-warning-50:#fffaf5;--color-warning-100:#fff5eb;--color-warning-200:#fef1cc;--color-warning-300:#ffd7ae;--color-warning-400:#ffb872;--color-warning-500:#ff9a35;--color-warning-600:#e68b30;--color-warning-700:#995c20;--color-warning-800:#734518;--color-warning-900:#4d2e10}::-webkit-scrollbar{-webkit-appearance:none;height:10px;width:10px}::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:4px;box-shadow:0 0 1px hsla(0,0%,100%,.5)}:root{--dp-font-family:inherit!important}.dp__theme_light{--dp-primary-color:var(--color-main)!important;--dp-primary-disabled-color:var(--color-main-200)!important}.dp__outer_menu_wrap{@apply ring-1 ring-gray-200}[role=dialog]{pointer-events:auto!important}#__nuxt,body,html{@apply w-full h-full}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "2.41.1",
3
+ "version": "2.42.1",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",
@@ -93,4 +93,4 @@
93
93
  "lint-staged": {
94
94
  "*": "eslint --fix --quiet"
95
95
  }
96
- }
96
+ }