@deenruv/replicate-simple-bg-plugin 1.0.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/LICENSE +23 -0
- package/README.md +54 -0
- package/dist/plugin-server/constants.d.ts +13 -0
- package/dist/plugin-server/constants.js +122 -0
- package/dist/plugin-server/entities/replicate-simple-bg.d.ts +11 -0
- package/dist/plugin-server/entities/replicate-simple-bg.js +49 -0
- package/dist/plugin-server/extensions/replicate-simple-bg.extension.d.ts +1 -0
- package/dist/plugin-server/extensions/replicate-simple-bg.extension.js +105 -0
- package/dist/plugin-server/graphql/generated-admin-types.d.ts +5807 -0
- package/dist/plugin-server/graphql/generated-admin-types.js +1030 -0
- package/dist/plugin-server/index.d.ts +5 -0
- package/dist/plugin-server/index.js +40 -0
- package/dist/plugin-server/resolvers/replicate-simple-bg-admin.resolver.d.ts +51 -0
- package/dist/plugin-server/resolvers/replicate-simple-bg-admin.resolver.js +105 -0
- package/dist/plugin-server/services/replicate-simple-bg.service.d.ts +45 -0
- package/dist/plugin-server/services/replicate-simple-bg.service.js +254 -0
- package/dist/plugin-server/types.d.ts +29 -0
- package/dist/plugin-server/types.js +2 -0
- package/dist/plugin-server/zeus/const.d.ts +6 -0
- package/dist/plugin-server/zeus/const.js +3714 -0
- package/dist/plugin-server/zeus/index.d.ts +18885 -0
- package/dist/plugin-server/zeus/index.js +1101 -0
- package/dist/plugin-server/zeus/typedDocumentNode.d.ts +3 -0
- package/dist/plugin-server/zeus/typedDocumentNode.js +13 -0
- package/dist/plugin-ui/components/FileUpload.d.ts +11 -0
- package/dist/plugin-ui/components/FileUpload.js +50 -0
- package/dist/plugin-ui/components/RoomStyleSelect.d.ts +7 -0
- package/dist/plugin-ui/components/RoomStyleSelect.js +19 -0
- package/dist/plugin-ui/components/RoomTypeSelect.d.ts +7 -0
- package/dist/plugin-ui/components/RoomTypeSelect.js +21 -0
- package/dist/plugin-ui/components/index.d.ts +1 -0
- package/dist/plugin-ui/components/index.js +1 -0
- package/dist/plugin-ui/constants.d.ts +1 -0
- package/dist/plugin-ui/constants.js +15 -0
- package/dist/plugin-ui/graphql/mutations.d.ts +22 -0
- package/dist/plugin-ui/graphql/mutations.js +21 -0
- package/dist/plugin-ui/graphql/queries.d.ts +87 -0
- package/dist/plugin-ui/graphql/queries.js +32 -0
- package/dist/plugin-ui/graphql/selectors.d.ts +43 -0
- package/dist/plugin-ui/graphql/selectors.js +38 -0
- package/dist/plugin-ui/index.d.ts +1 -0
- package/dist/plugin-ui/index.js +33 -0
- package/dist/plugin-ui/locales/en/index.d.ts +67 -0
- package/dist/plugin-ui/locales/en/index.js +2 -0
- package/dist/plugin-ui/locales/en/simpleBg.json +66 -0
- package/dist/plugin-ui/locales/pl/index.d.ts +67 -0
- package/dist/plugin-ui/locales/pl/index.js +2 -0
- package/dist/plugin-ui/locales/pl/simpleBg.json +66 -0
- package/dist/plugin-ui/pages/ReplicatePage.d.ts +2 -0
- package/dist/plugin-ui/pages/ReplicatePage.js +282 -0
- package/dist/plugin-ui/pages/ReplicateProductSidebar.d.ts +2 -0
- package/dist/plugin-ui/pages/ReplicateProductSidebar.js +186 -0
- package/dist/plugin-ui/translation-ns.d.ts +1 -0
- package/dist/plugin-ui/translation-ns.js +1 -0
- package/dist/plugin-ui/tsconfig.json +18 -0
- package/dist/plugin-ui/types.d.ts +35 -0
- package/dist/plugin-ui/types.js +15 -0
- package/dist/plugin-ui/zeus/const.d.ts +6 -0
- package/dist/plugin-ui/zeus/const.js +3711 -0
- package/dist/plugin-ui/zeus/index.d.ts +18885 -0
- package/dist/plugin-ui/zeus/index.js +1093 -0
- package/dist/plugin-ui/zeus/scalars.d.ts +18 -0
- package/dist/plugin-ui/zeus/scalars.js +25 -0
- package/dist/plugin-ui/zeus/typedDocumentNode.d.ts +3 -0
- package/dist/plugin-ui/zeus/typedDocumentNode.js +9 -0
- package/package.json +53 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FromSelector, GraphQLTypes } from "./index.js";
|
|
2
|
+
export declare const scalars: {
|
|
3
|
+
ID: {
|
|
4
|
+
decode: (e: unknown) => string;
|
|
5
|
+
};
|
|
6
|
+
Money: {
|
|
7
|
+
decode: (e: unknown) => number;
|
|
8
|
+
};
|
|
9
|
+
DateTime: {
|
|
10
|
+
decode: (e: unknown) => string;
|
|
11
|
+
};
|
|
12
|
+
JSON: {
|
|
13
|
+
encode: (e: unknown) => string;
|
|
14
|
+
decode: (e: unknown) => any;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type ScalarsType = typeof scalars;
|
|
18
|
+
export type FromSelectorWithScalars<SELECTOR, NAME extends keyof GraphQLTypes> = FromSelector<SELECTOR, NAME, ScalarsType>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ZeusScalars } from "./index.js";
|
|
2
|
+
export const scalars = ZeusScalars({
|
|
3
|
+
ID: { decode: (e) => e },
|
|
4
|
+
Money: {
|
|
5
|
+
decode: (e) => e,
|
|
6
|
+
},
|
|
7
|
+
DateTime: {
|
|
8
|
+
decode: (e) => new Date(e).toISOString(),
|
|
9
|
+
},
|
|
10
|
+
JSON: {
|
|
11
|
+
encode: (e) => {
|
|
12
|
+
// hax który fixuje buga ze złym parsowaniem obiektu do query (productUpdate -> customFields)
|
|
13
|
+
// bez tego jest przesyłany jako zwykły stringify, czyli klucze dostają "" i request sie crashuje
|
|
14
|
+
return JSON.stringify(e).replace(/"(\w+)":/g, '$1:');
|
|
15
|
+
},
|
|
16
|
+
decode: (e) => {
|
|
17
|
+
try {
|
|
18
|
+
return JSON.parse(e);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return e;
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
2
|
+
import { ValueTypes, GenericOperation, OperationOptions, GraphQLTypes, InputType, ScalarDefinition, ThunderGraphQLOptions, ExtractVariables } from './index.js';
|
|
3
|
+
export declare const typedGql: <O extends "query" | "mutation", SCLR extends ScalarDefinition, R extends keyof ValueTypes = GenericOperation<O>>(operation: O, graphqlOptions?: ThunderGraphQLOptions<SCLR> | undefined) => <Z extends ValueTypes[R]>(o: Z & { [P in keyof Z]: P extends keyof ValueTypes[R] ? Z[P] : never; }, ops?: OperationOptions) => TypedDocumentNode<InputType<GraphQLTypes[R], Z, SCLR>, ExtractVariables<Z>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { gql } from 'graphql-tag';
|
|
2
|
+
import { Zeus, } from './index.js';
|
|
3
|
+
export const typedGql = (operation, graphqlOptions) => (o, ops) => {
|
|
4
|
+
const str = Zeus(operation, o, {
|
|
5
|
+
operationOptions: ops,
|
|
6
|
+
scalars: graphqlOptions?.scalars,
|
|
7
|
+
});
|
|
8
|
+
return gql(str);
|
|
9
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@deenruv/replicate-simple-bg-plugin",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"homepage": "https://deenruv.com/",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist/**/*"
|
|
8
|
+
],
|
|
9
|
+
"main": "./dist/plugin-server/index.js",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./dist/plugin-server/index.js",
|
|
12
|
+
"./plugin-server": "./dist/plugin-server/index.js",
|
|
13
|
+
"./plugin-ui": "./dist/plugin-ui/index.js"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@hookform/resolvers": "^3.3.4",
|
|
17
|
+
"@nestjs/common": "^10.3.10",
|
|
18
|
+
"@nestjs/graphql": "^12.2.0",
|
|
19
|
+
"axios": "^1.7.7",
|
|
20
|
+
"graphql-tag": "^2.12.6",
|
|
21
|
+
"graphql-zeus": "^7.0.0",
|
|
22
|
+
"lucide-react": "^0.363.0",
|
|
23
|
+
"react": "^18.2.0",
|
|
24
|
+
"react-dropzone": "^14.3.8",
|
|
25
|
+
"react-hook-form": "^7.51.3",
|
|
26
|
+
"react-i18next": "^14.0.5",
|
|
27
|
+
"react-router-dom": "^6.22.1",
|
|
28
|
+
"replicate": "1.0.1",
|
|
29
|
+
"sonner": "^1.4.41",
|
|
30
|
+
"zod": "^3.22.5",
|
|
31
|
+
"@deenruv/admin-types": "^1.0.0",
|
|
32
|
+
"@deenruv/react-ui-devkit": "^1.0.0",
|
|
33
|
+
"@deenruv/common": "^1.0.0"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@deenruv/core": "^0.1.0",
|
|
37
|
+
"typeorm": "^0.3.20"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@graphql-typed-document-node/core": "3.2.0",
|
|
41
|
+
"@types/react": "^18.2.0",
|
|
42
|
+
"@types/react-dom": "^18.2.0",
|
|
43
|
+
"rimraf": "^5.0.10",
|
|
44
|
+
"typescript": "5.3.3",
|
|
45
|
+
"@deenruv/core": "^1.0.0"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "rimraf dist && tsc --build",
|
|
49
|
+
"watch": "tsc --build --watch",
|
|
50
|
+
"lint": "eslint --fix .",
|
|
51
|
+
"zeus": "zeus http://localhost:3000/admin-api ./src/plugin-server --es --td && zeus http://localhost:3000/admin-api ./src/plugin-ui --es --td"
|
|
52
|
+
}
|
|
53
|
+
}
|