@strapi/plugin-color-picker 4.14.4 → 4.14.6
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/_chunks/ColorPickerInput-7f549d49.js +206 -0
- package/dist/_chunks/{ColorPickerInput-1e9c7a15.js.map → ColorPickerInput-7f549d49.js.map} +1 -1
- package/dist/_chunks/ColorPickerInput-fe0dae26.mjs +185 -0
- package/dist/_chunks/{ColorPickerInput-3335ebf5.mjs.map → ColorPickerInput-fe0dae26.mjs.map} +1 -1
- package/dist/_chunks/{cs-70e06424.mjs → cs-32e5b75a.mjs} +3 -3
- package/dist/_chunks/cs-32e5b75a.mjs.map +1 -0
- package/dist/_chunks/cs-c22467c6.js +16 -0
- package/dist/_chunks/cs-c22467c6.js.map +1 -0
- package/dist/_chunks/{en-096b1095.mjs → en-2230584b.mjs} +3 -3
- package/dist/_chunks/en-2230584b.mjs.map +1 -0
- package/dist/_chunks/en-eb6717ab.js +19 -0
- package/dist/_chunks/en-eb6717ab.js.map +1 -0
- package/dist/_chunks/index-335ecfc4.mjs +117 -0
- package/dist/_chunks/index-335ecfc4.mjs.map +1 -0
- package/dist/_chunks/index-d45bf186.js +118 -0
- package/dist/_chunks/index-d45bf186.js.map +1 -0
- package/dist/_chunks/{ru-05c0aa5b.mjs → ru-0bf57448.mjs} +3 -3
- package/dist/_chunks/ru-0bf57448.mjs.map +1 -0
- package/dist/_chunks/ru-1d1cf8a8.js +19 -0
- package/dist/_chunks/ru-1d1cf8a8.js.map +1 -0
- package/dist/_chunks/sv-6e7fa200.js +16 -0
- package/dist/_chunks/sv-6e7fa200.js.map +1 -0
- package/dist/_chunks/{sv-6ccbf5f0.mjs → sv-de6a785a.mjs} +3 -3
- package/dist/_chunks/sv-de6a785a.mjs.map +1 -0
- package/dist/_chunks/{tr-34587a44.mjs → tr-4d632eac.mjs} +3 -3
- package/dist/_chunks/tr-4d632eac.mjs.map +1 -0
- package/dist/_chunks/tr-67b6e192.js +16 -0
- package/dist/_chunks/tr-67b6e192.js.map +1 -0
- package/dist/_chunks/{zh-667ba169.mjs → zh-5ba3e025.mjs} +3 -3
- package/dist/_chunks/zh-5ba3e025.mjs.map +1 -0
- package/dist/_chunks/zh-e5010f8b.js +16 -0
- package/dist/_chunks/zh-e5010f8b.js.map +1 -0
- package/dist/admin/index.js +8 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +3 -3
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +12 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +6 -5
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/register.d.ts +1 -0
- package/dist/server/register.d.ts.map +1 -0
- package/package.json +18 -18
- package/dist/_chunks/ColorPickerInput-1e9c7a15.js +0 -47
- package/dist/_chunks/ColorPickerInput-3335ebf5.mjs +0 -168
- package/dist/_chunks/cs-67f98136.js +0 -2
- package/dist/_chunks/cs-67f98136.js.map +0 -1
- package/dist/_chunks/cs-70e06424.mjs.map +0 -1
- package/dist/_chunks/en-096b1095.mjs.map +0 -1
- package/dist/_chunks/en-32ea9fdb.js +0 -2
- package/dist/_chunks/en-32ea9fdb.js.map +0 -1
- package/dist/_chunks/index-3cecbc68.js +0 -37
- package/dist/_chunks/index-3cecbc68.js.map +0 -1
- package/dist/_chunks/index-e75c6fdb.mjs +0 -730
- package/dist/_chunks/index-e75c6fdb.mjs.map +0 -1
- package/dist/_chunks/ru-05c0aa5b.mjs.map +0 -1
- package/dist/_chunks/ru-c5a712be.js +0 -2
- package/dist/_chunks/ru-c5a712be.js.map +0 -1
- package/dist/_chunks/sv-6ccbf5f0.mjs.map +0 -1
- package/dist/_chunks/sv-e4ea8db8.js +0 -2
- package/dist/_chunks/sv-e4ea8db8.js.map +0 -1
- package/dist/_chunks/tr-34587a44.mjs.map +0 -1
- package/dist/_chunks/tr-fb5cfb93.js +0 -2
- package/dist/_chunks/tr-fb5cfb93.js.map +0 -1
- package/dist/_chunks/zh-667ba169.mjs.map +0 -1
- package/dist/_chunks/zh-b25c84c2.js +0 -2
- package/dist/_chunks/zh-b25c84c2.js.map +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { prefixPluginTranslations } from "@strapi/helper-plugin";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Flex, Icon } from "@strapi/design-system";
|
|
4
|
+
import { Paint } from "@strapi/icons";
|
|
5
|
+
import styled from "styled-components";
|
|
6
|
+
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
7
|
+
const v = glob[path];
|
|
8
|
+
if (v) {
|
|
9
|
+
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
10
|
+
}
|
|
11
|
+
return new Promise((_, reject) => {
|
|
12
|
+
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
const IconBox = styled(Flex)`
|
|
16
|
+
/* Hard code color values */
|
|
17
|
+
/* to stay consistent between themes */
|
|
18
|
+
background-color: #f0f0ff; /* primary100 */
|
|
19
|
+
border: 1px solid #d9d8ff; /* primary200 */
|
|
20
|
+
|
|
21
|
+
svg > path {
|
|
22
|
+
fill: #4945ff; /* primary600 */
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
const ColorPickerIcon = () => {
|
|
26
|
+
return /* @__PURE__ */ jsx(IconBox, { justifyContent: "center", alignItems: "center", width: 7, height: 6, hasRadius: true, "aria-hidden": true, children: /* @__PURE__ */ jsx(Icon, { as: Paint }) });
|
|
27
|
+
};
|
|
28
|
+
const pluginId = "color-picker";
|
|
29
|
+
const getTrad = (id) => `${pluginId}.${id}`;
|
|
30
|
+
const index = {
|
|
31
|
+
/**
|
|
32
|
+
* TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.
|
|
33
|
+
*/
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
|
+
register(app) {
|
|
36
|
+
app.customFields.register({
|
|
37
|
+
name: "color",
|
|
38
|
+
pluginId: "color-picker",
|
|
39
|
+
type: "string",
|
|
40
|
+
icon: ColorPickerIcon,
|
|
41
|
+
intlLabel: {
|
|
42
|
+
id: getTrad("color-picker.label"),
|
|
43
|
+
defaultMessage: "Color"
|
|
44
|
+
},
|
|
45
|
+
intlDescription: {
|
|
46
|
+
id: getTrad("color-picker.description"),
|
|
47
|
+
defaultMessage: "Select any color"
|
|
48
|
+
},
|
|
49
|
+
components: {
|
|
50
|
+
Input: async () => import(
|
|
51
|
+
/* webpackChunkName: "color-picker-input-component" */
|
|
52
|
+
"./ColorPickerInput-fe0dae26.mjs"
|
|
53
|
+
).then((module) => ({ default: module.ColorPickerInput }))
|
|
54
|
+
},
|
|
55
|
+
options: {
|
|
56
|
+
advanced: [
|
|
57
|
+
{
|
|
58
|
+
intlLabel: {
|
|
59
|
+
id: getTrad("color-picker.options.advanced.regex"),
|
|
60
|
+
defaultMessage: "RegExp pattern"
|
|
61
|
+
},
|
|
62
|
+
name: "regex",
|
|
63
|
+
type: "text",
|
|
64
|
+
defaultValue: "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$",
|
|
65
|
+
description: {
|
|
66
|
+
id: getTrad("color-picker.options.advanced.regex.description"),
|
|
67
|
+
defaultMessage: "The text of the regular expression"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
sectionTitle: {
|
|
72
|
+
id: "global.settings",
|
|
73
|
+
defaultMessage: "Settings"
|
|
74
|
+
},
|
|
75
|
+
items: [
|
|
76
|
+
{
|
|
77
|
+
name: "required",
|
|
78
|
+
type: "checkbox",
|
|
79
|
+
intlLabel: {
|
|
80
|
+
id: getTrad("color-picker.options.advanced.requiredField"),
|
|
81
|
+
defaultMessage: "Required field"
|
|
82
|
+
},
|
|
83
|
+
description: {
|
|
84
|
+
id: getTrad("color-picker.options.advanced.requiredField.description"),
|
|
85
|
+
defaultMessage: "You won't be able to create an entry if this field is empty"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
async registerTrads({ locales }) {
|
|
95
|
+
const importedTrads = await Promise.all(
|
|
96
|
+
locales.map((locale) => {
|
|
97
|
+
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/cs.json": () => import("./cs-32e5b75a.mjs"), "./translations/en.json": () => import("./en-2230584b.mjs"), "./translations/ru.json": () => import("./ru-0bf57448.mjs"), "./translations/sv.json": () => import("./sv-de6a785a.mjs"), "./translations/tr.json": () => import("./tr-4d632eac.mjs"), "./translations/zh.json": () => import("./zh-5ba3e025.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
|
|
98
|
+
return {
|
|
99
|
+
data: prefixPluginTranslations(data, pluginId),
|
|
100
|
+
locale
|
|
101
|
+
};
|
|
102
|
+
}).catch(() => {
|
|
103
|
+
return {
|
|
104
|
+
data: {},
|
|
105
|
+
locale
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
})
|
|
109
|
+
);
|
|
110
|
+
return Promise.resolve(importedTrads);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
export {
|
|
114
|
+
getTrad as g,
|
|
115
|
+
index as i
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=index-335ecfc4.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-335ecfc4.mjs","sources":["../../admin/src/components/ColorPickerIcon.tsx","../../admin/src/pluginId.ts","../../admin/src/utils/getTrad.ts","../../admin/src/index.ts"],"sourcesContent":["import { Flex, Icon } from '@strapi/design-system';\nimport { Paint } from '@strapi/icons';\nimport styled from 'styled-components';\n\nconst IconBox = styled(Flex)`\n /* Hard code color values */\n /* to stay consistent between themes */\n background-color: #f0f0ff; /* primary100 */\n border: 1px solid #d9d8ff; /* primary200 */\n\n svg > path {\n fill: #4945ff; /* primary600 */\n }\n`;\n\nexport const ColorPickerIcon = () => {\n return (\n <IconBox justifyContent=\"center\" alignItems=\"center\" width={7} height={6} hasRadius aria-hidden>\n <Icon as={Paint} />\n </IconBox>\n );\n};\n","export const pluginId = 'color-picker';\n","import { pluginId } from '../pluginId';\n\nexport const getTrad = (id: string) => `${pluginId}.${id}`;\n","import { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport { ColorPickerIcon } from './components/ColorPickerIcon';\nimport { pluginId } from './pluginId';\nimport { getTrad } from './utils/getTrad';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n /**\n * TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register(app: any) {\n app.customFields.register({\n name: 'color',\n pluginId: 'color-picker',\n type: 'string',\n icon: ColorPickerIcon,\n intlLabel: {\n id: getTrad('color-picker.label'),\n defaultMessage: 'Color',\n },\n intlDescription: {\n id: getTrad('color-picker.description'),\n defaultMessage: 'Select any color',\n },\n components: {\n Input: async () =>\n import(\n /* webpackChunkName: \"color-picker-input-component\" */ './components/ColorPickerInput'\n ).then((module) => ({ default: module.ColorPickerInput })),\n },\n options: {\n advanced: [\n {\n intlLabel: {\n id: getTrad('color-picker.options.advanced.regex'),\n defaultMessage: 'RegExp pattern',\n },\n name: 'regex',\n type: 'text',\n defaultValue: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$',\n description: {\n id: getTrad('color-picker.options.advanced.regex.description'),\n defaultMessage: 'The text of the regular expression',\n },\n },\n {\n sectionTitle: {\n id: 'global.settings',\n defaultMessage: 'Settings',\n },\n items: [\n {\n name: 'required',\n type: 'checkbox',\n intlLabel: {\n id: getTrad('color-picker.options.advanced.requiredField'),\n defaultMessage: 'Required field',\n },\n description: {\n id: getTrad('color-picker.options.advanced.requiredField.description'),\n defaultMessage: \"You won't be able to create an entry if this field is empty\",\n },\n },\n ],\n },\n ],\n },\n });\n },\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,MAAM,UAAU,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWpB,MAAM,kBAAkB,MAAM;AACnC,6BACG,SAAQ,EAAA,gBAAe,UAAS,YAAW,UAAS,OAAO,GAAG,QAAQ,GAAG,WAAS,MAAC,eAAW,MAC7F,8BAAC,MAAK,EAAA,IAAI,OAAO,EACnB,CAAA;AAEJ;ACrBO,MAAM,WAAW;ACEjB,MAAM,UAAU,CAAC,OAAe,GAAG,QAAQ,IAAI,EAAE;ACKxD,MAAe,QAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKb,SAAS,KAAU;AACjB,QAAI,aAAa,SAAS;AAAA,MACxB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,MAAM;AAAA,MACN,MAAM;AAAA,MACN,WAAW;AAAA,QACT,IAAI,QAAQ,oBAAoB;AAAA,QAChC,gBAAgB;AAAA,MAClB;AAAA,MACA,iBAAiB;AAAA,QACf,IAAI,QAAQ,0BAA0B;AAAA,QACtC,gBAAgB;AAAA,MAClB;AAAA,MACA,YAAY;AAAA,QACV,OAAO,YACL;AAAA;AAAA,UACyD;AAAA,QAAA,EACvD,KAAK,CAAC,YAAY,EAAE,SAAS,OAAO,mBAAmB;AAAA,MAC7D;AAAA,MACA,SAAS;AAAA,QACP,UAAU;AAAA,UACR;AAAA,YACE,WAAW;AAAA,cACT,IAAI,QAAQ,qCAAqC;AAAA,cACjD,gBAAgB;AAAA,YAClB;AAAA,YACA,MAAM;AAAA,YACN,MAAM;AAAA,YACN,cAAc;AAAA,YACd,aAAa;AAAA,cACX,IAAI,QAAQ,iDAAiD;AAAA,cAC7D,gBAAgB;AAAA,YAClB;AAAA,UACF;AAAA,UACA;AAAA,YACE,cAAc;AAAA,cACZ,IAAI;AAAA,cACJ,gBAAgB;AAAA,YAClB;AAAA,YACA,OAAO;AAAA,cACL;AAAA,gBACE,MAAM;AAAA,gBACN,MAAM;AAAA,gBACN,WAAW;AAAA,kBACT,IAAI,QAAQ,6CAA6C;AAAA,kBACzD,gBAAgB;AAAA,gBAClB;AAAA,gBACA,aAAa;AAAA,kBACX,IAAI,QAAQ,yDAAyD;AAAA,kBACrE,gBAAgB;AAAA,gBAClB;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,MAAM,cAAc,EAAE,WAAkC;AAChD,UAAA,gBAAgB,MAAM,QAAQ;AAAA,MAClC,QAAQ,IAAI,CAAC,WAAW;AACf,eAAA,qCAA+B,uBAAA,OAAA,EAAA,0BAAA,MAAA,OAAA,mBAAA,GAAA,0BAAA,MAAA,OAAA,mBAAA,GAAA,0BAAA,MAAA,OAAA,mBAAA,GAAA,0BAAA,MAAA,OAAA,mBAAA,GAAA,0BAAA,MAAA,OAAA,mBAAA,GAAA,0BAAA,MAAA,OAAA,mBAAA,EAAA,CAAA,GAAA,kBAAA,MAAA,OAAA,EACnC,KAAK,CAAC,EAAE,SAAS,WAAW;AACpB,iBAAA;AAAA,YACL,MAAM,yBAAyB,MAAM,QAAQ;AAAA,YAC7C;AAAA,UAAA;AAAA,QACF,CACD,EACA,MAAM,MAAM;AACJ,iBAAA;AAAA,YACL,MAAM,CAAC;AAAA,YACP;AAAA,UAAA;AAAA,QACF,CACD;AAAA,MAAA,CACJ;AAAA,IAAA;AAGI,WAAA,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const helperPlugin = require("@strapi/helper-plugin");
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const designSystem = require("@strapi/design-system");
|
|
5
|
+
const icons = require("@strapi/icons");
|
|
6
|
+
const styled = require("styled-components");
|
|
7
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
8
|
+
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
9
|
+
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
10
|
+
const v = glob[path];
|
|
11
|
+
if (v) {
|
|
12
|
+
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
13
|
+
}
|
|
14
|
+
return new Promise((_, reject) => {
|
|
15
|
+
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const IconBox = styled__default.default(designSystem.Flex)`
|
|
19
|
+
/* Hard code color values */
|
|
20
|
+
/* to stay consistent between themes */
|
|
21
|
+
background-color: #f0f0ff; /* primary100 */
|
|
22
|
+
border: 1px solid #d9d8ff; /* primary200 */
|
|
23
|
+
|
|
24
|
+
svg > path {
|
|
25
|
+
fill: #4945ff; /* primary600 */
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
const ColorPickerIcon = () => {
|
|
29
|
+
return /* @__PURE__ */ jsxRuntime.jsx(IconBox, { justifyContent: "center", alignItems: "center", width: 7, height: 6, hasRadius: true, "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Icon, { as: icons.Paint }) });
|
|
30
|
+
};
|
|
31
|
+
const pluginId = "color-picker";
|
|
32
|
+
const getTrad = (id) => `${pluginId}.${id}`;
|
|
33
|
+
const index = {
|
|
34
|
+
/**
|
|
35
|
+
* TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.
|
|
36
|
+
*/
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
|
+
register(app) {
|
|
39
|
+
app.customFields.register({
|
|
40
|
+
name: "color",
|
|
41
|
+
pluginId: "color-picker",
|
|
42
|
+
type: "string",
|
|
43
|
+
icon: ColorPickerIcon,
|
|
44
|
+
intlLabel: {
|
|
45
|
+
id: getTrad("color-picker.label"),
|
|
46
|
+
defaultMessage: "Color"
|
|
47
|
+
},
|
|
48
|
+
intlDescription: {
|
|
49
|
+
id: getTrad("color-picker.description"),
|
|
50
|
+
defaultMessage: "Select any color"
|
|
51
|
+
},
|
|
52
|
+
components: {
|
|
53
|
+
Input: async () => Promise.resolve().then(() => require(
|
|
54
|
+
/* webpackChunkName: "color-picker-input-component" */
|
|
55
|
+
"./ColorPickerInput-7f549d49.js"
|
|
56
|
+
)).then((module2) => ({ default: module2.ColorPickerInput }))
|
|
57
|
+
},
|
|
58
|
+
options: {
|
|
59
|
+
advanced: [
|
|
60
|
+
{
|
|
61
|
+
intlLabel: {
|
|
62
|
+
id: getTrad("color-picker.options.advanced.regex"),
|
|
63
|
+
defaultMessage: "RegExp pattern"
|
|
64
|
+
},
|
|
65
|
+
name: "regex",
|
|
66
|
+
type: "text",
|
|
67
|
+
defaultValue: "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$",
|
|
68
|
+
description: {
|
|
69
|
+
id: getTrad("color-picker.options.advanced.regex.description"),
|
|
70
|
+
defaultMessage: "The text of the regular expression"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
sectionTitle: {
|
|
75
|
+
id: "global.settings",
|
|
76
|
+
defaultMessage: "Settings"
|
|
77
|
+
},
|
|
78
|
+
items: [
|
|
79
|
+
{
|
|
80
|
+
name: "required",
|
|
81
|
+
type: "checkbox",
|
|
82
|
+
intlLabel: {
|
|
83
|
+
id: getTrad("color-picker.options.advanced.requiredField"),
|
|
84
|
+
defaultMessage: "Required field"
|
|
85
|
+
},
|
|
86
|
+
description: {
|
|
87
|
+
id: getTrad("color-picker.options.advanced.requiredField.description"),
|
|
88
|
+
defaultMessage: "You won't be able to create an entry if this field is empty"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
async registerTrads({ locales }) {
|
|
98
|
+
const importedTrads = await Promise.all(
|
|
99
|
+
locales.map((locale) => {
|
|
100
|
+
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/cs.json": () => Promise.resolve().then(() => require("./cs-c22467c6.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-eb6717ab.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-1d1cf8a8.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("./sv-6e7fa200.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-67b6e192.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-e5010f8b.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
|
|
101
|
+
return {
|
|
102
|
+
data: helperPlugin.prefixPluginTranslations(data, pluginId),
|
|
103
|
+
locale
|
|
104
|
+
};
|
|
105
|
+
}).catch(() => {
|
|
106
|
+
return {
|
|
107
|
+
data: {},
|
|
108
|
+
locale
|
|
109
|
+
};
|
|
110
|
+
});
|
|
111
|
+
})
|
|
112
|
+
);
|
|
113
|
+
return Promise.resolve(importedTrads);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
exports.getTrad = getTrad;
|
|
117
|
+
exports.index = index;
|
|
118
|
+
//# sourceMappingURL=index-d45bf186.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-d45bf186.js","sources":["../../admin/src/components/ColorPickerIcon.tsx","../../admin/src/pluginId.ts","../../admin/src/utils/getTrad.ts","../../admin/src/index.ts"],"sourcesContent":["import { Flex, Icon } from '@strapi/design-system';\nimport { Paint } from '@strapi/icons';\nimport styled from 'styled-components';\n\nconst IconBox = styled(Flex)`\n /* Hard code color values */\n /* to stay consistent between themes */\n background-color: #f0f0ff; /* primary100 */\n border: 1px solid #d9d8ff; /* primary200 */\n\n svg > path {\n fill: #4945ff; /* primary600 */\n }\n`;\n\nexport const ColorPickerIcon = () => {\n return (\n <IconBox justifyContent=\"center\" alignItems=\"center\" width={7} height={6} hasRadius aria-hidden>\n <Icon as={Paint} />\n </IconBox>\n );\n};\n","export const pluginId = 'color-picker';\n","import { pluginId } from '../pluginId';\n\nexport const getTrad = (id: string) => `${pluginId}.${id}`;\n","import { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport { ColorPickerIcon } from './components/ColorPickerIcon';\nimport { pluginId } from './pluginId';\nimport { getTrad } from './utils/getTrad';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n /**\n * TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register(app: any) {\n app.customFields.register({\n name: 'color',\n pluginId: 'color-picker',\n type: 'string',\n icon: ColorPickerIcon,\n intlLabel: {\n id: getTrad('color-picker.label'),\n defaultMessage: 'Color',\n },\n intlDescription: {\n id: getTrad('color-picker.description'),\n defaultMessage: 'Select any color',\n },\n components: {\n Input: async () =>\n import(\n /* webpackChunkName: \"color-picker-input-component\" */ './components/ColorPickerInput'\n ).then((module) => ({ default: module.ColorPickerInput })),\n },\n options: {\n advanced: [\n {\n intlLabel: {\n id: getTrad('color-picker.options.advanced.regex'),\n defaultMessage: 'RegExp pattern',\n },\n name: 'regex',\n type: 'text',\n defaultValue: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$',\n description: {\n id: getTrad('color-picker.options.advanced.regex.description'),\n defaultMessage: 'The text of the regular expression',\n },\n },\n {\n sectionTitle: {\n id: 'global.settings',\n defaultMessage: 'Settings',\n },\n items: [\n {\n name: 'required',\n type: 'checkbox',\n intlLabel: {\n id: getTrad('color-picker.options.advanced.requiredField'),\n defaultMessage: 'Required field',\n },\n description: {\n id: getTrad('color-picker.options.advanced.requiredField.description'),\n defaultMessage: \"You won't be able to create an entry if this field is empty\",\n },\n },\n ],\n },\n ],\n },\n });\n },\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":["styled","Flex","Icon","Paint","module","prefixPluginTranslations"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ru = {
|
|
2
2
|
"color-picker.description": "Выбирайте любые цвета",
|
|
3
3
|
"color-picker.input.aria-label": "Введите выбранный цвет",
|
|
4
4
|
"color-picker.input.format": "HEX",
|
|
@@ -14,6 +14,6 @@ const o = {
|
|
|
14
14
|
"plugin.name": "Выбор цвета"
|
|
15
15
|
};
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
ru as default
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=ru-
|
|
19
|
+
//# sourceMappingURL=ru-0bf57448.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ru-0bf57448.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const ru = {
|
|
4
|
+
"color-picker.description": "Выбирайте любые цвета",
|
|
5
|
+
"color-picker.input.aria-label": "Введите выбранный цвет",
|
|
6
|
+
"color-picker.input.format": "HEX",
|
|
7
|
+
"color-picker.label": "Цвет",
|
|
8
|
+
"color-picker.options.advanced.regex": "Шаблон регулярного выражения (RegExp)",
|
|
9
|
+
"color-picker.options.advanced.regex.description": "Обеспечивает проверку с помощью регулярного выражение для HEX (шестнадцатеричного) HEX значения цвета",
|
|
10
|
+
"color-picker.options.advanced.requiredField": "Обязательное поле",
|
|
11
|
+
"color-picker.options.advanced.requiredField.description": "Вы не сможете продолжить, если это поле пусто",
|
|
12
|
+
"color-picker.settings": "Настройки",
|
|
13
|
+
"color-picker.toggle.aria-label": "Переключатель средства выбора цвета",
|
|
14
|
+
"plugin.description.long": "Настраиваемое поле средства выбора цвета, поддерживаемое Strapi. Используйте ползунки насыщенности и оттенка, чтобы выбрать цвет и сохранить его HEX (шестнадцатеричное) значение.",
|
|
15
|
+
"plugin.description.short": "Настраиваемое поле средства выбора цвета, поддерживаемое Strapi.",
|
|
16
|
+
"plugin.name": "Выбор цвета"
|
|
17
|
+
};
|
|
18
|
+
exports.default = ru;
|
|
19
|
+
//# sourceMappingURL=ru-1d1cf8a8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ru-1d1cf8a8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const sv = {
|
|
4
|
+
"color-picker.description": "Välj färger",
|
|
5
|
+
"color-picker.input.aria-label": "Färgväljarinmatning",
|
|
6
|
+
"color-picker.input.format": "HEX",
|
|
7
|
+
"color-picker.label": "Färgväljare",
|
|
8
|
+
"color-picker.options.advanced.regex": "RegEx-mönster",
|
|
9
|
+
"color-picker.options.advanced.regex.description": "Ange ett regex-mönster för att validera HEX-värdet",
|
|
10
|
+
"color-picker.options.advanced.requiredField": "Obligatoriskt fält",
|
|
11
|
+
"color-picker.options.advanced.requiredField.description": "Du kommer inte att kunna skapa en post om det här fältet är tomt",
|
|
12
|
+
"color-picker.settings": "Inställningar",
|
|
13
|
+
"color-picker.toggle.aria-label": "Växla färgväljare"
|
|
14
|
+
};
|
|
15
|
+
exports.default = sv;
|
|
16
|
+
//# sourceMappingURL=sv-6e7fa200.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sv-6e7fa200.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const sv = {
|
|
2
2
|
"color-picker.description": "Välj färger",
|
|
3
3
|
"color-picker.input.aria-label": "Färgväljarinmatning",
|
|
4
4
|
"color-picker.input.format": "HEX",
|
|
@@ -11,6 +11,6 @@ const r = {
|
|
|
11
11
|
"color-picker.toggle.aria-label": "Växla färgväljare"
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
sv as default
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=sv-
|
|
16
|
+
//# sourceMappingURL=sv-de6a785a.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sv-de6a785a.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const tr = {
|
|
2
2
|
"color-picker.description": "Herhangi bir renk seç",
|
|
3
3
|
"color-picker.input.aria-label": "Renk seçici girişi",
|
|
4
4
|
"color-picker.input.format": "HEX",
|
|
@@ -11,6 +11,6 @@ const i = {
|
|
|
11
11
|
"color-picker.toggle.aria-label": "Renk seçici anahtarı"
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
tr as default
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=tr-
|
|
16
|
+
//# sourceMappingURL=tr-4d632eac.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tr-4d632eac.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const tr = {
|
|
4
|
+
"color-picker.description": "Herhangi bir renk seç",
|
|
5
|
+
"color-picker.input.aria-label": "Renk seçici girişi",
|
|
6
|
+
"color-picker.input.format": "HEX",
|
|
7
|
+
"color-picker.label": "Renk",
|
|
8
|
+
"color-picker.options.advanced.regex": "RegExp ifadesi",
|
|
9
|
+
"color-picker.options.advanced.regex.description": "HEX değerini doğrulamak için bir RegExp ifadesi sağla",
|
|
10
|
+
"color-picker.options.advanced.requiredField": "Zorunlu alan",
|
|
11
|
+
"color-picker.options.advanced.requiredField.description": "Bu alan boş olursa yeni bir girdi oluşturamazsın",
|
|
12
|
+
"color-picker.settings": "Ayarlar",
|
|
13
|
+
"color-picker.toggle.aria-label": "Renk seçici anahtarı"
|
|
14
|
+
};
|
|
15
|
+
exports.default = tr;
|
|
16
|
+
//# sourceMappingURL=tr-67b6e192.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tr-67b6e192.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const zh = {
|
|
2
2
|
"color-picker.description": "選擇任意顏色",
|
|
3
3
|
"color-picker.input.aria-label": "選色器輸入",
|
|
4
4
|
"color-picker.input.format": "HEX",
|
|
@@ -11,6 +11,6 @@ const o = {
|
|
|
11
11
|
"color-picker.toggle.aria-label": "選色器開關"
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
zh as default
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=zh-
|
|
16
|
+
//# sourceMappingURL=zh-5ba3e025.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh-5ba3e025.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const zh = {
|
|
4
|
+
"color-picker.description": "選擇任意顏色",
|
|
5
|
+
"color-picker.input.aria-label": "選色器輸入",
|
|
6
|
+
"color-picker.input.format": "HEX",
|
|
7
|
+
"color-picker.label": "顏色",
|
|
8
|
+
"color-picker.options.advanced.regex": "正則表達模式",
|
|
9
|
+
"color-picker.options.advanced.regex.description": "提供正則表達式以驗證 HEX 值",
|
|
10
|
+
"color-picker.options.advanced.requiredField": "必填欄位",
|
|
11
|
+
"color-picker.options.advanced.requiredField.description": "若此欄位為空,您將無法建立項目",
|
|
12
|
+
"color-picker.settings": "設定",
|
|
13
|
+
"color-picker.toggle.aria-label": "選色器開關"
|
|
14
|
+
};
|
|
15
|
+
exports.default = zh;
|
|
16
|
+
//# sourceMappingURL=zh-e5010f8b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zh-e5010f8b.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
package/dist/admin/index.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
const index = require("../_chunks/index-d45bf186.js");
|
|
3
|
+
require("@strapi/helper-plugin");
|
|
4
|
+
require("react/jsx-runtime");
|
|
5
|
+
require("@strapi/design-system");
|
|
6
|
+
require("@strapi/icons");
|
|
7
|
+
require("styled-components");
|
|
8
|
+
module.exports = index.index;
|
|
2
9
|
//# sourceMappingURL=index.js.map
|
package/dist/admin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/admin/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { i
|
|
1
|
+
import { i } from "../_chunks/index-335ecfc4.mjs";
|
|
2
2
|
import "@strapi/helper-plugin";
|
|
3
|
-
import "react";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
4
|
import "@strapi/design-system";
|
|
5
5
|
import "@strapi/icons";
|
|
6
6
|
import "styled-components";
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
i as default
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=index.mjs.map
|
package/dist/server/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../server/src/index.ts"],"names":[],"mappings":";;;AAEA,wBAEE"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
const register = ({ strapi }) => {
|
|
3
|
+
strapi.customFields.register({
|
|
4
|
+
name: "color",
|
|
5
|
+
plugin: "color-picker",
|
|
6
|
+
type: "string"
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
const index = {
|
|
10
|
+
register
|
|
11
|
+
};
|
|
12
|
+
module.exports = index;
|
|
2
13
|
//# sourceMappingURL=index.js.map
|
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../server/src/register.ts","../../server/src/index.ts"],"sourcesContent":["export const register = ({ strapi }: any) => {\n strapi.customFields.register({\n name: 'color',\n plugin: 'color-picker',\n type: 'string',\n });\n};\n","import { register } from './register';\n\nexport default {\n register,\n};\n"],"names":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../server/src/register.ts","../../server/src/index.ts"],"sourcesContent":["export const register = ({ strapi }: any) => {\n strapi.customFields.register({\n name: 'color',\n plugin: 'color-picker',\n type: 'string',\n });\n};\n","import { register } from './register';\n\nexport default {\n register,\n};\n"],"names":[],"mappings":";AAAO,MAAM,WAAW,CAAC,EAAE,aAAkB;AAC3C,SAAO,aAAa,SAAS;AAAA,IAC3B,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,EAAA,CACP;AACH;ACJA,MAAe,QAAA;AAAA,EACb;AACF;;"}
|
package/dist/server/index.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const register = ({ strapi }) => {
|
|
2
|
+
strapi.customFields.register({
|
|
3
3
|
name: "color",
|
|
4
4
|
plugin: "color-picker",
|
|
5
5
|
type: "string"
|
|
6
6
|
});
|
|
7
|
-
}
|
|
8
|
-
|
|
7
|
+
};
|
|
8
|
+
const index = {
|
|
9
|
+
register
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
index as default
|
|
12
13
|
};
|
|
13
14
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../server/src/register.ts","../../server/src/index.ts"],"sourcesContent":["export const register = ({ strapi }: any) => {\n strapi.customFields.register({\n name: 'color',\n plugin: 'color-picker',\n type: 'string',\n });\n};\n","import { register } from './register';\n\nexport default {\n register,\n};\n"],"names":[
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../server/src/register.ts","../../server/src/index.ts"],"sourcesContent":["export const register = ({ strapi }: any) => {\n strapi.customFields.register({\n name: 'color',\n plugin: 'color-picker',\n type: 'string',\n });\n};\n","import { register } from './register';\n\nexport default {\n register,\n};\n"],"names":[],"mappings":"AAAO,MAAM,WAAW,CAAC,EAAE,aAAkB;AAC3C,SAAO,aAAa,SAAS;AAAA,IAC3B,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,EAAA,CACP;AACH;ACJA,MAAe,QAAA;AAAA,EACb;AACF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../server/src/register.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,eAAgB,GAAG,SAMvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/plugin-color-picker",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.6",
|
|
4
4
|
"description": "Strapi maintained Custom Fields",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,37 +41,31 @@
|
|
|
41
41
|
"./dist",
|
|
42
42
|
"strapi-server.js"
|
|
43
43
|
],
|
|
44
|
-
"strapi": {
|
|
45
|
-
"name": "color-picker",
|
|
46
|
-
"description": "Color picker custom field",
|
|
47
|
-
"kind": "plugin",
|
|
48
|
-
"displayName": "Color Picker"
|
|
49
|
-
},
|
|
50
44
|
"scripts": {
|
|
51
45
|
"build": "NODE_ENV=production strapi plugin:build --force",
|
|
52
|
-
"watch": "run -T tsc -w --preserveWatchOutput",
|
|
53
46
|
"clean": "run -T rimraf ./dist",
|
|
47
|
+
"lint": "yarn lint:project && yarn lint:back && yarn lint:front",
|
|
48
|
+
"lint:back": "run -T eslint ./server -c ./server/.eslintrc.js",
|
|
49
|
+
"lint:front": "run -T eslint ./admin -c ./admin/.eslintrc.js",
|
|
50
|
+
"lint:project": "run -T eslint . -c ./.eslintrc.js",
|
|
54
51
|
"prepublishOnly": "yarn clean && yarn build",
|
|
55
52
|
"test:front": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js",
|
|
56
|
-
"test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
|
|
57
53
|
"test:front:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js",
|
|
54
|
+
"test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
|
|
58
55
|
"test:front:watch:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll",
|
|
59
56
|
"test:ts:front": "run -T tsc -p admin/tsconfig.json",
|
|
60
|
-
"
|
|
61
|
-
"lint:project": "run -T eslint . -c ./.eslintrc.js",
|
|
62
|
-
"lint:back": "run -T eslint ./server -c ./server/.eslintrc.js",
|
|
63
|
-
"lint:front": "run -T eslint ./admin -c ./admin/.eslintrc.js"
|
|
57
|
+
"watch": "run -T tsc -w --preserveWatchOutput"
|
|
64
58
|
},
|
|
65
59
|
"dependencies": {
|
|
66
|
-
"@strapi/design-system": "1.12.
|
|
67
|
-
"@strapi/helper-plugin": "4.14.
|
|
68
|
-
"@strapi/icons": "1.12.
|
|
60
|
+
"@strapi/design-system": "1.12.2",
|
|
61
|
+
"@strapi/helper-plugin": "4.14.6",
|
|
62
|
+
"@strapi/icons": "1.12.2",
|
|
69
63
|
"prop-types": "^15.8.1",
|
|
70
64
|
"react-colorful": "5.6.1",
|
|
71
65
|
"react-intl": "6.4.1"
|
|
72
66
|
},
|
|
73
67
|
"devDependencies": {
|
|
74
|
-
"@strapi/strapi": "4.14.
|
|
68
|
+
"@strapi/strapi": "4.14.6",
|
|
75
69
|
"@testing-library/react": "14.0.0",
|
|
76
70
|
"@testing-library/user-event": "14.4.3",
|
|
77
71
|
"@types/styled-components": "5.1.26",
|
|
@@ -92,5 +86,11 @@
|
|
|
92
86
|
"node": ">=16.0.0 <=20.x.x",
|
|
93
87
|
"npm": ">=6.0.0"
|
|
94
88
|
},
|
|
95
|
-
"
|
|
89
|
+
"strapi": {
|
|
90
|
+
"name": "color-picker",
|
|
91
|
+
"description": "Color picker custom field",
|
|
92
|
+
"kind": "plugin",
|
|
93
|
+
"displayName": "Color Picker"
|
|
94
|
+
},
|
|
95
|
+
"gitHead": "574e25daf919a547554c96eb3697759634ccbd6b"
|
|
96
96
|
}
|