oolib 2.168.0 → 2.168.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.
@@ -69,7 +69,7 @@ var GalleryThumbnails = function (_a) {
69
69
  var imageThumbnailsData = __spreadArray(__spreadArray([], ((0, makeArrayFromLength_1.makeArrayFromLength)(noOfImagesUploading).map(function (d) { return undefined; })), true), (value || []), true);
70
70
  return (react_1.default.createElement("div", { ref: totThumbsSpaceRef, style: { display: 'flex', gap: '1rem' } },
71
71
  !readOnly && (react_1.default.createElement(styled_1.StyledAddMoreThumbnail, { ref: addMoreThumbnailRef, disabled: isLoading, noBorder: true, invert: invert },
72
- react_1.default.createElement(FileUploadShell_1.FileUploadShell, { disabled: isLoading, multiple: true, handleUpload: handleUpload, onChange: onChange, value: value, id: id },
72
+ react_1.default.createElement(FileUploadShell_1.FileUploadShell, { disabled: isLoading, multiple: true, mediaType: 'image', handleUpload: handleUpload, onChange: onChange, value: value, id: id },
73
73
  react_1.default.createElement("div", { style: {
74
74
  display: "grid",
75
75
  placeItems: "center",
@@ -4,6 +4,8 @@
4
4
  * - Should run a function that converts rich text to plain text and sends that out in onChange. (like how we do for TitleInput)
5
5
  * - for backwards compatibility, in the initValueSetting function, we should convert all plain text values to lexical shape & all draftjs shaped values also to lexical shape
6
6
  * - memoization of cell comps maybe? there is some commented code for the same below..
7
+ * - KNOWN ISSUE: when the number input block is used, the component is lagging like mad. might have something to
8
+ * do with the memoization issue
7
9
  */
8
10
  export function SimpleTable({ id, readOnly, config, value: _value, onChange, defaultColWidth, }: {
9
11
  id: any;
@@ -75,6 +75,8 @@ var greyColor100 = themes_1.colors.greyColor100;
75
75
  * - Should run a function that converts rich text to plain text and sends that out in onChange. (like how we do for TitleInput)
76
76
  * - for backwards compatibility, in the initValueSetting function, we should convert all plain text values to lexical shape & all draftjs shaped values also to lexical shape
77
77
  * - memoization of cell comps maybe? there is some commented code for the same below..
78
+ * - KNOWN ISSUE: when the number input block is used, the component is lagging like mad. might have something to
79
+ * do with the memoization issue
78
80
  */
79
81
  function SimpleTable(_a) {
80
82
  var id = _a.id, readOnly = _a.readOnly, _b = _a.config, config = _b === void 0 ? {
@@ -80,8 +80,8 @@ exports.default = {
80
80
  };
81
81
  var TabBar_ = function (args) {
82
82
  var options = [
83
- { display: "display 1", value: "value1" },
84
- { display: "display 2", value: "value2" },
83
+ { display: "display 1", value: "value1", icon: 'Funnel' },
84
+ { display: "display 2", value: "value2", icon: 'ListDashes' },
85
85
  { display: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", value: "value3" },
86
86
  { display: "display 3", value: "value4" },
87
87
  { display: "display 4", value: "value5" },
@@ -25,6 +25,7 @@ var mixins_1 = require("../../../themes/mixins");
25
25
  var Typo2_1 = require("../Typo2");
26
26
  var phosphor_react_1 = require("phosphor-react");
27
27
  var colors_1 = require("../../themes/colors");
28
+ var icons_1 = require("../../../icons");
28
29
  var Base = function (_a) {
29
30
  var id = _a.id, options = _a.options, valueProp = _a.value, onChange = _a.onChange, style = _a.style, errorTabs = _a.errorTabs, disabledTabs = _a.disabledTabs, _b = _a.tabBarStyle, tabBarStyle = _b === void 0 ? '1' : _b, saveValueAsString = _a.saveValueAsString, _c = _a.black, black = _c === void 0 ? false : _c, M = _a.M, S = _a.S, _size = _a.size //use any one of these 3
30
31
  ;
@@ -34,6 +35,13 @@ var Base = function (_a) {
34
35
  var handleClick = function (v) {
35
36
  onChange && onChange(id, saveValueAsString ? v.value : v);
36
37
  };
38
+ var genIconInTab = function (iconName) {
39
+ var IconComp = icons_1.icons[iconName];
40
+ if (!IconComp)
41
+ return null;
42
+ //else
43
+ return react_1.default.createElement(IconComp, { weight: 'bold', size: 16 });
44
+ };
37
45
  return (react_1.default.createElement(index_styled_1.TabBarStyled, { size: size, style: style },
38
46
  react_1.default.createElement(index_styled_1.TabBarContainerStyled, { id: id },
39
47
  !scrollIsAtStart && (react_1.default.createElement(index_styled_1.StyledDirectionButtons, { left: true },
@@ -45,7 +53,9 @@ var Base = function (_a) {
45
53
  var tabIsActive = value && op.value === value.value;
46
54
  return (react_1.default.createElement(index_styled_1.TabBarTabWrapper, { tabBarStyle: tabBarStyle, key: op.value, active: tabIsActive, error: tabHasError, disabled: tabIsDisabled, black: black },
47
55
  react_1.default.createElement(index_styled_1.TabBarTabStyled, { size: size, active: tabIsActive, error: tabHasError, disabled: tabIsDisabled, tabBarStyle: tabBarStyle, onClick: function () { return handleClick(op); }, black: black },
48
- react_1.default.createElement(index_styled_1.STYLED_TYPO, { capitalize: true }, op.display),
56
+ react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '0.4rem' } },
57
+ op.icon && genIconInTab(op.icon),
58
+ op.display && react_1.default.createElement(index_styled_1.STYLED_TYPO, { capitalize: true }, op.display)),
49
59
  tabHasError && react_1.default.createElement(index_styled_1.StyledDot, { active: tabIsActive, error: tabHasError, tabBarStyle: tabBarStyle }))));
50
60
  }))),
51
61
  !scrollIsAtEnd && (react_1.default.createElement(index_styled_1.StyledDirectionButtons, { right: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.168.0",
3
+ "version": "2.168.2",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -71,11 +71,11 @@
71
71
  "typescript": "^5.4.3"
72
72
  },
73
73
  "peerDependencies": {
74
+ "date-fns": "^2.0.0",
74
75
  "react": "^17.0.2",
75
76
  "react-dom": "^17.0.2",
76
77
  "react-router-dom": "^6.28.0",
77
- "styled-components": "^5.3.3",
78
- "date-fns": "^2.0.0"
78
+ "styled-components": "^5.3.3"
79
79
  },
80
80
  "config": {
81
81
  "commitizen": {