@vc-shell/framework 1.0.230 → 1.0.232

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 (29) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/framework.js +11282 -11261
  3. package/dist/index.css +1 -1
  4. package/dist/shared/modules/dynamic/components/SchemaRender.d.ts.map +1 -1
  5. package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts.map +1 -1
  6. package/dist/shared/modules/dynamic/types/index.d.ts +5 -1
  7. package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
  8. package/dist/tsconfig.tsbuildinfo +1 -1
  9. package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts +7 -7
  10. package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +2 -2
  11. package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
  12. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
  13. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.stories.d.ts +19 -0
  14. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.stories.d.ts.map +1 -1
  15. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +4 -0
  16. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
  17. package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
  18. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
  19. package/package.json +4 -4
  20. package/shared/modules/dynamic/components/SchemaRender.ts +0 -2
  21. package/shared/modules/dynamic/components/fields/InputCurrency.ts +1 -0
  22. package/shared/modules/dynamic/types/index.ts +5 -1
  23. package/ui/components/atoms/vc-status/vc-status.vue +5 -2
  24. package/ui/components/atoms/vc-tooltip/vc-tooltip.vue +1 -1
  25. package/ui/components/molecules/vc-input/vc-input.vue +17 -2
  26. package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +23 -0
  27. package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +71 -56
  28. package/ui/components/organisms/vc-table/vc-table.stories.ts +1 -1
  29. package/ui/components/organisms/vc-table/vc-table.vue +15 -9
@@ -326,7 +326,7 @@
326
326
  v-if="
327
327
  enableItemActions && itemActionBuilder && typeof item === 'object' && selectedRowIndex === itemIndex
328
328
  "
329
- class="tw-absolute tw-flex tw-right-[10px] actions tw-h-full tw-bg-[#f4f8fb]"
329
+ class="tw-absolute tw-flex tw-right-0 tw-px-[10px] actions tw-h-full tw-bg-[#f4f8fb]"
330
330
  :class="{
331
331
  'group-hover:!tw-bg-[#dfeef9]': hasClickListener,
332
332
  }"
@@ -936,12 +936,12 @@ function onColumnHeaderDragStart(event: DragEvent, item: ITableColumns) {
936
936
  }
937
937
 
938
938
  function findParentHeader(element: HTMLElement) {
939
- if (element.nodeName === "TH") {
939
+ if (element.classList.contains("vc-table__header")) {
940
940
  return element;
941
941
  } else {
942
942
  let parent = element.parentElement;
943
943
 
944
- while (parent && parent.nodeName !== "TH") {
944
+ while (parent && !parent.classList.contains("vc-table__header")) {
945
945
  parent = parent.parentElement;
946
946
  if (!parent) break;
947
947
  }
@@ -965,11 +965,11 @@ function onColumnHeaderDragOver(event: DragEvent) {
965
965
  reorderRef.value.style.top = dropHeaderOffset.top - getOffset(tableRef.value).top + "px";
966
966
 
967
967
  if (event.pageX > columnCenter) {
968
- reorderRef.value.style.left = targetLeft + dropHeader.offsetWidth + "px";
968
+ reorderRef.value.style.left = targetLeft + dropHeader.offsetWidth - 5 + "px";
969
969
 
970
970
  dropPosition.value = 1;
971
971
  } else {
972
- reorderRef.value.style.left = targetLeft + "px";
972
+ reorderRef.value.style.left = targetLeft - 5 + "px";
973
973
  dropPosition.value = -1;
974
974
  }
975
975
 
@@ -1024,7 +1024,8 @@ function onColumnHeaderDrop(event: DragEvent, item: ITableColumns) {
1024
1024
  function saveState() {
1025
1025
  console.debug("[@vc-shell/framework#vc-table.vue] - Save state");
1026
1026
 
1027
- state.value = internalColumns.value.map((col) => _.pick(col, "id", "visible", "width", "predefined"));
1027
+ const colsClone = _.cloneDeep(internalColumns.value);
1028
+ state.value = colsClone.map((col) => _.pick(col, "id", "visible", "width", "predefined"));
1028
1029
  }
1029
1030
 
1030
1031
  function restoreState() {
@@ -1045,9 +1046,14 @@ function restoreState() {
1045
1046
  }
1046
1047
  }
1047
1048
  // Merge the updated columns with the remaining state columns
1048
- internalColumns.value = _.values(
1049
- _.merge(_.keyBy(props.columns, "id"), _.keyBy(allColumns.value, "id"), _.keyBy(state.value, "id")),
1050
- );
1049
+ internalColumns.value = state.value.map((stateItem) => {
1050
+ const id = stateItem.id;
1051
+
1052
+ const propsColumn = _.find(props.columns, { id });
1053
+ const allColumn = _.find(allColumns.value, { id });
1054
+
1055
+ return _.merge({}, propsColumn, allColumn, stateItem);
1056
+ });
1051
1057
  } else {
1052
1058
  internalColumns.value = allColumns.value;
1053
1059
  }