@yimingliao/cms 0.0.155 → 0.0.156
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/export/client/components/resources/index.js +46 -0
- package/dist/src/client/applications/resources/seo-metadata/seo-metadata-empty-translation.js +54 -0
- package/dist/src/client/applications/resources/seo-metadata/use-upsert-form-data.js +15 -0
- package/dist/src/client/interfaces/components/resources/category/category-relations-section.js +3 -11
- package/dist/src/client/interfaces/components/resources/folder/file-manager/file-manager-header.js +115 -0
- package/dist/src/client/interfaces/components/resources/folder/file-manager-list.js +127 -0
- package/dist/src/client/interfaces/components/resources/folder/folder-card.js +62 -0
- package/dist/src/client/interfaces/components/resources/folder/folder-full-path.js +40 -0
- package/dist/src/client/interfaces/components/resources/folder/folder-list.js +156 -0
- package/dist/src/client/interfaces/components/resources/folder/folder-relations-section.js +75 -0
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/base-tags.js +187 -0
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/json-ld-tags.js +78 -0
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/open-graph-tags.js +441 -0
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/reference-card.js +85 -0
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form-side-fields.js +56 -0
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form.js +186 -0
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-metadata-dialog.js +69 -0
- package/dist/src/client/interfaces/components/resources/tag/tag-card.js +78 -0
- package/dist/src/client/interfaces/components/resources/tag/tag-list.js +139 -0
- package/dist/src/client/interfaces/components/resources/tag/tag-relations-section.js +70 -0
- package/dist/src/client/interfaces/components/resources/topic/topic-card.js +91 -0
- package/dist/src/client/interfaces/components/resources/topic/topic-list.js +138 -0
- package/dist/src/client/interfaces/components/resources/topic/topic-relations-section.js +104 -0
- package/dist/types/export/client/components/resources/index.d.ts +1 -1
- package/dist/types/export/client/components/resources/index.d.ts.map +1 -1
- package/dist/types/src/client/applications/resources/seo-metadata/index.d.ts +2 -0
- package/dist/types/src/client/applications/resources/seo-metadata/index.d.ts.map +1 -0
- package/dist/types/src/client/applications/resources/seo-metadata/seo-metadata-empty-translation.d.ts +34 -0
- package/dist/types/src/client/applications/resources/seo-metadata/seo-metadata-empty-translation.d.ts.map +1 -0
- package/dist/types/src/client/applications/resources/seo-metadata/use-upsert-form-data.d.ts +79 -0
- package/dist/types/src/client/applications/resources/seo-metadata/use-upsert-form-data.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/category/category-relations-section.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/file/file-list.d.ts +1 -1
- package/dist/types/src/client/interfaces/components/resources/file/file-list.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/folder/file-manager/file-manager-header.d.ts +8 -0
- package/dist/types/src/client/interfaces/components/resources/folder/file-manager/file-manager-header.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/folder/file-manager-list.d.ts +28 -0
- package/dist/types/src/client/interfaces/components/resources/folder/file-manager-list.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/folder/folder-card.d.ts +13 -0
- package/dist/types/src/client/interfaces/components/resources/folder/folder-card.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/folder/folder-full-path.d.ts +9 -0
- package/dist/types/src/client/interfaces/components/resources/folder/folder-full-path.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/folder/folder-list.d.ts +26 -0
- package/dist/types/src/client/interfaces/components/resources/folder/folder-list.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/folder/folder-relations-section.d.ts +10 -0
- package/dist/types/src/client/interfaces/components/resources/folder/folder-relations-section.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/folder/index.d.ts +6 -0
- package/dist/types/src/client/interfaces/components/resources/folder/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/index.d.ts +4 -0
- package/dist/types/src/client/interfaces/components/resources/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/index.d.ts +3 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/base-tags.d.ts +11 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/base-tags.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/index.d.ts +5 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/json-ld-tags.d.ts +9 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/json-ld-tags.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/open-graph-tags.d.ts +13 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/open-graph-tags.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/twitter-tags.d.ts +9 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/twitter-tags.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/index.d.ts +3 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/reference-card.d.ts +2 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/reference-card.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form-side-fields.d.ts +8 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form-side-fields.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form.d.ts +28 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-metadata-dialog.d.ts +11 -0
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-metadata-dialog.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/tag/index.d.ts +4 -0
- package/dist/types/src/client/interfaces/components/resources/tag/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/tag/tag-card.d.ts +11 -0
- package/dist/types/src/client/interfaces/components/resources/tag/tag-card.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/tag/tag-list.d.ts +17 -0
- package/dist/types/src/client/interfaces/components/resources/tag/tag-list.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/tag/tag-relations-section.d.ts +9 -0
- package/dist/types/src/client/interfaces/components/resources/tag/tag-relations-section.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/topic/index.d.ts +4 -0
- package/dist/types/src/client/interfaces/components/resources/topic/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/topic/topic-card.d.ts +11 -0
- package/dist/types/src/client/interfaces/components/resources/topic/topic-card.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/topic/topic-list.d.ts +16 -0
- package/dist/types/src/client/interfaces/components/resources/topic/topic-list.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/topic/topic-relations-section.d.ts +12 -0
- package/dist/types/src/client/interfaces/components/resources/topic/topic-relations-section.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useTranslator } from 'intor/react';
|
|
4
|
+
import 'mime-types';
|
|
5
|
+
import { ensureArray } from '../../../../../shared/utils/ensure-array.js';
|
|
6
|
+
import 'lucide-react';
|
|
7
|
+
import 'react';
|
|
8
|
+
import 'ua-parser-js';
|
|
9
|
+
import 'clsx';
|
|
10
|
+
import 'tailwind-merge';
|
|
11
|
+
import 'next/navigation';
|
|
12
|
+
import '@radix-ui/react-avatar';
|
|
13
|
+
import '../../shadcn/badge.js';
|
|
14
|
+
import '../../shadcn/button.js';
|
|
15
|
+
import '@radix-ui/react-collapsible';
|
|
16
|
+
import '@radix-ui/react-dialog';
|
|
17
|
+
import '@radix-ui/react-dropdown-menu';
|
|
18
|
+
import '../../shadcn/input-group.js';
|
|
19
|
+
import '../../shadcn/item.js';
|
|
20
|
+
import '@radix-ui/react-label';
|
|
21
|
+
import '@radix-ui/react-select';
|
|
22
|
+
import '@radix-ui/react-separator';
|
|
23
|
+
import '../../shadcn/sidebar.js';
|
|
24
|
+
import 'next-themes';
|
|
25
|
+
import 'sonner';
|
|
26
|
+
import '@radix-ui/react-tabs';
|
|
27
|
+
import '@radix-ui/react-tooltip';
|
|
28
|
+
import 'next/link';
|
|
29
|
+
import '../../../../../constants/paths/auth.js';
|
|
30
|
+
import '../../../../../constants/paths/main.js';
|
|
31
|
+
import '../../../../../constants/paths/resources.js';
|
|
32
|
+
import '../../../../../constants/redirect-paths.js';
|
|
33
|
+
import { Accordion } from '../../ui/features/accordion/accordion.js';
|
|
34
|
+
import { AccordionContainer } from '../../ui/features/accordion/accordion-container.js';
|
|
35
|
+
import '../../../../../domain/resources/admin/constants.js';
|
|
36
|
+
import 'next/image';
|
|
37
|
+
|
|
38
|
+
function createFolderRelationsSection({
|
|
39
|
+
FolderList,
|
|
40
|
+
FileList
|
|
41
|
+
}) {
|
|
42
|
+
return function FolderRelationsSection({ folder }) {
|
|
43
|
+
const { t } = useTranslator();
|
|
44
|
+
const subFolders = ensureArray(folder?.subFolders);
|
|
45
|
+
const files = ensureArray(folder?.files);
|
|
46
|
+
return /* @__PURE__ */ jsxs(AccordionContainer, { children: [
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
Accordion,
|
|
49
|
+
{
|
|
50
|
+
hasBorder: true,
|
|
51
|
+
accordionHeaderProps: {
|
|
52
|
+
count: subFolders.length,
|
|
53
|
+
isRelated: true,
|
|
54
|
+
children: t("resources.folder.text")
|
|
55
|
+
},
|
|
56
|
+
children: /* @__PURE__ */ jsx(FolderList, { folderIds: subFolders.map((p) => p.id), openNewTab: true })
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
Accordion,
|
|
61
|
+
{
|
|
62
|
+
hasBorder: true,
|
|
63
|
+
accordionHeaderProps: {
|
|
64
|
+
count: files.length,
|
|
65
|
+
isRelated: true,
|
|
66
|
+
children: t("resources.file.text")
|
|
67
|
+
},
|
|
68
|
+
children: /* @__PURE__ */ jsx(FileList, { fileIds: files.map((p) => p.id), openNewTab: true })
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] });
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { createFolderRelationsSection };
|
package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/base-tags.js
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useTranslator } from 'intor/react';
|
|
4
|
+
import 'lucide-react';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'ua-parser-js';
|
|
7
|
+
import 'clsx';
|
|
8
|
+
import 'tailwind-merge';
|
|
9
|
+
import 'next/navigation';
|
|
10
|
+
import '@radix-ui/react-avatar';
|
|
11
|
+
import '../../../../shadcn/badge.js';
|
|
12
|
+
import '../../../../shadcn/button.js';
|
|
13
|
+
import '@radix-ui/react-collapsible';
|
|
14
|
+
import '@radix-ui/react-dialog';
|
|
15
|
+
import '@radix-ui/react-dropdown-menu';
|
|
16
|
+
import '../../../../shadcn/input-group.js';
|
|
17
|
+
import '../../../../shadcn/item.js';
|
|
18
|
+
import '@radix-ui/react-label';
|
|
19
|
+
import '@radix-ui/react-select';
|
|
20
|
+
import '@radix-ui/react-separator';
|
|
21
|
+
import '../../../../shadcn/sidebar.js';
|
|
22
|
+
import 'next-themes';
|
|
23
|
+
import 'sonner';
|
|
24
|
+
import '@radix-ui/react-tabs';
|
|
25
|
+
import '@radix-ui/react-tooltip';
|
|
26
|
+
import 'next/link';
|
|
27
|
+
import '../../../../../../../constants/paths/auth.js';
|
|
28
|
+
import '../../../../../../../constants/paths/main.js';
|
|
29
|
+
import '../../../../../../../constants/paths/resources.js';
|
|
30
|
+
import '../../../../../../../constants/redirect-paths.js';
|
|
31
|
+
import { Field } from '../../../../ui/form/field.js';
|
|
32
|
+
import 'mime-types';
|
|
33
|
+
import { Accordion } from '../../../../ui/features/accordion/accordion.js';
|
|
34
|
+
import '../../../../../../../domain/resources/admin/constants.js';
|
|
35
|
+
import 'next/image';
|
|
36
|
+
|
|
37
|
+
function createBaseTags({
|
|
38
|
+
I18nInput,
|
|
39
|
+
I18nTextarea,
|
|
40
|
+
I18nObjectArrayInput
|
|
41
|
+
}) {
|
|
42
|
+
return function BaseTags({
|
|
43
|
+
formData,
|
|
44
|
+
setFormData,
|
|
45
|
+
errors
|
|
46
|
+
}) {
|
|
47
|
+
const { t } = useTranslator();
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
Accordion,
|
|
50
|
+
{
|
|
51
|
+
hasBorder: true,
|
|
52
|
+
initialOpen: true,
|
|
53
|
+
accordionHeaderProps: { children: "Basic" },
|
|
54
|
+
deps: [formData],
|
|
55
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Field, { htmlFor: "title", label: "title", hint: "<title>...</title>", children: /* @__PURE__ */ jsx(
|
|
57
|
+
I18nInput,
|
|
58
|
+
{
|
|
59
|
+
id: "title",
|
|
60
|
+
fieldName: "title",
|
|
61
|
+
translations: formData?.translations.map((t2) => ({
|
|
62
|
+
locale: t2.locale,
|
|
63
|
+
title: t2.title
|
|
64
|
+
})),
|
|
65
|
+
setFormData,
|
|
66
|
+
errors
|
|
67
|
+
}
|
|
68
|
+
) }),
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
Field,
|
|
71
|
+
{
|
|
72
|
+
htmlFor: "description",
|
|
73
|
+
label: "description",
|
|
74
|
+
hint: `<meta name="description" content="..." />`,
|
|
75
|
+
children: /* @__PURE__ */ jsx(
|
|
76
|
+
I18nTextarea,
|
|
77
|
+
{
|
|
78
|
+
id: "description",
|
|
79
|
+
fieldName: "description",
|
|
80
|
+
translations: formData?.translations.map((t2) => ({
|
|
81
|
+
locale: t2.locale,
|
|
82
|
+
description: t2.description
|
|
83
|
+
})),
|
|
84
|
+
setFormData,
|
|
85
|
+
errors
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ jsx(
|
|
91
|
+
Field,
|
|
92
|
+
{
|
|
93
|
+
htmlFor: "author",
|
|
94
|
+
label: "author",
|
|
95
|
+
hint: `<meta name="author" content="..."> (${t(
|
|
96
|
+
"resources.seo-metadata.defaults-to.text"
|
|
97
|
+
)} Site Name)`,
|
|
98
|
+
children: /* @__PURE__ */ jsx(
|
|
99
|
+
I18nInput,
|
|
100
|
+
{
|
|
101
|
+
id: "author",
|
|
102
|
+
fieldName: "author",
|
|
103
|
+
translations: formData?.translations.map((t2) => ({
|
|
104
|
+
locale: t2.locale,
|
|
105
|
+
author: t2.author
|
|
106
|
+
})),
|
|
107
|
+
setFormData,
|
|
108
|
+
errors
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
/* @__PURE__ */ jsx(
|
|
114
|
+
Field,
|
|
115
|
+
{
|
|
116
|
+
htmlFor: "canonical",
|
|
117
|
+
label: "canonical",
|
|
118
|
+
hint: `<meta name="canonical" content="...">`,
|
|
119
|
+
children: /* @__PURE__ */ jsx(
|
|
120
|
+
I18nInput,
|
|
121
|
+
{
|
|
122
|
+
id: "canonical",
|
|
123
|
+
fieldName: "canonical",
|
|
124
|
+
translations: formData?.translations.map((t2) => ({
|
|
125
|
+
locale: t2.locale,
|
|
126
|
+
canonical: t2.canonical
|
|
127
|
+
})),
|
|
128
|
+
setFormData,
|
|
129
|
+
errors
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ jsx(
|
|
135
|
+
Field,
|
|
136
|
+
{
|
|
137
|
+
htmlFor: "robots",
|
|
138
|
+
label: "robots",
|
|
139
|
+
hint: `<meta name="robots" content="..."> (${t(
|
|
140
|
+
"resources.seo-metadata.defaults-to.text"
|
|
141
|
+
)} index, follow, max-image-preview: large)`,
|
|
142
|
+
children: /* @__PURE__ */ jsx(
|
|
143
|
+
I18nInput,
|
|
144
|
+
{
|
|
145
|
+
id: "robots",
|
|
146
|
+
fieldName: "robots",
|
|
147
|
+
translations: formData?.translations.map((t2) => ({
|
|
148
|
+
locale: t2.locale,
|
|
149
|
+
robots: t2.robots
|
|
150
|
+
})),
|
|
151
|
+
setFormData,
|
|
152
|
+
errors
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ jsx(
|
|
158
|
+
Field,
|
|
159
|
+
{
|
|
160
|
+
label: "alternate",
|
|
161
|
+
hint: `<link rel="alternate" hreflang="en-US" href="..." />`,
|
|
162
|
+
children: /* @__PURE__ */ jsx(
|
|
163
|
+
I18nObjectArrayInput,
|
|
164
|
+
{
|
|
165
|
+
fieldName: "alternate",
|
|
166
|
+
translations: formData?.translations.map((t2) => ({
|
|
167
|
+
locale: t2.locale,
|
|
168
|
+
alternate: t2.alternate
|
|
169
|
+
})),
|
|
170
|
+
setFormData,
|
|
171
|
+
errors,
|
|
172
|
+
fields: [
|
|
173
|
+
{ key: "hreflang", placeholder: "hreflang" },
|
|
174
|
+
{ key: "href", placeholder: "href" }
|
|
175
|
+
],
|
|
176
|
+
isResizable: false
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
] })
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export { createBaseTags };
|
package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/json-ld-tags.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import 'intor/react';
|
|
4
|
+
import 'lucide-react';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'ua-parser-js';
|
|
7
|
+
import 'clsx';
|
|
8
|
+
import 'tailwind-merge';
|
|
9
|
+
import 'next/navigation';
|
|
10
|
+
import '@radix-ui/react-avatar';
|
|
11
|
+
import '../../../../shadcn/badge.js';
|
|
12
|
+
import '../../../../shadcn/button.js';
|
|
13
|
+
import '@radix-ui/react-collapsible';
|
|
14
|
+
import '@radix-ui/react-dialog';
|
|
15
|
+
import '@radix-ui/react-dropdown-menu';
|
|
16
|
+
import '../../../../shadcn/input-group.js';
|
|
17
|
+
import '../../../../shadcn/item.js';
|
|
18
|
+
import '@radix-ui/react-label';
|
|
19
|
+
import '@radix-ui/react-select';
|
|
20
|
+
import '@radix-ui/react-separator';
|
|
21
|
+
import '../../../../shadcn/sidebar.js';
|
|
22
|
+
import 'next-themes';
|
|
23
|
+
import 'sonner';
|
|
24
|
+
import '@radix-ui/react-tabs';
|
|
25
|
+
import '@radix-ui/react-tooltip';
|
|
26
|
+
import 'next/link';
|
|
27
|
+
import '../../../../../../../constants/paths/auth.js';
|
|
28
|
+
import '../../../../../../../constants/paths/main.js';
|
|
29
|
+
import '../../../../../../../constants/paths/resources.js';
|
|
30
|
+
import '../../../../../../../constants/redirect-paths.js';
|
|
31
|
+
import { Field } from '../../../../ui/form/field.js';
|
|
32
|
+
import 'mime-types';
|
|
33
|
+
import { Accordion } from '../../../../ui/features/accordion/accordion.js';
|
|
34
|
+
import '../../../../../../../domain/resources/admin/constants.js';
|
|
35
|
+
import 'next/image';
|
|
36
|
+
|
|
37
|
+
function createJsonLdTags({
|
|
38
|
+
I18nJsonInput
|
|
39
|
+
}) {
|
|
40
|
+
return function JsonLdTags({
|
|
41
|
+
formData,
|
|
42
|
+
setFormData,
|
|
43
|
+
errors
|
|
44
|
+
}) {
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
Accordion,
|
|
47
|
+
{
|
|
48
|
+
hasBorder: true,
|
|
49
|
+
initialOpen: true,
|
|
50
|
+
accordionHeaderProps: { children: "JSON-LD" },
|
|
51
|
+
deps: [formData],
|
|
52
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-6", children: /* @__PURE__ */ jsx(
|
|
53
|
+
Field,
|
|
54
|
+
{
|
|
55
|
+
htmlFor: "jsonLd",
|
|
56
|
+
label: "JSON-LD",
|
|
57
|
+
hint: `<script type="application/ld+json">`,
|
|
58
|
+
children: /* @__PURE__ */ jsx(
|
|
59
|
+
I18nJsonInput,
|
|
60
|
+
{
|
|
61
|
+
id: "jsonLd",
|
|
62
|
+
fieldName: "jsonLd",
|
|
63
|
+
translations: formData?.translations.map((t) => ({
|
|
64
|
+
locale: t.locale,
|
|
65
|
+
jsonLd: t.jsonLd
|
|
66
|
+
})),
|
|
67
|
+
setFormData,
|
|
68
|
+
errors
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
) })
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { createJsonLdTags };
|