@progress/kendo-react-taskboard 5.3.0-dev.202205041411

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.
Files changed (91) hide show
  1. package/LICENSE.md +11 -0
  2. package/NOTICE.txt +111 -0
  3. package/README.md +41 -0
  4. package/about.md +3 -0
  5. package/dist/cdn/js/kendo-react-taskboard.js +1 -0
  6. package/dist/es/TaskBoard.d.ts +145 -0
  7. package/dist/es/TaskBoard.js +267 -0
  8. package/dist/es/TaskBoardAddCard.d.ts +32 -0
  9. package/dist/es/TaskBoardAddCard.js +16 -0
  10. package/dist/es/TaskBoardCardBase.d.ts +56 -0
  11. package/dist/es/TaskBoardCardBase.js +87 -0
  12. package/dist/es/TaskBoardColumnBase.d.ts +72 -0
  13. package/dist/es/TaskBoardColumnBase.js +90 -0
  14. package/dist/es/TaskBoardConfirmDialog.d.ts +37 -0
  15. package/dist/es/TaskBoardConfirmDialog.js +24 -0
  16. package/dist/es/TaskBoardEditCard.d.ts +20 -0
  17. package/dist/es/TaskBoardEditCard.js +16 -0
  18. package/dist/es/TaskBoardTaskEditPane.d.ts +93 -0
  19. package/dist/es/TaskBoardTaskEditPane.js +36 -0
  20. package/dist/es/TaskBoardToolbar.d.ts +26 -0
  21. package/dist/es/TaskBoardToolbar.js +17 -0
  22. package/dist/es/card/Card.d.ts +140 -0
  23. package/dist/es/card/Card.js +33 -0
  24. package/dist/es/card/CardBody.d.ts +22 -0
  25. package/dist/es/card/CardBody.js +9 -0
  26. package/dist/es/card/CardHeader.d.ts +56 -0
  27. package/dist/es/card/CardHeader.js +18 -0
  28. package/dist/es/card/PreviewDialog.d.ts +50 -0
  29. package/dist/es/card/PreviewDialog.js +25 -0
  30. package/dist/es/column/Column.d.ts +168 -0
  31. package/dist/es/column/Column.js +34 -0
  32. package/dist/es/column/ColumnBody.d.ts +46 -0
  33. package/dist/es/column/ColumnBody.js +9 -0
  34. package/dist/es/column/ColumnHeader.d.ts +55 -0
  35. package/dist/es/column/ColumnHeader.js +18 -0
  36. package/dist/es/constants.d.ts +20 -0
  37. package/dist/es/constants.js +20 -0
  38. package/dist/es/hooks/taskEditing.d.ts +18 -0
  39. package/dist/es/hooks/taskEditing.js +32 -0
  40. package/dist/es/main.d.ts +14 -0
  41. package/dist/es/main.js +14 -0
  42. package/dist/es/messages/index.d.ts +150 -0
  43. package/dist/es/messages/index.js +151 -0
  44. package/dist/es/package-metadata.d.ts +5 -0
  45. package/dist/es/package-metadata.js +11 -0
  46. package/dist/es/utils.d.ts +25 -0
  47. package/dist/es/utils.js +80 -0
  48. package/dist/npm/TaskBoard.d.ts +145 -0
  49. package/dist/npm/TaskBoard.js +269 -0
  50. package/dist/npm/TaskBoardAddCard.d.ts +32 -0
  51. package/dist/npm/TaskBoardAddCard.js +18 -0
  52. package/dist/npm/TaskBoardCardBase.d.ts +56 -0
  53. package/dist/npm/TaskBoardCardBase.js +89 -0
  54. package/dist/npm/TaskBoardColumnBase.d.ts +72 -0
  55. package/dist/npm/TaskBoardColumnBase.js +92 -0
  56. package/dist/npm/TaskBoardConfirmDialog.d.ts +37 -0
  57. package/dist/npm/TaskBoardConfirmDialog.js +26 -0
  58. package/dist/npm/TaskBoardEditCard.d.ts +20 -0
  59. package/dist/npm/TaskBoardEditCard.js +18 -0
  60. package/dist/npm/TaskBoardTaskEditPane.d.ts +93 -0
  61. package/dist/npm/TaskBoardTaskEditPane.js +38 -0
  62. package/dist/npm/TaskBoardToolbar.d.ts +26 -0
  63. package/dist/npm/TaskBoardToolbar.js +19 -0
  64. package/dist/npm/card/Card.d.ts +140 -0
  65. package/dist/npm/card/Card.js +35 -0
  66. package/dist/npm/card/CardBody.d.ts +22 -0
  67. package/dist/npm/card/CardBody.js +11 -0
  68. package/dist/npm/card/CardHeader.d.ts +56 -0
  69. package/dist/npm/card/CardHeader.js +20 -0
  70. package/dist/npm/card/PreviewDialog.d.ts +50 -0
  71. package/dist/npm/card/PreviewDialog.js +27 -0
  72. package/dist/npm/column/Column.d.ts +168 -0
  73. package/dist/npm/column/Column.js +36 -0
  74. package/dist/npm/column/ColumnBody.d.ts +46 -0
  75. package/dist/npm/column/ColumnBody.js +11 -0
  76. package/dist/npm/column/ColumnHeader.d.ts +55 -0
  77. package/dist/npm/column/ColumnHeader.js +20 -0
  78. package/dist/npm/constants.d.ts +20 -0
  79. package/dist/npm/constants.js +22 -0
  80. package/dist/npm/hooks/taskEditing.d.ts +18 -0
  81. package/dist/npm/hooks/taskEditing.js +34 -0
  82. package/dist/npm/main.d.ts +14 -0
  83. package/dist/npm/main.js +30 -0
  84. package/dist/npm/messages/index.d.ts +150 -0
  85. package/dist/npm/messages/index.js +153 -0
  86. package/dist/npm/package-metadata.d.ts +5 -0
  87. package/dist/npm/package-metadata.js +13 -0
  88. package/dist/npm/utils.d.ts +25 -0
  89. package/dist/npm/utils.js +82 -0
  90. package/dist/systemjs/kendo-react-taskboard.js +1 -0
  91. package/package.json +76 -0
@@ -0,0 +1,90 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import * as React from 'react';
13
+ import * as PropTypes from 'prop-types';
14
+ import { useLocalization } from '@progress/kendo-react-intl';
15
+ import { messages, taskBoardEditColumnButton, taskBoardAddCardButton, taskBoardDeleteColumnButton, taskBoardDelColumnDialogMsg, taskBoardDelColumnDialogTitle, taskBoardDelColumnConfirmBtn, taskBoardDelColumnCancelBtn } from './messages';
16
+ import { TASKBOARD_PLACEHOLDER } from './constants';
17
+ import { TaskBoardColumnHeader } from './column/ColumnHeader';
18
+ import { TaskBoardColumnBody } from './column/ColumnBody';
19
+ import { TaskBoardConfirmDialog } from './TaskBoardConfirmDialog';
20
+ import { TaskBoardEditCard } from './TaskBoardEditCard';
21
+ import { TaskBoardAddCard } from './TaskBoardAddCard';
22
+ import { TaskBoardCardBase } from './TaskBoardCardBase';
23
+ /**
24
+ * Represents the TaskBoardColumnBase component.
25
+ */
26
+ export var TaskBoardColumnBase = function (props) {
27
+ var _a;
28
+ var _b = React.useState(false), addCard = _b[0], setAddCard = _b[1];
29
+ var _c = React.useState(false), editCardPane = _c[0], setEditCardPane = _c[1];
30
+ var _d = React.useState(false), confirmColumnDeleteVisible = _d[0], setConfirmColumnDeleteVisible = _d[1];
31
+ var _e = React.useState(), taskToEdit = _e[0], setTaskToEdit = _e[1];
32
+ var dragTargetRef = props.dragTargetRef, column = props.column, onColumnChange = props.onColumnChange, tasks = props.tasks, elementRef = props.elementRef, style = props.style, onTaskCreate = props.onTaskCreate, onTaskEdit = props.onTaskEdit, onTaskDelete = props.onTaskDelete;
33
+ var localization = useLocalization();
34
+ var onTitleChange = React.useCallback(function (e) {
35
+ var newColumn = __assign({}, column, { title: e.value });
36
+ onColumnChange.call(undefined, newColumn, column);
37
+ }, [column, onColumnChange]);
38
+ var onColumnEnterEdit = React.useCallback(function () {
39
+ var newColumn = __assign({}, column, { edit: true });
40
+ onColumnChange.call(undefined, newColumn, column);
41
+ }, [column, onColumnChange]);
42
+ var onColumnExitEdit = React.useCallback(function () {
43
+ var newColumn = __assign({}, column, { edit: false });
44
+ onColumnChange.call(undefined, newColumn, column);
45
+ }, [column, onColumnChange]);
46
+ var onConfirmColumnDelete = React.useCallback(function () {
47
+ var newColumn = null;
48
+ onColumnChange.call(undefined, newColumn, column);
49
+ }, [column, onColumnChange]);
50
+ var onColumnDelete = function () {
51
+ setConfirmColumnDeleteVisible(!confirmColumnDeleteVisible);
52
+ };
53
+ var showAddCardDialog = function () {
54
+ setAddCard(true);
55
+ };
56
+ var showEditCardPane = function (task) {
57
+ setEditCardPane(true);
58
+ setTaskToEdit(task);
59
+ };
60
+ var hideCloseModal = function () {
61
+ setAddCard(false);
62
+ setEditCardPane(false);
63
+ };
64
+ var onNewTask = React.useCallback(function (task) {
65
+ setAddCard(false);
66
+ onTaskCreate.call(undefined, __assign({}, task, { status: column.status }));
67
+ }, [onTaskCreate, column]);
68
+ var editTask = React.useCallback(function (edited, prevTask) {
69
+ setEditCardPane(false);
70
+ onTaskEdit.call(undefined, edited, prevTask);
71
+ }, [onTaskEdit]);
72
+ var deleteTask = React.useCallback(function (task) {
73
+ onTaskDelete.call(undefined, task);
74
+ }, [onTaskDelete]);
75
+ if (column.isPlaceholder && dragTargetRef && dragTargetRef.current) {
76
+ var width = dragTargetRef.current ? dragTargetRef.current.width : 0;
77
+ var height = dragTargetRef.current ? dragTargetRef.current.height : 0;
78
+ return (React.createElement("div", __assign({ style: { width: width, height: height }, className: 'k-taskboard-column k-taskboard-drag-placeholder' }, (_a = {}, _a[TASKBOARD_PLACEHOLDER] = true, _a))));
79
+ }
80
+ return (React.createElement(props.columnComponent, { column: props.column, tasks: tasks, priorities: props.priorities, style: Boolean(dragTargetRef) ? __assign({ overflow: 'visible' }, style) : style, tabIndex: props.tabIndex, elementRef: elementRef, dragTargetRef: dragTargetRef, onTaskCreate: onNewTask, onTaskEdit: editTask, onTaskDelete: deleteTask, card: props.cardComponent, header: TaskBoardColumnHeader, body: TaskBoardColumnBody, confirmDialog: TaskBoardConfirmDialog, editCardDialog: TaskBoardEditCard, addCardDialog: TaskBoardAddCard, onTitleChange: onTitleChange, onColumnEnterEdit: onColumnEnterEdit, onColumnExitEdit: onColumnExitEdit, onColumnConfirmDelete: onConfirmColumnDelete, onShowAddCardDialog: showAddCardDialog, onShowEditCardPane: showEditCardPane, onColumnDelete: onColumnDelete, onCloseDialog: hideCloseModal, showAddCard: addCard, showEditCard: editCardPane, showColumnConfirmDelete: confirmColumnDeleteVisible, editedTask: taskToEdit, confirmDialogMessage: localization.toLanguageString(taskBoardDelColumnDialogMsg, messages[taskBoardDelColumnDialogMsg]), confirmDialogTitle: localization.toLanguageString(taskBoardDelColumnDialogTitle, messages[taskBoardDelColumnDialogTitle]), confirmDialogConfirmButton: localization.toLanguageString(taskBoardDelColumnConfirmBtn, messages[taskBoardDelColumnConfirmBtn]), confirmDialogCancelButton: localization.toLanguageString(taskBoardDelColumnCancelBtn, messages[taskBoardDelColumnCancelBtn]), editButtonTitle: localization.toLanguageString(taskBoardEditColumnButton, messages[taskBoardEditColumnButton]), addButtonTitle: localization.toLanguageString(taskBoardAddCardButton, messages[taskBoardAddCardButton]), closeButtonTitle: localization.toLanguageString(taskBoardDeleteColumnButton, messages[taskBoardDeleteColumnButton]) }, tasks && tasks.map(function (task) {
81
+ return (React.createElement(TaskBoardCardBase, { key: task.id, tabIndex: props.tabIndex, task: task, disabled: Boolean(props.column.edit), onDeleteTask: function () { return deleteTask(task); }, showEditPane: function () { return showEditCardPane(task); }, dragTargetRef: props.dragTargetRef, style: { borderLeftColor: task.priority.color }, cardComponent: props.cardComponent }));
82
+ })));
83
+ };
84
+ var defaultProps = {};
85
+ TaskBoardColumnBase.propTypes = {
86
+ column: PropTypes.object.isRequired,
87
+ taskMap: PropTypes.object
88
+ };
89
+ TaskBoardColumnBase.defaultProps = defaultProps;
90
+ TaskBoardColumnBase.displayName = 'KendoReactTaskBoardColumn';
@@ -0,0 +1,37 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Represents the props of the TaskBoardConfirmDialog component
4
+ */
5
+ export interface TaskBoardConfirmDialogProps {
6
+ /**
7
+ * The dialog message.
8
+ */
9
+ dialogMessage: React.ReactNode;
10
+ /**
11
+ * The dialog title.
12
+ */
13
+ dialogTitle: string;
14
+ /**
15
+ * The dialog confirm button.
16
+ */
17
+ dialogConfirmButton: React.ReactNode;
18
+ /**
19
+ * The dialog cancel button.
20
+ */
21
+ dialogCancelButton: React.ReactNode;
22
+ /**
23
+ * Fires when the dialog is closed.
24
+ */
25
+ onClose: () => void;
26
+ /**
27
+ * Fires when the dialog is confirmed.
28
+ */
29
+ onConfirm: () => void;
30
+ }
31
+ /**
32
+ * Represents the TaskBoardConfirmDialog component.
33
+ */
34
+ export declare const TaskBoardConfirmDialog: {
35
+ (props: TaskBoardConfirmDialogProps): JSX.Element;
36
+ displayName: string;
37
+ };
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import * as PropTypes from 'prop-types';
3
+ import { Dialog, DialogActionsBar } from '@progress/kendo-react-dialogs';
4
+ import { Button } from '@progress/kendo-react-buttons';
5
+ /**
6
+ * Represents the TaskBoardConfirmDialog component.
7
+ */
8
+ export var TaskBoardConfirmDialog = function (props) {
9
+ var onClose = props.onClose, onConfirm = props.onConfirm, dialogMessage = props.dialogMessage, dialogTitle = props.dialogTitle, dialogConfirmButton = props.dialogConfirmButton, dialogCancelButton = props.dialogCancelButton;
10
+ return (React.createElement(Dialog, { title: dialogTitle, closeIcon: false },
11
+ dialogMessage,
12
+ React.createElement(DialogActionsBar, { layout: 'end' },
13
+ React.createElement(Button, { themeColor: 'primary', onClick: onConfirm }, dialogConfirmButton),
14
+ React.createElement(Button, { onClick: onClose }, dialogCancelButton))));
15
+ };
16
+ TaskBoardConfirmDialog.propTypes = {
17
+ onClose: PropTypes.func.isRequired,
18
+ onConfirm: PropTypes.func.isRequired,
19
+ dialogMessage: PropTypes.string.isRequired,
20
+ dialogTitle: PropTypes.string.isRequired,
21
+ dialogConfirmButton: PropTypes.string.isRequired,
22
+ dialogCancelButton: PropTypes.string.isRequired
23
+ };
24
+ TaskBoardConfirmDialog.displayName = 'KendoReactTaskBoardConfirmDialog';
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { TaskBoardTaskModel } from './TaskBoard';
3
+ import { TaskBoardAddCardProps } from './TaskBoardAddCard';
4
+ /**
5
+ * Represents the props of the TaskBoardEditCard component
6
+ */
7
+ export interface TaskBoardEditCardProps extends TaskBoardAddCardProps {
8
+ /**
9
+ * Determines the task of the TaskBoardEditCard component.
10
+ */
11
+ task: TaskBoardTaskModel;
12
+ }
13
+ /**
14
+ * Represents the TaskBoardEditCard component.
15
+ */
16
+ export declare const TaskBoardEditCard: {
17
+ (props: TaskBoardEditCardProps): JSX.Element;
18
+ defaultProps: {};
19
+ displayName: string;
20
+ };
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { useLocalization } from '@progress/kendo-react-intl';
3
+ import { messages, taskBoardEditCardPaneTitle, taskBoardEditCardPaneSaveBtn, taskBoardEditPaneCancelBtn, taskBoardEditPaneTitleLabel, taskBoardEditPaneDescriptionLabel, taskBoardEditPanePriorityLabel, taskBoardAddCardTitleLabel, taskBoardAddCardDescriptionLabel, taskBoardAddCardPriorityLabel } from './messages';
4
+ import { useTaskEditing } from './hooks/taskEditing';
5
+ /**
6
+ * Represents the TaskBoardEditCard component.
7
+ */
8
+ export var TaskBoardEditCard = function (props) {
9
+ var _a = useTaskEditing(props), onTitleChange = _a.onTitleChange, title = _a.title, onDescriptionChange = _a.onDescriptionChange, description = _a.description, onPriorityChange = _a.onPriorityChange, priority = _a.priority, onSave = _a.onSave;
10
+ var localization = useLocalization();
11
+ return (React.createElement(props.editPane, { header: localization.toLanguageString(taskBoardEditCardPaneTitle, messages[taskBoardEditCardPaneTitle]) + props.task.title, titleInputTitle: localization.toLanguageString(taskBoardAddCardTitleLabel, messages[taskBoardAddCardTitleLabel]), descriptionInputTitle: localization.toLanguageString(taskBoardAddCardDescriptionLabel, messages[taskBoardAddCardDescriptionLabel]), priorityDropDownTitle: localization.toLanguageString(taskBoardAddCardPriorityLabel, messages[taskBoardAddCardPriorityLabel]), task: props.task, saveButton: localization.toLanguageString(taskBoardEditCardPaneSaveBtn, messages[taskBoardEditCardPaneSaveBtn]), cancelButton: localization.toLanguageString(taskBoardEditPaneCancelBtn, messages[taskBoardEditPaneCancelBtn]), priorities: props.priorities, titleLabel: localization.toLanguageString(taskBoardEditPaneTitleLabel, messages[taskBoardEditPaneTitleLabel]), descriptionLabel: localization.toLanguageString(taskBoardEditPaneDescriptionLabel, messages[taskBoardEditPaneDescriptionLabel]), priorityLabel: localization.toLanguageString(taskBoardEditPanePriorityLabel, messages[taskBoardEditPanePriorityLabel]), onSave: onSave, onClose: props.onClose, onTitleChange: onTitleChange, title: title, onDescriptionChange: onDescriptionChange, description: description, onPriorityChange: onPriorityChange, priority: priority }));
12
+ };
13
+ var defaultProps = {};
14
+ TaskBoardEditCard.propTypes = {};
15
+ TaskBoardEditCard.defaultProps = defaultProps;
16
+ TaskBoardEditCard.displayName = 'KendoReactTaskBoardEditCard';
@@ -0,0 +1,93 @@
1
+ import * as React from 'react';
2
+ import { DropDownListChangeEvent } from '@progress/kendo-react-dropdowns';
3
+ import { InputChangeEvent } from '@progress/kendo-react-inputs';
4
+ import { TaskBoardPriority, TaskBoardTaskModel } from './TaskBoard';
5
+ /**
6
+ * Represents the props of the TaskBoardTaskEditPane component
7
+ */
8
+ export interface TaskBoardTaskEditPaneProps {
9
+ /**
10
+ * Represents the rendered header of the TaskBoardTaskEditPane.
11
+ */
12
+ header: string;
13
+ /**
14
+ * Represents the save button of the TaskBoardTaskEditPane.
15
+ */
16
+ saveButton: React.ReactNode;
17
+ /**
18
+ * Represents the cancel button of the TaskBoardTaskEditPane.
19
+ */
20
+ cancelButton: React.ReactNode;
21
+ /**
22
+ * Represents the titleInput title of the TaskBoardTaskEditPane.
23
+ */
24
+ titleInputTitle: string;
25
+ /**
26
+ * Represents the descriptionInput title of the TaskBoardTaskEditPane.
27
+ */
28
+ descriptionInputTitle: string;
29
+ /**
30
+ * Represents the priorityDropDownTitle title of the TaskBoardTaskEditPane.
31
+ */
32
+ priorityDropDownTitle: string;
33
+ /**
34
+ * Represents the title label of the TaskBoardTaskEditPane.
35
+ */
36
+ titleLabel: React.ReactNode;
37
+ /**
38
+ * Represents the description label of the TaskBoardTaskEditPane.
39
+ */
40
+ descriptionLabel: React.ReactNode;
41
+ /**
42
+ * Represents the priority label of the TaskBoardTaskEditPane.
43
+ */
44
+ priorityLabel: React.ReactNode;
45
+ /**
46
+ * Represents the rendered task of the TaskBoardTaskEditPane.
47
+ */
48
+ task?: TaskBoardTaskModel;
49
+ /**
50
+ * Determines the priority.
51
+ */
52
+ priority: TaskBoardPriority;
53
+ /**
54
+ * Determines the rendered priorities.
55
+ */
56
+ priorities: TaskBoardPriority[];
57
+ /**
58
+ * Represents the title of the TaskBoardTaskEditPane.
59
+ */
60
+ title: string;
61
+ /**
62
+ * The rendered description.
63
+ */
64
+ description: string;
65
+ /**
66
+ * Fires on `onSave` event.
67
+ */
68
+ onSave: () => void;
69
+ /**
70
+ * Fires on `onClose` event.
71
+ */
72
+ onClose: () => void;
73
+ /**
74
+ * Fires when a title is changed.
75
+ */
76
+ onTitleChange: (event: InputChangeEvent) => void;
77
+ /**
78
+ * Fires when a description is changed.
79
+ */
80
+ onDescriptionChange: (event: InputChangeEvent) => void;
81
+ /**
82
+ * Fires when a priority has been changed.
83
+ */
84
+ onPriorityChange: (event: DropDownListChangeEvent) => void;
85
+ }
86
+ /**
87
+ * Represents the TaskBoardTaskEditPane component.
88
+ */
89
+ export declare const TaskBoardTaskEditPane: {
90
+ (props: TaskBoardTaskEditPaneProps): JSX.Element;
91
+ defaultProps: {};
92
+ displayName: string;
93
+ };
@@ -0,0 +1,36 @@
1
+ import * as React from 'react';
2
+ import { DropDownList } from '@progress/kendo-react-dropdowns';
3
+ import { Button } from '@progress/kendo-react-buttons';
4
+ import { Input } from '@progress/kendo-react-inputs';
5
+ import { Label } from '@progress/kendo-react-labels';
6
+ import { FieldWrapper } from '@progress/kendo-react-form';
7
+ import { itemRender, valueRender } from './utils';
8
+ /**
9
+ * Represents the TaskBoardTaskEditPane component.
10
+ */
11
+ export var TaskBoardTaskEditPane = function (props) {
12
+ return (React.createElement("div", { className: 'k-taskboard-pane k-taskboard-edit-pane' },
13
+ React.createElement("div", { className: 'k-taskboard-pane-header' },
14
+ React.createElement("div", { className: 'k-taskboard-pane-header-text' }, props.header),
15
+ React.createElement("span", { className: "k-spacer" }),
16
+ React.createElement("div", { className: "k-taskboard-pane-header-actions" },
17
+ React.createElement(Button, { icon: 'close', fillMode: "flat", onClick: props.onClose }))),
18
+ React.createElement("div", { className: "k-taskboard-pane-content" },
19
+ React.createElement("div", { role: "form", "data-role": "form", className: "k-form" },
20
+ React.createElement(FieldWrapper, null,
21
+ React.createElement(Label, { editorId: 'title' }, props.titleLabel),
22
+ React.createElement(Input, { id: 'title', onChange: props.onTitleChange, value: props.title, title: props.titleInputTitle })),
23
+ React.createElement(FieldWrapper, null,
24
+ React.createElement(Label, { editorId: 'description' }, props.descriptionLabel),
25
+ React.createElement(Input, { id: 'description', onChange: props.onDescriptionChange, value: props.description, title: props.descriptionInputTitle })),
26
+ React.createElement(FieldWrapper, null,
27
+ React.createElement(Label, { editorId: 'priority' }, props.priorityLabel),
28
+ React.createElement(DropDownList, { id: 'priority', data: props.priorities, value: props.priority, onChange: props.onPriorityChange, itemRender: itemRender, valueRender: valueRender, textField: "priority", dataItemKey: "priority", title: props.priorityDropDownTitle })))),
29
+ React.createElement("div", { className: "k-taskboard-pane-actions k-actions k-hstack k-justify-content-end" },
30
+ React.createElement(Button, { onClick: props.onClose }, props.cancelButton),
31
+ React.createElement(Button, { themeColor: 'primary', onClick: props.onSave, disabled: !props.title || !props.description }, props.saveButton))));
32
+ };
33
+ var defaultProps = {};
34
+ TaskBoardTaskEditPane.propTypes = {};
35
+ TaskBoardTaskEditPane.defaultProps = defaultProps;
36
+ TaskBoardTaskEditPane.displayName = 'KendoReactTaskBoardEditPane';
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Represents the props of the TaskBoardToolbar component
4
+ */
5
+ export interface TaskBoardToolbarProps {
6
+ /**
7
+ * The React elements that will be rendered inside the toolbar of the TaskBoard.
8
+ */
9
+ children?: any;
10
+ /**
11
+ * Specifies a list of CSS classes that will be added to the TaskBoardToolbar element.
12
+ */
13
+ className?: string | Array<string>;
14
+ /**
15
+ * Represents the styles that are applied to the TaskBoardToolbar.
16
+ */
17
+ style?: React.CSSProperties;
18
+ }
19
+ /**
20
+ * Represents the TaskBoardToolbar component.
21
+ */
22
+ export declare const TaskBoardToolbar: {
23
+ (props: TaskBoardToolbarProps): JSX.Element;
24
+ defaultProps: TaskBoardToolbarProps;
25
+ displayName: string;
26
+ };
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import * as PropTypes from 'prop-types';
3
+ import { classNames } from '@progress/kendo-react-common';
4
+ /**
5
+ * Represents the TaskBoardToolbar component.
6
+ */
7
+ export var TaskBoardToolbar = function (props) {
8
+ var className = props.className, style = props.style, children = props.children;
9
+ return (React.createElement("div", { style: style, className: classNames('k-taskboard-header', className) },
10
+ React.createElement("div", { className: 'k-taskboard-toolbar k-toolbar' }, children)));
11
+ };
12
+ var defaultProps = {};
13
+ TaskBoardToolbar.propTypes = {
14
+ children: PropTypes.node
15
+ };
16
+ TaskBoardToolbar.defaultProps = defaultProps;
17
+ TaskBoardToolbar.displayName = 'KendoReactTaskBoardToolbar';
@@ -0,0 +1,140 @@
1
+ import * as React from 'react';
2
+ import { CardProps, CardHandle, MenuSelectEvent } from '@progress/kendo-react-layout';
3
+ import { TaskBoardConfirmDialogProps } from '../TaskBoardConfirmDialog';
4
+ import { TaskBoardCardHeaderProps } from './CardHeader';
5
+ import { TaskBoardCardBodyProps } from './CardBody';
6
+ import { TaskBoardPreviewDialogProps } from './PreviewDialog';
7
+ import { TaskBoardTaskModel } from '../TaskBoard';
8
+ import { Popup } from '@progress/kendo-react-popup';
9
+ /**
10
+ * Represents the props of the TaskBoardCard component.
11
+ */
12
+ export interface TaskBoardCardProps {
13
+ /**
14
+ * The rendered task.
15
+ */
16
+ task: TaskBoardTaskModel;
17
+ /**
18
+ * The applied styles.
19
+ */
20
+ style?: React.CSSProperties;
21
+ /**
22
+ * Specifies the `tabIndex` that will be added to the TaskBoard Card element.
23
+ */
24
+ tabIndex?: number;
25
+ /**
26
+ * The disabled state.
27
+ */
28
+ disabled?: boolean;
29
+ /**
30
+ * Specifies the CardHandle reference.
31
+ */
32
+ elementRef?: React.RefObject<CardHandle>;
33
+ /**
34
+ * Determines the menu visibility.
35
+ */
36
+ showMenu: boolean;
37
+ /**
38
+ * Determines the visibility of the delete and confirm items.
39
+ */
40
+ showDeleteConfirm: boolean;
41
+ /**
42
+ * Determines the visibility of the previous pane.
43
+ */
44
+ showTaskPreviewPane: boolean;
45
+ /**
46
+ * Represents the menu items.
47
+ */
48
+ menuItems: any[];
49
+ /**
50
+ * Represents the popup reference.
51
+ */
52
+ popupRef: React.RefObject<Popup>;
53
+ /**
54
+ * Represents the confirm dialog message of the TaskBoardCard.
55
+ */
56
+ confirmDialogMessage: React.ReactNode;
57
+ /**
58
+ * Represents the confirm dialog title of the TaskBoardCard.
59
+ */
60
+ confirmDialogTitle: string;
61
+ /**
62
+ * Represents the confirm dialog confirm button.
63
+ */
64
+ confirmDialogConfirmButton: React.ReactNode;
65
+ /**
66
+ * Represents the cancel dialog confirm button.
67
+ */
68
+ confirmDialogCancelButton: React.ReactNode;
69
+ /**
70
+ * Represents the preview dialog priority label.
71
+ */
72
+ previewDialogPriorityLabel: string;
73
+ /**
74
+ * Represents the preview dialog delete node.
75
+ */
76
+ previewDialogDelete: React.ReactNode;
77
+ /**
78
+ * Represents the preview dialog edit node.
79
+ */
80
+ previewDialogEdit: React.ReactNode;
81
+ /**
82
+ * Fires on show of the preview pane.
83
+ */
84
+ onShowPreviewPane: () => void;
85
+ /**
86
+ * Fires on menu item selection.
87
+ */
88
+ onMenuItemSelect: (event: MenuSelectEvent) => void;
89
+ /**
90
+ * Fires when the menu is shown.
91
+ */
92
+ onShowMenu: () => void;
93
+ /**
94
+ * Fires when the menu is hidden.
95
+ */
96
+ onHideMenu: () => void;
97
+ /**
98
+ * Fires on blur of the menu button.
99
+ */
100
+ onMenuButtonBlur: (event: React.FocusEvent<HTMLButtonElement>) => void;
101
+ /**
102
+ * Fires when task is deleted.
103
+ */
104
+ onTaskDelete: () => void;
105
+ /**
106
+ * Fires when task is edited.
107
+ */
108
+ onTaskEdit: () => void;
109
+ /**
110
+ * Fires on close/confirm dialog.
111
+ */
112
+ onCloseConfirmDialog: () => void;
113
+ /**
114
+ * Represents the Card component.
115
+ */
116
+ card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<CardHandle>>;
117
+ /**
118
+ * Represents the TaskBoardCardHeader component.
119
+ */
120
+ cardHeader: React.ComponentType<TaskBoardCardHeaderProps>;
121
+ /**
122
+ * Represents the TaskBoardCardBody component.
123
+ */
124
+ cardBody: React.ComponentType<TaskBoardCardBodyProps>;
125
+ /**
126
+ * Represents the TaskBoardConfirmDialog component.
127
+ */
128
+ confirmDialog: React.ComponentType<TaskBoardConfirmDialogProps>;
129
+ /**
130
+ * Represents the TaskBoardPreviewDialog component.
131
+ */
132
+ previewDialog: React.ComponentType<TaskBoardPreviewDialogProps>;
133
+ }
134
+ /**
135
+ * Represents the TaskBoardCard component.
136
+ */
137
+ export declare const TaskBoardCard: {
138
+ (props: TaskBoardCardProps): JSX.Element;
139
+ displayName: string;
140
+ };
@@ -0,0 +1,33 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import * as React from 'react';
13
+ import { classNames } from '@progress/kendo-react-common';
14
+ import { TASKBOARD_ITEM_ID, TASKBOARD_ITEM_TYPE, TASKBOARD_TASK } from '../constants';
15
+ /**
16
+ * Represents the TaskBoardCard component.
17
+ */
18
+ export var TaskBoardCard = function (props) {
19
+ var _a;
20
+ return (React.createElement(React.Fragment, null,
21
+ React.createElement(props.card, __assign({ key: String(props.task.id), ref: props.elementRef, style: props.style, className: classNames('k-taskboard-card k-cursor-move k-taskboard-card-category', {
22
+ 'k-disabled': props.disabled
23
+ }) }, (_a = {},
24
+ _a[TASKBOARD_ITEM_TYPE] = TASKBOARD_TASK,
25
+ _a[TASKBOARD_ITEM_ID] = props.task.id,
26
+ _a.tabIndex = props.tabIndex,
27
+ _a)),
28
+ React.createElement(props.cardHeader, { showMenu: props.showMenu, menuItems: props.menuItems, popupRef: props.popupRef, title: props.task.title, task: props.task, onShowPreviewPane: props.onShowPreviewPane, onShowMenu: props.onShowMenu, onHideMenu: props.onHideMenu, onMenuButtonBlur: props.onMenuButtonBlur, onMenuItemSelect: props.onMenuItemSelect }),
29
+ React.createElement(props.cardBody, { task: props.task }, props.task.description)),
30
+ props.showDeleteConfirm && (React.createElement(props.confirmDialog, { onConfirm: props.onTaskDelete, onClose: props.onCloseConfirmDialog, dialogMessage: props.confirmDialogMessage, dialogTitle: props.confirmDialogTitle, dialogConfirmButton: props.confirmDialogConfirmButton, dialogCancelButton: props.confirmDialogCancelButton })),
31
+ props.showTaskPreviewPane && (React.createElement(props.previewDialog, { title: props.task.title, description: props.task.description, priorityLabel: props.previewDialogPriorityLabel, delete: props.previewDialogDelete, edit: props.previewDialogEdit, onShowTaskPreviewPane: props.onShowPreviewPane, onDeleteTask: props.onTaskDelete, onTaskEdit: props.onTaskEdit, priority: props.task.priority }))));
32
+ };
33
+ TaskBoardCard.displayName = 'KendoReactTaskBoardCard';
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import { TaskBoardTaskModel } from '../TaskBoard';
3
+ /**
4
+ * Represents the props of the TaskBoardCardBody component.
5
+ */
6
+ export interface TaskBoardCardBodyProps {
7
+ /**
8
+ * Determines the children nodes.
9
+ */
10
+ children: React.ReactNode;
11
+ /**
12
+ * Determines the TaskBoardTask.
13
+ */
14
+ task: TaskBoardTaskModel;
15
+ }
16
+ /**
17
+ * Represents the TaskBoardCardBody component.
18
+ */
19
+ export declare const TaskBoardCardBody: {
20
+ (props: TaskBoardCardBodyProps): JSX.Element;
21
+ displayName: string;
22
+ };
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { CardBody } from '@progress/kendo-react-layout';
3
+ /**
4
+ * Represents the TaskBoardCardBody component.
5
+ */
6
+ export var TaskBoardCardBody = function (props) {
7
+ return (React.createElement(CardBody, null, props.children));
8
+ };
9
+ TaskBoardCardBody.displayName = 'KendoReactTaskBoardCardBody';
@@ -0,0 +1,56 @@
1
+ import * as React from 'react';
2
+ import { MenuSelectEvent } from '@progress/kendo-react-layout';
3
+ import { Popup } from '@progress/kendo-react-popup';
4
+ import { TaskBoardTaskModel } from '../TaskBoard';
5
+ /**
6
+ * Represents the props of the TaskBoardCardHeader component.
7
+ */
8
+ export interface TaskBoardCardHeaderProps {
9
+ /**
10
+ * Determines the visibility of the show menu.
11
+ */
12
+ showMenu: boolean;
13
+ /**
14
+ * Represents the menu items.
15
+ */
16
+ menuItems: any[];
17
+ /**
18
+ * Specifies the popup reference.
19
+ */
20
+ popupRef: React.RefObject<Popup>;
21
+ /**
22
+ * The rendered title.
23
+ */
24
+ title: React.ReactNode;
25
+ /**
26
+ * The rendered task.
27
+ */
28
+ task: TaskBoardTaskModel;
29
+ /**
30
+ * Fires when the preview pane is shown.
31
+ */
32
+ onShowPreviewPane: () => void;
33
+ /**
34
+ * Fires when the menu is shown.
35
+ */
36
+ onShowMenu: () => void;
37
+ /**
38
+ * Fires when the menu is hidden.
39
+ */
40
+ onHideMenu: () => void;
41
+ /**
42
+ * Fires on blur of the menu button.
43
+ */
44
+ onMenuButtonBlur: (event: React.FocusEvent<HTMLButtonElement>) => void;
45
+ /**
46
+ * Fires when menu item is selected.
47
+ */
48
+ onMenuItemSelect: (event: MenuSelectEvent) => void;
49
+ }
50
+ /**
51
+ * Represents the TaskBoardCardHeader component.
52
+ */
53
+ export declare const TaskBoardCardHeader: {
54
+ (props: TaskBoardCardHeaderProps): JSX.Element;
55
+ displayName: string;
56
+ };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { Button } from '@progress/kendo-react-buttons';
3
+ import { CardHeader, Menu } from '@progress/kendo-react-layout';
4
+ import { Popup } from '@progress/kendo-react-popup';
5
+ /**
6
+ * Represents the TaskBoardCardHeader component.
7
+ */
8
+ export var TaskBoardCardHeader = function (props) {
9
+ var buttonRef = React.useRef();
10
+ return (React.createElement(CardHeader, { className: "k-hbox" },
11
+ React.createElement("span", { className: 'k-card-title k-link', onClick: props.onShowPreviewPane }, props.title),
12
+ React.createElement("span", { className: 'k-spacer' }),
13
+ React.createElement("div", { className: 'k-card-header-actions' },
14
+ React.createElement(Button, { fillMode: "flat", icon: "more-vertical", ref: buttonRef, onClick: props.showMenu ? props.onHideMenu : props.onShowMenu, onBlur: props.onMenuButtonBlur }),
15
+ React.createElement(Popup, { anchor: buttonRef.current && buttonRef.current.element, show: props.showMenu, ref: props.popupRef },
16
+ React.createElement(Menu, { vertical: true, onSelect: props.onMenuItemSelect, items: props.menuItems, className: 'k-context-menu' })))));
17
+ };
18
+ TaskBoardCardHeader.displayName = 'KendoReactTaskBoardCardHeader';