sevago-library 1.1.3 → 1.1.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # sevago-library
2
2
 
3
+ ## 1.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: add cleanSSOParams function to sanitize URLSearchParams
8
+
9
+ ## 1.1.4
10
+
11
+ ### Patch Changes
12
+
13
+ - feat: add tablet media query constant and update components for improved responsiveness
14
+
3
15
  ## 1.1.3
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -1393,10 +1393,12 @@ const OPACITY = {
1393
1393
  0: "00"
1394
1394
  };
1395
1395
  const PAGE_TAKE_DEFAULT = { page: 1, take: 10 };
1396
+ const TABLET_MEDIA = "@media (min-width: 768px) and (max-width: 1366px)";
1396
1397
  const other_const = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1397
1398
  __proto__: null,
1398
1399
  OPACITY,
1399
- PAGE_TAKE_DEFAULT
1400
+ PAGE_TAKE_DEFAULT,
1401
+ TABLET_MEDIA
1400
1402
  }, Symbol.toStringTag, { value: "Module" }));
1401
1403
  const ANIMATION_TIME = 300;
1402
1404
  const SCALE_VALUE = "scale(1.05)";
@@ -25838,9 +25840,17 @@ const lightenColor = (hex, percent = 0) => {
25838
25840
  b = Math.round(b + (255 - b) * percent);
25839
25841
  return `rgb(${r2}, ${g}, ${b})`;
25840
25842
  };
25843
+ const cleanSSOParams = (searchParams) => {
25844
+ const nextSearchParams = new URLSearchParams(searchParams);
25845
+ nextSearchParams.delete("deviceId");
25846
+ nextSearchParams.delete("authToken");
25847
+ const search = nextSearchParams.toString();
25848
+ return search ? `?${search}` : "";
25849
+ };
25841
25850
  const other_util = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
25842
25851
  __proto__: null,
25843
25852
  calculatePageAndIndex,
25853
+ cleanSSOParams,
25844
25854
  getAppBlackList,
25845
25855
  getCurrentEnvironment,
25846
25856
  getErrorMessage,
@@ -39650,7 +39660,7 @@ const getFocusedListItemIndex = (listElement) => {
39650
39660
  return children.indexOf(getActiveElement(listElement));
39651
39661
  };
39652
39662
  const DEFAULT_DESKTOP_MODE_MEDIA_QUERY = "@media (pointer: fine)";
39653
- function mergeSx(...sxProps) {
39663
+ function mergeSx$1(...sxProps) {
39654
39664
  return sxProps.reduce((acc, sxProp) => {
39655
39665
  if (Array.isArray(sxProp)) {
39656
39666
  acc.push(...sxProp);
@@ -67767,7 +67777,7 @@ const MobileDateTimePicker = /* @__PURE__ */ React__namespace.forwardRef(functio
67767
67777
  hidden: false
67768
67778
  }, (_c = defaultizedProps.slotProps) == null ? void 0 : _c.tabs),
67769
67779
  layout: _extends({}, (_d = defaultizedProps.slotProps) == null ? void 0 : _d.layout, {
67770
- sx: mergeSx([{
67780
+ sx: mergeSx$1([{
67771
67781
  [`& .${multiSectionDigitalClockClasses.root}`]: {
67772
67782
  width: DIALOG_WIDTH
67773
67783
  },
@@ -74153,6 +74163,34 @@ const ButtonUploadFileElement = ({
74153
74163
  /* @__PURE__ */ jsxRuntime.jsx("input", { type: "file", accept, hidden: true, multiple, ref: fileInputRef, onChange: change })
74154
74164
  ] });
74155
74165
  };
74166
+ const mergeSx = (...items) => {
74167
+ return items.flatMap((item) => {
74168
+ if (!item) return [];
74169
+ return Array.isArray(item) ? item : [item];
74170
+ });
74171
+ };
74172
+ const buttonRootSx = {
74173
+ minWidth: 100,
74174
+ textTransform: "none",
74175
+ borderRadius: BORDER_RADIUS_ELEMENT_SMALL,
74176
+ width: "fit-content",
74177
+ [TABLET_MEDIA]: {
74178
+ minWidth: 120,
74179
+ minHeight: 44,
74180
+ px: 2.5,
74181
+ py: 1,
74182
+ "& .MuiButton-startIcon .material-symbols-rounded, & .MuiButton-endIcon .material-symbols-rounded": {
74183
+ fontSize: 22
74184
+ }
74185
+ }
74186
+ };
74187
+ const buttonContentSx = {
74188
+ ...TYPOGRAPHY.textSm.regular,
74189
+ whiteSpace: "nowrap",
74190
+ [TABLET_MEDIA]: {
74191
+ ...TYPOGRAPHY.textMd.medium
74192
+ }
74193
+ };
74156
74194
  const ButtonElement = ({
74157
74195
  content,
74158
74196
  loading = false,
@@ -74161,7 +74199,6 @@ const ButtonElement = ({
74161
74199
  variant = "contained",
74162
74200
  sx,
74163
74201
  disabled = false,
74164
- permission,
74165
74202
  ...rest
74166
74203
  }) => {
74167
74204
  const { palette } = material.useTheme();
@@ -74172,13 +74209,7 @@ const ButtonElement = ({
74172
74209
  variant,
74173
74210
  startIcon: !loading && startIcon ? typeof startIcon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(IconElement, { icon: startIcon, sx: { cursor: "pointer" } }) : startIcon : void 0,
74174
74211
  endIcon: !loading && endIcon ? typeof endIcon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(IconElement, { icon: endIcon, sx: { cursor: "pointer" } }) : endIcon : void 0,
74175
- sx: {
74176
- minWidth: 100,
74177
- textTransform: "none",
74178
- borderRadius: BORDER_RADIUS_ELEMENT_SMALL,
74179
- width: "fit-content",
74180
- ...sx
74181
- },
74212
+ sx: mergeSx(buttonRootSx, sx),
74182
74213
  disabled,
74183
74214
  children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
74184
74215
  LoadingComponent,
@@ -74187,7 +74218,7 @@ const ButtonElement = ({
74187
74218
  size: "small",
74188
74219
  sx: { minHeight: "24.5px" }
74189
74220
  }
74190
- ) : /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { sx: { ...TYPOGRAPHY.textSm.regular, whiteSpace: "nowrap" }, children: content })
74221
+ ) : /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { sx: buttonContentSx, children: content })
74191
74222
  }
74192
74223
  );
74193
74224
  };
@@ -74292,6 +74323,31 @@ const getButtonColor = (button, position) => {
74292
74323
  ...buttonProps
74293
74324
  };
74294
74325
  };
74326
+ const dialogTitleTextSx = {
74327
+ fontSize: "16px",
74328
+ [TABLET_MEDIA]: {
74329
+ fontSize: "18px",
74330
+ lineHeight: "26px"
74331
+ }
74332
+ };
74333
+ const dialogTitleIconSx = {
74334
+ [TABLET_MEDIA]: {
74335
+ fontSize: 22
74336
+ }
74337
+ };
74338
+ const dialogCloseButtonSx = {
74339
+ [TABLET_MEDIA]: {
74340
+ width: 44,
74341
+ height: 44,
74342
+ padding: 1.25
74343
+ }
74344
+ };
74345
+ const dialogCloseIconSx = {
74346
+ fontSize: 20,
74347
+ [TABLET_MEDIA]: {
74348
+ fontSize: 24
74349
+ }
74350
+ };
74295
74351
  const DialogElement = ({
74296
74352
  iconLabel = "",
74297
74353
  label,
@@ -74361,10 +74417,11 @@ const DialogElement = ({
74361
74417
  icon: iconLabel,
74362
74418
  content: label.toLowerCase(),
74363
74419
  size: "medium",
74364
- sxText: { fontSize: "16px", ...sxTitle }
74420
+ sxIcon: dialogTitleIconSx,
74421
+ sxText: { ...dialogTitleTextSx, ...sxTitle }
74365
74422
  }
74366
74423
  ),
74367
- closeButton && /* @__PURE__ */ jsxRuntime.jsx(material.IconButton, { onClick: () => onClose == null ? void 0 : onClose({}, "escapeKeyDown"), children: /* @__PURE__ */ jsxRuntime.jsx(IconElement, { icon: "close", sx: { fontSize: 20 } }) })
74424
+ closeButton && /* @__PURE__ */ jsxRuntime.jsx(material.IconButton, { onClick: () => onClose == null ? void 0 : onClose({}, "escapeKeyDown"), sx: dialogCloseButtonSx, children: /* @__PURE__ */ jsxRuntime.jsx(IconElement, { icon: "close", sx: dialogCloseIconSx }) })
74368
74425
  ] }),
74369
74426
  nodeLabel
74370
74427
  ]
@@ -74412,15 +74469,7 @@ const DialogElement = ({
74412
74469
  /* @__PURE__ */ jsxRuntime.jsxs(StackRow, { sx: { flex: 1, justifyContent: "flex-end" }, children: [
74413
74470
  styledButtonLeft && /* @__PURE__ */ jsxRuntime.jsx(ButtonElement, { ...styledButtonLeft, fullWidth }),
74414
74471
  styledButtonCenter && /* @__PURE__ */ jsxRuntime.jsx(ButtonElement, { ...styledButtonCenter, fullWidth }),
74415
- styledButtonRight && /* @__PURE__ */ jsxRuntime.jsx(
74416
- ButtonElement,
74417
- {
74418
- ...styledButtonRight,
74419
- fullWidth,
74420
- loading: styledButtonRight.loading,
74421
- sx: { bgcolor: styledButtonRight.color }
74422
- }
74423
- )
74472
+ styledButtonRight && /* @__PURE__ */ jsxRuntime.jsx(ButtonElement, { ...styledButtonRight, fullWidth, loading: styledButtonRight.loading })
74424
74473
  ] })
74425
74474
  ] }) })
74426
74475
  }
@@ -77496,7 +77545,6 @@ const AppsSidebar = ({
77496
77545
  onClickApp
77497
77546
  }) => {
77498
77547
  if (!isOpen) return null;
77499
- const theme = useTheme();
77500
77548
  const appsGroupObj = Object.keys(APP_OBJ).reduce(
77501
77549
  (r2, key) => {
77502
77550
  if (blacklist.includes(key)) return r2;
@@ -77534,7 +77582,7 @@ const AppsSidebar = ({
77534
77582
  left: position === "left" ? 0 : "auto",
77535
77583
  right: position === "right" ? 0 : "auto",
77536
77584
  height: "100%",
77537
- backgroundColor: theme.palette.common.white,
77585
+ backgroundColor: BACKGROUND[50],
77538
77586
  zIndex: 100,
77539
77587
  padding: PADDING_GAP_LAYOUT,
77540
77588
  overflowY: "auto"
@@ -77554,8 +77602,8 @@ const AppsSidebar = ({
77554
77602
  iconRadius: 5.5,
77555
77603
  titleVariant: "body1",
77556
77604
  captionVariant: "caption",
77557
- titleColor: theme.palette.grey[800],
77558
- captionColor: theme.palette.grey[600],
77605
+ titleColor: GRAY[500],
77606
+ captionColor: GRAY[500],
77559
77607
  onClickApp,
77560
77608
  showPagination: false
77561
77609
  }