@strapi/plugin-color-picker 0.0.0-next.e41415e8ff5f565ff959667d5c5ba4f20bee013c → 0.0.0-next.f426350b859ddae6592e9bfa99e6be94ae22e117

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.
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import styled from 'styled-components';
3
- import { Icon, Flex } from '@strapi/design-system';
2
+
3
+ import { Flex, Icon } from '@strapi/design-system';
4
4
  import { Paint } from '@strapi/icons';
5
+ import styled from 'styled-components';
5
6
 
6
7
  const IconBox = styled(Flex)`
7
8
  /* Hard code color values */
@@ -1,22 +1,23 @@
1
- import React, { useState, useRef } from 'react';
2
- import PropTypes from 'prop-types';
3
- import styled from 'styled-components';
1
+ import React, { useRef, useState } from 'react';
2
+
4
3
  import {
5
- Typography,
6
- Flex,
7
- Box,
8
4
  BaseButton,
9
- FocusTrap,
5
+ Box,
10
6
  Field,
11
- FieldHint,
12
7
  FieldError,
13
- FieldLabel,
8
+ FieldHint,
14
9
  FieldInput,
10
+ FieldLabel,
11
+ Flex,
12
+ FocusTrap,
15
13
  Popover,
14
+ Typography,
16
15
  } from '@strapi/design-system';
17
16
  import { CarretDown } from '@strapi/icons';
18
- import { useIntl } from 'react-intl';
17
+ import PropTypes from 'prop-types';
19
18
  import { HexColorPicker } from 'react-colorful';
19
+ import { useIntl } from 'react-intl';
20
+ import styled from 'styled-components';
20
21
 
21
22
  import getTrad from '../../../utils/getTrad';
22
23
 
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
- import { render, screen, fireEvent } from '@testing-library/react';
2
+
3
3
  import { lightTheme, ThemeProvider } from '@strapi/design-system';
4
+ import { fireEvent, render, screen } from '@testing-library/react';
4
5
  import { IntlProvider } from 'react-intl';
6
+
5
7
  import ColorPickerInput from '../ColorPicker/ColorPickerInput';
6
8
 
7
9
  const mockAttribute = {
@@ -1,6 +1,7 @@
1
1
  import { prefixPluginTranslations } from '@strapi/helper-plugin';
2
- import pluginId from './pluginId';
2
+
3
3
  import ColorPickerIcon from './components/ColorPicker/ColorPickerIcon';
4
+ import pluginId from './pluginId';
4
5
  import getTrad from './utils/getTrad';
5
6
 
6
7
  export default {
@@ -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.e41415e8ff5f565ff959667d5c5ba4f20bee013c",
3
+ "version": "0.0.0-next.f426350b859ddae6592e9bfa99e6be94ae22e117",
4
4
  "description": "Strapi maintained Custom Fields",
5
5
  "strapi": {
6
6
  "name": "color-picker",
@@ -9,9 +9,9 @@
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.e41415e8ff5f565ff959667d5c5ba4f20bee013c",
14
- "@strapi/icons": "1.8.0",
12
+ "@strapi/design-system": "1.8.2",
13
+ "@strapi/helper-plugin": "0.0.0-next.f426350b859ddae6592e9bfa99e6be94ae22e117",
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"
@@ -30,7 +30,18 @@
30
30
  "react-router-dom": "5.3.4",
31
31
  "styled-components": "5.3.3"
32
32
  },
33
+ "files": [
34
+ "./dist",
35
+ "./admin",
36
+ "strapi-admin.js",
37
+ "strapi-server.js"
38
+ ],
33
39
  "scripts": {
40
+ "build": "run -T tsc -p server/tsconfig.json --outDir ./dist/server",
41
+ "build:ts": "run build",
42
+ "watch": "run -T tsc -w --preserveWatchOutput",
43
+ "clean": "run -T rimraf ./dist",
44
+ "prepublishOnly": "yarn clean && yarn build",
34
45
  "test:front": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js",
35
46
  "test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
36
47
  "test:front:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js",
@@ -56,8 +67,8 @@
56
67
  }
57
68
  ],
58
69
  "engines": {
59
- "node": ">=14.19.1 <=18.x.x",
70
+ "node": ">=16.0.0 <=20.x.x",
60
71
  "npm": ">=6.0.0"
61
72
  },
62
- "gitHead": "e41415e8ff5f565ff959667d5c5ba4f20bee013c"
73
+ "gitHead": "f426350b859ddae6592e9bfa99e6be94ae22e117"
63
74
  }
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
- };
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
- };