frappe-ui 0.1.170 → 0.1.172

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frappe-ui",
3
- "version": "0.1.170",
3
+ "version": "0.1.172",
4
4
  "description": "A set of components and utilities for rapid UI development",
5
5
  "main": "./src/index.ts",
6
6
  "type": "module",
@@ -89,9 +89,9 @@ import { TabButtons } from '../TabButtons'
89
89
  import {
90
90
  getCalendarDates,
91
91
  monthList,
92
- handleSeconds,
93
92
  parseDate,
94
93
  } from './calendarUtils'
94
+ import { dayjs } from "../../utils/dayjs"
95
95
  import CalendarMonthly from './CalendarMonthly.vue'
96
96
  import CalendarWeekly from './CalendarWeekly.vue'
97
97
  import CalendarDaily from './CalendarDaily.vue'
@@ -178,8 +178,8 @@ const parseEvents = computed(() => {
178
178
  props.events?.map((event) => {
179
179
  const { fromDate, toDate, ...rest } = event
180
180
  const date = parseDate(fromDate)
181
- const from_time = new Date(fromDate).toLocaleTimeString()
182
- const to_time = new Date(toDate).toLocaleTimeString()
181
+ const from_time = dayjs(fromDate).format("HH:mm:ss")
182
+ const to_time = dayjs(toDate).format("HH:mm:ss")
183
183
  if (event.isFullDay) {
184
184
  return { ...rest, date }
185
185
  }
@@ -193,14 +193,6 @@ function reloadEvents() {
193
193
  events.value = parseEvents.value
194
194
  }
195
195
 
196
- events.value.forEach((event) => {
197
- if (!event.from_time || !event.to_time) {
198
- return
199
- }
200
- event.from_time = handleSeconds(event.from_time)
201
- event.to_time = handleSeconds(event.to_time)
202
- })
203
-
204
196
  const { showEventModal, newEvent, openNewEventModal } = useEventModal()
205
197
 
206
198
  provide('calendarActions', {
@@ -48,7 +48,7 @@ const layoutReady = ref(false)
48
48
  const options = reactive({
49
49
  colNum: props.cols || 12,
50
50
  margin: [0, 0],
51
- rowHeight: 52,
51
+ rowHeight: props.rowHeight || 52,
52
52
  isDraggable: computed(() => !props.disabled),
53
53
  isResizable: computed(() => !props.disabled),
54
54
  responsive: true,
@@ -21,5 +21,6 @@ export type Layout = Array<LayoutItem>
21
21
 
22
22
  export interface GridLayoutProps {
23
23
  cols?: number
24
+ rowHeight?: number
24
25
  disabled?: Boolean
25
26
  }
@@ -1,5 +1,5 @@
1
1
  import tailwindColors from 'tailwindcss/colors'
2
- import colorsData from './colors.json' assert { type: 'json' }
2
+ import colorsData from './colors.json'
3
3
 
4
4
  function generateColorPalette() {
5
5
  const colorPalette = {