-
-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into theming-a-base-theme
- Loading branch information
Showing
66 changed files
with
342 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixed client copy mutation, cleanup up move mutation for consistency @pnicolli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
import { z } from 'zod'; | ||
import { ApiRequestParams, apiRequest } from '../../API'; | ||
import { | ||
PloneClientConfig, | ||
PloneClientConfigSchema, | ||
} from '../../validation/config'; | ||
import { PloneClientConfig } from '../../validation/config'; | ||
import { copyMoveDataSchema as copyDataSchema } from '../../validation/copymove'; | ||
import { CopyMoveResponse as CopyResponse } from '@plone/types'; | ||
|
||
export const copyArgsSchema = z.object({ | ||
data: copyDataSchema, | ||
config: PloneClientConfigSchema, | ||
}); | ||
|
||
export type CopyArgs = z.infer<typeof copyArgsSchema>; | ||
export type CopyArgs = z.infer<typeof copyDataSchema> & { | ||
config: PloneClientConfig; | ||
}; | ||
|
||
export const copy = async ({ | ||
path, | ||
data, | ||
config, | ||
}: CopyArgs): Promise<CopyResponse> => { | ||
const validatedArgs = copyArgsSchema.parse({ | ||
const validatedArgs = copyDataSchema.parse({ | ||
path, | ||
data, | ||
config, | ||
}); | ||
|
||
const options: ApiRequestParams = { | ||
config, | ||
data: validatedArgs.data, | ||
config: validatedArgs.config, | ||
}; | ||
|
||
return apiRequest('post', '/@copy', options); | ||
const copyPath = `${validatedArgs.path}/@copy`; | ||
|
||
return apiRequest('post', copyPath, options); | ||
}; | ||
|
||
export const copyMutation = ({ config }: { config: PloneClientConfig }) => ({ | ||
mutationKey: ['post', 'copy'], | ||
mutationFn: ({ data }: Omit<CopyArgs, 'config'>) => copy({ data, config }), | ||
mutationFn: ({ path, data }: Omit<CopyArgs, 'config'>) => | ||
copy({ path, data, config }), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import { z } from 'zod'; | ||
|
||
export const copyMoveDataSchema = z.object({ | ||
source: z.union([z.string(), z.array(z.string())]), | ||
path: z.string(), | ||
data: z.object({ | ||
source: z.union([z.string(), z.array(z.string())]), | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added the configuration for VSCode not to reformat Markdown and MyST files. @aadityaforwork |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fetch `user` before pass it to the `restricted` function of the block settings. @wesleybl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,10 @@ describe('Accessibility Tests', () => { | |
|
||
it('Contact form has not a11y violations', () => { | ||
cy.navigate('/contact-form'); | ||
cy.get('#field-name').click().type('input'); | ||
cy.get('#field-from').click().type('[email protected]'); | ||
cy.get('#field-subject').click().type('input'); | ||
cy.get('#field-message').click().type('input'); | ||
cy.checkA11y(); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.