From 53b85b4fb43254f085ac57131b52c143d37337f8 Mon Sep 17 00:00:00 2001 From: Wojciech Gajda Date: Thu, 19 May 2022 09:24:01 +0200 Subject: [PATCH] ts config paths --- package-lock.json | 119 ++++++++++++++++++ package.json | 1 + sandbox/webpack.config.js | 2 + src/components/atoms/ButtonSimple.tsx | 2 +- src/components/atoms/Checkbox.tsx | 4 +- src/components/atoms/IconButton.tsx | 2 +- src/components/editor/ColumnComponent.tsx | 2 +- src/components/editor/ColumnsComponent.tsx | 6 +- src/components/editor/Controls.tsx | 4 +- src/components/editor/DocumentComponent.tsx | 4 +- .../editor/EmptyFeatureComponent.tsx | 2 +- src/components/editor/FeatureComponent.tsx | 4 +- src/components/editor/ImageComponent.tsx | 18 +-- src/components/editor/ListBlockComponent.tsx | 26 ++-- src/components/editor/StackComponent.tsx | 20 +-- src/components/editor/TableBlockComponent.tsx | 15 ++- src/components/editor/TextBlockComponent.tsx | 8 +- src/components/editor/TimeStampComponent.tsx | 6 +- .../editor/display/DeleteAndEdit.tsx | 4 +- src/components/editor/display/Rolloutable.tsx | 70 +---------- src/components/editor/display/TopMenuEdit.tsx | 4 +- .../editor/display/styles/Rolloutable.tsx | 4 +- src/components/editor/styles/Columns.tsx | 6 +- src/components/editor/styles/Controls.tsx | 4 +- src/components/editor/styles/Feature.tsx | 4 +- src/components/editor/styles/Stack.tsx | 4 +- src/components/editor/styles/TextBlock.tsx | 2 +- src/components/icons/index.tsx | 2 +- src/components/molecules/Confirm.tsx | 4 +- src/components/styles/ButtonSimple.tsx | 4 +- src/components/styles/CheckboxStyles.tsx | 2 +- src/components/styles/IconButton.tsx | 4 +- src/components/styles/TopMenu.tsx | 7 +- src/livepdf/PDFDocument.tsx | 8 +- src/livepdf/index.tsx | 2 +- .../livecomponents/editor/ColumnComponent.tsx | 2 +- .../editor/ColumnsComponent.tsx | 2 +- .../editor/FeatureComponent.tsx | 2 +- .../livecomponents/editor/ImageComponent.tsx | 2 +- .../editor/ListBlockComponent.tsx | 2 +- .../livecomponents/editor/StackComponent.tsx | 2 +- .../editor/TableBlockComponent.tsx | 2 +- .../editor/TextBlockComponent.tsx | 2 +- .../editor/TimeStampComponent.tsx | 2 +- src/screens/ReactPDFEditor.tsx | 12 +- src/screens/styles/ReactPDFEditor.tsx | 4 +- src/topmenu/components/SelectInput.tsx | 2 +- src/topmenu/components/styles/Shared.tsx | 4 +- src/topmenu/components/styles/Topicon.tsx | 4 +- src/topmenu/index.tsx | 6 +- .../items/ExpandableInputMaximize2.tsx | 2 +- .../items/ExpandableInputMinimize2.tsx | 2 +- src/topmenu/items/ExpandableInputSquare.tsx | 2 +- src/topmenu/items/InputFontSize.tsx | 2 +- src/topmenu/items/InputLineHeight.tsx | 2 +- src/topmenu/items/SelectFontType.tsx | 2 +- src/topmenu/items/TopIconAlignCenter.tsx | 2 +- src/topmenu/items/TopIconAlignJustify.tsx | 2 +- src/topmenu/items/TopIconAlignLeft.tsx | 2 +- src/topmenu/items/TopIconAlignRight.tsx | 2 +- src/topmenu/items/TopIconBold.tsx | 2 +- src/topmenu/items/TopIconFontSize.tsx | 2 +- src/topmenu/items/TopIconItalic.tsx | 2 +- src/topmenu/items/TopIconRedo.tsx | 2 +- src/topmenu/items/TopIconTextDecoration.tsx | 2 +- src/topmenu/items/TopIconUndo.tsx | 2 +- .../items/alignItemsToBaselineIcon.tsx | 2 +- src/topmenu/items/alignItemsToCenterIcon.tsx | 2 +- src/topmenu/items/alignItemsToEndIcon.tsx | 2 +- src/topmenu/items/alignItemsToStartIcon.tsx | 2 +- src/topmenu/items/alignItemsToStretchIcon.tsx | 2 +- .../items/alignSelfToFlexBaselineIcon.tsx | 2 +- .../items/alignSelfToFlexCenterIcon.tsx | 2 +- src/topmenu/items/alignSelfToFlexEndIcon.tsx | 2 +- .../items/alignSelfToFlexStartIcon.tsx | 2 +- .../items/alignSelfToFlexStretchIcon.tsx | 2 +- src/topmenu/items/fitToParentIcon.tsx | 2 +- src/topmenu/items/flexFlowColumnIcon.tsx | 2 +- src/topmenu/items/flexFlowRowIcon.tsx | 2 +- .../items/justifyContentCenterIcon.tsx | 2 +- .../items/justifyContentFlexEndIcon.tsx | 2 +- .../items/justifyContentFlexStartIcon.tsx | 2 +- .../items/justifyContentSpaceAround.tsx | 2 +- .../items/justifyContentSpaceBetween.tsx | 2 +- tsconfig.json | 16 ++- 85 files changed, 287 insertions(+), 227 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5bfa399..bef5835 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2798,6 +2798,12 @@ "@types/node": "*" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "@types/minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", @@ -11596,6 +11602,119 @@ } } }, + "tsconfig-paths": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", + "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + } + } + }, + "tsconfig-paths-webpack-plugin": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-3.5.2.tgz", + "integrity": "sha512-EhnfjHbzm5IYI9YPNVIxx1moxMI4bpHD2e0zTXeDNQcwjjRaGepP7IhTHJkyDBG0CAOoxRfe7jCG630Ou+C6Pw==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.7.0", + "tsconfig-paths": "^3.9.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "enhanced-resolve": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz", + "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true + } + } + }, "tslib": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", diff --git a/package.json b/package.json index 6804d2d..e1ebb48 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "react-dom": "^16.14.0", "style-loader": "0.23.1", "ts-loader": "^6.2.2", + "tsconfig-paths-webpack-plugin": "^3.5.2", "typescript": "^3.9.10", "url-loader": "^2.3.0", "webpack": "^4.46.0", diff --git a/sandbox/webpack.config.js b/sandbox/webpack.config.js index 59100ac..9b9b6f8 100644 --- a/sandbox/webpack.config.js +++ b/sandbox/webpack.config.js @@ -4,6 +4,7 @@ var sourcePath = path.join(__dirname, "./"); var outPath = path.join(__dirname, "../public"); var HtmlWebpackPlugin = require("html-webpack-plugin"); var WebpackCleanupPlugin = require("webpack-cleanup-plugin"); +const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); // const config = require('./config.js') module.exports = { @@ -20,6 +21,7 @@ module.exports = { target: "web", mode: "development", resolve: { + plugins: [new TsconfigPathsPlugin({/* options: see below */})], extensions: [".js", ".jsx", ".ts", ".tsx"], mainFields: ["module", "browser", "main"], alias: { diff --git a/src/components/atoms/ButtonSimple.tsx b/src/components/atoms/ButtonSimple.tsx index 21823ef..2470b18 100644 --- a/src/components/atoms/ButtonSimple.tsx +++ b/src/components/atoms/ButtonSimple.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as styles from "../styles/ButtonSimple"; +import * as styles from "@styles/ButtonSimple"; export interface ButtonSimpleProps { onClick: () => void; children: React.ReactNode; diff --git a/src/components/atoms/Checkbox.tsx b/src/components/atoms/Checkbox.tsx index 5f3bd8e..73c2c72 100644 --- a/src/components/atoms/Checkbox.tsx +++ b/src/components/atoms/Checkbox.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import classnames from "classnames"; -import { CheckBox } from "../icons"; -import * as styles from "../styles/CheckboxStyles"; +import { CheckBox } from "@components/icons" +import * as styles from "@styles/CheckboxStyles"; export interface ICheckBoxProps { value?: boolean; diff --git a/src/components/atoms/IconButton.tsx b/src/components/atoms/IconButton.tsx index de5d33c..1863737 100644 --- a/src/components/atoms/IconButton.tsx +++ b/src/components/atoms/IconButton.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import * as styles from "../styles/IconButton"; +import * as styles from "@styles/IconButton"; export interface IconButtonProps { onClick: () => void; children: React.ReactNode; diff --git a/src/components/editor/ColumnComponent.tsx b/src/components/editor/ColumnComponent.tsx index ddc1beb..0277c1d 100644 --- a/src/components/editor/ColumnComponent.tsx +++ b/src/components/editor/ColumnComponent.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { PartialObjects } from "../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { FeatureComponent } from "./FeatureComponent"; import * as styles from "./styles/Column"; import { Controls } from "./Controls"; diff --git a/src/components/editor/ColumnsComponent.tsx b/src/components/editor/ColumnsComponent.tsx index fbe5c57..5264447 100644 --- a/src/components/editor/ColumnsComponent.tsx +++ b/src/components/editor/ColumnsComponent.tsx @@ -1,10 +1,10 @@ import React from "react"; -import { PartialObjects } from "../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import * as styles from "./styles/Columns"; import { ColumnComponent } from "./ColumnComponent"; -import { Colors } from "../../Colors"; +import { Colors } from "@/Colors"; import { Resizable } from "re-resizable"; -import { translated } from "../../models"; +import { translated } from "@/models"; import * as Icons from "react-feather"; import * as styles1 from "./styles/Feature"; import cx from "classnames"; diff --git a/src/components/editor/Controls.tsx b/src/components/editor/Controls.tsx index 35affe2..7587209 100644 --- a/src/components/editor/Controls.tsx +++ b/src/components/editor/Controls.tsx @@ -1,8 +1,8 @@ import React, { useState } from "react"; import * as styles from "./styles/Controls"; -import { BuiltInStyles, PartialObjects } from "../../graphql-zeus"; +import { BuiltInStyles, PartialObjects } from "@/graphql-zeus"; import { PlusCircle, MinusCircle } from "react-feather"; -import { translated } from "../../models"; +import { translated } from "@/models"; export interface ControlsProps { features: PartialObjects["Feature"][]; mutateWholeObject: () => void; diff --git a/src/components/editor/DocumentComponent.tsx b/src/components/editor/DocumentComponent.tsx index e640092..8e657d3 100644 --- a/src/components/editor/DocumentComponent.tsx +++ b/src/components/editor/DocumentComponent.tsx @@ -1,8 +1,8 @@ import * as React from "react"; -import { PartialObjects } from "../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { Editor } from ".."; import { Rolloutable } from "./display/Rolloutable"; -import { Confirm } from "../molecules/Confirm"; +import { Confirm } from "@components/molecules/Confirm"; import * as Icons from "react-feather"; import * as styles from "./styles/Feature"; import cx from "classnames"; diff --git a/src/components/editor/EmptyFeatureComponent.tsx b/src/components/editor/EmptyFeatureComponent.tsx index 73b3159..80faf3c 100644 --- a/src/components/editor/EmptyFeatureComponent.tsx +++ b/src/components/editor/EmptyFeatureComponent.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { PartialObjects } from "../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { Controls } from "./Controls"; export interface EmptyFeatureComponentProps { feature: PartialObjects["Feature"]; diff --git a/src/components/editor/FeatureComponent.tsx b/src/components/editor/FeatureComponent.tsx index 87b32ad..fc9f0c5 100644 --- a/src/components/editor/FeatureComponent.tsx +++ b/src/components/editor/FeatureComponent.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { PartialObjects } from "../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { isTextBlock, isImage, @@ -7,7 +7,7 @@ import { isListBlock, isTableBlock, isTimeStamp -} from "../../utils"; +} from "@/utils"; import { TextBlockComponent } from "./TextBlockComponent"; import { ImageComponent } from "./ImageComponent"; import { StackComponent } from "./StackComponent"; diff --git a/src/components/editor/ImageComponent.tsx b/src/components/editor/ImageComponent.tsx index 0c79b0a..560e3dd 100644 --- a/src/components/editor/ImageComponent.tsx +++ b/src/components/editor/ImageComponent.tsx @@ -1,14 +1,14 @@ import React, { useState } from "react"; -import { PartialObjects } from "../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import * as styles from "./styles/Image"; -import { translated } from "../../models"; -import { MAX_IMAGE_WIDTH } from "../../constants"; +import { translated } from "@/models"; +import { MAX_IMAGE_WIDTH } from "@/constants"; import { DeleteAndEditIconsComponentProps, DeleteAndEditIconsComponent } from "./display/DeleteAndEdit"; -import { TopMenuProps, TopMenu } from "../../topmenu/index"; +import { TopMenuProps, TopMenu } from "@/topmenu/index"; const t = translated("ImageComponentTxt"); @@ -25,7 +25,7 @@ function getBase64(file: Blob): Promise { } export interface ImageComponentProps extends DeleteAndEditIconsComponentProps, - TopMenuProps { + TopMenuProps { image: PartialObjects["Image"]; onChange: () => void; } @@ -44,10 +44,10 @@ export const ImageComponent = ({

{t("ImageTitle")}

diff --git a/src/components/editor/ListBlockComponent.tsx b/src/components/editor/ListBlockComponent.tsx index 1d289e4..927aa4c 100644 --- a/src/components/editor/ListBlockComponent.tsx +++ b/src/components/editor/ListBlockComponent.tsx @@ -1,14 +1,14 @@ import * as React from "react"; -import { PartialObjects } from "../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { FeatureComponent } from "./FeatureComponent"; import { Controls } from "./Controls"; import { Rolloutable, } from "./display/Rolloutable"; import { DeleteAndEditIconsComponentProps } from "./display/DeleteAndEdit"; -import { swapInArray } from "../../utils"; -import { translated } from "../../models"; -import { TopMenu } from "../../topmenu/index"; +import { swapInArray } from "@/utils"; +import { translated } from "@/models"; +import { TopMenu } from "@/topmenu/index"; // import { TextBlockComponentProps } from "livepdf/livecomponents/editor"; export interface ListBlockComponentProps extends DeleteAndEditIconsComponentProps { listBlock: PartialObjects["ListBlock"]; @@ -20,7 +20,7 @@ export interface ListBlockComponentProps extends DeleteAndEditIconsComponentProp const t = translated("ListBlockComponentTxt"); export const ListBlockComponent = (props: ListBlockComponentProps) => { - const { onChange,onEdit,listBlock } = props; + const { onChange, onEdit, listBlock } = props; return ( @@ -39,25 +39,25 @@ export const ListBlockComponent = (props: ListBlockComponentProps) => { onMoveDown={ index !== listBlock.items!.length - 1 ? () => { - swapInArray(listBlock.items!, index, index + 1); - onChange(); - } + swapInArray(listBlock.items!, index, index + 1); + onChange(); + } : undefined } onMoveUp={ index !== 0 && listBlock.items!.length > 1 ? () => { - swapInArray(listBlock.items!, index, index - 1); - onChange(); - } + swapInArray(listBlock.items!, index, index - 1); + onChange(); + } : undefined } /> ); })} {listBlock.items && ( - { diff --git a/src/components/editor/StackComponent.tsx b/src/components/editor/StackComponent.tsx index 4040704..1f51194 100644 --- a/src/components/editor/StackComponent.tsx +++ b/src/components/editor/StackComponent.tsx @@ -1,12 +1,12 @@ import * as React from "react"; -import { PartialObjects } from "../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { FeatureComponent } from "./FeatureComponent"; import { Controls } from "./Controls"; import { Rolloutable } from "./display/Rolloutable"; import { DeleteAndEditIconsComponentProps } from "./display/DeleteAndEdit"; -import { swapInArray } from "../../utils"; -import { translated } from "../../models"; -import { TopMenu } from "../../topmenu/index"; +import { swapInArray } from "@/utils"; +import { translated } from "@/models"; +import { TopMenu } from "@/topmenu/index"; export interface StackComponentProps extends DeleteAndEditIconsComponentProps { stack: PartialObjects["Stack"]; onChange: () => void; @@ -38,17 +38,17 @@ export const StackComponent = (props: StackComponentProps) => { onMoveDown={ index !== stack.items!.length - 1 ? () => { - swapInArray(stack.items!, index, index + 1); - onChange(); - } + swapInArray(stack.items!, index, index + 1); + onChange(); + } : undefined } onMoveUp={ index !== 0 && stack.items!.length > 1 ? () => { - swapInArray(stack.items!, index, index - 1); - onChange(); - } + swapInArray(stack.items!, index, index - 1); + onChange(); + } : undefined } /> diff --git a/src/components/editor/TableBlockComponent.tsx b/src/components/editor/TableBlockComponent.tsx index 6ee1a86..4855298 100644 --- a/src/components/editor/TableBlockComponent.tsx +++ b/src/components/editor/TableBlockComponent.tsx @@ -1,14 +1,14 @@ import * as React from "react"; -import { PartialObjects } from "../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { ColumnsComponent } from "./ColumnsComponent"; import { Rolloutable } from "./display/Rolloutable"; import * as Icons from "react-feather"; import cx from "classnames"; import * as styles1 from "./styles/Feature"; -import { translated } from "../../models"; +import { translated } from "@/models"; import * as styles from "./styles/TableBlock"; import { DeleteAndEditIconsComponentProps } from "./display/DeleteAndEdit"; -import { TopMenu } from "../../topmenu/index"; +import { TopMenu } from "@/topmenu/index"; export interface TableBlockComponentProps extends DeleteAndEditIconsComponentProps { @@ -63,9 +63,8 @@ export const TableBlockComponent = (props: TableBlockComponentProps) => { return ( @@ -175,8 +174,8 @@ export const TableBlockComponent = (props: TableBlockComponentProps) => { columns: tableBlock.rows!.length > 0 ? tableBlock.rows![ - tableBlock.rows!.length - 1 - ].columns!.map(() => emptyColumn()) + tableBlock.rows!.length - 1 + ].columns!.map(() => emptyColumn()) : [emptyColumn()] }); onChange(); diff --git a/src/components/editor/TextBlockComponent.tsx b/src/components/editor/TextBlockComponent.tsx index 46e3394..26c9a48 100644 --- a/src/components/editor/TextBlockComponent.tsx +++ b/src/components/editor/TextBlockComponent.tsx @@ -1,13 +1,13 @@ import React, { useRef, useEffect } from "react"; -import { PartialObjects } from "../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import * as styles from "./styles/TextBlock"; import { DeleteAndEditIconsComponentProps, DeleteAndEditIconsComponent } from "./display/DeleteAndEdit"; -import { translated } from "../../models"; +import { translated } from "@/models"; -import { TopMenuProps, TopMenu } from "../../topmenu/index"; +import { TopMenuProps, TopMenu } from "@/topmenu/index"; // import { Controls } from "./Controls"; // czy tutaj trzeba zrobić export interface ... extends Delete || TopMenuProps @@ -18,7 +18,7 @@ const t = translated("TextBlockComponentTxt"); export interface TextBlockComponentProps extends DeleteAndEditIconsComponentProps, - TopMenuProps { + TopMenuProps { textBlock: PartialObjects["TextBlock"]; onChange: () => void; } diff --git a/src/components/editor/TimeStampComponent.tsx b/src/components/editor/TimeStampComponent.tsx index d6c1518..1298489 100644 --- a/src/components/editor/TimeStampComponent.tsx +++ b/src/components/editor/TimeStampComponent.tsx @@ -1,11 +1,11 @@ import React from "react"; import * as styles from "./styles/TextBlock"; -import { translated } from "../../models"; -export interface TimeStampComponentProps {} +import { translated } from "@/models"; +export interface TimeStampComponentProps { } -export const TimeStampComponent = ({}: TimeStampComponentProps) => { +export const TimeStampComponent = ({ }: TimeStampComponentProps) => { const t = translated("TimeStampComponentTxt"); return
{`${t("Date")}`}
; }; diff --git a/src/components/editor/display/DeleteAndEdit.tsx b/src/components/editor/display/DeleteAndEdit.tsx index 93494fc..a4d6b25 100644 --- a/src/components/editor/display/DeleteAndEdit.tsx +++ b/src/components/editor/display/DeleteAndEdit.tsx @@ -1,8 +1,8 @@ import * as React from "react"; -import { PartialObjects } from "../../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import * as Icons from "react-feather"; import cx from "classnames"; -import * as styles1 from "..//styles/Feature"; +import * as styles1 from "@components/editor/styles/Feature"; export interface DeleteAndEditIconsComponentProps { feature?: PartialObjects["Feature"]; diff --git a/src/components/editor/display/Rolloutable.tsx b/src/components/editor/display/Rolloutable.tsx index d16b462..c15dfd0 100644 --- a/src/components/editor/display/Rolloutable.tsx +++ b/src/components/editor/display/Rolloutable.tsx @@ -1,80 +1,12 @@ import * as React from "react"; import * as styles from "./styles/Rolloutable"; import * as icons from "react-feather"; -import { PartialObjects } from "../../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { DeleteAndEditIconsComponentProps, DeleteAndEditIconsComponent } from "./DeleteAndEdit"; -// export interface DeleteAndEditIconsComponentProps { -// feature?: PartialObjects["Feature"]; -// onDelete?: () => void; -// onEdit?: (feature: PartialObjects["Feature"]) => void; -// isRoot?: boolean; -// onMoveDown?: () => void; -// onMoveUp?: () => void; -// withoutDeleteIcons?: boolean; -// } - -// export const DeleteAndEditIconsComponent = ({ -// feature, -// onDelete, -// isRoot, -// onEdit, -// onMoveDown, -// onMoveUp -// }: DeleteAndEditIconsComponentProps) => ( -//
-// {onMoveDown && ( -//
onMoveDown()} -// > -// -//
-// )} -// {onMoveUp && ( -//
onMoveUp()} -// > -// -//
-// )} -// {!isRoot && ( -//
-// -//
-// )} -//
-// onEdit && feature && onEdit(feature)} -// size={15} -// /> -//
-//
-// ); - export interface RolloutableComponentProps extends DeleteAndEditIconsComponentProps { children: React.ReactNode; diff --git a/src/components/editor/display/TopMenuEdit.tsx b/src/components/editor/display/TopMenuEdit.tsx index bcf2b6a..72abf42 100644 --- a/src/components/editor/display/TopMenuEdit.tsx +++ b/src/components/editor/display/TopMenuEdit.tsx @@ -1,8 +1,8 @@ import * as React from "react"; -import { PartialObjects } from "../../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import * as Icons from "react-feather"; import cx from "classnames"; -import * as styles1 from "..//styles/Feature"; +import * as styles1 from "@components/editor/styles/Feature"; export interface DeleteAndEditIconsComponentProps { feature?: PartialObjects["Feature"]; diff --git a/src/components/editor/display/styles/Rolloutable.tsx b/src/components/editor/display/styles/Rolloutable.tsx index 340148d..b71c078 100644 --- a/src/components/editor/display/styles/Rolloutable.tsx +++ b/src/components/editor/display/styles/Rolloutable.tsx @@ -1,6 +1,6 @@ import { style } from "typestyle"; -import { Colors } from "../../../../Colors"; -import { transition } from "../../../../constants"; +import { Colors } from "@/Colors"; +import { transition } from "@/constants"; export const Title = style({ $debugName: "RolloutableTitle", cursor: "pointer", diff --git a/src/components/editor/styles/Columns.tsx b/src/components/editor/styles/Columns.tsx index 06020d9..26d31e3 100644 --- a/src/components/editor/styles/Columns.tsx +++ b/src/components/editor/styles/Columns.tsx @@ -1,5 +1,5 @@ import { style } from "typestyle"; -import { Colors } from "../../../Colors"; +import { Colors } from "@/Colors"; export const Main = style({ $debugName: "ColumnsMain", @@ -9,7 +9,7 @@ export const Main = style({ width: "100%" }); -export const ColumnTitleDiv = style ({ +export const ColumnTitleDiv = style({ $debugName: "ColumnTitleDiv", display: "flex", alignItems: "center", @@ -17,7 +17,7 @@ export const ColumnTitleDiv = style ({ marginBottom: 5 }) -export const ColumnTitle = style ({ +export const ColumnTitle = style({ $debugName: "ColumnTitle", fontSize: 12, margin: 0, diff --git a/src/components/editor/styles/Controls.tsx b/src/components/editor/styles/Controls.tsx index 6d4be86..fd2e1f0 100644 --- a/src/components/editor/styles/Controls.tsx +++ b/src/components/editor/styles/Controls.tsx @@ -1,6 +1,6 @@ import { style } from "typestyle"; -import { Colors } from "../../../Colors"; -import { transition } from "../../../constants"; +import { Colors } from "@/Colors"; +import { transition } from "@/constants"; export const Main = style({ $debugName: "ControlsMain", diff --git a/src/components/editor/styles/Feature.tsx b/src/components/editor/styles/Feature.tsx index d5d361f..b9608d9 100644 --- a/src/components/editor/styles/Feature.tsx +++ b/src/components/editor/styles/Feature.tsx @@ -1,5 +1,5 @@ import { style } from "typestyle"; -import { Colors } from "../../../Colors"; +import { Colors } from "@/Colors"; export const FeatureMain = style({ $debugName: "FeatureMain", @@ -20,7 +20,7 @@ export const MiniIcon = style({ alignSelf: "flex-start", marginRight: 5, color: Colors.Androgyn - + }); export const Delete = style({ diff --git a/src/components/editor/styles/Stack.tsx b/src/components/editor/styles/Stack.tsx index ed7e931..a307ffd 100644 --- a/src/components/editor/styles/Stack.tsx +++ b/src/components/editor/styles/Stack.tsx @@ -1,5 +1,5 @@ import { style } from "typestyle"; -import { Colors } from "../../styles/Colors"; +import { Colors } from "@components/editor/styles/Colors"; export const Main = style({ $debugName: "StackMain", @@ -10,7 +10,7 @@ export const Main = style({ marginBottom: 25 }); export const Title = style({ - $debugName:"StackTitle", + $debugName: "StackTitle", cursor: "pointer", fontWeight: "bold" }); diff --git a/src/components/editor/styles/TextBlock.tsx b/src/components/editor/styles/TextBlock.tsx index de9fdcd..f445e7d 100644 --- a/src/components/editor/styles/TextBlock.tsx +++ b/src/components/editor/styles/TextBlock.tsx @@ -1,5 +1,5 @@ import { style } from "typestyle"; -import { Colors } from "../../../Colors"; +import { Colors } from "@/Colors"; export const Main = style({ $debugName: "TextBlockMain", diff --git a/src/components/icons/index.tsx b/src/components/icons/index.tsx index bb35b36..d6ed363 100644 --- a/src/components/icons/index.tsx +++ b/src/components/icons/index.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { Colors } from "../../Colors"; +import { Colors } from "@/Colors"; interface IIconFill { fill: keyof typeof Colors; diff --git a/src/components/molecules/Confirm.tsx b/src/components/molecules/Confirm.tsx index d901ee7..c1fcbab 100644 --- a/src/components/molecules/Confirm.tsx +++ b/src/components/molecules/Confirm.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; -import { ButtonSimple } from "../atoms"; -import { translated } from "../../models"; +import { ButtonSimple } from "@components/atoms"; +import { translated } from "@/models"; export interface IConfirmProps { children: React.ReactNode; diff --git a/src/components/styles/ButtonSimple.tsx b/src/components/styles/ButtonSimple.tsx index e0dc805..aa41901 100644 --- a/src/components/styles/ButtonSimple.tsx +++ b/src/components/styles/ButtonSimple.tsx @@ -1,6 +1,6 @@ import { style } from "typestyle"; -import { Colors } from "../../Colors"; -import { transition } from "../../constants"; +import { Colors } from "@/Colors"; +import { transition } from "@/constants"; export const Main = style({ $debugName: "ButtonSimpleMain", display: "inline-block", diff --git a/src/components/styles/CheckboxStyles.tsx b/src/components/styles/CheckboxStyles.tsx index 276bf40..c6b31ce 100644 --- a/src/components/styles/CheckboxStyles.tsx +++ b/src/components/styles/CheckboxStyles.tsx @@ -1,5 +1,5 @@ import { style } from "typestyle"; -import { Colors } from "../../Colors"; +import { Colors } from "@/Colors"; export const Checkbox = style({ $debugName: "Checkbox", diff --git a/src/components/styles/IconButton.tsx b/src/components/styles/IconButton.tsx index 728dc90..34b2e7c 100644 --- a/src/components/styles/IconButton.tsx +++ b/src/components/styles/IconButton.tsx @@ -1,6 +1,6 @@ import { style } from "typestyle"; -import { Colors } from "../../Colors"; -import { transition } from "../../constants"; +import { Colors } from "@/Colors"; +import { transition } from "@/constants"; export const Main = style({ $debugName: "IconButtonMain", display: "flex", diff --git a/src/components/styles/TopMenu.tsx b/src/components/styles/TopMenu.tsx index a8e4120..8abe675 100644 --- a/src/components/styles/TopMenu.tsx +++ b/src/components/styles/TopMenu.tsx @@ -1,14 +1,11 @@ import { style, classes } from "typestyle"; -import { Colors } from "../../Colors"; - import { TOPHEIGHT } from "../../constants"; +import { Colors } from "@/Colors"; +import { TOPHEIGHT } from "@/constants"; export const Main = style({ $debugName: "TopMenuMain", fontFamily: "Fira Sans", background: Colors.White, display: "flex", - // boxShadow: `${Colors["Dark Side"]}44 2px 5px 14px`, - // height: TOPHEIGHT, - // paddingLeft: 30 flexWrap: "wrap", maxHeight: '100%', minHeight: TOPHEIGHT, diff --git a/src/livepdf/PDFDocument.tsx b/src/livepdf/PDFDocument.tsx index a818fe0..33cf53d 100644 --- a/src/livepdf/PDFDocument.tsx +++ b/src/livepdf/PDFDocument.tsx @@ -1,8 +1,8 @@ import React from "react"; import { Document, Page, View, StyleSheet, Font } from "@react-pdf/renderer"; import { FeatureComponent } from "./livecomponents/editor"; -import { FrontendTypes } from "../frontend-types"; -import { DefaultValues } from "../constants"; +import { FrontendTypes } from "@/frontend-types"; +import { DefaultValues } from "@/constants"; export interface PDFDocumentProps { machine: FrontendTypes["MachineTemplate"]; onRender: () => void; @@ -24,8 +24,8 @@ export const PDFDocument = (props: PDFDocumentProps) => { feature={props.machine.template!.header} hideControls={true} - // - //showTopMenu={true} + // + //showTopMenu={true} /> )} diff --git a/src/livepdf/index.tsx b/src/livepdf/index.tsx index 98d5b21..966ef8f 100644 --- a/src/livepdf/index.tsx +++ b/src/livepdf/index.tsx @@ -4,7 +4,7 @@ import { } from "@react-pdf/renderer"; import * as stylesMain from "./styles"; import { PDFDocument } from "./PDFDocument"; -import { FrontendTypes } from "../frontend-types"; +import { FrontendTypes } from "@/frontend-types"; export interface LivePDFProps { machine: FrontendTypes["MachineTemplate"] } diff --git a/src/livepdf/livecomponents/editor/ColumnComponent.tsx b/src/livepdf/livecomponents/editor/ColumnComponent.tsx index b5f1525..c095ac8 100644 --- a/src/livepdf/livecomponents/editor/ColumnComponent.tsx +++ b/src/livepdf/livecomponents/editor/ColumnComponent.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { PartialObjects } from "../../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { FeatureComponent } from "./FeatureComponent"; import ReactPDF, { View } from "@react-pdf/renderer"; export interface ColumnComponentProps { diff --git a/src/livepdf/livecomponents/editor/ColumnsComponent.tsx b/src/livepdf/livecomponents/editor/ColumnsComponent.tsx index 5d4c04a..46d4006 100644 --- a/src/livepdf/livecomponents/editor/ColumnsComponent.tsx +++ b/src/livepdf/livecomponents/editor/ColumnsComponent.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { PartialObjects } from "../../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { ColumnComponent } from "./ColumnComponent"; import ReactPDF, { View } from "@react-pdf/renderer"; export interface ColumnsComponentProps { diff --git a/src/livepdf/livecomponents/editor/FeatureComponent.tsx b/src/livepdf/livecomponents/editor/FeatureComponent.tsx index cbf50dd..e6b48cd 100644 --- a/src/livepdf/livecomponents/editor/FeatureComponent.tsx +++ b/src/livepdf/livecomponents/editor/FeatureComponent.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { PartialObjects } from "../../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { TextBlockComponent } from "./TextBlockComponent"; import { ImageComponent } from "./ImageComponent"; import { StackComponent } from "./StackComponent"; diff --git a/src/livepdf/livecomponents/editor/ImageComponent.tsx b/src/livepdf/livecomponents/editor/ImageComponent.tsx index cfc47b9..44c0e0c 100644 --- a/src/livepdf/livecomponents/editor/ImageComponent.tsx +++ b/src/livepdf/livecomponents/editor/ImageComponent.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { PartialObjects } from "../../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import ReactPDF, { Image as ReactImage } from "@react-pdf/renderer"; export interface ImageComponentProps { diff --git a/src/livepdf/livecomponents/editor/ListBlockComponent.tsx b/src/livepdf/livecomponents/editor/ListBlockComponent.tsx index 98f5063..9692312 100644 --- a/src/livepdf/livecomponents/editor/ListBlockComponent.tsx +++ b/src/livepdf/livecomponents/editor/ListBlockComponent.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { PartialObjects } from "../../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { FeatureComponent } from "./FeatureComponent"; import { View, Text } from "@react-pdf/renderer"; export interface ListBlockComponentProps { diff --git a/src/livepdf/livecomponents/editor/StackComponent.tsx b/src/livepdf/livecomponents/editor/StackComponent.tsx index 8d60c27..2ca7313 100644 --- a/src/livepdf/livecomponents/editor/StackComponent.tsx +++ b/src/livepdf/livecomponents/editor/StackComponent.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { PartialObjects } from "../../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { FeatureComponent } from "./FeatureComponent"; import { View } from "@react-pdf/renderer"; export interface StackComponentProps { diff --git a/src/livepdf/livecomponents/editor/TableBlockComponent.tsx b/src/livepdf/livecomponents/editor/TableBlockComponent.tsx index ebc0f0d..2fd6169 100644 --- a/src/livepdf/livecomponents/editor/TableBlockComponent.tsx +++ b/src/livepdf/livecomponents/editor/TableBlockComponent.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { BuiltInStyles, PartialObjects } from "../../../graphql-zeus"; +import { BuiltInStyles, PartialObjects } from "@/graphql-zeus"; import { ColumnsComponent } from "./ColumnsComponent"; import ReactPDF, { View } from "@react-pdf/renderer"; diff --git a/src/livepdf/livecomponents/editor/TextBlockComponent.tsx b/src/livepdf/livecomponents/editor/TextBlockComponent.tsx index f83585f..8a3b41c 100644 --- a/src/livepdf/livecomponents/editor/TextBlockComponent.tsx +++ b/src/livepdf/livecomponents/editor/TextBlockComponent.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { PartialObjects } from "../../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { Text } from "@react-pdf/renderer"; export interface TextBlockComponentProps { textBlock: PartialObjects["TextBlock"] diff --git a/src/livepdf/livecomponents/editor/TimeStampComponent.tsx b/src/livepdf/livecomponents/editor/TimeStampComponent.tsx index efa93c3..f5ae2c0 100644 --- a/src/livepdf/livecomponents/editor/TimeStampComponent.tsx +++ b/src/livepdf/livecomponents/editor/TimeStampComponent.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { PartialObjects } from "../../../graphql-zeus"; +import { PartialObjects } from "@/graphql-zeus"; import { Text } from "@react-pdf/renderer"; export interface TimeStampComponentProps { timeStamp: PartialObjects["TimeStamp"]; diff --git a/src/screens/ReactPDFEditor.tsx b/src/screens/ReactPDFEditor.tsx index e5693be..790356c 100644 --- a/src/screens/ReactPDFEditor.tsx +++ b/src/screens/ReactPDFEditor.tsx @@ -1,11 +1,11 @@ import React, { useState } from "react"; -import { PartialObjects } from "../graphql-zeus"; -import { DocumentComponent, FeatureComponent } from "../components/editor"; -import { IconButton } from "../components/atoms"; +import { PartialObjects } from "@/graphql-zeus"; +import { DocumentComponent, FeatureComponent } from "@components/editor"; +import { IconButton } from "@components/atoms"; import * as styles from "./styles/ReactPDFEditor"; -import { LivePDF } from "../livepdf"; -import { FrontendTypes } from "../frontend-types"; -import { translated } from "../models"; +import { LivePDF } from "@/livepdf"; +import { FrontendTypes } from "@/frontend-types"; +import { translated } from "@/models"; import * as Icons from "react-feather"; export interface PDFProps { onChange?: (onChange: FrontendTypes["MachineTemplate"]) => void; diff --git a/src/screens/styles/ReactPDFEditor.tsx b/src/screens/styles/ReactPDFEditor.tsx index 3027746..4ba5525 100644 --- a/src/screens/styles/ReactPDFEditor.tsx +++ b/src/screens/styles/ReactPDFEditor.tsx @@ -1,6 +1,6 @@ import { style, fontFace } from "typestyle"; -import { Colors } from "../../Colors"; -import { TOPHEIGHT } from "../../constants"; +import { Colors } from "@/Colors"; +import { TOPHEIGHT } from "@/constants"; fontFace({ fontFamily: "Fira Sans", diff --git a/src/topmenu/components/SelectInput.tsx b/src/topmenu/components/SelectInput.tsx index b8dd010..7ec54a1 100644 --- a/src/topmenu/components/SelectInput.tsx +++ b/src/topmenu/components/SelectInput.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from "react"; import * as styles from "./styles/SelectInput"; import * as sharedStyles from "./styles/Shared"; -import { fonts } from "../../livepdf/PDFDocument"; +import { fonts } from "@/livepdf/PDFDocument"; export const SelectInput = ({ value, diff --git a/src/topmenu/components/styles/Shared.tsx b/src/topmenu/components/styles/Shared.tsx index de5c4ce..7df50eb 100644 --- a/src/topmenu/components/styles/Shared.tsx +++ b/src/topmenu/components/styles/Shared.tsx @@ -1,6 +1,6 @@ import { style } from "typestyle"; -import { Colors } from "../../../Colors"; -import { TOPHEIGHT } from "../../../constants"; +import { Colors } from "@/Colors"; +import { TOPHEIGHT } from "@/constants"; export const Main = style({ $debugName: "TopMenuMain", fontFamily: "Fira Sans", diff --git a/src/topmenu/components/styles/Topicon.tsx b/src/topmenu/components/styles/Topicon.tsx index 4481d62..816dfd7 100644 --- a/src/topmenu/components/styles/Topicon.tsx +++ b/src/topmenu/components/styles/Topicon.tsx @@ -1,6 +1,6 @@ import { style, classes } from "typestyle"; -import { Colors } from "../../../Colors"; -import { TOPHEIGHT } from "../../../constants"; +import { Colors } from "@/Colors"; +import { TOPHEIGHT } from "@/constants"; export const Main = style({ $debugName: "TopMenuMain", fontFamily: "Fira Sans", diff --git a/src/topmenu/index.tsx b/src/topmenu/index.tsx index 5312f6c..952720c 100644 --- a/src/topmenu/index.tsx +++ b/src/topmenu/index.tsx @@ -1,10 +1,10 @@ import React from "react"; -import * as styles from "../components/styles/TopMenu"; +import * as styles from "@components/styles/TopMenu"; import "rc-tooltip/assets/bootstrap_white.css"; import "rc-color-picker/assets/index.css"; import ReactPDF from "@react-pdf/renderer"; -import { PartialObjects } from "../graphql-zeus"; -import { DefaultValues } from "../constants"; +import { PartialObjects } from "@/graphql-zeus"; +import { DefaultValues } from "@/constants"; import { SmallInput, TopIcon, diff --git a/src/topmenu/items/ExpandableInputMaximize2.tsx b/src/topmenu/items/ExpandableInputMaximize2.tsx index fa39e6c..1e19723 100644 --- a/src/topmenu/items/ExpandableInputMaximize2.tsx +++ b/src/topmenu/items/ExpandableInputMaximize2.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, ExtendableInputMenuItem } from "../models"; +import { MenuItemType, ExtendableInputMenuItem } from "@/topmenu/models"; export const ExpandableInputMaximize2: ExtendableInputMenuItem = { itemType: MenuItemType.ExtendableInput, diff --git a/src/topmenu/items/ExpandableInputMinimize2.tsx b/src/topmenu/items/ExpandableInputMinimize2.tsx index 888fc0b..e33964d 100644 --- a/src/topmenu/items/ExpandableInputMinimize2.tsx +++ b/src/topmenu/items/ExpandableInputMinimize2.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, ExtendableInputMenuItem } from "../models"; +import { MenuItemType, ExtendableInputMenuItem } from "@/topmenu/models"; export const ExpandableInputMinimize2: ExtendableInputMenuItem = { itemType: MenuItemType.ExtendableInput, diff --git a/src/topmenu/items/ExpandableInputSquare.tsx b/src/topmenu/items/ExpandableInputSquare.tsx index 36f5f7b..9f76385 100644 --- a/src/topmenu/items/ExpandableInputSquare.tsx +++ b/src/topmenu/items/ExpandableInputSquare.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, ExtendableInputMenuItem } from "../models"; +import { MenuItemType, ExtendableInputMenuItem } from "@/topmenu/models"; export const ExpandableInputSquare: ExtendableInputMenuItem = { itemType: MenuItemType.ExtendableInput, diff --git a/src/topmenu/items/InputFontSize.tsx b/src/topmenu/items/InputFontSize.tsx index 3410d3f..3e79de8 100644 --- a/src/topmenu/items/InputFontSize.tsx +++ b/src/topmenu/items/InputFontSize.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, SmallInputMenuItem } from "../models"; +import { MenuItemType, SmallInputMenuItem } from "@/topmenu/models"; export const InputFontSize: SmallInputMenuItem = { name: "fontSize", diff --git a/src/topmenu/items/InputLineHeight.tsx b/src/topmenu/items/InputLineHeight.tsx index a48cd01..2c6c246 100644 --- a/src/topmenu/items/InputLineHeight.tsx +++ b/src/topmenu/items/InputLineHeight.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, SmallInputMenuItem } from "../models"; +import { MenuItemType, SmallInputMenuItem } from "@/topmenu/models"; export const InputLineHeight: SmallInputMenuItem = { name: "lineHeight", diff --git a/src/topmenu/items/SelectFontType.tsx b/src/topmenu/items/SelectFontType.tsx index d9d8d77..982cf63 100644 --- a/src/topmenu/items/SelectFontType.tsx +++ b/src/topmenu/items/SelectFontType.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, SelectInputItem } from "../models"; +import { MenuItemType, SelectInputItem } from "@/topmenu/models"; export const SelectFontType: SelectInputItem = { diff --git a/src/topmenu/items/TopIconAlignCenter.tsx b/src/topmenu/items/TopIconAlignCenter.tsx index dc7217c..f483c59 100644 --- a/src/topmenu/items/TopIconAlignCenter.tsx +++ b/src/topmenu/items/TopIconAlignCenter.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; import ReactPDF from "@react-pdf/renderer"; export const TopIconAlignCenter: IconMenuItem = { diff --git a/src/topmenu/items/TopIconAlignJustify.tsx b/src/topmenu/items/TopIconAlignJustify.tsx index ebe958e..6e154ca 100644 --- a/src/topmenu/items/TopIconAlignJustify.tsx +++ b/src/topmenu/items/TopIconAlignJustify.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; import ReactPDF from "@react-pdf/renderer"; export const TopIconAlignJustify: IconMenuItem = { diff --git a/src/topmenu/items/TopIconAlignLeft.tsx b/src/topmenu/items/TopIconAlignLeft.tsx index 28e4a5a..1d0abc4 100644 --- a/src/topmenu/items/TopIconAlignLeft.tsx +++ b/src/topmenu/items/TopIconAlignLeft.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; import ReactPDF from "@react-pdf/renderer"; export const TopIconAlignLeft: IconMenuItem = { diff --git a/src/topmenu/items/TopIconAlignRight.tsx b/src/topmenu/items/TopIconAlignRight.tsx index 5a671ca..a43df3b 100644 --- a/src/topmenu/items/TopIconAlignRight.tsx +++ b/src/topmenu/items/TopIconAlignRight.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; import ReactPDF from "@react-pdf/renderer"; export const TopIconAlignRight: IconMenuItem = { diff --git a/src/topmenu/items/TopIconBold.tsx b/src/topmenu/items/TopIconBold.tsx index 35333b4..6c83182 100644 --- a/src/topmenu/items/TopIconBold.tsx +++ b/src/topmenu/items/TopIconBold.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; import ReactPDF from "@react-pdf/renderer"; export const TopIconBold: IconMenuItem = { diff --git a/src/topmenu/items/TopIconFontSize.tsx b/src/topmenu/items/TopIconFontSize.tsx index 839dfab..f567000 100644 --- a/src/topmenu/items/TopIconFontSize.tsx +++ b/src/topmenu/items/TopIconFontSize.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; import ReactPDF from "@react-pdf/renderer"; export const TopIconFontSize: IconMenuItem = { diff --git a/src/topmenu/items/TopIconItalic.tsx b/src/topmenu/items/TopIconItalic.tsx index 2194120..d7ca988 100644 --- a/src/topmenu/items/TopIconItalic.tsx +++ b/src/topmenu/items/TopIconItalic.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; import ReactPDF from "@react-pdf/renderer"; export const TopIconItalic: IconMenuItem = { diff --git a/src/topmenu/items/TopIconRedo.tsx b/src/topmenu/items/TopIconRedo.tsx index 2e135f6..33fa03f 100644 --- a/src/topmenu/items/TopIconRedo.tsx +++ b/src/topmenu/items/TopIconRedo.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; import ReactPDF from "@react-pdf/renderer"; export const TopIconRedo: IconMenuItem = { diff --git a/src/topmenu/items/TopIconTextDecoration.tsx b/src/topmenu/items/TopIconTextDecoration.tsx index 53219c6..259f47d 100644 --- a/src/topmenu/items/TopIconTextDecoration.tsx +++ b/src/topmenu/items/TopIconTextDecoration.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; import ReactPDF from "@react-pdf/renderer"; export const TopIconTextDecoration: IconMenuItem = { diff --git a/src/topmenu/items/TopIconUndo.tsx b/src/topmenu/items/TopIconUndo.tsx index c6a204d..1edc587 100644 --- a/src/topmenu/items/TopIconUndo.tsx +++ b/src/topmenu/items/TopIconUndo.tsx @@ -1,4 +1,4 @@ -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; import ReactPDF from "@react-pdf/renderer"; export const TopIconUndo: IconMenuItem = { diff --git a/src/topmenu/items/alignItemsToBaselineIcon.tsx b/src/topmenu/items/alignItemsToBaselineIcon.tsx index 8e2d27e..3226ae0 100644 --- a/src/topmenu/items/alignItemsToBaselineIcon.tsx +++ b/src/topmenu/items/alignItemsToBaselineIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const alignItemsToBaselineIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/alignItemsToCenterIcon.tsx b/src/topmenu/items/alignItemsToCenterIcon.tsx index f7e5518..fcdb258 100644 --- a/src/topmenu/items/alignItemsToCenterIcon.tsx +++ b/src/topmenu/items/alignItemsToCenterIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const alignItemsToCenterIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/alignItemsToEndIcon.tsx b/src/topmenu/items/alignItemsToEndIcon.tsx index 1c87a12..b56551f 100644 --- a/src/topmenu/items/alignItemsToEndIcon.tsx +++ b/src/topmenu/items/alignItemsToEndIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const alignItemsToEndIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/alignItemsToStartIcon.tsx b/src/topmenu/items/alignItemsToStartIcon.tsx index 5d0975a..a758e72 100644 --- a/src/topmenu/items/alignItemsToStartIcon.tsx +++ b/src/topmenu/items/alignItemsToStartIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const alignItemsToStartIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/alignItemsToStretchIcon.tsx b/src/topmenu/items/alignItemsToStretchIcon.tsx index b733804..0c29cce 100644 --- a/src/topmenu/items/alignItemsToStretchIcon.tsx +++ b/src/topmenu/items/alignItemsToStretchIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const alignItemsToStretchIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/alignSelfToFlexBaselineIcon.tsx b/src/topmenu/items/alignSelfToFlexBaselineIcon.tsx index 827ca70..cefbe0f 100644 --- a/src/topmenu/items/alignSelfToFlexBaselineIcon.tsx +++ b/src/topmenu/items/alignSelfToFlexBaselineIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const alignSelfToFlexBaselineIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/alignSelfToFlexCenterIcon.tsx b/src/topmenu/items/alignSelfToFlexCenterIcon.tsx index d72d2cb..0d9b802 100644 --- a/src/topmenu/items/alignSelfToFlexCenterIcon.tsx +++ b/src/topmenu/items/alignSelfToFlexCenterIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const alignSelfToFlexCenterIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/alignSelfToFlexEndIcon.tsx b/src/topmenu/items/alignSelfToFlexEndIcon.tsx index 0638c51..0a2c392 100644 --- a/src/topmenu/items/alignSelfToFlexEndIcon.tsx +++ b/src/topmenu/items/alignSelfToFlexEndIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const alignSelfToFlexEndIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/alignSelfToFlexStartIcon.tsx b/src/topmenu/items/alignSelfToFlexStartIcon.tsx index 0ba51cb..e676004 100644 --- a/src/topmenu/items/alignSelfToFlexStartIcon.tsx +++ b/src/topmenu/items/alignSelfToFlexStartIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const alignSelfToFlexStartIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/alignSelfToFlexStretchIcon.tsx b/src/topmenu/items/alignSelfToFlexStretchIcon.tsx index d012395..0d69bbb 100644 --- a/src/topmenu/items/alignSelfToFlexStretchIcon.tsx +++ b/src/topmenu/items/alignSelfToFlexStretchIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const alignSelfToFlexStretchIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/fitToParentIcon.tsx b/src/topmenu/items/fitToParentIcon.tsx index 6c981d3..96a30ff 100644 --- a/src/topmenu/items/fitToParentIcon.tsx +++ b/src/topmenu/items/fitToParentIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const fitToParentIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/flexFlowColumnIcon.tsx b/src/topmenu/items/flexFlowColumnIcon.tsx index 6eceeea..65e96e5 100644 --- a/src/topmenu/items/flexFlowColumnIcon.tsx +++ b/src/topmenu/items/flexFlowColumnIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const flexFlowColumnIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/flexFlowRowIcon.tsx b/src/topmenu/items/flexFlowRowIcon.tsx index 95d799e..b55e47b 100644 --- a/src/topmenu/items/flexFlowRowIcon.tsx +++ b/src/topmenu/items/flexFlowRowIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const flexFlowRowIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/justifyContentCenterIcon.tsx b/src/topmenu/items/justifyContentCenterIcon.tsx index d2741ac..3c4674e 100644 --- a/src/topmenu/items/justifyContentCenterIcon.tsx +++ b/src/topmenu/items/justifyContentCenterIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const justifyContentCenterIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/justifyContentFlexEndIcon.tsx b/src/topmenu/items/justifyContentFlexEndIcon.tsx index e7282ba..fe714d4 100644 --- a/src/topmenu/items/justifyContentFlexEndIcon.tsx +++ b/src/topmenu/items/justifyContentFlexEndIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const justifyContentFlexEndIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/justifyContentFlexStartIcon.tsx b/src/topmenu/items/justifyContentFlexStartIcon.tsx index d32324c..6f789ba 100644 --- a/src/topmenu/items/justifyContentFlexStartIcon.tsx +++ b/src/topmenu/items/justifyContentFlexStartIcon.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const justifyContentFlexStartIcon: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/justifyContentSpaceAround.tsx b/src/topmenu/items/justifyContentSpaceAround.tsx index 8fa6528..d867150 100644 --- a/src/topmenu/items/justifyContentSpaceAround.tsx +++ b/src/topmenu/items/justifyContentSpaceAround.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const justifyContentSpaceAround: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/src/topmenu/items/justifyContentSpaceBetween.tsx b/src/topmenu/items/justifyContentSpaceBetween.tsx index be92544..4225809 100644 --- a/src/topmenu/items/justifyContentSpaceBetween.tsx +++ b/src/topmenu/items/justifyContentSpaceBetween.tsx @@ -1,5 +1,5 @@ import ReactPDF from "@react-pdf/renderer"; -import { MenuItemType, IconMenuItem } from "../models"; +import { MenuItemType, IconMenuItem } from "@/topmenu/models"; export const justifyContentSpaceBetween: IconMenuItem = { itemType: MenuItemType.TopIcon, diff --git a/tsconfig.json b/tsconfig.json index 01f09cc..52580b0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,16 +20,26 @@ "dom" ], "rootDir": "./src", - "baseUrl": "./src/", + "baseUrl": "./", "paths": { "@/*": [ "./src/*" ], - "sandbox/*": [ - "./sandbox/*" + "@components/*": [ + "./src/components/*" + ], + "@styles/*": [ + "./src/components/styles/*" ] }, }, + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + "./src/**/*", + "types.d.ts" + ], "exclude": [ "lib", "node_modules",