Refactor #5612 - Calendar / DatePicker

pull/5677/head
tugcekucukoglu 2024-04-18 17:13:33 +03:00
parent 9303e9c3ab
commit 1428cc12df
21 changed files with 4261 additions and 4066 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
import { BaseStyle } from '../../base/style';
import { DatePickerStyle } from '../../datepicker/style/DatePickerStyle';
export interface CalendarStyle extends BaseStyle {}
export interface CalendarStyle extends DatePickerStyle {}

View File

@ -1,68 +1,5 @@
import BaseStyle from 'primevue/base/style';
const inlineStyles = {
root: ({ props }) => ({ position: props.appendTo === 'self' ? 'relative' : undefined })
};
const classes = {
root: ({ props, state }) => [
'p-datepicker p-component p-inputwrapper',
{
'p-invalid': props.invalid,
'p-inputwrapper-filled': props.modelValue,
'p-inputwrapper-focus': state.focused,
'p-focus': state.focused || state.overlayVisible
}
],
input: 'p-datepicker-input',
dropdownButton: 'p-datepicker-dropdown',
inputIconContainer: 'p-datepicker-input-icon-container',
inputIcon: 'p-datepicker-input-icon',
panel: ({ instance, props }) => [
'p-datepicker-panel p-component',
{
'p-datepicker-panel-inline': props.inline,
'p-disabled': props.disabled,
'p-datepicker-timeonly': props.timeOnly,
'p-ripple-disabled': instance.$primevue.config.ripple === false
}
],
group: 'p-datepicker-calendar-container',
calendar: 'p-datepicker-calendar',
header: 'p-datepicker-header',
previousButton: 'p-datepicker-prev-button',
title: 'p-datepicker-title',
monthTitle: 'p-datepicker-view-month p-link',
yearTitle: 'p-datepicker-view-year p-link',
decadeTitle: 'p-datepicker-decade',
nextButton: 'p-datepicker-next-button',
grid: 'p-datepicker-day-view',
weekHeader: 'p-datepicker-weekheader p-disabled',
weekNumber: 'p-datepicker-weeknumber',
weekLabelContainer: 'p-disabled',
weekDay: 'p-datepicker-weekday-cell',
weekDayLabel: 'p-date-picker-weekday',
day: ({ date }) => ['p-datepicker-day-cell', { 'p-datepicker-other-month': date.otherMonth, 'p-datepicker-today': date.today }],
dayLabel: ({ instance, props, date }) => ['p-datepicker-day', { 'p-datepicker-day-selected': instance.isSelected(date) && date.selectable, 'p-disabled': props.disabled || !date.selectable }],
monthPicker: 'p-datepicker-month-view',
month: ({ instance, props, month, index }) => ['p-datepicker-month', { 'p-datepicker-month-selected': instance.isMonthSelected(index), 'p-disabled': props.disabled || !month.selectable }],
yearPicker: 'p-datepicker-year-view',
year: ({ instance, props, year }) => ['p-datepicker-year', { 'p-datepicker-year-selected': instance.isYearSelected(year.value), 'p-disabled': props.disabled || !year.selectable }],
timePicker: 'p-datepicker-time-picker',
hourPicker: 'p-datepicker-hour-picker',
incrementButton: 'p-datepicker-increment-button',
decrementButton: 'p-datepicker-decrement-button',
separatorContainer: 'p-datepicker-separator',
minutePicker: 'p-minute-picker',
secondPicker: 'p-second-picker',
ampmPicker: 'p-ampm-picker',
buttonbar: 'p-datepicker-buttonbar',
todayButton: 'p-datepicker-today-button',
clearButton: 'p-datepicker-clear-button'
};
export default BaseStyle.extend({
name: 'calendar',
classes,
inlineStyles
name: 'calendar'
});

View File

@ -1,9 +1,9 @@
<script>
import BaseComponent from 'primevue/basecomponent';
import CalendarStyle from 'primevue/calendar/style';
import DatePickerStyle from 'primevue/datepicker/style';
export default {
name: 'BaseCalendar',
name: 'BaseDatePicker',
extends: BaseComponent,
props: {
modelValue: null,
@ -249,7 +249,7 @@ export default {
default: null
}
},
style: CalendarStyle,
style: DatePickerStyle,
provide() {
return {
$parentInstance: this

1044
components/lib/datepicker/DatePicker.d.ts vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,12 @@
import { mount } from '@vue/test-utils';
import PrimeVue from 'primevue/config';
import Calendar from './Calendar.vue';
import DatePicker from './DatePicker.vue';
describe('Calendar.vue', () => {
describe('DatePicker.vue', () => {
let wrapper;
beforeEach(() => {
wrapper = mount(Calendar, {
wrapper = mount(DatePicker, {
global: {
plugins: [PrimeVue],
stubs: {
@ -20,7 +20,7 @@ describe('Calendar.vue', () => {
});
it('should exist', async () => {
expect(wrapper.find('.p-calendar.p-component').exists()).toBe(true);
expect(wrapper.find('.p-datepicker.p-component').exists()).toBe(true);
expect(wrapper.find('.p-inputtext').exists()).toBe(true);
let input = wrapper.find('.p-inputtext');

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
{
"main": "./datepicker.cjs.js",
"module": "./datepicker.esm.js",
"unpkg": "./datepicker.min.js",
"types": "./DatePicker.d.ts",
"browser": {
"./sfc": "./DatePicker.vue"
}
}

View File

@ -0,0 +1,3 @@
import { BaseStyle } from '../../base/style';
export interface DatePickerStyle extends BaseStyle {}

View File

@ -0,0 +1,68 @@
import BaseStyle from 'primevue/base/style';
const inlineStyles = {
root: ({ props }) => ({ position: props.appendTo === 'self' ? 'relative' : undefined })
};
const classes = {
root: ({ props, state }) => [
'p-datepicker p-component p-inputwrapper',
{
'p-invalid': props.invalid,
'p-inputwrapper-filled': props.modelValue,
'p-inputwrapper-focus': state.focused,
'p-focus': state.focused || state.overlayVisible
}
],
input: 'p-datepicker-input',
dropdownButton: 'p-datepicker-dropdown',
inputIconContainer: 'p-datepicker-input-icon-container',
inputIcon: 'p-datepicker-input-icon',
panel: ({ instance, props }) => [
'p-datepicker-panel p-component',
{
'p-datepicker-panel-inline': props.inline,
'p-disabled': props.disabled,
'p-datepicker-timeonly': props.timeOnly,
'p-ripple-disabled': instance.$primevue.config.ripple === false
}
],
group: 'p-datepicker-calendar-container',
calendar: 'p-datepicker-calendar',
header: 'p-datepicker-header',
previousButton: 'p-datepicker-prev-button',
title: 'p-datepicker-title',
monthTitle: 'p-datepicker-view-month p-link',
yearTitle: 'p-datepicker-view-year p-link',
decadeTitle: 'p-datepicker-decade',
nextButton: 'p-datepicker-next-button',
grid: 'p-datepicker-day-view',
weekHeader: 'p-datepicker-weekheader p-disabled',
weekNumber: 'p-datepicker-weeknumber',
weekLabelContainer: 'p-disabled',
weekDay: 'p-datepicker-weekday-cell',
weekDayLabel: 'p-date-picker-weekday',
day: ({ date }) => ['p-datepicker-day-cell', { 'p-datepicker-other-month': date.otherMonth, 'p-datepicker-today': date.today }],
dayLabel: ({ instance, props, date }) => ['p-datepicker-day', { 'p-datepicker-day-selected': instance.isSelected(date) && date.selectable, 'p-disabled': props.disabled || !date.selectable }],
monthPicker: 'p-datepicker-month-view',
month: ({ instance, props, month, index }) => ['p-datepicker-month', { 'p-datepicker-month-selected': instance.isMonthSelected(index), 'p-disabled': props.disabled || !month.selectable }],
yearPicker: 'p-datepicker-year-view',
year: ({ instance, props, year }) => ['p-datepicker-year', { 'p-datepicker-year-selected': instance.isYearSelected(year.value), 'p-disabled': props.disabled || !year.selectable }],
timePicker: 'p-datepicker-time-picker',
hourPicker: 'p-datepicker-hour-picker',
incrementButton: 'p-datepicker-increment-button',
decrementButton: 'p-datepicker-decrement-button',
separatorContainer: 'p-datepicker-separator',
minutePicker: 'p-minute-picker',
secondPicker: 'p-second-picker',
ampmPicker: 'p-ampm-picker',
buttonbar: 'p-datepicker-buttonbar',
todayButton: 'p-datepicker-today-button',
clearButton: 'p-datepicker-clear-button'
};
export default BaseStyle.extend({
name: 'datepicker',
classes,
inlineStyles
});

View File

@ -0,0 +1,6 @@
{
"main": "./datepickerstyle.cjs.js",
"module": "./datepickerstyle.esm.js",
"unpkg": "./datepickerstyle.min.js",
"types": "./DatePickerStyle.d.ts"
}

View File

@ -24,27 +24,27 @@ export default {
justify-content: center;
overflow: hidden;
position: relative;
width: ${dt('calendar.dropdown.width')};
width: ${dt('datepicker.dropdown.width')};
border-top-right-radius: ${dt('rounded.base')};
border-bottom-right-radius: ${dt('rounded.base')};
background: ${dt('calendar.dropdown.background')};
border: 1px solid ${dt('calendar.dropdown.border.color')};
background: ${dt('datepicker.dropdown.background')};
border: 1px solid ${dt('datepicker.dropdown.border.color')};
border-left: 0 none;
background: ${dt('calendar.dropdown.background')};
background: ${dt('datepicker.dropdown.background')};
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
outline-color: transparent;
}
.p-datepicker-dropdown:not(:disabled):hover {
background: ${dt('calendar.dropdown.hover.background')};
border-color: ${dt('calendar.dropdown.hover.border.color')};
background: ${dt('calendar.dropdown.hover.background')};
background: ${dt('datepicker.dropdown.hover.background')};
border-color: ${dt('datepicker.dropdown.hover.border.color')};
background: ${dt('datepicker.dropdown.hover.background')};
}
.p-datepicker-dropdown:not(:disabled):active {
background: ${dt('calendar.dropdown.active.background')};
border-color: ${dt('calendar.dropdown.active.border.color')};
background: ${dt('calendar.dropdown.active.background')};
background: ${dt('datepicker.dropdown.active.background')};
border-color: ${dt('datepicker.dropdown.active.border.color')};
background: ${dt('datepicker.dropdown.active.background')};
}
.p-datepicker-dropdown:focus-visible {
@ -83,9 +83,9 @@ export default {
.p-datepicker-panel {
width: auto;
padding: 0.75rem;
background: ${dt('calendar.background')};
color: ${dt('calendar.color')};
border: 1px solid ${dt('calendar.border.color')};
background: ${dt('datepicker.background')};
color: ${dt('datepicker.color')};
border: 1px solid ${dt('datepicker.border.color')};
border-radius: ${dt('rounded.base')};
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
@ -102,9 +102,9 @@ export default {
justify-content: space-between;
padding: 0 0 0.5rem 0;
font-weight: 500;
background: ${dt('calendar.header.background')};
color: ${dt('calendar.header.color')};
border-bottom: 1px solid ${dt('calendar.header.border.color')};
background: ${dt('datepicker.header.background')};
color: ${dt('datepicker.header.color')};
border-bottom: 1px solid ${dt('datepicker.header.border.color')};
}
.p-datepicker-title {
@ -121,43 +121,43 @@ export default {
.p-datepicker-view-month {
margin-right: 0.5rem;
color: ${dt('calendar.month.picker.color')};
color: ${dt('datepicker.month.picker.color')};
}
.p-datepicker-view-year {
margin-right: 0.5rem;
color: ${dt('calendar.year.picker.color')};
color: ${dt('datepicker.year.picker.color')};
}
.p-datepicker-view-month:enabled:hover {
background: ${dt('calendar.month.picker.hover.background')};
color: ${dt('calendar.month.picker.hover.color')};
background: ${dt('datepicker.month.picker.hover.background')};
color: ${dt('datepicker.month.picker.hover.color')};
}
.p-datepicker-view-year:enabled:hover {
background: ${dt('calendar.year.picker.hover.background')};
color: ${dt('calendar.year.picker.hover.color')};
background: ${dt('datepicker.year.picker.hover.background')};
color: ${dt('datepicker.year.picker.hover.color')};
}
.p-datepicker-calendar-container {
.p-datepicker-datepicker-container {
display: flex;
}
.p-datepicker-calendar-container .p-datepicker-calendar {
.p-datepicker-datepicker-container .p-datepicker-datepicker {
flex: 1 1 auto;
border-left: 1px solid ${dt('calendar.group.border.color')};
border-left: 1px solid ${dt('datepicker.group.border.color')};
padding-right: 0.75rem;
padding-left: 0.75rem;
padding-top: 0;
padding-bottom: 0;
}
.p-datepicker-calendar-container .p-datepicker-calendar:first-child {
.p-datepicker-datepicker-container .p-datepicker-datepicker:first-child {
padding-left: 0;
border-left: 0 none;
}
.p-datepicker-calendar-container .p-datepicker-calendar:last-child {
.p-datepicker-datepicker-container .p-datepicker-datepicker:last-child {
padding-right: 0;
}
@ -194,12 +194,12 @@ export default {
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
border: 1px solid transparent;
outline-color: transparent;
color: ${dt('calendar.date.color')};
color: ${dt('datepicker.date.color')};
}
.p-datepicker-day:not(.p-datepicker-day-selected):not(.p-disabled):hover {
background: ${dt('calendar.date.hover.background')};
color: ${dt('calendar.date.hover.color')};
background: ${dt('datepicker.date.hover.background')};
color: ${dt('datepicker.date.hover.color')};
}
.p-datepicker-day:focus-visible {
@ -208,18 +208,18 @@ export default {
}
.p-datepicker-day-selected {
background: ${dt('calendar.date.selected.background')};
color: ${dt('calendar.date.selected.color')};
background: ${dt('datepicker.date.selected.background')};
color: ${dt('datepicker.date.selected.color')};
}
.p-datepicker-today > .p-datepicker-day {
background: ${dt('calendar.today.background')};
color: ${dt('calendar.today.color')};
background: ${dt('datepicker.today.background')};
color: ${dt('datepicker.today.color')};
}
.p-datepicker-today > .p-datepicker-day-selected {
background: ${dt('calendar.date.selected.background')};
color: ${dt('calendar.date.selected.color')};
background: ${dt('datepicker.date.selected.background')};
color: ${dt('datepicker.date.selected.color')};
}
.p-datepicker-month-view {
@ -238,17 +238,17 @@ export default {
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
border-radius: ${dt('rounded.base')};
outline-color: transparent;
color: ${dt('calendar.month.color')};
color: ${dt('datepicker.month.color')};
}
.p-datepicker-month:not(.p-disabled):not(.p-datepicker-month-selected):hover {
color: ${dt('calendar.month.hover.color')};
background: ${dt('calendar.month.hover.background')};
color: ${dt('datepicker.month.hover.color')};
background: ${dt('datepicker.month.hover.background')};
}
.p-datepicker-month-selected {
color: ${dt('calendar.month.selected.color')};
background: ${dt('calendar.month.selected.background')};
color: ${dt('datepicker.month.selected.color')};
background: ${dt('datepicker.month.selected.background')};
}
.p-datepicker-month:not(.p-disabled):focus-visible {
@ -272,17 +272,17 @@ export default {
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
border-radius: ${dt('rounded.base')};
outline-color: transparent;
color: ${dt('calendar.year.color')};
color: ${dt('datepicker.year.color')};
}
.p-datepicker-year:not(.p-disabled):not(.p-datepicker-year-selected):hover {
color: ${dt('calendar.year.hover.color')};
background: ${dt('calendar.year.hover.background')};
color: ${dt('datepicker.year.hover.color')};
background: ${dt('datepicker.year.hover.background')};
}
.p-datepicker-year-selected {
color: ${dt('calendar.year.selected.color')};
background: ${dt('calendar.year.selected.background')};
color: ${dt('datepicker.year.selected.color')};
background: ${dt('datepicker.year.selected.background')};
}
.p-datepicker-year:not(.p-disabled):focus-visible {
@ -295,7 +295,7 @@ export default {
justify-content: space-between;
align-items: center;
padding: 0.5rem 0 0 0;
border-top: 1px solid ${dt('calendar.buttonbar.border.color')};
border-top: 1px solid ${dt('datepicker.buttonbar.border.color')};
}
.p-datepicker-buttonbar .p-button {
@ -306,11 +306,11 @@ export default {
display: flex;
justify-content: center;
align-items: center;
border-top: 1px solid ${dt('calendar.timepicker.border.color')};
border-top: 1px solid ${dt('datepicker.timepicker.border.color')};
padding: 0;
}
.p-datepicker-calendar-group + .p-timepicker {
.p-datepicker-datepicker-group + .p-timepicker {
margin-top: 0.5rem;
padding-top: 0.5rem;
}

View File

@ -6,23 +6,22 @@ import blockui from 'primevue/themes/primeone/base/blockui';
import breadcrumb from 'primevue/themes/primeone/base/breadcrumb';
import button from 'primevue/themes/primeone/base/button';
import buttongroup from 'primevue/themes/primeone/base/buttongroup';
import calendar from 'primevue/themes/primeone/base/calendar';
import card from 'primevue/themes/primeone/base/card';
import carousel from 'primevue/themes/primeone/base/carousel';
import cascadeselect from 'primevue/themes/primeone/base/cascadeselect';
import checkbox from 'primevue/themes/primeone/base/checkbox';
import chip from 'primevue/themes/primeone/base/chip';
import chips from 'primevue/themes/primeone/base/chips';
import colorpicker from 'primevue/themes/primeone/base/colorpicker';
import confirmdialog from 'primevue/themes/primeone/base/confirmdialog';
import confirmpopup from 'primevue/themes/primeone/base/confirmpopup';
import contextmenu from 'primevue/themes/primeone/base/contextmenu';
import datatable from 'primevue/themes/primeone/base/datatable';
import dataview from 'primevue/themes/primeone/base/dataview';
import datepicker from 'primevue/themes/primeone/base/datepicker';
import dialog from 'primevue/themes/primeone/base/dialog';
import divider from 'primevue/themes/primeone/base/divider';
import dock from 'primevue/themes/primeone/base/dock';
import dropdown from 'primevue/themes/primeone/base/dropdown';
import drawer from 'primevue/themes/primeone/base/drawer';
import editor from 'primevue/themes/primeone/base/editor';
import fieldset from 'primevue/themes/primeone/base/fieldset';
import fileupload from 'primevue/themes/primeone/base/fileupload';
@ -33,10 +32,10 @@ import iconfield from 'primevue/themes/primeone/base/iconfield';
import image from 'primevue/themes/primeone/base/image';
import inlinemessage from 'primevue/themes/primeone/base/inlinemessage';
import inplace from 'primevue/themes/primeone/base/inplace';
import inputchips from 'primevue/themes/primeone/base/inputchips';
import inputgroup from 'primevue/themes/primeone/base/inputgroup';
import inputnumber from 'primevue/themes/primeone/base/inputnumber';
import inputotp from 'primevue/themes/primeone/base/inputotp';
import inputswitch from 'primevue/themes/primeone/base/inputswitch';
import inputtext from 'primevue/themes/primeone/base/inputtext';
import knob from 'primevue/themes/primeone/base/knob';
import listbox from 'primevue/themes/primeone/base/listbox';
@ -48,20 +47,20 @@ import metergroup from 'primevue/themes/primeone/base/metergroup';
import multiselect from 'primevue/themes/primeone/base/multiselect';
import orderlist from 'primevue/themes/primeone/base/orderlist';
import organizationchart from 'primevue/themes/primeone/base/organizationchart';
import overlaypanel from 'primevue/themes/primeone/base/overlaypanel';
import paginator from 'primevue/themes/primeone/base/paginator';
import panel from 'primevue/themes/primeone/base/panel';
import panelmenu from 'primevue/themes/primeone/base/panelmenu';
import password from 'primevue/themes/primeone/base/password';
import picklist from 'primevue/themes/primeone/base/picklist';
import popover from 'primevue/themes/primeone/base/popover';
import progressbar from 'primevue/themes/primeone/base/progressbar';
import progressspinner from 'primevue/themes/primeone/base/progressspinner';
import radiobutton from 'primevue/themes/primeone/base/radiobutton';
import rating from 'primevue/themes/primeone/base/rating';
import scrollpanel from 'primevue/themes/primeone/base/scrollpanel';
import scrolltop from 'primevue/themes/primeone/base/scrolltop';
import select from 'primevue/themes/primeone/base/select';
import selectbutton from 'primevue/themes/primeone/base/selectbutton';
import sidebar from 'primevue/themes/primeone/base/sidebar';
import skeleton from 'primevue/themes/primeone/base/skeleton';
import slider from 'primevue/themes/primeone/base/slider';
import speeddial from 'primevue/themes/primeone/base/speeddial';
@ -78,6 +77,7 @@ import tieredmenu from 'primevue/themes/primeone/base/tieredmenu';
import timeline from 'primevue/themes/primeone/base/timeline';
import toast from 'primevue/themes/primeone/base/toast';
import togglebutton from 'primevue/themes/primeone/base/togglebutton';
import toggleswitch from 'primevue/themes/primeone/base/toggleswitch';
import toolbar from 'primevue/themes/primeone/base/toolbar';
import tooltip from 'primevue/themes/primeone/base/tooltip';
import tree from 'primevue/themes/primeone/base/tree';
@ -95,22 +95,21 @@ export default {
breadcrumb,
button,
buttongroup,
calendar,
card,
carousel,
cascadeselect,
checkbox,
chip,
chips,
colorpicker,
confirmdialog,
confirmpopup,
contextmenu,
dataview,
datatable,
dataview,
datepicker,
dialog,
divider,
dropdown,
drawer,
dock,
editor,
fieldset,
@ -121,10 +120,11 @@ export default {
image,
inlinemessage,
inplace,
inputchips,
inputgroup,
inputnumber,
inputotp,
inputswitch,
toggleswitch,
inputtext,
knob,
listbox,
@ -136,7 +136,7 @@ export default {
multiselect,
orderlist,
organizationchart,
overlaypanel,
popover,
paginator,
password,
panel,
@ -148,9 +148,9 @@ export default {
rating,
scrollpanel,
scrolltop,
select,
selectbutton,
skeleton,
sidebar,
slider,
speeddial,
splitter,

View File

@ -6,23 +6,22 @@ import blockui from 'primevue/themes/primeone/presets/aura/blockui';
import breadcrumb from 'primevue/themes/primeone/presets/aura/breadcrumb';
import button from 'primevue/themes/primeone/presets/aura/button';
import buttongroup from 'primevue/themes/primeone/presets/aura/buttongroup';
import calendar from 'primevue/themes/primeone/presets/aura/calendar';
import card from 'primevue/themes/primeone/presets/aura/card';
import carousel from 'primevue/themes/primeone/presets/aura/carousel';
import cascadeselect from 'primevue/themes/primeone/presets/aura/cascadeselect';
import checkbox from 'primevue/themes/primeone/presets/aura/checkbox';
import chip from 'primevue/themes/primeone/presets/aura/chip';
import chips from 'primevue/themes/primeone/presets/aura/chips';
import colorpicker from 'primevue/themes/primeone/presets/aura/colorpicker';
import confirmdialog from 'primevue/themes/primeone/presets/aura/confirmdialog';
import confirmpopup from 'primevue/themes/primeone/presets/aura/confirmpopup';
import contextmenu from 'primevue/themes/primeone/presets/aura/contextmenu';
import datatable from 'primevue/themes/primeone/presets/aura/datatable';
import dataview from 'primevue/themes/primeone/presets/aura/dataview';
import datepicker from 'primevue/themes/primeone/presets/aura/datepicker';
import dialog from 'primevue/themes/primeone/presets/aura/dialog';
import divider from 'primevue/themes/primeone/presets/aura/divider';
import dock from 'primevue/themes/primeone/presets/aura/dock';
import dropdown from 'primevue/themes/primeone/presets/aura/dropdown';
import drawer from 'primevue/themes/primeone/presets/aura/drawer';
import editor from 'primevue/themes/primeone/presets/aura/editor';
import fieldset from 'primevue/themes/primeone/presets/aura/fieldset';
import fileupload from 'primevue/themes/primeone/presets/aura/fileupload';
@ -32,10 +31,10 @@ import iconfield from 'primevue/themes/primeone/presets/aura/iconfield';
import image from 'primevue/themes/primeone/presets/aura/image';
import inlinemessage from 'primevue/themes/primeone/presets/aura/inlinemessage';
import inplace from 'primevue/themes/primeone/presets/aura/inplace';
import inputchips from 'primevue/themes/primeone/presets/aura/inputchips';
import inputgroup from 'primevue/themes/primeone/presets/aura/inputgroup';
import inputnumber from 'primevue/themes/primeone/presets/aura/inputnumber';
import inputotp from 'primevue/themes/primeone/presets/aura/inputotp';
import inputswitch from 'primevue/themes/primeone/presets/aura/inputswitch';
import inputtext from 'primevue/themes/primeone/presets/aura/inputtext';
import knob from 'primevue/themes/primeone/presets/aura/knob';
import listbox from 'primevue/themes/primeone/presets/aura/listbox';
@ -47,20 +46,20 @@ import metergroup from 'primevue/themes/primeone/presets/aura/metergroup';
import multiselect from 'primevue/themes/primeone/presets/aura/multiselect';
import orderlist from 'primevue/themes/primeone/presets/aura/orderlist';
import organizationchart from 'primevue/themes/primeone/presets/aura/organizationchart';
import overlaypanel from 'primevue/themes/primeone/presets/aura/overlaypanel';
import paginator from 'primevue/themes/primeone/presets/aura/paginator';
import panel from 'primevue/themes/primeone/presets/aura/panel';
import panelmenu from 'primevue/themes/primeone/presets/aura/panelmenu';
import password from 'primevue/themes/primeone/presets/aura/password';
import picklist from 'primevue/themes/primeone/presets/aura/picklist';
import popover from 'primevue/themes/primeone/presets/aura/popover';
import progressbar from 'primevue/themes/primeone/presets/aura/progressbar';
import progressspinner from 'primevue/themes/primeone/presets/aura/progressspinner';
import radiobutton from 'primevue/themes/primeone/presets/aura/radiobutton';
import rating from 'primevue/themes/primeone/presets/aura/rating';
import scrollpanel from 'primevue/themes/primeone/presets/aura/scrollpanel';
import scrolltop from 'primevue/themes/primeone/presets/aura/scrolltop';
import select from 'primevue/themes/primeone/presets/aura/select';
import selectbutton from 'primevue/themes/primeone/presets/aura/selectbutton';
import sidebar from 'primevue/themes/primeone/presets/aura/sidebar';
import skeleton from 'primevue/themes/primeone/presets/aura/skeleton';
import slider from 'primevue/themes/primeone/presets/aura/slider';
import speeddial from 'primevue/themes/primeone/presets/aura/speeddial';
@ -77,6 +76,7 @@ import tieredmenu from 'primevue/themes/primeone/presets/aura/tieredmenu';
import timeline from 'primevue/themes/primeone/presets/aura/timeline';
import toast from 'primevue/themes/primeone/presets/aura/toast';
import togglebutton from 'primevue/themes/primeone/presets/aura/togglebutton';
import toggleswitch from 'primevue/themes/primeone/presets/aura/toggleswitch';
import toolbar from 'primevue/themes/primeone/presets/aura/toolbar';
import tooltip from 'primevue/themes/primeone/presets/aura/tooltip';
import tree from 'primevue/themes/primeone/presets/aura/tree';
@ -240,13 +240,12 @@ export default {
breadcrumb,
button,
buttongroup,
calendar,
datepicker,
card,
carousel,
cascadeselect,
checkbox,
chip,
chips,
colorpicker,
confirmdialog,
confirmpopup,
@ -256,7 +255,7 @@ export default {
dialog,
divider,
dock,
dropdown,
drawer,
editor,
fieldset,
fileupload,
@ -266,10 +265,11 @@ export default {
image,
inlinemessage,
inplace,
inputchips,
inputgroup,
inputnumber,
inputotp,
inputswitch,
toggleswitch,
inputtext,
knob,
listbox,
@ -281,7 +281,7 @@ export default {
multiselect,
orderlist,
organizationchart,
overlaypanel,
popover,
paginator,
password,
panel,
@ -293,9 +293,9 @@ export default {
rating,
scrollpanel,
scrolltop,
select,
selectbutton,
skeleton,
sidebar,
slider,
speeddial,
splitter,

View File

@ -5,10 +5,12 @@ const form = [
'Checkbox',
'Chips',
'ColorPicker',
'DatePicker',
'Dropdown',
'Editor',
'FloatLabel',
'IconField',
'InputChips',
'InputGroup',
'InputGroupAddon',
'InputIcon',
@ -23,10 +25,12 @@ const form = [
'Password',
'RadioButton',
'Rating',
'Select',
'SelectButton',
'Slider',
'Textarea',
'ToggleButton',
'ToggleSwitch',
'TreeSelect'
];
@ -36,7 +40,16 @@ const data = ['Column', 'Row', 'ColumnGroup', 'DataTable', 'DataView', 'OrderLis
const panel = ['Accordion', 'AccordionTab', 'Card', 'DeferredContent', 'Divider', 'Fieldset', 'Panel', 'ScrollPanel', 'Splitter', 'SplitterPanel', 'Stepper', 'StepperPanel', 'TabView', 'TabPanel', 'Toolbar'];
const overlay = [{ name: 'ConfirmDialog', use: { as: 'ConfirmationService' } }, { name: 'ConfirmPopup', use: { as: 'ConfirmationService' } }, 'Dialog', { name: 'DynamicDialog', use: { as: 'DialogService' } }, 'OverlayPanel', 'Sidebar'];
const overlay = [
{ name: 'ConfirmDialog', use: { as: 'ConfirmationService' } },
{ name: 'ConfirmPopup', use: { as: 'ConfirmationService' } },
'Dialog',
'Drawer',
{ name: 'DynamicDialog', use: { as: 'DialogService' } },
'OverlayPanel',
'Popover',
'Sidebar'
];
const file = ['FileUpload'];

View File

@ -34,10 +34,12 @@ const STYLE_ALIAS = {
'primevue/contextmenu/style': path.resolve(__dirname, './components/lib/contextmenu/style/ContextMenuStyle.js'),
'primevue/datatable/style': path.resolve(__dirname, './components/lib/datatable/style/DataTableStyle.js'),
'primevue/dataview/style': path.resolve(__dirname, './components/lib/dataview/style/DataViewStyle.js'),
'primevue/datepicker/style': path.resolve(__dirname, './components/lib/datepicker/style/DatePickerStyle.js'),
'primevue/deferredcontent/style': path.resolve(__dirname, './components/lib/deferredcontent/style/DeferredContentStyle.js'),
'primevue/dialog/style': path.resolve(__dirname, './components/lib/dialog/style/DialogStyle.js'),
'primevue/divider/style': path.resolve(__dirname, './components/lib/divider/style/DividerStyle.js'),
'primevue/dock/style': path.resolve(__dirname, './components/lib/dock/style/DockStyle.js'),
'primevue/drawer/style': path.resolve(__dirname, './components/lib/drawer/style/DrawerStyle.js'),
'primevue/dropdown/style': path.resolve(__dirname, './components/lib/dropdown/style/DropdownStyle.js'),
'primevue/dynamicdialog/style': path.resolve(__dirname, './components/lib/dynamicdialog/style/DynamicDialogStyle.js'),
'primevue/editor/style': path.resolve(__dirname, './components/lib/editor/style/EditorStyle.js'),
@ -50,6 +52,7 @@ const STYLE_ALIAS = {
'primevue/iconfield/style': path.resolve(__dirname, './components/lib/iconfield/style/IconFieldStyle.js'),
'primevue/inlinemessage/style': path.resolve(__dirname, './components/lib/inlinemessage/style/InlineMessageStyle.js'),
'primevue/inplace/style': path.resolve(__dirname, './components/lib/inplace/style/InplaceStyle.js'),
'primevue/inputchips/style': path.resolve(__dirname, './components/lib/inputchips/style/InputChipsStyle.js'),
'primevue/inputgroup/style': path.resolve(__dirname, './components/lib/inputgroup/style/InputGroupStyle.js'),
'primevue/inputgroupaddon/style': path.resolve(__dirname, './components/lib/inputgroupaddon/style/InputGroupAddonStyle.js'),
'primevue/inputicon/style': path.resolve(__dirname, './components/lib/inputicon/style/InputIconStyle.js'),
@ -74,6 +77,7 @@ const STYLE_ALIAS = {
'primevue/panelmenu/style': path.resolve(__dirname, './components/lib/panelmenu/style/PanelMenuStyle.js'),
'primevue/password/style': path.resolve(__dirname, './components/lib/password/style/PasswordStyle.js'),
'primevue/picklist/style': path.resolve(__dirname, './components/lib/picklist/style/PickListStyle.js'),
'primevue/popover/style': path.resolve(__dirname, './components/lib/popover/style/PopoverStyle.js'),
'primevue/portal/style': path.resolve(__dirname, './components/lib/portal/style/PortalStyle.js'),
'primevue/progressbar/style': path.resolve(__dirname, './components/lib/progressbar/style/ProgressBarStyle.js'),
'primevue/progressspinner/style': path.resolve(__dirname, './components/lib/progressspinner/style/ProgressSpinnerStyle.js'),
@ -83,6 +87,7 @@ const STYLE_ALIAS = {
'primevue/row/style': path.resolve(__dirname, './components/lib/row/style/RowStyle.js'),
'primevue/scrollpanel/style': path.resolve(__dirname, './components/lib/scrollpanel/style/ScrollPanelStyle.js'),
'primevue/scrolltop/style': path.resolve(__dirname, './components/lib/scrolltop/style/ScrollTopStyle.js'),
'primevue/select/style': path.resolve(__dirname, './components/lib/select/style/SelectStyle.js'),
'primevue/selectbutton/style': path.resolve(__dirname, './components/lib/selectbutton/style/SelectButtonStyle.js'),
'primevue/sidebar/style': path.resolve(__dirname, './components/lib/sidebar/style/SidebarStyle.js'),
'primevue/skeleton/style': path.resolve(__dirname, './components/lib/skeleton/style/SkeletonStyle.js'),
@ -105,6 +110,7 @@ const STYLE_ALIAS = {
'primevue/timeline/style': path.resolve(__dirname, './components/lib/timeline/style/TimelineStyle.js'),
'primevue/toast/style': path.resolve(__dirname, './components/lib/toast/style/ToastStyle.js'),
'primevue/togglebutton/style': path.resolve(__dirname, './components/lib/togglebutton/style/ToggleButtonStyle.js'),
'primevue/toggleswitch/style': path.resolve(__dirname, './components/lib/toggleswitch/style/ToggleSwitchStyle.js'),
'primevue/toolbar/style': path.resolve(__dirname, './components/lib/toolbar/style/ToolbarStyle.js'),
'primevue/tooltip/style': path.resolve(__dirname, './components/lib/tooltip/style/TooltipStyle.js'),
'primevue/tree/style': path.resolve(__dirname, './components/lib/tree/style/TreeStyle.js'),
@ -164,7 +170,7 @@ const ICON_ALIAS = {
};
// prettier-ignore
const THEME_COMPONENTS = ['accordion','autocomplete','avatar','badge','blockui','breadcrumb','button','buttongroup','calendar','card','carousel','cascadeselect','checkbox','chip','chips','colorpicker','confirmdialog','confirmpopup','contextmenu','datatable','dataview','dialog','divider','dock','dropdown','editor','fieldset','fileupload','floatlabel','galleria','iconfield','image','inlinemessage','inplace','inputgroup','inputnumber','inputotp','inputswitch','inputtext','knob','listbox','megamenu','menu','menubar','message','metergroup','multiselect','orderlist','organizationchart','overlaypanel','paginator','panel','panelmenu','password','picklist','progressbar','progressspinner','radiobutton','rating','scrollpanel','scrolltop','selectbutton','sidebar','skeleton','slider','speeddial','splitbutton','splitter','steps','stepper','tabmenu','tabview','tag','terminal','textarea','tieredmenu','timeline','toast','togglebutton','toolbar','tooltip','tree','treeselect','treetable'];
const THEME_COMPONENTS = ['accordion','autocomplete','avatar','badge','blockui','breadcrumb','button','buttongroup','card','carousel','cascadeselect','checkbox','chip','colorpicker','confirmdialog','confirmpopup','contextmenu','datatable','dataview','datepicker','dialog','divider','dock','drawer','editor','fieldset','fileupload','floatlabel','galleria','iconfield','image','inlinemessage','inplace','inputchips','inputgroup','inputnumber','inputotp','inputtext','knob','listbox','megamenu','menu','menubar','message','metergroup','multiselect','orderlist','organizationchart','paginator','panel','panelmenu','password','picklist','popover','progressbar','progressspinner','radiobutton','rating','scrollpanel','scrolltop','select','selectbutton','skeleton','slider','speeddial','splitbutton','splitter','steps','stepper','tabmenu','tabview','tag','terminal','textarea','tieredmenu','timeline','toast','togglebutton','toggleswitch','toolbar','tooltip','tree','treeselect','treetable'];
const createThemeAlias = (design, presets) => {
const baseAlias = THEME_COMPONENTS.reduce((acc, name) => {
@ -256,6 +262,12 @@ export default {
'primevue/togglebutton': path.resolve(__dirname, './components/lib/togglebutton/ToggleButton.vue'),
'primevue/listbox': path.resolve(__dirname, './components/lib/listbox/Listbox.vue'),
'primevue/chip': path.resolve(__dirname, './components/lib/chip/Chip.vue'),
'primevue/popover': path.resolve(__dirname, './components/lib/popover/Popover.vue'),
'primevue/toggleswitch': path.resolve(__dirname, './components/lib/toggleswitch/ToggleSwitch.vue'),
'primevue/drawer': path.resolve(__dirname, './components/lib/drawer/Drawer.vue'),
'primevue/inputchips': path.resolve(__dirname, './components/lib/inputchips/InputChips.vue'),
'primevue/datepicker': path.resolve(__dirname, './components/lib/datepicker/DatePicker.vue'),
'primevue/select': path.resolve(__dirname, './components/lib/select/Select.vue'),
'primevue/confirmationeventbus': path.resolve(__dirname, './components/lib/confirmationeventbus/ConfirmationEventBus.js'),
'primevue/toasteventbus': path.resolve(__dirname, './components/lib/toasteventbus/ToastEventBus.js'),
'primevue/overlayeventbus': path.resolve(__dirname, './components/lib/overlayeventbus/OverlayEventBus.js'),

View File

@ -98,10 +98,12 @@ const CORE_STYLE_DEPENDENCIES = {
'primevue/contextmenu/style': 'primevue.contextmenu.style',
'primevue/datatable/style': 'primevue.datatable.style',
'primevue/dataview/style': 'primevue.dataview.style',
'primevue/datepicker/style': 'primevue.datepicker.style',
'primevue/deferredcontent/style': 'primevue.deferredcontent.style',
'primevue/dialog/style': 'primevue.dialog.style',
'primevue/divider/style': 'primevue.divider.style',
'primevue/dock/style': 'primevue.dock.style',
'primevue/drawer/style': 'primevue.drawer.style',
'primevue/dropdown/style': 'primevue.dropdown.style',
'primevue/dynamicdialog/style': 'primevue.dynamicdialog.style',
'primevue/editor/style': 'primevue.editor.style',
@ -112,6 +114,7 @@ const CORE_STYLE_DEPENDENCIES = {
'primevue/image/style': 'primevue.image.style',
'primevue/inlinemessage/style': 'primevue.inlinemessage.style',
'primevue/inplace/style': 'primevue.inplace.style',
'primevue/inputchips/style': 'primevue.inputchips.style',
'primevue/inputgroup/style': 'primevue.inputgroup.style',
'primevue/inputgroupaddon/style': 'primevue.inputgroupaddon.style',
'primevue/inputmask/style': 'primevue.inputmask.style',
@ -135,6 +138,7 @@ const CORE_STYLE_DEPENDENCIES = {
'primevue/panelmenu/style': 'primevue.panelmenu.style',
'primevue/password/style': 'primevue.password.style',
'primevue/picklist/style': 'primevue.picklist.style',
'primevue/popover/style': 'primevue.popover.style',
'primevue/portal/style': 'primevue.portal.style',
'primevue/progressbar/style': 'primevue.progressbar.style',
'primevue/progressspinner/style': 'primevue.progressspinner.style',
@ -144,6 +148,7 @@ const CORE_STYLE_DEPENDENCIES = {
'primevue/row/style': 'primevue.row.style',
'primevue/scrollpanel/style': 'primevue.scrollpanel.style',
'primevue/scrolltop/style': 'primevue.scrolltop.style',
'primevue/select/style': 'primevue.select.style',
'primevue/selectbutton/style': 'primevue.selectbutton.style',
'primevue/sidebar/style': 'primevue.sidebar.style',
'primevue/skeleton/style': 'primevue.skeleton.style',
@ -166,6 +171,7 @@ const CORE_STYLE_DEPENDENCIES = {
'primevue/timeline/style': 'primevue.timeline.style',
'primevue/toast/style': 'primevue.toast.style',
'primevue/togglebutton/style': 'primevue.togglebutton.style',
'primevue/toggleswitch/style': 'primevue.toggleswitch.style',
'primevue/toolbar/style': 'primevue.toolbar.style',
'primevue/tooltip/style': 'primevue.tooltip.style',
'primevue/tree/style': 'primevue.tree.style',
@ -175,7 +181,7 @@ const CORE_STYLE_DEPENDENCIES = {
};
// prettier-ignore
const THEME_COMPONENTS = ['accordion','autocomplete','avatar','badge','blockui','breadcrumb','button','buttongroup','calendar','card','carousel','cascadeselect','checkbox','chip','chips','colorpicker','confirmdialog','confirmpopup','contextmenu','datatable','dataview','dialog','divider','dock','dropdown','editor','fieldset','fileupload','floatlabel','galleria','iconfield','image','inlinemessage','inplace','inputgroup','inputnumber','inputotp','inputswitch','inputtext','knob','listbox','megamenu','menu','menubar','message','metergroup','multiselect','orderlist','organizationchart','overlaypanel','paginator','panel','panelmenu','password','picklist','progressbar','progressspinner','radiobutton','rating','scrollpanel','scrolltop','selectbutton','sidebar','skeleton','slider','speeddial','splitbutton','splitter','steps','stepper','tabmenu','tabview','tag','terminal','textarea','tieredmenu','timeline','toast','togglebutton','toolbar','tooltip','tree','treeselect','treetable'];
const THEME_COMPONENTS = ['accordion','autocomplete','avatar','badge','blockui','breadcrumb','button','buttongroup','card','carousel','cascadeselect','checkbox','chip','colorpicker','confirmdialog','confirmpopup','contextmenu','datatable','dataview','datepicker','dialog','divider','dock','drawer','editor','fieldset','fileupload','floatlabel','galleria','iconfield','image','inlinemessage','inplace','inputchips','inputgroup','inputnumber','inputotp','toggleswitch','inputtext','knob','listbox','megamenu','menu','menubar','message','metergroup','multiselect','orderlist','organizationchart','overlaypanel','paginator','panel','panelmenu','password','picklist','popover','progressbar','progressspinner','radiobutton','rating','scrollpanel','scrolltop','select','selectbutton','skeleton','slider','speeddial','splitbutton','splitter','steps','stepper','tabmenu','tabview','tag','terminal','textarea','tieredmenu','timeline','toast','togglebutton','toggleswitch','toolbar','tooltip','tree','treeselect','treetable'];
const createThemeDependencies = (design, presets) => {
const baseDeps = THEME_COMPONENTS.reduce((acc, name) => {
@ -267,6 +273,12 @@ const CORE_DEPENDENCIES = {
'primevue/listbox': 'primevue.listbox',
'primevue/chip': 'primevue.chip',
'primevue/togglebutton': 'primevue.togglebutton',
'primevue/popover': 'primevue.popover',
'primevue/toggleswitch': 'primevue.toggleswitch',
'primevue/inputchips': 'primevue.inputchips',
'primevue/drawer': 'primevue.drawer',
'primevue/datepicker': 'primevue.datepicker',
'primevue/select': 'primevue.select',
...CORE_PASSTHROUGH_DEPENDENCIES,
...CORE_THEME_DEPENDENCIES
};