Skip to content

Commit

Permalink
Code Format
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions Bot committed Jun 14, 2024
1 parent 4479b20 commit 03c536b
Show file tree
Hide file tree
Showing 28 changed files with 442 additions and 637 deletions.
17 changes: 7 additions & 10 deletions apps/showcase/doc/datatable/LazyLoadDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -445,16 +445,13 @@ const onRowUnselect = () => {
this.loading = true;
this.lazyParams = { ...this.lazyParams, first: event?.first || this.first };
setTimeout(
() => {
CustomerService.getCustomers({ lazyEvent: JSON.stringify(this.lazyParams) }).then((data) => {
this.customers = data.customers;
this.totalRecords = data.totalRecords;
this.loading = false;
});
},
Math.random() * 1000 + 250
);
setTimeout(() => {
CustomerService.getCustomers({ lazyEvent: JSON.stringify(this.lazyParams) }).then((data) => {
this.customers = data.customers;
this.totalRecords = data.totalRecords;
this.loading = false;
});
}, Math.random() * 1000 + 250);
},
onPage(event) {
this.lazyParams = event;
Expand Down
23 changes: 10 additions & 13 deletions apps/showcase/doc/datatable/virtualscroll/LazyVirtualScrollDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -294,22 +294,19 @@ const loadCarsLazy = (event) => {
}
//simulate remote connection with a timeout
this.loadLazyTimeout = setTimeout(
() => {
let _virtualCars = [...this.virtualCars];
let { first, last } = event;
this.loadLazyTimeout = setTimeout(() => {
let _virtualCars = [...this.virtualCars];
let { first, last } = event;
//load data of required page
const loadedCars = this.cars.slice(first, last);
//load data of required page
const loadedCars = this.cars.slice(first, last);
//populate page of virtual cars
Array.prototype.splice.apply(_virtualCars, [...[first, last - first], ...loadedCars]);
//populate page of virtual cars
Array.prototype.splice.apply(_virtualCars, [...[first, last - first], ...loadedCars]);
this.virtualCars = _virtualCars;
this.lazyLoading = false;
},
Math.random() * 1000 + 250
);
this.virtualCars = _virtualCars;
this.lazyLoading = false;
}, Math.random() * 1000 + 250);
}
}
};
Expand Down
10 changes: 1 addition & 9 deletions apps/showcase/doc/dataview/BasicDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@
<div class="text-lg font-medium mt-2">{{ item.name }}</div>
</div>
<div class="bg-surface-100 p-1" style="border-radius: 30px">
<div
class="bg-surface-0 flex items-center gap-2 justify-center py-1 px-2"
style="
border-radius: 30px;
box-shadow:
0px 1px 2px 0px rgba(0, 0, 0, 0.04),
0px 1px 2px 0px rgba(0, 0, 0, 0.06);
"
>
<div class="bg-surface-0 flex items-center gap-2 justify-center py-1 px-2" style="border-radius: 30px; box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)">
<span class="text-surface-900 font-medium text-sm">{{ item.rating }}</span>
<i class="pi pi-star-fill text-yellow-500"></i>
</div>
Expand Down
20 changes: 2 additions & 18 deletions apps/showcase/doc/dataview/LayoutDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,7 @@
<div class="text-lg font-medium mt-2">{{ item.name }}</div>
</div>
<div class="bg-surface-100 p-1" style="border-radius: 30px">
<div
class="bg-surface-0 flex items-center gap-2 justify-center py-1 px-2"
style="
border-radius: 30px;
box-shadow:
0px 1px 2px 0px rgba(0, 0, 0, 0.04),
0px 1px 2px 0px rgba(0, 0, 0, 0.06);
"
>
<div class="bg-surface-0 flex items-center gap-2 justify-center py-1 px-2" style="border-radius: 30px; box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)">
<span class="text-surface-900 font-medium text-sm">{{ item.rating }}</span>
<i class="pi pi-star-fill text-yellow-500"></i>
</div>
Expand Down Expand Up @@ -73,15 +65,7 @@
<div class="text-lg font-medium mt-1">{{ item.name }}</div>
</div>
<div class="bg-surface-100 p-1" style="border-radius: 30px">
<div
class="bg-surface-0 flex items-center gap-2 justify-center py-1 px-2"
style="
border-radius: 30px;
box-shadow:
0px 1px 2px 0px rgba(0, 0, 0, 0.04),
0px 1px 2px 0px rgba(0, 0, 0, 0.06);
"
>
<div class="bg-surface-0 flex items-center gap-2 justify-center py-1 px-2" style="border-radius: 30px; box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)">
<span class="text-surface-900 font-medium text-sm">{{ item.rating }}</span>
<i class="pi pi-star-fill text-yellow-500"></i>
</div>
Expand Down
10 changes: 1 addition & 9 deletions apps/showcase/doc/dataview/PaginationDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,7 @@
<div class="text-lg font-medium mt-2">{{ item.name }}</div>
</div>
<div class="bg-surface-100 p-1" style="border-radius: 30px">
<div
class="bg-surface-0 flex items-center gap-2 justify-center py-1 px-2"
style="
border-radius: 30px;
box-shadow:
0px 1px 2px 0px rgba(0, 0, 0, 0.04),
0px 1px 2px 0px rgba(0, 0, 0, 0.06);
"
>
<div class="bg-surface-0 flex items-center gap-2 justify-center py-1 px-2" style="border-radius: 30px; box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)">
<span class="text-surface-900 font-medium text-sm">{{ item.rating }}</span>
<i class="pi pi-star-fill text-yellow-500"></i>
</div>
Expand Down
10 changes: 1 addition & 9 deletions apps/showcase/doc/dataview/SortingDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,7 @@
<div class="text-lg font-medium mt-2">{{ item.name }}</div>
</div>
<div class="bg-surface-100 p-1" style="border-radius: 30px">
<div
class="bg-surface-0 flex items-center gap-2 justify-center py-1 px-2"
style="
border-radius: 30px;
box-shadow:
0px 1px 2px 0px rgba(0, 0, 0, 0.04),
0px 1px 2px 0px rgba(0, 0, 0, 0.06);
"
>
<div class="bg-surface-0 flex items-center gap-2 justify-center py-1 px-2" style="border-radius: 30px; box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)">
<span class="text-surface-900 font-medium text-sm">{{ item.rating }}</span>
<i class="pi pi-star-fill text-yellow-500"></i>
</div>
Expand Down
25 changes: 11 additions & 14 deletions apps/showcase/doc/select/LazyVirtualScrollDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,17 @@ const onLazyLoad = (event) => {
}
//imitate delay of a backend call
this.loadLazyTimeout = setTimeout(
() => {
const { first, last } = event;
const items = [...this.items];
for (let i = first; i < last; i++) {
items[i] = { label: `Item #${i}`, value: i };
}
this.items = items;
this.loading = false;
},
Math.random() * 1000 + 250
);
this.loadLazyTimeout = setTimeout(() => {
const { first, last } = event;
const items = [...this.items];
for (let i = first; i < last; i++) {
items[i] = { label: `Item #${i}`, value: i };
}
this.items = items;
this.loading = false;
}, Math.random() * 1000 + 250);
}
}
};
Expand Down
25 changes: 11 additions & 14 deletions apps/showcase/doc/virtualscroller/LazyDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,17 @@ const onLazyLoad = (event) => {
}
//imitate delay of a backend call
this.loadLazyTimeout = setTimeout(
() => {
const { first, last } = event;
const lazyItems = [...this.lazyItems];
for (let i = first; i < last; i++) {
lazyItems[i] = `Item #${i}`;
}
this.lazyItems = lazyItems;
this.lazyLoading = false;
},
Math.random() * 1000 + 250
);
this.loadLazyTimeout = setTimeout(() => {
const { first, last } = event;
const lazyItems = [...this.lazyItems];
for (let i = first; i < last; i++) {
lazyItems[i] = `Item #${i}`;
}
this.lazyItems = lazyItems;
this.lazyLoading = false;
}, Math.random() * 1000 + 250);
}
}
};
Expand Down
19 changes: 9 additions & 10 deletions packages/core/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ declare type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomP

declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;

export declare type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> =
Options extends Array<infer V>
? (e: V, ...args: any[]) => void
: {} extends Options
? (e: string, ...args: any[]) => void
: UnionToIntersection<
{
[key in Event]: Options[key] extends (...args: infer Args) => any ? (e: key, ...args: Args) => void : (e: key, ...args: any[]) => void;
}[Event]
>;
export declare type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V>
? (e: V, ...args: any[]) => void
: {} extends Options
? (e: string, ...args: any[]) => void
: UnionToIntersection<
{
[key in Event]: Options[key] extends (...args: infer Args) => any ? (e: key, ...args: Args) => void : (e: key, ...args: any[]) => void;
}[Event]
>;

export type DefineComponent<P = {}, S = {}, E = {}, M = {}> = _DefineComponent<P, {}, {}, {}, M & MethodOptions, {}, {}, E & ObjectEmitsOptions, string, {}, {}, {}, S & SlotsType>;

Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/accordion/style/AccordionStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const theme = ({ dt }) => `
font-weight: ${dt('accordion.header.font.weight')};
border-radius: ${dt('accordion.header.border.radius')};
transition: background ${dt('accordion.transition.duration')}; color ${dt('accordion.transition.duration')}color ${dt('accordion.transition.duration')}, outline-color ${dt('accordion.transition.duration')}, box-shadow ${dt(
'accordion.transition.duration'
)};
'accordion.transition.duration'
)};
outline-color: transparent;
}
Expand Down
8 changes: 4 additions & 4 deletions packages/primevue/src/autocomplete/style/AutoCompleteStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const theme = ({ dt }) => `
border-left: 0 none;
color: ${dt('autocomplete.dropdown.color')};
transition: background ${dt('autocomplete.transition.duration')}, color ${dt('autocomplete.transition.duration')}, border-color ${dt('autocomplete.transition.duration')}, outline-color ${dt('autocomplete.transition.duration')}, box-shadow ${dt(
'autocomplete.transition.duration'
)};
'autocomplete.transition.duration'
)};
outline-color: transparent;
}
Expand Down Expand Up @@ -148,8 +148,8 @@ const theme = ({ dt }) => `
border-radius: ${dt('autocomplete.border.radius')};
width: 100%;
transition: background ${dt('autocomplete.transition.duration')}, color ${dt('autocomplete.transition.duration')}, border-color ${dt('autocomplete.transition.duration')}, outline-color ${dt('autocomplete.transition.duration')}, box-shadow ${dt(
'autocomplete.transition.duration'
)};
'autocomplete.transition.duration'
)};
outline-color: transparent;
box-shadow: ${dt('autocomplete.shadow')};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const theme = ({ dt }) => `
background: ${dt('cascadeselect.background')};
border: 1px solid ${dt('cascadeselect.border.color')};
transition: background ${dt('cascadeselect.transition.duration')}, color ${dt('cascadeselect.transition.duration')}, border-color ${dt('cascadeselect.transition.duration')}, outline-color ${dt(
'cascadeselect.transition.duration'
)}, box-shadow ${dt('cascadeselect.transition.duration')};
'cascadeselect.transition.duration'
)}, box-shadow ${dt('cascadeselect.transition.duration')};
border-radius: ${dt('cascadeselect.border.radius')};
outline-color: transparent;
box-shadow: ${dt('cascadeselect.shadow')};
Expand Down Expand Up @@ -133,8 +133,8 @@ const theme = ({ dt }) => `
color: ${dt('cascadeselect.option.color')};
background: transparent;
transition: background ${dt('cascadeselect.transition.duration')}, color ${dt('cascadeselect.transition.duration')}, border-color ${dt('cascadeselect.transition.duration')}, box-shadow ${dt(
'cascadeselect.transition.duration'
)}, outline-color ${dt('cascadeselect.transition.duration')};
'cascadeselect.transition.duration'
)}, outline-color ${dt('cascadeselect.transition.duration')};
border-radius: ${dt('cascadeselect.option.border.radius')};
}
Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/checkbox/style/CheckboxStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const theme = ({ dt }) => `
width: ${dt('checkbox.width')};
height: ${dt('checkbox.width')};
transition: background ${dt('checkbox.transition.duration')}, color ${dt('checkbox.transition.duration')}, border-color ${dt('checkbox.transition.duration')}, box-shadow ${dt('checkbox.transition.duration')}, outline-color ${dt(
'checkbox.transition.duration'
)};
'checkbox.transition.duration'
)};
outline-color: transparent;
box-shadow: ${dt('checkbox.shadow')};
}
Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/colorpicker/style/ColorPickerStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const theme = ({ dt }) => `
border: 0 none;
border-radius: ${dt('colorpicker.preview.border.radius')};
transition: background ${dt('colorpicker.transition.duration')}, color ${dt('colorpicker.transition.duration')}, border-color ${dt('colorpicker.transition.duration')}, outline-color ${dt('colorpicker.transition.duration')}, box-shadow ${dt(
'colorpicker.transition.duration'
)};
'colorpicker.transition.duration'
)};
outline-color: transparent;
cursor: pointer;
}
Expand Down
12 changes: 6 additions & 6 deletions packages/primevue/src/datepicker/style/DatePickerStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ const theme = ({ dt }) => `
cursor: pointer;
font-weight: inherit;
transition: background ${dt('datepicker.transition.duration')}, color ${dt('datepicker.transition.duration')}, border-color ${dt('datepicker.transition.duration')}, outline-color ${dt('datepicker.transition.duration')}, box-shadow ${dt(
'datepicker.transition.duration'
)};
'datepicker.transition.duration'
)};
}
.p-datepicker-select-month {
Expand Down Expand Up @@ -264,8 +264,8 @@ const theme = ({ dt }) => `
position: relative;
padding: ${dt('datepicker.date.padding')};
transition: background ${dt('datepicker.transition.duration')}, color ${dt('datepicker.transition.duration')}, border-color ${dt('datepicker.transition.duration')}, box-shadow ${dt('datepicker.transition.duration')}, outline-color ${dt(
'datepicker.transition.duration'
)};
'datepicker.transition.duration'
)};
border-radius: ${dt('datepicker.month.border.radius')};
outline-color: transparent;
color: ${dt('datepicker.date.color')};
Expand Down Expand Up @@ -301,8 +301,8 @@ const theme = ({ dt }) => `
position: relative;
padding: ${dt('datepicker.date.padding')};
transition: background ${dt('datepicker.transition.duration')}, color ${dt('datepicker.transition.duration')}, border-color ${dt('datepicker.transition.duration')}, box-shadow ${dt('datepicker.transition.duration')}, outline-color ${dt(
'datepicker.transition.duration'
)};
'datepicker.transition.duration'
)};
border-radius: ${dt('datepicker.year.border.radius')};
outline-color: transparent;
color: ${dt('datepicker.date.color')};
Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/inputchips/style/InputChipsStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const theme = ({ dt }) => `
border-radius: ${dt('inputchips.border.radius')};
width: 100%;
transition: background ${dt('inputchips.transition.duration')}, color ${dt('inputchips.transition.duration')}, border-color ${dt('inputchips.transition.duration')}, outline-color ${dt('inputchips.transition.duration')}, box-shadow ${dt(
'inputchips.transition.duration'
)};
'inputchips.transition.duration'
)};
outline-color: transparent;
box-shadow: ${dt('inputchips.shadow')};
}
Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/inputtext/style/InputTextStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const theme = ({ dt }) => `
padding: ${dt('inputtext.padding.y')} ${dt('inputtext.padding.x')};
border: 1px solid ${dt('inputtext.border.color')};
transition: background ${dt('inputtext.transition.duration')}, color ${dt('inputtext.transition.duration')}, border-color ${dt('inputtext.transition.duration')}, outline-color ${dt('inputtext.transition.duration')}, box-shadow ${dt(
'inputtext.transition.duration'
)};
'inputtext.transition.duration'
)};
appearance: none;
border-radius: ${dt('inputtext.border.radius')};
outline-color: transparent;
Expand Down
Loading

0 comments on commit 03c536b

Please sign in to comment.