oolib 2.68.0 → 2.68.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/ActionMenu/index.d.ts +2 -1
- package/dist/components/ActionMenu/index.js +8 -4
- package/dist/components/SimpleTable/comps/{ColActionsMenu → rowColActionMenus/ColActionsMenu}/index.js +18 -5
- package/dist/components/SimpleTable/comps/rowColActionMenus/RowActionsMenu/index.d.ts +8 -0
- package/dist/components/SimpleTable/comps/{RowActionsMenu → rowColActionMenus/RowActionsMenu}/index.js +20 -6
- package/dist/components/SimpleTable/comps/rowColActionMenus/styled.d.ts +1 -0
- package/dist/components/SimpleTable/comps/rowColActionMenus/styled.js +18 -0
- package/dist/components/SimpleTable/index.js +22 -14
- package/dist/components/SimpleTable/styled.js +9 -6
- package/dist/globalStyles/globalVariables.js +3 -6
- package/dist/themes/mixins/boxShadows.js +4 -3
- package/package.json +1 -1
- package/dist/components/SimpleTable/comps/RowActionsMenu/index.d.ts +0 -7
- /package/dist/components/SimpleTable/comps/{ColActionsMenu → rowColActionMenus/ColActionsMenu}/index.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function ActionMenu({ icon, invert, actions, align, iconSize, M, ButtonComp: _ButtonComp, setShowActions: setShowActionsInParent, popOutOfOverflowHiddenParent, storybookPreview }: {
|
|
1
|
+
export function ActionMenu({ icon, invert, actions, align, iconSize, M, ButtonComp: _ButtonComp, setShowActions: setShowActionsInParent, popOutOfOverflowHiddenParent, CustomSelectComp, storybookPreview }: {
|
|
2
2
|
icon?: string;
|
|
3
3
|
invert: any;
|
|
4
4
|
actions: any;
|
|
@@ -8,6 +8,7 @@ export function ActionMenu({ icon, invert, actions, align, iconSize, M, ButtonCo
|
|
|
8
8
|
ButtonComp?: string;
|
|
9
9
|
setShowActions: any;
|
|
10
10
|
popOutOfOverflowHiddenParent?: boolean;
|
|
11
|
+
CustomSelectComp: any;
|
|
11
12
|
storybookPreview: any;
|
|
12
13
|
}): React.JSX.Element;
|
|
13
14
|
import React from "react";
|
|
@@ -46,7 +46,7 @@ var styled_1 = require("./styled");
|
|
|
46
46
|
var ActionMenu = function (_a) {
|
|
47
47
|
var _b, _c;
|
|
48
48
|
var _d = _a.icon, icon = _d === void 0 ? 'DotsThree' : _d, //most likely will never change
|
|
49
|
-
invert = _a.invert, actions = _a.actions, _e = _a.align, align = _e === void 0 ? 'right' : _e, _f = _a.iconSize, iconSize = _f === void 0 ? 'S' : _f, M = _a.M, _g = _a.ButtonComp, _ButtonComp = _g === void 0 ? 'ButtonGhost' : _g, setShowActionsInParent = _a.setShowActions, _h = _a.popOutOfOverflowHiddenParent, popOutOfOverflowHiddenParent = _h === void 0 ? false : _h, storybookPreview = _a.storybookPreview //for storybook purposes
|
|
49
|
+
invert = _a.invert, actions = _a.actions, _e = _a.align, align = _e === void 0 ? 'right' : _e, _f = _a.iconSize, iconSize = _f === void 0 ? 'S' : _f, M = _a.M, _g = _a.ButtonComp, _ButtonComp = _g === void 0 ? 'ButtonGhost' : _g, setShowActionsInParent = _a.setShowActions, _h = _a.popOutOfOverflowHiddenParent, popOutOfOverflowHiddenParent = _h === void 0 ? false : _h, CustomSelectComp = _a.CustomSelectComp, storybookPreview = _a.storybookPreview //for storybook purposes
|
|
50
50
|
;
|
|
51
51
|
var actionMenuRef = (0, react_1.useRef)(null);
|
|
52
52
|
var optionsWrapperRef = (0, react_1.useRef)(null);
|
|
@@ -78,9 +78,13 @@ var ActionMenu = function (_a) {
|
|
|
78
78
|
}, []);
|
|
79
79
|
var _k = (0, usePopOutOfOverflowHiddenParent_1.usePopOutOfOverflowHiddenParent)(popOutOfOverflowHiddenParent), fixPos = _k.fixPos, applyFixedPos = _k.applyFixedPos, removeFixedPos = _k.removeFixedPos, trackerRef = _k.trackerRef;
|
|
80
80
|
return (react_1.default.createElement(styled_1.StyledActionMenu, { ref: actionMenuRef },
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
CustomSelectComp
|
|
82
|
+
? react_1.default.createElement(CustomSelectComp, { active: showActions, onClick: function (e) {
|
|
83
|
+
setShowActions(!showActions);
|
|
84
|
+
} })
|
|
85
|
+
: react_1.default.createElement(ButtonComp, __assign({}, buttonSize, { icon: icon, iconSize: iconSize, invert: invert, stopPropagation: true, preventDefault: true, onClick: function (e) {
|
|
86
|
+
setShowActions(!showActions);
|
|
87
|
+
}, active: showActions })),
|
|
84
88
|
popOutOfOverflowHiddenParent &&
|
|
85
89
|
react_1.default.createElement(styled_1.StyledActionMenuTracker, { storybookPreview: storybookPreview, align: align, ref: trackerRef }),
|
|
86
90
|
react_1.default.createElement(styled_1.StyledActionsDropMenu, __assign({}, {
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
2
6
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
8
|
};
|
|
5
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
10
|
exports.ColActionsMenu = void 0;
|
|
7
11
|
var react_1 = __importDefault(require("react"));
|
|
8
|
-
var ActionMenu_1 = require("
|
|
9
|
-
var handleColActions_1 = require("
|
|
10
|
-
var UIContent_1 = require("
|
|
12
|
+
var ActionMenu_1 = require("../../../../ActionMenu");
|
|
13
|
+
var handleColActions_1 = require("../../../handlers/handleColActions");
|
|
14
|
+
var UIContent_1 = require("../../../../../UIContent");
|
|
15
|
+
var styled_1 = require("../styled");
|
|
16
|
+
var DisplayIcon_1 = require("../../../../../utils/comps/DisplayIcon");
|
|
17
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
18
|
+
var StyledCustomSelectCompWrapper = styled_components_1.default.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n height: 1.5rem;\n width: 2.5rem;\n"], ["\n ", "\n height: 1.5rem;\n width: 2.5rem;\n"])), styled_1.commonRowColActionMenuStyles);
|
|
11
19
|
var ColActionsMenu = function (_a) {
|
|
12
20
|
var value = _a.value, colIdx = _a.colIdx, onChange = _a.onChange, id = _a.id, defaultColWidth = _a.defaultColWidth;
|
|
13
|
-
return (react_1.default.createElement("div", { style: { zIndex: 2, position: 'absolute', top: 0, left: '50%', transform: 'translate(-50%, -
|
|
14
|
-
react_1.default.createElement(ActionMenu_1.ActionMenu, {
|
|
21
|
+
return (react_1.default.createElement("div", { style: { zIndex: 2, position: 'absolute', top: 0, left: '50%', transform: 'translate(-50%, -50%)' } },
|
|
22
|
+
react_1.default.createElement(ActionMenu_1.ActionMenu, { align: "left", CustomSelectComp: function (_a) {
|
|
23
|
+
var active = _a.active, onClick = _a.onClick;
|
|
24
|
+
return (react_1.default.createElement(StyledCustomSelectCompWrapper, { onClick: onClick, active: active },
|
|
25
|
+
react_1.default.createElement(DisplayIcon_1.DisplayIcon, { icon: "DotsThree", size: 16 })));
|
|
26
|
+
}, actions: [
|
|
15
27
|
{
|
|
16
28
|
display: UIContent_1.UIContent.SimpleTable.delete,
|
|
17
29
|
onClick: function () { return (0, handleColActions_1.handleDeleteCol)({ value: value, colIdx: colIdx, onChange: onChange, id: id }); },
|
|
@@ -31,3 +43,4 @@ var ColActionsMenu = function (_a) {
|
|
|
31
43
|
] })));
|
|
32
44
|
};
|
|
33
45
|
exports.ColActionsMenu = ColActionsMenu;
|
|
46
|
+
var templateObject_1;
|
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
2
6
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
8
|
};
|
|
5
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
10
|
exports.RowActionsMenu = void 0;
|
|
7
11
|
var react_1 = __importDefault(require("react"));
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
12
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
13
|
+
var UIContent_1 = require("../../../../../UIContent");
|
|
14
|
+
var DisplayIcon_1 = require("../../../../../utils/comps/DisplayIcon");
|
|
15
|
+
var ActionMenu_1 = require("../../../../ActionMenu");
|
|
16
|
+
var handleRowActions_1 = require("../../../handlers/handleRowActions");
|
|
17
|
+
var styled_1 = require("../styled");
|
|
18
|
+
var StyledCustomSelectCompWrapper = styled_components_1.default.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n width: 1.5rem;\n height: 2.5rem;\n"], ["\n ", "\n width: 1.5rem;\n height: 2.5rem;\n"])), styled_1.commonRowColActionMenuStyles);
|
|
19
|
+
var CustomSelectComp = function (_a) {
|
|
20
|
+
var active = _a.active, onClick = _a.onClick;
|
|
21
|
+
return (react_1.default.createElement(StyledCustomSelectCompWrapper, { onClick: onClick, active: active },
|
|
22
|
+
react_1.default.createElement(DisplayIcon_1.DisplayIcon, { icon: "DotsThreeVertical", size: 16 })));
|
|
23
|
+
};
|
|
11
24
|
var RowActionsMenu = function (_a) {
|
|
12
|
-
var value = _a.value, rowIdx = _a.rowIdx, onChange = _a.onChange, id = _a.id;
|
|
25
|
+
var value = _a.value, rowIdx = _a.rowIdx, onChange = _a.onChange, id = _a.id, setActionsActiveOnRow = _a.setActionsActiveOnRow;
|
|
13
26
|
return (react_1.default.createElement("div", { style: {
|
|
14
27
|
zIndex: 1,
|
|
15
28
|
position: "absolute",
|
|
16
29
|
top: "50%",
|
|
17
30
|
left: 0,
|
|
18
|
-
transform: "translate(-
|
|
31
|
+
transform: "translate(-50%, -50%)",
|
|
19
32
|
} },
|
|
20
|
-
react_1.default.createElement(ActionMenu_1.ActionMenu, { actions: [
|
|
33
|
+
react_1.default.createElement(ActionMenu_1.ActionMenu, { align: "left", setShowActions: function (showActions) { return setActionsActiveOnRow(showActions ? rowIdx : undefined); }, CustomSelectComp: CustomSelectComp, actions: [
|
|
21
34
|
{
|
|
22
35
|
display: UIContent_1.UIContent.SimpleTable.delete,
|
|
23
36
|
onClick: function () { return (0, handleRowActions_1.handleDeleteRow)({ value: value, rowIdx: rowIdx, onChange: onChange, id: id }); },
|
|
@@ -41,3 +54,4 @@ var RowActionsMenu = function (_a) {
|
|
|
41
54
|
] })));
|
|
42
55
|
};
|
|
43
56
|
exports.RowActionsMenu = RowActionsMenu;
|
|
57
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const commonRowColActionMenuStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.commonRowColActionMenuStyles = void 0;
|
|
8
|
+
var styled_components_1 = require("styled-components");
|
|
9
|
+
var utilsOolib_1 = require("../../../../utilsOolib");
|
|
10
|
+
var globalVariables_1 = require("../../../../globalStyles/globalVariables");
|
|
11
|
+
var mixins_1 = require("../../../../themes/mixins");
|
|
12
|
+
var themes_1 = require("../../../../themes");
|
|
13
|
+
exports.commonRowColActionMenuStyles = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n ", ";\n border-radius: 4px;\n ", "\n cursor: pointer;\n ", "\n"], ["\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n ", ";\n border-radius: 4px;\n ", "\n cursor: pointer;\n ", "\n"])), (0, mixins_1.transition)("background-color", "border-color"), function (_a) {
|
|
14
|
+
var active = _a.active, theme = _a.theme;
|
|
15
|
+
return active
|
|
16
|
+
? (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid;\n border-color: ", ";\n "], ["\n background-color: ", ";\n border: 1px solid;\n border-color: ", ";\n "])), (0, utilsOolib_1.getPrimaryColor40)(theme === null || theme === void 0 ? void 0 : theme.colors), (0, utilsOolib_1.getPrimaryColor100)(theme === null || theme === void 0 ? void 0 : theme.colors)) : (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid;\n border-color: ", ";\n ", ";\n "], ["\n background-color: ", ";\n border: 1px solid;\n border-color: ", ";\n ", ";\n "])), themes_1.colors.white, themes_1.colors.greyColor15, globalVariables_1.globalHoverOnWhiteBG);
|
|
17
|
+
}, mixins_1.boxShadow1);
|
|
18
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -52,14 +52,15 @@ var BlockLabel_1 = require("../BlockLabel");
|
|
|
52
52
|
var styled_components_1 = require("styled-components");
|
|
53
53
|
var utilsOolib_1 = require("../../utilsOolib");
|
|
54
54
|
var AddRowColButtons_1 = require("./comps/AddRowColButtons");
|
|
55
|
-
var ColActionsMenu_1 = require("./comps/ColActionsMenu");
|
|
56
|
-
var RowActionsMenu_1 = require("./comps/RowActionsMenu");
|
|
55
|
+
var ColActionsMenu_1 = require("./comps/rowColActionMenus/ColActionsMenu");
|
|
56
|
+
var RowActionsMenu_1 = require("./comps/rowColActionMenus/RowActionsMenu");
|
|
57
57
|
var handleColActions_1 = require("./handlers/handleColActions");
|
|
58
58
|
var handleRowActions_1 = require("./handlers/handleRowActions");
|
|
59
59
|
var styled_1 = require("./styled");
|
|
60
60
|
var useResizeTableColumns_1 = require("./useResizeTableColumns");
|
|
61
61
|
var convertColHeaderConfigToRowData_1 = require("./utils/convertColHeaderConfigToRowData");
|
|
62
62
|
var prepInitValueFromConfigIfNoValue_1 = require("./utils/prepInitValueFromConfigIfNoValue");
|
|
63
|
+
var lodash_1 = require("lodash");
|
|
63
64
|
var greyColor100 = themes_1.colors.greyColor100;
|
|
64
65
|
/*pending:
|
|
65
66
|
- first test whatever is done on okf
|
|
@@ -78,12 +79,21 @@ function SimpleTable(_a) {
|
|
|
78
79
|
} : _b, _value = _a.value, onChange = _a.onChange, _c = _a.defaultColWidth, defaultColWidth = _c === void 0 ? 200 : _c;
|
|
79
80
|
var props = arguments[0];
|
|
80
81
|
var theme = (0, styled_components_1.useTheme)();
|
|
81
|
-
var _d = theme || {},
|
|
82
|
-
|
|
82
|
+
var _d = theme || {}, _RichTextEditor = _d.RichTextEditor, convertToRichText = _d.convertToRichText;
|
|
83
|
+
//memoizing cuz we dont want all cell rtes to render everytime one cell changes
|
|
84
|
+
var RichTextEditor = (0, react_1.useMemo)(function () {
|
|
85
|
+
var checkMemoFn = function (prevProps, currentProps) {
|
|
86
|
+
var prevVal = prevProps.value;
|
|
87
|
+
var currentVal = currentProps.value;
|
|
88
|
+
return (0, lodash_1.isEqual)(prevVal, currentVal);
|
|
89
|
+
};
|
|
90
|
+
return _RichTextEditor && react_1.default.memo(_RichTextEditor, checkMemoFn);
|
|
91
|
+
}, []);
|
|
92
|
+
var _e = (0, react_1.useMemo)(function () { return (0, prepInitValueFromConfigIfNoValue_1.prepInitValueFromConfigIfNoValue)({
|
|
83
93
|
_value: _value,
|
|
84
94
|
config: config,
|
|
85
95
|
defaultColWidth: defaultColWidth,
|
|
86
|
-
}), value = _e.value, enableColActions = _e.enableColActions, //returns all possible actions config if no config.colHeaderData is defined. else undefined\
|
|
96
|
+
}); }, [_value]), value = _e.value, enableColActions = _e.enableColActions, //returns all possible actions config if no config.colHeaderData is defined. else undefined\
|
|
87
97
|
enableRowActions = _e.enableRowActions, canToggleColHeaderStyle = _e.canToggleColHeaderStyle;
|
|
88
98
|
var _f = (0, useResizeTableColumns_1.useResizeTableColumns)({
|
|
89
99
|
setColWidthConfig: function (setterFn) {
|
|
@@ -121,10 +131,11 @@ function SimpleTable(_a) {
|
|
|
121
131
|
// size: 'small',
|
|
122
132
|
// },
|
|
123
133
|
};
|
|
124
|
-
var _g = (0, react_1.useState)(
|
|
134
|
+
var _g = (0, react_1.useState)(undefined), actionsActiveOnRow = _g[0], setActionsActiveOnRow = _g[1];
|
|
135
|
+
var _h = (0, react_1.useState)({
|
|
125
136
|
rowIdx: undefined,
|
|
126
137
|
colIdx: undefined,
|
|
127
|
-
}), hoveredRowAndCol =
|
|
138
|
+
}), hoveredRowAndCol = _h[0], setHoveredRowAndCol = _h[1];
|
|
128
139
|
var CellValueGetters = {
|
|
129
140
|
RichTextEditor: function (v) { return (convertToRichText ? convertToRichText(v) : v); },
|
|
130
141
|
}; //prob dont need this..
|
|
@@ -141,11 +152,9 @@ function SimpleTable(_a) {
|
|
|
141
152
|
var StyledWrapper = row.isColHeader
|
|
142
153
|
? styled_1.StyledSimpleTableHeader
|
|
143
154
|
: styled_1.StyledSimpleTableRow;
|
|
144
|
-
return (react_1.default.createElement(StyledWrapper
|
|
145
|
-
// onClick={() => row.link && history.push(row.link)}
|
|
146
|
-
, {
|
|
155
|
+
return (react_1.default.createElement(StyledWrapper, { actionsActiveOnRow: actionsActiveOnRow,
|
|
147
156
|
// onClick={() => row.link && history.push(row.link)}
|
|
148
|
-
style: { display: "flex" }, readOnly: readOnly, rowIdx: rowIdx, key:
|
|
157
|
+
style: { display: "flex" }, readOnly: readOnly, rowIdx: rowIdx, key: row.id }, row.cellData.map(function (cell, cellIdx) {
|
|
149
158
|
var CellComp = RichTextEditor //cuz in oolib, richtexteditor will not be there for now
|
|
150
159
|
? CellContentBlocks["RichTextEditor"]
|
|
151
160
|
: function () { return react_1.default.createElement("div", null, "RTE Doesnt Exist"); };
|
|
@@ -160,10 +169,9 @@ function SimpleTable(_a) {
|
|
|
160
169
|
return (react_1.default.createElement(styled_1.StyledSimpleTableCell, { key: cell.id, id: "kp_table__cell__".concat(cell.id), readOnly: readOnly || cell.readOnly, style: {
|
|
161
170
|
color: greyColor100,
|
|
162
171
|
width: "".concat(cellWidth),
|
|
163
|
-
minHeight: "4rem",
|
|
164
172
|
borderRight: (colResizeState === null || colResizeState === void 0 ? void 0 : colResizeState.colId) === "col_".concat(cellIdx) &&
|
|
165
173
|
"2px solid ".concat((0, utilsOolib_1.getPrimaryColor100)(theme === null || theme === void 0 ? void 0 : theme.colors)),
|
|
166
|
-
}, onMouseEnter: function (e) {
|
|
174
|
+
}, actionsActiveOnRow: actionsActiveOnRow, onMouseEnter: function (e) {
|
|
167
175
|
setHoveredRowAndCol({
|
|
168
176
|
rowIdx: rowIdx,
|
|
169
177
|
colIdx: cellIdx,
|
|
@@ -189,7 +197,7 @@ function SimpleTable(_a) {
|
|
|
189
197
|
enableRowActions &&
|
|
190
198
|
cellIdx === 0 &&
|
|
191
199
|
rowIdx !== undefined && //cuz for fixed col headers, rowIdx is undefined
|
|
192
|
-
hoveredRowAndCol.rowIdx === rowIdx && (react_1.default.createElement(RowActionsMenu_1.RowActionsMenu, __assign({}, { value: value, rowIdx: rowIdx, onChange: onChange, id: id }))),
|
|
200
|
+
hoveredRowAndCol.rowIdx === rowIdx && (react_1.default.createElement(RowActionsMenu_1.RowActionsMenu, __assign({}, { value: value, rowIdx: rowIdx, onChange: onChange, id: id, setActionsActiveOnRow: setActionsActiveOnRow }))),
|
|
193
201
|
react_1.default.createElement(CellComp, __assign({}, cellProps, { id: "kp_table_cell__".concat(cell.id, "__rich_input") /*dont mess with this id nomenclature. it needs to stay this way. check out the handleCellInputChange fn to understand */, value: cellValue, readOnly: readOnly || cell.readOnly, onChange: function (k, v) {
|
|
194
202
|
return handleCellInputChange({ v: v, rowIdx: rowIdx, cellIdx: cellIdx });
|
|
195
203
|
} }))));
|
|
@@ -34,13 +34,16 @@ var styled_components_1 = __importStar(require("styled-components"));
|
|
|
34
34
|
var utilsOolib_1 = require("../../utilsOolib");
|
|
35
35
|
var globalVariables_1 = require("../../globalStyles/globalVariables");
|
|
36
36
|
exports.StyledSimpleTable = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-top: 1px solid ", ";\n \n border-left: 1px solid ", ";\n"], ["\n border-top: 1px solid ", ";\n \n border-left: 1px solid ", ";\n"])), themes_1.colors.greyColor10, themes_1.colors.greyColor10);
|
|
37
|
-
exports.StyledSimpleTableRow = styled_components_1.default.div(
|
|
37
|
+
exports.StyledSimpleTableRow = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n min-height: 4rem;\n position: relative;\n display: flex;\n ", ";\n /* background-color: ", "; */\n ", "\n"], ["\n min-height: 4rem;\n position: relative;\n display: flex;\n ", ";\n /* background-color: ", "; */\n ", "\n"])), (0, transitions_1.transition)("background-color"), function (_a) {
|
|
38
38
|
var rowIdx = _a.rowIdx;
|
|
39
39
|
return rowIdx % 2 === 1 ? themes_1.colors.white : themes_1.colors.greyColor3;
|
|
40
|
+
}, function (_a) {
|
|
41
|
+
var actionsActiveOnRow = _a.actionsActiveOnRow, rowIdx = _a.rowIdx, theme = _a.theme;
|
|
42
|
+
return actionsActiveOnRow === rowIdx && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n &::before{\n content: '';\n position: absolute;\n width: calc(100% - 1px);\n height: calc(100% - 1px);\n outline: 1px solid ", ";\n border: 1px solid ", ";\n z-index: 1;\n }\n "], ["\n &::before{\n content: '';\n position: absolute;\n width: calc(100% - 1px);\n height: calc(100% - 1px);\n outline: 1px solid ", ";\n border: 1px solid ", ";\n z-index: 1;\n }\n "])), (0, utilsOolib_1.getPrimaryColor100)(theme === null || theme === void 0 ? void 0 : theme.colors), (0, utilsOolib_1.getPrimaryColor100)(theme === null || theme === void 0 ? void 0 : theme.colors));
|
|
40
43
|
});
|
|
41
|
-
exports.StyledSimpleTableCell = styled_components_1.default.div(
|
|
42
|
-
var readOnly = _a.readOnly, theme = _a.theme;
|
|
43
|
-
return !readOnly && (0, styled_components_1.css)(
|
|
44
|
+
exports.StyledSimpleTableCell = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n min-height: 4rem;\n position: relative;\n border-right: 1px solid ", ";\n border-bottom: 1px solid ", ";\n ", ";\n \n ", "\n"], ["\n min-height: 4rem;\n position: relative;\n border-right: 1px solid ", ";\n border-bottom: 1px solid ", ";\n ", ";\n \n ", "\n"])), themes_1.colors.greyColor10, themes_1.colors.greyColor10, (0, transitions_1.transition)("background-color"), function (_a) {
|
|
45
|
+
var readOnly = _a.readOnly, theme = _a.theme, actionsActiveOnRow = _a.actionsActiveOnRow;
|
|
46
|
+
return !readOnly && (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n \n ", "\n "], ["\n ", ";\n \n ", "\n "])), globalVariables_1.globalHoverOnWhiteBG, !actionsActiveOnRow && (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n :focus-within{\n &::before{\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n outline: 1px solid ", ";\n border: 1px solid ", ";\n }\n background-color: ", ";\n } \n "], ["\n :focus-within{\n &::before{\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n outline: 1px solid ", ";\n border: 1px solid ", ";\n }\n background-color: ", ";\n } \n "])), (0, utilsOolib_1.getPrimaryColor100)(theme === null || theme === void 0 ? void 0 : theme.colors), (0, utilsOolib_1.getPrimaryColor100)(theme === null || theme === void 0 ? void 0 : theme.colors), themes_1.colors.none));
|
|
44
47
|
});
|
|
45
|
-
exports.StyledSimpleTableHeader = styled_components_1.default.div(
|
|
46
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
48
|
+
exports.StyledSimpleTableHeader = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n .public-DraftEditor-content {\n font-weight: 600;\n }\n background-color: ", ";\n border-bottom: 2px solid ", ";\n"], ["\n .public-DraftEditor-content {\n font-weight: 600;\n }\n background-color: ", ";\n border-bottom: 2px solid ", ";\n"])), themes_1.colors.greyColor, themes_1.colors.greyColor10);
|
|
49
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -22,17 +22,14 @@ exports.globalInputElemFocused = (0, styled_components_1.css)(templateObject_3 |
|
|
|
22
22
|
return (invert ? themes_1.colors.greyColor70 : themes_1.colors.greyColor10);
|
|
23
23
|
});
|
|
24
24
|
// Lghtbox style used for DatePicker, Dropdowns, hints and ActionMenu
|
|
25
|
-
exports.globalLightboxStyle = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border: 1px solid ", ";\n background-color: ", ";\n border-radius: 2px;\n
|
|
25
|
+
exports.globalLightboxStyle = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border: 1px solid ", ";\n background-color: ", ";\n border-radius: 2px;\n ", ";\n"], ["\n border: 1px solid ", ";\n background-color: ", ";\n border-radius: 2px;\n ", ";\n"])), function (_a) {
|
|
26
26
|
var invert = _a.invert;
|
|
27
27
|
return (invert ? themes_1.colors.greyColor70 : themes_1.colors.greyColor5);
|
|
28
28
|
}, function (_a) {
|
|
29
29
|
var invert = _a.invert;
|
|
30
30
|
return (invert ? themes_1.colors.greyColor80 : themes_1.colors.white);
|
|
31
|
-
},
|
|
32
|
-
exports.globalHoverOnWhiteBG = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n &:hover {\n
|
|
33
|
-
var invert = _a.invert;
|
|
34
|
-
return invert ? themes_1.colors.white : themes_1.colors.greyColor100;
|
|
35
|
-
}, function (_a) {
|
|
31
|
+
}, mixins_1.boxShadow1);
|
|
32
|
+
exports.globalHoverOnWhiteBG = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n &:hover {\n background-color: ", ";\n }\n"], ["\n &:hover {\n background-color: ", ";\n }\n"])), function (_a) {
|
|
36
33
|
var invert = _a.invert;
|
|
37
34
|
return invert ? themes_1.colors.greyColor80 : themes_1.colors.greyColor5;
|
|
38
35
|
});
|
|
@@ -6,7 +6,8 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.innerShadow0 = exports.boxShadow1 = exports.boxShadow0 = void 0;
|
|
8
8
|
var styled_components_1 = require("styled-components");
|
|
9
|
-
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
9
|
+
var colors_1 = require("../colors");
|
|
10
|
+
exports.boxShadow0 = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-shadow: 1px 1px 5px ", ";\n"], ["\n box-shadow: 1px 1px 5px ", ";\n"])), colors_1.colors.black_opacity05);
|
|
11
|
+
exports.boxShadow1 = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-shadow: 2px 2px 10px ", ";\n"], ["\n box-shadow: 2px 2px 10px ", ";\n"])), colors_1.colors.black_opacity05);
|
|
12
|
+
exports.innerShadow0 = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n box-shadow: inset 1px 1px 5px ", ";\n"], ["\n box-shadow: inset 1px 1px 5px ", ";\n"])), colors_1.colors.black_opacity05);
|
|
12
13
|
var templateObject_1, templateObject_2, templateObject_3;
|
package/package.json
CHANGED
|
File without changes
|