@contentful/field-editor-number 1.2.6 → 1.3.0
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/cjs/NumberEditor.js +174 -0
- package/dist/cjs/NumberEditor.spec.js +162 -0
- package/dist/cjs/NumberEditor.styles.js +63 -0
- package/dist/cjs/index.js +11 -0
- package/dist/cjs/parseNumber.js +30 -0
- package/dist/cjs/parseNumber.spec.js +56 -0
- package/dist/cjs/utils.js +32 -0
- package/dist/esm/NumberEditor.js +125 -0
- package/dist/esm/NumberEditor.spec.js +114 -0
- package/dist/esm/NumberEditor.styles.js +48 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/parseNumber.js +12 -0
- package/dist/esm/parseNumber.spec.js +52 -0
- package/dist/esm/utils.js +11 -0
- package/dist/{NumberEditor.d.ts → types/NumberEditor.d.ts} +18 -18
- package/dist/types/NumberEditor.spec.d.ts +1 -0
- package/dist/{NumberEditor.styles.d.ts → types/NumberEditor.styles.d.ts} +6 -6
- package/dist/{index.d.ts → types/index.d.ts} +1 -1
- package/dist/{parseNumber.d.ts → types/parseNumber.d.ts} +2 -2
- package/dist/types/parseNumber.spec.d.ts +1 -0
- package/dist/{utils.d.ts → types/utils.d.ts} +9 -9
- package/package.json +25 -11
- package/CHANGELOG.md +0 -204
- package/dist/field-editor-number.cjs.development.js +0 -251
- package/dist/field-editor-number.cjs.development.js.map +0 -1
- package/dist/field-editor-number.cjs.production.min.js +0 -2
- package/dist/field-editor-number.cjs.production.min.js.map +0 -1
- package/dist/field-editor-number.esm.js +0 -245
- package/dist/field-editor-number.esm.js.map +0 -1
- package/dist/index.js +0 -8
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createFakeFieldAPI } from '@contentful/field-editor-test-utils';
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
4
|
+
import { cleanup, configure, render, screen, waitFor } from '@testing-library/react';
|
|
5
|
+
import userEvent from '@testing-library/user-event';
|
|
6
|
+
import { NumberEditor } from './NumberEditor';
|
|
7
|
+
configure({
|
|
8
|
+
testIdAttribute: 'data-test-id'
|
|
9
|
+
});
|
|
10
|
+
function createField({ initialValue , type ='Integer' }) {
|
|
11
|
+
const [field] = createFakeFieldAPI((field)=>{
|
|
12
|
+
jest.spyOn(field, 'setValue');
|
|
13
|
+
jest.spyOn(field, 'removeValue');
|
|
14
|
+
jest.spyOn(field, 'setInvalid');
|
|
15
|
+
return {
|
|
16
|
+
...field,
|
|
17
|
+
type
|
|
18
|
+
};
|
|
19
|
+
}, initialValue);
|
|
20
|
+
return field;
|
|
21
|
+
}
|
|
22
|
+
describe('NumberEditor', ()=>{
|
|
23
|
+
afterEach(cleanup);
|
|
24
|
+
it('sets initial value', ()=>{
|
|
25
|
+
const field = createField({
|
|
26
|
+
initialValue: 42
|
|
27
|
+
});
|
|
28
|
+
render(React.createElement(NumberEditor, {
|
|
29
|
+
field: field,
|
|
30
|
+
isInitiallyDisabled: false
|
|
31
|
+
}));
|
|
32
|
+
const $input = screen.getByTestId('number-editor-input');
|
|
33
|
+
expect($input).toHaveValue('42');
|
|
34
|
+
});
|
|
35
|
+
it('calls setValue when user inputs valid numbers', async ()=>{
|
|
36
|
+
const field = createField({});
|
|
37
|
+
render(React.createElement(NumberEditor, {
|
|
38
|
+
field: field,
|
|
39
|
+
isInitiallyDisabled: false
|
|
40
|
+
}));
|
|
41
|
+
const $input = screen.getByTestId('number-editor-input');
|
|
42
|
+
userEvent.type($input, '22');
|
|
43
|
+
await waitFor(()=>{
|
|
44
|
+
expect(field.setValue).toHaveBeenCalledWith(22);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
it('calls setValue when user inputs "0"', async ()=>{
|
|
48
|
+
const field = createField({});
|
|
49
|
+
render(React.createElement(NumberEditor, {
|
|
50
|
+
field: field,
|
|
51
|
+
isInitiallyDisabled: false
|
|
52
|
+
}));
|
|
53
|
+
const $input = screen.getByTestId('number-editor-input');
|
|
54
|
+
userEvent.type($input, '0');
|
|
55
|
+
await waitFor(()=>{
|
|
56
|
+
expect(field.setValue).toHaveBeenCalledWith(0);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
it('when Decimal type it calls setValue for every valid state', async ()=>{
|
|
60
|
+
const field = createField({
|
|
61
|
+
type: 'Decimal'
|
|
62
|
+
});
|
|
63
|
+
render(React.createElement(NumberEditor, {
|
|
64
|
+
field: field,
|
|
65
|
+
isInitiallyDisabled: false
|
|
66
|
+
}));
|
|
67
|
+
const $input = screen.getByTestId('number-editor-input');
|
|
68
|
+
userEvent.type($input, '4');
|
|
69
|
+
await waitFor(()=>{
|
|
70
|
+
expect(field.setValue).toHaveBeenCalledWith(4);
|
|
71
|
+
});
|
|
72
|
+
userEvent.type($input, '4');
|
|
73
|
+
await waitFor(()=>{
|
|
74
|
+
expect(field.setValue).toHaveBeenCalledWith(44);
|
|
75
|
+
});
|
|
76
|
+
userEvent.type($input, '.');
|
|
77
|
+
await waitFor(()=>{
|
|
78
|
+
expect(field.setValue).toHaveBeenLastCalledWith(44);
|
|
79
|
+
});
|
|
80
|
+
userEvent.type($input, '2');
|
|
81
|
+
await waitFor(()=>{
|
|
82
|
+
expect(field.setValue).toHaveBeenCalledWith(44.2);
|
|
83
|
+
});
|
|
84
|
+
expect(field.setValue).toHaveBeenCalledTimes(3);
|
|
85
|
+
});
|
|
86
|
+
it('does not call setValue when inputting invalid numbers', ()=>{
|
|
87
|
+
const field = createField({});
|
|
88
|
+
render(React.createElement(NumberEditor, {
|
|
89
|
+
field: field,
|
|
90
|
+
isInitiallyDisabled: false
|
|
91
|
+
}));
|
|
92
|
+
const $input = screen.getByTestId('number-editor-input');
|
|
93
|
+
userEvent.type($input, 'invalid');
|
|
94
|
+
expect(field.setValue).not.toHaveBeenCalled();
|
|
95
|
+
});
|
|
96
|
+
it('calls removeValue when clearing the input', async ()=>{
|
|
97
|
+
const field = createField({
|
|
98
|
+
initialValue: 42
|
|
99
|
+
});
|
|
100
|
+
render(React.createElement(NumberEditor, {
|
|
101
|
+
field: field,
|
|
102
|
+
isInitiallyDisabled: false
|
|
103
|
+
}));
|
|
104
|
+
const $input = screen.getByTestId('number-editor-input');
|
|
105
|
+
expect($input).toHaveValue('42');
|
|
106
|
+
userEvent.clear($input);
|
|
107
|
+
await waitFor(()=>{
|
|
108
|
+
expect($input).toHaveValue('');
|
|
109
|
+
expect(field.setValue).not.toHaveBeenCalled();
|
|
110
|
+
expect(field.removeValue).toHaveBeenCalledTimes(1);
|
|
111
|
+
expect(field.removeValue).toHaveBeenLastCalledWith();
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import tokens from '@contentful/f36-tokens';
|
|
2
|
+
import { css } from 'emotion';
|
|
3
|
+
export const styles = {
|
|
4
|
+
container: css({
|
|
5
|
+
position: 'relative'
|
|
6
|
+
}),
|
|
7
|
+
controlsWrapper: css({
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
top: '1px',
|
|
10
|
+
right: '1px',
|
|
11
|
+
width: tokens.spacingL,
|
|
12
|
+
height: 'calc(100% - 2px)',
|
|
13
|
+
display: 'flex',
|
|
14
|
+
flexDirection: 'column'
|
|
15
|
+
}),
|
|
16
|
+
control: css({
|
|
17
|
+
display: 'flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'center',
|
|
20
|
+
minHeight: 0,
|
|
21
|
+
cursor: 'pointer',
|
|
22
|
+
padding: 0,
|
|
23
|
+
margin: 0,
|
|
24
|
+
outline: 'none',
|
|
25
|
+
border: `0 solid ${tokens.gray300}`,
|
|
26
|
+
background: 'none',
|
|
27
|
+
borderLeftWidth: '1px',
|
|
28
|
+
'&:first-of-type': {
|
|
29
|
+
borderTopRightRadius: tokens.borderRadiusMedium
|
|
30
|
+
},
|
|
31
|
+
'&:last-of-type': {
|
|
32
|
+
borderTopWidth: '1px',
|
|
33
|
+
borderBottomRightRadius: tokens.borderRadiusMedium
|
|
34
|
+
},
|
|
35
|
+
svg: {
|
|
36
|
+
fill: tokens.gray600
|
|
37
|
+
},
|
|
38
|
+
'&:hover': {
|
|
39
|
+
backgroundColor: tokens.gray200
|
|
40
|
+
},
|
|
41
|
+
'&:active': {
|
|
42
|
+
backgroundColor: tokens.gray300
|
|
43
|
+
}
|
|
44
|
+
}),
|
|
45
|
+
input: css({
|
|
46
|
+
paddingRight: tokens.spacingXl
|
|
47
|
+
})
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NumberEditor } from './NumberEditor';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function parseNumber(value, type) {
|
|
2
|
+
if (Number.isNaN(+value)) {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
return type === 'Integer' ? parseInt(value, 10) : parseFloat(value);
|
|
6
|
+
}
|
|
7
|
+
const FLOAT_REGEX = /^[+-]?([0-9]+([.][0-9]*)?|[.][0-9]*)?$/;
|
|
8
|
+
const INT_REGEX = /^[+-]?([0-9]*)$/;
|
|
9
|
+
export function isNumberInputValueValid(value, type) {
|
|
10
|
+
const regex = type === 'Integer' ? INT_REGEX : FLOAT_REGEX;
|
|
11
|
+
return regex.test(value);
|
|
12
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { parseNumber, isNumberInputValueValid } from './parseNumber';
|
|
2
|
+
describe('parseNumber', ()=>{
|
|
3
|
+
it('should parse values properly when type is Integer', ()=>{
|
|
4
|
+
expect(parseNumber('1', 'Integer')).toBe(1);
|
|
5
|
+
expect(parseNumber('0', 'Integer')).toBe(0);
|
|
6
|
+
expect(parseNumber('-99', 'Interger')).toEqual(-99);
|
|
7
|
+
expect(parseNumber('2.89', 'Integer')).toBe(2);
|
|
8
|
+
expect(parseNumber('foo', 'Integer')).toBeUndefined();
|
|
9
|
+
});
|
|
10
|
+
it('should parse values properly when type is Decimal', ()=>{
|
|
11
|
+
expect(parseNumber('1', 'Decimal')).toBe(1);
|
|
12
|
+
expect(parseNumber('0', 'Integer')).toBe(0);
|
|
13
|
+
expect(parseNumber('-99', 'Decimal')).toEqual(-99);
|
|
14
|
+
expect(parseNumber('2.89', 'Decimal')).toBe(2.89);
|
|
15
|
+
expect(parseNumber('-12.89', 'Decimal')).toEqual(-12.89);
|
|
16
|
+
expect(parseNumber('foo', 'Decimal')).toBeUndefined();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
describe('isNumberInputValueValid', ()=>{
|
|
20
|
+
it('should correctly validate input when type is Integer', ()=>{
|
|
21
|
+
expect(isNumberInputValueValid('3', 'Integer')).toBe(true);
|
|
22
|
+
expect(isNumberInputValueValid('33', 'Integer')).toBe(true);
|
|
23
|
+
expect(isNumberInputValueValid('+', 'Integer')).toBe(true);
|
|
24
|
+
expect(isNumberInputValueValid('-', 'Integer')).toBe(true);
|
|
25
|
+
expect(isNumberInputValueValid('-3', 'Integer')).toBe(true);
|
|
26
|
+
expect(isNumberInputValueValid('--', 'Integer')).toBe(false);
|
|
27
|
+
expect(isNumberInputValueValid('++', 'Integer')).toBe(false);
|
|
28
|
+
expect(isNumberInputValueValid('.3', 'Integer')).toBe(false);
|
|
29
|
+
expect(isNumberInputValueValid('0.3', 'Integer')).toBe(false);
|
|
30
|
+
expect(isNumberInputValueValid('3.3', 'Integer')).toBe(false);
|
|
31
|
+
expect(isNumberInputValueValid('foo', 'Integer')).toBe(false);
|
|
32
|
+
});
|
|
33
|
+
it('should correctly validate input when type is Decimal', ()=>{
|
|
34
|
+
expect(isNumberInputValueValid('3', 'Decimal')).toBe(true);
|
|
35
|
+
expect(isNumberInputValueValid('33', 'Decimal')).toBe(true);
|
|
36
|
+
expect(isNumberInputValueValid('+', 'Decimal')).toBe(true);
|
|
37
|
+
expect(isNumberInputValueValid('-', 'Decimal')).toBe(true);
|
|
38
|
+
expect(isNumberInputValueValid('-3', 'Decimal')).toBe(true);
|
|
39
|
+
expect(isNumberInputValueValid('3.3', 'Decimal')).toBe(true);
|
|
40
|
+
expect(isNumberInputValueValid('-3.3', 'Decimal')).toBe(true);
|
|
41
|
+
expect(isNumberInputValueValid('0', 'Decimal')).toBe(true);
|
|
42
|
+
expect(isNumberInputValueValid('.', 'Decimal')).toBe(true);
|
|
43
|
+
expect(isNumberInputValueValid('.3', 'Decimal')).toBe(true);
|
|
44
|
+
expect(isNumberInputValueValid('0.3', 'Decimal')).toBe(true);
|
|
45
|
+
expect(isNumberInputValueValid('--', 'Integer')).toBe(false);
|
|
46
|
+
expect(isNumberInputValueValid('++', 'Integer')).toBe(false);
|
|
47
|
+
expect(isNumberInputValueValid('foo', 'Integer')).toBe(false);
|
|
48
|
+
expect(isNumberInputValueValid('0.3.', 'Integer')).toBe(false);
|
|
49
|
+
expect(isNumberInputValueValid('0.3.3', 'Integer')).toBe(false);
|
|
50
|
+
expect(isNumberInputValueValid('..', 'Integer')).toBe(false);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const getRangeFromField = (field)=>{
|
|
2
|
+
const validations = field.validations || [];
|
|
3
|
+
const result = validations.find((validation)=>validation.range);
|
|
4
|
+
return result ? result.range : {};
|
|
5
|
+
};
|
|
6
|
+
export const valueToString = (value)=>{
|
|
7
|
+
return value === undefined ? '' : String(value);
|
|
8
|
+
};
|
|
9
|
+
export const countDecimals = (number)=>{
|
|
10
|
+
return number.toString().split('.')[1]?.length ?? 0;
|
|
11
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import { FieldAPI } from '@contentful/field-editor-shared';
|
|
3
|
-
export interface NumberEditorProps {
|
|
4
|
-
/**
|
|
5
|
-
* is the field disabled initially
|
|
6
|
-
*/
|
|
7
|
-
isInitiallyDisabled: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* sdk.field
|
|
10
|
-
*/
|
|
11
|
-
field: FieldAPI;
|
|
12
|
-
}
|
|
13
|
-
export declare function NumberEditor(props: NumberEditorProps): JSX.Element;
|
|
14
|
-
export declare namespace NumberEditor {
|
|
15
|
-
var defaultProps: {
|
|
16
|
-
isInitiallyDisabled: boolean;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FieldAPI } from '@contentful/field-editor-shared';
|
|
3
|
+
export interface NumberEditorProps {
|
|
4
|
+
/**
|
|
5
|
+
* is the field disabled initially
|
|
6
|
+
*/
|
|
7
|
+
isInitiallyDisabled: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* sdk.field
|
|
10
|
+
*/
|
|
11
|
+
field: FieldAPI;
|
|
12
|
+
}
|
|
13
|
+
export declare function NumberEditor(props: NumberEditorProps): React.JSX.Element;
|
|
14
|
+
export declare namespace NumberEditor {
|
|
15
|
+
var defaultProps: {
|
|
16
|
+
isInitiallyDisabled: boolean;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const styles: {
|
|
2
|
-
container: string;
|
|
3
|
-
controlsWrapper: string;
|
|
4
|
-
control: string;
|
|
5
|
-
input: string;
|
|
6
|
-
};
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
container: string;
|
|
3
|
+
controlsWrapper: string;
|
|
4
|
+
control: string;
|
|
5
|
+
input: string;
|
|
6
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { NumberEditor } from './NumberEditor';
|
|
1
|
+
export { NumberEditor } from './NumberEditor';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function parseNumber(value: string, type: string): number | undefined;
|
|
2
|
-
export declare function isNumberInputValueValid(value: string, type: string): boolean;
|
|
1
|
+
export declare function parseNumber(value: string, type: string): number | undefined;
|
|
2
|
+
export declare function isNumberInputValueValid(value: string, type: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FieldAPI } from '@contentful/field-editor-shared';
|
|
2
|
-
|
|
3
|
-
min?: number;
|
|
4
|
-
max?: number;
|
|
5
|
-
};
|
|
6
|
-
export declare const getRangeFromField: (field: FieldAPI) => RangeValidation;
|
|
7
|
-
export declare const valueToString: (value: number | null | undefined) => string;
|
|
8
|
-
export declare const countDecimals: (number: number) => number;
|
|
9
|
-
export {};
|
|
1
|
+
import { FieldAPI } from '@contentful/field-editor-shared';
|
|
2
|
+
type RangeValidation = {
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const getRangeFromField: (field: FieldAPI) => RangeValidation;
|
|
7
|
+
export declare const valueToString: (value: number | null | undefined) => string;
|
|
8
|
+
export declare const countDecimals: (number: number) => number;
|
|
9
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-number",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"module": "dist/
|
|
6
|
-
"
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"main": "dist/cjs/index.js",
|
|
5
|
+
"module": "dist/esm/index.js",
|
|
6
|
+
"types": "dist/types/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/types/index.d.ts",
|
|
10
|
+
"require": "./dist/cjs/index.js",
|
|
11
|
+
"default": "./dist/cjs/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
7
15
|
"files": [
|
|
8
16
|
"dist"
|
|
9
17
|
],
|
|
@@ -14,20 +22,26 @@
|
|
|
14
22
|
"url": "https://github.com/contentful/field-editors"
|
|
15
23
|
},
|
|
16
24
|
"scripts": {
|
|
17
|
-
"watch": "
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
25
|
+
"watch": "yarn concurrently \"yarn:watch:*\"",
|
|
26
|
+
"watch:cjs": "yarn build:cjs -w",
|
|
27
|
+
"watch:esm": "yarn build:esm -w",
|
|
28
|
+
"watch:types": "yarn build:types --watch",
|
|
29
|
+
"build": "yarn build:types && yarn build:cjs && yarn build:esm",
|
|
30
|
+
"build:types": "tsc --outDir dist/types --emitDeclarationOnly",
|
|
31
|
+
"build:cjs": "swc src --config-file ../../.swcrc -d dist/cjs -C module.type=commonjs",
|
|
32
|
+
"build:esm": "swc src --config-file ../../.swcrc -d dist/esm",
|
|
33
|
+
"test": "jest --watch",
|
|
34
|
+
"test:ci": "jest --ci",
|
|
21
35
|
"tsc": "tsc -p ./ --noEmit"
|
|
22
36
|
},
|
|
23
37
|
"dependencies": {
|
|
24
38
|
"@contentful/f36-components": "^4.0.27",
|
|
25
39
|
"@contentful/f36-tokens": "^4.0.0",
|
|
26
|
-
"@contentful/field-editor-shared": "^1.
|
|
40
|
+
"@contentful/field-editor-shared": "^1.3.0",
|
|
27
41
|
"emotion": "^10.0.17"
|
|
28
42
|
},
|
|
29
43
|
"devDependencies": {
|
|
30
|
-
"@contentful/field-editor-test-utils": "^1.
|
|
44
|
+
"@contentful/field-editor-test-utils": "^1.4.0",
|
|
31
45
|
"@testing-library/jest-dom": "^5.12.0",
|
|
32
46
|
"@testing-library/react": "^11.2.6",
|
|
33
47
|
"@testing-library/user-event": "^13.1.9"
|
|
@@ -35,5 +49,5 @@
|
|
|
35
49
|
"peerDependencies": {
|
|
36
50
|
"react": ">=16.8.0"
|
|
37
51
|
},
|
|
38
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "543e02672a8dd4edc810f9f3568d6b69c454e1f9"
|
|
39
53
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [1.2.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.2.5...@contentful/field-editor-number@1.2.6) (2023-04-19)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
9
|
-
|
|
10
|
-
## [1.2.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.2.4...@contentful/field-editor-number@1.2.5) (2023-03-14)
|
|
11
|
-
|
|
12
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
13
|
-
|
|
14
|
-
## [1.2.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.2.3...@contentful/field-editor-number@1.2.4) (2023-03-10)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
17
|
-
|
|
18
|
-
## [1.2.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.2.2...@contentful/field-editor-number@1.2.3) (2023-02-21)
|
|
19
|
-
|
|
20
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
21
|
-
|
|
22
|
-
## [1.2.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.2.1...@contentful/field-editor-number@1.2.2) (2023-02-07)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
25
|
-
|
|
26
|
-
## [1.2.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.2.0...@contentful/field-editor-number@1.2.1) (2022-12-08)
|
|
27
|
-
|
|
28
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
29
|
-
|
|
30
|
-
# [1.2.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.1.7...@contentful/field-editor-number@1.2.0) (2022-08-22)
|
|
31
|
-
|
|
32
|
-
### Features
|
|
33
|
-
|
|
34
|
-
- refactoring of Number field-editor [BAU-722] ([#1203](https://github.com/contentful/field-editors/issues/1203)) ([d93698e](https://github.com/contentful/field-editors/commit/d93698e730e0eb7c83378bfaad4566a70aba23f6))
|
|
35
|
-
|
|
36
|
-
## [1.1.7](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.1.6...@contentful/field-editor-number@1.1.7) (2022-07-29)
|
|
37
|
-
|
|
38
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
39
|
-
|
|
40
|
-
## [1.1.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.1.5...@contentful/field-editor-number@1.1.6) (2022-07-29)
|
|
41
|
-
|
|
42
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
43
|
-
|
|
44
|
-
## [1.1.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.1.4...@contentful/field-editor-number@1.1.5) (2022-07-11)
|
|
45
|
-
|
|
46
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
47
|
-
|
|
48
|
-
## [1.1.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.1.3...@contentful/field-editor-number@1.1.4) (2022-06-22)
|
|
49
|
-
|
|
50
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
51
|
-
|
|
52
|
-
## [1.1.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.1.2...@contentful/field-editor-number@1.1.3) (2022-04-20)
|
|
53
|
-
|
|
54
|
-
### Bug Fixes
|
|
55
|
-
|
|
56
|
-
- change input type to number ([#1112](https://github.com/contentful/field-editors/issues/1112)) ([e759e6d](https://github.com/contentful/field-editors/commit/e759e6d939a22cdabbd21e283e364c490a87d94f))
|
|
57
|
-
|
|
58
|
-
## [1.1.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.1.1...@contentful/field-editor-number@1.1.2) (2022-02-15)
|
|
59
|
-
|
|
60
|
-
### Bug Fixes
|
|
61
|
-
|
|
62
|
-
- bump f36 packages ([#1025](https://github.com/contentful/field-editors/issues/1025)) ([ec37a40](https://github.com/contentful/field-editors/commit/ec37a4000db7cd75c66dd9621136b2272c9feeea))
|
|
63
|
-
|
|
64
|
-
## [1.1.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.1.0...@contentful/field-editor-number@1.1.1) (2022-02-14)
|
|
65
|
-
|
|
66
|
-
### Bug Fixes
|
|
67
|
-
|
|
68
|
-
- **number-editor:** use "text" input that syncs numeric value when valid ([#1020](https://github.com/contentful/field-editors/issues/1020)) ([0f38462](https://github.com/contentful/field-editors/commit/0f384623f969284d122255191397402bbb3e7763))
|
|
69
|
-
|
|
70
|
-
# [1.1.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.0.3...@contentful/field-editor-number@1.1.0) (2022-01-11)
|
|
71
|
-
|
|
72
|
-
### Features
|
|
73
|
-
|
|
74
|
-
- bump f36 packages to stable v4 [BAU-521] ([#988](https://github.com/contentful/field-editors/issues/988)) ([419cf56](https://github.com/contentful/field-editors/commit/419cf56692179b074fcfa2743469d5265ed98429))
|
|
75
|
-
|
|
76
|
-
## [1.0.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.0.2...@contentful/field-editor-number@1.0.3) (2021-12-23)
|
|
77
|
-
|
|
78
|
-
### Bug Fixes
|
|
79
|
-
|
|
80
|
-
- markdown buttons ([#968](https://github.com/contentful/field-editors/issues/968)) ([9803b98](https://github.com/contentful/field-editors/commit/9803b98c25d92df6148686ffe2749a77f7efdbb9))
|
|
81
|
-
|
|
82
|
-
## [1.0.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.0.1...@contentful/field-editor-number@1.0.2) (2021-12-20)
|
|
83
|
-
|
|
84
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
85
|
-
|
|
86
|
-
## [1.0.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@1.0.0...@contentful/field-editor-number@1.0.1) (2021-11-17)
|
|
87
|
-
|
|
88
|
-
### Bug Fixes
|
|
89
|
-
|
|
90
|
-
- **card-actions:** update forma 36 to fix card actions click issue ([#927](https://github.com/contentful/field-editors/issues/927)) ([3dfdef2](https://github.com/contentful/field-editors/commit/3dfdef2c2b0045f12ea94ddafca89a8e9f25e7d0))
|
|
91
|
-
|
|
92
|
-
# [1.0.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.14.0...@contentful/field-editor-number@1.0.0) (2021-11-04)
|
|
93
|
-
|
|
94
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
95
|
-
|
|
96
|
-
# [0.14.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.13.6...@contentful/field-editor-number@0.14.0) (2021-11-04)
|
|
97
|
-
|
|
98
|
-
### Features
|
|
99
|
-
|
|
100
|
-
- Forma v4 components adoption ([#805](https://github.com/contentful/field-editors/issues/805)) ([526bde6](https://github.com/contentful/field-editors/commit/526bde6e10e0ee3789705ec10fb31489af7ca59e))
|
|
101
|
-
|
|
102
|
-
### BREAKING CHANGES
|
|
103
|
-
|
|
104
|
-
- adopts a new Forma v4 beta
|
|
105
|
-
|
|
106
|
-
## [0.13.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.13.5...@contentful/field-editor-number@0.13.6) (2021-10-14)
|
|
107
|
-
|
|
108
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
109
|
-
|
|
110
|
-
## [0.13.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.13.4...@contentful/field-editor-number@0.13.5) (2021-10-06)
|
|
111
|
-
|
|
112
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
113
|
-
|
|
114
|
-
## [0.13.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.13.3...@contentful/field-editor-number@0.13.4) (2021-09-17)
|
|
115
|
-
|
|
116
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
117
|
-
|
|
118
|
-
## [0.13.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.13.2...@contentful/field-editor-number@0.13.3) (2021-09-16)
|
|
119
|
-
|
|
120
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
121
|
-
|
|
122
|
-
## [0.13.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.13.1...@contentful/field-editor-number@0.13.2) (2021-08-19)
|
|
123
|
-
|
|
124
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
125
|
-
|
|
126
|
-
## [0.13.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.13.0...@contentful/field-editor-number@0.13.1) (2021-07-29)
|
|
127
|
-
|
|
128
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
129
|
-
|
|
130
|
-
# [0.13.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.12.6...@contentful/field-editor-number@0.13.0) (2021-07-23)
|
|
131
|
-
|
|
132
|
-
### Features
|
|
133
|
-
|
|
134
|
-
- 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
|
|
135
|
-
|
|
136
|
-
## [0.12.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.12.3...@contentful/field-editor-number@0.12.6) (2021-07-06)
|
|
137
|
-
|
|
138
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
139
|
-
|
|
140
|
-
## [0.12.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.12.3...@contentful/field-editor-number@0.12.5) (2021-07-06)
|
|
141
|
-
|
|
142
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
143
|
-
|
|
144
|
-
## [0.12.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.12.3...@contentful/field-editor-number@0.12.4) (2021-06-23)
|
|
145
|
-
|
|
146
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
147
|
-
|
|
148
|
-
## [0.12.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.12.2...@contentful/field-editor-number@0.12.3) (2021-06-23)
|
|
149
|
-
|
|
150
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
151
|
-
|
|
152
|
-
## [0.12.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.12.1...@contentful/field-editor-number@0.12.2) (2021-06-22)
|
|
153
|
-
|
|
154
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
155
|
-
|
|
156
|
-
## [0.12.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.12.0...@contentful/field-editor-number@0.12.1) (2021-03-05)
|
|
157
|
-
|
|
158
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
159
|
-
|
|
160
|
-
# [0.12.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.11.2...@contentful/field-editor-number@0.12.0) (2021-02-19)
|
|
161
|
-
|
|
162
|
-
### Features
|
|
163
|
-
|
|
164
|
-
- bump min version of forma-36 ([#606](https://github.com/contentful/field-editors/issues/606)) ([fd57c7a](https://github.com/contentful/field-editors/commit/fd57c7a4312766af38c01507f17706ab22992617))
|
|
165
|
-
|
|
166
|
-
## [0.11.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.11.1...@contentful/field-editor-number@0.11.2) (2021-02-09)
|
|
167
|
-
|
|
168
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
169
|
-
|
|
170
|
-
## [0.11.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.11.0...@contentful/field-editor-number@0.11.1) (2021-02-01)
|
|
171
|
-
|
|
172
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
173
|
-
|
|
174
|
-
# [0.11.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.10.0...@contentful/field-editor-number@0.11.0) (2021-01-20)
|
|
175
|
-
|
|
176
|
-
### Features
|
|
177
|
-
|
|
178
|
-
- update minimal forma-36 versions to use updated design ([#565](https://github.com/contentful/field-editors/issues/565)) ([332c734](https://github.com/contentful/field-editors/commit/332c734bfaf54f0e9773fcbb460d743b1f5459ec))
|
|
179
|
-
|
|
180
|
-
# [0.10.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.9.5...@contentful/field-editor-number@0.10.0) (2021-01-12)
|
|
181
|
-
|
|
182
|
-
### Features
|
|
183
|
-
|
|
184
|
-
- update minimal required Forma version to the 3.73.12 ([#552](https://github.com/contentful/field-editors/issues/552)) ([2816fd9](https://github.com/contentful/field-editors/commit/2816fd960c28815faebf49a9ef8f4c4c0d91fc36))
|
|
185
|
-
|
|
186
|
-
## [0.9.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.9.4...@contentful/field-editor-number@0.9.5) (2020-12-16)
|
|
187
|
-
|
|
188
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
189
|
-
|
|
190
|
-
## [0.9.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.9.3...@contentful/field-editor-number@0.9.4) (2020-11-06)
|
|
191
|
-
|
|
192
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
193
|
-
|
|
194
|
-
## [0.9.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.9.2...@contentful/field-editor-number@0.9.3) (2020-11-06)
|
|
195
|
-
|
|
196
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
197
|
-
|
|
198
|
-
## [0.9.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.9.1...@contentful/field-editor-number@0.9.2) (2020-10-28)
|
|
199
|
-
|
|
200
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|
|
201
|
-
|
|
202
|
-
## [0.9.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-number@0.9.0...@contentful/field-editor-number@0.9.1) (2020-08-24)
|
|
203
|
-
|
|
204
|
-
**Note:** Version bump only for package @contentful/field-editor-number
|