@@ -107,7 +107,7 @@ let ArraySelectorMixin = dedupingMixin(superClass => {
107
107
108
108
__updateSelection ( multi , itemsInfo ) {
109
109
let path = itemsInfo . path ;
110
- if ( path == 'items' ) {
110
+ if ( path == JSCompiler_renameProperty ( 'items' , this ) ) {
111
111
// Case 1 - items array changed, so diff against previous array and
112
112
// deselect any removed items and adjust selected indices
113
113
let newItems = itemsInfo . base || [ ] ;
@@ -122,14 +122,14 @@ let ArraySelectorMixin = dedupingMixin(superClass => {
122
122
}
123
123
this . __lastItems = newItems ;
124
124
this . __lastMulti = multi ;
125
- } else if ( itemsInfo . path == 'items.splices' ) {
125
+ } else if ( itemsInfo . path == ` ${ JSCompiler_renameProperty ( 'items' , this ) } .splices` ) {
126
126
// Case 2 - got specific splice information describing the array mutation:
127
127
// deselect any removed items and adjust selected indices
128
128
this . __applySplices ( itemsInfo . value . indexSplices ) ;
129
129
} else {
130
130
// Case 3 - an array element was changed, so deselect the previous
131
131
// item for that index if it was previously selected
132
- let part = path . slice ( 'items.' . length ) ;
132
+ let part = path . slice ( ` ${ JSCompiler_renameProperty ( 'items' , this ) } .` . length ) ;
133
133
let idx = parseInt ( part , 10 ) ;
134
134
if ( ( part . indexOf ( '.' ) < 0 ) && part == idx ) {
135
135
this . __deselectChangedIdx ( idx ) ;
@@ -167,7 +167,7 @@ let ArraySelectorMixin = dedupingMixin(superClass => {
167
167
selected . forEach ( ( idx , item ) => {
168
168
if ( idx < 0 ) {
169
169
if ( this . multi ) {
170
- this . splice ( 'selected' , sidx , 1 ) ;
170
+ this . splice ( JSCompiler_renameProperty ( 'selected' , this ) , sidx , 1 ) ;
171
171
} else {
172
172
this . selected = this . selectedItem = null ;
173
173
}
@@ -184,13 +184,19 @@ let ArraySelectorMixin = dedupingMixin(superClass => {
184
184
let sidx = 0 ;
185
185
this . __selectedMap . forEach ( idx => {
186
186
if ( idx >= 0 ) {
187
- this . linkPaths ( 'items.' + idx , 'selected.' + sidx ++ ) ;
187
+ this . linkPaths (
188
+ `${ JSCompiler_renameProperty ( 'items' , this ) } .${ idx } ` ,
189
+ `${ JSCompiler_renameProperty ( 'selected' , this ) } .${ sidx ++ } ` ) ;
188
190
}
189
191
} ) ;
190
192
} else {
191
193
this . __selectedMap . forEach ( idx => {
192
- this . linkPaths ( 'selected' , 'items.' + idx ) ;
193
- this . linkPaths ( 'selectedItem' , 'items.' + idx ) ;
194
+ this . linkPaths (
195
+ JSCompiler_renameProperty ( 'selected' , this ) ,
196
+ `${ JSCompiler_renameProperty ( 'items' , this ) } .${ idx } ` ) ;
197
+ this . linkPaths (
198
+ JSCompiler_renameProperty ( 'selectedItem' , this ) ,
199
+ `${ JSCompiler_renameProperty ( 'items' , this ) } .${ idx } ` ) ;
194
200
} ) ;
195
201
}
196
202
}
@@ -248,9 +254,9 @@ let ArraySelectorMixin = dedupingMixin(superClass => {
248
254
}
249
255
250
256
__selectedIndexForItemIndex ( idx ) {
251
- let selected = this . __dataLinkedPaths [ 'items.' + idx ] ;
257
+ let selected = this . __dataLinkedPaths [ ` ${ JSCompiler_renameProperty ( 'items' , this ) } . ${ idx } ` ] ;
252
258
if ( selected ) {
253
- return parseInt ( selected . slice ( 'selected.' . length ) , 10 ) ;
259
+ return parseInt ( selected . slice ( ` ${ JSCompiler_renameProperty ( 'selected' , this ) } .` . length ) , 10 ) ;
254
260
}
255
261
}
256
262
@@ -271,7 +277,7 @@ let ArraySelectorMixin = dedupingMixin(superClass => {
271
277
}
272
278
this . __updateLinks ( ) ;
273
279
if ( this . multi ) {
274
- this . splice ( 'selected' , sidx , 1 ) ;
280
+ this . splice ( JSCompiler_renameProperty ( 'selected' , this ) , sidx , 1 ) ;
275
281
} else {
276
282
this . selected = this . selectedItem = null ;
277
283
}
@@ -318,7 +324,7 @@ let ArraySelectorMixin = dedupingMixin(superClass => {
318
324
this . __selectedMap . set ( item , idx ) ;
319
325
this . __updateLinks ( ) ;
320
326
if ( this . multi ) {
321
- this . push ( 'selected' , item ) ;
327
+ this . push ( JSCompiler_renameProperty ( 'selected' , this ) , item ) ;
322
328
} else {
323
329
this . selected = this . selectedItem = item ;
324
330
}
0 commit comments