Skip to content

Commit

Permalink
release: 6.2433.67 (#630)
Browse files Browse the repository at this point in the history
* chore(deps): update pnpm to v9.7.0 (#604)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency framer-motion to v11.3.22 (#587)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @floating-ui/react to v0.26.22 (#608)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency tailwindcss to v3.4.8 (#609)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency framer-motion to v11.3.23 (#610)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency @tanstack/react-table to v8.20.1 (#607)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update opensearchproject/opensearch-dashboards docker tag to v2.16.0 (#464)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: oauth sign in (#614)

* fix(deps): update dependency react-i18next to v15.0.1 (#611)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update opensearchproject/opensearch docker tag to v2.16.0 (#463)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency framer-motion to v11.3.24 (#618)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update aws-sdk-js-v3 monorepo to v3.626.0 (#605)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: issue cell (#623)

* fix: pagination and packages (#624)

* fix(deps): update dependency luxon to v3.5.0 (#613)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: minor bugs in web (#625)

* fix: minor bugs in web

* fix: remove console.log

* chore(deps): update dependency @nestjs/cli to v10.4.4 (#626)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency @swc/core to v1.7.10 (#628)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency @types/node to v20.14.15 (#629)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
chiol and renovate[bot] authored Aug 14, 2024
1 parent 6247180 commit 7c00528
Show file tree
Hide file tree
Showing 19 changed files with 536 additions and 455 deletions.
7 changes: 4 additions & 3 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/luxon": "^3.4.2",
"@types/node": "20.14.14",
"@types/node": "20.14.15",
"@types/nodemailer": "^6.4.15",
"@types/passport-jwt": "*",
"@types/supertest": "^6.0.2",
Expand All @@ -103,7 +103,8 @@
"@ufb/eslint-config": "workspace:*",
"@ufb/prettier-config": "workspace:*",
"@ufb/tsconfig": "workspace:*",
"eslint": "^9.0.0",
"eslint": "catalog:",
"prettier": "catalog:",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
Expand All @@ -113,6 +114,6 @@
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.4.5"
"typescript": "catalog:"
}
}
7 changes: 4 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.12",
"@types/node": "20.14.14",
"@types/node": "20.14.15",
"@types/react": "^18.2.79",
"@types/react-beautiful-dnd": "^13.1.8",
"@types/react-datepicker": "^6.0.0",
Expand All @@ -96,7 +96,8 @@
"@ufb/prettier-config": "workspace:*",
"@ufb/tsconfig": "workspace:*",
"autoprefixer": "^10.4.19",
"eslint": "^9.0.0",
"eslint": "catalog:",
"prettier": "catalog:",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jiti": "^1.21.6",
Expand All @@ -107,7 +108,7 @@
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"ts-toolbelt": "^9.6.0",
"typescript": "^5.4.5",
"typescript": "catalog:",
"undici": "~5.28.4"
}
}
2 changes: 1 addition & 1 deletion apps/web/public/locales/ko/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
},
"role-mgmt": {
"edit-role": "Role 수정",
"update-role-name": "Role 수정",
"update-role-name": "Role Name 수정",
"delete-role": "Role 삭제"
},
"api-key-status": {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/entities/channel/ui/channel-info-form.ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ChannelInfoForm: React.FC<IProps> = (props) => {
return (
<div className="flex flex-col gap-6">
{type === 'update' && (
<TextInput {...register('id')} label="Project ID" disabled />
<TextInput {...register('id')} label="Channel ID" disabled />
)}
<TextInput
{...register('name')}
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/entities/channel/ui/image-config-form.ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ const ImageConfigForm: React.FC<IProps> = (props) => {
className="toggle toggle-sm"
checked={!!domainWhiteList}
onChange={(e) => {
setValue('domainWhiteList', e.target.checked ? [] : null);
setValue('domainWhiteList', e.target.checked ? [] : null, {
shouldDirty: true,
});
}}
disabled={readOnly}
/>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/entities/user/ui/user-management-table.ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const UserManagementTable: React.FC<IProps> = () => {
disabledNextPage={
pagination.pageIndex + 1 >= (data?.meta.totalPages ?? 1)
}
disabledPrevPage={pagination.pageIndex <= 1}
disabledPrevPage={pagination.pageIndex < 1}
setLimit={table.setPageSize}
/>
<TableSearchInput
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/widgets/feedback-table/ui/feedback-table-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const FeedbackTableBar: React.FC<IProps> = (props) => {
disabledNextPage={
pagination.pageIndex + 1 >= (meta?.totalPages ?? 1)
}
disabledPrevPage={pagination.pageIndex <= 1}
disabledPrevPage={pagination.pageIndex < 1}
short
/>
<div className="bg-fill-tertiary h-4 w-[1px]" />
Expand Down Expand Up @@ -180,7 +180,7 @@ const FeedbackTableBar: React.FC<IProps> = (props) => {
disabledNextPage={
pagination.pageIndex + 1 >= (meta?.totalPages ?? 1)
}
disabledPrevPage={pagination.pageIndex <= 1}
disabledPrevPage={pagination.pageIndex < 1}
/>
<div className="w-[272px]">
<DateRangePicker
Expand Down
84 changes: 36 additions & 48 deletions apps/web/src/widgets/feedback-table/ui/issue-cell/issue-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
* under the License.
*/
import { useEffect, useMemo, useRef, useState } from 'react';
import { Combobox } from '@headlessui/react';
import {
Combobox,
ComboboxInput,
ComboboxOption,
ComboboxOptions,
} from '@headlessui/react';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { useTranslation } from 'next-i18next';
import { useClickAway } from 'react-use';
Expand All @@ -38,18 +43,8 @@ interface IProps extends React.PropsWithChildren {
const IssueCell: React.FC<IProps> = (props) => {
const { issues, feedbackId, isExpanded, cellWidth } = props;
const queryClient = useQueryClient();

const refetch = async () => {
await queryClient.invalidateQueries({
queryKey: [
'/api/admin/projects/{projectId}/channels/{channelId}/feedbacks/search',
],
});
};

const { projectId, channelId } = useFeedbackTable();
const { t } = useTranslation();

const perms = usePermissions(projectId);

const [overflow, setOverflow] = useState<boolean>(false);
Expand All @@ -58,7 +53,15 @@ const IssueCell: React.FC<IProps> = (props) => {
const [openIssueId, setOpenIssueId] = useState<number | null>(null);

const [inputValue, setInputValue] = useState('');
const [isEditing, setIsEditing] = useState(false);
const [openPopover, setOpenPopover] = useState(false);

const refetch = async () => {
await queryClient.invalidateQueries({
queryKey: [
'/api/admin/projects/{projectId}/channels/{channelId}/feedbacks/search',
],
});
};

const { data: allIssues, refetch: allIssuesRefetch } = useIssueSearch(
projectId,
Expand All @@ -73,13 +76,6 @@ const IssueCell: React.FC<IProps> = (props) => {
);

const { mutateAsync: attatchIssue } = useMutation({
mutationKey: [
'post',
'/api/admin/projects/{projectId}/channels/{channelId}/feedbacks/{feedbackId}/issue/{issueId}',
projectId,
channelId,
feedbackId,
],
mutationFn: async ({ issueId }: { issueId: number }) => {
const { data } = await client.post({
path: '/api/admin/projects/{projectId}/channels/{channelId}/feedbacks/{feedbackId}/issue/{issueId}',
Expand All @@ -97,13 +93,6 @@ const IssueCell: React.FC<IProps> = (props) => {
});

const { mutateAsync: detecthIssue } = useMutation({
mutationKey: [
'delete',
'/api/admin/projects/{projectId}/channels/{channelId}/feedbacks/{feedbackId}/issue/{issueId}',
projectId,
channelId,
feedbackId,
],
mutationFn: async ({ issueId }: { issueId: number }) => {
const { data } = await client.delete({
path: '/api/admin/projects/{projectId}/channels/{channelId}/feedbacks/{feedbackId}/issue/{issueId}',
Expand Down Expand Up @@ -136,7 +125,7 @@ const IssueCell: React.FC<IProps> = (props) => {
},
});

useClickAway(comboBoxRef, () => setIsEditing(false), ['click']);
useClickAway(comboBoxRef, () => setOpenPopover(false), ['click']);

useEffect(() => {
if (!ref.current) return;
Expand All @@ -145,22 +134,24 @@ const IssueCell: React.FC<IProps> = (props) => {
setOverflow(newState);
}, [ref.current, cellWidth, issues]);

const addIssue = async (issue?: Issue) => {
let issueId = issue?.id;
if (!issueId) {
const addIssue = async (input?: Issue | string) => {
if (!input) return;

if (typeof input === 'string') {
const data = await createIssue({ name: inputValue });
if (!data) return;
issueId = data.id;
await attatchIssue({ issueId: data.id });
} else {
await attatchIssue({ issueId: input.id });
}
await attatchIssue({ issueId });
setInputValue('');
};

return (
<div className="relative">
<Popper
open={isEditing}
setOpen={setIsEditing}
open={openPopover}
setOpen={setOpenPopover}
placement="bottom-start"
offset={0}
buttonChildren={
Expand All @@ -169,7 +160,7 @@ const IssueCell: React.FC<IProps> = (props) => {
className="btn btn-xs btn-secondary btn-rounded font-12-regular my-2"
onClick={(e) => {
e.stopPropagation();
setIsEditing(true);
setOpenPopover(true);
}}
disabled={!perms.includes('feedback_issue_update')}
>
Expand Down Expand Up @@ -197,7 +188,7 @@ const IssueCell: React.FC<IProps> = (props) => {
className="icon-btn icon-btn-xs icon-btn-rounded icon-btn-secondary"
onClick={(e) => {
e.stopPropagation();
setIsEditing(true);
setOpenPopover(true);
}}
disabled={!perms.includes('feedback_issue_update')}
>
Expand All @@ -224,26 +215,23 @@ const IssueCell: React.FC<IProps> = (props) => {
}}
/>
))}
<Combobox.Input
<ComboboxInput
className="input-sm bg-transparent"
placeholder={t('main.feedback.issue-cell.input-issue')}
onChange={(event) => setInputValue(event.target.value)}
onKeyDown={(e) => {
if (e.key === 'Escape') setIsEditing(false);
}}
ref={comboBoxRef}
autoFocus
/>
</label>
<Combobox.Options className="border-t-[1px]" static>
<ComboboxOptions className="border-t-[1px]" static>
<div className="flex h-[42px] items-center p-1">
<span className="text-secondary px-2 py-1">
{t('main.feedback.issue-cell.issue-list')}
</span>
</div>
<div className="max-h-[300px] overflow-y-auto">
{filteredIssues.map((item) => (
<Combobox.Option
<ComboboxOption
key={item.id}
value={item}
className="p-1"
Expand Down Expand Up @@ -285,20 +273,20 @@ const IssueCell: React.FC<IProps> = (props) => {
</div>
</div>
)}
</Combobox.Option>
</ComboboxOption>
))}
</div>
{!filteredIssues.find(
(v) => v.name.toLowerCase() === inputValue.toLowerCase(),
) &&
perms.includes('issue_create') &&
inputValue.length > 0 && (
<Combobox.Option value={undefined} className="p-1">
{({ active }) => (
<ComboboxOption value={inputValue} className="p-1">
{({ focus }) => (
<div
className={
'flex h-[34px] cursor-pointer items-center gap-2 rounded px-2 py-1 ' +
(active ? 'bg-fill-secondary' : 'bg-primary')
(focus ? 'bg-fill-secondary' : 'bg-primary')
}
>
<span className="text-secondary">
Expand All @@ -309,9 +297,9 @@ const IssueCell: React.FC<IProps> = (props) => {
</Badge>
</div>
)}
</Combobox.Option>
</ComboboxOption>
)}
</Combobox.Options>
</ComboboxOptions>
</Combobox>
</Popper>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/widgets/issue-table/ui/issue-table.ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const IssueTable: React.FC<IProps> = ({ projectId }) => {
disabledNextPage={
pagination.pageIndex + 1 >= (data?.meta.totalPages ?? 1)
}
disabledPrevPage={pagination.pageIndex <= 1}
disabledPrevPage={pagination.pageIndex < 1}
setLimit={table.setPageSize}
/>
<div className="w-[300px]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ const ImageConfigSetting: React.FC<IProps> = (props) => {
});

useEffect(() => {
methods.reset({
...data?.imageConfig,
domainWhiteList: data?.imageConfig.domainWhiteList ?? null,
});
if (data?.imageConfig) {
methods.reset({
...data.imageConfig,
domainWhiteList: data.imageConfig.domainWhiteList,
});
}
}, [data]);

const onSubmit = (input: ChannelImageConfig) => {
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.infra-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ services:

# optional for better performance on searching feedbacks
opensearch-node:
image: opensearchproject/opensearch:2.15.0
image: opensearchproject/opensearch:2.16.0
restart: always
container_name: opensearch-node
environment:
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.infra-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ services:

# optional for better performance on searching feedbacks
opensearch-node:
image: opensearchproject/opensearch:2.14.0
image: opensearchproject/opensearch:2.16.0
restart: always
container_name: opensearch-node
environment:
Expand Down
5 changes: 3 additions & 2 deletions packages/ufb-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
"@ufb/eslint-config": "workspace:*",
"@ufb/prettier-config": "workspace:*",
"@ufb/tsconfig": "workspace:*",
"eslint": "^9.0.0",
"eslint": "catalog:",
"prettier": "catalog:",
"react": "^18.2.0",
"tsup": "^8.0.2",
"typescript": "^5.4.5"
"typescript": "catalog:"
}
}
4 changes: 2 additions & 2 deletions packages/ufb-tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"@ufb/eslint-config": "workspace:*",
"@ufb/prettier-config": "workspace:*",
"autoprefixer": "^10.4.19",
"eslint": "^9.0.0",
"eslint": "catalog:",
"glob": "^11.0.0",
"postcss": "^8.4.38",
"postcss-cli": "^11.0.0",
"postcss-import": "^16.1.0",
"postcss-nesting": "^12.1.2",
"prejss-cli": "^0.3.3",
"prettier": "^3.2.5",
"prettier": "catalog:",
"tailwindcss": "^3.4.3"
}
}
Loading

0 comments on commit 7c00528

Please sign in to comment.