@synerise/ds-cruds 0.4.7 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +8 -6
- package/dist/Cruds.js +9 -2
- package/dist/Cruds.types.d.ts +2 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.5.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-cruds@0.5.0...@synerise/ds-cruds@0.5.1) (2024-03-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-cruds
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [0.5.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-cruds@0.4.7...@synerise/ds-cruds@0.5.0) (2024-03-09)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **card-tabs:** add preview option to cruds and card-tabs ([f7cb671](https://github.com/Synerise/synerise-design/commit/f7cb671da0cf0a6429e958c8575d91a4fc9020eb))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.4.7](https://github.com/Synerise/synerise-design/compare/@synerise/ds-cruds@0.4.6...@synerise/ds-cruds@0.4.7) (2024-03-05)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-cruds
|
package/README.md
CHANGED
|
@@ -59,9 +59,11 @@ import SingleAction from '@synerise/ds-cruds/dist/SingleAction'
|
|
|
59
59
|
| editTooltip | Tooltip of the edit button | React.ReactNode / string | - |
|
|
60
60
|
| moveTooltip | Tooltip of the move button | React.ReactNode / string | - |
|
|
61
61
|
| removeTooltip | Tooltip of the remove button | React.ReactNode / string | - |
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
62
|
+
| previewTooltip | Tooltip of the preview button | React.ReactNode / string | - |
|
|
63
|
+
| onAdd | Callback executed after clicking the add button. | (event: React.MouseEvent) => void | - |
|
|
64
|
+
| onDuplicate | Callback executed after clicking the duplicate button. | (event: React.MouseEvent) => void | - |
|
|
65
|
+
| onDelete | Callback executed after clicking the delete button. | (event: React.MouseEvent) => void | - |
|
|
66
|
+
| onEdit | Callback executed after clicking the edit button. | (event: React.MouseEvent) => void | - |
|
|
67
|
+
| onMove | Callback executed after clicking the move button. | (event: React.MouseEvent) => void | - |
|
|
68
|
+
| onRemove | Callback executed after clicking the remove button. | (event: React.MouseEvent) => void | - |
|
|
69
|
+
| onPreview | Callback executed after clicking the preview button. | (event: React.MouseEvent) => void | - |
|
package/dist/Cruds.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
var _excluded = ["onDelete", "onAdd", "onEdit", "onDuplicate", "onMove", "onRemove", "onMoveUp", "onMoveDown", "moveDownInactive", "moveUpInactive", "addTooltip", "editTooltip", "duplicateTooltip", "removeTooltip", "moveTooltip", "moveUpTooltip", "moveDownTooltip", "deleteTooltip"];
|
|
1
|
+
var _excluded = ["onDelete", "onAdd", "onPreview", "onEdit", "onDuplicate", "onMove", "onRemove", "onMoveUp", "onMoveDown", "moveDownInactive", "moveUpInactive", "addTooltip", "previewTooltip", "editTooltip", "duplicateTooltip", "removeTooltip", "moveTooltip", "moveUpTooltip", "moveDownTooltip", "deleteTooltip"];
|
|
2
2
|
|
|
3
3
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
7
7
|
import * as React from 'react';
|
|
8
|
-
import { AddS, CloseS, DragHandleM, DuplicateS, EditS, TrashS, ArrowDownS, ArrowUpS } from '@synerise/ds-icon';
|
|
8
|
+
import { AddS, CloseS, DragHandleM, DuplicateS, EditS, TrashS, ArrowDownS, ArrowUpS, ShowM } from '@synerise/ds-icon';
|
|
9
9
|
import * as S from './Cruds.styles';
|
|
10
10
|
import SingleAction from './SingleAction';
|
|
11
11
|
|
|
12
12
|
var Cruds = function Cruds(_ref) {
|
|
13
13
|
var onDelete = _ref.onDelete,
|
|
14
14
|
onAdd = _ref.onAdd,
|
|
15
|
+
onPreview = _ref.onPreview,
|
|
15
16
|
onEdit = _ref.onEdit,
|
|
16
17
|
onDuplicate = _ref.onDuplicate,
|
|
17
18
|
onMove = _ref.onMove,
|
|
@@ -21,6 +22,7 @@ var Cruds = function Cruds(_ref) {
|
|
|
21
22
|
moveDownInactive = _ref.moveDownInactive,
|
|
22
23
|
moveUpInactive = _ref.moveUpInactive,
|
|
23
24
|
addTooltip = _ref.addTooltip,
|
|
25
|
+
previewTooltip = _ref.previewTooltip,
|
|
24
26
|
editTooltip = _ref.editTooltip,
|
|
25
27
|
duplicateTooltip = _ref.duplicateTooltip,
|
|
26
28
|
removeTooltip = _ref.removeTooltip,
|
|
@@ -54,6 +56,11 @@ var Cruds = function Cruds(_ref) {
|
|
|
54
56
|
className: "edit",
|
|
55
57
|
onClick: onEdit,
|
|
56
58
|
icon: /*#__PURE__*/React.createElement(EditS, null)
|
|
59
|
+
}), onPreview && /*#__PURE__*/React.createElement(SingleAction, {
|
|
60
|
+
title: previewTooltip,
|
|
61
|
+
className: "preview",
|
|
62
|
+
onClick: onPreview,
|
|
63
|
+
icon: /*#__PURE__*/React.createElement(ShowM, null)
|
|
57
64
|
}), onDuplicate && /*#__PURE__*/React.createElement(SingleAction, {
|
|
58
65
|
title: duplicateTooltip,
|
|
59
66
|
className: "duplicate",
|
package/dist/Cruds.types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { MouseEvent, ReactNode } from 'react';
|
|
|
2
2
|
import SingleAction from './SingleAction';
|
|
3
3
|
export interface CrudsProps {
|
|
4
4
|
addTooltip?: ReactNode;
|
|
5
|
+
previewTooltip?: ReactNode;
|
|
5
6
|
moveUpTooltip?: ReactNode;
|
|
6
7
|
moveDownTooltip?: ReactNode;
|
|
7
8
|
moveUpInactive?: boolean;
|
|
@@ -13,6 +14,7 @@ export interface CrudsProps {
|
|
|
13
14
|
deleteTooltip?: ReactNode;
|
|
14
15
|
onDelete?: (event?: MouseEvent<HTMLElement>) => void;
|
|
15
16
|
onAdd?: (event?: MouseEvent<HTMLElement>) => void;
|
|
17
|
+
onPreview?: () => void;
|
|
16
18
|
onEdit?: (event?: MouseEvent<HTMLElement>) => void;
|
|
17
19
|
onDuplicate?: (event?: MouseEvent<HTMLElement>) => void;
|
|
18
20
|
onMove?: (event?: MouseEvent<HTMLElement>) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-cruds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Cruds UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
],
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@synerise/ds-icon": "^0.60.
|
|
37
|
-
"@synerise/ds-tooltip": "^0.14.
|
|
36
|
+
"@synerise/ds-icon": "^0.60.4",
|
|
37
|
+
"@synerise/ds-tooltip": "^0.14.21"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@synerise/ds-core": "*",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"styled-components": "5.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@synerise/ds-utils": "^0.
|
|
45
|
+
"@synerise/ds-utils": "^0.26.0",
|
|
46
46
|
"@testing-library/jest-dom": "5.1.1",
|
|
47
47
|
"@testing-library/react": "10.0.1"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "2df913352aa96e8aed75894489afb3a4ee303370"
|
|
50
50
|
}
|