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

Alphabetize many types, includes, etc. #847

Open
wants to merge 1 commit into
base: main
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
34 changes: 17 additions & 17 deletions additional.d.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
/// <reference types="react-scripts" />

declare module 'nock'
declare module 'test-utils'
declare module '@testing-library/react'
declare module '@department-of-veterans-affairs/component-library'
declare module '@department-of-veterans-affairs/component-library/Table'
declare module '@department-of-veterans-affairs/component-library/LoadingIndicator'
declare module '@department-of-veterans-affairs/component-library/AlertBox'
declare module '@department-of-veterans-affairs/component-library/DropDownPanel'
declare module '@department-of-veterans-affairs/component-library/Breadcrumbs'
declare module '@department-of-veterans-affairs/component-library/Banner'
declare module '@department-of-veterans-affairs/component-library/TextInput'
declare module '@department-of-veterans-affairs/component-library/TextArea'
declare module '@department-of-veterans-affairs/component-library/Breadcrumbs'
declare module '@department-of-veterans-affairs/component-library/dist/react-bindings'
declare module '@department-of-veterans-affairs/component-library/DropDownPanel'
declare module '@department-of-veterans-affairs/component-library/LoadingIndicator'
declare module '@department-of-veterans-affairs/component-library/Modal'
declare module '@department-of-veterans-affairs/component-library/Pagination'
declare module '@department-of-veterans-affairs/component-library/ProgressButton'
declare module '@department-of-veterans-affairs/component-library/PromoBanner'
declare module '@department-of-veterans-affairs/component-library/dist/react-bindings'
declare module 'mq-polyfill'
declare module '@department-of-veterans-affairs/component-library/Table'
declare module '@department-of-veterans-affairs/component-library/TextArea'
declare module '@department-of-veterans-affairs/component-library/TextInput'
declare module '@testing-library/react'
declare module 'debug'
declare module 'mq-polyfill'
declare module 'nock'
declare module 'test-utils'

declare namespace JSX {
interface IntrinsicElements {
'va-accordion-item'
'va-accordion'
'va-alert'
'va-link'
'va-icon'
'va-button'
'va-back-to-top'
'va-breadcrumbs'
'va-accordion'
'va-accordion-item'
'va-button'
'va-icon'
'va-link'
'va-on-this-page'
'va-back-to-top'
}
}
52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,39 @@
],
"type": "module",
"scripts": {
"setup": "node ./scripts/yarn/vets-website-assets.js",
"dev": "yarn build:env-loader && node ./scripts/yarn/dev.js",
"build": "yarn build:env-loader && node ./scripts/yarn/build.js --SSG --USE_REDIS",
"build:env-loader": "tsc -b ./packages/env-loader/tsconfig.json",
"build:preview": "yarn build:env-loader && node ./scripts/yarn/build.js",
"build:sitemap": "yarn build:env-loader & node ./scripts/yarn/build:sitemap.js",
"start": "yarn build:env-loader && node ./scripts/yarn/start.js",
"export": "yarn build:env-loader && node ./scripts/yarn/export.js --SSG --USE_REDIS",
"build": "yarn build:env-loader && node ./scripts/yarn/build.js --SSG --USE_REDIS",
"certs": "rm -f ./certs/VA-mozilla-combined.pem && more node_modules/node_extra_ca_certs_mozilla_bundle/ca_bundle/ca_intermediate_root_bundle.pem > ./certs/VA-mozilla-combined.pem && more certs/VA-Internal-S2-RCA-combined.pem >> ./certs/VA-mozilla-combined.pem",
"dev": "yarn build:env-loader && node ./scripts/yarn/dev.js",
"export:serve": "http-server out -p 8001",
"redis": "docker run --name next-redis -p 6379:6379 -d redis",
"redis:cli": "docker exec -it next-redis redis-cli",
"redis:stop": "docker stop next-redis && docker rm next-redis",
"export": "yarn build:env-loader && node ./scripts/yarn/export.js --SSG --USE_REDIS",
"format": "prettier --write .",
"lighthouse": "npx run ./lighthouse/lighthouse.js ",
"lint": "next lint",
"plop": "plop",
"postinstall": "yarn certs && husky install",
"lighthouse": "npx run ./lighthouse/lighthouse.js ",
"certs": "rm -f ./certs/VA-mozilla-combined.pem && more node_modules/node_extra_ca_certs_mozilla_bundle/ca_bundle/ca_intermediate_root_bundle.pem > ./certs/VA-mozilla-combined.pem && more certs/VA-Internal-S2-RCA-combined.pem >> ./certs/VA-mozilla-combined.pem",
"test": "yarn build:env-loader && APP_ENV=test node ./scripts/yarn/test.js",
"redis:cli": "docker exec -it next-redis redis-cli",
"redis:stop": "docker stop next-redis && docker rm next-redis",
"redis": "docker run --name next-redis -p 6379:6379 -d redis",
"setup": "node ./scripts/yarn/vets-website-assets.js",
"start": "yarn build:env-loader && node ./scripts/yarn/start.js",
"storybook:build": "storybook build -o out/storybook-static --quiet",
"storybook": "storybook dev -p 6006",
"test:ci": "yarn build:env-loader && APP_ENV=test node ./scripts/yarn/test:ci.js",
"test:coverage": "yarn build:env-loader && APP_ENV=test node ./scripts/yarn/test:coverage.js",
"test:debug": "yarn build:env-loader && APP_ENV=test node ./scripts/yarn/test:debug.js",
"test:watch": "yarn test -- --watch",
"test:examples": "APP_ENV=test jest --rootDir ./example_tests --config ./example_tests/jest.config.ts",
"test:example": "APP_ENV=test yarn test:examples example_tests/${1}/",
"test:examples": "APP_ENV=test jest --rootDir ./example_tests --config ./example_tests/jest.config.ts",
"test:format": "APP_ENV=test prettier --check .",
"test:playwright": "playwright test --project=main",
"test:playwright:interactive": "playwright test --ui",
"test:playwright:a11y:prod": "BASE_URL=https://va.gov USE_PROXY=false PW_WIDTH_VALUE=768 PW_HEIGHT_VALUE=720 PW_BROWSER_VALUE=chromium yarn playwright test --project=a11y",
"test:playwright:a11y:local": "USE_PROXY=false PW_WIDTH_VALUE=768 PW_HEIGHT_VALUE=720 PW_BROWSER_VALUE=chromium yarn playwright test --project=a11y",
"test:playwright:a11y:prod": "BASE_URL=https://va.gov USE_PROXY=false PW_WIDTH_VALUE=768 PW_HEIGHT_VALUE=720 PW_BROWSER_VALUE=chromium yarn playwright test --project=a11y",
"test:playwright:interactive": "playwright test --ui",
"test:playwright": "playwright test --project=main",
"test:types": "yarn build:env-loader && APP_ENV=test tsc --noEmit",
"storybook": "storybook dev -p 6006",
"storybook:build": "storybook build -o out/storybook-static --quiet"
"test:watch": "yarn test -- --watch",
"test": "yarn build:env-loader && APP_ENV=test node ./scripts/yarn/test.js"
},
"dependencies": {
"@actions/core": "^1.10.1",
Expand Down Expand Up @@ -67,16 +67,16 @@
"linkinator": "^6.0.3",
"lodash": "^4.17.21",
"mq-polyfill": "^1.1.8",
"next": "^14.2.5",
"next-drupal": "^1.6.0",
"next-drupal-query": "^0.4.0",
"next-drupal": "^1.6.0",
"next-sitemap": "^4.2.3",
"next": "^14.2.5",
"playwright-core": "^1.47.2",
"plop": "^4.0.1",
"proxy-fetcher": "0.1.0",
"react": "^18.3.1",
"react-dom": "^18.2.0",
"react-gtm-module": "^2.0.11",
"react": "^18.3.1",
"redis": "^4.7.0",
"safe-json-stringify": "^1.2.0",
"superjson": "^2.2.1",
Expand Down Expand Up @@ -105,35 +105,35 @@
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.10",
"@types/node": "22.5.4",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.2.18",
"@types/react": "^18.3.1",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^8.7.0",
"axe-core": "^4.10.0",
"debug": "^4.3.4",
"eslint": "8.57.0",
"eslint-config-next": "^14.2.5",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.8.0",
"eslint-plugin-jest-dom": "^5.2.0",
"eslint-plugin-jest": "^28.8.0",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-testing-library": "^6.2.2",
"eslint-plugin-unused-imports": "^3.1.0",
"eslint": "8.57.0",
"http-server": "^14.1.1",
"husky": "^9.0.11",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-watch-typeahead": "^2.2.2",
"jest": "^29.7.0",
"lint-staged": "^15.2.2",
"msw": "^2.4.9",
"nock": "^13.5.4",
"node_extra_ca_certs_mozilla_bundle": "^1.0.6",
"npm": "^10.8.2",
"prettier": "^3.2.5",
"prettier-eslint": "^16.3.0",
"prettier": "^3.2.5",
"storybook": "^8.0.5",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
Expand Down
106 changes: 53 additions & 53 deletions src/data/queries/index.ts
Original file line number Diff line number Diff line change
@@ -1,88 +1,88 @@
import { createQueries } from 'next-drupal-query'
import * as PressRelease from './pressRelease'
import * as PressReleaseTeaser from './pressReleaseTeaser'
import * as PressReleaseListing from './pressReleaseListing'
import * as NewsStory from './newsStory'
import * as NewsStoryTeaser from './newsStoryTeaser'
import * as StoryListing from './storyListing'
import * as QuestionAnswer from './questionAnswer'
import * as ExpandableText from './expandableText'
import * as LinkTeaser from './linkTeaser'
import * as MediaImage from './mediaImage'
import * as MediaDocument from './mediaDocument'
import * as MediaVideo from './mediaVideo'
import * as Banners from './banners'
import * as PersonProfile from './personProfile'
import * as Button from './button'
import * as AudienceTopics from './audienceTopics'
import * as Accordion from './accordion'
import * as Alert from './alert'
import * as AlertBlock from './alertBlock'
import * as AlertSingle from './alertSingle'
import * as AlertNonReusable from './alertNonReusable'
import * as EmailContact from './emailContact'
import * as PhoneNumber from './phoneNumber'
import * as ContactInfo from './contactInfo'
import * as AlertSingle from './alertSingle'
import * as AudienceTopics from './audienceTopics'
import * as Banners from './banners'
import * as BenefitsHub from './benefitsHubLinks'
import * as Wysiwyg from './wysiwyg'
import * as StaticPathResources from './staticPathResources'
import * as HeaderFooter from './headerFooter'
import * as ProcessList from './processList'
import * as PromoBlock from './promoBlock'
import * as Button from './button'
import * as CollapsiblePanel from './collapsiblePanel'
import * as CollapsiblePanelItem from './collapsiblePanelItem'
import * as ContactInfo from './contactInfo'
import * as EmailContact from './emailContact'
import * as Event from './event'
import * as EventTeaser from './eventTeaser'
import * as EventListing from './eventListing'
import * as VamcEhr from './vamcEhr'
import * as EventTeaser from './eventTeaser'
import * as ExpandableText from './expandableText'
import * as FeaturedContent from './featuredContent'
import * as Accordion from './accordion'
import * as SupportServices from './supportServices'
import * as ResourcesSupport from './resourcesSupport'
import * as CollapsiblePanel from './collapsiblePanel'
import * as CollapsiblePanelItem from './collapsiblePanelItem'
import * as HeaderFooter from './headerFooter'
import * as HealthServices from './healthServices'
import * as LinkTeaser from './linkTeaser'
import * as MediaDocument from './mediaDocument'
import * as MediaImage from './mediaImage'
import * as MediaVideo from './mediaVideo'
import * as NewsStory from './newsStory'
import * as NewsStoryTeaser from './newsStoryTeaser'
import * as NumberCallout from './numberCallout'
import * as Table from './table'
import * as ReactWidget from './reactWidget'
import * as PersonProfile from './personProfile'
import * as PhoneNumber from './phoneNumber'
import * as PressRelease from './pressRelease'
import * as PressReleaseListing from './pressReleaseListing'
import * as PressReleaseTeaser from './pressReleaseTeaser'
import * as ProcessList from './processList'
import * as PromoBlock from './promoBlock'
import * as QaGroup from './qaGroup'
import * as QaParagraph from './qaParagraph'
import * as QaSection from './qaSection'
import * as QaGroup from './qaGroup'
import * as QuestionAnswer from './questionAnswer'
import * as ReactWidget from './reactWidget'
import * as ResourcesSupport from './resourcesSupport'
import * as StaticPathResources from './staticPathResources'
import * as StoryListing from './storyListing'
import * as SupportServices from './supportServices'
import * as Table from './table'
import * as VamcEhr from './vamcEhr'
import * as VetCenter from './vetCenter'
import * as HealthServices from './healthServices'
import * as Wysiwyg from './wysiwyg'
import {
ResourceType,
PageResourceType,
PARAGRAPH_RESOURCE_TYPES,
ParagraphResourceType,
RESOURCE_TYPES,
PARAGRAPH_RESOURCE_TYPES,
PageResourceType,
ResourceType,
} from '@/lib/constants/resourceTypes'

export const QUERIES_MAP = {
// Standard Drupal entity data queries
// Nodes
[RESOURCE_TYPES.STORY]: NewsStory,
[`${RESOURCE_TYPES.STORY}--teaser` as const]: NewsStoryTeaser,
[RESOURCE_TYPES.STORY_LISTING]: StoryListing,
[RESOURCE_TYPES.QA]: QuestionAnswer,
[RESOURCE_TYPES.BENEFITS_HUB]: BenefitsHub, // "Benefits Hub Landing Page"
[RESOURCE_TYPES.EVENT_LISTING]: EventListing,
[RESOURCE_TYPES.EVENT]: Event,
[`${RESOURCE_TYPES.EVENT}--teaser` as const]: EventTeaser,
[RESOURCE_TYPES.EVENT_LISTING]: EventListing,
[RESOURCE_TYPES.HEALTH_SERVICES]: HealthServices,
[RESOURCE_TYPES.PERSON_PROFILE]: PersonProfile,
[RESOURCE_TYPES.PRESS_RELEASE_LISTING]: PressReleaseListing,
[RESOURCE_TYPES.PRESS_RELEASE]: PressRelease,
[`${RESOURCE_TYPES.PRESS_RELEASE}--teaser` as const]: PressReleaseTeaser,
[RESOURCE_TYPES.PRESS_RELEASE_LISTING]: PressReleaseListing,
[RESOURCE_TYPES.BENEFITS_HUB]: BenefitsHub, // "Benefits Hub Landing Page"
[RESOURCE_TYPES.SUPPORT_SERVICES]: SupportServices,
[RESOURCE_TYPES.QA]: QuestionAnswer,
[RESOURCE_TYPES.RESOURCES_SUPPORT]: ResourcesSupport,
[RESOURCE_TYPES.STORY_LISTING]: StoryListing,
[RESOURCE_TYPES.STORY]: NewsStory,
[`${RESOURCE_TYPES.STORY}--teaser` as const]: NewsStoryTeaser,
[RESOURCE_TYPES.SUPPORT_SERVICES]: SupportServices,
[RESOURCE_TYPES.VET_CENTER]: VetCenter,
[RESOURCE_TYPES.HEALTH_SERVICES]: HealthServices,

// Paragraphs
[PARAGRAPH_RESOURCE_TYPES.ACCORDION_ITEM]: Accordion,
[PARAGRAPH_RESOURCE_TYPES.ALERT]: Alert,
[PARAGRAPH_RESOURCE_TYPES.ALERT_NON_REUSABLE]: AlertNonReusable,
[PARAGRAPH_RESOURCE_TYPES.ALERT_SINGLE]: AlertSingle,
[PARAGRAPH_RESOURCE_TYPES.ALERT]: Alert,
[PARAGRAPH_RESOURCE_TYPES.AUDIENCE_TOPICS]: AudienceTopics,
[PARAGRAPH_RESOURCE_TYPES.BUTTON]: Button,
[PARAGRAPH_RESOURCE_TYPES.COLLAPSIBLE_PANEL]: CollapsiblePanel,
[PARAGRAPH_RESOURCE_TYPES.COLLAPSIBLE_PANEL_ITEM]: CollapsiblePanelItem,
[PARAGRAPH_RESOURCE_TYPES.COLLAPSIBLE_PANEL]: CollapsiblePanel,
[PARAGRAPH_RESOURCE_TYPES.CONTACT_INFORMATION]: ContactInfo,
[PARAGRAPH_RESOURCE_TYPES.EMAIL_CONTACT]: EmailContact,
[PARAGRAPH_RESOURCE_TYPES.EXPANDABLE_TEXT]: ExpandableText,
Expand All @@ -91,9 +91,9 @@ export const QUERIES_MAP = {
[PARAGRAPH_RESOURCE_TYPES.NUMBER_CALLOUT]: NumberCallout,
[PARAGRAPH_RESOURCE_TYPES.PHONE_CONTACT]: PhoneNumber,
[PARAGRAPH_RESOURCE_TYPES.PROCESS_LIST]: ProcessList,
[PARAGRAPH_RESOURCE_TYPES.QA]: QaParagraph,
[PARAGRAPH_RESOURCE_TYPES.QA_SECTION]: QaSection,
[PARAGRAPH_RESOURCE_TYPES.QA_GROUP]: QaGroup,
[PARAGRAPH_RESOURCE_TYPES.QA_SECTION]: QaSection,
[PARAGRAPH_RESOURCE_TYPES.QA]: QaParagraph,
[PARAGRAPH_RESOURCE_TYPES.REACT_WIDGET]: ReactWidget,
[PARAGRAPH_RESOURCE_TYPES.RICH_TEXT_CHAR_LIMIT_1000]: Wysiwyg,
[PARAGRAPH_RESOURCE_TYPES.TABLE]: Table,
Expand All @@ -104,8 +104,8 @@ export const QUERIES_MAP = {
'block_content--promo': PromoBlock,

// Media
'media--image': MediaImage,
'media--document': MediaDocument,
'media--image': MediaImage,
'media--video': MediaVideo,

// Custom queries
Expand Down
Loading
Loading