Skip to content

Commit

Permalink
v1.185.0
Browse files Browse the repository at this point in the history
  • Loading branch information
varovaro committed Sep 23, 2024
2 parents bd6c913 + a3b5b4b commit 7d35b26
Show file tree
Hide file tree
Showing 20 changed files with 310 additions and 253 deletions.
103 changes: 12 additions & 91 deletions app/react/App/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -1716,14 +1716,6 @@ input[type="range"]::-ms-fill-lower {
margin: 0.5rem;
}

.m-4 {
margin: 1rem;
}

.m-5 {
margin: 1.25rem;
}

.m-auto {
margin: auto;
}
Expand Down Expand Up @@ -1822,10 +1814,6 @@ input[type="range"]::-ms-fill-lower {
margin-top: 0.5rem;
}

.mt-20 {
margin-top: 5rem;
}

.mt-4 {
margin-top: 1rem;
}
Expand Down Expand Up @@ -2108,10 +2096,6 @@ input[type="range"]::-ms-fill-lower {
width: 50%;
}

.w-60 {
width: 15rem;
}

.w-64 {
width: 16rem;
}
Expand Down Expand Up @@ -2194,10 +2178,6 @@ input[type="range"]::-ms-fill-lower {
min-width: 40rem;
}

.min-w-full {
min-width: 100%;
}

.max-w-20 {
max-width: 5rem;
}
Expand Down Expand Up @@ -2316,10 +2296,6 @@ input[type="range"]::-ms-fill-lower {
cursor: default;
}

.cursor-move {
cursor: move;
}

.cursor-not-allowed {
cursor: not-allowed;
}
Expand Down Expand Up @@ -2410,26 +2386,14 @@ input[type="range"]::-ms-fill-lower {
gap: 0.25rem;
}

.gap-10 {
gap: 2.5rem;
}

.gap-2 {
gap: 0.5rem;
}

.gap-3 {
gap: 0.75rem;
}

.gap-4 {
gap: 1rem;
}

.gap-5 {
gap: 1.25rem;
}

.gap-6 {
gap: 1.5rem;
}
Expand All @@ -2438,6 +2402,18 @@ input[type="range"]::-ms-fill-lower {
gap: 2rem;
}

.space-x-0 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(0px * var(--tw-space-x-reverse));
margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse)));
}

.space-x-0\.5 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(0.125rem * var(--tw-space-x-reverse));
margin-left: calc(0.125rem * calc(1 - var(--tw-space-x-reverse)));
}

.space-x-1 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(0.25rem * var(--tw-space-x-reverse));
Expand All @@ -2450,12 +2426,6 @@ input[type="range"]::-ms-fill-lower {
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
}

.space-x-3 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(0.75rem * var(--tw-space-x-reverse));
margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));
}

.space-x-4 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(1rem * var(--tw-space-x-reverse));
Expand Down Expand Up @@ -2664,10 +2634,6 @@ input[type="range"]::-ms-fill-lower {
border-top-width: 1px;
}

.border-t-4 {
border-top-width: 4px;
}

.border-solid {
border-style: solid;
}
Expand Down Expand Up @@ -2863,21 +2829,11 @@ input[type="range"]::-ms-fill-lower {
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
}

.bg-gray-400 {
--tw-bg-opacity: 1;
background-color: rgb(156 163 175 / var(--tw-bg-opacity));
}

.bg-gray-50 {
--tw-bg-opacity: 1;
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
}

.bg-gray-800 {
--tw-bg-opacity: 1;
background-color: rgb(31 41 55 / var(--tw-bg-opacity));
}

.bg-gray-900 {
--tw-bg-opacity: 1;
background-color: rgb(17 24 39 / var(--tw-bg-opacity));
Expand Down Expand Up @@ -2948,11 +2904,6 @@ input[type="range"]::-ms-fill-lower {
background-color: rgb(238 242 255 / var(--tw-bg-opacity));
}

.bg-primary-600 {
--tw-bg-opacity: 1;
background-color: rgb(79 70 229 / var(--tw-bg-opacity));
}

.bg-primary-700 {
--tw-bg-opacity: 1;
background-color: rgb(67 56 202 / var(--tw-bg-opacity));
Expand Down Expand Up @@ -3184,22 +3135,10 @@ input[type="range"]::-ms-fill-lower {
padding-left: 0.25rem;
}

.pl-3 {
padding-left: 0.75rem;
}

.pl-4 {
padding-left: 1rem;
}

.pl-5 {
padding-left: 1.25rem;
}

.pl-7 {
padding-left: 1.75rem;
}

.pr-10 {
padding-right: 2.5rem;
}
Expand Down Expand Up @@ -3488,11 +3427,6 @@ input[type="range"]::-ms-fill-lower {
color: rgb(66 56 157 / var(--tw-text-opacity));
}

.text-indigo-900 {
--tw-text-opacity: 1;
color: rgb(54 47 120 / var(--tw-text-opacity));
}

.text-orange-400 {
--tw-text-opacity: 1;
color: rgb(255 138 76 / var(--tw-text-opacity));
Expand Down Expand Up @@ -4265,11 +4199,6 @@ input[type="range"]::-ms-fill-lower {
color: rgb(156 163 175 / var(--tw-placeholder-opacity));
}

:is(.dark .dark\:hover\:border-gray-500:hover) {
--tw-border-opacity: 1;
border-color: rgb(107 114 128 / var(--tw-border-opacity));
}

:is(.dark .dark\:hover\:\!bg-primary-700:hover) {
--tw-bg-opacity: 1 !important;
background-color: rgb(67 56 202 / var(--tw-bg-opacity)) !important;
Expand Down Expand Up @@ -4417,10 +4346,6 @@ input[type="range"]::-ms-fill-lower {
}

@media (min-width: 1024px) {
.lg\:grid {
display: grid;
}

.lg\:hidden {
display: none;
}
Expand All @@ -4439,10 +4364,6 @@ input[type="range"]::-ms-fill-lower {
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.lg\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lg\:px-6 {
padding-left: 1.5rem;
padding-right: 1.5rem;
Expand Down
38 changes: 23 additions & 15 deletions app/react/V2/Components/Forms/MultiselectList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,30 @@ const MultiselectList = ({
const [externalSearch, setExternalSearch] = useState(search);
const [filteredItems, setFilteredItems] = useState(items);
const [openGroups, setOpenGroups] = useState<string[]>([]);
const [selectedOrSuggestedItems, setSelectedOrSuggestedItems] = useState<Set<string>>(
new Set(selectedItems)
);
const optionsRef = useRef<HTMLUListElement>(null);

useEffect(() => {
const newSet = new Set<string>(selectedItems);
items.forEach(item => {
if (item.suggested) {
newSet.add(item.value);
}

if (item.items) {
item.items.forEach(subItem => {
if (subItem.suggested) {
newSet.add(subItem.value);
}
});
}
});

setSelectedOrSuggestedItems(newSet);
}, [items, selectedItems]);

useEffect(() => {
if (startOnSelected) {
const groupsToExpand = items
Expand Down Expand Up @@ -261,20 +283,6 @@ const MultiselectList = ({

const renderSelectedLabel = () => {
if (suggestions) {
const selectedOrSuggestedItems = new Set<string>(selectedItems);
items.forEach(item => {
if (item.suggested) {
selectedOrSuggestedItems.add(item.value);
}

if (item.items) {
item.items.forEach(subItem => {
if (subItem.suggested) {
selectedOrSuggestedItems.add(subItem.value);
}
});
}
});
return (
<>
<Translate>Selected or suggested</Translate>{' '}
Expand Down Expand Up @@ -318,7 +326,7 @@ const MultiselectList = ({
{
label: renderSelectedLabel(),
value: 'false',
disabled: selectedItems.length === 0,
disabled: selectedOrSuggestedItems.size === 0,
defaultChecked: startOnSelected,
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,14 @@ const TwoFactorSetup = ({ closePanel, isOpen }: TwoFactorSetupProps) => {
size={180}
bgColor="white"
fgColor="black"
title="qr code"
/>
</div>
</Card>
<Card className="mb-4 sm:col-span-3" title={<Translate>Secret keys</Translate>}>
<CopyValueInput
value={_secret}
className="mb-4 w-full"
className="w-full mb-4"
label={
<>
<Translate className="block">
Expand Down Expand Up @@ -157,7 +158,7 @@ const TwoFactorSetup = ({ closePanel, isOpen }: TwoFactorSetupProps) => {
</div>
</Sidepanel.Body>
<Sidepanel.Footer className="px-4 py-3">
<div className="flex gap-2 w-full">
<div className="flex w-full gap-2">
<Button styling="light" onClick={closePanel} className="grow">
<Translate>Cancel</Translate>
</Button>
Expand Down
2 changes: 1 addition & 1 deletion app/react/V2/Routes/Settings/IX/IXSuggestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const IXSuggestions = () => {
});

await suggestionsAPI.accept(preparedSuggestions);
setCurrentSuggestions(updateSuggestions(currentSuggestions, acceptedSuggestions));
setCurrentSuggestions(current => updateSuggestions(current, acceptedSuggestions));
setNotifications({
type: 'success',
text: <Translate>Suggestion accepted.</Translate>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ const PDFSidepanel = ({
<Controller
control={control}
name="field"
rules={{ required: true }}
rules={{ required: property?.required }}
render={({ field: { onChange, value } }) => (
<MultiselectList
onChange={onChange}
Expand Down
8 changes: 5 additions & 3 deletions app/react/V2/Routes/Settings/IX/components/TableElements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const getIcon = (color: Color) => {
const ExtractorHeader = () => <Translate className="whitespace-nowrap">Extractor Name</Translate>;
const PropertyHeader = () => <Translate>Property</Translate>;
const TemplatesHeader = () => <Translate>Template(s)</Translate>;
const TitleHeader = () => <Translate>Document</Translate>;
const TitleHeader = () => <Translate>Document FOR</Translate>;
const CurrentValueHeader = () => (
<Translate className="whitespace-nowrap">Current Value/Suggestion</Translate>
);
Expand Down Expand Up @@ -200,8 +200,10 @@ const OpenPDFButton = ({
);
};

const TitleCell = ({ cell }: CellContext<TableSuggestion, TableSuggestion['fileId']>) => (
<div className="text-xs font-normal text-gray-900">{cell.getValue()}</div>
const TitleCell = ({ cell, row }: CellContext<TableSuggestion, TableSuggestion['fileId']>) => (
<div className="text-xs font-normal text-gray-900">
{cell.getValue()} ({row.original.language})
</div>
);

const SegmentCell = ({ cell, row }: CellContext<TableSuggestion, TableSuggestion['segment']>) => {
Expand Down
1 change: 1 addition & 0 deletions contents/ui-translations/ar.csv
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ Do you want to delete the following items?,Do you want to delete the following i
Document,مستند
Document and entity types,انواع الوثائق والكيانات
Document contents,محتويات المستند
Document FOR,Document FOR
Document OCR trigger,Document OCR trigger
Document Title,عنوان المستند
Documentation,توثيق
Expand Down
1 change: 1 addition & 0 deletions contents/ui-translations/en.csv
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ Do you want to delete the following items?,Do you want to delete the following i
Document,Document
Document and entity types,Document and entity types
Document contents,Document contents
Document FOR,Document FOR
Document OCR trigger,Document OCR trigger
Document Title,Document Title
Documentation,Documentation
Expand Down
1 change: 1 addition & 0 deletions contents/ui-translations/es.csv
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ Do you want to delete the following items?,Do you want to delete the following i
Document,Documento
Document and entity types,Tipos de documento y entidad
Document contents,Contenidos del documento
Document FOR,Document FOR
Document OCR trigger,Desencadenador de OCR de documento
Document Title,Título del documento
Documentation,Documentación
Expand Down
1 change: 1 addition & 0 deletions contents/ui-translations/fr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ Do you want to delete the following items?,Do you want to delete the following i
Document,Document
Document and entity types,Types de documents et d'entités
Document contents,Contenu du document
Document FOR,Document FOR
Document OCR trigger,Document OCR trigger
Document Title,Titre du document
Documentation,Documentation
Expand Down
1 change: 1 addition & 0 deletions contents/ui-translations/ko.csv
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ Do you want to delete the following items?,Do you want to delete the following i
Document,문서
Document and entity types,문서 및 엔티티 유형
Document contents,문서 내용
Document FOR,Document FOR
Document OCR trigger,Document OCR trigger
Document Title,문서 제목
Documentation,기록
Expand Down
Loading

0 comments on commit 7d35b26

Please sign in to comment.