Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
@enact/i18n
Advanced tools
Internationalization library based on iLib.
@enact/i18n
provides a decorator that can be used to wrap a root component in a React (or Enact) application.
This decorator provides a context to child components that can be used to determine locale text directionality
and to update the current locale. Additionally, it provides a locale-aware Uppercase
Higher Order Component (HOC).
import {I18nDecorator, contextTypes} from `@enact/i18n/I18nDecorator`;
const MyComponent = (props, context) => (
<div>{context.rtl ? "right to left" : "left to right"}</div>
);
// Without contextTypes, your component will not receive context!
MyComponent.contextTypes = contextTypes;
const MyApp = () => (
<div>
<MyComponent />
</div>
);
const MyI18nApp = I18nDecorator(MyApp);
Uppercase
may be used independently of the app decorator. By default, it uppercases the children
property of
the wrapped component, provided it is a string
.
import Uppercase from `@enact/i18n/Uppercase`
const MyComponent = (props) => (
<div {...props} />
);
const MyUppercaseComponent = Uppercase(MyComponent);
Passing preserveCase
in the props to MyUppercaseComponent
will prevent uppercasing.
npm install --save @enact/i18n
This module is built upon the iLib library.
Unless otherwise specified, all content, including all source code files and documentation files in this repository are:
Copyright (c) 2016-2018 LG Electronics
Unless otherwise specified or set forth in the NOTICE file, all content, including all source code files and documentation files in this repository are: Licensed under the Apache License, Version 2.0 (the "License"); you may not use this content except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This work is based on the Apache-2.0 licensed iLib from JEDLsoft.
[2.0.0-beta.1] - 2018-04-29
moonstone/IncrementSlider
and moonstone/Slider
props tooltipAsPercent
, tooltipSide
, and tooltipForceSide
, to be replaced by moonstone/IncrementSlider.IncrementSliderTooltip
and moonstone/Slider.SliderTooltip
props percent
, and side
moonstone/IncrementSlider
props detachedKnob
, onDecrement
, onIncrement
, and scrubbing
moonstone/ProgressBar
props tooltipSide
and tooltipForceSide
, to be replaced by moonstone/ProgressBar.ProgressBarTooltip
prop side
moonstone/Slider
props detachedKnob
, onDecrement
, onIncrement
, scrubbing
, and onKnobMove
moonstone/VideoPlayer
property tooltipHideDelay
moonstone/VideoPlayer
props backwardIcon
, forwardIcon
, initialJumpDelay
, jumpBackwardIcon
, jumpButtonsDisabled
, jumpDelay
, jumpForwardIcon
, leftComponents
, moreButtonCloseLabel
, moreButtonColor
, moreButtonDisabled
, moreButtonLabel
, no5WayJump
, noJumpButtons
, noRateButtons
, pauseIcon
, playIcon
, rateButtonsDisabled
, and rightComponents
, replaced by corresponding props on moonstone/VideoPlayer.MediaControls
moonstone/VideoPlayer
props onBackwardButtonClick
, onForwardButtonClick
, onJumpBackwardButtonClick
, onJumpForwardButtonClick
, and onPlayButtonClick
, replaced by onRewind
, onFastForward
, onJumpBackward
, onJumpForward
, onPause
, and onPlay
, respectivelywebos/VoiceReadout
module and replaced with webos/speech.readAlert()
core/snapshot
module with isWindowReady
method to check the window state and onWindowReady
method to queue window-dependent callbacks for snapshot buildsmoonstone/DatePicker
props dayAriaLabel
, dayLabel
, monthAriaLabel
, monthLabel
, yearAriaLabel
and yearLabel
to configure the label set on date pickersmoonstone/DayPicker
and moonstone/DaySelector
props dayNameLength
, everyDayText
, everyWeekdayText
, and everyWeekendText
moonstone/ExpandablePicker
props checkButtonAriaLabel
, decrementAriaLabel
, incrementAriaLabel
, and pickerAriaLabel
to configure the label set on each button and pickermoonstone/MediaOverlay
componentmoonstone/Picker
props aria-label
, decrementAriaLabel
, and incrementAriaLabel
to configure the label set on each buttonmoonstone/Popup
property closeButtonAriaLabel
to configure the label set on popup close buttonmoonstone/ProgressBar.ProgressBarTooltip
props percent
to format the value as a percent and visible
to control display of the tooltipmoonstone/TimePicker
props hourAriaLabel
, hourLabel
, meridiemAriaLabel
, meridiemLabel
, minuteAriaLabel
, and minuteLabel
to configure the label set on time pickersmoonstone/VideoPlayer.MediaControls
component to support additional customization of the playback controlsmoonstone/VideoPlayer
props mediaControlsComponent
, onRewind
, onFastForward
, onJumpBackward
, onJumpForward
, onPause
, onPlay
, and preloadSource
moonstone/VirtualList.VirtualList
and moonstone/VirtualList.VirtualGridList
role="list"
moonstone/VirtualList.VirtualList
and moonstone/VirtualList.VirtualGridList
prop wrap
to support wrap-around spotlight navigationmoonstone/VirtualList
, moonstone/VirtualGridList
and moonstone/Scroller
props scrollRightAriaLabel
, scrollLeftAriaLabel
, scrollDownAriaLabel
, and scrollUpAriaLabel
to configure the aria-label set on scroll buttons in the scrollbarswebos/speech
module with readAlert()
function and VoiceControlDecorator
Higher-order Componentmoonstone/IncrementSlider
and moonstone/Slider
prop tooltip
to support either a boolean for the default tooltip or an element or component for a custom tooltipmoonstone/Input
to prevent pointer actions on other component when the input has focusmoonstone/ProgressBar.ProgressBarTooltip
prop side
to support either locale-aware or locale-independent positioningmoonstone/ProgressBar.ProgressBarTooltip
prop tooltip
to support custom tooltip componentsmoonstone/Scroller
, moonstone/Picker
, and moonstone/IncrementSlider
to retain focus on moonstone/IconButton
when it becomes disabledspotlight/Spottable
to retain focus on a component when it becomes disabled while focusedui/Cancelable
callback onCancel
to accept an event with a stopPropagation
method to prevent upstream instances from handling the event instead of using the return value from the callback to prevent propagation. When a function is passed to onCancel
, it will now receive an event and a props object instead of only the props object. When a string is passed to onCancel
, it will now receive an event instead of no arguments. Also when a string is passed, the event will now propagate to upstream instances unless stopPropagation
is called.ui/Transition
property duration
to now also support a numeric value representing milliseconds or a string representing any valid CSS duration valuecore/util.memoize
to forward all args to memoized functionmoonstone/ExpandableItem
and related expandable components to expand smoothly when used in a scrollermoonstone/GridListImageItem
to show proper placeholder
and selectionOverlay
moonstone/MoonstoneDecorator
to optimize localized font loading performancemoonstone/Scroller
and moonstone/VirtualList
navigation via 5-way from paging controlsmoonstone/VideoPlayer
to render bottom controls at idle after mountingmoonstone/VirtualList.VirtualList
and moonstone/VirtualList.VirtualGridList
to give initial focusmoonstone/VirtualList.VirtualList
and moonstone/VirtualList.VirtualGridList
to have the default value for dataSize
, pageScroll
, and spacing
propsui/Layout.Cell
to no longer overflow when both size
and shrink
are set togetherui/Layout
to correctly support two align
values, allowing horizontal and vertical in one property. Previously, the transverse alignment was ignored, only allowing perpendicular alignment.ui/VirtualList.VirtualList
and ui/VirtualList.VirtualGridList
showing blank when direction
prop changed after scroll position changedui/VirtualList.VirtualList
and ui/VirtualList.VirtualGridList
to support RTL by dynamic language changesFAQs
Internationalization support for Enact using iLib
The npm package @enact/i18n receives a total of 31,652 weekly downloads. As such, @enact/i18n popularity was classified as popular.
We found that @enact/i18n demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.