Skip to content

Commit

Permalink
Merge branch 'v2' into v2-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Sep 4, 2024
2 parents d190614 + 7bed715 commit 5e72468
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .storybook/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -164689,3 +164689,7 @@ div.markdown-typography-edit-content.markdown-typography-rtl {
margin: 0 20px 0 0;
padding: 0 4px 0 0;
}

.ant-btn-compact-first-item {
flex-grow: 1;
}
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gisce/react-ooui",
"version": "2.18.0-rc.1",
"version": "2.19.0",
"engines": {
"node": "20.5.0"
},
Expand Down Expand Up @@ -35,7 +35,7 @@
"dependencies": {
"@ant-design/plots": "^1.0.9",
"@gisce/fiber-diagram": "2.1.1",
"@gisce/ooui": "2.9.0",
"@gisce/ooui": "2.10.0",
"@gisce/react-formiga-components": "1.8.0",
"@gisce/react-formiga-table": "1.5.0",
"@monaco-editor/react": "^4.4.5",
Expand Down
12 changes: 11 additions & 1 deletion src/actionbar/FormActionBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ function FormActionBar({ toolbar }: { toolbar: any }) {
}
}

function tryDuplicate() {
showConfirmDialog({
confirmMessage: t("confirmDuplicate"),
t,
onOk: () => {
duplicate();
},
});
}

function tryDelete() {
showConfirmDialog({
confirmMessage: t("confirmRemoveItem"),
Expand Down Expand Up @@ -297,7 +307,7 @@ function FormActionBar({ toolbar }: { toolbar: any }) {
formIsLoading
}
loading={duplicatingItem}
onClick={duplicate}
onClick={tryDuplicate}
/>
<ActionButton
icon={<DeleteOutlined />}
Expand Down
12 changes: 11 additions & 1 deletion src/actionbar/TreeActionBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ function TreeActionBar(props: Props) {
searchTreeNameSearch !== undefined &&
searchTreeNameSearch.trim().length > 0;

function tryDuplicate() {
showConfirmDialog({
confirmMessage: t("confirmDuplicate"),
t,
onOk: () => {
duplicate();
},
});
}

function tryDelete() {
showConfirmDialog({
confirmMessage: t("confirmRemove"),
Expand Down Expand Up @@ -231,7 +241,7 @@ function TreeActionBar(props: Props) {
treeIsLoading
}
loading={duplicatingItem}
onClick={duplicate}
onClick={tryDuplicate}
/>
<ActionButton
icon={<DeleteOutlined />}
Expand Down
1 change: 1 addition & 0 deletions src/context/ContentRootContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ const ContentRootProvider = (
{children}
<Modal
title={t("generatingReport")}
zIndex={9999}
open={reportGenerating}
footer={null}
closable={false}
Expand Down
2 changes: 2 additions & 0 deletions src/locales/ca_ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,6 @@ export default {
allRecordsSelected: "Hi ha {totalRecords} registres seleccionats.",
openInSameWindow: "Obrir en la pestanya actual",
openInNewTab: "Obrir en una nova pestanya",
confirmDuplicate:
"Estàs segur de volguer duplicar els registre/s seleccionats?",
};
1 change: 1 addition & 0 deletions src/locales/en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,5 @@ export default {
allRecordsSelected: "Hi ha {totalRecords} registres seleccionats.",
openInSameWindow: "Open in the current tab",
openInNewTab: "Open in a new tab",
confirmDuplicate: "Are you sure you want to duplicate the selected item/s?",
};
2 changes: 2 additions & 0 deletions src/locales/es_ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,6 @@ export default {
allRecordsSelected: "Hay {totalRecords} registros seleccionados.",
openInSameWindow: "Abrir en la pestaña actual",
openInNewTab: "Abrir en una nueva pestaña",
confirmDuplicate:
"Estás seguro de querer duplicar el registro/s seleccionado/s?",
};
2 changes: 1 addition & 1 deletion src/widgets/custom/ButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const ButtonGroup = (props: ButtonGroupProps) => {
return null;
} else if (ooui.buttons.length > 1) {
return (
<Field ooui={new FieldOoui({ ...{ ooui } })}>
<Field ooui={new FieldOoui({ ...{ defaultButton } })}>
<Dropdown.Button
disabled={!activated || readOnly}
onClick={onClick}
Expand Down

0 comments on commit 5e72468

Please sign in to comment.