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 formik from 2.4.5 to 2.4.6 #8358

Merged
merged 3 commits into from
Apr 30, 2024
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
8 changes: 4 additions & 4 deletions 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 @@ -79,7 +79,7 @@
"filenamify": "^6.0.0",
"filter-altered-clicks": "^2.0.1",
"fit-textarea": "^3.0.0",
"formik": "^2.4.5",
"formik": "^2.4.6",
"fuse.js": "^7.0.0",
"generate-schema": "^2.6.0",
"handlebars": "^4.7.8",
Expand Down
28 changes: 28 additions & 0 deletions src/__mocks__/@/components/asyncIcon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*

Check failure on line 1 in src/__mocks__/@/components/asyncIcon.ts

View workflow job for this annotation

GitHub Actions / strictNullChecks

strictNullChecks

src/__mocks__/@/components/asyncIcon.ts was not found in tsconfig.strictNullChecks.json
* Copyright (C) 2024 PixieBrix, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import type { Nullishable } from "@/utils/nullishUtils";
import type { IconStringDefinition } from "@/types/contract";
import type { IconProp } from "@fortawesome/fontawesome-svg-core";

export function useAsyncIcon(
icon: Nullishable<IconStringDefinition>,
defaultIcon: IconProp,
placeholder: IconProp = defaultIcon,
): IconProp {
return defaultIcon;
}
12 changes: 5 additions & 7 deletions src/components/form/useFieldAnnotations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
import { type ModComponentFormState } from "@/pageEditor/starterBricks/formStateTypes";
import { type FormikContextType } from "formik";
import { produce } from "immer";
import { get, isEmpty, set } from "lodash";
import { get, isEmpty, isEqual, set } from "lodash";
import { AnnotationType } from "@/types/annotationTypes";
import { isNullOrBlank } from "@/utils/stringUtils";
import { type Expression } from "@/types/runtimeTypes";
Expand Down Expand Up @@ -98,14 +98,12 @@ function useFieldAnnotations(fieldPath: string): FieldAnnotation[] {
return true;
}

if (
const detailValue =
typeof annotation.detail === "object" &&
"expression" in annotation.detail
) {
return annotation.detail.expression === value;
}

return annotation.detail === value;
? annotation.detail.expression
: annotation.detail;
return isEqual(detailValue, value);
})
.map(({ message, type, actions }) => {
const fieldAnnotation: FieldAnnotation = {
Expand Down
Loading