Skip to content

Commit 15fe81c

Browse files
committed
add new type of modal to show errors info and actions to solve it
1 parent 0149eb3 commit 15fe81c

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

lib/schemas/browse/modules/interactions.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ const interactionComponents = [
4848
additionalProperties: false,
4949
required: ['listFields', 'title']
5050
}
51+
},
52+
{
53+
if: {
54+
properties: {
55+
type: { const: 'ErrorActionsModal' }
56+
}
57+
},
58+
then: {
59+
properties: {
60+
type: { const: 'ErrorActionsModal' }
61+
},
62+
additionalProperties: false
63+
}
5164
}
5265
];
5366

tests/mocks/schemas/browse.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,6 +1896,23 @@
18961896
]
18971897
}
18981898
}
1899+
},
1900+
{
1901+
"name": "interactionExampleThree",
1902+
"component": "Text",
1903+
"onHover": {
1904+
"all": {
1905+
"type": "ErrorActionsModal"
1906+
}
1907+
},
1908+
"onClick": {
1909+
"desktop": {
1910+
"type": "ErrorActionsModal"
1911+
},
1912+
"all": {
1913+
"type": "ErrorActionsModal"
1914+
}
1915+
}
18991916
}
19001917
],
19011918
"actions": [

tests/mocks/schemas/expected/browse.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2438,6 +2438,32 @@
24382438
"componentAttributes": {
24392439
"fontWeight": "normal"
24402440
}
2441+
},
2442+
{
2443+
"name": "interactionExampleThree",
2444+
"component": "Text",
2445+
"attributes": {
2446+
"isStatus": false,
2447+
"sortable": false,
2448+
"isDefaultSort": false,
2449+
"initialSortDirection": "desc"
2450+
},
2451+
"onHover": {
2452+
"all": {
2453+
"type": "ErrorActionsModal"
2454+
}
2455+
},
2456+
"onClick": {
2457+
"desktop": {
2458+
"type": "ErrorActionsModal"
2459+
},
2460+
"all": {
2461+
"type": "ErrorActionsModal"
2462+
}
2463+
},
2464+
"componentAttributes": {
2465+
"fontWeight": "normal"
2466+
}
24412467
}
24422468
],
24432469
"canPreview": false,

0 commit comments

Comments
 (0)