{"version":3,"file":"manual_operation.ts-OWYmV2nP.js","sources":["../../../../../app/javascript/components/templates/trixEditor/trix-editor.tsx","../../../../../app/javascript/components/common/FlowBots/ManualOperationForm/SortableItem.tsx","../../../../../app/javascript/components/common/FlowBots/ManualOperationForm/ManualOperationForm.tsx","../../../../../app/javascript/components/common/FlowBots/SlackWarning/SlackWarning.tsx","../../../../../app/javascript/components/common/FlowBots/SlackWarning/SlackWarningContext.tsx","../../../../../app/javascript/entries/reactEntries/manual_operation.ts"],"sourcesContent":["// @ts-nocheck\nimport PropTypes from \"prop-types\";\nimport React, { memo, useEffect, useRef, useState } from \"react\";\nimport { TrixToolbar } from \"./trix-toolbar\";\nimport { OutputSuggest } from \"../output_suggests/OutputSuggest2\";\nimport pullDownClassName from \"../output_suggests/PullDown.module.scss\";\nimport style from \"./TrixEditor.module.scss\";\n\nexport const TrixEditor = memo((props) => {\n const [trixEditorDefined, setTrixEditorDefined] = useState();\n /** @type {React.RefObject.} */\n const inputRef = useRef(null);\n\n useEffect(() => setTrixEditorDefined(true), []);\n\n return (\n
\n \n
\n
\n \n
\n {trixEditorDefined && (\n \n )}\n \n {props.error[0] && (\n
\n {props.error[0]}\n
\n )}\n
\n
\n );\n});\n\nTrixEditor.propTypes = {\n body: PropTypes.string,\n url: PropTypes.string,\n blob_url: PropTypes.string,\n error: PropTypes.arrayOf(PropTypes.string),\n model: PropTypes.string,\n label: PropTypes.string,\n outputs: PropTypes.arrayOf(PropTypes.object),\n workflow_booted_at: PropTypes.string,\n placeholder: PropTypes.string,\n unnecessary_date_flag: PropTypes.bool,\n};\n","import React, { useState } from \"react\";\nimport { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport style from \"./ManualOperationForm.module.scss\";\nimport { getImageUrl } from \"../../../../commons/assets_path\";\nimport moment from \"moment\";\nimport { Switch } from \"../../ToggleSwitch/SmallToggleSwitch\";\nimport { useTranslation } from \"react-i18next\";\n\ntype Output = {\n client_id?: number;\n data_type: string;\n description: string;\n display_name: string;\n id: string;\n name?: string;\n priority: number;\n selections?: string;\n test_value: string;\n validation: { required: boolean };\n value?: string;\n workflow_template_action_id?: number;\n workflow_template_id?: number;\n _destroy?: boolean;\n scroll_id: number;\n};\n\ninterface SortableItemProps {\n id: number;\n options_for_list_selections: string[];\n output: Output;\n deleteItem: (scrollId: number) => void;\n copyItem: (scrollId: number) => void;\n client_id: number;\n workflow_template_id: number;\n error: { display_name: string[]; description: string[] };\n exceededOutputLimit: boolean;\n}\n\nexport const SortableItem: React.FC = ({\n id,\n options_for_list_selections,\n output,\n deleteItem,\n copyItem,\n client_id,\n workflow_template_id,\n error,\n exceededOutputLimit,\n}) => {\n const { t } = useTranslation();\n const [dataType, setDataType] = useState(output.data_type);\n const [isRequired, setIsRequired] = useState(output.validation?.required ?? false);\n const [selections, setSelections] = useState(output.selections?.split(\"[,]\") ?? []);\n const [selectedOption, setSelectedOption] = useState(output.name || \"\");\n\n const dataTypeOptions = [\n { id: \"text\", name: t(\"ManualOperationForm.データタイプ.テキスト\") },\n { id: \"long_text\", name: t(\"ManualOperationForm.データタイプ.長文テキスト\") },\n { id: \"array\", name: t(\"ManualOperationForm.データタイプ.リスト\") },\n { id: \"number\", name: t(\"ManualOperationForm.データタイプ.数値\") },\n { id: \"date\", name: t(\"ManualOperationForm.データタイプ.日付\") },\n { id: \"file\", name: t(\"ManualOperationForm.データタイプ.添付ファイル\") },\n { id: \"list_pulldown\", name: t(\"ManualOperationForm.データタイプ.プルダウンリスト\") },\n { id: \"manual_pulldown\", name: t(\"ManualOperationForm.データタイプ.プルダウン手動\") },\n { id: \"list_check_box\", name: t(\"ManualOperationForm.データタイプ.チェックボックスリスト\") },\n { id: \"manual_check_box\", name: t(\"ManualOperationForm.データタイプ.チェックボックス手動\") },\n ];\n const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id });\n\n const itemStyle = {\n transform: CSS.Transform.toString(transform),\n transition,\n border: \"1px solid #ccc\",\n padding: \"24px 24px 24px 0px\",\n marginBottom: \"5px\",\n backgroundColor: \"white\",\n borderRadius: \"12px\",\n width: \"500px\",\n };\n\n const onChange = () => {\n setIsRequired(!isRequired);\n };\n\n const addSelection = () => {\n setSelections([...selections, \"\"]);\n };\n\n const handleSelectionChange = (e: React.ChangeEvent, index: number) => {\n const newSelections = [...selections];\n newSelections[index] = e.target.value;\n setSelections(newSelections);\n };\n\n const deleteSelection = (index: number) => {\n const newSelections = selections.filter((_, i) => i !== index);\n setSelections(newSelections);\n };\n\n return (\n
\n {/* 削除フラグ */}\n \n {/* クライアントIDとワークフローテンプレートIDをhiddenで持たせる */}\n \n \n {/* idをhiddenで持たせる */}\n \n {/* priorityをhiddenでたせる */}\n \n
\n
\n \"Drag\"\n
\n
\n
\n
\n \n {error?.display_name && (\n <>\n
\n \n {error.display_name[0]}\n
\n \n )}\n \n {error?.description && (\n <>\n
\n \n {error.description[0]}\n
\n \n )}\n
\n
\n copyItem(output.scroll_id)}\n className={exceededOutputLimit ? style.copyButtonDisabled : \"\"}\n />\n deleteItem(output.scroll_id)}\n />\n
\n
\n
\n setDataType(e.target.value)}\n defaultValue={dataType}\n name={`manual_operation_template[workflow_template_action_attributes][workflow_template_action_outputs_attributes][${\n output.id ? output.id : id\n }][data_type]`}\n id={`manual_operation_template_workflow_template_action_attributes_workflow_template_action_outputs_attributes_${\n output.id ? output.id : id\n }_data_type`}\n >\n {dataTypeOptions.map((option) => (\n \n ))}\n \n
\n {(dataType === \"text\" || dataType === \"number\") && (\n \n )}\n {dataType === \"long_text\" && (\n \n )}\n {dataType === \"date\" && (\n \n \n \n \n )}\n {dataType === \"file\" && (\n
\n
{t(\"ManualOperationForm.ファイルを選択\")}
\n
\n )}\n {dataType === \"array\" && (\n \n )}\n {(dataType === \"manual_pulldown\" || dataType === \"manual_check_box\") && (\n <>\n
\n
{t(\"ManualOperationForm.選択肢の設定\")}
\n {selections.map((selection, index) => (\n
\n handleSelectionChange(e, index)}\n />\n deleteSelection(index)}\n />\n
\n ))}\n
\n \"Add\"\n
{t(\"ManualOperationForm.選択肢を追加\")}
\n
\n
\n \n \n )}\n {(dataType === \"list_pulldown\" || dataType === \"list_check_box\") && (\n
\n setSelectedOption(e.target.value)}\n >\n {options_for_list_selections.map((option, index) => (\n \n ))}\n \n
\n )}\n
\n
\n
{t(\"ManualOperationForm.必須\")}
\n \n \n
\n
\n \n \n \n );\n};\n","import React, { useEffect, useState, useRef } from \"react\";\nimport {\n DndContext,\n closestCenter,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n DragEndEvent,\n} from \"@dnd-kit/core\";\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { SortableItem } from \"./SortableItem\";\nimport style from \"./ManualOperationForm.module.scss\";\nimport useLanguageChange from \"../../../../hooks/useLanguageChange\";\n\ntype Output = {\n client_id?: number;\n data_type: string;\n description: string;\n display_name: string;\n id: string;\n name?: string;\n priority: number;\n selections?: string;\n test_value: string;\n validation: { required: boolean };\n value?: string;\n workflow_template_action_id?: number;\n workflow_template_id?: number;\n _destroy?: boolean;\n scroll_id: number;\n};\n\ntype Props = {\n outputs: Output[];\n options_for_list_selections: string[];\n errors: [];\n client_id: number;\n workflow_template_id: number;\n output_limit_size: number;\n locale: string;\n};\n\nconst ManualOperationForm: React.FC = ({\n outputs,\n options_for_list_selections,\n errors,\n client_id,\n workflow_template_id,\n output_limit_size,\n locale,\n}) => {\n const { t } = useLanguageChange(locale);\n const [items, setItems] = useState(outputs);\n const nextScrollId = useRef(Math.max(...outputs.map((o) => o.scroll_id || 0), 0) + 1);\n const activeItemSize = items.filter((item) => !item._destroy).length;\n const exceededOutputLimit = activeItemSize >= output_limit_size;\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const handleDragEnd = (event: DragEndEvent) => {\n const { active, over } = event;\n\n if (active.id !== over?.id) {\n setItems((items) => {\n const oldIndex = items.findIndex((item) => item.scroll_id === active.id);\n const newIndex = items.findIndex((item) => item.scroll_id === over?.id);\n const newItems = arrayMove(items, oldIndex, newIndex);\n return newItems.map((item, index) => ({\n ...item,\n priority: index + 1,\n }));\n });\n }\n };\n\n const addNewItem = () => {\n if (exceededOutputLimit) return;\n setItems([\n ...items,\n {\n id: \"\",\n data_type: \"text\",\n description: \"\",\n display_name: \"\",\n priority: items.length + 1,\n test_value: \"\",\n validation: { required: false },\n client_id: client_id,\n workflow_template_id: workflow_template_id,\n scroll_id: nextScrollId.current++,\n },\n ]);\n };\n\n const deleteItem = (scrollId: number) => {\n setItems(items.map((item) => (item.scroll_id === scrollId ? { ...item, _destroy: true } : item)));\n };\n\n const copyItem = (scrollId: number) => {\n if (exceededOutputLimit) return;\n const itemToCopy = items.find((item) => item.scroll_id === scrollId);\n if (itemToCopy) {\n const copiedItem = {\n ...itemToCopy,\n id: \"\",\n priority: items.length + 1,\n scroll_id: nextScrollId.current++,\n };\n setItems([...items, copiedItem]);\n }\n };\n\n useEffect(() => {\n setItems(\n outputs.map((item, index) => ({\n ...item,\n priority: index + 1,\n scroll_id: nextScrollId.current++,\n })),\n );\n }, [outputs]);\n\n return (\n
\n \n item.scroll_id)} strategy={verticalListSortingStrategy}>\n {items.map((item, index) => (\n \n ))}\n \n
\n
\n {t(\"ManualOperationForm.フォームを追加\")}\n
\n
\n {activeItemSize}/{output_limit_size}\n
\n
\n
\n
\n );\n};\n\nexport default ManualOperationForm;\n","import React, { useState, useEffect } from \"react\";\nimport style from \"./SlackWarning.module.scss\";\nimport { setIsModal, setCurrentPage } from \"../../../../reducks/store/Settings/slices\";\nimport useLanguageChange from \"../../../../hooks/useLanguageChange\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport type { AppDispatch, RootState } from \"../../../../reducks/store/Settings/store\";\nimport { getIsModal } from \"../../../../reducks/store/Settings/selectors\";\nimport { getImageUrl } from \"../../../../commons/assets_path\";\n\nimport SettingModal from \"../../Setting/SettingModal\";\n\ntype Props = {\n workspaceLinkPolicy: boolean;\n updateTaskLimitPolicy: boolean;\n isAdmin: boolean;\n paths: {\n workspaces_path: string;\n destroy_member_session_path: string;\n new_member_session_path: string;\n };\n client: {\n code: string;\n id: number;\n plan_code: string;\n };\n isPartner: boolean;\n client_member_id: number;\n member_id: number;\n service_icon: {\n slack: string;\n chatwork: string;\n };\n myAccount: {\n email: string;\n name: string;\n id: number;\n role: string;\n };\n past_trial_plans: [];\n current_trial_plan: string;\n plans: object;\n plan_prices: object;\n members_count: number;\n available_trial_plans: [];\n client_member_members_policy: boolean;\n stripe_billing_edit_policy: boolean;\n subscription_show_policy: boolean;\n secure_ip_retrieve_policy: boolean;\n login_setting_retrieve_policy: boolean;\n locale: string;\n is_plan_change: boolean;\n};\n\nconst SlackWarning = ({\n paths,\n client,\n isPartner,\n myAccount,\n client_member_id,\n service_icon,\n updateTaskLimitPolicy,\n isAdmin,\n plans,\n plan_prices,\n past_trial_plans,\n current_trial_plan,\n members_count,\n available_trial_plans,\n member_id,\n client_member_members_policy,\n stripe_billing_edit_policy,\n subscription_show_policy,\n secure_ip_retrieve_policy,\n login_setting_retrieve_policy,\n is_plan_change,\n workspaceLinkPolicy,\n locale,\n}: Props) => {\n const { t } = useLanguageChange(locale);\n const [isOpen, setIsOpen] = useState(is_plan_change);\n const [showSlackWarning, setShowSlackWarning] = useState(true);\n\n const dispatch = useDispatch();\n const selector = useSelector((state: RootState) => state);\n const isModal = getIsModal(selector);\n\n const openModal = () => dispatch(setIsModal(true));\n const closeModal = () => {\n const url = new URL(window.location.href);\n url.searchParams.delete(\"notification\");\n window.history.replaceState({}, document.title, url.toString());\n setIsOpen(false);\n dispatch(setIsModal(false));\n };\n\n const openNotificationPage = () => {\n dispatch(setCurrentPage(\"notification\"));\n setIsOpen(true);\n openModal();\n };\n\n useEffect(() => {\n const handler = (event: MessageEvent) => {\n if (event.origin !== window.location.origin) return;\n if (event.data.message === \"slack_notification_oauth_success\") {\n setShowSlackWarning(false);\n closeModal();\n }\n };\n\n window.addEventListener(\"message\", handler);\n\n return () => {\n window.removeEventListener(\"message\", handler);\n };\n }, []);\n\n return (\n <>\n {showSlackWarning && (\n
\n \n
\n
\n {t(\"SlackWarning.こちら\")}\n
\n
{t(\"SlackWarning.。\")}
\n
\n )}\n {isOpen && (\n \n )}\n \n );\n};\n\nexport default SlackWarning;\n","import React from \"react\";\nimport { Provider } from \"react-redux\";\nimport store from \"../../../../reducks/store/store\";\nimport SlackWarning from \"./SlackWarning\";\n\ntype Props = {\n workspaceLinkPolicy: boolean;\n updateTaskLimitPolicy: boolean;\n isAdmin: boolean;\n paths: {\n workspaces_path: string;\n destroy_member_session_path: string;\n new_member_session_path: string;\n };\n client: {\n code: string;\n id: number;\n plan_code: string;\n };\n isPartner: boolean;\n client_member_id: number;\n member_id: number;\n service_icon: {\n slack: string;\n chatwork: string;\n };\n myAccount: {\n email: string;\n name: string;\n id: number;\n role: string;\n };\n past_trial_plans: [];\n current_trial_plan: string;\n plans: object;\n plan_prices: object;\n members_count: number;\n available_trial_plans: [];\n client_member_members_policy: boolean;\n stripe_billing_edit_policy: boolean;\n subscription_show_policy: boolean;\n secure_ip_retrieve_policy: boolean;\n login_setting_retrieve_policy: boolean;\n locale: string;\n is_plan_change: boolean;\n};\n\nconst SlackWarningContext = (props: Props) => {\n return (\n \n \n \n );\n};\n\nexport default SlackWarningContext;\n","import ReactOnRails from \"react-on-rails\";\nimport { TrixEditor } from \"../../components/templates/trixEditor/trix-editor\";\nimport ManualOperationForm from \"../../components/common/FlowBots/ManualOperationForm/ManualOperationForm\";\nimport SlackWarningContext from \"../../components/common/FlowBots/SlackWarning/SlackWarningContext\";\nReactOnRails.register({\n TrixEditor,\n ManualOperationForm,\n SlackWarningContext,\n});\n"],"names":["TrixEditor","memo","props","trixEditorDefined","setTrixEditorDefined","useState","inputRef","useRef","useEffect","jsxs","jsx","pullDownClassName","TrixToolbar","OutputSuggest","style","PropTypes","SortableItem","id","options_for_list_selections","output","deleteItem","copyItem","client_id","workflow_template_id","error","exceededOutputLimit","t","useTranslation","dataType","setDataType","isRequired","setIsRequired","_a","selections","setSelections","_b","selectedOption","setSelectedOption","dataTypeOptions","attributes","listeners","setNodeRef","transform","transition","useSortable","itemStyle","CSS","onChange","addSelection","handleSelectionChange","e","index","newSelections","deleteSelection","_","i","getImageUrl","Fragment","option","moment","selection","Switch","ManualOperationForm","outputs","errors","output_limit_size","locale","useLanguageChange","items","setItems","nextScrollId","o","activeItemSize","item","sensors","useSensors","useSensor","PointerSensor","KeyboardSensor","sortableKeyboardCoordinates","handleDragEnd","event","active","over","oldIndex","newIndex","arrayMove","addNewItem","scrollId","itemToCopy","copiedItem","DndContext","closestCenter","SortableContext","verticalListSortingStrategy","SlackWarning","paths","client","isPartner","myAccount","client_member_id","service_icon","updateTaskLimitPolicy","isAdmin","plans","plan_prices","past_trial_plans","current_trial_plan","members_count","available_trial_plans","member_id","client_member_members_policy","stripe_billing_edit_policy","subscription_show_policy","secure_ip_retrieve_policy","login_setting_retrieve_policy","is_plan_change","workspaceLinkPolicy","isOpen","setIsOpen","showSlackWarning","setShowSlackWarning","dispatch","useDispatch","selector","useSelector","state","isModal","getIsModal","openModal","setIsModal","closeModal","url","openNotificationPage","setCurrentPage","handler","SettingModal","SlackWarningContext","Provider","store","ReactOnRails"],"mappings":"00EAQaA,EAAaC,EAAAA,KAAMC,GAAU,CACxC,KAAM,CAACC,EAAmBC,CAAoB,EAAIC,WAAS,EAErDC,EAAWC,SAAO,IAAI,EAE5BC,OAAAA,EAAAA,UAAU,IAAMJ,EAAqB,EAAI,EAAG,CAAA,CAAE,EAG5CK,EAAA,KAAC,MAAI,CAAA,UAAU,aACb,SAAA,CAAAC,EAAA,IAAC,QAAA,CACC,KAAK,SACL,KAAM,GAAGR,EAAM,KAAK,SACpB,GAAI,GAAGA,EAAM,KAAK,oBAAoBA,EAAM,KAAK,GACjD,aAAcA,EAAM,KAA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