├── 07-testing ├── 00-js-adivina │ ├── src │ │ ├── main.js │ │ ├── modelo.js │ │ └── shell.js │ ├── vite.config.js │ ├── .gitignore │ ├── package.json │ ├── README.md │ └── index.html └── 01-ts-adivina │ ├── src │ ├── main.ts │ ├── vite-env.d.ts │ ├── shell.ts │ ├── modelo.ts │ └── motor.ts │ ├── .gitignore │ ├── vite.config.ts │ ├── package.json │ ├── README.md │ ├── tsconfig.json │ └── index.html ├── 12-react ├── 01-enlazando │ ├── README.md │ ├── src │ │ ├── app.jsx │ │ ├── dummy.spec.ts │ │ └── index.jsx │ ├── test │ │ └── jest.js │ ├── vite.config.js │ ├── .gitignore │ ├── index.html │ └── package.json ├── 02-Componentizando │ ├── README.md │ ├── test │ │ └── jest.js │ ├── src │ │ ├── dummy.spec.ts │ │ ├── index.jsx │ │ └── app.jsx │ ├── vite.config.js │ ├── .gitignore │ ├── index.html │ └── package.json └── 03-perdiendo-estado │ ├── README.md │ ├── test │ └── jest.js │ ├── src │ ├── dummy.spec.ts │ ├── index.jsx │ ├── bienvenida.jsx │ ├── routes.jsx │ ├── app.jsx │ └── style.css │ ├── vite.config.js │ ├── .gitignore │ ├── index.html │ └── package.json ├── 00-git └── 00-boilerplate │ ├── src │ ├── index.js │ └── index.html │ ├── .gitignore │ └── package.json ├── README.md ├── 13-banca-online ├── 02-rutas │ ├── .env │ ├── src │ │ ├── pages │ │ │ ├── login │ │ │ │ ├── index.ts │ │ │ │ └── login.page.tsx │ │ │ ├── account │ │ │ │ ├── index.ts │ │ │ │ └── account.page.tsx │ │ │ ├── transfer │ │ │ │ ├── index.ts │ │ │ │ └── transfer.page.tsx │ │ │ ├── account-list │ │ │ │ ├── index.ts │ │ │ │ └── account-list.page.tsx │ │ │ ├── movement-list │ │ │ │ ├── index.ts │ │ │ │ └── movement-list.page.tsx │ │ │ └── index.ts │ │ ├── vite-env.d.ts │ │ ├── core │ │ │ └── router │ │ │ │ ├── index.ts │ │ │ │ ├── routes.ts │ │ │ │ └── router.component.tsx │ │ ├── app.tsx │ │ ├── dummy.spec.ts │ │ └── index.tsx │ ├── public │ │ └── assets │ │ │ ├── bg_login.jpg │ │ │ └── icon-user.svg │ ├── server │ │ ├── config │ │ │ └── routes.json │ │ ├── src │ │ │ ├── login.middleware.js │ │ │ └── account.middleware.js │ │ └── package.json │ ├── config │ │ └── test │ │ │ └── jest.js │ ├── .gitignore │ ├── index.html │ ├── tsconfig.json │ ├── vite.config.ts │ └── package.json ├── 03-login │ ├── .env │ ├── src │ │ ├── pages │ │ │ ├── login │ │ │ │ ├── index.ts │ │ │ │ ├── api │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── login.api-model.ts │ │ │ │ │ └── login.api.ts │ │ │ │ ├── login.mapper.ts │ │ │ │ ├── login.vm.ts │ │ │ │ ├── login.mapper.spec.ts │ │ │ │ ├── login.validation.ts │ │ │ │ └── login.page.tsx │ │ │ ├── account │ │ │ │ ├── index.ts │ │ │ │ └── account.page.tsx │ │ │ ├── transfer │ │ │ │ ├── index.ts │ │ │ │ └── transfer.page.tsx │ │ │ ├── account-list │ │ │ │ ├── index.ts │ │ │ │ └── account-list.page.tsx │ │ │ ├── movement-list │ │ │ │ ├── index.ts │ │ │ │ └── movement-list.page.tsx │ │ │ └── index.ts │ │ ├── vite-env.d.ts │ │ ├── core │ │ │ └── router │ │ │ │ ├── index.ts │ │ │ │ ├── routes.ts │ │ │ │ └── router.component.tsx │ │ ├── app.tsx │ │ ├── dummy.spec.ts │ │ └── index.tsx │ ├── public │ │ └── assets │ │ │ ├── bg_login.jpg │ │ │ └── icon-user.svg │ ├── server │ │ ├── config │ │ │ └── routes.json │ │ ├── src │ │ │ ├── login.middleware.js │ │ │ └── account.middleware.js │ │ └── package.json │ ├── config │ │ └── test │ │ │ └── jest.js │ ├── .gitignore │ ├── index.html │ ├── tsconfig.json │ ├── vite.config.ts │ └── package.json ├── 04-estilado │ ├── .env │ ├── src │ │ ├── pages │ │ │ ├── login │ │ │ │ ├── index.ts │ │ │ │ ├── api │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── login.api-model.ts │ │ │ │ │ └── login.api.ts │ │ │ │ ├── login.mapper.ts │ │ │ │ ├── login.vm.ts │ │ │ │ ├── components │ │ │ │ │ └── login-form.component.module.css │ │ │ │ ├── login.mapper.spec.ts │ │ │ │ └── login.validation.ts │ │ │ ├── account │ │ │ │ ├── index.ts │ │ │ │ └── account.page.tsx │ │ │ ├── transfer │ │ │ │ ├── index.ts │ │ │ │ └── transfer.page.tsx │ │ │ ├── account-list │ │ │ │ ├── index.ts │ │ │ │ └── account-list.page.tsx │ │ │ ├── movement-list │ │ │ │ ├── index.ts │ │ │ │ └── movement-list.page.tsx │ │ │ └── index.ts │ │ ├── vite-env.d.ts │ │ ├── core │ │ │ └── router │ │ │ │ ├── index.ts │ │ │ │ ├── routes.ts │ │ │ │ └── router.component.tsx │ │ ├── app.tsx │ │ ├── dummy.spec.ts │ │ └── index.tsx │ ├── public │ │ └── assets │ │ │ ├── bg_login.jpg │ │ │ └── icon-user.svg │ ├── server │ │ ├── config │ │ │ └── routes.json │ │ ├── src │ │ │ ├── login.middleware.js │ │ │ └── account.middleware.js │ │ └── package.json │ ├── config │ │ └── test │ │ │ └── jest.js │ ├── .gitignore │ ├── index.html │ ├── tsconfig.json │ ├── vite.config.ts │ └── package.json ├── 01-boilerplate │ ├── .env │ ├── src │ │ ├── vite-env.d.ts │ │ ├── app.tsx │ │ ├── dummy.spec.ts │ │ └── index.tsx │ ├── server │ │ ├── config │ │ │ └── routes.json │ │ ├── src │ │ │ ├── login.middleware.js │ │ │ └── account.middleware.js │ │ └── package.json │ ├── public │ │ └── assets │ │ │ ├── bg_login.jpg │ │ │ └── icon-user.svg │ ├── config │ │ └── test │ │ │ └── jest.js │ ├── .gitignore │ ├── index.html │ ├── tsconfig.json │ ├── vite.config.ts │ └── package.json ├── 06-mis-cuentas │ ├── .env │ ├── src │ │ ├── layouts │ │ │ ├── index.ts │ │ │ └── app │ │ │ │ ├── app-layout.module.css │ │ │ │ ├── components │ │ │ │ ├── index.ts │ │ │ │ ├── footer.component.module.css │ │ │ │ ├── footer.component.tsx │ │ │ │ ├── navbar.component.module.css │ │ │ │ ├── header.component.tsx │ │ │ │ └── header.component.module.css │ │ │ │ └── app-layout.tsx │ │ ├── pages │ │ │ ├── account │ │ │ │ ├── index.ts │ │ │ │ └── account.page.tsx │ │ │ ├── login │ │ │ │ ├── index.ts │ │ │ │ ├── api │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── login.api-model.ts │ │ │ │ │ └── login.api.ts │ │ │ │ ├── login.mapper.ts │ │ │ │ ├── login.vm.ts │ │ │ │ ├── components │ │ │ │ │ └── login-form.component.module.css │ │ │ │ ├── login.mapper.spec.ts │ │ │ │ └── login.validation.ts │ │ │ ├── transfer │ │ │ │ ├── index.ts │ │ │ │ └── transfer.page.tsx │ │ │ ├── account-list │ │ │ │ ├── index.ts │ │ │ │ ├── api │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── account-list.api-model.ts │ │ │ │ │ └── account-list.api.ts │ │ │ │ ├── account-list.vm.ts │ │ │ │ ├── account-list.page.module.css │ │ │ │ ├── account-list.mapper.ts │ │ │ │ └── components │ │ │ │ │ ├── account-list-table.component.module.css │ │ │ │ │ └── account-list-item.component.module.css │ │ │ ├── movement-list │ │ │ │ ├── index.ts │ │ │ │ └── movement-list.page.tsx │ │ │ └── index.ts │ │ ├── vite-env.d.ts │ │ ├── core │ │ │ ├── profile │ │ │ │ ├── index.ts │ │ │ │ └── profile.context.tsx │ │ │ └── router │ │ │ │ ├── index.ts │ │ │ │ ├── routes.ts │ │ │ │ └── router.component.tsx │ │ ├── dummy.spec.ts │ │ ├── app.tsx │ │ └── index.tsx │ ├── server │ │ ├── config │ │ │ └── routes.json │ │ ├── src │ │ │ ├── login.middleware.js │ │ │ └── account.middleware.js │ │ └── package.json │ ├── public │ │ └── assets │ │ │ ├── bg_login.jpg │ │ │ └── icon-user.svg │ ├── config │ │ └── test │ │ │ └── jest.js │ ├── .gitignore │ ├── index.html │ ├── tsconfig.json │ ├── vite.config.ts │ └── package.json ├── 07-transferencia │ ├── .env │ ├── src │ │ ├── layouts │ │ │ ├── index.ts │ │ │ └── app │ │ │ │ ├── app-layout.module.css │ │ │ │ ├── components │ │ │ │ ├── index.ts │ │ │ │ ├── footer.component.module.css │ │ │ │ ├── footer.component.tsx │ │ │ │ ├── navbar.component.module.css │ │ │ │ ├── header.component.tsx │ │ │ │ └── header.component.module.css │ │ │ │ └── app-layout.tsx │ │ ├── pages │ │ │ ├── login │ │ │ │ ├── index.ts │ │ │ │ ├── api │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── login.api-model.ts │ │ │ │ │ └── login.api.ts │ │ │ │ ├── login.mapper.ts │ │ │ │ ├── login.vm.ts │ │ │ │ ├── components │ │ │ │ │ └── login-form.component.module.css │ │ │ │ ├── login-field.validation.ts │ │ │ │ ├── login.mapper.spec.ts │ │ │ │ └── login.validation.ts │ │ │ ├── account │ │ │ │ ├── index.ts │ │ │ │ └── account.page.tsx │ │ │ ├── transfer │ │ │ │ ├── index.ts │ │ │ │ ├── components │ │ │ │ │ ├── index.ts │ │ │ │ │ └── transfer-form.component.module.css │ │ │ │ ├── validations │ │ │ │ │ └── index.ts │ │ │ │ ├── api │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── transfer.api-model.ts │ │ │ │ │ └── transfer.api.ts │ │ │ │ ├── transfer.page.module.css │ │ │ │ └── transfer.mapper.ts │ │ │ ├── account-list │ │ │ │ ├── index.ts │ │ │ │ ├── api │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── account-list.api-model.ts │ │ │ │ │ └── account-list.api.ts │ │ │ │ ├── account-list.vm.ts │ │ │ │ ├── account-list.page.module.css │ │ │ │ ├── account-list.mapper.ts │ │ │ │ └── components │ │ │ │ │ ├── account-list-table.component.module.css │ │ │ │ │ └── account-list-item.component.module.css │ │ │ ├── movement-list │ │ │ │ ├── index.ts │ │ │ │ └── movement-list.page.tsx │ │ │ └── index.ts │ │ ├── vite-env.d.ts │ │ ├── core │ │ │ ├── profile │ │ │ │ ├── index.ts │ │ │ │ └── profile.context.tsx │ │ │ └── router │ │ │ │ ├── index.ts │ │ │ │ ├── routes.ts │ │ │ │ └── router.component.tsx │ │ ├── dummy.spec.ts │ │ ├── common │ │ │ └── validations │ │ │ │ ├── index.ts │ │ │ │ ├── validation.model.ts │ │ │ │ ├── validation.const.ts │ │ │ │ ├── validation.helper.ts │ │ │ │ └── plain.validation.ts │ │ ├── app.tsx │ │ └── index.tsx │ ├── server │ │ ├── config │ │ │ └── routes.json │ │ ├── src │ │ │ ├── login.middleware.js │ │ │ └── account.middleware.js │ │ └── package.json │ ├── public │ │ └── assets │ │ │ ├── bg_login.jpg │ │ │ └── icon-user.svg │ ├── config │ │ └── test │ │ │ └── jest.js │ ├── .gitignore │ ├── index.html │ ├── tsconfig.json │ └── vite.config.ts └── 05-app-cuentas-layout │ ├── .env │ ├── src │ ├── layouts │ │ ├── index.ts │ │ └── app │ │ │ ├── app-layout.module.css │ │ │ ├── components │ │ │ ├── index.ts │ │ │ ├── footer.component.module.css │ │ │ ├── footer.component.tsx │ │ │ ├── navbar.component.module.css │ │ │ ├── header.component.tsx │ │ │ └── header.component.module.css │ │ │ └── app-layout.tsx │ ├── pages │ │ ├── login │ │ │ ├── index.ts │ │ │ ├── api │ │ │ │ ├── index.ts │ │ │ │ ├── login.api-model.ts │ │ │ │ └── login.api.ts │ │ │ ├── login.mapper.ts │ │ │ ├── login.vm.ts │ │ │ ├── components │ │ │ │ └── login-form.component.module.css │ │ │ ├── login.mapper.spec.ts │ │ │ └── login.validation.ts │ │ ├── account │ │ │ ├── index.ts │ │ │ └── account.page.tsx │ │ ├── transfer │ │ │ ├── index.ts │ │ │ └── transfer.page.tsx │ │ ├── account-list │ │ │ ├── index.ts │ │ │ └── account-list.page.tsx │ │ ├── movement-list │ │ │ ├── index.ts │ │ │ └── movement-list.page.tsx │ │ └── index.ts │ ├── vite-env.d.ts │ ├── core │ │ ├── profile │ │ │ ├── index.ts │ │ │ └── profile.context.tsx │ │ └── router │ │ │ ├── index.ts │ │ │ ├── routes.ts │ │ │ └── router.component.tsx │ ├── dummy.spec.ts │ ├── app.tsx │ └── index.tsx │ ├── server │ ├── config │ │ └── routes.json │ ├── src │ │ ├── login.middleware.js │ │ └── account.middleware.js │ └── package.json │ ├── public │ └── assets │ │ ├── bg_login.jpg │ │ └── icon-user.svg │ ├── config │ └── test │ │ └── jest.js │ ├── .gitignore │ ├── index.html │ ├── tsconfig.json │ ├── vite.config.ts │ └── package.json ├── 10-async ├── 00-bloqueo │ ├── src │ │ ├── vite-env.d.ts │ │ ├── dummy.spec.ts │ │ └── main.ts │ ├── config │ │ └── test │ │ │ └── jest.js │ ├── .gitignore │ ├── vite.config.ts │ ├── package.json │ ├── README.md │ ├── tsconfig.json │ └── index.html ├── 01-depurando │ ├── src │ │ ├── vite-env.d.ts │ │ ├── main.ts │ │ └── dummy.spec.ts │ ├── config │ │ └── test │ │ │ └── jest.js │ ├── .gitignore │ ├── vite.config.ts │ ├── package.json │ ├── index.html │ ├── README.md │ └── tsconfig.json ├── 06-lab-asincronia │ ├── public │ │ ├── irma.webp │ │ ├── bacterio.webp │ │ ├── besuguio.webp │ │ ├── boniguez.webp │ │ ├── filemon.webp │ │ ├── ofelia.webp │ │ ├── patrona.jpg │ │ ├── bestiajez.webp │ │ ├── borriquez.webp │ │ ├── mortadelo.webp │ │ ├── rompetechos.webp │ │ ├── superintendente.webp │ │ └── director-general.webp │ └── package.json ├── 03-server-peliculas │ ├── assets │ │ ├── movies │ │ │ ├── thor.webp │ │ │ ├── ant-man.webp │ │ │ ├── eternals.webp │ │ │ ├── iron-man.webp │ │ │ ├── shang-chi.webp │ │ │ ├── spider-man.jpg │ │ │ ├── black-widow.webp │ │ │ ├── iron-man-2.webp │ │ │ ├── iron-man-3.webp │ │ │ ├── black-panther.webp │ │ │ ├── captain-marvel.webp │ │ │ ├── doctor-strange.webp │ │ │ ├── the-avengers.webp │ │ │ ├── thor-ragnarok.webp │ │ │ ├── ant-man-the-wasp.webp │ │ │ ├── avengers-endgame.webp │ │ │ ├── thor-dark-world.webp │ │ │ ├── the-incredible-hulk.jpg │ │ │ ├── avengers-infinity-war.webp │ │ │ ├── spider-man-homecoming.webp │ │ │ ├── avengers-age-of-ultron.webp │ │ │ ├── guardians-of-the-galaxy.webp │ │ │ ├── spider-man-far-from-home.webp │ │ │ ├── spider-man-no-way-home.webp │ │ │ ├── captain-america-civil-war.webp │ │ │ ├── guardians-of-the-galaxy-2.webp │ │ │ ├── captain-america-first-avenger.webp │ │ │ └── captain-america-winter-soldier.webp │ │ └── actors │ │ │ ├── liv-tyler.jpg │ │ │ ├── paul-rudd.webp │ │ │ ├── tim-roth.jpg │ │ │ ├── brie-larson.webp │ │ │ ├── chris-evans.jpg │ │ │ ├── chris-pratt.jpg │ │ │ ├── hugo-weaving.jpg │ │ │ ├── mark-ruffalo.jpg │ │ │ ├── paul-bettany.jpg │ │ │ ├── anthony-mackie.jpg │ │ │ ├── chris-hemsworth.jpg │ │ │ ├── edward-norton.jpg │ │ │ ├── elizabeth-olsen.jpg │ │ │ ├── haylay-atwell.jpg │ │ │ ├── jeremy-renner.webp │ │ │ ├── mickey-rourke.webp │ │ │ ├── natalie-portman.jpg │ │ │ ├── samuel-jackson.jpg │ │ │ ├── sebastian-stan.webp │ │ │ ├── tarrence-howard.jpg │ │ │ ├── tom-hiddleston.jpg │ │ │ ├── tommy-lee-jones.jpg │ │ │ ├── chadwick-boseman.jpg │ │ │ ├── gwyneth-paltrow.jpeg │ │ │ ├── robert-downey-jr.webp │ │ │ ├── benedict-cumberbatch.jpg │ │ │ └── scarlett-johansson.jpg │ └── package.json ├── 02-simular-event-loop │ ├── vite.config.js │ ├── config │ │ └── test │ │ │ └── jest.js │ ├── src │ │ └── dummy.spec.ts │ ├── .gitignore │ ├── package.json │ ├── index.html │ └── README.md ├── 04-banco-camas-1 │ └── package.json └── 05-banco-camas-2 │ └── package.json └── .gitignore /07-testing/00-js-adivina/src/main.js: -------------------------------------------------------------------------------- 1 | import "./shell"; 2 | -------------------------------------------------------------------------------- /07-testing/01-ts-adivina/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./shell"; 2 | -------------------------------------------------------------------------------- /12-react/01-enlazando/README.md: -------------------------------------------------------------------------------- 1 | # javascript-react-sandbox -------------------------------------------------------------------------------- /12-react/02-Componentizando/README.md: -------------------------------------------------------------------------------- 1 | # javascript-react-sandbox -------------------------------------------------------------------------------- /00-git/00-boilerplate/src/index.js: -------------------------------------------------------------------------------- 1 | console.log("¡Hola Git!"); 2 | -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/README.md: -------------------------------------------------------------------------------- 1 | # javascript-react-sandbox -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # bootcamp-js-2 2 | Material de trabajo del Bootcamp JS 2 3 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/.env: -------------------------------------------------------------------------------- 1 | VITE_BASE_API_URL = http://localhost:3000/api -------------------------------------------------------------------------------- /13-banca-online/03-login/.env: -------------------------------------------------------------------------------- 1 | VITE_BASE_API_URL = http://localhost:3000/api -------------------------------------------------------------------------------- /13-banca-online/04-estilado/.env: -------------------------------------------------------------------------------- 1 | VITE_BASE_API_URL = http://localhost:3000/api -------------------------------------------------------------------------------- /10-async/00-bloqueo/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /10-async/01-depurando/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/.env: -------------------------------------------------------------------------------- 1 | VITE_BASE_API_URL = http://localhost:3000/api -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/pages/login/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/login/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/.env: -------------------------------------------------------------------------------- 1 | VITE_BASE_API_URL = http://localhost:3000/api -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/.env: -------------------------------------------------------------------------------- 1 | VITE_BASE_API_URL = http://localhost:3000/api -------------------------------------------------------------------------------- /07-testing/01-ts-adivina/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/pages/account/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/account/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/login/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/.env: -------------------------------------------------------------------------------- 1 | VITE_BASE_API_URL = http://localhost:3000/api -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/pages/transfer/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./transfer.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/transfer/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./transfer.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/account/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/transfer/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./transfer.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/layouts/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./app/app-layout"; 2 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/account/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/login/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/layouts/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./app/app-layout"; 2 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/login/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /00-git/00-boilerplate/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .parcel-cache 3 | dist 4 | package-lock.json 5 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/pages/account-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/account-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/layouts/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./app/app-layout"; 2 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/login/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/core/profile/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./profile.context"; 2 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/transfer/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./transfer.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/core/profile/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./profile.context"; 2 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/account/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/transfer/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./transfer.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/pages/movement-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./movement-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/movement-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./movement-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/account-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/movement-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./movement-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/core/profile/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./profile.context"; 2 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/account/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/transfer/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./transfer.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/account-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/movement-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./movement-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/account-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/movement-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./movement-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/account-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/movement-list/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./movement-list.page"; 2 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/layouts/app/app-layout.module.css: -------------------------------------------------------------------------------- 1 | .main-content { 2 | flex-grow: 1; 3 | } 4 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/layouts/app/app-layout.module.css: -------------------------------------------------------------------------------- 1 | .main-content { 2 | flex-grow: 1; 3 | } 4 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/transfer/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./transfer-form.component"; 2 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/core/router/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./routes"; 2 | export * from "./router.component"; 3 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/core/router/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./routes"; 2 | export * from "./router.component"; 3 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/core/router/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./routes"; 2 | export * from "./router.component"; 3 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/layouts/app/app-layout.module.css: -------------------------------------------------------------------------------- 1 | .main-content { 2 | flex-grow: 1; 3 | } 4 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/transfer/validations/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./transfer-form.validation"; 2 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/login/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login.api"; 2 | export * from "./login.api-model"; 3 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/login/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login.api"; 2 | export * from "./login.api-model"; 3 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/core/router/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./routes"; 2 | export * from "./router.component"; 3 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/core/router/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./routes"; 2 | export * from "./router.component"; 3 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/core/router/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./routes"; 2 | export * from "./router.component"; 3 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/login/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login.api"; 2 | export * from "./login.api-model"; 3 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/login/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login.api"; 2 | export * from "./login.api-model"; 3 | -------------------------------------------------------------------------------- /12-react/01-enlazando/src/app.jsx: -------------------------------------------------------------------------------- 1 | export const App = () => { 2 | const name = "Braulio"; 3 | return {name}; 4 | }; 5 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/login/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login.api"; 2 | export * from "./login.api-model"; 3 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/transfer/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./transfer.api-model"; 2 | export * from "./transfer.api"; 3 | -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/irma.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/irma.webp -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/login/api/login.api-model.ts: -------------------------------------------------------------------------------- 1 | export interface Credentials { 2 | user: string; 3 | password: string; 4 | } 5 | -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/bacterio.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/bacterio.webp -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/besuguio.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/besuguio.webp -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/boniguez.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/boniguez.webp -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/filemon.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/filemon.webp -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/ofelia.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/ofelia.webp -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/patrona.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/patrona.jpg -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/login/api/login.api-model.ts: -------------------------------------------------------------------------------- 1 | export interface Credentials { 2 | user: string; 3 | password: string; 4 | } 5 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/account-list/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account-list.api"; 2 | export * from "./account-list.api-model"; 3 | -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/bestiajez.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/bestiajez.webp -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/borriquez.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/borriquez.webp -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/mortadelo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/mortadelo.webp -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/login/api/login.api-model.ts: -------------------------------------------------------------------------------- 1 | export interface Credentials { 2 | user: string; 3 | password: string; 4 | } 5 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/account-list/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./account-list.api"; 2 | export * from "./account-list.api-model"; 3 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/login/api/login.api-model.ts: -------------------------------------------------------------------------------- 1 | export interface Credentials { 2 | user: string; 3 | password: string; 4 | } 5 | -------------------------------------------------------------------------------- /10-async/01-depurando/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./style.css"; 2 | 3 | const meLlamoAMiMisma = () => { 4 | meLlamoAMiMisma(); 5 | }; 6 | 7 | meLlamoAMiMisma(); 8 | -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/thor.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/thor.webp -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/rompetechos.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/rompetechos.webp -------------------------------------------------------------------------------- /13-banca-online/02-rutas/public/assets/bg_login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/13-banca-online/02-rutas/public/assets/bg_login.jpg -------------------------------------------------------------------------------- /13-banca-online/02-rutas/server/config/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "/api/*": "/$1", 3 | "/account": "/account-list", 4 | "/account/:id": "/account-list/:id" 5 | } 6 | -------------------------------------------------------------------------------- /13-banca-online/03-login/public/assets/bg_login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/13-banca-online/03-login/public/assets/bg_login.jpg -------------------------------------------------------------------------------- /13-banca-online/03-login/server/config/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "/api/*": "/$1", 3 | "/account": "/account-list", 4 | "/account/:id": "/account-list/:id" 5 | } 6 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/login/api/login.api-model.ts: -------------------------------------------------------------------------------- 1 | export interface Credentials { 2 | user: string; 3 | password: string; 4 | } 5 | -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/superintendente.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/superintendente.webp -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/server/config/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "/api/*": "/$1", 3 | "/account": "/account-list", 4 | "/account/:id": "/account-list/:id" 5 | } 6 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/public/assets/bg_login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/13-banca-online/04-estilado/public/assets/bg_login.jpg -------------------------------------------------------------------------------- /13-banca-online/04-estilado/server/config/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "/api/*": "/$1", 3 | "/account": "/account-list", 4 | "/account/:id": "/account-list/:id" 5 | } 6 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/server/config/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "/api/*": "/$1", 3 | "/account": "/account-list", 4 | "/account/:id": "/account-list/:id" 5 | } 6 | -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/liv-tyler.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/liv-tyler.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/paul-rudd.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/paul-rudd.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/tim-roth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/tim-roth.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/ant-man.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/ant-man.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/eternals.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/eternals.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/iron-man.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/iron-man.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/shang-chi.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/shang-chi.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/spider-man.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/spider-man.jpg -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/public/director-general.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/06-lab-asincronia/public/director-general.webp -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/public/assets/bg_login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/13-banca-online/01-boilerplate/public/assets/bg_login.jpg -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/public/assets/bg_login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/13-banca-online/06-mis-cuentas/public/assets/bg_login.jpg -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/server/config/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "/api/*": "/$1", 3 | "/account": "/account-list", 4 | "/account/:id": "/account-list/:id" 5 | } 6 | -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/brie-larson.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/brie-larson.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/chris-evans.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/chris-evans.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/chris-pratt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/chris-pratt.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/hugo-weaving.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/hugo-weaving.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/mark-ruffalo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/mark-ruffalo.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/paul-bettany.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/paul-bettany.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/black-widow.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/black-widow.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/iron-man-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/iron-man-2.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/iron-man-3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/iron-man-3.webp -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/server/config/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "/api/*": "/$1", 3 | "/account": "/account-list", 4 | "/account/:id": "/account-list/:id" 5 | } 6 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/public/assets/bg_login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/13-banca-online/07-transferencia/public/assets/bg_login.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/anthony-mackie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/anthony-mackie.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/chris-hemsworth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/chris-hemsworth.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/edward-norton.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/edward-norton.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/elizabeth-olsen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/elizabeth-olsen.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/haylay-atwell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/haylay-atwell.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/jeremy-renner.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/jeremy-renner.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/mickey-rourke.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/mickey-rourke.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/natalie-portman.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/natalie-portman.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/samuel-jackson.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/samuel-jackson.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/sebastian-stan.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/sebastian-stan.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/tarrence-howard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/tarrence-howard.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/tom-hiddleston.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/tom-hiddleston.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/tommy-lee-jones.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/tommy-lee-jones.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/black-panther.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/black-panther.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/captain-marvel.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/captain-marvel.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/doctor-strange.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/doctor-strange.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/the-avengers.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/the-avengers.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/thor-ragnarok.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/thor-ragnarok.webp -------------------------------------------------------------------------------- /10-async/02-simular-event-loop/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | 3 | export default defineConfig({ 4 | test: { 5 | globals: true, 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/chadwick-boseman.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/chadwick-boseman.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/gwyneth-paltrow.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/gwyneth-paltrow.jpeg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/robert-downey-jr.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/robert-downey-jr.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/ant-man-the-wasp.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/ant-man-the-wasp.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/avengers-endgame.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/avengers-endgame.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/thor-dark-world.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/thor-dark-world.webp -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/pages/transfer/transfer.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const TransferPage: React.FC = () => { 4 | return
Transfer
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/transfer/transfer.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const TransferPage: React.FC = () => { 4 | return
Transfer
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/public/assets/bg_login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/13-banca-online/05-app-cuentas-layout/public/assets/bg_login.jpg -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/layouts/app/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./header.component"; 2 | export * from "./navbar.component"; 3 | export * from "./footer.component"; 4 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/layouts/app/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./header.component"; 2 | export * from "./navbar.component"; 3 | export * from "./footer.component"; 4 | -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/benedict-cumberbatch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/benedict-cumberbatch.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/actors/scarlett-johansson.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/actors/scarlett-johansson.jpg -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/the-incredible-hulk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/the-incredible-hulk.jpg -------------------------------------------------------------------------------- /12-react/01-enlazando/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/transfer/transfer.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const TransferPage: React.FC = () => { 4 | return
Transfer
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/layouts/app/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./header.component"; 2 | export * from "./navbar.component"; 3 | export * from "./footer.component"; 4 | -------------------------------------------------------------------------------- /00-git/00-boilerplate/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hola Git

4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/avengers-infinity-war.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/avengers-infinity-war.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/spider-man-homecoming.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/spider-man-homecoming.webp -------------------------------------------------------------------------------- /12-react/02-Componentizando/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/pages/account/account.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const AccountPage: React.FC = () => { 4 | return
Create/Edit Account
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/account/account.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const AccountPage: React.FC = () => { 4 | return
Create/Edit Account
; 5 | }; 6 | -------------------------------------------------------------------------------- /10-async/00-bloqueo/config/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; 7 | -------------------------------------------------------------------------------- /10-async/01-depurando/config/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; 7 | -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/avengers-age-of-ultron.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/avengers-age-of-ultron.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/guardians-of-the-galaxy.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/guardians-of-the-galaxy.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/spider-man-far-from-home.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/spider-man-far-from-home.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/spider-man-no-way-home.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/spider-man-no-way-home.webp -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/account/account.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const AccountPage: React.FC = () => { 4 | return
Create/Edit Account
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/account/account.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const AccountPage: React.FC = () => { 4 | return
Create/Edit Account
; 5 | }; 6 | -------------------------------------------------------------------------------- /10-async/02-simular-event-loop/config/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/captain-america-civil-war.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/captain-america-civil-war.webp -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/guardians-of-the-galaxy-2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/guardians-of-the-galaxy-2.webp -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/src/app.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import "./style.css"; 4 | 5 | export const App: React.FC = () => { 6 | return

Punto de partida app Banca

; 7 | }; 8 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/config/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; 7 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login"; 2 | export * from "./account-list"; 3 | export * from "./account"; 4 | export * from "./movement-list"; 5 | export * from "./transfer"; 6 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/pages/movement-list/movement-list.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const MovementListPage: React.FC = () => { 4 | return
Movement List
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/03-login/config/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; 7 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login"; 2 | export * from "./account-list"; 3 | export * from "./account"; 4 | export * from "./movement-list"; 5 | export * from "./transfer"; 6 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/movement-list/movement-list.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const MovementListPage: React.FC = () => { 4 | return
Movement List
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/config/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; 7 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/account/account.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const AccountPage: React.FC = () => { 4 | return
Create/Edit Account
; 5 | }; 6 | -------------------------------------------------------------------------------- /07-testing/00-js-adivina/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | 3 | export default defineConfig({ 4 | test: { 5 | globals: true, 6 | restoreMocks: true, 7 | }, 8 | }); 9 | -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/captain-america-first-avenger.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/captain-america-first-avenger.webp -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/config/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; 7 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login"; 2 | export * from "./account-list"; 3 | export * from "./account"; 4 | export * from "./movement-list"; 5 | export * from "./transfer"; 6 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/movement-list/movement-list.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const MovementListPage: React.FC = () => { 4 | return
Movement List
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/account/account.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const AccountPage: React.FC = () => { 4 | return
Create/Edit Account
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/config/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; 7 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/movement-list/movement-list.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const MovementListPage: React.FC = () => { 4 | return
Movement List
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/config/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; 7 | -------------------------------------------------------------------------------- /10-async/03-server-peliculas/assets/movies/captain-america-winter-soldier.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lemoncode/bootcamp-js-2/main/10-async/03-server-peliculas/assets/movies/captain-america-winter-soldier.webp -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/config/test/jest.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rootDir: "../../", 3 | verbose: true, 4 | restoreMocks: true, 5 | moduleDirectories: ["/src", "node_modules"], 6 | }; 7 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login"; 2 | export * from "./account-list"; 3 | export * from "./account"; 4 | export * from "./movement-list"; 5 | export * from "./transfer"; 6 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login"; 2 | export * from "./account-list"; 3 | export * from "./account"; 4 | export * from "./movement-list"; 5 | export * from "./transfer"; 6 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/movement-list/movement-list.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const MovementListPage: React.FC = () => { 4 | return
Movement List
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/app.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Router } from "@/core/router"; 3 | 4 | import "./style.css"; 5 | 6 | export const App: React.FC = () => { 7 | return ; 8 | }; 9 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/app.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Router } from "@/core/router"; 3 | 4 | import "./style.css"; 5 | 6 | export const App: React.FC = () => { 7 | return ; 8 | }; 9 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/app.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Router } from "@/core/router"; 3 | 4 | import "./style.css"; 5 | 6 | export const App: React.FC = () => { 7 | return ; 8 | }; 9 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./login"; 2 | export * from "./account-list"; 3 | export * from "./account"; 4 | export * from "./movement-list"; 5 | export * from "./transfer"; 6 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/movement-list/movement-list.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const MovementListPage: React.FC = () => { 4 | return
Movement List
; 5 | }; 6 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/account-list/account-list.vm.ts: -------------------------------------------------------------------------------- 1 | export interface AccountVm { 2 | id: string; 3 | iban: string; 4 | name: string; 5 | balance: string; 6 | lastTransaction: Date; 7 | } 8 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/account-list/account-list.vm.ts: -------------------------------------------------------------------------------- 1 | export interface AccountVm { 2 | id: string; 3 | iban: string; 4 | name: string; 5 | balance: string; 6 | lastTransaction: Date; 7 | } 8 | -------------------------------------------------------------------------------- /10-async/00-bloqueo/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /10-async/01-depurando/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /12-react/01-enlazando/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /10-async/02-simular-event-loop/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /12-react/01-enlazando/src/index.jsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | import { App } from "./app"; 3 | 4 | import "./style.css"; 5 | 6 | const root = createRoot(document.getElementById("root")); 7 | 8 | root.render(); 9 | -------------------------------------------------------------------------------- /12-react/02-Componentizando/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/account-list/api/account-list.api-model.ts: -------------------------------------------------------------------------------- 1 | export interface Account { 2 | id: string; 3 | iban: string; 4 | type: string; 5 | name: string; 6 | balance: number; 7 | lastTransaction: string; 8 | } 9 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /12-react/02-Componentizando/src/index.jsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | import { App } from "./app"; 3 | 4 | import "./style.css"; 5 | 6 | const root = createRoot(document.getElementById("root")); 7 | 8 | root.render(); 9 | -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/src/index.jsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | import { App } from "./app"; 3 | 4 | import "./style.css"; 5 | 6 | const root = createRoot(document.getElementById("root")); 7 | 8 | root.render(); 9 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/dummy.spec.ts: -------------------------------------------------------------------------------- 1 | describe("dummy specs", () => { 2 | it("should pass spec", () => { 3 | // Arrange 4 | 5 | // Act 6 | 7 | // Assert 8 | expect(true).toBeTruthy(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/account-list/api/account-list.api-model.ts: -------------------------------------------------------------------------------- 1 | export interface Account { 2 | id: string; 3 | iban: string; 4 | type: string; 5 | name: string; 6 | balance: number; 7 | lastTransaction: string; 8 | } 9 | -------------------------------------------------------------------------------- /10-async/00-bloqueo/src/main.ts: -------------------------------------------------------------------------------- 1 | import "./style.css"; 2 | 3 | const btn = document.querySelector("button")!; 4 | 5 | btn.addEventListener("click", () => { 6 | for (let i = 0; i < 1000000000; i++) { 7 | console.log("Bloqueo"); 8 | } 9 | }); 10 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/common/validations/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./plain.validation"; 2 | export * from "./validation.const"; 3 | export * from "./validation.helper"; 4 | export * from "./validation.model"; 5 | export * from "./validation.const"; 6 | -------------------------------------------------------------------------------- /12-react/01-enlazando/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | export default defineConfig({ 5 | plugins: [react()], 6 | test: { 7 | globals: true, 8 | restoreMocks: true, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/common/validations/validation.model.ts: -------------------------------------------------------------------------------- 1 | export interface FieldValidationResult { 2 | succeeded: boolean; 3 | errorMessage?: string; 4 | } 5 | 6 | export interface FormValidationResult { 7 | succeeded: boolean; 8 | errors: T; 9 | } 10 | -------------------------------------------------------------------------------- /12-react/02-Componentizando/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | export default defineConfig({ 5 | plugins: [react()], 6 | test: { 7 | globals: true, 8 | restoreMocks: true, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | export default defineConfig({ 5 | plugins: [react()], 6 | test: { 7 | globals: true, 8 | restoreMocks: true, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /07-testing/01-ts-adivina/src/shell.ts: -------------------------------------------------------------------------------- 1 | import { handleCompruebaClick, iniciarPartida } from "./ui"; 2 | 3 | document.addEventListener("DOMContentLoaded", iniciarPartida); 4 | 5 | const botonComprobar = document.getElementById("comprobar"); 6 | botonComprobar?.addEventListener("click", handleCompruebaClick); 7 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/transfer/transfer.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { AppLayout } from "@/layouts"; 3 | 4 | export const TransferPage: React.FC = () => { 5 | return ( 6 | 7 |
Transfer
8 |
9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/transfer/transfer.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { AppLayout } from "@/layouts"; 3 | 4 | export const TransferPage: React.FC = () => { 5 | return ( 6 | 7 |
Transfer
8 |
9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/layouts/app/components/footer.component.module.css: -------------------------------------------------------------------------------- 1 | .footer { 2 | display: flex; 3 | background: #232c3b; 4 | align-items: center; 5 | justify-content: center; 6 | padding: 5em; 7 | margin-top: 100px; 8 | } 9 | 10 | .footer_logo { 11 | width: 200px; 12 | } 13 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/layouts/app/components/footer.component.module.css: -------------------------------------------------------------------------------- 1 | .footer { 2 | display: flex; 3 | background: #232c3b; 4 | align-items: center; 5 | justify-content: center; 6 | padding: 5em; 7 | margin-top: 100px; 8 | } 9 | 10 | .footer_logo { 11 | width: 200px; 12 | } 13 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/layouts/app/components/footer.component.module.css: -------------------------------------------------------------------------------- 1 | .footer { 2 | display: flex; 3 | background: #232c3b; 4 | align-items: center; 5 | justify-content: center; 6 | padding: 5em; 7 | margin-top: 100px; 8 | } 9 | 10 | .footer_logo { 11 | width: 200px; 12 | } 13 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/core/router/routes.ts: -------------------------------------------------------------------------------- 1 | export const appRoutes = { 2 | root: "/", 3 | accountList: "/account-list", 4 | createAccount: "/create-account", 5 | editAccount: "/edit-account/:id", 6 | movements: "/movements/:id", 7 | transfer: "/transfer", 8 | transferFromAccount: "/transfer/:id", 9 | }; 10 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/core/router/routes.ts: -------------------------------------------------------------------------------- 1 | export const appRoutes = { 2 | root: "/", 3 | accountList: "/account-list", 4 | createAccount: "/create-account", 5 | editAccount: "/edit-account/:id", 6 | movements: "/movements/:id", 7 | transfer: "/transfer", 8 | transferFromAccount: "/transfer/:id", 9 | }; 10 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/core/router/routes.ts: -------------------------------------------------------------------------------- 1 | export const appRoutes = { 2 | root: "/", 3 | accountList: "/account-list", 4 | createAccount: "/create-account", 5 | editAccount: "/edit-account/:id", 6 | movements: "/movements/:id", 7 | transfer: "/transfer", 8 | transferFromAccount: "/transfer/:id", 9 | }; 10 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/transfer/transfer.page.module.css: -------------------------------------------------------------------------------- 1 | .container { 2 | max-width: 1200px; 3 | margin: 0 auto; 4 | padding: 10px; 5 | } 6 | 7 | .title { 8 | font-weight: 300; 9 | font-size: 2.2rem; 10 | border-bottom: 5px solid #232c3b; 11 | padding-bottom: 5px; 12 | margin-bottom: 5px; 13 | } 14 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/login/login.mapper.ts: -------------------------------------------------------------------------------- 1 | import * as apiModel from "./api"; 2 | import * as viewModel from "./login.vm"; 3 | 4 | export const mapCredentialFromVmToApi = ( 5 | credential: viewModel.Credentials 6 | ): apiModel.Credentials => ({ 7 | user: credential.user, 8 | password: credential.password, 9 | }); 10 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/login/login.mapper.ts: -------------------------------------------------------------------------------- 1 | import * as apiModel from "./api"; 2 | import * as viewModel from "./login.vm"; 3 | 4 | export const mapCredentialFromVmToApi = ( 5 | credential: viewModel.Credentials 6 | ): apiModel.Credentials => ({ 7 | user: credential.user, 8 | password: credential.password, 9 | }); 10 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/login/login.mapper.ts: -------------------------------------------------------------------------------- 1 | import * as apiModel from "./api"; 2 | import * as viewModel from "./login.vm"; 3 | 4 | export const mapCredentialFromVmToApi = ( 5 | credential: viewModel.Credentials 6 | ): apiModel.Credentials => ({ 7 | user: credential.user, 8 | password: credential.password, 9 | }); 10 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/login/login.mapper.ts: -------------------------------------------------------------------------------- 1 | import * as apiModel from "./api"; 2 | import * as viewModel from "./login.vm"; 3 | 4 | export const mapCredentialFromVmToApi = ( 5 | credential: viewModel.Credentials 6 | ): apiModel.Credentials => ({ 7 | user: credential.user, 8 | password: credential.password, 9 | }); 10 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/login/login.mapper.ts: -------------------------------------------------------------------------------- 1 | import * as apiModel from "./api"; 2 | import * as viewModel from "./login.vm"; 3 | 4 | export const mapCredentialFromVmToApi = ( 5 | credential: viewModel.Credentials 6 | ): apiModel.Credentials => ({ 7 | user: credential.user, 8 | password: credential.password, 9 | }); 10 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/account-list/api/account-list.api.ts: -------------------------------------------------------------------------------- 1 | import Axios from "axios"; 2 | import { Account } from "./account-list.api-model"; 3 | 4 | const url = `${import.meta.env.VITE_BASE_API_URL}/account-list`; 5 | 6 | export const getAccountList = (): Promise => 7 | Axios.get(url).then(({ data }) => data); 8 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/account-list/api/account-list.api.ts: -------------------------------------------------------------------------------- 1 | import Axios from "axios"; 2 | import { Account } from "./account-list.api-model"; 3 | 4 | const url = `${import.meta.env.VITE_BASE_API_URL}/account-list`; 5 | 6 | export const getAccountList = (): Promise => 7 | Axios.get(url).then(({ data }) => data); 8 | -------------------------------------------------------------------------------- /10-async/04-banco-camas-1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo-server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "json-server --watch db.json --port 3000" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "json-server": "^0.17.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /10-async/05-banco-camas-2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo-server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "json-server --watch db.json --port 3001" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "json-server": "^0.17.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/login/api/login.api.ts: -------------------------------------------------------------------------------- 1 | import Axios from "axios"; 2 | import { Credentials } from "./login.api-model"; 3 | 4 | const url = `${import.meta.env.VITE_BASE_API_URL}/login`; 5 | 6 | export const isValidLogin = async (credential: Credentials): Promise => 7 | Axios.post(url, credential).then(({ data }) => data); 8 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/app.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Router } from "@/core/router"; 3 | import { ProfileProvider } from "@/core/profile"; 4 | 5 | import "./style.css"; 6 | 7 | export const App: React.FC = () => { 8 | return ( 9 | 10 | 11 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /10-async/03-server-peliculas/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo-server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "json-server --watch db.json --port 3000" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "json-server": "^0.17.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/login/api/login.api.ts: -------------------------------------------------------------------------------- 1 | import Axios from "axios"; 2 | import { Credentials } from "./login.api-model"; 3 | 4 | const url = `${import.meta.env.VITE_BASE_API_URL}/login`; 5 | 6 | export const isValidLogin = async (credential: Credentials): Promise => 7 | Axios.post(url, credential).then(({ data }) => data); 8 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/login/api/login.api.ts: -------------------------------------------------------------------------------- 1 | import Axios from "axios"; 2 | import { Credentials } from "./login.api-model"; 3 | 4 | const url = `${import.meta.env.VITE_BASE_API_URL}/login`; 5 | 6 | export const isValidLogin = async (credential: Credentials): Promise => 7 | Axios.post(url, credential).then(({ data }) => data); 8 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/app.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Router } from "@/core/router"; 3 | import { ProfileProvider } from "@/core/profile"; 4 | 5 | import "./style.css"; 6 | 7 | export const App: React.FC = () => { 8 | return ( 9 | 10 | 11 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/app.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Router } from "@/core/router"; 3 | import { ProfileProvider } from "@/core/profile"; 4 | 5 | import "./style.css"; 6 | 7 | export const App: React.FC = () => { 8 | return ( 9 | 10 | 11 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/login/api/login.api.ts: -------------------------------------------------------------------------------- 1 | import Axios from "axios"; 2 | import { Credentials } from "./login.api-model"; 3 | 4 | const url = `${import.meta.env.VITE_BASE_API_URL}/login`; 5 | 6 | export const isValidLogin = async (credential: Credentials): Promise => 7 | Axios.post(url, credential).then(({ data }) => data); 8 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/login/api/login.api.ts: -------------------------------------------------------------------------------- 1 | import Axios from "axios"; 2 | import { Credentials } from "./login.api-model"; 3 | 4 | const url = `${import.meta.env.VITE_BASE_API_URL}/login`; 5 | 6 | export const isValidLogin = async (credential: Credentials): Promise => 7 | Axios.post(url, credential).then(({ data }) => data); 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/pages/login/login.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link } from "react-router-dom"; 3 | import { appRoutes } from "@/core/router"; 4 | 5 | export const LoginPage: React.FC = () => { 6 | return ( 7 |
8 | Login 9 |
10 | Mis cuentas 11 |
12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /10-async/00-bloqueo/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /10-async/01-depurando/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /12-react/01-enlazando/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /07-testing/00-js-adivina/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /07-testing/01-ts-adivina/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /12-react/02-Componentizando/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /13-banca-online/03-login/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /10-async/02-simular-event-loop/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /10-async/06-lab-asincronia/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "06-lab-asincronia", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "json-server --watch db.json", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "json-server": "^0.17.3" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/src/bienvenida.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { ProfileContext } from "./app"; 3 | 4 | export const Bienvenida = () => { 5 | const { usuario } = React.useContext(ProfileContext); 6 | 7 | return ( 8 |
9 |

Bienvenido

10 |

11 | Tu nombre de usuario es: {usuario} 12 |

13 |
14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/index.tsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | import { App } from "./app"; 3 | 4 | import "./style.css"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | 8 | if (rootElement && rootElement instanceof HTMLDivElement) { 9 | const root = createRoot(rootElement); 10 | root.render(); 11 | } else { 12 | throw new Error("Root element not found"); 13 | } 14 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/index.tsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | import { App } from "./app"; 3 | 4 | import "./style.css"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | 8 | if (rootElement && rootElement instanceof HTMLDivElement) { 9 | const root = createRoot(rootElement); 10 | root.render(); 11 | } else { 12 | throw new Error("Root element not found"); 13 | } 14 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/server/src/login.middleware.js: -------------------------------------------------------------------------------- 1 | const isValidLogin = (req, res, next) => { 2 | const { user, password } = req.body; 3 | const isValid = user === 'admin@email.com' && password === 'test'; 4 | res.status(200).json(isValid); 5 | }; 6 | 7 | module.exports = (req, res, next) => { 8 | if (req.path === '/login') { 9 | isValidLogin(req, res, next); 10 | } else { 11 | next(); 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /13-banca-online/03-login/server/src/login.middleware.js: -------------------------------------------------------------------------------- 1 | const isValidLogin = (req, res, next) => { 2 | const { user, password } = req.body; 3 | const isValid = user === 'admin@email.com' && password === 'test'; 4 | res.status(200).json(isValid); 5 | }; 6 | 7 | module.exports = (req, res, next) => { 8 | if (req.path === '/login') { 9 | isValidLogin(req, res, next); 10 | } else { 11 | next(); 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/index.tsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | import { App } from "./app"; 3 | 4 | import "./style.css"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | 8 | if (rootElement && rootElement instanceof HTMLDivElement) { 9 | const root = createRoot(rootElement); 10 | root.render(); 11 | } else { 12 | throw new Error("Root element not found"); 13 | } 14 | -------------------------------------------------------------------------------- /07-testing/00-js-adivina/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "test": "vitest", 11 | "coverage": "vitest run --coverage" 12 | }, 13 | "devDependencies": { 14 | "vite": "^4.1.0", 15 | "vitest": "^0.29.8" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/src/index.tsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | import { App } from "./app"; 3 | 4 | import "./style.css"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | 8 | if (rootElement && rootElement instanceof HTMLDivElement) { 9 | const root = createRoot(rootElement); 10 | root.render(); 11 | } else { 12 | throw new Error("Root element not found"); 13 | } 14 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/server/src/login.middleware.js: -------------------------------------------------------------------------------- 1 | const isValidLogin = (req, res, next) => { 2 | const { user, password } = req.body; 3 | const isValid = user === 'admin@email.com' && password === 'test'; 4 | res.status(200).json(isValid); 5 | }; 6 | 7 | module.exports = (req, res, next) => { 8 | if (req.path === '/login') { 9 | isValidLogin(req, res, next); 10 | } else { 11 | next(); 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/index.tsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | import { App } from "./app"; 3 | 4 | import "./style.css"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | 8 | if (rootElement && rootElement instanceof HTMLDivElement) { 9 | const root = createRoot(rootElement); 10 | root.render(); 11 | } else { 12 | throw new Error("Root element not found"); 13 | } 14 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/index.tsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | import { App } from "./app"; 3 | 4 | import "./style.css"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | 8 | if (rootElement && rootElement instanceof HTMLDivElement) { 9 | const root = createRoot(rootElement); 10 | root.render(); 11 | } else { 12 | throw new Error("Root element not found"); 13 | } 14 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/server/src/login.middleware.js: -------------------------------------------------------------------------------- 1 | const isValidLogin = (req, res, next) => { 2 | const { user, password } = req.body; 3 | const isValid = user === 'admin@email.com' && password === 'test'; 4 | res.status(200).json(isValid); 5 | }; 6 | 7 | module.exports = (req, res, next) => { 8 | if (req.path === '/login') { 9 | isValidLogin(req, res, next); 10 | } else { 11 | next(); 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/index.tsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from "react-dom/client"; 2 | import { App } from "./app"; 3 | 4 | import "./style.css"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | 8 | if (rootElement && rootElement instanceof HTMLDivElement) { 9 | const root = createRoot(rootElement); 10 | root.render(); 11 | } else { 12 | throw new Error("Root element not found"); 13 | } 14 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/server/src/login.middleware.js: -------------------------------------------------------------------------------- 1 | const isValidLogin = (req, res, next) => { 2 | const { user, password } = req.body; 3 | const isValid = user === 'admin@email.com' && password === 'test'; 4 | res.status(200).json(isValid); 5 | }; 6 | 7 | module.exports = (req, res, next) => { 8 | if (req.path === '/login') { 9 | isValidLogin(req, res, next); 10 | } else { 11 | next(); 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/layouts/app/components/footer.component.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import logoFooter from "/assets/logo_footer.svg"; 3 | import classes from "./footer.component.module.css"; 4 | 5 | export const FooterComponent: React.FC = () => { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/server/src/login.middleware.js: -------------------------------------------------------------------------------- 1 | const isValidLogin = (req, res, next) => { 2 | const { user, password } = req.body; 3 | const isValid = user === 'admin@email.com' && password === 'test'; 4 | res.status(200).json(isValid); 5 | }; 6 | 7 | module.exports = (req, res, next) => { 8 | if (req.path === '/login') { 9 | isValidLogin(req, res, next); 10 | } else { 11 | next(); 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/layouts/app/components/footer.component.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import logoFooter from "/assets/logo_footer.svg"; 3 | import classes from "./footer.component.module.css"; 4 | 5 | export const FooterComponent: React.FC = () => { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /12-react/01-enlazando/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/server/src/login.middleware.js: -------------------------------------------------------------------------------- 1 | const isValidLogin = (req, res, next) => { 2 | const { user, password } = req.body; 3 | const isValid = user === 'admin@email.com' && password === 'test'; 4 | res.status(200).json(isValid); 5 | }; 6 | 7 | module.exports = (req, res, next) => { 8 | if (req.path === '/login') { 9 | isValidLogin(req, res, next); 10 | } else { 11 | next(); 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/layouts/app/components/footer.component.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import logoFooter from "/assets/logo_footer.svg"; 3 | import classes from "./footer.component.module.css"; 4 | 5 | export const FooterComponent: React.FC = () => { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /12-react/02-Componentizando/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Banca Online 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /13-banca-online/03-login/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Banca Online 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Banca Online 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Banca Online 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Banca Online 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Banca Online 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /10-async/02-simular-event-loop/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "test": "vitest", 11 | "coverage": "vitest run --coverage" 12 | }, 13 | "devDependencies": { 14 | "jest": "^29.5.0", 15 | "vite": "^4.1.0", 16 | "vitest": "^0.29.8" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Banca Online 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/common/validations/validation.const.ts: -------------------------------------------------------------------------------- 1 | export const REQUIRED_FIELD_MESSAGE = "Debe informar el campo"; 2 | export const INVALID_IBAN_MESSAGE = "El IBAN no está bien formado"; 3 | export const INVALID_AMOUNT_MESSAGE = "El importe debe ser mayor que 0"; 4 | export const INVALID_REAL_DATE_TRANSFER_MESSAGE = 5 | "La fecha de ejecución debe ser posterior a la actual"; 6 | export const INVALID_EMAIL_MESSAGE = "El email no está bien formado"; 7 | -------------------------------------------------------------------------------- /10-async/00-bloqueo/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import checker from "vite-plugin-checker"; 3 | import type { UserConfig as VitestUserConfigInterface } from "vitest/config"; 4 | 5 | const vitestConfig: VitestUserConfigInterface = { 6 | test: { 7 | globals: true, 8 | restoreMocks: true, 9 | }, 10 | }; 11 | 12 | export default defineConfig({ 13 | plugins: [checker({ typescript: true })], 14 | test: vitestConfig.test, 15 | }); 16 | -------------------------------------------------------------------------------- /10-async/01-depurando/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import checker from "vite-plugin-checker"; 3 | import type { UserConfig as VitestUserConfigInterface } from "vitest/config"; 4 | 5 | const vitestConfig: VitestUserConfigInterface = { 6 | test: { 7 | globals: true, 8 | restoreMocks: true, 9 | }, 10 | }; 11 | 12 | export default defineConfig({ 13 | plugins: [checker({ typescript: true })], 14 | test: vitestConfig.test, 15 | }); 16 | -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/src/routes.jsx: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Routes, Route } from "react-router-dom"; 2 | import { Login } from "./login"; 3 | import { Bienvenida } from "./bienvenida"; 4 | 5 | export const Router = () => { 6 | return ( 7 | 8 | 9 | } /> 10 | } /> 11 | 12 | 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /07-testing/01-ts-adivina/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import checker from "vite-plugin-checker"; 3 | import type { UserConfig as VitestUserConfigInterface } from "vitest/config"; 4 | 5 | const vitestConfig: VitestUserConfigInterface = { 6 | test: { 7 | globals: true, 8 | restoreMocks: true, 9 | }, 10 | }; 11 | 12 | export default defineConfig({ 13 | plugins: [checker({ typescript: true })], 14 | test: vitestConfig.test, 15 | }); 16 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/account-list/account-list.page.module.css: -------------------------------------------------------------------------------- 1 | .root { 2 | max-width: 1200px; 3 | margin: 0 auto; 4 | padding: 5px; 5 | } 6 | 7 | .header-container { 8 | display: flex; 9 | justify-content: space-between; 10 | align-items: center; 11 | padding-bottom: 15px; 12 | margin-bottom: 15px; 13 | border-bottom: 5px solid #232c3b; 14 | } 15 | 16 | .header-container h1 { 17 | font-size: 2.2rem; 18 | font-weight: 300; 19 | } 20 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/account-list/account-list.page.module.css: -------------------------------------------------------------------------------- 1 | .root { 2 | max-width: 1200px; 3 | margin: 0 auto; 4 | padding: 5px; 5 | } 6 | 7 | .header-container { 8 | display: flex; 9 | justify-content: space-between; 10 | align-items: center; 11 | padding-bottom: 15px; 12 | margin-bottom: 15px; 13 | border-bottom: 5px solid #232c3b; 14 | } 15 | 16 | .header-container h1 { 17 | font-size: 2.2rem; 18 | font-weight: 300; 19 | } 20 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/login/login.vm.ts: -------------------------------------------------------------------------------- 1 | export interface Credentials { 2 | user: string; 3 | password: string; 4 | } 5 | 6 | export const createEmptyCredentials = (): Credentials => ({ 7 | user: "", 8 | password: "", 9 | }); 10 | 11 | export interface CredentialsformErrors { 12 | user: string; 13 | password: string; 14 | } 15 | 16 | export const createEmptyCredentialsformErrors = (): CredentialsformErrors => ({ 17 | user: "", 18 | password: "", 19 | }); 20 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/core/router/routes.ts: -------------------------------------------------------------------------------- 1 | export const routesPrefixes = { 2 | accountList: "/account-list", 3 | transfer: "/transfer", 4 | }; 5 | 6 | export const appRoutes = { 7 | root: "/", 8 | accountList: routesPrefixes.accountList, 9 | createAccount: "/create-account", 10 | editAccount: "/edit-account/:id", 11 | movements: "/movements/:id", 12 | transfer: routesPrefixes.transfer, 13 | transferFromAccount: `${routesPrefixes.transfer}/:id`, 14 | }; 15 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/transfer/api/transfer.api-model.ts: -------------------------------------------------------------------------------- 1 | export interface Account { 2 | id: string; 3 | iban: string; 4 | type: string; 5 | name: string; 6 | balance: number; 7 | lastTransaction: string; 8 | } 9 | 10 | export interface Transfer { 11 | accountId: string; 12 | iban: string; 13 | name: string; 14 | amount: number; 15 | concept: string; 16 | notes: string; 17 | transferDate: string; 18 | realTransferDate: string; 19 | } 20 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/login/login.vm.ts: -------------------------------------------------------------------------------- 1 | export interface Credentials { 2 | user: string; 3 | password: string; 4 | } 5 | 6 | export const createEmptyCredentials = (): Credentials => ({ 7 | user: "", 8 | password: "", 9 | }); 10 | 11 | export interface CredentialsformErrors { 12 | user: string; 13 | password: string; 14 | } 15 | 16 | export const createEmptyCredentialsformErrors = (): CredentialsformErrors => ({ 17 | user: "", 18 | password: "", 19 | }); 20 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/core/router/routes.ts: -------------------------------------------------------------------------------- 1 | export const routesPrefixes = { 2 | accountList: "/account-list", 3 | transfer: "/transfer", 4 | }; 5 | 6 | export const appRoutes = { 7 | root: "/", 8 | accountList: routesPrefixes.accountList, 9 | createAccount: "/create-account", 10 | editAccount: "/edit-account/:id", 11 | movements: "/movements/:id", 12 | transfer: routesPrefixes.transfer, 13 | transferFromAccount: `${routesPrefixes.transfer}/:id`, 14 | }; 15 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/core/router/routes.ts: -------------------------------------------------------------------------------- 1 | export const routesPrefixes = { 2 | accountList: "/account-list", 3 | transfer: "/transfer", 4 | }; 5 | 6 | export const appRoutes = { 7 | root: "/", 8 | accountList: routesPrefixes.accountList, 9 | createAccount: "/create-account", 10 | editAccount: "/edit-account/:id", 11 | movements: "/movements/:id", 12 | transfer: routesPrefixes.transfer, 13 | transferFromAccount: `${routesPrefixes.transfer}/:id`, 14 | }; 15 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/login/login.vm.ts: -------------------------------------------------------------------------------- 1 | export interface Credentials { 2 | user: string; 3 | password: string; 4 | } 5 | 6 | export const createEmptyCredentials = (): Credentials => ({ 7 | user: "", 8 | password: "", 9 | }); 10 | 11 | export interface CredentialsformErrors { 12 | user: string; 13 | password: string; 14 | } 15 | 16 | export const createEmptyCredentialsformErrors = (): CredentialsformErrors => ({ 17 | user: "", 18 | password: "", 19 | }); 20 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/login/login.vm.ts: -------------------------------------------------------------------------------- 1 | export interface Credentials { 2 | user: string; 3 | password: string; 4 | } 5 | 6 | export const createEmptyCredentials = (): Credentials => ({ 7 | user: "", 8 | password: "", 9 | }); 10 | 11 | export interface CredentialsformErrors { 12 | user: string; 13 | password: string; 14 | } 15 | 16 | export const createEmptyCredentialsformErrors = (): CredentialsformErrors => ({ 17 | user: "", 18 | password: "", 19 | }); 20 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "json-server --routes ./config/routes.json --middlewares ./src/login.middleware.js ./src/account.middleware.js --watch ./src/data.json" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "faker": "^4.1.0", 14 | "json-server": "^0.17.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /13-banca-online/03-login/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "json-server --routes ./config/routes.json --middlewares ./src/login.middleware.js ./src/account.middleware.js --watch ./src/data.json" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "faker": "^4.1.0", 14 | "json-server": "^0.17.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/login/login.vm.ts: -------------------------------------------------------------------------------- 1 | export interface Credentials { 2 | user: string; 3 | password: string; 4 | } 5 | 6 | export const createEmptyCredentials = (): Credentials => ({ 7 | user: "", 8 | password: "", 9 | }); 10 | 11 | export interface CredentialsformErrors { 12 | user: string; 13 | password: string; 14 | } 15 | 16 | export const createEmptyCredentialsformErrors = (): CredentialsformErrors => ({ 17 | user: "", 18 | password: "", 19 | }); 20 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "json-server --routes ./config/routes.json --middlewares ./src/login.middleware.js ./src/account.middleware.js --watch ./src/data.json" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "faker": "^4.1.0", 14 | "json-server": "^0.17.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "json-server --routes ./config/routes.json --middlewares ./src/login.middleware.js ./src/account.middleware.js --watch ./src/data.json" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "faker": "^4.1.0", 14 | "json-server": "^0.17.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "json-server --routes ./config/routes.json --middlewares ./src/login.middleware.js ./src/account.middleware.js --watch ./src/data.json" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "faker": "^4.1.0", 14 | "json-server": "^0.17.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /00-git/00-boilerplate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "00-boilerplate", 3 | "version": "1.0.0", 4 | "description": "", 5 | "scripts": { 6 | "build": "rimraf dist && parcel ./src/index.html", 7 | "build:prod": "rimraf dist && parcel build ./src/index.html", 8 | "start": "rimraf dist && parcel ./src/index.html --open" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "devDependencies": { 14 | "parcel": "^2.8.3", 15 | "rimraf": "^4.1.2" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /10-async/02-simular-event-loop/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 |

Bootcamp JS - JavaScript SandBox

12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "json-server --routes ./config/routes.json --middlewares ./src/login.middleware.js ./src/account.middleware.js --watch ./src/data.json" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "faker": "^4.1.0", 14 | "json-server": "^0.17.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "json-server --routes ./config/routes.json --middlewares ./src/login.middleware.js ./src/account.middleware.js --watch ./src/data.json" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "faker": "^4.1.0", 14 | "json-server": "^0.17.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/login/components/login-form.component.module.css: -------------------------------------------------------------------------------- 1 | .form { 2 | display: flex; 3 | flex-direction: column; 4 | flex-wrap: wrap; 5 | gap: 15px; 6 | } 7 | 8 | .error { 9 | color: var(--error_color); 10 | font-size: 0.9em; 11 | } 12 | 13 | .input-error { 14 | box-shadow: unset; 15 | border-color: #f44336; 16 | } 17 | 18 | .btn-enviar { 19 | width: 25%; 20 | } 21 | 22 | @media screen and (max-width: 500px) { 23 | .btn-enviar { 24 | width: 100%; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/login/components/login-form.component.module.css: -------------------------------------------------------------------------------- 1 | .form { 2 | display: flex; 3 | flex-direction: column; 4 | flex-wrap: wrap; 5 | gap: 15px; 6 | } 7 | 8 | .error { 9 | color: var(--error_color); 10 | font-size: 0.9em; 11 | } 12 | 13 | .input-error { 14 | box-shadow: unset; 15 | border-color: #f44336; 16 | } 17 | 18 | .btn-enviar { 19 | width: 25%; 20 | } 21 | 22 | @media screen and (max-width: 500px) { 23 | .btn-enviar { 24 | width: 100%; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/login/components/login-form.component.module.css: -------------------------------------------------------------------------------- 1 | .form { 2 | display: flex; 3 | flex-direction: column; 4 | flex-wrap: wrap; 5 | gap: 15px; 6 | } 7 | 8 | .error { 9 | color: var(--error_color); 10 | font-size: 0.9em; 11 | } 12 | 13 | .input-error { 14 | box-shadow: unset; 15 | border-color: #f44336; 16 | } 17 | 18 | .btn-enviar { 19 | width: 25%; 20 | } 21 | 22 | @media screen and (max-width: 500px) { 23 | .btn-enviar { 24 | width: 100%; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/login/components/login-form.component.module.css: -------------------------------------------------------------------------------- 1 | .form { 2 | display: flex; 3 | flex-direction: column; 4 | flex-wrap: wrap; 5 | gap: 15px; 6 | } 7 | 8 | .error { 9 | color: var(--error_color); 10 | font-size: 0.9em; 11 | } 12 | 13 | .input-error { 14 | box-shadow: unset; 15 | border-color: #f44336; 16 | } 17 | 18 | .btn-enviar { 19 | width: 25%; 20 | } 21 | 22 | @media screen and (max-width: 500px) { 23 | .btn-enviar { 24 | width: 100%; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /07-testing/01-ts-adivina/src/modelo.ts: -------------------------------------------------------------------------------- 1 | interface Partida { 2 | numeroDeIntentos: number; 3 | numeroParaAcertar: number; 4 | } 5 | 6 | export const partida: Partida = { 7 | numeroDeIntentos: 0, 8 | numeroParaAcertar: 0, // TODO: inicializar esto en el motor cuando arranque la partida 9 | }; 10 | 11 | export type Estado = 12 | | "NO_ES_UN_NUMERO" 13 | | "EL_NUMERO_ES_MAYOR" 14 | | "EL_NUMERO_ES_MENOR" 15 | | "ES_EL_NUMERO_SECRETO" 16 | | "GAME_OVER_MAXIMO_INTENTOS"; 17 | 18 | export const MAXIMO_INTENTOS: number = 5; 19 | -------------------------------------------------------------------------------- /10-async/00-bloqueo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview", 10 | "test": "vitest", 11 | "coverage": "vitest run --coverage" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.5.0", 15 | "typescript": "^4.9.3", 16 | "vite": "^4.1.0", 17 | "vite-plugin-checker": "^0.5.6", 18 | "vitest": "^0.29.8" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /10-async/01-depurando/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview", 10 | "test": "vitest", 11 | "coverage": "vitest run --coverage" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.5.0", 15 | "typescript": "^4.9.3", 16 | "vite": "^4.1.0", 17 | "vite-plugin-checker": "^0.5.6", 18 | "vitest": "^0.29.8" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /07-testing/01-ts-adivina/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview", 10 | "test": "vitest", 11 | "coverage": "vitest run --coverage" 12 | }, 13 | "devDependencies": { 14 | "@types/jest": "^29.5.0", 15 | "typescript": "^4.9.3", 16 | "vite": "^4.1.0", 17 | "vite-plugin-checker": "^0.5.6", 18 | "vitest": "^0.29.8" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /10-async/00-bloqueo/README.md: -------------------------------------------------------------------------------- 1 | # typescript-sandbox 2 | 3 | Para la parte de cada módulo en la que te planteamos ejercicios con JavaScript puedes usar este sandbox. 4 | 5 | Pasos: 6 | 7 | - Clonate el proyecto. 8 | - Instala las dependencias con `npm install`. 9 | - Ejecuta el sandbox con `npm run dev`. 10 | - Abre el navegador en `http://localhost:5173/` (si ese puerto no te funciona, mira en la consola donde has hecho el build, puede que este ocupado y se haya abierto en otro puerto). 11 | - Puedes empezar a meter tu código en el fichero: 12 | -------------------------------------------------------------------------------- /10-async/01-depurando/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + TS 8 | 9 | 10 |
11 |

TypeScript Sandbox

12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/layouts/app/components/navbar.component.module.css: -------------------------------------------------------------------------------- 1 | .navbar { 2 | background: var(--secondary_color); 3 | margin-bottom: 25px; 4 | } 5 | 6 | .list { 7 | display: flex; 8 | justify-content: center; 9 | align-items: center; 10 | color: #ffffff; 11 | padding: 10px; 12 | gap: 40px; 13 | } 14 | 15 | .list a { 16 | color: #ffffff; 17 | text-decoration: none; 18 | } 19 | 20 | .selected { 21 | border-bottom: 5px solid #22c6cb; 22 | padding-bottom: 5px; 23 | margin-bottom: -10px; 24 | } 25 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/account-list/account-list.mapper.ts: -------------------------------------------------------------------------------- 1 | import * as apiModel from "./api/account-list.api-model"; 2 | import * as viewModel from "./account-list.vm"; 3 | 4 | export const mapAccountListFromApiToVm = ( 5 | accountList: apiModel.Account[] 6 | ): viewModel.AccountVm[] => 7 | accountList.map((account) => ({ 8 | id: account.id, 9 | iban: account.iban, 10 | name: account.name, 11 | balance: account.balance.toString(), 12 | lastTransaction: new Date(account.lastTransaction), 13 | })); 14 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/layouts/app/components/navbar.component.module.css: -------------------------------------------------------------------------------- 1 | .navbar { 2 | background: var(--secondary_color); 3 | margin-bottom: 25px; 4 | } 5 | 6 | .list { 7 | display: flex; 8 | justify-content: center; 9 | align-items: center; 10 | color: #ffffff; 11 | padding: 10px; 12 | gap: 40px; 13 | } 14 | 15 | .list a { 16 | color: #ffffff; 17 | text-decoration: none; 18 | } 19 | 20 | .selected { 21 | border-bottom: 5px solid #22c6cb; 22 | padding-bottom: 5px; 23 | margin-bottom: -10px; 24 | } 25 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/account-list/account-list.mapper.ts: -------------------------------------------------------------------------------- 1 | import * as apiModel from "./api/account-list.api-model"; 2 | import * as viewModel from "./account-list.vm"; 3 | 4 | export const mapAccountListFromApiToVm = ( 5 | accountList: apiModel.Account[] 6 | ): viewModel.AccountVm[] => 7 | accountList.map((account) => ({ 8 | id: account.id, 9 | iban: account.iban, 10 | name: account.name, 11 | balance: account.balance.toString(), 12 | lastTransaction: new Date(account.lastTransaction), 13 | })); 14 | -------------------------------------------------------------------------------- /07-testing/00-js-adivina/README.md: -------------------------------------------------------------------------------- 1 | # javascript-sandbox 2 | 3 | Para la parte de cada módulo en la que te planteamos ejercicios con JavaScript puedes usar este sandbox. 4 | 5 | Pasos: 6 | 7 | - Clonate el proyecto. 8 | - Instala las dependencias con `npm install`. 9 | - Ejecuta el sandbox con `npm run dev`. 10 | - Abre el navegador en `http://localhost:5173/` (si ese puerto no te funciona, mira en la consola donde has hecho el build, puede que este ocupado y se haya abierto en otro puerto). 11 | - Puedes empezar a meter tu código en el fichero: 12 | -------------------------------------------------------------------------------- /07-testing/01-ts-adivina/README.md: -------------------------------------------------------------------------------- 1 | # typescript-sandbox 2 | 3 | Para la parte de cada módulo en la que te planteamos ejercicios con JavaScript puedes usar este sandbox. 4 | 5 | Pasos: 6 | 7 | - Clonate el proyecto. 8 | - Instala las dependencias con `npm install`. 9 | - Ejecuta el sandbox con `npm run dev`. 10 | - Abre el navegador en `http://localhost:5173/` (si ese puerto no te funciona, mira en la consola donde has hecho el build, puede que este ocupado y se haya abierto en otro puerto). 11 | - Puedes empezar a meter tu código en el fichero: 12 | -------------------------------------------------------------------------------- /10-async/01-depurando/README.md: -------------------------------------------------------------------------------- 1 | # typescript-sandbox 2 | 3 | Para la parte de cada módulo en la que te planteamos ejercicios con JavaScript puedes usar este sandbox. 4 | 5 | Pasos: 6 | 7 | - Clonate el proyecto. 8 | - Instala las dependencias con `npm install`. 9 | - Ejecuta el sandbox con `npm run dev`. 10 | - Abre el navegador en `http://localhost:5173/` (si ese puerto no te funciona, mira en la consola donde has hecho el build, puede que este ocupado y se haya abierto en otro puerto). 11 | - Puedes empezar a meter tu código en el fichero: 12 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/layouts/app/components/navbar.component.module.css: -------------------------------------------------------------------------------- 1 | .navbar { 2 | background: var(--secondary_color); 3 | margin-bottom: 25px; 4 | } 5 | 6 | .list { 7 | display: flex; 8 | justify-content: center; 9 | align-items: center; 10 | color: #ffffff; 11 | padding: 10px; 12 | gap: 40px; 13 | } 14 | 15 | .list a { 16 | color: #ffffff; 17 | text-decoration: none; 18 | } 19 | 20 | .selected { 21 | border-bottom: 5px solid #22c6cb; 22 | padding-bottom: 5px; 23 | margin-bottom: -10px; 24 | } 25 | -------------------------------------------------------------------------------- /10-async/02-simular-event-loop/README.md: -------------------------------------------------------------------------------- 1 | # javascript-sandbox 2 | 3 | Para la parte de cada módulo en la que te planteamos ejercicios con JavaScript puedes usar este sandbox. 4 | 5 | Pasos: 6 | 7 | - Clonate el proyecto. 8 | - Instala las dependencias con `npm install`. 9 | - Ejecuta el sandbox con `npm run dev`. 10 | - Abre el navegador en `http://localhost:5173/` (si ese puerto no te funciona, mira en la consola donde has hecho el build, puede que este ocupado y se haya abierto en otro puerto). 11 | - Puedes empezar a meter tu código en el fichero: 12 | -------------------------------------------------------------------------------- /10-async/00-bloqueo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "resolveJsonModule": true, 10 | "isolatedModules": false, 11 | "esModuleInterop": true, 12 | "noEmit": true, 13 | "noUnusedLocals": true, 14 | "noUnusedParameters": true, 15 | "noImplicitReturns": true, 16 | "skipLibCheck": true 17 | }, 18 | "include": ["src"] 19 | } 20 | -------------------------------------------------------------------------------- /10-async/01-depurando/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "resolveJsonModule": true, 10 | "isolatedModules": false, 11 | "esModuleInterop": true, 12 | "noEmit": true, 13 | "noUnusedLocals": true, 14 | "noUnusedParameters": true, 15 | "noImplicitReturns": true, 16 | "skipLibCheck": true 17 | }, 18 | "include": ["src"] 19 | } 20 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/account-list/components/account-list-table.component.module.css: -------------------------------------------------------------------------------- 1 | .grid-container { 2 | max-width: 100%; 3 | overflow-x: auto; 4 | } 5 | 6 | .header-table { 7 | display: grid; 8 | grid-template-columns: 30% 12% repeat(2, 17%) 1fr; 9 | gap: 1px; 10 | } 11 | 12 | .header-cell { 13 | padding: 10px; 14 | color: var(--table-header-color); 15 | background-color: var(--table-header-background-color); 16 | font-size: var(--table-header-font-size); 17 | font-weight: var(--table-header-font-weight); 18 | } 19 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/account-list/components/account-list-table.component.module.css: -------------------------------------------------------------------------------- 1 | .grid-container { 2 | max-width: 100%; 3 | overflow-x: auto; 4 | } 5 | 6 | .header-table { 7 | display: grid; 8 | grid-template-columns: 30% 12% repeat(2, 17%) 1fr; 9 | gap: 1px; 10 | } 11 | 12 | .header-cell { 13 | padding: 10px; 14 | color: var(--table-header-color); 15 | background-color: var(--table-header-background-color); 16 | font-size: var(--table-header-font-size); 17 | font-weight: var(--table-header-font-weight); 18 | } 19 | -------------------------------------------------------------------------------- /07-testing/01-ts-adivina/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "resolveJsonModule": true, 10 | "isolatedModules": false, 11 | "esModuleInterop": true, 12 | "noEmit": true, 13 | "noUnusedLocals": true, 14 | "noUnusedParameters": true, 15 | "noImplicitReturns": true, 16 | "skipLibCheck": true 17 | }, 18 | "include": ["src"] 19 | } 20 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/transfer/api/transfer.api.ts: -------------------------------------------------------------------------------- 1 | import Axios from "axios"; 2 | import { Account, Transfer } from "./transfer.api-model"; 3 | 4 | const urlAccount = `${import.meta.env.VITE_BASE_API_URL}/account-list`; 5 | 6 | export const getAccountList = (): Promise => 7 | Axios.get(urlAccount).then(({ data }) => data); 8 | 9 | const urlTransfer = `${import.meta.env.VITE_BASE_API_URL}/transfer`; 10 | 11 | export const saveTransfer = (transfer: Transfer): Promise => 12 | Axios.post(urlTransfer, transfer).then(({ data }) => data); 13 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/server/src/account.middleware.js: -------------------------------------------------------------------------------- 1 | const faker = require('faker'); 2 | 3 | const accountMiddleware = (req, res, next) => { 4 | if (req.method === 'POST') { 5 | req.body = { 6 | iban: faker.finance.iban(true), 7 | name: req.body.name, 8 | type: req.body.type, 9 | balance: 0, 10 | lastTransaction: new Date().toISOString(), 11 | }; 12 | } 13 | next(); 14 | }; 15 | 16 | module.exports = (req, res, next) => { 17 | if (req.path === '/account-list') { 18 | accountMiddleware(req, res, next); 19 | } else { 20 | next(); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /13-banca-online/03-login/server/src/account.middleware.js: -------------------------------------------------------------------------------- 1 | const faker = require('faker'); 2 | 3 | const accountMiddleware = (req, res, next) => { 4 | if (req.method === 'POST') { 5 | req.body = { 6 | iban: faker.finance.iban(true), 7 | name: req.body.name, 8 | type: req.body.type, 9 | balance: 0, 10 | lastTransaction: new Date().toISOString(), 11 | }; 12 | } 13 | next(); 14 | }; 15 | 16 | module.exports = (req, res, next) => { 17 | if (req.path === '/account-list') { 18 | accountMiddleware(req, res, next); 19 | } else { 20 | next(); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/server/src/account.middleware.js: -------------------------------------------------------------------------------- 1 | const faker = require('faker'); 2 | 3 | const accountMiddleware = (req, res, next) => { 4 | if (req.method === 'POST') { 5 | req.body = { 6 | iban: faker.finance.iban(true), 7 | name: req.body.name, 8 | type: req.body.type, 9 | balance: 0, 10 | lastTransaction: new Date().toISOString(), 11 | }; 12 | } 13 | next(); 14 | }; 15 | 16 | module.exports = (req, res, next) => { 17 | if (req.path === '/account-list') { 18 | accountMiddleware(req, res, next); 19 | } else { 20 | next(); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/server/src/account.middleware.js: -------------------------------------------------------------------------------- 1 | const faker = require('faker'); 2 | 3 | const accountMiddleware = (req, res, next) => { 4 | if (req.method === 'POST') { 5 | req.body = { 6 | iban: faker.finance.iban(true), 7 | name: req.body.name, 8 | type: req.body.type, 9 | balance: 0, 10 | lastTransaction: new Date().toISOString(), 11 | }; 12 | } 13 | next(); 14 | }; 15 | 16 | module.exports = (req, res, next) => { 17 | if (req.path === '/account-list') { 18 | accountMiddleware(req, res, next); 19 | } else { 20 | next(); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/server/src/account.middleware.js: -------------------------------------------------------------------------------- 1 | const faker = require('faker'); 2 | 3 | const accountMiddleware = (req, res, next) => { 4 | if (req.method === 'POST') { 5 | req.body = { 6 | iban: faker.finance.iban(true), 7 | name: req.body.name, 8 | type: req.body.type, 9 | balance: 0, 10 | lastTransaction: new Date().toISOString(), 11 | }; 12 | } 13 | next(); 14 | }; 15 | 16 | module.exports = (req, res, next) => { 17 | if (req.path === '/account-list') { 18 | accountMiddleware(req, res, next); 19 | } else { 20 | next(); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/server/src/account.middleware.js: -------------------------------------------------------------------------------- 1 | const faker = require('faker'); 2 | 3 | const accountMiddleware = (req, res, next) => { 4 | if (req.method === 'POST') { 5 | req.body = { 6 | iban: faker.finance.iban(true), 7 | name: req.body.name, 8 | type: req.body.type, 9 | balance: 0, 10 | lastTransaction: new Date().toISOString(), 11 | }; 12 | } 13 | next(); 14 | }; 15 | 16 | module.exports = (req, res, next) => { 17 | if (req.path === '/account-list') { 18 | accountMiddleware(req, res, next); 19 | } else { 20 | next(); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/server/src/account.middleware.js: -------------------------------------------------------------------------------- 1 | const faker = require('faker'); 2 | 3 | const accountMiddleware = (req, res, next) => { 4 | if (req.method === 'POST') { 5 | req.body = { 6 | iban: faker.finance.iban(true), 7 | name: req.body.name, 8 | type: req.body.type, 9 | balance: 0, 10 | lastTransaction: new Date().toISOString(), 11 | }; 12 | } 13 | next(); 14 | }; 15 | 16 | module.exports = (req, res, next) => { 17 | if (req.path === '/account-list') { 18 | accountMiddleware(req, res, next); 19 | } else { 20 | next(); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/common/validations/validation.helper.ts: -------------------------------------------------------------------------------- 1 | import { REQUIRED_FIELD_MESSAGE } from "./validation.const"; 2 | import { FieldValidationResult } from "./validation.model"; 3 | 4 | export const buildValidationFailedResult = ( 5 | errorMessage: string 6 | ): FieldValidationResult => ({ 7 | succeeded: false, 8 | errorMessage, 9 | }); 10 | 11 | export const buildValidationSucceededResult = () => ({ 12 | succeeded: true, 13 | }); 14 | 15 | export const buildRequiredFieldValidationFailedResponse = 16 | (): FieldValidationResult => 17 | buildValidationFailedResult(REQUIRED_FIELD_MESSAGE); 18 | -------------------------------------------------------------------------------- /10-async/00-bloqueo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + TS 8 | 9 | 10 |
11 |

TypeScript Sandbox

12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/src/app.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Router } from "./routes"; 3 | 4 | export const ProfileContext = React.createContext(null); 5 | 6 | export const ProfileProvider = ({ children }) => { 7 | const [profile, setProfile] = React.useState({ 8 | usuario: "", 9 | }); 10 | 11 | return ( 12 | 13 | {children} 14 | 15 | ); 16 | }; 17 | 18 | export const App = () => { 19 | return ( 20 | 21 | 22 | 23 | ); 24 | }; 25 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/layouts/app/app-layout.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { 3 | HeaderComponent, 4 | NavbarComponent, 5 | FooterComponent, 6 | } from "./components"; 7 | import classes from "./app-layout.module.css"; 8 | 9 | interface Props { 10 | children: React.ReactNode; 11 | } 12 | 13 | export const AppLayout: React.FC = (props) => { 14 | const { children } = props; 15 | 16 | return ( 17 | <> 18 | 19 | 20 |
{children}
21 | 22 | 23 | ); 24 | }; 25 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/layouts/app/app-layout.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { 3 | HeaderComponent, 4 | NavbarComponent, 5 | FooterComponent, 6 | } from "./components"; 7 | import classes from "./app-layout.module.css"; 8 | 9 | interface Props { 10 | children: React.ReactNode; 11 | } 12 | 13 | export const AppLayout: React.FC = (props) => { 14 | const { children } = props; 15 | 16 | return ( 17 | <> 18 | 19 | 20 |
{children}
21 | 22 | 23 | ); 24 | }; 25 | -------------------------------------------------------------------------------- /07-testing/00-js-adivina/src/modelo.js: -------------------------------------------------------------------------------- 1 | export let numeroParaAcertar = 0; // Valor por defecto en el motor se inicializa al arrancar partida 2 | export const setNumeroParaAcertar = (nuevoNumero) => 3 | (numeroParaAcertar = nuevoNumero); 4 | 5 | export const NO_ES_UN_NUMERO = 0; 6 | export const EL_NUMERO_ES_MAYOR = 1; 7 | export const EL_NUMERO_ES_MENOR = 2; 8 | export const ES_EL_NUMERO_SECRETO = 3; 9 | export const GAME_OVER_MAXIMO_INTENTOS = 4; 10 | 11 | export const MAXIMO_INTENTOS = 5; 12 | export let numeroDeIntentos = 0; 13 | export const setNumeroDeIntentos = (nuevoNumeroDeIntentos) => 14 | (numeroDeIntentos = nuevoNumeroDeIntentos); 15 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/layouts/app/app-layout.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { 3 | HeaderComponent, 4 | NavbarComponent, 5 | FooterComponent, 6 | } from "./components"; 7 | import classes from "./app-layout.module.css"; 8 | 9 | interface Props { 10 | children: React.ReactNode; 11 | } 12 | 13 | export const AppLayout: React.FC = (props) => { 14 | const { children } = props; 15 | 16 | return ( 17 | <> 18 | 19 | 20 |
{children}
21 | 22 | 23 | ); 24 | }; 25 | -------------------------------------------------------------------------------- /12-react/01-enlazando/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "test": "vitest", 11 | "coverage": "vitest run --coverage" 12 | }, 13 | "devDependencies": { 14 | "@types/react": "^18.2.18", 15 | "@types/react-dom": "^18.2.7", 16 | "@vitejs/plugin-react": "^4.0.4", 17 | "jest": "^29.5.0", 18 | "vite": "^4.1.0", 19 | "vitest": "^0.29.8" 20 | }, 21 | "dependencies": { 22 | "react": "^18.2.0", 23 | "react-dom": "^18.2.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /12-react/02-Componentizando/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "test": "vitest", 11 | "coverage": "vitest run --coverage" 12 | }, 13 | "devDependencies": { 14 | "@types/react": "^18.2.18", 15 | "@types/react-dom": "^18.2.7", 16 | "@vitejs/plugin-react": "^4.0.4", 17 | "jest": "^29.5.0", 18 | "vite": "^4.1.0", 19 | "vitest": "^0.29.8" 20 | }, 21 | "dependencies": { 22 | "react": "^18.2.0", 23 | "react-dom": "^18.2.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/layouts/app/components/header.component.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import classes from "./header.component.module.css"; 3 | import logoHeader from "/assets/logo_header_white.svg"; 4 | import { useProfileContext } from "@/core/profile"; 5 | 6 | export const HeaderComponent: React.FC = () => { 7 | const { userName } = useProfileContext(); 8 | 9 | return ( 10 |
11 |
12 | 13 |
14 |

{userName}

15 |
16 |
17 |
18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/layouts/app/components/header.component.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import classes from "./header.component.module.css"; 3 | import logoHeader from "/assets/logo_header_white.svg"; 4 | import { useProfileContext } from "@/core/profile"; 5 | 6 | export const HeaderComponent: React.FC = () => { 7 | const { userName } = useProfileContext(); 8 | 9 | return ( 10 |
11 |
12 | 13 |
14 |

{userName}

15 |
16 |
17 |
18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/layouts/app/components/header.component.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import classes from "./header.component.module.css"; 3 | import logoHeader from "/assets/logo_header_white.svg"; 4 | import { useProfileContext } from "@/core/profile"; 5 | 6 | export const HeaderComponent: React.FC = () => { 7 | const { userName } = useProfileContext(); 8 | 9 | return ( 10 |
11 |
12 | 13 |
14 |

{userName}

15 |
16 |
17 |
18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "resolveJsonModule": true, 10 | "isolatedModules": false, 11 | "jsx": "react-jsx", 12 | "esModuleInterop": true, 13 | "noEmit": true, 14 | "noUnusedLocals": true, 15 | "noUnusedParameters": true, 16 | "noImplicitReturns": true, 17 | "skipLibCheck": true, 18 | "paths": { 19 | "@/*": ["./src/*"] 20 | } 21 | }, 22 | "include": ["src"], 23 | "exclude": ["node_modules", "build", "dist"] 24 | } 25 | -------------------------------------------------------------------------------- /13-banca-online/03-login/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "resolveJsonModule": true, 10 | "isolatedModules": false, 11 | "jsx": "react-jsx", 12 | "esModuleInterop": true, 13 | "noEmit": true, 14 | "noUnusedLocals": true, 15 | "noUnusedParameters": true, 16 | "noImplicitReturns": true, 17 | "skipLibCheck": true, 18 | "paths": { 19 | "@/*": ["./src/*"] 20 | } 21 | }, 22 | "include": ["src"], 23 | "exclude": ["node_modules", "build", "dist"] 24 | } 25 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "resolveJsonModule": true, 10 | "isolatedModules": false, 11 | "jsx": "react-jsx", 12 | "esModuleInterop": true, 13 | "noEmit": true, 14 | "noUnusedLocals": true, 15 | "noUnusedParameters": true, 16 | "noImplicitReturns": true, 17 | "skipLibCheck": true, 18 | "paths": { 19 | "@/*": ["./src/*"] 20 | } 21 | }, 22 | "include": ["src"], 23 | "exclude": ["node_modules", "build", "dist"] 24 | } 25 | -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "test": "vitest", 11 | "coverage": "vitest run --coverage" 12 | }, 13 | "devDependencies": { 14 | "@types/react": "^18.2.18", 15 | "@types/react-dom": "^18.2.7", 16 | "@vitejs/plugin-react": "^4.0.4", 17 | "jest": "^29.5.0", 18 | "vite": "^4.1.0", 19 | "vitest": "^0.29.8" 20 | }, 21 | "dependencies": { 22 | "react": "^18.2.0", 23 | "react-dom": "^18.2.0", 24 | "react-router-dom": "^6.14.2" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "resolveJsonModule": true, 10 | "isolatedModules": false, 11 | "jsx": "react-jsx", 12 | "esModuleInterop": true, 13 | "noEmit": true, 14 | "noUnusedLocals": true, 15 | "noUnusedParameters": true, 16 | "noImplicitReturns": true, 17 | "skipLibCheck": true, 18 | "paths": { 19 | "@/*": ["./src/*"] 20 | } 21 | }, 22 | "include": ["src"], 23 | "exclude": ["node_modules", "build", "dist"] 24 | } 25 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "resolveJsonModule": true, 10 | "isolatedModules": false, 11 | "jsx": "react-jsx", 12 | "esModuleInterop": true, 13 | "noEmit": true, 14 | "noUnusedLocals": true, 15 | "noUnusedParameters": true, 16 | "noImplicitReturns": true, 17 | "skipLibCheck": true, 18 | "paths": { 19 | "@/*": ["./src/*"] 20 | } 21 | }, 22 | "include": ["src"], 23 | "exclude": ["node_modules", "build", "dist"] 24 | } 25 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "resolveJsonModule": true, 10 | "isolatedModules": false, 11 | "jsx": "react-jsx", 12 | "esModuleInterop": true, 13 | "noEmit": true, 14 | "noUnusedLocals": true, 15 | "noUnusedParameters": true, 16 | "noImplicitReturns": true, 17 | "skipLibCheck": true, 18 | "paths": { 19 | "@/*": ["./src/*"] 20 | } 21 | }, 22 | "include": ["src"], 23 | "exclude": ["node_modules", "build", "dist"] 24 | } 25 | -------------------------------------------------------------------------------- /07-testing/00-js-adivina/src/shell.js: -------------------------------------------------------------------------------- 1 | import { setNumeroParaAcertar, setNumeroDeIntentos } from "./modelo"; // Esto se simplificará bastante con la solución en TypeScript 2 | 3 | import { generarNumeroAleatorio, comprobarNumero } from "./motor"; 4 | 5 | import { muestraNumeroDeIntentos, handleCompruebaClick } from "./ui"; 6 | 7 | const inicializaNuevaPartida = () => { 8 | setNumeroParaAcertar(generarNumeroAleatorio()); 9 | setNumeroDeIntentos(0); 10 | muestraNumeroDeIntentos(); 11 | }; 12 | 13 | document.addEventListener("DOMContentLoaded", inicializaNuevaPartida); 14 | 15 | const botonComprobar = document.getElementById("comprobar"); 16 | botonComprobar.addEventListener("click", handleCompruebaClick); 17 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "resolveJsonModule": true, 10 | "isolatedModules": false, 11 | "jsx": "react-jsx", 12 | "esModuleInterop": true, 13 | "noEmit": true, 14 | "noUnusedLocals": true, 15 | "noUnusedParameters": true, 16 | "noImplicitReturns": true, 17 | "skipLibCheck": true, 18 | "paths": { 19 | "@/*": ["./src/*"] 20 | } 21 | }, 22 | "include": ["src"], 23 | "exclude": ["node_modules", "build", "dist"] 24 | } 25 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/common/validations/plain.validation.ts: -------------------------------------------------------------------------------- 1 | import validator from "validator"; 2 | 3 | export const isValidIban = (iban: string): boolean => validator.isIBAN(iban); 4 | 5 | export const isPositiveNumber = (amount: number): boolean => { 6 | return amount > 0; 7 | }; 8 | 9 | export const isDateAfterToday = (date: string): boolean => 10 | new Date(date) > new Date(); 11 | 12 | export const isEMailWellFormed = (email: string) => validator.isEmail(email); 13 | 14 | export const isStringValueInformed = (field: string): boolean => field !== ""; 15 | 16 | export const isValueNotNullOrUndefined = (value: T): boolean => { 17 | return value !== null && value !== undefined; 18 | }; 19 | -------------------------------------------------------------------------------- /07-testing/00-js-adivina/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vite App 9 | 10 | 11 |
12 |

Adivina el numero

13 |
14 | 15 | 16 |
17 |
18 |
19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /07-testing/01-ts-adivina/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vite App 9 | 10 | 11 |
12 |

Adivina el numero

13 |
14 | 15 | 16 |
17 |
18 |
19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/transfer/transfer.mapper.ts: -------------------------------------------------------------------------------- 1 | import * as apiModel from "./api"; 2 | import * as viewModel from "./transfer.vm"; 3 | 4 | export const mapAccountFromApiToVm = ( 5 | account: apiModel.Account 6 | ): viewModel.AccountVm => ({ 7 | id: account.id, 8 | alias: account.name, 9 | iban: account.iban, 10 | }); 11 | 12 | export const mapTransferFromVmToApi = ( 13 | transfer: viewModel.TransferVm 14 | ): apiModel.Transfer => ({ 15 | accountId: transfer.accountId, 16 | iban: transfer.iban, 17 | name: transfer.name, 18 | amount: transfer.amount, 19 | concept: transfer.concept, 20 | notes: transfer.notes, 21 | transferDate: new Date().toDateString(), 22 | realTransferDate: transfer.realDateTransfer ?? "", 23 | }); 24 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import { fileURLToPath, URL } from "node:url"; 3 | import checker from "vite-plugin-checker"; 4 | import type { UserConfig as VitestUserConfigInterface } from "vitest/config"; 5 | import react from "@vitejs/plugin-react"; 6 | 7 | const vitestConfig: VitestUserConfigInterface = { 8 | test: { 9 | globals: true, 10 | }, 11 | }; 12 | 13 | export default defineConfig({ 14 | plugins: [checker({ typescript: true }), react()], 15 | test: vitestConfig.test, 16 | css: { 17 | modules: { 18 | localsConvention: "camelCaseOnly", 19 | }, 20 | }, 21 | resolve: { 22 | alias: { 23 | "@": fileURLToPath(new URL("./src", import.meta.url)), 24 | }, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /13-banca-online/03-login/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import { fileURLToPath, URL } from "node:url"; 3 | import checker from "vite-plugin-checker"; 4 | import type { UserConfig as VitestUserConfigInterface } from "vitest/config"; 5 | import react from "@vitejs/plugin-react"; 6 | 7 | const vitestConfig: VitestUserConfigInterface = { 8 | test: { 9 | globals: true, 10 | }, 11 | }; 12 | 13 | export default defineConfig({ 14 | plugins: [checker({ typescript: true }), react()], 15 | test: vitestConfig.test, 16 | css: { 17 | modules: { 18 | localsConvention: "camelCaseOnly", 19 | }, 20 | }, 21 | resolve: { 22 | alias: { 23 | "@": fileURLToPath(new URL("./src", import.meta.url)), 24 | }, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import { fileURLToPath, URL } from "node:url"; 3 | import checker from "vite-plugin-checker"; 4 | import type { UserConfig as VitestUserConfigInterface } from "vitest/config"; 5 | import react from "@vitejs/plugin-react"; 6 | 7 | const vitestConfig: VitestUserConfigInterface = { 8 | test: { 9 | globals: true, 10 | }, 11 | }; 12 | 13 | export default defineConfig({ 14 | plugins: [checker({ typescript: true }), react()], 15 | test: vitestConfig.test, 16 | css: { 17 | modules: { 18 | localsConvention: "camelCaseOnly", 19 | }, 20 | }, 21 | resolve: { 22 | alias: { 23 | "@": fileURLToPath(new URL("./src", import.meta.url)), 24 | }, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import { fileURLToPath, URL } from "node:url"; 3 | import checker from "vite-plugin-checker"; 4 | import type { UserConfig as VitestUserConfigInterface } from "vitest/config"; 5 | import react from "@vitejs/plugin-react"; 6 | 7 | const vitestConfig: VitestUserConfigInterface = { 8 | test: { 9 | globals: true, 10 | }, 11 | }; 12 | 13 | export default defineConfig({ 14 | plugins: [checker({ typescript: true }), react()], 15 | test: vitestConfig.test, 16 | css: { 17 | modules: { 18 | localsConvention: "camelCaseOnly", 19 | }, 20 | }, 21 | resolve: { 22 | alias: { 23 | "@": fileURLToPath(new URL("./src", import.meta.url)), 24 | }, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import { fileURLToPath, URL } from "node:url"; 3 | import checker from "vite-plugin-checker"; 4 | import type { UserConfig as VitestUserConfigInterface } from "vitest/config"; 5 | import react from "@vitejs/plugin-react"; 6 | 7 | const vitestConfig: VitestUserConfigInterface = { 8 | test: { 9 | globals: true, 10 | }, 11 | }; 12 | 13 | export default defineConfig({ 14 | plugins: [checker({ typescript: true }), react()], 15 | test: vitestConfig.test, 16 | css: { 17 | modules: { 18 | localsConvention: "camelCaseOnly", 19 | }, 20 | }, 21 | resolve: { 22 | alias: { 23 | "@": fileURLToPath(new URL("./src", import.meta.url)), 24 | }, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import { fileURLToPath, URL } from "node:url"; 3 | import checker from "vite-plugin-checker"; 4 | import type { UserConfig as VitestUserConfigInterface } from "vitest/config"; 5 | import react from "@vitejs/plugin-react"; 6 | 7 | const vitestConfig: VitestUserConfigInterface = { 8 | test: { 9 | globals: true, 10 | }, 11 | }; 12 | 13 | export default defineConfig({ 14 | plugins: [checker({ typescript: true }), react()], 15 | test: vitestConfig.test, 16 | css: { 17 | modules: { 18 | localsConvention: "camelCaseOnly", 19 | }, 20 | }, 21 | resolve: { 22 | alias: { 23 | "@": fileURLToPath(new URL("./src", import.meta.url)), 24 | }, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import { fileURLToPath, URL } from "node:url"; 3 | import checker from "vite-plugin-checker"; 4 | import type { UserConfig as VitestUserConfigInterface } from "vitest/config"; 5 | import react from "@vitejs/plugin-react"; 6 | 7 | const vitestConfig: VitestUserConfigInterface = { 8 | test: { 9 | globals: true, 10 | }, 11 | }; 12 | 13 | export default defineConfig({ 14 | plugins: [checker({ typescript: true }), react()], 15 | test: vitestConfig.test, 16 | css: { 17 | modules: { 18 | localsConvention: "camelCaseOnly", 19 | }, 20 | }, 21 | resolve: { 22 | alias: { 23 | "@": fileURLToPath(new URL("./src", import.meta.url)), 24 | }, 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/login/login-field.validation.ts: -------------------------------------------------------------------------------- 1 | import { 2 | FieldValidationResult, 3 | buildRequiredFieldValidationFailedResponse, 4 | buildValidationSucceededResult, 5 | isStringValueInformed, 6 | } from "@/common/validations"; 7 | 8 | export const validateUserField = (value: string): FieldValidationResult => { 9 | if (!isStringValueInformed(value)) { 10 | return buildRequiredFieldValidationFailedResponse(); 11 | } 12 | 13 | return buildValidationSucceededResult(); 14 | }; 15 | 16 | export const validatePasswordField = (value: string): FieldValidationResult => { 17 | if (!isStringValueInformed(value)) { 18 | return buildRequiredFieldValidationFailedResponse(); 19 | } 20 | 21 | return buildValidationSucceededResult(); 22 | }; 23 | -------------------------------------------------------------------------------- /12-react/02-Componentizando/src/app.jsx: -------------------------------------------------------------------------------- 1 | const TarjetaHotel = (hotel) => { 2 | return ( 3 |
4 |
{hotel.nombre}
5 |
6 |

Descripción del hotel {hotel.id}

7 |
8 |
9 | 10 | 11 |
12 |
13 | ); 14 | }; 15 | 16 | export const App = () => { 17 | const hoteles = [ 18 | { id: 1, nombre: "Hotel 1" }, 19 | { id: 2, nombre: "Hotel 2" }, 20 | { id: 3, nombre: "Hotel 3" }, 21 | ]; 22 | return ( 23 | <> 24 | {hoteles.map((hotel) => ( 25 | 26 | ))} 27 | 28 | ); 29 | }; 30 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/login/login.mapper.spec.ts: -------------------------------------------------------------------------------- 1 | import { mapCredentialFromVmToApi } from "./login.mapper"; 2 | import * as apiModel from "./api"; 3 | import * as viewModel from "./login.vm"; 4 | 5 | describe("login.mapper specs", () => { 6 | it("should return a credential with same properties", () => { 7 | // Arrange 8 | const vmCredentials: viewModel.Credentials = { 9 | user: "myuser", 10 | password: "mypassword", 11 | }; 12 | 13 | const expectedApiCredentials: apiModel.Credentials = { 14 | user: "myuser", 15 | password: "mypassword", 16 | }; 17 | 18 | // Act 19 | const result: apiModel.Credentials = 20 | mapCredentialFromVmToApi(vmCredentials); 21 | 22 | // Assert 23 | expect(result).toEqual(expectedApiCredentials); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/login/login.mapper.spec.ts: -------------------------------------------------------------------------------- 1 | import { mapCredentialFromVmToApi } from "./login.mapper"; 2 | import * as apiModel from "./api"; 3 | import * as viewModel from "./login.vm"; 4 | 5 | describe("login.mapper specs", () => { 6 | it("should return a credential with same properties", () => { 7 | // Arrange 8 | const vmCredentials: viewModel.Credentials = { 9 | user: "myuser", 10 | password: "mypassword", 11 | }; 12 | 13 | const expectedApiCredentials: apiModel.Credentials = { 14 | user: "myuser", 15 | password: "mypassword", 16 | }; 17 | 18 | // Act 19 | const result: apiModel.Credentials = 20 | mapCredentialFromVmToApi(vmCredentials); 21 | 22 | // Assert 23 | expect(result).toEqual(expectedApiCredentials); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/login/login.mapper.spec.ts: -------------------------------------------------------------------------------- 1 | import { mapCredentialFromVmToApi } from "./login.mapper"; 2 | import * as apiModel from "./api"; 3 | import * as viewModel from "./login.vm"; 4 | 5 | describe("login.mapper specs", () => { 6 | it("should return a credential with same properties", () => { 7 | // Arrange 8 | const vmCredentials: viewModel.Credentials = { 9 | user: "myuser", 10 | password: "mypassword", 11 | }; 12 | 13 | const expectedApiCredentials: apiModel.Credentials = { 14 | user: "myuser", 15 | password: "mypassword", 16 | }; 17 | 18 | // Act 19 | const result: apiModel.Credentials = 20 | mapCredentialFromVmToApi(vmCredentials); 21 | 22 | // Assert 23 | expect(result).toEqual(expectedApiCredentials); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/login/login.mapper.spec.ts: -------------------------------------------------------------------------------- 1 | import { mapCredentialFromVmToApi } from "./login.mapper"; 2 | import * as apiModel from "./api"; 3 | import * as viewModel from "./login.vm"; 4 | 5 | describe("login.mapper specs", () => { 6 | it("should return a credential with same properties", () => { 7 | // Arrange 8 | const vmCredentials: viewModel.Credentials = { 9 | user: "myuser", 10 | password: "mypassword", 11 | }; 12 | 13 | const expectedApiCredentials: apiModel.Credentials = { 14 | user: "myuser", 15 | password: "mypassword", 16 | }; 17 | 18 | // Act 19 | const result: apiModel.Credentials = 20 | mapCredentialFromVmToApi(vmCredentials); 21 | 22 | // Assert 23 | expect(result).toEqual(expectedApiCredentials); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/login/login.mapper.spec.ts: -------------------------------------------------------------------------------- 1 | import { mapCredentialFromVmToApi } from "./login.mapper"; 2 | import * as apiModel from "./api"; 3 | import * as viewModel from "./login.vm"; 4 | 5 | describe("login.mapper specs", () => { 6 | it("should return a credential with same properties", () => { 7 | // Arrange 8 | const vmCredentials: viewModel.Credentials = { 9 | user: "myuser", 10 | password: "mypassword", 11 | }; 12 | 13 | const expectedApiCredentials: apiModel.Credentials = { 14 | user: "myuser", 15 | password: "mypassword", 16 | }; 17 | 18 | // Act 19 | const result: apiModel.Credentials = 20 | mapCredentialFromVmToApi(vmCredentials); 21 | 22 | // Assert 23 | expect(result).toEqual(expectedApiCredentials); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /07-testing/01-ts-adivina/src/motor.ts: -------------------------------------------------------------------------------- 1 | import { Estado, MAXIMO_INTENTOS, partida } from "./modelo"; 2 | 3 | export const generarNumeroAleatorio = (): number => 4 | Math.floor(Math.random() * 101); 5 | 6 | export const hasSuperadoElNumeroMaximoDeIntentos = (): boolean => 7 | partida.numeroDeIntentos >= MAXIMO_INTENTOS; 8 | 9 | export const comprobarNumero = (texto: string): Estado => { 10 | const numero = parseInt(texto); 11 | const esUnNumero = !isNaN(numero); 12 | 13 | if (!esUnNumero) { 14 | return "NO_ES_UN_NUMERO"; 15 | } 16 | 17 | if (numero === partida.numeroParaAcertar) { 18 | return "ES_EL_NUMERO_SECRETO"; 19 | } 20 | 21 | if (hasSuperadoElNumeroMaximoDeIntentos()) { 22 | return "GAME_OVER_MAXIMO_INTENTOS"; 23 | } 24 | 25 | return numero > partida.numeroParaAcertar 26 | ? "EL_NUMERO_ES_MAYOR" 27 | : "EL_NUMERO_ES_MENOR"; 28 | }; 29 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/core/profile/profile.context.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface Context { 4 | userName: string; 5 | setUserProfile: (userProfile: string) => void; 6 | } 7 | 8 | const noUserLogin = "no user login"; 9 | 10 | const ProfileContext = React.createContext({ 11 | userName: noUserLogin, 12 | setUserProfile: () => {}, 13 | }); 14 | 15 | interface Props { 16 | children: React.ReactNode; 17 | } 18 | 19 | export const ProfileProvider: React.FC = ({ children }) => { 20 | const [userProfile, setUserProfile] = React.useState(""); 21 | 22 | return ( 23 | 29 | {children} 30 | 31 | ); 32 | }; 33 | 34 | export const useProfileContext = () => React.useContext(ProfileContext); 35 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/account-list/components/account-list-item.component.module.css: -------------------------------------------------------------------------------- 1 | .row { 2 | display: grid; 3 | grid-template-columns: 30% 12% repeat(2, 17%) 1fr; 4 | gap: 1px; 5 | } 6 | 7 | .row:nth-child(odd) { 8 | background-color: #eeeeee; 9 | } 10 | 11 | .data-cell { 12 | font-size: 16px; 13 | padding: 15px; 14 | color: #232c3b; 15 | align-self: center; 16 | } 17 | 18 | .data-cell a { 19 | text-decoration: underline; 20 | color: #232c3b; 21 | } 22 | 23 | .align-right { 24 | text-align: right; 25 | } 26 | 27 | .bold { 28 | font-weight: 600; 29 | } 30 | 31 | .select-container { 32 | display: flex; 33 | align-items: center; 34 | justify-content: center; 35 | } 36 | 37 | .select { 38 | font-size: 13px; 39 | border-radius: 10px; 40 | padding: 8px 10px; 41 | width: 90%; 42 | cursor: pointer; 43 | } 44 | 45 | .select > option { 46 | font-size: 15px; 47 | } 48 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/core/profile/profile.context.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface Context { 4 | userName: string; 5 | setUserProfile: (userProfile: string) => void; 6 | } 7 | 8 | const noUserLogin = "no user login"; 9 | 10 | const ProfileContext = React.createContext({ 11 | userName: noUserLogin, 12 | setUserProfile: () => {}, 13 | }); 14 | 15 | interface Props { 16 | children: React.ReactNode; 17 | } 18 | 19 | export const ProfileProvider: React.FC = ({ children }) => { 20 | const [userProfile, setUserProfile] = React.useState(""); 21 | 22 | return ( 23 | 29 | {children} 30 | 31 | ); 32 | }; 33 | 34 | export const useProfileContext = () => React.useContext(ProfileContext); 35 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/pages/account-list/account-list.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link, generatePath } from "react-router-dom"; 3 | import { appRoutes } from "@/core/router"; 4 | 5 | export const AccountListPage: React.FC = () => { 6 | return ( 7 |
8 | Account List 9 |
10 | 11 | Movimientos de cuenta 1 12 | 13 |
14 | Transferencia 15 |
16 | 17 | Transferencia desde cuenta 1 18 | 19 |
20 | Crear cuenta 21 |
22 | 23 | Editar cuenta 1 24 | 25 |
26 | ); 27 | }; 28 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/account-list/account-list.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link, generatePath } from "react-router-dom"; 3 | import { appRoutes } from "@/core/router"; 4 | 5 | export const AccountListPage: React.FC = () => { 6 | return ( 7 |
8 | Account List 9 |
10 | 11 | Movimientos de cuenta 1 12 | 13 |
14 | Transferencia 15 |
16 | 17 | Transferencia desde cuenta 1 18 | 19 |
20 | Crear cuenta 21 |
22 | 23 | Editar cuenta 1 24 | 25 |
26 | ); 27 | }; 28 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/core/profile/profile.context.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface Context { 4 | userName: string; 5 | setUserProfile: (userProfile: string) => void; 6 | } 7 | 8 | const noUserLogin = "no user login"; 9 | 10 | const ProfileContext = React.createContext({ 11 | userName: noUserLogin, 12 | setUserProfile: () => {}, 13 | }); 14 | 15 | interface Props { 16 | children: React.ReactNode; 17 | } 18 | 19 | export const ProfileProvider: React.FC = ({ children }) => { 20 | const [userProfile, setUserProfile] = React.useState(""); 21 | 22 | return ( 23 | 29 | {children} 30 | 31 | ); 32 | }; 33 | 34 | export const useProfileContext = () => React.useContext(ProfileContext); 35 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/account-list/components/account-list-item.component.module.css: -------------------------------------------------------------------------------- 1 | .row { 2 | display: grid; 3 | grid-template-columns: 30% 12% repeat(2, 17%) 1fr; 4 | gap: 1px; 5 | } 6 | 7 | .row:nth-child(odd) { 8 | background-color: #eeeeee; 9 | } 10 | 11 | .data-cell { 12 | font-size: 16px; 13 | padding: 15px; 14 | color: #232c3b; 15 | align-self: center; 16 | } 17 | 18 | .data-cell a { 19 | text-decoration: underline; 20 | color: #232c3b; 21 | } 22 | 23 | .align-right { 24 | text-align: right; 25 | } 26 | 27 | .bold { 28 | font-weight: 600; 29 | } 30 | 31 | .select-container { 32 | display: flex; 33 | align-items: center; 34 | justify-content: center; 35 | } 36 | 37 | .select { 38 | font-size: 13px; 39 | border-radius: 10px; 40 | padding: 8px 10px; 41 | width: 90%; 42 | cursor: pointer; 43 | } 44 | 45 | .select > option { 46 | font-size: 15px; 47 | } 48 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/account-list/account-list.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link, generatePath } from "react-router-dom"; 3 | import { appRoutes } from "@/core/router"; 4 | 5 | export const AccountListPage: React.FC = () => { 6 | return ( 7 |
8 | Account List 9 |
10 | 11 | Movimientos de cuenta 1 12 | 13 |
14 | Transferencia 15 |
16 | 17 | Transferencia desde cuenta 1 18 | 19 |
20 | Crear cuenta 21 |
22 | 23 | Editar cuenta 1 24 | 25 |
26 | ); 27 | }; 28 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/transfer/components/transfer-form.component.module.css: -------------------------------------------------------------------------------- 1 | .error { 2 | color: var(--error_color); 3 | margin-top: 0.5rem; 4 | margin-left: 1rem; 5 | } 6 | 7 | .account-select { 8 | width: 200px; 9 | } 10 | 11 | .form-container { 12 | border: none; 13 | border-bottom: 1px solid #232c3b; 14 | padding: 40px 0; 15 | } 16 | 17 | .button { 18 | margin: 10px 0 10px 320px; 19 | } 20 | 21 | .form-container p { 22 | font-size: 0.9em; 23 | margin-bottom: 20px; 24 | } 25 | 26 | .form-container div { 27 | display: flex; 28 | align-items: center; 29 | justify-content: flex-start; 30 | margin-bottom: 10px; 31 | } 32 | 33 | .form-container div p { 34 | margin: 0 10px; 35 | } 36 | 37 | .form-container label { 38 | margin-right: 20px; 39 | min-width: 300px; 40 | text-align: right; 41 | } 42 | 43 | .large { 44 | width: 400px; 45 | } 46 | 47 | .small { 48 | width: 100px; 49 | } 50 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/pages/login/login.validation.ts: -------------------------------------------------------------------------------- 1 | import { Credentials, CredentialsformErrors } from "./login.vm"; 2 | import { FormValidationResult } from "@/common/validations"; 3 | import { 4 | validateUserField, 5 | validatePasswordField, 6 | } from "./login-field.validation"; 7 | 8 | export const validateForm = ( 9 | credentials: Credentials 10 | ): FormValidationResult => { 11 | const fieldValidationResults = [ 12 | validateUserField(credentials.user), 13 | validatePasswordField(credentials.password), 14 | ]; 15 | 16 | const formValidationResult: FormValidationResult = { 17 | succeeded: fieldValidationResults.every((f) => f.succeeded), 18 | errors: { 19 | user: fieldValidationResults[0].errorMessage ?? "", 20 | password: fieldValidationResults[1].errorMessage ?? "", 21 | }, 22 | }; 23 | 24 | return formValidationResult; 25 | }; 26 | -------------------------------------------------------------------------------- /12-react/03-perdiendo-estado/src/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, sans-serif; 3 | background-color: #f2f2f2; 4 | margin: 0; 5 | padding: 0; 6 | display: flex; 7 | justify-content: center; 8 | align-items: center; 9 | height: 100vh; 10 | } 11 | 12 | .login-container { 13 | background-color: #fff; 14 | padding: 20px; 15 | border-radius: 5px; 16 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 17 | } 18 | 19 | h1 { 20 | text-align: center; 21 | } 22 | 23 | form { 24 | display: flex; 25 | flex-direction: column; 26 | } 27 | 28 | label { 29 | margin-bottom: 5px; 30 | } 31 | 32 | input { 33 | padding: 10px; 34 | margin-bottom: 10px; 35 | border: 1px solid #ccc; 36 | border-radius: 3px; 37 | } 38 | 39 | button { 40 | padding: 10px; 41 | background-color: #007bff; 42 | color: #fff; 43 | border: none; 44 | border-radius: 3px; 45 | cursor: pointer; 46 | } 47 | 48 | button:hover { 49 | background-color: #0056b3; 50 | } 51 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/public/assets/icon-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /13-banca-online/03-login/public/assets/icon-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/public/assets/icon-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/layouts/app/components/header.component.module.css: -------------------------------------------------------------------------------- 1 | .header { 2 | background: var(--primary_color); 3 | } 4 | 5 | .header > div { 6 | display: flex; 7 | justify-content: space-between; 8 | flex-wrap: wrap; 9 | padding: 0 1em; 10 | height: 100%; 11 | padding: 20px 20px; 12 | max-width: 1200px; 13 | margin: 0 auto; 14 | } 15 | 16 | .header_logo { 17 | width: 200px; 18 | } 19 | 20 | .usuario { 21 | display: flex; 22 | align-items: center; 23 | color: #ffffff; 24 | } 25 | 26 | .usuario p:before { 27 | content: ""; 28 | background: url(assets/icon-user.svg) no-repeat center center; 29 | width: 40px; 30 | height: 15px; 31 | position: relative; 32 | left: 0; 33 | top: 0; 34 | padding-right: 20px; 35 | margin-right: 10px; 36 | } 37 | 38 | @media screen and (max-width: 500px) { 39 | .header > div { 40 | flex-direction: column; 41 | justify-content: center; 42 | align-items: center; 43 | gap: 10px; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/public/assets/icon-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/public/assets/icon-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/public/assets/icon-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/layouts/app/components/header.component.module.css: -------------------------------------------------------------------------------- 1 | .header { 2 | background: var(--primary_color); 3 | } 4 | 5 | .header > div { 6 | display: flex; 7 | justify-content: space-between; 8 | flex-wrap: wrap; 9 | padding: 0 1em; 10 | height: 100%; 11 | padding: 20px 20px; 12 | max-width: 1200px; 13 | margin: 0 auto; 14 | } 15 | 16 | .header_logo { 17 | width: 200px; 18 | } 19 | 20 | .usuario { 21 | display: flex; 22 | align-items: center; 23 | color: #ffffff; 24 | } 25 | 26 | .usuario p:before { 27 | content: ""; 28 | background: url(assets/icon-user.svg) no-repeat center center; 29 | width: 40px; 30 | height: 15px; 31 | position: relative; 32 | left: 0; 33 | top: 0; 34 | padding-right: 20px; 35 | margin-right: 10px; 36 | } 37 | 38 | @media screen and (max-width: 500px) { 39 | .header > div { 40 | flex-direction: column; 41 | justify-content: center; 42 | align-items: center; 43 | gap: 10px; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/public/assets/icon-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/layouts/app/components/header.component.module.css: -------------------------------------------------------------------------------- 1 | .header { 2 | background: var(--primary_color); 3 | } 4 | 5 | .header > div { 6 | display: flex; 7 | justify-content: space-between; 8 | flex-wrap: wrap; 9 | padding: 0 1em; 10 | height: 100%; 11 | padding: 20px 20px; 12 | max-width: 1200px; 13 | margin: 0 auto; 14 | } 15 | 16 | .header_logo { 17 | width: 200px; 18 | } 19 | 20 | .usuario { 21 | display: flex; 22 | align-items: center; 23 | color: #ffffff; 24 | } 25 | 26 | .usuario p:before { 27 | content: ""; 28 | background: url(assets/icon-user.svg) no-repeat center center; 29 | width: 40px; 30 | height: 15px; 31 | position: relative; 32 | left: 0; 33 | top: 0; 34 | padding-right: 20px; 35 | margin-right: 10px; 36 | } 37 | 38 | @media screen and (max-width: 500px) { 39 | .header > div { 40 | flex-direction: column; 41 | justify-content: center; 42 | align-items: center; 43 | gap: 10px; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/login/login.validation.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Credentials, 3 | CredentialsformErrors, 4 | createEmptyCredentialsformErrors, 5 | } from "./login.vm"; 6 | 7 | interface ValidationResult { 8 | succeeded: boolean; 9 | errors: CredentialsformErrors; 10 | } 11 | 12 | export const validateForm = (credentials: Credentials): ValidationResult => { 13 | let validationResult = { 14 | succeeded: true, 15 | errors: createEmptyCredentialsformErrors(), 16 | }; 17 | 18 | if (!credentials.user.trim()) { 19 | validationResult.errors = { 20 | ...validationResult.errors, 21 | user: "Debe informar el campo usuario", 22 | }; 23 | validationResult.succeeded = false; 24 | } 25 | 26 | if (!credentials.password.trim()) { 27 | validationResult.errors = { 28 | ...validationResult.errors, 29 | password: "Debe informar el campo contraseña", 30 | }; 31 | validationResult.succeeded = false; 32 | } 33 | 34 | return validationResult; 35 | }; 36 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/pages/login/login.validation.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Credentials, 3 | CredentialsformErrors, 4 | createEmptyCredentialsformErrors, 5 | } from "./login.vm"; 6 | 7 | interface ValidationResult { 8 | succeeded: boolean; 9 | errors: CredentialsformErrors; 10 | } 11 | 12 | export const validateForm = (credentials: Credentials): ValidationResult => { 13 | let validationResult = { 14 | succeeded: true, 15 | errors: createEmptyCredentialsformErrors(), 16 | }; 17 | 18 | if (!credentials.user.trim()) { 19 | validationResult.errors = { 20 | ...validationResult.errors, 21 | user: "Debe informar el campo usuario", 22 | }; 23 | validationResult.succeeded = false; 24 | } 25 | 26 | if (!credentials.password.trim()) { 27 | validationResult.errors = { 28 | ...validationResult.errors, 29 | password: "Debe informar el campo contraseña", 30 | }; 31 | validationResult.succeeded = false; 32 | } 33 | 34 | return validationResult; 35 | }; 36 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/pages/login/login.validation.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Credentials, 3 | CredentialsformErrors, 4 | createEmptyCredentialsformErrors, 5 | } from "./login.vm"; 6 | 7 | interface ValidationResult { 8 | succeeded: boolean; 9 | errors: CredentialsformErrors; 10 | } 11 | 12 | export const validateForm = (credentials: Credentials): ValidationResult => { 13 | let validationResult = { 14 | succeeded: true, 15 | errors: createEmptyCredentialsformErrors(), 16 | }; 17 | 18 | if (!credentials.user.trim()) { 19 | validationResult.errors = { 20 | ...validationResult.errors, 21 | user: "Debe informar el campo usuario", 22 | }; 23 | validationResult.succeeded = false; 24 | } 25 | 26 | if (!credentials.password.trim()) { 27 | validationResult.errors = { 28 | ...validationResult.errors, 29 | password: "Debe informar el campo contraseña", 30 | }; 31 | validationResult.succeeded = false; 32 | } 33 | 34 | return validationResult; 35 | }; 36 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "run-p -l start:vite start:mock-server", 8 | "start:vite": "vite", 9 | "build": "tsc && vite build", 10 | "preview": "vite preview", 11 | "start:mock-server": "cd ./server && npm start", 12 | "test": "vitest", 13 | "coverage": "vitest run --coverage", 14 | "postinstall": "cd ./server && npm install" 15 | }, 16 | "devDependencies": { 17 | "@types/jest": "^29.5.0", 18 | "@types/react": "^18.2.18", 19 | "@types/react-dom": "^18.2.7", 20 | "@vitejs/plugin-react": "^4.0.4", 21 | "npm-run-all": "^4.1.5", 22 | "typescript": "^4.9.3", 23 | "vite": "^4.1.0", 24 | "vite-plugin-checker": "^0.5.6", 25 | "vitest": "^0.29.8" 26 | }, 27 | "dependencies": { 28 | "axios": "^1.4.0", 29 | "react": "^18.2.0", 30 | "react-dom": "^18.2.0", 31 | "react-router-dom": "^6.14.2" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /13-banca-online/03-login/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "run-p -l start:vite start:mock-server", 8 | "start:vite": "vite", 9 | "build": "tsc && vite build", 10 | "preview": "vite preview", 11 | "start:mock-server": "cd ./server && npm start", 12 | "test": "vitest", 13 | "coverage": "vitest run --coverage", 14 | "postinstall": "cd ./server && npm install" 15 | }, 16 | "devDependencies": { 17 | "@types/jest": "^29.5.0", 18 | "@types/react": "^18.2.18", 19 | "@types/react-dom": "^18.2.7", 20 | "@vitejs/plugin-react": "^4.0.4", 21 | "npm-run-all": "^4.1.5", 22 | "typescript": "^4.9.3", 23 | "vite": "^4.1.0", 24 | "vite-plugin-checker": "^0.5.6", 25 | "vitest": "^0.29.8" 26 | }, 27 | "dependencies": { 28 | "axios": "^1.4.0", 29 | "react": "^18.2.0", 30 | "react-dom": "^18.2.0", 31 | "react-router-dom": "^6.14.2" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "run-p -l start:vite start:mock-server", 8 | "start:vite": "vite", 9 | "build": "tsc && vite build", 10 | "preview": "vite preview", 11 | "start:mock-server": "cd ./server && npm start", 12 | "test": "vitest", 13 | "coverage": "vitest run --coverage", 14 | "postinstall": "cd ./server && npm install" 15 | }, 16 | "devDependencies": { 17 | "@types/jest": "^29.5.0", 18 | "@types/react": "^18.2.18", 19 | "@types/react-dom": "^18.2.7", 20 | "@vitejs/plugin-react": "^4.0.4", 21 | "npm-run-all": "^4.1.5", 22 | "typescript": "^4.9.3", 23 | "vite": "^4.1.0", 24 | "vite-plugin-checker": "^0.5.6", 25 | "vitest": "^0.29.8" 26 | }, 27 | "dependencies": { 28 | "axios": "^1.4.0", 29 | "react": "^18.2.0", 30 | "react-dom": "^18.2.0", 31 | "react-router-dom": "^6.14.2" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /13-banca-online/01-boilerplate/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "run-p -l start:vite start:mock-server", 8 | "start:vite": "vite", 9 | "build": "tsc && vite build", 10 | "preview": "vite preview", 11 | "start:mock-server": "cd ./server && npm start", 12 | "test": "vitest", 13 | "coverage": "vitest run --coverage", 14 | "postinstall": "cd ./server && npm install" 15 | }, 16 | "devDependencies": { 17 | "@types/jest": "^29.5.0", 18 | "@types/react": "^18.2.18", 19 | "@types/react-dom": "^18.2.7", 20 | "@vitejs/plugin-react": "^4.0.4", 21 | "npm-run-all": "^4.1.5", 22 | "typescript": "^4.9.3", 23 | "vite": "^4.1.0", 24 | "vite-plugin-checker": "^0.5.6", 25 | "vitest": "^0.29.8" 26 | }, 27 | "dependencies": { 28 | "axios": "^1.4.0", 29 | "react": "^18.2.0", 30 | "react-dom": "^18.2.0", 31 | "react-router-dom": "^6.14.2" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/login/login.validation.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Credentials, 3 | CredentialsformErrors, 4 | createEmptyCredentialsformErrors, 5 | } from "./login.vm"; 6 | 7 | interface ValidationResult { 8 | succeeded: boolean; 9 | errors: CredentialsformErrors; 10 | } 11 | 12 | export const validateForm = (credentials: Credentials): ValidationResult => { 13 | let validationResult = { 14 | succeeded: true, 15 | errors: createEmptyCredentialsformErrors(), 16 | }; 17 | 18 | if (!credentials.user.trim()) { 19 | validationResult.errors = { 20 | ...validationResult.errors, 21 | user: "Debe informar el campo usuario", 22 | }; 23 | validationResult.succeeded = false; 24 | } 25 | 26 | if (!credentials.password.trim()) { 27 | validationResult.errors = { 28 | ...validationResult.errors, 29 | password: "Debe informar el campo contraseña", 30 | }; 31 | validationResult.succeeded = false; 32 | } 33 | 34 | return validationResult; 35 | }; 36 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "run-p -l start:vite start:mock-server", 8 | "start:vite": "vite", 9 | "build": "tsc && vite build", 10 | "preview": "vite preview", 11 | "start:mock-server": "cd ./server && npm start", 12 | "test": "vitest", 13 | "coverage": "vitest run --coverage", 14 | "postinstall": "cd ./server && npm install" 15 | }, 16 | "devDependencies": { 17 | "@types/jest": "^29.5.0", 18 | "@types/react": "^18.2.18", 19 | "@types/react-dom": "^18.2.7", 20 | "@vitejs/plugin-react": "^4.0.4", 21 | "npm-run-all": "^4.1.5", 22 | "typescript": "^4.9.3", 23 | "vite": "^4.1.0", 24 | "vite-plugin-checker": "^0.5.6", 25 | "vitest": "^0.29.8" 26 | }, 27 | "dependencies": { 28 | "axios": "^1.4.0", 29 | "react": "^18.2.0", 30 | "react-dom": "^18.2.0", 31 | "react-router-dom": "^6.14.2" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-sandbox", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "run-p -l start:vite start:mock-server", 8 | "start:vite": "vite", 9 | "build": "tsc && vite build", 10 | "preview": "vite preview", 11 | "start:mock-server": "cd ./server && npm start", 12 | "test": "vitest", 13 | "coverage": "vitest run --coverage", 14 | "postinstall": "cd ./server && npm install" 15 | }, 16 | "devDependencies": { 17 | "@types/jest": "^29.5.0", 18 | "@types/react": "^18.2.18", 19 | "@types/react-dom": "^18.2.7", 20 | "@vitejs/plugin-react": "^4.0.4", 21 | "npm-run-all": "^4.1.5", 22 | "typescript": "^4.9.3", 23 | "vite": "^4.1.0", 24 | "vite-plugin-checker": "^0.5.6", 25 | "vitest": "^0.29.8" 26 | }, 27 | "dependencies": { 28 | "axios": "^1.4.0", 29 | "react": "^18.2.0", 30 | "react-dom": "^18.2.0", 31 | "react-router-dom": "^6.14.2" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/pages/login/login.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Credentials } from "./login.vm"; 3 | import { LoginFormComponent } from "./components/login-form.component"; 4 | import { useNavigate } from "react-router-dom"; 5 | import { isValidLogin } from "./api"; 6 | import { mapCredentialFromVmToApi } from "./login.mapper"; 7 | import { appRoutes } from "@/core/router"; 8 | 9 | export const LoginPage: React.FC = () => { 10 | const navigate = useNavigate(); 11 | 12 | const handleSubmit = (credentials: Credentials) => { 13 | const apiCredential = mapCredentialFromVmToApi(credentials); 14 | isValidLogin(apiCredential).then((isValid) => { 15 | if (isValid) { 16 | navigate(appRoutes.accountList); 17 | } else { 18 | alert("Usuario o clave no correctas ppsst: admin@email.com / test "); 19 | } 20 | }); 21 | }; 22 | 23 | return ( 24 |
25 |

Acceso

26 | 27 |
28 | ); 29 | }; 30 | -------------------------------------------------------------------------------- /13-banca-online/02-rutas/src/core/router/router.component.tsx: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Routes, Route } from "react-router-dom"; 2 | import { appRoutes } from "@/core/router"; 3 | import { 4 | LoginPage, 5 | AccountListPage, 6 | AccountPage, 7 | MovementListPage, 8 | TransferPage, 9 | } from "@/pages"; 10 | 11 | export const Router = () => { 12 | return ( 13 | 14 | 15 | } /> 16 | } /> 17 | } /> 18 | } /> 19 | } /> 20 | } /> 21 | } 24 | /> 25 | 26 | 27 | ); 28 | }; 29 | -------------------------------------------------------------------------------- /13-banca-online/03-login/src/core/router/router.component.tsx: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Routes, Route } from "react-router-dom"; 2 | import { appRoutes } from "@/core/router"; 3 | import { 4 | LoginPage, 5 | AccountListPage, 6 | AccountPage, 7 | MovementListPage, 8 | TransferPage, 9 | } from "@/pages"; 10 | 11 | export const Router = () => { 12 | return ( 13 | 14 | 15 | } /> 16 | } /> 17 | } /> 18 | } /> 19 | } /> 20 | } /> 21 | } 24 | /> 25 | 26 | 27 | ); 28 | }; 29 | -------------------------------------------------------------------------------- /13-banca-online/04-estilado/src/core/router/router.component.tsx: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Routes, Route } from "react-router-dom"; 2 | import { appRoutes } from "@/core/router"; 3 | import { 4 | LoginPage, 5 | AccountListPage, 6 | AccountPage, 7 | MovementListPage, 8 | TransferPage, 9 | } from "@/pages"; 10 | 11 | export const Router = () => { 12 | return ( 13 | 14 | 15 | } /> 16 | } /> 17 | } /> 18 | } /> 19 | } /> 20 | } /> 21 | } 24 | /> 25 | 26 | 27 | ); 28 | }; 29 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/pages/account-list/account-list.page.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link, generatePath } from "react-router-dom"; 3 | import { appRoutes } from "@/core/router"; 4 | import { AppLayout } from "@/layouts"; 5 | 6 | export const AccountListPage: React.FC = () => { 7 | return ( 8 | 9 |
10 | Account List 11 |
12 | 13 | Movimientos de cuenta 1 14 | 15 |
16 | Transferencia 17 |
18 | 19 | Transferencia desde cuenta 1 20 | 21 |
22 | Crear cuenta 23 |
24 | 25 | Editar cuenta 1 26 | 27 |
28 |
29 | ); 30 | }; 31 | -------------------------------------------------------------------------------- /13-banca-online/06-mis-cuentas/src/core/router/router.component.tsx: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Routes, Route } from "react-router-dom"; 2 | import { appRoutes } from "@/core/router"; 3 | import { 4 | LoginPage, 5 | AccountListPage, 6 | AccountPage, 7 | MovementListPage, 8 | TransferPage, 9 | } from "@/pages"; 10 | 11 | export const Router = () => { 12 | return ( 13 | 14 | 15 | } /> 16 | } /> 17 | } /> 18 | } /> 19 | } /> 20 | } /> 21 | } 24 | /> 25 | 26 | 27 | ); 28 | }; 29 | -------------------------------------------------------------------------------- /13-banca-online/07-transferencia/src/core/router/router.component.tsx: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Routes, Route } from "react-router-dom"; 2 | import { appRoutes } from "@/core/router"; 3 | import { 4 | LoginPage, 5 | AccountListPage, 6 | AccountPage, 7 | MovementListPage, 8 | TransferPage, 9 | } from "@/pages"; 10 | 11 | export const Router = () => { 12 | return ( 13 | 14 | 15 | } /> 16 | } /> 17 | } /> 18 | } /> 19 | } /> 20 | } /> 21 | } 24 | /> 25 | 26 | 27 | ); 28 | }; 29 | -------------------------------------------------------------------------------- /13-banca-online/05-app-cuentas-layout/src/core/router/router.component.tsx: -------------------------------------------------------------------------------- 1 | import { BrowserRouter, Routes, Route } from "react-router-dom"; 2 | import { appRoutes } from "@/core/router"; 3 | import { 4 | LoginPage, 5 | AccountListPage, 6 | AccountPage, 7 | MovementListPage, 8 | TransferPage, 9 | } from "@/pages"; 10 | 11 | export const Router = () => { 12 | return ( 13 | 14 | 15 | } /> 16 | } /> 17 | } /> 18 | } /> 19 | } /> 20 | } /> 21 | } 24 | /> 25 | 26 | 27 | ); 28 | }; 29 | --------------------------------------------------------------------------------