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.
- package/dist/UIContent/index.d.ts +17 -17
- package/dist/components/Accordion/index.d.ts +56 -13
- package/dist/components/Accordion/index.js +23 -31
- package/dist/components/Accordion/styled.d.ts +7 -7
- package/dist/components/Accordion/styled.js +7 -8
- package/dist/components/ActionMenu/index.js +2 -9
- package/dist/components/AudioInput/comps/AudioAction.d.ts +1 -1
- package/dist/components/AudioInput/comps/AudioPlayer.d.ts +1 -1
- package/dist/components/AudioInput/index.js +1 -1
- package/dist/components/Breadcrumbs/index.styled.d.ts +1 -1
- package/dist/components/Buttons/index.d.ts +32 -42
- package/dist/components/Buttons/index.js +3 -3
- package/dist/components/Coachmark/comps/MovingCoachmark/index.d.ts +3 -0
- package/dist/components/Coachmark/comps/MovingCoachmark/index.js +68 -0
- package/dist/components/Coachmark/comps/MovingCoachmark/styled.d.ts +2 -0
- package/dist/components/Coachmark/comps/MovingCoachmark/styled.js +45 -0
- package/dist/components/Coachmark/comps/MovingCoachmark/utils/index.d.ts +1 -0
- package/dist/components/Coachmark/comps/MovingCoachmark/utils/index.js +57 -0
- package/dist/components/Coachmark/config.d.ts +31 -0
- package/dist/components/Coachmark/config.js +61 -0
- package/dist/components/Coachmark/index.d.ts +4 -0
- package/dist/components/Coachmark/index.js +74 -0
- package/dist/components/Coachmark/styled.d.ts +1 -0
- package/dist/components/Coachmark/styled.js +37 -0
- package/dist/components/Coachmark/utils/index.d.ts +13 -0
- package/dist/components/Coachmark/utils/index.js +70 -0
- package/dist/components/DateRangePicker/index.d.ts +1 -1
- package/dist/components/DateTimePicker/index.styled.d.ts +0 -0
- package/dist/components/DateTimePicker/index.styled.js +0 -0
- package/dist/components/Dropdowns/DropdownMulti/index.js +4 -28
- package/dist/components/Dropdowns/DropdownSingle/index.js +4 -28
- package/dist/components/Dropdowns/comps/OptionsMulti/index.js +3 -30
- package/dist/components/Dropdowns/comps/OptionsShell/index.js +1 -11
- package/dist/components/Dropdowns/comps/OptionsSingle/index.js +2 -34
- package/dist/components/Dropdowns/comps/SelectDropdown/index.js +1 -12
- package/dist/components/Dropdowns/comps/VirtualizedWrapper/index.d.ts +1 -1
- package/dist/components/Dropdowns/utils/isDynamicOtherOption.d.ts +0 -0
- package/dist/components/Dropdowns/utils/isDynamicOtherOption.js +0 -0
- package/dist/components/EmptyStates/index.js +1 -12
- package/dist/components/FileUploadWrapper/comps/FileUploadShell.d.ts +1 -1
- package/dist/components/FileUploadWrapper/index.d.ts +1 -1
- package/dist/components/FileUploadWrapper/index.js +1 -12
- package/dist/components/IFrameInput/comps/Embed.d.ts +1 -1
- package/dist/components/IFrameInput/index.js +2 -2
- package/dist/components/IFrameInput/utils/DisplayCoachmark.d.ts +7 -0
- package/dist/components/IFrameInput/utils/DisplayCoachmark.js +83 -0
- package/dist/components/ImageInput/comps/GallerySlider/index.js +1 -16
- package/dist/components/ImageInput/comps/ImageEditor/comps/ConfirmDeleteModal/index.d.ts +1 -1
- package/dist/components/ImageInput/comps/ImageEditor/index.js +9 -65
- package/dist/components/ImageInput/comps/Placeholder/index.js +1 -17
- package/dist/components/ImageInput/comps/Placeholder/styled.d.ts +3 -0
- package/dist/components/ImageInput/comps/Placeholder/styled.js +39 -0
- package/dist/components/ImageInput/comps/SingleImageInput/index.js +1 -32
- package/dist/components/ImageInput/derivedComps/ImageDisplayInMask/index.js +1 -1
- package/dist/components/ImageInput/index.js +3 -25
- package/dist/components/InlineAlert/index.d.ts +25 -8
- package/dist/components/InlineAlert/index.js +16 -1
- package/dist/components/LegendRadioCheckList/LegendButton/index.d.ts +10 -0
- package/dist/components/LegendRadioCheckList/LegendButton/index.js +18 -0
- package/dist/components/LegendRadioCheckList/LegendButton/styled.d.ts +3 -0
- package/dist/components/LegendRadioCheckList/LegendButton/styled.js +22 -0
- package/dist/components/LegendRadioCheckList/LegendCheckboxList/index.d.ts +8 -0
- package/dist/components/LegendRadioCheckList/LegendCheckboxList/index.js +49 -0
- package/dist/components/LegendRadioCheckList/LegendCheckboxList/styled.d.ts +0 -0
- package/dist/components/LegendRadioCheckList/LegendCheckboxList/styled.js +0 -0
- package/dist/components/LegendRadioCheckList/LegendRadioList/index.d.ts +8 -0
- package/dist/components/LegendRadioCheckList/LegendRadioList/index.js +34 -0
- package/dist/components/LegendRadioCheckList/LegendRadioList/styled.d.ts +1 -0
- package/dist/components/LegendRadioCheckList/LegendRadioList/styled.js +13 -0
- package/dist/components/Lexical/Plugins/TableCellResizer/index.js +1 -26
- package/dist/components/LoadersAndProgress/LoaderCircle/index.js +2 -2
- package/dist/components/LoadersAndProgress/SkeletonLoader/index.d.ts +1 -1
- package/dist/components/Margins/index.d.ts +1 -1
- package/dist/components/Modals/Modal/styled.d.ts +2 -2
- package/dist/components/Modals/ModalConfirm/styled.d.ts +2 -2
- package/dist/components/OKELink/comps/AvatarDisplay/index.d.ts +8 -0
- package/dist/components/OKELink/comps/AvatarDisplay/index.js +19 -0
- package/dist/components/OKELink/comps/AvatarDisplay/styled.d.ts +2 -0
- package/dist/components/OKELink/comps/AvatarDisplay/styled.js +48 -0
- package/dist/components/OKELink/index.d.ts +1 -1
- package/dist/components/OKELink/index.js +2 -5
- package/dist/components/OKELink/utils/index.d.ts +6 -0
- package/dist/components/OKELink/utils/index.js +20 -0
- package/dist/components/PDFInput/comps/PDFActions.d.ts +1 -1
- package/dist/components/PDFInput/index.js +1 -1
- package/dist/components/Paddings/index.d.ts +1 -1
- package/dist/components/PercentCompletedPie/index.d.ts +19 -5
- package/dist/components/PercentCompletedPie/index.js +15 -5
- package/dist/components/PercentCompletedPie/styled.d.ts +17 -5
- package/dist/components/PercentCompletedPie/styled.js +26 -6
- package/dist/components/Playground/index.d.ts +4 -0
- package/dist/components/Playground/index.js +17 -0
- package/dist/components/Playground/styled.d.ts +1 -0
- package/dist/components/Playground/styled.js +14 -0
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxButton/index.d.ts +1 -1
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxButton/index.js +1 -12
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxInput/index.d.ts +1 -1
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxInput/index.js +3 -20
- package/dist/components/RadioAndCheckbox/comps/CheckboxList/index.js +11 -7
- package/dist/components/RadioAndCheckbox/comps/RadioList/comps/RadioInput/index.js +4 -25
- package/dist/components/RadioAndCheckbox/comps/RadioList/index.js +6 -6
- package/dist/components/ResourceInput/comp/ResourceDisplayBlock.d.ts +1 -1
- package/dist/components/ResourceInput/index.d.ts +1 -1
- package/dist/components/SimpleTable/index.js +5 -22
- package/dist/components/SimpleTable/utils/convertColHeaderConfigToRowData.js +1 -1
- package/dist/components/SimpleTable/utils/convertRowHeaderConfigToCellData.js +1 -1
- package/dist/components/SimpleTable/utils/prepInitValueFromConfigIfNoValue.js +2 -2
- package/dist/components/Switches/index.js +5 -11
- package/dist/components/Tags/index.d.ts +1 -1
- package/dist/components/Tags/index.styled.d.ts +1 -1
- package/dist/components/TimePicker/styled.d.ts +1 -1
- package/dist/components/TimeRangePicker/index.styled.d.ts +0 -0
- package/dist/components/TimeRangePicker/index.styled.js +0 -0
- package/dist/components/Tooltip/index.d.ts +2 -3
- package/dist/components/Typo/index.js +1 -1
- package/dist/components/VideoInput/comps/VideoActionMenu.d.ts +1 -1
- package/dist/components/VideoInput/index.d.ts +1 -1
- package/dist/components/VideoInput/index.js +2 -21
- package/dist/components/Wrappers/WrapperCardGrid.d.ts +2 -0
- package/dist/components/Wrappers/WrapperCardGrid.js +19 -0
- package/dist/components/Wrappers/index.d.ts +1 -1
- package/dist/components/Wrappers/index.js +1 -1
- package/dist/components/cards/ListProfile/styled.d.ts +7 -0
- package/dist/components/cards/ListProfile/styled.js +23 -0
- package/dist/components/cards/utils/parseCardConfig.js +1 -1
- package/dist/d3Modules/index.d.ts +1 -0
- package/dist/d3Modules/index.js +1 -1
- package/dist/icons/custom/index.d.ts +1 -0
- package/dist/icons/custom/index.js +6 -1
- package/dist/icons/index.d.ts +112 -110
- package/dist/icons/index.js +2 -1
- package/dist/stories/Accordion.stories.d.ts +78 -0
- package/dist/stories/Accordion.stories.js +93 -0
- package/dist/stories/ActionMenu.stories.d.ts +166 -0
- package/dist/stories/ActionMenu.stories.js +140 -0
- package/dist/stories/AudioInput.stories.d.ts +20 -0
- package/dist/stories/AudioInput.stories.js +67 -0
- package/dist/stories/Banner.stories.d.ts +97 -0
- package/dist/stories/Banner.stories.js +126 -0
- package/dist/stories/BarChart.stories.d.ts +13 -0
- package/dist/stories/BarChart.stories.js +61 -0
- package/dist/stories/BlockLabel.stories.d.ts +71 -0
- package/dist/stories/BlockLabel.stories.js +106 -0
- package/dist/stories/Breadcrumbs.stories.d.ts +13 -0
- package/dist/stories/Breadcrumbs.stories.js +34 -0
- package/dist/stories/Button.stories.d.ts +209 -0
- package/dist/stories/Button.stories.js +164 -0
- package/dist/stories/Checkbox.stories.d.ts +248 -0
- package/dist/stories/Checkbox.stories.js +249 -0
- package/dist/stories/Colors.stories.d.ts +6 -0
- package/dist/stories/Colors.stories.js +66 -0
- package/dist/stories/DatePicker.stories.d.ts +239 -0
- package/dist/stories/DatePicker.stories.js +267 -0
- package/dist/stories/Divider.stories.d.ts +8 -0
- package/dist/stories/Divider.stories.js +28 -0
- package/dist/stories/Dropdowns.stories.d.ts +114 -0
- package/dist/stories/Dropdowns.stories.js +280 -0
- package/dist/stories/EmptyStates.stories.d.ts +63 -0
- package/dist/stories/EmptyStates.stories.js +69 -0
- package/dist/stories/HomeCover.stories.d.ts +55 -0
- package/dist/stories/HomeCover.stories.js +68 -0
- package/dist/stories/IFrameInput.stories.d.ts +32 -0
- package/dist/stories/IFrameInput.stories.js +51 -0
- package/dist/stories/ImageInput/ImageInput.stories.d.ts +263 -0
- package/dist/stories/ImageInput/ImageInput.stories.js +167 -0
- package/dist/stories/ImageInput/imageInputArgTypes.d.ts +121 -0
- package/dist/stories/ImageInput/imageInputArgTypes.js +78 -0
- package/dist/stories/ImageInput/imageInputParseArgTypes.d.ts +17 -0
- package/dist/stories/ImageInput/imageInputParseArgTypes.js +31 -0
- package/dist/stories/InlineAlert.stories.d.ts +62 -0
- package/dist/stories/InlineAlert.stories.js +62 -0
- package/dist/stories/Layout.stories.d.ts +161 -0
- package/dist/stories/Layout.stories.js +183 -0
- package/dist/stories/LegendRadioList.stories.d.ts +15 -0
- package/dist/stories/LegendRadioList.stories.js +73 -0
- package/dist/stories/Loaders.stories.d.ts +77 -0
- package/dist/stories/Loaders.stories.js +74 -0
- package/dist/stories/Modal.stories.d.ts +135 -0
- package/dist/stories/Modal.stories.js +146 -0
- package/dist/stories/ModalConfirmAction.stories.d.ts +13 -0
- package/dist/stories/ModalConfirmAction.stories.js +47 -0
- package/dist/stories/OKELink.stories.d.ts +72 -0
- package/dist/stories/OKELink.stories.js +110 -0
- package/dist/stories/PDFInput.stories.d.ts +20 -0
- package/dist/stories/PDFInput.stories.js +45 -0
- package/dist/stories/PageScrollIndicator.stories.d.ts +15 -0
- package/dist/stories/PageScrollIndicator.stories.js +26 -0
- package/dist/stories/PercentCompletedPi.stories.d.ts +55 -0
- package/dist/stories/PercentCompletedPi.stories.js +49 -0
- package/dist/stories/Playground.stories.d.ts +22 -0
- package/dist/stories/Playground.stories.js +26 -0
- package/dist/stories/Progress.stories.d.ts +45 -0
- package/dist/stories/Progress.stories.js +50 -0
- package/dist/stories/RadioButton.stories.d.ts +260 -0
- package/dist/stories/RadioButton.stories.js +264 -0
- package/dist/stories/ResourceInput.stories.d.ts +9 -0
- package/dist/stories/ResourceInput.stories.js +53 -0
- package/dist/stories/SimpleTable.stories.d.ts +65 -0
- package/dist/stories/SimpleTable.stories.js +111 -0
- package/dist/stories/SkeletonLoader.stories.d.ts +81 -0
- package/dist/stories/SkeletonLoader.stories.js +82 -0
- package/dist/stories/Switches.stories.d.ts +106 -0
- package/dist/stories/Switches.stories.js +136 -0
- package/dist/stories/TabBar.stories.d.ts +73 -0
- package/dist/stories/TabBar.stories.js +103 -0
- package/dist/stories/TagClear.stories.d.ts +57 -0
- package/dist/stories/TagClear.stories.js +76 -0
- package/dist/stories/TagDisplay.stories.d.ts +73 -0
- package/dist/stories/TagDisplay.stories.js +154 -0
- package/dist/stories/TagLink.stories.d.ts +59 -0
- package/dist/stories/TagLink.stories.js +65 -0
- package/dist/stories/TagSelect.stories.d.ts +41 -0
- package/dist/stories/TagSelect.stories.js +54 -0
- package/dist/stories/TagsInput.stories.d.ts +90 -0
- package/dist/stories/TagsInput.stories.js +168 -0
- package/dist/stories/TextInputs.stories.d.ts +124 -0
- package/dist/stories/TextInputs.stories.js +178 -0
- package/dist/stories/Tooltip.stories.d.ts +41 -0
- package/dist/stories/Tooltip.stories.js +78 -0
- package/dist/stories/Typo.stories.d.ts +304 -0
- package/dist/stories/Typo.stories.js +357 -0
- package/dist/stories/UserRoleBadge.stories.d.ts +19 -0
- package/dist/stories/UserRoleBadge.stories.js +46 -0
- package/dist/stories/Utilities.stories.d.ts +5 -0
- package/dist/stories/Utilities.stories.js +110 -0
- package/dist/stories/VideoInput.stories.d.ts +46 -0
- package/dist/stories/VideoInput.stories.js +49 -0
- package/dist/stories/cards/CardContent.stories.d.ts +67 -0
- package/dist/stories/cards/CardContent.stories.js +47 -0
- package/dist/stories/cards/CardEmbed.stories.d.ts +65 -0
- package/dist/stories/cards/CardEmbed.stories.js +46 -0
- package/dist/stories/cards/CardProfile.stories.d.ts +46 -0
- package/dist/stories/cards/CardProfile.stories.js +48 -0
- package/dist/stories/cards/ListContent.stories.d.ts +81 -0
- package/dist/stories/cards/ListContent.stories.js +50 -0
- package/dist/stories/cards/ListProfile.stories.d.ts +41 -0
- package/dist/stories/cards/ListProfile.stories.js +46 -0
- package/dist/stories/cards/utils/cardArgTypes.d.ts +182 -0
- package/dist/stories/cards/utils/cardArgTypes.js +114 -0
- package/dist/stories/cards/utils/parseCardArgs.d.ts +46 -0
- package/dist/stories/cards/utils/parseCardArgs.js +57 -0
- package/dist/themes/colors.d.ts +51 -0
- package/dist/utils/comps/DisplayIcon/index.d.ts +1 -1
- package/dist/utils/getBlockLabelProps.js +1 -1
- package/dist/utils/getterSetterDeleter/getVal_caseExamples.d.ts +60 -0
- package/dist/utils/getterSetterDeleter/getVal_caseExamples.js +91 -0
- package/dist/utilsOolib/StorybookBannersWrapper.d.ts +2 -0
- package/dist/utilsOolib/StorybookBannersWrapper.js +16 -0
- package/dist/utilsOolib/excludeKeys.d.ts +8 -0
- package/dist/utilsOolib/excludeKeys.js +31 -0
- package/dist/utilsOolib/genRandomHash.d.ts +7 -0
- package/dist/utilsOolib/genRandomHash.js +19 -0
- package/dist/utilsOolib/index.d.ts +12 -5
- package/dist/utilsOolib/index.js +11 -3
- package/dist/utilsOolib/renderRTEPlaceholderForOolibPreview.d.ts +8 -1
- package/dist/utilsOolib/renderRTEPlaceholderForOolibPreview.js +1 -2
- package/package.json +4 -3
- /package/dist/components/Buttons/{index.styled.d.ts → styled.d.ts} +0 -0
- /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,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,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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
package/dist/utilsOolib/index.js
CHANGED
|
@@ -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 ?
|
|
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.
|
|
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",
|
|
File without changes
|
|
File without changes
|