├── packages
├── mf-connect
│ ├── src
│ │ ├── index.ts
│ │ └── scripts
│ │ │ ├── index.ts
│ │ │ └── utils
│ │ │ ├── index.ts
│ │ │ ├── lib
│ │ │ └── types.ts
│ │ │ ├── addScripts.ts
│ │ │ ├── changePackage.ts
│ │ │ ├── getConfig.ts
│ │ │ └── removeScripts.ts
│ ├── .eslintignore
│ ├── README.md
│ ├── tsconfig.json
│ └── bin
│ │ └── index.js
├── ui-kit
│ ├── src
│ │ ├── index.ts
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ └── atoms
│ │ │ │ ├── index.ts
│ │ │ │ └── Flex
│ │ │ │ └── lib
│ │ │ │ └── types
│ │ │ │ └── index.ts
│ │ ├── vite-env.d.ts
│ │ ├── global.d.ts
│ │ ├── frontend.d.ts
│ │ ├── assets
│ │ │ └── icon-mask.svg
│ │ └── index.css
│ ├── README.md
│ ├── LICENSE
│ ├── tailwind.config.js
│ ├── tsconfig.node.json
│ ├── postcss.config.cjs
│ └── .eslintrc.cjs
├── download-locale
│ ├── src
│ │ ├── index.ts
│ │ └── scripts
│ │ │ ├── index.ts
│ │ │ └── utils
│ │ │ ├── index.ts
│ │ │ ├── lib
│ │ │ └── types.ts
│ │ │ └── getConfig.ts
│ └── tsconfig.json
├── frontend-common
│ ├── src
│ │ ├── index.ts
│ │ └── axios
│ │ │ ├── interceptors
│ │ │ ├── request
│ │ │ │ ├── index.ts
│ │ │ │ └── addToken.ts
│ │ │ ├── response
│ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ │ └── index.ts
│ ├── .eslintrc.json
│ ├── jest.config.js
│ ├── README.md
│ └── tsconfig.json
├── create-by-template
│ ├── src
│ │ ├── index.ts
│ │ └── scripts
│ │ │ ├── page
│ │ │ ├── index.ts
│ │ │ └── remove.ts
│ │ │ ├── service
│ │ │ ├── index.ts
│ │ │ └── remove.ts
│ │ │ ├── widget
│ │ │ ├── index.ts
│ │ │ └── remove.ts
│ │ │ ├── index.ts
│ │ │ └── utils
│ │ │ ├── lib
│ │ │ └── enums.ts
│ │ │ ├── index.ts
│ │ │ ├── getConfig.ts
│ │ │ └── removeFolder.ts
│ └── tsconfig.json
├── generate-hooks-rtk
│ ├── src
│ │ ├── index.ts
│ │ └── scripts
│ │ │ ├── index.ts
│ │ │ └── utils
│ │ │ ├── index.ts
│ │ │ ├── lib
│ │ │ ├── types.ts
│ │ │ └── deleteImportsFromFIle.ts
│ │ │ └── getConfig.ts
│ ├── types
│ │ └── export.d.ts
│ └── tsconfig.json
├── utils
│ ├── src
│ │ ├── indexed-db
│ │ │ └── index.ts
│ │ ├── utils
│ │ │ ├── asPathnameParam.ts
│ │ │ ├── lodashToESM
│ │ │ │ ├── index.ts
│ │ │ │ └── freeGlobal.ts
│ │ │ ├── createTempImageLinkFromBlob.ts
│ │ │ ├── arrayBufferToBase64.ts
│ │ │ ├── base64ToArrayBuffer.ts
│ │ │ ├── binaryToLink.ts
│ │ │ ├── index.ts
│ │ │ ├── clsx.ts
│ │ │ ├── deepClone.ts
│ │ │ └── addDarkThemeColor.ts
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ ├── ErrorBoundary
│ │ │ │ └── index.tsx
│ │ │ ├── ArrayRender
│ │ │ │ └── index.tsx
│ │ │ └── ServiceInjector
│ │ │ │ └── index.tsx
│ │ ├── index.ts
│ │ ├── local-and-session-storage
│ │ │ ├── index.ts
│ │ │ ├── getFromLocalStorage.ts
│ │ │ ├── setToSessionStorage.ts
│ │ │ ├── getFromSessionStorage.ts
│ │ │ └── setToLocalStorage.ts
│ │ └── hooks
│ │ │ ├── useMockData
│ │ │ ├── types.ts
│ │ │ └── generateRandomValue.ts
│ │ │ ├── index.ts
│ │ │ ├── useFocus.ts
│ │ │ ├── useDebounce
│ │ │ └── index.test.ts
│ │ │ ├── useThrottle
│ │ │ └── index.test.ts
│ │ │ └── usePortraitDetect.ts
│ ├── vitest-setup.ts
│ ├── .eslintrc.json
│ └── tsconfig.node.json
├── frontend-event-bus
│ ├── src
│ │ ├── index.ts
│ │ └── microfrontends
│ │ │ ├── mfTypes
│ │ │ ├── index.ts
│ │ │ ├── notification.ts
│ │ │ └── utils.ts
│ │ │ ├── index.ts
│ │ │ └── enum.ts
│ ├── .eslintrc.json
│ ├── jest.config.js
│ ├── README.md
│ └── tsconfig.json
├── frontend-constants
│ ├── src
│ │ ├── index.ts
│ │ ├── queryParameters
│ │ │ └── index.ts
│ │ └── routes
│ │ │ └── index.ts
│ ├── .eslintrc.json
│ ├── README.md
│ ├── jest.config.js
│ └── tsconfig.json
├── update-packages
│ ├── .eslintrc.json
│ ├── package.json
│ └── tsconfig.json
├── types
│ ├── global.d.ts
│ ├── frontend.d.ts
│ └── package.json
├── frontend-tailwind-config
│ └── package.json
└── eslint-config
│ └── README.md
├── _templates
├── rtkgen
│ ├── service
│ │ ├── constants
│ │ │ ├── index.ts
│ │ │ └── name.ts
│ │ ├── lib
│ │ │ └── types.ts
│ │ ├── structure
│ │ │ └── index.ts
│ │ ├── index.tsx
│ │ ├── mappers
│ │ │ └── index.tsx
│ │ ├── store
│ │ │ └── index.ts
│ │ └── container
│ │ │ └── index.ts
│ ├── widget
│ │ ├── lib
│ │ │ └── types
│ │ │ │ └── index.ts
│ │ ├── constants
│ │ │ ├── index.ts
│ │ │ ├── data-testid.ts
│ │ │ └── name.ts
│ │ ├── structure
│ │ │ └── index.ts
│ │ ├── container
│ │ │ ├── index.tsx
│ │ │ └── useContainer.ts
│ │ ├── index.tsx
│ │ ├── templates
│ │ │ └── Sample
│ │ │ │ └── index.tsx
│ │ ├── store
│ │ │ └── index.ts
│ │ └── ui
│ │ │ └── index.tsx
│ ├── react_blank
│ │ ├── .dockerignore
│ │ ├── src
│ │ │ ├── react-app-env.d.ts
│ │ │ ├── frontend.d.ts
│ │ │ ├── global.d.ts
│ │ │ ├── constants
│ │ │ │ ├── routes
│ │ │ │ │ └── index.ts
│ │ │ │ ├── app
│ │ │ │ │ └── index.ts
│ │ │ │ └── index.ts
│ │ │ ├── app
│ │ │ │ ├── entry
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── ui
│ │ │ │ │ │ └── index.tsx
│ │ │ │ │ └── container
│ │ │ │ │ │ └── index.tsx
│ │ │ │ ├── providers
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── ReduxStoreProvider
│ │ │ │ │ │ └── index.tsx
│ │ │ │ ├── store
│ │ │ │ │ ├── reducers.ts
│ │ │ │ │ ├── generated
│ │ │ │ │ │ ├── middlewares.ts
│ │ │ │ │ │ └── reducers.ts
│ │ │ │ │ └── store.ts
│ │ │ │ ├── api
│ │ │ │ │ └── RTK.ts
│ │ │ │ └── router
│ │ │ │ │ └── index.tsx
│ │ │ ├── index.ts
│ │ │ ├── features
│ │ │ │ └── services
│ │ │ │ │ └── appSize
│ │ │ │ │ ├── constants
│ │ │ │ │ └── name.ts
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ ├── structure
│ │ │ │ │ └── index.ts
│ │ │ │ │ ├── store
│ │ │ │ │ └── index.ts
│ │ │ │ │ └── container
│ │ │ │ │ └── index.ts
│ │ │ ├── pages
│ │ │ │ └── Simple
│ │ │ │ │ └── index.tsx
│ │ │ ├── utils
│ │ │ │ └── lib
│ │ │ │ │ └── types
│ │ │ │ │ └── useForm.ts
│ │ │ ├── components
│ │ │ │ └── templates
│ │ │ │ │ ├── 404
│ │ │ │ │ └── index.tsx
│ │ │ │ │ ├── _Sample
│ │ │ │ │ └── index.tsx
│ │ │ │ │ └── Loading
│ │ │ │ │ └── index.tsx
│ │ │ ├── setupTests.ts
│ │ │ ├── modules
│ │ │ │ ├── export
│ │ │ │ │ └── Exported.js
│ │ │ │ └── import
│ │ │ │ │ └── index.js
│ │ │ ├── layouts
│ │ │ │ ├── Main
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Secondary
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── reportWebVitals.ts
│ │ │ ├── index.css
│ │ │ └── index.tsx
│ │ ├── public
│ │ │ ├── robots.txt
│ │ │ ├── favicon.ico
│ │ │ ├── logo192.png
│ │ │ ├── logo512.png
│ │ │ ├── manifest.json
│ │ │ └── index.html
│ │ ├── .env.development
│ │ ├── tailwind.config.js
│ │ ├── .eslintignore
│ │ ├── .env.production
│ │ ├── postcss.config.js
│ │ ├── .MF.module.js
│ │ ├── .gitignore
│ │ └── Dockerfile
│ └── page
│ │ ├── constants
│ │ └── data-testid.ts
│ │ └── index.tsx
└── rtkthunk
│ ├── react_blank
│ ├── .dockerignore
│ ├── src
│ │ ├── react-app-env.d.ts
│ │ ├── global.d.ts
│ │ ├── frontend.d.ts
│ │ ├── constants
│ │ │ ├── routes
│ │ │ │ └── index.ts
│ │ │ ├── app
│ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ ├── app
│ │ │ ├── entry
│ │ │ │ ├── index.tsx
│ │ │ │ ├── ui
│ │ │ │ │ └── index.tsx
│ │ │ │ └── container
│ │ │ │ │ └── index.tsx
│ │ │ ├── providers
│ │ │ │ ├── index.tsx
│ │ │ │ └── ReduxStoreProvider
│ │ │ │ │ └── index.tsx
│ │ │ ├── store
│ │ │ │ ├── reducers.ts
│ │ │ │ └── generated
│ │ │ │ │ ├── middlewares.ts
│ │ │ │ │ └── reducers.ts
│ │ │ ├── api
│ │ │ │ └── RTK.ts
│ │ │ └── router
│ │ │ │ └── index.tsx
│ │ ├── index.ts
│ │ ├── features
│ │ │ └── services
│ │ │ │ └── appSize
│ │ │ │ ├── constants
│ │ │ │ └── name.ts
│ │ │ │ ├── index.tsx
│ │ │ │ ├── structure
│ │ │ │ └── index.ts
│ │ │ │ ├── store
│ │ │ │ └── index.ts
│ │ │ │ └── container
│ │ │ │ └── index.ts
│ │ ├── pages
│ │ │ └── Simple
│ │ │ │ └── index.tsx
│ │ ├── utils
│ │ │ ├── lib
│ │ │ │ └── types
│ │ │ │ │ └── useForm.ts
│ │ │ └── functions
│ │ │ │ └── thunkCreator
│ │ │ │ └── lib
│ │ │ │ ├── types.ts
│ │ │ │ └── appStatusHandlers.ts
│ │ ├── components
│ │ │ ├── templates
│ │ │ │ ├── 404
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── Loading
│ │ │ │ │ └── index.tsx
│ │ │ │ └── _Sample
│ │ │ │ │ └── index.tsx
│ │ │ ├── atoms
│ │ │ │ └── _Sample
│ │ │ │ │ └── index.tsx
│ │ │ └── molecules
│ │ │ │ └── _Sample
│ │ │ │ └── index.tsx
│ │ ├── setupTests.ts
│ │ ├── modules
│ │ │ ├── export
│ │ │ │ └── Exported.js
│ │ │ └── import
│ │ │ │ └── index.js
│ │ ├── layouts
│ │ │ ├── Main
│ │ │ │ └── index.tsx
│ │ │ ├── Secondary
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── reportWebVitals.ts
│ │ ├── index.css
│ │ └── index.tsx
│ ├── public
│ │ ├── robots.txt
│ │ ├── manifest.json
│ │ └── index.html
│ ├── .env.development
│ ├── tailwind.config.js
│ ├── .eslintignore
│ ├── .env.production
│ ├── postcss.config.js
│ ├── .MF.module.js
│ ├── .gitignore
│ └── Dockerfile
│ ├── widget
│ └── _Sample
│ │ ├── lib
│ │ └── types
│ │ │ └── index.ts
│ │ ├── structure
│ │ └── index.ts
│ │ ├── constants
│ │ ├── data-testid.ts
│ │ └── name.ts
│ │ ├── container
│ │ ├── index.tsx
│ │ └── useContainer.ts
│ │ ├── index.tsx
│ │ ├── templates
│ │ └── Sample
│ │ │ └── index.tsx
│ │ ├── store
│ │ └── index.ts
│ │ └── ui
│ │ └── index.tsx
│ └── service
│ └── _sample
│ ├── lib
│ └── types.ts
│ ├── structure
│ └── index.ts
│ ├── effects
│ ├── export
│ │ └── index.ts
│ └── sample.ts
│ ├── constants
│ └── name.ts
│ ├── index.tsx
│ ├── mappers
│ └── index.tsx
│ ├── api
│ └── index.ts
│ └── container
│ └── index.ts
├── frontend
├── app_auth
│ ├── .dockerignore
│ ├── src
│ │ ├── global.d.ts
│ │ ├── react-app-env.d.ts
│ │ ├── frontend.d.ts
│ │ ├── constants
│ │ │ ├── routes
│ │ │ │ └── index.ts
│ │ │ ├── app
│ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ ├── app
│ │ │ ├── entry
│ │ │ │ ├── index.tsx
│ │ │ │ ├── ui
│ │ │ │ │ └── index.tsx
│ │ │ │ └── container
│ │ │ │ │ └── index.tsx
│ │ │ ├── store
│ │ │ │ ├── generated
│ │ │ │ │ ├── reducers.ts
│ │ │ │ │ └── middlewares.ts
│ │ │ │ ├── reducers.ts
│ │ │ │ └── store.ts
│ │ │ ├── providers
│ │ │ │ ├── index.tsx
│ │ │ │ └── ReduxStoreProvider
│ │ │ │ │ └── index.tsx
│ │ │ ├── api
│ │ │ │ └── RTK.ts
│ │ │ └── router
│ │ │ │ └── index.tsx
│ │ ├── pages
│ │ │ ├── InvisibleAuthModule
│ │ │ │ └── index.ts
│ │ │ └── MainForm
│ │ │ │ └── index.tsx
│ │ ├── features
│ │ │ ├── generated
│ │ │ │ └── hooks.ts
│ │ │ └── services
│ │ │ │ └── appSize
│ │ │ │ ├── constants
│ │ │ │ └── name.ts
│ │ │ │ ├── index.tsx
│ │ │ │ ├── structure
│ │ │ │ └── index.ts
│ │ │ │ ├── store
│ │ │ │ └── index.ts
│ │ │ │ └── container
│ │ │ │ └── index.ts
│ │ ├── index.ts
│ │ ├── components
│ │ │ └── templates
│ │ │ │ ├── 404
│ │ │ │ └── index.tsx
│ │ │ │ ├── _Sample
│ │ │ │ └── index.tsx
│ │ │ │ └── Loading
│ │ │ │ └── index.tsx
│ │ ├── utils
│ │ │ └── lib
│ │ │ │ └── types
│ │ │ │ └── useForm.ts
│ │ ├── setupTests.ts
│ │ ├── modules
│ │ │ └── export
│ │ │ │ ├── Exported.js
│ │ │ │ └── AuthService.js
│ │ ├── layouts
│ │ │ ├── Main
│ │ │ │ └── index.tsx
│ │ │ └── index.tsx
│ │ ├── reportWebVitals.ts
│ │ ├── index.css
│ │ └── index.tsx
│ ├── public
│ │ ├── robots.txt
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── index.html
│ ├── tailwind.config.js
│ ├── .eslintignore
│ ├── .env.development
│ ├── .env.production
│ ├── postcss.config.js
│ ├── .MF.module.js
│ ├── .gitignore
│ └── Dockerfile
└── app_root
│ ├── .dockerignore
│ ├── src
│ ├── global.d.ts
│ ├── react-app-env.d.ts
│ ├── features
│ │ └── services
│ │ │ ├── service
│ │ │ ├── constants
│ │ │ │ ├── index.ts
│ │ │ │ └── name.ts
│ │ │ ├── lib
│ │ │ │ └── types.ts
│ │ │ ├── structure
│ │ │ │ └── index.ts
│ │ │ ├── index.tsx
│ │ │ ├── mappers
│ │ │ │ └── index.tsx
│ │ │ ├── store
│ │ │ │ └── index.ts
│ │ │ └── container
│ │ │ │ └── index.ts
│ │ │ ├── theme
│ │ │ ├── structure
│ │ │ │ └── index.ts
│ │ │ ├── constants
│ │ │ │ └── name.ts
│ │ │ ├── index.tsx
│ │ │ ├── container
│ │ │ │ └── index.ts
│ │ │ └── store
│ │ │ │ └── index.ts
│ │ │ ├── logs
│ │ │ ├── index.tsx
│ │ │ ├── constants
│ │ │ │ └── name.ts
│ │ │ └── container
│ │ │ │ └── index.ts
│ │ │ └── appSize
│ │ │ ├── constants
│ │ │ └── name.ts
│ │ │ ├── index.tsx
│ │ │ ├── structure
│ │ │ └── index.ts
│ │ │ ├── store
│ │ │ └── index.ts
│ │ │ └── container
│ │ │ └── index.ts
│ ├── frontend.d.ts
│ ├── constants
│ │ ├── routes
│ │ │ └── index.ts
│ │ ├── app
│ │ │ └── index.ts
│ │ └── index.ts
│ ├── app
│ │ ├── entry
│ │ │ ├── index.tsx
│ │ │ ├── ui
│ │ │ │ └── index.tsx
│ │ │ └── container
│ │ │ │ └── index.tsx
│ │ ├── providers
│ │ │ ├── index.tsx
│ │ │ └── ReduxStoreProvider
│ │ │ │ └── index.tsx
│ │ ├── router
│ │ │ ├── index.tsx
│ │ │ └── utils
│ │ │ │ ├── config.ts
│ │ │ │ └── pages.ts
│ │ ├── store
│ │ │ ├── generated
│ │ │ │ ├── middlewares.ts
│ │ │ │ └── reducers.ts
│ │ │ ├── reducers.ts
│ │ │ └── store.ts
│ │ ├── api
│ │ │ └── RTK.ts
│ │ └── localization
│ │ │ └── index.ts
│ ├── pages
│ │ ├── Auth
│ │ │ └── index.tsx
│ │ └── Main
│ │ │ └── index.tsx
│ ├── components
│ │ └── templates
│ │ │ ├── 404
│ │ │ └── index.tsx
│ │ │ ├── _Sample
│ │ │ └── index.tsx
│ │ │ └── Loading
│ │ │ └── index.tsx
│ ├── utils
│ │ └── lib
│ │ │ └── types
│ │ │ └── useForm.ts
│ ├── setupTests.ts
│ ├── modules
│ │ ├── export
│ │ │ └── Exported.js
│ │ └── import
│ │ │ └── index.js
│ ├── layouts
│ │ ├── Empty
│ │ │ └── index.tsx
│ │ ├── Secondary
│ │ │ └── index.tsx
│ │ ├── Main
│ │ │ └── index.tsx
│ │ └── index.tsx
│ ├── index.ts
│ ├── reportWebVitals.ts
│ └── index.tsx
│ ├── public
│ ├── robots.txt
│ ├── favicon.ico
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── index.html
│ ├── tailwind.config.js
│ ├── .MF.module.js
│ ├── .eslintignore
│ ├── .env.development
│ ├── .env.production
│ ├── postcss.config.js
│ ├── .config.locale.js
│ ├── .gitignore
│ └── Dockerfile
├── other
├── business_card
│ ├── src
│ │ ├── global.d.ts
│ │ ├── react-app-env.d.ts
│ │ ├── frontend.d.ts
│ │ ├── components
│ │ │ ├── Paper
│ │ │ │ └── index.tsx
│ │ │ ├── bg
│ │ │ │ └── index.tsx
│ │ │ └── FloattingPannel
│ │ │ │ └── index.tsx
│ │ ├── index.tsx
│ │ ├── reportWebVitals.ts
│ │ └── assets
│ │ │ └── svg
│ │ │ └── telegram.tsx
│ ├── public
│ │ ├── robots.txt
│ │ ├── manifest.json
│ │ └── index.html
│ ├── tailwind.config.js
│ └── postcss.config.js
└── algorithms
│ ├── src
│ ├── _sample
│ │ ├── index.ts
│ │ └── index.test.ts
│ ├── theory
│ │ ├── js
│ │ │ └── hosting
│ │ │ │ ├── 1.js
│ │ │ │ ├── 2.js
│ │ │ │ └── 3.js
│ │ └── browser
│ │ │ └── async-vs-defer.md
│ ├── structures
│ │ ├── 5.trees
│ │ │ └── 6.suffix-tree
│ │ │ │ ├── 6.1.simple
│ │ │ │ └── index.test.ts
│ │ │ │ ├── 6.2.Ukkonen
│ │ │ │ └── index.test.ts
│ │ │ │ └── 6.3.McCreight
│ │ │ │ └── index.test.ts
│ │ ├── 4.associative-data-structures
│ │ │ └── 1.dictionary
│ │ │ │ └── index.ts
│ │ └── 2.linear
│ │ │ ├── stack
│ │ │ ├── index.test.ts
│ │ │ └── index.ts
│ │ │ └── queue
│ │ │ ├── index.test.ts
│ │ │ └── index.ts
│ └── algorithms
│ │ ├── trash
│ │ └── GetMaxPreffix
│ │ │ ├── index.ts
│ │ │ └── _.test.ts
│ │ ├── sortings
│ │ └── README.md
│ │ └── other
│ │ └── KnapsackProblem
│ │ ├── index.test.ts
│ │ └── index.ts
│ ├── .eslintrc.json
│ ├── package.json
│ ├── jest.config.js
│ └── tsconfig.json
├── .eslintignore
├── _doc
├── CodeStyle
│ ├── 1.png
│ ├── 2.png
│ ├── 3.png
│ └── Readme.MD
├── AboutCSS
│ ├── badCode.png
│ ├── figma.jpg
│ ├── plugin.png
│ ├── figma-fix.png
│ ├── Typography.png
│ ├── figma-colors.png
│ └── figma-full.png
├── Architect&Structure
│ ├── i1.png
│ ├── widget.png
│ └── service.png
└── NPM
│ └── README.md
├── _config
└── scriptsForBundle
│ ├── index.js
│ └── getKeys.js
├── .editorconfig
├── .eslintrc
├── turbo.json
└── tsconfig.json
/packages/mf-connect/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './scripts'
2 |
--------------------------------------------------------------------------------
/packages/ui-kit/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './components'
2 |
--------------------------------------------------------------------------------
/packages/download-locale/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './scripts'
2 |
--------------------------------------------------------------------------------
/packages/frontend-common/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './axios'
2 |
--------------------------------------------------------------------------------
/packages/ui-kit/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export * from './atoms'
2 |
--------------------------------------------------------------------------------
/_templates/rtkgen/service/constants/index.ts:
--------------------------------------------------------------------------------
1 | export * from './name'
2 |
--------------------------------------------------------------------------------
/frontend/app_auth/.dockerignore:
--------------------------------------------------------------------------------
1 | .git/
2 | .idea/
3 | node_modules
4 |
--------------------------------------------------------------------------------
/frontend/app_root/.dockerignore:
--------------------------------------------------------------------------------
1 | .git/
2 | .idea/
3 | node_modules
4 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './scripts'
2 |
--------------------------------------------------------------------------------
/packages/download-locale/src/scripts/index.ts:
--------------------------------------------------------------------------------
1 | export * from './utils'
2 |
--------------------------------------------------------------------------------
/packages/generate-hooks-rtk/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './scripts'
2 |
--------------------------------------------------------------------------------
/packages/mf-connect/.eslintignore:
--------------------------------------------------------------------------------
1 | /dist
2 | /.turbo
3 | /node_modules
4 |
--------------------------------------------------------------------------------
/packages/mf-connect/src/scripts/index.ts:
--------------------------------------------------------------------------------
1 | export * from './utils/'
2 |
--------------------------------------------------------------------------------
/packages/utils/src/indexed-db/index.ts:
--------------------------------------------------------------------------------
1 | export * from './IndexedDB'
2 |
--------------------------------------------------------------------------------
/_templates/rtkgen/widget/lib/types/index.ts:
--------------------------------------------------------------------------------
1 | export type SampleType = {}
2 |
--------------------------------------------------------------------------------
/packages/frontend-event-bus/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './microfrontends'
2 |
--------------------------------------------------------------------------------
/packages/generate-hooks-rtk/src/scripts/index.ts:
--------------------------------------------------------------------------------
1 | export * from './utils'
2 |
--------------------------------------------------------------------------------
/packages/ui-kit/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/.dockerignore:
--------------------------------------------------------------------------------
1 | .git/
2 | .idea/
3 | node_modules
4 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/.dockerignore:
--------------------------------------------------------------------------------
1 | .git/
2 | .idea/
3 | node_modules
4 |
--------------------------------------------------------------------------------
/other/business_card/src/global.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/ui-kit/README.md:
--------------------------------------------------------------------------------
1 | # ruk
2 | open source mobile first ui kit for react
3 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | **/build/
2 | **/generated/
3 | **/dist/
4 | **/node_modules
5 |
6 |
7 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/widget/_Sample/lib/types/index.ts:
--------------------------------------------------------------------------------
1 | export type SimpleType = {}
2 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/global.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/frontend/app_root/src/global.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/frontend/app_root/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/other/business_card/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/ui-kit/src/global.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/frontend.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/service/constants/index.ts:
--------------------------------------------------------------------------------
1 | export * from './name'
2 |
--------------------------------------------------------------------------------
/frontend/app_root/src/frontend.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/other/algorithms/src/_sample/index.ts:
--------------------------------------------------------------------------------
1 | //
2 | //
3 | //
4 | export class _sample {}
5 |
--------------------------------------------------------------------------------
/other/business_card/src/frontend.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/ui-kit/src/frontend.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/frontend-common/src/axios/interceptors/request/index.ts:
--------------------------------------------------------------------------------
1 | export * from './addToken'
2 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/frontend.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/global.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/global.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/_doc/CodeStyle/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/CodeStyle/1.png
--------------------------------------------------------------------------------
/_doc/CodeStyle/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/CodeStyle/2.png
--------------------------------------------------------------------------------
/_doc/CodeStyle/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/CodeStyle/3.png
--------------------------------------------------------------------------------
/_templates/rtkgen/service/lib/types.ts:
--------------------------------------------------------------------------------
1 | export type SampleType = {
2 | onClickHandler: Callback
3 | }
4 |
--------------------------------------------------------------------------------
/_templates/rtkgen/service/structure/index.ts:
--------------------------------------------------------------------------------
1 | export const initialState = {
2 | isLoading: false,
3 | }
4 |
--------------------------------------------------------------------------------
/_templates/rtkgen/widget/constants/index.ts:
--------------------------------------------------------------------------------
1 | export * from './name'
2 | export * from './data-testid'
3 |
--------------------------------------------------------------------------------
/_templates/rtkgen/widget/structure/index.ts:
--------------------------------------------------------------------------------
1 | export const initialState = {
2 | isLoading: false,
3 | }
4 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/frontend.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/other/algorithms/src/_sample/index.test.ts:
--------------------------------------------------------------------------------
1 | import {} from './index'
2 |
3 | describe('test', () => {})
4 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/scripts/page/index.ts:
--------------------------------------------------------------------------------
1 | export * from './add'
2 | export * from './remove'
3 |
--------------------------------------------------------------------------------
/packages/frontend-common/src/axios/interceptors/response/index.ts:
--------------------------------------------------------------------------------
1 | export * from './waitForTokenRefresh'
2 |
--------------------------------------------------------------------------------
/packages/frontend-constants/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './routes'
2 | export * from './queryParameters'
3 |
--------------------------------------------------------------------------------
/_templates/rtkgen/page/constants/data-testid.ts:
--------------------------------------------------------------------------------
1 | const name = 'Sample'
2 |
3 | export const dti = `${name}-`
4 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/scripts/service/index.ts:
--------------------------------------------------------------------------------
1 | export * from './add'
2 | export * from './remove'
3 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/scripts/widget/index.ts:
--------------------------------------------------------------------------------
1 | export * from './add'
2 | export * from './remove'
3 |
--------------------------------------------------------------------------------
/packages/frontend-common/src/axios/index.ts:
--------------------------------------------------------------------------------
1 | export * from './baseQuery'
2 | export * from './interceptors'
3 |
--------------------------------------------------------------------------------
/packages/generate-hooks-rtk/types/export.d.ts:
--------------------------------------------------------------------------------
1 | export type { ConfigFile } from '@rtk-query/codegen-openapi'
2 |
--------------------------------------------------------------------------------
/_doc/AboutCSS/badCode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/AboutCSS/badCode.png
--------------------------------------------------------------------------------
/_doc/AboutCSS/figma.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/AboutCSS/figma.jpg
--------------------------------------------------------------------------------
/_doc/AboutCSS/plugin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/AboutCSS/plugin.png
--------------------------------------------------------------------------------
/_templates/rtkthunk/service/_sample/lib/types.ts:
--------------------------------------------------------------------------------
1 | export type SampleType = {
2 | ClickHandler: () => void
3 | }
4 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/service/_sample/structure/index.ts:
--------------------------------------------------------------------------------
1 | export const initialState = {
2 | isLoading: false,
3 | }
4 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/widget/_Sample/structure/index.ts:
--------------------------------------------------------------------------------
1 | export const initialState = {
2 | isLoading: false,
3 | }
4 |
--------------------------------------------------------------------------------
/frontend/app_auth/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/constants/routes/index.ts:
--------------------------------------------------------------------------------
1 | export { RoutesEnum, routes } from '@npm.piece/constants-frontend'
2 |
--------------------------------------------------------------------------------
/frontend/app_root/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/frontend/app_root/src/constants/routes/index.ts:
--------------------------------------------------------------------------------
1 | export { RoutesEnum, routes } from '@npm.piece/constants-frontend'
2 |
--------------------------------------------------------------------------------
/other/business_card/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/packages/frontend-common/src/axios/interceptors/index.ts:
--------------------------------------------------------------------------------
1 | export * from './request'
2 | export * from './response'
3 |
--------------------------------------------------------------------------------
/packages/utils/src/utils/asPathnameParam.ts:
--------------------------------------------------------------------------------
1 | export const asPathnameParam = (pathname: string) => `:${pathname}`
2 |
--------------------------------------------------------------------------------
/packages/utils/vitest-setup.ts:
--------------------------------------------------------------------------------
1 | import indexeddb from 'fake-indexeddb'
2 |
3 | globalThis.indexedDB = indexeddb
4 |
--------------------------------------------------------------------------------
/_doc/AboutCSS/figma-fix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/AboutCSS/figma-fix.png
--------------------------------------------------------------------------------
/_templates/rtkgen/widget/constants/data-testid.ts:
--------------------------------------------------------------------------------
1 | import { name } from './name'
2 |
3 | export const dti = `${name}-`
4 |
--------------------------------------------------------------------------------
/_doc/AboutCSS/Typography.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/AboutCSS/Typography.png
--------------------------------------------------------------------------------
/_doc/AboutCSS/figma-colors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/AboutCSS/figma-colors.png
--------------------------------------------------------------------------------
/_doc/AboutCSS/figma-full.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/AboutCSS/figma-full.png
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/service/lib/types.ts:
--------------------------------------------------------------------------------
1 | export type SampleType = {
2 | onClickHandler: Callback
3 | }
4 |
--------------------------------------------------------------------------------
/other/algorithms/src/theory/js/hosting/1.js:
--------------------------------------------------------------------------------
1 | console.log(myVar) // undefined
2 | var myVar = 5
3 | console.log(myVar) // 5
4 |
--------------------------------------------------------------------------------
/packages/download-locale/src/scripts/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './getConfig'
2 | export * from './downloadGoogleSheet'
3 |
--------------------------------------------------------------------------------
/packages/frontend-common/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "@typescript-eslint/no-explicit-any": "off"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/frontend-event-bus/src/microfrontends/mfTypes/index.ts:
--------------------------------------------------------------------------------
1 | export * from './notification'
2 | export * from './utils'
3 |
--------------------------------------------------------------------------------
/_doc/Architect&Structure/i1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/Architect&Structure/i1.png
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/constants/routes/index.ts:
--------------------------------------------------------------------------------
1 | export { RoutesEnum, routes } from '@npm.piece/constants-frontend'
2 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/constants/routes/index.ts:
--------------------------------------------------------------------------------
1 | export { RoutesEnum, routes } from '@npm.piece/constants-frontend'
2 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/widget/_Sample/constants/data-testid.ts:
--------------------------------------------------------------------------------
1 | import { name } from './name'
2 |
3 | export const dti = `${name}-`
4 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/service/structure/index.ts:
--------------------------------------------------------------------------------
1 | export const initialState = {
2 | isLoading: false,
3 | }
4 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/theme/structure/index.ts:
--------------------------------------------------------------------------------
1 | export const initialState = {
2 | isDarkTheme: false,
3 | }
4 |
--------------------------------------------------------------------------------
/packages/frontend-constants/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "@typescript-eslint/no-explicit-any": "off"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/ui-kit/src/components/atoms/index.ts:
--------------------------------------------------------------------------------
1 | export * from './Flex'
2 | export * from './Grid'
3 | export * from './Typography'
4 |
--------------------------------------------------------------------------------
/_doc/Architect&Structure/widget.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/Architect&Structure/widget.png
--------------------------------------------------------------------------------
/frontend/app_auth/src/app/entry/index.tsx:
--------------------------------------------------------------------------------
1 | import { Container } from './container'
2 |
3 | export const App = {
4 | Container,
5 | }
6 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/entry/index.tsx:
--------------------------------------------------------------------------------
1 | import { Container } from './container'
2 |
3 | export const App = {
4 | Container,
5 | }
6 |
--------------------------------------------------------------------------------
/other/algorithms/src/theory/js/hosting/2.js:
--------------------------------------------------------------------------------
1 | console.log(myVar) // undefined
2 | myVar = 5
3 | console.log(myVar) // 5
4 | var myVar
5 |
--------------------------------------------------------------------------------
/_config/scriptsForBundle/index.js:
--------------------------------------------------------------------------------
1 | const { getPackages } = require('./bundleCreator')
2 |
3 | module.exports = {
4 | getPackages,
5 | }
6 |
--------------------------------------------------------------------------------
/_doc/Architect&Structure/service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_doc/Architect&Structure/service.png
--------------------------------------------------------------------------------
/frontend/app_auth/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/frontend/app_auth/public/favicon.ico
--------------------------------------------------------------------------------
/frontend/app_auth/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/frontend/app_auth/public/logo192.png
--------------------------------------------------------------------------------
/frontend/app_auth/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/frontend/app_auth/public/logo512.png
--------------------------------------------------------------------------------
/frontend/app_root/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/frontend/app_root/public/favicon.ico
--------------------------------------------------------------------------------
/frontend/app_root/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/frontend/app_root/public/logo192.png
--------------------------------------------------------------------------------
/frontend/app_root/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/frontend/app_root/public/logo512.png
--------------------------------------------------------------------------------
/other/algorithms/src/structures/5.trees/6.suffix-tree/6.1.simple/index.test.ts:
--------------------------------------------------------------------------------
1 | import {} from './index'
2 |
3 | describe('test', () => {})
4 |
--------------------------------------------------------------------------------
/other/algorithms/src/theory/js/hosting/3.js:
--------------------------------------------------------------------------------
1 | console.log(myLetVar) // ReferenceError
2 | let myLetVar = 5
3 | console.log(myLetVar) // 5
4 |
--------------------------------------------------------------------------------
/packages/utils/src/utils/lodashToESM/index.ts:
--------------------------------------------------------------------------------
1 | export * from './debounce'
2 | export * from './throttle'
3 | export * from './freeGlobal'
4 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/.env.development:
--------------------------------------------------------------------------------
1 | BROWSER=none
2 | HOST=localhost
3 | PORT=3002
4 | REACT_APP_BACKEND_IP=http://localhost:3001/
5 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/.env.development:
--------------------------------------------------------------------------------
1 | BROWSER=none
2 | HOST=localhost
3 | PORT=3002
4 | REACT_APP_BACKEND_IP=http://localhost:3001/
5 |
--------------------------------------------------------------------------------
/frontend/app_auth/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const config = require('@npm.piece/tailwind-config/tailwind.config.js')
2 |
3 | module.exports = config
4 |
--------------------------------------------------------------------------------
/frontend/app_root/src/pages/Auth/index.tsx:
--------------------------------------------------------------------------------
1 | import { AuthModule } from '@modules/import'
2 |
3 | export const Page: FC = () =>
4 |
--------------------------------------------------------------------------------
/frontend/app_root/src/pages/Main/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 |
3 | export const Page: FC = () => 1
4 |
--------------------------------------------------------------------------------
/frontend/app_root/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const config = require('@npm.piece/tailwind-config/tailwind.config.js')
2 |
3 | module.exports = config
4 |
--------------------------------------------------------------------------------
/other/algorithms/src/structures/5.trees/6.suffix-tree/6.2.Ukkonen/index.test.ts:
--------------------------------------------------------------------------------
1 | import {} from './index'
2 |
3 | describe('test', () => {})
4 |
--------------------------------------------------------------------------------
/other/algorithms/src/structures/5.trees/6.suffix-tree/6.3.McCreight/index.test.ts:
--------------------------------------------------------------------------------
1 | import {} from './index'
2 |
3 | describe('test', () => {})
4 |
--------------------------------------------------------------------------------
/packages/frontend-constants/README.md:
--------------------------------------------------------------------------------
1 | # Constants for application
2 |
3 | Usefully sample for share different constants between applications
4 |
--------------------------------------------------------------------------------
/packages/utils/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ArrayRender'
2 | export * from './ErrorBoundary'
3 | export * from './ServiceInjector'
4 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/app/entry/index.tsx:
--------------------------------------------------------------------------------
1 | import { Container } from './container'
2 |
3 | export const App = {
4 | Container,
5 | }
6 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/app/entry/index.tsx:
--------------------------------------------------------------------------------
1 | import { Container } from './container'
2 |
3 | export const App = {
4 | Container,
5 | }
6 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/constants/app/index.ts:
--------------------------------------------------------------------------------
1 | import json from '../../../package.json'
2 |
3 | export const app = {
4 | name: json?.name,
5 | }
6 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/pages/InvisibleAuthModule/index.ts:
--------------------------------------------------------------------------------
1 | export const InvisibleAuthModulePage: FC = () =>
2 | // auth.service()
3 |
4 | null
5 |
--------------------------------------------------------------------------------
/frontend/app_root/src/constants/app/index.ts:
--------------------------------------------------------------------------------
1 | import json from '../../../package.json'
2 |
3 | export const app = {
4 | name: json?.name,
5 | }
6 |
--------------------------------------------------------------------------------
/packages/frontend-constants/src/queryParameters/index.ts:
--------------------------------------------------------------------------------
1 | export enum QueryParametersEnum {
2 | page = 'page',
3 | pageSize = 'pageSize',
4 | }
5 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const config = require('@npm.piece/tailwind-config/tailwind.config.js')
2 |
3 | module.exports = config
4 |
--------------------------------------------------------------------------------
/packages/update-packages/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "@typescript-eslint/no-explicit-any": "off",
4 | "func-style": "off"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/constants/app/index.ts:
--------------------------------------------------------------------------------
1 | import json from '../../../package.json'
2 |
3 | export const app = {
4 | name: json?.name,
5 | }
6 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/constants/app/index.ts:
--------------------------------------------------------------------------------
1 | import json from '../../../package.json'
2 |
3 | export const app = {
4 | name: json?.name,
5 | }
6 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const config = require('@npm.piece/tailwind-config/tailwind.config.js')
2 |
3 | module.exports = config
4 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/scripts/index.ts:
--------------------------------------------------------------------------------
1 | export * from './page'
2 | export * from './service'
3 | export * from './utils'
4 | export * from './widget'
5 |
--------------------------------------------------------------------------------
/packages/frontend-event-bus/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "@typescript-eslint/no-explicit-any": "off",
4 | "func-style": "off"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_templates/rtkgen/react_blank/public/favicon.ico
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_templates/rtkgen/react_blank/public/logo192.png
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/InfinityLoopLabs/React_Blank_App/HEAD/_templates/rtkgen/react_blank/public/logo512.png
--------------------------------------------------------------------------------
/_templates/rtkgen/service/constants/name.ts:
--------------------------------------------------------------------------------
1 | import { Constants } from '@constants/index'
2 |
3 | export const name = `[@${Constants.app.name} - sample - Service]`
4 |
--------------------------------------------------------------------------------
/_templates/rtkgen/widget/constants/name.ts:
--------------------------------------------------------------------------------
1 | import { Constants } from '@constants/index'
2 |
3 | export const name = `[@${Constants.app.name} - Sample - Widget]`
4 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/service/_sample/effects/export/index.ts:
--------------------------------------------------------------------------------
1 | import { getUsersTC } from '../sample'
2 |
3 | export const asyncActions = {
4 | getUsersTC,
5 | }
6 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/logs/index.tsx:
--------------------------------------------------------------------------------
1 | import { useContainer } from './container'
2 |
3 | export const logs = {
4 | service: useContainer,
5 | }
6 |
--------------------------------------------------------------------------------
/_doc/NPM/README.md:
--------------------------------------------------------------------------------
1 | https://github.com/nvm-sh/nvm
2 |
3 | nvm install 20
4 | nvm alias default 20
5 |
6 | nvm use 20
7 |
8 | npm i -g @npm.piece/template-generator
9 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/features/generated/hooks.ts:
--------------------------------------------------------------------------------
1 | // Этот реэкспорт хуков нужен, если вдруг поменяются названия файлов при изменении контракта с backend
2 | export {}
3 |
--------------------------------------------------------------------------------
/frontend/app_root/.MF.module.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | imported: {
3 | AuthMF: `app_auth@${process.env.REACT_APP_MF_APP_AUTH}`,
4 | },
5 | exported: {},
6 | }
7 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/scripts/utils/lib/enums.ts:
--------------------------------------------------------------------------------
1 | export enum TemplatesEnum {
2 | widget = 'widget',
3 | service = 'service',
4 | page = 'page',
5 | }
6 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/service/_sample/constants/name.ts:
--------------------------------------------------------------------------------
1 | import { Constants } from '@constants/index'
2 |
3 | export const name = `[@${Constants.app.name} - sample - Service]`
4 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/widget/_Sample/constants/name.ts:
--------------------------------------------------------------------------------
1 | import { Constants } from '@constants/index'
2 |
3 | export const name = `[@${Constants.app.name} - Sample - Widget]`
4 |
--------------------------------------------------------------------------------
/other/business_card/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | content: ['./src/**/*.{js,jsx,ts,tsx,mdx}'],
3 |
4 | plugins: [require('@tailwindcss/typography')],
5 | }
6 |
--------------------------------------------------------------------------------
/packages/utils/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "@typescript-eslint/no-explicit-any": "off",
4 | "@typescript-eslint/no-case-declarations": "off"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/.eslintignore:
--------------------------------------------------------------------------------
1 | /build
2 | /node_modules
3 | /src/index.ts
4 | /src/features/generated/hooks
5 | /src/utils/components/ErrorBoundary/index.tsx
6 |
7 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/.eslintignore:
--------------------------------------------------------------------------------
1 | /build
2 | /node_modules
3 | /src/index.ts
4 | /src/features/generated/hooks
5 | /src/utils/components/ErrorBoundary/index.tsx
6 |
7 |
--------------------------------------------------------------------------------
/packages/frontend-event-bus/src/microfrontends/index.ts:
--------------------------------------------------------------------------------
1 | export * from './useSubscribe'
2 | export * from './eventTransfer'
3 | export * from './enum'
4 | export * from './mfTypes'
5 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/.env.production:
--------------------------------------------------------------------------------
1 | HOST=localhost
2 | PORT=3002
3 |
4 | REACT_APP_BACKEND_IP=http://localhost:3001/
5 | REACT_APP_IP_MF=http://localhost:3002/remoteEntry.js
6 |
--------------------------------------------------------------------------------
/frontend/app_auth/.eslintignore:
--------------------------------------------------------------------------------
1 | /build
2 | /node_modules/**
3 | /node_modules
4 | /src/index.ts
5 | /src/features/generated/hooks
6 | /src/utils/components/ErrorBoundary/index.tsx
7 |
8 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/index.ts:
--------------------------------------------------------------------------------
1 | // This import syntax is required for use with Webpack 5 Module Federation when we use exposes module
2 | // @ts-ignore
3 | void import('./index.tsx')
4 |
--------------------------------------------------------------------------------
/frontend/app_root/.eslintignore:
--------------------------------------------------------------------------------
1 | /build
2 | /node_modules/**
3 | /node_modules
4 | /src/index.ts
5 | /src/features/generated/hooks
6 | /src/utils/components/ErrorBoundary/index.tsx
7 |
8 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/logs/constants/name.ts:
--------------------------------------------------------------------------------
1 | import { Constants } from '@constants/index'
2 |
3 | export const name = `[@${Constants.app.name} - logs - Service]`
4 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/theme/constants/name.ts:
--------------------------------------------------------------------------------
1 | import { Constants } from '@constants/index'
2 |
3 | export const name = `[@${Constants.app.name} - theme - Service]`
4 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/.env.production:
--------------------------------------------------------------------------------
1 | HOST=localhost
2 | PORT=3002
3 |
4 | REACT_APP_BACKEND_IP=http://localhost:3001/
5 | REACT_APP_IP_MF=http://localhost:3002/remoteEntry.js
6 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/features/services/appSize/constants/name.ts:
--------------------------------------------------------------------------------
1 | import { Constants } from '@constants/index'
2 |
3 | export const name = `[@${Constants.app.name} - appSize - Service]`
4 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/appSize/constants/name.ts:
--------------------------------------------------------------------------------
1 | import { Constants } from '@constants/index'
2 |
3 | export const name = `[@${Constants.app.name} - appSize - Service]`
4 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/service/constants/name.ts:
--------------------------------------------------------------------------------
1 | import { Constants } from '@constants/index'
2 |
3 | export const name = `[@${Constants.app.name} - sample - Service]`
4 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/index.ts:
--------------------------------------------------------------------------------
1 | // This import syntax is required for use with Webpack 5 Module Federation when we use exposes module
2 | // @ts-ignore
3 | void import('./index.tsx')
4 |
--------------------------------------------------------------------------------
/_templates/rtkgen/widget/container/index.tsx:
--------------------------------------------------------------------------------
1 | import { UI } from '../ui'
2 | import { useContainer } from './useContainer'
3 |
4 | export const Container: FC = () =>
5 |
--------------------------------------------------------------------------------
/packages/generate-hooks-rtk/src/scripts/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './getConfig'
2 | export * from './injectHooks'
3 | export * from './injectReducers'
4 | export * from './injectMiddleware'
5 |
--------------------------------------------------------------------------------
/packages/mf-connect/README.md:
--------------------------------------------------------------------------------
1 | ```
2 | npm i @npm.piece/mf-connect -D
3 | ```
4 |
5 | ```
6 | yarn add @npm.piece/mf-connect -D
7 | ```
8 |
9 | ```
10 | npm.piece-connect-mf
11 | ```
12 |
--------------------------------------------------------------------------------
/packages/utils/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './components'
2 | export * from './hooks'
3 | export * from './indexed-db'
4 | export * from './local-and-session-storage'
5 | export * from './utils'
6 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/features/services/appSize/constants/name.ts:
--------------------------------------------------------------------------------
1 | import { Constants } from '@constants/index'
2 |
3 | export const name = `[@${Constants.app.name} - appSize - Service]`
4 |
--------------------------------------------------------------------------------
/_templates/rtkgen/widget/index.tsx:
--------------------------------------------------------------------------------
1 | import { Container } from './container'
2 | export * from './constants'
3 | export * from './store'
4 |
5 | export const Sample = {
6 | Widget: Container,
7 | }
8 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/index.ts:
--------------------------------------------------------------------------------
1 | // This import syntax is required for use with Webpack 5 Module Federation when we use exposes module
2 | // @ts-ignore
3 | void import('./index.tsx')
4 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/features/services/appSize/constants/name.ts:
--------------------------------------------------------------------------------
1 | import { Constants } from '@constants/index'
2 |
3 | export const name = `[@${Constants.app.name} - appSize - Service]`
4 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/widget/_Sample/container/index.tsx:
--------------------------------------------------------------------------------
1 | import { UI } from '../ui'
2 | import { useContainer } from './useContainer'
3 |
4 | export const Container: FC = () =>
5 |
--------------------------------------------------------------------------------
/frontend/app_auth/.env.development:
--------------------------------------------------------------------------------
1 | BROWSER=none
2 | REACT_APP_BACKEND_IP=https://stage-app-01.office.rtk-cd.ru:7276/
3 | HOST=localhost
4 | PORT=9002
5 | REACT_APP_PUBLIC_PATH=/
6 | REACT_APP_ROOT_PUBLIC_PATH=/
--------------------------------------------------------------------------------
/frontend/app_auth/.env.production:
--------------------------------------------------------------------------------
1 | REACT_APP_BACKEND_IP=https://stage-app-01.office.rtk-cd.ru:7276/
2 | HOST=http://localhost
3 | PORT=80
4 | REACT_APP_PUBLIC_PATH=/root/app_auth/
5 | REACT_APP_ROOT_PUBLIC_PATH=/root/
--------------------------------------------------------------------------------
/frontend/app_auth/src/app/store/generated/reducers.ts:
--------------------------------------------------------------------------------
1 | const generatedReducersList = {}
2 |
3 | // Этот файл нужен для импорта автоматически сгенерированных reducers в ваш store
4 | export { generatedReducersList }
5 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/theme/index.tsx:
--------------------------------------------------------------------------------
1 | import { useContainer } from './container'
2 | export { Actions, Reducer } from './store'
3 |
4 | export const theme = {
5 | service: useContainer,
6 | }
7 |
--------------------------------------------------------------------------------
/packages/mf-connect/src/scripts/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './getConfig'
2 | export * from './removeScripts'
3 | export * from './addScripts'
4 | export * from './changePackage'
5 | export * from './changeENV'
6 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/features/services/appSize/index.tsx:
--------------------------------------------------------------------------------
1 | import { useContainer } from './container'
2 | export { Actions, Reducer } from './store'
3 |
4 | export const appSize = {
5 | service: useContainer,
6 | }
7 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/appSize/index.tsx:
--------------------------------------------------------------------------------
1 | import { useContainer } from './container'
2 | export { Actions, Reducer } from './store'
3 |
4 | export const appSize = {
5 | service: useContainer,
6 | }
7 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/logs/container/index.ts:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react'
2 |
3 | export const useContainer: SC = () => {
4 | useEffect(() => {
5 | console.log('mount')
6 | }, [])
7 | }
8 |
--------------------------------------------------------------------------------
/packages/utils/src/local-and-session-storage/index.ts:
--------------------------------------------------------------------------------
1 | export * from './getFromLocalStorage'
2 | export * from './getFromSessionStorage'
3 | export * from './setToLocalStorage'
4 | export * from './setToSessionStorage'
5 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "@npm.piece/eslint-config"
4 | ],
5 | "parserOptions": {
6 | "ecmaVersion": 2020,
7 | "sourceType": "module",
8 | "project": "./tsconfig.json"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/app/store/generated/middlewares.ts:
--------------------------------------------------------------------------------
1 | const generatedMiddlewaresList = [] as any[]
2 |
3 | // Этот файл нужен для автоматической инъекции middlewares в ваш store
4 | export { generatedMiddlewaresList }
5 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/features/services/appSize/index.tsx:
--------------------------------------------------------------------------------
1 | import { useContainer } from './container'
2 | export { Actions, Reducer } from './store'
3 |
4 | export const appSize = {
5 | service: useContainer,
6 | }
7 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/app/providers/index.tsx:
--------------------------------------------------------------------------------
1 | import { ReduxStoreProvider } from './ReduxStoreProvider'
2 |
3 | export const Providers: FC = ({ children }) => (
4 | {children}
5 | )
6 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/pages/MainForm/index.tsx:
--------------------------------------------------------------------------------
1 | import { Helmet } from 'react-helmet'
2 |
3 | export const Page: FC = () => (
4 | <>
5 |
6 | 123
7 | >
8 | )
9 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/providers/index.tsx:
--------------------------------------------------------------------------------
1 | import { ReduxStoreProvider } from './ReduxStoreProvider'
2 |
3 | export const Providers: FC = ({ children }) => (
4 | {children}
5 | )
6 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/pages/Simple/index.tsx:
--------------------------------------------------------------------------------
1 | import { Helmet } from 'react-helmet'
2 |
3 | export const Page: FC = () => (
4 | <>
5 |
6 | widget
7 | >
8 | )
9 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/pages/Simple/index.tsx:
--------------------------------------------------------------------------------
1 | import { Helmet } from 'react-helmet'
2 |
3 | export const Page: FC = () => (
4 | <>
5 |
6 | widget
7 | >
8 | )
9 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/widget/_Sample/index.tsx:
--------------------------------------------------------------------------------
1 | import { Container } from './container'
2 | import { Actions, Reducer } from './store'
3 |
4 | export const Sample = {
5 | Widget: Container,
6 | }
7 |
8 | export { Actions, Reducer }
9 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/app/providers/index.tsx:
--------------------------------------------------------------------------------
1 | import { ReduxStoreProvider } from './ReduxStoreProvider'
2 |
3 | export const Providers: FC = ({ children }) => (
4 | {children}
5 | )
6 |
--------------------------------------------------------------------------------
/_templates/rtkgen/service/index.tsx:
--------------------------------------------------------------------------------
1 | import { useContainer } from './container'
2 | export * from './constants'
3 | export * from './mappers'
4 | export * from './store'
5 |
6 | export const sample = {
7 | service: useContainer,
8 | }
9 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/app/providers/index.tsx:
--------------------------------------------------------------------------------
1 | import { ReduxStoreProvider } from './ReduxStoreProvider'
2 |
3 | export const Providers: FC = ({ children }) => (
4 | {children}
5 | )
6 |
--------------------------------------------------------------------------------
/packages/ui-kit/LICENSE:
--------------------------------------------------------------------------------
1 | All licenses in this repository are copyrighted by their respective authors.
2 |
3 | Everything else is released under CC0.
4 |
5 | ------------------------------------------------------------------------------
6 |
--------------------------------------------------------------------------------
/packages/ui-kit/tailwind.config.js:
--------------------------------------------------------------------------------
1 | import config from '@npm.piece/tailwind-config'
2 | /** @type {import('tailwindcss').Config} */
3 |
4 | export default {
5 | ...config,
6 | content: config.content.concat(['./index.html']),
7 | }
8 |
--------------------------------------------------------------------------------
/packages/download-locale/src/scripts/utils/lib/types.ts:
--------------------------------------------------------------------------------
1 | export type ConfigType = {
2 | apiKey: string
3 | googleSheetID: string
4 | localesFolder: string
5 | sheetName: string
6 | fileName: string
7 | eslintCommand: string
8 | }
9 |
--------------------------------------------------------------------------------
/packages/utils/src/utils/createTempImageLinkFromBlob.ts:
--------------------------------------------------------------------------------
1 | export const createTempImageLinkFromBlob = (blob?: Blob) => {
2 | if (blob && blob instanceof Blob) {
3 | return window.URL.createObjectURL(blob)
4 | }
5 |
6 | return ''
7 | }
8 |
--------------------------------------------------------------------------------
/other/algorithms/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "@typescript-eslint/naming-convention": "off",
4 | "@typescript-eslint/no-unused-vars": "off",
5 | "no-constant-condition": "off",
6 | "no-prototype-builtins": "off"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/service/index.tsx:
--------------------------------------------------------------------------------
1 | import { useContainer } from './container'
2 | export * from './constants'
3 | export * from './mappers'
4 | export * from './store'
5 |
6 | export const sample = {
7 | service: useContainer,
8 | }
9 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/components/templates/404/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Flex } from '@npm.piece/ui-kit'
3 |
4 | export const NotFound: FC = React.memo(() => (
5 |
6 | 404
7 |
8 | ))
9 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/utils/lib/types/useForm.ts:
--------------------------------------------------------------------------------
1 | import { FieldValues, UseFormReturn } from 'react-hook-form'
2 |
3 | export type UseFormPropsType = Partial<
4 | UseFormReturn
5 | > & {
6 | control: UseFormReturn['control']
7 | }
8 |
--------------------------------------------------------------------------------
/frontend/app_root/src/components/templates/404/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Flex } from '@npm.piece/ui-kit'
3 |
4 | export const NotFound: FC = React.memo(() => (
5 |
6 | 404
7 |
8 | ))
9 |
--------------------------------------------------------------------------------
/frontend/app_root/src/utils/lib/types/useForm.ts:
--------------------------------------------------------------------------------
1 | import { FieldValues, UseFormReturn } from 'react-hook-form'
2 |
3 | export type UseFormPropsType = Partial<
4 | UseFormReturn
5 | > & {
6 | control: UseFormReturn['control']
7 | }
8 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/features/services/appSize/index.tsx:
--------------------------------------------------------------------------------
1 | import { useContainer } from './container'
2 | import { Actions, Reducer } from './store'
3 |
4 | export const appSize = {
5 | service: useContainer,
6 | }
7 |
8 | export { Actions, Reducer }
9 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/app/providers/ReduxStoreProvider/index.tsx:
--------------------------------------------------------------------------------
1 | import { Provider } from 'react-redux'
2 | import { store } from '@app/store/store'
3 |
4 | export const ReduxStoreProvider: FC = ({ children }) => (
5 | {children}
6 | )
7 |
--------------------------------------------------------------------------------
/frontend/app_root/.env.development:
--------------------------------------------------------------------------------
1 | REACT_APP_BACKEND_IP=http://localhost:3001/
2 | HOST=localhost
3 | PORT=9001
4 | REACT_APP_PUBLIC_PATH=/
5 | REACT_APP_ROOT_PUBLIC_PATH=/
6 | REACT_APP_MF_APP_AUTH=http://localhost:9002/remoteEntry.js
7 | REACT_APP_MF_APP_AUTH_PUBLIC_PATH=/
--------------------------------------------------------------------------------
/frontend/app_root/src/app/providers/ReduxStoreProvider/index.tsx:
--------------------------------------------------------------------------------
1 | import { Provider } from 'react-redux'
2 | import { store } from '@app/store/store'
3 |
4 | export const ReduxStoreProvider: FC = ({ children }) => (
5 | {children}
6 | )
7 |
--------------------------------------------------------------------------------
/frontend/app_root/src/constants/index.ts:
--------------------------------------------------------------------------------
1 | export { routes } from '@constants/routes'
2 | import { app } from './app'
3 |
4 | // Здесь хранятся константы приложения, которые могут быть использованы в разных частях приложения.
5 | export const Constants = {
6 | app,
7 | }
8 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/utils/lib/types/useForm.ts:
--------------------------------------------------------------------------------
1 | import { FieldValues, UseFormReturn } from 'react-hook-form'
2 |
3 | export type UseFormPropsType = Partial<
4 | UseFormReturn
5 | > & {
6 | control: UseFormReturn['control']
7 | }
8 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/utils/lib/types/useForm.ts:
--------------------------------------------------------------------------------
1 | import { FieldValues, UseFormReturn } from 'react-hook-form'
2 |
3 | export type UseFormPropsType = Partial<
4 | UseFormReturn
5 | > & {
6 | control: UseFormReturn['control']
7 | }
8 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/components/templates/_Sample/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | type OwnPropertyType = {}
4 |
5 | export const Sample: FC = React.memo(({}) => {
6 | const sample = 'Sample'
7 |
8 | return {sample}
9 | })
10 |
--------------------------------------------------------------------------------
/frontend/app_root/src/components/templates/_Sample/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | type OwnPropertyType = {}
4 |
5 | export const Sample: FC = React.memo(({}) => {
6 | const sample = 'Sample'
7 |
8 | return {sample}
9 | })
10 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/components/templates/Loading/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | type OwnPropertyType = {}
4 |
5 | export const Loading: FC = React.memo(() => {
6 | const loading = 'Loading'
7 |
8 | return {loading}
9 | })
10 |
--------------------------------------------------------------------------------
/frontend/app_root/src/components/templates/Loading/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | type OwnPropertyType = {}
4 |
5 | export const Loading: FC = React.memo(() => {
6 | const loading = 'Loading'
7 |
8 | return {loading}
9 | })
10 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/app/providers/ReduxStoreProvider/index.tsx:
--------------------------------------------------------------------------------
1 | import { Provider } from 'react-redux'
2 | import { store } from '@app/store/store'
3 |
4 | export const ReduxStoreProvider: FC = ({ children }) => (
5 | {children}
6 | )
7 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/components/templates/404/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 |
3 | import React from 'react'
4 |
5 | export const NotFound: FC = React.memo(() => (
6 |
7 | 404
8 |
9 | ))
10 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/app/providers/ReduxStoreProvider/index.tsx:
--------------------------------------------------------------------------------
1 | import { Provider } from 'react-redux'
2 | import { store } from '@app/store/store'
3 |
4 | export const ReduxStoreProvider: FC = ({ children }) => (
5 | {children}
6 | )
7 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/constants/index.ts:
--------------------------------------------------------------------------------
1 | import { routes } from '@constants/routes'
2 | import { app } from './app'
3 |
4 | // Здесь хранятся константы приложения, которые могут быть использованы в разных частях приложения.
5 | export const Constants = {
6 | app,
7 | routes,
8 | }
9 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/router/index.tsx:
--------------------------------------------------------------------------------
1 | import { Routes } from 'react-router-dom'
2 | import { routeStructure } from './structure'
3 | import { renderRoute } from './utils/render'
4 |
5 | export const AppRouter = () => (
6 | {routeStructure.map(renderRoute)}
7 | )
8 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/components/templates/404/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 |
3 | import React from 'react'
4 |
5 | export const NotFound: FC = React.memo(() => (
6 |
7 | 404
8 |
9 | ))
10 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/setupTests.ts:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom'
6 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/store/generated/middlewares.ts:
--------------------------------------------------------------------------------
1 | import { orderStore } from '@generated/hooks/order'
2 |
3 | const generatedMiddlewaresList = [orderStore.middleware]
4 |
5 | // Этот файл нужен для автоматической инъекции middlewares в ваш store
6 | export { generatedMiddlewaresList }
7 |
--------------------------------------------------------------------------------
/frontend/app_root/src/setupTests.ts:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom'
6 |
--------------------------------------------------------------------------------
/packages/ui-kit/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "bundler",
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "include": ["vite.config.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/utils/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "bundler",
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "include": ["vite.config.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/constants/index.ts:
--------------------------------------------------------------------------------
1 | import { routes } from '@constants/routes'
2 | import { app } from './app'
3 |
4 | // Здесь хранятся константы приложения, которые могут быть использованы в разных частях приложения.
5 | export const Constants = {
6 | app,
7 | routes,
8 | }
9 |
--------------------------------------------------------------------------------
/other/algorithms/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "algorithms",
3 | "version": "1.0.3",
4 | "main": "index.ts",
5 | "author": "Morozzko",
6 | "license": "MIT",
7 | "devDependencies": {
8 | "jest": "^29.5.0",
9 | "ts-jest": "^29.1.0",
10 | "typescript": "^5.5.4"
11 | }
12 | }
--------------------------------------------------------------------------------
/other/business_card/postcss.config.js:
--------------------------------------------------------------------------------
1 | const config = require('other/business_card/tailwind.config.js')
2 |
3 | module.exports = {
4 | plugins: {
5 | 'postcss-import': {},
6 | 'tailwindcss/nesting': {},
7 | tailwindcss: { config },
8 | autoprefixer: {},
9 | },
10 | }
11 |
--------------------------------------------------------------------------------
/packages/frontend-event-bus/src/microfrontends/mfTypes/notification.ts:
--------------------------------------------------------------------------------
1 | export type NotificationMFMessageType =
2 | | 'success'
3 | | 'error'
4 | | 'info'
5 | | 'warning'
6 | | 'text'
7 |
8 | export type NotificationMFTableType = {
9 | columns: any[]
10 | rows: any[]
11 | }
12 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/setupTests.ts:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom'
6 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/constants/index.ts:
--------------------------------------------------------------------------------
1 | import { routes } from '@constants/routes'
2 | import { app } from './app'
3 |
4 | // Здесь хранятся константы приложения, которые могут быть использованы в разных частях приложения.
5 | export const Constants = {
6 | app,
7 | routes,
8 | }
9 |
--------------------------------------------------------------------------------
/other/business_card/src/components/Paper/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export const Paper: FC = ({ children }) => (
4 |
5 | {children}
6 |
7 | )
8 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/scripts/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './getArgs'
2 | export * from './getConfig'
3 | export * from './insertToHook'
4 | export * from './insertToReducer'
5 | export * from './removeFromHooks'
6 | export * from './removeFromReducer'
7 | export * from './removeFromRouter'
8 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/setupTests.ts:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom'
6 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/modules/export/Exported.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { ImportedContainer } from '@app/entry/container'
3 |
4 | // Модуль для импорта через Module Federation Plugin
5 | const ExportedModule = props =>
6 |
7 | export default ExportedModule
8 |
--------------------------------------------------------------------------------
/frontend/app_root/src/modules/export/Exported.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { ImportedContainer } from '@app/entry/container'
3 |
4 | // Модуль для импорта через Module Federation Plugin
5 | const ExportedModule = props =>
6 |
7 | export default ExportedModule
8 |
--------------------------------------------------------------------------------
/frontend/app_auth/postcss.config.js:
--------------------------------------------------------------------------------
1 | const config = require('@npm.piece/tailwind-config/tailwind.config')
2 |
3 | module.exports = {
4 | plugins: {
5 | 'postcss-import': {},
6 | 'tailwindcss/nesting': 'postcss-nesting',
7 | tailwindcss: { config },
8 | autoprefixer: {},
9 | },
10 | }
11 |
--------------------------------------------------------------------------------
/frontend/app_root/.env.production:
--------------------------------------------------------------------------------
1 | REACT_APP_BACKEND_IP=http://localhost:3001/
2 | HOST=http://localhost
3 | PORT=80
4 | REACT_APP_PUBLIC_PATH=/root/
5 | REACT_APP_ROOT_PUBLIC_PATH=/root/
6 | REACT_APP_MF_APP_AUTH=http://localhost:80/root/app_auth/remoteEntry.js
7 | REACT_APP_MF_APP_AUTH_PUBLIC_PATH=/root/app_auth/
--------------------------------------------------------------------------------
/frontend/app_root/postcss.config.js:
--------------------------------------------------------------------------------
1 | const config = require('@npm.piece/tailwind-config/tailwind.config')
2 |
3 | module.exports = {
4 | plugins: {
5 | 'postcss-import': {},
6 | 'tailwindcss/nesting': 'postcss-nesting',
7 | tailwindcss: { config },
8 | autoprefixer: {},
9 | },
10 | }
11 |
--------------------------------------------------------------------------------
/packages/ui-kit/postcss.config.cjs:
--------------------------------------------------------------------------------
1 | const config = require('@npm.piece/tailwind-config/tailwind.config')
2 |
3 | module.exports = {
4 | plugins: {
5 | 'postcss-import': {},
6 | 'tailwindcss/nesting': 'postcss-nesting',
7 | tailwindcss: { config },
8 | autoprefixer: {},
9 | },
10 | }
11 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/modules/export/Exported.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { ImportedContainer } from '@app/entry/container'
3 |
4 | // Модуль для импорта через Module Federation Plugin
5 | const ExportedModule = props =>
6 |
7 | export default ExportedModule
8 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/modules/export/Exported.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { ImportedContainer } from '@app/entry/container'
3 |
4 | // Модуль для импорта через Module Federation Plugin
5 | const ExportedModule = props =>
6 |
7 | export default ExportedModule
8 |
--------------------------------------------------------------------------------
/frontend/app_auth/.MF.module.js:
--------------------------------------------------------------------------------
1 | const path = require("path");
2 |
3 | module.exports = {
4 | imported: {},
5 | exported: {
6 | './AuthContainer': path.resolve(__dirname, 'src/modules/export/Exported'),
7 | './AuthService': path.resolve(__dirname, 'src/modules/export/AuthService'),
8 | },
9 | }
10 |
--------------------------------------------------------------------------------
/frontend/app_root/src/layouts/Empty/index.tsx:
--------------------------------------------------------------------------------
1 | import { Suspense } from 'react'
2 | import { Outlet } from 'react-router-dom'
3 | import { Loading } from '@components/templates/Loading'
4 |
5 | export const Empty: FC = () => (
6 | }>
7 |
8 |
9 | )
10 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/postcss.config.js:
--------------------------------------------------------------------------------
1 | const config = require('@npm.piece/tailwind-config/tailwind.config')
2 |
3 | module.exports = {
4 | plugins: {
5 | 'postcss-import': {},
6 | 'tailwindcss/nesting': 'postcss-nesting',
7 | tailwindcss: { config },
8 | autoprefixer: {},
9 | },
10 | }
11 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/postcss.config.js:
--------------------------------------------------------------------------------
1 | const config = require('@npm.piece/tailwind-config/tailwind.config')
2 |
3 | module.exports = {
4 | plugins: {
5 | 'postcss-import': {},
6 | 'tailwindcss/nesting': 'postcss-nesting',
7 | tailwindcss: { config },
8 | autoprefixer: {},
9 | },
10 | }
11 |
--------------------------------------------------------------------------------
/other/algorithms/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'ts-jest',
3 | testEnvironment: 'node',
4 | roots: ['/src'],
5 | transform: {
6 | '^.+\\.tsx?$': 'ts-jest',
7 | },
8 | testRegex: 'src/.*\\.test\\.ts$',
9 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
10 | }
11 |
--------------------------------------------------------------------------------
/packages/utils/src/utils/arrayBufferToBase64.ts:
--------------------------------------------------------------------------------
1 | export const arrayBufferToBase64 = (buffer: ArrayBuffer) => {
2 | let binary = ''
3 | const bytes = new Uint8Array(buffer)
4 | for (let i = 0; i < bytes.byteLength; i++) {
5 | binary += String.fromCharCode(bytes[i])
6 | }
7 |
8 | return btoa(binary)
9 | }
10 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/store/generated/reducers.ts:
--------------------------------------------------------------------------------
1 | import { orderStore } from '@generated/hooks/order'
2 |
3 | const generatedReducersList = {
4 | [orderStore.reducerPath]: orderStore.reducer,
5 | }
6 |
7 | // Этот файл нужен для импорта автоматически сгенерированных reducers в ваш store
8 | export { generatedReducersList }
9 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/.MF.module.js:
--------------------------------------------------------------------------------
1 | const path = require('path')
2 |
3 | module.exports = {
4 | imported: {
5 | RenameImportedModuleHere: `red@${process.env.REACT_APP_IP_MF}`,
6 | },
7 | exported: {
8 | './RenameExportedModuleHere': path.resolve(__dirname, 'src/modules/export/Exported'),
9 | },
10 | }
11 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/components/templates/_Sample/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 | import React from 'react'
3 |
4 | type OwnPropertyType = {}
5 |
6 | export const Sample: FC = React.memo(({}) => {
7 | const sample = 'Sample'
8 |
9 | return {sample}
10 | })
11 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/.MF.module.js:
--------------------------------------------------------------------------------
1 | const path = require('path')
2 |
3 | module.exports = {
4 | imported: {
5 | RenameImportedModuleHere: `red@${process.env.REACT_APP_IP_MF}`,
6 | },
7 | exported: {
8 | './RenameExportedModuleHere': path.resolve(__dirname, 'src/modules/export/Exported'),
9 | },
10 | }
11 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/components/atoms/_Sample/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 | import React from 'react'
3 |
4 | type OwnPropertyType = {}
5 |
6 | export const Sample: FC = React.memo(({}) => {
7 | const sample = 'Sample'
8 |
9 | return {sample}
10 | })
11 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/components/templates/Loading/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 | import React from 'react'
3 |
4 | type OwnPropertyType = {}
5 |
6 | export const Loading: FC = React.memo(() => {
7 | const loading = 'Loading'
8 |
9 | return {loading}
10 | })
11 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/components/molecules/_Sample/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 | import React from 'react'
3 |
4 | type OwnPropertyType = {}
5 |
6 | export const Sample: FC = React.memo(({}) => {
7 | const sample = 'Sample'
8 |
9 | return {sample}
10 | })
11 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/components/templates/Loading/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 | import React from 'react'
3 |
4 | type OwnPropertyType = {}
5 |
6 | export const Loading: FC = React.memo(() => {
7 | const loading = 'Loading'
8 |
9 | return {loading}
10 | })
11 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/components/templates/_Sample/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 | import React from 'react'
3 |
4 | type OwnPropertyType = {}
5 |
6 | export const Sample: FC = React.memo(({}) => {
7 | const sample = 'Sample'
8 |
9 | return {sample}
10 | })
11 |
--------------------------------------------------------------------------------
/packages/types/global.d.ts:
--------------------------------------------------------------------------------
1 | declare global {
2 | type Nullable = T | null | undefined
3 |
4 | type Callback = (
5 | value: Value
6 | ) => ReturnType
7 |
8 | type UnknownCallback = (...args: any[]) => any
9 | }
10 |
11 | // Экспорт, чтобы модуль не был пустым
12 | export {}
13 |
--------------------------------------------------------------------------------
/_templates/rtkgen/page/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 | import { clsx } from '@npm.piece/utils'
3 | import { dti } from './constants/data-testid'
4 |
5 | export const Page: FC = () => (
6 |
7 | {/*/ Paste widgets here /*/}
8 |
9 | )
10 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/features/services/appSize/structure/index.ts:
--------------------------------------------------------------------------------
1 | export const initialState = {
2 | isMobile: false,
3 | appSize: {
4 | innerWidth: null as Nullable,
5 | innerHeight: null as Nullable,
6 | clientWidth: null as Nullable,
7 | clientHeight: null as Nullable,
8 | },
9 | }
10 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/appSize/structure/index.ts:
--------------------------------------------------------------------------------
1 | export const initialState = {
2 | isMobile: false,
3 | appSize: {
4 | innerWidth: null as Nullable,
5 | innerHeight: null as Nullable,
6 | clientWidth: null as Nullable,
7 | clientHeight: null as Nullable,
8 | },
9 | }
10 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/service/_sample/index.tsx:
--------------------------------------------------------------------------------
1 | import { RestAPI } from './api'
2 | import { useContainer } from './container'
3 | import * as Selectors from './mappers'
4 | import { Actions, Reducer } from './store'
5 |
6 | export const sample = {
7 | service: useContainer,
8 | }
9 |
10 | export { Actions, Reducer, RestAPI, Selectors }
11 |
--------------------------------------------------------------------------------
/other/algorithms/src/algorithms/trash/GetMaxPreffix/index.ts:
--------------------------------------------------------------------------------
1 | export const getMaxPrefixSum = (arr: number[]) => {
2 | let maximalSum = 0
3 | let currentSum = 0
4 |
5 | for (let i = 0; i < arr.length; i++) {
6 | currentSum += arr[i]
7 | maximalSum = Math.max(maximalSum, currentSum)
8 | }
9 |
10 | return maximalSum
11 | }
12 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/features/services/appSize/structure/index.ts:
--------------------------------------------------------------------------------
1 | export const initialState = {
2 | isMobile: false,
3 | appSize: {
4 | innerWidth: null as Nullable,
5 | innerHeight: null as Nullable,
6 | clientWidth: null as Nullable,
7 | clientHeight: null as Nullable,
8 | },
9 | }
10 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/features/services/appSize/structure/index.ts:
--------------------------------------------------------------------------------
1 | export const initialState = {
2 | isMobile: false,
3 | appSize: {
4 | innerWidth: null as Nullable,
5 | innerHeight: null as Nullable,
6 | clientWidth: null as Nullable,
7 | clientHeight: null as Nullable,
8 | },
9 | }
10 |
--------------------------------------------------------------------------------
/frontend/app_root/src/index.ts:
--------------------------------------------------------------------------------
1 | // This import syntax is required for use with Webpack 5 Module Federation when we use exposes module
2 | // @ts-ignore
3 | void import('./index.tsx')
4 |
5 | require.ensure([], require => {
6 | require('react-hook-form')
7 | require('uuid')
8 | require('react-window')
9 | require('react-helmet')
10 | });
11 |
--------------------------------------------------------------------------------
/_templates/rtkgen/service/mappers/index.tsx:
--------------------------------------------------------------------------------
1 | import { createSelector } from 'reselect'
2 | import { AppStateType } from '@app/store/store'
3 |
4 | const selectOne = (state: AppStateType) => state
5 | const selectTwo = (state: AppStateType) => state
6 |
7 | const simple = createSelector(selectOne, selectTwo, (one, two) => ({
8 | one,
9 | two,
10 | }))
11 |
--------------------------------------------------------------------------------
/packages/frontend-common/src/axios/interceptors/request/addToken.ts:
--------------------------------------------------------------------------------
1 | import { InternalAxiosRequestConfig } from 'axios'
2 |
3 | export const addTokenInterceptor = (
4 | config: InternalAxiosRequestConfig
5 | ) => {
6 | if (localStorage.getItem('token')) {
7 | config.headers!.Authorization = `Bearer ${localStorage.getItem('token')}`
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/service/_sample/mappers/index.tsx:
--------------------------------------------------------------------------------
1 | import { createSelector } from 'reselect'
2 | import { AppStateType } from '@app/store/store'
3 |
4 | const selectOne = (state: AppStateType) => state
5 | const selectTwo = (state: AppStateType) => state
6 |
7 | const simple = createSelector(selectOne, selectTwo, (one, two) => ({
8 | one,
9 | two,
10 | }))
11 |
--------------------------------------------------------------------------------
/packages/frontend-tailwind-config/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@npm.piece/tailwind-config",
3 | "version": "1.0.35",
4 | "main": "tailwind.config.js",
5 | "files": [
6 | "package.json",
7 | "README",
8 | "tailwind.config.js"
9 | ],
10 | "dependencies": {
11 | "@tailwindcss/typography": "^0.5.9",
12 | "tailwindcss": "^3.3.5"
13 | }
14 | }
--------------------------------------------------------------------------------
/frontend/app_auth/src/layouts/Main/index.tsx:
--------------------------------------------------------------------------------
1 | import { Suspense } from 'react'
2 | import { Outlet } from 'react-router-dom'
3 | import { Loading } from '@components/templates/Loading'
4 | export const Main: FC = () => (
5 |
6 | }>
7 |
8 |
9 |
10 | )
11 |
--------------------------------------------------------------------------------
/packages/frontend-common/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'ts-jest',
3 | testEnvironment: 'jsdom',
4 | roots: ['/src'],
5 | transform: {
6 | '^.+\\.tsx?$': 'ts-jest',
7 | },
8 | testRegex: 'src/.*\\.test\\.ts$',
9 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
10 | setupFiles: ['fake-indexeddb/auto'],
11 | }
12 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/service/_sample/api/index.ts:
--------------------------------------------------------------------------------
1 | import { AxiosRequestConfig } from 'axios'
2 | import { instance } from '@app/api/axios'
3 |
4 | export const RestAPI = {
5 | async get(
6 | payload: { name: string },
7 | anotherPayload: string,
8 | options: AxiosRequestConfig
9 | ) {
10 | return await instance.get<{}>('todos/', options)
11 | },
12 | }
13 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/service/_sample/container/index.ts:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react'
2 | import { useAppActions } from '@hooks/useAppActions'
3 | import { useAppSelector } from '@hooks/useAppSelector'
4 |
5 | export const useContainer: SC = () => {
6 | useEffect(() => {}, [])
7 |
8 | const {} = useAppActions()
9 | const {} = useAppSelector(state => state)
10 | }
11 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/service/mappers/index.tsx:
--------------------------------------------------------------------------------
1 | import { createSelector } from 'reselect'
2 | import { AppStateType } from '@app/store/store'
3 |
4 | const selectOne = (state: AppStateType) => state
5 | const selectTwo = (state: AppStateType) => state
6 |
7 | const simple = createSelector(selectOne, selectTwo, (one, two) => ({
8 | one,
9 | two,
10 | }))
11 |
--------------------------------------------------------------------------------
/packages/frontend-constants/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'ts-jest',
3 | testEnvironment: 'jsdom',
4 | roots: ['/src'],
5 | transform: {
6 | '^.+\\.tsx?$': 'ts-jest',
7 | },
8 | testRegex: 'src/.*\\.test\\.ts$',
9 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
10 | setupFiles: ['fake-indexeddb/auto'],
11 | }
12 |
--------------------------------------------------------------------------------
/packages/frontend-event-bus/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'ts-jest',
3 | testEnvironment: 'jsdom',
4 | roots: ['/src'],
5 | transform: {
6 | '^.+\\.tsx?$': 'ts-jest',
7 | },
8 | testRegex: 'src/.*\\.test\\.ts$',
9 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
10 | setupFiles: ['fake-indexeddb/auto'],
11 | }
12 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/router/utils/config.ts:
--------------------------------------------------------------------------------
1 | export const mf = {
2 | root: process.env.REACT_APP_ROOT_PUBLIC_PATH,
3 | auth: process.env.REACT_APP_MF_APP_AUTH_PUBLIC_PATH,
4 | dashboards: process.env.REACT_APP_MF_APP_DASHBOARD_PUBLIC_PATH,
5 | card: process.env.REACT_APP_MF_APP_CARD_PUBLIC_PATH,
6 | registry: process.env.REACT_APP_MF_APP_REGISTRY_PUBLIC_PATH,
7 | } as const
8 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/router/utils/pages.ts:
--------------------------------------------------------------------------------
1 | import { lazy } from 'react'
2 |
3 | // insert page imports here
4 |
5 | export const Auth = lazy(() =>
6 | import('@pages/Auth').then(module => ({
7 | default: module.Page,
8 | }))
9 | )
10 |
11 | export const Main = lazy(() =>
12 | import('@pages/Main').then(module => ({
13 | default: module.Page,
14 | }))
15 | )
16 |
--------------------------------------------------------------------------------
/turbo.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://turbo.build/schema.json",
3 | "globalDependencies": ["**/.env.*local"],
4 | "tasks": {
5 | "build": {
6 | "dependsOn": ["^build"],
7 | "outputs": ["dist/**", ".next/**", "!.next/cache/**"]
8 | },
9 | "lint": {
10 | "outputs": []
11 | },
12 | "dev": {
13 | "cache": false
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/layouts/Main/index.tsx:
--------------------------------------------------------------------------------
1 | import { Suspense } from 'react'
2 | import { Outlet } from 'react-router-dom'
3 | import { Loading } from '@components/templates/Loading'
4 | export const Main: FC = () => (
5 |
6 | }>
7 |
8 |
9 |
10 | )
11 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/layouts/Main/index.tsx:
--------------------------------------------------------------------------------
1 | import { Suspense } from 'react'
2 | import { Outlet } from 'react-router-dom'
3 | import { Loading } from '@components/templates/Loading'
4 | export const Main: FC = () => (
5 |
6 | }>
7 |
8 |
9 |
10 | )
11 |
--------------------------------------------------------------------------------
/frontend/app_root/src/layouts/Secondary/index.tsx:
--------------------------------------------------------------------------------
1 | import { Suspense } from 'react'
2 | import { Outlet } from 'react-router-dom'
3 | import { Loading } from '@components/templates/Loading'
4 |
5 | export const Secondary: FC = () => (
6 |
7 | }>
8 |
9 |
10 |
11 | )
12 |
--------------------------------------------------------------------------------
/other/algorithms/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es6",
4 | "module": "commonjs",
5 | "strict": true,
6 | "esModuleInterop": true,
7 | "outDir": "dist",
8 | "sourceMap": true
9 | },
10 | "include": [
11 | "src/**/*"
12 | ],
13 | "exclude": [
14 | "../core/node_modules", "dist"]
15 | }
16 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/layouts/Secondary/index.tsx:
--------------------------------------------------------------------------------
1 | import { Suspense } from 'react'
2 | import { Outlet } from 'react-router-dom'
3 | import { Loading } from '@components/templates/Loading'
4 |
5 | export const Secondary: FC = () => (
6 |
7 | }>
8 |
9 |
10 |
11 | )
12 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/layouts/Secondary/index.tsx:
--------------------------------------------------------------------------------
1 | import { Suspense } from 'react'
2 | import { Outlet } from 'react-router-dom'
3 | import { Loading } from '@components/templates/Loading'
4 |
5 | export const Secondary: FC = () => (
6 |
7 | }>
8 |
9 |
10 |
11 | )
12 |
--------------------------------------------------------------------------------
/frontend/app_root/.config.locale.js:
--------------------------------------------------------------------------------
1 | const path = require('path')
2 |
3 | const localesFolder = './src/app/localization/locales'
4 |
5 | module.exports = {
6 | apiKey: 'AIzaSyAT2uFOrgZVvZTMmQPk7slY98d80BWcjtk',
7 | googleSheetID: '1vv3ZajyYLC_28y7OXxTLeJYWrwA1qj1DlGH686cg3qc',
8 | sheetName: 'Root',
9 | fileName: 'common.json',
10 | localesFolder: path.resolve(__dirname, localesFolder)
11 | }
12 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/modules/export/AuthService.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Providers } from '@app/providers'
3 | import { InvisibleAuthModulePage } from '@pages/InvisibleAuthModule'
4 |
5 | // Модуль для импорта через Module Federation Plugin
6 | const ExportedModule = () => (
7 |
8 |
9 |
10 | )
11 |
12 | export default ExportedModule
13 |
--------------------------------------------------------------------------------
/other/business_card/src/index.tsx:
--------------------------------------------------------------------------------
1 | import { createRoot } from 'react-dom/client'
2 | import { App } from './App'
3 | import * as serviceWorkerRegistration from './serviceWorkerRegistration'
4 |
5 | import './index.css'
6 |
7 | const container = document.getElementById('root')
8 |
9 | const root = createRoot(container as HTMLDivElement)
10 |
11 | root.render()
12 |
13 | serviceWorkerRegistration.unregister()
14 |
--------------------------------------------------------------------------------
/frontend/app_root/src/layouts/Main/index.tsx:
--------------------------------------------------------------------------------
1 | import { Suspense } from 'react'
2 | import { Flex } from '@npm.piece/ui-kit'
3 | import { Outlet } from 'react-router-dom'
4 | import { Loading } from '@components/templates/Loading'
5 |
6 | export const Main: FC = () => (
7 |
8 | }>
9 |
10 |
11 |
12 | )
13 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/app/entry/ui/index.tsx:
--------------------------------------------------------------------------------
1 | import { ErrorBoundary, ServiceInjector } from '@npm.piece/utils'
2 | import { AppRouter } from '@app/router'
3 | import { appSize } from '@services/appSize'
4 |
5 | export const App: FC = () => (
6 | <>
7 | error}>
8 |
9 |
10 |
11 | >
12 | )
13 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/app/entry/ui/index.tsx:
--------------------------------------------------------------------------------
1 | import { ErrorBoundary, ServiceInjector } from '@npm.piece/utils'
2 | import { AppRouter } from '@app/router'
3 | import { appSize } from '@services/appSize'
4 |
5 | export const App: FC = () => (
6 | <>
7 | error}>
8 |
9 |
10 |
11 | >
12 | )
13 |
--------------------------------------------------------------------------------
/packages/utils/src/utils/base64ToArrayBuffer.ts:
--------------------------------------------------------------------------------
1 | export const base64ToArrayBuffer = (base64: string | Blob) => {
2 | if (typeof base64 === 'string') {
3 | const binary = window.atob(base64)
4 | const buffer = new ArrayBuffer(binary.length)
5 | const bytes = new Uint8Array(buffer)
6 | for (let i = 0; i < buffer.byteLength; i++) {
7 | bytes[i] = binary.charCodeAt(i)
8 | }
9 |
10 | return buffer
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/app/entry/ui/index.tsx:
--------------------------------------------------------------------------------
1 | import { ErrorBoundary, ServiceInjector } from '@npm.piece/utils'
2 | import { AppRouter } from '@app/router'
3 | import { appSize } from '@services/appSize'
4 |
5 | export const App: FC = () => (
6 | <>
7 | error}>
8 |
9 |
10 |
11 | >
12 | )
13 |
--------------------------------------------------------------------------------
/frontend/app_auth/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | /.idea
8 |
9 | # testing
10 | /coverage
11 |
12 | # production
13 | /build
14 |
15 | # misc
16 | .DS_Store
17 | .env.local
18 | .env.development.local
19 | .env.test.local
20 | .env.production.local
21 |
22 | npm-debug.log*
23 | yarn-debug.log*
24 | yarn-error.log*
25 |
--------------------------------------------------------------------------------
/frontend/app_root/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | /.idea
8 |
9 | # testing
10 | /coverage
11 |
12 | # production
13 | /build
14 |
15 | # misc
16 | .DS_Store
17 | .env.local
18 | .env.development.local
19 | .env.test.local
20 | .env.production.local
21 |
22 | npm-debug.log*
23 | yarn-debug.log*
24 | yarn-error.log*
25 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/scripts/service/remove.ts:
--------------------------------------------------------------------------------
1 | import * as path from 'path'
2 | import { deleteDirectory } from '../utils/removeFolder'
3 |
4 | type PayloadType = {
5 | destination: string
6 | name: string
7 | }
8 |
9 | export const removeService = async (payload: PayloadType) => {
10 | await deleteDirectory(path.join(payload.destination, payload.name))
11 | console.log('\x1b[36m', `Service ${payload.name} removed`, '\x1b[0m')
12 | }
13 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/scripts/widget/remove.ts:
--------------------------------------------------------------------------------
1 | import * as path from 'path'
2 | import { deleteDirectory } from '../utils/removeFolder'
3 |
4 | type PayloadType = {
5 | destination: string
6 | name: string
7 | }
8 |
9 | export const removeWidget = async (payload: PayloadType) => {
10 | await deleteDirectory(path.join(payload.destination, payload.name))
11 | console.log('\x1b[36m', `Widget ${payload.name} removed`, '\x1b[0m')
12 | }
13 |
--------------------------------------------------------------------------------
/packages/mf-connect/src/scripts/utils/lib/types.ts:
--------------------------------------------------------------------------------
1 | export type EntityType = {
2 | dev: T
3 | prod: T
4 | }
5 |
6 | export type MFType = {
7 | publicPath: EntityType
8 | host: EntityType
9 | port: EntityType
10 | import: string[]
11 | }
12 |
13 | export type ConfigType = {
14 | MFList: Record
15 | config: Record>
16 | getProjectPath: (name: string) => string
17 | }
18 |
--------------------------------------------------------------------------------
/packages/utils/src/utils/binaryToLink.ts:
--------------------------------------------------------------------------------
1 | import { base64ToArrayBuffer } from './base64ToArrayBuffer.ts'
2 | import { createTempImageLinkFromBlob } from './createTempImageLinkFromBlob.ts'
3 |
4 | export const binaryToLink = (binaryData: any) => {
5 | const link = createTempImageLinkFromBlob(
6 | // @ts-ignore
7 | new Blob([base64ToArrayBuffer(binaryData)], {
8 | type: 'application/pdf',
9 | })
10 | )
11 |
12 | return link
13 | }
14 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | /.idea
8 |
9 | # testing
10 | /coverage
11 |
12 | # production
13 | /build
14 |
15 | # misc
16 | .DS_Store
17 | .env.local
18 | .env.development.local
19 | .env.test.local
20 | .env.production.local
21 |
22 | npm-debug.log*
23 | yarn-debug.log*
24 | yarn-error.log*
25 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/app/store/reducers.ts:
--------------------------------------------------------------------------------
1 | import { generatedReducersList } from '@app/store/generated/reducers'
2 | import { Reducer as appSize } from '@services/appSize'
3 |
4 | export const reducersList = {
5 | // Services: Начало
6 | appSize,
7 | // Services: Конец
8 |
9 | // Widgets: Начало
10 | // Widgets: Конец
11 |
12 | // Auto Generated Reducers: Начало
13 | ...generatedReducersList,
14 | // Auto Generated Reducers: Конец
15 | }
16 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | /.idea
8 |
9 | # testing
10 | /coverage
11 |
12 | # production
13 | /build
14 |
15 | # misc
16 | .DS_Store
17 | .env.local
18 | .env.development.local
19 | .env.test.local
20 | .env.production.local
21 |
22 | npm-debug.log*
23 | yarn-debug.log*
24 | yarn-error.log*
25 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/app/store/reducers.ts:
--------------------------------------------------------------------------------
1 | import { generatedReducersList } from '@app/store/generated/reducers'
2 | import { Reducer as appSize } from '@services/appSize'
3 |
4 | export const reducersList = {
5 | // Services: Начало
6 | appSize,
7 | // Services: Конец
8 |
9 | // Widgets: Начало
10 | // Widgets: Конец
11 |
12 | // Auto Generated Reducers: Начало
13 | ...generatedReducersList,
14 | // Auto Generated Reducers: Конец
15 | }
16 |
--------------------------------------------------------------------------------
/other/algorithms/src/algorithms/sortings/README.md:
--------------------------------------------------------------------------------
1 | > ### 1. Простые сортировки:
2 | >
3 | > - Сортировка пузырьком (Bubble Sort)
4 | > - Сортировка выбором (Selection Sort)
5 | > - Сортировка вставками (Insertion Sort)
6 | >
7 | > В худшем варианте, все три сортировки выдадут сложность O(n^2), но чем лучше отсортирован массив, тем быстрее будет _Сортировка вставками (Insertion Sort)_, затем _Сортировка выбором (Selection Sort)_, и затем _Сортировка пузырьком (Bubble Sort)_
8 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/app/store/reducers.ts:
--------------------------------------------------------------------------------
1 | import { generatedReducersList } from '@app/store/generated/reducers'
2 | import { Reducer as appSize } from '@services/appSize'
3 |
4 | export const reducersList = {
5 | // Services: Начало
6 | appSize,
7 | // Services: Конец
8 |
9 | // Widgets: Начало
10 | // Widgets: Конец
11 |
12 | // Auto Generated Reducers: Начало
13 | ...generatedReducersList,
14 | // Auto Generated Reducers: Конец
15 | }
16 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/app/store/generated/middlewares.ts:
--------------------------------------------------------------------------------
1 | import { orderStore } from '@generated/hooks/order'
2 | import { petStore } from '@generated/hooks/pet'
3 | import { userStore } from '@generated/hooks/user'
4 |
5 | const generatedMiddlewaresList = [
6 | orderStore.middleware,
7 | petStore.middleware,
8 | userStore.middleware,
9 | ]
10 |
11 | // Этот файл нужен для автоматической инъекции middlewares в ваш store
12 | export { generatedMiddlewaresList }
13 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/app/api/RTK.ts:
--------------------------------------------------------------------------------
1 | import { createAxiosBaseQuery } from '@npm.piece/common-frontend'
2 | import { createApi } from '@reduxjs/toolkit/query/react'
3 | import { instance } from '@app/api/axios'
4 |
5 | const baseQuery = createAxiosBaseQuery(instance)
6 |
7 | // initialize an empty api service that we'll inject endpoints into later as needed
8 | export const api = createApi({
9 | baseQuery,
10 | reducerPath: 'reducer',
11 | endpoints: () => ({}),
12 | })
13 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/reportWebVitals.ts:
--------------------------------------------------------------------------------
1 | import { ReportHandler } from 'web-vitals'
2 |
3 | export const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4 | if (onPerfEntry && onPerfEntry instanceof Function) {
5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6 | getCLS(onPerfEntry)
7 | getFID(onPerfEntry)
8 | getFCP(onPerfEntry)
9 | getLCP(onPerfEntry)
10 | getTTFB(onPerfEntry)
11 | })
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/api/RTK.ts:
--------------------------------------------------------------------------------
1 | import { createAxiosBaseQuery } from '@npm.piece/common-frontend'
2 | import { createApi } from '@reduxjs/toolkit/query/react'
3 | import { instance } from '@app/api/axios'
4 |
5 | const baseQuery = createAxiosBaseQuery(instance)
6 |
7 | // initialize an empty api service that we'll inject endpoints into later as needed
8 | export const api = createApi({
9 | baseQuery,
10 | reducerPath: 'reducer',
11 | endpoints: () => ({}),
12 | })
13 |
--------------------------------------------------------------------------------
/frontend/app_root/src/reportWebVitals.ts:
--------------------------------------------------------------------------------
1 | import { ReportHandler } from 'web-vitals'
2 |
3 | export const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4 | if (onPerfEntry && onPerfEntry instanceof Function) {
5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6 | getCLS(onPerfEntry)
7 | getFID(onPerfEntry)
8 | getFCP(onPerfEntry)
9 | getLCP(onPerfEntry)
10 | getTTFB(onPerfEntry)
11 | })
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/app/store/generated/middlewares.ts:
--------------------------------------------------------------------------------
1 | import { orderStore } from '@generated/hooks/order'
2 | import { petStore } from '@generated/hooks/pet'
3 | import { userStore } from '@generated/hooks/user'
4 |
5 | const generatedMiddlewaresList = [
6 | orderStore.middleware,
7 | petStore.middleware,
8 | userStore.middleware,
9 | ]
10 |
11 | // Этот файл нужен для автоматической инъекции middlewares в ваш store
12 | export { generatedMiddlewaresList }
13 |
--------------------------------------------------------------------------------
/other/business_card/src/reportWebVitals.ts:
--------------------------------------------------------------------------------
1 | import { ReportHandler } from 'web-vitals'
2 |
3 | export const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4 | if (onPerfEntry && onPerfEntry instanceof Function) {
5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6 | getCLS(onPerfEntry)
7 | getFID(onPerfEntry)
8 | getFCP(onPerfEntry)
9 | getLCP(onPerfEntry)
10 | getTTFB(onPerfEntry)
11 | })
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/ui-kit/src/assets/icon-mask.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/app/api/RTK.ts:
--------------------------------------------------------------------------------
1 | import { createAxiosBaseQuery } from '@npm.piece/common-frontend'
2 | import { createApi } from '@reduxjs/toolkit/query/react'
3 | import { instance } from '@app/api/axios'
4 |
5 | const baseQuery = createAxiosBaseQuery(instance)
6 |
7 | // initialize an empty api service that we'll inject endpoints into later as needed
8 | export const api = createApi({
9 | baseQuery,
10 | reducerPath: 'reducer',
11 | endpoints: () => ({}),
12 | })
13 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/theme/container/index.ts:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react'
2 | import { useAppSelector } from '@hooks/useAppSelector'
3 |
4 | export const useContainer: SC = () => {
5 | const isDarkTheme = useAppSelector(state => state.theme.isDarkTheme)
6 |
7 | useEffect(() => {
8 | if (isDarkTheme) {
9 | document.body.classList.add('dark')
10 | } else {
11 | document.body.classList.remove('dark')
12 | }
13 | }, [isDarkTheme])
14 | }
15 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/reportWebVitals.ts:
--------------------------------------------------------------------------------
1 | import { ReportHandler } from 'web-vitals'
2 |
3 | export const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4 | if (onPerfEntry && onPerfEntry instanceof Function) {
5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6 | getCLS(onPerfEntry)
7 | getFID(onPerfEntry)
8 | getFCP(onPerfEntry)
9 | getLCP(onPerfEntry)
10 | getTTFB(onPerfEntry)
11 | })
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/app/api/RTK.ts:
--------------------------------------------------------------------------------
1 | import { createApi } from '@reduxjs/toolkit/query/react'
2 | import { createAxiosBaseQuery } from '@npm.piece/common-frontend'
3 | import { instance } from '@app/api/axios'
4 |
5 | const baseQuery = createAxiosBaseQuery(instance)
6 |
7 | // initialize an empty api service that we'll inject endpoints into later as needed
8 | export const api = createApi({
9 | baseQuery,
10 | reducerPath: 'reducer',
11 | endpoints: () => ({}),
12 | })
13 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/reportWebVitals.ts:
--------------------------------------------------------------------------------
1 | import { ReportHandler } from 'web-vitals'
2 |
3 | export const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4 | if (onPerfEntry && onPerfEntry instanceof Function) {
5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6 | getCLS(onPerfEntry)
7 | getFID(onPerfEntry)
8 | getFCP(onPerfEntry)
9 | getLCP(onPerfEntry)
10 | getTTFB(onPerfEntry)
11 | })
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/frontend-common/README.md:
--------------------------------------------------------------------------------
1 | ## Common utilities for frontend
2 |
3 | Custom base query for rtk query
4 |
5 | ```tsx
6 | import { createApi } from '@reduxjs/toolkit/query/react'
7 | import { createAxiosBaseQuery } from '@npm.piece/common-frontend'
8 | import { instance } from '@app/api/axios'
9 |
10 | const baseQuery = createAxiosBaseQuery(instance)
11 |
12 | export const api = createApi({
13 | baseQuery,
14 | reducerPath: 'reducer',
15 | endpoints: () => ({}),
16 | })
17 | ```
18 |
--------------------------------------------------------------------------------
/packages/update-packages/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@npm.piece/update-packages",
3 | "version": "1.0.1",
4 | "files": [
5 | "package.json",
6 | "README"
7 | ],
8 | "keywords": [
9 | "react"
10 | ],
11 | "description": "Frequently used hooks for React",
12 | "homepage": "https://github.com/Morozzko/React_Blank_App/tree/master/packages/types",
13 | "author": "Morozzko",
14 | "license": "ISC",
15 | "dependencies": {
16 | "semver": "^7.5.4"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/utils/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './clsx'
2 | export * from './createQueryParams'
3 | export * from './deepClone'
4 | export * from './mergeObjects'
5 | export * from './lodashToESM'
6 | export * from './createTempImageLinkFromBlob'
7 | export * from './arrayBufferToBase64.ts'
8 | export * from './base64ToArrayBuffer.ts'
9 | export * from './asPathnameParam'
10 | export * from './binaryToLink.ts'
11 | export * from './formatDate.ts'
12 | export * from './addDarkThemeColor.ts'
13 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/layouts/index.tsx:
--------------------------------------------------------------------------------
1 | import { Main } from './Main'
2 |
3 | // Здесь находятся основные макеты приложения, которые могут быть использованы для разных страниц.
4 | // Макеты в приложении предназначены для определения общей структуры и стилей страниц, на которых они используются.
5 | // Они помогают обеспечить единообразие и согласованность между разными страницами, что делает разработку и поддержку приложения более эффективной и структурированной.
6 | export const Layouts = {
7 | Main,
8 | }
9 |
--------------------------------------------------------------------------------
/frontend/app_root/src/layouts/index.tsx:
--------------------------------------------------------------------------------
1 | export * from './Main'
2 | export * from './Empty'
3 | export * from './Secondary'
4 |
5 | // Здесь находятся основные макеты приложения, которые могут быть использованы для разных страниц.
6 | // Макеты в приложении предназначены для определения общей структуры и стилей страниц, на которых они используются.
7 | // Они помогают обеспечить единообразие и согласованность между разными страницами, что делает разработку и поддержку приложения более эффективной и структурированной.
8 |
--------------------------------------------------------------------------------
/_templates/rtkgen/widget/templates/Sample/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Flex } from '@npm.piece/ui-kit'
3 | import { clsx } from '@npm.piece/utils'
4 | import { dti } from '../../constants/data-testid'
5 |
6 | export const dtiDictionary = {
7 | mainDiv: 'sample',
8 | }
9 |
10 | type OwnPropertyType = {}
11 |
12 | export const Sample: FC = React.memo(({}) => (
13 |
14 | {}
15 |
16 | ))
17 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/scripts/page/remove.ts:
--------------------------------------------------------------------------------
1 | import * as path from 'path'
2 | import { deleteDirectory } from '../utils/removeFolder'
3 |
4 | type PayloadType = {
5 | name: string
6 | destination: string
7 | }
8 |
9 | export const removePage = async (payload: PayloadType) => {
10 | const name = payload.name.charAt(0).toUpperCase() + payload.name.slice(1)
11 | await deleteDirectory(path.join(payload.destination, name))
12 |
13 | console.log('\x1b[36m', `Page ${name} removed`, '\x1b[0m')
14 | }
15 |
--------------------------------------------------------------------------------
/_templates/rtkgen/service/store/index.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'
2 | import { name } from '../constants/name'
3 | import { initialState } from '../structure'
4 |
5 | const slice = createSlice({
6 | name,
7 | initialState,
8 | reducers: {
9 | setLoading(state, action: PayloadAction) {
10 | state.isLoading = action.payload
11 | },
12 | },
13 | })
14 |
15 | export const Actions = slice.actions
16 | export const Reducer = slice.reducer
17 |
--------------------------------------------------------------------------------
/_templates/rtkgen/widget/store/index.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'
2 | import { name } from '../constants/name'
3 | import { initialState } from '../structure'
4 |
5 | const slice = createSlice({
6 | name,
7 | initialState,
8 | reducers: {
9 | setLoading(state, action: PayloadAction) {
10 | state.isLoading = action.payload
11 | },
12 | },
13 | })
14 |
15 | export const Actions = slice.actions
16 | export const Reducer = slice.reducer
17 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/widget/_Sample/templates/Sample/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 | import { clsx } from '@npm.piece/utils'
3 | import React from 'react'
4 | import { dti } from '../../constants/data-testid'
5 |
6 | export const dtiDictionary = {
7 | mainDiv: 'sample',
8 | }
9 |
10 | type OwnPropertyType = {}
11 |
12 | export const Simple: FC = React.memo(({}) => (
13 |
14 | {}
15 |
16 | ))
17 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/store/reducers.ts:
--------------------------------------------------------------------------------
1 | import { generatedReducersList } from '@app/store/generated/reducers'
2 | import { Reducer as appSize } from '@services/appSize'
3 | import { Reducer as theme } from '@services/theme'
4 |
5 | export const reducersList = {
6 | // Services: Начало
7 | theme,
8 | appSize,
9 | // Services: Конец
10 |
11 | // Widgets: Начало
12 | // Widgets: Конец
13 |
14 | // Auto Generated Reducers: Начало
15 | ...generatedReducersList,
16 | // Auto Generated Reducers: Конец
17 | }
18 |
--------------------------------------------------------------------------------
/packages/frontend-event-bus/src/microfrontends/enum.ts:
--------------------------------------------------------------------------------
1 | export enum EventTransferActionsEnum {
2 | // Обновление токена: Начало
3 | AuthRefreshToken = 'AuthRefreshToken',
4 | RefreshTokenComplete = 'RefreshTokenComplete',
5 | NavigateToAuth = 'NavigateToAuth',
6 | // Обновление токена: Конец
7 | }
8 |
9 | export type EventTransferPayloadType = {
10 | [EventTransferActionsEnum.AuthRefreshToken]: {}
11 | [EventTransferActionsEnum.RefreshTokenComplete]: {}
12 | [EventTransferActionsEnum.NavigateToAuth]: {}
13 | }
14 |
--------------------------------------------------------------------------------
/packages/frontend-constants/src/routes/index.ts:
--------------------------------------------------------------------------------
1 | export enum RoutesEnum {
2 | main = '/',
3 | auth = '/auth/',
4 | settings = '/settings/',
5 | dashboards = '/dashboards/',
6 | registry = '/documents/',
7 | card = '/card/',
8 | }
9 |
10 | export enum PagesEnum {
11 | cardId = ':cardId/',
12 | edit = 'edit/',
13 | }
14 |
15 | export const routes = {
16 | cardById: `${RoutesEnum.card}${PagesEnum.cardId}`,
17 | dashboardsEdit: `${RoutesEnum.dashboards}${PagesEnum.edit}`,
18 | dashboardMain: RoutesEnum.main,
19 | }
20 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/modules/import/index.js:
--------------------------------------------------------------------------------
1 | import { ErrorBoundary } from '@npm.piece/utils'
2 |
3 | import React, { Suspense, lazy } from 'react'
4 |
5 | const RedModuleLazy = lazy(
6 | async () => await import('RenameImportedModuleHere/AnyNameHere')
7 | )
8 |
9 | const RemoteFactory = JSX => (
10 | error}>
11 | {JSX}
12 |
13 | )
14 |
15 | export const RedModule = props => RemoteFactory()
16 |
--------------------------------------------------------------------------------
/_templates/rtkgen/service/container/index.ts:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react'
2 | import { useAppActions } from '@hooks/useAppActions'
3 | import { useAppSelector } from '@hooks/useAppSelector'
4 |
5 | export const useContainer: SC = () => {
6 | // Чтение данных из store: Начало
7 | const {} = useAppSelector(state => state)
8 | // Чтение данных из store: Конец
9 |
10 | // Работа с данными из store: Начало
11 | const {} = useAppActions()
12 | // Работа с данными из store: Конец
13 |
14 | useEffect(() => {}, [])
15 | }
16 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/modules/import/index.js:
--------------------------------------------------------------------------------
1 | import { ErrorBoundary } from '@npm.piece/utils'
2 |
3 | import React, { Suspense, lazy } from 'react'
4 |
5 | const RedModuleLazy = lazy(
6 | async () => await import('RenameImportedModuleHere/AnyNameHere')
7 | )
8 |
9 | const RemoteFactory = JSX => (
10 | error}>
11 | {JSX}
12 |
13 | )
14 |
15 | export const RedModule = props => RemoteFactory()
16 |
--------------------------------------------------------------------------------
/packages/frontend-event-bus/src/microfrontends/mfTypes/utils.ts:
--------------------------------------------------------------------------------
1 | import { EventTransferActionsEnum, EventTransferPayloadType } from '../enum'
2 |
3 | export type EventTransferGenericPayloadType<
4 | T extends EventTransferActionsEnum
5 | > = {
6 | data: EventTransferPayloadType[T]
7 | isDebugMode?: boolean
8 | name: T
9 | }
10 |
11 | export type SubscribeType = {
12 | type: T
13 | callback: (value: EventTransferPayloadType[T]) => void
14 | isDebugMode?: boolean
15 | deps?: any[]
16 | }
17 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/app/store/generated/reducers.ts:
--------------------------------------------------------------------------------
1 | import { orderStore } from '@generated/hooks/order'
2 | import { petStore } from '@generated/hooks/pet'
3 | import { userStore } from '@generated/hooks/user'
4 |
5 | const generatedReducersList = {
6 | [orderStore.reducerPath]: orderStore.reducer,
7 | [petStore.reducerPath]: petStore.reducer,
8 | [userStore.reducerPath]: userStore.reducer,
9 | }
10 |
11 | // Этот файл нужен для импорта автоматически сгенерированных reducers в ваш store
12 | export { generatedReducersList }
13 |
--------------------------------------------------------------------------------
/_templates/rtkgen/widget/ui/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Flex } from '@npm.piece/ui-kit'
3 | import { clsx } from '@npm.piece/utils'
4 | import { dti } from '../constants/data-testid'
5 |
6 | export const dtiDictionary = {
7 | mainDiv: 'UI',
8 | }
9 |
10 | export type UIPropertyType = {
11 | t: Callback
12 | }
13 |
14 | export const UI: FC = React.memo(({ t }) => (
15 |
16 | {t('text')}
17 |
18 | ))
19 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/app/store/generated/reducers.ts:
--------------------------------------------------------------------------------
1 | import { orderStore } from '@generated/hooks/order'
2 | import { petStore } from '@generated/hooks/pet'
3 | import { userStore } from '@generated/hooks/user'
4 |
5 | const generatedReducersList = {
6 | [orderStore.reducerPath]: orderStore.reducer,
7 | [petStore.reducerPath]: petStore.reducer,
8 | [userStore.reducerPath]: userStore.reducer,
9 | }
10 |
11 | // Этот файл нужен для импорта автоматически сгенерированных reducers в ваш store
12 | export { generatedReducersList }
13 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/service/store/index.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'
2 | import { name } from '../constants/name'
3 | import { initialState } from '../structure'
4 |
5 | export const slice = createSlice({
6 | name,
7 | initialState,
8 | reducers: {
9 | setLoading(state, action: PayloadAction) {
10 | state.isLoading = action.payload
11 | },
12 | },
13 | })
14 |
15 | export const Actions = slice.actions
16 | export const Reducer = slice.reducer
17 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/widget/_Sample/store/index.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'
2 | import { name } from '../constants/name'
3 | import { initialState } from '../structure'
4 |
5 | const slice = createSlice({
6 | name,
7 | initialState,
8 | reducers: {
9 | setLoading(state, action: PayloadAction) {
10 | state.isLoading = action.payload
11 | },
12 | },
13 | })
14 |
15 | export const Actions = {
16 | ...slice.actions,
17 | }
18 |
19 | export const Reducer = slice.reducer
20 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/service/container/index.ts:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react'
2 | import { useAppActions } from '@hooks/useAppActions'
3 | import { useAppSelector } from '@hooks/useAppSelector'
4 |
5 | export const useContainer: SC = () => {
6 | // Чтение данных из store: Начало
7 | const {} = useAppSelector(state => state)
8 | // Чтение данных из store: Конец
9 |
10 | // Работа с данными из store: Начало
11 | const {} = useAppActions()
12 | // Работа с данными из store: Конец
13 |
14 | useEffect(() => {}, [])
15 | }
16 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/utils/functions/thunkCreator/lib/types.ts:
--------------------------------------------------------------------------------
1 | import { SerializedError } from '@reduxjs/toolkit'
2 | import { AxiosRequestConfig } from 'axios'
3 |
4 | export type RejectValueType = SerializedError
5 |
6 | export type ThunkErrorType = {
7 | rejectValue: RejectValueType
8 | }
9 |
10 | export type WithoutOptionsType = ExcludeLastType<
11 | Parameters
12 | >
13 | export type ExcludeLastType = T extends [
14 | ...infer R,
15 | AxiosRequestConfig
16 | ]
17 | ? R
18 | : never
19 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/widget/_Sample/ui/index.tsx:
--------------------------------------------------------------------------------
1 | import { Flex } from '@npm.piece/ui-kit'
2 | import { clsx } from '@npm.piece/utils'
3 | import React from 'react'
4 | import { dti } from '../constants/data-testid'
5 |
6 | export const dtiDictionary = {
7 | mainDiv: 'sample',
8 | }
9 |
10 | export type UIPropertyType = {
11 | t: Callback
12 | }
13 |
14 | export const UI: FC = React.memo(({ t }) => (
15 |
16 | {t('text')}
17 |
18 | ))
19 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/entry/ui/index.tsx:
--------------------------------------------------------------------------------
1 | import { ErrorBoundary, ServiceInjector } from '@npm.piece/utils'
2 | import { AppRouter } from '@app/router'
3 | import { appSize } from '@services/appSize'
4 | import { logs } from '@services/logs'
5 | import { theme } from '@services/theme'
6 |
7 | export const App: FC = () => (
8 | <>
9 | error}>
10 |
11 |
12 |
15 | >
16 | )
17 |
--------------------------------------------------------------------------------
/packages/utils/src/local-and-session-storage/getFromLocalStorage.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * The getFromLocalStorage function retrieves a value from localStorage.
3 | * @example const data = getFromLocalStorage('user')
4 | * @param key string Specify the key of the item in local storage
5 | *
6 | * @return The parsed item from local storage
7 | *
8 | */
9 | export const getFromLocalStorage = (key: string) => {
10 | const localStorageItem = localStorage.getItem(key)
11 |
12 | return localStorageItem ? (JSON.parse(localStorageItem) as T) : null
13 | }
14 |
--------------------------------------------------------------------------------
/packages/ui-kit/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: { browser: true, es2020: true },
3 | parser: '@typescript-eslint/parser',
4 | plugins: ['react-refresh'],
5 | rules: {
6 |
7 | },
8 | // settings: {
9 | // 'import/resolver': {
10 | // alias: {
11 | // map: [
12 | // ["@components", "./src/components"],
13 | // ["@constants", "./src/constants"],
14 | // ["@types", "./src/types"],
15 | // ],
16 | // "extensions": [".js", ".jsx", ".ts", ".tsx"]
17 | // }
18 | // }
19 | // }
20 | }
21 |
--------------------------------------------------------------------------------
/frontend/app_root/src/modules/import/index.js:
--------------------------------------------------------------------------------
1 | import React, { Suspense, lazy } from 'react'
2 | import { ErrorBoundary } from '@npm.piece/utils'
3 |
4 | const AuthModuleLazy = lazy(async () => await import('AuthMF/AuthContainer'))
5 | // const AuthServiceLazy = lazy(async () => await import('AuthMF/AuthService'))
6 |
7 | const RemoteFactory = JSX => (
8 | error}>
9 | {JSX}
10 |
11 | )
12 |
13 | export const AuthModule = props => RemoteFactory()
14 |
--------------------------------------------------------------------------------
/packages/types/frontend.d.ts:
--------------------------------------------------------------------------------
1 | import { FunctionComponent, ReactNode } from 'react'
2 |
3 | type ChildrenType = {
4 | children?: ReactNode
5 | }
6 |
7 | type MFPropsType = {
8 | basename?: string
9 | }
10 |
11 | declare global {
12 | // Function Component
13 | type FC = FunctionComponent
14 |
15 | // Container Component
16 | type CC = () => T
17 |
18 | // Service Component
19 | type SC = () => void
20 |
21 | type ImportedMF = FC
22 | }
23 |
24 | // Экспорт, чтобы модуль не был пустым
25 | export {}
26 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/layouts/index.tsx:
--------------------------------------------------------------------------------
1 | import { Main } from './Main'
2 | import { Secondary } from './Secondary'
3 |
4 | // Здесь находятся основные макеты приложения, которые могут быть использованы для разных страниц.
5 | // Макеты в приложении предназначены для определения общей структуры и стилей страниц, на которых они используются.
6 | // Они помогают обеспечить единообразие и согласованность между разными страницами, что делает разработку и поддержку приложения более эффективной и структурированной.
7 | export const Layouts = {
8 | Main,
9 | Secondary,
10 | }
11 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/layouts/index.tsx:
--------------------------------------------------------------------------------
1 | import { Main } from './Main'
2 | import { Secondary } from './Secondary'
3 |
4 | // Здесь находятся основные макеты приложения, которые могут быть использованы для разных страниц.
5 | // Макеты в приложении предназначены для определения общей структуры и стилей страниц, на которых они используются.
6 | // Они помогают обеспечить единообразие и согласованность между разными страницами, что делает разработку и поддержку приложения более эффективной и структурированной.
7 | export const Layouts = {
8 | Main,
9 | Secondary,
10 | }
11 |
--------------------------------------------------------------------------------
/packages/utils/src/local-and-session-storage/setToSessionStorage.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * The setToSessionStorage function takes in a key and data, then sets the data to sessionStorage with the given key.
3 | *
4 | * @example setToSessionStorage('user', { id })
5 | * @param key string Identify the data in session storage
6 | * @param data T Specify the type of data that will be stored in session storage
7 | *
8 | * @return Void
9 | *
10 | */
11 | export const setToSessionStorage = (key: string, data: T) => {
12 | sessionStorage.setItem(key, JSON.stringify(data))
13 | }
14 |
--------------------------------------------------------------------------------
/packages/utils/src/hooks/useMockData/types.ts:
--------------------------------------------------------------------------------
1 | export type FieldTypesType = 'string' | 'number' | 'boolean' | 'Date'
2 | export type FieldsDefinitionType = Record
3 |
4 | export type DataItemType = {
5 | id: string
6 | } & {
7 | [K in keyof Fields]: Fields[K] extends 'string'
8 | ? string
9 | : Fields[K] extends 'number'
10 | ? number
11 | : Fields[K] extends 'boolean'
12 | ? boolean
13 | : Fields[K] extends 'date'
14 | ? Date
15 | : never
16 | }
17 | export type SortOrderType = 'ASC' | 'DESC'
18 |
--------------------------------------------------------------------------------
/packages/utils/src/local-and-session-storage/getFromSessionStorage.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * The getFromSessionStorage function retrieves a value from the sessionStorage object.
3 | * @example const data = getFromSessionStorage('user')
4 | *
5 | * @param key string Specify the key of the item in session storage
6 | *
7 | * @return The parsed item from session storage
8 | *
9 | */
10 | export const getFromSessionStorage = (key: string) => {
11 | const sessionStorageItem = sessionStorage.getItem(key)
12 |
13 | return sessionStorageItem ? (JSON.parse(sessionStorageItem) as T) : null
14 | }
15 |
--------------------------------------------------------------------------------
/_config/scriptsForBundle/getKeys.js:
--------------------------------------------------------------------------------
1 | const data = {
2 | '@reduxjs/toolkit': '^1.9.5',
3 | '@npm.piece/ui-kit': '^0.0.27',
4 | '@npm.piece/utils': '^1.0.32',
5 | 'async-mutex': '^0.4.0',
6 | axios: '^1.3.6',
7 | clsx: '^2.0.0',
8 | i18next: '^23.2.6',
9 | react: '^18.2.0',
10 | 'react-dom': '^18.2.0',
11 | 'react-hook-form': '^7.43.9',
12 | 'react-i18next': '^13.0.1',
13 | 'react-redux': '^8.1.2',
14 | 'react-router-dom': '^6.10.0',
15 | redux: '^4.2.1',
16 | 'redux-thunk': '^2.4.2',
17 | uuid: '^9.0.0',
18 | 'web-vitals': '^2.1.4',
19 | }
20 |
21 | console.log(Object.keys(data))
22 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/theme/store/index.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'
2 | import { name } from '../constants/name'
3 | import { initialState } from '../structure'
4 |
5 | export const slice = createSlice({
6 | name,
7 | initialState,
8 | reducers: {
9 | setDarkThemeMode(
10 | state,
11 | action: PayloadAction
12 | ) {
13 | state.isDarkTheme = action.payload
14 | },
15 | },
16 | })
17 |
18 | export const Actions = {
19 | ...slice.actions,
20 | }
21 |
22 | export const Reducer = slice.reducer
23 |
--------------------------------------------------------------------------------
/other/algorithms/src/structures/4.associative-data-structures/1.dictionary/index.ts:
--------------------------------------------------------------------------------
1 | // Словари (хеш-таблицы): Обычные объекты в JavaScript, которые могут быть использованы как хеш-таблицы.
2 | // Они позволяют хранить пары ключ-значение,
3 | // где ключ является строкой.
4 | // Они имеют ограниченные возможности по сравнению с классами Map и Set.
5 |
6 | const dictionary: Record = {}
7 |
8 | dictionary['one'] = 1
9 | dictionary['two'] = 2
10 | dictionary['three'] = 3
11 |
12 | console.log(dictionary['one']) // 1
13 | console.log(dictionary['two']) // 2
14 | console.log(dictionary['three']) // 3
15 |
--------------------------------------------------------------------------------
/packages/eslint-config/README.md:
--------------------------------------------------------------------------------
1 | # ESLint config for clear code
2 |
3 | ## Install
4 |
5 | ```
6 | npm i @npm.piece/eslint-config -D
7 | ```
8 |
9 | ```
10 | yarn add @npm.piece/eslint-config -D
11 | ```
12 |
13 | ## Create .eslintrc near package.json file
14 | ```json
15 | {
16 | "extends": [
17 | "@npm.piece/eslint-config"
18 | ],
19 | "parserOptions": {
20 | "ecmaVersion": 2020,
21 | "sourceType": "module",
22 | "project": "./tsconfig.json"
23 | }
24 | }
25 | ```
26 |
27 | ## Add line to your tsconfig.json file
28 | ```json
29 | "include": [
30 | "src",
31 | "."
32 | ]
33 | ```
34 |
--------------------------------------------------------------------------------
/packages/utils/src/local-and-session-storage/setToLocalStorage.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * The setToLocalStorage function takes in a key and data as arguments.
3 | * It then sets the item to local storage with the given key and stringified data.
4 | *
5 | * @example setToLocalStorage('user', { id })
6 | *
7 | * @param key string Identify the data in localstorage
8 | * @param data T Tell the function what type of data it will be receiving
9 | *
10 | * @return Void
11 | *
12 | */
13 |
14 | export const setToLocalStorage = (key: string, data: T) => {
15 | localStorage.setItem(key, JSON.stringify(data))
16 | }
17 |
--------------------------------------------------------------------------------
/packages/utils/src/hooks/index.ts:
--------------------------------------------------------------------------------
1 | export * from './useClickOutside'
2 | export * from './useDebounce'
3 | export * from './useEffectWithoutFirstCall'
4 | export * from './useFocus'
5 | export * from './useInterval'
6 | export * from './useIsVisibleElement'
7 | export * from './useKeyPressDetect'
8 | export * from './useLoadQueryParams'
9 | export * from './useMockData'
10 | export * from './useOnKeyPress'
11 | export * from './useOnlineDetect'
12 | export * from './usePortraitDetect'
13 | export * from './useSizeDetect'
14 | export * from './useThrottle'
15 | export * from './useTimeout'
16 | export * from './useWebWorker.ts'
17 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/widget/_Sample/container/useContainer.ts:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react'
2 | import { useTranslation } from 'react-i18next'
3 | import { useAppActions } from '@hooks/useAppActions'
4 | import { useAppSelector } from '@hooks/useAppSelector'
5 | import { UIPropertyType } from '../ui'
6 |
7 | export const useContainer: CC = () => {
8 | // Функция перевода: Начало
9 | const { t } = useTranslation()
10 | // Функция перевода: Конец
11 |
12 | useEffect(() => {}, [])
13 |
14 |
15 | const {} = useAppActions()
16 | const {} = useAppSelector(state => state)
17 |
18 | return { t }
19 | }
20 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/app/entry/container/index.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from 'react'
2 | import { BrowserRouter } from 'react-router-dom'
3 | import { Providers } from '@app/providers'
4 | import { App } from '../ui'
5 |
6 | import '../../../index.css'
7 | // Точка входа для разработки
8 | export const Container: FC = props => (
9 |
10 |
11 |
12 |
13 |
14 | )
15 |
16 | // Импорт приложения для Плагина ModuleFederation
17 | export const ImportedContainer: FC = props => (
18 |
19 |
20 |
21 | )
22 |
--------------------------------------------------------------------------------
/other/business_card/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "Kovalev K.A.",
3 | "name": "Kovalev K.A.",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/scripts/utils/getConfig.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import path from 'path'
3 | import { ConfigType } from './lib/types'
4 |
5 | // Путь к корневой директории проекта
6 | const rootDir = process.cwd()
7 |
8 | // Путь к файлу конфигурации
9 | const configFile = path.join(rootDir, '.config.template.js')
10 |
11 | export const getConfig = (): ConfigType | undefined => {
12 | // Проверяем наличие файла конфигурации
13 | if (fs.existsSync(configFile)) {
14 | return require(configFile)
15 | } else {
16 | console.error('Конфигурационный файл .config.template.js не найден!')
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/frontend/app_auth/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/frontend/app_root/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/localization/index.ts:
--------------------------------------------------------------------------------
1 | import i18n from 'i18next'
2 | import { initReactI18next } from 'react-i18next'
3 | import ru from './locales/ru/common.json'
4 |
5 | export type LanguageType = 'en' | 'ru'
6 |
7 | i18n.use(initReactI18next).init({
8 | fallbackLng: 'ru',
9 | debug: process.env.NODE_ENV === 'development',
10 | resources: {
11 | // en: {
12 | // translation: en as Record,
13 | // },
14 | ru: {
15 | translation: ru as Record,
16 | },
17 | },
18 | })
19 |
20 | // eslint-disable-next-line import/no-default-export
21 | export default i18n
22 |
--------------------------------------------------------------------------------
/packages/download-locale/src/scripts/utils/getConfig.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import path from 'path'
3 | import { ConfigType } from './lib/types'
4 |
5 | // Путь к корневой директории проекта
6 | const rootDir = process.cwd()
7 | const name = '.config.locale.js'
8 |
9 | // Путь к файлу конфигурации
10 | const configFile = path.join(rootDir, name)
11 |
12 | export const getConfig = (): ConfigType | undefined => {
13 | // Проверяем наличие файла конфигурации
14 | if (fs.existsSync(configFile)) {
15 | return require(configFile)
16 | } else {
17 | console.error(`Конфигурационный файл ${name} не найден!`)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/packages/types/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@npm.piece/types",
3 | "version": "1.0.12",
4 | "types": "global.d.ts",
5 | "files": [
6 | "package.json",
7 | "global.d.ts",
8 | "frontend.d.ts",
9 | "README"
10 | ],
11 | "keywords": [
12 | "react"
13 | ],
14 | "description": "Frequently used types for React",
15 | "homepage": "https://github.com/Morozzko/React_Blank_App/tree/master/packages/types",
16 | "author": "Morozzko",
17 | "license": "ISC",
18 | "devDependencies": {
19 | "typescript": "^5.5.4"
20 | },
21 | "peerDependencies": {
22 | "react": "16.x.x || 17.x.x || 18.x.x"
23 | }
24 | }
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/other/algorithms/src/algorithms/other/KnapsackProblem/index.test.ts:
--------------------------------------------------------------------------------
1 | import { knapsack } from './index'
2 |
3 | describe('test', () => {
4 | test('knapsack', () => {
5 | const items = [
6 | {
7 | weight: 1,
8 | value: 10,
9 | },
10 | {
11 | weight: 4,
12 | value: 40,
13 | },
14 | {
15 | weight: 3,
16 | value: 50,
17 | },
18 | {
19 | weight: 2,
20 | value: 30,
21 | },
22 | ]
23 | expect(knapsack(items, 5)).toBe(80)
24 | expect(knapsack(items, 6)).toBe(100)
25 | expect(knapsack(items, 7)).toBe(120)
26 | })
27 | })
28 |
--------------------------------------------------------------------------------
/packages/frontend-event-bus/README.md:
--------------------------------------------------------------------------------
1 | # Eventbus concept for communication between microfrontends
2 |
3 | ## Install
4 |
5 | ```
6 | npm i @npm.piece/event-bus
7 | ```
8 |
9 | ```
10 | yarn add @npm.piece/event-bus
11 | ```
12 |
13 | ## Usage
14 |
15 | ```tsx
16 | import { eventTransfer, EventTransferActionsEnum, useSubscribe } from '@npm.piece/event-bus'
17 |
18 | const onClickHandler = () => {
19 | eventTransfer({
20 | name: EventTransferActionsEnum.AuthRefreshToken,
21 | data: {}
22 | })
23 | }
24 |
25 | useSubscribe({
26 | type: EventTransferActionsEnum.AuthRefreshToken,
27 | callback: refreshToken,
28 | })
29 | ```
30 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/app/entry/container/index.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from 'react'
2 | import { BrowserRouter } from 'react-router-dom'
3 | import { Providers } from '@app/providers'
4 | import { App } from '../ui'
5 |
6 | import '../../../index.css'
7 |
8 | // Точка входа для разработки
9 | export const Container: FC = props => (
10 |
11 |
12 |
13 |
14 |
15 | )
16 |
17 | // Импорт приложения для Плагина ModuleFederation
18 | export const ImportedContainer: FC = props => (
19 |
20 |
21 |
22 | )
23 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/app/entry/container/index.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from 'react'
2 | import { BrowserRouter } from 'react-router-dom'
3 | import { Providers } from '@app/providers'
4 | import { App } from '../ui'
5 |
6 | import '../../../index.css'
7 |
8 | // Точка входа для разработки
9 | export const Container: FC = props => (
10 |
11 |
12 |
13 |
14 |
15 | )
16 |
17 | // Импорт приложения для Плагина ModuleFederation
18 | export const ImportedContainer: FC = props => (
19 |
20 |
21 |
22 | )
23 |
--------------------------------------------------------------------------------
/packages/utils/src/utils/clsx.ts:
--------------------------------------------------------------------------------
1 | import { clsx as origClsx } from 'clsx'
2 | import { twMerge } from 'tailwind-merge'
3 |
4 | type ClassValueType =
5 | | ClassArrayType
6 | | ClassDictionaryType
7 | | string
8 | | number
9 | | null
10 | | boolean
11 | | undefined
12 | type ClassDictionaryType = Record
13 | type ClassArrayType = ClassValueType[]
14 |
15 | /**
16 | * The clsx function is a utility for conditionally joining classNames together with tailwind support.
17 | *
18 | * @return A string, but we want to return a function that
19 | *
20 | */
21 | export const clsx = (...args: ClassValueType[]) => twMerge(origClsx(args))
22 |
--------------------------------------------------------------------------------
/packages/generate-hooks-rtk/src/scripts/utils/lib/types.ts:
--------------------------------------------------------------------------------
1 | export type ConfigType = {
2 | // указываем путь к папке, в которой находятся файлы с хуками
3 | hooksFolder: string
4 | // файл куда заберутся все импорты хуков
5 | exportFile: string
6 | // приписка к импорту для файла хуков
7 | hooksImportFileSuffix: string
8 | // путь до reducers файла
9 | reducersImportDestination: string
10 | // путь до middleware файла
11 | middlewaresImportDestination: string
12 | reducersImportFileSuffix: string
13 | middlewaresImportFileSuffix: string
14 | reducersObjectName: string
15 | middlewaresObjectName: string
16 | eslintCommand: string
17 | }
18 |
--------------------------------------------------------------------------------
/packages/mf-connect/src/scripts/utils/addScripts.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import path from 'path'
3 |
4 | const indexHTMLPath = '/public/index.html'
5 | export const addLineBefore = (fp: string, name: string) => {
6 | const filePath = path.join(fp, indexHTMLPath)
7 |
8 | // Читаем файл
9 | const data = fs.readFileSync(filePath, 'utf8')
10 |
11 | const script = `\n`
12 |
13 | // Добавляем новую строку перед
14 | const newData = data.replace('', `${script}`)
15 |
16 | // Записываем обновленный HTML обратно в файл
17 | fs.writeFileSync(filePath, newData, 'utf8')
18 | }
19 |
--------------------------------------------------------------------------------
/packages/create-by-template/src/scripts/utils/removeFolder.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs/promises'
2 | import path from 'path'
3 |
4 | export const deleteDirectory = async (directory: string) => {
5 | try {
6 | const files = await fs.readdir(directory, { withFileTypes: true })
7 |
8 | for (const file of files) {
9 | const filePath = path.join(directory, file.name)
10 |
11 | if (file.isDirectory()) {
12 | await deleteDirectory(filePath)
13 | } else {
14 | await fs.unlink(filePath)
15 | }
16 | }
17 |
18 | await fs.rmdir(directory)
19 | } catch (err) {
20 | console.error(`Error while delete folder: ${err}`)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/mf-connect/src/scripts/utils/changePackage.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import path from 'path'
3 |
4 | export const replaceNameInFile = (fp: string, newName: string) => {
5 | const filePath = path.join(fp, 'package.json')
6 |
7 | // Читаем файл
8 | const data = fs.readFileSync(filePath, 'utf8')
9 |
10 | const newData = data
11 | .split('\n')
12 | .map(line => {
13 | if (line.includes('"name": "')) {
14 | return `"name": "${newName.toLowerCase()}",`
15 | }
16 |
17 | return line
18 | })
19 | .join('\n')
20 |
21 | // Записываем обновленные данные обратно в файл
22 | fs.writeFileSync(filePath, newData, 'utf8')
23 | }
24 |
--------------------------------------------------------------------------------
/packages/download-locale/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx"
22 | },
23 | "include": [
24 | "src"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/packages/mf-connect/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx"
22 | },
23 | "include": [
24 | "src",
25 | "."
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/packages/update-packages/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx"
22 | },
23 | "include": [
24 | "src",
25 | "."
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/packages/create-by-template/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx"
22 | },
23 | "include": [
24 | "src",
25 | "."
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/packages/frontend-event-bus/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx"
22 | },
23 | "include": [
24 | "src",
25 | "."
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/packages/generate-hooks-rtk/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx"
22 | },
23 | "include": [
24 | "src",
25 | "."
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/frontend/app_auth/src/features/services/appSize/store/index.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'
2 | import { name } from '../constants/name'
3 | import { initialState } from '../structure'
4 |
5 | const slice = createSlice({
6 | name,
7 | initialState,
8 | reducers: {
9 | setIsMobile(state, action: PayloadAction) {
10 | state.isMobile = action.payload
11 | },
12 | setAppSize(state, action: PayloadAction) {
13 | state.appSize = action.payload
14 | },
15 | },
16 | })
17 |
18 | export const Actions = {
19 | ...slice.actions,
20 | }
21 |
22 | export const Reducer = slice.reducer
23 |
--------------------------------------------------------------------------------
/frontend/app_root/src/features/services/appSize/store/index.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'
2 | import { name } from '../constants/name'
3 | import { initialState } from '../structure'
4 |
5 | const slice = createSlice({
6 | name,
7 | initialState,
8 | reducers: {
9 | setIsMobile(state, action: PayloadAction) {
10 | state.isMobile = action.payload
11 | },
12 | setAppSize(state, action: PayloadAction) {
13 | state.appSize = action.payload
14 | },
15 | },
16 | })
17 |
18 | export const Actions = {
19 | ...slice.actions,
20 | }
21 |
22 | export const Reducer = slice.reducer
23 |
--------------------------------------------------------------------------------
/other/algorithms/src/structures/2.linear/stack/index.test.ts:
--------------------------------------------------------------------------------
1 | import { Stack } from './index'
2 |
3 | describe('Stack', () => {
4 | let stack: Stack
5 |
6 | beforeEach(() => {
7 | stack = new Stack()
8 | })
9 |
10 | test('push and pop', () => {
11 | stack.push(1)
12 | stack.push(2)
13 | stack.push(3)
14 |
15 | expect(stack.pop()).toBe(3)
16 | expect(stack.pop()).toBe(2)
17 | expect(stack.pop()).toBe(1)
18 | })
19 |
20 | test('isEmpty', () => {
21 | expect(stack.isEmpty()).toBe(true)
22 |
23 | stack.push(1)
24 | expect(stack.isEmpty()).toBe(false)
25 |
26 | stack.pop()
27 | expect(stack.isEmpty()).toBe(true)
28 | })
29 | })
30 |
--------------------------------------------------------------------------------
/packages/utils/src/hooks/useFocus.ts:
--------------------------------------------------------------------------------
1 | import { MutableRefObject, useCallback } from 'react'
2 |
3 | type UseFocusType = () => void
4 |
5 | /**
6 | * The useFocus function takes a ref as an argument and returns a setFocus function.
7 | * The ref should be attached to an element to make it focusable via the setFocus function.
8 | * @example const setFocus = useFocus(ref)
9 | *
10 | * @param htmlElRef - The ref object that will be focused.
11 | *
12 | * @return A setFocus function
13 | *
14 | */
15 | export const useFocus = (
16 | htmlElRef: MutableRefObject
17 | ): UseFocusType =>
18 | useCallback(() => {
19 | htmlElRef.current?.focus()
20 | }, [htmlElRef.current])
21 |
--------------------------------------------------------------------------------
/frontend/app_auth/Dockerfile:
--------------------------------------------------------------------------------
1 | # Берем официальный образ Node.js для сборки приложения
2 | FROM node:18.12.1 as build
3 |
4 | WORKDIR /app
5 |
6 | # Копируем package.json и yarn.lock (если есть)
7 | COPY package.json yarn.lock ./
8 |
9 | # Копируем остальные файлы и папки
10 | COPY . .
11 |
12 | # Устанавливаем зависимости
13 | RUN yarn install
14 |
15 | # Собираем приложение
16 | RUN yarn build
17 |
18 | # Берем образ nginx для раздачи статических файлов
19 | FROM nginx:1.23.4-alpine
20 |
21 | # Копируем собранный проект в образ nginx
22 | COPY --from=build /app/build /usr/share/nginx/html
23 |
24 | # Открываем порт 80
25 | EXPOSE 80
26 |
27 | # Запускаем nginx
28 | CMD ["nginx", "-g", "daemon off;"]
29 |
--------------------------------------------------------------------------------
/frontend/app_root/Dockerfile:
--------------------------------------------------------------------------------
1 | # Берем официальный образ Node.js для сборки приложения
2 | FROM node:18.12.1 as build
3 |
4 | WORKDIR /app
5 |
6 | # Копируем package.json и yarn.lock (если есть)
7 | COPY package.json yarn.lock ./
8 |
9 | # Копируем остальные файлы и папки
10 | COPY . .
11 |
12 | # Устанавливаем зависимости
13 | RUN yarn install
14 |
15 | # Собираем приложение
16 | RUN yarn build
17 |
18 | # Берем образ nginx для раздачи статических файлов
19 | FROM nginx:1.23.4-alpine
20 |
21 | # Копируем собранный проект в образ nginx
22 | COPY --from=build /app/build /usr/share/nginx/html
23 |
24 | # Открываем порт 80
25 | EXPOSE 80
26 |
27 | # Запускаем nginx
28 | CMD ["nginx", "-g", "daemon off;"]
29 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/src/features/services/appSize/store/index.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'
2 | import { name } from '../constants/name'
3 | import { initialState } from '../structure'
4 |
5 | const slice = createSlice({
6 | name,
7 | initialState,
8 | reducers: {
9 | setIsMobile(state, action: PayloadAction) {
10 | state.isMobile = action.payload
11 | },
12 | setAppSize(state, action: PayloadAction) {
13 | state.appSize = action.payload
14 | },
15 | },
16 | })
17 |
18 | export const Actions = {
19 | ...slice.actions,
20 | }
21 |
22 | export const Reducer = slice.reducer
23 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/src/features/services/appSize/store/index.ts:
--------------------------------------------------------------------------------
1 | import { createSlice, PayloadAction } from '@reduxjs/toolkit'
2 | import { name } from '../constants/name'
3 | import { initialState } from '../structure'
4 |
5 | const slice = createSlice({
6 | name,
7 | initialState,
8 | reducers: {
9 | setIsMobile(state, action: PayloadAction) {
10 | state.isMobile = action.payload
11 | },
12 | setAppSize(state, action: PayloadAction) {
13 | state.appSize = action.payload
14 | },
15 | },
16 | })
17 |
18 | export const Actions = {
19 | ...slice.actions,
20 | }
21 |
22 | export const Reducer = slice.reducer
23 |
--------------------------------------------------------------------------------
/_templates/rtkgen/react_blank/Dockerfile:
--------------------------------------------------------------------------------
1 | # Берем официальный образ Node.js для сборки приложения
2 | FROM node:18.12.1 as build
3 |
4 | WORKDIR /app
5 |
6 | # Копируем package.json и yarn.lock (если есть)
7 | COPY package.json yarn.lock ./
8 |
9 | # Копируем остальные файлы и папки
10 | COPY . .
11 |
12 | # Устанавливаем зависимости
13 | RUN yarn install
14 |
15 | # Собираем приложение
16 | RUN yarn build
17 |
18 | # Берем образ nginx для раздачи статических файлов
19 | FROM nginx:1.23.4-alpine
20 |
21 | # Копируем собранный проект в образ nginx
22 | COPY --from=build /app/build /usr/share/nginx/html
23 |
24 | # Открываем порт 80
25 | EXPOSE 80
26 |
27 | # Запускаем nginx
28 | CMD ["nginx", "-g", "daemon off;"]
29 |
--------------------------------------------------------------------------------
/_templates/rtkthunk/react_blank/Dockerfile:
--------------------------------------------------------------------------------
1 | # Берем официальный образ Node.js для сборки приложения
2 | FROM node:18.12.1 as build
3 |
4 | WORKDIR /app
5 |
6 | # Копируем package.json и yarn.lock (если есть)
7 | COPY package.json yarn.lock ./
8 |
9 | # Копируем остальные файлы и папки
10 | COPY . .
11 |
12 | # Устанавливаем зависимости
13 | RUN yarn install
14 |
15 | # Собираем приложение
16 | RUN yarn build
17 |
18 | # Берем образ nginx для раздачи статических файлов
19 | FROM nginx:1.23.4-alpine
20 |
21 | # Копируем собранный проект в образ nginx
22 | COPY --from=build /app/build /usr/share/nginx/html
23 |
24 | # Открываем порт 80
25 | EXPOSE 80
26 |
27 | # Запускаем nginx
28 | CMD ["nginx", "-g", "daemon off;"]
29 |
--------------------------------------------------------------------------------
/packages/mf-connect/src/scripts/utils/getConfig.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import path from 'path'
3 | import { ConfigType } from './lib/types'
4 |
5 | // Путь к корневой директории проекта
6 | const rootDir = process.cwd()
7 | const name = '.config.MF.js'
8 | // Путь к файлу конфигурации
9 | const configFile = path.join(rootDir, name)
10 |
11 | export const getConfig = (): ConfigType | undefined => {
12 | // Проверяем наличие файла конфигурации
13 | if (fs.existsSync(configFile)) {
14 | // eslint-disable-next-line @typescript-eslint/no-var-requires
15 | const file = require(configFile)
16 |
17 | return file
18 | } else {
19 | console.error(`Конфигурационный файл ${name} не найден!`)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/utils/src/utils/deepClone.ts:
--------------------------------------------------------------------------------
1 | export /**
2 | * The deepClone function takes an object and returns a new object with the same properties.
3 | * If any of those properties are objects, they will be cloned as well.
4 | *
5 | * @example const a = deepClone(b)
6 | *
7 | * @param obj T Specify the type of object that is being cloned
8 | *
9 | * @return A new object of the same type as the original
10 | *
11 | */
12 | const deepClone = (obj: T): T => {
13 | const clObj = {} as T
14 |
15 | for (const key in obj) {
16 | if (obj[key] instanceof Object) {
17 | clObj[key] = deepClone(obj[key])
18 | continue
19 | }
20 | clObj[key] = obj[key]
21 | }
22 |
23 | return clObj as T
24 | }
25 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "module": "esnext",
17 | "moduleResolution": "node",
18 | "resolveJsonModule": true,
19 | "isolatedModules": true,
20 | "noEmit": true,
21 | "jsx": "react-jsx"
22 | },
23 | "include": [
24 | "src",
25 | "."
26 | ],
27 | "exclude": [
28 | "node_modules"
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/frontend/app_root/src/app/entry/container/index.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from 'react'
2 | import { BrowserRouter } from 'react-router-dom'
3 | import { Providers } from '@app/providers'
4 | import { App } from '../ui'
5 |
6 | import '../../../index.css'
7 | import '@app/localization'
8 |
9 | // export const basename = process.env.REACT_APP_ROOT_PUBLIC_PATH
10 |
11 | // Точка входа для разработки
12 | export const Container: FC = props => (
13 |
14 |
15 |
16 |
17 |
18 | )
19 |
20 | // Импорт приложения для Плагина ModuleFederation
21 | export const ImportedContainer: FC = props => (
22 |
23 |
24 |
25 | )
26 |
--------------------------------------------------------------------------------
/packages/generate-hooks-rtk/src/scripts/utils/getConfig.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import path from 'path'
3 | import { ConfigType } from './lib/types'
4 |
5 | // Путь к корневой директории проекта
6 | const rootDir = process.cwd()
7 | const name = '.config.openapi.js'
8 | // Путь к файлу конфигурации
9 | const configFile = path.join(rootDir, name)
10 |
11 | export const getConfig = (): ConfigType | undefined => {
12 | // Проверяем наличие файла конфигурации
13 | if (fs.existsSync(configFile)) {
14 | // eslint-disable-next-line @typescript-eslint/no-var-requires
15 | const file = require(configFile)
16 |
17 | return file.configFile
18 | } else {
19 | console.error(`Конфигурационный файл ${name} не найден!`)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/utils/src/utils/lodashToESM/freeGlobal.ts:
--------------------------------------------------------------------------------
1 | /** Detect free variable `global` from Node.js. */
2 | export const freeGlobal =
3 | typeof global === 'object' &&
4 | global !== null &&
5 | global.Object === Object &&
6 | global
7 |
8 | /** Detect free variable `globalThis` */
9 | const freeGlobalThis =
10 | typeof globalThis === 'object' &&
11 | globalThis !== null &&
12 | globalThis.Object === Object &&
13 | globalThis
14 |
15 | /** Detect free variable `self`. */
16 | const freeSelf =
17 | typeof self === 'object' && self !== null && self.Object === Object && self
18 |
19 | /** Used as a reference to the global object. */
20 | export const root =
21 | freeGlobalThis || freeGlobal || freeSelf || Function('return this')()
22 |
--------------------------------------------------------------------------------
/packages/mf-connect/src/scripts/utils/removeScripts.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs'
2 | import path from 'path'
3 |
4 | const indexHTMLPath = '/public/index.html'
5 |
6 | export const removeScriptTags = (fp: string) => {
7 | const filePath = path.join(fp, indexHTMLPath)
8 |
9 | // Читаем файл
10 | const data = fs.readFileSync(filePath, 'utf8')
11 |
12 | // Удаляем все строки, которые содержат
18 |
19 |
20 |
21 |
22 |
23 |