diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index 248653f664..fec85f8bf1 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -13,16 +13,12 @@ import '../utils/boot.js'; import { dedupingMixin } from '../utils/mixin.js'; import { root as root$0, isAncestor, isDescendant, get as get$0, translate, isPath as isPath$0, set as set$0, normalize } from '../utils/path.js'; /* for notify, reflect */ -import * as caseMap from '../utils/case-map.js'; -import { camelToDashCase as camelToDashCase$0, dashToCamelCase } from '../utils/case-map.js'; +import { camelToDashCase, dashToCamelCase } from '../utils/case-map.js'; import { PropertyAccessors } from './property-accessors.js'; /* for annotated effects */ import { TemplateStamp } from './template-stamp.js'; import { sanitizeDOMValue } from '../utils/settings.js'; -/** @const {Object} */ -const CaseMap = caseMap; - // Monotonically increasing unique ID used for de-duping effects triggered // from multiple properties in the same turn let dedupeId = 0; @@ -272,7 +268,7 @@ function runNotifyEffects(inst, notifyProps, props, oldProps, hasPaths) { function notifyPath(inst, path, props) { let rootProperty = root$0(path); if (rootProperty !== path) { - let eventName = camelToDashCase$0(rootProperty) + '-changed'; + let eventName = camelToDashCase(rootProperty) + '-changed'; dispatchNotifyEvent(inst, eventName, props[path], path); return true; } @@ -492,7 +488,7 @@ function addBinding(constructor, templateInfo, nodeInfo, kind, target, parts, li // Add listener info to binding metadata if (shouldAddListener(binding)) { let {event, negate} = binding.parts[0]; - binding.listenerEvent = event || (CaseMap.camelToDashCase(target) + '-changed'); + binding.listenerEvent = event || (camelToDashCase(target) + '-changed'); binding.listenerNegate = negate; } // Add "propagate" property effects to templateInfo @@ -2127,7 +2123,7 @@ export const PropertyEffects = dedupingMixin(superClass => { this._addPropertyEffect(property, TYPES.NOTIFY, { fn: runNotifyEffect, info: { - eventName: CaseMap.camelToDashCase(property) + '-changed', + eventName: camelToDashCase(property) + '-changed', property: property } });