cuba-platform / frontend Goto Github PK
View Code? Open in Web Editor NEWMonorepo for CUBA Platform Frontend Tools and Libraries
License: Apache License 2.0
Monorepo for CUBA Platform Frontend Tools and Libraries
License: Apache License 2.0
See columnDefinitions API, clause 2.
localDate, localTime, localDateTime, offsetDateTime, offsetTime
InputNumber
for numeric fields:long, decimal, int, double
Support for big numbers is tracked under separate ticket #99 as it depends on REST API changes
uuid
.byteArray
(similar to Generic UI)long
, uuid
and all temporal types in DataTable's custom filtersIt is adviced to fully test the entity editor created with react-typescript:entity-management-hooks
.
At this moment failed prepublishOnly task in cuba-rest-js
Document current state of the art and think of what can be improved
Add trailing slash if required
React-app start failed due to build with dependency from packages/cuba-react/node_modules/react-intl/
So that it will be possible to pass arbitrary props to customize Ant components
To reproduce
Create a dataCollection
with a filter on field Х.
Feed it to a DataTable
which shall not be displaying field X.
ER
No Clear filters
button is shown.
Field X filter stays applied regardless of changes to the table's filters/sorters.
AR
Clear filters
button is shown.
Any change to table's filters/sorters cancels the field X filter.
Relates to scaffold editor \ browse component.
There could be case, where there is two import with same class name from different packages.
import { User } from "./cuba/entities/sec_Users";
import { User } from "./cuba/entities/app/mobile_Users";
To resolve this we need to use something like
import { User as <USER_ENTITY_NAME> } from "./cuba/entities/sec_Users";
In order to be used with any UI kit
To reproduce
Launch a generator using CLI without providing project model and without Studio running.
ER
A message informing that Studio shall be launched / integration shall be enabled.
AR
events.js:174
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 127.0.0.1:48561
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Emitted 'error' event at:
at Socket.socketErrorListener (_http_client.js:392:9)
at Socket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
To reproduce
Studio -> Create Front Component -> Blank component
Specify 'Component class name' as 'Test'
Check 'Add to menu'
ER
New menu item is displayed as 'Test'.
AR
New menu item is displayed as 'router.Test'.
routing.ts
is scaffolded with an example of using sub-menu.
The following warning is displayed if the code sample is applied:
Warning: Each child in a list should have a unique "key" prop.
Check the render method of `AppComponent`. See https://fb.me/react-warning-keys for more information.
in SubMenu (at App.tsx:95)
in AppComponent (created by inject-AppComponent-with-mainStore)
in inject-AppComponent-with-mainStore (created by Context.Consumer)
in injectIntl(inject-AppComponent-with-mainStore) (created by Route)
in Route (at src/index.tsx:30)
in Router (created by HashRouter)
in HashRouter (at src/index.tsx:29)
in LocaleProvider (created by Context.Consumer)
in LocaleReceiver (created by ConfigProvider)
in ConfigProvider (created by _class)
in IntlProvider (created by _class)
in _class (created by Context.Consumer)
in Provider (created by Context.Consumer)
in CubaAppProvider (at src/index.tsx:24)
Inline styles remain e.g. in Editor template
Hi,
Is there a plan to detail the api.
Currently , most of API is lacking for description. It's hard for using.
index.esm.js:876 Uncaught Error: Cannot find MetaPropertyInfo for property login
Currently in cuba-rest-js
coverage is calculated based on transpiled js
REST API pre 7.2 does not contain required method for retrieving user roles. In that case <Field>
should still work as before.
Need to create index when item added to menuItems.
Columns with arbitrary content can now be created by using the new columnDefinitions API, see clause 3.
In docs and CLI
Currently documentation contains defaultSort property while is has been removed in favor of sort from dataCollection
defaultSort={'-updateTs'}
example: background
and margin
in .editor-layout-narrow
vs .ant-card
See this guide.
Parameter metadata: MetaClassInfo[] is undefined in some cases
Main cause is that huge metadata was not loaded at the moment of list component rendered. We need to think how to operate in state where metadata/messages/enums objects are not ready in MainStore.
Listeners like onTokenExpiry
should have a corresponding remove..
method, otherwise they could point to stale objects.
For example, in my app I use mobx-state-tree
to automatically keep track of auth state by tracking token validity, and I register a listener in the afterCreate
lifecycle action (in MST terminology).
If the model is "destroyed" or invalidated, and then I create a new instance, the CubaApp
instance would still point to the old (stale) object. In addition, this hard reference will prevent proper garbage collection of my state model.
With a remove
method, I could call it in the beforeDestroy
lifecycle method, thus cleaning up before destroying.
If you see fit, I'll open a PR for this as soon as I have some spare time.
Paolo
Loading unlimited amount of items make app very slow. For all pages based on collection of items (list, card, data table) paging should be switched on by default.
Current page and page size should be reflected in page url /carManagement?page=2&pageSize=10
.
Depends on cuba-platform/restapi#95
One-to-One Composition attribute will render as a NestedEntityField. One-to-Many - as a NestedEntitiesTableField. Both components will allow editing a nested entity via EntityEditor. Another component that was added as part of this ticket is ClientSideDataCollectionStore. All these components are available for use on it's own (i.e. outside of the EntityManagement
template context).
<EntitProperty entityName='User'
propertyName='active'
value={user.active}
renderer={(value) => <div className={'user' + value} />}>
In docs and engines
/dist
in sourcesA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.