Skip to content

Commit

Permalink
Deploying to gh-pages from @ 5b28ab7 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
dlen committed Feb 12, 2024
1 parent 44a7999 commit beb9109
Show file tree
Hide file tree
Showing 45 changed files with 393 additions and 297 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 1 addition & 1 deletion iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,4 +363,4 @@



window['STORIES'] = [{"titlePrefix":"","directory":"./.storybook/stories","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:\\.storybook\\/stories(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./.storybook/stories","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:\\.storybook\\/stories(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.d29908dc.iframe.bundle.js"></script><script src="483.71011450.iframe.bundle.js"></script><script src="main.5ad57d77.iframe.bundle.js"></script></body></html>
window['STORIES'] = [{"titlePrefix":"","directory":"./.storybook/stories","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:\\.storybook\\/stories(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./.storybook/stories","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:\\.storybook\\/stories(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.d29908dc.iframe.bundle.js"></script><script src="483.38191d48.iframe.bundle.js"></script><script src="main.7bf0e3e8.iframe.bundle.js"></script></body></html>
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@



window['DOCS_MODE'] = false;</script><script src="runtime~main.a351fec40080f5c29fba.manager.bundle.js"></script><script src="312.f48f2c5452fbb4ea42c5.manager.bundle.js"></script><script src="main.e509b04e2cf55ec299af.manager.bundle.js"></script></body></html>
window['DOCS_MODE'] = false;</script><script src="runtime~main.a351fec40080f5c29fba.manager.bundle.js"></script><script src="312.f5dcf9d4a9338a1d3fd8.manager.bundle.js"></script><script src="main.e509b04e2cf55ec299af.manager.bundle.js"></script></body></html>
168 changes: 84 additions & 84 deletions locales/fr-FR/common.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions locales/ru-RU/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@
"Make sure your print it or store it in a safe place. You may need it later!": "Убедитесь, что это ваш принт и храните его в надежном месте. Вам может понадобиться позже!",
"Manage Subscription": "Управление подпиской",
"Mandatory": "Обязательный",
"Mark as expired": "Mark as expired",
"Mark as expired": "Пометить как истёкший",
"Member": "Участник",
"Members": "Участники",
"Metadata": "Метадата",
Expand Down Expand Up @@ -562,7 +562,7 @@
"New Organization Recovery Key": "Новый ключ восстановления организации",
"new owner": "новый владелец",
"New password": "Новый пароль",
"New TOTP": "New TOTP",
"New TOTP": "Новый TOTP",
"New user": "Новый пользователь",
"Next": "Следующий",
"No": "Нет",
Expand Down Expand Up @@ -814,7 +814,7 @@
"Server response is empty.": "Ответ сервера пуст.",
"Server url": "URL сервера",
"Session Expired": "Сессия истекла",
"Set expiry date": "Set expiry date",
"Set expiry date": "Установить срок действия",
"Set the date automatically:": "Set the date automatically:",
"Set the date manually:": "Set the date manually:",
"Settings": "Настройки",
Expand Down Expand Up @@ -1213,7 +1213,7 @@
"When a group is deleted, notify the users who were members of it.": "При удалении группы уведомлять пользователей, которые являлись ее членами.",
"When a password is created, notify its creator.": "При создании пароля уведомлять его создателя.",
"When a password is deleted, notify the users who had access to it.": "При удалении пароля уведомлять пользователей, имевших к нему доступ.",
"When a password is expired, notify the owners to change it.": "When a password is expired, notify the owners to change it.",
"When a password is expired, notify the owners to change it.": "Уведомить владельцев о необходимости смены пароля с истёкшим сроком действия.",
"When a password is shared, notify the users who gain access to it.": "При введении общего доступа к паролю уведомлять пользователей, получающих доступ.",
"When a password is updated, notify the users who have access to it.": "При обновлении пароля уведомлять пользователей, имеющих к нему доступ.",
"When a user aborted a recover, notify all the administrators.": "При прерывании восстановления пользователем уведомлять всех администраторов.",
Expand Down Expand Up @@ -1361,18 +1361,18 @@
"Delete resource?_few": "Delete resources?",
"Delete resource?_many": "Delete resources?",
"Delete resource?_other": "Delete resources?",
"Set an expiry date_one": "Set an expiry date",
"Set an expiry date_few": "Set expiry dates",
"Set an expiry date_many": "Set expiry dates",
"Set an expiry date_other": "Set expiry dates",
"Set an expiry date_one": "Установить срок действия",
"Set an expiry date_few": "Установить сроки действия",
"Set an expiry date_many": "Установить сроки действия",
"Set an expiry date_other": "Установить сроки действия",
"The expiry date of the selected resource has been updated._one": "The expiry date of the selected resource has been updated.",
"The expiry date of the selected resource has been updated._few": "The expiry dates of the selected resources have been updated.",
"The expiry date of the selected resource has been updated._many": "The expiry dates of the selected resources have been updated.",
"The expiry date of the selected resource has been updated._other": "The expiry dates of the selected resources have been updated.",
"The resource has been deleted successfully._one": "Ресурс успешно удален.",
"The resource has been deleted successfully._few": "The resources have been deleted successfully.",
"The resource has been deleted successfully._many": "The resources have been deleted successfully.",
"The resource has been deleted successfully._other": "The resources have been deleted successfully.",
"The resource has been deleted successfully._few": "Ресурсы успешно удалены.",
"The resource has been deleted successfully._many": "Ресурсы успешно удалены.",
"The resource has been deleted successfully._other": "Ресурсы успешно удалены.",
"The resource has been marked as expired._one": "The resource has been marked as expired.",
"The resource has been marked as expired._few": "The resources have been marked as expired.",
"The resource has been marked as expired._many": "The resources have been marked as expired.",
Expand Down

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 1 addition & 1 deletion project.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"generatedAt":1706886363884,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"npm","version":"10.2.3"},"language":"javascript","storybookPackages":{},"framework":{},"addons":{"@storybook/addon-links":{"version":"6.5.16"},"@storybook/addon-essentials":{"options":{"backgrounds":false},"version":"6.5.16"}}}
{"generatedAt":1707751318427,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"npm","version":"10.2.3"},"language":"javascript","storybookPackages":{},"framework":{},"addons":{"@storybook/addon-links":{"version":"6.5.16"},"@storybook/addon-essentials":{"options":{"backgrounds":false},"version":"6.5.16"}}}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("DisplayAdministrationPasswordExpirySettingsPage", () => {
expect.assertions(2);
const context = defaultAppContext();
const props = defaultPropsCE();
props.context.port.addRequestListener("passbolt.password-expiry.find", () => defaultPasswordExpirySettingsEntityDto());
props.context.port.addRequestListener("passbolt.password-expiry.get-or-find", () => defaultPasswordExpirySettingsEntityDto());

const page = new DisplayAdministrationPasswordExpirySettingsPage(context, props);
await waitForTrue(() => page.exists());
Expand All @@ -51,7 +51,7 @@ describe("DisplayAdministrationPasswordExpirySettingsPage", () => {
expect.assertions(3);
const context = defaultAppContext();
const props = defaultPropsCE();
props.context.port.addRequestListener("passbolt.password-expiry.find", () => defaultPasswordExpirySettingsEntityDto());
props.context.port.addRequestListener("passbolt.password-expiry.get-or-find", () => defaultPasswordExpirySettingsEntityDto());

const page = new DisplayAdministrationPasswordExpirySettingsPage(context, props);
await waitForTrue(() => page.exists());
Expand All @@ -71,7 +71,7 @@ describe("DisplayAdministrationPasswordExpirySettingsPage", () => {

const expectedPasswordExpirySettingsDto = defaultPasswordExpirySettingsViewModelDto();

props.context.port.addRequestListener("passbolt.password-expiry.find", () => disabledPasswordExpirySettingsViewModelDto());
props.context.port.addRequestListener("passbolt.password-expiry.get-or-find", () => disabledPasswordExpirySettingsViewModelDto());
props.context.port.addRequestListener("passbolt.password-expiry.save", async passwordExpirySettingsDto => {
expect(passwordExpirySettingsDto).toStrictEqual(expectedPasswordExpirySettingsDto);
return passwordExpirySettingsDto;
Expand All @@ -92,7 +92,7 @@ describe("DisplayAdministrationPasswordExpirySettingsPage", () => {
const currentSettings = passwordExpirySettingsEntityDtoFromApi();
const expectedPasswordExpirySettingsId = currentSettings.id;

props.context.port.addRequestListener("passbolt.password-expiry.find", () => currentSettings);
props.context.port.addRequestListener("passbolt.password-expiry.get-or-find", () => currentSettings);
props.context.port.addRequestListener("passbolt.password-expiry.delete", async passwordExpirySettingsId => {
expect(passwordExpirySettingsId).toStrictEqual(expectedPasswordExpirySettingsId);
});
Expand All @@ -108,7 +108,7 @@ describe("DisplayAdministrationPasswordExpirySettingsPage", () => {
expect.assertions(1);
const context = defaultAppContext();
const props = defaultPropsCE();
props.context.port.addRequestListener("passbolt.password-expiry.find", () => disabledPasswordExpirySettingsViewModelDto());
props.context.port.addRequestListener("passbolt.password-expiry.get-or-find", () => disabledPasswordExpirySettingsViewModelDto());

const page = new DisplayAdministrationPasswordExpirySettingsPage(context, props);
await waitForTrue(() => page.exists());
Expand All @@ -122,7 +122,7 @@ describe("DisplayAdministrationPasswordExpirySettingsPage", () => {
expect.assertions(2);
const context = defaultAppContext();
const props = defaultPropsCE();
props.context.port.addRequestListener("passbolt.password-expiry.find", () => disabledPasswordExpirySettingsViewModelDto());
props.context.port.addRequestListener("passbolt.password-expiry.get-or-find", () => disabledPasswordExpirySettingsViewModelDto());

const page = new DisplayAdministrationPasswordExpirySettingsPage(context, props);
await waitForTrue(() => page.exists());
Expand All @@ -139,7 +139,7 @@ describe("DisplayAdministrationPasswordExpirySettingsPage", () => {
expect.assertions(2);
const context = defaultAppContext();
const props = defaultPropsCE();
props.context.port.addRequestListener("passbolt.password-expiry.find", () => disabledPasswordExpirySettingsViewModelDto());
props.context.port.addRequestListener("passbolt.password-expiry.get-or-find", () => disabledPasswordExpirySettingsViewModelDto());

let savePromise;
props.context.port.addRequestListener("passbolt.password-expiry.save", () => new Promise(resolve => {
Expand Down Expand Up @@ -168,7 +168,7 @@ describe("DisplayAdministrationPasswordExpirySettingsPage", () => {
const props = defaultPropsCE();
const entityDto = defaultPasswordExpirySettingsViewModelDto();
const expectedError = new Error("Something went wrong!");
props.context.port.addRequestListener("passbolt.password-expiry.find", () => entityDto);
props.context.port.addRequestListener("passbolt.password-expiry.get-or-find", () => entityDto);
props.context.port.addRequestListener("passbolt.password-expiry.save", () => { throw expectedError; });

const page = new DisplayAdministrationPasswordExpirySettingsPage(context, props);
Expand All @@ -186,7 +186,7 @@ describe("DisplayAdministrationPasswordExpirySettingsPage", () => {
const context = defaultAppContext();
const props = defaultPropsPro();
const entityDto = defaultPasswordExpirySettingsViewModelDto();
props.context.port.addRequestListener("passbolt.password-expiry.find", () => entityDto);
props.context.port.addRequestListener("passbolt.password-expiry.get-or-find", () => entityDto);

const page = new DisplayAdministrationPasswordExpirySettingsPage(context, props);
await waitForTrue(() => page.exists());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ class DisplayResourcesList extends React.Component {

this.defaultColumns.push(new ColumnNameModel({label: this.translate("Name")}));
if (this.props.passwordExpiryContext.isFeatureEnabled()) {
this.defaultColumns.push(new ColumnExpiredModel({label: this.translate("Expiry"), cellRenderer: {component: CellExpiryDate}}));
this.defaultColumns.push(new ColumnExpiredModel({label: this.translate("Expiry"), cellRenderer: {component: CellExpiryDate, props: {locale: this.props.context.locale, t: this.props.t}}}));
}
this.defaultColumns.push(new ColumnUsernameModel({label: this.translate("Username"), cellRenderer: {component: CellButton, props: {onClick: this.handleCopyUsernameClick}}}));
this.defaultColumns.push(new ColumnPasswordModel({label: this.translate("Password"), cellRenderer: {component: CellPassword, props: {title: this.translate("secret"), getPreviewPassword: this.getPreviewPassword, canCopy: this.canCopySecret, canPreview: this.canPreviewSecret, onPasswordClick: this.handleCopyPasswordClick, onPreviewPasswordClick: this.handlePreviewPasswordButtonClick, hasPassword: this.isPasswordResources}}}));
if (this.props.context.siteSettings.canIUse('totpResourceTypes')) {
this.defaultColumns.push(new ColumnTotpModel({label: this.translate("TOTP"), cellRenderer: {component: CellTotp, props: {title: this.translate("secret"), getPreviewTotp: this.getPreviewTotp, canCopy: this.canCopySecret, canPreview: this.canPreviewSecret, onTotpClick: this.handleCopyTotpClick, onPreviewTotpClick: this.handlePreviewTotpButtonClick, hasTotp: this.isTotpResources}}}));
}
this.defaultColumns.push(new ColumnUriModel({label: this.translate("URI"), cellRenderer: {component: CellLink, props: {onClick: this.handleGoToResourceUriClick}}}));
this.defaultColumns.push(new ColumnModifiedModel({label: this.translate("Modified"), cellRenderer: {component: CellDate}}));
this.defaultColumns.push(new ColumnModifiedModel({label: this.translate("Modified"), cellRenderer: {component: CellDate, props: {locale: this.props.context.locale, t: this.props.t}}}));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ class ExportResources extends React.Component {
*/
get exportFormats() {
return [
{label: "kdbx (keepass / keepassx)", value: "kdbx"},
{label: "csv (keepass / keepassx)", value: "csv-kdbx"},
{label: "kdbx (keepass)", value: "kdbx"},
{label: "kdbx (keepassXC & others)", value: "kdbx-others"},
{label: "csv (keepass)", value: "csv-kdbx"},
{label: "csv (lastpass)", value: "csv-lastpass"},
{label: "csv (1password)", value: "csv-1password"},
{label: "csv (chromium based browsers)", value: "csv-chromium"},
Expand Down Expand Up @@ -200,7 +201,7 @@ class ExportResources extends React.Component {
.then(this.onExportSuccess.bind(this))
.catch(this.onExportFailure.bind(this));
} else { // KDBX case
await this.props.dialogContext.open(ExportResourcesCredentials);
await this.props.dialogContext.open(ExportResourcesCredentials, {format: this.state.selectedExportFormat});
this.close();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("As LU I should see the password export dialog", () => {
expect(page.title).toBe("Export passwords");

// Fill the form
await page.selectFormat(2);
await page.selectFormat(3);

const requestMockImpl = jest.fn((message, data) => data);
mockContextRequest(requestMockImpl);
Expand Down Expand Up @@ -79,13 +79,13 @@ describe("As LU I should see the password export dialog", () => {
await page.submitExport();
await waitFor(() => {});

expect(props.dialogContext.open).toHaveBeenCalledWith(ExportResourcesCredentials);
expect(props.dialogContext.open).toHaveBeenCalledWith(ExportResourcesCredentials, {format: "kdbx"});
expect(props.onClose).toBeCalled();
});

it('As LU I cannot update the form fields and I should see a processing feedback while submitting the form', async() => {
// Fill the form
await page.selectFormat(1);
await page.selectFormat(2);
// Mock the request function to make it the expected result
let updateResolve;
const requestMockImpl = jest.fn(() => new Promise(resolve => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class ExportResourcesCredentials extends Component {
const foldersIds = this.props.resourceWorkspaceContext.resourcesToExport.foldersIds;
const resourcesIds = this.props.resourceWorkspaceContext.resourcesToExport.resourcesIds;
const exportDto = {
format: "kdbx",
format: this.props.format,
folders_ids: foldersIds,
resources_ids: resourcesIds,
options: options
Expand Down Expand Up @@ -293,6 +293,7 @@ ExportResourcesCredentials.propTypes = {
actionFeedbackContext: PropTypes.any, // The action feedback context
dialogContext: PropTypes.any, // The dialog context
resourceWorkspaceContext: PropTypes.any, // The resource workspace context
format: PropTypes.string, // The kdbx format
t: PropTypes.func, // The translation function
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ export function defaultAppContext(appContext) {

/**
* Default props
* @returns {{resource: {id: string, name: string}}}
* @return {{onClose: *, dialogContext: {open: *}, format: string, resourceWorkspaceContext: {resourcesToExport: {foldersIds: [{id: string}], resourcesIds: [{id: string},{id: string}]}, onResourcesToExport: *}}}
*/
export function defaultProps() {
return {
onClose: jest.fn(),
dialogContext: {
open: jest.fn()
},
format: "kdbx",
resourceWorkspaceContext: {
onResourcesToExport: jest.fn(),
resourcesToExport: {
Expand Down
Loading

0 comments on commit beb9109

Please sign in to comment.