@deenruv/product-badges-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 +45 -0
- package/dist/plugin-server/entities/Badge.d.ts +12 -0
- package/dist/plugin-server/entities/Badge.js +46 -0
- package/dist/plugin-server/entities/BadgeTranslation.d.ts +10 -0
- package/dist/plugin-server/entities/BadgeTranslation.js +40 -0
- package/dist/plugin-server/extensions/badge.extension.d.ts +3 -0
- package/dist/plugin-server/extensions/badge.extension.js +79 -0
- package/dist/plugin-server/index.d.ts +2 -0
- package/dist/plugin-server/index.js +35 -0
- package/dist/plugin-server/resolvers/badge-admin.resolver.d.ts +19 -0
- package/dist/plugin-server/resolvers/badge-admin.resolver.js +79 -0
- package/dist/plugin-server/resolvers/badge-entity.resolver.d.ts +7 -0
- package/dist/plugin-server/resolvers/badge-entity.resolver.js +39 -0
- package/dist/plugin-server/services/badge.service.d.ts +15 -0
- package/dist/plugin-server/services/badge.service.js +112 -0
- package/dist/plugin-server/types.d.ts +11 -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 +3841 -0
- package/dist/plugin-server/zeus/index.d.ts +19707 -0
- package/dist/plugin-server/zeus/index.js +1100 -0
- package/dist/plugin-server/zeus/typedDocumentNode.d.ts +3 -0
- package/dist/plugin-server/zeus/typedDocumentNode.js +16 -0
- package/dist/plugin-ui/components/Badges.d.ts +5 -0
- package/dist/plugin-ui/components/Badges.js +82 -0
- package/dist/plugin-ui/components/BadgesModal.d.ts +10 -0
- package/dist/plugin-ui/components/BadgesModal.js +69 -0
- package/dist/plugin-ui/components/index.d.ts +1 -0
- package/dist/plugin-ui/components/index.js +1 -0
- package/dist/plugin-ui/graphql/mutations.d.ts +33 -0
- package/dist/plugin-ui/graphql/mutations.js +29 -0
- package/dist/plugin-ui/graphql/queries.d.ts +9 -0
- package/dist/plugin-ui/graphql/queries.js +14 -0
- package/dist/plugin-ui/graphql/selectors.d.ts +11 -0
- package/dist/plugin-ui/graphql/selectors.js +12 -0
- package/dist/plugin-ui/index.d.ts +1 -0
- package/dist/plugin-ui/index.js +14 -0
- package/dist/plugin-ui/locales/en/badges.json +25 -0
- package/dist/plugin-ui/locales/en/index.d.ts +26 -0
- package/dist/plugin-ui/locales/en/index.js +2 -0
- package/dist/plugin-ui/locales/pl/badges.json +25 -0
- package/dist/plugin-ui/locales/pl/index.d.ts +26 -0
- package/dist/plugin-ui/locales/pl/index.js +2 -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/zeus/const.d.ts +6 -0
- package/dist/plugin-ui/zeus/const.js +3838 -0
- package/dist/plugin-ui/zeus/index.d.ts +19707 -0
- package/dist/plugin-ui/zeus/index.js +1092 -0
- package/dist/plugin-ui/zeus/typedDocumentNode.d.ts +3 -0
- package/dist/plugin-ui/zeus/typedDocumentNode.js +9 -0
- package/package.json +48 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
2
|
+
import { ValueTypes, GenericOperation, OperationOptions, GraphQLTypes, InputType, ScalarDefinition, ThunderGraphQLOptions, ExtractVariables } from './';
|
|
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,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.typedGql = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
const _1 = require("./");
|
|
9
|
+
const typedGql = (operation, graphqlOptions) => (o, ops) => {
|
|
10
|
+
const str = (0, _1.Zeus)(operation, o, {
|
|
11
|
+
operationOptions: ops,
|
|
12
|
+
scalars: graphqlOptions === null || graphqlOptions === void 0 ? void 0 : graphqlOptions.scalars,
|
|
13
|
+
});
|
|
14
|
+
return (0, graphql_tag_1.default)(str);
|
|
15
|
+
};
|
|
16
|
+
exports.typedGql = typedGql;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React, { useState, useMemo, useEffect } from "react";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import { Info, Plus, Trash } from "lucide-react";
|
|
4
|
+
import { toast } from "sonner";
|
|
5
|
+
import { Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Dialog, DialogTrigger, useLazyQuery, useMutation, useSettings, } from "@deenruv/react-ui-devkit";
|
|
6
|
+
import { useLocation } from "react-router-dom";
|
|
7
|
+
import { BadgesModal } from "./BadgesModal";
|
|
8
|
+
import { translationNS } from "../translation-ns";
|
|
9
|
+
import { ProductBadgesQuery } from "../graphql/queries";
|
|
10
|
+
import { RemoveBadgeMutation } from "../graphql/mutations";
|
|
11
|
+
export const Badges = () => {
|
|
12
|
+
const [editedBadge, setEditedBadge] = useState();
|
|
13
|
+
const [open, setOpen] = useState(false);
|
|
14
|
+
const [loading, setLoading] = useState(false);
|
|
15
|
+
const { t } = useTranslation(translationNS);
|
|
16
|
+
const { pathname } = useLocation();
|
|
17
|
+
const [removeBadge] = useMutation(RemoveBadgeMutation);
|
|
18
|
+
const contentLng = useSettings((p) => p.translationsLanguage);
|
|
19
|
+
console.log("ącontentLng", contentLng);
|
|
20
|
+
const productId = useMemo(() => pathname.match(/\/products\/(\d+)(\/.*)?$/)?.[1] || "", [pathname]);
|
|
21
|
+
const [fetchBadges, { data: badgesData }] = useLazyQuery(ProductBadgesQuery);
|
|
22
|
+
const badges = badgesData?.getProductBadges || [];
|
|
23
|
+
const closeHandler = () => {
|
|
24
|
+
setOpen(false);
|
|
25
|
+
setEditedBadge(undefined);
|
|
26
|
+
};
|
|
27
|
+
const editHandler = (e) => (badge) => {
|
|
28
|
+
setEditedBadge(badge);
|
|
29
|
+
setOpen(true);
|
|
30
|
+
e.stopPropagation();
|
|
31
|
+
};
|
|
32
|
+
const removeHandler = async (id) => {
|
|
33
|
+
try {
|
|
34
|
+
setLoading(true);
|
|
35
|
+
await removeBadge({ id });
|
|
36
|
+
await fetchBadges({ productId });
|
|
37
|
+
toast.success(t("modal.remove.success"));
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
console.log(err);
|
|
41
|
+
toast.error(t("modal.remove.error"));
|
|
42
|
+
}
|
|
43
|
+
finally {
|
|
44
|
+
setLoading(false);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
fetchBadges({ productId });
|
|
49
|
+
}, [contentLng]);
|
|
50
|
+
if (!productId)
|
|
51
|
+
return null;
|
|
52
|
+
return (React.createElement(React.Fragment, null,
|
|
53
|
+
React.createElement(Card, null,
|
|
54
|
+
React.createElement(CardHeader, null,
|
|
55
|
+
React.createElement("div", { className: "flex items-start justify-between" },
|
|
56
|
+
React.createElement("div", { className: "flex flex-col gap-2" },
|
|
57
|
+
React.createElement(CardTitle, null, t("title")),
|
|
58
|
+
React.createElement(CardDescription, null, t("description"))),
|
|
59
|
+
React.createElement("div", { className: "flex flex-col gap-2 sm:flex-row" },
|
|
60
|
+
React.createElement(Dialog, { open: open, onOpenChange: (open) => {
|
|
61
|
+
if (!open)
|
|
62
|
+
closeHandler();
|
|
63
|
+
if (open)
|
|
64
|
+
setOpen(true);
|
|
65
|
+
} },
|
|
66
|
+
React.createElement(DialogTrigger, { asChild: true },
|
|
67
|
+
React.createElement(Button, { size: "sm", className: "h-10" },
|
|
68
|
+
React.createElement(Plus, null))),
|
|
69
|
+
open && (React.createElement(BadgesModal, { closeHandler: () => setOpen(false), productId: productId, badge: editedBadge, onSuccess: () => fetchBadges({ productId }) })))))),
|
|
70
|
+
React.createElement(CardContent, null,
|
|
71
|
+
React.createElement("div", { className: "flex flex-col gap-2" },
|
|
72
|
+
!badges.length && React.createElement("span", null, t("not-found")),
|
|
73
|
+
React.createElement("div", { className: "mt-2 flex flex-col gap-1" }, badges.map((el, idx) => (React.createElement("div", { key: el.id, className: "flex flex-col gap-1" },
|
|
74
|
+
idx !== 0 && React.createElement("hr", null),
|
|
75
|
+
React.createElement("div", { className: "flex items-center justify-between gap-2" },
|
|
76
|
+
React.createElement("span", { className: "px-2 py-1 font-semibold text-white", style: { backgroundColor: el.color } }, el.name),
|
|
77
|
+
React.createElement("div", { className: "flex gap-2" },
|
|
78
|
+
React.createElement(Button, { size: "sm", variant: "secondary", disabled: loading, onClick: (e) => editHandler(e)(el) },
|
|
79
|
+
React.createElement(Info, { size: 18 })),
|
|
80
|
+
React.createElement(Button, { size: "sm", variant: "destructive", disabled: loading, onClick: () => removeHandler(el.id) },
|
|
81
|
+
React.createElement(Trash, { size: 18 })))))))))))));
|
|
82
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BadgeType } from "./Badges";
|
|
3
|
+
type Props = {
|
|
4
|
+
productId: string;
|
|
5
|
+
closeHandler: () => void;
|
|
6
|
+
onSuccess?: () => Promise<unknown>;
|
|
7
|
+
badge?: BadgeType;
|
|
8
|
+
};
|
|
9
|
+
export declare const BadgesModal: ({ onSuccess, closeHandler, productId, badge, }: Props) => React.JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import { toast } from "sonner";
|
|
4
|
+
import { Button, DialogContent, DialogHeader, DialogTitle, Input, useMutation, useSettings, } from "@deenruv/react-ui-devkit";
|
|
5
|
+
import { translationNS } from "../translation-ns";
|
|
6
|
+
import { CreateBadgeMutation, EditBadgeMutation } from "../graphql/mutations";
|
|
7
|
+
export const BadgesModal = ({ onSuccess, closeHandler, productId, badge, }) => {
|
|
8
|
+
const { t } = useTranslation(translationNS);
|
|
9
|
+
const [text, setText] = useState(badge?.name || "");
|
|
10
|
+
const [loading, setLoading] = useState(false);
|
|
11
|
+
const [color, setColor] = useState(badge?.color || "#000000");
|
|
12
|
+
const contentLng = useSettings((p) => p.translationsLanguage);
|
|
13
|
+
const [editBadge] = useMutation(EditBadgeMutation);
|
|
14
|
+
const [createBadge] = useMutation(CreateBadgeMutation);
|
|
15
|
+
const mode = badge ? "edit" : "add";
|
|
16
|
+
const submitHandler = async () => {
|
|
17
|
+
if (!text) {
|
|
18
|
+
toast.error(t("modal.text-error"));
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
setLoading(true);
|
|
23
|
+
const input = {
|
|
24
|
+
color,
|
|
25
|
+
translations: [{ languageCode: contentLng, name: text }],
|
|
26
|
+
};
|
|
27
|
+
if (mode === "edit") {
|
|
28
|
+
await editBadge({
|
|
29
|
+
input: {
|
|
30
|
+
id: badge.id,
|
|
31
|
+
...input,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
if (mode === "add") {
|
|
36
|
+
await createBadge({
|
|
37
|
+
input: {
|
|
38
|
+
productId,
|
|
39
|
+
...input,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
toast.success(t(`modal.${mode}.success`));
|
|
44
|
+
await onSuccess?.();
|
|
45
|
+
closeHandler();
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
console.log(err);
|
|
49
|
+
toast.error(t(`modal.${mode}.error`));
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
setLoading(false);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
if (!productId)
|
|
56
|
+
return null;
|
|
57
|
+
return (React.createElement(DialogContent, { className: "max-h-[80vh] max-w-[400px] overflow-auto" },
|
|
58
|
+
React.createElement(DialogHeader, null,
|
|
59
|
+
React.createElement(DialogTitle, null, t(`modal.${mode}.title`))),
|
|
60
|
+
React.createElement("div", { className: "flex flex-col gap-2" },
|
|
61
|
+
React.createElement("div", { className: "flex items-center justify-between gap-2" },
|
|
62
|
+
React.createElement("div", { className: "flex-1" },
|
|
63
|
+
React.createElement(Input, { label: "text", type: "text", value: text, onChange: (e) => setText(e.target.value) })),
|
|
64
|
+
React.createElement("div", { className: "w-14" },
|
|
65
|
+
React.createElement(Input, { label: "color", className: "cursor-pointer", type: "color", value: color, onChange: (e) => setColor(e.target.value) }))),
|
|
66
|
+
React.createElement("div", { className: "mt-2 flex justify-end gap-2" },
|
|
67
|
+
React.createElement(Button, { variant: "secondary", onClick: closeHandler }, t("modal.cancel")),
|
|
68
|
+
React.createElement(Button, { disabled: loading, onClick: submitHandler }, t(`modal.${mode}.action`))))));
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Badges";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Badges";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const RemoveBadgeMutation: import("@graphql-typed-document-node/core").TypedDocumentNode<{
|
|
2
|
+
removeBadge: boolean;
|
|
3
|
+
}, {} & {
|
|
4
|
+
id: {};
|
|
5
|
+
}>;
|
|
6
|
+
export declare const CreateBadgeMutation: import("@graphql-typed-document-node/core").TypedDocumentNode<{
|
|
7
|
+
createBadge: {
|
|
8
|
+
id: string;
|
|
9
|
+
};
|
|
10
|
+
}, {} & {
|
|
11
|
+
input: {
|
|
12
|
+
productId: string | import("../zeus").Variable<any, string>;
|
|
13
|
+
color: string | import("../zeus").Variable<any, string>;
|
|
14
|
+
translations?: import("../zeus").Variable<any, string> | {
|
|
15
|
+
languageCode: import("../zeus").LanguageCode | import("../zeus").Variable<any, string>;
|
|
16
|
+
name: string | import("../zeus").Variable<any, string>;
|
|
17
|
+
}[] | null | undefined;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
export declare const EditBadgeMutation: import("@graphql-typed-document-node/core").TypedDocumentNode<{
|
|
21
|
+
editBadge: {
|
|
22
|
+
id: string;
|
|
23
|
+
};
|
|
24
|
+
}, {} & {
|
|
25
|
+
input: {
|
|
26
|
+
id: string | import("../zeus").Variable<any, string>;
|
|
27
|
+
color?: string | import("../zeus").Variable<any, string> | null | undefined;
|
|
28
|
+
translations?: import("../zeus").Variable<any, string> | {
|
|
29
|
+
languageCode: import("../zeus").LanguageCode | import("../zeus").Variable<any, string>;
|
|
30
|
+
name: string | import("../zeus").Variable<any, string>;
|
|
31
|
+
}[] | null | undefined;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { typedGql } from "../zeus/typedDocumentNode";
|
|
2
|
+
import { $ } from "../zeus";
|
|
3
|
+
import { scalars } from "@deenruv/admin-types";
|
|
4
|
+
export const RemoveBadgeMutation = typedGql("mutation", { scalars })({
|
|
5
|
+
removeBadge: [
|
|
6
|
+
{
|
|
7
|
+
input: {
|
|
8
|
+
id: $("id", "ID!"),
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
true,
|
|
12
|
+
],
|
|
13
|
+
});
|
|
14
|
+
export const CreateBadgeMutation = typedGql("mutation", { scalars })({
|
|
15
|
+
createBadge: [
|
|
16
|
+
{
|
|
17
|
+
input: $("input", "CreateBadgeInput!"),
|
|
18
|
+
},
|
|
19
|
+
{ id: true },
|
|
20
|
+
],
|
|
21
|
+
});
|
|
22
|
+
export const EditBadgeMutation = typedGql("mutation", { scalars })({
|
|
23
|
+
editBadge: [
|
|
24
|
+
{
|
|
25
|
+
input: $("input", "EditBadgeInput!"),
|
|
26
|
+
},
|
|
27
|
+
{ id: true },
|
|
28
|
+
],
|
|
29
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { typedGql } from "../zeus/typedDocumentNode";
|
|
2
|
+
import { $ } from "../zeus";
|
|
3
|
+
import { scalars } from "@deenruv/admin-types";
|
|
4
|
+
import { BadgeSelector } from "./selectors";
|
|
5
|
+
export const ProductBadgesQuery = typedGql("query", { scalars })({
|
|
6
|
+
getProductBadges: [
|
|
7
|
+
{
|
|
8
|
+
input: {
|
|
9
|
+
productId: $("productId", "ID!"),
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
BadgeSelector,
|
|
13
|
+
],
|
|
14
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Selector } from "../zeus";
|
|
2
|
+
export const ProductsSelector = Selector("Product")({
|
|
3
|
+
name: true,
|
|
4
|
+
slug: true,
|
|
5
|
+
id: true,
|
|
6
|
+
description: true,
|
|
7
|
+
});
|
|
8
|
+
export const BadgeSelector = Selector("Badge")({
|
|
9
|
+
id: true,
|
|
10
|
+
name: true,
|
|
11
|
+
color: true,
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BadgesUiPlugin: import("@deenruv/react-ui-devkit").DeenruvUIPlugin<Record<string, any>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createDeenruvUIPlugin } from "@deenruv/react-ui-devkit";
|
|
2
|
+
import pl from "./locales/pl";
|
|
3
|
+
import en from "./locales/en";
|
|
4
|
+
import { translationNS } from "./translation-ns";
|
|
5
|
+
import { Badges } from "./components/Badges";
|
|
6
|
+
export const BadgesUiPlugin = createDeenruvUIPlugin({
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
name: "Example Plugin",
|
|
9
|
+
components: [{ id: "products-detail-view", component: Badges }],
|
|
10
|
+
translations: {
|
|
11
|
+
ns: translationNS,
|
|
12
|
+
data: { en, pl },
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Badges",
|
|
3
|
+
"description": "Badges that will be shown on product image",
|
|
4
|
+
"not-found": "No badges has been found",
|
|
5
|
+
"modal": {
|
|
6
|
+
"add": {
|
|
7
|
+
"title": "Add badge",
|
|
8
|
+
"action": "Add",
|
|
9
|
+
"success": "Added successfully"
|
|
10
|
+
},
|
|
11
|
+
"edit": {
|
|
12
|
+
"title": "Edit badge",
|
|
13
|
+
"action": "Edit",
|
|
14
|
+
"success": "Edited successfully"
|
|
15
|
+
},
|
|
16
|
+
"remove": {
|
|
17
|
+
"title": "Remove badge",
|
|
18
|
+
"description": "Are you sure you want to remove this badge?",
|
|
19
|
+
"action": "Remove",
|
|
20
|
+
"success": "Removed successfully"
|
|
21
|
+
},
|
|
22
|
+
"text-error": "Text field can't be empty",
|
|
23
|
+
"cancel": "Cancel"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
"not-found": string;
|
|
5
|
+
modal: {
|
|
6
|
+
add: {
|
|
7
|
+
title: string;
|
|
8
|
+
action: string;
|
|
9
|
+
success: string;
|
|
10
|
+
};
|
|
11
|
+
edit: {
|
|
12
|
+
title: string;
|
|
13
|
+
action: string;
|
|
14
|
+
success: string;
|
|
15
|
+
};
|
|
16
|
+
remove: {
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
action: string;
|
|
20
|
+
success: string;
|
|
21
|
+
};
|
|
22
|
+
"text-error": string;
|
|
23
|
+
cancel: string;
|
|
24
|
+
};
|
|
25
|
+
}[];
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Odznaki",
|
|
3
|
+
"description": "Odznaki które będą widoczne na zdjęciu produktu",
|
|
4
|
+
"not-found": "Nie znaleziono odznak",
|
|
5
|
+
"modal": {
|
|
6
|
+
"add": {
|
|
7
|
+
"title": "Dodaj odznakę",
|
|
8
|
+
"action": "Dodaj",
|
|
9
|
+
"success": "Dodano pomyślnie"
|
|
10
|
+
},
|
|
11
|
+
"edit": {
|
|
12
|
+
"title": "Edytuj odznakę",
|
|
13
|
+
"action": "Edytuj",
|
|
14
|
+
"success": "Edytowano pomyślnie"
|
|
15
|
+
},
|
|
16
|
+
"remove": {
|
|
17
|
+
"title": "Usuń odznakę",
|
|
18
|
+
"description": "Czy jesteś pewien, że chcesz usunąć tę odznakę?",
|
|
19
|
+
"action": "Usuń",
|
|
20
|
+
"success": "Usunięto pomyślnie"
|
|
21
|
+
},
|
|
22
|
+
"text-error": "Text field can't be empty",
|
|
23
|
+
"cancel": "Cancel"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
"not-found": string;
|
|
5
|
+
modal: {
|
|
6
|
+
add: {
|
|
7
|
+
title: string;
|
|
8
|
+
action: string;
|
|
9
|
+
success: string;
|
|
10
|
+
};
|
|
11
|
+
edit: {
|
|
12
|
+
title: string;
|
|
13
|
+
action: string;
|
|
14
|
+
success: string;
|
|
15
|
+
};
|
|
16
|
+
remove: {
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
action: string;
|
|
20
|
+
success: string;
|
|
21
|
+
};
|
|
22
|
+
"text-error": string;
|
|
23
|
+
cancel: string;
|
|
24
|
+
};
|
|
25
|
+
}[];
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const translationNS: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const translationNS = Symbol("product-badges-plugin").toString();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "ESNext",
|
|
4
|
+
"moduleResolution": "node",
|
|
5
|
+
"target": "ES2020",
|
|
6
|
+
"jsx": "react",
|
|
7
|
+
"outDir": "../../dist/plugin-ui",
|
|
8
|
+
"importHelpers": true,
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"strict": true,
|
|
13
|
+
"noImplicitAny": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"allowSyntheticDefaultImports": true
|
|
16
|
+
},
|
|
17
|
+
"include": ["./**/*.tsx", "./**/*.json", "./**/*.ts"]
|
|
18
|
+
}
|