freeman14 / dd-ui Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
There is new way to support typings, to declare them in npm, in such case no need to install typings tool to use library.
Within STEW-234 I propose to fix <timestamp-range>
component to have ability of dynamic render time (in hh:mma format) depending on what initial format is passed in via format
attribute. Now it may render doubled time. See example:
{
"start": "2016-10-21T17:00:00.002Z",
"end": "2016-10-26T19:45:00.002Z",
"tz": "America/Los_Angeles",
"format": "ddd, MMM D, YYYY, hh:mma" <--- accidentally invalid format
}
<timestamps-range start="vm.start" end="vm.end" tz="vm.tz" format="vm.format"></timestamps-range>
Fri, Oct 21, 2016, 10:00am 10am – Wed, Oct 26, 2016, 12:45pm 12:45pm
The second time is a separated <timestamp>
with the format 'hh:mma'. It allows us to handle 'the same date' case:
Fri, Oct 21, 2016 10am – 12:45pm (as per designed under EPF requirements).
Also, we need to handle 'the same month' case, currently not available.
So we could render the range as Dec 8–12, 2016.
I've just noticed that <timestamps-range>
normally implemented via dd-ui into both cms
and apps manager
is not working and throwing exception:
angular.js:13920 TypeError: i.tz is not a function
at e.formatDate (http://localhost:8080/build.js?0b3961b8016c2acb407b:81644:789)
at e.$onInit (http://localhost:8080/build.js?0b3961b8016c2acb407b:81644:518)
at http://localhost:8080/build.js?0b3961b8016c2acb407b:9468:35
at forEach (http://localhost:8080/build.js?0b3961b8016c2acb407b:502:19)
at nodeLinkFn (http://localhost:8080/build.js?0b3961b8016c2acb407b:9457:10)
at compositeLinkFn (http://localhost:8080/build.js?0b3961b8016c2acb407b:8793:14)
at compositeLinkFn (http://localhost:8080/build.js?0b3961b8016c2acb407b:8796:14)
at publicLinkFn (http://localhost:8080/build.js?0b3961b8016c2acb407b:8673:31)
at lazyCompilation (http://localhost:8080/build.js?0b3961b8016c2acb407b:9017:26)
at boundTranscludeFn (http://localhost:8080/build.js?0b3961b8016c2acb407b:8810:17)
Here is a sample of html code:
<timestamps-range start="'2016-10-21T17:00:00.002Z'" end="'2016-10-26T19:45:00.002Z'" tz="'America/Los_Angeles'" format="'ddd, MMM D, YYYY h:mma'"></timestamps-range>
<timestamp>
component is working well as expected (using the same moment.js and moment-timezone.js).
Also, it's weird that there are no any errors in dd-ui Storybook and EPF (0.0.15 is still installed).
Any thoughts?
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.