vsn 0.1.13 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/demo.html +15 -7
- package/demo/vision.js +1 -1
- package/dist/AST.d.ts +2 -2
- package/dist/Scope.d.ts +2 -0
- package/dist/Vision.d.ts +4 -1
- package/dist/attributes/_imports.d.ts +27 -27
- package/dist/vision.min.js +1 -0
- package/main.py +16 -0
- package/package.json +1 -1
- package/src/AST.ts +40 -26
- package/src/Scope.ts +11 -0
- package/src/Vision.ts +6 -3
- package/src/attributes/_imports.ts +27 -27
- package/test/AST.spec.ts +41 -12
- package/test/DOM.spec.ts +2 -2
- package/test/Scope.spec.ts +14 -0
- package/test/attributes/Bind.spec.ts +13 -0
- package/dist/AST.js +0 -1978
- package/dist/AST.js.map +0 -1
- package/dist/Attribute.js +0 -187
- package/dist/Attribute.js.map +0 -1
- package/dist/Bencmark.js +0 -179
- package/dist/Bencmark.js.map +0 -1
- package/dist/Configuration.js +0 -64
- package/dist/Configuration.js.map +0 -1
- package/dist/Controller.js +0 -39
- package/dist/Controller.js.map +0 -1
- package/dist/DOM/DOMObject.js +0 -45
- package/dist/DOM/DOMObject.js.map +0 -1
- package/dist/DOM/WrappedDocument.js +0 -34
- package/dist/DOM/WrappedDocument.js.map +0 -1
- package/dist/DOM/WrappedWindow.js +0 -45
- package/dist/DOM/WrappedWindow.js.map +0 -1
- package/dist/DOM.js +0 -547
- package/dist/DOM.js.map +0 -1
- package/dist/Formats.js +0 -44
- package/dist/Formats.js.map +0 -1
- package/dist/Query.js +0 -66
- package/dist/Query.js.map +0 -1
- package/dist/Registry.js +0 -138
- package/dist/Registry.js.map +0 -1
- package/dist/Scope.js +0 -496
- package/dist/Scope.js.map +0 -1
- package/dist/Tag/List.js +0 -85
- package/dist/Tag/List.js.map +0 -1
- package/dist/Tag.js +0 -715
- package/dist/Tag.js.map +0 -1
- package/dist/Types.js +0 -48
- package/dist/Types.js.map +0 -1
- package/dist/Vision.js +0 -155
- package/dist/Vision.js.map +0 -1
- package/dist/attributes/AddClassIf.js +0 -93
- package/dist/attributes/AddClassIf.js.map +0 -1
- package/dist/attributes/Bind.js +0 -272
- package/dist/attributes/Bind.js.map +0 -1
- package/dist/attributes/ClassConstructor.js +0 -104
- package/dist/attributes/ClassConstructor.js.map +0 -1
- package/dist/attributes/ClickRemoveClass.js +0 -102
- package/dist/attributes/ClickRemoveClass.js.map +0 -1
- package/dist/attributes/ClickToggleClass.js +0 -102
- package/dist/attributes/ClickToggleClass.js.map +0 -1
- package/dist/attributes/ControllerAttribute.js +0 -28
- package/dist/attributes/ControllerAttribute.js.map +0 -1
- package/dist/attributes/DisableIf.js +0 -94
- package/dist/attributes/DisableIf.js.map +0 -1
- package/dist/attributes/Exec.js +0 -102
- package/dist/attributes/Exec.js.map +0 -1
- package/dist/attributes/Format.js +0 -96
- package/dist/attributes/Format.js.map +0 -1
- package/dist/attributes/If.js +0 -147
- package/dist/attributes/If.js.map +0 -1
- package/dist/attributes/JSONAttribute.js +0 -115
- package/dist/attributes/JSONAttribute.js.map +0 -1
- package/dist/attributes/KeyAbstract.js +0 -110
- package/dist/attributes/KeyAbstract.js.map +0 -1
- package/dist/attributes/KeyDown.js +0 -82
- package/dist/attributes/KeyDown.js.map +0 -1
- package/dist/attributes/KeyUp.js +0 -82
- package/dist/attributes/KeyUp.js.map +0 -1
- package/dist/attributes/List.js +0 -273
- package/dist/attributes/List.js.map +0 -1
- package/dist/attributes/ListItem.js +0 -135
- package/dist/attributes/ListItem.js.map +0 -1
- package/dist/attributes/ListItemModel.js +0 -39
- package/dist/attributes/ListItemModel.js.map +0 -1
- package/dist/attributes/ModelAttribute.js +0 -29
- package/dist/attributes/ModelAttribute.js.map +0 -1
- package/dist/attributes/Name.js +0 -88
- package/dist/attributes/Name.js.map +0 -1
- package/dist/attributes/On.js +0 -123
- package/dist/attributes/On.js.map +0 -1
- package/dist/attributes/Radio.js +0 -127
- package/dist/attributes/Radio.js.map +0 -1
- package/dist/attributes/Referenced.js +0 -38
- package/dist/attributes/Referenced.js.map +0 -1
- package/dist/attributes/RootAttribute.js +0 -85
- package/dist/attributes/RootAttribute.js.map +0 -1
- package/dist/attributes/ScopeAttribute.js +0 -40
- package/dist/attributes/ScopeAttribute.js.map +0 -1
- package/dist/attributes/ScopeChange.js +0 -124
- package/dist/attributes/ScopeChange.js.map +0 -1
- package/dist/attributes/SetAttribute.js +0 -130
- package/dist/attributes/SetAttribute.js.map +0 -1
- package/dist/attributes/StandardAttribute.js +0 -168
- package/dist/attributes/StandardAttribute.js.map +0 -1
- package/dist/attributes/Template.js +0 -39
- package/dist/attributes/Template.js.map +0 -1
- package/dist/attributes/TypeAttribute.js +0 -101
- package/dist/attributes/TypeAttribute.js.map +0 -1
- package/dist/attributes/_imports.js +0 -30
- package/dist/attributes/_imports.js.map +0 -1
- package/dist/helpers/DOMHelper.js +0 -81
- package/dist/helpers/DOMHelper.js.map +0 -1
- package/dist/helpers/ElementHelper.js +0 -25
- package/dist/helpers/ElementHelper.js.map +0 -1
- package/dist/helpers/VisionHelper.js +0 -71
- package/dist/helpers/VisionHelper.js.map +0 -1
- package/dist/helpers/decorators.js +0 -38
- package/dist/helpers/decorators.js.map +0 -1
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
24
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
25
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
27
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
28
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
29
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
33
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
34
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
35
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
36
|
-
function step(op) {
|
|
37
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
38
|
-
while (_) try {
|
|
39
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
40
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
41
|
-
switch (op[0]) {
|
|
42
|
-
case 0: case 1: t = op; break;
|
|
43
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
44
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
45
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
46
|
-
default:
|
|
47
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
48
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
49
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
50
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
51
|
-
if (t[2]) _.ops.pop();
|
|
52
|
-
_.trys.pop(); continue;
|
|
53
|
-
}
|
|
54
|
-
op = body.call(thisArg, _);
|
|
55
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
56
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.Format = void 0;
|
|
61
|
-
var Attribute_1 = require("../Attribute");
|
|
62
|
-
var Registry_1 = require("../Registry");
|
|
63
|
-
var Format = /** @class */ (function (_super) {
|
|
64
|
-
__extends(Format, _super);
|
|
65
|
-
function Format() {
|
|
66
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
-
}
|
|
68
|
-
Format.prototype.extract = function () {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
-
var value, attribute, formatter, bindingKey, binding;
|
|
71
|
-
return __generator(this, function (_a) {
|
|
72
|
-
switch (_a.label) {
|
|
73
|
-
case 0:
|
|
74
|
-
value = this.getAttributeValue(null);
|
|
75
|
-
attribute = this.getAttributeBinding(null);
|
|
76
|
-
return [4 /*yield*/, Registry_1.Registry.instance.formats.get(value)];
|
|
77
|
-
case 1:
|
|
78
|
-
formatter = _a.sent();
|
|
79
|
-
bindingKey = attribute ? "vsn-bind:" + attribute : 'vsn-bind';
|
|
80
|
-
return [4 /*yield*/, this.tag.getAttribute(bindingKey)];
|
|
81
|
-
case 2:
|
|
82
|
-
binding = _a.sent();
|
|
83
|
-
binding.setFormatter(formatter);
|
|
84
|
-
return [2 /*return*/];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
Format.canDefer = false;
|
|
90
|
-
Format = __decorate([
|
|
91
|
-
Registry_1.Registry.attribute('vsn-format')
|
|
92
|
-
], Format);
|
|
93
|
-
return Format;
|
|
94
|
-
}(Attribute_1.Attribute));
|
|
95
|
-
exports.Format = Format;
|
|
96
|
-
//# sourceMappingURL=Format.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Format.js","sourceRoot":"","sources":["../../src/attributes/Format.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAuC;AACvC,wCAAqC;AAIrC;IAA4B,0BAAS;IAArC;;IAWA,CAAC;IARgB,wBAAO,GAApB;;;;;;wBACU,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;wBACrC,SAAS,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;wBAC/B,qBAAM,mBAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAA;;wBAAtD,SAAS,GAAG,SAA0C;wBACtD,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,cAAY,SAAW,CAAC,CAAC,CAAC,UAAU,CAAC;wBAC9C,qBAAM,IAAI,CAAC,GAAG,CAAC,YAAY,CAAO,UAAU,CAAC,EAAA;;wBAA7D,OAAO,GAAS,SAA6C;wBACnE,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;;;;;KACnC;IATsB,eAAQ,GAAY,KAAK,CAAC;IADxC,MAAM;QADlB,mBAAQ,CAAC,SAAS,CAAC,YAAY,CAAC;OACpB,MAAM,CAWlB;IAAD,aAAC;CAAA,AAXD,CAA4B,qBAAS,GAWpC;AAXY,wBAAM"}
|
package/dist/attributes/If.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
24
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
25
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
27
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
28
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
29
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
33
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
34
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
35
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
36
|
-
function step(op) {
|
|
37
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
38
|
-
while (_) try {
|
|
39
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
40
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
41
|
-
switch (op[0]) {
|
|
42
|
-
case 0: case 1: t = op; break;
|
|
43
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
44
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
45
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
46
|
-
default:
|
|
47
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
48
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
49
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
50
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
51
|
-
if (t[2]) _.ops.pop();
|
|
52
|
-
_.trys.pop(); continue;
|
|
53
|
-
}
|
|
54
|
-
op = body.call(thisArg, _);
|
|
55
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
56
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.If = void 0;
|
|
61
|
-
var Attribute_1 = require("../Attribute");
|
|
62
|
-
var AST_1 = require("../AST");
|
|
63
|
-
var Registry_1 = require("../Registry");
|
|
64
|
-
var If = /** @class */ (function (_super) {
|
|
65
|
-
__extends(If, _super);
|
|
66
|
-
function If() {
|
|
67
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
68
|
-
}
|
|
69
|
-
If.prototype.compile = function () {
|
|
70
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
-
var statement;
|
|
72
|
-
return __generator(this, function (_a) {
|
|
73
|
-
switch (_a.label) {
|
|
74
|
-
case 0:
|
|
75
|
-
statement = this.getAttributeValue();
|
|
76
|
-
this.tree = new AST_1.Tree(statement);
|
|
77
|
-
return [4 /*yield*/, this.tree.prepare(this.tag.scope, this.tag.dom, this.tag)];
|
|
78
|
-
case 1:
|
|
79
|
-
_a.sent();
|
|
80
|
-
return [2 /*return*/];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
If.prototype.extract = function () {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
return __generator(this, function (_a) {
|
|
88
|
-
switch (_a.label) {
|
|
89
|
-
case 0: return [4 /*yield*/, this.evaluate()];
|
|
90
|
-
case 1:
|
|
91
|
-
_a.sent();
|
|
92
|
-
return [2 /*return*/];
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
If.prototype.connect = function () {
|
|
98
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
99
|
-
return __generator(this, function (_a) {
|
|
100
|
-
switch (_a.label) {
|
|
101
|
-
case 0: return [4 /*yield*/, this.tree.bindToScopeChanges(this.tag.scope, this.onChange.bind(this), this.tag.dom, this.tag)];
|
|
102
|
-
case 1:
|
|
103
|
-
_a.sent();
|
|
104
|
-
return [2 /*return*/];
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
If.prototype.evaluate = function () {
|
|
110
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
111
|
-
return __generator(this, function (_a) {
|
|
112
|
-
switch (_a.label) {
|
|
113
|
-
case 0: return [4 /*yield*/, this.onChange()];
|
|
114
|
-
case 1:
|
|
115
|
-
_a.sent();
|
|
116
|
-
return [2 /*return*/];
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
If.prototype.onChange = function () {
|
|
122
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
123
|
-
var result;
|
|
124
|
-
return __generator(this, function (_a) {
|
|
125
|
-
switch (_a.label) {
|
|
126
|
-
case 0: return [4 /*yield*/, this.tree.evaluate(this.tag.scope, this.tag.dom, this.tag)];
|
|
127
|
-
case 1:
|
|
128
|
-
result = _a.sent();
|
|
129
|
-
if (result) {
|
|
130
|
-
this.tag.show();
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
this.tag.hide();
|
|
134
|
-
}
|
|
135
|
-
return [2 /*return*/];
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
If.canDefer = false;
|
|
141
|
-
If = __decorate([
|
|
142
|
-
Registry_1.Registry.attribute('vsn-if')
|
|
143
|
-
], If);
|
|
144
|
-
return If;
|
|
145
|
-
}(Attribute_1.Attribute));
|
|
146
|
-
exports.If = If;
|
|
147
|
-
//# sourceMappingURL=If.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"If.js","sourceRoot":"","sources":["../../src/attributes/If.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAuC;AACvC,8BAA4B;AAC5B,wCAAqC;AAGrC;IAAwB,sBAAS;IAAjC;;IA8BA,CAAC;IA1BgB,oBAAO,GAApB;;;;;;wBACU,SAAS,GAAW,IAAI,CAAC,iBAAiB,EAAE,CAAC;wBACnD,IAAI,CAAC,IAAI,GAAG,IAAI,UAAI,CAAC,SAAS,CAAC,CAAC;wBAChC,qBAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,EAAA;;wBAA/D,SAA+D,CAAC;;;;;KACnE;IAEY,oBAAO,GAApB;;;;4BACI,qBAAM,IAAI,CAAC,QAAQ,EAAE,EAAA;;wBAArB,SAAqB,CAAC;;;;;KACzB;IAEY,oBAAO,GAApB;;;;4BACI,qBAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,EAAA;;wBAApG,SAAoG,CAAC;;;;;KACxG;IAEY,qBAAQ,GAArB;;;;4BACI,qBAAM,IAAI,CAAC,QAAQ,EAAE,EAAA;;wBAArB,SAAqB,CAAC;;;;;KACzB;IAEK,qBAAQ,GAAd;;;;;4BAC4B,qBAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,EAAA;;wBAAlF,MAAM,GAAY,SAAgE;wBACxF,IAAI,MAAM,EAAE;4BACR,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;yBACnB;6BAAM;4BACH,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;yBACnB;;;;;KACJ;IA5BsB,WAAQ,GAAY,KAAK,CAAC;IADxC,EAAE;QADd,mBAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC;OAChB,EAAE,CA8Bd;IAAD,SAAC;CAAA,AA9BD,CAAwB,qBAAS,GA8BhC;AA9BY,gBAAE"}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
24
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
25
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
27
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
28
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
29
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
33
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
34
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
35
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
36
|
-
function step(op) {
|
|
37
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
38
|
-
while (_) try {
|
|
39
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
40
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
41
|
-
switch (op[0]) {
|
|
42
|
-
case 0: case 1: t = op; break;
|
|
43
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
44
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
45
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
46
|
-
default:
|
|
47
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
48
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
49
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
50
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
51
|
-
if (t[2]) _.ops.pop();
|
|
52
|
-
_.trys.pop(); continue;
|
|
53
|
-
}
|
|
54
|
-
op = body.call(thisArg, _);
|
|
55
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
56
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.JSONAttribute = void 0;
|
|
61
|
-
var Registry_1 = require("../Registry");
|
|
62
|
-
var Attribute_1 = require("../Attribute");
|
|
63
|
-
var Scope_1 = require("../Scope");
|
|
64
|
-
var JSONAttribute = /** @class */ (function (_super) {
|
|
65
|
-
__extends(JSONAttribute, _super);
|
|
66
|
-
function JSONAttribute() {
|
|
67
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
68
|
-
}
|
|
69
|
-
JSONAttribute.prototype.extract = function () {
|
|
70
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
-
var scopeKey, ref, key, scope, json, property, data, newScope;
|
|
72
|
-
return __generator(this, function (_a) {
|
|
73
|
-
switch (_a.label) {
|
|
74
|
-
case 0:
|
|
75
|
-
scopeKey = this.getAttributeBinding();
|
|
76
|
-
try {
|
|
77
|
-
ref = this.tag.scope.getReference(scopeKey);
|
|
78
|
-
}
|
|
79
|
-
catch (e) {
|
|
80
|
-
console.error('error', e);
|
|
81
|
-
return [2 /*return*/];
|
|
82
|
-
}
|
|
83
|
-
return [4 /*yield*/, ref.getKey()];
|
|
84
|
-
case 1:
|
|
85
|
-
key = _a.sent();
|
|
86
|
-
return [4 /*yield*/, ref.getScope()];
|
|
87
|
-
case 2:
|
|
88
|
-
scope = _a.sent();
|
|
89
|
-
if (this.tag.element.tagName.toLowerCase() === 'script') {
|
|
90
|
-
json = this.tag.element.innerText;
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
json = unescape(this.getAttributeValue());
|
|
94
|
-
}
|
|
95
|
-
property = this.getAttributeBinding();
|
|
96
|
-
data = JSON.parse(json);
|
|
97
|
-
if (data && typeof data === 'object' && data.constructor === Object) {
|
|
98
|
-
newScope = new Scope_1.Scope(scope);
|
|
99
|
-
newScope.wrap(data);
|
|
100
|
-
scope.set(key, newScope);
|
|
101
|
-
}
|
|
102
|
-
scope.set(key, data);
|
|
103
|
-
return [2 /*return*/];
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
JSONAttribute.canDefer = false;
|
|
109
|
-
JSONAttribute = __decorate([
|
|
110
|
-
Registry_1.Registry.attribute('vsn-json')
|
|
111
|
-
], JSONAttribute);
|
|
112
|
-
return JSONAttribute;
|
|
113
|
-
}(Attribute_1.Attribute));
|
|
114
|
-
exports.JSONAttribute = JSONAttribute;
|
|
115
|
-
//# sourceMappingURL=JSONAttribute.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"JSONAttribute.js","sourceRoot":"","sources":["../../src/attributes/JSONAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAAqC;AACrC,0CAAuC;AACvC,kCAA+C;AAG/C;IAAmC,iCAAS;IAA5C;;IAgCA,CAAC;IA7BgB,+BAAO,GAApB;;;;;;wBACQ,QAAQ,GAAW,IAAI,CAAC,mBAAmB,EAAE,CAAC;wBAElD,IAAI;4BACA,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;yBAC/C;wBAAC,OAAO,CAAC,EAAE;4BACR,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;4BAC1B,sBAAO;yBACV;wBAEW,qBAAM,GAAG,CAAC,MAAM,EAAE,EAAA;;wBAAxB,GAAG,GAAG,SAAkB;wBAChB,qBAAM,GAAG,CAAC,QAAQ,EAAE,EAAA;;wBAA5B,KAAK,GAAG,SAAoB;wBAGlC,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,QAAQ,EAAE;4BACrD,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC;yBACrC;6BAAM;4BACH,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;yBAC7C;wBACK,QAAQ,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;wBACtC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;wBAC9B,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,WAAW,KAAK,MAAM,EAAE;4BAC3D,QAAQ,GAAG,IAAI,aAAK,CAAC,KAAK,CAAC,CAAC;4BAClC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;4BACpB,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;yBAC5B;wBAED,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;;;;;KACxB;IA9BsB,sBAAQ,GAAY,KAAK,CAAC;IADxC,aAAa;QADzB,mBAAQ,CAAC,SAAS,CAAC,UAAU,CAAC;OAClB,aAAa,CAgCzB;IAAD,oBAAC;CAAA,AAhCD,CAAmC,qBAAS,GAgC3C;AAhCY,sCAAa"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
-
function step(op) {
|
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
33
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
-
switch (op[0]) {
|
|
36
|
-
case 0: case 1: t = op; break;
|
|
37
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
-
default:
|
|
41
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
-
if (t[2]) _.ops.pop();
|
|
46
|
-
_.trys.pop(); continue;
|
|
47
|
-
}
|
|
48
|
-
op = body.call(thisArg, _);
|
|
49
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
-
exports.KeyAbstract = void 0;
|
|
55
|
-
var On_1 = require("./On");
|
|
56
|
-
var KeyAbstract = /** @class */ (function (_super) {
|
|
57
|
-
__extends(KeyAbstract, _super);
|
|
58
|
-
function KeyAbstract() {
|
|
59
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
60
|
-
_this.specificKey = null;
|
|
61
|
-
return _this;
|
|
62
|
-
}
|
|
63
|
-
KeyAbstract.prototype.compile = function () {
|
|
64
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
-
return __generator(this, function (_a) {
|
|
66
|
-
switch (_a.label) {
|
|
67
|
-
case 0: return [4 /*yield*/, _super.prototype.compile.call(this)];
|
|
68
|
-
case 1:
|
|
69
|
-
_a.sent();
|
|
70
|
-
this.specificKey = this.getAttributeBinding();
|
|
71
|
-
return [2 /*return*/];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
KeyAbstract.prototype.connect = function () {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
78
|
-
return __generator(this, function (_a) {
|
|
79
|
-
this.tag.addEventHandler('keydown', this.getAttributeModifiers(), this.handleEvent.bind(this));
|
|
80
|
-
return [2 /*return*/];
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
KeyAbstract.prototype.handleEvent = function (e) {
|
|
85
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
86
|
-
var triggerEvent;
|
|
87
|
-
return __generator(this, function (_a) {
|
|
88
|
-
switch (_a.label) {
|
|
89
|
-
case 0:
|
|
90
|
-
triggerEvent = false;
|
|
91
|
-
if ([undefined, null, ''].indexOf(this.specificKey) === -1) {
|
|
92
|
-
if (e.key.toLowerCase() === this.specificKey || e.code.toLowerCase() === this.specificKey)
|
|
93
|
-
triggerEvent = true;
|
|
94
|
-
}
|
|
95
|
-
else
|
|
96
|
-
triggerEvent = true;
|
|
97
|
-
if (!triggerEvent) return [3 /*break*/, 2];
|
|
98
|
-
return [4 /*yield*/, _super.prototype.handleEvent.call(this, e)];
|
|
99
|
-
case 1:
|
|
100
|
-
_a.sent();
|
|
101
|
-
_a.label = 2;
|
|
102
|
-
case 2: return [2 /*return*/];
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
return KeyAbstract;
|
|
108
|
-
}(On_1.On));
|
|
109
|
-
exports.KeyAbstract = KeyAbstract;
|
|
110
|
-
//# sourceMappingURL=KeyAbstract.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeyAbstract.js","sourceRoot":"","sources":["../../src/attributes/KeyAbstract.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAAwB;AAExB;IAA0C,+BAAE;IAA5C;QAAA,qEAwBC;QAvBa,iBAAW,GAAW,IAAI,CAAC;;IAuBzC,CAAC;IArBgB,6BAAO,GAApB;;;;4BACI,qBAAM,iBAAM,OAAO,WAAE,EAAA;;wBAArB,SAAqB,CAAC;wBACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;;;;;KACjD;IAEY,6BAAO,GAApB;;;gBACI,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;;;;KAClG;IAEY,iCAAW,GAAxB,UAAyB,CAAC;;;;;;wBAClB,YAAY,GAAY,KAAK,CAAC;wBAElC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE;4BACxD,IAAI,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW;gCACrF,YAAY,GAAG,IAAI,CAAC;yBAC3B;;4BACG,YAAY,GAAG,IAAI,CAAC;6BAEpB,YAAY,EAAZ,wBAAY;wBACZ,qBAAM,iBAAM,WAAW,YAAC,CAAC,CAAC,EAAA;;wBAA1B,SAA0B,CAAC;;;;;;KAClC;IACL,kBAAC;AAAD,CAAC,AAxBD,CAA0C,OAAE,GAwB3C;AAxBqB,kCAAW"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
24
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
25
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
27
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
28
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
29
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
33
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
34
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
35
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
36
|
-
function step(op) {
|
|
37
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
38
|
-
while (_) try {
|
|
39
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
40
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
41
|
-
switch (op[0]) {
|
|
42
|
-
case 0: case 1: t = op; break;
|
|
43
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
44
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
45
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
46
|
-
default:
|
|
47
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
48
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
49
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
50
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
51
|
-
if (t[2]) _.ops.pop();
|
|
52
|
-
_.trys.pop(); continue;
|
|
53
|
-
}
|
|
54
|
-
op = body.call(thisArg, _);
|
|
55
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
56
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.KeyDown = void 0;
|
|
61
|
-
var KeyAbstract_1 = require("./KeyAbstract");
|
|
62
|
-
var Registry_1 = require("../Registry");
|
|
63
|
-
var KeyDown = /** @class */ (function (_super) {
|
|
64
|
-
__extends(KeyDown, _super);
|
|
65
|
-
function KeyDown() {
|
|
66
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
-
}
|
|
68
|
-
KeyDown.prototype.connect = function () {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
-
return __generator(this, function (_a) {
|
|
71
|
-
this.tag.addEventHandler('keydown', this.getAttributeModifiers(), this.handleEvent.bind(this));
|
|
72
|
-
return [2 /*return*/];
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
KeyDown = __decorate([
|
|
77
|
-
Registry_1.Registry.attribute('vsn-key-down')
|
|
78
|
-
], KeyDown);
|
|
79
|
-
return KeyDown;
|
|
80
|
-
}(KeyAbstract_1.KeyAbstract));
|
|
81
|
-
exports.KeyDown = KeyDown;
|
|
82
|
-
//# sourceMappingURL=KeyDown.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeyDown.js","sourceRoot":"","sources":["../../src/attributes/KeyDown.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0C;AAC1C,wCAAqC;AAGrC;IAA6B,2BAAW;IAAxC;;IAIA,CAAC;IAHgB,yBAAO,GAApB;;;gBACI,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS,EAAE,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;;;;KAClG;IAHQ,OAAO;QADnB,mBAAQ,CAAC,SAAS,CAAC,cAAc,CAAC;OACtB,OAAO,CAInB;IAAD,cAAC;CAAA,AAJD,CAA6B,yBAAW,GAIvC;AAJY,0BAAO"}
|