Comments (5)
I see! Thank you @mhsdesign
I was using the neos validators as blueprint, which were in TS 🤷♂️
E.g: https://github.com/neos/neos-ui/blob/8.3/packages/neos-ui-validators/src/DateTime/index.tsx
from neos-ui.
For me this is working fine … (8.2 and prev)
import I18n from "@neos-project/neos-ui-i18n";
const Lol () => <I18n is="foo" />
edit:
should work see:
and
https://github.com/neos/neos-ui/blob/8.3/packages/neos-ui-extensibility/src/shims/neosProjectPackages/neos-ui-i18n/index.js
from neos-ui.
I tried to import it in my custom validator (@neos-project/[email protected]), but it throwed the error:
Cannot find module '@neos-project/neos-ui-i18n' or its corresponding type declarations.
from neos-ui.
but its a ts error no?
so it doesn't keep you from actually working ^^
you may want to add a // @ts-ignore
before the line
or add a d.ts
file where you manually add a type declaration for the i18n:
neos.d.ts
declare module "@neos-project/neos-ui-i18n" {
import React from "react";
interface I18nProps {
/**
* Fallback key which gets rendered once the i18n service doesn't return a translation.
*/
fallback?: string;
/**
* The target id which the i18n service accepts.
*/
id?: string;
/**
* The destination paths for the package of the translation.
*/
packageKey?: string;
/**
* The destination paths for the source of the translation.
*/
sourceName?: string;
/**
* Additional parameters which are passed to the i18n service.
*/
params?: object;
/**
* className which gets added to the translation span.
*/
className?: string;
}
export default class I18n extends React.PureComponent<I18nProps> {}
}
from neos-ui.
Currently we offer no direct typescript support for plugins, so you need to come up with your own declarations (copy them from the Neos core)
from neos-ui.
Related Issues (20)
- TASK: 9.0 remove leftover manual context path string operations HOT 1
- BUG: Neos9 `ReferenceEditor` `createNew` doesnt work HOT 1
- BUG: Children of previously opened node are missing after search
- EPIC: Neos 9.0 Conflict Resolution
- FEATURE: Lock the UI and present a modal during publish/discard
- FEATURE: Offer resolution strategies when conflicts arise during rebase HOT 2
- FEATURE: Iframe error handling with proper user feedback
- BUG: NodeCreationDialog should not submit empty string for optional fields
- BUG: View DataSource should Update on base workspace change HOT 2
- FEATURE: Offer rebase option when publish/discard fails due to conflict
- FEATURE: Extend insert mode dialog and moving nodes for dimension handling
- BUG: Missing document node leads to exception when opening `/neos/content?node=...` HOT 1
- Upmgerge #3708 to Neos 9
- TASK: Replace `NeosUiDefaultNodesOperation` with `ReloadNodesQueryHandler`
- BUG: DateTimeEditor does not show a leading 0 for minutes < 10
- Ease up-merging changes after new release HOT 2
- BUG: Neos Ui version shown as `vundefined`
- BUG: The new conflict resolution e2e tests are sadly a bit flaky in ci :O
- BUG: 9.0 `change-base-workspace` is infinite loop and times out - always?!!
- Discussion: Neos UI (internal) api refactoring
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neos-ui.