Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ permissions:
on:
# Release workflow calls this manually for main and tags
push:
branches:
- '!main'
branches-ignore:
- 'main'
workflow_call: # Can called from other workflows
jobs:
tests:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions assets/src/Control.jsx → assets/src/Control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import {
useState,
useContext
} from 'react'
import { ControlContext } from './index.jsx'
import { ControlContext } from './index.tsx'

import { triggerEvent } from './events'
import { OverlayProvider } from 'react-aria'
import { dynamicValuesAPI } from './dynamic-values'

import types from './types.js'
import types from './types.ts'
import DependendWrapper from './components/dependent/DependendWrapper'
import RenderWrapper from './components/render/RenderWrapper'
import VisibilityWrapper from './components/visibility/VisibilityWrapper'
Expand Down
6 changes: 3 additions & 3 deletions assets/src/Element.jsx → assets/src/Element.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import {
useContext,
useEffect
} from 'react'
import { ControlContext } from './index.jsx'
import { ControlContext } from './index.tsx'

import types from './types.js'
import types from './types.ts'
import DependendWrapper from './components/dependent/DependendWrapper'
import VisibilityWrapper from './components/visibility/VisibilityWrapper'
import RenderWrapper from './components/render/RenderWrapper.jsx'
import RenderWrapper from './components/render/RenderWrapper.tsx'

/**
* Really similar to Control component, expect it has no values
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Button.stories.js (or .mdx)

// import { fn } from 'storybook/test'; // Keep if you use it for action logging
import Button from './Button.jsx';
import Button from './Button.tsx';

export default {
title: 'Button',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Overlay,
useModalOverlay
} from 'react-aria'
import { ControlContext } from '../../../index.jsx'
import { ControlContext } from '../../../index.tsx'

const Modal = ({ state, children, ...props }) => {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Overlay,
usePopover
} from 'react-aria'
import { ControlContext } from '../../../index.jsx'
import { ControlContext } from '../../../index.tsx'

function Popover({
children,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as tangibleFields from '../../index.jsx'
import * as tangibleFields from '../../index.tsx'

/**
* Returns an object that can be used to map which exterior field will trigger which value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
useOverlayTrigger,
} from 'react-aria'

import { getConfig } from '../../../index.jsx'
import { getConfig } from '../../../index.tsx'
import Control from '../../../Control'

import { useOverlayTriggerState } from 'react-stately'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useLocale
} from 'react-aria'

import DateSegment from './DateSegment.jsx'
import DateSegment from './DateSegment.tsx'

const DateField = props => {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ProseMirror from './prosemirror/Editor'
import TinyMce from './TinyMce.jsx'
import TinyMce from './TinyMce.tsx'

export default props => {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
exampleSetup,
buildMenuItems
} from 'prosemirror-example-setup'
import { types } from '../../../../index.jsx'
import { types } from '../../../../index.tsx'

import CodeEditor from '../../code/Editor'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
Description,
Label
} from "../../base"
import { getConfig } from '../../../index.jsx'
import { getConfig } from '../../../index.tsx'

import { postMedia } from "../../../requests/media"
import FilePreview from "./FilePreview"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import {
import {
repeaterDispatcher,
initDispatcher
} from './dispatcher.js'
} from './dispatcher.ts'

import {
Button,
Title,
ModalTrigger
} from '../base'

import types from '../../types.js'
import types from '../../types.ts'
import Item from './common/Item'
import strings from './strings.js'
import strings from './strings.ts'

const Repeater = props => {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as tangibleFields from '../../../../index.jsx'
import * as tangibleFields from '../../../../index.tsx'

/**
* This file contains helper functions that are used to render
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
dynamicValueToString,
stringToDynamicValue
} from './format'
import { getConfig } from '../index.jsx'
import { getConfig } from '../index.tsx'

/**
* Field type that support dynamic values (!== to supported props.dyanmic.types)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
createRoot,
forwardRef
} from 'react'
import * as tangibleFields from '../index.jsx'
import * as tangibleFields from '../index.tsx'

const initCombobox = () => {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
useEffect,
createRoot
} from 'react'
import * as tangibleFields from '../index.jsx'
import * as tangibleFields from '../index.tsx'

const initExample = () => {

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion assets/src/global.js → assets/src/global.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as tangibleFields from './index.jsx'
import * as tangibleFields from './index.tsx'

window.tangibleFields = tangibleFields
window.addEventListener('load', () => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getConfig } from '../index.jsx'
import { getConfig } from '../index.tsx'

const post = (url, data) => {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
post,
get
} from '.'
import { getConfig } from '../index.jsx'
import { getConfig } from '../index.tsx'

const postMedia = file => {

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const readJson = (f) => JSON.parse(fs.readFileSync(f, 'utf8'))
export default (function createConfig() {
const cwd = process.cwd()
const testDir = path.join(cwd, 'tests')
const testMatch = 'e2e/**/*.js'
const testMatch = 'e2e/**/*.{js,ts}'
const timeout = parseInt(process.env.TIMEOUT || '', 10) || 100_000 // Defaults to 100 seconds
const artifactsPath = (process.env.WP_ARTIFACTS_PATH ??= path.join(
cwd,
Expand Down
4 changes: 2 additions & 2 deletions tangible.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
* Script: Common for all contexts
*/
{
src: 'assets/src/global.js',
src: 'assets/src/global.ts',
dest: 'assets/build/index.min.js',
react: 'wp',
rollupPlugins: [
Expand Down Expand Up @@ -41,7 +41,7 @@ export default {
* Example
*/
{
src: 'assets/src/example/index.js',
src: 'assets/src/example/index.ts',
dest: 'assets/build/example.min.js',
react: 'wp',
},
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '../../../../assets/src/index.jsx'
import '../../../../assets/src/index.tsx'
import { userEvent } from '@testing-library/user-event'
import { createInput } from '../../../../assets/src/codemirror/index.js'
import { createInput } from '../../../../assets/src/codemirror/index.ts'

describe('codeMirror - Mask', () => {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import userEvent from '@testing-library/user-event'
import { render } from '@testing-library/react'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import { render } from '@testing-library/react'
import {
rendersWithMinimal,
rendersWithoutLabelThrowWarning,
rendersLabelAndDescription,
renderHasElement,
renderHasNotElement
} from '../../../utils/fields.js'
} from '../../../utils/fields.ts'

describe('Button group component', () => {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import userEvent from '@testing-library/user-event'
import {
render,
Expand All @@ -8,7 +8,7 @@ import {
rendersWithMinimal,
rendersWithoutLabelThrowWarning,
rendersLabelAndDescription
} from '../../../utils/fields.js'
} from '../../../utils/fields.ts'

describe('Checkbox component', () => {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import '../../../../../assets/src/index.jsx'
import '../../../../../assets/src/index.tsx'
import {
rendersWithMinimal,
rendersWithoutLabelThrowWarning,
rendersLabelAndDescription
} from '../../../utils/fields.js'
} from '../../../utils/fields.ts'

describe('Code component', () => {
it('renders with minimal config', () => rendersWithMinimal({ type: 'code' }))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as fields from '../../../../../assets/src/index.jsx'
import '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import '../../../../../assets/src/index.tsx'
import { render } from '@testing-library/react'
import {
rendersWithMinimal,
rendersWithoutLabelThrowWarning,
rendersLabelAndDescription
} from '../../../utils/fields.js'
} from '../../../utils/fields.ts'

describe('Color component', () => {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import { forwardRef } from 'react'
import {
getAllByLabelText,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import userEvent from '@testing-library/user-event'
import {
within,
Expand All @@ -9,7 +9,7 @@ import {
rendersWithMinimal,
rendersWithoutLabelThrowWarning,
rendersLabelAndDescription
} from '../../../utils/fields.js'
} from '../../../utils/fields.ts'
import {
today,
getLocalTimeZone,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import userEvent from '@testing-library/user-event'
import {
render,
Expand All @@ -8,7 +8,7 @@ import {
rendersWithMinimal,
rendersWithoutLabelThrowWarning,
rendersLabelAndDescription
} from '../../../utils/fields.js'
} from '../../../utils/fields.ts'

/**
* TODO: Add tests to check is value correctly set from both visual and raw views
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import userEvent from '@testing-library/user-event'
import { render, within } from '@testing-library/react'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import {
render,
screen,
Expand All @@ -7,7 +7,7 @@ import {
import {
rendersWithMinimal,
rendersWithoutLabelThrowWarning
} from '../../../utils/fields.js'
} from '../../../utils/fields.ts'
import { userEvent } from '@testing-library/user-event'

describe('List component', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import {
render,
within
Expand All @@ -9,7 +9,7 @@ import {
rendersLabelAndDescription,
renderHasElement,
renderHasNotElement
} from '../../../utils/fields.js'
} from '../../../utils/fields.ts'

describe('Number component', () => {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import { render, within } from '@testing-library/react'
import {
rendersWithoutLabelThrowWarning,
renderHasElement,
renderHasNotElement
} from '../../../utils/fields.js'
} from '../../../utils/fields.ts'

describe('Select component', () => {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import userEvent from '@testing-library/user-event'
import { render, within } from '@testing-library/react'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as fields from '../../../../../assets/src/index.jsx'
import * as fields from '../../../../../assets/src/index.tsx'
import {
act,
render
Expand All @@ -10,7 +10,7 @@ import {
rendersLabelAndDescription,
renderHasElement,
renderHasNotElement
} from '../../../utils/fields.js'
} from '../../../utils/fields.ts'

describe('Text component', () => {

Expand Down
Loading