Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump vite from 3.2.4 to 3.2.7 #3729

Merged
merged 3 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
"start-server-and-test": "^1.11.0",
"typescript": "^5.0.4",
"typescript-strict-plugin": "^2.1.0",
"vite": "^3.2.4",
"vite": "^3.2.7",
"vite-plugin-html": "^3.2.0",
"vite-plugin-pwa": "^0.13.3",
"workbox-cacheable-response": "^6.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ export const AppInstallErrorPage: React.FC<AppInstallErrorPageProps> = ({
</Container>
);
};

2 changes: 1 addition & 1 deletion src/apps/views/AppInstallView/AppInstallView.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {AppInstallErrorPage} from "@dashboard/apps/components/AppInstallErrorPage";
import { AppInstallErrorPage } from "@dashboard/apps/components/AppInstallErrorPage";
import AppInstallPage from "@dashboard/apps/components/AppInstallPage";
import {
AppInstallUrlQueryParams,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ export const createInitialStateFromData = (
[node.slug ?? ""]: {
choices:
node.inputType === "BOOLEAN"
? createBooleanOptions()
: createOptionsFromAPI(node.choices?.edges ?? []),
? createBooleanOptions()
: createOptionsFromAPI(node.choices?.edges ?? []),
slug: node?.slug,
value: node?.id,
label: node?.name,
Expand Down
42 changes: 22 additions & 20 deletions src/components/ConditionalFilter/FilterElement/Constraint.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { CONSTRAINTS } from "../constants"
import { StaticElementName } from "./ConditionOptions"
import { FilterContainer, FilterElement } from "./FilterElement"
import { CONSTRAINTS } from "../constants";
import { StaticElementName } from "./ConditionOptions";
import { FilterContainer, FilterElement } from "./FilterElement";

type DisabledScope = "left" | "right" | "condition"
type DisabledScope = "left" | "right" | "condition";

export class Constraint {
constructor(
Expand All @@ -11,33 +11,35 @@ export class Constraint {
public removable?: boolean,
) {}

public static getDependency (slug: string): StaticElementName | null {
const fieldConstraint = Object.entries(CONSTRAINTS)
.find(([_, v]) => v.dependsOn.includes(slug))
public static getDependency(slug: string): StaticElementName | null {
const fieldConstraint = Object.entries(CONSTRAINTS).find(([_, v]) =>
v.dependsOn.includes(slug),
);

if (!fieldConstraint) return null
if (!fieldConstraint) return null;

return fieldConstraint[0] as StaticElementName
return fieldConstraint[0] as StaticElementName;
}

public static fromSlug(slug: string) {
const constraintKey = Object.keys(CONSTRAINTS).find(key => key === slug)
const constraintKey = Object.keys(CONSTRAINTS).find(key => key === slug);

if (!constraintKey) return null
const fieldConstraint = CONSTRAINTS[constraintKey as keyof typeof CONSTRAINTS]
if (!constraintKey) return null;
const fieldConstraint =
CONSTRAINTS[constraintKey as keyof typeof CONSTRAINTS];

return new Constraint(
fieldConstraint.dependsOn,
fieldConstraint.disabled as [DisabledScope],
fieldConstraint.removable
)
fieldConstraint.removable,
);
}

public existIn (container: FilterContainer) {
return container.some((s) => {
if (!FilterElement.isCompatible(s)) return false
public existIn(container: FilterContainer) {
return container.some(s => {
if (!FilterElement.isCompatible(s)) return false;

return this.dependsOn.includes(s.value.value)
})
return this.dependsOn.includes(s.value.value);
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const emptyFetchingParams: FetchingParams = {
const unique = <T>(array: Iterable<T>) => Array.from(new Set(array));

const includedInParams = (c: UrlToken) =>
TokenType.ATTRIBUTE_DROPDOWN === c.type
|| TokenType.ATTRIBUTE_MULTISELECT === c.type
TokenType.ATTRIBUTE_DROPDOWN === c.type ||
TokenType.ATTRIBUTE_MULTISELECT === c.type;

export const toFetchingParams = (p: FetchingParams, c: UrlToken) => {
const key = c.name as FetchingParamsKeys;
Expand All @@ -42,7 +42,7 @@ export const toFetchingParams = (p: FetchingParams, c: UrlToken) => {
}

if (c.isAttribute() && !includedInParams(c)) {
p.attribute[c.name] = []
p.attribute[c.name] = [];

return p;
}
Expand Down
Loading