From 4f1bb2c8c16149ebd24ae1f17a614511e5506d28 Mon Sep 17 00:00:00 2001 From: DecafDev <40307803+decaf-dev@users.noreply.github.com> Date: Fri, 2 May 2025 19:53:09 -0600 Subject: [PATCH] chore: format with prettier --- __mocks__/js-logger.ts | 2 +- __mocks__/obsidian.ts | 100 +++++----- esbuild.config.mjs | 12 +- jest.config.js | 4 +- src/constants.ts | 32 ++-- src/event/event-manager.ts | 6 +- src/event/types.ts | 2 +- src/focus-utils.ts | 18 +- src/logger/index.ts | 4 +- src/main.ts | 12 +- src/migrations/index.ts | 68 +++---- src/migrations/migrate_0_4_0.ts | 6 +- src/migrations/migrate_1_0_0.ts | 8 +- src/migrations/migrate_1_10_0.ts | 12 +- src/migrations/migrate_1_13_0.ts | 10 +- src/migrations/migrate_1_14_0.ts | 14 +- src/migrations/migrate_1_15_0.ts | 6 +- src/migrations/migrate_1_17_0.ts | 18 +- src/migrations/migrate_1_1_0.ts | 6 +- src/migrations/migrate_1_21_0.ts | 2 +- src/migrations/migrate_1_22_0.ts | 4 +- src/migrations/migrate_1_23_0.ts | 6 +- src/migrations/migrate_1_23_1.ts | 2 +- src/migrations/migrate_1_24_0.ts | 8 +- src/migrations/migrate_1_25_0.ts | 2 +- src/migrations/migrate_1_26_0.ts | 2 +- src/migrations/migrate_1_27_0.ts | 6 +- src/migrations/migrate_1_29_0.ts | 8 +- src/migrations/migrate_1_2_1.ts | 4 +- src/migrations/migrate_1_30_5.ts | 6 +- src/migrations/migrate_1_31_0.ts | 2 +- src/migrations/migrate_1_33_0.ts | 2 +- src/migrations/migrate_1_37_0.ts | 18 +- src/migrations/migrate_1_38_0.ts | 2 +- src/migrations/migrate_1_39_0.ts | 10 +- src/migrations/migrate_1_3_0.ts | 12 +- src/migrations/migrate_1_40_0.ts | 2 +- src/migrations/migrate_1_41_0.ts | 8 +- src/migrations/migrate_1_42_0.ts | 4 +- src/migrations/migrate_1_45_0.ts | 2 +- src/migrations/migrate_1_46_0.ts | 12 +- src/migrations/migrate_1_6_0.ts | 4 +- src/migrations/migrate_1_6_1.ts | 4 +- src/migrations/migrate_1_9_0.ts | 10 +- src/migrations/migration_interface.ts | 4 +- src/obsidian/custom-filter-modal.ts | 2 +- src/obsidian/types.ts | 10 +- src/obsidian/vault-explorer-settings-tab.ts | 40 ++-- src/obsidian/vault-explorer-view.ts | 2 +- src/svelte/app/services/context-menu.ts | 8 +- src/svelte/app/services/favorites-store.ts | 26 +-- .../app/services/fetch-social-media-image.ts | 12 +- src/svelte/app/services/file-content-store.ts | 6 +- src/svelte/app/services/file-store.ts | 8 +- .../filters/custom/filter-by-groups.ts | 8 +- .../custom/match-checkbox-property-filter.ts | 6 +- .../filters/custom/match-content-filter.ts | 26 ++- .../custom/match-date-property-filter.ts | 28 ++- .../filters/custom/match-file-name-filter.ts | 26 ++- .../filters/custom/match-folder-filter.ts | 24 ++- .../custom/match-list-property-filter.ts | 37 +++- .../custom/match-number-property-filter.ts | 4 +- .../custom/match-text-property-filter.ts | 30 ++- .../app/services/link-utils/link-getters.ts | 2 +- .../link-utils/link-target-getters.ts | 2 +- .../services/link-utils/link-validators.ts | 2 +- src/svelte/app/services/open-file.ts | 2 +- .../app/services/random-file-sort-store.ts | 4 +- src/svelte/app/services/render-data.ts | 16 +- src/svelte/app/services/smi-cache.ts | 20 +- src/svelte/app/services/utils/image-utils.ts | 2 +- src/svelte/app/services/utils/json-utils.ts | 2 +- .../services/display-name-utils.ts | 2 +- .../custom-filter-app/services/utils.ts | 4 +- .../shared/services/load-property-value.ts | 2 +- src/svelte/shared/services/time-utils.ts | 2 +- src/types/index.guard.ts | 2 +- src/types/index.ts | 24 +-- src/types/types-0.3.3.ts | 2 +- src/types/types-0.5.5.ts | 14 +- src/types/types-1-37-0.ts | 24 +-- src/types/types-1.0.1.ts | 12 +- src/types/types-1.12.1.ts | 68 +++++-- src/types/types-1.13.1.ts | 68 +++++-- src/types/types-1.14.2.ts | 70 ++++--- src/types/types-1.16.0.ts | 24 +-- src/types/types-1.2.0.ts | 56 ++++-- src/types/types-1.2.1.ts | 55 ++++-- src/types/types-1.20.0.ts | 24 +-- src/types/types-1.21.2.ts | 24 +-- src/types/types-1.22.0.ts | 24 +-- src/types/types-1.23.0.ts | 24 +-- src/types/types-1.23.2.ts | 24 +-- src/types/types-1.24.2.ts | 24 +-- src/types/types-1.25.2.ts | 24 +-- src/types/types-1.26.3.ts | 24 +-- src/types/types-1.28.0.ts | 24 +-- src/types/types-1.29.0.ts | 24 +-- src/types/types-1.30.5.ts | 24 +-- src/types/types-1.32.2.ts | 24 +-- src/types/types-1.36.3.ts | 24 +-- src/types/types-1.38.0.ts | 24 +-- src/types/types-1.39.0.ts | 24 +-- src/types/types-1.40.2.ts | 24 +-- src/types/types-1.41.1.ts | 24 +-- src/types/types-1.44.6.ts | 24 +-- src/types/types-1.45.0.ts | 24 +-- src/types/types-1.5.0.ts | 55 ++++-- src/types/types-1.6.0.ts | 55 ++++-- src/types/types-1.8.1.ts | 55 ++++-- src/types/types-1.9.1.ts | 53 ++++-- test-vault/.obsidian/app.json | 6 +- test-vault/.obsidian/appearance.json | 2 +- test-vault/.obsidian/community-plugins.json | 4 +- .../.obsidian/core-plugins-migration.json | 58 +++--- test-vault/.obsidian/core-plugins.json | 36 ++-- test-vault/.obsidian/graph.json | 42 ++--- .../plugins/vault-explorer/data.json | 178 +++++++++--------- test-vault/.obsidian/types.json | 18 +- test-vault/.vaultexplorer/favorites.json | 4 +- tests/integration/preform-migration.test.ts | 58 +++--- tests/unit/link-target-getters.test.ts | 2 +- tests/unit/link-validators.test.ts | 2 +- tests/unit/load-property-value.test.ts | 4 +- .../match-checkbox-property-filter.test.ts | 131 +++++++++---- tests/unit/match-date-property-filter.test.ts | 101 ++++++++-- tests/unit/match-list-property-filter.test.ts | 134 ++++++++++--- .../unit/match-number-property-filter.test.ts | 110 ++++++++--- tests/unit/match-text-property-filter.test.ts | 127 ++++++++++--- tsconfig.json | 42 ++--- 130 files changed, 1847 insertions(+), 1156 deletions(-) diff --git a/__mocks__/js-logger.ts b/__mocks__/js-logger.ts index 9c3d567..94f4371 100644 --- a/__mocks__/js-logger.ts +++ b/__mocks__/js-logger.ts @@ -3,5 +3,5 @@ export default { info: jest.fn(), warn: jest.fn(), error: jest.fn(), - debug: jest.fn(), + debug: jest.fn() }; diff --git a/__mocks__/obsidian.ts b/__mocks__/obsidian.ts index 1e89f45..cd134ba 100644 --- a/__mocks__/obsidian.ts +++ b/__mocks__/obsidian.ts @@ -13,46 +13,60 @@ const DATE_TIME_SHORT_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/; */ const DATE_TIME_FULL_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/; -export const moment = jest.fn((date: string, _formats: string[], _strict?: boolean) => { - const parsedDate = new Date(date); - const mockMoment: unknown = { - isValid: jest.fn(() => DATE_REGEX.test(date) || DATE_TIME_SHORT_REGEX.test(date) || DATE_TIME_FULL_REGEX.test(date)), - startOf: jest.fn((unit) => { - if (unit === "day") { - parsedDate.setUTCHours(0, 0, 0, 0); - } - return mockMoment; - }), - set: jest.fn(({ hour, minute, second }) => { - parsedDate.setUTCHours(hour, minute, second); - return mockMoment; - }), - valueOf: jest.fn(() => parsedDate.getTime()), - isSame: jest.fn((other, unit) => { - if (unit === 'day') { - const otherDate = new Date(other); - return ( - parsedDate.getUTCFullYear() === otherDate.getUTCFullYear() && - parsedDate.getUTCMonth() === otherDate.getUTCMonth() && - parsedDate.getUTCDate() === otherDate.getUTCDate() - ); - } - return parsedDate.getTime() === new Date(other).getTime(); - }), - isBefore: jest.fn((other, unit) => { - if (unit === 'day') { - const otherDate = new Date(other); - return parsedDate < otherDate && parsedDate.getUTCDate() !== otherDate.getUTCDate(); - } - return parsedDate.getTime() < new Date(other).getTime(); - }), - isAfter: jest.fn((other, unit) => { - if (unit === 'day') { - const otherDate = new Date(other); - return parsedDate > otherDate && parsedDate.getUTCDate() !== otherDate.getUTCDate(); - } - return parsedDate.getTime() > new Date(other).getTime(); - }), - }; - return mockMoment; -}); +export const moment = jest.fn( + (date: string, _formats: string[], _strict?: boolean) => { + const parsedDate = new Date(date); + const mockMoment: unknown = { + isValid: jest.fn( + () => + DATE_REGEX.test(date) || + DATE_TIME_SHORT_REGEX.test(date) || + DATE_TIME_FULL_REGEX.test(date) + ), + startOf: jest.fn((unit) => { + if (unit === "day") { + parsedDate.setUTCHours(0, 0, 0, 0); + } + return mockMoment; + }), + set: jest.fn(({ hour, minute, second }) => { + parsedDate.setUTCHours(hour, minute, second); + return mockMoment; + }), + valueOf: jest.fn(() => parsedDate.getTime()), + isSame: jest.fn((other, unit) => { + if (unit === "day") { + const otherDate = new Date(other); + return ( + parsedDate.getUTCFullYear() === + otherDate.getUTCFullYear() && + parsedDate.getUTCMonth() === otherDate.getUTCMonth() && + parsedDate.getUTCDate() === otherDate.getUTCDate() + ); + } + return parsedDate.getTime() === new Date(other).getTime(); + }), + isBefore: jest.fn((other, unit) => { + if (unit === "day") { + const otherDate = new Date(other); + return ( + parsedDate < otherDate && + parsedDate.getUTCDate() !== otherDate.getUTCDate() + ); + } + return parsedDate.getTime() < new Date(other).getTime(); + }), + isAfter: jest.fn((other, unit) => { + if (unit === "day") { + const otherDate = new Date(other); + return ( + parsedDate > otherDate && + parsedDate.getUTCDate() !== otherDate.getUTCDate() + ); + } + return parsedDate.getTime() > new Date(other).getTime(); + }) + }; + return mockMoment; + } +); diff --git a/esbuild.config.mjs b/esbuild.config.mjs index f5a3337..2f98cc5 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -29,12 +29,12 @@ const rebuildPlugin = { ); } catch (err) {} }); - }, + } }; const context = await esbuild.context({ banner: { - js: banner, + js: banner }, entryPoints: ["src/main.ts"], bundle: true, @@ -52,7 +52,7 @@ const context = await esbuild.context({ "@lezer/common", "@lezer/highlight", "@lezer/lr", - ...builtins, + ...builtins ], format: "cjs", target: "es2018", @@ -64,9 +64,9 @@ const context = await esbuild.context({ rebuildPlugin, esbuildSvelte({ compilerOptions: { css: "external" }, - preprocess: sveltePreprocess(), - }), - ], + preprocess: sveltePreprocess() + }) + ] }); if (prod) { diff --git a/jest.config.js b/jest.config.js index 74f4614..d11d6ac 100644 --- a/jest.config.js +++ b/jest.config.js @@ -3,6 +3,6 @@ module.exports = { preset: "ts-jest", testEnvironment: "node", moduleNameMapper: { - "^src/(.*)$": "/src/$1", - }, + "^src/(.*)$": "/src/$1" + } }; diff --git a/src/constants.ts b/src/constants.ts index 9792323..93be7a9 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -14,22 +14,22 @@ export const DEFAULT_SETTINGS: VaultExplorerPluginSettings = { modifiedDate: "", custom1: "", custom2: "", - custom3: "", + custom3: "" }, filters: { search: { isEnabled: true, - value: "", + value: "" }, sort: { isEnabled: true, - value: "file-name-asc", + value: "file-name-asc" }, custom: { isEnabled: true, selectedGroupId: "", - groups: [], - }, + groups: [] + } }, views: { grid: { @@ -39,27 +39,27 @@ export const DEFAULT_SETTINGS: VaultExplorerPluginSettings = { coverImageSources: [ { type: "image-property", - isEnabled: true, + isEnabled: true }, { type: "url-property", - isEnabled: true, + isEnabled: true }, { type: "frontmatter", - isEnabled: true, + isEnabled: true }, { type: "body", - isEnabled: true, - }, + isEnabled: true + } ], - loadSocialMediaImage: true, + loadSocialMediaImage: true }, list: { isEnabled: true, order: 1, - showTags: true, + showTags: true }, feed: { isEnabled: true, @@ -68,12 +68,12 @@ export const DEFAULT_SETTINGS: VaultExplorerPluginSettings = { collapseStyle: "no-new-lines", lineClampLarge: 5, lineClampMedium: 3, - lineClampSmall: 2, + lineClampSmall: 2 }, table: { isEnabled: false, - order: 3, - }, + order: 3 + } }, confirmBeforeDelete: true, currentView: TExplorerView.GRID, @@ -85,5 +85,5 @@ export const DEFAULT_SETTINGS: VaultExplorerPluginSettings = { pageSize: 25, configDir: ".vaultexplorer", pluginVersion: null, - logLevel: LOG_LEVEL_WARN, + logLevel: LOG_LEVEL_WARN }; diff --git a/src/event/event-manager.ts b/src/event/event-manager.ts index ae9db78..06514b0 100644 --- a/src/event/event-manager.ts +++ b/src/event/event-manager.ts @@ -40,7 +40,7 @@ export default class EventManager { Logger.trace({ fileName: "event-manager.ts", functionName: "emit", - message: "called", + message: "called" }); if (!this.eventListeners[eventName]) { @@ -48,7 +48,7 @@ export default class EventManager { { fileName: "event-manager.ts", functionName: "emit", - message: "no event listeners found for event. returning...", + message: "no event listeners found for event. returning..." }, { eventName } ); @@ -59,7 +59,7 @@ export default class EventManager { { fileName: "event-manager.ts", functionName: "emit", - message: "emiting event", + message: "emiting event" }, { eventName } ); diff --git a/src/event/types.ts b/src/event/types.ts index 737858b..f6e100e 100644 --- a/src/event/types.ts +++ b/src/event/types.ts @@ -21,7 +21,7 @@ export enum PluginEvent { FILE_ICONS_SETTING_CHANGE = "file-icons-setting-change", LOAD_BODY_TAGS_SETTING_CHANGE = "load-body-tags-setting-change", LOAD_SOCIAL_MEDIA_IMAGE_SETTING_CHANGE = "load-social-media-image-setting-change", - SHOW_TAGS_SETTING_CHANGE = "show-tags-setting-change", + SHOW_TAGS_SETTING_CHANGE = "show-tags-setting-change" } export type EventCallback = (...data: unknown[]) => void; diff --git a/src/focus-utils.ts b/src/focus-utils.ts index ce8648d..1a9bc1d 100644 --- a/src/focus-utils.ts +++ b/src/focus-utils.ts @@ -1,14 +1,19 @@ export const moveFocus = (direction: "previous" | "next") => { const focusedEl = document.activeElement; if (focusedEl instanceof HTMLElement) { - const rootEl = focusedEl.closest('.vault-explorer, .vault-explorer-property-filter-app'); + const rootEl = focusedEl.closest( + ".vault-explorer, .vault-explorer-property-filter-app" + ); if (!rootEl) return; - const inputEls = rootEl.querySelectorAll('a, button, input, select, textarea, [role="button"], [role="link"]') + const inputEls = rootEl.querySelectorAll( + 'a, button, input, select, textarea, [role="button"], [role="link"]' + ); const focusableEls = Array.from(inputEls).filter(isElementTabble); const currentIndex = focusableEls.indexOf(focusedEl); - const newIndex = direction === "previous" ? currentIndex - 1 : currentIndex + 1; + const newIndex = + direction === "previous" ? currentIndex - 1 : currentIndex + 1; if (newIndex >= 0 && newIndex < focusableEls.length) { (focusableEls[newIndex] as HTMLElement).focus(); } else if (newIndex > focusableEls.length - 1) { @@ -19,6 +24,9 @@ export const moveFocus = (direction: "previous" | "next") => { } function isElementTabble(element: Element) { - return element.getAttribute('disabled') == null && element.getAttribute('tabindex') !== '-1'; + return ( + element.getAttribute("disabled") == null && + element.getAttribute("tabindex") !== "-1" + ); } -} +}; diff --git a/src/logger/index.ts b/src/logger/index.ts index d9320d2..1a773a4 100644 --- a/src/logger/index.ts +++ b/src/logger/index.ts @@ -5,7 +5,7 @@ import { LOG_LEVEL_INFO, LOG_LEVEL_OFF, LOG_LEVEL_TRACE, - LOG_LEVEL_WARN, + LOG_LEVEL_WARN } from "./constants"; import type { FormattedLogMessage, LogMessageHeader } from "./types"; @@ -57,7 +57,7 @@ export const formatMessageForLogger = ( const { fileName, functionName, message } = headers; return { message: `[${fileName}:${functionName}] ${message}`, - data: body, + data: body }; } else { return { message: String(head), data: body }; diff --git a/src/main.ts b/src/main.ts index d880aba..e2c2b6a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,7 +7,7 @@ import Logger from "js-logger"; import { DEFAULT_SETTINGS, HOVER_LINK_SOURCE_ID, - VAULT_EXPLORER_VIEW, + VAULT_EXPLORER_VIEW } from "./constants"; import EventManager from "./event/event-manager"; import { PluginEvent } from "./event/types"; @@ -44,13 +44,13 @@ export default class VaultExplorerPlugin extends Plugin { name: "Open vault explorer view", callback: async () => { this.openVaultExplorerView(); - }, + } }); this.registerEvents(); this.registerHoverLinkSource(HOVER_LINK_SOURCE_ID, { display: this.manifest.name, - defaultMod: true, + defaultMod: true }); this.addSettingTab(new VaultExplorerSettingsTab(this.app, this)); @@ -223,13 +223,13 @@ export default class VaultExplorerPlugin extends Plugin { Logger.trace({ fileName: "main.ts", functionName: "saveSettings", - message: "called", + message: "called" }); Logger.debug( { fileName: "main.ts", functionName: "saveSettings", - message: "saving settings", + message: "saving settings" }, this.settings ); @@ -244,7 +244,7 @@ export default class VaultExplorerPlugin extends Plugin { } else { this.app.workspace.getLeaf("tab").setViewState({ type: VAULT_EXPLORER_VIEW, - active: true, + active: true }); } } diff --git a/src/migrations/index.ts b/src/migrations/index.ts index 848a4f0..fa3a583 100644 --- a/src/migrations/index.ts +++ b/src/migrations/index.ts @@ -39,168 +39,168 @@ const migrations: TMigration[] = [ { from: "0.3.3", to: "0.4.0", - migrate: Migrate_0_4_0, + migrate: Migrate_0_4_0 }, { from: "0.5.5", to: "1.0.0", - migrate: Migrate_1_0_0, + migrate: Migrate_1_0_0 }, { from: "1.0.1", to: "1.1.0", - migrate: Migrate_1_1_0, + migrate: Migrate_1_1_0 }, { from: "1.2.0", to: "1.2.1", - migrate: Migrate_1_2_1, + migrate: Migrate_1_2_1 }, { from: "1.2.1", to: "1.3.0", - migrate: Migrate_1_3_0, + migrate: Migrate_1_3_0 }, { from: "1.5.0", to: "1.6.0", - migrate: Migrate_1_6_0, + migrate: Migrate_1_6_0 }, { from: "1.6.0", to: "1.6.1", - migrate: Migrate_1_6_1, + migrate: Migrate_1_6_1 }, { from: "1.8.1", to: "1.9.0", - migrate: Migrate_1_9_0, + migrate: Migrate_1_9_0 }, { from: "1.9.1", to: "1.10.0", - migrate: Migrate_1_10_0, + migrate: Migrate_1_10_0 }, { from: "1.12.1", to: "1.13.0", - migrate: Migrate_1_13_0, + migrate: Migrate_1_13_0 }, { from: "1.13.1", to: "1.14.0", - migrate: Migrate_1_14_0, + migrate: Migrate_1_14_0 }, { from: "1.14.2", to: "1.15.0", - migrate: Migrate_1_15_0, + migrate: Migrate_1_15_0 }, { from: "1.16.0", to: "1.17.0", - migrate: Migrate_1_17_0, + migrate: Migrate_1_17_0 }, { from: "1.20.0", to: "1.21.0", - migrate: Migrate_1_21_0, + migrate: Migrate_1_21_0 }, { from: "1.21.2", to: "1.22.0", - migrate: Migrate_1_22_0, + migrate: Migrate_1_22_0 }, { from: "1.22.0", to: "1.23.0", - migrate: Migrate_1_23_0, + migrate: Migrate_1_23_0 }, { from: "1.23.0", to: "1.23.1", - migrate: Migrate_1_23_1, + migrate: Migrate_1_23_1 }, { from: "1.23.2", to: "1.24.0", - migrate: Migrate_1_24_0, + migrate: Migrate_1_24_0 }, { from: "1.24.2", to: "1.25.0", - migrate: Migrate_1_25_0, + migrate: Migrate_1_25_0 }, { from: "1.25.2", to: "1.26.0", - migrate: Migrate_1_26_0, + migrate: Migrate_1_26_0 }, { from: "1.26.3", to: "1.27.0", - migrate: Migrate_1_27_0, + migrate: Migrate_1_27_0 }, { from: "1.28.0", to: "1.29.0", - migrate: Migrate_1_29_0, + migrate: Migrate_1_29_0 }, { from: "1.29.0", to: "1.30.0", - migrate: Migrate_1_30_0, + migrate: Migrate_1_30_0 }, { from: "1.30.5", to: "1.31.0", - migrate: Migrate_1_31_0, + migrate: Migrate_1_31_0 }, { from: "1.32.2", to: "1.33.0", - migrate: Migrate_1_33_0, + migrate: Migrate_1_33_0 }, { from: "1.36.3", to: "1.37.0", - migrate: Migrate_1_37_0, + migrate: Migrate_1_37_0 }, { from: "1.37.2", to: "1.38.0", - migrate: Migrate_1_38_0, + migrate: Migrate_1_38_0 }, { from: "1.38.0", to: "1.39.0", - migrate: Migrate_1_39_0, + migrate: Migrate_1_39_0 }, { from: "1.39.0", to: "1.40.0", - migrate: Migrate_1_40_0, + migrate: Migrate_1_40_0 }, { from: "1.40.2", to: "1.41.0", - migrate: Migrate_1_41_0, + migrate: Migrate_1_41_0 }, { from: "1.41.1", to: "1.42.0", - migrate: Migrate_1_42_0, + migrate: Migrate_1_42_0 }, { from: "1.44.6", to: "1.45.0", - migrate: Migrate_1_45_0, + migrate: Migrate_1_45_0 }, { from: "1.45.0", to: "1.46.0", - migrate: Migrate_1_46_0, - }, + migrate: Migrate_1_46_0 + } ]; export const preformMigrations = ( diff --git a/src/migrations/migrate_0_4_0.ts b/src/migrations/migrate_0_4_0.ts index f653920..15186dc 100644 --- a/src/migrations/migrate_0_4_0.ts +++ b/src/migrations/migrate_0_4_0.ts @@ -11,9 +11,9 @@ export default class Migrate_0_4_0 implements MigrationInterface { ...typedData.filters, properties: { ...typedData.filters.properties, - groups: [], - }, - }, + groups: [] + } + } }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_0_0.ts b/src/migrations/migrate_1_0_0.ts index 6719244..d7539f2 100644 --- a/src/migrations/migrate_1_0_0.ts +++ b/src/migrations/migrate_1_0_0.ts @@ -19,11 +19,11 @@ export default class Migrate_1_0_0 implements MigrationInterface { id, name, filters, - isEnabled, + isEnabled }; - }), - }, - }, + }) + } + } }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_10_0.ts b/src/migrations/migrate_1_10_0.ts index 944324f..215d123 100644 --- a/src/migrations/migrate_1_10_0.ts +++ b/src/migrations/migrate_1_10_0.ts @@ -1,6 +1,6 @@ import { FilterRuleType_1_12_1, - type VaultExplorerPluginSettings_1_12_1, + type VaultExplorerPluginSettings_1_12_1 } from "src/types/types-1.12.1"; import type { VaultExplorerPluginSettings_1_9_1 } from "src/types/types-1.9.1"; import MigrationInterface from "./migration_interface"; @@ -19,16 +19,16 @@ export default class Migrate_1_10_0 implements MigrationInterface { return { ...rule, type: FilterRuleType_1_12_1.PROPERTY as any, - propertyType: rule.type as any, + propertyType: rule.type as any }; }); return { ...group, - rules, + rules }; - }), - }, - }, + }) + } + } }; delete (newData.filters as any).folder; delete (newData.filters as any).properties; diff --git a/src/migrations/migrate_1_13_0.ts b/src/migrations/migrate_1_13_0.ts index 98fce64..63d216e 100644 --- a/src/migrations/migrate_1_13_0.ts +++ b/src/migrations/migrate_1_13_0.ts @@ -9,7 +9,7 @@ export default class Migrate_1_13_0 implements MigrationInterface { ...typedData, views: { ...typedData.views, - enableClockUpdates: true, + enableClockUpdates: true }, filters: { ...typedData.filters, @@ -18,11 +18,11 @@ export default class Migrate_1_13_0 implements MigrationInterface { groups: typedData.filters.custom.groups.map((group) => { return { ...group, - isSticky: false, + isSticky: false }; - }), - }, - }, + }) + } + } }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_14_0.ts b/src/migrations/migrate_1_14_0.ts index 8645c82..2e4984b 100644 --- a/src/migrations/migrate_1_14_0.ts +++ b/src/migrations/migrate_1_14_0.ts @@ -11,26 +11,26 @@ export default class Migrate_1_14_0 implements MigrationInterface { ...typedData.filters, search: { isEnabled: true, - value: typedData.filters.search, + value: typedData.filters.search }, favorites: { isEnabled: true, - value: typedData.filters.onlyFavorites, + value: typedData.filters.onlyFavorites }, timestamp: { isEnabled: true, - value: typedData.filters.timestamp, + value: typedData.filters.timestamp }, sort: { isEnabled: true, - value: typedData.filters.sort, + value: typedData.filters.sort }, custom: { isEnabled: true, - ...typedData.filters.custom, - }, + ...typedData.filters.custom + } }, - enableScrollButtons: true, + enableScrollButtons: true }; delete (newData.filters as any).onlyFavorites; return newData as unknown as Record; diff --git a/src/migrations/migrate_1_15_0.ts b/src/migrations/migrate_1_15_0.ts index 6b7bb2b..bc91135 100644 --- a/src/migrations/migrate_1_15_0.ts +++ b/src/migrations/migrate_1_15_0.ts @@ -1,7 +1,7 @@ import type { VaultExplorerPluginSettings_1_14_2 } from "src/types/types-1.14.2"; import { type VaultExplorerPluginSettings_1_16_0, - ViewType_1_16_0, + ViewType_1_16_0 } from "src/types/types-1.16.0"; import MigrationInterface from "./migration_interface"; @@ -12,8 +12,8 @@ export default class Migrate_1_15_0 implements MigrationInterface { ...typedData, views: { ...typedData.views, - order: [...typedData.views.order, ViewType_1_16_0.FEED], - }, + order: [...typedData.views.order, ViewType_1_16_0.FEED] + } }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_17_0.ts b/src/migrations/migrate_1_17_0.ts index e1a18a7..cd7f4de 100644 --- a/src/migrations/migrate_1_17_0.ts +++ b/src/migrations/migrate_1_17_0.ts @@ -10,32 +10,32 @@ export default class Migrate_1_17_0 implements MigrationInterface { ...typedData, views: { dashboard: { - isEnabled: false, + isEnabled: false }, grid: { - isEnabled: true, + isEnabled: true }, list: { - isEnabled: true, + isEnabled: true }, table: { - isEnabled: false, + isEnabled: false }, feed: { - isEnabled: true, + isEnabled: true }, recommended: { - isEnabled: false, + isEnabled: false }, related: { - isEnabled: false, - }, + isEnabled: false + } }, viewOrder: typedData.views.order as unknown as TExplorerView[], enableClockUpdates: typedData.views.enableClockUpdates, currentView: typedData.views .currentView as unknown as TExplorerView, - titleWrapping: typedData.views.titleWrapping, + titleWrapping: typedData.views.titleWrapping }; delete (newData as any).views.order; delete (newData as any).views.currentView; diff --git a/src/migrations/migrate_1_1_0.ts b/src/migrations/migrate_1_1_0.ts index a9270ca..29516db 100644 --- a/src/migrations/migrate_1_1_0.ts +++ b/src/migrations/migrate_1_1_0.ts @@ -1,7 +1,7 @@ import type { VaultExplorerPluginSettings_1_0_1 } from "src/types/types-1.0.1"; import { type VaultExplorerPluginSettings_1_2_0, - ViewType_1_2_0, + ViewType_1_2_0 } from "src/types/types-1.2.0"; import MigrationInterface from "./migration_interface"; @@ -12,8 +12,8 @@ export default class Migrate_1_1_0 implements MigrationInterface { ...typedData, views: { currentView: typedData.currentView as unknown as ViewType_1_2_0, - order: [ViewType_1_2_0.GRID, ViewType_1_2_0.LIST], - }, + order: [ViewType_1_2_0.GRID, ViewType_1_2_0.LIST] + } }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_21_0.ts b/src/migrations/migrate_1_21_0.ts index d1d82a3..be73cff 100644 --- a/src/migrations/migrate_1_21_0.ts +++ b/src/migrations/migrate_1_21_0.ts @@ -7,7 +7,7 @@ export default class Migrate_1_21_0 implements MigrationInterface { const typedData = data as unknown as VaultExplorerPluginSettings_1_20_0; const newData: VaultExplorerPluginSettings_1_21_2 = { ...typedData, - enableFileIcons: true, + enableFileIcons: true }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_22_0.ts b/src/migrations/migrate_1_22_0.ts index 0b55214..a5ba463 100644 --- a/src/migrations/migrate_1_22_0.ts +++ b/src/migrations/migrate_1_22_0.ts @@ -9,10 +9,10 @@ export default class Migrate_1_22_0 implements MigrationInterface { ...typedData, properties: { ...typedData.properties, - imageUrl: "", + imageUrl: "" }, filterGroupsWidth: 300, - filterGroupsWrapping: "nowrap", + filterGroupsWrapping: "nowrap" }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_23_0.ts b/src/migrations/migrate_1_23_0.ts index 2c59417..cdeb104 100644 --- a/src/migrations/migrate_1_23_0.ts +++ b/src/migrations/migrate_1_23_0.ts @@ -11,9 +11,9 @@ export default class Migrate_1_23_0 implements MigrationInterface { ...typedData.views, grid: { ...typedData.views.grid, - fetchSocialMediaImage: false, - }, - }, + fetchSocialMediaImage: false + } + } }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_23_1.ts b/src/migrations/migrate_1_23_1.ts index 23416bd..aea86fd 100644 --- a/src/migrations/migrate_1_23_1.ts +++ b/src/migrations/migrate_1_23_1.ts @@ -7,7 +7,7 @@ export default class Migrate_1_23_1 implements MigrationInterface { const typedData = data as unknown as VaultExplorerPluginSettings_1_23_0; const newData: VaultExplorerPluginSettings_1_23_2 = { ...typedData, - filterGroupsWidth: "100%", + filterGroupsWidth: "100%" }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_24_0.ts b/src/migrations/migrate_1_24_0.ts index 7457463..38337a6 100644 --- a/src/migrations/migrate_1_24_0.ts +++ b/src/migrations/migrate_1_24_0.ts @@ -12,13 +12,13 @@ export default class Migrate_1_24_0 implements MigrationInterface { grid: { ...typedData.views.grid, loadSocialMediaImage: - typedData.views.grid.fetchSocialMediaImage, + typedData.views.grid.fetchSocialMediaImage }, feed: { ...typedData.views.feed, - collapseContent: true, - }, - }, + collapseContent: true + } + } }; delete (newData as any).views.grid.fetchSocialMediaImage; diff --git a/src/migrations/migrate_1_25_0.ts b/src/migrations/migrate_1_25_0.ts index 139ca6d..839a8a9 100644 --- a/src/migrations/migrate_1_25_0.ts +++ b/src/migrations/migrate_1_25_0.ts @@ -7,7 +7,7 @@ export default class Migrate_1_25_0 implements MigrationInterface { const typedData = data as unknown as VaultExplorerPluginSettings_1_24_2; const newData: VaultExplorerPluginSettings_1_25_2 = { ...typedData, - fileInteractionStyle: "content", + fileInteractionStyle: "content" }; return newData as unknown as Record; diff --git a/src/migrations/migrate_1_26_0.ts b/src/migrations/migrate_1_26_0.ts index e57f95c..20fd9c6 100644 --- a/src/migrations/migrate_1_26_0.ts +++ b/src/migrations/migrate_1_26_0.ts @@ -7,7 +7,7 @@ export default class Migrate_1_26_0 implements MigrationInterface { const typedData = data as unknown as VaultExplorerPluginSettings_1_25_2; const newData: VaultExplorerPluginSettings_1_26_3 = { ...typedData, - configDir: ".vaultexplorer", + configDir: ".vaultexplorer" }; return newData as unknown as Record; diff --git a/src/migrations/migrate_1_27_0.ts b/src/migrations/migrate_1_27_0.ts index 29dafc8..2bd771d 100644 --- a/src/migrations/migrate_1_27_0.ts +++ b/src/migrations/migrate_1_27_0.ts @@ -15,9 +15,9 @@ export default class Migrate_1_27_0 implements MigrationInterface { collapseStyle: "no-new-lines", lineClampLarge: 5, lineClampMedium: 3, - lineClampSmall: 2, - }, - }, + lineClampSmall: 2 + } + } }; delete (newData as any).views.feed.collapseContent; diff --git a/src/migrations/migrate_1_29_0.ts b/src/migrations/migrate_1_29_0.ts index 039304e..f8cb1c4 100644 --- a/src/migrations/migrate_1_29_0.ts +++ b/src/migrations/migrate_1_29_0.ts @@ -11,13 +11,13 @@ export default class Migrate_1_29_0 implements MigrationInterface { ...typedData.views, list: { ...typedData.views.list, - showTags: true, + showTags: true }, grid: { ...typedData.views.grid, - loadSocialMediaImage: true, - }, - }, + loadSocialMediaImage: true + } + } }; return newData as unknown as Record; diff --git a/src/migrations/migrate_1_2_1.ts b/src/migrations/migrate_1_2_1.ts index 590940e..fd97f21 100644 --- a/src/migrations/migrate_1_2_1.ts +++ b/src/migrations/migrate_1_2_1.ts @@ -9,8 +9,8 @@ export default class Migrate_1_2_1 implements MigrationInterface { ...typedData, views: { ...typedData.views, - titleWrapping: "normal", - }, + titleWrapping: "normal" + } }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_30_5.ts b/src/migrations/migrate_1_30_5.ts index 0cd16b2..f3c748c 100644 --- a/src/migrations/migrate_1_30_5.ts +++ b/src/migrations/migrate_1_30_5.ts @@ -11,9 +11,9 @@ export default class Migrate_1_30_0 implements MigrationInterface { ...typedData.views, grid: { ...typedData.views.grid, - coverImageSource: "frontmatter-and-body", - }, - }, + coverImageSource: "frontmatter-and-body" + } + } }; return newData as unknown as Record; diff --git a/src/migrations/migrate_1_31_0.ts b/src/migrations/migrate_1_31_0.ts index cf564bc..c98b746 100644 --- a/src/migrations/migrate_1_31_0.ts +++ b/src/migrations/migrate_1_31_0.ts @@ -7,7 +7,7 @@ export default class Migrate_1_31_0 implements MigrationInterface { const typedData = data as unknown as VaultExplorerPluginSettings_1_30_5; const newData: VaultExplorerPluginSettings_1_32_2 = { ...typedData, - shouldWrapFilterGroups: typedData.filterGroupsWrapping === "wrap", + shouldWrapFilterGroups: typedData.filterGroupsWrapping === "wrap" }; delete (newData as any).filterGroupsWrapping; diff --git a/src/migrations/migrate_1_33_0.ts b/src/migrations/migrate_1_33_0.ts index 617050b..d63e223 100644 --- a/src/migrations/migrate_1_33_0.ts +++ b/src/migrations/migrate_1_33_0.ts @@ -6,7 +6,7 @@ export default class Migrate_1_33_0 implements MigrationInterface { migrate(data: Record) { const typedData = data as unknown as VaultExplorerPluginSettings_1_32_2; const newData: VaultExplorerPluginSettings_1_36_3 = { - ...typedData, + ...typedData }; delete (newData as any).fileInteractionStyle; diff --git a/src/migrations/migrate_1_37_0.ts b/src/migrations/migrate_1_37_0.ts index 0d7bc9d..8b714b6 100644 --- a/src/migrations/migrate_1_37_0.ts +++ b/src/migrations/migrate_1_37_0.ts @@ -14,27 +14,27 @@ export default class Migrate_1_37_0 implements MigrationInterface { coverImageSources: [ { type: "image-property", - isEnabled: true, + isEnabled: true }, { type: "url-property", - isEnabled: true, + isEnabled: true }, { type: "frontmatter", - isEnabled: true, + isEnabled: true }, { type: "body", - isEnabled: true, - }, - ], - }, + isEnabled: true + } + ] + } }, properties: { ...typedData.properties, - image: typedData.properties.imageUrl, - }, + image: typedData.properties.imageUrl + } }; delete (newData as any).enableScrollButtons; diff --git a/src/migrations/migrate_1_38_0.ts b/src/migrations/migrate_1_38_0.ts index 20b04ff..f43101e 100644 --- a/src/migrations/migrate_1_38_0.ts +++ b/src/migrations/migrate_1_38_0.ts @@ -7,7 +7,7 @@ export default class Migrate_1_38_0 implements MigrationInterface { const typedData = data as unknown as VaultExplorerPluginSettings_1_37_2; const newData: VaultExplorerPluginSettings_1_38_0 = { ...typedData, - loadBodyTags: true, + loadBodyTags: true }; return newData as unknown as Record; diff --git a/src/migrations/migrate_1_39_0.ts b/src/migrations/migrate_1_39_0.ts index f5cd491..11d052e 100644 --- a/src/migrations/migrate_1_39_0.ts +++ b/src/migrations/migrate_1_39_0.ts @@ -1,7 +1,7 @@ import type { VaultExplorerPluginSettings_1_38_0 } from "src/types/types-1.38.0"; import { TExplorerView_1_39_0, - type VaultExplorerPluginSettings_1_39_0, + type VaultExplorerPluginSettings_1_39_0 } from "src/types/types-1.39.0"; import MigrationInterface from "./migration_interface"; @@ -14,14 +14,14 @@ export default class Migrate_1_39_0 implements MigrationInterface { TExplorerView_1_39_0.GRID, TExplorerView_1_39_0.LIST, TExplorerView_1_39_0.TABLE, - TExplorerView_1_39_0.FEED, + TExplorerView_1_39_0.FEED ], views: { ...typedData.views, table: { - isEnabled: true, - }, - }, + isEnabled: true + } + } }; return newData as unknown as Record; diff --git a/src/migrations/migrate_1_3_0.ts b/src/migrations/migrate_1_3_0.ts index 8fc3ab8..8f8ddfe 100644 --- a/src/migrations/migrate_1_3_0.ts +++ b/src/migrations/migrate_1_3_0.ts @@ -2,7 +2,7 @@ import type { VaultExplorerPluginSettings_1_2_1 } from "src/types/types-1.2.1"; import type { PropertyFilterGroup_1_5_0, PropertyFilter_1_5_0, - VaultExplorerPluginSettings_1_5_0, + VaultExplorerPluginSettings_1_5_0 } from "src/types/types-1.5.0"; import MigrationInterface from "./migration_interface"; @@ -18,12 +18,12 @@ export default class Migrate_1_3_0 implements MigrationInterface { return { ...filter, type: filter.type as any, - matchWhenPropertyDNE: false, + matchWhenPropertyDNE: false }; }); return { ...group, - filters: updatedFilters, + filters: updatedFilters }; } ); @@ -34,9 +34,9 @@ export default class Migrate_1_3_0 implements MigrationInterface { ...typedData.filters, properties: { ...typedData.filters.properties, - groups: updatedGroups, - }, - }, + groups: updatedGroups + } + } }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_40_0.ts b/src/migrations/migrate_1_40_0.ts index 2d01bd5..093af8e 100644 --- a/src/migrations/migrate_1_40_0.ts +++ b/src/migrations/migrate_1_40_0.ts @@ -7,7 +7,7 @@ export default class Migrate_1_40_0 implements MigrationInterface { const typedData = data as unknown as VaultExplorerPluginSettings_1_39_0; const newData: VaultExplorerPluginSettings_1_40_2 = { ...typedData, - shouldCollapseFilters: false, + shouldCollapseFilters: false }; return newData as unknown as Record; diff --git a/src/migrations/migrate_1_41_0.ts b/src/migrations/migrate_1_41_0.ts index c6ded59..de064d5 100644 --- a/src/migrations/migrate_1_41_0.ts +++ b/src/migrations/migrate_1_41_0.ts @@ -9,15 +9,15 @@ export default class Migrate_1_41_0 implements MigrationInterface { ...typedData, properties: { ...typedData.properties, - coverImageFit: "", + coverImageFit: "" }, views: { ...typedData.views, grid: { ...typedData.views.grid, - coverImageFit: "cover", - }, - }, + coverImageFit: "cover" + } + } }; return newData as unknown as Record; diff --git a/src/migrations/migrate_1_42_0.ts b/src/migrations/migrate_1_42_0.ts index 3abc3ad..848e360 100644 --- a/src/migrations/migrate_1_42_0.ts +++ b/src/migrations/migrate_1_42_0.ts @@ -12,8 +12,8 @@ export default class Migrate_1_42_0 implements MigrationInterface { image: typedData.properties.image || "image", coverImageFit: typedData.properties.coverImageFit || "image-fit", - url: typedData.properties.url || "url", - }, + url: typedData.properties.url || "url" + } }; delete (newData as any).filterGroupsWidth; delete (newData as any).shouldWrapFilterGroups; diff --git a/src/migrations/migrate_1_45_0.ts b/src/migrations/migrate_1_45_0.ts index da2b95f..0f6b11f 100644 --- a/src/migrations/migrate_1_45_0.ts +++ b/src/migrations/migrate_1_45_0.ts @@ -24,7 +24,7 @@ export default class Migrate_1_45_0 implements MigrationInterface { const newData: VaultExplorerPluginSettings_1_45_0 = { ...typedData, confirmBeforeDelete: true, - viewOrder, + viewOrder }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_46_0.ts b/src/migrations/migrate_1_46_0.ts index 7023dd4..2fc59f4 100644 --- a/src/migrations/migrate_1_46_0.ts +++ b/src/migrations/migrate_1_46_0.ts @@ -13,25 +13,25 @@ export default class Migrate_1_46_0 implements MigrationInterface { grid: { ...typedData.views.grid, isEnabled: true, - order: 0, + order: 0 }, list: { ...typedData.views.list, isEnabled: true, - order: 1, + order: 1 }, feed: { ...typedData.views.feed, isEnabled: true, - order: 2, + order: 2 }, table: { ...typedData.views.table, isEnabled: true, - order: 3, - }, + order: 3 + } }, - currentView: TExplorerView.GRID, + currentView: TExplorerView.GRID }; delete (newData as any).views.recommended; delete (newData as any).views.related; diff --git a/src/migrations/migrate_1_6_0.ts b/src/migrations/migrate_1_6_0.ts index 08201bb..6aad440 100644 --- a/src/migrations/migrate_1_6_0.ts +++ b/src/migrations/migrate_1_6_0.ts @@ -10,8 +10,8 @@ export default class Migrate_1_6_0 implements MigrationInterface { properties: { ...typedData.properties, creationDate: "", - modifiedDate: "", - }, + modifiedDate: "" + } }; return newData as unknown as Record; } diff --git a/src/migrations/migrate_1_6_1.ts b/src/migrations/migrate_1_6_1.ts index 5a4f4d3..ec3ac51 100644 --- a/src/migrations/migrate_1_6_1.ts +++ b/src/migrations/migrate_1_6_1.ts @@ -10,8 +10,8 @@ export default class Migrate_1_6_1 implements MigrationInterface { properties: { ...typedData.properties, createdDate: "", - modifiedDate: "", - }, + modifiedDate: "" + } }; delete (newData.properties as any).creationDate; return newData as unknown as Record; diff --git a/src/migrations/migrate_1_9_0.ts b/src/migrations/migrate_1_9_0.ts index 2be3b8b..503c24b 100644 --- a/src/migrations/migrate_1_9_0.ts +++ b/src/migrations/migrate_1_9_0.ts @@ -17,16 +17,16 @@ export default class Migrate_1_9_0 implements MigrationInterface { return { ...filter, valueData: "", - type: filter.type as any, + type: filter.type as any }; }); return { ...group, - rules, + rules }; - }), - }, - }, + }) + } + } }; delete (newData.filters as any).properties; for (const group of newData.filters.custom.groups as any) { diff --git a/src/migrations/migration_interface.ts b/src/migrations/migration_interface.ts index eeb6362..64a68c8 100644 --- a/src/migrations/migration_interface.ts +++ b/src/migrations/migration_interface.ts @@ -1,3 +1,5 @@ export default abstract class MigrationInterface { - abstract migrate(previous: Record): Record; + abstract migrate( + previous: Record + ): Record; } diff --git a/src/obsidian/custom-filter-modal.ts b/src/obsidian/custom-filter-modal.ts index aecface..7e4a22a 100644 --- a/src/obsidian/custom-filter-modal.ts +++ b/src/obsidian/custom-filter-modal.ts @@ -16,7 +16,7 @@ export default class CustomFilterModal extends Modal { const { contentEl } = this; this.component = new CustomFilterApp({ - target: contentEl, + target: contentEl }); } diff --git a/src/obsidian/types.ts b/src/obsidian/types.ts index 00fa73a..1e5e0be 100644 --- a/src/obsidian/types.ts +++ b/src/obsidian/types.ts @@ -4,4 +4,12 @@ export interface ObsidianProperty { count: number; } -export type ObsidianPropertyType = "text" | "multitext" | "date" | "datetime" | "checkbox" | "tags" | "aliases" | "number"; +export type ObsidianPropertyType = + | "text" + | "multitext" + | "date" + | "datetime" + | "checkbox" + | "tags" + | "aliases" + | "number"; diff --git a/src/obsidian/vault-explorer-settings-tab.ts b/src/obsidian/vault-explorer-settings-tab.ts index 35e2846..146771a 100644 --- a/src/obsidian/vault-explorer-settings-tab.ts +++ b/src/obsidian/vault-explorer-settings-tab.ts @@ -7,17 +7,17 @@ import { LOG_LEVEL_INFO, LOG_LEVEL_OFF, LOG_LEVEL_TRACE, - LOG_LEVEL_WARN, + LOG_LEVEL_WARN } from "src/logger/constants"; import VaultExplorerPlugin from "src/main"; import type { CollapseStyle, CoverImageFit, - VaultExplorerPluginSettings, + VaultExplorerPluginSettings } from "src/types"; import { getDropdownOptionsForProperties, - getObsidianPropertiesByType, + getObsidianPropertiesByType } from "./utils"; import EventManager from "src/event/event-manager"; @@ -94,7 +94,7 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { "50": "50", "100": "100", "250": "250", - "500": "500", + "500": "500" }) .setValue(this.plugin.settings.pageSize.toString()) .onChange(async (value) => { @@ -231,7 +231,7 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { new Setting(containerEl).setName("Grid view").setHeading(); this.imageSourceApp = new ImageSourceApp({ - target: containerEl, + target: containerEl }); new Setting(containerEl) @@ -261,7 +261,7 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { cb .addOptions({ cover: "Cover", - contain: "Contain", + contain: "Contain" }) .setValue(this.plugin.settings.views.grid.coverImageFit) .onChange(async (value) => { @@ -315,7 +315,7 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { cb .addOptions({ "no-new-lines": "No new lines", - "no-extra-new-lines": "No extra new lines", + "no-extra-new-lines": "No extra new lines" }) .setValue(this.plugin.settings.views.feed.collapseStyle) .onChange(async (value) => { @@ -441,7 +441,7 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { dropdown .addOptions( getDropdownOptionsForProperties(textProperties, { - image: "image", + image: "image" }) ) .setValue(this.plugin.settings.properties.image) @@ -463,7 +463,7 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { dropdown .addOptions( getDropdownOptionsForProperties(textProperties, { - "image-fit": "image-fit", + "image-fit": "image-fit" }) ) .setValue(this.plugin.settings.properties.coverImageFit) @@ -485,7 +485,7 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { dropdown .addOptions( getDropdownOptionsForProperties(textProperties, { - url: "url", + url: "url" }) ) .setValue(this.plugin.settings.properties.url) @@ -500,10 +500,10 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { const creationDateDesc = new DocumentFragment(); creationDateDesc.createDiv({ - text: "Property used to store a creation date. This must be a date or datetime property.", + text: "Property used to store a creation date. This must be a date or datetime property." }); creationDateDesc.createDiv({ - text: "If set, the property will be preferred over the file's creation date.", + text: "If set, the property will be preferred over the file's creation date." }); new Setting(containerEl) @@ -514,7 +514,7 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { .addOptions( getDropdownOptionsForProperties([ ...dateProperties, - ...dateTimeProperties, + ...dateTimeProperties ]) ) .setValue(this.plugin.settings.properties.createdDate) @@ -529,10 +529,10 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { const modificationDateDesc = new DocumentFragment(); modificationDateDesc.createDiv({ - text: "Property used to store a modification date. This must be a date or datetime property.", + text: "Property used to store a modification date. This must be a date or datetime property." }); modificationDateDesc.createDiv({ - text: "If set, the property will be preferred over the file's modification date.", + text: "If set, the property will be preferred over the file's modification date." }); new Setting(containerEl) @@ -543,7 +543,7 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { .addOptions( getDropdownOptionsForProperties([ ...dateProperties, - ...dateTimeProperties, + ...dateTimeProperties ]) ) .setValue(this.plugin.settings.properties.modifiedDate) @@ -638,7 +638,7 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { [LOG_LEVEL_WARN]: "Warn", [LOG_LEVEL_INFO]: "Info", [LOG_LEVEL_DEBUG]: "Debug", - [LOG_LEVEL_TRACE]: "Trace", + [LOG_LEVEL_TRACE]: "Trace" }); cb.setValue(this.plugin.settings.logLevel).onChange( async (value) => { @@ -653,11 +653,11 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { const configFolderDesc = new DocumentFragment(); configFolderDesc.createDiv({ - text: "Set the plugin configuration folder.", + text: "Set the plugin configuration folder." }); configFolderDesc.createDiv({ text: "Restart Obsidian after changing this setting.", - cls: "mod-warning", + cls: "mod-warning" }); new Setting(containerEl) @@ -695,7 +695,7 @@ export default class VaultExplorerSettingsTab extends PluginSettingTab { [TExplorerView.GRID]: { ...settings.views.grid }, [TExplorerView.LIST]: { ...settings.views.list }, [TExplorerView.FEED]: { ...settings.views.feed }, - [TExplorerView.TABLE]: { ...settings.views.table }, + [TExplorerView.TABLE]: { ...settings.views.table } }; const maxOrder = Math.max( diff --git a/src/obsidian/vault-explorer-view.ts b/src/obsidian/vault-explorer-view.ts index 6d73a53..2aeeed1 100644 --- a/src/obsidian/vault-explorer-view.ts +++ b/src/obsidian/vault-explorer-view.ts @@ -44,7 +44,7 @@ export default class VaultExplorerView extends ItemView { const containerEl = this.containerEl.children[1]; this.component = new VaultExplorerApp({ - target: containerEl, + target: containerEl }); } diff --git a/src/svelte/app/services/context-menu.ts b/src/svelte/app/services/context-menu.ts index 69238ef..f2e7ad9 100644 --- a/src/svelte/app/services/context-menu.ts +++ b/src/svelte/app/services/context-menu.ts @@ -8,7 +8,7 @@ export const openContextMenu = ( settings: VaultExplorerPluginSettings, { coverImageFit, - onCoverImageFitChange, + onCoverImageFitChange }: { coverImageFit?: CoverImageFit; onCoverImageFitChange?: ( @@ -71,7 +71,7 @@ const deleteFile = async (app: App, filePath: string) => { const openToTheRight = (app: App, filePath: string) => { app.workspace.openLinkText("", filePath, "split", { - active: false, + active: false }); }; @@ -80,8 +80,8 @@ const openInNewTab = (app: App, filePath: string) => { type: "markdown", active: false, state: { - file: filePath, - }, + file: filePath + } }); }; diff --git a/src/svelte/app/services/favorites-store.ts b/src/svelte/app/services/favorites-store.ts index 4c8e25f..cdffdfa 100644 --- a/src/svelte/app/services/favorites-store.ts +++ b/src/svelte/app/services/favorites-store.ts @@ -43,7 +43,7 @@ class FavoritesStore { Logger.trace({ fileName: "favorites-store.ts", functionName: "load", - message: "called", + message: "called" }); const directoryExists = await app.vault.adapter.exists( @@ -80,7 +80,7 @@ class FavoritesStore { { fileName: "favorites-store.ts", functionName: "load", - message: "loaded favorites cache", + message: "loaded favorites cache" }, { cache } ); @@ -90,7 +90,7 @@ class FavoritesStore { { fileName: "favorites-store.ts", functionName: "load", - message: "error loading favorites cache", + message: "error loading favorites cache" }, error.message ); @@ -102,7 +102,7 @@ class FavoritesStore { Logger.trace({ fileName: "favorites-store.ts", functionName: "update", - message: "called", + message: "called" }); this.store.update((currentCache) => { @@ -117,7 +117,7 @@ class FavoritesStore { Logger.trace({ fileName: "favorites-store.ts", functionName: "onFileRename", - message: "called", + message: "called" }); this.store.update((currentCache) => { @@ -136,7 +136,7 @@ class FavoritesStore { Logger.trace({ fileName: "favorites-store.ts", functionName: "onFileDelete", - message: "called", + message: "called" }); this.store.update((currentCache) => { @@ -151,7 +151,7 @@ class FavoritesStore { Logger.trace({ fileName: "favorites-store.ts", functionName: "save", - message: "called", + message: "called" }); if (!this.app) { @@ -166,7 +166,7 @@ class FavoritesStore { const items = Array.from(cache.entries()).map( ([filePath, isFavorite]) => ({ filePath, - isFavorite, + isFavorite }) ); @@ -178,7 +178,7 @@ class FavoritesStore { { fileName: "favorites-store.ts", functionName: "save", - message: "error saving favorites cache", + message: "error saving favorites cache" }, error.message ); @@ -190,7 +190,7 @@ class FavoritesStore { Logger.debug({ fileName: "favorites-store.ts", functionName: "createConfigDir", - message: "called", + message: "called" }); try { @@ -202,7 +202,7 @@ class FavoritesStore { { fileName: "favorites-store.ts", functionName: "load", - message: "error creating config directory", + message: "error creating config directory" }, error.message ); @@ -216,7 +216,7 @@ class FavoritesStore { Logger.debug({ fileName: "favorites-store.ts", functionName: "load", - message: "creating new file...", + message: "creating new file..." }); const rawData = stringifyItems([]); await app.vault.create(filePath, rawData); @@ -227,7 +227,7 @@ class FavoritesStore { { fileName: "favorites-store.ts", functionName: "load", - message: "error creating favorites file", + message: "error creating favorites file" }, error.message ); diff --git a/src/svelte/app/services/fetch-social-media-image.ts b/src/svelte/app/services/fetch-social-media-image.ts index 6b15a9b..d43a7d2 100644 --- a/src/svelte/app/services/fetch-social-media-image.ts +++ b/src/svelte/app/services/fetch-social-media-image.ts @@ -5,7 +5,7 @@ export const fetchSocialMediaImage = async (url: string) => { Logger.trace({ fileName: "fetch-social-media-image.ts", functionName: "fetchSocialMediaImage", - message: "called", + message: "called" }); try { @@ -13,8 +13,8 @@ export const fetchSocialMediaImage = async (url: string) => { url, method: "GET", headers: { - Cookie: "", // Clear any cookies - }, + Cookie: "" // Clear any cookies + } }); const html = response.text; @@ -52,7 +52,7 @@ export const fetchSocialMediaImage = async (url: string) => { { fileName: "social-media-image.ts", functionName: "fetchSocialMediaImage", - message: "found image", + message: "found image" }, { imageUrl } ); @@ -61,7 +61,7 @@ export const fetchSocialMediaImage = async (url: string) => { { fileName: "social-media-image.ts", functionName: "fetchSocialMediaImage", - message: "no image found", + message: "no image found" }, { url } ); @@ -73,7 +73,7 @@ export const fetchSocialMediaImage = async (url: string) => { { fileName: "social-media-image.ts", functionName: "fetchSocialMediaImage", - message: "failed to fetch", + message: "failed to fetch" }, error ); diff --git a/src/svelte/app/services/file-content-store.ts b/src/svelte/app/services/file-content-store.ts index 152df19..8a60409 100644 --- a/src/svelte/app/services/file-content-store.ts +++ b/src/svelte/app/services/file-content-store.ts @@ -26,12 +26,12 @@ function createFileContentStore() { const content = await app.vault.cachedRead(file); return { path: file.path, - content, + content }; } return { path: file.path, - content: null, + content: null }; })() ); @@ -93,7 +93,7 @@ function createFileContentStore() { onFileCreate: handleFileCreate, onFileModify: handleFileModify, onFileRename: handleFileRename, - onFileDelete: handleFileDelete, + onFileDelete: handleFileDelete }; } diff --git a/src/svelte/app/services/file-store.ts b/src/svelte/app/services/file-store.ts index 268718a..44782a5 100644 --- a/src/svelte/app/services/file-store.ts +++ b/src/svelte/app/services/file-store.ts @@ -16,7 +16,7 @@ function createFileStore() { const files = app.vault.getFiles(); const loadedFiles: LoadedFile[] = files.map((file) => ({ id: generateRandomId(), - file, + file })); set(loadedFiles); } @@ -24,7 +24,7 @@ function createFileStore() { async function handleFileCreate(file: TFile) { const newLoadedFile: LoadedFile = { id: generateRandomId(), - file, + file }; update((loadedFiles) => { @@ -39,7 +39,7 @@ function createFileStore() { if (loadedFile.file.path === oldPath) { return { ...loadedFile, - file: updatedFile, + file: updatedFile }; } return loadedFile; @@ -60,7 +60,7 @@ function createFileStore() { subscribe, onFileCreate: handleFileCreate, onFileRename: handleFileRename, - onFileDelete: handleFileDelete, + onFileDelete: handleFileDelete }; } diff --git a/src/svelte/app/services/filters/custom/filter-by-groups.ts b/src/svelte/app/services/filters/custom/filter-by-groups.ts index cb51755..0ea0e7d 100644 --- a/src/svelte/app/services/filters/custom/filter-by-groups.ts +++ b/src/svelte/app/services/filters/custom/filter-by-groups.ts @@ -5,13 +5,13 @@ import type { FolderFilterRule, PropertyFilterRule, TFilterGroup, - TFilterRule, + TFilterRule } from "src/types"; import { loadPropertyValue } from "src/svelte/shared/services/load-property-value"; import { getDateDaysAgo, - getDateDaysAhead, + getDateDaysAhead } from "src/svelte/shared/services/time-utils"; import { DatePropertyFilterValue, FilterRuleType } from "src/types"; import { removeFrontmatter } from "../../utils/content-utils"; @@ -108,7 +108,7 @@ const filterByPropertyType = ( type, matchWhenPropertyDNE, propertyType, - propertyName, + propertyName } = filter; ///The property is empty when the user has not chosen a property. @@ -260,7 +260,7 @@ const filterByFolder = ( const compare = filter.value.toLowerCase().trim(); const doesMatch = matchFolderFilter(value, compare, condition, { - includeSubfolders, + includeSubfolders }); return doesMatch; }; diff --git a/src/svelte/app/services/filters/custom/match-checkbox-property-filter.ts b/src/svelte/app/services/filters/custom/match-checkbox-property-filter.ts index 91e1904..46ef051 100644 --- a/src/svelte/app/services/filters/custom/match-checkbox-property-filter.ts +++ b/src/svelte/app/services/filters/custom/match-checkbox-property-filter.ts @@ -24,6 +24,8 @@ export const matchCheckboxPropertyFilter = ( return propertyValue === null; default: - throw new Error(`CheckboxFilterCondition not supported: ${condition}`); + throw new Error( + `CheckboxFilterCondition not supported: ${condition}` + ); } -} +}; diff --git a/src/svelte/app/services/filters/custom/match-content-filter.ts b/src/svelte/app/services/filters/custom/match-content-filter.ts index 6eac387..9644a1e 100644 --- a/src/svelte/app/services/filters/custom/match-content-filter.ts +++ b/src/svelte/app/services/filters/custom/match-content-filter.ts @@ -3,12 +3,24 @@ import { ContentFilterCondition } from "src/types"; export const matchContentFilter = ( content: string, compare: string, - condition: ContentFilterCondition, + condition: ContentFilterCondition ): boolean => { - console.assert(content === content.toLowerCase(), `ContentFilter content "${content}" must be lowercase`); - console.assert(/^\s/.test(content) === false, `ContentFilter content "${content}" must not contain whitespace`); - console.assert(compare === compare.toLowerCase(), `ContentFilter compare "${compare}" must be lowercase`); - console.assert(/\s$/.test(compare) === false, `ContentFilter compare "${compare}" must not contain whitespace`); + console.assert( + content === content.toLowerCase(), + `ContentFilter content "${content}" must be lowercase` + ); + console.assert( + /^\s/.test(content) === false, + `ContentFilter content "${content}" must not contain whitespace` + ); + console.assert( + compare === compare.toLowerCase(), + `ContentFilter compare "${compare}" must be lowercase` + ); + console.assert( + /\s$/.test(compare) === false, + `ContentFilter compare "${compare}" must not contain whitespace` + ); switch (condition) { case ContentFilterCondition.CONTAINS: @@ -24,6 +36,8 @@ export const matchContentFilter = ( return content !== ""; default: - throw new Error(`ContentFilterCondition not supported: ${condition}`); + throw new Error( + `ContentFilterCondition not supported: ${condition}` + ); } }; diff --git a/src/svelte/app/services/filters/custom/match-date-property-filter.ts b/src/svelte/app/services/filters/custom/match-date-property-filter.ts index bff1744..a1b080e 100644 --- a/src/svelte/app/services/filters/custom/match-date-property-filter.ts +++ b/src/svelte/app/services/filters/custom/match-date-property-filter.ts @@ -1,4 +1,7 @@ -import { getMomentDate, isDateSupported } from "src/svelte/shared/services/time-utils"; +import { + getMomentDate, + isDateSupported +} from "src/svelte/shared/services/time-utils"; import { DateFilterCondition } from "src/types"; export const matchDatePropertyFilter = ( @@ -8,9 +11,15 @@ export const matchDatePropertyFilter = ( matchIfNull: boolean ) => { if (propertyValue) { - console.assert(isDateSupported(propertyValue), `DatePropertyFilter propertyValue "${propertyValue}" must be supported date format`); + console.assert( + isDateSupported(propertyValue), + `DatePropertyFilter propertyValue "${propertyValue}" must be supported date format` + ); } - console.assert(isDateSupported(compare), `DatePropertyFilter compare "${compare}" must be supported date format`); + console.assert( + isDateSupported(compare), + `DatePropertyFilter compare "${compare}" must be supported date format` + ); switch (condition) { case DateFilterCondition.IS: { @@ -34,10 +43,12 @@ export const matchDatePropertyFilter = ( const propertyValueDate = getMomentDate(propertyValue); const compareDate = getMomentDate(compare); - return propertyValueDate.isAfter(compareDate, "day") || propertyValueDate.isSame(compareDate, "day"); + return ( + propertyValueDate.isAfter(compareDate, "day") || + propertyValueDate.isSame(compareDate, "day") + ); } - case DateFilterCondition.IS_BEFORE: { if (propertyValue === null) return matchIfNull; @@ -51,7 +62,10 @@ export const matchDatePropertyFilter = ( const propertyValueDate = getMomentDate(propertyValue); const compareDate = getMomentDate(compare); - return propertyValueDate.isBefore(compareDate, "day") || propertyValueDate.isSame(compareDate, "day"); + return ( + propertyValueDate.isBefore(compareDate, "day") || + propertyValueDate.isSame(compareDate, "day") + ); } case DateFilterCondition.EXISTS: @@ -63,4 +77,4 @@ export const matchDatePropertyFilter = ( default: throw new Error(`DateFilterCondition not supported: ${condition}`); } -} +}; diff --git a/src/svelte/app/services/filters/custom/match-file-name-filter.ts b/src/svelte/app/services/filters/custom/match-file-name-filter.ts index af7c31d..001d6c3 100644 --- a/src/svelte/app/services/filters/custom/match-file-name-filter.ts +++ b/src/svelte/app/services/filters/custom/match-file-name-filter.ts @@ -3,13 +3,25 @@ import { FileNameFilterCondition } from "src/types"; export const matchFileNameFilter = ( fileName: string, compare: string, - condition: FileNameFilterCondition, + condition: FileNameFilterCondition ): boolean => { - console.assert(fileName === fileName.toLowerCase(), `FileNameFilter fileName "${fileName}" must be lowercase`); - console.assert(/^\s/.test(fileName) === false, `FileNameFilter fileName "${fileName}" must not contain whitespace`); + console.assert( + fileName === fileName.toLowerCase(), + `FileNameFilter fileName "${fileName}" must be lowercase` + ); + console.assert( + /^\s/.test(fileName) === false, + `FileNameFilter fileName "${fileName}" must not contain whitespace` + ); - console.assert(compare === compare.toLowerCase(), `FileNameFilter compare "${compare}" must be lowercase`); - console.assert(/\s$/.test(compare) === false, `FileNameFilter compare "${compare}" must not contain whitespace`); + console.assert( + compare === compare.toLowerCase(), + `FileNameFilter compare "${compare}" must be lowercase` + ); + console.assert( + /\s$/.test(compare) === false, + `FileNameFilter compare "${compare}" must not contain whitespace` + ); switch (condition) { case FileNameFilterCondition.IS: @@ -33,6 +45,8 @@ export const matchFileNameFilter = ( return fileName.endsWith(compare); default: - throw new Error(`FileNameFilterCondition not supported: ${condition}`); + throw new Error( + `FileNameFilterCondition not supported: ${condition}` + ); } }; diff --git a/src/svelte/app/services/filters/custom/match-folder-filter.ts b/src/svelte/app/services/filters/custom/match-folder-filter.ts index 77746ce..6bcbb94 100644 --- a/src/svelte/app/services/filters/custom/match-folder-filter.ts +++ b/src/svelte/app/services/filters/custom/match-folder-filter.ts @@ -8,10 +8,22 @@ export const matchFolderFilter = ( includeSubfolders: boolean; } ): boolean => { - console.assert(filePath === filePath.toLowerCase(), `FolderFilter filePath "${filePath}" must be lowercase`); - console.assert(/^\s/.test(filePath) === false, `FolderFilter filePath "${filePath}" must not contain whitespace`); - console.assert(compare === compare.toLowerCase(), `FolderFilter compare "${compare}" must be lowercase`); - console.assert(/\s$/.test(compare) === false, `FolderFilter compare "${compare}" must not contain whitespace`); + console.assert( + filePath === filePath.toLowerCase(), + `FolderFilter filePath "${filePath}" must be lowercase` + ); + console.assert( + /^\s/.test(filePath) === false, + `FolderFilter filePath "${filePath}" must not contain whitespace` + ); + console.assert( + compare === compare.toLowerCase(), + `FolderFilter compare "${compare}" must be lowercase` + ); + console.assert( + /\s$/.test(compare) === false, + `FolderFilter compare "${compare}" must not contain whitespace` + ); if (compare === "/") { return true; @@ -31,6 +43,8 @@ export const matchFolderFilter = ( return filePath !== compare; default: - throw new Error(`FolderFilterCondition not supported: ${condition}`); + throw new Error( + `FolderFilterCondition not supported: ${condition}` + ); } }; diff --git a/src/svelte/app/services/filters/custom/match-list-property-filter.ts b/src/svelte/app/services/filters/custom/match-list-property-filter.ts index ee36ad0..a77a738 100644 --- a/src/svelte/app/services/filters/custom/match-list-property-filter.ts +++ b/src/svelte/app/services/filters/custom/match-list-property-filter.ts @@ -7,14 +7,35 @@ export const matchListPropertyFilter = ( matchIfNull: boolean ) => { if (propertyValue) { - console.assert(propertyValue.every(value => value.length > 0), `ListPropertyFilter propertyValue "${propertyValue}" must not contain empty strings`); - console.assert(propertyValue.every(value => value === value.toLowerCase()), `ListPropertyFilter propertyValue "${propertyValue}" must be lowercase`); - console.assert(propertyValue.every(value => /^\s/.test(value) === false), `ListPropertyFilter propertyValue "${propertyValue}" must not contain whitespace`); - console.assert(propertyValue.every(value => /\s$/.test(value) === false), `ListPropertyFilter propertyValue "${propertyValue}" must not contain whitespace`); + console.assert( + propertyValue.every((value) => value.length > 0), + `ListPropertyFilter propertyValue "${propertyValue}" must not contain empty strings` + ); + console.assert( + propertyValue.every((value) => value === value.toLowerCase()), + `ListPropertyFilter propertyValue "${propertyValue}" must be lowercase` + ); + console.assert( + propertyValue.every((value) => /^\s/.test(value) === false), + `ListPropertyFilter propertyValue "${propertyValue}" must not contain whitespace` + ); + console.assert( + propertyValue.every((value) => /\s$/.test(value) === false), + `ListPropertyFilter propertyValue "${propertyValue}" must not contain whitespace` + ); } - console.assert(compare.every(value => value === value.toLowerCase()), `ListPropertyFilter compare "${compare}" must be lowercase`); - console.assert(compare.every(value => /^\s/.test(value) === false), `ListPropertyFilter compare "${compare}" must not contain whitespace`); - console.assert(compare.every(value => /\s$/.test(value) === false), `ListPropertyFilter compare "${compare}" must not contain whitespace`); + console.assert( + compare.every((value) => value === value.toLowerCase()), + `ListPropertyFilter compare "${compare}" must be lowercase` + ); + console.assert( + compare.every((value) => /^\s/.test(value) === false), + `ListPropertyFilter compare "${compare}" must not contain whitespace` + ); + console.assert( + compare.every((value) => /\s$/.test(value) === false), + `ListPropertyFilter compare "${compare}" must not contain whitespace` + ); switch (condition) { case ListFilterCondition.CONTAINS: @@ -38,4 +59,4 @@ export const matchListPropertyFilter = ( default: throw new Error(`ListFilterCondition not supported: ${condition}`); } -} +}; diff --git a/src/svelte/app/services/filters/custom/match-number-property-filter.ts b/src/svelte/app/services/filters/custom/match-number-property-filter.ts index 334ebb5..be31dbd 100644 --- a/src/svelte/app/services/filters/custom/match-number-property-filter.ts +++ b/src/svelte/app/services/filters/custom/match-number-property-filter.ts @@ -44,6 +44,8 @@ export const matchNumberPropertyFilter = ( return propertyValue === null; default: - throw new Error(`NumberFilterCondition not supported: ${condition}`); + throw new Error( + `NumberFilterCondition not supported: ${condition}` + ); } }; diff --git a/src/svelte/app/services/filters/custom/match-text-property-filter.ts b/src/svelte/app/services/filters/custom/match-text-property-filter.ts index 95b93b9..566b926 100644 --- a/src/svelte/app/services/filters/custom/match-text-property-filter.ts +++ b/src/svelte/app/services/filters/custom/match-text-property-filter.ts @@ -7,13 +7,31 @@ export const matchTextPropertyFilter = ( matchIfNull: boolean ): boolean => { if (propertyValue) { - console.assert(propertyValue === propertyValue.toLowerCase(), `TextFilter propertyValue "${propertyValue}" must be lowercase`); - console.assert(/^\s/.test(propertyValue) === false, `TextFilter propertyValue "${propertyValue}" must not contain whitespace`); - console.assert(/\s$/.test(propertyValue) === false, `TextFilter propertyValue "${propertyValue}" must not contain whitespace`); + console.assert( + propertyValue === propertyValue.toLowerCase(), + `TextFilter propertyValue "${propertyValue}" must be lowercase` + ); + console.assert( + /^\s/.test(propertyValue) === false, + `TextFilter propertyValue "${propertyValue}" must not contain whitespace` + ); + console.assert( + /\s$/.test(propertyValue) === false, + `TextFilter propertyValue "${propertyValue}" must not contain whitespace` + ); } - console.assert(compare === compare.toLowerCase(), `TextFilter compare "${compare}" must be lowercase`); - console.assert(/^\s/.test(compare) === false, `TextFilter compare "${compare}" must not contain whitespace`); - console.assert(/\s$/.test(compare) === false, `TextFilter compare "${compare}" must not contain whitespace`); + console.assert( + compare === compare.toLowerCase(), + `TextFilter compare "${compare}" must be lowercase` + ); + console.assert( + /^\s/.test(compare) === false, + `TextFilter compare "${compare}" must not contain whitespace` + ); + console.assert( + /\s$/.test(compare) === false, + `TextFilter compare "${compare}" must not contain whitespace` + ); switch (condition) { case TextFilterCondition.IS: diff --git a/src/svelte/app/services/link-utils/link-getters.ts b/src/svelte/app/services/link-utils/link-getters.ts index 21d689c..6309e0a 100644 --- a/src/svelte/app/services/link-utils/link-getters.ts +++ b/src/svelte/app/services/link-utils/link-getters.ts @@ -1,6 +1,6 @@ import { EXTERNAL_EMBED_REGEX as EXTERNAL_EMBED_REGEX, - INTERNAL_EMBED_REGEX, + INTERNAL_EMBED_REGEX } from "./constants"; export const getFirstInternalEmbed = (content: string) => { diff --git a/src/svelte/app/services/link-utils/link-target-getters.ts b/src/svelte/app/services/link-utils/link-target-getters.ts index 1cfc089..1a8ee6d 100644 --- a/src/svelte/app/services/link-utils/link-target-getters.ts +++ b/src/svelte/app/services/link-utils/link-target-getters.ts @@ -1,7 +1,7 @@ import { WIKI_LINK_REGEX, INTERNAL_EMBED_REGEX, - EXTERNAL_EMBED_REGEX, + EXTERNAL_EMBED_REGEX } from "./constants"; export const getWikiLinkTarget = (value: string) => { diff --git a/src/svelte/app/services/link-utils/link-validators.ts b/src/svelte/app/services/link-utils/link-validators.ts index a7cf1d7..e838e7b 100644 --- a/src/svelte/app/services/link-utils/link-validators.ts +++ b/src/svelte/app/services/link-utils/link-validators.ts @@ -2,7 +2,7 @@ import { INTERNAL_EMBED_REGEX, EXTERNAL_EMBED_REGEX, URL_REGEX, - WIKI_LINK_REGEX, + WIKI_LINK_REGEX } from "./constants"; export const isInternalEmbed = (value: string) => { diff --git a/src/svelte/app/services/open-file.ts b/src/svelte/app/services/open-file.ts index bb9679f..0dd6a79 100644 --- a/src/svelte/app/services/open-file.ts +++ b/src/svelte/app/services/open-file.ts @@ -14,7 +14,7 @@ export const openInCurrentTab = ( plugin.app.workspace.setActiveLeaf(leaf); } else { plugin.app.workspace.openLinkText("", filePath, "tab", { - active: true, + active: true }); } }; diff --git a/src/svelte/app/services/random-file-sort-store.ts b/src/svelte/app/services/random-file-sort-store.ts index 0edccbc..ef09eda 100644 --- a/src/svelte/app/services/random-file-sort-store.ts +++ b/src/svelte/app/services/random-file-sort-store.ts @@ -11,7 +11,7 @@ function createRandomFileSortStore() { Logger.trace({ fileName: "random-file-sort-store.ts", functionName: "load", - message: "called", + message: "called" }); const files = app.vault.getFiles(); @@ -59,7 +59,7 @@ function createRandomFileSortStore() { subscribe, onFileCreate: handleFileCreate, onFileRename: handleFileRename, - onFileDelete: handleFileDelete, + onFileDelete: handleFileDelete }; } diff --git a/src/svelte/app/services/render-data.ts b/src/svelte/app/services/render-data.ts index 55d1ebb..a50ed27 100644 --- a/src/svelte/app/services/render-data.ts +++ b/src/svelte/app/services/render-data.ts @@ -3,26 +3,26 @@ import { App, type FrontMatterCache, TFile } from "obsidian"; import { type FileTextProperties, loadPropertyValue, - loadTextProperties, + loadTextProperties } from "src/svelte/shared/services/load-property-value"; import { getTimeMillis, - isDateSupported, + isDateSupported } from "src/svelte/shared/services/time-utils"; import { type CoverImageFit, PropertyType, - type VaultExplorerPluginSettings, + type VaultExplorerPluginSettings } from "src/types"; import type { FileRenderData } from "../types"; import { getFirstExternalEmbed, - getFirstInternalEmbed, + getFirstInternalEmbed } from "./link-utils/link-getters"; import { getExternalEmbedTarget, getInternalEmbedTarget, - getWikiLinkTarget, + getWikiLinkTarget } from "./link-utils/link-target-getters"; import { isUrl, isWikiLink } from "./link-utils/link-validators"; import { removeFrontmatter } from "./utils/content-utils"; @@ -45,7 +45,7 @@ export const formatFileDataForRender = ({ settings, file, fileId, - fileContent, + fileContent }: { app: App; settings: VaultExplorerPluginSettings; @@ -67,7 +67,7 @@ export const formatFileDataForRender = ({ coverImageFit: coverImageFitProp, custom1: custom1Prop, custom2: custom2Prop, - custom3: custom3Prop, + custom3: custom3Prop } = settings.properties; let tags: string[] | null = loadPropertyValue( @@ -240,7 +240,7 @@ export const formatFileDataForRender = ({ modifiedMillis, custom1, custom2, - custom3, + custom3 }; }; diff --git a/src/svelte/app/services/smi-cache.ts b/src/svelte/app/services/smi-cache.ts index 7fb5a94..495f57b 100644 --- a/src/svelte/app/services/smi-cache.ts +++ b/src/svelte/app/services/smi-cache.ts @@ -31,17 +31,17 @@ export const getSMICacheEntry = async (websiteUrl: string) => { Logger.trace({ fileName: "smi-cache.ts", functionName: "getSMICacheEntry", - message: "called", + message: "called" }); Logger.debug( { fileName: "grid-card.svelte", functionName: "getCachedSocialMediaUrl", - message: "getting cached entry", + message: "getting cached entry" }, { - websiteUrl, + websiteUrl } ); const db = await openDatabase(); @@ -58,18 +58,18 @@ export const putSMICacheEntry = async (url: string, smiUrl: string | null) => { Logger.trace({ fileName: "smi-cache.ts", functionName: "putSMICacheEntry", - message: "called", + message: "called" }); Logger.debug( { fileName: "smi-cache.ts", functionName: "putSMICacheEntry", - message: "putting entry", + message: "putting entry" }, { url, - smiUrl, + smiUrl } ); @@ -77,7 +77,7 @@ export const putSMICacheEntry = async (url: string, smiUrl: string | null) => { await db.put(STORE_NAME, { url, smiUrl, - timestamp: Date.now(), + timestamp: Date.now() }); }; @@ -85,7 +85,7 @@ export const clearSMICache = async () => { Logger.trace({ fileName: "smi-cache.ts", functionName: "clearSMICache", - message: "called", + message: "called" }); try { const db = await openDatabase(); @@ -98,7 +98,7 @@ export const clearSMICache = async () => { { fileName: "smi-cache.ts", functionName: "clearSMICache", - message: "failed to clear cache", + message: "failed to clear cache" }, error.message ); @@ -109,6 +109,6 @@ const openDatabase = () => { return openDB(DATABASE_NAME, 1, { upgrade(db) { db.createObjectStore(STORE_NAME, { keyPath: "url" }); - }, + } }); }; diff --git a/src/svelte/app/services/utils/image-utils.ts b/src/svelte/app/services/utils/image-utils.ts index 6e21b45..cdb8053 100644 --- a/src/svelte/app/services/utils/image-utils.ts +++ b/src/svelte/app/services/utils/image-utils.ts @@ -6,7 +6,7 @@ const IMAGE_EXTENSIONS = [ "webp", "svg", "avif", - "bmp", + "bmp" ]; export const isImageExtension = (extension: string) => { diff --git a/src/svelte/app/services/utils/json-utils.ts b/src/svelte/app/services/utils/json-utils.ts index 3e0c46c..d44717d 100644 --- a/src/svelte/app/services/utils/json-utils.ts +++ b/src/svelte/app/services/utils/json-utils.ts @@ -7,7 +7,7 @@ export const parseItems = (rawData: string): T[] => { export const stringifyItems = (items: unknown[]) => { return JSON.stringify( { - items, + items }, null, 2 diff --git a/src/svelte/custom-filter-app/services/display-name-utils.ts b/src/svelte/custom-filter-app/services/display-name-utils.ts index fd38880..176392b 100644 --- a/src/svelte/custom-filter-app/services/display-name-utils.ts +++ b/src/svelte/custom-filter-app/services/display-name-utils.ts @@ -9,7 +9,7 @@ import { FolderFilterCondition, ListFilterCondition, NumberFilterCondition, - TextFilterCondition, + TextFilterCondition } from "src/types"; export const getDisplayNameForFilterRuleType = (type: FilterRuleType) => { diff --git a/src/svelte/custom-filter-app/services/utils.ts b/src/svelte/custom-filter-app/services/utils.ts index b84662e..88fca6d 100644 --- a/src/svelte/custom-filter-app/services/utils.ts +++ b/src/svelte/custom-filter-app/services/utils.ts @@ -2,7 +2,7 @@ import { FilterRuleType, PropertyType, TextFilterCondition, - type TextPropertyFilterRule, + type TextPropertyFilterRule } from "src/types"; import { generateRandomId } from "../../shared/services/random"; @@ -16,6 +16,6 @@ export const createPropertyFilter = (): TextPropertyFilterRule => { isEnabled: true, condition: TextFilterCondition.IS, value: "", - matchWhenPropertyDNE: false, + matchWhenPropertyDNE: false }; }; diff --git a/src/svelte/shared/services/load-property-value.ts b/src/svelte/shared/services/load-property-value.ts index d2bcafd..e62dd5b 100644 --- a/src/svelte/shared/services/load-property-value.ts +++ b/src/svelte/shared/services/load-property-value.ts @@ -36,7 +36,7 @@ export const loadTextProperties = ( textProperties.push({ name: key, - value: value as string, + value: value as string }); } } diff --git a/src/svelte/shared/services/time-utils.ts b/src/svelte/shared/services/time-utils.ts index 22c48fd..315a6a5 100644 --- a/src/svelte/shared/services/time-utils.ts +++ b/src/svelte/shared/services/time-utils.ts @@ -83,7 +83,7 @@ export const getEndOfDayMillis = (date: string) => { hour: 23, minute: 59, second: 59, - millisecond: 999, + millisecond: 999 }); return day.valueOf(); }; diff --git a/src/types/index.guard.ts b/src/types/index.guard.ts index ec648f3..1e1d2d8 100644 --- a/src/types/index.guard.ts +++ b/src/types/index.guard.ts @@ -14,7 +14,7 @@ import { PropertyType, TExplorerView, TextFilterCondition, - type VaultExplorerPluginSettings, + type VaultExplorerPluginSettings } from "./index"; export function isVaultExplorerPluginSettings( diff --git a/src/types/index.ts b/src/types/index.ts index 6c5d598..bec50b4 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -106,7 +106,7 @@ export enum TExplorerView { GRID = "grid", LIST = "list", FEED = "feed", - TABLE = "table", + TABLE = "table" } export type FilterOperator = "and" | "or"; @@ -119,14 +119,14 @@ export enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } export enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } export enum NumberFilterCondition { @@ -137,14 +137,14 @@ export enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } export enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } export enum DateFilterCondition { @@ -154,19 +154,19 @@ export enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } export enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } export enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } export enum FileNameFilterCondition { @@ -175,7 +175,7 @@ export enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } export type FilterCondition = @@ -195,14 +195,14 @@ export enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } export enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } export enum DatePropertyFilterValue { @@ -213,7 +213,7 @@ export enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-0.3.3.ts b/src/types/types-0.3.3.ts index a7e70d7..c12b84a 100644 --- a/src/types/types-0.3.3.ts +++ b/src/types/types-0.3.3.ts @@ -54,7 +54,7 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } type FilterOperator = "and" | "or"; diff --git a/src/types/types-0.5.5.ts b/src/types/types-0.5.5.ts index 0619607..b5af3ed 100644 --- a/src/types/types-0.5.5.ts +++ b/src/types/types-0.5.5.ts @@ -28,7 +28,7 @@ export { NumberFilterCondition as NumberFilterCondition_0_5_5, ListFilterCondition as ListFilterCondition_0_5_5, CheckboxFilterCondition as CheckboxFilterCondition_0_5_5, - DateFilterCondition as DateFilterCondition_0_5_5, + DateFilterCondition as DateFilterCondition_0_5_5 }; type FilterOperator = "and" | "or"; @@ -41,14 +41,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -59,14 +59,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -74,7 +74,7 @@ enum DateFilterCondition { IS_BEFORE = "is-before", IS_AFTER = "is-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } type FilterCondition = @@ -99,7 +99,7 @@ enum PropertyFilterType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } interface TextPropertyFilter extends BasePropertyFilter { diff --git a/src/types/types-1-37-0.ts b/src/types/types-1-37-0.ts index 62da279..a0fc848 100644 --- a/src/types/types-1-37-0.ts +++ b/src/types/types-1-37-0.ts @@ -132,7 +132,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -145,14 +145,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -163,14 +163,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -180,19 +180,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -201,7 +201,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -221,14 +221,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -239,7 +239,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.0.1.ts b/src/types/types-1.0.1.ts index 8c171a9..b6d9150 100644 --- a/src/types/types-1.0.1.ts +++ b/src/types/types-1.0.1.ts @@ -33,14 +33,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -51,14 +51,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -66,7 +66,7 @@ enum DateFilterCondition { IS_BEFORE = "is-before", IS_AFTER = "is-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } type FilterCondition = @@ -91,7 +91,7 @@ enum PropertyFilterType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } interface TextPropertyFilter extends BasePropertyFilter { diff --git a/src/types/types-1.12.1.ts b/src/types/types-1.12.1.ts index 682c1eb..1fe1f4d 100644 --- a/src/types/types-1.12.1.ts +++ b/src/types/types-1.12.1.ts @@ -8,7 +8,7 @@ export interface VaultExplorerPluginSettings_1_12_1 { custom1: string; custom2: string; custom3: string; - }, + }; filters: { search: string; onlyFavorites: boolean; @@ -17,13 +17,13 @@ export interface VaultExplorerPluginSettings_1_12_1 { custom: { selectedGroupId: string; groups: FilterGroup[]; - } - }, + }; + }; views: { currentView: ViewType; order: ViewType[]; titleWrapping: WordBreak; - } + }; pageSize: number; pluginVersion: string | null; } @@ -34,7 +34,7 @@ type WordBreak = "normal" | "break-word"; enum ViewType { GRID = "grid", - LIST = "list", + LIST = "list" } type FilterOperator = "and" | "or"; @@ -47,14 +47,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -65,14 +65,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -82,19 +82,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -103,10 +103,18 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } -type FilterCondition = TextFilterCondition | NumberFilterCondition | DateFilterCondition | CheckboxFilterCondition | ListFilterCondition | ContentFilterCondition | FolderFilterCondition | FileNameFilterCondition; +type FilterCondition = + | TextFilterCondition + | NumberFilterCondition + | DateFilterCondition + | CheckboxFilterCondition + | ListFilterCondition + | ContentFilterCondition + | FolderFilterCondition + | FileNameFilterCondition; //This matches the Obsidian property types enum PropertyType { @@ -115,14 +123,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -198,8 +206,17 @@ interface ContentFilterRule extends BaseFilterRule { condition: ContentFilterCondition; } -type FilterRule = PropertyFilterRule | FolderFilterRule | FileNameFilterRule | ContentFilterRule; -type PropertyFilterRule = TextPropertyFilterRule | NumberPropertyFilterRule | ListPropertyFilterRule | CheckboxPropertyFilterRule | DatePropertyFilterRule; +type FilterRule = + | PropertyFilterRule + | FolderFilterRule + | FileNameFilterRule + | ContentFilterRule; +type PropertyFilterRule = + | TextPropertyFilterRule + | NumberPropertyFilterRule + | ListPropertyFilterRule + | CheckboxPropertyFilterRule + | DatePropertyFilterRule; interface FilterGroup { id: string; @@ -208,6 +225,17 @@ interface FilterGroup { isEnabled: boolean; } -type SortFilter = "file-name-asc" | "file-name-desc" | "modified-asc" | "modified-desc"; +type SortFilter = + | "file-name-asc" + | "file-name-desc" + | "modified-asc" + | "modified-desc"; -type TimestampFilter = "created-today" | "modified-today" | "created-this-week" | "modified-this-week" | "created-2-weeks" | "modified-2-weeks" | "all"; +type TimestampFilter = + | "created-today" + | "modified-today" + | "created-this-week" + | "modified-this-week" + | "created-2-weeks" + | "modified-2-weeks" + | "all"; diff --git a/src/types/types-1.13.1.ts b/src/types/types-1.13.1.ts index bf6339b..da14e8c 100644 --- a/src/types/types-1.13.1.ts +++ b/src/types/types-1.13.1.ts @@ -8,7 +8,7 @@ export interface VaultExplorerPluginSettings_1_13_1 { custom1: string; custom2: string; custom3: string; - }, + }; filters: { search: string; onlyFavorites: boolean; @@ -17,14 +17,14 @@ export interface VaultExplorerPluginSettings_1_13_1 { custom: { selectedGroupId: string; groups: FilterGroup[]; - } - }, + }; + }; views: { currentView: ViewType; order: ViewType[]; titleWrapping: WordBreak; enableClockUpdates: boolean; - } + }; pageSize: number; pluginVersion: string | null; } @@ -33,7 +33,7 @@ type WordBreak = "normal" | "break-word"; enum ViewType { GRID = "grid", - LIST = "list", + LIST = "list" } type FilterOperator = "and" | "or"; @@ -46,14 +46,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -64,14 +64,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -81,19 +81,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -102,10 +102,18 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } -type FilterCondition = TextFilterCondition | NumberFilterCondition | DateFilterCondition | CheckboxFilterCondition | ListFilterCondition | ContentFilterCondition | FolderFilterCondition | FileNameFilterCondition; +type FilterCondition = + | TextFilterCondition + | NumberFilterCondition + | DateFilterCondition + | CheckboxFilterCondition + | ListFilterCondition + | ContentFilterCondition + | FolderFilterCondition + | FileNameFilterCondition; //This matches the Obsidian property types enum PropertyType { @@ -114,14 +122,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -197,8 +205,17 @@ interface ContentFilterRule extends BaseFilterRule { condition: ContentFilterCondition; } -type FilterRule = PropertyFilterRule | FolderFilterRule | FileNameFilterRule | ContentFilterRule; -type PropertyFilterRule = TextPropertyFilterRule | NumberPropertyFilterRule | ListPropertyFilterRule | CheckboxPropertyFilterRule | DatePropertyFilterRule; +type FilterRule = + | PropertyFilterRule + | FolderFilterRule + | FileNameFilterRule + | ContentFilterRule; +type PropertyFilterRule = + | TextPropertyFilterRule + | NumberPropertyFilterRule + | ListPropertyFilterRule + | CheckboxPropertyFilterRule + | DatePropertyFilterRule; interface FilterGroup { id: string; @@ -208,6 +225,17 @@ interface FilterGroup { isSticky: boolean; } -type SortFilter = "file-name-asc" | "file-name-desc" | "modified-asc" | "modified-desc"; +type SortFilter = + | "file-name-asc" + | "file-name-desc" + | "modified-asc" + | "modified-desc"; -type TimestampFilter = "created-today" | "modified-today" | "created-this-week" | "modified-this-week" | "created-2-weeks" | "modified-2-weeks" | "all"; +type TimestampFilter = + | "created-today" + | "modified-today" + | "created-this-week" + | "modified-this-week" + | "created-2-weeks" + | "modified-2-weeks" + | "all"; diff --git a/src/types/types-1.14.2.ts b/src/types/types-1.14.2.ts index 22bb619..2dff9bc 100644 --- a/src/types/types-1.14.2.ts +++ b/src/types/types-1.14.2.ts @@ -8,20 +8,20 @@ export interface VaultExplorerPluginSettings_1_14_2 { custom1: string; custom2: string; custom3: string; - }, + }; filters: { search: SearchFilter; favorites: FavoritesFilter; sort: SortFilter; timestamp: TimestampFilter; custom: CustomFilter; - }, + }; views: { currentView: ViewType; order: ViewType[]; titleWrapping: WordBreak; enableClockUpdates: boolean; - } + }; enableScrollButtons: boolean; pageSize: number; pluginVersion: string | null; @@ -35,12 +35,12 @@ interface SearchFilter { interface FavoritesFilter { isEnabled: boolean; value: boolean; -}; +} interface SortFilter { isEnabled: boolean; value: SortFilterOption; -}; +} interface TimestampFilter { isEnabled: boolean; @@ -53,15 +53,26 @@ interface CustomFilter { groups: FilterGroup[]; } -type TimestampFilterOption = "created-today" | "modified-today" | "created-this-week" | "modified-this-week" | "created-2-weeks" | "modified-2-weeks" | "all"; +type TimestampFilterOption = + | "created-today" + | "modified-today" + | "created-this-week" + | "modified-this-week" + | "created-2-weeks" + | "modified-2-weeks" + | "all"; -type SortFilterOption = "file-name-asc" | "file-name-desc" | "modified-asc" | "modified-desc"; +type SortFilterOption = + | "file-name-asc" + | "file-name-desc" + | "modified-asc" + | "modified-desc"; type WordBreak = "normal" | "break-word"; enum ViewType { GRID = "grid", - LIST = "list", + LIST = "list" } type FilterOperator = "and" | "or"; @@ -74,14 +85,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -92,14 +103,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -109,19 +120,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -130,10 +141,18 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } -type FilterCondition = TextFilterCondition | NumberFilterCondition | DateFilterCondition | CheckboxFilterCondition | ListFilterCondition | ContentFilterCondition | FolderFilterCondition | FileNameFilterCondition; +type FilterCondition = + | TextFilterCondition + | NumberFilterCondition + | DateFilterCondition + | CheckboxFilterCondition + | ListFilterCondition + | ContentFilterCondition + | FolderFilterCondition + | FileNameFilterCondition; //This matches the Obsidian property types enum PropertyType { @@ -142,14 +161,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -225,8 +244,17 @@ interface ContentFilterRule extends BaseFilterRule { condition: ContentFilterCondition; } -type FilterRule = PropertyFilterRule | FolderFilterRule | FileNameFilterRule | ContentFilterRule; -type PropertyFilterRule = TextPropertyFilterRule | NumberPropertyFilterRule | ListPropertyFilterRule | CheckboxPropertyFilterRule | DatePropertyFilterRule; +type FilterRule = + | PropertyFilterRule + | FolderFilterRule + | FileNameFilterRule + | ContentFilterRule; +type PropertyFilterRule = + | TextPropertyFilterRule + | NumberPropertyFilterRule + | ListPropertyFilterRule + | CheckboxPropertyFilterRule + | DatePropertyFilterRule; interface FilterGroup { id: string; diff --git a/src/types/types-1.16.0.ts b/src/types/types-1.16.0.ts index f01cbe8..fb55f91 100644 --- a/src/types/types-1.16.0.ts +++ b/src/types/types-1.16.0.ts @@ -75,7 +75,7 @@ type WordBreak = "normal" | "break-word"; enum ViewType { GRID = "grid", LIST = "list", - FEED = "feed", + FEED = "feed" } type FilterOperator = "and" | "or"; @@ -88,14 +88,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -106,14 +106,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -123,19 +123,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -144,7 +144,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -164,14 +164,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -182,7 +182,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.2.0.ts b/src/types/types-1.2.0.ts index 73c57a0..949a12e 100644 --- a/src/types/types-1.2.0.ts +++ b/src/types/types-1.2.0.ts @@ -6,7 +6,7 @@ export interface VaultExplorerPluginSettings_1_2_0 { custom1: string; custom2: string; custom3: string; - }, + }; filters: { folder: string; search: string; @@ -16,12 +16,12 @@ export interface VaultExplorerPluginSettings_1_2_0 { properties: { selectedGroupId: string; groups: PropertyFilterGroup[]; - } - }, + }; + }; views: { currentView: ViewType; order: ViewType[]; - } + }; pageSize: number; pluginVersion: string | null; } @@ -29,10 +29,9 @@ export interface VaultExplorerPluginSettings_1_2_0 { export { ViewType as ViewType_1_2_0 }; enum ViewType { GRID = "grid", - LIST = "list", + LIST = "list" } - type FilterOperator = "and" | "or"; enum TextFilterCondition { @@ -43,14 +42,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -61,14 +60,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -76,10 +75,15 @@ enum DateFilterCondition { IS_BEFORE = "is-before", IS_AFTER = "is-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } -type FilterCondition = TextFilterCondition | NumberFilterCondition | DateFilterCondition | CheckboxFilterCondition | ListFilterCondition; +type FilterCondition = + | TextFilterCondition + | NumberFilterCondition + | DateFilterCondition + | CheckboxFilterCondition + | ListFilterCondition; interface BasePropertyFilter { id: string; @@ -96,7 +100,7 @@ enum PropertyFilterType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } interface TextPropertyFilter extends BasePropertyFilter { @@ -110,12 +114,12 @@ interface NumberPropertyFilter extends BasePropertyFilter { } interface ListPropertyFilter extends BasePropertyFilter { - type: PropertyFilterType.LIST + type: PropertyFilterType.LIST; condition: ListFilterCondition; } interface CheckboxPropertyFilter extends BasePropertyFilter { - type: PropertyFilterType.CHECKBOX + type: PropertyFilterType.CHECKBOX; condition: CheckboxFilterCondition; } @@ -124,7 +128,12 @@ interface DatePropertyFilter extends BasePropertyFilter { condition: DateFilterCondition; } -type PropertyFilter = TextPropertyFilter | NumberPropertyFilter | ListPropertyFilter | CheckboxPropertyFilter | DatePropertyFilter; +type PropertyFilter = + | TextPropertyFilter + | NumberPropertyFilter + | ListPropertyFilter + | CheckboxPropertyFilter + | DatePropertyFilter; interface PropertyFilterGroup { id: string; @@ -133,6 +142,17 @@ interface PropertyFilterGroup { isEnabled: boolean; } -type SortFilter = "file-name-asc" | "file-name-desc" | "modified-asc" | "modified-desc"; +type SortFilter = + | "file-name-asc" + | "file-name-desc" + | "modified-asc" + | "modified-desc"; -type TimestampFilter = "created-today" | "modified-today" | "created-this-week" | "modified-this-week" | "created-2-weeks" | "modified-2-weeks" | "all"; +type TimestampFilter = + | "created-today" + | "modified-today" + | "created-this-week" + | "modified-this-week" + | "created-2-weeks" + | "modified-2-weeks" + | "all"; diff --git a/src/types/types-1.2.1.ts b/src/types/types-1.2.1.ts index b247a7d..7fa0cf6 100644 --- a/src/types/types-1.2.1.ts +++ b/src/types/types-1.2.1.ts @@ -6,7 +6,7 @@ export interface VaultExplorerPluginSettings_1_2_1 { custom1: string; custom2: string; custom3: string; - }, + }; filters: { folder: string; search: string; @@ -16,13 +16,13 @@ export interface VaultExplorerPluginSettings_1_2_1 { properties: { selectedGroupId: string; groups: PropertyFilterGroup[]; - } - }, + }; + }; views: { currentView: ViewType; order: ViewType[]; titleWrapping: WordBreak; - } + }; pageSize: number; pluginVersion: string | null; } @@ -31,7 +31,7 @@ type WordBreak = "normal" | "break-word"; enum ViewType { GRID = "grid", - LIST = "list", + LIST = "list" } type FilterOperator = "and" | "or"; @@ -44,14 +44,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -62,14 +62,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -77,10 +77,15 @@ enum DateFilterCondition { IS_BEFORE = "is-before", IS_AFTER = "is-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } -type FilterCondition = TextFilterCondition | NumberFilterCondition | DateFilterCondition | CheckboxFilterCondition | ListFilterCondition; +type FilterCondition = + | TextFilterCondition + | NumberFilterCondition + | DateFilterCondition + | CheckboxFilterCondition + | ListFilterCondition; interface BasePropertyFilter { id: string; @@ -97,7 +102,7 @@ enum PropertyFilterType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } interface TextPropertyFilter extends BasePropertyFilter { @@ -111,12 +116,12 @@ interface NumberPropertyFilter extends BasePropertyFilter { } interface ListPropertyFilter extends BasePropertyFilter { - type: PropertyFilterType.LIST + type: PropertyFilterType.LIST; condition: ListFilterCondition; } interface CheckboxPropertyFilter extends BasePropertyFilter { - type: PropertyFilterType.CHECKBOX + type: PropertyFilterType.CHECKBOX; condition: CheckboxFilterCondition; } @@ -125,7 +130,12 @@ interface DatePropertyFilter extends BasePropertyFilter { condition: DateFilterCondition; } -type PropertyFilter = TextPropertyFilter | NumberPropertyFilter | ListPropertyFilter | CheckboxPropertyFilter | DatePropertyFilter; +type PropertyFilter = + | TextPropertyFilter + | NumberPropertyFilter + | ListPropertyFilter + | CheckboxPropertyFilter + | DatePropertyFilter; interface PropertyFilterGroup { id: string; @@ -134,6 +144,17 @@ interface PropertyFilterGroup { isEnabled: boolean; } -type SortFilter = "file-name-asc" | "file-name-desc" | "modified-asc" | "modified-desc"; +type SortFilter = + | "file-name-asc" + | "file-name-desc" + | "modified-asc" + | "modified-desc"; -type TimestampFilter = "created-today" | "modified-today" | "created-this-week" | "modified-this-week" | "created-2-weeks" | "modified-2-weeks" | "all"; +type TimestampFilter = + | "created-today" + | "modified-today" + | "created-this-week" + | "modified-this-week" + | "created-2-weeks" + | "modified-2-weeks" + | "all"; diff --git a/src/types/types-1.20.0.ts b/src/types/types-1.20.0.ts index 94504d3..a97218b 100644 --- a/src/types/types-1.20.0.ts +++ b/src/types/types-1.20.0.ts @@ -102,7 +102,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -115,14 +115,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -133,14 +133,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -150,19 +150,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -171,7 +171,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -191,14 +191,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -209,7 +209,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.21.2.ts b/src/types/types-1.21.2.ts index e02cb33..0a2a811 100644 --- a/src/types/types-1.21.2.ts +++ b/src/types/types-1.21.2.ts @@ -103,7 +103,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -116,14 +116,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -134,14 +134,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -151,19 +151,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -172,7 +172,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -192,14 +192,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -210,7 +210,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.22.0.ts b/src/types/types-1.22.0.ts index c09ea79..3713281 100644 --- a/src/types/types-1.22.0.ts +++ b/src/types/types-1.22.0.ts @@ -108,7 +108,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -121,14 +121,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -139,14 +139,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -156,19 +156,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -177,7 +177,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -197,14 +197,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -215,7 +215,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.23.0.ts b/src/types/types-1.23.0.ts index 3ea8af6..2aed1cf 100644 --- a/src/types/types-1.23.0.ts +++ b/src/types/types-1.23.0.ts @@ -110,7 +110,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -123,14 +123,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -141,14 +141,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -158,19 +158,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -179,7 +179,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -199,14 +199,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -217,7 +217,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.23.2.ts b/src/types/types-1.23.2.ts index 02c21ff..ef90d13 100644 --- a/src/types/types-1.23.2.ts +++ b/src/types/types-1.23.2.ts @@ -110,7 +110,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -123,14 +123,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -141,14 +141,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -158,19 +158,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -179,7 +179,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -199,14 +199,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -217,7 +217,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.24.2.ts b/src/types/types-1.24.2.ts index 6651c88..5661030 100644 --- a/src/types/types-1.24.2.ts +++ b/src/types/types-1.24.2.ts @@ -112,7 +112,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -125,14 +125,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -143,14 +143,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -160,19 +160,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -181,7 +181,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -201,14 +201,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -219,7 +219,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.25.2.ts b/src/types/types-1.25.2.ts index ad3b15e..a8aee7a 100644 --- a/src/types/types-1.25.2.ts +++ b/src/types/types-1.25.2.ts @@ -115,7 +115,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -128,14 +128,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -146,14 +146,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -163,19 +163,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -184,7 +184,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -204,14 +204,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -222,7 +222,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.26.3.ts b/src/types/types-1.26.3.ts index 5deb4ea..c5ba47b 100644 --- a/src/types/types-1.26.3.ts +++ b/src/types/types-1.26.3.ts @@ -116,7 +116,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -129,14 +129,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -147,14 +147,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -164,19 +164,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -185,7 +185,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -205,14 +205,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -223,7 +223,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.28.0.ts b/src/types/types-1.28.0.ts index a9246b1..ff5e06b 100644 --- a/src/types/types-1.28.0.ts +++ b/src/types/types-1.28.0.ts @@ -122,7 +122,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -135,14 +135,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -153,14 +153,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -170,19 +170,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -191,7 +191,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -211,14 +211,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -229,7 +229,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.29.0.ts b/src/types/types-1.29.0.ts index 0ab4d81..b3a0aac 100644 --- a/src/types/types-1.29.0.ts +++ b/src/types/types-1.29.0.ts @@ -124,7 +124,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -137,14 +137,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -155,14 +155,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -172,19 +172,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -193,7 +193,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -213,14 +213,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -231,7 +231,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.30.5.ts b/src/types/types-1.30.5.ts index ad2bf6b..72e6858 100644 --- a/src/types/types-1.30.5.ts +++ b/src/types/types-1.30.5.ts @@ -127,7 +127,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -140,14 +140,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -158,14 +158,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -175,19 +175,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -196,7 +196,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -216,14 +216,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -234,7 +234,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.32.2.ts b/src/types/types-1.32.2.ts index 95e9539..a2d2209 100644 --- a/src/types/types-1.32.2.ts +++ b/src/types/types-1.32.2.ts @@ -125,7 +125,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -138,14 +138,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -156,14 +156,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -173,19 +173,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -194,7 +194,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -214,14 +214,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -232,7 +232,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.36.3.ts b/src/types/types-1.36.3.ts index 243a8b8..5ee74ce 100644 --- a/src/types/types-1.36.3.ts +++ b/src/types/types-1.36.3.ts @@ -122,7 +122,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -135,14 +135,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -153,14 +153,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -170,19 +170,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -191,7 +191,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -211,14 +211,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -229,7 +229,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.38.0.ts b/src/types/types-1.38.0.ts index 8a1d48c..fa5257b 100644 --- a/src/types/types-1.38.0.ts +++ b/src/types/types-1.38.0.ts @@ -131,7 +131,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -144,14 +144,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -162,14 +162,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -179,19 +179,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -200,7 +200,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -220,14 +220,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -238,7 +238,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.39.0.ts b/src/types/types-1.39.0.ts index 26cbad9..e44f237 100644 --- a/src/types/types-1.39.0.ts +++ b/src/types/types-1.39.0.ts @@ -133,7 +133,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -146,14 +146,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -164,14 +164,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -181,19 +181,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -202,7 +202,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -222,14 +222,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -240,7 +240,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.40.2.ts b/src/types/types-1.40.2.ts index bbad4f7..f6f6c87 100644 --- a/src/types/types-1.40.2.ts +++ b/src/types/types-1.40.2.ts @@ -132,7 +132,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -145,14 +145,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -163,14 +163,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -180,19 +180,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -201,7 +201,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -221,14 +221,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -239,7 +239,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.41.1.ts b/src/types/types-1.41.1.ts index 0ae4e8d..904b810 100644 --- a/src/types/types-1.41.1.ts +++ b/src/types/types-1.41.1.ts @@ -136,7 +136,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -149,14 +149,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -167,14 +167,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -184,19 +184,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -205,7 +205,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -225,14 +225,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -243,7 +243,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.44.6.ts b/src/types/types-1.44.6.ts index ddf3eff..ecfcdf0 100644 --- a/src/types/types-1.44.6.ts +++ b/src/types/types-1.44.6.ts @@ -116,7 +116,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -129,14 +129,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -147,14 +147,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -164,19 +164,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -185,7 +185,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -205,14 +205,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -223,7 +223,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.45.0.ts b/src/types/types-1.45.0.ts index 9c0fe33..f1e4af1 100644 --- a/src/types/types-1.45.0.ts +++ b/src/types/types-1.45.0.ts @@ -117,7 +117,7 @@ enum TExplorerView { FEED = "feed", TABLE = "table", RECOMMENDED = "recommended", - RELATED = "related", + RELATED = "related" } type FilterOperator = "and" | "or"; @@ -130,14 +130,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -148,14 +148,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -165,19 +165,19 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ContentFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", IS_EMPTY = "is-empty", - IS_NOT_EMPTY = "is-not-empty", + IS_NOT_EMPTY = "is-not-empty" } enum FolderFilterCondition { IS = "is", - IS_NOT = "is-not", + IS_NOT = "is-not" } enum FileNameFilterCondition { @@ -186,7 +186,7 @@ enum FileNameFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", STARTS_WITH = "starts-with", - ENDS_WITH = "ends-with", + ENDS_WITH = "ends-with" } type FilterCondition = @@ -206,14 +206,14 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum FilterRuleType { PROPERTY = "property", FOLDER = "folder", FILE_NAME = "file-name", - CONTENT = "content", + CONTENT = "content" } enum DatePropertyFilterValue { @@ -224,7 +224,7 @@ enum DatePropertyFilterValue { ONE_WEEK_AGO = "one-week-ago", ONE_MONTH_FROM_NOW = "one-month-from-now", ONE_MONTH_AGO = "one-month-ago", - CUSTOM = "custom", + CUSTOM = "custom" } interface BaseFilterRule { diff --git a/src/types/types-1.5.0.ts b/src/types/types-1.5.0.ts index 2f58b0c..b367c80 100644 --- a/src/types/types-1.5.0.ts +++ b/src/types/types-1.5.0.ts @@ -6,7 +6,7 @@ export interface VaultExplorerPluginSettings_1_5_0 { custom1: string; custom2: string; custom3: string; - }, + }; filters: { folder: string; search: string; @@ -16,13 +16,13 @@ export interface VaultExplorerPluginSettings_1_5_0 { properties: { selectedGroupId: string; groups: PropertyFilterGroup[]; - } - }, + }; + }; views: { currentView: ViewType; order: ViewType[]; titleWrapping: WordBreak; - } + }; pageSize: number; pluginVersion: string | null; } @@ -35,7 +35,7 @@ type WordBreak = "normal" | "break-word"; enum ViewType { GRID = "grid", - LIST = "list", + LIST = "list" } type FilterOperator = "and" | "or"; @@ -48,14 +48,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -66,14 +66,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -81,10 +81,15 @@ enum DateFilterCondition { IS_BEFORE = "is-before", IS_AFTER = "is-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } -type FilterCondition = TextFilterCondition | NumberFilterCondition | DateFilterCondition | CheckboxFilterCondition | ListFilterCondition; +type FilterCondition = + | TextFilterCondition + | NumberFilterCondition + | DateFilterCondition + | CheckboxFilterCondition + | ListFilterCondition; interface BasePropertyFilter { id: string; @@ -102,7 +107,7 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } interface TextPropertyFilter extends BasePropertyFilter { @@ -116,12 +121,12 @@ interface NumberPropertyFilter extends BasePropertyFilter { } interface ListPropertyFilter extends BasePropertyFilter { - type: PropertyType.LIST + type: PropertyType.LIST; condition: ListFilterCondition; } interface CheckboxPropertyFilter extends BasePropertyFilter { - type: PropertyType.CHECKBOX + type: PropertyType.CHECKBOX; condition: CheckboxFilterCondition; } @@ -130,7 +135,12 @@ interface DatePropertyFilter extends BasePropertyFilter { condition: DateFilterCondition; } -type PropertyFilter = TextPropertyFilter | NumberPropertyFilter | ListPropertyFilter | CheckboxPropertyFilter | DatePropertyFilter; +type PropertyFilter = + | TextPropertyFilter + | NumberPropertyFilter + | ListPropertyFilter + | CheckboxPropertyFilter + | DatePropertyFilter; interface PropertyFilterGroup { id: string; @@ -139,6 +149,17 @@ interface PropertyFilterGroup { isEnabled: boolean; } -type SortFilter = "file-name-asc" | "file-name-desc" | "modified-asc" | "modified-desc"; +type SortFilter = + | "file-name-asc" + | "file-name-desc" + | "modified-asc" + | "modified-desc"; -type TimestampFilter = "created-today" | "modified-today" | "created-this-week" | "modified-this-week" | "created-2-weeks" | "modified-2-weeks" | "all"; +type TimestampFilter = + | "created-today" + | "modified-today" + | "created-this-week" + | "modified-this-week" + | "created-2-weeks" + | "modified-2-weeks" + | "all"; diff --git a/src/types/types-1.6.0.ts b/src/types/types-1.6.0.ts index 5e1c741..51709f6 100644 --- a/src/types/types-1.6.0.ts +++ b/src/types/types-1.6.0.ts @@ -8,7 +8,7 @@ export interface VaultExplorerPluginSettings_1_6_0 { custom1: string; custom2: string; custom3: string; - }, + }; filters: { folder: string; search: string; @@ -18,13 +18,13 @@ export interface VaultExplorerPluginSettings_1_6_0 { properties: { selectedGroupId: string; groups: PropertyFilterGroup[]; - } - }, + }; + }; views: { currentView: ViewType; order: ViewType[]; titleWrapping: WordBreak; - } + }; pageSize: number; pluginVersion: string | null; } @@ -33,7 +33,7 @@ type WordBreak = "normal" | "break-word"; enum ViewType { GRID = "grid", - LIST = "list", + LIST = "list" } type FilterOperator = "and" | "or"; @@ -46,14 +46,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -64,14 +64,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -79,10 +79,15 @@ enum DateFilterCondition { IS_BEFORE = "is-before", IS_AFTER = "is-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } -type FilterCondition = TextFilterCondition | NumberFilterCondition | DateFilterCondition | CheckboxFilterCondition | ListFilterCondition; +type FilterCondition = + | TextFilterCondition + | NumberFilterCondition + | DateFilterCondition + | CheckboxFilterCondition + | ListFilterCondition; interface BasePropertyFilter { id: string; @@ -101,7 +106,7 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } interface TextPropertyFilter extends BasePropertyFilter { @@ -115,12 +120,12 @@ interface NumberPropertyFilter extends BasePropertyFilter { } interface ListPropertyFilter extends BasePropertyFilter { - type: PropertyType.LIST + type: PropertyType.LIST; condition: ListFilterCondition; } interface CheckboxPropertyFilter extends BasePropertyFilter { - type: PropertyType.CHECKBOX + type: PropertyType.CHECKBOX; condition: CheckboxFilterCondition; } @@ -129,7 +134,12 @@ interface DatePropertyFilter extends BasePropertyFilter { condition: DateFilterCondition; } -type PropertyFilter = TextPropertyFilter | NumberPropertyFilter | ListPropertyFilter | CheckboxPropertyFilter | DatePropertyFilter; +type PropertyFilter = + | TextPropertyFilter + | NumberPropertyFilter + | ListPropertyFilter + | CheckboxPropertyFilter + | DatePropertyFilter; interface PropertyFilterGroup { id: string; @@ -138,6 +148,17 @@ interface PropertyFilterGroup { isEnabled: boolean; } -type SortFilter = "file-name-asc" | "file-name-desc" | "modified-asc" | "modified-desc"; +type SortFilter = + | "file-name-asc" + | "file-name-desc" + | "modified-asc" + | "modified-desc"; -type TimestampFilter = "created-today" | "modified-today" | "created-this-week" | "modified-this-week" | "created-2-weeks" | "modified-2-weeks" | "all"; +type TimestampFilter = + | "created-today" + | "modified-today" + | "created-this-week" + | "modified-this-week" + | "created-2-weeks" + | "modified-2-weeks" + | "all"; diff --git a/src/types/types-1.8.1.ts b/src/types/types-1.8.1.ts index 1f9223a..6bf4960 100644 --- a/src/types/types-1.8.1.ts +++ b/src/types/types-1.8.1.ts @@ -8,7 +8,7 @@ export interface VaultExplorerPluginSettings_1_8_1 { custom1: string; custom2: string; custom3: string; - }, + }; filters: { folder: string; search: string; @@ -18,13 +18,13 @@ export interface VaultExplorerPluginSettings_1_8_1 { properties: { selectedGroupId: string; groups: PropertyFilterGroup[]; - } - }, + }; + }; views: { currentView: ViewType; order: ViewType[]; titleWrapping: WordBreak; - } + }; pageSize: number; pluginVersion: string | null; } @@ -33,7 +33,7 @@ type WordBreak = "normal" | "break-word"; enum ViewType { GRID = "grid", - LIST = "list", + LIST = "list" } type FilterOperator = "and" | "or"; @@ -46,14 +46,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -64,14 +64,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -79,10 +79,15 @@ enum DateFilterCondition { IS_BEFORE = "is-before", IS_AFTER = "is-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } -type FilterCondition = TextFilterCondition | NumberFilterCondition | DateFilterCondition | CheckboxFilterCondition | ListFilterCondition; +type FilterCondition = + | TextFilterCondition + | NumberFilterCondition + | DateFilterCondition + | CheckboxFilterCondition + | ListFilterCondition; interface BasePropertyFilter { id: string; @@ -101,7 +106,7 @@ enum PropertyType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } interface TextPropertyFilter extends BasePropertyFilter { @@ -115,12 +120,12 @@ interface NumberPropertyFilter extends BasePropertyFilter { } interface ListPropertyFilter extends BasePropertyFilter { - type: PropertyType.LIST + type: PropertyType.LIST; condition: ListFilterCondition; } interface CheckboxPropertyFilter extends BasePropertyFilter { - type: PropertyType.CHECKBOX + type: PropertyType.CHECKBOX; condition: CheckboxFilterCondition; } @@ -129,7 +134,12 @@ interface DatePropertyFilter extends BasePropertyFilter { condition: DateFilterCondition; } -type PropertyFilter = TextPropertyFilter | NumberPropertyFilter | ListPropertyFilter | CheckboxPropertyFilter | DatePropertyFilter; +type PropertyFilter = + | TextPropertyFilter + | NumberPropertyFilter + | ListPropertyFilter + | CheckboxPropertyFilter + | DatePropertyFilter; interface PropertyFilterGroup { id: string; @@ -138,6 +148,17 @@ interface PropertyFilterGroup { isEnabled: boolean; } -type SortFilter = "file-name-asc" | "file-name-desc" | "modified-asc" | "modified-desc"; +type SortFilter = + | "file-name-asc" + | "file-name-desc" + | "modified-asc" + | "modified-desc"; -type TimestampFilter = "created-today" | "modified-today" | "created-this-week" | "modified-this-week" | "created-2-weeks" | "modified-2-weeks" | "all"; +type TimestampFilter = + | "created-today" + | "modified-today" + | "created-this-week" + | "modified-this-week" + | "created-2-weeks" + | "modified-2-weeks" + | "all"; diff --git a/src/types/types-1.9.1.ts b/src/types/types-1.9.1.ts index f7363ac..e7fe9c9 100644 --- a/src/types/types-1.9.1.ts +++ b/src/types/types-1.9.1.ts @@ -8,7 +8,7 @@ export interface VaultExplorerPluginSettings_1_9_1 { custom1: string; custom2: string; custom3: string; - }, + }; filters: { folder: string; search: string; @@ -18,13 +18,13 @@ export interface VaultExplorerPluginSettings_1_9_1 { custom: { selectedGroupId: string; groups: FilterGroup[]; - } - }, + }; + }; views: { currentView: ViewType; order: ViewType[]; titleWrapping: WordBreak; - } + }; pageSize: number; pluginVersion: string | null; } @@ -33,7 +33,7 @@ type WordBreak = "normal" | "break-word"; enum ViewType { GRID = "grid", - LIST = "list", + LIST = "list" } type FilterOperator = "and" | "or"; @@ -46,14 +46,14 @@ enum TextFilterCondition { STARTS_WITH = "starts-with", ENDS_WITH = "ends-with", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum ListFilterCondition { CONTAINS = "contains", DOES_NOT_CONTAIN = "does-not-contain", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum NumberFilterCondition { @@ -64,14 +64,14 @@ enum NumberFilterCondition { IS_GREATER_OR_EQUAL = "is-greater-or-equal", IS_LESS_OR_EQUAL = "is-less-or-equal", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum CheckboxFilterCondition { IS = "is", IS_NOT = "is-not", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } enum DateFilterCondition { @@ -81,10 +81,15 @@ enum DateFilterCondition { IS_ON_OR_BEFORE = "is-on-or-before", IS_ON_OR_AFTER = "is-on-or-after", EXISTS = "exists", - DOES_NOT_EXIST = "does-not-exist", + DOES_NOT_EXIST = "does-not-exist" } -type FilterCondition = TextFilterCondition | NumberFilterCondition | DateFilterCondition | CheckboxFilterCondition | ListFilterCondition; +type FilterCondition = + | TextFilterCondition + | NumberFilterCondition + | DateFilterCondition + | CheckboxFilterCondition + | ListFilterCondition; enum FilterRuleType { TEXT = "text", @@ -92,7 +97,7 @@ enum FilterRuleType { LIST = "list", CHECKBOX = "checkbox", DATE = "date", - DATETIME = "datetime", + DATETIME = "datetime" } enum DatePropertyFilterValue { @@ -128,7 +133,7 @@ interface NumberPropertyFilter extends BaseFilterRule { } interface ListPropertyFilter extends BaseFilterRule { - type: FilterRuleType.LIST + type: FilterRuleType.LIST; propertyName: string; condition: ListFilterCondition; } @@ -146,7 +151,12 @@ interface DatePropertyFilter extends BaseFilterRule { valueData: string; } -type FilterRule = TextPropertyFilter | NumberPropertyFilter | ListPropertyFilter | CheckboxPropertyFilter | DatePropertyFilter; +type FilterRule = + | TextPropertyFilter + | NumberPropertyFilter + | ListPropertyFilter + | CheckboxPropertyFilter + | DatePropertyFilter; interface FilterGroup { id: string; @@ -155,6 +165,17 @@ interface FilterGroup { isEnabled: boolean; } -type SortFilter = "file-name-asc" | "file-name-desc" | "modified-asc" | "modified-desc"; +type SortFilter = + | "file-name-asc" + | "file-name-desc" + | "modified-asc" + | "modified-desc"; -type TimestampFilter = "created-today" | "modified-today" | "created-this-week" | "modified-this-week" | "created-2-weeks" | "modified-2-weeks" | "all"; +type TimestampFilter = + | "created-today" + | "modified-today" + | "created-this-week" + | "modified-this-week" + | "created-2-weeks" + | "modified-2-weeks" + | "all"; diff --git a/test-vault/.obsidian/app.json b/test-vault/.obsidian/app.json index 8d8e51b..6ef8074 100644 --- a/test-vault/.obsidian/app.json +++ b/test-vault/.obsidian/app.json @@ -1,4 +1,4 @@ { - "promptDelete": false, - "showUnsupportedFiles": true -} \ No newline at end of file + "promptDelete": false, + "showUnsupportedFiles": true +} diff --git a/test-vault/.obsidian/appearance.json b/test-vault/.obsidian/appearance.json index 9e26dfe..0967ef4 100644 --- a/test-vault/.obsidian/appearance.json +++ b/test-vault/.obsidian/appearance.json @@ -1 +1 @@ -{} \ No newline at end of file +{} diff --git a/test-vault/.obsidian/community-plugins.json b/test-vault/.obsidian/community-plugins.json index 9d33ac0..47b4aab 100644 --- a/test-vault/.obsidian/community-plugins.json +++ b/test-vault/.obsidian/community-plugins.json @@ -1,3 +1 @@ -[ - "vault-explorer" -] \ No newline at end of file +["vault-explorer"] diff --git a/test-vault/.obsidian/core-plugins-migration.json b/test-vault/.obsidian/core-plugins-migration.json index 32ca11c..4be86cf 100644 --- a/test-vault/.obsidian/core-plugins-migration.json +++ b/test-vault/.obsidian/core-plugins-migration.json @@ -1,30 +1,30 @@ { - "file-explorer": true, - "global-search": true, - "switcher": true, - "graph": true, - "backlink": true, - "canvas": true, - "outgoing-link": true, - "tag-pane": true, - "properties": true, - "page-preview": true, - "daily-notes": false, - "templates": false, - "note-composer": true, - "command-palette": true, - "slash-command": false, - "editor-status": true, - "bookmarks": true, - "markdown-importer": false, - "zk-prefixer": false, - "random-note": false, - "outline": true, - "word-count": true, - "slides": false, - "audio-recorder": false, - "workspaces": false, - "file-recovery": true, - "publish": false, - "sync": false -} \ No newline at end of file + "file-explorer": true, + "global-search": true, + "switcher": true, + "graph": true, + "backlink": true, + "canvas": true, + "outgoing-link": true, + "tag-pane": true, + "properties": true, + "page-preview": true, + "daily-notes": false, + "templates": false, + "note-composer": true, + "command-palette": true, + "slash-command": false, + "editor-status": true, + "bookmarks": true, + "markdown-importer": false, + "zk-prefixer": false, + "random-note": false, + "outline": true, + "word-count": true, + "slides": false, + "audio-recorder": false, + "workspaces": false, + "file-recovery": true, + "publish": false, + "sync": false +} diff --git a/test-vault/.obsidian/core-plugins.json b/test-vault/.obsidian/core-plugins.json index cc7214c..5b4873e 100644 --- a/test-vault/.obsidian/core-plugins.json +++ b/test-vault/.obsidian/core-plugins.json @@ -1,19 +1,19 @@ [ - "file-explorer", - "global-search", - "switcher", - "graph", - "backlink", - "canvas", - "outgoing-link", - "tag-pane", - "properties", - "page-preview", - "note-composer", - "command-palette", - "editor-status", - "bookmarks", - "outline", - "word-count", - "file-recovery" -] \ No newline at end of file + "file-explorer", + "global-search", + "switcher", + "graph", + "backlink", + "canvas", + "outgoing-link", + "tag-pane", + "properties", + "page-preview", + "note-composer", + "command-palette", + "editor-status", + "bookmarks", + "outline", + "word-count", + "file-recovery" +] diff --git a/test-vault/.obsidian/graph.json b/test-vault/.obsidian/graph.json index 42a46ec..24da055 100644 --- a/test-vault/.obsidian/graph.json +++ b/test-vault/.obsidian/graph.json @@ -1,22 +1,22 @@ { - "collapse-filter": true, - "search": "", - "showTags": false, - "showAttachments": false, - "hideUnresolved": false, - "showOrphans": true, - "collapse-color-groups": true, - "colorGroups": [], - "collapse-display": true, - "showArrow": false, - "textFadeMultiplier": 0, - "nodeSizeMultiplier": 1, - "lineSizeMultiplier": 1, - "collapse-forces": true, - "centerStrength": 0.518713248970312, - "repelStrength": 10, - "linkStrength": 1, - "linkDistance": 250, - "scale": 1, - "close": true -} \ No newline at end of file + "collapse-filter": true, + "search": "", + "showTags": false, + "showAttachments": false, + "hideUnresolved": false, + "showOrphans": true, + "collapse-color-groups": true, + "colorGroups": [], + "collapse-display": true, + "showArrow": false, + "textFadeMultiplier": 0, + "nodeSizeMultiplier": 1, + "lineSizeMultiplier": 1, + "collapse-forces": true, + "centerStrength": 0.518713248970312, + "repelStrength": 10, + "linkStrength": 1, + "linkDistance": 250, + "scale": 1, + "close": true +} diff --git a/test-vault/.obsidian/plugins/vault-explorer/data.json b/test-vault/.obsidian/plugins/vault-explorer/data.json index f406c9b..296e771 100644 --- a/test-vault/.obsidian/plugins/vault-explorer/data.json +++ b/test-vault/.obsidian/plugins/vault-explorer/data.json @@ -1,90 +1,90 @@ { - "properties": { - "favorite": "favorite", - "url": "url", - "custom1": "category", - "custom2": "color", - "custom3": "size", - "creationDate": "creation", - "modifiedDate": "modification", - "createdDate": "creation", - "image": "image", - "coverImageFit": "image-fit" - }, - "filters": { - "search": { - "isEnabled": true, - "value": "" - }, - "sort": { - "isEnabled": true, - "value": "modified-desc" - }, - "custom": { - "isEnabled": true, - "selectedGroupId": "", - "groups": [] - }, - "properties": { - "groups": [] - } - }, - "views": { - "grid": { - "isEnabled": true, - "loadSocialMediaImage": true, - "coverImageSources": [ - { - "type": "image-property", - "isEnabled": true - }, - { - "type": "url-property", - "isEnabled": true - }, - { - "type": "frontmatter", - "isEnabled": true - }, - { - "type": "body", - "isEnabled": true - } - ], - "coverImageFit": "cover", - "order": 0 - }, - "list": { - "isEnabled": true, - "showTags": true, - "order": 1 - }, - "table": { - "isEnabled": true, - "order": 3 - }, - "feed": { - "isEnabled": true, - "renderNewLineCharacters": false, - "collapseContent": true, - "removeLevel1Headers": true, - "collapseStyle": "no-new-lines", - "lineClampLarge": 5, - "lineClampMedium": 3, - "lineClampSmall": 2, - "removeH1": true, - "order": 2 - } - }, - "confirmBeforeDelete": true, - "currentView": "list", - "titleWrapping": "normal", - "enableClockUpdates": true, - "enableFileIcons": true, - "loadBodyTags": true, - "shouldCollapseFilters": false, - "pageSize": 25, - "configDir": ".vaultexplorer", - "pluginVersion": "1.46.0", - "logLevel": "warn" -} \ No newline at end of file + "properties": { + "favorite": "favorite", + "url": "url", + "custom1": "category", + "custom2": "color", + "custom3": "size", + "creationDate": "creation", + "modifiedDate": "modification", + "createdDate": "creation", + "image": "image", + "coverImageFit": "image-fit" + }, + "filters": { + "search": { + "isEnabled": true, + "value": "" + }, + "sort": { + "isEnabled": true, + "value": "modified-desc" + }, + "custom": { + "isEnabled": true, + "selectedGroupId": "", + "groups": [] + }, + "properties": { + "groups": [] + } + }, + "views": { + "grid": { + "isEnabled": true, + "loadSocialMediaImage": true, + "coverImageSources": [ + { + "type": "image-property", + "isEnabled": true + }, + { + "type": "url-property", + "isEnabled": true + }, + { + "type": "frontmatter", + "isEnabled": true + }, + { + "type": "body", + "isEnabled": true + } + ], + "coverImageFit": "cover", + "order": 0 + }, + "list": { + "isEnabled": true, + "showTags": true, + "order": 1 + }, + "table": { + "isEnabled": true, + "order": 3 + }, + "feed": { + "isEnabled": true, + "renderNewLineCharacters": false, + "collapseContent": true, + "removeLevel1Headers": true, + "collapseStyle": "no-new-lines", + "lineClampLarge": 5, + "lineClampMedium": 3, + "lineClampSmall": 2, + "removeH1": true, + "order": 2 + } + }, + "confirmBeforeDelete": true, + "currentView": "list", + "titleWrapping": "normal", + "enableClockUpdates": true, + "enableFileIcons": true, + "loadBodyTags": true, + "shouldCollapseFilters": false, + "pageSize": 25, + "configDir": ".vaultexplorer", + "pluginVersion": "1.46.0", + "logLevel": "warn" +} diff --git a/test-vault/.obsidian/types.json b/test-vault/.obsidian/types.json index 1b1791f..d6d93f2 100644 --- a/test-vault/.obsidian/types.json +++ b/test-vault/.obsidian/types.json @@ -1,10 +1,10 @@ { - "types": { - "aliases": "aliases", - "cssclasses": "multitext", - "tags": "tags", - "favorite": "checkbox", - "creation": "date", - "modification": "date" - } -} \ No newline at end of file + "types": { + "aliases": "aliases", + "cssclasses": "multitext", + "tags": "tags", + "favorite": "checkbox", + "creation": "date", + "modification": "date" + } +} diff --git a/test-vault/.vaultexplorer/favorites.json b/test-vault/.vaultexplorer/favorites.json index fc69ce2..9076bb4 100644 --- a/test-vault/.vaultexplorer/favorites.json +++ b/test-vault/.vaultexplorer/favorites.json @@ -1,3 +1,3 @@ { - "items": [] -} \ No newline at end of file + "items": [] +} diff --git a/tests/integration/preform-migration.test.ts b/tests/integration/preform-migration.test.ts index 4e05a84..2e09ac7 100644 --- a/tests/integration/preform-migration.test.ts +++ b/tests/integration/preform-migration.test.ts @@ -2,7 +2,7 @@ import { preformMigrations } from "src/migrations"; import { isVaultExplorerPluginSettings } from "src/types/index.guard"; import { TextFilterCondition_0_3_3, - type VaultExplorerPluginSettings_0_3_3, + type VaultExplorerPluginSettings_0_3_3 } from "src/types/types-0.3.3"; import { CheckboxFilterCondition_0_5_5, @@ -11,7 +11,7 @@ import { NumberFilterCondition_0_5_5, PropertyFilterType_0_5_5, TextFilterCondition_0_5_5, - type VaultExplorerPluginSettings_0_5_5, + type VaultExplorerPluginSettings_0_5_5 } from "src/types/types-0.5.5"; describe("preformMigrations", () => { @@ -23,7 +23,7 @@ describe("preformMigrations", () => { url: "https://example.com", custom1: "custom-value-1", custom2: "custom-value-2", - custom3: "custom-value-3", + custom3: "custom-value-3" }, filters: { folder: "MyNotes", @@ -44,7 +44,7 @@ describe("preformMigrations", () => { operator: "and", isEnabled: true, condition: TextFilterCondition_0_3_3.IS, - value: "active", + value: "active" }, { id: "filter-2", @@ -53,11 +53,11 @@ describe("preformMigrations", () => { isEnabled: false, condition: TextFilterCondition_0_3_3.CONTAINS, - value: "high", - }, + value: "high" + } ], position: 0, - isEnabled: true, + isEnabled: true }, { id: "group-2", @@ -70,7 +70,7 @@ describe("preformMigrations", () => { isEnabled: true, condition: TextFilterCondition_0_3_3.STARTS_WITH, - value: "work", + value: "work" }, { id: "filter-4", @@ -79,18 +79,18 @@ describe("preformMigrations", () => { isEnabled: true, condition: TextFilterCondition_0_3_3.IS_NOT_EMPTY, - value: "", - }, + value: "" + } ], position: 1, - isEnabled: false, - }, - ], - }, + isEnabled: false + } + ] + } }, currentView: "grid", pageSize: 20, - pluginVersion: "0.3.3", + pluginVersion: "0.3.3" }; //Same guard clause as in main.js @@ -114,7 +114,7 @@ describe("preformMigrations", () => { url: "https://example.com", custom1: "customValue1", custom2: "customValue2", - custom3: "customValue3", + custom3: "customValue3" }, filters: { folder: "root", @@ -137,7 +137,7 @@ describe("preformMigrations", () => { isEnabled: true, value: "example", condition: - TextFilterCondition_0_5_5.CONTAINS, + TextFilterCondition_0_5_5.CONTAINS }, { id: "filter2", @@ -147,11 +147,11 @@ describe("preformMigrations", () => { isEnabled: true, value: "100", condition: - NumberFilterCondition_0_5_5.IS_GREATER, - }, + NumberFilterCondition_0_5_5.IS_GREATER + } ], position: 1, - isEnabled: true, + isEnabled: true }, { id: "group2", @@ -165,7 +165,7 @@ describe("preformMigrations", () => { isEnabled: true, value: "important", condition: - ListFilterCondition_0_5_5.CONTAINS, + ListFilterCondition_0_5_5.CONTAINS }, { id: "filter4", @@ -174,7 +174,7 @@ describe("preformMigrations", () => { type: PropertyFilterType_0_5_5.CHECKBOX, isEnabled: true, value: "true", - condition: CheckboxFilterCondition_0_5_5.IS, + condition: CheckboxFilterCondition_0_5_5.IS }, { id: "filter5", @@ -184,18 +184,18 @@ describe("preformMigrations", () => { isEnabled: true, value: "2023-01-01", condition: - DateFilterCondition_0_5_5.IS_AFTER, - }, + DateFilterCondition_0_5_5.IS_AFTER + } ], position: 2, - isEnabled: true, - }, - ], - }, + isEnabled: true + } + ] + } }, currentView: "list", pageSize: 20, - pluginVersion: "0.4.0", + pluginVersion: "0.4.0" }; //This the same guard clause as in main.js diff --git a/tests/unit/link-target-getters.test.ts b/tests/unit/link-target-getters.test.ts index 3b84189..0e18962 100644 --- a/tests/unit/link-target-getters.test.ts +++ b/tests/unit/link-target-getters.test.ts @@ -1,7 +1,7 @@ import { getExternalEmbedTarget, getInternalEmbedTarget, - getWikiLinkTarget, + getWikiLinkTarget } from "src/svelte/app/services/link-utils/link-target-getters"; describe("getWikiLinkTarget", () => { diff --git a/tests/unit/link-validators.test.ts b/tests/unit/link-validators.test.ts index 789c4cf..e709117 100644 --- a/tests/unit/link-validators.test.ts +++ b/tests/unit/link-validators.test.ts @@ -1,7 +1,7 @@ import { isExternalEmbed, isInternalEmbed, - isWikiLink, + isWikiLink } from "src/svelte/app/services/link-utils/link-validators"; describe("isWikiLink", () => { diff --git a/tests/unit/load-property-value.test.ts b/tests/unit/load-property-value.test.ts index 7b5a169..d687927 100644 --- a/tests/unit/load-property-value.test.ts +++ b/tests/unit/load-property-value.test.ts @@ -245,7 +245,7 @@ describe("loadPropertyValue", () => { it("returns null if expectedType is PropertyType.DATETIME and value is not a supported format", () => { //Arrange const frontmatter: FrontMatterCache = { - test: "<% tp.file.creation_date() %>", + test: "<% tp.file.creation_date() %>" }; const propertyName = "test"; @@ -295,7 +295,7 @@ describe("loadPropertyValue", () => { it("returns null if expectedType is PropertyType.DATETIME and value is not a supported format", () => { //Arrange const frontmatter: FrontMatterCache = { - test: '<% tp.file.last_modified_date("dddd Do MMMM YYYY HH: mm: ss") %>', + test: '<% tp.file.last_modified_date("dddd Do MMMM YYYY HH: mm: ss") %>' }; const propertyName = "test"; diff --git a/tests/unit/match-checkbox-property-filter.test.ts b/tests/unit/match-checkbox-property-filter.test.ts index 45a5087..ee2a5f5 100644 --- a/tests/unit/match-checkbox-property-filter.test.ts +++ b/tests/unit/match-checkbox-property-filter.test.ts @@ -1,10 +1,9 @@ import { matchCheckboxPropertyFilter } from "src/svelte/app/services/filters/custom/match-checkbox-property-filter"; import { CheckboxFilterCondition } from "src/types"; -describe('matchCheckboxPropertyFilter', () => { - - describe('Normal Cases', () => { - it('should return true for matchCheckboxPropertyFilter(true, true, CheckboxFilterCondition.IS, false)', () => { +describe("matchCheckboxPropertyFilter", () => { + describe("Normal Cases", () => { + it("should return true for matchCheckboxPropertyFilter(true, true, CheckboxFilterCondition.IS, false)", () => { // Arrange const propertyValue = true; const compare = true; @@ -12,13 +11,18 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for matchCheckboxPropertyFilter(false, false, CheckboxFilterCondition.IS, false)', () => { + it("should return true for matchCheckboxPropertyFilter(false, false, CheckboxFilterCondition.IS, false)", () => { // Arrange const propertyValue = false; const compare = false; @@ -26,13 +30,18 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for matchCheckboxPropertyFilter(true, false, CheckboxFilterCondition.IS_NOT, false)', () => { + it("should return true for matchCheckboxPropertyFilter(true, false, CheckboxFilterCondition.IS_NOT, false)", () => { // Arrange const propertyValue = true; const compare = false; @@ -40,13 +49,18 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for matchCheckboxPropertyFilter(false, true, CheckboxFilterCondition.IS_NOT, false)', () => { + it("should return true for matchCheckboxPropertyFilter(false, true, CheckboxFilterCondition.IS_NOT, false)", () => { // Arrange const propertyValue = false; const compare = true; @@ -54,13 +68,18 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for matchCheckboxPropertyFilter(true, true, CheckboxFilterCondition.EXISTS, false)', () => { + it("should return true for matchCheckboxPropertyFilter(true, true, CheckboxFilterCondition.EXISTS, false)", () => { // Arrange const propertyValue = true; const compare = true; @@ -68,13 +87,18 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for matchCheckboxPropertyFilter(false, true, CheckboxFilterCondition.EXISTS, false)', () => { + it("should return true for matchCheckboxPropertyFilter(false, true, CheckboxFilterCondition.EXISTS, false)", () => { // Arrange const propertyValue = false; const compare = true; @@ -82,15 +106,20 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); }); - describe('Invalid Cases', () => { - it('should return false for matchCheckboxPropertyFilter(null, true, CheckboxFilterCondition.IS, false)', () => { + describe("Invalid Cases", () => { + it("should return false for matchCheckboxPropertyFilter(null, true, CheckboxFilterCondition.IS, false)", () => { // Arrange const propertyValue = null; const compare = true; @@ -98,13 +127,18 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); }); - it('should return false for matchCheckboxPropertyFilter(null, false, CheckboxFilterCondition.IS_NOT, false)', () => { + it("should return false for matchCheckboxPropertyFilter(null, false, CheckboxFilterCondition.IS_NOT, false)", () => { // Arrange const propertyValue = null; const compare = false; @@ -112,15 +146,20 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); }); }); - describe('Edge Cases', () => { - it('should return false for matchCheckboxPropertyFilter(null, true, CheckboxFilterCondition.EXISTS, false)', () => { + describe("Edge Cases", () => { + it("should return false for matchCheckboxPropertyFilter(null, true, CheckboxFilterCondition.EXISTS, false)", () => { // Arrange const propertyValue = null; const compare = true; @@ -128,13 +167,18 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); }); - it('should return true for matchCheckboxPropertyFilter(null, true, CheckboxFilterCondition.DOES_NOT_EXIST, false)', () => { + it("should return true for matchCheckboxPropertyFilter(null, true, CheckboxFilterCondition.DOES_NOT_EXIST, false)", () => { // Arrange const propertyValue = null; const compare = true; @@ -142,13 +186,18 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for matchCheckboxPropertyFilter(null, true, CheckboxFilterCondition.IS, true)', () => { + it("should return true for matchCheckboxPropertyFilter(null, true, CheckboxFilterCondition.IS, true)", () => { // Arrange const propertyValue = null; const compare = true; @@ -156,13 +205,18 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = true; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for matchCheckboxPropertyFilter(null, false, CheckboxFilterCondition.IS_NOT, true)', () => { + it("should return true for matchCheckboxPropertyFilter(null, false, CheckboxFilterCondition.IS_NOT, true)", () => { // Arrange const propertyValue = null; const compare = false; @@ -170,23 +224,36 @@ describe('matchCheckboxPropertyFilter', () => { const matchIfNull = true; // Act - const result = matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); }); - describe('Error Cases', () => { + describe("Error Cases", () => { it('should throw an error for matchCheckboxPropertyFilter(true, true, "unsupported-condition", false)', () => { // Arrange const propertyValue = true; const compare = true; - const condition = "unsupported-condition" as CheckboxFilterCondition; + const condition = + "unsupported-condition" as CheckboxFilterCondition; const matchIfNull = false; // Act & Assert - expect(() => matchCheckboxPropertyFilter(propertyValue, compare, condition, matchIfNull)).toThrow(); + expect(() => + matchCheckboxPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ) + ).toThrow(); }); }); }); diff --git a/tests/unit/match-date-property-filter.test.ts b/tests/unit/match-date-property-filter.test.ts index ef84806..ee8700a 100644 --- a/tests/unit/match-date-property-filter.test.ts +++ b/tests/unit/match-date-property-filter.test.ts @@ -2,7 +2,6 @@ import { matchDatePropertyFilter } from "src/svelte/app/services/filters/custom/ import { DateFilterCondition } from "src/types"; describe("matchDatePropertyFilter", () => { - describe("Normal Cases", () => { it("should return true for matchDatePropertyFilter(YYYY-MM-DDTHH:mm:ss, YYYY-MM-DD, IS, false)", () => { // Arrange @@ -12,7 +11,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = false; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -26,7 +30,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = false; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -40,7 +49,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = false; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -54,7 +68,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = false; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -68,7 +87,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = false; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -82,7 +106,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = false; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -98,7 +127,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = true; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -112,7 +146,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = true; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -126,7 +165,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = true; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -142,7 +186,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = false; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -156,7 +205,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = false; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); @@ -170,7 +224,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = false; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -184,7 +243,12 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = false; // Act - const result = matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); @@ -200,7 +264,14 @@ describe("matchDatePropertyFilter", () => { const matchIfNull = false; // Act & Assert - expect(() => matchDatePropertyFilter(propertyValue, compare, condition, matchIfNull)).toThrow(); + expect(() => + matchDatePropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ) + ).toThrow(); }); }); }); diff --git a/tests/unit/match-list-property-filter.test.ts b/tests/unit/match-list-property-filter.test.ts index ffb9439..91360df 100644 --- a/tests/unit/match-list-property-filter.test.ts +++ b/tests/unit/match-list-property-filter.test.ts @@ -1,9 +1,8 @@ import { matchListPropertyFilter } from "src/svelte/app/services/filters/custom/match-list-property-filter"; import { ListFilterCondition } from "src/types"; -describe('matchListPropertyFilter', () => { - - describe('Normal Cases', () => { +describe("matchListPropertyFilter", () => { + describe("Normal Cases", () => { it('should return true for matchListPropertyFilter(["apple", "banana", "cherry"], ["banana"], ListFilterCondition.CONTAINS, false)', () => { // Arrange const propertyValue = ["apple", "banana", "cherry"]; @@ -12,7 +11,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -26,7 +30,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -40,7 +49,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -54,7 +68,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -68,7 +87,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -82,7 +106,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); @@ -96,7 +125,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -110,7 +144,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -124,7 +163,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -138,14 +182,19 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); }); - describe('Invalid Cases', () => { + describe("Invalid Cases", () => { it('should return false for matchListPropertyFilter(null, ["apple"], ListFilterCondition.CONTAINS, false)', () => { // Arrange const propertyValue = null; @@ -154,7 +203,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); @@ -168,14 +222,19 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); }); }); - describe('Edge Cases', () => { + describe("Edge Cases", () => { it('should return false for matchListPropertyFilter(null, ["apple"], ListFilterCondition.EXISTS, false)', () => { // Arrange const propertyValue = null; @@ -184,7 +243,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); @@ -198,7 +262,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -212,7 +281,12 @@ describe('matchListPropertyFilter', () => { const matchIfNull = true; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -226,23 +300,35 @@ describe('matchListPropertyFilter', () => { const matchIfNull = true; // Act - const result = matchListPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); }); - describe('Error Cases', () => { + describe("Error Cases", () => { it('should throw an error for matchListPropertyFilter(["apple"], ["apple"], "unsupported-condition", false)', () => { // Arrange const propertyValue = ["apple"]; const compare = ["apple"]; - const condition = 'unsupported-condition' as ListFilterCondition; + const condition = "unsupported-condition" as ListFilterCondition; const matchIfNull = false; // Act & Assert - expect(() => matchListPropertyFilter(propertyValue, compare, condition, matchIfNull)).toThrow(); + expect(() => + matchListPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ) + ).toThrow(); }); }); }); diff --git a/tests/unit/match-number-property-filter.test.ts b/tests/unit/match-number-property-filter.test.ts index 51c6738..b893848 100644 --- a/tests/unit/match-number-property-filter.test.ts +++ b/tests/unit/match-number-property-filter.test.ts @@ -1,10 +1,9 @@ import { matchNumberPropertyFilter } from "src/svelte/app/services/filters/custom/match-number-property-filter"; import { NumberFilterCondition } from "src/types"; -describe('matchNumberPropertyFilter', () => { - - describe('Normal Cases', () => { - it('should return true for IS_EQUAL when values are equal', () => { +describe("matchNumberPropertyFilter", () => { + describe("Normal Cases", () => { + it("should return true for IS_EQUAL when values are equal", () => { // Arrange const propertyValue = 5; const compare = 5; @@ -12,13 +11,18 @@ describe('matchNumberPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchNumberPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchNumberPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for IS_GREATER when propertyValue is greater than compare', () => { + it("should return true for IS_GREATER when propertyValue is greater than compare", () => { // Arrange const propertyValue = 10; const compare = 5; @@ -26,13 +30,18 @@ describe('matchNumberPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchNumberPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchNumberPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for IS_LESS when propertyValue is less than compare', () => { + it("should return true for IS_LESS when propertyValue is less than compare", () => { // Arrange const propertyValue = 3; const compare = 5; @@ -40,13 +49,18 @@ describe('matchNumberPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchNumberPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchNumberPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for IS_GREATER_OR_EQUAL when propertyValue is equal to compare', () => { + it("should return true for IS_GREATER_OR_EQUAL when propertyValue is equal to compare", () => { // Arrange const propertyValue = 5; const compare = 5; @@ -54,13 +68,18 @@ describe('matchNumberPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchNumberPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchNumberPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for IS_LESS_OR_EQUAL when propertyValue is less than compare', () => { + it("should return true for IS_LESS_OR_EQUAL when propertyValue is less than compare", () => { // Arrange const propertyValue = 4; const compare = 5; @@ -68,13 +87,18 @@ describe('matchNumberPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchNumberPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchNumberPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return true for IS_NOT_EQUAL when propertyValue is not equal to compare', () => { + it("should return true for IS_NOT_EQUAL when propertyValue is not equal to compare", () => { // Arrange const propertyValue = 6; const compare = 5; @@ -82,15 +106,20 @@ describe('matchNumberPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchNumberPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchNumberPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); }); - describe('Edge Cases', () => { - it('should return true for IS_EQUAL when propertyValue is null and matchIfNull is true', () => { + describe("Edge Cases", () => { + it("should return true for IS_EQUAL when propertyValue is null and matchIfNull is true", () => { // Arrange const propertyValue = null; const compare = 5; @@ -98,13 +127,18 @@ describe('matchNumberPropertyFilter', () => { const matchIfNull = true; // Act - const result = matchNumberPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchNumberPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); - it('should return false for IS_EQUAL when propertyValue is null and matchIfNull is false', () => { + it("should return false for IS_EQUAL when propertyValue is null and matchIfNull is false", () => { // Arrange const propertyValue = null; const compare = 5; @@ -112,13 +146,18 @@ describe('matchNumberPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchNumberPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchNumberPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); }); - it('should return false for EXISTS when propertyValue is null', () => { + it("should return false for EXISTS when propertyValue is null", () => { // Arrange const propertyValue = null; const compare = 5; @@ -126,13 +165,18 @@ describe('matchNumberPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchNumberPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchNumberPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); }); - it('should return true for DOES_NOT_EXIST when propertyValue is null', () => { + it("should return true for DOES_NOT_EXIST when propertyValue is null", () => { // Arrange const propertyValue = null; const compare = 5; @@ -140,15 +184,20 @@ describe('matchNumberPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchNumberPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchNumberPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); }); - describe('Error Cases', () => { - it('should throw an error for unsupported condition', () => { + describe("Error Cases", () => { + it("should throw an error for unsupported condition", () => { // Arrange const propertyValue = 5; const compare = 5; @@ -156,7 +205,14 @@ describe('matchNumberPropertyFilter', () => { const matchIfNull = false; // Act & Assert - expect(() => matchNumberPropertyFilter(propertyValue, compare, condition, matchIfNull)).toThrow() + expect(() => + matchNumberPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ) + ).toThrow(); }); }); }); diff --git a/tests/unit/match-text-property-filter.test.ts b/tests/unit/match-text-property-filter.test.ts index 39672b2..1b64110 100644 --- a/tests/unit/match-text-property-filter.test.ts +++ b/tests/unit/match-text-property-filter.test.ts @@ -1,9 +1,8 @@ import { matchTextPropertyFilter } from "src/svelte/app/services/filters/custom/match-text-property-filter"; import { TextFilterCondition } from "src/types"; -describe('matchTextPropertyFilter', () => { - - describe('Normal Cases', () => { +describe("matchTextPropertyFilter", () => { + describe("Normal Cases", () => { it('should return true for matchTextPropertyFilter("hello", "hello", TextFilterCondition.IS, false)', () => { // Arrange const propertyValue = "hello"; @@ -12,7 +11,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -26,7 +30,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -40,7 +49,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -54,7 +68,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -68,7 +87,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -82,7 +106,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -96,7 +125,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -110,7 +144,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -124,14 +163,19 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); }); - describe('Invalid Cases', () => { + describe("Invalid Cases", () => { it('should return false for matchTextPropertyFilter(null, "hello", TextFilterCondition.IS, false)', () => { // Arrange const propertyValue = null; @@ -140,7 +184,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); @@ -154,14 +203,19 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); }); }); - describe('Edge Cases', () => { + describe("Edge Cases", () => { it('should return false for matchTextPropertyFilter(null, "hello", TextFilterCondition.EXISTS, false)', () => { // Arrange const propertyValue = null; @@ -170,7 +224,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(false); @@ -184,7 +243,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = false; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -198,7 +262,12 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = true; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); @@ -212,23 +281,35 @@ describe('matchTextPropertyFilter', () => { const matchIfNull = true; // Act - const result = matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull); + const result = matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ); // Assert expect(result).toEqual(true); }); }); - describe('Error Cases', () => { + describe("Error Cases", () => { it('should throw an error for matchTextPropertyFilter("hello", "hello", "unsupported-condition", false)', () => { // Arrange const propertyValue = "hello"; const compare = "hello"; - const condition = 'unsupported-condition' as TextFilterCondition; + const condition = "unsupported-condition" as TextFilterCondition; const matchIfNull = false; // Act & Assert - expect(() => matchTextPropertyFilter(propertyValue, compare, condition, matchIfNull)).toThrow(); + expect(() => + matchTextPropertyFilter( + propertyValue, + compare, + condition, + matchIfNull + ) + ).toThrow(); }); }); }); diff --git a/tsconfig.json b/tsconfig.json index 10ea99f..4493dcd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,19 @@ { - "extends": "@tsconfig/svelte/tsconfig.json", - "compilerOptions": { - "types": ["svelte", "node", "jest"], - "baseUrl": ".", - "inlineSources": false, - "module": "ESNext", - "target": "ES6", - "allowJs": true, - "allowSyntheticDefaultImports": true, - "noImplicitAny": true, - "moduleResolution": "node", - "importHelpers": true, - "isolatedModules": true, - "strictNullChecks": true, - "lib": [ - "DOM", - "ES5", - "ES6", - "ES7" - ] - }, - "include": [ - "**/*.ts", - "**/*.svelte", - ] + "extends": "@tsconfig/svelte/tsconfig.json", + "compilerOptions": { + "types": ["svelte", "node", "jest"], + "baseUrl": ".", + "inlineSources": false, + "module": "ESNext", + "target": "ES6", + "allowJs": true, + "allowSyntheticDefaultImports": true, + "noImplicitAny": true, + "moduleResolution": "node", + "importHelpers": true, + "isolatedModules": true, + "strictNullChecks": true, + "lib": ["DOM", "ES5", "ES6", "ES7"] + }, + "include": ["**/*.ts", "**/*.svelte"] }