@strapi/plugin-color-picker 0.0.0-next.de5394e73076ccf7aca1e28dc68894e3c43f8b91 → 0.0.0-next.e16a4b69b276a52e1b299f339479948d67ec66f3

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.
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ root: true,
3
+ extends: ['custom/front/typescript'],
4
+ parserOptions: {
5
+ project: ['./admin/tsconfig.eslint.json'],
6
+ },
7
+ };
@@ -0,0 +1,2 @@
1
+ declare module '@strapi/helper-plugin';
2
+ declare module '@strapi/design-system';
@@ -1,11 +1,11 @@
1
1
  import { prefixPluginTranslations } from '@strapi/helper-plugin';
2
2
 
3
3
  import ColorPickerIcon from './components/ColorPicker/ColorPickerIcon';
4
- import pluginId from './pluginId';
4
+ import { pluginId } from './pluginId';
5
5
  import getTrad from './utils/getTrad';
6
6
 
7
7
  export default {
8
- register(app) {
8
+ register(app: any) {
9
9
  app.customFields.register({
10
10
  name: 'color',
11
11
  pluginId: 'color-picker',
@@ -64,7 +64,7 @@ export default {
64
64
  },
65
65
  });
66
66
  },
67
- async registerTrads({ locales }) {
67
+ async registerTrads({ locales }: { locales: string[] }) {
68
68
  const importedTrads = await Promise.all(
69
69
  locales.map((locale) => {
70
70
  return import(`./translations/${locale}.json`)
@@ -0,0 +1,3 @@
1
+ import pluginPkg from '../../package.json';
2
+
3
+ export const pluginId = pluginPkg.name.replace(/^(@[^-,.][\w,-]+\/|strapi-)plugin-/i, '');
@@ -1,4 +1,4 @@
1
- import pluginId from '../pluginId';
1
+ import { pluginId } from '../pluginId';
2
2
 
3
3
  const getTrad = (id) => `${pluginId}.${id}`;
4
4
 
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "include": ["src"],
4
+ "exclude": ["node_modules"]
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "tsconfig/front.json",
3
+ "include": ["src"],
4
+ "exclude": ["node_modules"]
5
+ }
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ register: ({ strapi }: any) => void;
3
+ };
4
+ export default _default;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const register_1 = require("./register");
4
+ exports.default = {
5
+ register: register_1.register,
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/src/index.ts"],"names":[],"mappings":";;AAAA,yCAAsC;AAEtC,kBAAe;IACb,QAAQ,EAAR,mBAAQ;CACT,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const register: ({ strapi }: any) => void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.register = void 0;
4
+ const register = ({ strapi }) => {
5
+ strapi.customFields.register({
6
+ name: 'color',
7
+ plugin: 'color-picker',
8
+ type: 'string',
9
+ });
10
+ };
11
+ exports.register = register;
12
+ //# sourceMappingURL=register.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../../server/src/register.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,CAAC,EAAE,MAAM,EAAO,EAAE,EAAE;IAC1C,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC;QAC3B,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,cAAc;QACtB,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC;AACL,CAAC,CAAC;AANW,QAAA,QAAQ,YAMnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-color-picker",
3
- "version": "0.0.0-next.de5394e73076ccf7aca1e28dc68894e3c43f8b91",
3
+ "version": "0.0.0-next.e16a4b69b276a52e1b299f339479948d67ec66f3",
4
4
  "description": "Strapi maintained Custom Fields",
5
5
  "strapi": {
6
6
  "name": "color-picker",
@@ -9,15 +9,16 @@
9
9
  "displayName": "Color Picker"
10
10
  },
11
11
  "dependencies": {
12
- "@strapi/design-system": "1.8.0",
13
- "@strapi/helper-plugin": "0.0.0-next.de5394e73076ccf7aca1e28dc68894e3c43f8b91",
14
- "@strapi/icons": "1.8.0",
12
+ "@strapi/design-system": "1.8.2",
13
+ "@strapi/helper-plugin": "0.0.0-next.e16a4b69b276a52e1b299f339479948d67ec66f3",
14
+ "@strapi/icons": "1.8.2",
15
15
  "prop-types": "^15.8.1",
16
16
  "react-colorful": "5.6.1",
17
17
  "react-intl": "6.4.1"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@testing-library/react": "14.0.0",
21
+ "@types/styled-components": "5.1.26",
21
22
  "react": "^18.2.0",
22
23
  "react-dom": "^18.2.0",
23
24
  "react-router-dom": "5.3.4",
@@ -30,7 +31,18 @@
30
31
  "react-router-dom": "5.3.4",
31
32
  "styled-components": "5.3.3"
32
33
  },
34
+ "files": [
35
+ "./dist",
36
+ "./admin",
37
+ "strapi-admin.js",
38
+ "strapi-server.js"
39
+ ],
33
40
  "scripts": {
41
+ "build": "run -T tsc -p server/tsconfig.json --outDir ./dist/server",
42
+ "build:ts": "run build",
43
+ "watch": "run -T tsc -w --preserveWatchOutput",
44
+ "clean": "run -T rimraf ./dist",
45
+ "prepublishOnly": "yarn clean && yarn build",
34
46
  "test:front": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js",
35
47
  "test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
36
48
  "test:front:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js",
@@ -56,8 +68,8 @@
56
68
  }
57
69
  ],
58
70
  "engines": {
59
- "node": ">=14.19.1 <=18.x.x",
71
+ "node": ">=16.0.0 <=20.x.x",
60
72
  "npm": ">=6.0.0"
61
73
  },
62
- "gitHead": "de5394e73076ccf7aca1e28dc68894e3c43f8b91"
74
+ "gitHead": "e16a4b69b276a52e1b299f339479948d67ec66f3"
63
75
  }
package/strapi-admin.js CHANGED
@@ -1,3 +1,3 @@
1
1
  'use strict';
2
2
 
3
- module.exports = require('./admin/src').default;
3
+ module.exports = require('./admin/src/index.ts');
package/strapi-server.js CHANGED
@@ -1,3 +1,3 @@
1
1
  'use strict';
2
2
 
3
- module.exports = require('./server');
3
+ module.exports = require('./dist/server');
package/.eslintignore DELETED
@@ -1,2 +0,0 @@
1
- node_modules/
2
- .eslintrc.js
package/.eslintrc.js DELETED
@@ -1,14 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- overrides: [
4
- {
5
- files: ['admin/**/*'],
6
- extends: ['custom/front'],
7
- },
8
- {
9
- files: ['**/*'],
10
- excludedFiles: ['admin/**/*'],
11
- extends: ['custom/back'],
12
- },
13
- ],
14
- };
@@ -1,5 +0,0 @@
1
- const pluginPkg = require('../../package.json');
2
-
3
- const pluginId = pluginPkg.name.replace(/^(@[^-,.][\w,-]+\/|strapi-)plugin-/i, '');
4
-
5
- module.exports = pluginId;
package/color-picker.png DELETED
Binary file
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- preset: '../../../jest-preset.front.js',
5
- displayName: 'Color picker plugin',
6
- };
package/server/index.js DELETED
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- const register = require('./register');
4
-
5
- module.exports = {
6
- register,
7
- };
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = ({ strapi }) => {
4
- strapi.customFields.register({
5
- name: 'color',
6
- plugin: 'color-picker',
7
- type: 'string',
8
- });
9
- };