mediacube-ui-v2 0.0.287 → 0.0.288

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.
@@ -1,5 +1,5 @@
1
- import { defineComponent as l, defineAsyncComponent as u, computed as n, openBlock as d, createElementBlock as m, createVNode as _, unref as p } from "vue";
2
- const g = /* @__PURE__ */ l({
1
+ import { defineComponent as u, defineAsyncComponent as d, computed as r, openBlock as _, createElementBlock as m, createVNode as p, unref as f } from "vue";
2
+ const x = /* @__PURE__ */ u({
3
3
  __name: "McTableSort",
4
4
  props: {
5
5
  sort: {
@@ -12,8 +12,8 @@ const g = /* @__PURE__ */ l({
12
12
  }
13
13
  },
14
14
  emits: ["change"],
15
- setup(c, { emit: r }) {
16
- const i = u(() => import("../../../elements/McSvgIcon/McSvgIcon.vue.js")), s = r, e = c, t = n(() => e.column === e.sort.sort_column), o = n(() => {
15
+ setup(c, { emit: i }) {
16
+ const s = d(() => import("../../../elements/McSvgIcon/McSvgIcon.vue.js")), l = i, e = c, t = r(() => e.column === e.sort.sort_column && e.sort.sort_direction !== null), o = r(() => {
17
17
  switch (!0) {
18
18
  case (e.sort.sort_direction === "asc" && t.value):
19
19
  return {
@@ -24,7 +24,7 @@ const g = /* @__PURE__ */ l({
24
24
  case (e.sort.sort_direction === "desc" && t.value):
25
25
  return {
26
26
  direction: "desc",
27
- next_direction: "asc",
27
+ next_direction: null,
28
28
  icon: "arrow_downward"
29
29
  };
30
30
  default:
@@ -35,16 +35,20 @@ const g = /* @__PURE__ */ l({
35
35
  };
36
36
  }
37
37
  }), a = () => {
38
- s("change", {
38
+ const n = o.value.next_direction ? {
39
39
  sort_column: e.column,
40
40
  sort_direction: o.value.next_direction
41
- });
41
+ } : {
42
+ sort_column: null,
43
+ sort_direction: null
44
+ };
45
+ l("change", n);
42
46
  };
43
- return (f, v) => (d(), m("div", {
47
+ return (n, v) => (_(), m("div", {
44
48
  class: "mc-table-sort",
45
49
  onClick: a
46
50
  }, [
47
- _(p(i), {
51
+ p(f(s), {
48
52
  size: "200",
49
53
  name: o.value.icon,
50
54
  color: t.value ? "black" : "gray"
@@ -53,5 +57,5 @@ const g = /* @__PURE__ */ l({
53
57
  }
54
58
  });
55
59
  export {
56
- g as default
60
+ x as default
57
61
  };
@@ -33,7 +33,7 @@ export type ITableTotals<T extends ITableColumnBase> = {
33
33
  };
34
34
  export type ITableData = any[];
35
35
  export interface ITableSort {
36
- sort_column: string;
36
+ sort_column: string | null;
37
37
  sort_direction: SortDirection;
38
38
  }
39
39
  export interface ITableSortState {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediacube-ui-v2",
3
- "version": "0.0.287",
3
+ "version": "0.0.288",
4
4
  "license": "MIT",
5
5
  "description": "Design system for Mediacube services",
6
6
  "sideEffects": [