@blaze-cms/react-page-builder 0.130.0-admin-updates.8 → 0.130.0-alpha.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/CHANGELOG.md +4 -60
- package/lib/components/Code/Code.js +3 -7
- package/lib/components/Code/Code.js.map +1 -1
- package/lib/components/DataSummary/helpers/build-loop-props-content.js +1 -3
- package/lib/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
- package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js +2 -3
- package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
- package/lib/components/Layout/Layout.js +10 -4
- package/lib/components/Layout/Layout.js.map +1 -1
- package/lib/components/SearchContent/SearchContent.js +6 -8
- package/lib/components/SearchContent/SearchContent.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilterContainer.js +1 -2
- package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib/components/SearchFilter/helpers/build-new-query.js +2 -3
- package/lib/components/SearchFilter/helpers/build-new-query.js.map +1 -1
- package/lib/components/SearchFilterSort/helpers/handle-sort-update.js +2 -5
- package/lib/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
- package/lib/components/SearchFilterSort/helpers/update-sort.js +1 -2
- package/lib/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
- package/lib/helpers/build-props-query.js +2 -5
- package/lib/helpers/build-props-query.js.map +1 -1
- package/lib/helpers/get-wrapped-value-with-link.js +3 -2
- package/lib/helpers/get-wrapped-value-with-link.js.map +1 -1
- package/lib/helpers/index.js +0 -7
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/parse-props-to-display.js +8 -13
- package/lib/helpers/parse-props-to-display.js.map +1 -1
- package/lib-es/components/Code/Code.js +4 -8
- package/lib-es/components/Code/Code.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/build-loop-props-content.js +1 -3
- package/lib-es/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js +3 -4
- package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
- package/lib-es/components/Layout/Layout.js +11 -5
- package/lib-es/components/Layout/Layout.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContent.js +6 -8
- package/lib-es/components/SearchContent/SearchContent.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilterContainer.js +1 -2
- package/lib-es/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/build-new-query.js +2 -3
- package/lib-es/components/SearchFilter/helpers/build-new-query.js.map +1 -1
- package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js +2 -7
- package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
- package/lib-es/components/SearchFilterSort/helpers/update-sort.js +2 -2
- package/lib-es/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
- package/lib-es/helpers/build-props-query.js +2 -4
- package/lib-es/helpers/build-props-query.js.map +1 -1
- package/lib-es/helpers/get-wrapped-value-with-link.js +2 -2
- package/lib-es/helpers/get-wrapped-value-with-link.js.map +1 -1
- package/lib-es/helpers/index.js +0 -1
- package/lib-es/helpers/index.js.map +1 -1
- package/lib-es/helpers/parse-props-to-display.js +9 -12
- package/lib-es/helpers/parse-props-to-display.js.map +1 -1
- package/package.json +10 -10
- package/src/components/Code/Code.js +3 -7
- package/src/components/DataSummary/helpers/build-loop-props-content.js +1 -4
- package/src/components/DataSummary/helpers/build-props-to-display-with-content.js +3 -6
- package/src/components/Layout/Layout.js +9 -2
- package/src/components/SearchContent/SearchContent.js +6 -8
- package/src/components/SearchFilter/SearchFilterContainer.js +1 -2
- package/src/components/SearchFilter/helpers/build-new-query.js +2 -3
- package/src/components/SearchFilterSort/helpers/handle-sort-update.js +3 -7
- package/src/components/SearchFilterSort/helpers/update-sort.js +2 -2
- package/src/helpers/build-props-query.js +2 -4
- package/src/helpers/get-wrapped-value-with-link.js +3 -6
- package/src/helpers/index.js +0 -1
- package/src/helpers/parse-props-to-display.js +21 -25
- package/tests/unit/src/components/Code/Code.test.js +0 -5
- package/tests/unit/src/components/Code/__snapshots__/Code.test.js.snap +0 -8
- package/tests/unit/src/components/DataSummary/helpers/build-loop-props-content.test.js +0 -9
- package/tests/unit/src/components/SearchFilter/helpers/build-new-query.test.js +1 -15
- package/tests/unit/src/components/SearchFilterSort/helpers/handle-sort-update.test.js +3 -9
- package/tests/unit/src/components/SearchFilterSort/helpers/update-sort.test.js +1 -10
- package/tests/unit/src/helpers/build-props-query.test.js +0 -25
- package/tests/unit/src/helpers/get-wrapped-value-with-link.test.js +2 -2
- package/tests/unit/src/helpers/parse-props-to-display.test.js +0 -4
- package/lib/helpers/process-data-summary-value.js +0 -56
- package/lib/helpers/process-data-summary-value.js.map +0 -1
- package/lib-es/helpers/process-data-summary-value.js +0 -36
- package/lib-es/helpers/process-data-summary-value.js.map +0 -1
- package/src/helpers/process-data-summary-value.js +0 -22
- package/tests/unit/src/helpers/__snapshots__/get-wrapped-value-with-link.test.js.snap +0 -18
- package/tests/unit/src/helpers/prcoess-data-summary-value.test.js +0 -52
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`get wrapped value with link func should return array with correponding value and link 1`] = `
|
|
4
|
-
<React.Fragment>
|
|
5
|
-
<React.Fragment>
|
|
6
|
-
test-name
|
|
7
|
-
,
|
|
8
|
-
</React.Fragment>
|
|
9
|
-
|
|
10
|
-
</React.Fragment>
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
exports[`get wrapped value with link func should return array with correponding value and link 2`] = `
|
|
14
|
-
<React.Fragment>
|
|
15
|
-
test-name2
|
|
16
|
-
|
|
17
|
-
</React.Fragment>
|
|
18
|
-
`;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jest-environment jsdom
|
|
3
|
-
*/
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import processDataSummaryValue from '../../../../src/helpers/process-data-summary-value';
|
|
6
|
-
import components from '../../../../src/components';
|
|
7
|
-
|
|
8
|
-
const { code: Code } = components;
|
|
9
|
-
|
|
10
|
-
const keyField = 'name';
|
|
11
|
-
const john = { keyField, name: 'John', age: 30 };
|
|
12
|
-
const jane = { keyField, name: 'Jane', age: 25 };
|
|
13
|
-
|
|
14
|
-
describe('processDataSummaryValue', () => {
|
|
15
|
-
test('should return the same value when isHtml is false', () => {
|
|
16
|
-
const value = 'Hello, world!';
|
|
17
|
-
const result = processDataSummaryValue(value, { isHtml: false });
|
|
18
|
-
expect(result).toBe(value);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
test('should render code when isHtml is true and objPropValue is a string', () => {
|
|
22
|
-
const value = 'value';
|
|
23
|
-
const result = processDataSummaryValue(value, { isHtml: true });
|
|
24
|
-
const expectedResult = <Code code={value} disableWrapper />;
|
|
25
|
-
expect(result).toEqual(expectedResult);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
test('should render code for each object property when isHtml is true and objPropValue is an array of objects', () => {
|
|
29
|
-
const value = [john, jane];
|
|
30
|
-
const result = processDataSummaryValue(value, { isHtml: true });
|
|
31
|
-
const expectedResult = [
|
|
32
|
-
{
|
|
33
|
-
keyField,
|
|
34
|
-
name: <Code code={john.name} disableWrapper />,
|
|
35
|
-
age: 30
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
keyField,
|
|
39
|
-
name: <Code code={jane.name} disableWrapper />,
|
|
40
|
-
age: 25
|
|
41
|
-
}
|
|
42
|
-
];
|
|
43
|
-
expect(result).toEqual(expectedResult);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
test('should not render code for the only property when isHtml is false and objPropValue is an object', () => {
|
|
47
|
-
const value = [john];
|
|
48
|
-
const result = processDataSummaryValue(value, { isHtml: false });
|
|
49
|
-
const expectedResult = [john];
|
|
50
|
-
expect(result).toEqual(expectedResult);
|
|
51
|
-
});
|
|
52
|
-
});
|