@boomi/embedkit-sdk 1.2.17 → 1.2.18

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/dist/index.cjs CHANGED
@@ -7509,14 +7509,19 @@ var IntegrationPackInstanceService = class {
7509
7509
  )
7510
7510
  });
7511
7511
  const allInstances = instResp?.result ?? [];
7512
- const searchLc = search?.toLowerCase();
7513
- const filtered = (searchLc ? allInstances.filter(
7514
- (inst) => (inst?.integrationPackInstancName?.toLowerCase?.().includes(searchLc) ?? false) || (inst?.integrationPackOverrideName?.toLowerCase?.().includes(searchLc) ?? false)
7515
- ) : allInstances).filter((inst) => {
7516
- const isAgentInstance = hasAgentTag(inst?.integrationPackDescription);
7517
- if (renderTypeFilter === "agent" && !isAgentInstance) return false;
7518
- if (renderTypeFilter === "integration" && isAgentInstance) return false;
7512
+ const searchLc = search?.toLowerCase().trim() || "";
7513
+ const filtered = allInstances.filter((inst) => {
7514
+ const ipId = inst.integrationPackId;
7515
+ inst.integrationPackDescription = packDescById.get(ipId);
7516
+ const isAgentInstance = hasAgentTag(inst.integrationPackDescription);
7517
+ if (renderTypeFilter === "agent") return isAgentInstance;
7518
+ if (renderTypeFilter === "integration") return !isAgentInstance;
7519
7519
  return true;
7520
+ }).filter((inst) => {
7521
+ if (!searchLc) return true;
7522
+ const name = inst?.integrationPackInstanceName?.toLowerCase?.() ?? "";
7523
+ const override = inst?.integrationPackOverrideName?.toLowerCase?.() ?? "";
7524
+ return name.includes(searchLc) || override.includes(searchLc);
7520
7525
  });
7521
7526
  const total = filtered.length;
7522
7527
  const totalPages = Math.max(1, Math.ceil(total / pageSize));