Просмотр исходного кода

refactor: rename SelectablePagePageList to SelectablePageList and update imports

Shun Miyazawa 7 месяцев назад
Родитель
Сommit
8819d1c9e8

+ 2 - 2
apps/app/src/features/openai/client/components/AiAssistant/AiAssistantManagementModal/AiAssistantManagementEditPages.tsx

@@ -10,7 +10,7 @@ import type { SelectablePage } from '../../../../interfaces/selectable-page';
 
 import { AiAssistantManagementHeader } from './AiAssistantManagementHeader';
 import { PageSelectionMethodButtons } from './PageSelectionMethodButtons';
-import { SelectablePagePageList } from './SelectablePagePageList';
+import { SelectablePageList } from './SelectablePageList';
 
 type Props = {
   selectedPages: SelectablePage[];
@@ -44,7 +44,7 @@ export const AiAssistantManagementEditPages = (props: Props): JSX.Element => {
           </div>
 
           <SimpleBar style={{ maxHeight: '300px' }}>
-            <SelectablePagePageList
+            <SelectablePageList
               isEditable
               method="delete"
               methodButtonPosition="right"

+ 3 - 3
apps/app/src/features/openai/client/components/AiAssistant/AiAssistantManagementModal/AiAssistantManagementKeywordSearch.tsx

@@ -20,7 +20,7 @@ import {
 } from '../../../stores/ai-assistant';
 
 import { AiAssistantManagementHeader } from './AiAssistantManagementHeader';
-import { SelectablePagePageList } from './SelectablePagePageList';
+import { SelectablePageList } from './SelectablePageList';
 
 import styles from './AiAssistantManagementKeywordSearch.module.scss';
 
@@ -182,7 +182,7 @@ export const AiAssistantKeywordSearch = (props: Props): JSX.Element => {
             </h4>
             <div className="px-4">
               <SimpleBar className="page-list-container" style={{ maxHeight: '300px' }}>
-                <SelectablePagePageList
+                <SelectablePageList
                   isEditable
                   pages={pagesWithGlobPath ?? []}
                   method="add"
@@ -200,7 +200,7 @@ export const AiAssistantKeywordSearch = (props: Props): JSX.Element => {
 
         <div className="px-4">
           <SimpleBar className="page-list-container" style={{ maxHeight: '300px' }}>
-            <SelectablePagePageList
+            <SelectablePageList
               pages={selectedPagesArray}
               method="remove"
               onClickMethodButton={removePage}

+ 2 - 2
apps/app/src/features/openai/client/components/AiAssistant/AiAssistantManagementModal/AiAssistantManagementPageTreeSelection.tsx

@@ -20,7 +20,7 @@ import { useSelectedPages } from '../../../services/use-selected-pages';
 import { AiAssistantManagementModalPageMode, useAiAssistantManagementModal } from '../../../stores/ai-assistant';
 
 import { AiAssistantManagementHeader } from './AiAssistantManagementHeader';
-import { SelectablePagePageList } from './SelectablePagePageList';
+import { SelectablePageList } from './SelectablePageList';
 
 import styles from './AiAssistantManagementPageTreeSelection.module.scss';
 
@@ -143,7 +143,7 @@ export const AiAssistantManagementPageTreeSelection = (props: Props): JSX.Elemen
 
         <div className="px-4">
           <SimpleBar className="page-list-container" style={{ maxHeight: '300px' }}>
-            <SelectablePagePageList
+            <SelectablePageList
               method="remove"
               methodButtonPosition="right"
               pages={selectedPagesArray}

+ 2 - 2
apps/app/src/features/openai/client/components/AiAssistant/AiAssistantManagementModal/SelectablePagePageList.module.scss → apps/app/src/features/openai/client/components/AiAssistant/AiAssistantManagementModal/SelectablePageList.module.scss

@@ -1,7 +1,7 @@
 @use '~/styles/variables' as var;
 @use '@growi/core-styles/scss/bootstrap/init' as bs;
 
- .selectable-page-page-list :global {
+ .selectable-page-list :global {
     .page-path {
       display: inline-block;
       max-width: 100%;
@@ -27,7 +27,7 @@
 
 // == Colors
 @include bs.color-mode(light) {
-  .selectable-page-page-list :global {
+  .selectable-page-list :global {
     .page-list-item {
       background-color: #{bs.$gray-100};
     }

+ 5 - 5
apps/app/src/features/openai/client/components/AiAssistant/AiAssistantManagementModal/SelectablePagePageList.tsx → apps/app/src/features/openai/client/components/AiAssistant/AiAssistantManagementModal/SelectablePageList.tsx

@@ -3,16 +3,16 @@ import React, {
 } from 'react';
 
 import { pathUtils } from '@growi/core/dist/utils';
-import { isCreatablePagePathPattern } from '../../../../utils/is-creatable-page-path-pattern';
 import { useRect } from '@growi/ui/dist/utils';
 import { useTranslation } from 'react-i18next';
 import AutosizeInput from 'react-input-autosize';
 
 import { type SelectablePage } from '../../../../interfaces/selectable-page';
+import { isCreatablePagePathPattern } from '../../../../utils/is-creatable-page-path-pattern';
 
-import styles from './SelectablePagePageList.module.scss';
+import styles from './SelectablePageList.module.scss';
 
-const moduleClass = styles['selectable-page-page-list'] ?? '';
+const moduleClass = styles['selectable-page-list'] ?? '';
 
 type MethodButtonProps = {
   page: SelectablePage;
@@ -167,7 +167,7 @@ const EditablePagePath = memo((props: EditablePagePathProps): JSX.Element => {
 });
 
 
-type SelectablePagePageListProps = {
+type SelectablePageListProps = {
   pages: SelectablePage[],
   method: 'add' | 'remove' | 'delete'
   methodButtonPosition?: 'left' | 'right',
@@ -176,7 +176,7 @@ type SelectablePagePageListProps = {
   onClickMethodButton: (page: SelectablePage) => void,
 }
 
-export const SelectablePagePageList = (props: SelectablePagePageListProps): JSX.Element => {
+export const SelectablePageList = (props: SelectablePageListProps): JSX.Element => {
   const {
     pages,
     method,