@nexload-sdk/payload-fields 1.0.4 → 1.0.5
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/date/date-cell.cjs +59 -2
- package/dist/date/date-cell.cjs.map +2 -2
- package/dist/date/date-cell.mjs +33 -2
- package/dist/date/date-cell.mjs.map +2 -2
- package/dist/date/date-picker.cjs +150 -3
- package/dist/date/date-picker.cjs.map +2 -2
- package/dist/date/date-picker.mjs +126 -3
- package/dist/date/date-picker.mjs.map +2 -2
- package/dist/index.cjs +170 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +149 -2
- package/dist/index.mjs.map +2 -2
- package/dist/slug/slug-field.cjs +230 -3
- package/dist/slug/slug-field.cjs.map +2 -2
- package/dist/slug/slug-field.mjs +212 -3
- package/dist/slug/slug-field.mjs.map +2 -2
- package/package.json +4 -4
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/slug/slug-field.tsx", "../../src/slug/format-slug.ts", "../../src/slug/index.scss"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable @stylistic/max-len */\n\"use client\";\nimport {\n useField,\n Button,\n TextInput,\n FieldLabel,\n useFormFields,\n useForm\n} from \"@payloadcms/ui\";\nimport { TextFieldClientProps } from \"payload\";\nimport React, { useCallback } from \"react\";\n\nimport { formatSlug } from \"./format-slug\";\nimport \"./index.scss\";\n\nconst HugeAiGenerator: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {\n return (\n <svg\n height={24}\n viewBox=\"0 0 24 24\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n >\n <path d=\"M11 20c-3.75 0-5.625 0-6.939-.955a5 5 0 0 1-1.106-1.106C2 16.625 2 14.749 2 11s0-5.625.955-6.939A5 5 0 0 1 4.06 2.955C5.375 2 7.251 2 11 2h.5c3.273 0 4.91 0 6.113.737a5 5 0 0 1 1.65 1.65C20 5.59 20 7.228 20 10.5m-2.593 3.904a.638.638 0 0 1 1.186 0l.037.093a5.1 5.1 0 0 0 2.873 2.873l.093.037a.638.638 0 0 1 0 1.186l-.093.037a5.1 5.1 0 0 0-2.873 2.873l-.037.093a.638.638 0 0 1-1.186 0l-.037-.093a5.1 5.1 0 0 0-2.873-2.873l-.093-.037a.638.638 0 0 1 0-1.186l.093-.037a5.1 5.1 0 0 0 2.873-2.873z\" />\n <path d=\"M11 7H7v1m4-1h4v1m-4-1v8m0 0h-1m1 0h1\" />\n </g>\n </svg>\n );\n};\nconst HugeUnlock: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {\n return (\n <svg\n height={24}\n viewBox=\"0 0 24 24\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g fill=\"none\" stroke=\"currentColor\" strokeWidth={1}>\n <path\n d=\"M4.268 18.845c.225 1.67 1.608 2.979 3.292 3.056c1.416.065 2.855.099 4.44.099s3.024-.034 4.44-.1c1.684-.076 3.067-1.385 3.292-3.055c.147-1.09.268-2.207.268-3.345s-.121-2.255-.268-3.345c-.225-1.67-1.608-2.979-3.292-3.056A95 95 0 0 0 12 9c-1.585 0-3.024.034-4.44.1c-1.684.076-3.067 1.385-3.292 3.055C4.12 13.245 4 14.362 4 15.5s.121 2.255.268 3.345Z\"\n strokeWidth={1.5}\n />\n <path\n d=\"M7.5 9V6.5A4.5 4.5 0 0 1 12 2c1.96 0 3.5 1.5 4 3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n />\n <path\n d=\"M11.996 15.5h.01\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={0.9}\n />\n </g>\n </svg>\n );\n};\nconst HugeLock: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {\n return (\n <svg\n height={24}\n viewBox=\"0 0 24 24\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g fill=\"none\" stroke=\"currentColor\" strokeWidth={1}>\n <path\n d=\"M4.268 18.845c.225 1.67 1.608 2.979 3.292 3.056c1.416.065 2.855.099 4.44.099s3.024-.034 4.44-.1c1.684-.076 3.067-1.385 3.292-3.055c.147-1.09.268-2.207.268-3.345s-.121-2.255-.268-3.345c-.225-1.67-1.608-2.979-3.292-3.056A95 95 0 0 0 12 9c-1.585 0-3.024.034-4.44.1c-1.684.076-3.067 1.385-3.292 3.055C4.12 13.245 4 14.362 4 15.5s.121 2.255.268 3.345Z\"\n strokeWidth={1.5}\n />\n <path\n d=\"M7.5 9V6.5a4.5 4.5 0 0 1 9 0V9\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n />\n <path\n d=\"M11.996 15.5h.01\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={0.9}\n />\n </g>\n </svg>\n );\n};\n\ntype SlugComponentProps = {\n fieldToUse: string\n checkboxFieldPath: string\n} & TextFieldClientProps;\n\nexport const SlugComponent: React.FC<SlugComponentProps> = ({\n field,\n fieldToUse,\n checkboxFieldPath: checkboxFieldPathFromProps,\n path,\n readOnly: readOnlyFromProps,\n}) => {\n const { label, } = field;\n\n const checkboxFieldPath = path?.includes(\".\")\n ? `${path}.${checkboxFieldPathFromProps}`\n : checkboxFieldPathFromProps;\n\n const { value, setValue, } = useField<string>({ path: path || field.name, });\n\n const { dispatchFields, getDataByPath, } = useForm();\n\n const isLocked = useFormFields(([fields]) => {\n return fields[checkboxFieldPath]?.value as string;\n });\n\n const handleGenerate = useCallback(\n (e: React.MouseEvent<Element>) => {\n e.preventDefault();\n\n const targetFieldValue = getDataByPath(fieldToUse) as string;\n\n if (targetFieldValue) {\n const formattedSlug = formatSlug(targetFieldValue);\n\n if (value !== formattedSlug) setValue(formattedSlug);\n } else {\n if (value !== \"\") setValue(\"\");\n }\n }, [\n setValue,\n value,\n fieldToUse,\n getDataByPath\n ]\n );\n\n const handleLock = useCallback(\n (e: React.MouseEvent<Element>) => {\n e.preventDefault();\n\n dispatchFields({\n type: \"UPDATE\",\n path: checkboxFieldPath,\n value: !isLocked,\n });\n }, [\n isLocked,\n checkboxFieldPath,\n dispatchFields\n ]\n );\n\n return (\n <div className=\"field-type slug-field-component\">\n <div className=\"label-wrapper\">\n <FieldLabel htmlFor={`field-${path}`} label={label} />\n {!isLocked && (\n <Button\n buttonStyle=\"none\"\n className=\"lock-button\"\n onClick={handleGenerate}\n >\n <HugeAiGenerator className=\"icon-button\" />\n </Button>\n )}\n <Button buttonStyle=\"none\" className=\"lock-button\" onClick={handleLock}>\n {isLocked\n ? (\n <HugeLock className=\"icon-button\" />\n )\n : (\n <HugeUnlock className=\"icon-button\" />\n )}\n </Button>\n </div>\n <TextInput\n onChange={setValue}\n path={path || field.name}\n readOnly={Boolean(readOnlyFromProps || isLocked)}\n value={value}\n />\n </div>\n );\n};\n", "import type { FieldHook } from \"payload\";\n\nexport function formatSlug (val: string): string | undefined {\n const formatted = val\n ?.replace(\n / /g, \"-\"\n )\n .replace(\n /[^\\w-]+/g, \"\"\n )\n .toLowerCase();\n\n return formatted;\n}\n\nexport const formatSlugHook\n = (fallback: string): FieldHook => ({ data, operation, value, }) => {\n if (typeof value === \"string\") {\n return formatSlug(value);\n }\n\n if (operation === \"create\" || data?.slug === undefined) {\n const fallbackData = data?.[fallback];\n\n if (typeof fallbackData === \"string\") {\n return formatSlug(fallbackData);\n }\n }\n\n return value;\n };\n", "const css = `.slug-field-component .label-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: calc(var(--base) / 2);\n}\n.slug-field-component .lock-button {\n margin: 0;\n padding-bottom: 0.3125rem;\n}\n.slug-field-component .icon-button {\n width: 1.5rem;\n height: 1.5rem;\n}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL1VzZXJzL21tMjV6YW1hbmlhbi9Db2Rlcy9uZXhsb2FkLXNkay9wYWNrYWdlcy9wYXlsb2FkLWZpZWxkcy9zcmMvc2x1ZyIsInNvdXJjZXMiOlsiaW5kZXguc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFO0VBQ0E7RUFDQTtFQUNBOztBQUdGO0VBQ0U7RUFDQTs7QUFHRjtFQUNFO0VBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyIuc2x1Zy1maWVsZC1jb21wb25lbnQge1xuICAubGFiZWwtd3JhcHBlciB7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICBnYXA6IGNhbGModmFyKC0tYmFzZSkgLyAyKTtcbiAgfVxuXG4gIC5sb2NrLWJ1dHRvbiB7XG4gICAgbWFyZ2luOiAwO1xuICAgIHBhZGRpbmctYm90dG9tOiAwLjMxMjVyZW07XG4gIH1cblxuICAuaWNvbi1idXR0b257XG4gICAgd2lkdGg6IDEuNXJlbTtcbiAgICBoZWlnaHQ6IDEuNXJlbTtcbiAgfVxufVxuIl19 */`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\n"],
|
|
5
|
-
"mappings": ";
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,gBAOO;AAEP,mBAAmC;;;ACT5B,SAAS,WAAY,KAAiC;AAC3D,QAAM,YAAY,2BACd;AAAA,IACA;AAAA,IAAM;AAAA,IAEP;AAAA,IACC;AAAA,IAAY;AAAA,IAEb;AAEH,SAAO;AACT;;;ACbA,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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eAAe;AAEjB,qBAAe;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,OAAO,CAAC;AAAA,MACV,CAAC;AAAA,IACH;AAAA,IAAG;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SACE,6CAAC,SAAI,WAAU,mCACb;AAAA,iDAAC,SAAI,WAAU,iBACb;AAAA,kDAAC,wBAAW,SAAS,SAAS,IAAI,IAAI,OAAc;AAAA,MACnD,CAAC,YACA;AAAA,QAAC;AAAA;AAAA,UACC,aAAY;AAAA,UACZ,WAAU;AAAA,UACV,SAAS;AAAA,UAET,sDAAC,mBAAgB,WAAU,eAAc;AAAA;AAAA,MAC3C;AAAA,MAEF,4CAAC,oBAAO,aAAY,QAAO,WAAU,eAAc,SAAS,YACzD,qBAEG,4CAAC,YAAS,WAAU,eAAc,IAGlC,4CAAC,cAAW,WAAU,eAAc,GAE1C;AAAA,OACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,MAAM,QAAQ,MAAM;AAAA,QACpB,UAAU,QAAQ,qBAAqB,QAAQ;AAAA,QAC/C;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/slug/slug-field.mjs
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
|
-
// @nexload-sdk/payload-fields v1.0.4 (build 2025-
|
|
2
|
-
"use client";
|
|
1
|
+
// @nexload-sdk/payload-fields v1.0.4 (build 2025-12-16T12:33:20.955Z)
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
// src/slug/slug-field.tsx
|
|
5
|
+
import {
|
|
6
|
+
useField,
|
|
7
|
+
Button,
|
|
8
|
+
TextInput,
|
|
9
|
+
FieldLabel,
|
|
10
|
+
useFormFields,
|
|
11
|
+
useForm
|
|
12
|
+
} from "@payloadcms/ui";
|
|
13
|
+
import { useCallback } from "react";
|
|
14
|
+
|
|
15
|
+
// src/slug/format-slug.ts
|
|
16
|
+
function formatSlug(val) {
|
|
17
|
+
const formatted = val?.replace(
|
|
18
|
+
/ /g,
|
|
19
|
+
"-"
|
|
20
|
+
).replace(
|
|
21
|
+
/[^\w-]+/g,
|
|
22
|
+
""
|
|
23
|
+
).toLowerCase();
|
|
24
|
+
return formatted;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// src/slug/index.scss
|
|
28
|
+
var css = `.slug-field-component .label-wrapper {
|
|
3
29
|
display: flex;
|
|
4
30
|
justify-content: space-between;
|
|
5
31
|
align-items: center;
|
|
@@ -13,5 +39,188 @@
|
|
|
13
39
|
width: 1.5rem;
|
|
14
40
|
height: 1.5rem;
|
|
15
41
|
}
|
|
16
|
-
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL1VzZXJzL21tMjV6YW1hbmlhbi9Db2Rlcy9uZXhsb2FkLXNkay9wYWNrYWdlcy9wYXlsb2FkLWZpZWxkcy9zcmMvc2x1ZyIsInNvdXJjZXMiOlsiaW5kZXguc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFO0VBQ0E7RUFDQTtFQUNBOztBQUdGO0VBQ0U7RUFDQTs7QUFHRjtFQUNFO0VBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyIuc2x1Zy1maWVsZC1jb21wb25lbnQge1xuICAubGFiZWwtd3JhcHBlciB7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICBnYXA6IGNhbGModmFyKC0tYmFzZSkgLyAyKTtcbiAgfVxuXG4gIC5sb2NrLWJ1dHRvbiB7XG4gICAgbWFyZ2luOiAwO1xuICAgIHBhZGRpbmctYm90dG9tOiAwLjMxMjVyZW07XG4gIH1cblxuICAuaWNvbi1idXR0b257XG4gICAgd2lkdGg6IDEuNXJlbTtcbiAgICBoZWlnaHQ6IDEuNXJlbTtcbiAgfVxufVxuIl19 */`;
|
|
42
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL1VzZXJzL21tMjV6YW1hbmlhbi9Db2Rlcy9uZXhsb2FkLXNkay9wYWNrYWdlcy9wYXlsb2FkLWZpZWxkcy9zcmMvc2x1ZyIsInNvdXJjZXMiOlsiaW5kZXguc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFO0VBQ0E7RUFDQTtFQUNBOztBQUdGO0VBQ0U7RUFDQTs7QUFHRjtFQUNFO0VBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyIuc2x1Zy1maWVsZC1jb21wb25lbnQge1xuICAubGFiZWwtd3JhcHBlciB7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICBnYXA6IGNhbGModmFyKC0tYmFzZSkgLyAyKTtcbiAgfVxuXG4gIC5sb2NrLWJ1dHRvbiB7XG4gICAgbWFyZ2luOiAwO1xuICAgIHBhZGRpbmctYm90dG9tOiAwLjMxMjVyZW07XG4gIH1cblxuICAuaWNvbi1idXR0b257XG4gICAgd2lkdGg6IDEuNXJlbTtcbiAgICBoZWlnaHQ6IDEuNXJlbTtcbiAgfVxufVxuIl19 */`;
|
|
43
|
+
document.head.appendChild(document.createElement("style")).appendChild(document.createTextNode(css));
|
|
44
|
+
|
|
45
|
+
// src/slug/slug-field.tsx
|
|
46
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
47
|
+
var HugeAiGenerator = (props) => {
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
"svg",
|
|
50
|
+
{
|
|
51
|
+
height: 24,
|
|
52
|
+
viewBox: "0 0 24 24",
|
|
53
|
+
width: 24,
|
|
54
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
55
|
+
...props,
|
|
56
|
+
children: /* @__PURE__ */ jsxs(
|
|
57
|
+
"g",
|
|
58
|
+
{
|
|
59
|
+
fill: "none",
|
|
60
|
+
stroke: "currentColor",
|
|
61
|
+
strokeLinecap: "round",
|
|
62
|
+
strokeLinejoin: "round",
|
|
63
|
+
strokeWidth: 1.5,
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsx("path", { d: "M11 20c-3.75 0-5.625 0-6.939-.955a5 5 0 0 1-1.106-1.106C2 16.625 2 14.749 2 11s0-5.625.955-6.939A5 5 0 0 1 4.06 2.955C5.375 2 7.251 2 11 2h.5c3.273 0 4.91 0 6.113.737a5 5 0 0 1 1.65 1.65C20 5.59 20 7.228 20 10.5m-2.593 3.904a.638.638 0 0 1 1.186 0l.037.093a5.1 5.1 0 0 0 2.873 2.873l.093.037a.638.638 0 0 1 0 1.186l-.093.037a5.1 5.1 0 0 0-2.873 2.873l-.037.093a.638.638 0 0 1-1.186 0l-.037-.093a5.1 5.1 0 0 0-2.873-2.873l-.093-.037a.638.638 0 0 1 0-1.186l.093-.037a5.1 5.1 0 0 0 2.873-2.873z" }),
|
|
66
|
+
/* @__PURE__ */ jsx("path", { d: "M11 7H7v1m4-1h4v1m-4-1v8m0 0h-1m1 0h1" })
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
var HugeUnlock = (props) => {
|
|
74
|
+
return /* @__PURE__ */ jsx(
|
|
75
|
+
"svg",
|
|
76
|
+
{
|
|
77
|
+
height: 24,
|
|
78
|
+
viewBox: "0 0 24 24",
|
|
79
|
+
width: 24,
|
|
80
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
81
|
+
...props,
|
|
82
|
+
children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: 1, children: [
|
|
83
|
+
/* @__PURE__ */ jsx(
|
|
84
|
+
"path",
|
|
85
|
+
{
|
|
86
|
+
d: "M4.268 18.845c.225 1.67 1.608 2.979 3.292 3.056c1.416.065 2.855.099 4.44.099s3.024-.034 4.44-.1c1.684-.076 3.067-1.385 3.292-3.055c.147-1.09.268-2.207.268-3.345s-.121-2.255-.268-3.345c-.225-1.67-1.608-2.979-3.292-3.056A95 95 0 0 0 12 9c-1.585 0-3.024.034-4.44.1c-1.684.076-3.067 1.385-3.292 3.055C4.12 13.245 4 14.362 4 15.5s.121 2.255.268 3.345Z",
|
|
87
|
+
strokeWidth: 1.5
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ jsx(
|
|
91
|
+
"path",
|
|
92
|
+
{
|
|
93
|
+
d: "M7.5 9V6.5A4.5 4.5 0 0 1 12 2c1.96 0 3.5 1.5 4 3",
|
|
94
|
+
strokeLinecap: "round",
|
|
95
|
+
strokeLinejoin: "round",
|
|
96
|
+
strokeWidth: 1.5
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ jsx(
|
|
100
|
+
"path",
|
|
101
|
+
{
|
|
102
|
+
d: "M11.996 15.5h.01",
|
|
103
|
+
strokeLinecap: "round",
|
|
104
|
+
strokeLinejoin: "round",
|
|
105
|
+
strokeWidth: 0.9
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] })
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
var HugeLock = (props) => {
|
|
113
|
+
return /* @__PURE__ */ jsx(
|
|
114
|
+
"svg",
|
|
115
|
+
{
|
|
116
|
+
height: 24,
|
|
117
|
+
viewBox: "0 0 24 24",
|
|
118
|
+
width: 24,
|
|
119
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
120
|
+
...props,
|
|
121
|
+
children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: 1, children: [
|
|
122
|
+
/* @__PURE__ */ jsx(
|
|
123
|
+
"path",
|
|
124
|
+
{
|
|
125
|
+
d: "M4.268 18.845c.225 1.67 1.608 2.979 3.292 3.056c1.416.065 2.855.099 4.44.099s3.024-.034 4.44-.1c1.684-.076 3.067-1.385 3.292-3.055c.147-1.09.268-2.207.268-3.345s-.121-2.255-.268-3.345c-.225-1.67-1.608-2.979-3.292-3.056A95 95 0 0 0 12 9c-1.585 0-3.024.034-4.44.1c-1.684.076-3.067 1.385-3.292 3.055C4.12 13.245 4 14.362 4 15.5s.121 2.255.268 3.345Z",
|
|
126
|
+
strokeWidth: 1.5
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
/* @__PURE__ */ jsx(
|
|
130
|
+
"path",
|
|
131
|
+
{
|
|
132
|
+
d: "M7.5 9V6.5a4.5 4.5 0 0 1 9 0V9",
|
|
133
|
+
strokeLinecap: "round",
|
|
134
|
+
strokeLinejoin: "round",
|
|
135
|
+
strokeWidth: 1.5
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ jsx(
|
|
139
|
+
"path",
|
|
140
|
+
{
|
|
141
|
+
d: "M11.996 15.5h.01",
|
|
142
|
+
strokeLinecap: "round",
|
|
143
|
+
strokeLinejoin: "round",
|
|
144
|
+
strokeWidth: 0.9
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
] })
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
var SlugComponent = ({
|
|
152
|
+
field,
|
|
153
|
+
fieldToUse,
|
|
154
|
+
checkboxFieldPath: checkboxFieldPathFromProps,
|
|
155
|
+
path,
|
|
156
|
+
readOnly: readOnlyFromProps
|
|
157
|
+
}) => {
|
|
158
|
+
const { label } = field;
|
|
159
|
+
const checkboxFieldPath = path?.includes(".") ? `${path}.${checkboxFieldPathFromProps}` : checkboxFieldPathFromProps;
|
|
160
|
+
const { value, setValue } = useField({ path: path || field.name });
|
|
161
|
+
const { dispatchFields, getDataByPath } = useForm();
|
|
162
|
+
const isLocked = useFormFields(([fields]) => {
|
|
163
|
+
return fields[checkboxFieldPath]?.value;
|
|
164
|
+
});
|
|
165
|
+
const handleGenerate = useCallback(
|
|
166
|
+
(e) => {
|
|
167
|
+
e.preventDefault();
|
|
168
|
+
const targetFieldValue = getDataByPath(fieldToUse);
|
|
169
|
+
if (targetFieldValue) {
|
|
170
|
+
const formattedSlug = formatSlug(targetFieldValue);
|
|
171
|
+
if (value !== formattedSlug) setValue(formattedSlug);
|
|
172
|
+
} else {
|
|
173
|
+
if (value !== "") setValue("");
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
[
|
|
177
|
+
setValue,
|
|
178
|
+
value,
|
|
179
|
+
fieldToUse,
|
|
180
|
+
getDataByPath
|
|
181
|
+
]
|
|
182
|
+
);
|
|
183
|
+
const handleLock = useCallback(
|
|
184
|
+
(e) => {
|
|
185
|
+
e.preventDefault();
|
|
186
|
+
dispatchFields({
|
|
187
|
+
type: "UPDATE",
|
|
188
|
+
path: checkboxFieldPath,
|
|
189
|
+
value: !isLocked
|
|
190
|
+
});
|
|
191
|
+
},
|
|
192
|
+
[
|
|
193
|
+
isLocked,
|
|
194
|
+
checkboxFieldPath,
|
|
195
|
+
dispatchFields
|
|
196
|
+
]
|
|
197
|
+
);
|
|
198
|
+
return /* @__PURE__ */ jsxs("div", { className: "field-type slug-field-component", children: [
|
|
199
|
+
/* @__PURE__ */ jsxs("div", { className: "label-wrapper", children: [
|
|
200
|
+
/* @__PURE__ */ jsx(FieldLabel, { htmlFor: `field-${path}`, label }),
|
|
201
|
+
!isLocked && /* @__PURE__ */ jsx(
|
|
202
|
+
Button,
|
|
203
|
+
{
|
|
204
|
+
buttonStyle: "none",
|
|
205
|
+
className: "lock-button",
|
|
206
|
+
onClick: handleGenerate,
|
|
207
|
+
children: /* @__PURE__ */ jsx(HugeAiGenerator, { className: "icon-button" })
|
|
208
|
+
}
|
|
209
|
+
),
|
|
210
|
+
/* @__PURE__ */ jsx(Button, { buttonStyle: "none", className: "lock-button", onClick: handleLock, children: isLocked ? /* @__PURE__ */ jsx(HugeLock, { className: "icon-button" }) : /* @__PURE__ */ jsx(HugeUnlock, { className: "icon-button" }) })
|
|
211
|
+
] }),
|
|
212
|
+
/* @__PURE__ */ jsx(
|
|
213
|
+
TextInput,
|
|
214
|
+
{
|
|
215
|
+
onChange: setValue,
|
|
216
|
+
path: path || field.name,
|
|
217
|
+
readOnly: Boolean(readOnlyFromProps || isLocked),
|
|
218
|
+
value
|
|
219
|
+
}
|
|
220
|
+
)
|
|
221
|
+
] });
|
|
222
|
+
};
|
|
223
|
+
export {
|
|
224
|
+
SlugComponent
|
|
225
|
+
};
|
|
17
226
|
//# sourceMappingURL=slug-field.mjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/slug/slug-field.tsx", "../../src/slug/format-slug.ts", "../../src/slug/index.scss"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable @stylistic/max-len */\n\"use client\";\nimport {\n useField,\n Button,\n TextInput,\n FieldLabel,\n useFormFields,\n useForm\n} from \"@payloadcms/ui\";\nimport { TextFieldClientProps } from \"payload\";\nimport React, { useCallback } from \"react\";\n\nimport { formatSlug } from \"./format-slug\";\nimport \"./index.scss\";\n\nconst HugeAiGenerator: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {\n return (\n <svg\n height={24}\n viewBox=\"0 0 24 24\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n >\n <path d=\"M11 20c-3.75 0-5.625 0-6.939-.955a5 5 0 0 1-1.106-1.106C2 16.625 2 14.749 2 11s0-5.625.955-6.939A5 5 0 0 1 4.06 2.955C5.375 2 7.251 2 11 2h.5c3.273 0 4.91 0 6.113.737a5 5 0 0 1 1.65 1.65C20 5.59 20 7.228 20 10.5m-2.593 3.904a.638.638 0 0 1 1.186 0l.037.093a5.1 5.1 0 0 0 2.873 2.873l.093.037a.638.638 0 0 1 0 1.186l-.093.037a5.1 5.1 0 0 0-2.873 2.873l-.037.093a.638.638 0 0 1-1.186 0l-.037-.093a5.1 5.1 0 0 0-2.873-2.873l-.093-.037a.638.638 0 0 1 0-1.186l.093-.037a5.1 5.1 0 0 0 2.873-2.873z\" />\n <path d=\"M11 7H7v1m4-1h4v1m-4-1v8m0 0h-1m1 0h1\" />\n </g>\n </svg>\n );\n};\nconst HugeUnlock: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {\n return (\n <svg\n height={24}\n viewBox=\"0 0 24 24\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g fill=\"none\" stroke=\"currentColor\" strokeWidth={1}>\n <path\n d=\"M4.268 18.845c.225 1.67 1.608 2.979 3.292 3.056c1.416.065 2.855.099 4.44.099s3.024-.034 4.44-.1c1.684-.076 3.067-1.385 3.292-3.055c.147-1.09.268-2.207.268-3.345s-.121-2.255-.268-3.345c-.225-1.67-1.608-2.979-3.292-3.056A95 95 0 0 0 12 9c-1.585 0-3.024.034-4.44.1c-1.684.076-3.067 1.385-3.292 3.055C4.12 13.245 4 14.362 4 15.5s.121 2.255.268 3.345Z\"\n strokeWidth={1.5}\n />\n <path\n d=\"M7.5 9V6.5A4.5 4.5 0 0 1 12 2c1.96 0 3.5 1.5 4 3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n />\n <path\n d=\"M11.996 15.5h.01\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={0.9}\n />\n </g>\n </svg>\n );\n};\nconst HugeLock: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {\n return (\n <svg\n height={24}\n viewBox=\"0 0 24 24\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <g fill=\"none\" stroke=\"currentColor\" strokeWidth={1}>\n <path\n d=\"M4.268 18.845c.225 1.67 1.608 2.979 3.292 3.056c1.416.065 2.855.099 4.44.099s3.024-.034 4.44-.1c1.684-.076 3.067-1.385 3.292-3.055c.147-1.09.268-2.207.268-3.345s-.121-2.255-.268-3.345c-.225-1.67-1.608-2.979-3.292-3.056A95 95 0 0 0 12 9c-1.585 0-3.024.034-4.44.1c-1.684.076-3.067 1.385-3.292 3.055C4.12 13.245 4 14.362 4 15.5s.121 2.255.268 3.345Z\"\n strokeWidth={1.5}\n />\n <path\n d=\"M7.5 9V6.5a4.5 4.5 0 0 1 9 0V9\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n />\n <path\n d=\"M11.996 15.5h.01\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={0.9}\n />\n </g>\n </svg>\n );\n};\n\ntype SlugComponentProps = {\n fieldToUse: string\n checkboxFieldPath: string\n} & TextFieldClientProps;\n\nexport const SlugComponent: React.FC<SlugComponentProps> = ({\n field,\n fieldToUse,\n checkboxFieldPath: checkboxFieldPathFromProps,\n path,\n readOnly: readOnlyFromProps,\n}) => {\n const { label, } = field;\n\n const checkboxFieldPath = path?.includes(\".\")\n ? `${path}.${checkboxFieldPathFromProps}`\n : checkboxFieldPathFromProps;\n\n const { value, setValue, } = useField<string>({ path: path || field.name, });\n\n const { dispatchFields, getDataByPath, } = useForm();\n\n const isLocked = useFormFields(([fields]) => {\n return fields[checkboxFieldPath]?.value as string;\n });\n\n const handleGenerate = useCallback(\n (e: React.MouseEvent<Element>) => {\n e.preventDefault();\n\n const targetFieldValue = getDataByPath(fieldToUse) as string;\n\n if (targetFieldValue) {\n const formattedSlug = formatSlug(targetFieldValue);\n\n if (value !== formattedSlug) setValue(formattedSlug);\n } else {\n if (value !== \"\") setValue(\"\");\n }\n }, [\n setValue,\n value,\n fieldToUse,\n getDataByPath\n ]\n );\n\n const handleLock = useCallback(\n (e: React.MouseEvent<Element>) => {\n e.preventDefault();\n\n dispatchFields({\n type: \"UPDATE\",\n path: checkboxFieldPath,\n value: !isLocked,\n });\n }, [\n isLocked,\n checkboxFieldPath,\n dispatchFields\n ]\n );\n\n return (\n <div className=\"field-type slug-field-component\">\n <div className=\"label-wrapper\">\n <FieldLabel htmlFor={`field-${path}`} label={label} />\n {!isLocked && (\n <Button\n buttonStyle=\"none\"\n className=\"lock-button\"\n onClick={handleGenerate}\n >\n <HugeAiGenerator className=\"icon-button\" />\n </Button>\n )}\n <Button buttonStyle=\"none\" className=\"lock-button\" onClick={handleLock}>\n {isLocked\n ? (\n <HugeLock className=\"icon-button\" />\n )\n : (\n <HugeUnlock className=\"icon-button\" />\n )}\n </Button>\n </div>\n <TextInput\n onChange={setValue}\n path={path || field.name}\n readOnly={Boolean(readOnlyFromProps || isLocked)}\n value={value}\n />\n </div>\n );\n};\n", "import type { FieldHook } from \"payload\";\n\nexport function formatSlug (val: string): string | undefined {\n const formatted = val\n ?.replace(\n / /g, \"-\"\n )\n .replace(\n /[^\\w-]+/g, \"\"\n )\n .toLowerCase();\n\n return formatted;\n}\n\nexport const formatSlugHook\n = (fallback: string): FieldHook => ({ data, operation, value, }) => {\n if (typeof value === \"string\") {\n return formatSlug(value);\n }\n\n if (operation === \"create\" || data?.slug === undefined) {\n const fallbackData = data?.[fallback];\n\n if (typeof fallbackData === \"string\") {\n return formatSlug(fallbackData);\n }\n }\n\n return value;\n };\n", "const css = `.slug-field-component .label-wrapper {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: calc(var(--base) / 2);\n}\n.slug-field-component .lock-button {\n margin: 0;\n padding-bottom: 0.3125rem;\n}\n.slug-field-component .icon-button {\n width: 1.5rem;\n height: 1.5rem;\n}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL1VzZXJzL21tMjV6YW1hbmlhbi9Db2Rlcy9uZXhsb2FkLXNkay9wYWNrYWdlcy9wYXlsb2FkLWZpZWxkcy9zcmMvc2x1ZyIsInNvdXJjZXMiOlsiaW5kZXguc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFO0VBQ0E7RUFDQTtFQUNBOztBQUdGO0VBQ0U7RUFDQTs7QUFHRjtFQUNFO0VBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyIuc2x1Zy1maWVsZC1jb21wb25lbnQge1xuICAubGFiZWwtd3JhcHBlciB7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICBnYXA6IGNhbGModmFyKC0tYmFzZSkgLyAyKTtcbiAgfVxuXG4gIC5sb2NrLWJ1dHRvbiB7XG4gICAgbWFyZ2luOiAwO1xuICAgIHBhZGRpbmctYm90dG9tOiAwLjMxMjVyZW07XG4gIH1cblxuICAuaWNvbi1idXR0b257XG4gICAgd2lkdGg6IDEuNXJlbTtcbiAgICBoZWlnaHQ6IDEuNXJlbTtcbiAgfVxufVxuIl19 */`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\n"],
|
|
5
|
-
"mappings": ";
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAgB,mBAAmB;;;ACT5B,SAAS,WAAY,KAAiC;AAC3D,QAAM,YAAY,KACd;AAAA,IACA;AAAA,IAAM;AAAA,EACR,EACC;AAAA,IACC;AAAA,IAAY;AAAA,EACd,EACC,YAAY;AAEf,SAAO;AACT;;;ACbA,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeZ,SAAS,KACJ,YAAY,SAA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QACN,MAAM;AAAA,QACN,OAAO,CAAC;AAAA,MACV,CAAC;AAAA,IACH;AAAA,IAAG;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SACE,qBAAC,SAAI,WAAU,mCACb;AAAA,yBAAC,SAAI,WAAU,iBACb;AAAA,0BAAC,cAAW,SAAS,SAAS,IAAI,IAAI,OAAc;AAAA,MACnD,CAAC,YACA;AAAA,QAAC;AAAA;AAAA,UACC,aAAY;AAAA,UACZ,WAAU;AAAA,UACV,SAAS;AAAA,UAET,8BAAC,mBAAgB,WAAU,eAAc;AAAA;AAAA,MAC3C;AAAA,MAEF,oBAAC,UAAO,aAAY,QAAO,WAAU,eAAc,SAAS,YACzD,qBAEG,oBAAC,YAAS,WAAU,eAAc,IAGlC,oBAAC,cAAW,WAAU,eAAc,GAE1C;AAAA,OACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,MAAM,QAAQ,MAAM;AAAA,QACpB,UAAU,QAAQ,qBAAqB,QAAQ;AAAA,QAC/C;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexload-sdk/payload-fields",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"@types/react": "^19.2.7",
|
|
70
70
|
"eslint": "^9.39.1",
|
|
71
71
|
"typescript": "^5.4.5",
|
|
72
|
-
"@nexload-sdk/
|
|
73
|
-
"@nexload-sdk/
|
|
74
|
-
"@nexload-sdk/bundler": "3.
|
|
72
|
+
"@nexload-sdk/typescript-config": "3.0.1",
|
|
73
|
+
"@nexload-sdk/eslint-config": "3.0.3",
|
|
74
|
+
"@nexload-sdk/bundler": "3.1.1"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "node esbuild.config.mjs",
|