|
@@ -2,6 +2,8 @@ import React, { FC } from 'react';
|
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
import SearchPageForm from './SearchPageForm';
|
|
import SearchPageForm from './SearchPageForm';
|
|
|
import AppContainer from '../../client/services/AppContainer';
|
|
import AppContainer from '../../client/services/AppContainer';
|
|
|
|
|
+import DeleteSelectedPageGroup from './DeleteSelectedPageGroup';
|
|
|
|
|
+import { CheckboxType } from '../../interfaces/search';
|
|
|
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
|
searchingKeyword: string,
|
|
searchingKeyword: string,
|
|
@@ -29,6 +31,21 @@ const SearchControl: FC <Props> = (props: Props) => {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ const onDeleteSelectedPageHandler = () => {
|
|
|
|
|
+ console.log('onDeleteSelectedPageHandler is called');
|
|
|
|
|
+ // TODO: implement this function to delete selected pages.
|
|
|
|
|
+ // https://estoc.weseek.co.jp/redmine/issues/77525
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ const onCheckAllPagesInvoked = (nextCheckboxState:CheckboxType) => {
|
|
|
|
|
+ console.log(`onCheckAllPagesInvoked is called with arg ${nextCheckboxState}`);
|
|
|
|
|
+ // Todo: set the checkboxState, isChecked, and indeterminate value of checkbox element according to the passed argument
|
|
|
|
|
+ // https://estoc.weseek.co.jp/redmine/issues/77525
|
|
|
|
|
+
|
|
|
|
|
+ // setting checkbox to indeterminate is required to use of useRef to access checkbox element.
|
|
|
|
|
+ // ref: https://getbootstrap.com/docs/4.5/components/forms/#checkboxes
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
<div className="">
|
|
<div className="">
|
|
|
<div className="search-page-input sps sps--abv">
|
|
<div className="search-page-input sps sps--abv">
|
|
@@ -40,6 +57,12 @@ const SearchControl: FC <Props> = (props: Props) => {
|
|
|
</div>
|
|
</div>
|
|
|
{/* TODO: replace the following elements deleteAll button , relevance button and include specificPath button component */}
|
|
{/* TODO: replace the following elements deleteAll button , relevance button and include specificPath button component */}
|
|
|
<div className="d-flex my-4">
|
|
<div className="d-flex my-4">
|
|
|
|
|
+ {/* Todo: design will be fixed in #80324. Function will be implemented in #77525 */}
|
|
|
|
|
+ <DeleteSelectedPageGroup
|
|
|
|
|
+ checkboxState={'' || CheckboxType.NONE_CHECKED} // Todo: change the left value to appropriate value
|
|
|
|
|
+ onClickInvoked={onDeleteSelectedPageHandler}
|
|
|
|
|
+ onCheckInvoked={onCheckAllPagesInvoked}
|
|
|
|
|
+ />
|
|
|
<div className="d-flex align-items-center border rounded border-gray px-2 py-1 mr-2 ml-auto">
|
|
<div className="d-flex align-items-center border rounded border-gray px-2 py-1 mr-2 ml-auto">
|
|
|
<label className="my-0 mr-2" htmlFor="flexCheckDefault">
|
|
<label className="my-0 mr-2" htmlFor="flexCheckDefault">
|
|
|
{t('Include Subordinated Target Page', { target: '/user' })}
|
|
{t('Include Subordinated Target Page', { target: '/user' })}
|