@cyberskill/shared 1.208.0 → 1.210.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{src/config → config}/config.type.d.ts +1 -1
- package/dist/config/config.type.js +4 -0
- package/dist/{src/config → config}/config.util.d.ts +1 -1
- package/dist/config/config.util.js +49 -0
- package/dist/{src/config → config}/env/env.util.js +7 -7
- package/dist/config/eslint/index.js +18 -0
- package/dist/config/graphql-codegen/graphql-codegen.util.js +37 -0
- package/dist/config/index.js +6 -0
- package/dist/config/vitest/vitest.e2e.js +23 -0
- package/dist/config/vitest/vitest.unit.js +19 -0
- package/dist/constant/common.js +4 -0
- package/dist/node/apollo-server/apollo-server.util.js +29 -0
- package/dist/node/cli/index.js +110 -0
- package/dist/node/command/command.type.js +4 -0
- package/dist/node/command/command.util.js +144 -0
- package/dist/node/command/index.js +11 -0
- package/dist/node/express/express.util.js +48 -0
- package/dist/node/express/index.js +13 -0
- package/dist/node/fs/fs.util.js +48 -0
- package/dist/node/log/index.js +8 -0
- package/dist/{log.type-DTOvZHyz.js → node/log/log.type.js} +1 -1
- package/dist/node/log/log.util.js +59 -0
- package/dist/node/mongo/index.js +17 -0
- package/dist/node/mongo/mongo.type.js +16 -0
- package/dist/node/mongo/mongo.util.js +488 -0
- package/dist/node/package/index.js +10 -0
- package/dist/node/package/package.type.js +4 -0
- package/dist/node/package/package.util.js +225 -0
- package/dist/node/path/index.js +52 -0
- package/dist/node/path/path.constant.js +273 -0
- package/dist/node/storage/storage.util.js +51 -0
- package/dist/node/upload/index.js +7 -0
- package/dist/node/upload/upload.type.js +4 -0
- package/dist/node/upload/upload.util.js +126 -0
- package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.js +6 -0
- package/dist/react/apollo-client/apollo-client.component.js +20 -0
- package/dist/{src/react → react}/apollo-client/apollo-client.context.js +2 -2
- package/dist/{src/react → react}/apollo-client/apollo-client.type.d.ts +1 -1
- package/dist/react/apollo-client/apollo-client.util.js +101 -0
- package/dist/react/apollo-client/index.js +29 -0
- package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.js +7 -8
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js +14 -0
- package/dist/{src/react → react}/apollo-error/apollo-error.component.js +8 -15
- package/dist/react/apollo-error/apollo-error.module.scss.js +11 -0
- package/dist/{src/react → react}/apollo-error/apollo-error.provider.js +2 -2
- package/dist/react/apollo-error/apollo-error.util.js +11 -0
- package/dist/react/loading/loading.component.js +34 -0
- package/dist/react/loading/loading.module.scss.js +15 -0
- package/dist/{src/react → react}/loading/loading.provider.d.ts +1 -1
- package/dist/react/loading/loading.provider.js +17 -0
- package/dist/react/log/log.util.js +30 -0
- package/dist/{src/react → react}/next-intl/next-intl.hoc.d.ts +1 -1
- package/dist/react/next-intl/next-intl.hoc.js +23 -0
- package/dist/react/next-intl/next-intl.provider.js +23 -0
- package/dist/{src/react → react}/next-intl/next-intl.type.d.ts +1 -1
- package/dist/react/storage/storage.hook.js +61 -0
- package/dist/react/storage/storage.util.js +35 -0
- package/dist/react/userback/userback.component.js +27 -0
- package/dist/style.css +1 -1
- package/dist/typescript/index.d.ts +2 -0
- package/dist/typescript/index.js +4 -0
- package/dist/{src/util → util}/common/common.util.js +14 -25
- package/dist/{src/util → util}/object/object.util.d.ts +1 -1
- package/dist/util/object/object.util.js +67 -0
- package/dist/util/string/string.util.js +51 -0
- package/package.json +77 -110
- package/dist/config-B7WSlzSh.js +0 -8
- package/dist/config-DDQ9k8fw.cjs +0 -1
- package/dist/config.util-Ci2CZDut.cjs +0 -1
- package/dist/config.util-DKBwEBKR.js +0 -61
- package/dist/favicon/android-icon-144x144.png +0 -0
- package/dist/favicon/android-icon-192x192.png +0 -0
- package/dist/favicon/android-icon-36x36.png +0 -0
- package/dist/favicon/android-icon-48x48.png +0 -0
- package/dist/favicon/android-icon-72x72.png +0 -0
- package/dist/favicon/android-icon-96x96.png +0 -0
- package/dist/favicon/apple-icon-114x114.png +0 -0
- package/dist/favicon/apple-icon-120x120.png +0 -0
- package/dist/favicon/apple-icon-144x144.png +0 -0
- package/dist/favicon/apple-icon-152x152.png +0 -0
- package/dist/favicon/apple-icon-180x180.png +0 -0
- package/dist/favicon/apple-icon-57x57.png +0 -0
- package/dist/favicon/apple-icon-60x60.png +0 -0
- package/dist/favicon/apple-icon-72x72.png +0 -0
- package/dist/favicon/apple-icon-76x76.png +0 -0
- package/dist/favicon/apple-icon-precomposed.png +0 -0
- package/dist/favicon/apple-icon.png +0 -0
- package/dist/favicon/browserconfig.xml +0 -2
- package/dist/favicon/favicon-16x16.png +0 -0
- package/dist/favicon/favicon-32x32.png +0 -0
- package/dist/favicon/favicon-96x96.png +0 -0
- package/dist/favicon/favicon.ico +0 -0
- package/dist/favicon/manifest.json +0 -41
- package/dist/favicon/ms-icon-144x144.png +0 -0
- package/dist/favicon/ms-icon-150x150.png +0 -0
- package/dist/favicon/ms-icon-310x310.png +0 -0
- package/dist/favicon/ms-icon-70x70.png +0 -0
- package/dist/log.type-CMvG6Box.cjs +0 -1
- package/dist/magic-string.es-C6Zk6wMx.js +0 -671
- package/dist/magic-string.es-CjWtD8Pa.cjs +0 -10
- package/dist/path.constant-CWtb99gS.cjs +0 -2
- package/dist/path.constant-CvSr0Rrx.js +0 -682
- package/dist/src/config/commitlint/index.cjs +0 -1
- package/dist/src/config/config.util.cjs +0 -1
- package/dist/src/config/config.util.js +0 -9
- package/dist/src/config/env/env.constant.cjs +0 -1
- package/dist/src/config/env/env.d.cjs +0 -1
- package/dist/src/config/env/env.d.js +0 -1
- package/dist/src/config/env/env.util.cjs +0 -1
- package/dist/src/config/env/index.cjs +0 -1
- package/dist/src/config/eslint/index.cjs +0 -1
- package/dist/src/config/eslint/index.js +0 -29
- package/dist/src/config/graphql-codegen/graphql-codegen.util.cjs +0 -1
- package/dist/src/config/graphql-codegen/graphql-codegen.util.js +0 -46
- package/dist/src/config/graphql-codegen/index.cjs +0 -1
- package/dist/src/config/index.cjs +0 -1
- package/dist/src/config/index.js +0 -5
- package/dist/src/config/lint-staged/index.cjs +0 -1
- package/dist/src/config/vitest/index.cjs +0 -1
- package/dist/src/config/vitest/vitest.e2e.cjs +0 -1
- package/dist/src/config/vitest/vitest.e2e.js +0 -33
- package/dist/src/config/vitest/vitest.unit.cjs +0 -1
- package/dist/src/config/vitest/vitest.unit.js +0 -30
- package/dist/src/config/vitest/vitest.unit.setup.cjs +0 -508
- package/dist/src/config/vitest/vitest.unit.setup.js +0 -31519
- package/dist/src/constant/common.cjs +0 -1
- package/dist/src/constant/common.js +0 -4
- package/dist/src/constant/index.cjs +0 -1
- package/dist/src/constant/response-status.cjs +0 -1
- package/dist/src/node/apollo-server/apollo-server.util.cjs +0 -1
- package/dist/src/node/apollo-server/apollo-server.util.js +0 -62
- package/dist/src/node/apollo-server/index.cjs +0 -1
- package/dist/src/node/cli/cli.util.cjs +0 -6
- package/dist/src/node/cli/cli.util.js +0 -171
- package/dist/src/node/cli/index.cjs +0 -1
- package/dist/src/node/cli/index.d.ts +0 -1
- package/dist/src/node/cli/index.js +0 -1
- package/dist/src/node/command/command.util.cjs +0 -1
- package/dist/src/node/command/command.util.js +0 -17
- package/dist/src/node/command/index.cjs +0 -1
- package/dist/src/node/command/index.js +0 -10
- package/dist/src/node/express/express.util.cjs +0 -1
- package/dist/src/node/express/express.util.js +0 -88
- package/dist/src/node/express/index.cjs +0 -1
- package/dist/src/node/express/index.js +0 -13
- package/dist/src/node/fs/fs.util.cjs +0 -1
- package/dist/src/node/fs/fs.util.js +0 -67
- package/dist/src/node/fs/index.cjs +0 -1
- package/dist/src/node/log/index.cjs +0 -1
- package/dist/src/node/log/index.js +0 -8
- package/dist/src/node/log/log.util.cjs +0 -1
- package/dist/src/node/log/log.util.js +0 -60
- package/dist/src/node/mongo/index.cjs +0 -1
- package/dist/src/node/mongo/index.js +0 -26
- package/dist/src/node/mongo/mongo.constant.cjs +0 -1
- package/dist/src/node/mongo/mongo.util.cjs +0 -5
- package/dist/src/node/mongo/mongo.util.js +0 -564
- package/dist/src/node/package/index.cjs +0 -1
- package/dist/src/node/package/index.js +0 -9
- package/dist/src/node/package/package.util.cjs +0 -1
- package/dist/src/node/package/package.util.js +0 -13
- package/dist/src/node/path/index.cjs +0 -1
- package/dist/src/node/path/index.js +0 -52
- package/dist/src/node/path/path.constant.cjs +0 -1
- package/dist/src/node/path/path.constant.js +0 -49
- package/dist/src/node/path/path.util.cjs +0 -1
- package/dist/src/node/storage/index.cjs +0 -1
- package/dist/src/node/storage/storage.util.cjs +0 -1
- package/dist/src/node/storage/storage.util.js +0 -81
- package/dist/src/node/upload/index.cjs +0 -1
- package/dist/src/node/upload/index.js +0 -6
- package/dist/src/node/upload/upload.util.cjs +0 -1
- package/dist/src/node/upload/upload.util.js +0 -8
- package/dist/src/node/ws/index.cjs +0 -1
- package/dist/src/node/ws/ts.util.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.component.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.component.js +0 -21
- package/dist/src/react/apollo-client/apollo-client.constant.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.context.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.hook.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.hook.js +0 -11
- package/dist/src/react/apollo-client/apollo-client.util.cjs +0 -1
- package/dist/src/react/apollo-client/apollo-client.util.js +0 -116
- package/dist/src/react/apollo-client/index.cjs +0 -1
- package/dist/src/react/apollo-client/index.js +0 -30
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.js +0 -24
- package/dist/src/react/apollo-client-nextjs/index.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.component.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.context.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.hook.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.provider.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.util.cjs +0 -1
- package/dist/src/react/apollo-error/apollo-error.util.js +0 -11
- package/dist/src/react/apollo-error/index.cjs +0 -1
- package/dist/src/react/i18next/i18next.hook.cjs +0 -1
- package/dist/src/react/i18next/i18next.util.cjs +0 -1
- package/dist/src/react/i18next/index.cjs +0 -1
- package/dist/src/react/loading/index.cjs +0 -1
- package/dist/src/react/loading/loading.component.cjs +0 -6
- package/dist/src/react/loading/loading.component.js +0 -61
- package/dist/src/react/loading/loading.context.cjs +0 -1
- package/dist/src/react/loading/loading.hook.cjs +0 -1
- package/dist/src/react/loading/loading.provider.cjs +0 -1
- package/dist/src/react/loading/loading.provider.js +0 -17
- package/dist/src/react/log/index.cjs +0 -1
- package/dist/src/react/log/log.util.cjs +0 -1
- package/dist/src/react/log/log.util.js +0 -30
- package/dist/src/react/next-intl/index.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.constant.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.context.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.hoc.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.hoc.js +0 -35
- package/dist/src/react/next-intl/next-intl.hook.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.provider.cjs +0 -1
- package/dist/src/react/next-intl/next-intl.provider.js +0 -25
- package/dist/src/react/storage/index.cjs +0 -1
- package/dist/src/react/storage/storage.hook.cjs +0 -1
- package/dist/src/react/storage/storage.hook.js +0 -77
- package/dist/src/react/storage/storage.util.cjs +0 -1
- package/dist/src/react/storage/storage.util.js +0 -60
- package/dist/src/react/toast/index.cjs +0 -1
- package/dist/src/react/userback/index.cjs +0 -1
- package/dist/src/react/userback/userback.component.cjs +0 -1
- package/dist/src/react/userback/userback.component.js +0 -54
- package/dist/src/typescript/common.cjs +0 -1
- package/dist/src/typescript/index.cjs +0 -1
- package/dist/src/typescript/index.d.ts +0 -2
- package/dist/src/typescript/index.js +0 -4
- package/dist/src/typescript/react.cjs +0 -1
- package/dist/src/typescript/react.js +0 -1
- package/dist/src/typescript/style.d.cjs +0 -1
- package/dist/src/typescript/style.d.js +0 -1
- package/dist/src/util/common/common.util.cjs +0 -1
- package/dist/src/util/common/index.cjs +0 -1
- package/dist/src/util/index.cjs +0 -1
- package/dist/src/util/object/index.cjs +0 -1
- package/dist/src/util/object/object.util.cjs +0 -1
- package/dist/src/util/object/object.util.js +0 -77
- package/dist/src/util/serializer/index.cjs +0 -1
- package/dist/src/util/serializer/serializer.util.cjs +0 -1
- package/dist/src/util/string/index.cjs +0 -1
- package/dist/src/util/string/string.util.cjs +0 -1
- package/dist/src/util/string/string.util.js +0 -64
- package/dist/src/util/validate/index.cjs +0 -1
- package/dist/src/util/validate/validate.util.cjs +0 -1
- package/dist/tsconfig.base.json +0 -37
- package/dist/upload.util-CE3MjBdh.cjs +0 -1
- package/dist/upload.util-D4aUdmPo.js +0 -160
- /package/dist/{src/config → config}/commitlint/index.d.ts +0 -0
- /package/dist/{src/config → config}/commitlint/index.js +0 -0
- /package/dist/{src/config → config}/env/env.constant.d.ts +0 -0
- /package/dist/{src/config → config}/env/env.constant.js +0 -0
- /package/dist/{src/config → config}/env/env.type.d.ts +0 -0
- /package/dist/{src/config → config}/env/env.util.d.ts +0 -0
- /package/dist/{src/config → config}/env/index.d.ts +0 -0
- /package/dist/{src/config → config}/env/index.js +0 -0
- /package/dist/{src/config → config}/eslint/index.d.ts +0 -0
- /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.type.d.ts +0 -0
- /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.util.d.ts +0 -0
- /package/dist/{src/config → config}/graphql-codegen/index.d.ts +0 -0
- /package/dist/{src/config → config}/graphql-codegen/index.js +0 -0
- /package/dist/{src/config → config}/index.d.ts +0 -0
- /package/dist/{src/config → config}/lint-staged/index.d.ts +0 -0
- /package/dist/{src/config → config}/lint-staged/index.js +0 -0
- /package/dist/{src/config → config}/vitest/index.d.ts +0 -0
- /package/dist/{src/config → config}/vitest/index.js +0 -0
- /package/dist/{src/config → config}/vitest/vitest.e2e.d.ts +0 -0
- /package/dist/{src/config → config}/vitest/vitest.unit.d.ts +0 -0
- /package/dist/{src/constant → constant}/common.d.ts +0 -0
- /package/dist/{src/constant → constant}/index.d.ts +0 -0
- /package/dist/{src/constant → constant}/index.js +0 -0
- /package/dist/{src/constant → constant}/response-status.d.ts +0 -0
- /package/dist/{src/constant → constant}/response-status.js +0 -0
- /package/dist/{src/node → node}/apollo-server/apollo-server.type.d.ts +0 -0
- /package/dist/{src/node → node}/apollo-server/apollo-server.util.d.ts +0 -0
- /package/dist/{src/node → node}/apollo-server/index.d.ts +0 -0
- /package/dist/{src/node → node}/apollo-server/index.js +0 -0
- /package/dist/{src/node/cli/cli.util.d.ts → node/cli/index.d.ts} +0 -0
- /package/dist/{src/node → node}/command/command.type.d.ts +0 -0
- /package/dist/{src/node → node}/command/command.util.d.ts +0 -0
- /package/dist/{src/node → node}/command/index.d.ts +0 -0
- /package/dist/{src/node → node}/express/express.type.d.ts +0 -0
- /package/dist/{src/node → node}/express/express.util.d.ts +0 -0
- /package/dist/{src/node → node}/express/index.d.ts +0 -0
- /package/dist/{src/node → node}/fs/fs.type.d.ts +0 -0
- /package/dist/{src/node → node}/fs/fs.util.d.ts +0 -0
- /package/dist/{src/node → node}/fs/index.d.ts +0 -0
- /package/dist/{src/node → node}/fs/index.js +0 -0
- /package/dist/{src/node → node}/log/index.d.ts +0 -0
- /package/dist/{src/node → node}/log/log.type.d.ts +0 -0
- /package/dist/{src/node → node}/log/log.util.d.ts +0 -0
- /package/dist/{src/node → node}/mongo/index.d.ts +0 -0
- /package/dist/{src/node → node}/mongo/mongo.constant.d.ts +0 -0
- /package/dist/{src/node → node}/mongo/mongo.constant.js +0 -0
- /package/dist/{src/node → node}/mongo/mongo.type.d.ts +0 -0
- /package/dist/{src/node → node}/mongo/mongo.util.d.ts +0 -0
- /package/dist/{src/node → node}/package/index.d.ts +0 -0
- /package/dist/{src/node → node}/package/package.type.d.ts +0 -0
- /package/dist/{src/node → node}/package/package.util.d.ts +0 -0
- /package/dist/{src/node → node}/path/index.d.ts +0 -0
- /package/dist/{src/node → node}/path/path.constant.d.ts +0 -0
- /package/dist/{src/node → node}/path/path.util.d.ts +0 -0
- /package/dist/{src/node → node}/path/path.util.js +0 -0
- /package/dist/{src/node → node}/storage/index.d.ts +0 -0
- /package/dist/{src/node → node}/storage/index.js +0 -0
- /package/dist/{src/node → node}/storage/storage.util.d.ts +0 -0
- /package/dist/{src/node → node}/upload/index.d.ts +0 -0
- /package/dist/{src/node → node}/upload/upload.type.d.ts +0 -0
- /package/dist/{src/node → node}/upload/upload.util.d.ts +0 -0
- /package/dist/{src/node → node}/ws/index.d.ts +0 -0
- /package/dist/{src/node → node}/ws/index.js +0 -0
- /package/dist/{src/node → node}/ws/ts.util.d.ts +0 -0
- /package/dist/{src/node → node}/ws/ts.util.js +0 -0
- /package/dist/{src/node → node}/ws/ws.type.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.component.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.constant.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.constant.js +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.context.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.hook.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/apollo-client.util.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client/index.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.js +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.util.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/index.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-client-nextjs/index.js +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.component.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.context.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.context.js +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.hook.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.hook.js +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.provider.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.type.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/apollo-error.util.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/index.d.ts +0 -0
- /package/dist/{src/react → react}/apollo-error/index.js +0 -0
- /package/dist/{src/react → react}/i18next/i18next.hook.d.ts +0 -0
- /package/dist/{src/react → react}/i18next/i18next.hook.js +0 -0
- /package/dist/{src/react → react}/i18next/i18next.util.d.ts +0 -0
- /package/dist/{src/react → react}/i18next/i18next.util.js +0 -0
- /package/dist/{src/react → react}/i18next/index.d.ts +0 -0
- /package/dist/{src/react → react}/i18next/index.js +0 -0
- /package/dist/{src/react → react}/loading/index.d.ts +0 -0
- /package/dist/{src/react → react}/loading/index.js +0 -0
- /package/dist/{src/react → react}/loading/loading.component.d.ts +0 -0
- /package/dist/{src/react → react}/loading/loading.context.d.ts +0 -0
- /package/dist/{src/react → react}/loading/loading.context.js +0 -0
- /package/dist/{src/react → react}/loading/loading.hook.d.ts +0 -0
- /package/dist/{src/react → react}/loading/loading.hook.js +0 -0
- /package/dist/{src/react → react}/loading/loading.type.d.ts +0 -0
- /package/dist/{src/react → react}/log/index.d.ts +0 -0
- /package/dist/{src/react → react}/log/index.js +0 -0
- /package/dist/{src/react → react}/log/log.type.d.ts +0 -0
- /package/dist/{src/react → react}/log/log.util.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/index.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/index.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.constant.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.constant.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.context.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.context.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.hook.d.ts +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.hook.js +0 -0
- /package/dist/{src/react → react}/next-intl/next-intl.provider.d.ts +0 -0
- /package/dist/{src/react → react}/storage/index.d.ts +0 -0
- /package/dist/{src/react → react}/storage/index.js +0 -0
- /package/dist/{src/react → react}/storage/storage.hook.d.ts +0 -0
- /package/dist/{src/react → react}/storage/storage.util.d.ts +0 -0
- /package/dist/{src/react → react}/toast/index.d.ts +0 -0
- /package/dist/{src/react → react}/toast/index.js +0 -0
- /package/dist/{src/react → react}/userback/index.d.ts +0 -0
- /package/dist/{src/react → react}/userback/index.js +0 -0
- /package/dist/{src/react → react}/userback/userback.component.d.ts +0 -0
- /package/dist/{src/react → react}/userback/userback.type.d.ts +0 -0
- /package/dist/{src/typescript/common.d.ts → typescript/common.type.d.ts} +0 -0
- /package/dist/{src/typescript/common.js → typescript/common.type.js} +0 -0
- /package/dist/{src/typescript/react.d.ts → typescript/react.type.d.ts} +0 -0
- /package/dist/{src/util → util}/common/common.type.d.ts +0 -0
- /package/dist/{src/util → util}/common/common.util.d.ts +0 -0
- /package/dist/{src/util → util}/common/index.d.ts +0 -0
- /package/dist/{src/util → util}/common/index.js +0 -0
- /package/dist/{src/util → util}/index.d.ts +0 -0
- /package/dist/{src/util → util}/index.js +0 -0
- /package/dist/{src/util → util}/object/index.d.ts +0 -0
- /package/dist/{src/util → util}/object/index.js +0 -0
- /package/dist/{src/util → util}/serializer/index.d.ts +0 -0
- /package/dist/{src/util → util}/serializer/index.js +0 -0
- /package/dist/{src/util → util}/serializer/serializer.type.d.ts +0 -0
- /package/dist/{src/util → util}/serializer/serializer.util.d.ts +0 -0
- /package/dist/{src/util → util}/serializer/serializer.util.js +0 -0
- /package/dist/{src/util → util}/string/index.d.ts +0 -0
- /package/dist/{src/util → util}/string/index.js +0 -0
- /package/dist/{src/util → util}/string/string.type.d.ts +0 -0
- /package/dist/{src/util → util}/string/string.util.d.ts +0 -0
- /package/dist/{src/util → util}/validate/index.d.ts +0 -0
- /package/dist/{src/util → util}/validate/index.js +0 -0
- /package/dist/{src/util → util}/validate/validate.util.d.ts +0 -0
- /package/dist/{src/util → util}/validate/validate.util.js +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { E_UploadType as n } from "./upload.type.js";
|
|
2
|
+
import { dirname as g } from "../path/path.util.js";
|
|
3
|
+
import { pathExistsSync as w, mkdirSync as x, createWriteStream as E } from "../fs/fs.util.js";
|
|
4
|
+
async function v(i) {
|
|
5
|
+
return new Promise((s, t) => {
|
|
6
|
+
let e = 0;
|
|
7
|
+
i.on("data", (a) => {
|
|
8
|
+
e += a.length;
|
|
9
|
+
}), i.on("end", () => s(e)), i.on("error", t);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function z(i, s) {
|
|
13
|
+
const t = i.lastIndexOf(".");
|
|
14
|
+
if (t === -1)
|
|
15
|
+
return !1;
|
|
16
|
+
const e = i.substring(t + 1).toLowerCase();
|
|
17
|
+
return s.includes(e);
|
|
18
|
+
}
|
|
19
|
+
function y(i, s, t) {
|
|
20
|
+
const { filename: e, fileSize: a } = i, o = s[t], { allowedExtensions: r, sizeLimit: l } = o;
|
|
21
|
+
if (!z(e, r))
|
|
22
|
+
return {
|
|
23
|
+
isValid: !1,
|
|
24
|
+
error: `File extension not allowed for ${t.toLowerCase()} files. Allowed extensions: ${r.join(", ")}`
|
|
25
|
+
};
|
|
26
|
+
if (a !== void 0 && a > l) {
|
|
27
|
+
const f = Math.round(l / 1048576);
|
|
28
|
+
return {
|
|
29
|
+
isValid: !1,
|
|
30
|
+
error: `File size exceeds limit for ${t.toLowerCase()} files. Maximum size: ${f}MB`
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return { isValid: !0 };
|
|
34
|
+
}
|
|
35
|
+
function S(i) {
|
|
36
|
+
return { ...{
|
|
37
|
+
[n.IMAGE]: {
|
|
38
|
+
allowedExtensions: ["jpg", "jpeg", "png", "gif", "webp", "svg"],
|
|
39
|
+
sizeLimit: 5242880
|
|
40
|
+
// 5MB
|
|
41
|
+
},
|
|
42
|
+
[n.VIDEO]: {
|
|
43
|
+
allowedExtensions: ["mp4", "avi", "mov", "wmv", "flv", "webm"],
|
|
44
|
+
sizeLimit: 524288e3
|
|
45
|
+
// 500MB
|
|
46
|
+
},
|
|
47
|
+
[n.DOCUMENT]: {
|
|
48
|
+
allowedExtensions: ["pdf", "doc", "docx", "txt", "rtf"],
|
|
49
|
+
sizeLimit: 10485760
|
|
50
|
+
// 10MB
|
|
51
|
+
},
|
|
52
|
+
[n.OTHER]: {
|
|
53
|
+
allowedExtensions: ["zip", "rar", "tar", "gz"],
|
|
54
|
+
sizeLimit: 5242880
|
|
55
|
+
// 5MB
|
|
56
|
+
}
|
|
57
|
+
}, ...i };
|
|
58
|
+
}
|
|
59
|
+
async function h(i) {
|
|
60
|
+
const { path: s, file: t, config: e, type: a } = i;
|
|
61
|
+
if (!s || typeof s != "string")
|
|
62
|
+
return {
|
|
63
|
+
success: !1,
|
|
64
|
+
message: "Invalid path provided",
|
|
65
|
+
result: ""
|
|
66
|
+
};
|
|
67
|
+
if (!t || typeof t != "object")
|
|
68
|
+
return {
|
|
69
|
+
success: !1,
|
|
70
|
+
message: "Invalid file provided",
|
|
71
|
+
result: ""
|
|
72
|
+
};
|
|
73
|
+
if (e) {
|
|
74
|
+
const o = [n.IMAGE, n.VIDEO, n.DOCUMENT, n.OTHER];
|
|
75
|
+
for (const r of o) {
|
|
76
|
+
if (!e[r] || !Array.isArray(e[r].allowedExtensions) || e[r].allowedExtensions.length === 0)
|
|
77
|
+
return {
|
|
78
|
+
success: !1,
|
|
79
|
+
message: `Invalid config for ${r.toLowerCase()} files`,
|
|
80
|
+
result: ""
|
|
81
|
+
};
|
|
82
|
+
if (typeof e[r].sizeLimit != "number" || e[r].sizeLimit <= 0)
|
|
83
|
+
return {
|
|
84
|
+
success: !1,
|
|
85
|
+
message: `Invalid size limit for ${r.toLowerCase()} files`,
|
|
86
|
+
result: ""
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
const o = await (await t).file, { filename: r, createReadStream: l } = o;
|
|
92
|
+
if (e) {
|
|
93
|
+
const u = l(), c = await v(u), p = y(
|
|
94
|
+
{ filename: r, fileSize: c },
|
|
95
|
+
e,
|
|
96
|
+
a
|
|
97
|
+
);
|
|
98
|
+
if (!p.isValid)
|
|
99
|
+
return {
|
|
100
|
+
success: !1,
|
|
101
|
+
message: p.error || "File validation failed",
|
|
102
|
+
result: ""
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
const f = g(s);
|
|
106
|
+
w(f) || x(f, { recursive: !0 });
|
|
107
|
+
const m = l(), d = E(s);
|
|
108
|
+
return m.pipe(d), await new Promise((u, c) => {
|
|
109
|
+
d.on("finish", () => u()), d.on("error", c), m.on("error", c);
|
|
110
|
+
}), {
|
|
111
|
+
success: !0,
|
|
112
|
+
message: "File uploaded successfully",
|
|
113
|
+
result: s
|
|
114
|
+
};
|
|
115
|
+
} catch (o) {
|
|
116
|
+
return {
|
|
117
|
+
success: !1,
|
|
118
|
+
message: o instanceof Error ? o.message : "File upload failed",
|
|
119
|
+
result: ""
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export {
|
|
124
|
+
S as createUploadConfig,
|
|
125
|
+
h as upload
|
|
126
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApolloProvider as l } from "@apollo/client/react/react.cjs";
|
|
2
|
+
import r, { useMemo as m } from "react";
|
|
3
|
+
import { ApolloClientProvider as n } from "./apollo-client.context.js";
|
|
4
|
+
import { getClient as i } from "./apollo-client.util.js";
|
|
5
|
+
import { ApolloErrorProvider as p } from "../apollo-error/apollo-error.provider.js";
|
|
6
|
+
import { ApolloErrorComponent as a } from "../apollo-error/apollo-error.component.js";
|
|
7
|
+
import { Toaster as c } from "react-hot-toast";
|
|
8
|
+
function s({
|
|
9
|
+
options: e,
|
|
10
|
+
children: t
|
|
11
|
+
}) {
|
|
12
|
+
const o = m(
|
|
13
|
+
() => i(e || {}),
|
|
14
|
+
[e]
|
|
15
|
+
);
|
|
16
|
+
return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(p, null, /* @__PURE__ */ r.createElement(n, { client: o }, /* @__PURE__ */ r.createElement(l, { client: o }, t)), /* @__PURE__ */ r.createElement(a, null)), /* @__PURE__ */ r.createElement(c, { position: "top-right" }));
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
s as ApolloProvider
|
|
20
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import o, { createContext as l } from "react";
|
|
2
2
|
const n = l(null);
|
|
3
|
-
function
|
|
3
|
+
function c({
|
|
4
4
|
client: e,
|
|
5
5
|
children: t
|
|
6
6
|
}) {
|
|
@@ -8,5 +8,5 @@ function a({
|
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
10
|
n as ApolloClientContext,
|
|
11
|
-
|
|
11
|
+
c as ApolloClientProvider
|
|
12
12
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApolloClientOptions, ApolloLink, NormalizedCacheObject, UriFunction } from '@apollo/client';
|
|
2
|
-
import { I_Children } from '../../typescript/
|
|
2
|
+
import { I_Children } from '../../typescript/index.js';
|
|
3
3
|
export interface I_ApolloOptions extends Omit<ApolloClientOptions<NormalizedCacheObject>, 'cache'> {
|
|
4
4
|
uri?: string | UriFunction;
|
|
5
5
|
wsUrl?: string;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { ApolloError as y, ApolloClient as U, InMemoryCache as N } from "@apollo/client/core/core.cjs";
|
|
2
|
+
import { ApolloLink as k, split as x, from as D } from "@apollo/client/link/core/core.cjs";
|
|
3
|
+
import { onError as v } from "@apollo/client/link/error/error.cjs";
|
|
4
|
+
import { removeTypenameFromVariables as C } from "@apollo/client/link/remove-typename/remove-typename.cjs";
|
|
5
|
+
import { GraphQLWsLink as T } from "@apollo/client/link/subscriptions/subscriptions.cjs";
|
|
6
|
+
import { getMainDefinition as G } from "@apollo/client/utilities/utilities.cjs";
|
|
7
|
+
import R from "apollo-upload-client/createUploadLink.mjs";
|
|
8
|
+
import { createClient as I } from "graphql-ws";
|
|
9
|
+
import L from "react";
|
|
10
|
+
import { showGlobalApolloError as P } from "../apollo-error/apollo-error.util.js";
|
|
11
|
+
import { GRAPHQL_URI_DEFAULT as $ } from "./apollo-client.constant.js";
|
|
12
|
+
import { log as r } from "../log/log.util.js";
|
|
13
|
+
import { toast as b } from "react-hot-toast";
|
|
14
|
+
class S extends k {
|
|
15
|
+
count = 0;
|
|
16
|
+
request(o, s) {
|
|
17
|
+
const m = Date.now();
|
|
18
|
+
return this.count += 1, s(o).map((c) => {
|
|
19
|
+
const f = Date.now() - m, p = o.operationName || "Unnamed";
|
|
20
|
+
return r.info(`[Apollo] #${this.count}: ${p} (${f}ms)`), c;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function F(i) {
|
|
25
|
+
const { uri: o, wsUrl: s, customLinks: m } = i, c = new S(), f = v(({ graphQLErrors: n, networkError: e, protocolErrors: a, operation: h }) => {
|
|
26
|
+
const A = h?.operationName || "Unknown";
|
|
27
|
+
if (n && n.forEach(({ message: t, locations: l, path: d }) => {
|
|
28
|
+
r.error(
|
|
29
|
+
`[GraphQL error] ${A}: ${t}, Location: ${JSON.stringify(l, null, 4)}, Path: ${d}`
|
|
30
|
+
);
|
|
31
|
+
}), a && a.forEach(({ message: t, extensions: l }) => {
|
|
32
|
+
r.error(
|
|
33
|
+
`[Protocol error]: ${t}, Extensions: ${JSON.stringify(l, null, 4)}`
|
|
34
|
+
);
|
|
35
|
+
}), e && r.error(`[Network error]: ${e}`), n || a || e) {
|
|
36
|
+
const t = n?.[0]?.message || a?.[0]?.message || e?.message || "Unexpected error", l = new y({
|
|
37
|
+
graphQLErrors: n || [],
|
|
38
|
+
protocolErrors: a || [],
|
|
39
|
+
clientErrors: [],
|
|
40
|
+
networkError: e || null,
|
|
41
|
+
errorMessage: t,
|
|
42
|
+
extraInfo: {
|
|
43
|
+
operation: h
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
typeof window < "u" && b.error((d) => /* @__PURE__ */ L.createElement(L.Fragment, null, t, " ", /* @__PURE__ */ L.createElement(
|
|
47
|
+
"button",
|
|
48
|
+
{
|
|
49
|
+
type: "button",
|
|
50
|
+
className: "text-blue-500 hover:text-blue-700",
|
|
51
|
+
onClick: () => {
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
P(l);
|
|
54
|
+
}, 0), b.dismiss(d.id);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"Show Details"
|
|
58
|
+
)));
|
|
59
|
+
}
|
|
60
|
+
}), p = C();
|
|
61
|
+
o || r.warn(`[Apollo] No GraphQL URI provided — using "${$}" as default`);
|
|
62
|
+
const u = R({
|
|
63
|
+
uri: o ?? $,
|
|
64
|
+
credentials: "include",
|
|
65
|
+
headers: {
|
|
66
|
+
"apollo-require-preflight": "true"
|
|
67
|
+
}
|
|
68
|
+
}), g = s ? new T(I({ url: s })) : k.empty(), w = g instanceof k ? x(
|
|
69
|
+
({ query: n }) => {
|
|
70
|
+
const e = G(n);
|
|
71
|
+
return e.kind === "OperationDefinition" && e.operation === "subscription";
|
|
72
|
+
},
|
|
73
|
+
g,
|
|
74
|
+
u
|
|
75
|
+
) : u;
|
|
76
|
+
return w === u && s && r.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."), [
|
|
77
|
+
c,
|
|
78
|
+
// 🪵 custom logger
|
|
79
|
+
f,
|
|
80
|
+
// ⚠️ Apollo's error handling
|
|
81
|
+
p,
|
|
82
|
+
// 🧼 cleans up __typename
|
|
83
|
+
...m ?? [],
|
|
84
|
+
// 🔗 custom links
|
|
85
|
+
w
|
|
86
|
+
// 📡 HTTP vs WS routing (includes uploadLink)
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
function K(i = {}) {
|
|
90
|
+
const o = D(F(i));
|
|
91
|
+
return new U({
|
|
92
|
+
link: o,
|
|
93
|
+
cache: new N(),
|
|
94
|
+
...i
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
S as DevLoggerLink,
|
|
99
|
+
F as createApolloLinks,
|
|
100
|
+
K as getClient
|
|
101
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ApolloProvider as o } from "./apollo-client.component.js";
|
|
2
|
+
import { GRAPHQL_URI_DEFAULT as s } from "./apollo-client.constant.js";
|
|
3
|
+
import { ApolloClientContext as l, ApolloClientProvider as n } from "./apollo-client.context.js";
|
|
4
|
+
import { DevLoggerLink as p, createApolloLinks as i, getClient as m } from "./apollo-client.util.js";
|
|
5
|
+
import { makeVar as Q } from "@apollo/client/cache/cache.cjs";
|
|
6
|
+
import { useApolloClient as x, useBackgroundQuery as A, useFragment as L, useLazyQuery as d, useLoadableQuery as g, useMutation as C, useQuery as R, useQueryRefHandlers as c, useReactiveVar as k, useReadQuery as v, useSubscription as F, useSuspenseFragment as P, useSuspenseQuery as S } from "@apollo/client/react/hooks/hooks.cjs";
|
|
7
|
+
export {
|
|
8
|
+
l as ApolloClientContext,
|
|
9
|
+
n as ApolloClientProvider,
|
|
10
|
+
o as ApolloProvider,
|
|
11
|
+
p as DevLoggerLink,
|
|
12
|
+
s as GRAPHQL_URI_DEFAULT,
|
|
13
|
+
i as createApolloLinks,
|
|
14
|
+
m as getClient,
|
|
15
|
+
Q as makeVar,
|
|
16
|
+
x as useApolloClient,
|
|
17
|
+
A as useBackgroundQuery,
|
|
18
|
+
L as useFragment,
|
|
19
|
+
d as useLazyQuery,
|
|
20
|
+
g as useLoadableQuery,
|
|
21
|
+
C as useMutation,
|
|
22
|
+
R as useQuery,
|
|
23
|
+
c as useQueryRefHandlers,
|
|
24
|
+
k as useReactiveVar,
|
|
25
|
+
v as useReadQuery,
|
|
26
|
+
F as useSubscription,
|
|
27
|
+
P as useSuspenseFragment,
|
|
28
|
+
S as useSuspenseQuery
|
|
29
|
+
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { ApolloNextAppProvider as l } from "@apollo/client-integration-nextjs";
|
|
2
2
|
import e, { useMemo as m } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import "../apollo-error/apollo-error.context.js";
|
|
3
|
+
import { getClient as n } from "./apollo-client-nextjs.util.js";
|
|
5
4
|
import { ApolloErrorProvider as p } from "../apollo-error/apollo-error.provider.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
function
|
|
5
|
+
import { ApolloErrorComponent as i } from "../apollo-error/apollo-error.component.js";
|
|
6
|
+
import { Toaster as a } from "react-hot-toast";
|
|
7
|
+
function g({
|
|
9
8
|
options: r,
|
|
10
9
|
children: o
|
|
11
10
|
}) {
|
|
12
11
|
const t = m(
|
|
13
|
-
() => () =>
|
|
12
|
+
() => () => n(r || {}),
|
|
14
13
|
[r]
|
|
15
14
|
);
|
|
16
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(p, null, /* @__PURE__ */ e.createElement(l, { makeClient: t }, o), /* @__PURE__ */ e.createElement(
|
|
15
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(p, null, /* @__PURE__ */ e.createElement(l, { makeClient: t }, o), /* @__PURE__ */ e.createElement(i, null)), /* @__PURE__ */ e.createElement(a, { position: "top-right" }));
|
|
17
16
|
}
|
|
18
17
|
export {
|
|
19
|
-
|
|
18
|
+
g as ApolloProvider
|
|
20
19
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ApolloClient as r, InMemoryCache as n } from "@apollo/client-integration-nextjs";
|
|
2
|
+
import { from as t } from "@apollo/client/link/core/core.cjs";
|
|
3
|
+
import { createApolloLinks as m } from "../apollo-client/apollo-client.util.js";
|
|
4
|
+
function f(o = {}) {
|
|
5
|
+
const e = t(m(o));
|
|
6
|
+
return new r({
|
|
7
|
+
link: e,
|
|
8
|
+
cache: new n(),
|
|
9
|
+
...o
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
f as getClient
|
|
14
|
+
};
|
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
import e, { use as
|
|
1
|
+
import e, { use as c } from "react";
|
|
2
2
|
import { ApolloErrorContext as m } from "./apollo-error.context.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"btn-close": "_btn-close_8fveh_22",
|
|
7
|
-
"error-title": "_error-title_8fveh_36",
|
|
8
|
-
"btn-retry": "_btn-retry_8fveh_41",
|
|
9
|
-
"error-details": "_error-details_8fveh_54"
|
|
10
|
-
};
|
|
11
|
-
function i() {
|
|
12
|
-
const o = s(m), r = o == null ? void 0 : o.error;
|
|
3
|
+
import t from "./apollo-error.module.scss.js";
|
|
4
|
+
function p() {
|
|
5
|
+
const l = c(m), r = l?.error;
|
|
13
6
|
if (!r)
|
|
14
7
|
return null;
|
|
15
|
-
const
|
|
8
|
+
const o = (s, n) => n?.length ? /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("strong", null, s, ":"), /* @__PURE__ */ e.createElement("ul", null, n.map((a) => /* @__PURE__ */ e.createElement("li", { key: a.message }, a.message)))) : null;
|
|
16
9
|
return /* @__PURE__ */ e.createElement("div", { className: t["modal-backdrop"] }, /* @__PURE__ */ e.createElement("div", { className: t["modal-content"] }, /* @__PURE__ */ e.createElement(
|
|
17
10
|
"button",
|
|
18
11
|
{
|
|
19
12
|
type: "button",
|
|
20
13
|
className: t["btn-close"],
|
|
21
|
-
onClick:
|
|
14
|
+
onClick: l.hideError
|
|
22
15
|
},
|
|
23
16
|
"✕"
|
|
24
17
|
), /* @__PURE__ */ e.createElement("div", { className: t["error-title"] }, /* @__PURE__ */ e.createElement(
|
|
@@ -29,8 +22,8 @@ function i() {
|
|
|
29
22
|
onClick: () => window.location.reload()
|
|
30
23
|
},
|
|
31
24
|
"Reload"
|
|
32
|
-
), " ", r.message), /* @__PURE__ */ e.createElement("div", { className: t["error-details"] }, r.networkError && /* @__PURE__ */ e.createElement("pre", { className: "network" }, /* @__PURE__ */ e.createElement("strong", null, "Network Error:"), " ", r.networkError.message),
|
|
25
|
+
), " ", r.message), /* @__PURE__ */ e.createElement("div", { className: t["error-details"] }, r.networkError && /* @__PURE__ */ e.createElement("pre", { className: "network" }, /* @__PURE__ */ e.createElement("strong", null, "Network Error:"), " ", r.networkError.message), o("GraphQL Errors", [...r.graphQLErrors]), o("Protocol Errors", [...r.protocolErrors]), o("Client Errors", [...r.clientErrors]), r.extraInfo && /* @__PURE__ */ e.createElement("pre", { className: "extra" }, /* @__PURE__ */ e.createElement("strong", null, "Extra Info:"), " ", JSON.stringify(r.extraInfo, null, 4)))));
|
|
33
26
|
}
|
|
34
27
|
export {
|
|
35
|
-
|
|
28
|
+
p as ApolloErrorComponent
|
|
36
29
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
"modal-backdrop": "_modal-backdrop_8fveh_1",
|
|
3
|
+
"modal-content": "_modal-content_8fveh_11",
|
|
4
|
+
"btn-close": "_btn-close_8fveh_22",
|
|
5
|
+
"error-title": "_error-title_8fveh_36",
|
|
6
|
+
"btn-retry": "_btn-retry_8fveh_41",
|
|
7
|
+
"error-details": "_error-details_8fveh_54"
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
e as default
|
|
11
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import l, { useState as n, useEffect as u, useMemo as a } from "react";
|
|
2
2
|
import { ApolloErrorContext as c } from "./apollo-error.context.js";
|
|
3
3
|
import { setGlobalApolloErrorCallback as m } from "./apollo-error.util.js";
|
|
4
|
-
function
|
|
4
|
+
function f({ children: e }) {
|
|
5
5
|
const [o, r] = n(null);
|
|
6
6
|
u(() => {
|
|
7
7
|
m(r);
|
|
@@ -14,5 +14,5 @@ function p({ children: e }) {
|
|
|
14
14
|
return /* @__PURE__ */ l.createElement(c, { value: t }, e);
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as ApolloErrorProvider
|
|
18
18
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import a from "clsx";
|
|
2
|
+
import e, { useEffect as i } from "react";
|
|
3
|
+
import t from "./loading.module.scss.js";
|
|
4
|
+
function d() {
|
|
5
|
+
if (document.getElementById("noscroll-style"))
|
|
6
|
+
return;
|
|
7
|
+
const n = document.createElement("style");
|
|
8
|
+
n.id = "noscroll-style", n.innerHTML = `
|
|
9
|
+
.noscroll {
|
|
10
|
+
overflow: hidden !important;
|
|
11
|
+
height: 100vh !important;
|
|
12
|
+
}
|
|
13
|
+
`, document.head.appendChild(n);
|
|
14
|
+
}
|
|
15
|
+
function E({ full: n = !1, className: r = "", message: o = "Loading", ...s }) {
|
|
16
|
+
i(() => {
|
|
17
|
+
if (n) {
|
|
18
|
+
document.body.classList.add("noscroll");
|
|
19
|
+
const l = (m) => m.preventDefault();
|
|
20
|
+
return document.addEventListener("contextmenu", l), () => {
|
|
21
|
+
document.body.classList.remove("noscroll"), document.removeEventListener("contextmenu", l);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}, [n]), i(() => {
|
|
25
|
+
d();
|
|
26
|
+
}, []);
|
|
27
|
+
function c() {
|
|
28
|
+
return /* @__PURE__ */ e.createElement("div", { className: t.container, ...s }, /* @__PURE__ */ e.createElement("div", { className: t.ring }), /* @__PURE__ */ e.createElement("div", { className: t.ring }), /* @__PURE__ */ e.createElement("div", { className: t.ring }), /* @__PURE__ */ e.createElement("div", { className: t.ring }), o && /* @__PURE__ */ e.createElement("div", { className: t.message }, o));
|
|
29
|
+
}
|
|
30
|
+
return n ? /* @__PURE__ */ e.createElement("div", { className: a(t.full, r) }, c()) : /* @__PURE__ */ e.createElement("div", { className: a(t.block, r) }, c());
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
E as Loading
|
|
34
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const o = "_full_b1d9o_1", n = "_block_b1d9o_2", _ = "_container_b1d9o_40", s = "_ring_b1d9o_50", c = "_message_b1d9o_74", e = {
|
|
2
|
+
full: o,
|
|
3
|
+
block: n,
|
|
4
|
+
container: _,
|
|
5
|
+
ring: s,
|
|
6
|
+
message: c
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
n as block,
|
|
10
|
+
_ as container,
|
|
11
|
+
e as default,
|
|
12
|
+
o as full,
|
|
13
|
+
c as message,
|
|
14
|
+
s as ring
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import i, { useState as l, useCallback as r, useMemo as g } from "react";
|
|
2
|
+
import { Loading as m } from "./loading.component.js";
|
|
3
|
+
import { LoadingContext as u } from "./loading.context.js";
|
|
4
|
+
function x({ children: c }) {
|
|
5
|
+
const [e, t] = l(!1), [o, a] = l(!1), n = r((f = !1) => {
|
|
6
|
+
t(!0), a(f);
|
|
7
|
+
}, []), s = r(() => {
|
|
8
|
+
t(!1), a(!1);
|
|
9
|
+
}, []), d = g(
|
|
10
|
+
() => ({ isLoading: e, isGlobalLoading: o, showLoading: n, hideLoading: s }),
|
|
11
|
+
[e, o, n, s]
|
|
12
|
+
);
|
|
13
|
+
return /* @__PURE__ */ i.createElement(u, { value: d }, e ? /* @__PURE__ */ i.createElement(m, { full: o }) : c);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
x as LoadingProvider
|
|
17
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { consola as e } from "consola/browser";
|
|
2
|
+
import { RESPONSE_STATUS as c } from "../../constant/response-status.js";
|
|
3
|
+
const l = {
|
|
4
|
+
silent: e.silent,
|
|
5
|
+
level: e.level,
|
|
6
|
+
fatal: e.fatal,
|
|
7
|
+
error: e.error,
|
|
8
|
+
warn: e.warn,
|
|
9
|
+
log: e.log,
|
|
10
|
+
info: e.info,
|
|
11
|
+
success: e.success,
|
|
12
|
+
ready: e.ready,
|
|
13
|
+
start: e.start,
|
|
14
|
+
box: e.box,
|
|
15
|
+
debug: e.debug,
|
|
16
|
+
trace: e.trace,
|
|
17
|
+
verbose: e.verbose
|
|
18
|
+
};
|
|
19
|
+
function g(r, a) {
|
|
20
|
+
const { shouldLog: n = !0, returnValue: t, callback: o } = a ?? {}, s = r instanceof Error ? r : new Error(typeof r == "string" ? r : "Unknown error");
|
|
21
|
+
return n && l.error(s.message), o && typeof o == "function" && o(s), t || {
|
|
22
|
+
success: !1,
|
|
23
|
+
message: s.message,
|
|
24
|
+
code: c.INTERNAL_SERVER_ERROR.CODE
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
g as catchError,
|
|
29
|
+
l as log
|
|
30
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType, default as React } from 'react';
|
|
2
|
-
import { I_Children } from '../../typescript/
|
|
2
|
+
import { I_Children } from '../../typescript/index.js';
|
|
3
3
|
import { I_NextIntlLanguage, T_NextIntlMessageList } from './next-intl.type.js';
|
|
4
4
|
export declare function withNextIntl<T extends I_Children>(Component: ComponentType<T>): {
|
|
5
5
|
(props: T & {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NextIntlClientProvider as g } from "next-intl";
|
|
2
|
+
import s from "react";
|
|
3
|
+
import { NEXT_INTL_DEFAULT_LANGUAGE as c } from "./next-intl.constant.js";
|
|
4
|
+
import { useNextIntl as f } from "./next-intl.hook.js";
|
|
5
|
+
import { log as N } from "../log/log.util.js";
|
|
6
|
+
function E(t) {
|
|
7
|
+
const a = (l) => {
|
|
8
|
+
const { currentLanguage: e } = f(), { messages: r, languages: o } = l, n = "en", i = r[e?.value || n], m = o.find((u) => u.value === e?.value)?.timezone ?? c.timezone;
|
|
9
|
+
return r ? /* @__PURE__ */ s.createElement(
|
|
10
|
+
g,
|
|
11
|
+
{
|
|
12
|
+
locale: e?.value || n,
|
|
13
|
+
messages: i || null,
|
|
14
|
+
timeZone: m
|
|
15
|
+
},
|
|
16
|
+
/* @__PURE__ */ s.createElement(t, { ...l })
|
|
17
|
+
) : (N.warn(`Missing messages for language: ${e?.value || n}`), null);
|
|
18
|
+
};
|
|
19
|
+
return a.displayName = `withNextIntl(${t.displayName || t.name || "Component"})`, a;
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
E as withNextIntl
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import t, { useMemo as u } from "react";
|
|
2
|
+
import { NEXT_INTL_DEFAULT_LANGUAGE as c } from "./next-intl.constant.js";
|
|
3
|
+
import { NextIntlContext as p } from "./next-intl.context.js";
|
|
4
|
+
import { withNextIntl as i } from "./next-intl.hoc.js";
|
|
5
|
+
import { useStorage as l } from "../storage/storage.hook.js";
|
|
6
|
+
function f({ children: r }) {
|
|
7
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null, r);
|
|
8
|
+
}
|
|
9
|
+
const L = i(f);
|
|
10
|
+
function I({
|
|
11
|
+
children: r,
|
|
12
|
+
languages: e,
|
|
13
|
+
messages: a
|
|
14
|
+
}) {
|
|
15
|
+
const { value: n, set: o } = l("lang", e[0]), m = u(
|
|
16
|
+
() => ({ languages: e, currentLanguage: n ?? c, setCurrentLanguage: o }),
|
|
17
|
+
[e, o, n]
|
|
18
|
+
);
|
|
19
|
+
return /* @__PURE__ */ t.createElement(p, { value: m }, /* @__PURE__ */ t.createElement(L, { languages: e, messages: a }, r));
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
I as NextIntlProvider
|
|
23
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Locale } from 'date-fns';
|
|
2
2
|
import { AbstractIntlMessages, Timezone } from 'next-intl';
|
|
3
|
-
import { I_Children } from '../../typescript/
|
|
3
|
+
import { I_Children } from '../../typescript/index.js';
|
|
4
4
|
export interface I_NextIntlLanguage {
|
|
5
5
|
label: string;
|
|
6
6
|
value: string;
|