__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import { normalizeCondition, matchValuesWithCondition } from 'match-conditions'
export const capitalizeFirstLetter = str => {
str = str == null ? '' : String(str)
return str.charAt(0).toUpperCase() + str.slice(1)
}
export const getOptionLabelFor = ({ id, option, values, renderingConfig }) => {
let maybeLabel =
Object.keys(option).indexOf('label') === -1
? capitalizeFirstLetter(id).replace(/\_|\-/g, ' ')
: option.label
if (maybeLabel !== maybeLabel.toString()) {
maybeLabel =
Object.keys(maybeLabel).reduce((approvedLabel, currentLabel) => {
if (approvedLabel) {
return approvedLabel
}
if (
matchValuesWithCondition(
normalizeCondition(maybeLabel[currentLabel]),
values
)
) {
return currentLabel
}
return approvedLabel
}, null) || Object.keys(maybeLabel)[0]
}
/**
* Fuck JS
*/
if (maybeLabel === '') {
maybeLabel = true
}
if (renderingConfig && !renderingConfig.label) {
maybeLabel = false
}
return maybeLabel
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| compose-event-handlers.js | File | 111 B | 0640 |
|
| get-label.js | File | 1014 B | 0640 |
|
| get-value-from-input.js | File | 2.93 KB | 0640 |
|
| get-value-from-input.test.js | File | 2.13 KB | 0640 |
|
| getNumericKeyboardEvents.js | File | 889 B | 0640 |
|
| mutate-responsive-value.js | File | 1.9 KB | 0640 |
|
| mutate-responsive-value.test.js | File | 4.44 KB | 0640 |
|
| normalize-color.js | File | 312 B | 0640 |
|
| parse-choices.js | File | 251 B | 0640 |
|
| primitive-types.js | File | 391 B | 0640 |
|
| transform-value-for-rtl.js | File | 154 B | 0640 |
|
| usePopoverMaker.js | File | 5.78 KB | 0640 |
|
| useSpringModal.js | File | 1.17 KB | 0640 |
|