impaktapps-ui-builder 1.0.257 → 1.0.260

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.
@@ -6256,6 +6256,7 @@ const ComponentSchema = {
6256
6256
  { title: "Rank", const: "Rank" },
6257
6257
  { title: "Rank Card", const: "RankCard" },
6258
6258
  { title: "Metric Card", const: "MetricCard" },
6259
+ { title: "Info Card", const: "InfoCard" },
6259
6260
  { title: "Runner Boy", const: "RunnerBoyProgressBar" },
6260
6261
  { title: "Table", const: "Table" },
6261
6262
  { title: "Tabs", const: "TabSection" },
@@ -8139,6 +8140,20 @@ const buildPropertiesSection = function(type) {
8139
8140
  emptyBox$1("MetricEmpty1", { xs: 6, sm: 0, md: 8, lg: 6 })
8140
8141
  ];
8141
8142
  break;
8143
+ case "InfoCard":
8144
+ uiSchema.elements = [
8145
+ getInputField("title", "Title"),
8146
+ getInputField("url", "Image Url"),
8147
+ getInputField("labelOne", "Label One"),
8148
+ getInputField("valueOne", "valueOne"),
8149
+ getInputField("labelTwo", "Label Two"),
8150
+ getInputField("valueTwo", "valueTwo"),
8151
+ getInputField("primaryTextColor", "Label Color"),
8152
+ getInputField("secondaryTextColor", "Value Color"),
8153
+ getInputField("chipBackgroundColor", "Title Background Color"),
8154
+ emptyBox$1("cardEmpty", { xs: 0, sm: 0, md: 8, lg: 8 })
8155
+ ];
8156
+ break;
8142
8157
  case "Button":
8143
8158
  uiSchema.elements = [
8144
8159
  getSelectField("buttonType", "Button Type"),
@@ -8828,6 +8843,7 @@ const sectionLabels = {
8828
8843
  ProgressBar: ["Core", "Properties", "Events", "Style"],
8829
8844
  RankCard: ["Core", "Properties", "Events", "Style"],
8830
8845
  MetricCard: ["Core", "Properties", "Events", "Style", "Validation"],
8846
+ InfoCard: ["Core", "Properties", "Events", "Style", "Validation"],
8831
8847
  Slider: ["Core", "Components", "Events", "Style", "Validation"],
8832
8848
  Timer: ["Core", "Events", "Style"],
8833
8849
  Rank: ["Core", "Events", "Style"],
@@ -13120,6 +13136,394 @@ const buildOTP_Input = (config2, componentScope2) => {
13120
13136
  OTP.config.main.length = +config2.length;
13121
13137
  return OTP;
13122
13138
  };
13139
+ function InfoCard(theme) {
13140
+ const uiSchema = {
13141
+ type: "WrapperLayout",
13142
+ config: {
13143
+ main: {},
13144
+ style: {
13145
+ wrapperStyle: {
13146
+ position: "relative",
13147
+ top: "50%",
13148
+ transform: "translateY(-50%)",
13149
+ marginBottom: 0,
13150
+ borderRadius: "12px",
13151
+ fontFamily: "Poppins"
13152
+ },
13153
+ componentsBoxStyle: {
13154
+ flexDirection: "column",
13155
+ overflow: "hidden",
13156
+ flexWrap: "nowrap",
13157
+ width: "100% !important",
13158
+ background: theme.palette.background.paper,
13159
+ borderRadius: "12px",
13160
+ border: `1.5px solid ${theme.palette.divider}`,
13161
+ padding: "24px 24px 24px 24px",
13162
+ height: "100%",
13163
+ minHeight: "140px",
13164
+ position: "relative",
13165
+ gap: "0px !important",
13166
+ transition: "box-shadow 0.25s ease, transform 0.25s ease",
13167
+ "&:hover": {
13168
+ boxShadow: "0 8px 28px 0 rgba(100, 100, 120, 0.18)",
13169
+ transform: "translateY(-3px)"
13170
+ }
13171
+ }
13172
+ },
13173
+ layout: { xs: 12, sm: 12, md: 3, lg: 3 }
13174
+ },
13175
+ elements: [
13176
+ {
13177
+ type: "Control",
13178
+ scope: "#/properties/initilCardScope",
13179
+ config: {
13180
+ main: { heading: "Title" },
13181
+ style: {
13182
+ color: `${theme.palette.primary.main}`,
13183
+ fontSize: "11px",
13184
+ fontWeight: 600,
13185
+ fontFamily: "Poppins",
13186
+ letterSpacing: "0.6px",
13187
+ background: `${theme.palette.primary.main}18`,
13188
+ borderRadius: "20px",
13189
+ padding: "4px 14px",
13190
+ display: "inline-flex",
13191
+ alignItems: "center",
13192
+ width: "fit-content",
13193
+ alignSelf: "flex-start",
13194
+ position: "absolute",
13195
+ top: "24px",
13196
+ left: "20px",
13197
+ whiteSpace: "nowrap"
13198
+ }
13199
+ },
13200
+ options: { widget: "Box" }
13201
+ },
13202
+ {
13203
+ type: "Control",
13204
+ scope: "#/properties/initilCardScope",
13205
+ config: {
13206
+ main: { url: "https://www.svgrepo.com/show/500606/loading.svg" },
13207
+ style: {
13208
+ containerStyle: {
13209
+ position: "absolute",
13210
+ top: "24px",
13211
+ right: "22px",
13212
+ display: "flex",
13213
+ justifyContent: "flex-end",
13214
+ alignItems: "flex-start"
13215
+ },
13216
+ imageStyle: {
13217
+ width: "27px",
13218
+ height: "27px"
13219
+ }
13220
+ }
13221
+ },
13222
+ options: { widget: "Image" }
13223
+ },
13224
+ {
13225
+ type: "Control",
13226
+ scope: "#/properties/initilCardScope",
13227
+ config: {
13228
+ main: { heading: "" },
13229
+ style: {
13230
+ display: "block",
13231
+ height: "48px",
13232
+ width: "100%",
13233
+ background: "transparent",
13234
+ padding: "0px",
13235
+ margin: "0px"
13236
+ }
13237
+ },
13238
+ options: { widget: "Box" }
13239
+ },
13240
+ {
13241
+ type: "WrapperLayout",
13242
+ config: {
13243
+ main: { rowSpacing: 0, columnSpacingSpacing: 0, spacing: 0, gap: 0 },
13244
+ style: {
13245
+ componentsBoxStyle: {
13246
+ flexDirection: "row",
13247
+ alignItems: "center",
13248
+ flexWrap: "nowrap",
13249
+ gap: "4px",
13250
+ padding: "0px",
13251
+ marginTop: "-10px",
13252
+ margin: "0px",
13253
+ marginBottom: "6px",
13254
+ background: "transparent",
13255
+ boxShadow: "none",
13256
+ width: "0",
13257
+ minHeight: "unset"
13258
+ }
13259
+ },
13260
+ layout: { xs: 12, sm: 12, md: 12, lg: 12 }
13261
+ },
13262
+ elements: [
13263
+ {
13264
+ type: "Control",
13265
+ scope: "#/properties/initilCardScope",
13266
+ config: {
13267
+ layout: "auto",
13268
+ main: { heading: "\u2022" },
13269
+ style: {
13270
+ color: theme.palette.text.secondary,
13271
+ fontSize: "22px",
13272
+ fontWeight: 600,
13273
+ fontFamily: "Poppins",
13274
+ letterSpacing: "0px",
13275
+ background: "transparent",
13276
+ padding: "0px",
13277
+ margin: "0px",
13278
+ width: "fit-content",
13279
+ flexShrink: 0,
13280
+ display: "flex",
13281
+ alignItems: "center",
13282
+ lineHeight: "1",
13283
+ paddingBottom: "2px"
13284
+ }
13285
+ },
13286
+ options: { widget: "Box" }
13287
+ },
13288
+ {
13289
+ type: "Control",
13290
+ scope: "#/properties/initilCardScope",
13291
+ config: {
13292
+ layout: "auto",
13293
+ main: { heading: "Label One" },
13294
+ style: {
13295
+ color: theme.palette.text.secondary,
13296
+ fontSize: "11px",
13297
+ fontWeight: 600,
13298
+ fontFamily: "Poppins",
13299
+ letterSpacing: "0.6px",
13300
+ background: "transparent",
13301
+ padding: "0px",
13302
+ margin: "0px",
13303
+ width: "fit-content",
13304
+ display: "flex",
13305
+ alignItems: "center",
13306
+ lineHeight: "1.4"
13307
+ }
13308
+ },
13309
+ options: { widget: "Box" }
13310
+ }
13311
+ ]
13312
+ },
13313
+ {
13314
+ type: "Control",
13315
+ scope: "#/properties/initilCardScope",
13316
+ config: {
13317
+ main: { heading: "--" },
13318
+ style: {
13319
+ color: `${theme.palette.primary.main}`,
13320
+ fontSize: { xs: "28px", md: "32px" },
13321
+ fontWeight: 700,
13322
+ fontFamily: "Poppins",
13323
+ lineHeight: "1.15",
13324
+ margin: "0px",
13325
+ marginBottom: "16px",
13326
+ padding: "0px",
13327
+ background: "transparent",
13328
+ display: "flex",
13329
+ maxWidth: "220px",
13330
+ whiteSpace: "nowrap",
13331
+ overflowX: "auto",
13332
+ scrollbarWidth: "none",
13333
+ "&::-webkit-scrollbar": { display: "none" }
13334
+ }
13335
+ },
13336
+ options: { widget: "Box" }
13337
+ },
13338
+ {
13339
+ type: "WrapperLayout",
13340
+ config: {
13341
+ main: { rowSpacing: 0, columnSpacingSpacing: 0, spacing: 0, gap: 0 },
13342
+ style: {
13343
+ componentsBoxStyle: {
13344
+ flexDirection: "row",
13345
+ alignItems: "center",
13346
+ flexWrap: "nowrap",
13347
+ gap: "4px",
13348
+ padding: "0px",
13349
+ margin: "0px",
13350
+ marginBottom: "6px",
13351
+ background: "transparent",
13352
+ boxShadow: "none",
13353
+ width: "0%",
13354
+ minHeight: "unset"
13355
+ }
13356
+ },
13357
+ layout: { xs: 12, sm: 12, md: 12, lg: 12 }
13358
+ },
13359
+ elements: [
13360
+ {
13361
+ type: "Control",
13362
+ scope: "#/properties/initilCardScope",
13363
+ config: {
13364
+ layout: "auto",
13365
+ main: { heading: "\u2022" },
13366
+ style: {
13367
+ color: theme.palette.text.secondary,
13368
+ fontSize: "22px",
13369
+ fontWeight: 600,
13370
+ fontFamily: "Poppins",
13371
+ letterSpacing: "0px",
13372
+ background: "transparent",
13373
+ padding: "0px",
13374
+ margin: "0px",
13375
+ width: "fit-content",
13376
+ flexShrink: 0,
13377
+ display: "flex",
13378
+ alignItems: "center",
13379
+ lineHeight: "1",
13380
+ paddingBottom: "2px"
13381
+ }
13382
+ },
13383
+ options: { widget: "Box" }
13384
+ },
13385
+ {
13386
+ type: "Control",
13387
+ scope: "#/properties/initilCardScope",
13388
+ config: {
13389
+ layout: "auto",
13390
+ main: { heading: "Label Two" },
13391
+ style: {
13392
+ color: theme.palette.text.secondary,
13393
+ fontSize: "11px",
13394
+ fontWeight: 600,
13395
+ fontFamily: "Poppins",
13396
+ letterSpacing: "0.6px",
13397
+ background: "transparent",
13398
+ padding: "0px",
13399
+ margin: "0px",
13400
+ width: "fit-content",
13401
+ display: "flex",
13402
+ alignItems: "center",
13403
+ lineHeight: "1.4"
13404
+ }
13405
+ },
13406
+ options: { widget: "Box" }
13407
+ }
13408
+ ]
13409
+ },
13410
+ {
13411
+ type: "Control",
13412
+ scope: "#/properties/initilCardScope",
13413
+ config: {
13414
+ main: { heading: "--" },
13415
+ style: {
13416
+ color: `${theme.palette.primary.main}`,
13417
+ fontSize: { xs: "20px", md: "22px" },
13418
+ fontWeight: 500,
13419
+ fontFamily: "Poppins",
13420
+ lineHeight: "1.15",
13421
+ margin: "0px",
13422
+ padding: "0px",
13423
+ background: "transparent",
13424
+ display: "flex",
13425
+ maxWidth: "220px",
13426
+ whiteSpace: "nowrap",
13427
+ overflowX: "auto",
13428
+ scrollbarWidth: "none",
13429
+ "&::-webkit-scrollbar": { display: "none" }
13430
+ }
13431
+ },
13432
+ options: { widget: "Box" }
13433
+ }
13434
+ ]
13435
+ };
13436
+ return uiSchema;
13437
+ }
13438
+ const buildInfoCard = (config2, componentScope2, store2) => {
13439
+ const card2 = _.cloneDeep(InfoCard(store2.theme.myTheme));
13440
+ card2.elements[0].scope = `#/properties/${config2.name}/properties/title`;
13441
+ card2.elements[1].scope = `#/properties/${config2.name}/properties/url`;
13442
+ card2.elements[3].elements[1].scope = `#/properties/${config2.name}/properties/labelOne`;
13443
+ card2.elements[4].scope = `#/properties/${config2.name}/properties/valueOne`;
13444
+ card2.elements[5].elements[1].scope = `#/properties/${config2.name}/properties/labelTwo`;
13445
+ card2.elements[6].scope = `#/properties/${config2.name}/properties/valueTwo`;
13446
+ if (config2.title) {
13447
+ card2.elements[0].config.main.heading = config2.title;
13448
+ }
13449
+ if (config2.url) {
13450
+ card2.elements[1].config.main.url = config2.url;
13451
+ }
13452
+ if (config2.labelOne) {
13453
+ card2.elements[3].elements[1].config.main.heading = config2.labelOne;
13454
+ }
13455
+ if (config2.valueOne) {
13456
+ card2.elements[4].config.main.heading = config2.valueOne;
13457
+ }
13458
+ if (config2.labelTwo) {
13459
+ card2.elements[5].elements[1].config.main.heading = config2.labelTwo;
13460
+ }
13461
+ if (config2.valueTwo) {
13462
+ card2.elements[6].config.main.heading = config2.valueTwo;
13463
+ }
13464
+ if (config2.primaryTextColor) {
13465
+ card2.elements[4].config.style.color = config2.primaryTextColor;
13466
+ card2.elements[6].config.style.color = config2.primaryTextColor;
13467
+ }
13468
+ if (config2.secondaryTextColor) {
13469
+ card2.elements[0].config.style.color = config2.secondaryTextColor;
13470
+ card2.elements[3].elements[0].config.style.color = config2.secondaryTextColor;
13471
+ card2.elements[3].elements[1].config.style.color = config2.secondaryTextColor;
13472
+ card2.elements[5].elements[0].config.style.color = config2.secondaryTextColor;
13473
+ card2.elements[5].elements[1].config.style.color = config2.secondaryTextColor;
13474
+ }
13475
+ if (config2.chipBackgroundColor) {
13476
+ card2.elements[0].config.style.background = config2.chipBackgroundColor;
13477
+ }
13478
+ if (config2.style) {
13479
+ const styleObj = JSON.parse(config2.style);
13480
+ if (styleObj.wrapperStyle) {
13481
+ card2.config.style.wrapperStyle = {
13482
+ ...card2.config.style.wrapperStyle,
13483
+ ...styleObj.wrapperStyle
13484
+ };
13485
+ }
13486
+ if (styleObj.headingStyle) {
13487
+ card2.elements[0].config.style = {
13488
+ ...card2.elements[0].config.style,
13489
+ ...styleObj.headingStyle
13490
+ };
13491
+ }
13492
+ if (styleObj.labelStyle) {
13493
+ const labelStyle = styleObj.labelStyle;
13494
+ card2.elements[3].elements[0].config.style = {
13495
+ ...card2.elements[3].elements[0].config.style,
13496
+ ...labelStyle
13497
+ };
13498
+ card2.elements[3].elements[1].config.style = {
13499
+ ...card2.elements[3].elements[1].config.style,
13500
+ ...labelStyle
13501
+ };
13502
+ card2.elements[5].elements[0].config.style = {
13503
+ ...card2.elements[5].elements[0].config.style,
13504
+ ...labelStyle
13505
+ };
13506
+ card2.elements[5].elements[1].config.style = {
13507
+ ...card2.elements[5].elements[1].config.style,
13508
+ ...labelStyle
13509
+ };
13510
+ }
13511
+ if (styleObj.valueStyle) {
13512
+ card2.elements[4].config.style = {
13513
+ ...card2.elements[4].config.style,
13514
+ ...styleObj.valueStyle
13515
+ };
13516
+ card2.elements[6].config.style = {
13517
+ ...card2.elements[6].config.style,
13518
+ ...styleObj.valueStyle
13519
+ };
13520
+ }
13521
+ }
13522
+ if (config2.layout) {
13523
+ card2.config.layout = createLayoutFormat(config2.layout);
13524
+ }
13525
+ return card2;
13526
+ };
13123
13527
  let schema = {
13124
13528
  type: "object",
13125
13529
  properties: {},
@@ -13283,6 +13687,9 @@ const buildUiSchema = (config2, store2) => {
13283
13687
  case "MetricCard":
13284
13688
  elements = buildMetricCard(config2, componentScope2);
13285
13689
  break;
13690
+ case "InfoCard":
13691
+ elements = buildInfoCard(config2, componentScope2, store2);
13692
+ break;
13286
13693
  case "Graph":
13287
13694
  switch (config2.graphType) {
13288
13695
  case "BarGraph":