superdesk-ui-framework 3.0.1-beta.17 → 3.0.1-beta.19
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/.vscode/settings.json +5 -0
- package/app/styles/_content-divider.scss +58 -3
- package/app-typescript/components/ContentDivider.tsx +3 -0
- package/app-typescript/components/Dropdown.tsx +6 -2
- package/app-typescript/components/DurationInput.tsx +32 -17
- package/app-typescript/components/Spacer.tsx +87 -0
- package/app-typescript/dist/components/Alert.d.ts +16 -0
- package/app-typescript/dist/components/Autocomplete.d.ts +48 -0
- package/app-typescript/dist/components/Avatar.d.ts +33 -0
- package/app-typescript/dist/components/Badge.d.ts +13 -0
- package/app-typescript/dist/components/Button.d.ts +23 -0
- package/app-typescript/dist/components/ButtonGroup.d.ts +12 -0
- package/app-typescript/dist/components/CheckButtonGroup.d.ts +11 -0
- package/app-typescript/dist/components/CheckGroup.d.ts +9 -0
- package/app-typescript/dist/components/Checkbox.d.ts +19 -0
- package/app-typescript/dist/components/CheckboxButton.d.ts +19 -0
- package/app-typescript/dist/components/DatePicker.d.ts +37 -0
- package/app-typescript/dist/components/Divider.d.ts +9 -0
- package/app-typescript/dist/components/DonutChart.d.ts +12 -0
- package/app-typescript/dist/components/Dropdown.d.ts +28 -0
- package/app-typescript/dist/components/DropdownFirst.d.ts +42 -0
- package/app-typescript/dist/components/EmptyState.d.ts +11 -0
- package/app-typescript/dist/components/FormLabel.d.ts +9 -0
- package/app-typescript/dist/components/Genie.d.ts +13 -0
- package/app-typescript/dist/components/GridItem.d.ts +69 -0
- package/app-typescript/dist/components/GridList.d.ts +14 -0
- package/app-typescript/dist/components/HeadingText.d.ts +10 -0
- package/app-typescript/dist/components/HelloWorld.d.ts +8 -0
- package/app-typescript/dist/components/Icon.d.ts +12 -0
- package/app-typescript/dist/components/IconButton.d.ts +12 -0
- package/app-typescript/dist/components/IconLabel.d.ts +11 -0
- package/app-typescript/dist/components/Input.d.ts +24 -0
- package/app-typescript/dist/components/Label.d.ts +15 -0
- package/app-typescript/dist/components/LeftMenu.d.ts +26 -0
- package/app-typescript/dist/components/Loader.d.ts +8 -0
- package/app-typescript/dist/components/NavButton.d.ts +15 -0
- package/app-typescript/dist/components/Popover.d.ts +13 -0
- package/app-typescript/dist/components/PropsList.d.ts +15 -0
- package/app-typescript/dist/components/Radio.d.ts +19 -0
- package/app-typescript/dist/components/RadioButton.d.ts +20 -0
- package/app-typescript/dist/components/Select.d.ts +29 -0
- package/app-typescript/dist/components/SelectWithTemplate.d.ts +32 -0
- package/app-typescript/dist/components/SlidingToolbar.d.ts +8 -0
- package/app-typescript/dist/components/StrechBar.d.ts +4 -0
- package/app-typescript/dist/components/SubNav.d.ts +10 -0
- package/app-typescript/dist/components/Switch.d.ts +12 -0
- package/app-typescript/dist/components/TabCustom.d.ts +25 -0
- package/app-typescript/dist/components/TabList.d.ts +22 -0
- package/app-typescript/dist/components/Tag.d.ts +9 -0
- package/app-typescript/dist/components/TagInput.d.ts +7 -0
- package/app-typescript/dist/components/TagInputTest.d.ts +18 -0
- package/app-typescript/dist/components/TimePicker.d.ts +11 -0
- package/app-typescript/dist/components/Tooltip.d.ts +11 -0
- package/app-typescript/dist/components/_Positioner.d.ts +27 -0
- package/app-typescript/dist/index.d.ts +56 -0
- package/dist/examples.bundle.js +184 -42
- package/dist/react/ContentDivider.tsx +18 -14
- package/dist/react/ContentList.tsx +187 -3
- package/dist/react/DurationInput.tsx +7 -3
- package/dist/react/TableList.tsx +21 -4
- package/dist/superdesk-ui.bundle.css +41 -3
- package/dist/superdesk-ui.bundle.js +43 -22
- package/examples/pages/react/ContentDivider.tsx +18 -14
- package/examples/pages/react/ContentList.tsx +187 -3
- package/examples/pages/react/DurationInput.tsx +7 -3
- package/examples/pages/react/TableList.tsx +21 -4
- package/package.json +1 -1
- package/react/components/ContentDivider.d.ts +1 -0
- package/react/components/ContentDivider.js +2 -0
- package/react/components/Dropdown.js +6 -2
- package/react/components/DurationInput.d.ts +1 -1
- package/react/components/DurationInput.js +35 -20
- package/yarn-error.log +111 -0
@@ -141,14 +141,18 @@ var DurationInput = /** @class */ (function (_super) {
|
|
141
141
|
}, 500);
|
142
142
|
}
|
143
143
|
}
|
144
|
-
if (
|
145
|
-
|
146
|
-
|
147
|
-
this.
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
144
|
+
if (this.hourRef.current.value.length === 2
|
145
|
+
&& this.minuteRef.current.value.length === 2
|
146
|
+
&& this.secondRef.current.value.length === 2) {
|
147
|
+
if ((this.props.hours !== prevProps.hours)
|
148
|
+
|| (this.props.minutes !== prevProps.minutes)
|
149
|
+
|| (this.props.seconds !== prevProps.seconds)) {
|
150
|
+
this.setState({
|
151
|
+
hours: this.stateUpdate('hours', this.props.hours, this.props.minutes, this.props.seconds),
|
152
|
+
minutes: this.stateUpdate('minutes', this.props.minutes, this.props.seconds),
|
153
|
+
seconds: this.stateUpdate('seconds', this.props.seconds),
|
154
|
+
});
|
155
|
+
}
|
152
156
|
}
|
153
157
|
};
|
154
158
|
DurationInput.prototype.valueUpdate = function () {
|
@@ -252,12 +256,15 @@ var DurationInput = /** @class */ (function (_super) {
|
|
252
256
|
};
|
253
257
|
DurationInput.prototype.handleChange = function (event, state) {
|
254
258
|
var stateClone = {};
|
255
|
-
if (event.target.value.length
|
256
|
-
if (event.target.selectionStart === 1
|
257
|
-
stateClone[state] = event.target.value.slice(0, 1)
|
259
|
+
if (event.target.value.length > 2) {
|
260
|
+
if (event.target.selectionStart === 1) {
|
261
|
+
stateClone[state] = event.target.value.slice(0, 1);
|
262
|
+
}
|
263
|
+
else if (event.target.selectionStart === 2) {
|
264
|
+
stateClone[state] = event.target.value.slice(1, 2);
|
258
265
|
}
|
259
266
|
else {
|
260
|
-
stateClone[state] = event.target.value.slice(
|
267
|
+
stateClone[state] = event.target.value.slice(2, 3);
|
261
268
|
}
|
262
269
|
}
|
263
270
|
else {
|
@@ -293,19 +300,19 @@ var DurationInput = /** @class */ (function (_super) {
|
|
293
300
|
var InputClasses = (0, classnames_1.default)('sd-input__duration-input');
|
294
301
|
return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, required: this.props.required, disabled: this.props.disabled, invalid: this.props.invalid, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
|
295
302
|
React.createElement("div", { className: InputClasses },
|
296
|
-
React.createElement("input", { className: "duration-input ".concat(this.state.blink === 'hour' ? 'blink_me' : ''), type: 'text', id: 'hours', max: 99, min: 0, ref: this.hourRef, value: this.state.hours, disabled: this.props.disabled, onKeyDown: function (event) { return _this.handleKeyDown(event); }, onKeyUp: function (event) { return _this.handleFocusOnKeyUp(event, _this.minuteRef.current); }, onChange: function (event) { _this.handleChange(event, 'hours'); }, onBlur: function (event) { return _this.setState({ hours: _this.zeroPad(event.target.value) }); }, onKeyPress: function (event) {
|
303
|
+
React.createElement("input", { className: "duration-input ".concat(this.state.blink === 'hour' ? 'blink_me' : ''), type: 'text', id: 'hours', autoComplete: "off", max: 99, min: 0, ref: this.hourRef, value: this.state.hours, disabled: this.props.disabled, onKeyDown: function (event) { return _this.handleKeyDown(event); }, onKeyUp: function (event) { return _this.handleFocusOnKeyUp(event, _this.minuteRef.current); }, onChange: function (event) { _this.handleChange(event, 'hours'); }, onBlur: function (event) { return _this.setState({ hours: _this.zeroPad(event.target.value) }); }, onKeyPress: function (event) {
|
297
304
|
if (!/[0-9]/.test(event.key)) {
|
298
305
|
event.preventDefault();
|
299
306
|
}
|
300
307
|
} }),
|
301
308
|
React.createElement("span", { className: 'sd-input__suffix' }, "h"),
|
302
|
-
React.createElement("input", { className: "duration-input ".concat(this.state.blink === 'minute' ? 'blink_me' : ''), type: 'text', id: 'minutes', ref: this.minuteRef, value: this.state.minutes, disabled: this.props.disabled, onKeyDown: function (event) { return _this.handleKeyDown(event); }, onKeyUp: function (event) { return _this.handleFocusOnKeyUp(event, _this.secondRef.current); }, onChange: function (event) { _this.handleChange(event, 'minutes'); }, onBlur: function (event) { return _this.setState({ minutes: _this.zeroPad(event.target.value) }); }, onKeyPress: function (event) {
|
309
|
+
React.createElement("input", { className: "duration-input ".concat(this.state.blink === 'minute' ? 'blink_me' : ''), type: 'text', id: 'minutes', autoComplete: "off", ref: this.minuteRef, value: this.state.minutes, disabled: this.props.disabled, onKeyDown: function (event) { return _this.handleKeyDown(event); }, onKeyUp: function (event) { return _this.handleFocusOnKeyUp(event, _this.secondRef.current); }, onChange: function (event) { _this.handleChange(event, 'minutes'); }, onBlur: function (event) { return _this.setState({ minutes: _this.zeroPad(event.target.value) }); }, onKeyPress: function (event) {
|
303
310
|
if (!/[0-9]/.test(event.key)) {
|
304
311
|
event.preventDefault();
|
305
312
|
}
|
306
313
|
} }),
|
307
314
|
React.createElement("span", { className: 'sd-input__suffix' }, "m"),
|
308
|
-
React.createElement("input", { className: 'duration-input', type: 'text', id: 'seconds', ref: this.secondRef, value: this.state.seconds, disabled: this.props.disabled, onKeyDown: function (event) { return _this.handleKeyDown(event); }, onKeyUp: function (event) { return _this.handleFocusOnKeyUp(event, _this.hourRef.current); }, onChange: function (event) { _this.handleChange(event, 'seconds'); }, onBlur: function (event) { return _this.setState({ seconds: _this.zeroPad(event.target.value) }); }, onKeyPress: function (event) {
|
315
|
+
React.createElement("input", { className: 'duration-input', type: 'text', id: 'seconds', autoComplete: "off", ref: this.secondRef, value: this.state.seconds, disabled: this.props.disabled, onKeyDown: function (event) { return _this.handleKeyDown(event); }, onKeyUp: function (event) { return _this.handleFocusOnKeyUp(event, _this.hourRef.current); }, onChange: function (event) { _this.handleChange(event, 'seconds'); }, onBlur: function (event) { return _this.setState({ seconds: _this.zeroPad(event.target.value) }); }, onKeyPress: function (event) {
|
309
316
|
if (!/[0-9]/.test(event.key)) {
|
310
317
|
event.preventDefault();
|
311
318
|
}
|
@@ -315,7 +322,7 @@ var DurationInput = /** @class */ (function (_super) {
|
|
315
322
|
return DurationInput;
|
316
323
|
}(React.PureComponent));
|
317
324
|
exports.DurationInput = DurationInput;
|
318
|
-
function getDurationString(seconds,
|
325
|
+
function getDurationString(seconds, minSections) {
|
319
326
|
function zeroPad(value) {
|
320
327
|
if (value.toString().length === 1 || value === 0) {
|
321
328
|
return "0".concat(value);
|
@@ -330,16 +337,24 @@ function getDurationString(seconds, zero) {
|
|
330
337
|
var hour = zeroPad(Math.floor(seconds / 3600));
|
331
338
|
var minute = zeroPad(Math.floor((seconds % 3600) / 60));
|
332
339
|
var second = zeroPad(Math.floor(seconds % 60));
|
333
|
-
if (
|
340
|
+
if (minSections === 3) {
|
334
341
|
return "".concat(hour, "h ").concat(minute, "m ").concat(second, "s");
|
335
342
|
}
|
336
|
-
else {
|
337
|
-
if (Number(hour)
|
343
|
+
else if (minSections === 2) {
|
344
|
+
if (Number(hour) > 0) {
|
345
|
+
return "".concat(hour, "h ").concat(minute, "m ").concat(second, "s");
|
346
|
+
}
|
347
|
+
else {
|
338
348
|
return "".concat(minute, "m ").concat(second, "s");
|
339
349
|
}
|
340
|
-
|
350
|
+
}
|
351
|
+
else {
|
352
|
+
if (Number(hour) === 0 && Number(minute) === 0) {
|
341
353
|
return "".concat(second, "s");
|
342
354
|
}
|
355
|
+
else if (Number(hour) === 0 && Number(minute) > 0) {
|
356
|
+
return "".concat(minute, "m ").concat(second, "s");
|
357
|
+
}
|
343
358
|
else {
|
344
359
|
return "".concat(hour, "h ").concat(minute, "m ").concat(second, "s");
|
345
360
|
}
|
package/yarn-error.log
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
Arguments:
|
2
|
+
/usr/local/bin/node /usr/local/bin/yarn install
|
3
|
+
|
4
|
+
PATH:
|
5
|
+
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
|
6
|
+
|
7
|
+
Yarn version:
|
8
|
+
1.21.1
|
9
|
+
|
10
|
+
Node version:
|
11
|
+
12.14.1
|
12
|
+
|
13
|
+
Platform:
|
14
|
+
linux x64
|
15
|
+
|
16
|
+
Trace:
|
17
|
+
Error: getaddrinfo EAI_AGAIN registry.yarnpkg.com
|
18
|
+
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26)
|
19
|
+
|
20
|
+
npm manifest:
|
21
|
+
{
|
22
|
+
"name": "superdesk-ui-framework",
|
23
|
+
"version": "2.1.11",
|
24
|
+
"license": "AGPL-3.0",
|
25
|
+
"repository": {
|
26
|
+
"type": "git",
|
27
|
+
"url": "https://github.com/superdesk/superdesk-ui-framework.git"
|
28
|
+
},
|
29
|
+
"main": "dist/superdesk-ui.bundle.js",
|
30
|
+
"types": "app-typescript/dist/index.d.ts",
|
31
|
+
"contributors": [
|
32
|
+
"Nemanja Pavlovic",
|
33
|
+
"Vladimir Stefanovic",
|
34
|
+
"Darko Tomic",
|
35
|
+
"Aleksandar Jelicic",
|
36
|
+
"Tomas Kikutis"
|
37
|
+
],
|
38
|
+
"scripts": {
|
39
|
+
"start": "webpack-dev-server --config tasks/webpack.dev.js",
|
40
|
+
"server": "webpack --watch",
|
41
|
+
"build": "webpack && npm run lint && tsc",
|
42
|
+
"lint": "eslint app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}'",
|
43
|
+
"prepublishOnly": "npm run build",
|
44
|
+
"prepublish": "patch-package"
|
45
|
+
},
|
46
|
+
"devDependencies": {
|
47
|
+
"@types/classnames": "^2.2.9",
|
48
|
+
"@types/lodash": "4.14.149",
|
49
|
+
"@types/react": "16.8.23",
|
50
|
+
"@types/react-dom": "16.8.0",
|
51
|
+
"@types/react-router-dom": "^5.1.2",
|
52
|
+
"angular": "^1.7.9",
|
53
|
+
"angular-animate": "^1.7.9",
|
54
|
+
"angular-route": "^1.7.9",
|
55
|
+
"babel-core": "^6.26.0",
|
56
|
+
"babel-loader": "^7.1.2",
|
57
|
+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
58
|
+
"babel-preset-es2015": "^6.24.1",
|
59
|
+
"babel-preset-react": "^6.24.1",
|
60
|
+
"classnames": "^2.2.5",
|
61
|
+
"clean-webpack-plugin": "^1.0.0",
|
62
|
+
"code-prettify": "^0.1.0",
|
63
|
+
"copy-webpack-plugin": "^4.6.0",
|
64
|
+
"css-loader": "^2.1.1",
|
65
|
+
"eslint": "^4.6.1",
|
66
|
+
"eslint-loader": "^1.9.0",
|
67
|
+
"eslint-plugin-angular": "^3.1.1",
|
68
|
+
"eslint-plugin-react": "^7.3.0",
|
69
|
+
"extract-text-webpack-plugin": "^3.0.2",
|
70
|
+
"file-loader": "^0.11.2",
|
71
|
+
"html-loader": "^0.5.1",
|
72
|
+
"html-webpack-plugin": "^2.30.1",
|
73
|
+
"jquery": "^3.1.1",
|
74
|
+
"jquery-ui": "^1.12.1",
|
75
|
+
"lodash": "4.17.15",
|
76
|
+
"node-sass": "^4.5.3",
|
77
|
+
"patch-package": "6.2.0",
|
78
|
+
"prismjs": "^1.17.1",
|
79
|
+
"prop-types": "^15.6.0",
|
80
|
+
"react": "16.8.6",
|
81
|
+
"react-bootstrap": "^0.31.2",
|
82
|
+
"react-dom": "16.8.6",
|
83
|
+
"react-redux": "^5.0.6",
|
84
|
+
"react-router-dom": "^5.1.2",
|
85
|
+
"redux": "^3.7.2",
|
86
|
+
"redux-form": "^7.0.4",
|
87
|
+
"sass-loader": "^6.0.6",
|
88
|
+
"style-loader": "^0.18.2",
|
89
|
+
"superdesk-code-style": "^1.1.2",
|
90
|
+
"ts-loader": "^6.0.2",
|
91
|
+
"tslint": "^5.18.0",
|
92
|
+
"typescript": "^3.5.1",
|
93
|
+
"url-loader": "^1.1.2",
|
94
|
+
"webpack": "^3.5.5",
|
95
|
+
"webpack-cli": "3.3.10",
|
96
|
+
"webpack-dev-server": "2.11.1",
|
97
|
+
"webpack-merge": "^4.2.1"
|
98
|
+
},
|
99
|
+
"dependencies": {
|
100
|
+
"date-fns": "2.7.0",
|
101
|
+
"popper.js": "1.14.4",
|
102
|
+
"primeicons": "2.0.0",
|
103
|
+
"primereact": "3.3.2"
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
yarn manifest:
|
108
|
+
No manifest
|
109
|
+
|
110
|
+
Lockfile:
|
111
|
+
No lockfile
|