Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UXE-5228] chore: upgrade primevue to 3.46.0 #2067

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ describe('Digital Certificates spec', { tags: ['@dev3'] }, () => {
// Assert
cy.verifyToast('success', 'Your digital certificate has been created!')
cy.get(selectors.form.editPageTitle).should('have.text', 'Edit Digital Certificate')
cy.get(selectors.digitalCertificates.breadcrumbReturnToList).click()
cy.window().then((win) => {
const app = win.document.querySelector('#app').__vue_app__
const router = app.config.globalProperties.$router
router.push('/digital-certificates')
})
cy.get(selectors.list.searchInput).clear()
cy.intercept('GET', '/api/v4/digital_certificates/certificates*').as('getDigitalCertificates')
cy.get(selectors.list.searchInput).type(`${digitalCertificateName}{enter}`)
Expand Down
12 changes: 10 additions & 2 deletions cypress/e2e/edge-services/edit-edge-service-resource.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ describe('Edge Services spec', { tags: ['@dev6'] }, () => {
cy.get(selectors.edgeServices.listRow('contentType')).should('have.text', 'Shell Script')
cy.get(selectors.edgeServices.listRow('trigger')).should('have.text', 'Install')

cy.get(selectors.edgeServices.breadcrumbReturnToList).click()
cy.window().then((win) => {
const app = win.document.querySelector('#app').__vue_app__
const router = app.config.globalProperties.$router
router.push('/edge-services')
})
//service
cy.get(selectors.list.searchInput).type(`${fixtures.edgeServiceName}{enter}`)
cy.get(selectors.edgeServices.listRow('name')).should('have.text', fixtures.edgeServiceName)
Expand Down Expand Up @@ -84,7 +88,11 @@ describe('Edge Services spec', { tags: ['@dev6'] }, () => {
cy.get(selectors.edgeServices.listRow('trigger')).should('be.empty')

// Prepare for cleanup
cy.get(selectors.edgeServices.breadcrumbReturnToList).click()
cy.window().then((win) => {
const app = win.document.querySelector('#app').__vue_app__
const router = app.config.globalProperties.$router
router.push('/edge-services')
})
cy.get(selectors.list.searchInput).type(`${fixtures.edgeServiceName}{enter}`)
cy.get(selectors.edgeServices.listRow('labelActive')).should('have.text', 'Active')
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ describe('Teams Permissions', { tags: ['@dev7'] }, () => {
cy.get(selectors.teams.nameInput).type(teamsPermissionsName)

viewPermissionsFixtures.forEach((permission) => {
cy.get(selectors.teams.permission(permission)).dblclick()
cy.get(selectors.teams.permission(permission)).click()
})

cy.get(selectors.teams.addOption).click()

cy.get(selectors.teams.sourceList).should('not.contain', 'View', {
matchCase: false
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
option: (size) => `li.p-dropdown-item[aria-label="${size}"]`
},
pageNumber: {
option: (page) => `button.p-paginator-page[aria-label="${page}"]`
option: (page) => `button.p-paginator-page[aria-label="Page ${page}"]`
},
orderingHeader: {
firstColumn: ':nth-child(1) > .p-column-header-content > [data-pc-section="sort"] > .p-icon'
Expand Down
4 changes: 3 additions & 1 deletion cypress/support/selectors/block-selectors/teams-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ export default {
'[data-testid="teams-permissions-form__permissions-field-picklist__move-to-target-btn"]',
permission: (permissionName) =>
`[data-testid="teams-permissions-form__permissions-field__picklist__item-${permissionName}"]`,
listRow: (rowName) => `[data-testid="list-table-block__column__${rowName}__row"]`
listRow: (rowName) => `[data-testid="list-table-block__column__${rowName}__row"]`,
addOption:
'[data-testid="teams-permissions-form__permissions-field-picklist__move-to-target-btn"]'
}
23 changes: 15 additions & 8 deletions cypress/support/selectors/product-selectors/domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
createEdgeApplicationButton: '[data-testid="domains-form__create-edge-application-button"]',
createEdgeFirewallButton: '[data-testid="domains-form__create-edge-firewall-button"]',
edgeApplicationDrawer: '.p-sidebar-content',
dialogTitle: '[data-testid="domains-view__copy-domain-dialog__header-title"]',
dialogTitle: '.p-dialog-title',
domainField: '[data-testid="domains-dialog__domain-field__input"]',
digitalCertificateDropdownFilter:
'[data-testid="domains-form__edge-certificate-field__dropdown-filter-input"]',
Expand All @@ -26,13 +26,17 @@ export default {
pageTitle: (entityName) => `[data-testid="page_title_${entityName}"]`,
digitalCertificateFieldSelectedValue:
':nth-child(4) > [data-testid="field-dropdown__dropdown"] > .p-dropdown-label',
digitalCertificateDropdownSearch: '[data-testid="domains-form__digital-certificates-field__dropdown-search"]',
digitalCertificateDropdownSearch:
'[data-testid="domains-form__digital-certificates-field__dropdown-search"]',
digitalCertificateDropdown:
'[data-testid="domains-form__edge-certificate-field__dropdown"] > .p-dropdown-label',
digitalCertificateDropdownFilterSearch: '[data-testid="domains-form__edge-certificate-field__dropdown-search"]',
digitalCertificatesDropdownLetsEncrypt: '[data-testid="domains-form__digital-certificates-field__dropdown"] > .p-dropdown-label',
digitalCertificateDropdownFilterSearch:
'[data-testid="domains-form__edge-certificate-field__dropdown-search"]',
digitalCertificatesDropdownLetsEncrypt:
'[data-testid="domains-form__digital-certificates-field__dropdown"] > .p-dropdown-label',
letsEncryptDropdownOption: '#edgeCertificate_1',
editPageTitle: '[data-testid="page-heading-block__breadcrumb__Edit Domain"] > .p-menuitem-link > .p-menuitem-text',
editPageTitle:
'[data-testid="page-heading-block__breadcrumb__Edit Domain"] > .p-menuitem-link > .p-menuitem-text',
enableMtlsSwitch:
'[data-testid="domains-form__mtls-is-enabled-field__switch"] > .p-inputswitch-slider',
dropdownTrustedCA:
Expand All @@ -49,7 +53,10 @@ export default {
listTableBlockColumnNameRow: '[data-testid="list-table-block__column__name__row"]',
listTableBlockColumnActiveRow:
'[data-testid="list-table-block__column__active__row"] > .p-tag-value',
edgeApplicationSaveButton: '[data-testid="create-drawer-block__action-bar"] > [data-testid="form-actions-content"] > [data-testid="form-actions-buttons"] > [data-testid="form-actions-submit-button"] > .p-button-label',
edgeFirewallSaveButton: '[data-testid="edge-firewall-drawer__action-bar"] > [data-testid="form-actions-content"] > [data-testid="form-actions-buttons"] > [data-testid="form-actions-submit-button"] > .p-button-label',
edgeApplicationDropdownSearch: '[data-testid="domains-form__edge-application-field__dropdown-search"]'
edgeApplicationSaveButton:
'[data-testid="create-drawer-block__action-bar"] > [data-testid="form-actions-content"] > [data-testid="form-actions-buttons"] > [data-testid="form-actions-submit-button"] > .p-button-label',
edgeFirewallSaveButton:
'[data-testid="edge-firewall-drawer__action-bar"] > [data-testid="form-actions-content"] > [data-testid="form-actions-buttons"] > [data-testid="form-actions-submit-button"] > .p-button-label',
edgeApplicationDropdownSearch:
'[data-testid="domains-form__edge-application-field__dropdown-search"]'
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"pinia-plugin-persistedstate": "^3.2.0",
"primeflex": "^3.3.1",
"primeicons": "^7.0.0",
"primevue": "^3.35.0",
"primevue": "3.46.0",
"qrcode.vue": "^3.4.1",
"recaptcha-v3": "^1.10.0",
"vee-validate": "^4.11.1",
Expand Down
30 changes: 19 additions & 11 deletions src/layout/components/menu-profile/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,32 +301,34 @@
import PrimeMenu from 'primevue/menu'
import Sidebar from 'primevue/sidebar'
import { useLoadingStore } from '@/stores/loading'
import { useRouter } from 'vue-router'

defineOptions({ name: 'profile-block' })
const { startLoading } = useLoadingStore()
const user = useAccountStore().accountData
const { currentTheme } = storeToRefs(useAccountStore())
const { hasAccessToSSOManagement } = storeToRefs(useAccountStore())
const setTheme = useAccountStore().setTheme
const router = useRouter()

onBeforeMount(() => {
switch (user.kind) {
case 'brand':
profileMenuDefault.push({
label: 'Resellers Management',
to: '/reseller/management'
command: () => navigateTo('/reseller/management')
})
break
case 'company':
profileMenuDefault.push({
label: 'Groups Management',
to: '/group/management'
command: () => navigateTo('/group/management')
})
break
case 'reseller':
profileMenuDefault.push({
label: 'Clients Management',
to: '/client/management'
command: () => navigateTo('/client/management')
})
break
}
Expand All @@ -337,36 +339,36 @@
const profileMenuDefault = [
{
label: 'Account Settings',
to: '/account/settings'
command: () => navigateTo('/account/settings')
},
{
label: 'Users Management',
to: '/users'
command: () => navigateTo('/users')
},
{
label: 'Billing & Subscriptions',
to: '/billing'
command: () => navigateTo('/billing')
},
{
label: 'Activity History',
to: '/activity-history'
command: () => navigateTo('/activity-history')
},
{
label: 'Teams Permissions',
to: '/teams-permission'
command: () => navigateTo('/teams-permission')
},
...(hasAccessToSSOManagement.value
? [{ label: 'SSO Management', to: '/identity-providers' }]
? [{ label: 'SSO Management', command: () => navigateTo('/identity-providers') }]
: [])
]
const profileMenuSettings = [
{
label: 'Your Settings',
to: '/settings'
command: () => navigateTo('/settings')
},
{
label: 'Personal Token',
to: '/personal-tokens'
command: () => navigateTo('/personal-tokens')
}
]
const themeOptions = [
Expand Down Expand Up @@ -433,6 +435,12 @@
return [...switchAccount, ...profileMenuDefault, separator]
})

const navigateTo = (path) => {
router.push(path)
closeMobileMenu()
closeDesktopMenu()
}

watch(currentWidth, async (width) => {
if (width <= SCREEN_BREAKPOINT_MD) {
closeDesktopMenu()
Expand Down
8 changes: 5 additions & 3 deletions src/templates/add-payment-method-block/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,15 @@
position="right"
:pt="{
root: { class: 'max-w-4xl w-full' },
headercontent: { class: 'flex justify-content-between items-center w-full pr-2' },
header: { class: 'flex w-full' },
content: { class: 'p-8' }
}"
>
<template #header>
<h2>Add Payment Method</h2>
<ConsoleFeedback />
<div class="flex justify-between items-center w-full pr-2">
<h2>Add Payment Method</h2>
<ConsoleFeedback />
</div>
</template>

<div class="flex w-full">
Expand Down
8 changes: 5 additions & 3 deletions src/templates/create-drawer-block/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,15 @@
props.isOverlapped ? 'max-w-5xl' : 'max-w-4xl'
}`
},
headercontent: { class: 'flex justify-content-between items-center w-full pr-2' },
header: { class: 'flex w-full' },
content: { class: 'p-8' }
}"
>
<template #header>
<h2>{{ title }}</h2>
<ConsoleFeedback />
<div class="flex justify-between items-center w-full pr-2">
<h2>{{ title }}</h2>
<ConsoleFeedback />
</div>
</template>

<div class="flex w-full">
Expand Down
1 change: 0 additions & 1 deletion src/templates/list-table-block/v2/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
:expandableRowGroups="expandableRowGroups"
rowGroupMode="subheader"
:groupRowsBy="props.groupColumn"
:sortField="props.groupColumn"
sortMode="single"
:rowClass="stateClassRules"
:pt="{
Expand Down
11 changes: 10 additions & 1 deletion src/templates/page-heading-block/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,18 @@
const generateHomeBreadCrumb = computed(() => {
return {
label: 'Home',
command: () => router.push('/'),
to: '/'
}
})

const convertBreadcrumbs = computed(() => {
return breadcrumbs.items.map((item) => ({
...item,
command: () => router.push(item.to)
}))
})

const hasDefaultSlot = computed(() => {
return !!slots.default
})
Expand All @@ -48,7 +57,7 @@
<div class="w-full flex-col justify-center items-start inline-flex">
<Breadcrumb
:home="generateHomeBreadCrumb"
:model="breadcrumbs.items"
:model="convertBreadcrumbs"
class="-ml-1.5 overflow-auto w-full"
:pt="{
label: { class: 'whitespace-nowrap' },
Expand Down
22 changes: 11 additions & 11 deletions src/views/RealTimeMetrics/blocks/content-filter-block.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@
import { GetRelevantField } from '@/modules/real-time-metrics/filters'
import { FILTERS_RULES } from '@/helpers'

const {
getDatasetAvailableFilters,
infoAvailableFiltersCurrent,
getIsLoadingFilters,
dashboardCurrent,
currentFilters
} = props.moduleGetters

const { setTimeRange, filterDatasetUpdate, createAndFilter, loadCurrentReports, resetFilters } =
props.moduleActions

/**@type {import('@/plugins/analytics/AnalyticsTrackerAdapter').AnalyticsTrackerAdapter} */
const tracker = inject('tracker')

Expand Down Expand Up @@ -51,6 +40,17 @@
required: true
}
})

const {
getDatasetAvailableFilters,
infoAvailableFiltersCurrent,
getIsLoadingFilters,
dashboardCurrent,
currentFilters
} = props.moduleGetters
const { setTimeRange, filterDatasetUpdate, createAndFilter, loadCurrentReports, resetFilters } =
props.moduleActions

const refAdvancedFilter = ref('')

const disabledFilter = computed(() => {
Expand Down
Loading
Loading