sevago-library 1.3.7 → 1.3.9

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.9
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: update search app
8
+
9
+ ## 1.3.8
10
+
11
+ ### Patch Changes
12
+
13
+ - refactor: simplify search text normalization in SystemMonitorScreen
14
+
3
15
  ## 1.3.7
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -78301,7 +78301,6 @@ const SystemMonitorSidebarPart = ({
78301
78301
  )
78302
78302
  ] });
78303
78303
  };
78304
- const normalizeSearchText = (value) => value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLocaleLowerCase().trim();
78305
78304
  const SystemMonitorScreen = ({
78306
78305
  blacklist,
78307
78306
  onClickApp,
@@ -78311,8 +78310,6 @@ const SystemMonitorScreen = ({
78311
78310
  }) => {
78312
78311
  const theme = useTheme();
78313
78312
  const [tab, setTab] = React.useState(AppGroup.ALL);
78314
- const currentSearchText = searchText;
78315
- const normalizedSearchText = normalizeSearchText(currentSearchText);
78316
78313
  const availableApps = React.useMemo(
78317
78314
  () => Object.entries(APP_OBJ).filter(([key]) => !(blacklist == null ? void 0 : blacklist.includes(key))).map(([, app]) => {
78318
78315
  const appInfo = app;
@@ -78335,13 +78332,13 @@ const SystemMonitorScreen = ({
78335
78332
  if (tab !== AppGroup.ALL && app.group !== tab) {
78336
78333
  return false;
78337
78334
  }
78338
- if (!normalizedSearchText) {
78335
+ if (!searchText) {
78339
78336
  return true;
78340
78337
  }
78341
- const searchableText = normalizeSearchText(`${app.title ?? ""} ${app.content}`);
78342
- return searchableText.includes(normalizedSearchText);
78338
+ const searchableText = `${app.title ?? ""} ${app.content}`.toLocaleLowerCase();
78339
+ return searchableText.includes(searchText.toLocaleLowerCase());
78343
78340
  }),
78344
- [availableApps, normalizedSearchText, tab]
78341
+ [availableApps, searchText, tab]
78345
78342
  );
78346
78343
  const availableGroups = React.useMemo(
78347
78344
  () => Object.values(AppGroup).filter(
@@ -78411,7 +78408,7 @@ const SystemMonitorScreen = ({
78411
78408
  onClickApp,
78412
78409
  isShowAppHidden: true
78413
78410
  },
78414
- `${tab}-${normalizedSearchText}`
78411
+ `${tab}-${searchText}`
78415
78412
  ) : /* @__PURE__ */ jsxRuntime.jsx(EmptyComponent, { content: "Không tìm thấy ứng dụng phù hợp" }) })
78416
78413
  ]
78417
78414
  }