import elasticlunr, { Index } from "elasticlunrjs"; import { AutoCompleteActiviteOption, NomenclatureActivityOption, SelectedActivity, responseType, responsesType } from "interface/ActivityTypes"; import { ActivitySelecterNavigationEnum } from "../../../enumeration/ActivitySelecterNavigationEnum"; import { FullScreenComponent, historyInputSuggester } from "./ActivitySelecter"; /** * Find category of activity * @param id id of activity * @param referentiel list of categories * @param parent if category's activty is subcategory, list of subcategories * @returns category's activity and upper category's */ export declare const findItemInCategoriesNomenclature: (id: string | undefined, referentiel: NomenclatureActivityOption[], parent?: NomenclatureActivityOption) => { item: NomenclatureActivityOption; parent: NomenclatureActivityOption | undefined; } | undefined; export declare const findItemInAutoCompleteRef: (id: string | undefined, ref: AutoCompleteActiviteOption[]) => AutoCompleteActiviteOption | undefined; export declare const findItemInAutoCompleteRefByLabel: (label: string | undefined, ref: AutoCompleteActiviteOption[]) => AutoCompleteActiviteOption | undefined; /** * When selectionne activity with categories */ export declare const processActivityCategory: (value: { [key: string]: string | boolean; }, parsedValue: SelectedActivity, categoriesAndActivitesNomenclature: NomenclatureActivityOption[], setSelectedId: (id: string | undefined) => void, setSelectedCategories: (cats: NomenclatureActivityOption[]) => void, setShowSubCategories: (show: boolean) => void) => void; /** * When search activity */ export declare const processActivityAutocomplete: (value: { [key: string]: string | boolean; }, parsedValue: SelectedActivity, setSelectedSuggesterId: (id: string | undefined) => void) => void; /** * When selectionne option new activity */ export declare const processNewActivity: (value: { [key: string]: string | boolean; }, parsedValue: SelectedActivity, categoriesAndActivitesNomenclature: NomenclatureActivityOption[], setCreateActivityValue: (val: string | undefined) => void, setSelectedCategories: (cats: NomenclatureActivityOption[]) => void) => void; /** * Find category of rank 1 when selectionne categories of rank 2 or 3 */ export declare const findRank1Category: (parsedValue: SelectedActivity, categoriesAndActivitesNomenclature: NomenclatureActivityOption[]) => NomenclatureActivityOption | undefined; export declare const selectSubCategory: (selectedId: string | undefined, selectedCategories: NomenclatureActivityOption[], setSelectedCategories: (activities: NomenclatureActivityOption[]) => void, handleChange: (response: responseType, value: string | boolean | undefined) => void, inputs: { selection: NomenclatureActivityOption; categoriesAndActivitesNomenclature: NomenclatureActivityOption[]; separatorSuggester: string; historyActivitySelecterBindingDep: responseType; responses: [ responsesType, responsesType, responsesType, responsesType, responsesType, responsesType ]; newItemId: string; }) => void; export declare const selectFinalCategory: (states: { selectedId: string | undefined; labelOfSelectedId: string | undefined; setSelectedId: (id?: string) => void; setLabelOfSelectedId: (label?: string) => void; }, onSelectValue: () => void, inputs: { selection: NomenclatureActivityOption; categoriesAndActivitesNomenclature: NomenclatureActivityOption[]; separatorSuggester: string; historyActivitySelecterBindingDep: responseType; responses: [ responsesType, responsesType, responsesType, responsesType, responsesType, responsesType ]; newItemId: string; }, handleChange: (response: responseType, value: string | boolean | undefined) => void) => void; export declare const activitesFiltredUnique: (activitesAutoCompleteRef: AutoCompleteActiviteOption[]) => AutoCompleteActiviteOption[]; export declare const activitesFiltredMap: (optionsFiltered: AutoCompleteActiviteOption[]) => AutoCompleteActiviteOption[]; export declare const CreateIndexation: (optionsFiltered: AutoCompleteActiviteOption[]) => elasticlunr.Index; export declare const updateNewValue: (value: string | undefined, handleChange: (response: responseType, value: string | boolean | undefined) => void, responses: [ responsesType, responsesType, responsesType, responsesType, responsesType, responsesType ], newItemId: string) => void; export declare const getInputValue: () => string | undefined; export declare const optionsFiltered: (activitesAutoCompleteRef: AutoCompleteActiviteOption[]) => AutoCompleteActiviteOption[]; export declare const createIndexSuggester: (inputs: { activitesAutoCompleteRef: AutoCompleteActiviteOption[]; selectedSuggesterId: string | undefined; newItemId: string; }, states: { createActivityValue: string | undefined; }, createIndex?: ((optionsFiltered: AutoCompleteActiviteOption[]) => elasticlunr.Index) | undefined, indexSuggester?: elasticlunr.Index) => readonly [elasticlunr.Index | null, AutoCompleteActiviteOption[], AutoCompleteActiviteOption]; export declare const clickableListOnChange: (id: string | undefined, handleChange: (response: responseType, value: string | boolean | undefined) => void, responses: [ responsesType, responsesType, responsesType, responsesType | undefined, responsesType | undefined, responsesType | undefined ], newItemId: string, setSelectedSuggesterId: (id: string | undefined) => void, historyInputSug?: string) => void; export declare const clickableListHistoryOnChange: (historyInputSug?: string) => void; export declare const appendHistoryActivitySelecter: (actionOrSelection: ActivitySelecterNavigationEnum | string, separatorSuggester: string, historyActivitySelecterBindingDep: responseType, handleChange: (response: responseType, value: string | boolean | undefined) => void) => void; export declare const createActivityCallBack: (states: { selectedCategoryId: string; selectedCategories?: NomenclatureActivityOption[]; }, setters: { setCreateActivityValue: (value?: string) => void; setFullScreenComponent: (comp: FullScreenComponent) => void; setNewValue: (value?: string) => void; }, functions: { handleChange: (response: responseType, value: string | boolean | undefined) => void; nextClickCallback?: ((routeToGoal?: boolean) => void) | undefined; }, inputs: { activityLabel: string; newItemId: string; separatorSuggester: string; historyActivitySelecterBindingDep: responseType | undefined; responses: [ responsesType, responsesType, responsesType, responsesType | undefined, responsesType | undefined, responsesType | undefined ]; }) => void; export declare const onChange: (handleChange: (response: responseType, value: string | boolean | undefined) => void, inputs: { responses: [ responsesType, responsesType, responsesType, responsesType | undefined, responsesType | undefined, responsesType | undefined ]; newItemId: string; isFullyCompleted?: boolean; id?: string; suggesterId?: string; activityLabel?: string; historyInputSuggester?: string; }) => void; export declare const nextStepFreeInput: (states: { selectedCategories?: NomenclatureActivityOption[]; createActivityValue: string | undefined; freeInput: string | undefined; }, functions: { setDisplayAlert: (display: boolean) => void; nextClickCallback: (routeToGoal: boolean) => void; addToReferentielCallBack: (newItem: AutoCompleteActiviteOption, categoryId: string | undefined, newActivity: string) => void; handleChange: (response: responseType, value: string | boolean | undefined) => void; onSelectValue: () => void; }, inputs: { separatorSuggester: string; historyActivitySelecterBindingDep?: responseType; newItemId: string; displayAlertNewActivity: boolean; routeToGoal: boolean; responses: [ responsesType, responsesType, responsesType, responsesType, responsesType, responsesType ]; }) => void;