@yimingliao/cms 0.0.159 → 0.0.161
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 +0 -6
- package/dist/export/client/index.js +4 -2
- package/dist/export/index.js +2 -0
- package/dist/src/client/applications/form/get-img-ids-from-htmls.js +22 -0
- package/dist/src/client/applications/form/process-content-html.js +65 -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/export/client/index.d.ts +1 -1
- package/dist/types/export/client/index.d.ts.map +1 -1
- package/dist/types/export/index.d.ts +1 -1
- package/dist/types/export/index.d.ts.map +1 -1
- package/dist/types/src/client/applications/form/get-img-ids-from-htmls.d.ts +2 -0
- package/dist/types/src/client/applications/form/get-img-ids-from-htmls.d.ts.map +1 -0
- package/dist/types/src/client/applications/form/index.d.ts +2 -0
- package/dist/types/src/client/applications/form/index.d.ts.map +1 -1
- package/dist/types/src/client/applications/form/process-content-html.d.ts +6 -0
- package/dist/types/src/client/applications/form/process-content-html.d.ts.map +1 -0
- package/dist/types/src/client/applications/index.d.ts +1 -1
- package/dist/types/src/client/applications/index.d.ts.map +1 -1
- package/dist/types/src/client/index.d.ts +1 -1
- package/dist/types/src/client/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/index.d.ts +0 -1
- package/dist/types/src/client/interfaces/components/resources/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/client/applications/resources/seo-metadata/seo-metadata-empty-translation.js +0 -54
- package/dist/src/client/applications/resources/seo-metadata/use-upsert-form-data.js +0 -15
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/base-tags.js +0 -187
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/json-ld-tags.js +0 -78
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/open-graph-tags.js +0 -441
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/twitter-tags.js +0 -125
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/reference-card.js +0 -85
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form-side-fields.js +0 -56
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form.js +0 -186
- package/dist/src/client/interfaces/components/resources/seo-metadata/seo-metadata-dialog.js +0 -69
- package/dist/types/src/client/applications/resources/seo-metadata/index.d.ts +0 -2
- package/dist/types/src/client/applications/resources/seo-metadata/index.d.ts.map +0 -1
- package/dist/types/src/client/applications/resources/seo-metadata/seo-metadata-empty-translation.d.ts +0 -34
- package/dist/types/src/client/applications/resources/seo-metadata/seo-metadata-empty-translation.d.ts.map +0 -1
- package/dist/types/src/client/applications/resources/seo-metadata/use-upsert-form-data.d.ts +0 -79
- package/dist/types/src/client/applications/resources/seo-metadata/use-upsert-form-data.d.ts.map +0 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/index.d.ts +0 -3
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/index.d.ts.map +0 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/base-tags.d.ts +0 -11
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/base-tags.d.ts.map +0 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/index.d.ts +0 -5
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/index.d.ts.map +0 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/json-ld-tags.d.ts +0 -9
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/json-ld-tags.d.ts.map +0 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/open-graph-tags.d.ts +0 -13
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/open-graph-tags.d.ts.map +0 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/twitter-tags.d.ts +0 -9
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/twitter-tags.d.ts.map +0 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/index.d.ts +0 -3
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/index.d.ts.map +0 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/reference-card.d.ts +0 -2
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/reference-card.d.ts.map +0 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form-side-fields.d.ts +0 -8
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form-side-fields.d.ts.map +0 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form.d.ts +0 -28
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-form/seo-form.d.ts.map +0 -1
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-metadata-dialog.d.ts +0 -11
- package/dist/types/src/client/interfaces/components/resources/seo-metadata/seo-metadata-dialog.d.ts.map +0 -1
|
@@ -1,441 +0,0 @@
|
|
|
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 createOpenGraphTags({
|
|
38
|
-
I18nInput,
|
|
39
|
-
I18nTextarea,
|
|
40
|
-
I18nNumberInput,
|
|
41
|
-
I18nDateInput,
|
|
42
|
-
I18nArrayInput
|
|
43
|
-
}) {
|
|
44
|
-
return function OpenGraphTags({
|
|
45
|
-
formData,
|
|
46
|
-
setFormData,
|
|
47
|
-
errors
|
|
48
|
-
}) {
|
|
49
|
-
const { t } = useTranslator();
|
|
50
|
-
return /* @__PURE__ */ jsx(
|
|
51
|
-
Accordion,
|
|
52
|
-
{
|
|
53
|
-
hasBorder: true,
|
|
54
|
-
initialOpen: true,
|
|
55
|
-
accordionHeaderProps: { children: "Open Graph" },
|
|
56
|
-
deps: [formData],
|
|
57
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
58
|
-
/* @__PURE__ */ jsx(
|
|
59
|
-
Field,
|
|
60
|
-
{
|
|
61
|
-
htmlFor: "ogTitle",
|
|
62
|
-
label: "og:title",
|
|
63
|
-
hint: `<meta property="og:title" content="..." /> (${t(
|
|
64
|
-
"resources.seo-metadata.defaults-same-as.text"
|
|
65
|
-
)} title)`,
|
|
66
|
-
children: /* @__PURE__ */ jsx(
|
|
67
|
-
I18nInput,
|
|
68
|
-
{
|
|
69
|
-
id: "ogTitle",
|
|
70
|
-
fieldName: "ogTitle",
|
|
71
|
-
translations: formData?.translations.map((t2) => ({
|
|
72
|
-
locale: t2.locale,
|
|
73
|
-
ogTitle: t2.ogTitle
|
|
74
|
-
})),
|
|
75
|
-
setFormData,
|
|
76
|
-
errors
|
|
77
|
-
}
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
/* @__PURE__ */ jsx(
|
|
82
|
-
Field,
|
|
83
|
-
{
|
|
84
|
-
htmlFor: "ogDescription",
|
|
85
|
-
label: "og:description",
|
|
86
|
-
hint: `<meta property="og:description" content="..." /> (${t(
|
|
87
|
-
"resources.seo-metadata.defaults-same-as.text"
|
|
88
|
-
)} description)`,
|
|
89
|
-
children: /* @__PURE__ */ jsx(
|
|
90
|
-
I18nTextarea,
|
|
91
|
-
{
|
|
92
|
-
id: "ogDescription",
|
|
93
|
-
fieldName: "ogDescription",
|
|
94
|
-
translations: formData?.translations.map((t2) => ({
|
|
95
|
-
locale: t2.locale,
|
|
96
|
-
ogDescription: t2.ogDescription
|
|
97
|
-
})),
|
|
98
|
-
setFormData,
|
|
99
|
-
errors
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
),
|
|
104
|
-
/* @__PURE__ */ jsx(
|
|
105
|
-
Field,
|
|
106
|
-
{
|
|
107
|
-
htmlFor: "ogUrl",
|
|
108
|
-
label: "og:url",
|
|
109
|
-
hint: `<meta property="og:url" content="..." />`,
|
|
110
|
-
children: /* @__PURE__ */ jsx(
|
|
111
|
-
I18nInput,
|
|
112
|
-
{
|
|
113
|
-
id: "ogUrl",
|
|
114
|
-
fieldName: "ogUrl",
|
|
115
|
-
translations: formData?.translations.map((t2) => ({
|
|
116
|
-
locale: t2.locale,
|
|
117
|
-
ogUrl: t2.ogUrl
|
|
118
|
-
})),
|
|
119
|
-
setFormData,
|
|
120
|
-
errors
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
}
|
|
124
|
-
),
|
|
125
|
-
/* @__PURE__ */ jsx(
|
|
126
|
-
Field,
|
|
127
|
-
{
|
|
128
|
-
htmlFor: "ogType",
|
|
129
|
-
label: "og:type",
|
|
130
|
-
hint: `<meta property="og:type" content="..." /> (${t(
|
|
131
|
-
"resources.seo-metadata.defaults-based-on.text"
|
|
132
|
-
)} Type)`,
|
|
133
|
-
children: /* @__PURE__ */ jsx(
|
|
134
|
-
I18nInput,
|
|
135
|
-
{
|
|
136
|
-
id: "ogType",
|
|
137
|
-
fieldName: "ogType",
|
|
138
|
-
translations: formData?.translations.map((t2) => ({
|
|
139
|
-
locale: t2.locale,
|
|
140
|
-
ogType: t2.ogType
|
|
141
|
-
})),
|
|
142
|
-
setFormData,
|
|
143
|
-
errors
|
|
144
|
-
}
|
|
145
|
-
)
|
|
146
|
-
}
|
|
147
|
-
),
|
|
148
|
-
/* @__PURE__ */ jsx(
|
|
149
|
-
Field,
|
|
150
|
-
{
|
|
151
|
-
htmlFor: "ogSiteName",
|
|
152
|
-
label: "og:site_name",
|
|
153
|
-
hint: `<meta property="og:site_name" content="..." /> (${t(
|
|
154
|
-
"resources.seo-metadata.defaults-based-on.text"
|
|
155
|
-
)} Site Name)`,
|
|
156
|
-
children: /* @__PURE__ */ jsx(
|
|
157
|
-
I18nInput,
|
|
158
|
-
{
|
|
159
|
-
id: "ogSiteName",
|
|
160
|
-
fieldName: "ogSiteName",
|
|
161
|
-
translations: formData?.translations.map((t2) => ({
|
|
162
|
-
locale: t2.locale,
|
|
163
|
-
ogSiteName: t2.ogSiteName
|
|
164
|
-
})),
|
|
165
|
-
setFormData,
|
|
166
|
-
errors
|
|
167
|
-
}
|
|
168
|
-
)
|
|
169
|
-
}
|
|
170
|
-
),
|
|
171
|
-
/* @__PURE__ */ jsx(
|
|
172
|
-
Field,
|
|
173
|
-
{
|
|
174
|
-
htmlFor: "ogImage",
|
|
175
|
-
label: "og:image",
|
|
176
|
-
hint: `<meta property="og:image" content="..." />`,
|
|
177
|
-
children: /* @__PURE__ */ jsx(
|
|
178
|
-
I18nInput,
|
|
179
|
-
{
|
|
180
|
-
id: "ogImage",
|
|
181
|
-
fieldName: "ogImage",
|
|
182
|
-
translations: formData?.translations.map((t2) => ({
|
|
183
|
-
locale: t2.locale,
|
|
184
|
-
ogImage: t2.ogImage
|
|
185
|
-
})),
|
|
186
|
-
setFormData,
|
|
187
|
-
errors
|
|
188
|
-
}
|
|
189
|
-
)
|
|
190
|
-
}
|
|
191
|
-
),
|
|
192
|
-
/* @__PURE__ */ jsx(
|
|
193
|
-
Field,
|
|
194
|
-
{
|
|
195
|
-
htmlFor: "ogImageAlt",
|
|
196
|
-
label: "og:image:alt",
|
|
197
|
-
hint: `<meta property="og:image:alt" content="..." />`,
|
|
198
|
-
children: /* @__PURE__ */ jsx(
|
|
199
|
-
I18nInput,
|
|
200
|
-
{
|
|
201
|
-
id: "ogImageAlt",
|
|
202
|
-
fieldName: "ogImageAlt",
|
|
203
|
-
translations: formData?.translations.map((t2) => ({
|
|
204
|
-
locale: t2.locale,
|
|
205
|
-
ogImageAlt: t2.ogImageAlt
|
|
206
|
-
})),
|
|
207
|
-
setFormData,
|
|
208
|
-
errors
|
|
209
|
-
}
|
|
210
|
-
)
|
|
211
|
-
}
|
|
212
|
-
),
|
|
213
|
-
/* @__PURE__ */ jsx(
|
|
214
|
-
Field,
|
|
215
|
-
{
|
|
216
|
-
htmlFor: "ogImageType",
|
|
217
|
-
label: "og:image:type",
|
|
218
|
-
hint: `<meta property="og:image:type" content="..." /> (${t(
|
|
219
|
-
"resources.seo-metadata.defaults-based-on.text"
|
|
220
|
-
)} Image Type)`,
|
|
221
|
-
children: /* @__PURE__ */ jsx(
|
|
222
|
-
I18nInput,
|
|
223
|
-
{
|
|
224
|
-
id: "ogImageType",
|
|
225
|
-
fieldName: "ogImageType",
|
|
226
|
-
translations: formData?.translations.map((t2) => ({
|
|
227
|
-
locale: t2.locale,
|
|
228
|
-
ogImageType: t2.ogImageType
|
|
229
|
-
})),
|
|
230
|
-
setFormData,
|
|
231
|
-
errors
|
|
232
|
-
}
|
|
233
|
-
)
|
|
234
|
-
}
|
|
235
|
-
),
|
|
236
|
-
/* @__PURE__ */ jsx(
|
|
237
|
-
Field,
|
|
238
|
-
{
|
|
239
|
-
htmlFor: "ogImageWidth",
|
|
240
|
-
label: "og:image:width",
|
|
241
|
-
hint: `<meta property="og:image:width" content="..." /> (${t(
|
|
242
|
-
"resources.seo-metadata.defaults-based-on.text"
|
|
243
|
-
)} 1200)`,
|
|
244
|
-
children: /* @__PURE__ */ jsx(
|
|
245
|
-
I18nNumberInput,
|
|
246
|
-
{
|
|
247
|
-
id: "ogImageWidth",
|
|
248
|
-
fieldName: "ogImageWidth",
|
|
249
|
-
translations: formData?.translations.map((t2) => ({
|
|
250
|
-
locale: t2.locale,
|
|
251
|
-
ogImageWidth: t2.ogImageWidth
|
|
252
|
-
})),
|
|
253
|
-
setFormData,
|
|
254
|
-
errors,
|
|
255
|
-
type: "number"
|
|
256
|
-
}
|
|
257
|
-
)
|
|
258
|
-
}
|
|
259
|
-
),
|
|
260
|
-
/* @__PURE__ */ jsx(
|
|
261
|
-
Field,
|
|
262
|
-
{
|
|
263
|
-
htmlFor: "ogImageHeight",
|
|
264
|
-
label: "og:image:height",
|
|
265
|
-
hint: `<meta property="og:image:height" content="..." /> (${t(
|
|
266
|
-
"resources.seo-metadata.defaults-based-on.text"
|
|
267
|
-
)} 630)`,
|
|
268
|
-
children: /* @__PURE__ */ jsx(
|
|
269
|
-
I18nNumberInput,
|
|
270
|
-
{
|
|
271
|
-
id: "ogImageHeight",
|
|
272
|
-
fieldName: "ogImageHeight",
|
|
273
|
-
translations: formData?.translations.map((t2) => ({
|
|
274
|
-
locale: t2.locale,
|
|
275
|
-
ogImageHeight: t2.ogImageHeight
|
|
276
|
-
})),
|
|
277
|
-
setFormData,
|
|
278
|
-
errors,
|
|
279
|
-
type: "number"
|
|
280
|
-
}
|
|
281
|
-
)
|
|
282
|
-
}
|
|
283
|
-
),
|
|
284
|
-
/* @__PURE__ */ jsx(
|
|
285
|
-
Field,
|
|
286
|
-
{
|
|
287
|
-
htmlFor: "ogLocale",
|
|
288
|
-
label: "og:locale",
|
|
289
|
-
hint: `<meta property="og:locale" content="..." />`,
|
|
290
|
-
children: /* @__PURE__ */ jsx(
|
|
291
|
-
I18nInput,
|
|
292
|
-
{
|
|
293
|
-
id: "ogLocale",
|
|
294
|
-
fieldName: "ogLocale",
|
|
295
|
-
translations: formData?.translations.map((t2) => ({
|
|
296
|
-
locale: t2.locale,
|
|
297
|
-
ogLocale: t2.ogLocale
|
|
298
|
-
})),
|
|
299
|
-
setFormData,
|
|
300
|
-
errors
|
|
301
|
-
}
|
|
302
|
-
)
|
|
303
|
-
}
|
|
304
|
-
),
|
|
305
|
-
/* @__PURE__ */ jsx(
|
|
306
|
-
Field,
|
|
307
|
-
{
|
|
308
|
-
htmlFor: "ogLocaleAlternate",
|
|
309
|
-
label: "og:locale:alternate",
|
|
310
|
-
hint: `<meta property="og:locale:alternate" content="..." />`,
|
|
311
|
-
children: /* @__PURE__ */ jsx(
|
|
312
|
-
I18nArrayInput,
|
|
313
|
-
{
|
|
314
|
-
id: "ogLocaleAlternate",
|
|
315
|
-
fieldName: "ogLocaleAlternate",
|
|
316
|
-
translations: formData?.translations.map((t2) => ({
|
|
317
|
-
locale: t2.locale,
|
|
318
|
-
ogLocaleAlternate: t2.ogLocaleAlternate
|
|
319
|
-
})),
|
|
320
|
-
setFormData,
|
|
321
|
-
errors
|
|
322
|
-
}
|
|
323
|
-
)
|
|
324
|
-
}
|
|
325
|
-
),
|
|
326
|
-
/* @__PURE__ */ jsx(
|
|
327
|
-
Field,
|
|
328
|
-
{
|
|
329
|
-
htmlFor: "ogArticlePublishedTime",
|
|
330
|
-
label: "og:article:published_time",
|
|
331
|
-
hint: `<meta property="og:article:published_time" content="..." />`,
|
|
332
|
-
children: /* @__PURE__ */ jsx(
|
|
333
|
-
I18nDateInput,
|
|
334
|
-
{
|
|
335
|
-
id: "ogArticlePublishedTime",
|
|
336
|
-
fieldName: "ogArticlePublishedTime",
|
|
337
|
-
translations: formData?.translations.map((t2) => ({
|
|
338
|
-
locale: t2.locale,
|
|
339
|
-
ogArticlePublishedTime: t2.ogArticlePublishedTime
|
|
340
|
-
})),
|
|
341
|
-
setFormData,
|
|
342
|
-
errors,
|
|
343
|
-
type: "datetime-local"
|
|
344
|
-
}
|
|
345
|
-
)
|
|
346
|
-
}
|
|
347
|
-
),
|
|
348
|
-
/* @__PURE__ */ jsx(
|
|
349
|
-
Field,
|
|
350
|
-
{
|
|
351
|
-
htmlFor: "ogArticleModifiedTime",
|
|
352
|
-
label: "og:article:modified_time",
|
|
353
|
-
hint: `<meta property="og:article:modified_time" content="..." />`,
|
|
354
|
-
children: /* @__PURE__ */ jsx(
|
|
355
|
-
I18nDateInput,
|
|
356
|
-
{
|
|
357
|
-
id: "ogArticleModifiedTime",
|
|
358
|
-
fieldName: "ogArticleModifiedTime",
|
|
359
|
-
translations: formData?.translations.map((t2) => ({
|
|
360
|
-
locale: t2.locale,
|
|
361
|
-
ogArticleModifiedTime: t2.ogArticleModifiedTime
|
|
362
|
-
})),
|
|
363
|
-
setFormData,
|
|
364
|
-
errors,
|
|
365
|
-
type: "datetime-local"
|
|
366
|
-
}
|
|
367
|
-
)
|
|
368
|
-
}
|
|
369
|
-
),
|
|
370
|
-
/* @__PURE__ */ jsx(
|
|
371
|
-
Field,
|
|
372
|
-
{
|
|
373
|
-
htmlFor: "ogArticleAuthor",
|
|
374
|
-
label: "og:article:author",
|
|
375
|
-
hint: `<meta property="og:article:author" content="..." /> (${t(
|
|
376
|
-
"resources.seo-metadata.defaults-based-on.text"
|
|
377
|
-
)} Site Name)`,
|
|
378
|
-
children: /* @__PURE__ */ jsx(
|
|
379
|
-
I18nInput,
|
|
380
|
-
{
|
|
381
|
-
id: "ogArticleAuthor",
|
|
382
|
-
fieldName: "ogArticleAuthor",
|
|
383
|
-
translations: formData?.translations.map((t2) => ({
|
|
384
|
-
locale: t2.locale,
|
|
385
|
-
ogArticleAuthor: t2.ogArticleAuthor
|
|
386
|
-
})),
|
|
387
|
-
setFormData,
|
|
388
|
-
errors
|
|
389
|
-
}
|
|
390
|
-
)
|
|
391
|
-
}
|
|
392
|
-
),
|
|
393
|
-
/* @__PURE__ */ jsx(
|
|
394
|
-
Field,
|
|
395
|
-
{
|
|
396
|
-
htmlFor: "ogArticleSection",
|
|
397
|
-
label: "og:article:section",
|
|
398
|
-
hint: `<meta property="og:article:section" content="..." />`,
|
|
399
|
-
children: /* @__PURE__ */ jsx(
|
|
400
|
-
I18nInput,
|
|
401
|
-
{
|
|
402
|
-
id: "ogArticleSection",
|
|
403
|
-
fieldName: "ogArticleSection",
|
|
404
|
-
translations: formData?.translations.map((t2) => ({
|
|
405
|
-
locale: t2.locale,
|
|
406
|
-
ogArticleSection: t2.ogArticleSection
|
|
407
|
-
})),
|
|
408
|
-
setFormData,
|
|
409
|
-
errors
|
|
410
|
-
}
|
|
411
|
-
)
|
|
412
|
-
}
|
|
413
|
-
),
|
|
414
|
-
/* @__PURE__ */ jsx(
|
|
415
|
-
Field,
|
|
416
|
-
{
|
|
417
|
-
htmlFor: "ogArticleTag",
|
|
418
|
-
label: "og:article:tag",
|
|
419
|
-
hint: `<meta property="og:article:tag" content="..." />`,
|
|
420
|
-
children: /* @__PURE__ */ jsx(
|
|
421
|
-
I18nArrayInput,
|
|
422
|
-
{
|
|
423
|
-
id: "ogArticleTag",
|
|
424
|
-
fieldName: "ogArticleTag",
|
|
425
|
-
translations: formData?.translations.map((t2) => ({
|
|
426
|
-
locale: t2.locale,
|
|
427
|
-
ogArticleTag: t2.ogArticleTag
|
|
428
|
-
})),
|
|
429
|
-
setFormData,
|
|
430
|
-
errors
|
|
431
|
-
}
|
|
432
|
-
)
|
|
433
|
-
}
|
|
434
|
-
)
|
|
435
|
-
] })
|
|
436
|
-
}
|
|
437
|
-
);
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
export { createOpenGraphTags };
|
package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/fields/twitter-tags.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
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 createTwitterTags({
|
|
38
|
-
I18nInput
|
|
39
|
-
}) {
|
|
40
|
-
return function TwitterTags({
|
|
41
|
-
formData,
|
|
42
|
-
setFormData,
|
|
43
|
-
errors
|
|
44
|
-
}) {
|
|
45
|
-
const { t } = useTranslator();
|
|
46
|
-
return /* @__PURE__ */ jsx(
|
|
47
|
-
Accordion,
|
|
48
|
-
{
|
|
49
|
-
hasBorder: true,
|
|
50
|
-
initialOpen: true,
|
|
51
|
-
accordionHeaderProps: { children: "Twitter" },
|
|
52
|
-
deps: [formData],
|
|
53
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
54
|
-
/* @__PURE__ */ jsx(
|
|
55
|
-
Field,
|
|
56
|
-
{
|
|
57
|
-
htmlFor: "twitterCard",
|
|
58
|
-
label: "twitter:card",
|
|
59
|
-
hint: `<meta property="twitter:card" content="..." /> (${t(
|
|
60
|
-
"resources.seo-metadata.defaults-to.text"
|
|
61
|
-
)} summary_large_image)`,
|
|
62
|
-
children: /* @__PURE__ */ jsx(
|
|
63
|
-
I18nInput,
|
|
64
|
-
{
|
|
65
|
-
id: "twitterCard",
|
|
66
|
-
fieldName: "twitterCard",
|
|
67
|
-
translations: formData?.translations.map((t2) => ({
|
|
68
|
-
locale: t2.locale,
|
|
69
|
-
twitterCard: t2.twitterCard
|
|
70
|
-
})),
|
|
71
|
-
setFormData,
|
|
72
|
-
errors
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
),
|
|
77
|
-
/* @__PURE__ */ jsx(
|
|
78
|
-
Field,
|
|
79
|
-
{
|
|
80
|
-
htmlFor: "twitterSite",
|
|
81
|
-
label: "twitter:site",
|
|
82
|
-
hint: `<meta property="twitter:site" content="..." />`,
|
|
83
|
-
children: /* @__PURE__ */ jsx(
|
|
84
|
-
I18nInput,
|
|
85
|
-
{
|
|
86
|
-
id: "twitterSite",
|
|
87
|
-
fieldName: "twitterSite",
|
|
88
|
-
translations: formData?.translations.map((t2) => ({
|
|
89
|
-
locale: t2.locale,
|
|
90
|
-
twitterSite: t2.twitterSite
|
|
91
|
-
})),
|
|
92
|
-
setFormData,
|
|
93
|
-
errors
|
|
94
|
-
}
|
|
95
|
-
)
|
|
96
|
-
}
|
|
97
|
-
),
|
|
98
|
-
/* @__PURE__ */ jsx(
|
|
99
|
-
Field,
|
|
100
|
-
{
|
|
101
|
-
htmlFor: "twitterCreator",
|
|
102
|
-
label: "twitter:creator",
|
|
103
|
-
hint: `<meta property="twitter:creator" content="..." />`,
|
|
104
|
-
children: /* @__PURE__ */ jsx(
|
|
105
|
-
I18nInput,
|
|
106
|
-
{
|
|
107
|
-
id: "twitterCreator",
|
|
108
|
-
fieldName: "twitterCreator",
|
|
109
|
-
translations: formData?.translations.map((t2) => ({
|
|
110
|
-
locale: t2.locale,
|
|
111
|
-
twitterCreator: t2.twitterCreator
|
|
112
|
-
})),
|
|
113
|
-
setFormData,
|
|
114
|
-
errors
|
|
115
|
-
}
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
)
|
|
119
|
-
] })
|
|
120
|
-
}
|
|
121
|
-
);
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export { createTwitterTags };
|
package/dist/src/client/interfaces/components/resources/seo-metadata/seo-form/reference-card.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useTranslator } from 'intor/react';
|
|
4
|
-
import { Link2 } from 'lucide-react';
|
|
5
|
-
import Link from 'next/link';
|
|
6
|
-
import '../../../../../../constants/paths/auth.js';
|
|
7
|
-
import '../../../../../../constants/paths/main.js';
|
|
8
|
-
import '../../../../../../constants/paths/resources.js';
|
|
9
|
-
import { NEW_TAB_REL, NEW_TAB_TARGET } from '../../../../../../constants/anchor.js';
|
|
10
|
-
import '../../../../../../constants/redirect-paths.js';
|
|
11
|
-
import '@radix-ui/react-avatar';
|
|
12
|
-
import 'react';
|
|
13
|
-
import 'ua-parser-js';
|
|
14
|
-
import 'clsx';
|
|
15
|
-
import 'tailwind-merge';
|
|
16
|
-
import 'next/navigation';
|
|
17
|
-
import '../../../shadcn/badge.js';
|
|
18
|
-
import '../../../shadcn/button.js';
|
|
19
|
-
import { Card } from '../../../shadcn/card.js';
|
|
20
|
-
import '@radix-ui/react-collapsible';
|
|
21
|
-
import '@radix-ui/react-dialog';
|
|
22
|
-
import '@radix-ui/react-dropdown-menu';
|
|
23
|
-
import '../../../shadcn/input-group.js';
|
|
24
|
-
import '../../../shadcn/item.js';
|
|
25
|
-
import '@radix-ui/react-label';
|
|
26
|
-
import '@radix-ui/react-select';
|
|
27
|
-
import '@radix-ui/react-separator';
|
|
28
|
-
import '../../../shadcn/sidebar.js';
|
|
29
|
-
import 'next-themes';
|
|
30
|
-
import 'sonner';
|
|
31
|
-
import '@radix-ui/react-tabs';
|
|
32
|
-
import '@radix-ui/react-tooltip';
|
|
33
|
-
import { Button } from '../../../ui/buttons/button.js';
|
|
34
|
-
import 'mime-types';
|
|
35
|
-
import '../../../../../../domain/resources/admin/constants.js';
|
|
36
|
-
import 'next/image';
|
|
37
|
-
|
|
38
|
-
function ReferenceCard() {
|
|
39
|
-
const { t } = useTranslator();
|
|
40
|
-
return /* @__PURE__ */ jsxs(Card, { className: "flex flex-col gap-2 p-4", children: [
|
|
41
|
-
/* @__PURE__ */ jsxs("p", { className: "flex-center mb-2 gap-2 text-sm", children: [
|
|
42
|
-
/* @__PURE__ */ jsx(Link2, { className: "size-5" }),
|
|
43
|
-
t("resources.seo-metadata.quick-links.text")
|
|
44
|
-
] }),
|
|
45
|
-
/* @__PURE__ */ jsx(
|
|
46
|
-
Link,
|
|
47
|
-
{
|
|
48
|
-
href: "https://developers.google.com/search/docs",
|
|
49
|
-
target: NEW_TAB_TARGET,
|
|
50
|
-
rel: NEW_TAB_REL,
|
|
51
|
-
children: /* @__PURE__ */ jsx(Button, { size: "sm", variant: "link", children: "Google SEO" })
|
|
52
|
-
}
|
|
53
|
-
),
|
|
54
|
-
/* @__PURE__ */ jsx(
|
|
55
|
-
Link,
|
|
56
|
-
{
|
|
57
|
-
href: "https://search.google.com/test/rich-results",
|
|
58
|
-
target: NEW_TAB_TARGET,
|
|
59
|
-
rel: NEW_TAB_REL,
|
|
60
|
-
children: /* @__PURE__ */ jsx(Button, { size: "sm", variant: "link", children: "Google Rich Results" })
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
/* @__PURE__ */ jsx(
|
|
64
|
-
Link,
|
|
65
|
-
{
|
|
66
|
-
href: "https://validator.schema.org/",
|
|
67
|
-
target: NEW_TAB_TARGET,
|
|
68
|
-
rel: NEW_TAB_REL,
|
|
69
|
-
children: /* @__PURE__ */ jsx(Button, { size: "sm", variant: "link", children: "Schema Validator" })
|
|
70
|
-
}
|
|
71
|
-
),
|
|
72
|
-
/* @__PURE__ */ jsx(Link, { href: "https://ogp.me/", target: NEW_TAB_TARGET, rel: NEW_TAB_REL, children: /* @__PURE__ */ jsx(Button, { size: "sm", variant: "link", children: "Open Graph" }) }),
|
|
73
|
-
/* @__PURE__ */ jsx(
|
|
74
|
-
Link,
|
|
75
|
-
{
|
|
76
|
-
href: "https://developer.x.com/en/docs/x-for-websites/cards/overview/abouts-cards",
|
|
77
|
-
target: NEW_TAB_TARGET,
|
|
78
|
-
rel: NEW_TAB_REL,
|
|
79
|
-
children: /* @__PURE__ */ jsx(Button, { size: "sm", variant: "link", children: "Twitter Card" })
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
] });
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export { ReferenceCard };
|