| 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 | 1×
 
1×
1×
1×
 
1×
269556×
359220×
 
1×
80×
 
1×
619×
 
1×
12536×
12536×
 
1×
 
 
1×
 
 
1×
 
1×
1×
384991×
12536×
12536×
 
372455×
372454×
 
 
1×
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  | define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var AriaService = (function () {
        function AriaService() {
        }
        AriaService.prototype.setOptions = function (target, options) {
            var props = Object.keys(options);
            props.forEach(function (name) { return setStateAndProperties(target, config[name], options[name]); });
        };
        AriaService.prototype.setExpand = function (target, expand) {
            setStateAndProperties(target, config.expand, expand);
        };
        AriaService.prototype.setSort = function (target, direction) {
            setStateAndProperties(target, config.sort, direction, typeof direction === 'boolean');
        };
        AriaService.prototype.setBusy = function (target, isBusy) {
            setStateAndProperties(target, config.busy, isBusy);
            setStateAndProperties(target, config.invalid, null, true);
        };
        AriaService.prototype.setGrabbed = function (target, isGrabbed, remove) {
            setStateAndProperties(target, config.grabbed, isGrabbed, remove);
        };
        AriaService.prototype.setDropTarget = function (target, isTarget) {
            setStateAndProperties(target, config.dropeffect, 'copy', !isTarget);
        };
        return AriaService;
    }());
    exports.AriaService = AriaService;
    function setStateAndProperties(target, attribute, value, remove) {
        if (remove) {
            target.removeAttribute(attribute);
            return;
        }
        if (target) {
            target.setAttribute(attribute, value);
        }
    }
    var config = {
        expand: 'aria-expanded',
        role: 'role',
        selected: 'aria-selected',
        multiselectable: 'aria-multiselectable',
        sort: 'aria-sort',
        busy: 'aria-busy',
        invalid: 'aria-invalid',
        grabbed: 'aria-grabbed',
        dropeffect: 'aria-dropeffect',
        haspopup: 'aria-haspopup',
        level: 'aria-level',
        colcount: 'aria-colcount'
    };
});
  |