Skip to content

Commit

Permalink
fix: removed all references to src folder, causing dublicate imports
Browse files Browse the repository at this point in the history
  • Loading branch information
pksorensen committed Nov 27, 2024
1 parent fbb76da commit f024002
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client";
import { quickformtokens, useHandleEnterKeypress, useQuickForm } from "@eavfw/quickform-core";
import { useFocusableQuestion } from "@eavfw/quickform-core/src/hooks/useFocusableQuestion";
import { useFocusableQuestion } from "@eavfw/quickform-core";
import { CSSProperties, ChangeEvent, InputHTMLAttributes, useEffect, useState } from "react";
import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
import { QuestionModel } from "@eavfw/quickform-core/src/model";
import { QuestionModel } from "@eavfw/quickform-core";
import { IconResolver, IconType } from "../../../icons/IconResolver";

import { trace } from "@opentelemetry/api";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { InputComponentMetadata } from "@eavfw/quickform-core";
import { InputPropertiesTypes } from "@eavfw/quickform-core/src/model";
import { InputPropertiesTypes } from "@eavfw/quickform-core";

export const emailInputSchema: InputComponentMetadata<InputPropertiesTypes> = {
label: "Email",
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export * from "./services";
export * from "./hooks";
export * from "./style";
export type * from "./model";
export * from "./utils/quickformUtils";
export { defaultQuickFormTokens } from "./style/defaultQuickFormTokens";
4 changes: 2 additions & 2 deletions packages/designer/src/Components/Drawers/QuestionTreeItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QuestionJsonModel } from "@eavfw/quickform-core/src/model/json-definitions/JsonDataModels";

import {
Button,
makeStyles,
Expand Down Expand Up @@ -67,7 +67,7 @@ const QuestionTreeItem: React.FC<QuestionTreeItemProps> = ({ setView, setActiveQ
const q = old.questions[key];
q.order = index + 1;

old.questions = Object.fromEntries(Object.entries(old.questions).map(([k, q], i) => [k, q, q.order ?? i] as [string, QuestionJsonModel, number]).sort(([k, a, i], [k1, b, j]) => i - j));
old.questions = Object.fromEntries(Object.entries(old.questions).map(([k, q], i) => [k, q, q.order ?? i] as [string, QuickFormQuestionDefinition, number]).sort(([k, a, i], [k1, b, j]) => i - j));

return { ...old };
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import { useViewStyles } from "../Styles/useViewStyles.styles";
import { useQuickFormDefinition } from "../../Contexts/QuickFormDefContext";
import { EditSettingsRegular } from "@fluentui/react-icons"
import { removeNonAlphanumeric } from "@eavfw/utils";
import { QuestionJsonModel } from "@eavfw/quickform-core/src/model/json-definitions/JsonDataModels";
import { VisibilityQueryField } from "@eavfw/quickform-querybuilder";
import { QuickFormQuestionDefinition } from "@eavfw/quickform-core";

const useStyles = makeStyles({
content: {
Expand Down Expand Up @@ -101,7 +101,7 @@ export const QuickFormSettingsViewHeader: React.FC = () => {
onChange={(e, d) => updateQuickFormPayload(old => {
old.questions[activeQuestion].order = parseInt(d.value);

old.questions = Object.fromEntries(Object.entries(old.questions).map(([k, q], i) => [k, q, q.order ?? i] as [string, QuestionJsonModel, number]).sort(([k, a, i], [k1, b, j]) => i - j))
old.questions = Object.fromEntries(Object.entries(old.questions).map(([k, q], i) => [k, q, q.order ?? i] as [string, QuickFormQuestionDefinition, number]).sort(([k, a, i], [k1, b, j]) => i - j))

return { ...old }
})} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useEffect, useMemo } from "react";
import { removeNonAlphanumeric } from "@eavfw/utils";
import { SerializedNodes } from "@craftjs/core"

import { RowColumnsLayout } from "@eavfw/quickform-core/src/model/json-definitions/Layout";
import { RowColumnsLayout } from "@eavfw/quickform-core";
import { QuickFormDefinition } from "@eavfw/quickform-core";


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { MouseEventHandler, ReactNode } from "react";
import classNames from "classnames";
import styles from "./DropdownSelectOption.module.css";
import { makeStyles, mergeClasses } from "@griffel/react";
import { Checkmark } from "@eavfw/quickform-core/src/components/icons";
import { shorthands } from "@fluentui/react-components";
import { quickformtokens, IconResolver } from "@eavfw/quickform-core";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { quickformtokens, useHandleEnterKeypress, useQuickForm } from "@eavfw/quickform-core";
import { useFocusableQuestion } from "@eavfw/quickform-core/src/hooks/useFocusableQuestion";
import { useFocusableQuestion } from "@eavfw/quickform-core";
import { CSSProperties, ChangeEvent, InputHTMLAttributes, useEffect, useState } from "react";
import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
import { QuestionModel } from "@eavfw/quickform-core/src/model";
import { QuestionModel } from "@eavfw/quickform-core";
import { IconResolver, IconType } from "../../../../core/src/components/icons/IconResolver";

import { trace } from "@opentelemetry/api";
Expand Down Expand Up @@ -106,11 +106,7 @@ export const BaseInputComponent: React.FC<BaseInputComponentProps> = ({ question
if (span) {
span.addEvent("BaseInputComponent:handleChange", { 'value': event.target.value });
}
//EXPLAIN: WHY IS THIS HERE? If no reason, lets remove.
if (event.target.value === "")
questionModel.errorMsg = "";



setText(() => event.target.value);
answerQuestion(questionModel.logicalName, event.target.value, true);
resize();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { InputComponentMetadata } from "@eavfw/quickform-core";
import { InputPropertiesTypes } from "@eavfw/quickform-core/src/model";
import { InputPropertiesTypes } from "@eavfw/quickform-core";

export const emailInputSchema: InputComponentMetadata<InputPropertiesTypes> = {
label: "Email",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { InputComponentMetadata } from "../../../../core/src/services/";
import { InputPropertiesTypes, } from "@eavfw/quickform-core/src/model";
import { InputPropertiesTypes, } from "@eavfw/quickform-core";

export const multilineInputSchema: InputComponentMetadata<InputPropertiesTypes> = {
label: "Multiline Text",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useQuickForm } from '../../../../core/src/state/QuickFormContext';
import { isSlideAnswered } from '@eavfw/quickform-core/src/utils/quickformUtils';
import { isSlideAnswered } from '@eavfw/quickform-core';

export const OverviewList = () => {
const { state, goToSlide } = useQuickForm();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { InputComponentMetadata } from "../../../../core/src/services/";
import { InputPropertiesTypes, } from "@eavfw/quickform-core/src/model";
import { InputPropertiesTypes, } from "@eavfw/quickform-core";

export const phoneInputSchema: InputComponentMetadata<InputPropertiesTypes> = {
label: "Phone",
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/components/text/TextInputSchema.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import { InputComponentMetadata } from "../../../../core/src/services/";
import { InputPropertiesTypes, } from "@eavfw/quickform-core/src/model";
import { InputPropertiesTypes, } from "@eavfw/quickform-core";

export const textInputSchema: InputComponentMetadata<InputPropertiesTypes> = {
label: "Text",
Expand Down
8 changes: 4 additions & 4 deletions packages/querybuilder/src/VisibilityQueryField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { QueryBuilder, defaultValidator, defaultOperators, formatQuery, RuleGrou

import { EditRegular } from "@fluentui/react-icons";
import { FieldTypes, InputComponentFieldMetadata, InputComponentMetadata, InputComponentSelectFieldMetadata, QuickformState, resolveInputComponent } from '@eavfw/quickform-core';
import { QuickFormQuestionsDefinition } from '@eavfw/quickform-core/src/model/json-definitions/QuickFormQuestionsDefinition';
import { QuestionJsonModel } from '@eavfw/quickform-core/src/model/json-definitions/JsonDataModels';
import { QuickFormQuestionsDefinition } from '@eavfw/quickform-core';
import { QuestionJsonModel } from '@eavfw/quickform-core';

import 'react-querybuilder/dist/query-builder.scss';
import { registerVisibilityEngine } from "@eavfw/quickform-core/src/state/action-handlers/VisibilityHandler";
import { QuestionModel } from "@eavfw/quickform-core/src/model";
import { registerVisibilityEngine } from "@eavfw/quickform-core";
import { QuestionModel } from "@eavfw/quickform-core";
import React from "react";

type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] }
Expand Down

0 comments on commit f024002

Please sign in to comment.