sprintify-ui 0.8.53 → 0.8.55
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.
- package/dist/sprintify-ui.es.js +1482 -1478
- package/dist/types/services/gantt/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/BaseGantt.vue +4 -4
- package/src/components/BaseTagAutocompleteFetch.stories.js +2 -2
- package/src/composables/hasOptions.ts +7 -7
- package/src/services/gantt/timescale.ts +7 -0
- package/src/services/gantt/types.ts +1 -0
package/package.json
CHANGED
|
@@ -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.
|
|
226
|
+
:opacity="tick.thick ? 0.2 : 0.05"
|
|
227
227
|
></line>
|
|
228
228
|
</g>
|
|
229
229
|
</svg>
|
|
@@ -13,8 +13,8 @@ export default {
|
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
args: {
|
|
16
|
-
url: "https://
|
|
17
|
-
labelKey: "
|
|
16
|
+
url: "https://faker.witify.io/api/todos",
|
|
17
|
+
labelKey: "name",
|
|
18
18
|
valueKey: "id",
|
|
19
19
|
},
|
|
20
20
|
decorators: [() => ({ template: '<div class="mb-36"><story/></div>' })],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { NormalizedOption, RawOption } from '@/types';
|
|
3
|
-
import { isArray, isObject } from 'lodash';
|
|
3
|
+
import { get, isArray, isObject } from 'lodash';
|
|
4
4
|
|
|
5
5
|
export function useHasOptions(
|
|
6
6
|
modelValue: Ref<RawOption[] | RawOption | null | undefined>,
|
|
@@ -17,8 +17,8 @@ export function useHasOptions(
|
|
|
17
17
|
}
|
|
18
18
|
return modelValue.value.map((option) => {
|
|
19
19
|
return {
|
|
20
|
-
label: option
|
|
21
|
-
value: option
|
|
20
|
+
label: get(option, labelKey.value) as string,
|
|
21
|
+
value: get(option, valueKey.value) as string | number,
|
|
22
22
|
option: option,
|
|
23
23
|
} as NormalizedOption;
|
|
24
24
|
});
|
|
@@ -28,8 +28,8 @@ export function useHasOptions(
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
return {
|
|
31
|
-
label: modelValue.value
|
|
32
|
-
value: modelValue.value
|
|
31
|
+
label: get(modelValue.value, labelKey.value as never, '') as string,
|
|
32
|
+
value: get(modelValue.value, valueKey.value as never) as string | number,
|
|
33
33
|
option: modelValue.value,
|
|
34
34
|
} as NormalizedOption;
|
|
35
35
|
}
|
|
@@ -39,8 +39,8 @@ export function useHasOptions(
|
|
|
39
39
|
const normalizedOptions = computed((): NormalizedOption[] => {
|
|
40
40
|
return options.value.map((option) => {
|
|
41
41
|
return {
|
|
42
|
-
label: option
|
|
43
|
-
value: option
|
|
42
|
+
label: get(option, labelKey.value, '') as string,
|
|
43
|
+
value: get(option, valueKey.value) as string | number,
|
|
44
44
|
option: option,
|
|
45
45
|
} as NormalizedOption;
|
|
46
46
|
});
|
|
@@ -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);
|