mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-04-12 15:40:30 +08:00
Merge branch 'develop' into main
This commit is contained in:
commit
b3f8cb7031
5
.changeset/great-elephants-flash.md
Normal file
5
.changeset/great-elephants-flash.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'@lowdefy/nunjucks': minor
|
||||
---
|
||||
|
||||
Add 'unique' filter to \_nunjucks.
|
6
.changeset/large-pens-dress.md
Normal file
6
.changeset/large-pens-dress.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
'@lowdefy/client': patch
|
||||
'@lowdefy/layout': patch
|
||||
---
|
||||
|
||||
Move layoutParamsToArea into Area component.
|
5
.changeset/lazy-bikes-suffer.md
Normal file
5
.changeset/lazy-bikes-suffer.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'@lowdefy/connection-mongodb': minor
|
||||
---
|
||||
|
||||
Add request type `MongoDBBulkWrite` to the MongoDB connection.
|
6
.changeset/thin-zebras-hear.md
Normal file
6
.changeset/thin-zebras-hear.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
'@lowdefy/client': patch
|
||||
'@lowdefy/layout': patch
|
||||
---
|
||||
|
||||
Remove highlightBorders from layout.
|
13
.github/workflows/release.yaml
vendored
13
.github/workflows/release.yaml
vendored
@ -12,16 +12,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'lowdefy/lowdefy'
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js 18.x
|
||||
uses: actions/setup-node@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18.x
|
||||
|
||||
- name: Enable pnpm
|
||||
run: corepack enable
|
||||
node-version: 20
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm i --frozen-lockfile
|
||||
|
4
.github/workflows/test-branches.yml
vendored
4
.github/workflows/test-branches.yml
vendored
@ -18,8 +18,8 @@ jobs:
|
||||
node: [18, 20]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v2
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: 'pnpm'
|
||||
|
4
.github/workflows/test-pulls.yml
vendored
4
.github/workflows/test-pulls.yml
vendored
@ -16,8 +16,8 @@ jobs:
|
||||
node: [18, 20]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v2
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: 'pnpm'
|
||||
|
@ -70,7 +70,6 @@ const CategorySwitch = ({ block, Blocks, context, loading, lowdefy }) => {
|
||||
<BlockLayout
|
||||
id={`bl-${block.blockId}`}
|
||||
blockStyle={block.eval.style}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
layout={block.eval.layout}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
@ -102,7 +101,6 @@ const CategorySwitch = ({ block, Blocks, context, loading, lowdefy }) => {
|
||||
<BlockLayout
|
||||
id={`bl-${block.blockId}`}
|
||||
blockStyle={block.eval.style}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
layout={block.eval.layout}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Area, BlockLayout, layoutParamsToArea } from '@lowdefy/layout';
|
||||
import { Area, BlockLayout } from '@lowdefy/layout';
|
||||
import { makeCssClass } from '@lowdefy/block-utils';
|
||||
|
||||
import Block from './Block.js';
|
||||
@ -27,25 +27,22 @@ const Container = ({ block, Blocks, Component, context, loading, lowdefy }) => {
|
||||
Object.keys(areas).forEach((areaKey, i) => {
|
||||
content[areaKey] = (areaStyle) => (
|
||||
<Area
|
||||
area={block.eval.areas[areaKey]}
|
||||
areaKey={areaKey}
|
||||
areaStyle={[areaStyle, block.eval.areas[areaKey]?.style]}
|
||||
id={`ar-${block.blockId}-${areaKey}`}
|
||||
key={`ar-${block.blockId}-${areaKey}-${i}`}
|
||||
area={layoutParamsToArea({
|
||||
area: block.eval.areas[areaKey],
|
||||
areaKey,
|
||||
layout: block.eval.layout,
|
||||
})}
|
||||
areaStyle={[areaStyle, block.eval.areas[areaKey]?.style]}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
layout={block.eval.layout}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
{areas[areaKey].blocks.map((bl, k) => (
|
||||
<Block
|
||||
key={`co-${bl.blockId}-${k}`}
|
||||
Blocks={Blocks.subBlocks[block.id][0]}
|
||||
block={bl}
|
||||
Blocks={Blocks.subBlocks[block.id][0]}
|
||||
context={context}
|
||||
parentLoading={loading}
|
||||
key={`co-${bl.blockId}-${k}`}
|
||||
lowdefy={lowdefy}
|
||||
parentLoading={loading}
|
||||
/>
|
||||
))}
|
||||
</Area>
|
||||
@ -53,9 +50,8 @@ const Container = ({ block, Blocks, Component, context, loading, lowdefy }) => {
|
||||
});
|
||||
return (
|
||||
<BlockLayout
|
||||
id={`bl-${block.blockId}`}
|
||||
blockStyle={block.eval.style}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
id={`bl-${block.blockId}`}
|
||||
layout={block.eval.layout}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Area, BlockLayout, layoutParamsToArea } from '@lowdefy/layout';
|
||||
import { Area, BlockLayout } from '@lowdefy/layout';
|
||||
import { makeCssClass } from '@lowdefy/block-utils';
|
||||
|
||||
import Block from './Block.js';
|
||||
@ -27,25 +27,22 @@ const List = ({ block, Blocks, Component, context, loading, lowdefy }) => {
|
||||
Object.keys(SBlock.areas).forEach((areaKey) => {
|
||||
content[areaKey] = (areaStyle) => (
|
||||
<Area
|
||||
area={block.eval.areas[areaKey]}
|
||||
areaKey={areaKey}
|
||||
areaStyle={[areaStyle, block.eval.areas[areaKey]?.style]}
|
||||
id={`ar-${block.blockId}-${SBlock.id}-${areaKey}`}
|
||||
key={`ar-${block.blockId}-${SBlock.id}-${areaKey}`}
|
||||
area={layoutParamsToArea({
|
||||
area: block.eval.areas[areaKey],
|
||||
areaKey,
|
||||
layout: block.eval.layout,
|
||||
})}
|
||||
areaStyle={[areaStyle, block.eval.areas[areaKey]?.style]}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
layout={block.eval.layout}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
{SBlock.areas[areaKey].blocks.map((bl) => (
|
||||
<Block
|
||||
key={`ls-${bl.blockId}`}
|
||||
Blocks={SBlock}
|
||||
block={bl}
|
||||
Blocks={SBlock}
|
||||
context={context}
|
||||
parentLoading={loading}
|
||||
key={`ls-${bl.blockId}`}
|
||||
lowdefy={lowdefy}
|
||||
parentLoading={loading}
|
||||
/>
|
||||
))}
|
||||
</Area>
|
||||
@ -55,9 +52,8 @@ const List = ({ block, Blocks, Component, context, loading, lowdefy }) => {
|
||||
});
|
||||
return (
|
||||
<BlockLayout
|
||||
id={`bl-${block.blockId}`}
|
||||
blockStyle={block.eval.style}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
id={`bl-${block.blockId}`}
|
||||
layout={block.eval.layout}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
|
@ -84,7 +84,6 @@ const LoadingBlock = ({
|
||||
return (
|
||||
<BlockLayout
|
||||
blockStyle={skeleton.style ?? blockStyle}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
id={`s-bl-${blockId}-${skeleton.id}`}
|
||||
layout={skeleton.layout ?? blockLayout}
|
||||
makeCssClass={makeCssClass}
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Area, BlockLayout, layoutParamsToArea } from '@lowdefy/layout';
|
||||
import { Area, BlockLayout } from '@lowdefy/layout';
|
||||
import { makeCssClass } from '@lowdefy/block-utils';
|
||||
|
||||
import LoadingBlock from './LoadingBlock.js';
|
||||
@ -35,15 +35,12 @@ const LoadingContainer = ({
|
||||
Object.keys(skeleton.areas).forEach((areaKey, i) => {
|
||||
content[areaKey] = (areaStyle) => (
|
||||
<Area
|
||||
area={layoutParamsToArea({
|
||||
area: skeleton.areas[areaKey],
|
||||
areaKey,
|
||||
layout: skeleton.layout ?? blockLayout,
|
||||
})}
|
||||
area={skeleton.areas[areaKey]}
|
||||
areaKey={areaKey}
|
||||
areaStyle={[areaStyle, skeleton.areas[areaKey]?.style]}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
id={`s-ar-${blockId}-${skeleton.id}-${areaKey}`}
|
||||
key={`s-ar-${blockId}-${skeleton.id}-${areaKey}-${i}`}
|
||||
layout={skeleton.layout ?? blockLayout}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
{skeleton.areas[areaKey].blocks.map((skl, k) => (
|
||||
@ -61,7 +58,6 @@ const LoadingContainer = ({
|
||||
return (
|
||||
<BlockLayout
|
||||
blockStyle={skeleton.style ?? blockStyle}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
id={`s-bl-${blockId}-${skeleton.id}`}
|
||||
layout={skeleton.layout ?? blockLayout}
|
||||
makeCssClass={makeCssClass}
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Area, BlockLayout, layoutParamsToArea } from '@lowdefy/layout';
|
||||
import { Area, BlockLayout } from '@lowdefy/layout';
|
||||
import { makeCssClass } from '@lowdefy/block-utils';
|
||||
|
||||
import LoadingBlock from './LoadingBlock.js';
|
||||
@ -36,15 +36,12 @@ const LoadingList = ({
|
||||
Object.keys(skeleton.areas).forEach((areaKey, i) => {
|
||||
content[areaKey] = (areaStyle) => (
|
||||
<Area
|
||||
area={layoutParamsToArea({
|
||||
area: skeleton.areas[areaKey],
|
||||
areaKey,
|
||||
layout: skeleton.layout ?? blockLayout,
|
||||
})}
|
||||
area={skeleton.areas[areaKey]}
|
||||
areaKey={areaKey}
|
||||
areaStyle={[areaStyle, skeleton.areas[areaKey]?.style]}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
id={`s-ar-${blockId}-${skeleton.id}-${areaKey}`}
|
||||
key={`s-ar-${blockId}-${skeleton.id}-${areaKey}-${i}`}
|
||||
layout={skeleton.layout ?? blockLayout}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
{skeleton.areas[areaKey].blocks.map((skl, k) => (
|
||||
@ -64,7 +61,6 @@ const LoadingList = ({
|
||||
return (
|
||||
<BlockLayout
|
||||
blockStyle={skeleton.style ?? blockStyle}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
id={`s-bl-${blockId}-${skeleton.id}`}
|
||||
layout={skeleton.layout ?? blockLayout}
|
||||
makeCssClass={makeCssClass}
|
||||
|
@ -109,7 +109,6 @@ _ref:
|
||||
- headerName: Viewer Reviews
|
||||
field: viewerReviews
|
||||
width: 160
|
||||
type: numericColumn
|
||||
- title: 'Format dates with cellRenderer'
|
||||
block:
|
||||
id: my_table
|
||||
@ -138,7 +137,6 @@ _ref:
|
||||
- headerName: Date
|
||||
field: date
|
||||
width: 160
|
||||
type: dateColumn
|
||||
cellRenderer:
|
||||
_function:
|
||||
__moment.format:
|
||||
@ -171,7 +169,6 @@ _ref:
|
||||
- headerName: Total
|
||||
field: total
|
||||
width: 160
|
||||
type: numericColumn
|
||||
valueFormatter:
|
||||
_function:
|
||||
__intl.numberFormat:
|
||||
@ -206,7 +203,6 @@ _ref:
|
||||
- headerName: Viewer Reviews
|
||||
field: viewerReviews
|
||||
width: 160
|
||||
type: numericColumn
|
||||
events:
|
||||
onRowClick:
|
||||
- id: set_selected
|
||||
@ -254,7 +250,6 @@ _ref:
|
||||
- headerName: Viewer Reviews
|
||||
field: viewerReviews
|
||||
width: 160
|
||||
type: numericColumn
|
||||
events:
|
||||
onCellClick:
|
||||
- id: set_selected
|
||||
@ -276,6 +271,76 @@ _ref:
|
||||
selection:
|
||||
_yaml.stringify:
|
||||
- _state: selected_cell
|
||||
- title: 'Using rowId to preserve selection'
|
||||
description: |
|
||||
This example shows a table switching between two sets of data. Some rows are common between the data sets and the data rows have a unique identifier field `uniqueId` which we can use as the `rowId` field to ensure selection is preserved when switching the data sets. If no `rowId` is set and the row data does not contain an `id` or `_id` field, and the row data JSON stringified is used as the row id. This still works but may slightly impact performance.
|
||||
block:
|
||||
id: my_table
|
||||
type: AgGridAlpine
|
||||
properties:
|
||||
height: 200
|
||||
rowId: uniqueId
|
||||
rowData:
|
||||
_state: table_data
|
||||
columnDefs:
|
||||
- headerName: Unique ID
|
||||
field: uniqueId
|
||||
checkboxSelection: true
|
||||
- headerName: Title
|
||||
field: title
|
||||
- headerName: Year
|
||||
field: year
|
||||
extra:
|
||||
id: table_data_box
|
||||
type: Box
|
||||
events:
|
||||
onMount:
|
||||
- id: init_value
|
||||
type: SetState
|
||||
params:
|
||||
table_data:
|
||||
- title: One
|
||||
year: 2010
|
||||
uniqueId: 2010-1
|
||||
- title: Two
|
||||
year: 2011
|
||||
uniqueId: 2011-1
|
||||
blocks:
|
||||
- id: table_data
|
||||
type: ButtonSelector
|
||||
properties:
|
||||
label:
|
||||
disabled: true
|
||||
options:
|
||||
- label: Data Set 1
|
||||
value:
|
||||
- title: One
|
||||
year: 2010
|
||||
uniqueId: 2010-1
|
||||
- title: Two
|
||||
year: 2011
|
||||
uniqueId: 2011-1
|
||||
- label: Data Set 2
|
||||
value:
|
||||
- title: Three
|
||||
year: 2011
|
||||
uniqueId: 2011-2
|
||||
- title: One
|
||||
year: 2010
|
||||
uniqueId: 2010-1
|
||||
- id: table_data_display
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content:
|
||||
_nunjucks:
|
||||
template: |
|
||||
```yaml
|
||||
{{ table_data | safe | indent(2) }}
|
||||
```
|
||||
on:
|
||||
table_data:
|
||||
_yaml.stringify:
|
||||
- _state: table_data
|
||||
- title: 'Server-side filter and sort'
|
||||
description: |
|
||||
This example shows how you can filter your table data server-side by making use of AgGrid's built in filter and sort functionality and calling the `onFilterChanged` and `onSortChanged` events. In this example we use dummy data, but you would pass in `_request: table_request` to `properties.rowData`.
|
||||
@ -311,7 +376,6 @@ _ref:
|
||||
- headerName: Viewer Reviews
|
||||
field: viewerReviews
|
||||
width: 160
|
||||
type: numericColumn
|
||||
events:
|
||||
onSortChanged:
|
||||
- id: set_table_sort
|
||||
@ -342,13 +406,6 @@ _ref:
|
||||
properties:
|
||||
content:
|
||||
_nunjucks:
|
||||
on:
|
||||
sort:
|
||||
_yaml.stringify:
|
||||
- _state: table.sort
|
||||
filter:
|
||||
_yaml.stringify:
|
||||
- _state: table.filter
|
||||
template: |
|
||||
onSortChanged response (only `sort`, not `rows`):
|
||||
```yaml
|
||||
@ -425,3 +482,11 @@ _ref:
|
||||
then: 1
|
||||
else: -1
|
||||
```
|
||||
|
||||
on:
|
||||
sort:
|
||||
_yaml.stringify:
|
||||
- _state: table.sort
|
||||
filter:
|
||||
_yaml.stringify:
|
||||
- _state: table.filter
|
||||
|
@ -106,6 +106,7 @@ _ref:
|
||||
|
||||
Request types:
|
||||
- MongoDBAggregation
|
||||
- MongoDBBulkWrite
|
||||
- MongoDBDeleteMany
|
||||
- MongoDBDeleteOne
|
||||
- MongoDBFind
|
||||
@ -171,6 +172,85 @@ _ref:
|
||||
score: 1
|
||||
```
|
||||
|
||||
### MongoDBBulkWrite
|
||||
|
||||
The `MongoDBBulkWrite` request executes [bulkWrite operations](https://www.mongodb.com/docs/manual/reference/method/db.collection.bulkWrite/#write-operations) in the collection specified in the connectionId.
|
||||
|
||||
#### Properties
|
||||
- `operations: object[]`: __Required__ - Array containing all the bulkWrite operations for the execution.
|
||||
- `insertOne: object`:
|
||||
- `document: object`: The document to be inserted.
|
||||
- `deleteOne: object`:
|
||||
- `filter: object`: __Required__ - The filter used to select the document to delete.
|
||||
- `collation: object`: Specify collation settings for update operation.
|
||||
- `deleteMany: object`:
|
||||
- `filter: object`: __Required__ - The filter used to select the documents to delete.
|
||||
- `collation: object`: Specify collation settings for update operation.
|
||||
- `updateOne: object`:
|
||||
- `filter: object`: __Required__ - The filter used to select the document to update.
|
||||
- `update: object | object[]`: __Required__ - The update operations to be applied to the document.
|
||||
- `upsert: object`: Insert document if no match is found.
|
||||
- `arrayFilters: string[]`: Array filters for the [`$[<identifier>]`](https://docs.mongodb.com/manual/reference/operator/update/positional-filtered/) array update operator.
|
||||
- `collation: object`: Specify collation settings for update operation.
|
||||
- `hint: object | string`: 'An optional hint for query optimization.'
|
||||
- `updateMany: object`:
|
||||
- `filter: object`: __Required__ - The filter used to select the documents to update.
|
||||
- `update: object | object[]`: __Required__ - The update operations to be applied to the documents.
|
||||
- `upsert: object`: Insert document if no match is found.
|
||||
- `arrayFilters: string[]`: Array filters for the [`$[<identifier>]`](https://docs.mongodb.com/manual/reference/operator/update/positional-filtered/) array update operator.
|
||||
- `collation: object`: Specify collation settings for update operation.
|
||||
- `hint: object | string`: An optional hint for query optimization.
|
||||
- `replaceOne: object`:
|
||||
- `filter: object`: __Required__ - The filter used to select the document to replace.
|
||||
- `replacement: object`: __Required__ - The document to be inserted.
|
||||
- `upsert: object`: Insert document if no match is found.
|
||||
- `collation: object`: Specify collation settings for update operation.
|
||||
- `hint: object | string`: An optional hint for query optimization.
|
||||
- `options: object`: Optional settings. See the [driver documentation](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#aggregate) for more information. Supported settings are:
|
||||
- `ordered: boolean`: Default: `true` - A boolean specifying whether the mongod instance should perform an ordered or unordered operation execution.
|
||||
- `writeConcern: object`: An object that expresses the write concern to use.
|
||||
|
||||
#### Examples
|
||||
|
||||
###### Update pizzas:
|
||||
|
||||
```yaml
|
||||
requests:
|
||||
- id: update_pizzas
|
||||
type: MongoDBBulkWrite
|
||||
connectionId: my_mongodb_collection_id
|
||||
properties:
|
||||
operations:
|
||||
- insertOne:
|
||||
document:
|
||||
_id: 3
|
||||
type: "beef"
|
||||
size: "medium"
|
||||
price: 6
|
||||
- insertOne:
|
||||
document:
|
||||
_id: 4
|
||||
type: "sausage"
|
||||
size: "large"
|
||||
price: 10
|
||||
- updateOne:
|
||||
filter:
|
||||
type: "cheese"
|
||||
update:
|
||||
$set:
|
||||
price: 8
|
||||
- deleteOne:
|
||||
filter:
|
||||
type: "pepperoni"
|
||||
- replaceOne:
|
||||
filter:
|
||||
type: "vegan"
|
||||
replacement:
|
||||
type: "tofu"
|
||||
size: "small"
|
||||
price: 4
|
||||
```
|
||||
|
||||
### MongoDBDeleteMany
|
||||
|
||||
The `MongoDBDeleteMany` request deletes multiple documents in the collection specified in the connectionId. It requires a filter, which is written in the query syntax, to select a documents to delete.
|
||||
|
@ -85,3 +85,35 @@ _ref:
|
||||
Returns: `"1 Aug 2022"`
|
||||
|
||||
The `_nunjucks` date filter formats dates using the [moment.js](/https://momentjs.com/docs/#/displaying/format/) library.
|
||||
|
||||
###### Use the _nunjucks unique filter:
|
||||
|
||||
```yaml
|
||||
_nunjucks:
|
||||
template: |
|
||||
<div>
|
||||
{% set uniqueArray = array | unique %}
|
||||
{% for item in uniqueArray %}
|
||||
<p>{{ item }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
on:
|
||||
array:
|
||||
- South Africa
|
||||
- New Zealand
|
||||
- Australia
|
||||
- South Africa
|
||||
- Pakistan
|
||||
- India
|
||||
- India
|
||||
```
|
||||
Returns:
|
||||
```html
|
||||
<div>
|
||||
<p>South Africa</p>
|
||||
<p>New Zealand</p>
|
||||
<p>Australia</p>
|
||||
<p>Pakistan</p>
|
||||
<p>India</p>
|
||||
</div>
|
||||
```
|
||||
|
@ -316,7 +316,7 @@ function makeBlockDefinition({
|
||||
},
|
||||
properties: {
|
||||
size: 'small',
|
||||
title: !labelDisabled && `${propertyName}:`,
|
||||
title: !labelDisabled ? `${propertyName}:` : undefined,
|
||||
bodyStyle: { padding: 0 },
|
||||
},
|
||||
};
|
||||
@ -341,7 +341,7 @@ function makeBlockDefinition({
|
||||
},
|
||||
properties: {
|
||||
size: 'small',
|
||||
title: !labelDisabled && `${propertyName}:`,
|
||||
title: !labelDisabled ? `${propertyName}:` : undefined,
|
||||
itemStyle: { padding: 0 },
|
||||
},
|
||||
};
|
||||
|
4
packages/docs/templates/test/array.test.js
vendored
4
packages/docs/templates/test/array.test.js
vendored
@ -193,7 +193,7 @@ test('array schemaArrayObject propertiesFormTransformer', () => {
|
||||
"padding": 0,
|
||||
},
|
||||
"size": "small",
|
||||
"title": false,
|
||||
"title": undefined,
|
||||
},
|
||||
"type": "Card",
|
||||
},
|
||||
@ -1220,7 +1220,7 @@ test('array propertiesFormTransformer schemaNestedArray', () => {
|
||||
"padding": 0,
|
||||
},
|
||||
"size": "small",
|
||||
"title": false,
|
||||
"title": undefined,
|
||||
},
|
||||
"type": "Card",
|
||||
},
|
||||
|
2
packages/docs/templates/test/yaml.test.js
vendored
2
packages/docs/templates/test/yaml.test.js
vendored
@ -481,7 +481,7 @@ test('yaml schemaYamlInObjectInArray propertiesFormTransformer', () => {
|
||||
"padding": 0,
|
||||
},
|
||||
"size": "small",
|
||||
"title": false,
|
||||
"title": undefined,
|
||||
},
|
||||
"type": "Card",
|
||||
},
|
||||
|
@ -19,25 +19,28 @@ import { Row } from 'antd';
|
||||
import { blockDefaultProps } from '@lowdefy/block-utils';
|
||||
|
||||
import gutterSetup from './gutterSetup.js';
|
||||
import layoutParamsToArea from './layoutParamsToArea.js';
|
||||
|
||||
const Area = ({ area = {}, areaStyle, children, highlightBorders, id, makeCssClass }) => (
|
||||
<Row
|
||||
id={id}
|
||||
align={area.align}
|
||||
className={makeCssClass(areaStyle)}
|
||||
gutter={gutterSetup(area.gutter)}
|
||||
justify={area.justify}
|
||||
style={{
|
||||
// antd keeps bottom margin which can cause overflow issues.
|
||||
flexDirection: area.direction,
|
||||
flexWrap: area.wrap,
|
||||
overflow: area.overflow,
|
||||
border: highlightBorders && '1px dashed red',
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</Row>
|
||||
);
|
||||
const Area = ({ area = {}, areaKey, areaStyle, children, id, layout, makeCssClass }) => {
|
||||
const derivedArea = layoutParamsToArea({ area, areaKey, layout });
|
||||
return (
|
||||
<Row
|
||||
id={id}
|
||||
align={derivedArea.align}
|
||||
className={makeCssClass(areaStyle)}
|
||||
gutter={gutterSetup(derivedArea.gutter)}
|
||||
justify={derivedArea.justify}
|
||||
style={{
|
||||
// antd keeps bottom margin which can cause overflow issues.
|
||||
flexDirection: derivedArea.direction,
|
||||
flexWrap: derivedArea.wrap,
|
||||
overflow: derivedArea.overflow,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</Row>
|
||||
);
|
||||
};
|
||||
|
||||
Area.defaultProps = blockDefaultProps;
|
||||
|
||||
|
@ -32,7 +32,7 @@ const alignSelf = (align) => {
|
||||
return align;
|
||||
};
|
||||
|
||||
const BlockLayout = ({ id, blockStyle, children, highlightBorders, layout = {}, makeCssClass }) => {
|
||||
const BlockLayout = ({ id, blockStyle, children, layout = {}, makeCssClass }) => {
|
||||
if (layout.disabled) {
|
||||
return (
|
||||
<div id={id} className={makeCssClass(blockStyle)}>
|
||||
@ -45,7 +45,6 @@ const BlockLayout = ({ id, blockStyle, children, highlightBorders, layout = {},
|
||||
{...deriveLayout(layout)}
|
||||
style={{
|
||||
alignSelf: alignSelf(layout.align),
|
||||
border: highlightBorders && '1px dashed #8eccf5',
|
||||
}}
|
||||
id={id}
|
||||
className={makeCssClass(blockStyle)}
|
||||
|
@ -16,6 +16,5 @@
|
||||
|
||||
import Area from './Area.js';
|
||||
import BlockLayout from './BlockLayout.js';
|
||||
import layoutParamsToArea from './layoutParamsToArea.js';
|
||||
|
||||
export { Area, BlockLayout, layoutParamsToArea };
|
||||
export { Area, BlockLayout };
|
||||
|
@ -21,11 +21,11 @@ const layoutParamsToArea = ({ areaKey, area = {}, layout = {} }) => {
|
||||
return area;
|
||||
}
|
||||
area.align = type.isNone(area.align) ? layout.contentAlign : area.align;
|
||||
area.justify = type.isNone(area.justify) ? layout.contentJustify : area.justify;
|
||||
area.direction = type.isNone(area.direction) ? layout.contentDirection : area.direction;
|
||||
area.wrap = type.isNone(area.wrap) ? layout.contentWrap : area.wrap;
|
||||
area.overflow = type.isNone(area.overflow) ? layout.contentOverflow : area.overflow;
|
||||
area.gutter = type.isNone(area.gutter) ? layout.contentGutter : area.gutter;
|
||||
area.justify = type.isNone(area.justify) ? layout.contentJustify : area.justify;
|
||||
area.overflow = type.isNone(area.overflow) ? layout.contentOverflow : area.overflow;
|
||||
area.wrap = type.isNone(area.wrap) ? layout.contentWrap : area.wrap;
|
||||
return area;
|
||||
};
|
||||
|
||||
|
@ -5,7 +5,6 @@ exports[`Button 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-Button23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -41,7 +40,6 @@ exports[`Input 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-Input23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<input
|
||||
class="ant-input"
|
||||
@ -58,7 +56,6 @@ exports[`Input 2`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-4"
|
||||
id="bl-Input23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<input
|
||||
class="ant-input"
|
||||
@ -75,7 +72,6 @@ exports[`Paragraph span: 12 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-Paragraph span: 1223456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Paragraph span: 1223456"
|
||||
@ -96,7 +92,6 @@ exports[`Paragraph style 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-Paragraph style23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Paragraph style23456"
|
||||
|
@ -17,88 +17,6 @@ exports[`align 1`] = `
|
||||
background: #40AA55;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-align23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="align23456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="align-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-4"
|
||||
id="bl-One23456"
|
||||
style="align-self: flex-start; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
id="One23456"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
One23456
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3 ant-col-xs-24 ant-col-sm-24 ant-col-md-4"
|
||||
id="bl-Two23456"
|
||||
style="align-self: center; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
id="Two23456"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Two23456
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-4"
|
||||
id="bl-Three23456"
|
||||
style="align-self: flex-end; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
id="Three23456"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
Three23456
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`align 2`] = `
|
||||
.emotion-1 {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
.emotion-4 {
|
||||
background: #40AA55;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -167,43 +85,6 @@ exports[`center content 1`] = `
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-center content23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="center content23456"
|
||||
>
|
||||
<div
|
||||
class="ant-row ant-row-center emotion-1"
|
||||
id="center content-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2"
|
||||
id="bl-One23456"
|
||||
style="flex: 0 1 800px; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`center content 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -243,59 +124,6 @@ exports[`grow 0 0 1`] = `
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-grow 0 023456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="grow 0 023456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="grow 0 0-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2"
|
||||
id="bl-One23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
grow: 0 - ONE Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3"
|
||||
id="bl-Two23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
grow: 0 - TWO Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`grow 0 0 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -347,59 +175,6 @@ exports[`grow 0 1 1`] = `
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-grow 0 123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="grow 0 123456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="grow 0 1-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2"
|
||||
id="bl-One23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
grow: 0 - ONE Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3"
|
||||
id="bl-Two23456"
|
||||
style="flex: 1 1 auto; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
grow: 1 - TWO Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`grow 0 1 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -451,59 +226,6 @@ exports[`grow 1 0 1`] = `
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-grow 1 023456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="grow 1 023456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="grow 1 0-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2"
|
||||
id="bl-One23456"
|
||||
style="flex: 1 1 auto; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
grow: 1 - ONE Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3"
|
||||
id="bl-Two23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
grow: 0 - TWO Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`grow 1 0 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -555,59 +277,6 @@ exports[`grow 1 1 1`] = `
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-grow 1 123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="grow 1 123456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="grow 1 1-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2"
|
||||
id="bl-One23456"
|
||||
style="flex: 1 1 auto; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
grow: 1 - ONE Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3"
|
||||
id="bl-Two23456"
|
||||
style="flex: 1 1 auto; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
grow: 1 - TWO Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`grow 1 1 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -659,59 +328,6 @@ exports[`offset 1`] = `
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-offset23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="offset23456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="offset-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-20 ant-col-md-offset-4"
|
||||
id="bl-One23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3 ant-col-xs-24 ant-col-sm-24 ant-col-md-10 ant-col-md-offset-4"
|
||||
id="bl-Two23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`offset 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -766,76 +382,6 @@ exports[`offset push pull span 1`] = `
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-offset push pull span23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="offset push pull span23456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="offset push pull span-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-6 ant-col-md-offset-2"
|
||||
id="bl-One23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
ONE Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3 ant-col-xs-24 ant-col-sm-24 ant-col-md-6 ant-col-md-push-1"
|
||||
id="bl-One23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
ONE Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-6 ant-col-md-pull-1"
|
||||
id="bl-Two23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
TWO Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`offset push pull span 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40AA55;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-4 {
|
||||
background: #FF4FaF;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -896,59 +442,6 @@ exports[`order 1`] = `
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-order23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="order23456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="order-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-24 ant-col-md-order-1"
|
||||
id="bl-One23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
ONE Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3 ant-col-xs-24 ant-col-sm-24 ant-col-md-24 ant-col-md-order-0"
|
||||
id="bl-Two23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
TWO Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`order 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -999,60 +492,6 @@ exports[`pull 1`] = `
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-pull23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="pull23456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="pull-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-10"
|
||||
id="bl-One23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
ONE Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3 ant-col-xs-24 ant-col-sm-24 ant-col-md-10 ant-col-md-pull-1"
|
||||
id="bl-Two23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
TWO Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`pull 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -1103,60 +542,6 @@ exports[`push 1`] = `
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-push23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="push23456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="push-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-10 ant-col-md-push-1"
|
||||
id="bl-One23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
ONE Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3 ant-col-xs-24 ant-col-sm-24 ant-col-md-10"
|
||||
id="bl-Two23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
TWO Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`push 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -1206,59 +591,6 @@ exports[`shrink 1 1 1`] = `
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-shrink 1 123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="shrink 1 123456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="shrink 1 1-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2"
|
||||
id="bl-One23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
shrink: 1 - ONE Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3"
|
||||
id="bl-Two23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
shrink: 1 - TWO Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`shrink 1 1 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -1310,59 +642,6 @@ exports[`size 1`] = `
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-size23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="size23456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="size-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2"
|
||||
id="bl-One23456"
|
||||
style="flex: 0 1 200px; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
size: 200 - ONE Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3"
|
||||
id="bl-Two23456"
|
||||
style="flex: 0 1 400px; border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
size: 400 - TWO Lorem ipsum dolor
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`size 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
@ -1414,71 +693,6 @@ exports[`span 1`] = `
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-span23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="span23456"
|
||||
>
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="span-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-4"
|
||||
id="bl-One23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="One23456"
|
||||
>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-3 ant-col-xs-24 ant-col-sm-24 ant-col-md-8"
|
||||
id="bl-Two23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Two23456"
|
||||
>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-15"
|
||||
id="bl-Three23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Three23456"
|
||||
>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`span 2`] = `
|
||||
.emotion-2 {
|
||||
background: #40a0FF;
|
||||
}
|
||||
|
||||
.emotion-3 {
|
||||
background: #FF4FaF;
|
||||
}
|
||||
|
||||
<div>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
|
@ -17,7 +17,6 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-Complex Example23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Complex Example23456"
|
||||
@ -25,12 +24,10 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="Complex Example-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-header23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="header23456"
|
||||
@ -38,12 +35,11 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="header-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-heading23456"
|
||||
style="flex: 1 0 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 1 0 auto;"
|
||||
>
|
||||
<div
|
||||
id="heading23456"
|
||||
@ -55,7 +51,7 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-feedback23456"
|
||||
style="flex: 0 1 auto; align-self: center; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto; align-self: center;"
|
||||
>
|
||||
<div
|
||||
id="feedback23456"
|
||||
@ -70,7 +66,6 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-tools23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="tools23456"
|
||||
@ -78,12 +73,11 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="tools-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-search23456"
|
||||
style="flex: 0 0 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 auto;"
|
||||
>
|
||||
<input
|
||||
class="ant-input"
|
||||
@ -95,7 +89,7 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Assign23456"
|
||||
style="flex: 0 0 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -110,7 +104,7 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Reporter23456"
|
||||
style="flex: 0 0 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -125,7 +119,7 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Status23456"
|
||||
style="flex: 0 0 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -140,7 +134,7 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Type23456"
|
||||
style="flex: 1 0 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 1 0 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -155,7 +149,7 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-advanced23456"
|
||||
style="flex: 0 0 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 auto;"
|
||||
>
|
||||
<div
|
||||
id="advanced23456"
|
||||
@ -170,7 +164,6 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-main23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="main23456"
|
||||
@ -178,12 +171,11 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="main-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-list_main23456"
|
||||
style="flex: 0 1 300px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 300px;"
|
||||
>
|
||||
<div
|
||||
id="list_main23456"
|
||||
@ -191,12 +183,10 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="list_main-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-list_tools23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="list_tools23456"
|
||||
@ -204,12 +194,11 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="list_tools-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Created23456"
|
||||
style="flex: 1 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 1 1 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -224,7 +213,7 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Fil23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -239,7 +228,7 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Ref23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -257,7 +246,6 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-list23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="list23456"
|
||||
@ -265,12 +253,10 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="list-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-25 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-26"
|
||||
@ -282,7 +268,6 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-25 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_223456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-26"
|
||||
@ -294,7 +279,6 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-25 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_323456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-26"
|
||||
@ -306,7 +290,6 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-25 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_423456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-26"
|
||||
@ -324,7 +307,7 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-main_content23456"
|
||||
style="flex: 1 1 200px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 1 1 200px;"
|
||||
>
|
||||
<div
|
||||
id="main_content23456"
|
||||
@ -332,12 +315,10 @@ exports[`Complex Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="main_content-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-content23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="content23456"
|
||||
@ -351,7 +332,6 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-comment23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="comment23456"
|
||||
@ -359,12 +339,11 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="comment-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-avatar23456"
|
||||
style="flex: 0 1 80px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 80px;"
|
||||
>
|
||||
<div
|
||||
class="emotion-26"
|
||||
@ -376,7 +355,7 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-input_comment23456"
|
||||
style="flex: 1 1 80px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 1 1 80px;"
|
||||
>
|
||||
<input
|
||||
class="ant-input"
|
||||
@ -394,7 +373,7 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-sider23456"
|
||||
style="flex: 0 1 200px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 200px;"
|
||||
>
|
||||
<div
|
||||
id="sider23456"
|
||||
@ -402,12 +381,10 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="sider-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-content23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="content23456"
|
||||
@ -419,7 +396,6 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-content23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="content23456"
|
||||
@ -431,7 +407,6 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-content23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="content23456"
|
||||
@ -443,7 +418,6 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-content23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="content23456"
|
||||
@ -481,7 +455,6 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-Complex No Flex Field Example23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="Complex No Flex Field Example23456"
|
||||
@ -489,12 +462,10 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="Complex No Flex Field Example-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-header23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="header23456"
|
||||
@ -502,12 +473,11 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="header-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-heading23456"
|
||||
style="flex: 1 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 1 1 auto;"
|
||||
>
|
||||
<div
|
||||
id="heading23456"
|
||||
@ -519,7 +489,7 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-feedback23456"
|
||||
style="flex: 0 1 auto; align-self: center; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto; align-self: center;"
|
||||
>
|
||||
<div
|
||||
id="feedback23456"
|
||||
@ -534,7 +504,6 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-tools23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="tools23456"
|
||||
@ -542,12 +511,11 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="tools-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-search23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto;"
|
||||
>
|
||||
<input
|
||||
class="ant-input"
|
||||
@ -559,7 +527,7 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Assign23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -574,7 +542,7 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Reporter23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -589,7 +557,7 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Status23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -604,7 +572,7 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Type23456"
|
||||
style="flex: 1 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 1 1 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -619,7 +587,7 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-advanced23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto;"
|
||||
>
|
||||
<div
|
||||
id="advanced23456"
|
||||
@ -634,7 +602,6 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-main23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="main23456"
|
||||
@ -642,12 +609,11 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="main-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-list_main23456"
|
||||
style="flex: 0 1 300px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 300px;"
|
||||
>
|
||||
<div
|
||||
id="list_main23456"
|
||||
@ -655,12 +621,10 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="list_main-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-list_tools23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="list_tools23456"
|
||||
@ -668,12 +632,11 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="list_tools-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Created23456"
|
||||
style="flex: 1 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 1 1 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -688,7 +651,7 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Fil23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -703,7 +666,7 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-Ref23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto;"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default"
|
||||
@ -721,7 +684,6 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-list23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="list23456"
|
||||
@ -729,12 +691,10 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="list-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-25 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-26"
|
||||
@ -746,7 +706,6 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-25 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_223456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-26"
|
||||
@ -758,7 +717,6 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-25 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_323456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-26"
|
||||
@ -770,7 +728,6 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-25 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_423456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-26"
|
||||
@ -788,7 +745,7 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-main_content23456"
|
||||
style="flex: 1 1 200px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 1 1 200px;"
|
||||
>
|
||||
<div
|
||||
id="main_content23456"
|
||||
@ -796,12 +753,10 @@ exports[`Complex No Flex Field Example 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="main_content-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-content23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="content23456"
|
||||
@ -815,7 +770,6 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-comment23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="comment23456"
|
||||
@ -823,12 +777,11 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="comment-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-avatar23456"
|
||||
style="flex: 0 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 auto;"
|
||||
>
|
||||
<div
|
||||
class="emotion-26"
|
||||
@ -840,7 +793,7 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-inputs_comment23456"
|
||||
style="flex: 1 1 auto; border: 1px dashed #8eccf5;"
|
||||
style="flex: 1 1 auto;"
|
||||
>
|
||||
<input
|
||||
class="ant-input"
|
||||
@ -858,7 +811,7 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-sider23456"
|
||||
style="flex: 0 1 200px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 1 200px;"
|
||||
>
|
||||
<div
|
||||
id="sider23456"
|
||||
@ -866,12 +819,10 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="sider-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-content23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="content23456"
|
||||
@ -883,7 +834,6 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-content23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="content23456"
|
||||
@ -895,7 +845,6 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-content23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="content23456"
|
||||
@ -907,7 +856,6 @@ The below config will fail for both the field on root and the field in the objec
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-content23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="content23456"
|
||||
|
@ -29,7 +29,6 @@ exports[`2 column stacking 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-2 column stacking23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="2 column stacking23456"
|
||||
@ -37,12 +36,10 @@ exports[`2 column stacking 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="2 column stacking-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-6"
|
||||
id="bl-b123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="b123456"
|
||||
@ -50,12 +47,10 @@ exports[`2 column stacking 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="b1-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-tile_one23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -70,7 +65,6 @@ exports[`2 column stacking 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-18"
|
||||
id="bl-b223456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="b223456"
|
||||
@ -78,12 +72,10 @@ exports[`2 column stacking 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="b2-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-8 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-tile_two23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -95,7 +87,6 @@ exports[`2 column stacking 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-10 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_three23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -107,7 +98,6 @@ exports[`2 column stacking 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-12 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_four23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -138,7 +128,6 @@ exports[`4 block grid 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-4 block grid23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="4 block grid23456"
|
||||
@ -146,12 +135,10 @@ exports[`4 block grid 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="4 block grid-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_one23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -163,7 +150,6 @@ exports[`4 block grid 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_two23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -175,7 +161,6 @@ exports[`4 block grid 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_three23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -187,7 +172,6 @@ exports[`4 block grid 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_four23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -215,7 +199,6 @@ exports[`4 block grid with gutter 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-4 block grid with gutter23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="4 block grid with gutter23456"
|
||||
@ -223,12 +206,12 @@ exports[`4 block grid with gutter 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="4 block grid with gutter-content23456"
|
||||
style="margin: -25px -25px -25px -25px; border: 1px dashed red;"
|
||||
style="margin: -25px -25px -25px -25px;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_one23456"
|
||||
style="padding: 25px 25px 25px 25px; border: 1px dashed #8eccf5;"
|
||||
style="padding: 25px 25px 25px 25px;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -240,7 +223,7 @@ exports[`4 block grid with gutter 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_two23456"
|
||||
style="padding: 25px 25px 25px 25px; border: 1px dashed #8eccf5;"
|
||||
style="padding: 25px 25px 25px 25px;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -252,7 +235,7 @@ exports[`4 block grid with gutter 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_three23456"
|
||||
style="padding: 25px 25px 25px 25px; border: 1px dashed #8eccf5;"
|
||||
style="padding: 25px 25px 25px 25px;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -264,7 +247,7 @@ exports[`4 block grid with gutter 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_four23456"
|
||||
style="padding: 25px 25px 25px 25px; border: 1px dashed #8eccf5;"
|
||||
style="padding: 25px 25px 25px 25px;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -308,7 +291,6 @@ exports[`4 block grid with various heights 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-4 block grid with various heights23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="4 block grid with various heights23456"
|
||||
@ -316,12 +298,10 @@ exports[`4 block grid with various heights 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="4 block grid with various heights-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_one23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -333,7 +313,6 @@ exports[`4 block grid with various heights 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_two23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -345,7 +324,6 @@ exports[`4 block grid with various heights 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-6 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_three23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -357,7 +335,6 @@ exports[`4 block grid with various heights 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-8 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_four23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -385,7 +362,6 @@ exports[`4 sequential blocks 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-4 sequential blocks23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="4 sequential blocks23456"
|
||||
@ -393,12 +369,10 @@ exports[`4 sequential blocks 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="4 sequential blocks-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-tile_one23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -410,7 +384,6 @@ exports[`4 sequential blocks 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-tile_two23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -422,7 +395,6 @@ exports[`4 sequential blocks 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-tile_three23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -434,7 +406,6 @@ exports[`4 sequential blocks 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-tile_four23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -466,7 +437,6 @@ exports[`typical dashboard 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-typical dashboard23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="typical dashboard23456"
|
||||
@ -474,12 +444,12 @@ exports[`typical dashboard 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="typical dashboard-content23456"
|
||||
style="margin: -5px -5px -5px -5px; border: 1px dashed red;"
|
||||
style="margin: -5px -5px -5px -5px;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-8"
|
||||
id="bl-tile_one23456"
|
||||
style="padding: 5px 5px 5px 5px; border: 1px dashed #8eccf5;"
|
||||
style="padding: 5px 5px 5px 5px;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -491,7 +461,7 @@ exports[`typical dashboard 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-8"
|
||||
id="bl-tile_two23456"
|
||||
style="padding: 5px 5px 5px 5px; border: 1px dashed #8eccf5;"
|
||||
style="padding: 5px 5px 5px 5px;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -503,7 +473,7 @@ exports[`typical dashboard 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-8"
|
||||
id="bl-tile_three23456"
|
||||
style="padding: 5px 5px 5px 5px; border: 1px dashed #8eccf5;"
|
||||
style="padding: 5px 5px 5px 5px;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -515,7 +485,7 @@ exports[`typical dashboard 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_four23456"
|
||||
style="padding: 5px 5px 5px 5px; border: 1px dashed #8eccf5;"
|
||||
style="padding: 5px 5px 5px 5px;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -527,7 +497,7 @@ exports[`typical dashboard 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-12"
|
||||
id="bl-tile_five23456"
|
||||
style="padding: 5px 5px 5px 5px; border: 1px dashed #8eccf5;"
|
||||
style="padding: 5px 5px 5px 5px;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
@ -539,7 +509,7 @@ exports[`typical dashboard 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-2 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-tile_six23456"
|
||||
style="padding: 5px 5px 5px 5px; border: 1px dashed #8eccf5;"
|
||||
style="padding: 5px 5px 5px 5px;"
|
||||
>
|
||||
<div
|
||||
class="emotion-3"
|
||||
|
@ -34,7 +34,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-basic kanban23456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
id="basic kanban23456"
|
||||
@ -42,12 +41,11 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-1"
|
||||
id="basic kanban-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-list_023456"
|
||||
style="flex: 0 0 400px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 400px;"
|
||||
>
|
||||
<div
|
||||
id="list_023456"
|
||||
@ -55,12 +53,10 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-3"
|
||||
id="list_0-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -72,7 +68,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_223456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -84,7 +79,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_323456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -96,7 +90,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_0_423456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -111,7 +104,7 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-list_123456"
|
||||
style="flex: 0 0 200px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 200px;"
|
||||
>
|
||||
<div
|
||||
id="list_123456"
|
||||
@ -119,12 +112,10 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-3"
|
||||
id="list_1-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_1_123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -136,7 +127,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_1_423456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -151,7 +141,7 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-list_223456"
|
||||
style="flex: 0 0 400px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 400px;"
|
||||
>
|
||||
<div
|
||||
id="list_223456"
|
||||
@ -159,12 +149,10 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-3"
|
||||
id="list_2-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_2_123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -176,7 +164,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_2_223456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -188,7 +175,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_2_323456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -203,7 +189,7 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-list_323456"
|
||||
style="flex: 0 0 400px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 400px;"
|
||||
>
|
||||
<div
|
||||
id="list_323456"
|
||||
@ -211,12 +197,10 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-3"
|
||||
id="list_3-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-28 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_3_123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -228,7 +212,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_3_223456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -240,7 +223,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-32 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_3_323456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -252,7 +234,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_3_423456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -267,7 +248,7 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-list_423456"
|
||||
style="flex: 0 0 400px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 400px;"
|
||||
>
|
||||
<div
|
||||
id="list_423456"
|
||||
@ -275,12 +256,10 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-3"
|
||||
id="list_4-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_4_123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -295,7 +274,7 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-list_523456"
|
||||
style="flex: 0 0 400px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 400px;"
|
||||
>
|
||||
<div
|
||||
id="list_523456"
|
||||
@ -303,12 +282,10 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-3"
|
||||
id="list_5-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_5_023456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -320,7 +297,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_5_123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -335,7 +311,7 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-0"
|
||||
id="bl-list_623456"
|
||||
style="flex: 0 0 400px; border: 1px dashed #8eccf5;"
|
||||
style="flex: 0 0 400px;"
|
||||
>
|
||||
<div
|
||||
id="list_623456"
|
||||
@ -343,12 +319,10 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-row emotion-3"
|
||||
id="list_6-content23456"
|
||||
style="border: 1px dashed red;"
|
||||
>
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_6_023456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -360,7 +334,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_6_123456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -372,7 +345,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_6_223456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
@ -384,7 +356,6 @@ exports[`basic kanban 1`] = `
|
||||
<div
|
||||
class="ant-col emotion-4 ant-col-xs-24 ant-col-sm-24 ant-col-md-24"
|
||||
id="bl-item_6_323456"
|
||||
style="border: 1px dashed #8eccf5;"
|
||||
>
|
||||
<div
|
||||
class="emotion-5"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -15,14 +15,14 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Area, BlockLayout, layoutParamsToArea } from '../../index.js';
|
||||
import { Area, BlockLayout } from '../../index.js';
|
||||
|
||||
import Block from './Block.js';
|
||||
import Box from './Box.js';
|
||||
import Button from './Button.js';
|
||||
import Input from './Input.js';
|
||||
import Paragraph from './Paragraph.js';
|
||||
import List from './List.js';
|
||||
import Paragraph from './Paragraph.js';
|
||||
|
||||
const Blocks = {
|
||||
Block,
|
||||
@ -42,7 +42,7 @@ const randomId = () => Math.random().toString().slice(3, 8);
|
||||
const Loading = ({ loading, children, showLoading = true }) =>
|
||||
loading && showLoading ? <span>Loading</span> : <>{children}</>;
|
||||
|
||||
const AutoBlock = ({ block, makeCssClass, highlightBorders }) => {
|
||||
const AutoBlock = ({ block, makeCssClass }) => {
|
||||
const content = {};
|
||||
let areas;
|
||||
let Comp = Blocks[block.type];
|
||||
@ -67,24 +67,16 @@ const AutoBlock = ({ block, makeCssClass, highlightBorders }) => {
|
||||
Object.keys(areas || {}).forEach((areaKey) => {
|
||||
content[areaKey] = (areaStyle) => (
|
||||
<Area
|
||||
area={layoutParamsToArea({
|
||||
area: areas[areaKey],
|
||||
areaKey,
|
||||
layout: block.layout,
|
||||
})}
|
||||
area={areas[areaKey]}
|
||||
areaKey={areaKey}
|
||||
areaStyle={[areaStyle, areas[areaKey]?.style]}
|
||||
highlightBorders={highlightBorders}
|
||||
id={`${block.id}-${areaKey}${randomId()}`}
|
||||
key={`${block.id}-${areaKey}`}
|
||||
layout={block.layout}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
{(areas[areaKey].blocks || []).map((bl, i) => (
|
||||
<BindAutoBlock
|
||||
key={`${bl.id}-${i}`}
|
||||
block={bl}
|
||||
makeCssClass={makeCssClass}
|
||||
highlightBorders={highlightBorders}
|
||||
/>
|
||||
<BindAutoBlock key={`${bl.id}-${i}`} block={bl} makeCssClass={makeCssClass} />
|
||||
))}
|
||||
</Area>
|
||||
);
|
||||
@ -108,22 +100,16 @@ const AutoBlock = ({ block, makeCssClass, highlightBorders }) => {
|
||||
}
|
||||
};
|
||||
|
||||
const BindAutoBlock = ({ block, state, makeCssClass, highlightBorders }) => {
|
||||
const BindAutoBlock = ({ block, state, makeCssClass }) => {
|
||||
return (
|
||||
<Loading id={`${block.id}-loading`} showLoading>
|
||||
<BlockLayout
|
||||
id={`bl-${block.id}${randomId()}`}
|
||||
highlightBorders={highlightBorders}
|
||||
layout={block.layout}
|
||||
blockStyle={block.style}
|
||||
id={`bl-${block.id}${randomId()}`}
|
||||
layout={block.layout}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
<AutoBlock
|
||||
block={block}
|
||||
state={state}
|
||||
makeCssClass={makeCssClass}
|
||||
highlightBorders={highlightBorders}
|
||||
/>
|
||||
<AutoBlock block={block} state={state} makeCssClass={makeCssClass} />
|
||||
</BlockLayout>
|
||||
</Loading>
|
||||
);
|
||||
|
@ -18,4 +18,3 @@ import col from './col.yaml';
|
||||
import runExampleTests from './runExampleTests.js';
|
||||
|
||||
runExampleTests(col);
|
||||
runExampleTests(col, { highlightBorders: false });
|
||||
|
@ -18,4 +18,3 @@ import row from './row.yaml';
|
||||
import runExampleTests from './runExampleTests.js';
|
||||
|
||||
runExampleTests(row);
|
||||
runExampleTests(row, { highlightBorders: false });
|
||||
|
@ -25,7 +25,7 @@ const mockMath = Object.create(global.Math);
|
||||
mockMath.random = () => 0.123456789;
|
||||
global.Math = mockMath;
|
||||
|
||||
const runExampleTests = (examples, options = { highlightBorders: true }) => {
|
||||
const runExampleTests = (examples) => {
|
||||
beforeEach(() => {
|
||||
Object.defineProperty(window, 'matchMedia', {
|
||||
writable: true,
|
||||
@ -45,13 +45,7 @@ const runExampleTests = (examples, options = { highlightBorders: true }) => {
|
||||
examples.forEach((ex) => {
|
||||
test(ex.id, () => {
|
||||
const { container } = render(
|
||||
<AutoBlockSim
|
||||
block={ex}
|
||||
state={{}}
|
||||
areaKey="content"
|
||||
makeCssClass={makeCssClass}
|
||||
highlightBorders={options.highlightBorders}
|
||||
/>
|
||||
<AutoBlockSim block={ex} state={{}} areaKey="content" makeCssClass={makeCssClass} />
|
||||
);
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
@ -35,6 +35,15 @@ const AgGrid = ({ properties, methods, loading, events }) => {
|
||||
|
||||
const memoDefaultColDef = useMemo(() => defaultColDef);
|
||||
|
||||
const getRowId = useCallback(
|
||||
(params) =>
|
||||
params.data[properties.rowId] ??
|
||||
params.data.id ??
|
||||
params.data._id ??
|
||||
JSON.stringify(params.data),
|
||||
[]
|
||||
);
|
||||
|
||||
const onRowClick = useCallback((event) => {
|
||||
if (events.onRowClick) {
|
||||
methods.triggerEvent({
|
||||
@ -92,7 +101,7 @@ const AgGrid = ({ properties, methods, loading, events }) => {
|
||||
name: 'onFilterChanged',
|
||||
event: {
|
||||
rows: event.api.rowModel.rowsToDisplay.map((row) => row.data),
|
||||
filter: this.gridApi.getFilterModel(),
|
||||
filter: gridRef.current.api.getFilterModel(),
|
||||
},
|
||||
});
|
||||
}
|
||||
@ -158,6 +167,7 @@ const AgGrid = ({ properties, methods, loading, events }) => {
|
||||
modules={[ClientSideRowModelModule, CsvExportModule]}
|
||||
columnDefs={processColDefs(columnDefs, methods)}
|
||||
ref={gridRef}
|
||||
getRowId={getRowId}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -29,6 +29,15 @@ const AgGridInput = ({ properties, methods, loading, events, value }) => {
|
||||
|
||||
const memoDefaultColDef = useMemo(() => defaultColDef);
|
||||
|
||||
const getRowId = useCallback(
|
||||
(params) =>
|
||||
params.data[properties.rowId] ??
|
||||
params.data.id ??
|
||||
params.data._id ??
|
||||
JSON.stringify(params.data),
|
||||
[]
|
||||
);
|
||||
|
||||
const onRowClick = useCallback((event) => {
|
||||
if (events.onRowClick) {
|
||||
methods.triggerEvent({
|
||||
@ -86,7 +95,7 @@ const AgGridInput = ({ properties, methods, loading, events, value }) => {
|
||||
name: 'onFilterChanged',
|
||||
event: {
|
||||
rows: event.api.rowModel.rowsToDisplay.map((row) => row.data),
|
||||
filter: this.gridApi.getFilterModel(),
|
||||
filter: gridRef.current.api.getFilterModel(),
|
||||
},
|
||||
});
|
||||
}
|
||||
@ -208,6 +217,7 @@ const AgGridInput = ({ properties, methods, loading, events, value }) => {
|
||||
modules={[ClientSideRowModelModule, CsvExportModule]}
|
||||
columnDefs={processColDefs(columnDefs, methods)}
|
||||
ref={gridRef}
|
||||
getRowId={getRowId}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -14,6 +14,10 @@
|
||||
"type": "array",
|
||||
"description": "The list of data to display on the table."
|
||||
},
|
||||
"rowId": {
|
||||
"type": "string",
|
||||
"description": "The data field to use in `getRowId` which results in Row Selection being maintained across Row Data changes (assuming the Row exists in both sets). See Ag Grid docs for more details (https://www.ag-grid.com/react-data-grid/data-update-row-data/)."
|
||||
},
|
||||
"defaultColDef": {
|
||||
"type": "object",
|
||||
"description": "Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/)."
|
||||
|
@ -14,6 +14,10 @@
|
||||
"type": "array",
|
||||
"description": "The list of data to display on the table."
|
||||
},
|
||||
"rowId": {
|
||||
"type": "string",
|
||||
"description": "The data field to use in `getRowId` which results in Row Selection being maintained across Row Data changes (assuming the Row exists in both sets). See Ag Grid docs for more details (https://www.ag-grid.com/react-data-grid/data-update-row-data/)."
|
||||
},
|
||||
"defaultColDef": {
|
||||
"type": "object",
|
||||
"description": "Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/)."
|
||||
|
@ -14,6 +14,10 @@
|
||||
"type": "array",
|
||||
"description": "The list of data to display on the table."
|
||||
},
|
||||
"rowId": {
|
||||
"type": "string",
|
||||
"description": "The data field to use in `getRowId` which results in Row Selection being maintained across Row Data changes (assuming the Row exists in both sets). See Ag Grid docs for more details (https://www.ag-grid.com/react-data-grid/data-update-row-data/)."
|
||||
},
|
||||
"defaultColDef": {
|
||||
"type": "object",
|
||||
"description": "Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/)."
|
||||
|
@ -14,6 +14,10 @@
|
||||
"type": "array",
|
||||
"description": "The list of data to display on the table."
|
||||
},
|
||||
"rowId": {
|
||||
"type": "string",
|
||||
"description": "The data field to use in `getRowId` which results in Row Selection being maintained across Row Data changes (assuming the Row exists in both sets). See Ag Grid docs for more details (https://www.ag-grid.com/react-data-grid/data-update-row-data/)."
|
||||
},
|
||||
"defaultColDef": {
|
||||
"type": "object",
|
||||
"description": "Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/)."
|
||||
|
@ -14,6 +14,10 @@
|
||||
"type": "array",
|
||||
"description": "The list of data to display on the table."
|
||||
},
|
||||
"rowId": {
|
||||
"type": "string",
|
||||
"description": "The data field to use in `getRowId` which results in Row Selection being maintained across Row Data changes (assuming the Row exists in both sets). See Ag Grid docs for more details (https://www.ag-grid.com/react-data-grid/data-update-row-data/)."
|
||||
},
|
||||
"defaultColDef": {
|
||||
"type": "object",
|
||||
"description": "Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/)."
|
||||
|
@ -14,6 +14,10 @@
|
||||
"type": "array",
|
||||
"description": "The list of data to display on the table."
|
||||
},
|
||||
"rowId": {
|
||||
"type": "string",
|
||||
"description": "The data field to use in `getRowId` which results in Row Selection being maintained across Row Data changes (assuming the Row exists in both sets). See Ag Grid docs for more details (https://www.ag-grid.com/react-data-grid/data-update-row-data/)."
|
||||
},
|
||||
"defaultColDef": {
|
||||
"type": "object",
|
||||
"description": "Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/)."
|
||||
|
@ -14,6 +14,10 @@
|
||||
"type": "array",
|
||||
"description": "The list of data to display on the table."
|
||||
},
|
||||
"rowId": {
|
||||
"type": "string",
|
||||
"description": "The data field to use in `getRowId` which results in Row Selection being maintained across Row Data changes (assuming the Row exists in both sets). See Ag Grid docs for more details (https://www.ag-grid.com/react-data-grid/data-update-row-data/)."
|
||||
},
|
||||
"defaultColDef": {
|
||||
"type": "object",
|
||||
"description": "Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/)."
|
||||
|
@ -14,6 +14,10 @@
|
||||
"type": "array",
|
||||
"description": "The list of data to display on the table."
|
||||
},
|
||||
"rowId": {
|
||||
"type": "string",
|
||||
"description": "The data field to use in `getRowId` which results in Row Selection being maintained across Row Data changes (assuming the Row exists in both sets). See Ag Grid docs for more details (https://www.ag-grid.com/react-data-grid/data-update-row-data/)."
|
||||
},
|
||||
"defaultColDef": {
|
||||
"type": "object",
|
||||
"description": "Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/)."
|
||||
|
@ -14,6 +14,10 @@
|
||||
"type": "array",
|
||||
"description": "The list of data to display on the table."
|
||||
},
|
||||
"rowId": {
|
||||
"type": "string",
|
||||
"description": "The data field to use in `getRowId` which results in Row Selection being maintained across Row Data changes (assuming the Row exists in both sets). See Ag Grid docs for more details (https://www.ag-grid.com/react-data-grid/data-update-row-data/)."
|
||||
},
|
||||
"defaultColDef": {
|
||||
"type": "object",
|
||||
"description": "Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/)."
|
||||
|
@ -14,6 +14,10 @@
|
||||
"type": "array",
|
||||
"description": "The list of data to display on the table."
|
||||
},
|
||||
"rowId": {
|
||||
"type": "string",
|
||||
"description": "The data field to use in `getRowId` which results in Row Selection being maintained across Row Data changes (assuming the Row exists in both sets). See Ag Grid docs for more details (https://www.ag-grid.com/react-data-grid/data-update-row-data/)."
|
||||
},
|
||||
"defaultColDef": {
|
||||
"type": "object",
|
||||
"description": "Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/)."
|
||||
|
@ -20,6 +20,10 @@
|
||||
{
|
||||
"name": "Gerrie van Wyk",
|
||||
"url": "https://github.com/Gervwyk"
|
||||
},
|
||||
{
|
||||
"name": "Stephanie Smit",
|
||||
"url": "https://github.com/StephanieJKS"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright 2020-2024 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import getCollection from '../getCollection.js';
|
||||
import { serialize, deserialize } from '../serialize.js';
|
||||
import schema from './schema.js';
|
||||
|
||||
async function MongodbBulkWrite({ connection, request }) {
|
||||
const deserializedRequest = deserialize(request);
|
||||
const { operations, options } = deserializedRequest;
|
||||
const { collection, client } = await getCollection({ connection });
|
||||
let response;
|
||||
try {
|
||||
response = await collection.bulkWrite(operations, options);
|
||||
} catch (error) {
|
||||
await client.close();
|
||||
throw error;
|
||||
}
|
||||
await client.close();
|
||||
return serialize(response);
|
||||
}
|
||||
|
||||
MongodbBulkWrite.schema = schema;
|
||||
MongodbBulkWrite.meta = {
|
||||
checkRead: false,
|
||||
checkWrite: true,
|
||||
};
|
||||
|
||||
export default MongodbBulkWrite;
|
@ -0,0 +1,475 @@
|
||||
/*
|
||||
Copyright 2020-2024 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { validate } from '@lowdefy/ajv';
|
||||
import MongoDBBulkWrite from './MongoDBBulkWrite.js';
|
||||
import populateTestMongoDb from '../../../../test/populateTestMongoDb.js';
|
||||
|
||||
const { checkRead, checkWrite } = MongoDBBulkWrite.meta;
|
||||
const schema = MongoDBBulkWrite.schema;
|
||||
|
||||
const operations = [{}];
|
||||
|
||||
const databaseUri = process.env.MONGO_URL;
|
||||
const databaseName = 'test';
|
||||
const collection = 'bulkWrite';
|
||||
const documents = [
|
||||
{ _id: 'deleteMany' },
|
||||
{ _id: 'deleteMany_1' },
|
||||
{ _id: 'deleteMany_2' },
|
||||
{ _id: 'deleteMany_3' },
|
||||
{ _id: 'deleteMany_4', f: 'deleteMany' },
|
||||
{ _id: 'deleteMany_5', f: 'deleteMany' },
|
||||
{ _id: 'deleteMany_6', f: 'deleteMany' },
|
||||
{ _id: 'deleteOne' },
|
||||
{ _id: 'updateMany', v: 'before' },
|
||||
{ _id: 'updateMany_1', v: 'before' },
|
||||
{ _id: 'updateMany_2', v: 'before' },
|
||||
{ _id: 'updateMany_3', v: 'before' },
|
||||
{ _id: 'updateMany_4', v: 'before', f: 'updateMany' },
|
||||
{ _id: 'updateMany_5', v: 'before', f: 'updateMany' },
|
||||
{ _id: 'updateMany_6', v: 'before', f: 'updateMany' },
|
||||
{ _id: 'updateOne', v: 'before' },
|
||||
{ _id: 'replaceOne', v: 'before' },
|
||||
];
|
||||
|
||||
beforeAll(() => {
|
||||
return populateTestMongoDb({ collection, documents });
|
||||
});
|
||||
|
||||
test('bulkWrite connection error', async () => {
|
||||
const request = { operations };
|
||||
const connection = {
|
||||
databaseUri: 'bad_uri',
|
||||
databaseName,
|
||||
collection,
|
||||
read: true,
|
||||
};
|
||||
await expect(MongoDBBulkWrite({ request, connection })).rejects.toThrow(
|
||||
'Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"'
|
||||
);
|
||||
});
|
||||
|
||||
test('checkRead should be false', async () => {
|
||||
expect(checkRead).toBe(false);
|
||||
});
|
||||
|
||||
test('checkWrite should be true', async () => {
|
||||
expect(checkWrite).toBe(true);
|
||||
});
|
||||
|
||||
test('request not an object', async () => {
|
||||
const request = 'request';
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'MongoDBBulkWrite request properties should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('bulkWrite no operations', async () => {
|
||||
const request = {};
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'MongoDBBulkWrite request should have required property "operations".'
|
||||
);
|
||||
});
|
||||
|
||||
test('bulkWrite operations not an array of objects', async () => {
|
||||
const request = { operations: 'operations' };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'MongoDBBulkWrite request property "operations" should be an array.'
|
||||
);
|
||||
});
|
||||
|
||||
test('bulkWrite operations not an array', async () => {
|
||||
const request = { operations: ['operations'] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'MongoDBBulkWrite request property "operations" should be an array of write operation objects.'
|
||||
);
|
||||
});
|
||||
|
||||
test('bulkWrite operation not a valid write operation', async () => {
|
||||
const request = { operations: [{ notValidOperation: 'notValidOperation' }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'MongoDBBulkWrite operation should be a write operation.'
|
||||
);
|
||||
});
|
||||
|
||||
test('bulkWrite options not an object', async () => {
|
||||
const request = { operations, options: 'options' };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'MongoDBBulkWrite request property "options" should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('insertOne operation not an object', async () => {
|
||||
const request = { operations: [{ insertOne: 'insertOne' }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'insertOne operation should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('insertOne operation document not an object', async () => {
|
||||
const request = { operations: [{ insertOne: { document: 'document' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'insertOne operation property "document" should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('insertOne operation no document', async () => {
|
||||
const request = { operations: [{ insertOne: { property: 'property' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'insertOne operation should have required property "document".'
|
||||
);
|
||||
});
|
||||
|
||||
test('updateOne operation not an object', async () => {
|
||||
const request = { operations: [{ updateOne: 'updateOne' }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'updateOne operation should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('updateOne operation filter not an object', async () => {
|
||||
const request = { operations: [{ updateOne: { filter: 'filter' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'updateOne operation property "filter" should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('updateOne operation update not an object', async () => {
|
||||
const request = { operations: [{ updateOne: { filter: { _id: 1 }, update: 'update' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'updateOne operation property "update" should be an object or an array.'
|
||||
);
|
||||
});
|
||||
|
||||
test('updateOne operation no filter', async () => {
|
||||
const request = { operations: [{ updateOne: { property: 'property' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'updateOne operation should have required property "filter".'
|
||||
);
|
||||
});
|
||||
|
||||
test('updateOne operation no update', async () => {
|
||||
const request = { operations: [{ updateOne: { filter: { _id: 1 } } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'updateOne operation should have required property "update".'
|
||||
);
|
||||
});
|
||||
|
||||
test('updateMany operation not an object', async () => {
|
||||
const request = { operations: [{ updateMany: 'updateMany' }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'updateMany operation should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('updateMany operation filter not an object', async () => {
|
||||
const request = { operations: [{ updateMany: { filter: 'filter' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'updateMany operation property "filter" should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('updateMany operation update not an object', async () => {
|
||||
const request = { operations: [{ updateMany: { filter: { _id: 1 }, update: 'update' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'updateMany operation property "update" should be an object or an array.'
|
||||
);
|
||||
});
|
||||
|
||||
test('updateMany operation no filter', async () => {
|
||||
const request = { operations: [{ updateMany: { property: 'property' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'updateMany operation should have required property "filter".'
|
||||
);
|
||||
});
|
||||
|
||||
test('updateMany operation no update', async () => {
|
||||
const request = { operations: [{ updateMany: { filter: { _id: 1 } } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'updateMany operation should have required property "update".'
|
||||
);
|
||||
});
|
||||
|
||||
test('deleteOne operation not an object', async () => {
|
||||
const request = { operations: [{ deleteOne: 'deleteOne' }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'deleteOne operation should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('deleteOne operation filter not an object', async () => {
|
||||
const request = { operations: [{ deleteOne: { filter: 'filter' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'deleteOne operation property "filter" should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('deleteOne operation no filter', async () => {
|
||||
const request = { operations: [{ deleteOne: { property: 'property' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'deleteOne operation should have required property "filter".'
|
||||
);
|
||||
});
|
||||
|
||||
test('deleteMany operation not an object', async () => {
|
||||
const request = { operations: [{ deleteMany: 'deleteMany' }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'deleteMany operation should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('deleteMany operation filter not an object', async () => {
|
||||
const request = { operations: [{ deleteMany: { filter: 'filter' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'deleteMany operation property "filter" should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('deleteMany operation no filter', async () => {
|
||||
const request = { operations: [{ deleteMany: { property: 'property' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'deleteMany operation should have required property "filter".'
|
||||
);
|
||||
});
|
||||
|
||||
test('replaceOne operation not an object', async () => {
|
||||
const request = { operations: [{ replaceOne: 'replaceOne' }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'replaceOne operation should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('replaceOne operation filter not an object', async () => {
|
||||
const request = { operations: [{ replaceOne: { filter: 'filter' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'replaceOne operation property "filter" should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('replaceOne operation update not an object', async () => {
|
||||
const request = {
|
||||
operations: [{ replaceOne: { filter: { _id: 1 }, replacement: 'replacement' } }],
|
||||
};
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'replaceOne operation property "replacement" should be an object.'
|
||||
);
|
||||
});
|
||||
|
||||
test('replaceOne operation no filter', async () => {
|
||||
const request = { operations: [{ replaceOne: { property: 'property' } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'replaceOne operation should have required property "filter".'
|
||||
);
|
||||
});
|
||||
|
||||
test('replaceOne operation no replacement', async () => {
|
||||
const request = { operations: [{ replaceOne: { filter: { _id: 1 } } }] };
|
||||
expect(() => validate({ schema, data: request })).toThrow(
|
||||
'replaceOne operation should have required property "replacement".'
|
||||
);
|
||||
});
|
||||
|
||||
test('insertOne', async () => {
|
||||
const request = { operations: [{ insertOne: { document: { _id: 'insertOne' } } }] };
|
||||
const connection = {
|
||||
databaseUri,
|
||||
databaseName,
|
||||
collection,
|
||||
write: true,
|
||||
};
|
||||
const res = await MongoDBBulkWrite({ request, connection });
|
||||
expect(res).toEqual({
|
||||
insertedCount: 1,
|
||||
insertedIds: { 0: 'insertOne' },
|
||||
matchedCount: 0,
|
||||
modifiedCount: 0,
|
||||
deletedCount: 0,
|
||||
upsertedCount: 0,
|
||||
upsertedIds: {},
|
||||
});
|
||||
});
|
||||
|
||||
test('deleteMany', async () => {
|
||||
const request = {
|
||||
operations: [
|
||||
{
|
||||
deleteMany: { filter: { _id: { $in: ['deleteMany_1', 'deleteMany_2', 'deleteMany_3'] } } },
|
||||
},
|
||||
],
|
||||
};
|
||||
const connection = {
|
||||
databaseUri,
|
||||
databaseName,
|
||||
collection,
|
||||
write: true,
|
||||
};
|
||||
const res = await MongoDBBulkWrite({ request, connection });
|
||||
expect(res).toEqual({
|
||||
insertedCount: 0,
|
||||
insertedIds: {},
|
||||
matchedCount: 0,
|
||||
modifiedCount: 0,
|
||||
deletedCount: 3,
|
||||
upsertedCount: 0,
|
||||
upsertedIds: {},
|
||||
});
|
||||
});
|
||||
|
||||
test('deleteOne', async () => {
|
||||
const request = {
|
||||
operations: [
|
||||
{
|
||||
deleteOne: {
|
||||
filter: { _id: 'deleteOne' },
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
const connection = {
|
||||
databaseUri,
|
||||
databaseName,
|
||||
collection,
|
||||
write: true,
|
||||
};
|
||||
const res = await MongoDBBulkWrite({ request, connection });
|
||||
expect(res).toEqual({
|
||||
insertedCount: 0,
|
||||
insertedIds: {},
|
||||
matchedCount: 0,
|
||||
modifiedCount: 0,
|
||||
deletedCount: 1,
|
||||
upsertedCount: 0,
|
||||
upsertedIds: {},
|
||||
});
|
||||
});
|
||||
|
||||
test('updateMany - Multiple Documents', async () => {
|
||||
const request = {
|
||||
operations: [
|
||||
{
|
||||
updateMany: {
|
||||
filter: { _id: { $in: ['updateMany_1', 'updateMany_2', 'updateMany_3'] } },
|
||||
update: { $set: { v: 'after' } },
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
const connection = {
|
||||
databaseUri,
|
||||
databaseName,
|
||||
collection,
|
||||
write: true,
|
||||
};
|
||||
const res = await MongoDBBulkWrite({ request, connection });
|
||||
expect(res).toEqual({
|
||||
insertedCount: 0,
|
||||
insertedIds: {},
|
||||
matchedCount: 3,
|
||||
modifiedCount: 3,
|
||||
deletedCount: 0,
|
||||
upsertedCount: 0,
|
||||
upsertedIds: {},
|
||||
});
|
||||
});
|
||||
|
||||
test('updateOne', async () => {
|
||||
const request = {
|
||||
operations: [
|
||||
{
|
||||
updateOne: {
|
||||
filter: { _id: 'updateOne' },
|
||||
update: { $set: { v: 'after' } },
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
const connection = {
|
||||
databaseUri,
|
||||
databaseName,
|
||||
collection,
|
||||
write: true,
|
||||
};
|
||||
const res = await MongoDBBulkWrite({ request, connection });
|
||||
expect(res).toEqual({
|
||||
insertedCount: 0,
|
||||
insertedIds: {},
|
||||
matchedCount: 1,
|
||||
modifiedCount: 1,
|
||||
deletedCount: 0,
|
||||
upsertedCount: 0,
|
||||
upsertedIds: {},
|
||||
});
|
||||
});
|
||||
|
||||
test('updateOne upsert', async () => {
|
||||
const request = {
|
||||
operations: [
|
||||
{
|
||||
updateOne: {
|
||||
filter: { _id: 'updateOne_upsert' },
|
||||
update: { $set: { v: 'after' } },
|
||||
upsert: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
const connection = {
|
||||
databaseUri,
|
||||
databaseName,
|
||||
collection,
|
||||
write: true,
|
||||
};
|
||||
const res = await MongoDBBulkWrite({ request, connection });
|
||||
expect(res).toEqual({
|
||||
insertedCount: 0,
|
||||
insertedIds: {},
|
||||
matchedCount: 0,
|
||||
modifiedCount: 0,
|
||||
deletedCount: 0,
|
||||
upsertedCount: 1,
|
||||
upsertedIds: { 0: 'updateOne_upsert' },
|
||||
});
|
||||
});
|
||||
|
||||
test('replaceOne', async () => {
|
||||
const request = {
|
||||
operations: [
|
||||
{
|
||||
replaceOne: {
|
||||
filter: { _id: 'replaceOne' },
|
||||
replacement: { v: 'after' },
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
const connection = {
|
||||
databaseUri,
|
||||
databaseName,
|
||||
collection,
|
||||
write: true,
|
||||
};
|
||||
const res = await MongoDBBulkWrite({ request, connection });
|
||||
expect(res).toEqual({
|
||||
insertedCount: 0,
|
||||
insertedIds: {},
|
||||
matchedCount: 1,
|
||||
modifiedCount: 1,
|
||||
deletedCount: 0,
|
||||
upsertedCount: 0,
|
||||
upsertedIds: {},
|
||||
});
|
||||
});
|
@ -0,0 +1,279 @@
|
||||
/*
|
||||
Copyright 2020-2024 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { type } from '@lowdefy/helpers';
|
||||
|
||||
export default {
|
||||
$schema: 'http://json-schema.org/draft-07/schema#',
|
||||
title: 'Lowdefy Request Schema - MongoDBBulkWrite',
|
||||
type: 'object',
|
||||
required: ['operations'],
|
||||
errorMessage: {
|
||||
type: 'MongoDBBulkWrite request properties should be an object.',
|
||||
required: 'MongoDBBulkWrite request should have required property "operations".',
|
||||
},
|
||||
properties: {
|
||||
operations: {
|
||||
type: 'array',
|
||||
description: 'Array containing all the write operations for the execution.',
|
||||
errorMessage: {
|
||||
type: 'MongoDBBulkWrite request property "operations" should be an array.',
|
||||
},
|
||||
items: {
|
||||
type: 'object',
|
||||
errorMessage: {
|
||||
type: 'MongoDBBulkWrite request property "operations" should be an array of write operation objects.',
|
||||
additionalProperties: 'MongoDBBulkWrite operation should be a write operation.',
|
||||
maxProperties: 'MongoDBBulkWrite operation should be a write operation.',
|
||||
},
|
||||
additionalProperties: false,
|
||||
maxProperties: 1,
|
||||
properties: {
|
||||
insertOne: {
|
||||
type: 'object',
|
||||
required: ['document'],
|
||||
errorMessage: {
|
||||
type: 'insertOne operation should be an object.',
|
||||
required: 'insertOne operation should have required property "document".',
|
||||
},
|
||||
properties: {
|
||||
document: {
|
||||
type: 'object',
|
||||
description: 'The document to be inserted.',
|
||||
errorMessage: {
|
||||
type: 'insertOne operation property "document" should be an object.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
updateOne: {
|
||||
type: 'object',
|
||||
required: ['filter', 'update'],
|
||||
errorMessage: {
|
||||
type: 'updateOne operation should be an object.',
|
||||
required: {
|
||||
filter: 'updateOne operation should have required property "filter".',
|
||||
update: 'updateOne operation should have required property "update".',
|
||||
},
|
||||
},
|
||||
properties: {
|
||||
filter: {
|
||||
type: 'object',
|
||||
description: 'The filter used to select the document to update.',
|
||||
errorMessage: {
|
||||
type: 'updateOne operation property "filter" should be an object.',
|
||||
},
|
||||
},
|
||||
update: {
|
||||
type: ['object', 'array'],
|
||||
description: 'The update operations to be applied to the document.',
|
||||
errorMessage: {
|
||||
type: 'updateOne operation property "update" should be an object or an array.',
|
||||
},
|
||||
},
|
||||
upsert: {
|
||||
type: 'boolean',
|
||||
description: 'Insert document if no match is found.',
|
||||
errorMessage: {
|
||||
type: 'updateOne operation property "upsert" should be a boolean.',
|
||||
},
|
||||
},
|
||||
arrayFilters: {
|
||||
type: 'array',
|
||||
description: 'Array filters for the `$[<identifier>]` array update operator.',
|
||||
errorMessage: {
|
||||
type: 'updateOne operation property "arrayFilters" should be an array.',
|
||||
},
|
||||
},
|
||||
collation: {
|
||||
type: 'object',
|
||||
description: 'Specify collation settings for update operation.',
|
||||
errorMessage: {
|
||||
type: 'updateOne operation property "collation" should be an object.',
|
||||
},
|
||||
},
|
||||
hint: {
|
||||
type: ['object', 'string'],
|
||||
description: 'An optional hint for query optimization.',
|
||||
errorMessage: {
|
||||
type: 'updateOne operation property "hint" should be an object or a string.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
updateMany: {
|
||||
type: 'object',
|
||||
required: ['filter', 'update'],
|
||||
errorMessage: {
|
||||
type: 'updateMany operation should be an object.',
|
||||
required: {
|
||||
filter: 'updateMany operation should have required property "filter".',
|
||||
update: 'updateMany operation should have required property "update".',
|
||||
},
|
||||
},
|
||||
properties: {
|
||||
filter: {
|
||||
type: 'object',
|
||||
description: 'The filter used to select the documents to update.',
|
||||
errorMessage: {
|
||||
type: 'updateMany operation property "filter" should be an object.',
|
||||
},
|
||||
},
|
||||
update: {
|
||||
type: ['object', 'array'],
|
||||
description: 'The update operations to be applied to the document.',
|
||||
errorMessage: {
|
||||
type: 'updateMany operation property "update" should be an object or an array.',
|
||||
},
|
||||
},
|
||||
upsert: {
|
||||
type: 'boolean',
|
||||
description: 'Insert document if no match is found.',
|
||||
errorMessage: {
|
||||
type: 'updateMany operation property "upsert" should be a boolean.',
|
||||
},
|
||||
},
|
||||
arrayFilters: {
|
||||
type: 'array',
|
||||
description: 'Array filters for the `$[<identifier>]` array update operator.',
|
||||
errorMessage: {
|
||||
type: 'updateMany operation property "arrayFilters" should be an array.',
|
||||
},
|
||||
},
|
||||
collation: {
|
||||
type: 'object',
|
||||
description: 'Specify collation settings for update operation.',
|
||||
errorMessage: {
|
||||
type: 'updateMany operation property "collation" should be an object.',
|
||||
},
|
||||
},
|
||||
hint: {
|
||||
type: ['object', 'string'],
|
||||
description: 'An optional hint for query optimization.',
|
||||
errorMessage: {
|
||||
type: 'updateMany operation property "hint" should be an object or a string.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
deleteOne: {
|
||||
type: 'object',
|
||||
required: ['filter'],
|
||||
errorMessage: {
|
||||
type: 'deleteOne operation should be an object.',
|
||||
required: 'deleteOne operation should have required property "filter".',
|
||||
},
|
||||
properties: {
|
||||
filter: {
|
||||
type: 'object',
|
||||
description: 'The filter used to select the document to update.',
|
||||
errorMessage: {
|
||||
type: 'deleteOne operation property "filter" should be an object.',
|
||||
},
|
||||
},
|
||||
collation: {
|
||||
type: 'object',
|
||||
description: 'Specify collation settings for update operation.',
|
||||
errorMessage: {
|
||||
type: 'deleteOne operation property "collation" should be an object.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
deleteMany: {
|
||||
type: 'object',
|
||||
required: ['filter'],
|
||||
errorMessage: {
|
||||
type: 'deleteMany operation should be an object.',
|
||||
required: 'deleteMany operation should have required property "filter".',
|
||||
},
|
||||
properties: {
|
||||
filter: {
|
||||
type: 'object',
|
||||
description: 'The filter used to select the documents to delete.',
|
||||
errorMessage: {
|
||||
type: 'deleteMany operation property "filter" should be an object.',
|
||||
},
|
||||
},
|
||||
collation: {
|
||||
type: 'object',
|
||||
description: 'Specify collation settings for update operation.',
|
||||
errorMessage: {
|
||||
type: 'deleteMany operation property "collation" should be an object.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
replaceOne: {
|
||||
type: 'object',
|
||||
required: ['filter', 'replacement'],
|
||||
errorMessage: {
|
||||
type: 'replaceOne operation should be an object.',
|
||||
required: {
|
||||
filter: 'replaceOne operation should have required property "filter".',
|
||||
replacement: 'replaceOne operation should have required property "replacement".',
|
||||
},
|
||||
},
|
||||
properties: {
|
||||
filter: {
|
||||
type: 'object',
|
||||
description: 'The filter used to select the documents to update.',
|
||||
errorMessage: {
|
||||
type: 'replaceOne operation property "filter" should be an object.',
|
||||
},
|
||||
},
|
||||
replacement: {
|
||||
type: 'object',
|
||||
description: 'The document to be inserted.',
|
||||
errorMessage: {
|
||||
type: 'replaceOne operation property "replacement" should be an object.',
|
||||
},
|
||||
},
|
||||
upsert: {
|
||||
type: 'boolean',
|
||||
description: 'Insert document if no match is found.',
|
||||
errorMessage: {
|
||||
type: 'replaceOne operation property "upsert" should be a boolean.',
|
||||
},
|
||||
},
|
||||
collation: {
|
||||
type: 'object',
|
||||
description: 'Specify collation settings for update operation.',
|
||||
errorMessage: {
|
||||
type: 'replaceOne operation property "collation" should be an object.',
|
||||
},
|
||||
},
|
||||
hint: {
|
||||
type: ['object', 'string'],
|
||||
description: 'An optional hint for query optimization.',
|
||||
errorMessage: {
|
||||
type: 'replaceOne operation property "hint" should be an object or a string.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
options: {
|
||||
type: 'object',
|
||||
description: 'Optional settings.',
|
||||
errorMessage: {
|
||||
type: 'MongoDBBulkWrite request property "options" should be an object.',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
@ -17,11 +17,13 @@
|
||||
import nunjucks from 'nunjucks';
|
||||
import { type } from '@lowdefy/helpers';
|
||||
import dateFilter from './dateFilter.js';
|
||||
import uniqueFilter from './uniqueFilter.js';
|
||||
|
||||
// dateFilter.setDefaultFormat('YYYY-MM-DD');
|
||||
export const nunjucksEnv = new nunjucks.Environment();
|
||||
|
||||
nunjucksEnv.addFilter('date', dateFilter);
|
||||
nunjucksEnv.addFilter('unique', uniqueFilter);
|
||||
|
||||
const nunjucksTemplates = {};
|
||||
// slow
|
||||
|
26
packages/utils/nunjucks/src/uniqueFilter.js
Normal file
26
packages/utils/nunjucks/src/uniqueFilter.js
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
Copyright 2020-2024 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { type } from '@lowdefy/helpers';
|
||||
|
||||
const uniqueFilter = (arr) => {
|
||||
if (!type.isArray(arr)) {
|
||||
return arr;
|
||||
}
|
||||
return Array.from(new Set(arr));
|
||||
};
|
||||
|
||||
export default uniqueFilter;
|
68
packages/utils/nunjucks/src/uniqueFilter.test.js
Normal file
68
packages/utils/nunjucks/src/uniqueFilter.test.js
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
Copyright 2020-2024 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import nunjucks from 'nunjucks';
|
||||
import uniqueFilter from './uniqueFilter.js';
|
||||
|
||||
export const nunjucksEnv = new nunjucks.Environment();
|
||||
nunjucksEnv.addFilter('unique', uniqueFilter);
|
||||
|
||||
describe('uniqueFilter', () => {
|
||||
test('should return unique values from an array of primitives', () => {
|
||||
const input = [1, 2, 2, 3, 4, 4, 4, 5];
|
||||
const output = uniqueFilter(input);
|
||||
expect(output).toEqual([1, 2, 3, 4, 5]);
|
||||
});
|
||||
|
||||
test('should return unique values from an array of strings', () => {
|
||||
const input = ['a', 'b', 'b', 'c', 'a'];
|
||||
const output = uniqueFilter(input);
|
||||
expect(output).toEqual(['a', 'b', 'c']);
|
||||
});
|
||||
|
||||
test('should return the same array when all values are unique', () => {
|
||||
const input = [1, 2, 3, 4, 5];
|
||||
const output = uniqueFilter(input);
|
||||
expect(output).toEqual([1, 2, 3, 4, 5]);
|
||||
});
|
||||
|
||||
test('should return an empty array when input is an empty array', () => {
|
||||
const input = [];
|
||||
const output = uniqueFilter(input);
|
||||
expect(output).toEqual([]);
|
||||
});
|
||||
|
||||
test('should return the input when input is not an array', () => {
|
||||
expect(uniqueFilter(123)).toBe(123);
|
||||
expect(uniqueFilter('abc')).toBe('abc');
|
||||
expect(uniqueFilter({ a: 1 })).toEqual({ a: 1 });
|
||||
expect(uniqueFilter(null)).toBe(null);
|
||||
expect(uniqueFilter(undefined)).toBe(undefined);
|
||||
});
|
||||
|
||||
test('should handle an array with mixed types', () => {
|
||||
const input = [1, '1', 1, 'a', 'a', {}, {}, []];
|
||||
const output = uniqueFilter(input);
|
||||
expect(output).toEqual([1, '1', 'a', input[5], input[6], input[7]]);
|
||||
});
|
||||
|
||||
test('should install unique filter in nunjucks and return unique values', () => {
|
||||
const templateString = '{{ value | unique | dump }}';
|
||||
const input = [1, 2, 2, 3, 4, 4, 4, 5];
|
||||
const output = nunjucksEnv.renderString(templateString, { value: input });
|
||||
expect(output).toBe('[1,2,3,4,5]');
|
||||
});
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user