Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dasherize('', ''); // $ExpectError
camelize(); // $ExpectError
camelize('blue man group'); // $ExpectType string
camelize('', ''); // $ExpectError
decamelize(); // $ExpectError
decamelize('blue man group'); // $ExpectType string
decamelize('', ''); // $ExpectError
underscore(); // $ExpectError
underscore('blue man group'); // $ExpectType string
underscore('', ''); // $ExpectError
w(); // $ExpectError
w('blue man group'); // $ExpectType string[]
w('', ''); // $ExpectError
classify(); // $ExpectError
classify('blue man group'); // $ExpectType string
classify('', ''); // $ExpectError
capitalize(); // $ExpectError
capitalize('blue man group'); // $ExpectType string
capitalize('', ''); // $ExpectError
loc(); // $ExpectError
loc("_Hello World"); // $ExpectType string
loc("_Hello %@ %@", ["John", "Smith"]); // $ExpectType string
camelize(); // $ExpectError
camelize('blue man group'); // $ExpectType string
camelize('', ''); // $ExpectError
decamelize(); // $ExpectError
decamelize('blue man group'); // $ExpectType string
decamelize('', ''); // $ExpectError
underscore(); // $ExpectError
underscore('blue man group'); // $ExpectType string
underscore('', ''); // $ExpectError
w(); // $ExpectError
w('blue man group'); // $ExpectType string[]
w('', ''); // $ExpectError
classify(); // $ExpectError
classify('blue man group'); // $ExpectType string
classify('', ''); // $ExpectError
capitalize(); // $ExpectError
capitalize('blue man group'); // $ExpectType string
capitalize('', ''); // $ExpectError
loc(); // $ExpectError
loc("_Hello World"); // $ExpectType string
loc("_Hello %@ %@", ["John", "Smith"]); // $ExpectType string
verb() {
faker.helpers.randomize(w(`
Liked Hated Loved
`));
},
});
init() {
this._super(...arguments);
const { rules, changeset } = getProperties(this, w('rules changeset'));
if(!rules && !changeset) {
return warn('[Ember Legit Forms] No rules hash provided. All fields will be valid no matter the input.');
}
if(rules && changeset) {
return warn('[Ember Legit Forms] Passing in both rules and changeset is not supported.')
}
let strategyObj;
if(rules) strategyObj = this._strategyObjectFactory('lfValidation', rules);
if(changeset) strategyObj = this._strategyObjectFactory('changeset', changeset);
set(this, 'strategy', strategyObj);
},
constructor(modelName, json, converter) {
this.modelName = modelName;
this.json = json;
this.converter = converter;
this.listType = converter.listType || false;
this.proxyMethods = w("getModelPayload isProxy get add unwrap");
this.wrap(this.proxyMethods);
}
_strategyObjectFactory(type, rules) {
const strategyObj = { lfValidation: LFValidationStrategy, changeset: ChangesetStrategy }[type];
const {
parserService, messageProvider, lookupService, container, data
} = getProperties(this, w('parserService messageProvider lookupService container data'));
return new strategyObj(
rules, parserService, messageProvider, lookupService, container, data
);
},
});
const innerClass = this.get('innerClass');
const emberTooltipClass = this.get('_tooltipVariantClass');
const emberTooltipArrowClass = `${w(emberTooltipClass).join('-arrow ')}-arrow`;
const emberTooltipInnerClass = `${w(emberTooltipClass).join('-inner ')}-inner`;
const targetTitle = target.title;
target.removeAttribute('title');
const tooltip = new Tooltip(target, {
container: this.get('popperContainer'),
html: true,
placement: this.get('side'),
title: '<span></span>',
trigger: 'manual',
arrowSelector: `.${w(emberTooltipArrowClass).join('.')}`,
innerSelector: `.${w(emberTooltipInnerClass).join('.')}`,
template: `<div style="margin:0;margin-${getOppositeSide(this.get('side'))}:${this.get('spacing')}px;" role="tooltip" class="${tooltipClass} ${emberTooltipClass} ember-tooltip-effect-${this.get('effect')}">
<div class="${arrowClass} ${emberTooltipArrowClass}"></div>
<div id="${this.get('wormholeId')}" class="${innerClass} ${emberTooltipInnerClass}"></div>
</div>`,
popperOptions: {
modifiers: mergeModifiers(
POPPER_DEFAULT_MODIFIERS,
this.get('popperOptions.modifiers')
),
createTooltip() {
const target = this.get('target');
const tooltipClass = this.get('tooltipClass');
const arrowClass = this.get('arrowClass');
const innerClass = this.get('innerClass');
const emberTooltipClass = this.get('_tooltipVariantClass');
const emberTooltipArrowClass = `${w(emberTooltipClass).join('-arrow ')}-arrow`;
const emberTooltipInnerClass = `${w(emberTooltipClass).join('-inner ')}-inner`;
const targetTitle = target.title;
target.removeAttribute('title');
const tooltip = new Tooltip(target, {
container: this.get('popperContainer'),
html: true,
placement: this.get('side'),
title: '<span></span>',
trigger: 'manual',
arrowSelector: `.${w(emberTooltipArrowClass).join('.')}`,
innerSelector: `.${w(emberTooltipInnerClass).join('.')}`,
template: `
const emberTooltipClass = this.get('_tooltipVariantClass');
const emberTooltipArrowClass = `${w(emberTooltipClass).join('-arrow ')}-arrow`;
const emberTooltipInnerClass = `${w(emberTooltipClass).join('-inner ')}-inner`;
const targetTitle = target.title;
target.removeAttribute('title');
const tooltip = new Tooltip(target, {
container: this.get('popperContainer'),
html: true,
placement: this.get('side'),
title: '<span></span>',
trigger: 'manual',
arrowSelector: `.${w(emberTooltipArrowClass).join('.')}`,
innerSelector: `.${w(emberTooltipInnerClass).join('.')}`,
template: `<div style="margin:0;margin-${getOppositeSide(this.get('side'))}:${this.get('spacing')}px;" role="tooltip" class="${tooltipClass} ${emberTooltipClass} ember-tooltip-effect-${this.get('effect')}">
<div class="${arrowClass} ${emberTooltipArrowClass}"></div>
<div id="${this.get('wormholeId')}" class="${innerClass} ${emberTooltipInnerClass}"></div>
</div>`,
popperOptions: {
modifiers: mergeModifiers(
POPPER_DEFAULT_MODIFIERS,
this.get('popperOptions.modifiers')
),
onCreate: () => {