From c680f5aa71b08e978444df07f93c381f9d47ab82 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 5 Jun 2023 10:04:09 -0300 Subject: rename aml --- packages/exchange-backoffice-ui/src/App.tsx | 12 - packages/exchange-backoffice-ui/src/Dashboard.tsx | 599 --------------- packages/exchange-backoffice-ui/src/NiceForm.tsx | 59 -- packages/exchange-backoffice-ui/src/account.ts | 92 --- .../src/assets/logo-2021.svg | 9 - .../exchange-backoffice-ui/src/declaration.d.ts | 30 - .../exchange-backoffice-ui/src/forms/902_11e.ts | 154 ---- .../exchange-backoffice-ui/src/forms/902_12e.ts | 440 ----------- .../exchange-backoffice-ui/src/forms/902_13e.ts | 527 ------------- .../exchange-backoffice-ui/src/forms/902_15e.ts | 197 ----- .../exchange-backoffice-ui/src/forms/902_1e.ts | 695 ----------------- .../exchange-backoffice-ui/src/forms/902_4e.ts | 822 --------------------- .../exchange-backoffice-ui/src/forms/902_5e.ts | 281 ------- .../exchange-backoffice-ui/src/forms/902_9e.ts | 138 ---- packages/exchange-backoffice-ui/src/forms/index.ts | 146 ---- .../exchange-backoffice-ui/src/forms/simplest.ts | 103 --- .../src/handlers/Caption.tsx | 35 - .../src/handlers/FormProvider.tsx | 99 --- .../exchange-backoffice-ui/src/handlers/Group.tsx | 41 - .../src/handlers/InputAmount.tsx | 34 - .../src/handlers/InputArray.tsx | 183 ----- .../src/handlers/InputChoiceHorizontal.tsx | 86 --- .../src/handlers/InputChoiceStacked.tsx | 111 --- .../src/handlers/InputDate.tsx | 37 - .../src/handlers/InputFile.tsx | 101 --- .../src/handlers/InputInteger.tsx | 23 - .../src/handlers/InputLine.tsx | 282 ------- .../src/handlers/InputSelectMultiple.tsx | 151 ---- .../src/handlers/InputSelectOne.tsx | 134 ---- .../src/handlers/InputText.tsx | 8 - .../src/handlers/InputTextArea.tsx | 8 - .../exchange-backoffice-ui/src/handlers/forms.ts | 135 ---- .../src/handlers/useField.ts | 93 --- .../exchange-backoffice-ui/src/hooks/useOfficer.ts | 100 --- packages/exchange-backoffice-ui/src/i18n/bank.pot | 486 ------------ packages/exchange-backoffice-ui/src/i18n/de.po | 486 ------------ packages/exchange-backoffice-ui/src/i18n/en.po | 511 ------------- packages/exchange-backoffice-ui/src/i18n/es.po | 497 ------------- packages/exchange-backoffice-ui/src/i18n/fr.po | 486 ------------ packages/exchange-backoffice-ui/src/i18n/it.po | 521 ------------- packages/exchange-backoffice-ui/src/i18n/poheader | 26 - .../src/i18n/strings-prelude | 19 - .../exchange-backoffice-ui/src/i18n/strings.ts | 510 ------------- packages/exchange-backoffice-ui/src/index.html | 42 -- packages/exchange-backoffice-ui/src/index.tsx | 22 - packages/exchange-backoffice-ui/src/pages.ts | 55 -- .../src/pages/AntiMoneyLaunderingForm.tsx | 90 --- .../src/pages/CaseDetails.tsx | 447 ----------- .../exchange-backoffice-ui/src/pages/Cases.tsx | 288 -------- .../src/pages/CreateAccount.tsx | 102 --- .../src/pages/HandleAccountNotReady.tsx | 34 - packages/exchange-backoffice-ui/src/pages/Home.tsx | 5 - .../src/pages/NewFormEntry.tsx | 76 -- .../exchange-backoffice-ui/src/pages/Officer.tsx | 55 -- .../exchange-backoffice-ui/src/pages/Settings.tsx | 5 - .../src/pages/UnlockAccount.tsx | 81 -- .../exchange-backoffice-ui/src/pages/Welcome.tsx | 9 - packages/exchange-backoffice-ui/src/route.ts | 167 ----- packages/exchange-backoffice-ui/src/scss/main.css | 3 - .../exchange-backoffice-ui/src/stories.test.ts | 56 -- packages/exchange-backoffice-ui/src/stories.tsx | 44 -- packages/exchange-backoffice-ui/src/types.ts | 81 -- 62 files changed, 11169 deletions(-) delete mode 100644 packages/exchange-backoffice-ui/src/App.tsx delete mode 100644 packages/exchange-backoffice-ui/src/Dashboard.tsx delete mode 100644 packages/exchange-backoffice-ui/src/NiceForm.tsx delete mode 100644 packages/exchange-backoffice-ui/src/account.ts delete mode 100644 packages/exchange-backoffice-ui/src/assets/logo-2021.svg delete mode 100644 packages/exchange-backoffice-ui/src/declaration.d.ts delete mode 100644 packages/exchange-backoffice-ui/src/forms/902_11e.ts delete mode 100644 packages/exchange-backoffice-ui/src/forms/902_12e.ts delete mode 100644 packages/exchange-backoffice-ui/src/forms/902_13e.ts delete mode 100644 packages/exchange-backoffice-ui/src/forms/902_15e.ts delete mode 100644 packages/exchange-backoffice-ui/src/forms/902_1e.ts delete mode 100644 packages/exchange-backoffice-ui/src/forms/902_4e.ts delete mode 100644 packages/exchange-backoffice-ui/src/forms/902_5e.ts delete mode 100644 packages/exchange-backoffice-ui/src/forms/902_9e.ts delete mode 100644 packages/exchange-backoffice-ui/src/forms/index.ts delete mode 100644 packages/exchange-backoffice-ui/src/forms/simplest.ts delete mode 100644 packages/exchange-backoffice-ui/src/handlers/Caption.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/FormProvider.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/Group.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputAmount.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputArray.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputChoiceHorizontal.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputChoiceStacked.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputDate.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputFile.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputInteger.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputLine.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputSelectMultiple.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputSelectOne.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputText.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputTextArea.tsx delete mode 100644 packages/exchange-backoffice-ui/src/handlers/forms.ts delete mode 100644 packages/exchange-backoffice-ui/src/handlers/useField.ts delete mode 100644 packages/exchange-backoffice-ui/src/hooks/useOfficer.ts delete mode 100644 packages/exchange-backoffice-ui/src/i18n/bank.pot delete mode 100644 packages/exchange-backoffice-ui/src/i18n/de.po delete mode 100644 packages/exchange-backoffice-ui/src/i18n/en.po delete mode 100644 packages/exchange-backoffice-ui/src/i18n/es.po delete mode 100644 packages/exchange-backoffice-ui/src/i18n/fr.po delete mode 100644 packages/exchange-backoffice-ui/src/i18n/it.po delete mode 100644 packages/exchange-backoffice-ui/src/i18n/poheader delete mode 100644 packages/exchange-backoffice-ui/src/i18n/strings-prelude delete mode 100644 packages/exchange-backoffice-ui/src/i18n/strings.ts delete mode 100644 packages/exchange-backoffice-ui/src/index.html delete mode 100644 packages/exchange-backoffice-ui/src/index.tsx delete mode 100644 packages/exchange-backoffice-ui/src/pages.ts delete mode 100644 packages/exchange-backoffice-ui/src/pages/AntiMoneyLaunderingForm.tsx delete mode 100644 packages/exchange-backoffice-ui/src/pages/CaseDetails.tsx delete mode 100644 packages/exchange-backoffice-ui/src/pages/Cases.tsx delete mode 100644 packages/exchange-backoffice-ui/src/pages/CreateAccount.tsx delete mode 100644 packages/exchange-backoffice-ui/src/pages/HandleAccountNotReady.tsx delete mode 100644 packages/exchange-backoffice-ui/src/pages/Home.tsx delete mode 100644 packages/exchange-backoffice-ui/src/pages/NewFormEntry.tsx delete mode 100644 packages/exchange-backoffice-ui/src/pages/Officer.tsx delete mode 100644 packages/exchange-backoffice-ui/src/pages/Settings.tsx delete mode 100644 packages/exchange-backoffice-ui/src/pages/UnlockAccount.tsx delete mode 100644 packages/exchange-backoffice-ui/src/pages/Welcome.tsx delete mode 100644 packages/exchange-backoffice-ui/src/route.ts delete mode 100644 packages/exchange-backoffice-ui/src/scss/main.css delete mode 100644 packages/exchange-backoffice-ui/src/stories.test.ts delete mode 100644 packages/exchange-backoffice-ui/src/stories.tsx delete mode 100644 packages/exchange-backoffice-ui/src/types.ts (limited to 'packages/exchange-backoffice-ui/src') diff --git a/packages/exchange-backoffice-ui/src/App.tsx b/packages/exchange-backoffice-ui/src/App.tsx deleted file mode 100644 index 600131219..000000000 --- a/packages/exchange-backoffice-ui/src/App.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { TranslationProvider } from "@gnu-taler/web-util/browser"; -import { h, VNode } from "preact"; -import { Dashboard } from "./Dashboard.js"; -import "./scss/main.css"; - -export function App(): VNode { - return ( - - - - ); -} diff --git a/packages/exchange-backoffice-ui/src/Dashboard.tsx b/packages/exchange-backoffice-ui/src/Dashboard.tsx deleted file mode 100644 index 6794ca1f8..000000000 --- a/packages/exchange-backoffice-ui/src/Dashboard.tsx +++ /dev/null @@ -1,599 +0,0 @@ -import { useNotifications } from "@gnu-taler/web-util/browser"; -import { Dialog, Transition } from "@headlessui/react"; -import { UserIcon, XCircleIcon } from "@heroicons/react/20/solid"; -import { CheckCircleIcon, XMarkIcon } from "@heroicons/react/24/outline"; -import { InformationCircleIcon } from "@heroicons/react/24/solid"; -import { ComponentChildren, Fragment, VNode, h } from "preact"; -import { useState } from "preact/hooks"; -import logo from "./assets/logo-2021.svg"; -import { Pages } from "./pages.js"; -import { Router, useCurrentLocation } from "./route.js"; - -function classNames(...classes: string[]) { - return classes.filter(Boolean).join(" "); -} - -/** - * mapping route to view - * not found (error page) - * nested, index element, relative routes - * link interception - * form POST interception, call action - * fromData => Object.fromEntries - * segments in the URL - * navigationState: idle, submitting, loading - * form GET interception: does a navigateTo - * form GET Sync: - * 1.- back after submit: useEffect to sync URL to form - * 2.- refresh after submit: input default value - * useSubmit for form submission onChange, history replace - * - * post form without redirect - * - * - * @param param0 - * @returns - */ - -const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : undefined; -const VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : undefined; - -const versionText = VERSION - ? GIT_HASH - ? `v${VERSION} (${GIT_HASH.substring(0, 8)})` - : VERSION - : ""; - -/** - * TO BE FIXED: - * - * 1.- when the form change to other form and both form share the same structure - * the same input component may be rendered in the same place, - * since input are uncontrolled the are not re-rendered and since they are - * uncontrolled it will keep the value of the previous form. - * One solutions could be to remove the form when unloading and when the new - * form load it will start without previous vdom, preventing the cache - * to create this behavior. - * Other solutions could be using IDs in the fields that are constructed - * with the ID of the form, so two fields of different form will need to re-render - * cleaning up the state of the previous form. - * - * 2.- currently the design prop and the behavior prop of the flexible form - * are two side of the same coin. From the design point of view, it is important - * to design the form in a list-of-field manner and there may be additional - * content that is not directly mapped to the form structure (object) - * So maybe we want to change the current shape so the computation of the state - * of the form is in a field level, but this computation required the field value and - * the whole form values and state (since one field may be disabled/hidden) because - * of the value of other field. - * - * 3.- given the previous requirement, maybe the name of the field of the form could be - * a function (P: F -> V) where F is the form (or parent object) and V is the type of the - * property. That will help with the typing of the forms props - * - * 4.- tooltip are not placed correctly: the arrow should point the question mark - * and the text area should be bigger - * - * 5.- date field should have the calendar icon clickable so the user can select date without - * writing text with the correct format - */ - -function LeftMenu() { - const currentLocation = useCurrentLocation(pageList); - - return ( - - ); -} - -export function Dashboard({ - children, -}: { - children?: ComponentChildren; -}): VNode { - const [sidebarOpen, setSidebarOpen] = useState(false); - - return ( - - -
-
-
-

- Exchange AML Backoffice -

-
-
- -
-
-
-
- { - setSidebarOpen(true); - }} - /> - -
-
- { - return
not found
; - }} - /> -
-
-
-
- ); -} - -const pageList = Object.values(Pages); - -function NavigationBar({ - isOpen, - setOpen, - children, -}: { - isOpen: boolean; - setOpen: (v: boolean) => void; - children: ComponentChildren; -}) { - return ( - - - - -
- - -
- - - -
- -
-
- {children} -
-
-
-
-
- - -
- ); -} - -function TopBar({ onOpenSidebar }: { onOpenSidebar: () => void }) { - return ( -
-
- -
-
-
- Taler -
-
- {/*
dd
*/} -
- ); -} - -// return ( -//
-// - -// {/* Separator */} -//