superdesk-ui-framework 3.0.7 → 3.0.9
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/app-typescript/components/Layouts/AuthoringInnerBody.tsx +3 -1
- package/app-typescript/components/Lists/ContentList.tsx +28 -27
- package/app-typescript/components/Lists/TableList.tsx +140 -126
- package/app-typescript/components/SingleAndDoubleClickFunction.tsx +21 -0
- package/dist/examples.bundle.js +1019 -977
- package/dist/playgrounds/react-playgrounds/EditorTest.tsx +18 -10
- package/dist/playgrounds/react-playgrounds/Multiedit.tsx +15 -13
- package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +136 -125
- package/dist/superdesk-ui.bundle.js +735 -706
- package/dist/vendor.bundle.js +14 -14
- package/examples/pages/playgrounds/react-playgrounds/EditorTest.tsx +18 -10
- package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +15 -13
- package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +136 -125
- package/package.json +1 -1
- package/react/components/Layouts/AuthoringInnerBody.js +3 -1
- package/react/components/Lists/ContentList.d.ts +2 -5
- package/react/components/Lists/ContentList.js +20 -25
- package/react/components/Lists/TableList.d.ts +4 -7
- package/react/components/Lists/TableList.js +66 -60
- package/react/components/SingleAndDoubleClickFunction.d.ts +6 -0
- package/react/components/SingleAndDoubleClickFunction.js +19 -0
- package/.vscode/settings.json +0 -5
- package/app-typescript/dist/components/Alert.d.ts +0 -16
- package/app-typescript/dist/components/Autocomplete.d.ts +0 -48
- package/app-typescript/dist/components/Avatar.d.ts +0 -33
- package/app-typescript/dist/components/Badge.d.ts +0 -13
- package/app-typescript/dist/components/Button.d.ts +0 -23
- package/app-typescript/dist/components/ButtonGroup.d.ts +0 -12
- package/app-typescript/dist/components/CheckButtonGroup.d.ts +0 -11
- package/app-typescript/dist/components/CheckGroup.d.ts +0 -9
- package/app-typescript/dist/components/Checkbox.d.ts +0 -19
- package/app-typescript/dist/components/CheckboxButton.d.ts +0 -19
- package/app-typescript/dist/components/DatePicker.d.ts +0 -37
- package/app-typescript/dist/components/Divider.d.ts +0 -9
- package/app-typescript/dist/components/DonutChart.d.ts +0 -12
- package/app-typescript/dist/components/Dropdown.d.ts +0 -28
- package/app-typescript/dist/components/DropdownFirst.d.ts +0 -42
- package/app-typescript/dist/components/EmptyState.d.ts +0 -11
- package/app-typescript/dist/components/FormLabel.d.ts +0 -9
- package/app-typescript/dist/components/Genie.d.ts +0 -13
- package/app-typescript/dist/components/GridItem.d.ts +0 -69
- package/app-typescript/dist/components/GridList.d.ts +0 -14
- package/app-typescript/dist/components/HeadingText.d.ts +0 -10
- package/app-typescript/dist/components/HelloWorld.d.ts +0 -8
- package/app-typescript/dist/components/Icon.d.ts +0 -12
- package/app-typescript/dist/components/IconButton.d.ts +0 -12
- package/app-typescript/dist/components/IconLabel.d.ts +0 -11
- package/app-typescript/dist/components/Input.d.ts +0 -24
- package/app-typescript/dist/components/Label.d.ts +0 -15
- package/app-typescript/dist/components/LeftMenu.d.ts +0 -26
- package/app-typescript/dist/components/Loader.d.ts +0 -8
- package/app-typescript/dist/components/NavButton.d.ts +0 -15
- package/app-typescript/dist/components/Popover.d.ts +0 -13
- package/app-typescript/dist/components/PropsList.d.ts +0 -15
- package/app-typescript/dist/components/Radio.d.ts +0 -19
- package/app-typescript/dist/components/RadioButton.d.ts +0 -20
- package/app-typescript/dist/components/Select.d.ts +0 -29
- package/app-typescript/dist/components/SelectWithTemplate.d.ts +0 -32
- package/app-typescript/dist/components/SlidingToolbar.d.ts +0 -8
- package/app-typescript/dist/components/StrechBar.d.ts +0 -4
- package/app-typescript/dist/components/SubNav.d.ts +0 -10
- package/app-typescript/dist/components/Switch.d.ts +0 -12
- package/app-typescript/dist/components/TabCustom.d.ts +0 -25
- package/app-typescript/dist/components/TabList.d.ts +0 -22
- package/app-typescript/dist/components/Tag.d.ts +0 -9
- package/app-typescript/dist/components/TagInput.d.ts +0 -7
- package/app-typescript/dist/components/TagInputTest.d.ts +0 -18
- package/app-typescript/dist/components/TimePicker.d.ts +0 -11
- package/app-typescript/dist/components/Tooltip.d.ts +0 -11
- package/app-typescript/dist/components/_Positioner.d.ts +0 -27
- package/app-typescript/dist/index.d.ts +0 -56
- package/yarn-error.log +0 -111
@@ -19,10 +19,10 @@ export interface IPropsArrayItem {
|
|
19
19
|
end?: React.ReactNode;
|
20
20
|
action?: React.ReactNode;
|
21
21
|
hexColor?: string;
|
22
|
-
onClick?(): void;
|
23
|
-
onDoubleClick?(): void;
|
24
22
|
locked?: boolean;
|
25
23
|
positionLocked?: boolean;
|
24
|
+
onClick?(): void;
|
25
|
+
onDoubleClick?(): void;
|
26
26
|
}
|
27
27
|
interface IState {
|
28
28
|
items: Array<IPropsArrayItem>;
|
@@ -53,11 +53,8 @@ export interface IPropsItem {
|
|
53
53
|
itemsDropdown?(index?: number): Array<IMenuItem | ISubmenu | IMenuGroup | 'divider'>;
|
54
54
|
}
|
55
55
|
declare class TableListItem extends React.PureComponent<IPropsItem> {
|
56
|
-
private
|
57
|
-
|
58
|
-
private prevent;
|
59
|
-
onSingleClick: () => void;
|
60
|
-
onDoubleClick: () => void;
|
56
|
+
private multiClickHandler;
|
57
|
+
constructor(props: IPropsItem);
|
61
58
|
onActionMenuClick: (event: React.MouseEvent<HTMLElement>) => void;
|
62
59
|
render(): JSX.Element;
|
63
60
|
}
|
@@ -50,12 +50,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
51
51
|
exports.TableListItem = exports.TableList = void 0;
|
52
52
|
var React = __importStar(require("react"));
|
53
|
+
var react_dom_1 = __importDefault(require("react-dom"));
|
53
54
|
var classnames_1 = __importDefault(require("classnames"));
|
54
55
|
var react_beautiful_dnd_1 = require("react-beautiful-dnd");
|
55
56
|
var Tooltip_1 = require("../Tooltip");
|
56
57
|
var Button_1 = require("../Button");
|
57
58
|
var Dropdown_1 = require("../Dropdown");
|
58
|
-
var
|
59
|
+
var SingleAndDoubleClickFunction_1 = require("./../SingleAndDoubleClickFunction");
|
59
60
|
var reorder = function (list, startIndex, endIndex) {
|
60
61
|
var result = Array.from(list);
|
61
62
|
var removed = result.splice(startIndex, 1)[0];
|
@@ -121,30 +122,37 @@ var TableList = /** @class */ (function (_super) {
|
|
121
122
|
? _this.props.itemsDropdown(index)
|
122
123
|
: []; } })
|
123
124
|
: React.createElement("div", __assign({ ref: provided2.innerRef }, provided2.draggableProps, provided2.dragHandleProps),
|
124
|
-
React.createElement(TableListItem, { dragAndDrop: _this.props.dragAndDrop, start: item.start, center: item.center, end: item.end, action: item.action, onClick: item.onClick
|
125
|
+
React.createElement(TableListItem, { dragAndDrop: _this.props.dragAndDrop, start: item.start, center: item.center, end: item.end, action: item.action, onClick: item.onClick
|
126
|
+
? item.onClick
|
127
|
+
: undefined, onDoubleClick: item.onDoubleClick
|
125
128
|
? item.onDoubleClick
|
126
129
|
: undefined, addItem: _this.props.addItem, itemsDropdown: function () { return _this.props.itemsDropdown
|
127
130
|
? _this.props.itemsDropdown(index)
|
128
131
|
: []; }, hexColor: item.hexColor, locked: item.locked, positionLocked: item.positionLocked, onAddItem: function () { return _this.props.onAddItem
|
129
132
|
&& _this.props.onAddItem(index, item); }, showDragHandle: _this.props.showDragHandle }))); })); }),
|
130
133
|
provided.placeholder,
|
131
|
-
(_this.props.addItem && !_this.props.readOnly)
|
132
|
-
React.createElement("div", { className: "table-list__add-item table-list__item--margin" },
|
134
|
+
(_this.props.addItem && !_this.props.readOnly)
|
135
|
+
&& React.createElement("div", { className: "table-list__add-item table-list__item--margin" },
|
133
136
|
React.createElement(Tooltip_1.Tooltip, { text: 'Add item', flow: 'top', appendToBody: true },
|
134
137
|
React.createElement("div", { className: 'table-list__add-item--container sd-margin-x--auto' }, _this.dropDown()))))); }))
|
135
138
|
: React.createElement("div", { role: 'list', className: classes },
|
136
|
-
this.state.items.map(function (item, index) { return (React.createElement(TableListItem, { key: index, start: item.start, center: item.center, end: item.end, action: item.action, onClick: item.onClick
|
139
|
+
this.state.items.map(function (item, index) { return (React.createElement(TableListItem, { key: index, start: item.start, center: item.center, end: item.end, action: item.action, onClick: item.onClick
|
140
|
+
? item.onClick
|
141
|
+
: undefined, onDoubleClick: item.onDoubleClick
|
137
142
|
? item.onDoubleClick
|
138
|
-
: undefined, addItem: _this.props.addItem, itemsDropdown: function () { return _this.props.itemsDropdown
|
143
|
+
: undefined, addItem: _this.props.addItem, itemsDropdown: function () { return _this.props.itemsDropdown
|
144
|
+
? _this.props.itemsDropdown(index)
|
145
|
+
: []; }, hexColor: item.hexColor, locked: item.locked, positionLocked: item.positionLocked, onAddItem: function () { return _this.props.onAddItem
|
139
146
|
&& _this.props.onAddItem(index, item); } })); }),
|
140
|
-
(this.props.addItem && !this.props.readOnly)
|
141
|
-
React.createElement("div", { className: "table-list__add-item table-list__item--margin" },
|
147
|
+
(this.props.addItem && !this.props.readOnly)
|
148
|
+
&& React.createElement("div", { className: "table-list__add-item table-list__item--margin" },
|
142
149
|
React.createElement(Tooltip_1.Tooltip, { text: 'Add item', flow: 'top', appendToBody: true },
|
143
150
|
React.createElement("div", { className: 'table-list__add-item--container sd-margin-x--auto' }, this.dropDown()))))
|
144
|
-
: (this.props.addItem && !this.props.readOnly)
|
145
|
-
React.createElement("div", { className:
|
146
|
-
React.createElement(
|
147
|
-
React.createElement(
|
151
|
+
: (this.props.addItem && !this.props.readOnly)
|
152
|
+
? React.createElement("div", { role: 'list', className: classes },
|
153
|
+
React.createElement("div", { className: "table-list__add-item table-list__item--margin" },
|
154
|
+
React.createElement(Tooltip_1.Tooltip, { text: 'Add item', flow: 'top', appendToBody: true },
|
155
|
+
React.createElement("div", { className: 'table-list__add-item--container sd-margin-x--auto' }, this.dropDown()))))
|
148
156
|
: null);
|
149
157
|
};
|
150
158
|
return TableList;
|
@@ -152,39 +160,13 @@ var TableList = /** @class */ (function (_super) {
|
|
152
160
|
exports.TableList = TableList;
|
153
161
|
var TableListItem = /** @class */ (function (_super) {
|
154
162
|
__extends(TableListItem, _super);
|
155
|
-
function TableListItem() {
|
156
|
-
var _this = _super
|
157
|
-
_this.delay = 200;
|
158
|
-
_this.prevent = false;
|
159
|
-
_this.onSingleClick = function () {
|
160
|
-
var selection = window.getSelection();
|
161
|
-
_this.timer = setTimeout(function () {
|
162
|
-
if (!_this.prevent && _this.props.onClick && selection) {
|
163
|
-
if (_this.props.dragAndDrop) {
|
164
|
-
_this.props.onClick();
|
165
|
-
}
|
166
|
-
else {
|
167
|
-
if (selection.toString().length < 1) {
|
168
|
-
_this.props.onClick();
|
169
|
-
}
|
170
|
-
}
|
171
|
-
}
|
172
|
-
}, _this.delay);
|
173
|
-
};
|
174
|
-
_this.onDoubleClick = function () {
|
175
|
-
clearTimeout(_this.timer);
|
176
|
-
_this.prevent = true;
|
177
|
-
if (_this.props.onDoubleClick) {
|
178
|
-
_this.props.onDoubleClick();
|
179
|
-
}
|
180
|
-
setTimeout(function () {
|
181
|
-
_this.prevent = false;
|
182
|
-
}, _this.delay);
|
183
|
-
};
|
163
|
+
function TableListItem(props) {
|
164
|
+
var _this = _super.call(this, props) || this;
|
184
165
|
_this.onActionMenuClick = function (event) {
|
185
166
|
event.preventDefault();
|
186
167
|
event.stopPropagation();
|
187
168
|
};
|
169
|
+
_this.multiClickHandler = (0, SingleAndDoubleClickFunction_1.setupSingleAndDoubleClick)();
|
188
170
|
return _this;
|
189
171
|
}
|
190
172
|
TableListItem.prototype.render = function () {
|
@@ -196,30 +178,52 @@ var TableListItem = /** @class */ (function (_super) {
|
|
196
178
|
'table-list__item--position-locked': this.props.positionLocked,
|
197
179
|
'table-list__item--drag-handles-always': !this.props.showDragHandle,
|
198
180
|
'table-list__item--drag-handles-none': this.props.showDragHandle === 'none',
|
181
|
+
'table-list__item--margin': !this.props.addItem,
|
199
182
|
});
|
200
|
-
|
201
|
-
|
202
|
-
|
183
|
+
var Wrapper = this.props.addItem
|
184
|
+
? function (_a) {
|
185
|
+
var children = _a.children;
|
186
|
+
return (React.createElement("div", { className: 'table-list__item-container' }, children));
|
187
|
+
}
|
188
|
+
: function (_a) {
|
189
|
+
var children = _a.children;
|
190
|
+
return children;
|
191
|
+
};
|
192
|
+
return (React.createElement(Wrapper, null,
|
193
|
+
React.createElement(React.Fragment, null,
|
194
|
+
React.createElement("div", { role: 'listitem', className: classes, onClick: function (e) { return _this.multiClickHandler(e, {
|
195
|
+
onSingleClick: function () {
|
196
|
+
var selection = window.getSelection();
|
197
|
+
if (_this.props.onClick && selection) {
|
198
|
+
if (_this.props.dragAndDrop) {
|
199
|
+
_this.props.onClick();
|
200
|
+
}
|
201
|
+
else {
|
202
|
+
if (selection.toString().length < 1) {
|
203
|
+
_this.props.onClick();
|
204
|
+
}
|
205
|
+
}
|
206
|
+
}
|
207
|
+
},
|
208
|
+
onDoubleClick: function () {
|
209
|
+
if (_this.props.onDoubleClick) {
|
210
|
+
_this.props.onDoubleClick();
|
211
|
+
}
|
212
|
+
},
|
213
|
+
}); } },
|
203
214
|
React.createElement("div", { className: 'table-list__item-border', style: { backgroundColor: this.props.hexColor } }),
|
204
215
|
React.createElement("div", { className: 'table-list__item-content' },
|
205
216
|
React.createElement("div", { className: 'table-list__item-content-block' }, this.props.start && this.props.start),
|
206
217
|
React.createElement("div", { className: 'table-list__item-content-block table-list__item-content-block--center' }, this.props.center && this.props.center),
|
207
218
|
React.createElement("div", { className: 'table-list__item-content-block' }, this.props.end && this.props.end)),
|
208
|
-
this.props.action
|
209
|
-
React.createElement("div", { className: 'table-list__slide-in-actions', onClick: this.onActionMenuClick }, this.props.action)),
|
210
|
-
|
211
|
-
React.createElement(
|
212
|
-
React.createElement(
|
213
|
-
React.createElement(
|
214
|
-
React.createElement(
|
215
|
-
|
216
|
-
React.createElement("div", { className: 'table-list__item-border', style: { backgroundColor: this.props.hexColor } }),
|
217
|
-
React.createElement("div", { className: 'table-list__item-content' },
|
218
|
-
React.createElement("div", { className: 'table-list__item-content-block' }, this.props.start && this.props.start),
|
219
|
-
React.createElement("div", { className: 'table-list__item-content-block table-list__item-content-block--center' }, this.props.center && this.props.center),
|
220
|
-
React.createElement("div", { className: 'table-list__item-content-block' }, this.props.end && this.props.end)),
|
221
|
-
this.props.action &&
|
222
|
-
React.createElement("div", { className: 'table-list__slide-in-actions', onClick: this.onActionMenuClick }, this.props.action)));
|
219
|
+
this.props.action
|
220
|
+
&& React.createElement("div", { className: 'table-list__slide-in-actions', onClick: this.onActionMenuClick }, this.props.action)),
|
221
|
+
this.props.addItem
|
222
|
+
&& React.createElement("div", { className: 'table-list__add-bar-container' },
|
223
|
+
React.createElement(Tooltip_1.Tooltip, { text: 'Add item', flow: 'top', appendToBody: true },
|
224
|
+
React.createElement("div", { className: 'table-list__add-bar' },
|
225
|
+
React.createElement(Dropdown_1.Dropdown, { onChange: this.props.onAddItem, items: this.props.itemsDropdown ? this.props.itemsDropdown() : [] },
|
226
|
+
React.createElement(Button_1.Button, { type: "primary", icon: "plus-large", text: "Add item", size: "small", shape: "round", iconOnly: true, onClick: function () { return false; } }))))))));
|
223
227
|
};
|
224
228
|
return TableListItem;
|
225
229
|
}(React.PureComponent));
|
@@ -235,7 +239,9 @@ var PortalItem = /** @class */ (function (_super) {
|
|
235
239
|
var snapshot = this.props.snapshot;
|
236
240
|
var usePortal = snapshot.isDragging;
|
237
241
|
var child = (React.createElement("div", __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps),
|
238
|
-
React.createElement(TableListItem, { dragAndDrop: this.props.dragAndDrop, start: this.props.item.start, center: this.props.item.center, end: this.props.item.end, action: this.props.item.action, onClick: this.props.item.onClick
|
242
|
+
React.createElement(TableListItem, { dragAndDrop: this.props.dragAndDrop, start: this.props.item.start, center: this.props.item.center, end: this.props.item.end, action: this.props.item.action, onClick: this.props.item.onClick
|
243
|
+
? this.props.item.onClick
|
244
|
+
: undefined, onDoubleClick: this.props.item.onDoubleClick
|
239
245
|
? this.props.item.onDoubleClick
|
240
246
|
: undefined, addItem: this.props.addItem, itemsDropdown: this.props.itemsDropdown, hexColor: this.props.item.hexColor, locked: this.props.item.locked, positionLocked: this.props.item.positionLocked, onAddItem: function () { return _this.props.onAddItem; }, showDragHandle: this.props.showDragHandle })));
|
241
247
|
if (!usePortal) {
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export interface ICallbacks {
|
3
|
+
onSingleClick: (event: React.MouseEvent) => void;
|
4
|
+
onDoubleClick: (event: React.MouseEvent) => void;
|
5
|
+
}
|
6
|
+
export declare function setupSingleAndDoubleClick(): (event: React.MouseEvent, cb: ICallbacks) => void;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.setupSingleAndDoubleClick = void 0;
|
4
|
+
function setupSingleAndDoubleClick() {
|
5
|
+
var timer;
|
6
|
+
var delay;
|
7
|
+
return function (event, cb) {
|
8
|
+
clearTimeout(timer);
|
9
|
+
if (event.nativeEvent.detail === 1) {
|
10
|
+
timer = window.setTimeout(function () {
|
11
|
+
cb.onSingleClick(event);
|
12
|
+
}, delay);
|
13
|
+
}
|
14
|
+
else if (event.nativeEvent.detail === 2) {
|
15
|
+
cb.onDoubleClick(event);
|
16
|
+
}
|
17
|
+
};
|
18
|
+
}
|
19
|
+
exports.setupSingleAndDoubleClick = setupSingleAndDoubleClick;
|
package/.vscode/settings.json
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
type?: 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'sd-green';
|
4
|
-
style?: 'filled' | 'hollow';
|
5
|
-
size?: 'normal' | 'small';
|
6
|
-
restoreIcon?: 'info' | 'help';
|
7
|
-
}
|
8
|
-
interface IState {
|
9
|
-
open: boolean;
|
10
|
-
}
|
11
|
-
export declare class Alert extends React.PureComponent<IProps, IState> {
|
12
|
-
constructor(props: IProps);
|
13
|
-
onToggle(): void;
|
14
|
-
render(): JSX.Element;
|
15
|
-
}
|
16
|
-
export {};
|
@@ -1,48 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
items: Array<any>;
|
4
|
-
keyValue?: string;
|
5
|
-
minLength?: number;
|
6
|
-
value?: string | object;
|
7
|
-
label?: string;
|
8
|
-
placeholder?: string;
|
9
|
-
info?: string;
|
10
|
-
error?: string;
|
11
|
-
required?: boolean;
|
12
|
-
disabled?: boolean;
|
13
|
-
invalid?: boolean;
|
14
|
-
inlineLabel?: boolean;
|
15
|
-
isSearchField?: boolean;
|
16
|
-
listItemTemplate?(value: any): any;
|
17
|
-
search?(searhString: string, callback: (result: Array<any>) => void): {
|
18
|
-
cancel: () => void;
|
19
|
-
};
|
20
|
-
onChange(newValue: string): void;
|
21
|
-
onSelect?(suggestion: string): void;
|
22
|
-
}
|
23
|
-
interface IState {
|
24
|
-
selectedItem: any;
|
25
|
-
filteredItems: any;
|
26
|
-
invalid: boolean;
|
27
|
-
focused: boolean;
|
28
|
-
}
|
29
|
-
export declare class Autocomplete extends React.Component<IProps, IState> {
|
30
|
-
latestCall?: {
|
31
|
-
cancel: () => void;
|
32
|
-
};
|
33
|
-
constructor(props: IProps);
|
34
|
-
htmlId: string;
|
35
|
-
search(term: string): void;
|
36
|
-
searchItem(event: any): void;
|
37
|
-
handleChange(event: {
|
38
|
-
originalEvent: Event;
|
39
|
-
value: any;
|
40
|
-
}): void;
|
41
|
-
handleSelect(event: {
|
42
|
-
originalEvent: Event;
|
43
|
-
value: any;
|
44
|
-
}): void;
|
45
|
-
handleInputClear(): void;
|
46
|
-
render(): JSX.Element;
|
47
|
-
}
|
48
|
-
export {};
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IBase {
|
3
|
-
tooltipText?: string;
|
4
|
-
}
|
5
|
-
interface IImageAvatar extends IBase {
|
6
|
-
imageUrl?: string;
|
7
|
-
}
|
8
|
-
interface ITextAvatar extends IBase {
|
9
|
-
text: string;
|
10
|
-
}
|
11
|
-
export declare class AvatarContentText extends React.PureComponent<ITextAvatar> {
|
12
|
-
render(): JSX.Element;
|
13
|
-
}
|
14
|
-
export declare class AvatarContentImage extends React.PureComponent<IImageAvatar> {
|
15
|
-
render(): JSX.Element;
|
16
|
-
}
|
17
|
-
interface IPropsAvatarWrapper {
|
18
|
-
size?: 'small' | 'medium' | 'large' | 'x-large' | 'xx-large';
|
19
|
-
statusIndicator?: {
|
20
|
-
status: 'online' | 'offline';
|
21
|
-
tooltipText?: string;
|
22
|
-
};
|
23
|
-
administratorIndicator?: {
|
24
|
-
enabled: boolean;
|
25
|
-
tooltipText?: string;
|
26
|
-
};
|
27
|
-
children: React.ReactNode;
|
28
|
-
'data-test-id'?: string;
|
29
|
-
}
|
30
|
-
export declare class AvatarWrapper extends React.PureComponent<IPropsAvatarWrapper> {
|
31
|
-
render(): JSX.Element;
|
32
|
-
}
|
33
|
-
export {};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
text?: string;
|
4
|
-
type?: 'default' | 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'light';
|
5
|
-
color?: string;
|
6
|
-
shape?: 'round' | 'square';
|
7
|
-
children?: React.ReactNode;
|
8
|
-
'data-test-id'?: string;
|
9
|
-
}
|
10
|
-
export declare class Badge extends React.PureComponent<IProps> {
|
11
|
-
render(): JSX.Element;
|
12
|
-
}
|
13
|
-
export {};
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IButtonBase {
|
3
|
-
id?: string;
|
4
|
-
theme?: 'light' | 'dark';
|
5
|
-
type?: 'default' | 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'sd-green';
|
6
|
-
size?: 'small' | 'normal' | 'large';
|
7
|
-
children?: never;
|
8
|
-
icon?: string;
|
9
|
-
disabled?: boolean;
|
10
|
-
iconOnly?: boolean;
|
11
|
-
onClick(): void;
|
12
|
-
'data-test-id'?: string;
|
13
|
-
}
|
14
|
-
interface IPropsButton extends IButtonBase {
|
15
|
-
text: string;
|
16
|
-
expand?: boolean;
|
17
|
-
style?: 'filled' | 'hollow' | 'text-only';
|
18
|
-
shape?: 'square' | 'round';
|
19
|
-
}
|
20
|
-
export declare class Button extends React.PureComponent<IPropsButton> {
|
21
|
-
render(): JSX.Element;
|
22
|
-
}
|
23
|
-
export {};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
orientation?: 'horizontal' | 'vertical';
|
4
|
-
spaces?: 'comfort' | 'compact';
|
5
|
-
align?: 'left' | 'right' | 'center' | 'inline';
|
6
|
-
padded?: boolean;
|
7
|
-
children: React.ReactNode;
|
8
|
-
}
|
9
|
-
export declare class ButtonGroup extends React.PureComponent<IProps> {
|
10
|
-
render(): JSX.Element;
|
11
|
-
}
|
12
|
-
export {};
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
orientation?: 'horizontal' | 'vertical';
|
4
|
-
grid?: boolean;
|
5
|
-
align?: 'left' | 'right' | 'center' | 'inline';
|
6
|
-
padded?: boolean;
|
7
|
-
}
|
8
|
-
export declare class CheckButtonGroup extends React.PureComponent<IProps> {
|
9
|
-
render(): JSX.Element;
|
10
|
-
}
|
11
|
-
export {};
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
label: {
|
4
|
-
text: string;
|
5
|
-
side?: 'left' | 'right';
|
6
|
-
hidden?: boolean;
|
7
|
-
};
|
8
|
-
checked?: boolean;
|
9
|
-
disabled?: boolean;
|
10
|
-
required?: boolean;
|
11
|
-
onChange(nextValue: boolean): void;
|
12
|
-
}
|
13
|
-
export declare class Checkbox extends React.Component<IProps> {
|
14
|
-
htmlId: string;
|
15
|
-
constructor(props: IProps);
|
16
|
-
handleChange(event: React.ChangeEvent<HTMLInputElement>): void;
|
17
|
-
render(): JSX.Element;
|
18
|
-
}
|
19
|
-
export {};
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
label: {
|
4
|
-
text: string;
|
5
|
-
icon?: string;
|
6
|
-
hidden?: boolean;
|
7
|
-
};
|
8
|
-
checked?: boolean;
|
9
|
-
disabled?: boolean;
|
10
|
-
required?: boolean;
|
11
|
-
onChange(nextValue: boolean): void;
|
12
|
-
}
|
13
|
-
export declare class CheckboxButton extends React.Component<IProps> {
|
14
|
-
htmlId: string;
|
15
|
-
constructor(props: IProps);
|
16
|
-
handleChange(event: React.ChangeEvent<HTMLInputElement>): void;
|
17
|
-
render(): JSX.Element;
|
18
|
-
}
|
19
|
-
export {};
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { LocaleSettings, CalendarProps } from '@superdesk/primereact/calendar';
|
3
|
-
export declare type DatePickerLocaleSettings = Omit<LocaleSettings, 'today' | 'clear'>;
|
4
|
-
interface IDatePickerBase {
|
5
|
-
disabled?: boolean;
|
6
|
-
dateFormat: string;
|
7
|
-
shortcuts?: Array<{
|
8
|
-
days: number;
|
9
|
-
label: string;
|
10
|
-
}>;
|
11
|
-
locale?: DatePickerLocaleSettings;
|
12
|
-
}
|
13
|
-
interface IDatePicker extends IDatePickerBase {
|
14
|
-
value: Date | null;
|
15
|
-
onChange(valueNext: Date | null): void;
|
16
|
-
}
|
17
|
-
interface IState {
|
18
|
-
value: CalendarProps['value'];
|
19
|
-
valid: boolean;
|
20
|
-
}
|
21
|
-
export declare class DatePicker extends React.PureComponent<IDatePicker, IState> {
|
22
|
-
private instance;
|
23
|
-
hidePopupOnScroll: () => void;
|
24
|
-
constructor(props: IDatePicker);
|
25
|
-
componentDidMount(): void;
|
26
|
-
componentWillUnmount(): void;
|
27
|
-
componentDidUpdate(prevProps: IDatePicker): void;
|
28
|
-
render(): JSX.Element;
|
29
|
-
}
|
30
|
-
interface IDatePickerISO extends IDatePickerBase {
|
31
|
-
value: string;
|
32
|
-
onChange(value: string): void;
|
33
|
-
}
|
34
|
-
export declare class DatePickerISO extends React.PureComponent<IDatePickerISO> {
|
35
|
-
render(): JSX.Element;
|
36
|
-
}
|
37
|
-
export {};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { ChartData, ChartOptions } from 'chart.js';
|
3
|
-
interface IProps {
|
4
|
-
data: ChartData;
|
5
|
-
options: ChartOptions;
|
6
|
-
width: string;
|
7
|
-
height: string;
|
8
|
-
}
|
9
|
-
export declare class DonutChart extends React.Component<IProps, {}> {
|
10
|
-
render(): JSX.Element;
|
11
|
-
}
|
12
|
-
export {};
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
export interface IMenuItem {
|
3
|
-
label: string;
|
4
|
-
icon?: string;
|
5
|
-
onSelect(): void;
|
6
|
-
}
|
7
|
-
export interface ISubmenu {
|
8
|
-
type: 'submenu';
|
9
|
-
label: string;
|
10
|
-
icon?: string;
|
11
|
-
items: Array<IMenuItem | ISubmenu | IMenuGroup | 'divider'>;
|
12
|
-
}
|
13
|
-
export interface IMenuGroup {
|
14
|
-
type: 'group';
|
15
|
-
label?: string;
|
16
|
-
items: Array<IMenuItem | ISubmenu | IMenuGroup | 'divider'>;
|
17
|
-
}
|
18
|
-
interface IMenu {
|
19
|
-
label?: string;
|
20
|
-
align?: 'left' | 'right';
|
21
|
-
items: Array<IMenuItem | ISubmenu | IMenuGroup | 'divider'>;
|
22
|
-
header?: Array<IMenuItem | ISubmenu | IMenuGroup | 'divider'>;
|
23
|
-
footer?: Array<IMenuItem | ISubmenu | IMenuGroup | 'divider'>;
|
24
|
-
append?: boolean;
|
25
|
-
children: React.ReactNode;
|
26
|
-
}
|
27
|
-
export declare const Dropdown: ({ items, header, footer, children, append, align, }: IMenu) => JSX.Element;
|
28
|
-
export {};
|
@@ -1,42 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
name: string;
|
4
|
-
align?: 'left' | 'right';
|
5
|
-
side?: 'left' | 'right';
|
6
|
-
icon?: string;
|
7
|
-
navDropdown?: boolean;
|
8
|
-
level?: boolean;
|
9
|
-
headerFooter?: boolean;
|
10
|
-
children: React.ReactNode;
|
11
|
-
}
|
12
|
-
interface IPropsItem {
|
13
|
-
text: string;
|
14
|
-
noLink?: boolean;
|
15
|
-
icon?: string;
|
16
|
-
onSelect(): void;
|
17
|
-
children?: never;
|
18
|
-
}
|
19
|
-
interface IPropsLabel {
|
20
|
-
text: string;
|
21
|
-
children?: never;
|
22
|
-
}
|
23
|
-
interface IPropsMenu {
|
24
|
-
title: string;
|
25
|
-
children: React.ReactNode;
|
26
|
-
}
|
27
|
-
export declare const DropdownFirst: {
|
28
|
-
({ name, align, side, level, icon, headerFooter, navDropdown, children, }: IProps): JSX.Element;
|
29
|
-
Item: ({ text, icon, noLink, onSelect, }: IPropsItem) => JSX.Element;
|
30
|
-
Divider: ({}: {}) => JSX.Element;
|
31
|
-
Label: ({ text, }: IPropsLabel) => JSX.Element;
|
32
|
-
Header: ({ title, children, }: IPropsMenu) => JSX.Element;
|
33
|
-
Body: ({ title, children, }: IPropsMenu) => JSX.Element;
|
34
|
-
Footer: ({ title, children, }: IPropsMenu) => JSX.Element;
|
35
|
-
};
|
36
|
-
export declare const DropdownItem: ({ text, icon, noLink, onSelect, }: IPropsItem) => JSX.Element;
|
37
|
-
export declare const DropdownDivider: ({}: {}) => JSX.Element;
|
38
|
-
export declare const DropdownLabel: ({ text, }: IPropsLabel) => JSX.Element;
|
39
|
-
export declare const DropdownHeader: ({ title, children, }: IPropsMenu) => JSX.Element;
|
40
|
-
export declare const DropdownBody: ({ title, children, }: IPropsMenu) => JSX.Element;
|
41
|
-
export declare const DropdownFooter: ({ title, children, }: IPropsMenu) => JSX.Element;
|
42
|
-
export {};
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IProps {
|
3
|
-
illustration?: string;
|
4
|
-
size?: 'small' | 'large';
|
5
|
-
title: string;
|
6
|
-
description?: string;
|
7
|
-
}
|
8
|
-
export declare class EmptyState extends React.PureComponent<IProps> {
|
9
|
-
render(): JSX.Element;
|
10
|
-
}
|
11
|
-
export {};
|