openscd / oscd-form-elements Goto Github PK
View Code? Open in Web Editor NEWOpenSCD Form Elements
OpenSCD Form Elements
As a plugin author and maintainer of already existing plugins, I need to have open-scd
s wizard-textfield
available through npm. The idea is to re-use the component for other plug-ins editors. This behavior is the same all over OpenSCD.
Requirements:
wizard-textfield
to oscd-texfield
repooscd-textfield
mwc-textfield
but use it in the render
methodname | type | description |
---|---|---|
value | string | null | former maybeValue set and get Elements attribute value null means attribute is missing |
disabled | boolean | disables both the input field and the null switch |
defaultValue | string | is indicating the default value if maybeValue is null |
unit | string | indicator when multiplier can be selected |
multipliers | (string | null)[] | an array of allowed multipliers the user can choose from |
multiplier | string | null | multiplier attribute the user can choose from |
label | string | pass to mwc-textfield |
required | boolean | pass to input field |
reservedValues | string[] | and array of invalid inputs |
nullable | boolean | Whether null is valid maybeValue output |
helper | string | pass to input field |
helperPersistent | boolean | pass to input field |
validationMessage | string | pass to input field helper if input is invalid |
suffix | boolean | pass to input field |
pattern | string | pass to input field |
minLength | string | pass to input field |
maxLength | string | pass to input field |
type | string | pass to input field |
min | string | pass to input field |
max | string | pass to input field |
name | type | description |
---|---|---|
checkValidity | boolean | Whether the select field is valid |
add change event
propagate change
event for any changes on value
add screenshot tests
add storybook
Additional Information
This web-component is used pretty much everywhere in the software
Open questions:
Why is multiplier in their? Answer: it could happen on the SCL field;
Styling?
Error handling?
General question for OSCD-textfield, OSCD-select, OSCD-testfield;
if you enter that does not meet the criteria; it becomes red;
Do you need to add translations to the wizard-textfield
Do we need a one-to-one conversion?
Yes: faster to production
No: fix bugs first
Decision: Fix bugs
As a plugin author and maintainer of already existing plugins, I need to have open-scd
s wizard-select
available through nmp.
Requirements:
wizard-select
to oscd-select
repooscd-select
mwc-select
but use it in the render
method. This allows us to exchange the now used material web components with another web-component library.name | type | description |
---|---|---|
value | string | null | set and get Elements attribute value null means attribute is missing |
disabled | boolean | disables both the input field and the null switch |
defaultValue | string | is indicating the default value if maybeValue is null |
label | string | pass to mwc-select |
required | boolean | pass to input field |
nullable | boolean | Whether null is valid maybeValue output |
helper | string | pass to input field |
validationMessage | string | pass to input field helper if input is invalid |
selected | ListItemBase|null | Selected list item element. |
items | ListItemBase[] | List of selectable items. |
index | number | Index of selected list item. |
name | type | description |
---|---|---|
checkValidity | boolean | Whether the select field is valid |
propagate event
change
event for any changes on value
add screenshot tests
add storybook
Additional Information
This web-component is used pretty much everywhere in the software
As a plugin author and maintainer of already existing plugins, I need to have open-scd
s wizard-checkbox
available through nmp.
Requirements:
wizard-textfield
to oscd-checkbox
repooscd-checkbox
mwc-checkbox
but use it in the render
methodname | type | description |
---|---|---|
maybeValue | string | null | set and get Elements attribute value null means attribute is missing |
disabled | boolean | disables both the input field and the null switch |
defaultValue | string | is indicating the default value if maybeValue is null |
label | string | short name displayed next to the checkbox |
nullable | boolean | Whether null is valid maybeValue output |
helper | string | pass to input field |
change
event for any changes on maybeValue
Additional Information
This web-component is used pretty much everywhere in the software
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.