sprintify-ui 0.8.54 → 0.8.56

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,6 +1,6 @@
1
1
  import { ComputedRef, Ref } from 'vue';
2
2
  import { Collection, PaginatedCollection, ResourceCollection, PaginationMetadata } from '@/types';
3
- export declare function useHasPaginatedData(data: Ref<Collection | PaginatedCollection | ResourceCollection | null | undefined>, page?: ComputedRef<number>, perPage?: ComputedRef<number>): {
3
+ export declare function useHasPaginatedData(data: Ref<Collection | PaginatedCollection | ResourceCollection | null | undefined>, page?: ComputedRef<number>, perPage?: ComputedRef<number | undefined>): {
4
4
  items: ComputedRef<Collection>;
5
5
  paginationMetadata: ComputedRef<PaginationMetadata | null>;
6
6
  lastPage: ComputedRef<number>;
@@ -45,6 +45,7 @@ export interface Tick {
45
45
  width: number;
46
46
  label: string;
47
47
  align: "start" | "middle" | string;
48
+ thick: boolean;
48
49
  }
49
50
  export interface Group {
50
51
  date: DateTime;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.8.54",
3
+ "version": "0.8.56",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -20,9 +20,9 @@ export default {
20
20
  },
21
21
  },
22
22
  args: {
23
- url: "https://effettandem.com/api/content/articles",
23
+ url: "https://faker.witify.io/api/todos",
24
24
  urlQuery: {
25
- per_page: 5,
25
+ paginate: '0',
26
26
  },
27
27
  history: false,
28
28
  },
@@ -721,7 +721,13 @@ const dataInternal = computed<ResourceCollection | PaginatedCollection | Collect
721
721
  const { items, paginationMetadata, lastPage } = useHasPaginatedData(
722
722
  dataInternal,
723
723
  page,
724
- computed(() => props.perPage),
724
+ computed(() => {
725
+ if (dataMode.value == REMOTE) {
726
+ return undefined;
727
+ }
728
+
729
+ return props.perPage;
730
+ }),
725
731
  );
726
732
 
727
733
  const itemsInternal = computed(() => {
@@ -111,11 +111,11 @@
111
111
 
112
112
  <line
113
113
  v-if="tick.align == 'middle'"
114
- :x1="tick.width"
115
- :x2="tick.width"
114
+ :x1="tick.width - tick.width"
115
+ :x2="tick.width - tick.width"
116
116
  :y1="24"
117
117
  :y2="HEADER_HEIGHT"
118
- :stroke="slate[300]"
118
+ :stroke="tick.thick ? slate[400] : slate[300]"
119
119
  ></line>
120
120
  </g>
121
121
  </svg>
@@ -223,7 +223,7 @@
223
223
  :y1="0"
224
224
  :y2="height"
225
225
  stroke="black"
226
- :opacity="0.1"
226
+ :opacity="tick.thick ? 0.2 : 0.05"
227
227
  ></line>
228
228
  </g>
229
229
  </svg>
@@ -11,7 +11,7 @@ import { getItems } from '@/utils/getApiData';
11
11
  export function useHasPaginatedData(
12
12
  data: Ref<Collection | PaginatedCollection | ResourceCollection | null | undefined>,
13
13
  page?: ComputedRef<number>,
14
- perPage?: ComputedRef<number>,
14
+ perPage?: ComputedRef<number | undefined>,
15
15
  ) {
16
16
  const items = computed(() => {
17
17
  return getItems(data.value);
@@ -130,12 +130,19 @@ export class Timescale {
130
130
 
131
131
  const label = current.toFormat(this.scale.tick.format);
132
132
 
133
+ let thick = false;
134
+
135
+ if (this.scale.tick.step == 'day' && [6, 1].includes(current.weekday)) {
136
+ thick = true;
137
+ }
138
+
133
139
  const tick = {
134
140
  date: current,
135
141
  x,
136
142
  width,
137
143
  label,
138
144
  align: this.scale.tick.align,
145
+ thick: thick,
139
146
  } as Tick;
140
147
 
141
148
  ticks.push(tick);
@@ -51,6 +51,7 @@ export interface Tick {
51
51
  width: number;
52
52
  label: string;
53
53
  align: "start" | "middle" | string;
54
+ thick: boolean;
54
55
  }
55
56
 
56
57
  export interface Group {