amalto / platform6-ui-components Goto Github PK
View Code? Open in Web Editor NEW:package: Platform 6 UI components provided to develop the user interface of services
License: MIT License
:package: Platform 6 UI components provided to develop the user interface of services
License: MIT License
Expose the Platform 6 interfaces.
I don't think you need to repeat for each component that The icons used are FontAwesome classes.
.
You can say it only in the introduction.
Suggestions:
I don't understand what you mean by "Utils used by b2-common-components" and I think it will also be the case for an external developer.
Add a link to https://documentation.amalto.com/b2box/master/developer-guide/platform6-ui-components/docs/ in the README.md of the repository.
When property set to true, even if the value is hidden on ui, the default value is still the empty option.
Like in the old documentation, the user need to know the custom classes we are using for:
You have written categories like: ObjectManipulation
, StoreManipulation
...
You shouldn't stick the words: Object manipulation
, Store manipulation
...
In the documentation, for the component "Restricted", it's written:
"No live example will be provided because we don't have access to the webStorage."
You need to add a link to the webStorage.
The description of each module should provide:
Any available Portal CSS class names you want to apply to the icon wrapper div. This can be used to space the icon from any other content.
You should add a link to the available Portal css: btn-info
, btn-warning
, ...
The import of the ServiceHelpers is import * as ScopeHelpers from '@amalto/service-helpers'
.
It should be something like import * as serviceHelpers from '@amalto/service-helpers'
Should replace all the keys
to camelCase
and replace it whenever you find it.
You should look into the services and the core ui.
You should add a link to the component Tabs
when you mention it: This component should be used in the Tabs component.
The method handleBatchOperationReportDisplay
is missing in the component DynamicComponent
.
The description of the props locale
is not sufficient. You are saying that the props locale
is a locale, you are not explaining what it's used for, what is the default value and what are the available values.
Moreover, you should add a link to the method which gets the locale from the browser webStorage.locale
and how to format it
export function formatLocale (locale: string): string { return locale.substring(0, locale.indexOf('-')).toUpperCase() }
For the package @amalto/platform6-ui, it is displayed:
import * as b2portal from '@amalto/platform6-ui'
.
b2portal
means nothing for the external developers, it should be something like import * as platform6 from '@amalto/platform6-ui'
.
Check that it doesn't break the code of the Portal.
In the description, it is said that handleDuplicateNameFromArray
returns a new name if it's duplicated, but what's the structure of the new name?
In the ScopeHelpers
, the link to WebStorage
doesn't work.
There is no documentation for the component @amalto/platform6-ui
.
There is no example of usage of the component Restricted.
You need to add a link to the npm package for each component:
For example for the Helpers, add https://www.npmjs.com/package/%40amalto%2Fhelpers.
The new URL is https://documentation.amalto.com/platform6/master
I can't find the description of the interface Validator.
Instead use @amalto/platform6-ui project to get the DataGrid component. We wil nee to explain how to get the DataGrid.
This issue is for the service template.
When you import a b2b
file, it would be nice to be able to select which items in the bundle to import.
The current signature of the method is:
function handleDuplicateNameFromArray( name: string, container: string[]): string;
I think it would be better if the method takes in argument the item's id and the current facade list. The method should be more specific to Platform 6 services.
I suggest the following method (of course it's just a suggestion, you may choose a different method's name or logic).
/**
* Increment an item's name
*
* @param {ServiceItemFacades} facades
* @param {Interfaces.Id} id
* @returns {string}
*/
export function incrementName (facades: ServiceItemFacades, id: Interfaces.Id): string {
const { name } = id
let index = 1
const facadesWithSameAppKey = facades.filter(f => f.appKey === id.appKey)
if (facadesWithSameAppKey.length === 0) return name
while (!facadesWithSameAppKey.every(f => f.name !== `${name}_${index}`)) index++
return `${name}_${index}`
}
with the following interfaces
interface Id {
name: string
appKey: string
}
interface ServiceItemFacade extends Id {
description: string
calculatedContentMode: string
appInfo?: string
lastModifiedBy?: string
lastModifiedDate?: number
revisionId?: string
}
You don't explain how to import: the Helpers, ScopeHelpers.
Right now we only have a JSON object, we should have a list with a search bar input.
Some props like dataGridActions
don't have enough explanations as where you can get it and what is his purpose.
These interfaces are in the component @amalto/data-grid.
The components reactRedux
, reactIntl
, forms
and classNames
are not mentioned in the documentation.
The property locale
in the ButtonsBar component should be optional and by default to en-EN
.
Indeed, if the developer wants to display his UI only in English, he doesn't need to set the local property.
Plus, specify in the documentation that the locale
is used for the wordings of the search input.
In the section https://documentation.amalto.com/b2box/dev/developer-guide/platform6-ui-components/docs/#webstorage, I can't find how to install the webstorage.
The component "Wordings" is missing in the documentation. I have no idea of the available wordings and how to import the components.
I'll add all the spelling mistakes I saw in the documentation
FontAwesome
but Font Awesome
.This documentation regroup all the component available for you to develop your own service on Platform6.
=> regroups
, Platform 6
Edit the code and see the exemple being edited for each component.
=> example
All the components provided by Platform 6
Small button with an icon instead of text.
=> A small ...
Set the icon color class. Do not use if you don't need it, otherwise btnClass will have trouble handeling hover color.
=> Set the icon colour class. Do not use if you don't need it, otherwise, btnClass will have trouble handling hover colour.
Modal use to confirm a file upload.
=> used
Commons classes
=> Common classes
otherwise the class wont work.
=> otherwise the class won't work.
return the same object passed as param but with ASC ordered keys.
=> Return
return the same object passed as param but with DESC ordered keys.
=> Return
It uses an TreeNodeDataModel object
=> It uses a ...
ScopeValue interface is not editable and usable by user, it regroup the user's actions he is able to perform.
=> by the user
, regroups
Create a modal to display clearly the errors generated during multi-process.
The endpoints concerned are import and deleteItems (for export, the errors are logged).
The object looks like:
{ "processed": 0, "errors": "Map[string,B2ResourceException]", "message": "" }
B2ResourceException consists of:
If there are no errors (one processed item), the response will look like this:
{ "processed" : 1, "errors" : { }, "message" : "" }
If there are errors, the response will look this:
{
"processed" : 1,
"errors" : {
"ClassExample" : {
"cause" : null,
"stackTrace" : [
{ "methodName" : "upsertItem", "fileName" : "DAOServiceConfigurationManager.java", "lineNumber" : 110, "className" : "com.amalto.b2box.core.impl.servicecomponent.configuration.DAOServiceConfigurationManager", "nativeMethod" : false },
{ "methodName" : "upsertItem", "fileName" : "ScriptsConfigurationManager.java", "lineNumber" : 27, "className" : "com.amalto.service.scripts.ScriptsConfigurationManager", "nativeMethod" : false },
{ "methodName" : "handle", "fileName" : "StatisticsHandler.java", "lineNumber" : 169, "className" : "org.eclipse.jetty.server.handler.StatisticsHandler", "nativeMethod" : false },
{ "methodName" : "handle", "fileName" : "HandlerWrapper.java", "lineNumber" : 134, "className" : "org.eclipse.jetty.server.handler.HandlerWrapper", "nativeMethod" : false },
{ "methodName" : "handle", "fileName" : "RewriteHandler.java", "lineNumber" : 335, "className" : "org.eclipse.jetty.rewrite.handler.RewriteHandler", "nativeMethod" : false },
{ "methodName" : "run", "fileName" : "HttpChannel.java", "lineNumber" : 267, "className" : "org.eclipse.jetty.server.HttpChannel", "nativeMethod" : false },
{ "methodName" : "run", "fileName" : "Thread.java", "lineNumber" : 748, "className" : "java.lang.Thread", "nativeMethod" : false }
],
"status" : 409,
"code" : -1,
"link" : null,
"developerMessage" : null,
"conflictInformation" : [{ "itemId" : "ClassExample", "lastAuthor" : "[email protected]", "lastModificationDate" : 1520599965330 }],
"message" : "Conflict on saving the item 'ClassExample'. This item has been modified by [email protected] at Fri Mar 09 12:52:45 GMT 2018 since this item was read.",
"localizedMessage" : "Conflict on saving the item 'ClassExample'. This item has been modified by [email protected] at Fri Mar 09 12:52:45 GMT 2018 since this item was read.",
"suppressed" : [ ]
}
},
"message" : "Unexpected error importing the items!"
}
A 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.