Skip to content

Commit

Permalink
build(deps): bump prettier to 3.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Jun 12, 2024
1 parent b73d33c commit 0c0212c
Show file tree
Hide file tree
Showing 30 changed files with 80 additions and 68 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"@vueuse/core": "^10.4.1",
"feather-icons": "^4.28.0",
"idb-keyval": "^6.2.0",
"prettier": "^3.3.2",
"radix-vue": "^1.5.3",
"showdown": "^2.1.0",
"socket.io-client": "^4.5.1",
Expand All @@ -68,7 +69,7 @@
"husky": ">=6",
"lint-staged": ">=10",
"postcss": "^8.4.21",
"prettier": "2.7.1",
"prettier": "3.3.2",
"prettier-plugin-tailwindcss": "^0.1.13",
"tailwindcss": "^3.2.7",
"typescript": "^5.0.2",
Expand Down
9 changes: 6 additions & 3 deletions src/components/Checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
:disabled="disabled"
:id="htmlId"
:checked="Boolean(modelValue)"
@change="(e) => $emit('update:modelValue', (e.target as HTMLInputElement).checked)"
@change="
(e) =>
$emit('update:modelValue', (e.target as HTMLInputElement).checked)
"
v-bind="attrs"
/>
<label class="block" :class="labelClasses" v-if="label" :for="htmlId">
Expand Down Expand Up @@ -64,8 +67,8 @@ const inputClasses = computed(() => {
let interactionClasses = props.disabled
? ''
: props.padding
? 'focus:ring-0'
: 'hover:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400 active:bg-gray-100'
? 'focus:ring-0'
: 'hover:shadow-sm focus:ring-0 focus-visible:ring-2 focus-visible:ring-gray-400 active:bg-gray-100'
let sizeClasses = {
sm: 'w-3.5 h-3.5',
Expand Down
2 changes: 1 addition & 1 deletion src/components/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export default {
date = this.getDate(
date.getFullYear(),
date.getMonth(),
date.getDate() + incrementer
date.getDate() + incrementer,
)
dates.push(date)
count--
Expand Down
2 changes: 1 addition & 1 deletion src/components/DateRangePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export default {
date = this.getDate(
date.getFullYear(),
date.getMonth(),
date.getDate() + incrementer
date.getDate() + incrementer,
)
dates.push(date)
count--
Expand Down
8 changes: 4 additions & 4 deletions src/components/DateTimePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export default {
date = this.getDate(
date.getFullYear(),
date.getMonth(),
date.getDate() + incrementer
date.getDate() + incrementer,
)
dates.push(date)
count--
Expand Down Expand Up @@ -329,11 +329,11 @@ export default {
date.setHours(this.hour, this.minute, this.second, 0)
// "YYYY-MM-DD HH:MM:SS"
return `${date.getFullYear()}-${this.twoDigit(
date.getMonth() + 1
date.getMonth() + 1,
)}-${this.twoDigit(date.getDate())} ${this.twoDigit(
date.getHours()
date.getHours(),
)}:${this.twoDigit(date.getMinutes())}:${this.twoDigit(
date.getSeconds()
date.getSeconds(),
)}`
},
getDate(...args) {
Expand Down
6 changes: 3 additions & 3 deletions src/components/FeatherIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
const valid = validIcons.includes(value)
if (!valid) {
console.groupCollapsed(
'[frappe-ui] name property for feather-icon must be one of '
'[frappe-ui] name property for feather-icon must be one of ',
)
console.dir(validIcons)
console.groupEnd()
Expand Down Expand Up @@ -51,8 +51,8 @@ export default {
class: [icon.attrs.class, 'shrink-0'],
innerHTML: icon.contents,
},
this.$attrs
)
this.$attrs,
),
)
},
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/FileUploader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {
let errorMessage = 'Error Uploading File'
if (error?._server_messages) {
errorMessage = JSON.parse(
JSON.parse(error._server_messages)[0]
JSON.parse(error._server_messages)[0],
).message
} else if (error?.exc) {
errorMessage = JSON.parse(error.exc)[0].split('\n').slice(-2, -1)[0]
Expand Down
8 changes: 4 additions & 4 deletions src/components/ListFilter/ListFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
:is="
getValueSelector(
filter.field.fieldtype,
filter.field.options
filter.field.options,
)
"
v-model="filter.value"
Expand Down Expand Up @@ -207,7 +207,7 @@ function getOperators(fieldtype) {
{ label: 'Not Equals', value: '!=' },
{ label: 'Like', value: 'like' },
{ label: 'Not Like', value: 'not like' },
]
],
)
}
if (typeNumber.includes(fieldtype)) {
Expand All @@ -219,15 +219,15 @@ function getOperators(fieldtype) {
{ label: '>=', value: '>=' },
{ label: 'Equals', value: '=' },
{ label: 'Not Equals', value: '!=' },
]
],
)
}
if (typeSelect.includes(fieldtype)) {
options.push(
...[
{ label: 'Equals', value: '=' },
{ label: 'Not Equals', value: '!=' },
]
],
)
}
if (typeCheck.includes(fieldtype)) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ListFilter/SearchComplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ watch(
(value) => {
r.doctype = value
r.reload()
}
},
)
const r = createListResource({
Expand All @@ -69,7 +69,7 @@ const options = computed(
r.data?.map((result) => ({
label: result[props.labelField],
value: result[props.valueField],
})) || []
})) || [],
)
const selection = ref(null)
Expand Down
2 changes: 1 addition & 1 deletion src/components/ListView/ListHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:style="{
gridTemplateColumns: getGridTemplateColumns(
list.columns,
list.options.selectable
list.options.selectable,
),
}"
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ListView/ListRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
height: rowHeight,
gridTemplateColumns: getGridTemplateColumns(
list.columns,
list.options.selectable
list.options.selectable,
),
}"
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ListView/ListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const selectable = computed(() => {
let showGroupedRows = computed(() => {
return props.rows.every(
(row) => row.group && row.rows && Array.isArray(row.rows)
(row) => row.group && row.rows && Array.isArray(row.rows),
)
})
Expand Down Expand Up @@ -141,6 +141,6 @@ provide(
slots: slots,
toggleRow,
toggleAllRows,
}))
})),
)
</script>
26 changes: 16 additions & 10 deletions src/components/Popover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,14 @@ export default {
}
if (this.trigger === 'hover') {
if (this.hoverDelay) {
this.hoverTimer = setTimeout(() => {
if (this.pointerOverTargetOrPopup) {
this.open()
}
}, Number(this.hoverDelay) * 1000)
this.hoverTimer = setTimeout(
() => {
if (this.pointerOverTargetOrPopup) {
this.open()
}
},
Number(this.hoverDelay) * 1000,
)
} else {
this.open()
}
Expand All @@ -258,11 +261,14 @@ export default {
clearTimeout(this.leaveTimer)
}
if (this.leaveDelay) {
this.leaveTimer = setTimeout(() => {
if (!this.pointerOverTargetOrPopup) {
this.close()
}
}, Number(this.leaveDelay) * 1000)
this.leaveTimer = setTimeout(
() => {
if (!this.pointerOverTargetOrPopup) {
this.close()
}
},
Number(this.leaveDelay) * 1000,
)
} else {
if (!this.pointerOverTargetOrPopup) {
this.close()
Expand Down
8 changes: 4 additions & 4 deletions src/components/Switch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ const switchCircleClasses = computed(() => {
? 'translate-x-3'
: 'translate-x-0'
: props.modelValue
? 'translate-x-2.5'
: 'translate-x-0',
? 'translate-x-2.5'
: 'translate-x-0',
]
})
Expand All @@ -117,13 +117,13 @@ const switchGroupClasses = computed(() => {
if (switchType.value === SwitchVariant.ONLY_LABEL) {
classes.push(
'group items-center space-x-3 cursor-pointer rounded focus-visible:bg-gray-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-400'
'group items-center space-x-3 cursor-pointer rounded focus-visible:bg-gray-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-400',
)
classes.push(
props.disabled
? 'cursor-not-allowed'
: 'hover:bg-gray-200 active:bg-gray-300'
: 'hover:bg-gray-200 active:bg-gray-300',
)
classes.push(props.size === 'md' ? 'px-3 py-1.5' : 'px-2.5 py-1.5')
Expand Down
4 changes: 2 additions & 2 deletions src/components/TextEditor/InsertVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
uploading
? `Uploading ${progress}%`
: addVideoDialog.url
? 'Change Video'
: 'Upload Video'
? 'Change Video'
: 'Upload Video'
}}
</Button>
<Button
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextEditor/TextEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default {
if (!detectMarkdown(text)) return
if (
!confirm(
'Do you want to convert markdown content to HTML before pasting?'
'Do you want to convert markdown content to HTML before pasting?',
)
)
return
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextEditor/image-extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const dropImagePlugin = () => {
}

const images = Array.from(event.dataTransfer?.files ?? []).filter(
(file) => /image/i.test(file.type)
(file) => /image/i.test(file.type),
)

if (images.length === 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextEditor/mention.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function getSuggestionOptions(options) {
items: ({ query }) => {
return options
.filter((item) =>
item.label.toLowerCase().startsWith(query.toLowerCase())
item.label.toLowerCase().startsWith(query.toLowerCase()),
)
.slice(0, 10)
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tooltip/Tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const props = withDefaults(
hoverDelay: 0.5,
arrowClass: 'fill-gray-900',
disabled: false,
}
},
)
const delayDuration = computed(() => props.hoverDelay * 1000)
Expand Down
4 changes: 2 additions & 2 deletions src/components/toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ function getToastsGroup(position) {
onClose: () => {
toasts.value = toasts.value.filter((t) => t !== toast)
},
})
}),
)
})
}),
)
}

Expand Down
6 changes: 4 additions & 2 deletions src/fonts/Inter/inter.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
font-weight: 100 900;
font-display: swap;
font-style: normal;
src: url('Inter.var.woff2?v=3.19') format('woff2-variations'),
src:
url('Inter.var.woff2?v=3.19') format('woff2-variations'),
url('Inter.var.woff2?v=3.19') format('woff2');
src: url('Inter.var.woff2?v=3.19') format('woff2') tech('variations');
}
Expand All @@ -17,7 +18,8 @@
font-weight: 100 900;
font-display: swap;
font-style: italic;
src: url('Inter-Italic.var.woff2?v=3.19') format('woff2-variations'),
src:
url('Inter-Italic.var.woff2?v=3.19') format('woff2-variations'),
url('Inter-Italic.var.woff2?v=3.19') format('woff2');
src: url('Inter-Italic.var.woff2?v=3.19') format('woff2') tech('variations');
}
Expand Down
12 changes: 6 additions & 6 deletions src/resources/documentResource.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ export function createDocumentResource(options, vm) {
options.onError?.call(vm, error)
},
},
vm
vm,
),
setValue: createResource(setValueOptions, vm),
setValueDebounced: createResource(
{
...setValueOptions,
debounce: options.debounce || 500,
},
vm
vm,
),
save: createResource(
{
Expand All @@ -114,7 +114,7 @@ export function createDocumentResource(options, vm) {
}
},
},
vm
vm,
),
delete: createResource(
{
Expand All @@ -133,7 +133,7 @@ export function createDocumentResource(options, vm) {
},
onError: options.delete?.onError,
},
vm
vm,
),
reload,
setDoc,
Expand All @@ -147,7 +147,7 @@ export function createDocumentResource(options, vm) {
},
{
deep: true,
}
},
)

for (let methodKey in options.whitelistedMethods) {
Expand Down Expand Up @@ -205,7 +205,7 @@ export function createDocumentResource(options, vm) {
},
...otherOptions,
},
vm
vm,
)
}

Expand Down
Loading

0 comments on commit 0c0212c

Please sign in to comment.