oolib 2.141.0 → 2.141.2
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/dist/components/SimpleTable/index.d.ts +2 -0
- package/dist/components/SimpleTable/index.js +4 -2
- package/dist/components/VideoInput/index.js +4 -4
- package/dist/stories/Oolib/components/SimpleTable.stories.d.ts +2 -0
- package/dist/stories/Oolib/components/SimpleTable.stories.js +5 -1
- package/package.json +1 -1
|
@@ -81,6 +81,8 @@ function SimpleTable(_a) {
|
|
|
81
81
|
noOfRows: 3,
|
|
82
82
|
colHeaderData: undefined,
|
|
83
83
|
rowHeaderData: undefined,
|
|
84
|
+
disableAddRow: false,
|
|
85
|
+
disableRowActionsMenu: false,
|
|
84
86
|
blockConfig: [undefined, { comp: 'DropdownSingle', props: {} }, { comp: 'DropdownSingle', props: {} }]
|
|
85
87
|
} : _b, _value = _a.value, onChange = _a.onChange, _c = _a.defaultColWidth, defaultColWidth = _c === void 0 ? 200 : _c;
|
|
86
88
|
var props = arguments[0];
|
|
@@ -217,7 +219,7 @@ function SimpleTable(_a) {
|
|
|
217
219
|
enableColActions &&
|
|
218
220
|
rowIdx === 0 &&
|
|
219
221
|
hoveredRowAndCol.colIdx === cellIdx }),
|
|
220
|
-
react_1.default.createElement(RowActionsMenu_1.RowActionsMenu, { value: value, rowIdx: rowIdx, onChange: onChange, id: id, setActionsActiveOnRow: setActionsActiveOnRow, rowActionsButtonWidth: rowActionsButtonWidth, conditionsToRender: !readOnly &&
|
|
222
|
+
!config.disableRowActionsMenu && react_1.default.createElement(RowActionsMenu_1.RowActionsMenu, { value: value, rowIdx: rowIdx, onChange: onChange, id: id, setActionsActiveOnRow: setActionsActiveOnRow, rowActionsButtonWidth: rowActionsButtonWidth, conditionsToRender: !readOnly &&
|
|
221
223
|
enableRowActions &&
|
|
222
224
|
cellIdx === 0 &&
|
|
223
225
|
rowIdx !== undefined && //cuz for fixed col headers, rowIdx is undefined
|
|
@@ -315,7 +317,7 @@ function SimpleTable(_a) {
|
|
|
315
317
|
}),
|
|
316
318
|
}),
|
|
317
319
|
value.data.map(function (row, rowIdx) { return genRow({ row: row, rowIdx: rowIdx }); })),
|
|
318
|
-
!readOnly && enableRowActions && (react_1.default.createElement(AddRowColButtons_1.AddRowButton, { onClick: function () { return (0, handleRowActions_1.handleAddRow)(value, props); } }))),
|
|
320
|
+
!readOnly && enableRowActions && !config.disableAddRow && (react_1.default.createElement(AddRowColButtons_1.AddRowButton, { onClick: function () { return (0, handleRowActions_1.handleAddRow)(value, props); } }))),
|
|
319
321
|
!readOnly && enableColActions && (react_1.default.createElement(AddRowColButtons_1.AddColButton, { enableRowActions: enableRowActions, addColButtonWidth: addColButtonWidth, onClick: function () {
|
|
320
322
|
return (0, handleColActions_1.handleAddCol)({ value: value, onChange: onChange, id: id, defaultColWidth: defaultColWidth });
|
|
321
323
|
} }))))));
|
|
@@ -100,17 +100,17 @@ function VideoInput(_a) {
|
|
|
100
100
|
}
|
|
101
101
|
}, []);
|
|
102
102
|
var createVideoPreview = function (_a) {
|
|
103
|
-
var _b
|
|
104
|
-
var value = _a.value,
|
|
103
|
+
var _b;
|
|
104
|
+
var value = _a.value, _c = _a.actionMenuButton, actionMenuButton = _c === void 0 ? false : _c;
|
|
105
105
|
var url = value && ((_b = value[0]) === null || _b === void 0 ? void 0 : _b.publicUrl);
|
|
106
|
-
var
|
|
106
|
+
var _d = (0, utils_1.verifyAndGetGoogleDrivePreviewableUrl)(url), isPreviewableGoogleDriveUrl = _d.isPreviewableGoogleDriveUrl, googleDrivePreviewableUrl = _d.googleDrivePreviewableUrl;
|
|
107
107
|
switch (true) {
|
|
108
108
|
case !url:
|
|
109
109
|
return null;
|
|
110
110
|
case isPreviewableGoogleDriveUrl:
|
|
111
111
|
return (react_1.default.createElement("div", { style: { position: 'relative', paddingBottom: '56%' } },
|
|
112
112
|
react_1.default.createElement("iframe", { src: googleDrivePreviewableUrl, width: "100%", height: "100%", style: { position: 'absolute', top: 0, left: 0 }, allow: "autoplay", allowFullScreen: true })));
|
|
113
|
-
case !(0, utils_1.canPlay)(
|
|
113
|
+
case !(0, utils_1.canPlay)(url):
|
|
114
114
|
return (react_1.default.createElement(Typo_1.SANS_3_4, { color: themes_1.colors.red }, "Error displaying video. Make sure you've added the right link or you have permission to share publicly."));
|
|
115
115
|
default:
|
|
116
116
|
if (url.indexOf("&list=") !== -1) {
|
|
@@ -52,6 +52,8 @@ declare namespace _default {
|
|
|
52
52
|
export { noOfCols_1 as noOfCols };
|
|
53
53
|
let defaultColWidth_1: number;
|
|
54
54
|
export { defaultColWidth_1 as defaultColWidth };
|
|
55
|
+
export let disableAddRow: boolean;
|
|
56
|
+
export let disableRowActionsMenu: boolean;
|
|
55
57
|
}
|
|
56
58
|
namespace parameters {
|
|
57
59
|
namespace docs {
|
|
@@ -72,6 +72,8 @@ exports.default = {
|
|
|
72
72
|
noOfRows: 3,
|
|
73
73
|
noOfCols: 3,
|
|
74
74
|
defaultColWidth: 200,
|
|
75
|
+
disableAddRow: false,
|
|
76
|
+
disableRowActionsMenu: false,
|
|
75
77
|
},
|
|
76
78
|
parameters: {
|
|
77
79
|
docs: {
|
|
@@ -94,7 +96,9 @@ var SimpleTable = function (args) {
|
|
|
94
96
|
"Verticle Edit",
|
|
95
97
|
"Latitude",
|
|
96
98
|
"Longitude"
|
|
97
|
-
]
|
|
99
|
+
],
|
|
100
|
+
disableAddRow: args.disableAddRow,
|
|
101
|
+
disableRowActionsMenu: args.disableRowActionsMenu,
|
|
98
102
|
},
|
|
99
103
|
defaultColWidth: args.defaultColWidth,
|
|
100
104
|
value: val,
|