oolib 2.132.1 → 2.132.3

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.
@@ -1,3 +1,10 @@
1
+ /**
2
+ * PENDINGS
3
+ * - Ideally should migrate RichTextEditor to Lexical
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
+ * - 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
+ * - memoization of cell comps maybe? there is some commented code for the same below..
7
+ */
1
8
  export function SimpleTable({ id, readOnly, config, value: _value, onChange, defaultColWidth, }: {
2
9
  id: any;
3
10
  readOnly: any;
@@ -68,14 +68,13 @@ var convertRowHeaderConfigToCellData_1 = require("./utils/convertRowHeaderConfig
68
68
  var prepInitValueFromConfigIfNoValue_1 = require("./utils/prepInitValueFromConfigIfNoValue");
69
69
  var DropdownSingle_1 = require("../Dropdowns/DropdownSingle");
70
70
  var greyColor100 = themes_1.colors.greyColor100;
71
- /*pending:
72
- - first test whatever is done on okf
73
- - add col is still buggy. cannot resize, plus width seems wrong of new col
74
- - fix bugs in the pointer and resize hover
75
- - col Actions
76
- - focussed css can be refined.
77
- - mobile responsiveness
78
- */
71
+ /**
72
+ * PENDINGS
73
+ * - Ideally should migrate RichTextEditor to Lexical
74
+ * - Should run a function that converts rich text to plain text and sends that out in onChange. (like how we do for TitleInput)
75
+ * - 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
76
+ * - memoization of cell comps maybe? there is some commented code for the same below..
77
+ */
79
78
  function SimpleTable(_a) {
80
79
  var id = _a.id, readOnly = _a.readOnly, _b = _a.config, config = _b === void 0 ? {
81
80
  noOfCols: 3,
@@ -128,10 +127,6 @@ function SimpleTable(_a) {
128
127
  var CellContentBlocks = {
129
128
  RichTextEditor: RichTextEditor,
130
129
  DropdownSingle: DropdownSingle_1.DropdownSingle
131
- // KPDropdown,
132
- // TextInput,
133
- // RadioList,
134
- // SANS_3,
135
130
  };
136
131
  var CellContentBlockDefaultProps = {
137
132
  RichTextEditor: {
@@ -143,21 +138,21 @@ function SimpleTable(_a) {
143
138
  },
144
139
  },
145
140
  DropdownSingle: {
146
- S: true
141
+ selectStyleOverride: {
142
+ backgroundColor: themes_1.colors.none,
143
+ },
144
+ popOutOfOverflowHiddenParent: true,
147
145
  }
148
- // KPDropdown: {
149
- // size: 'small',
150
- // },
151
146
  };
147
+ var CellValueGetters = {
148
+ RichTextEditor: function (v) { return (convertToRichText ? convertToRichText(v) : v); },
149
+ }; //prob dont need this..
152
150
  var _g = (0, react_1.useState)(undefined), actionsActiveOnRow = _g[0], setActionsActiveOnRow = _g[1];
153
151
  var _h = (0, react_1.useState)(undefined), actionsActiveOnCol = _h[0], setActionsActiveOnCol = _h[1];
154
152
  var _j = (0, react_1.useState)({
155
153
  rowIdx: undefined,
156
154
  colIdx: undefined,
157
155
  }), hoveredRowAndCol = _j[0], setHoveredRowAndCol = _j[1];
158
- var CellValueGetters = {
159
- RichTextEditor: function (v) { return (convertToRichText ? convertToRichText(v) : v); },
160
- }; //prob dont need this..
161
156
  var handleCellInputChange = function (_a) {
162
157
  var cellIdx = _a.cellIdx, rowIdx = _a.rowIdx, v = _a.v;
163
158
  var valData = value.data;
@@ -183,7 +178,7 @@ function SimpleTable(_a) {
183
178
  var cellCompName = cell.comp || 'RichTextEditor';
184
179
  var NoCompPlaceholder = function () { return react_1.default.createElement("div", null, "No comp exists"); };
185
180
  var CellComp = CellContentBlocks[cellCompName] || NoCompPlaceholder;
186
- var cellProps = CellContentBlockDefaultProps[cellCompName] ? __assign(__assign({}, CellContentBlockDefaultProps[cell.comp]), (cell.props || {})) : {};
181
+ var cellProps = CellContentBlockDefaultProps[cellCompName] ? __assign(__assign({}, CellContentBlockDefaultProps[cellCompName]), (cell.props || {})) : {};
187
182
  var cellValue = CellValueGetters[cellCompName] ? CellValueGetters[cellCompName](cell.value) : cell.value;
188
183
  var cellWidth = value.colWidthConfig["col_".concat(cellIdx)] || defaultColWidth + 'px'; //cuz when pre-fixed column is applied via config.rowHeaderData, no colWidthConfig will be there for it in value.colWidthConfig
189
184
  //(100% - totalExplicitWidths)/(totalColumns - noOfColsWithExplicitWidths)
@@ -20,6 +20,7 @@ export declare const BadgeVetted: (props: any) => React.JSX.Element;
20
20
  export declare const IndiaFlag: (props: any) => React.JSX.Element;
21
21
  export declare const NigeriaFlag: (props: any) => React.JSX.Element;
22
22
  export declare const KenyaFlag: (props: any) => React.JSX.Element;
23
+ export declare const SenegalFlag: (props: any) => React.JSX.Element;
23
24
  export declare const ModalBulbIcon: (props: any) => React.JSX.Element;
24
25
  export declare const Location14: (props: any) => React.JSX.Element;
25
26
  export declare const Person14: (props: any) => React.JSX.Element;
@@ -14,8 +14,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.USAFlag = exports.UKFlag = exports.MalaysiaFlag = exports.ColombiaFlag = exports.BrazilFlag = exports.AudioEmbedIcon = exports.VideoEmbedIcon = exports.Attachment2 = exports.PDFIcon = exports.RichFormatToolOrderedList = exports.RichFormatToolUnorderedList = exports.RichFormatToolH2 = exports.RichFormatToolBlockquote = exports.LinkIcon = exports.UnderlineBtn = exports.ItalicBtn = exports.BoldBtn = exports.SettingsSM = exports.Close_S = exports.UploadImage = exports.KebabMenu = exports.Website_solid_SM = exports.Phone_solid_SM = exports.Mail_solid_SM = exports.Youtube_solid_SM = exports.Instagram_solid_SM = exports.Twitter_solid_SM = exports.Linkedin_solid_SM = exports.Facebook_solid_SM = exports.EditSM = exports.AddXS = exports.UploadSM = exports.Download = exports.Download__nofill = exports.Index = exports.Person14 = exports.Location14 = exports.ModalBulbIcon = exports.KenyaFlag = exports.NigeriaFlag = exports.IndiaFlag = exports.BadgeVetted = exports.BadgeMod = exports.BadgeSuperAdmin = exports.BadgeAdmin = exports.OkeGoogleIcon = exports.LetterH = exports.LanguageIcon = exports.MultipleImages = exports.IndexIcon = void 0;
18
- exports.Reactions = exports.Like = exports.Learning = exports.Inspiring = exports.Celebrate = exports.Stars = exports.SpainFlag = exports.PakistanFlag = exports.ChileFlag = exports.IndonesiaFlag = void 0;
17
+ exports.UKFlag = exports.MalaysiaFlag = exports.ColombiaFlag = exports.BrazilFlag = exports.AudioEmbedIcon = exports.VideoEmbedIcon = exports.Attachment2 = exports.PDFIcon = exports.RichFormatToolOrderedList = exports.RichFormatToolUnorderedList = exports.RichFormatToolH2 = exports.RichFormatToolBlockquote = exports.LinkIcon = exports.UnderlineBtn = exports.ItalicBtn = exports.BoldBtn = exports.SettingsSM = exports.Close_S = exports.UploadImage = exports.KebabMenu = exports.Website_solid_SM = exports.Phone_solid_SM = exports.Mail_solid_SM = exports.Youtube_solid_SM = exports.Instagram_solid_SM = exports.Twitter_solid_SM = exports.Linkedin_solid_SM = exports.Facebook_solid_SM = exports.EditSM = exports.AddXS = exports.UploadSM = exports.Download = exports.Download__nofill = exports.Index = exports.Person14 = exports.Location14 = exports.ModalBulbIcon = exports.SenegalFlag = exports.KenyaFlag = exports.NigeriaFlag = exports.IndiaFlag = exports.BadgeVetted = exports.BadgeMod = exports.BadgeSuperAdmin = exports.BadgeAdmin = exports.OkeGoogleIcon = exports.LetterH = exports.LanguageIcon = exports.MultipleImages = exports.IndexIcon = void 0;
18
+ exports.Reactions = exports.Like = exports.Learning = exports.Inspiring = exports.Celebrate = exports.Stars = exports.SpainFlag = exports.PakistanFlag = exports.ChileFlag = exports.IndonesiaFlag = exports.USAFlag = void 0;
19
19
  var react_1 = __importDefault(require("react"));
20
20
  var themes_1 = require("../../themes");
21
21
  var DisplayIcon_1 = require("../../utils/comps/DisplayIcon");
@@ -123,6 +123,15 @@ var KenyaFlag = function (props) { return (react_1.default.createElement("svg",
123
123
  react_1.default.createElement("path", { fill: "#F7FCFF", fillRule: "evenodd", d: "M20.266 29.813v-8.038c-.573.38-1.005 2.035-1.005 4.02 0 1.983.432 3.638 1.005 4.018zM20.266 19.255v-8.038c-.573.38-1.005 2.035-1.005 4.02 0 1.983.432 3.638 1.005 4.018z", clipRule: "evenodd" }),
124
124
  react_1.default.createElement("path", { fill: "#272727", d: "M23.627 20.515c0-1.813.632-3.487 1.703-4.842.836 1.412 1.406 3.025 1.425 4.838.02 1.813-.586 3.395-1.425 4.847-1.07-1.355-1.703-3.03-1.703-4.843zM17.374 20.515c0-1.813-.633-3.487-1.703-4.842-.836 1.412-1.407 3.025-1.426 4.838-.02 1.813.586 3.395 1.425 4.847 1.07-1.355 1.704-3.03 1.704-4.843z" })))); };
125
125
  exports.KenyaFlag = KenyaFlag;
126
+ var SenegalFlag = function (props) { return (react_1.default.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: props.size || 30, height: props.size || 30, fill: "none", viewBox: "0 0 30 30" }, props),
127
+ react_1.default.createElement("g", { clipPath: "url(#a)" },
128
+ react_1.default.createElement("path", { fill: "#E31B23", d: "M0 0h30v20H0" }),
129
+ react_1.default.createElement("path", { fill: "#FDEF42", d: "M0 0h20v20H0" }),
130
+ react_1.default.createElement("path", { fill: "#00853F", d: "M0 0h10v20H0m13.033-7.267L15 6.7l1.967 6.033L11.833 9h6.334" })),
131
+ react_1.default.createElement("defs", null,
132
+ react_1.default.createElement("clipPath", { id: "a" },
133
+ react_1.default.createElement("path", { fill: "#fff", d: "M0 0h30v20H0z" }))))); };
134
+ exports.SenegalFlag = SenegalFlag;
126
135
  var ModalBulbIcon = function (props) {
127
136
  return (react_1.default.createElement("div", { style: {
128
137
  width: "4rem",
@@ -120,6 +120,7 @@ export namespace icons {
120
120
  export { BadgeVetted };
121
121
  export { IndiaFlag };
122
122
  export { KenyaFlag };
123
+ export { SenegalFlag };
123
124
  export { NigeriaFlag };
124
125
  export { MultipleImages };
125
126
  export { ModalBulbIcon };
@@ -292,6 +293,7 @@ import { BadgeMod } from "./custom";
292
293
  import { BadgeVetted } from "./custom";
293
294
  import { IndiaFlag } from "./custom";
294
295
  import { KenyaFlag } from "./custom";
296
+ import { SenegalFlag } from "./custom";
295
297
  import { NigeriaFlag } from "./custom";
296
298
  import { MultipleImages } from "./custom";
297
299
  import { ModalBulbIcon } from "./custom";
@@ -126,6 +126,7 @@ exports.icons = {
126
126
  BadgeVetted: custom_1.BadgeVetted,
127
127
  IndiaFlag: custom_1.IndiaFlag,
128
128
  KenyaFlag: custom_1.KenyaFlag,
129
+ SenegalFlag: custom_1.SenegalFlag,
129
130
  NigeriaFlag: custom_1.NigeriaFlag,
130
131
  MultipleImages: custom_1.MultipleImages,
131
132
  ModalBulbIcon: custom_1.ModalBulbIcon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.132.1",
3
+ "version": "2.132.3",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",