oolib 2.110.1 → 2.111.0

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.
Files changed (259) hide show
  1. package/dist/UIContent/index.d.ts +17 -17
  2. package/dist/components/Accordion/index.d.ts +56 -13
  3. package/dist/components/Accordion/index.js +23 -31
  4. package/dist/components/Accordion/styled.d.ts +7 -7
  5. package/dist/components/Accordion/styled.js +7 -8
  6. package/dist/components/ActionMenu/index.js +2 -9
  7. package/dist/components/AudioInput/comps/AudioAction.d.ts +1 -1
  8. package/dist/components/AudioInput/comps/AudioPlayer.d.ts +1 -1
  9. package/dist/components/AudioInput/index.js +1 -1
  10. package/dist/components/Breadcrumbs/index.styled.d.ts +1 -1
  11. package/dist/components/Buttons/index.d.ts +32 -42
  12. package/dist/components/Buttons/index.js +3 -3
  13. package/dist/components/Coachmark/comps/MovingCoachmark/index.d.ts +3 -0
  14. package/dist/components/Coachmark/comps/MovingCoachmark/index.js +68 -0
  15. package/dist/components/Coachmark/comps/MovingCoachmark/styled.d.ts +2 -0
  16. package/dist/components/Coachmark/comps/MovingCoachmark/styled.js +45 -0
  17. package/dist/components/Coachmark/comps/MovingCoachmark/utils/index.d.ts +1 -0
  18. package/dist/components/Coachmark/comps/MovingCoachmark/utils/index.js +57 -0
  19. package/dist/components/Coachmark/config.d.ts +31 -0
  20. package/dist/components/Coachmark/config.js +61 -0
  21. package/dist/components/Coachmark/index.d.ts +4 -0
  22. package/dist/components/Coachmark/index.js +74 -0
  23. package/dist/components/Coachmark/styled.d.ts +1 -0
  24. package/dist/components/Coachmark/styled.js +37 -0
  25. package/dist/components/Coachmark/utils/index.d.ts +13 -0
  26. package/dist/components/Coachmark/utils/index.js +70 -0
  27. package/dist/components/DateRangePicker/index.d.ts +1 -1
  28. package/dist/components/DateTimePicker/index.styled.d.ts +0 -0
  29. package/dist/components/DateTimePicker/index.styled.js +0 -0
  30. package/dist/components/Dropdowns/DropdownMulti/index.js +4 -28
  31. package/dist/components/Dropdowns/DropdownSingle/index.js +4 -28
  32. package/dist/components/Dropdowns/comps/OptionsMulti/index.js +3 -30
  33. package/dist/components/Dropdowns/comps/OptionsShell/index.js +1 -11
  34. package/dist/components/Dropdowns/comps/OptionsSingle/index.js +2 -34
  35. package/dist/components/Dropdowns/comps/SelectDropdown/index.js +1 -12
  36. package/dist/components/Dropdowns/comps/VirtualizedWrapper/index.d.ts +1 -1
  37. package/dist/components/Dropdowns/utils/isDynamicOtherOption.d.ts +0 -0
  38. package/dist/components/Dropdowns/utils/isDynamicOtherOption.js +0 -0
  39. package/dist/components/EmptyStates/index.js +1 -12
  40. package/dist/components/FileUploadWrapper/comps/FileUploadShell.d.ts +1 -1
  41. package/dist/components/FileUploadWrapper/index.d.ts +1 -1
  42. package/dist/components/FileUploadWrapper/index.js +1 -12
  43. package/dist/components/IFrameInput/comps/Embed.d.ts +1 -1
  44. package/dist/components/IFrameInput/index.js +2 -2
  45. package/dist/components/IFrameInput/utils/DisplayCoachmark.d.ts +7 -0
  46. package/dist/components/IFrameInput/utils/DisplayCoachmark.js +83 -0
  47. package/dist/components/ImageInput/comps/GallerySlider/index.js +1 -16
  48. package/dist/components/ImageInput/comps/ImageEditor/comps/ConfirmDeleteModal/index.d.ts +1 -1
  49. package/dist/components/ImageInput/comps/ImageEditor/index.js +9 -65
  50. package/dist/components/ImageInput/comps/Placeholder/index.js +1 -17
  51. package/dist/components/ImageInput/comps/Placeholder/styled.d.ts +3 -0
  52. package/dist/components/ImageInput/comps/Placeholder/styled.js +39 -0
  53. package/dist/components/ImageInput/comps/SingleImageInput/index.js +1 -32
  54. package/dist/components/ImageInput/derivedComps/ImageDisplayInMask/index.js +1 -1
  55. package/dist/components/ImageInput/index.js +3 -25
  56. package/dist/components/InlineAlert/index.d.ts +25 -8
  57. package/dist/components/InlineAlert/index.js +16 -1
  58. package/dist/components/LegendRadioCheckList/LegendButton/index.d.ts +10 -0
  59. package/dist/components/LegendRadioCheckList/LegendButton/index.js +18 -0
  60. package/dist/components/LegendRadioCheckList/LegendButton/styled.d.ts +3 -0
  61. package/dist/components/LegendRadioCheckList/LegendButton/styled.js +22 -0
  62. package/dist/components/LegendRadioCheckList/LegendCheckboxList/index.d.ts +8 -0
  63. package/dist/components/LegendRadioCheckList/LegendCheckboxList/index.js +49 -0
  64. package/dist/components/LegendRadioCheckList/LegendCheckboxList/styled.d.ts +0 -0
  65. package/dist/components/LegendRadioCheckList/LegendCheckboxList/styled.js +0 -0
  66. package/dist/components/LegendRadioCheckList/LegendRadioList/index.d.ts +8 -0
  67. package/dist/components/LegendRadioCheckList/LegendRadioList/index.js +34 -0
  68. package/dist/components/LegendRadioCheckList/LegendRadioList/styled.d.ts +1 -0
  69. package/dist/components/LegendRadioCheckList/LegendRadioList/styled.js +13 -0
  70. package/dist/components/Lexical/Plugins/TableCellResizer/index.js +1 -26
  71. package/dist/components/LoadersAndProgress/LoaderCircle/index.js +2 -2
  72. package/dist/components/LoadersAndProgress/SkeletonLoader/index.d.ts +1 -1
  73. package/dist/components/Margins/index.d.ts +1 -1
  74. package/dist/components/Modals/Modal/styled.d.ts +2 -2
  75. package/dist/components/Modals/ModalConfirm/styled.d.ts +2 -2
  76. package/dist/components/OKELink/comps/AvatarDisplay/index.d.ts +8 -0
  77. package/dist/components/OKELink/comps/AvatarDisplay/index.js +19 -0
  78. package/dist/components/OKELink/comps/AvatarDisplay/styled.d.ts +2 -0
  79. package/dist/components/OKELink/comps/AvatarDisplay/styled.js +48 -0
  80. package/dist/components/OKELink/index.d.ts +1 -1
  81. package/dist/components/OKELink/index.js +2 -5
  82. package/dist/components/OKELink/utils/index.d.ts +6 -0
  83. package/dist/components/OKELink/utils/index.js +20 -0
  84. package/dist/components/PDFInput/comps/PDFActions.d.ts +1 -1
  85. package/dist/components/PDFInput/index.js +1 -1
  86. package/dist/components/Paddings/index.d.ts +1 -1
  87. package/dist/components/PercentCompletedPie/index.d.ts +19 -5
  88. package/dist/components/PercentCompletedPie/index.js +15 -5
  89. package/dist/components/PercentCompletedPie/styled.d.ts +17 -5
  90. package/dist/components/PercentCompletedPie/styled.js +26 -6
  91. package/dist/components/Playground/index.d.ts +4 -0
  92. package/dist/components/Playground/index.js +17 -0
  93. package/dist/components/Playground/styled.d.ts +1 -0
  94. package/dist/components/Playground/styled.js +14 -0
  95. package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxButton/index.d.ts +1 -1
  96. package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxButton/index.js +1 -12
  97. package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxInput/index.d.ts +1 -1
  98. package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxInput/index.js +3 -20
  99. package/dist/components/RadioAndCheckbox/comps/CheckboxList/index.js +11 -7
  100. package/dist/components/RadioAndCheckbox/comps/RadioList/comps/RadioInput/index.js +4 -25
  101. package/dist/components/RadioAndCheckbox/comps/RadioList/index.js +6 -6
  102. package/dist/components/ResourceInput/comp/ResourceDisplayBlock.d.ts +1 -1
  103. package/dist/components/ResourceInput/index.d.ts +1 -1
  104. package/dist/components/SimpleTable/index.js +5 -22
  105. package/dist/components/SimpleTable/utils/convertColHeaderConfigToRowData.js +1 -1
  106. package/dist/components/SimpleTable/utils/convertRowHeaderConfigToCellData.js +1 -1
  107. package/dist/components/SimpleTable/utils/prepInitValueFromConfigIfNoValue.js +2 -2
  108. package/dist/components/Switches/index.js +5 -11
  109. package/dist/components/Tags/index.d.ts +1 -1
  110. package/dist/components/Tags/index.styled.d.ts +1 -1
  111. package/dist/components/TimePicker/styled.d.ts +1 -1
  112. package/dist/components/TimeRangePicker/index.styled.d.ts +0 -0
  113. package/dist/components/TimeRangePicker/index.styled.js +0 -0
  114. package/dist/components/Tooltip/index.d.ts +2 -3
  115. package/dist/components/Typo/index.js +1 -1
  116. package/dist/components/VideoInput/comps/VideoActionMenu.d.ts +1 -1
  117. package/dist/components/VideoInput/index.d.ts +1 -1
  118. package/dist/components/VideoInput/index.js +2 -21
  119. package/dist/components/Wrappers/WrapperCardGrid.d.ts +2 -0
  120. package/dist/components/Wrappers/WrapperCardGrid.js +19 -0
  121. package/dist/components/Wrappers/index.d.ts +1 -1
  122. package/dist/components/Wrappers/index.js +1 -1
  123. package/dist/components/cards/ListProfile/styled.d.ts +7 -0
  124. package/dist/components/cards/ListProfile/styled.js +23 -0
  125. package/dist/components/cards/utils/parseCardConfig.js +1 -1
  126. package/dist/d3Modules/index.d.ts +1 -0
  127. package/dist/d3Modules/index.js +1 -1
  128. package/dist/icons/custom/index.d.ts +1 -0
  129. package/dist/icons/custom/index.js +6 -1
  130. package/dist/icons/index.d.ts +112 -110
  131. package/dist/icons/index.js +2 -1
  132. package/dist/stories/Accordion.stories.d.ts +78 -0
  133. package/dist/stories/Accordion.stories.js +93 -0
  134. package/dist/stories/ActionMenu.stories.d.ts +166 -0
  135. package/dist/stories/ActionMenu.stories.js +140 -0
  136. package/dist/stories/AudioInput.stories.d.ts +20 -0
  137. package/dist/stories/AudioInput.stories.js +67 -0
  138. package/dist/stories/Banner.stories.d.ts +97 -0
  139. package/dist/stories/Banner.stories.js +126 -0
  140. package/dist/stories/BarChart.stories.d.ts +13 -0
  141. package/dist/stories/BarChart.stories.js +61 -0
  142. package/dist/stories/BlockLabel.stories.d.ts +71 -0
  143. package/dist/stories/BlockLabel.stories.js +106 -0
  144. package/dist/stories/Breadcrumbs.stories.d.ts +13 -0
  145. package/dist/stories/Breadcrumbs.stories.js +34 -0
  146. package/dist/stories/Button.stories.d.ts +209 -0
  147. package/dist/stories/Button.stories.js +164 -0
  148. package/dist/stories/Checkbox.stories.d.ts +248 -0
  149. package/dist/stories/Checkbox.stories.js +249 -0
  150. package/dist/stories/Colors.stories.d.ts +6 -0
  151. package/dist/stories/Colors.stories.js +66 -0
  152. package/dist/stories/DatePicker.stories.d.ts +239 -0
  153. package/dist/stories/DatePicker.stories.js +267 -0
  154. package/dist/stories/Divider.stories.d.ts +8 -0
  155. package/dist/stories/Divider.stories.js +28 -0
  156. package/dist/stories/Dropdowns.stories.d.ts +114 -0
  157. package/dist/stories/Dropdowns.stories.js +280 -0
  158. package/dist/stories/EmptyStates.stories.d.ts +63 -0
  159. package/dist/stories/EmptyStates.stories.js +69 -0
  160. package/dist/stories/HomeCover.stories.d.ts +55 -0
  161. package/dist/stories/HomeCover.stories.js +68 -0
  162. package/dist/stories/IFrameInput.stories.d.ts +32 -0
  163. package/dist/stories/IFrameInput.stories.js +51 -0
  164. package/dist/stories/ImageInput/ImageInput.stories.d.ts +263 -0
  165. package/dist/stories/ImageInput/ImageInput.stories.js +167 -0
  166. package/dist/stories/ImageInput/imageInputArgTypes.d.ts +121 -0
  167. package/dist/stories/ImageInput/imageInputArgTypes.js +78 -0
  168. package/dist/stories/ImageInput/imageInputParseArgTypes.d.ts +17 -0
  169. package/dist/stories/ImageInput/imageInputParseArgTypes.js +31 -0
  170. package/dist/stories/InlineAlert.stories.d.ts +62 -0
  171. package/dist/stories/InlineAlert.stories.js +62 -0
  172. package/dist/stories/Layout.stories.d.ts +161 -0
  173. package/dist/stories/Layout.stories.js +183 -0
  174. package/dist/stories/LegendRadioList.stories.d.ts +15 -0
  175. package/dist/stories/LegendRadioList.stories.js +73 -0
  176. package/dist/stories/Loaders.stories.d.ts +77 -0
  177. package/dist/stories/Loaders.stories.js +74 -0
  178. package/dist/stories/Modal.stories.d.ts +135 -0
  179. package/dist/stories/Modal.stories.js +146 -0
  180. package/dist/stories/ModalConfirmAction.stories.d.ts +13 -0
  181. package/dist/stories/ModalConfirmAction.stories.js +47 -0
  182. package/dist/stories/OKELink.stories.d.ts +72 -0
  183. package/dist/stories/OKELink.stories.js +110 -0
  184. package/dist/stories/PDFInput.stories.d.ts +20 -0
  185. package/dist/stories/PDFInput.stories.js +45 -0
  186. package/dist/stories/PageScrollIndicator.stories.d.ts +15 -0
  187. package/dist/stories/PageScrollIndicator.stories.js +26 -0
  188. package/dist/stories/PercentCompletedPi.stories.d.ts +55 -0
  189. package/dist/stories/PercentCompletedPi.stories.js +49 -0
  190. package/dist/stories/Playground.stories.d.ts +22 -0
  191. package/dist/stories/Playground.stories.js +26 -0
  192. package/dist/stories/Progress.stories.d.ts +45 -0
  193. package/dist/stories/Progress.stories.js +50 -0
  194. package/dist/stories/RadioButton.stories.d.ts +260 -0
  195. package/dist/stories/RadioButton.stories.js +264 -0
  196. package/dist/stories/ResourceInput.stories.d.ts +9 -0
  197. package/dist/stories/ResourceInput.stories.js +53 -0
  198. package/dist/stories/SimpleTable.stories.d.ts +65 -0
  199. package/dist/stories/SimpleTable.stories.js +111 -0
  200. package/dist/stories/SkeletonLoader.stories.d.ts +81 -0
  201. package/dist/stories/SkeletonLoader.stories.js +82 -0
  202. package/dist/stories/Switches.stories.d.ts +106 -0
  203. package/dist/stories/Switches.stories.js +136 -0
  204. package/dist/stories/TabBar.stories.d.ts +73 -0
  205. package/dist/stories/TabBar.stories.js +103 -0
  206. package/dist/stories/TagClear.stories.d.ts +57 -0
  207. package/dist/stories/TagClear.stories.js +76 -0
  208. package/dist/stories/TagDisplay.stories.d.ts +73 -0
  209. package/dist/stories/TagDisplay.stories.js +154 -0
  210. package/dist/stories/TagLink.stories.d.ts +59 -0
  211. package/dist/stories/TagLink.stories.js +65 -0
  212. package/dist/stories/TagSelect.stories.d.ts +41 -0
  213. package/dist/stories/TagSelect.stories.js +54 -0
  214. package/dist/stories/TagsInput.stories.d.ts +90 -0
  215. package/dist/stories/TagsInput.stories.js +168 -0
  216. package/dist/stories/TextInputs.stories.d.ts +124 -0
  217. package/dist/stories/TextInputs.stories.js +178 -0
  218. package/dist/stories/Tooltip.stories.d.ts +41 -0
  219. package/dist/stories/Tooltip.stories.js +78 -0
  220. package/dist/stories/Typo.stories.d.ts +304 -0
  221. package/dist/stories/Typo.stories.js +357 -0
  222. package/dist/stories/UserRoleBadge.stories.d.ts +19 -0
  223. package/dist/stories/UserRoleBadge.stories.js +46 -0
  224. package/dist/stories/Utilities.stories.d.ts +5 -0
  225. package/dist/stories/Utilities.stories.js +110 -0
  226. package/dist/stories/VideoInput.stories.d.ts +46 -0
  227. package/dist/stories/VideoInput.stories.js +49 -0
  228. package/dist/stories/cards/CardContent.stories.d.ts +67 -0
  229. package/dist/stories/cards/CardContent.stories.js +47 -0
  230. package/dist/stories/cards/CardEmbed.stories.d.ts +65 -0
  231. package/dist/stories/cards/CardEmbed.stories.js +46 -0
  232. package/dist/stories/cards/CardProfile.stories.d.ts +46 -0
  233. package/dist/stories/cards/CardProfile.stories.js +48 -0
  234. package/dist/stories/cards/ListContent.stories.d.ts +81 -0
  235. package/dist/stories/cards/ListContent.stories.js +50 -0
  236. package/dist/stories/cards/ListProfile.stories.d.ts +41 -0
  237. package/dist/stories/cards/ListProfile.stories.js +46 -0
  238. package/dist/stories/cards/utils/cardArgTypes.d.ts +182 -0
  239. package/dist/stories/cards/utils/cardArgTypes.js +114 -0
  240. package/dist/stories/cards/utils/parseCardArgs.d.ts +46 -0
  241. package/dist/stories/cards/utils/parseCardArgs.js +57 -0
  242. package/dist/themes/colors.d.ts +51 -0
  243. package/dist/utils/comps/DisplayIcon/index.d.ts +1 -1
  244. package/dist/utils/getBlockLabelProps.js +1 -1
  245. package/dist/utils/getterSetterDeleter/getVal_caseExamples.d.ts +60 -0
  246. package/dist/utils/getterSetterDeleter/getVal_caseExamples.js +91 -0
  247. package/dist/utilsOolib/StorybookBannersWrapper.d.ts +2 -0
  248. package/dist/utilsOolib/StorybookBannersWrapper.js +16 -0
  249. package/dist/utilsOolib/excludeKeys.d.ts +8 -0
  250. package/dist/utilsOolib/excludeKeys.js +31 -0
  251. package/dist/utilsOolib/genRandomHash.d.ts +7 -0
  252. package/dist/utilsOolib/genRandomHash.js +19 -0
  253. package/dist/utilsOolib/index.d.ts +12 -5
  254. package/dist/utilsOolib/index.js +11 -3
  255. package/dist/utilsOolib/renderRTEPlaceholderForOolibPreview.d.ts +8 -1
  256. package/dist/utilsOolib/renderRTEPlaceholderForOolibPreview.js +1 -2
  257. package/package.json +4 -3
  258. /package/dist/components/Buttons/{index.styled.d.ts → styled.d.ts} +0 -0
  259. /package/dist/components/Buttons/{index.styled.js → styled.js} +0 -0
@@ -0,0 +1,91 @@
1
+ //These might be outdated after
2
+ //recent flattenIfValueIsArray updates.
3
+ //cross check these and update accordingly
4
+ //CASE 1: obj-obj-ary-ary
5
+ var sampleObj = {
6
+ key1: {
7
+ key2: [
8
+ ['hello', 'world'],
9
+ ['hello2', 'world2']
10
+ ],
11
+ key4: 'removeMe'
12
+ }
13
+ };
14
+ //returns
15
+ var returned = {
16
+ "getVal": [
17
+ ["hello", "world"],
18
+ ["hello2", "world2"]
19
+ ]
20
+ };
21
+ //--------------
22
+ //CASE 2: obj-obj-ary-obj-ary-obj : value is a string
23
+ //resource
24
+ var sampleObj2 = {
25
+ key1: {
26
+ key2: [
27
+ {
28
+ aryKey1: [{ aryKey2: "hello1" }],
29
+ },
30
+ {
31
+ aryKey1: [{ aryKey2: "hello2" }],
32
+ },
33
+ ],
34
+ key4: "removeMe",
35
+ },
36
+ };
37
+ //returns
38
+ var returned2 = {
39
+ getVal: ["hello1", "hello2"],
40
+ };
41
+ //------------
42
+ //CASE 4: obj-obj-ary-obj-ary-obj-ary-obj : value is an array
43
+ var sampleObj4 = {
44
+ key1: {
45
+ key2: [
46
+ {
47
+ aryKey1: [{ aryKey2: [{ aryKey3: ["hello1"] }] }],
48
+ },
49
+ {
50
+ aryKey1: [{ aryKey2: [{ aryKey3: ["hello2"] }] }],
51
+ },
52
+ ],
53
+ key4: "removeMe",
54
+ },
55
+ };
56
+ // all arrays are flattened to a single array : maybe the value ary should not be flattened...
57
+ var returned4 = {
58
+ "getVal": [
59
+ "hello1",
60
+ "hello2"
61
+ ]
62
+ };
63
+ //-----------
64
+ //CASE 3: obj-obj-ary-obj : value is an array
65
+ var sampleObj3 = {
66
+ key1: {
67
+ key2: [
68
+ {
69
+ aryInside: ['hello', 'world']
70
+ },
71
+ {
72
+ aryInside: ['hello2', 'world2']
73
+ },
74
+ ],
75
+ key4: 'removeMe'
76
+ }
77
+ };
78
+ // no arrays are flattened
79
+ var returned3 = {
80
+ "getVal": [
81
+ ["hello", "world"],
82
+ ["hello2", "world2"]
83
+ ]
84
+ };
85
+ //look at the above results and you will see the inconsistency, and thats the bug
86
+ /**
87
+ * BUG:
88
+
89
+ if the value is an array inside 1 array. we are returned an array inside array : which i think is right...
90
+ if the value is an array inside 2 arrays, we are returned 1 single array (i.e the value array is flattened out) : which i think is wrong, but this might be addressing some scenario (although it is wrong.). Still a bit dangerous to change it...
91
+ */
@@ -0,0 +1,2 @@
1
+ export function StorybookBannersWrapper(): React.JSX.Element;
2
+ import React from "react";
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.StorybookBannersWrapper = void 0;
7
+ var react_1 = __importDefault(require("react"));
8
+ var bannerContext_1 = require("../components/Banners/bannerContext");
9
+ var Banners_1 = require("../components/Banners");
10
+ var StorybookBannersWrapper = function () {
11
+ var _a = (0, bannerContext_1.useBannerContext)(), BANNER_STATE = _a.BANNER_STATE, REMOVE_ALERT_BANNER = _a.REMOVE_ALERT_BANNER, REMOVE_INFO_BANNER = _a.REMOVE_INFO_BANNER;
12
+ return (react_1.default.createElement(react_1.default.Fragment, null,
13
+ react_1.default.createElement(Banners_1.BannerInfo, { BANNER_STATE: BANNER_STATE, REMOVE_INFO_BANNER: REMOVE_INFO_BANNER }),
14
+ react_1.default.createElement(Banners_1.BannerAlert, { BANNER_STATE: BANNER_STATE, REMOVE_ALERT_BANNER: REMOVE_ALERT_BANNER })));
15
+ };
16
+ exports.StorybookBannersWrapper = StorybookBannersWrapper;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @description From the supplied object, this function excludes the keys
3
+ * defined in the 'exclude' array, and returns the remaining object.
4
+ * @param obj The object from which keys will be excluded
5
+ * @param exclude An array of keys to exclude from the object
6
+ * @returns A new object with the specified keys excluded
7
+ */
8
+ export declare const excludeKeys: <T extends object, K extends keyof T>(obj: T, exclude?: K[]) => Omit<T, K>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.excludeKeys = void 0;
15
+ /**
16
+ * @description From the supplied object, this function excludes the keys
17
+ * defined in the 'exclude' array, and returns the remaining object.
18
+ * @param obj The object from which keys will be excluded
19
+ * @param exclude An array of keys to exclude from the object
20
+ * @returns A new object with the specified keys excluded
21
+ */
22
+ var excludeKeys = function (obj, exclude) {
23
+ if (exclude === void 0) { exclude = []; }
24
+ return Object.keys(obj)
25
+ .filter(function (k) { return !exclude.includes(k); })
26
+ .reduce(function (a, b) {
27
+ var _a;
28
+ return (__assign(__assign({}, a), (_a = {}, _a[b] = obj[b], _a)));
29
+ }, {});
30
+ };
31
+ exports.excludeKeys = excludeKeys;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Generates a random hash of a specified length.
3
+ *
4
+ * @param {number} length - the length of the hash to generate
5
+ * @return {string} the randomly generated hash
6
+ */
7
+ export declare function genRandomHash(length: number): string;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.genRandomHash = void 0;
4
+ /**
5
+ * Generates a random hash of a specified length.
6
+ *
7
+ * @param {number} length - the length of the hash to generate
8
+ * @return {string} the randomly generated hash
9
+ */
10
+ function genRandomHash(length) {
11
+ var result = '';
12
+ var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
13
+ var charactersLength = characters.length;
14
+ for (var counter = 0; counter < length; counter++) {
15
+ result += characters.charAt(Math.floor(Math.random() * charactersLength));
16
+ }
17
+ return result;
18
+ }
19
+ exports.genRandomHash = genRandomHash;
@@ -1,5 +1,12 @@
1
- export function useLocale(): (text: any) => any;
2
- export function getPrimaryColor10(colors: any): any;
3
- export function getPrimaryColor40(colors: any): any;
4
- export function getPrimaryColor100(colors: any): any;
5
- export function getPrimaryColorText(colors: any): any;
1
+ /**
2
+ * @note : THESE ARE NOT MEANT TO BE EXPORTED
3
+ *
4
+ * These are utility functions that make certain tasks
5
+ * within oolib easier
6
+ */
7
+ import { ColorsType } from '../themes/colors';
8
+ export declare const useLocale: () => (text: string) => string;
9
+ export declare const getPrimaryColor10: (colors?: ColorsType) => string;
10
+ export declare const getPrimaryColor40: (colors?: ColorsType) => string;
11
+ export declare const getPrimaryColor100: (colors?: ColorsType) => string;
12
+ export declare const getPrimaryColorText: (colors?: ColorsType) => string;
@@ -13,13 +13,21 @@ var primaryColor10 = colors_1.colors.primaryColor10, primaryColor40 = colors_1.c
13
13
  var useLocale = function () {
14
14
  var currentTheme = (0, styled_components_1.useTheme)();
15
15
  var localize = function (text) {
16
- return (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.localize)
17
- ? currentTheme.localize(text)
18
- : text;
16
+ return (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.localize) ? currentTheme.localize(text) : text;
19
17
  };
20
18
  return localize;
21
19
  };
22
20
  exports.useLocale = useLocale;
21
+ // export const useLocale = () => {
22
+ // const currentTheme = useTheme();
23
+ // const localize = text => {
24
+ // console.log({ text })
25
+ // return currentTheme?.localize
26
+ // ? currentTheme.localize(text)
27
+ // : text
28
+ // }
29
+ // return localize
30
+ // }
23
31
  var getPrimaryColor10 = function (colors) {
24
32
  return (colors === null || colors === void 0 ? void 0 : colors.primaryColor10) || primaryColor10;
25
33
  };
@@ -1,2 +1,9 @@
1
- export function renderRTEPlaceholderForOolibPreview(options?: {}): React.JSX.Element;
2
1
  import React from "react";
2
+ import { TooltipProps } from "../components/Tooltip";
3
+ interface RenderRTEPlaceholderForOolibPreviewOptions {
4
+ width?: string;
5
+ height?: string;
6
+ tooltipPos?: TooltipProps["position"];
7
+ }
8
+ export declare const renderRTEPlaceholderForOolibPreview: (options?: RenderRTEPlaceholderForOolibPreviewOptions) => React.JSX.Element;
9
+ export {};
@@ -5,12 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.renderRTEPlaceholderForOolibPreview = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
- var phosphor_react_1 = require("phosphor-react");
9
8
  var Tooltip_1 = require("../components/Tooltip");
10
9
  var themes_1 = require("../themes");
11
10
  var renderRTEPlaceholderForOolibPreview = function (options) {
12
11
  if (options === void 0) { options = {}; }
13
- var _a = options.width, width = _a === void 0 ? "2rem" : _a, _b = options.height, height = _b === void 0 ? '2rem' : _b, _c = options.tooltipPos, tooltipPos = _c === void 0 ? 'bottom' : _c;
12
+ var _a = options.width, width = _a === void 0 ? "2rem" : _a, _b = options.height, height = _b === void 0 ? "2rem" : _b, _c = options.tooltipPos, tooltipPos = _c === void 0 ? "bottom" : _c;
14
13
  return (react_1.default.createElement("div", { style: {
15
14
  width: width,
16
15
  height: height,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.110.1",
3
+ "version": "2.111.0",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -67,10 +67,10 @@
67
67
  "react-json-view": "^1.21.3",
68
68
  "react-router-dom": "^5.1.2",
69
69
  "semantic-release": "^18.0.0",
70
- "storybook": "^7.2.1"
70
+ "storybook": "^7.2.1",
71
+ "typescript": "^5.4.3"
71
72
  },
72
73
  "peerDependencies": {
73
- "framer-motion": "^4.1.17",
74
74
  "react": "^17.0.2",
75
75
  "react-dom": "^17.0.2",
76
76
  "react-router-dom": "^5.1.2",
@@ -85,6 +85,7 @@
85
85
  "access": "public"
86
86
  },
87
87
  "dependencies": {
88
+ "framer-motion": "^4.1.17",
88
89
  "@faker-js/faker": "^8.3.1",
89
90
  "@react-hook/resize-observer": "^1.2.6",
90
91
  "babel-polyfill": "^6.26.0",