oolib 2.194.1 → 2.195.1

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.
@@ -124,6 +124,10 @@ export namespace icons {
124
124
  export { NotePencil };
125
125
  export { CircleNotch };
126
126
  export { PaintBucket };
127
+ export { SquaresFour };
128
+ export { CaretDoubleLeft };
129
+ export { TextIndent };
130
+ export { Share };
127
131
  export { OkeGoogleIcon };
128
132
  export { LetterH };
129
133
  export { IndexIcon };
@@ -313,6 +317,10 @@ import { PaperPlaneTilt } from 'phosphor-react';
313
317
  import { NotePencil } from 'phosphor-react';
314
318
  import { CircleNotch } from 'phosphor-react';
315
319
  import { PaintBucket } from 'phosphor-react';
320
+ import { SquaresFour } from 'phosphor-react';
321
+ import { CaretDoubleLeft } from 'phosphor-react';
322
+ import { TextIndent } from 'phosphor-react';
323
+ import { Share } from 'phosphor-react';
316
324
  import { OkeGoogleIcon } from "./custom";
317
325
  import { LetterH } from "./custom";
318
326
  import { IndexIcon } from "./custom";
@@ -129,6 +129,10 @@ exports.icons = {
129
129
  NotePencil: phosphor_react_1.NotePencil,
130
130
  CircleNotch: phosphor_react_1.CircleNotch,
131
131
  PaintBucket: phosphor_react_1.PaintBucket,
132
+ SquaresFour: phosphor_react_1.SquaresFour,
133
+ CaretDoubleLeft: phosphor_react_1.CaretDoubleLeft,
134
+ TextIndent: phosphor_react_1.TextIndent,
135
+ Share: phosphor_react_1.Share,
132
136
  //custom icons
133
137
  OkeGoogleIcon: custom_1.OkeGoogleIcon,
134
138
  LetterH: custom_1.LetterH,
package/dist/index.d.ts CHANGED
@@ -82,6 +82,8 @@ export { CheckboxInput } from "./v2/components/RadioAndCheckbox/comps/CheckboxLi
82
82
  export { CheckboxButton } from "./v2/components/RadioAndCheckbox/comps/CheckboxList/comps/CheckboxButton";
83
83
  export { RadioList } from "./v2/components/RadioAndCheckbox/comps/RadioList/index";
84
84
  export { SwitchSingle } from "./v2/components/Switches";
85
+ export { List } from "./v2/components/List";
86
+ export { ListItem } from "./v2/components/List/comps/ListItem";
85
87
  export { default as CustomTooltip } from "./v2/components/dataviz/BarChart/comps/CustomTooltip";
86
88
  export * as baseStyling from "./v2/themes/utils/baseStyling";
87
89
  export { LoaderCircle, ProgressBar, LoaderCircle as Loader, LoaderOverlay } from "./components/LoadersAndProgress";
package/dist/index.js CHANGED
@@ -40,7 +40,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
42
  exports.PDFInput = exports.AudioInput = exports.VideoInput = exports.ProfileImageInput = exports.ImageInput = exports.MetaBlock = exports.genTagComp = exports.generateOptions = exports.OptionsSingle = exports.DropdownMulti = exports.DropdownSingle = exports.parseCardConfig = exports.ListProfile = exports.CardProfile = exports.CardEmbed = exports.DateTimeRangePicker = exports.DateTimePicker = exports.TimeRangePicker = exports.TimePicker = exports.DateRangePicker = exports.DatePicker = exports.TextLoader = exports.PageScrollIndicator = exports.HomeCover = exports.EmptyStates = exports.ModalSmall = exports.Modal = exports.ModalForms = exports.ModalConfirm = exports.SkeletonLoader = exports.Divider = exports.PercentCompletedPie = exports.Accordion = exports.ActionMenu = exports.Tooltip = exports.OKELink = exports.UserRoleBadge = exports.Section = exports.SwitchDouble = exports.TagDisplay = exports.TagSelect = exports.TagLink = exports.TagClear = exports.LoaderOverlay = exports.Loader = exports.ProgressBar = exports.LoaderCircle = exports.icons = exports.colors = exports.GlobalStyles = void 0;
43
- exports.baseStyling = exports.CustomTooltip = exports.SwitchSingle = exports.RadioButton = exports.RadioInput = exports.RadioList = exports.CheckboxButton = exports.CheckboxInput = exports.CheckboxList = exports.AccordionV2 = exports.DataVizAccordion = exports.BarGraphCollection = exports.HeatMapGrid = exports.BarChart = exports.HomeCoverV2 = exports.DateRangePickerV2 = exports.MetaBlockV2 = exports.typoV2_CSS = exports.colors2 = exports.TabBarV2 = exports.ButtonGhostCompact = exports.ButtonTertiaryCompact = exports.ButtonSecondaryCompact = exports.ButtonPrimaryCompact = exports.ButtonGhostV2 = exports.ButtonTertiaryV2 = exports.ButtonSecondaryV2 = exports.ButtonPrimaryV2 = exports.TagClearV2 = exports.TagLinkV2 = exports.TagDisplayV2 = exports.DropdownMultiV2 = exports.DropdownSingleV2 = exports.HintsProvider = exports.TableCellResizerPlugin = exports.styledOKELinkCSS = exports.SimpleTable = exports.ModalConfirmAction = exports.BannerProvider = exports.useBannerContext = exports.BannerContext = exports.BannerInfo = exports.BannerAlert = exports.GroupQuestionsInputSingle = exports.ResourceInput = exports.IFrameInput = void 0;
43
+ exports.baseStyling = exports.CustomTooltip = exports.ListItem = exports.List = exports.SwitchSingle = exports.RadioButton = exports.RadioInput = exports.RadioList = exports.CheckboxButton = exports.CheckboxInput = exports.CheckboxList = exports.AccordionV2 = exports.DataVizAccordion = exports.BarGraphCollection = exports.HeatMapGrid = exports.BarChart = exports.HomeCoverV2 = exports.DateRangePickerV2 = exports.MetaBlockV2 = exports.typoV2_CSS = exports.colors2 = exports.TabBarV2 = exports.ButtonGhostCompact = exports.ButtonTertiaryCompact = exports.ButtonSecondaryCompact = exports.ButtonPrimaryCompact = exports.ButtonGhostV2 = exports.ButtonTertiaryV2 = exports.ButtonSecondaryV2 = exports.ButtonPrimaryV2 = exports.TagClearV2 = exports.TagLinkV2 = exports.TagDisplayV2 = exports.DropdownMultiV2 = exports.DropdownSingleV2 = exports.HintsProvider = exports.TableCellResizerPlugin = exports.styledOKELinkCSS = exports.SimpleTable = exports.ModalConfirmAction = exports.BannerProvider = exports.useBannerContext = exports.BannerContext = exports.BannerInfo = exports.BannerAlert = exports.GroupQuestionsInputSingle = exports.ResourceInput = exports.IFrameInput = void 0;
44
44
  //css and styling related ( styled-components )
45
45
  var globalStyles_1 = require("./globalStyles");
46
46
  Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return globalStyles_1.GlobalStyles; } });
@@ -260,6 +260,10 @@ var index_3 = require("./v2/components/RadioAndCheckbox/comps/RadioList/comps/Ra
260
260
  Object.defineProperty(exports, "RadioButton", { enumerable: true, get: function () { return index_3.RadioButton; } });
261
261
  var Switches_2 = require("./v2/components/Switches");
262
262
  Object.defineProperty(exports, "SwitchSingle", { enumerable: true, get: function () { return Switches_2.SwitchSingle; } });
263
+ var List_1 = require("./v2/components/List");
264
+ Object.defineProperty(exports, "List", { enumerable: true, get: function () { return List_1.List; } });
265
+ var ListItem_1 = require("./v2/components/List/comps/ListItem");
266
+ Object.defineProperty(exports, "ListItem", { enumerable: true, get: function () { return ListItem_1.ListItem; } });
263
267
  var CustomTooltip_1 = require("./v2/components/dataviz/BarChart/comps/CustomTooltip");
264
268
  Object.defineProperty(exports, "CustomTooltip", { enumerable: true, get: function () { return __importDefault(CustomTooltip_1).default; } });
265
269
  exports.baseStyling = __importStar(require("./v2/themes/utils/baseStyling"));
@@ -39,92 +39,159 @@ var BarChart = function (args) {
39
39
  var handleBarClick = function (name) {
40
40
  console.log("Bar clicked: ".concat(name));
41
41
  };
42
- return (react_1.default.createElement("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "20px" } },
43
- react_1.default.createElement("div", null,
42
+ return (react_1.default.createElement("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "20px", padding: '20px' } },
43
+ react_1.default.createElement("div", { style: { border: '1px solid black', padding: '10px' } },
44
44
  react_1.default.createElement(BarChart_1.BarChart, { showPercent: args.showPercent, data: [
45
45
  {
46
46
  display: "Logged In Once",
47
- // stack1: 60,
48
- stack2: 20,
49
- stack3: 40,
50
- stack4: 10,
51
- stack5: 40,
52
- stack6: 10,
47
+ stack1: 45, stack2: 23, stack3: 67, stack4: 12, stack5: 89,
48
+ stack6: 34, stack7: 56, stack8: 78, stack9: 21, stack10: 43,
49
+ stack11: 65, stack12: 87, stack13: 32, stack14: 54, stack15: 76,
50
+ stack16: 19, stack17: 41, stack18: 63, stack19: 85, stack20: 28,
53
51
  stack2Display: 'Labels Path Stack 2 Display'
54
52
  },
55
53
  {
56
54
  display: "Registered Users",
57
- stack1: 100,
58
- stack2: 50,
59
- stack3: 10,
60
- stack4: 15,
61
- stack5: 40,
62
- stack6: 10,
55
+ stack1: 92, stack3: 71, stack4: 25, stack5: 84,
56
+ stack6: 47, stack7: 69, stack8: 13, stack9: 56, stack10: 91,
57
+ stack11: 29, stack12: 73, stack13: 46, stack14: 82, stack15: 17,
58
+ stack16: 64, stack17: 39, stack18: 75, stack19: 22, stack20: 58
63
59
  },
64
60
  {
65
61
  display: "Created Profile",
66
- stack1: 20,
67
- stack2: 5,
68
- stack3: 10,
69
- stack4: 15,
70
- stack5: 40,
71
- stack6: 10,
62
+ stack1: 33, stack2: 77, stack3: 14, stack4: 59, stack5: 86,
63
+ stack6: 31, stack7: 68, stack8: 42, stack9: 95, stack10: 26,
64
+ stack11: 71, stack12: 48, stack13: 83, stack14: 16, stack15: 62,
65
+ stack16: 37, stack17: 74, stack18: 29, stack19: 85, stack20: 51
72
66
  },
73
67
  {
74
68
  display: "Wrote at least 3 story",
75
- stack1: 8,
76
- stack2: 2,
77
- stack3: 1,
78
- stack4: 1,
79
- stack5: 40,
80
- stack6: 10,
69
+ stack1: 18, stack2: 52, stack3: 79, stack4: 35, stack5: 61,
70
+ stack6: 93, stack7: 24, stack8: 67, stack9: 41, stack10: 88,
71
+ stack11: 15, stack12: 53, stack13: 76, stack14: 32, stack15: 68,
72
+ stack16: 94, stack17: 27, stack18: 49, stack19: 81, stack20: 36
81
73
  },
82
74
  {
83
75
  display: "Created Profile again",
84
- stack1: 20,
85
- stack2: 5,
86
- stack3: 10,
87
- stack4: 15,
88
- stack5: 40,
89
- stack6: 10,
76
+ stack1: 44, stack2: 87, stack3: 21, stack4: 63, stack5: 96,
77
+ stack6: 38, stack7: 72, stack8: 55, stack9: 19, stack10: 81,
78
+ stack11: 46, stack12: 92, stack13: 28, stack14: 65, stack15: 37,
79
+ stack16: 74, stack17: 51, stack18: 83, stack19: 26, stack20: 69
90
80
  },
91
81
  {
92
82
  display: "Wrote at least 1 story",
93
- stack1: 8,
94
- stack2: 2,
95
- stack3: 1,
96
- stack4: 1,
97
- stack5: 40,
98
- stack6: 10,
83
+ stack1: 57, stack2: 23, stack3: 89, stack4: 41, stack5: 76,
84
+ stack6: 12, stack7: 64, stack8: 98, stack9: 33, stack10: 78,
85
+ stack11: 55, stack12: 17, stack13: 91, stack14: 48, stack15: 82,
86
+ stack16: 26, stack17: 69, stack18: 43, stack19: 95, stack20: 31
87
+ }
88
+ ], plotDataPoint: "percentage", valuePath: [
89
+ "stack1", "stack2", "stack3", "stack4", "stack5",
90
+ // "stack6", "stack7", "stack8", "stack9", "stack10",
91
+ // "stack11", "stack12", "stack13", "stack14", "stack15",
92
+ // "stack16", "stack17", "stack18", "stack19", "stack20"
93
+ ], breakdownCategoryName: "Age of org.", tooltipLabelsMapping: {
94
+ stack1: 'Stack 1', stack2: 'Stack 2', stack3: 'Stack 3', stack4: 'Stack 4', stack5: 'Stack 5',
95
+ stack6: 'Stack 6', stack7: 'Stack 7', stack8: 'Stack 8', stack9: 'Stack 9', stack10: 'Stack 10',
96
+ stack11: 'Stack 11', stack12: 'Stack 12', stack13: 'Stack 13', stack14: 'Stack 14', stack15: 'Stack 15',
97
+ stack16: 'Stack 16', stack17: 'Stack 17', stack18: 'Stack 18', stack19: 'Stack 19', stack20: 'Stack 20'
98
+ }, labelPath: "display", title: "This is a Stacked BarChart with 20 Stacks", onClick: handleBarClick, colorIdx: 2 })),
99
+ react_1.default.createElement("div", { style: { border: '1px solid black', padding: '10px' } },
100
+ react_1.default.createElement(BarChart_1.BarChart, { data: [
101
+ {
102
+ display: "Logged In Once During the First Week of Registration and Completed the Basic Profile Section Without Abandoning the Process",
103
+ stack1: 60
104
+ },
105
+ {
106
+ display: "Registered Users Who Successfully Verified Their Email Address and Set Up Two-Factor Authentication for Enhanced Account Security",
107
+ stack1: 100
108
+ },
109
+ {
110
+ display: "Created Profile With All Recommended Fields Including Biography, Education History, Work Experience, and Personal Interests",
111
+ stack1: 20
112
+ },
113
+ {
114
+ display: "Wrote at least 3 stories With Over 2,000 Words Each and Received More Than 50 Positive Engagements from Other Community Members",
115
+ stack1: 8
116
+ },
117
+ {
118
+ display: "Created Profile again After Deleting Their Previous One Due to Privacy Concerns or Desire to Start Fresh with New Information",
119
+ stack1: 20
120
+ },
121
+ {
122
+ display: "Wrote at least 1 story That Was Featured on the Homepage and Remained in the Top Trending Section for More Than 48 Hours",
123
+ stack1: 8
124
+ },
125
+ {
126
+ display: "Completed Onboarding Including All Optional Tutorials and Achieved a Perfect Score on the Platform Knowledge Assessment Test",
127
+ stack1: 78
128
+ },
129
+ {
130
+ display: "Added Payment Method and Set Up Recurring Billing for Premium Subscription Without Encountering Any Technical Issues During Checkout",
131
+ stack1: 42
132
+ },
133
+ {
134
+ display: "Made First Purchase Within 24 Hours of Creating Their Account and Left a Five-Star Review for the Product or Service",
135
+ stack1: 35
136
+ },
137
+ {
138
+ display: "Referred a Friend Through the Official Referral Program and Both Received the Maximum Possible Bonus Credits as a Result",
139
+ stack1: 27
140
+ },
141
+ {
142
+ display: "Participated in the Annual User Satisfaction Survey and Provided Detailed Feedback on Potential Platform Improvements",
143
+ stack1: 54
144
+ },
145
+ {
146
+ display: "Downloaded the Mobile Application on Multiple Devices and Enabled Cross-Platform Synchronization for Seamless User Experience",
147
+ stack1: 89
148
+ },
149
+ {
150
+ display: "Configured Advanced Notification Preferences to Receive Real-Time Alerts for Specific Activities Relevant to Their Interests",
151
+ stack1: 31
152
+ },
153
+ {
154
+ display: "Successfully Recovered Account After Forgetting Password by Following the Secure Password Reset Protocol Without Support Assistance",
155
+ stack1: 46
99
156
  },
157
+ {
158
+ display: "Achieved Gold Tier Status in the Loyalty Program by Consistently Engaging with the Platform for More Than Six Consecutive Months",
159
+ stack1: 15
160
+ },
161
+ {
162
+ display: "Converted From Free Trial to Paid Subscription Before the Trial Period Ended and Opted for the Annual Payment Plan with Auto-Renewal",
163
+ stack1: 67
164
+ },
165
+ {
166
+ display: "Customized Their Dashboard Layout to Optimize Workflow Efficiency Based on Their Unique Usage Patterns and Preferences",
167
+ stack1: 72
168
+ },
169
+ {
170
+ display: "Signed Up for Beta Testing Program and Provided Valuable Feedback on Experimental Features Before General Public Release",
171
+ stack1: 19
172
+ },
173
+ {
174
+ display: "Linked All Available Social Media Accounts to Enable Cross-Platform Sharing and Enhanced Social Networking Capabilities",
175
+ stack1: 38
176
+ },
177
+ {
178
+ display: "Reported a Critical Bug That Was Subsequently Fixed in the Next Software Update and Received Official Recognition for the Contribution",
179
+ stack1: 5
180
+ }
100
181
  ], plotDataPoint: "percentage" // This can be changed to count
101
- , valuePath: [
102
- "stack1",
103
- "stack2",
104
- "stack3",
105
- "stack4",
106
- "stack5",
107
- "stack6",
108
- ], tooltipLabelsMapping: {
109
- stack1: 'Stack 1',
110
- stack2: 'Stack 2',
111
- stack3: 'Stack 3',
112
- stack4: 'Stack 4',
113
- stack5: 'Stack 5',
114
- stack6: 'Stack 6',
115
- },
116
- // valuePath="stack1"
117
- labelPath: "display", title: "This is a Stacked BarChart", onClick: handleBarClick, colorIdx: 2 }),
118
- react_1.default.createElement(BarGraphCollection_1.BarGraphCollection, { showPercent: args.showPercent, showCount: args.showCount, data: [
182
+ ,
183
+ // valuePath={["stack1", "stack2", "stack3", "stack4", "stack5", "stack6"]}
184
+ valuePath: "stack1", labelPath: "display", title: "This is a Stacked BarChart", onClick: handleBarClick, showPercent: args.showPercent, colorIdx: 2 })),
185
+ react_1.default.createElement("div", { style: { border: '1px solid black', padding: '10px' } },
186
+ react_1.default.createElement(BarChart_1.BarChart, { data: [
119
187
  {
120
188
  display: "Logged In Once",
121
- // stack1: 60,
189
+ stack1: 60,
122
190
  stack2: 20,
123
191
  stack3: 40,
124
192
  stack4: 10,
125
193
  stack5: 40,
126
194
  stack6: 10,
127
- stack2Display: 'Labels Path Stack 2 Display'
128
195
  },
129
196
  {
130
197
  display: "Registered Users",
@@ -180,168 +247,7 @@ var BarChart = function (args) {
180
247
  "stack5",
181
248
  "stack6",
182
249
  ],
183
- // tooltipLabelsMapping={{
184
- // stack1: 'Stack 1',
185
- // stack2: 'Stack 2',
186
- // stack3: 'Stack 3',
187
- // stack4: 'Stack 4',
188
- // stack5: 'Stack 5',
189
- // stack6: 'Stack 6',
190
- // }}
191
250
  // valuePath="stack1"
192
- labelPath: "display", title: "This is a Stacked BarChart", onClick: handleBarClick, colorIdx: 2 })),
193
- react_1.default.createElement("div", null,
194
- react_1.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "40px" } },
195
- react_1.default.createElement(BarChart_1.BarChart, { data: [
196
- {
197
- display: "Logged In Once During the First Week of Registration and Completed the Basic Profile Section Without Abandoning the Process",
198
- stack1: 60
199
- },
200
- {
201
- display: "Registered Users Who Successfully Verified Their Email Address and Set Up Two-Factor Authentication for Enhanced Account Security",
202
- stack1: 100
203
- },
204
- {
205
- display: "Created Profile With All Recommended Fields Including Biography, Education History, Work Experience, and Personal Interests",
206
- stack1: 20
207
- },
208
- {
209
- display: "Wrote at least 3 stories With Over 2,000 Words Each and Received More Than 50 Positive Engagements from Other Community Members",
210
- stack1: 8
211
- },
212
- {
213
- display: "Created Profile again After Deleting Their Previous One Due to Privacy Concerns or Desire to Start Fresh with New Information",
214
- stack1: 20
215
- },
216
- {
217
- display: "Wrote at least 1 story That Was Featured on the Homepage and Remained in the Top Trending Section for More Than 48 Hours",
218
- stack1: 8
219
- },
220
- {
221
- display: "Completed Onboarding Including All Optional Tutorials and Achieved a Perfect Score on the Platform Knowledge Assessment Test",
222
- stack1: 78
223
- },
224
- {
225
- display: "Added Payment Method and Set Up Recurring Billing for Premium Subscription Without Encountering Any Technical Issues During Checkout",
226
- stack1: 42
227
- },
228
- {
229
- display: "Made First Purchase Within 24 Hours of Creating Their Account and Left a Five-Star Review for the Product or Service",
230
- stack1: 35
231
- },
232
- {
233
- display: "Referred a Friend Through the Official Referral Program and Both Received the Maximum Possible Bonus Credits as a Result",
234
- stack1: 27
235
- },
236
- {
237
- display: "Participated in the Annual User Satisfaction Survey and Provided Detailed Feedback on Potential Platform Improvements",
238
- stack1: 54
239
- },
240
- {
241
- display: "Downloaded the Mobile Application on Multiple Devices and Enabled Cross-Platform Synchronization for Seamless User Experience",
242
- stack1: 89
243
- },
244
- {
245
- display: "Configured Advanced Notification Preferences to Receive Real-Time Alerts for Specific Activities Relevant to Their Interests",
246
- stack1: 31
247
- },
248
- {
249
- display: "Successfully Recovered Account After Forgetting Password by Following the Secure Password Reset Protocol Without Support Assistance",
250
- stack1: 46
251
- },
252
- {
253
- display: "Achieved Gold Tier Status in the Loyalty Program by Consistently Engaging with the Platform for More Than Six Consecutive Months",
254
- stack1: 15
255
- },
256
- {
257
- display: "Converted From Free Trial to Paid Subscription Before the Trial Period Ended and Opted for the Annual Payment Plan with Auto-Renewal",
258
- stack1: 67
259
- },
260
- {
261
- display: "Customized Their Dashboard Layout to Optimize Workflow Efficiency Based on Their Unique Usage Patterns and Preferences",
262
- stack1: 72
263
- },
264
- {
265
- display: "Signed Up for Beta Testing Program and Provided Valuable Feedback on Experimental Features Before General Public Release",
266
- stack1: 19
267
- },
268
- {
269
- display: "Linked All Available Social Media Accounts to Enable Cross-Platform Sharing and Enhanced Social Networking Capabilities",
270
- stack1: 38
271
- },
272
- {
273
- display: "Reported a Critical Bug That Was Subsequently Fixed in the Next Software Update and Received Official Recognition for the Contribution",
274
- stack1: 5
275
- }
276
- ], plotDataPoint: "percentage" // This can be changed to count
277
- ,
278
- // valuePath={["stack1", "stack2", "stack3", "stack4", "stack5", "stack6"]}
279
- valuePath: "stack1", labelPath: "display", title: "This is a Stacked BarChart", onClick: handleBarClick, showPercent: args.showPercent, colorIdx: 2 }),
280
- react_1.default.createElement(BarChart_1.BarChart, { data: [
281
- {
282
- display: "Logged In Once",
283
- stack1: 60,
284
- stack2: 20,
285
- stack3: 40,
286
- stack4: 10,
287
- stack5: 40,
288
- stack6: 10,
289
- },
290
- {
291
- display: "Registered Users",
292
- stack1: 100,
293
- stack2: 50,
294
- stack3: 10,
295
- stack4: 15,
296
- stack5: 40,
297
- stack6: 10,
298
- },
299
- {
300
- display: "Created Profile",
301
- stack1: 20,
302
- stack2: 5,
303
- stack3: 10,
304
- stack4: 15,
305
- stack5: 40,
306
- stack6: 10,
307
- },
308
- {
309
- display: "Wrote at least 3 story",
310
- stack1: 8,
311
- stack2: 2,
312
- stack3: 1,
313
- stack4: 1,
314
- stack5: 40,
315
- stack6: 10,
316
- },
317
- {
318
- display: "Created Profile again",
319
- stack1: 20,
320
- stack2: 5,
321
- stack3: 10,
322
- stack4: 15,
323
- stack5: 40,
324
- stack6: 10,
325
- },
326
- {
327
- display: "Wrote at least 1 story",
328
- stack1: 8,
329
- stack2: 2,
330
- stack3: 1,
331
- stack4: 1,
332
- stack5: 40,
333
- stack6: 10,
334
- },
335
- ], plotDataPoint: "percentage" // This can be changed to count
336
- , valuePath: [
337
- "stack1",
338
- "stack2",
339
- "stack3",
340
- "stack4",
341
- "stack5",
342
- "stack6",
343
- ],
344
- // valuePath="stack1"
345
- breakdownDisplayType: "stacked", labelPath: "display", title: "This is a Stacked BarChart", onClick: handleBarClick, showPercent: args.showPercent, colorIdx: 2 })))));
251
+ breakdownDisplayType: "stacked", labelPath: "display", title: "This is a Stacked BarChart", onClick: handleBarClick, showPercent: args.showPercent, colorIdx: 2 }))));
346
252
  };
347
253
  exports.BarChart = BarChart;
@@ -185,7 +185,7 @@ var List_ = function (args) {
185
185
  };
186
186
  return (React.createElement(__1.Container, { style: { background: "#eff" } },
187
187
  React.createElement(__1.PaddingTop40, null),
188
- React.createElement(List_1.List, { options: filteredOptions, value: selectedValue, focussedOp: focussedOption, scrollFocussedOpIntoView: scrollFocussedOpIntoView, handleSelect: handleSelect, isSearchable: args.isSearchable, searchbarPlaceholder: args.searchbarPlaceholder, searchBarFocus: searchBarFocus, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus, grouped: args.grouped, isMulti: args.isMulti, isTagsStyle: args.isTagsStyle, invert: args.invert, disableShadow: args.disableShadow, enableBorder: args.enableBorder }),
188
+ React.createElement(List_1.List, { options: filteredOptions, value: selectedValue, focussedOp: focussedOption, scrollFocussedOpIntoView: scrollFocussedOpIntoView, handleSelect: handleSelect, grouped: args.grouped, isMulti: args.isMulti, isTagsStyle: args.isTagsStyle, invert: args.invert, disableShadow: args.disableShadow, enableBorder: args.enableBorder, isSearchable: args.isSearchable, searchbarPlaceholder: args.searchbarPlaceholder, searchBarFocus: searchBarFocus, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus }),
189
189
  React.createElement(__1.PaddingBottom40, null)));
190
190
  };
191
191
  exports.List_ = List_;
@@ -2,6 +2,7 @@ export interface BaseBarChartUIConfigs {
2
2
  barHeight: number;
3
3
  labelToBarGap: number;
4
4
  labelHeight: number;
5
+ gapBetweenTwoLabels: number;
5
6
  labelToNextBarGap: number;
6
7
  barRadius: number;
7
8
  gapBetweenBarSections: number;
@@ -11,6 +11,7 @@ exports._base_barchart_ui_configs = {
11
11
  barHeight: 10,
12
12
  labelToBarGap: 6,
13
13
  labelHeight: 16.5667,
14
+ gapBetweenTwoLabels: 2,
14
15
  labelToNextBarGap: 14,
15
16
  //other bar section related properties
16
17
  barRadius: 2,
@@ -4,6 +4,8 @@ import { CountVizLabels } from "../../../types";
4
4
  interface CustomTooltipProps extends TooltipProps<number, string> {
5
5
  value?: CountVizLabels[];
6
6
  showPercent?: boolean;
7
+ activeBar?: string;
8
+ breakdownCategoryName?: string;
7
9
  mousePosition?: {
8
10
  x: number;
9
11
  y: number;
@@ -53,12 +53,15 @@ var react_1 = __importStar(require("react"));
53
53
  var styled_components_1 = __importDefault(require("styled-components"));
54
54
  var __1 = require("../../../../../..");
55
55
  var Typo2_1 = require("../../../../Typo2");
56
+ var LegendTooltipGlyph_1 = require("../LegendTooltipGlyph");
56
57
  var UI_CAPTION_DF_WITH_LINE_CLAMP = (0, styled_components_1.default)(Typo2_1.UI_CAPTION_DF)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n \n ", "\n"], ["\n \n ", "\n"])), function (_a) {
57
58
  var clampT = _a.clampT;
58
59
  return clampT ? (0, __1.clampText)(3) : '';
59
60
  });
60
61
  var CustomTooltip = function (props) {
61
- var active = props.active, value = props.value, showPercent = props.showPercent, mousePosition = props.mousePosition;
62
+ var _a;
63
+ var value = props.value, showPercent = props.showPercent, mousePosition = props.mousePosition, activeBar = props.activeBar, breakdownCategoryName = props.breakdownCategoryName;
64
+ var isActive = activeBar && ((_a = value === null || value === void 0 ? void 0 : value[0]) === null || _a === void 0 ? void 0 : _a.name) === activeBar;
62
65
  var tooltipWrapperRef = (0, react_1.useRef)(null);
63
66
  var calcTooltipTop = function (_a) {
64
67
  var _b, _c;
@@ -96,8 +99,8 @@ var CustomTooltip = function (props) {
96
99
  // pointerEvents: "none", // Add this to prevent tooltip from interfering with mouse events
97
100
  };
98
101
  var tooltipLabelLengthRefs = (0, react_1.useRef)([]);
99
- var _a = (0, react_1.useState)([]), rowHeights = _a[0], setRowHeights = _a[1];
100
- var _b = (0, react_1.useState)((value === null || value === void 0 ? void 0 : value.map(function (v) { return true; })) || []), tooltipTextClampStates = _b[0], setTooltipTextClampStates = _b[1];
102
+ var _b = (0, react_1.useState)([]), rowHeights = _b[0], setRowHeights = _b[1];
103
+ var _c = (0, react_1.useState)((value === null || value === void 0 ? void 0 : value.map(function (v) { return true; })) || []), tooltipTextClampStates = _c[0], setTooltipTextClampStates = _c[1];
101
104
  (0, react_1.useEffect)(function () {
102
105
  if (!tooltipTextClampStates) {
103
106
  setTooltipTextClampStates(value === null || value === void 0 ? void 0 : value.map(function (v) { return true; }));
@@ -113,28 +116,24 @@ var CustomTooltip = function (props) {
113
116
  });
114
117
  setRowHeights(rowHeightsToSet);
115
118
  }, [tooltipTextClampStates.join()]);
116
- if (!active)
119
+ if (!isActive)
117
120
  return null;
118
121
  return (react_1.default.createElement(react_1.Fragment, null,
119
122
  react_1.default.createElement("div", { ref: tooltipWrapperRef, style: style },
123
+ breakdownCategoryName && react_1.default.createElement(Typo2_1.UI_CAPTION_BOLD_DF, null, breakdownCategoryName),
120
124
  react_1.default.createElement("div", { style: {
121
125
  display: "grid",
122
126
  gridTemplateColumns: showPercent ? "auto auto auto" : "auto auto",
123
127
  gap: "0.6rem",
124
128
  } },
125
- react_1.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" } }, value.map(function (entry, index) { return (react_1.default.createElement("div", { style: { height: rowHeights[index] ? rowHeights[index] + "px" : "auto" } },
129
+ react_1.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" } }, value.map(function (entry, index) { return (react_1.default.createElement("div", { key: index, style: { height: rowHeights[index] ? rowHeights[index] + "px" : "auto" } },
126
130
  react_1.default.createElement("div", { style: {
127
131
  display: "flex",
128
132
  alignItems: "center",
129
133
  gap: "0.6rem",
130
134
  } },
131
- react_1.default.createElement("div", { key: index, style: {
132
- width: "1.2rem",
133
- height: "1.2rem",
134
- borderRadius: "50%",
135
- backgroundColor: entry.color,
136
- } }),
137
- react_1.default.createElement(Typo2_1.UI_CAPTION_BOLD_DF, { key: index }, showPercent ? entry.percentage + "%" : entry.count || "0")))); })),
135
+ react_1.default.createElement(LegendTooltipGlyph_1.LegendTooltipGlyph, { color: entry.barColor }),
136
+ react_1.default.createElement(Typo2_1.UI_CAPTION_BOLD_DF, null, showPercent ? entry.percentage + "%" : entry.count || "0")))); })),
138
137
  showPercent && (react_1.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" } }, value.map(function (entry, index) { return (react_1.default.createElement("div", { style: {
139
138
  height: rowHeights[index]
140
139
  ? rowHeights[index] + "px"
@@ -16,12 +16,14 @@ interface CustomizedLabelProps {
16
16
  _base_barchart_ui_configs: BaseBarChartUIConfigs;
17
17
  _debug_controls: DebugControls;
18
18
  TOT_HEIGHT_SINGLE_BAR_SECTION: number;
19
+ TOT_HEIGHT_STACKED_BAR_SECTION: number;
19
20
  TOT_HEIGHT_GROUPED_BAR_SECTION: number;
20
21
  CALC_SINGLE_BAR_SECTION_Y_POS: (index: number) => number;
22
+ CALC_STACKED_BAR_SECTION_Y_POS: (index: number) => number;
21
23
  showSumOfBreakdownValues?: boolean;
22
24
  onMouseOver?: (e: React.MouseEvent<SVGRectElement, MouseEvent>, v: CustomizedLabelValue) => void;
23
25
  onMouseOut?: (e: React.MouseEvent<SVGRectElement, MouseEvent>, v: CustomizedLabelValue) => void;
24
26
  onMouseDown?: (e: React.MouseEvent<SVGRectElement, MouseEvent>, v: CustomizedLabelValue) => void;
25
27
  }
26
- export declare const CustomizedLabel: ({ y, width, height, value, showPercent, showCount, opacity, _base_barchart_ui_configs, _debug_controls, onMouseOver, onMouseOut, onMouseDown, activeBar, TOT_HEIGHT_SINGLE_BAR_SECTION, TOT_HEIGHT_GROUPED_BAR_SECTION, CALC_SINGLE_BAR_SECTION_Y_POS, breakdownDisplayType, showSumOfBreakdownValues }: CustomizedLabelProps) => React.JSX.Element;
28
+ export declare const CustomizedLabel: ({ y, width, height, value, showPercent, showCount, opacity, _base_barchart_ui_configs, _debug_controls, onMouseOver, onMouseOut, onMouseDown, activeBar, TOT_HEIGHT_SINGLE_BAR_SECTION, TOT_HEIGHT_STACKED_BAR_SECTION, TOT_HEIGHT_GROUPED_BAR_SECTION, CALC_SINGLE_BAR_SECTION_Y_POS, CALC_STACKED_BAR_SECTION_Y_POS, breakdownDisplayType, showSumOfBreakdownValues, }: CustomizedLabelProps) => React.JSX.Element;
27
29
  export {};