mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-21 10:43:16 +00:00
[PM-23631] Delete unused jslib models and misc code (#819)
* Remove unused cipher-related code from jslib - Delete cipher.ts, cipherView.ts, sortedCiphersCache.ts - Delete search-ciphers.pipe.ts and icon.component files - Delete cipherData.ts, cipherResponse.ts, linkedIdType.ts - Delete field-related files (fieldData.ts, field.ts, fieldApi.ts, fieldView.ts) - Delete sync, emergency access, and attachment upload response files - Delete card and identity view files - Delete linkedFieldOption decorator - Remove cipher methods from StateService abstractions and implementations - Preserve ciphers property in AccountData as 'any' type for data compatibility * Remove unused Send feature and related password manager code from jslib - Delete Send domain models: send.ts, sendAccess.ts, sendFile.ts, sendText.ts - Delete Send data models: sendData.ts, sendFileData.ts, sendTextData.ts - Delete Send view models: sendView.ts, sendAccessView.ts, sendFileView.ts, sendTextView.ts - Delete Send API models: sendFileApi.ts, sendTextApi.ts - Delete Send response models: sendAccessResponse.ts, sendFileDownloadDataResponse.ts, sendFileUploadDataResponse.ts, sendResponse.ts - Delete Send enum: sendType.ts - Delete Send specs: send.spec.ts, sendAccess.spec.ts, sendFile.spec.ts, sendText.spec.ts - Remove Send methods from StateService abstractions and implementations - Remove getDecryptedSends/setDecryptedSends and getEncryptedSends/setEncryptedSends methods - Change sends property in AccountData to 'any' type for data compatibility - Fix import formatting and remove empty lines * Remove misc unused password manager models from jslib - Delete Core domain models: card.ts, identity.ts, secureNote.ts, attachment.ts - Delete Core data models: cardData.ts, identityData.ts, secureNoteData.ts, attachmentData.ts - Delete Core view models: secureNoteView.ts, attachmentView.ts - Delete Core API models: cardApi.ts, identityApi.ts, secureNoteApi.ts - Delete Core response models: attachmentResponse.ts - Delete Core enum: secureNoteType.ts - Delete Core specs: card.spec.ts, identity.spec.ts, secureNote.spec.ts, attachment.spec.ts * Remove unused Organization files (folders/collections) - Delete folder and collection domain models, data models, view models, response models, and spec files * Remove unused UI/UX settings methods from state service - Remove 20 password manager specific interface methods: - Autofill methods (4): getAutoFillOnPageLoadDefault, setAutoFillOnPageLoadDefault, getEnableAutoFillOnPageLoad, setEnableAutoFillOnPageLoad - Browser integration methods (4): getEnableBrowserIntegration, setEnableBrowserIntegration, getEnableBrowserIntegrationFingerprint, setEnableBrowserIntegrationFingerprint - Notification methods (4): getDisableAddLoginNotification, setDisableAddLoginNotification, getDisableChangedPasswordNotification, setDisableChangedPasswordNotification - Favicon methods (2): getDisableFavicon, setDisableFavicon - Gravatar methods (2): getEnableGravitars, setEnableGravitars - Card/Identity tab methods (4): getDontShowCardsCurrentTab, setDontShowCardsCurrentTab, getDontShowIdentitiesCurrentTab, setDontShowIdentitiesCurrentTab * Fix build errors * Delete leftover data models and stateService methods * Delete iframes and passwordReprompt
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
import { Pipe, PipeTransform } from "@angular/core";
|
||||
|
||||
import { CipherView } from "@/jslib/common/src/models/view/cipherView";
|
||||
|
||||
@Pipe({
|
||||
name: "searchCiphers",
|
||||
})
|
||||
export class SearchCiphersPipe implements PipeTransform {
|
||||
transform(ciphers: CipherView[], searchText: string, deleted = false): CipherView[] {
|
||||
if (ciphers == null || ciphers.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (searchText == null || searchText.length < 2) {
|
||||
return ciphers.filter((c) => {
|
||||
return deleted !== c.isDeleted;
|
||||
});
|
||||
}
|
||||
|
||||
searchText = searchText.trim().toLowerCase();
|
||||
return ciphers.filter((c) => {
|
||||
if (deleted !== c.isDeleted) {
|
||||
return false;
|
||||
}
|
||||
if (c.name != null && c.name.toLowerCase().indexOf(searchText) > -1) {
|
||||
return true;
|
||||
}
|
||||
if (searchText.length >= 8 && c.id.startsWith(searchText)) {
|
||||
return true;
|
||||
}
|
||||
if (c.subTitle != null && c.subTitle.toLowerCase().indexOf(searchText) > -1) {
|
||||
return true;
|
||||
}
|
||||
if (c.login && c.login.uri != null && c.login.uri.toLowerCase().indexOf(searchText) > -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user