All files index.ts

75% Statements 9/12
100% Branches 0/0
0% Functions 0/2
66.67% Lines 6/9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36                    1x 1x 1x 1x   1x                 1x                      
import {
  FrameworkConfiguration,
  bindingMode,
  PLATFORM,
} from 'aurelia-framework';
 
import { ValueAttributeObserver, EventSubscriber } from 'aurelia-binding';
 
import { AureliaUX } from '@aurelia-ux/core';
 
export { UxOption, UxOptionElement } from './ux-option';
export { UxOptGroup, UxOptGroupElement } from './ux-optgroup';
export { UxSelect, UxSelectElement } from './ux-select';
export { UxSelectTheme } from './ux-select-theme';
 
export function configure(config: FrameworkConfiguration) {
  config.container.get(AureliaUX).registerUxElementConfig(uxSelectConfig);
  config.globalResources([
    PLATFORM.moduleName('./ux-select'),
    PLATFORM.moduleName('./ux-optgroup'),
    PLATFORM.moduleName('./ux-option')
  ]);
}
 
const uxSelectConfig = {
  tagName: 'ux-select',
  properties: {
    value: {
      defaultBindingMode: bindingMode.twoWay,
      getObserver(element: Element, _: string) {
        return new ValueAttributeObserver(element, 'value', new EventSubscriber(['change']));
      }
    }
  }
};