sevago-library 1.3.6 → 1.3.8

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.3.8
4
+
5
+ ### Patch Changes
6
+
7
+ - refactor: simplify search text normalization in SystemMonitorScreen
8
+
9
+ ## 1.3.7
10
+
11
+ ### Patch Changes
12
+
13
+ - feat: enhance AppGridItem and
14
+
3
15
  ## 1.3.6
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -77344,7 +77344,7 @@ const AppGridItem = ({
77344
77344
  showTitleApps = true,
77345
77345
  direction = "column"
77346
77346
  }) => {
77347
- return /* @__PURE__ */ jsxRuntime.jsxs(StackAlignCenterJustCenter, { sx: { gap: PADDING_GAP_ITEM_SMALL }, children: [
77347
+ return /* @__PURE__ */ jsxRuntime.jsxs(StackRowAlignCenterJustCenter, { sx: { flexDirection: direction, gap: PADDING_GAP_ITEM }, children: [
77348
77348
  showIconApps && /* @__PURE__ */ jsxRuntime.jsx(ImageElement, { sx: { width: iconSize, height: iconSize }, url: app.icon, sizeType: "SQUARE" }),
77349
77349
  showTitleApps && /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { sx: { color: titleColor, textAlign: "center", ...TYPOGRAPHY.textMd.semiBold }, children: app.title }),
77350
77350
  showNameApps && /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { sx: { color: titleColor, textAlign: "center", ...TYPOGRAPHY.textMd.regular }, children: app.content })
@@ -78265,6 +78265,7 @@ const SystemMonitorSidebarPart = ({
78265
78265
  onClickApp,
78266
78266
  showNameApps,
78267
78267
  showIconApps,
78268
+ showTitleApps,
78268
78269
  direction = "row",
78269
78270
  isLongSubDomain = false
78270
78271
  }) => {
@@ -78278,10 +78279,11 @@ const SystemMonitorSidebarPart = ({
78278
78279
  AppGridItem,
78279
78280
  {
78280
78281
  app,
78281
- iconSize: 32,
78282
+ iconSize: 45,
78282
78283
  iconRadius: 3,
78283
78284
  showNameApps,
78284
78285
  showIconApps,
78286
+ showTitleApps,
78285
78287
  direction
78286
78288
  }
78287
78289
  ),
@@ -78299,7 +78301,6 @@ const SystemMonitorSidebarPart = ({
78299
78301
  )
78300
78302
  ] });
78301
78303
  };
78302
- const normalizeSearchText = (value) => value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLocaleLowerCase().trim();
78303
78304
  const SystemMonitorScreen = ({
78304
78305
  blacklist,
78305
78306
  onClickApp,
@@ -78309,8 +78310,6 @@ const SystemMonitorScreen = ({
78309
78310
  }) => {
78310
78311
  const theme = useTheme();
78311
78312
  const [tab, setTab] = React.useState(AppGroup.ALL);
78312
- const currentSearchText = searchText;
78313
- const normalizedSearchText = normalizeSearchText(currentSearchText);
78314
78313
  const availableApps = React.useMemo(
78315
78314
  () => Object.entries(APP_OBJ).filter(([key]) => !(blacklist == null ? void 0 : blacklist.includes(key))).map(([, app]) => {
78316
78315
  const appInfo = app;
@@ -78333,13 +78332,13 @@ const SystemMonitorScreen = ({
78333
78332
  if (tab !== AppGroup.ALL && app.group !== tab) {
78334
78333
  return false;
78335
78334
  }
78336
- if (!normalizedSearchText) {
78335
+ if (!searchText.trim()) {
78337
78336
  return true;
78338
78337
  }
78339
- const searchableText = normalizeSearchText(`${app.title ?? ""} ${app.content}`);
78340
- return searchableText.includes(normalizedSearchText);
78338
+ const searchableText = `${app.title ?? ""} ${app.content}`.toLocaleLowerCase();
78339
+ return searchableText.includes(searchText.toLocaleLowerCase().trim());
78341
78340
  }),
78342
- [availableApps, normalizedSearchText, tab]
78341
+ [availableApps, searchText, tab]
78343
78342
  );
78344
78343
  const availableGroups = React.useMemo(
78345
78344
  () => Object.values(AppGroup).filter(
@@ -78403,13 +78402,13 @@ const SystemMonitorScreen = ({
78403
78402
  {
78404
78403
  apps: appsByGroup,
78405
78404
  columns: 5,
78406
- rows: 2,
78405
+ rows: 3,
78407
78406
  iconSize: 120,
78408
78407
  iconRadius: 7,
78409
78408
  onClickApp,
78410
78409
  isShowAppHidden: true
78411
78410
  },
78412
- `${tab}-${normalizedSearchText}`
78411
+ `${tab}-${searchText}`
78413
78412
  ) : /* @__PURE__ */ jsxRuntime.jsx(EmptyComponent, { content: "Không tìm thấy ứng dụng phù hợp" }) })
78414
78413
  ]
78415
78414
  }