juxtapose 4.0.129 → 4.0.131
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/.aiignore +12 -0
- package/.swcrc +4 -3
- package/examples.js +236 -1205
- package/lib/example/mvcApplication/constants.js +3 -3
- package/lib/example/mvcApplication/controller.js +3 -3
- package/lib/example/mvcApplication/model.js +8 -37
- package/lib/example/mvcApplication/view/button/resetPassword.js +18 -168
- package/lib/example/mvcApplication/view/form/password.js +43 -199
- package/lib/example/mvcApplication/view/input/password.js +22 -125
- package/lib/example/mvcApplication/view/paragraph/message.js +14 -160
- package/lib/example/mvcApplication/view/paragraph/validationError.js +32 -220
- package/lib/example/mvcApplication/view.js +18 -164
- package/lib/example/mvcApplication.js +9 -9
- package/lib/example/simpleApplication.js +3 -3
- package/lib/examples.js +3 -3
- package/lib/juxtapose.js +2 -2
- package/package.json +2 -2
|
@@ -8,131 +8,28 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return PasswordInput;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
descriptor.configurable = true;
|
|
33
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
34
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
38
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
39
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
40
|
-
return Constructor;
|
|
41
|
-
}
|
|
42
|
-
function _define_property(obj, key, value) {
|
|
43
|
-
if (key in obj) {
|
|
44
|
-
Object.defineProperty(obj, key, {
|
|
45
|
-
value: value,
|
|
46
|
-
enumerable: true,
|
|
47
|
-
configurable: true,
|
|
48
|
-
writable: true
|
|
49
|
-
});
|
|
50
|
-
} else {
|
|
51
|
-
obj[key] = value;
|
|
52
|
-
}
|
|
53
|
-
return obj;
|
|
54
|
-
}
|
|
55
|
-
function _get_prototype_of(o) {
|
|
56
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
57
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
11
|
+
const _easy = require("easy");
|
|
12
|
+
const _constants = require("../../constants");
|
|
13
|
+
class PasswordInput extends _easy.InputElement {
|
|
14
|
+
getPassword() {
|
|
15
|
+
const value = this.getValue(), password = value; ///
|
|
16
|
+
return password;
|
|
17
|
+
}
|
|
18
|
+
clearPassword() {
|
|
19
|
+
const password = _constants.EMPTY_STRING, value = password; ///
|
|
20
|
+
this.setValue(value);
|
|
21
|
+
}
|
|
22
|
+
parentContext() {
|
|
23
|
+
const getPassword = this.getPassword.bind(this), clearPassword = this.clearPassword.bind(this);
|
|
24
|
+
return {
|
|
25
|
+
getPassword,
|
|
26
|
+
clearPassword
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
static tagName = "input";
|
|
30
|
+
static defaultProperties = {
|
|
31
|
+
type: "password"
|
|
58
32
|
};
|
|
59
|
-
return _get_prototype_of(o);
|
|
60
33
|
}
|
|
61
|
-
function _inherits(subClass, superClass) {
|
|
62
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
63
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
64
|
-
}
|
|
65
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
66
|
-
constructor: {
|
|
67
|
-
value: subClass,
|
|
68
|
-
writable: true,
|
|
69
|
-
configurable: true
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
73
|
-
}
|
|
74
|
-
function _possible_constructor_return(self, call) {
|
|
75
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
76
|
-
return call;
|
|
77
|
-
}
|
|
78
|
-
return _assert_this_initialized(self);
|
|
79
|
-
}
|
|
80
|
-
function _set_prototype_of(o, p) {
|
|
81
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
82
|
-
o.__proto__ = p;
|
|
83
|
-
return o;
|
|
84
|
-
};
|
|
85
|
-
return _set_prototype_of(o, p);
|
|
86
|
-
}
|
|
87
|
-
function _type_of(obj) {
|
|
88
|
-
"@swc/helpers - typeof";
|
|
89
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
90
|
-
}
|
|
91
|
-
function _is_native_reflect_construct() {
|
|
92
|
-
try {
|
|
93
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
94
|
-
} catch (_) {}
|
|
95
|
-
return (_is_native_reflect_construct = function() {
|
|
96
|
-
return !!result;
|
|
97
|
-
})();
|
|
98
|
-
}
|
|
99
|
-
var PasswordInput = /*#__PURE__*/ function(InputElement) {
|
|
100
|
-
_inherits(PasswordInput, InputElement);
|
|
101
|
-
function PasswordInput() {
|
|
102
|
-
_class_call_check(this, PasswordInput);
|
|
103
|
-
return _call_super(this, PasswordInput, arguments);
|
|
104
|
-
}
|
|
105
|
-
_create_class(PasswordInput, [
|
|
106
|
-
{
|
|
107
|
-
key: "getPassword",
|
|
108
|
-
value: function getPassword() {
|
|
109
|
-
var value = this.getValue(), password = value; ///
|
|
110
|
-
return password;
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
key: "clearPassword",
|
|
115
|
-
value: function clearPassword() {
|
|
116
|
-
var password = _constants.EMPTY_STRING, value = password; ///
|
|
117
|
-
this.setValue(value);
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
key: "parentContext",
|
|
122
|
-
value: function parentContext() {
|
|
123
|
-
var getPassword = this.getPassword.bind(this), clearPassword = this.clearPassword.bind(this);
|
|
124
|
-
return {
|
|
125
|
-
getPassword: getPassword,
|
|
126
|
-
clearPassword: clearPassword
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
]);
|
|
131
|
-
return PasswordInput;
|
|
132
|
-
}(_easy.InputElement);
|
|
133
|
-
_define_property(PasswordInput, "tagName", "input");
|
|
134
|
-
_define_property(PasswordInput, "defaultProperties", {
|
|
135
|
-
type: "password"
|
|
136
|
-
});
|
|
137
34
|
|
|
138
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9leGFtcGxlL212Y0FwcGxpY2F0aW9uL3ZpZXcvaW5wdXQvcGFzc3dvcmQuanMiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5cbmltcG9ydCB7IElucHV0RWxlbWVudCB9IGZyb20gXCJlYXN5XCI7XG5cbmltcG9ydCB7IEVNUFRZX1NUUklORyB9IGZyb20gXCIuLi8uLi9jb25zdGFudHNcIjtcblxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgUGFzc3dvcmRJbnB1dCBleHRlbmRzIElucHV0RWxlbWVudCB7XG4gIGdldFBhc3N3b3JkKCkge1xuICAgIGNvbnN0IHZhbHVlID0gdGhpcy5nZXRWYWx1ZSgpLFxuICAgICAgICAgIHBhc3N3b3JkID0gdmFsdWU7IC8vL1xuXG4gICAgcmV0dXJuIHBhc3N3b3JkO1xuICB9XG5cbiAgY2xlYXJQYXNzd29yZCgpIHtcbiAgICBjb25zdCBwYXNzd29yZCA9IEVNUFRZX1NUUklORyxcbiAgICAgICAgICB2YWx1ZSA9IHBhc3N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Z0JBQWdCO1FBQ2YsTUFBTVAsY0FBYyxJQUFJLENBQUNBLFdBQVcsQ0FBQ1EsSUFBSSxDQUFDLElBQUksR0FDM0NKLGdCQUFnQixJQUFJLENBQUNBLGFBQWEsQ0FBQ0ksSUFBSSxDQUFDLElBQUk7UUFFOUMsT0FBUTtZQUNOUjtZQUNBSTtRQUNGO0lBQ0Y7SUFFQSxPQUFPSyxVQUFVLFFBQVE7SUFFekIsT0FBT0Msb0JBQW9CO1FBQ3pCQyxNQUFNO0lBQ1IsRUFBRTtBQUNKIn0=
|
|
@@ -8,168 +8,22 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return MessageParagraph;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
function _class_call_check(instance, Constructor) {
|
|
23
|
-
if (!(instance instanceof Constructor)) {
|
|
24
|
-
throw new TypeError("Cannot call a class as a function");
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function _construct(Parent, args, Class) {
|
|
28
|
-
if (_is_native_reflect_construct()) {
|
|
29
|
-
_construct = Reflect.construct;
|
|
30
|
-
} else {
|
|
31
|
-
_construct = function construct(Parent, args, Class) {
|
|
32
|
-
var a = [
|
|
33
|
-
null
|
|
34
|
-
];
|
|
35
|
-
a.push.apply(a, args);
|
|
36
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
37
|
-
var instance = new Constructor();
|
|
38
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
39
|
-
return instance;
|
|
11
|
+
const _easy = require("easy");
|
|
12
|
+
class MessageParagraph extends _easy.Element {
|
|
13
|
+
showMessage(message) {
|
|
14
|
+
const html = message; ///
|
|
15
|
+
this.html(html);
|
|
16
|
+
}
|
|
17
|
+
parentContext() {
|
|
18
|
+
const showMessage = this.showMessage.bind(this);
|
|
19
|
+
return {
|
|
20
|
+
showMessage
|
|
40
21
|
};
|
|
41
22
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
for(var i = 0; i < props.length; i++){
|
|
46
|
-
var descriptor = props[i];
|
|
47
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
48
|
-
descriptor.configurable = true;
|
|
49
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
50
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
54
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
55
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
56
|
-
return Constructor;
|
|
57
|
-
}
|
|
58
|
-
function _define_property(obj, key, value) {
|
|
59
|
-
if (key in obj) {
|
|
60
|
-
Object.defineProperty(obj, key, {
|
|
61
|
-
value: value,
|
|
62
|
-
enumerable: true,
|
|
63
|
-
configurable: true,
|
|
64
|
-
writable: true
|
|
65
|
-
});
|
|
66
|
-
} else {
|
|
67
|
-
obj[key] = value;
|
|
68
|
-
}
|
|
69
|
-
return obj;
|
|
70
|
-
}
|
|
71
|
-
function _get_prototype_of(o) {
|
|
72
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
73
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
74
|
-
};
|
|
75
|
-
return _get_prototype_of(o);
|
|
76
|
-
}
|
|
77
|
-
function _inherits(subClass, superClass) {
|
|
78
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
79
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
80
|
-
}
|
|
81
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
82
|
-
constructor: {
|
|
83
|
-
value: subClass,
|
|
84
|
-
writable: true,
|
|
85
|
-
configurable: true
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
89
|
-
}
|
|
90
|
-
function _is_native_function(fn) {
|
|
91
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
92
|
-
}
|
|
93
|
-
function _possible_constructor_return(self, call) {
|
|
94
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
95
|
-
return call;
|
|
96
|
-
}
|
|
97
|
-
return _assert_this_initialized(self);
|
|
98
|
-
}
|
|
99
|
-
function _set_prototype_of(o, p) {
|
|
100
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
101
|
-
o.__proto__ = p;
|
|
102
|
-
return o;
|
|
23
|
+
static tagName = "p";
|
|
24
|
+
static defaultProperties = {
|
|
25
|
+
className: "message"
|
|
103
26
|
};
|
|
104
|
-
return _set_prototype_of(o, p);
|
|
105
27
|
}
|
|
106
|
-
function _type_of(obj) {
|
|
107
|
-
"@swc/helpers - typeof";
|
|
108
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
109
|
-
}
|
|
110
|
-
function _wrap_native_super(Class) {
|
|
111
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
112
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
113
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
114
|
-
if (typeof Class !== "function") {
|
|
115
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
116
|
-
}
|
|
117
|
-
if (typeof _cache !== "undefined") {
|
|
118
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
119
|
-
_cache.set(Class, Wrapper);
|
|
120
|
-
}
|
|
121
|
-
function Wrapper() {
|
|
122
|
-
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
123
|
-
}
|
|
124
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
125
|
-
constructor: {
|
|
126
|
-
value: Wrapper,
|
|
127
|
-
enumerable: false,
|
|
128
|
-
writable: true,
|
|
129
|
-
configurable: true
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
return _set_prototype_of(Wrapper, Class);
|
|
133
|
-
};
|
|
134
|
-
return _wrap_native_super(Class);
|
|
135
|
-
}
|
|
136
|
-
function _is_native_reflect_construct() {
|
|
137
|
-
try {
|
|
138
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
139
|
-
} catch (_) {}
|
|
140
|
-
return (_is_native_reflect_construct = function() {
|
|
141
|
-
return !!result;
|
|
142
|
-
})();
|
|
143
|
-
}
|
|
144
|
-
var MessageParagraph = /*#__PURE__*/ function(Element) {
|
|
145
|
-
_inherits(MessageParagraph, Element);
|
|
146
|
-
function MessageParagraph() {
|
|
147
|
-
_class_call_check(this, MessageParagraph);
|
|
148
|
-
return _call_super(this, MessageParagraph, arguments);
|
|
149
|
-
}
|
|
150
|
-
_create_class(MessageParagraph, [
|
|
151
|
-
{
|
|
152
|
-
key: "showMessage",
|
|
153
|
-
value: function showMessage(message) {
|
|
154
|
-
var html = message; ///
|
|
155
|
-
this.html(html);
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
key: "parentContext",
|
|
160
|
-
value: function parentContext() {
|
|
161
|
-
var showMessage = this.showMessage.bind(this);
|
|
162
|
-
return {
|
|
163
|
-
showMessage: showMessage
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
]);
|
|
168
|
-
return MessageParagraph;
|
|
169
|
-
}(_wrap_native_super(_easy.Element));
|
|
170
|
-
_define_property(MessageParagraph, "tagName", "p");
|
|
171
|
-
_define_property(MessageParagraph, "defaultProperties", {
|
|
172
|
-
className: "message"
|
|
173
|
-
});
|
|
174
28
|
|
|
175
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4u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TtJQUNaO0lBRUFDLGdCQUFnQjtRQUNmLE1BQU1ILGNBQWMsSUFBSSxDQUFDQSxXQUFXLENBQUNJLElBQUksQ0FBQyxJQUFJO1FBRTdDLE9BQVE7WUFDTko7UUFDRjtJQUNGO0lBRUEsT0FBT0ssVUFBVSxJQUFJO0lBRXJCLE9BQU9DLG9CQUFvQjtRQUN6QkMsV0FBVztJQUNiLEVBQUU7QUFDSiJ9
|
|
@@ -8,229 +8,41 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return ValidationErrorParagraph;
|
|
9
9
|
}
|
|
10
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
|
-
function _construct(Parent, args, Class) {
|
|
37
|
-
if (_is_native_reflect_construct()) {
|
|
38
|
-
_construct = Reflect.construct;
|
|
39
|
-
} else {
|
|
40
|
-
_construct = function construct(Parent, args, Class) {
|
|
41
|
-
var a = [
|
|
42
|
-
null
|
|
43
|
-
];
|
|
44
|
-
a.push.apply(a, args);
|
|
45
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
46
|
-
var instance = new Constructor();
|
|
47
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
48
|
-
return instance;
|
|
11
|
+
const _easy = require("easy");
|
|
12
|
+
const _constants = require("../../constants");
|
|
13
|
+
class ValidationErrorParagraph extends _easy.Element {
|
|
14
|
+
constructor(selector, timeout){
|
|
15
|
+
super(selector);
|
|
16
|
+
this.timeout = timeout;
|
|
17
|
+
}
|
|
18
|
+
clearValidationError() {
|
|
19
|
+
const html = _constants.EMPTY_STRING;
|
|
20
|
+
this.html(html);
|
|
21
|
+
}
|
|
22
|
+
showValidationError(validationError) {
|
|
23
|
+
const html = validationError; ///
|
|
24
|
+
this.html(html);
|
|
25
|
+
if (this.timeout !== null) {
|
|
26
|
+
clearTimeout(this.timeout);
|
|
27
|
+
}
|
|
28
|
+
this.timeout = setTimeout(()=>{
|
|
29
|
+
this.timemout = null;
|
|
30
|
+
this.clearValidationError();
|
|
31
|
+
}, _constants.ERROR_DELAY);
|
|
32
|
+
}
|
|
33
|
+
parentContext() {
|
|
34
|
+
return {
|
|
35
|
+
showValidationError: this.showValidationError.bind(this)
|
|
49
36
|
};
|
|
50
37
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
for(var i = 0; i < props.length; i++){
|
|
55
|
-
var descriptor = props[i];
|
|
56
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
57
|
-
descriptor.configurable = true;
|
|
58
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
59
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
63
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
64
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
65
|
-
return Constructor;
|
|
66
|
-
}
|
|
67
|
-
function _define_property(obj, key, value) {
|
|
68
|
-
if (key in obj) {
|
|
69
|
-
Object.defineProperty(obj, key, {
|
|
70
|
-
value: value,
|
|
71
|
-
enumerable: true,
|
|
72
|
-
configurable: true,
|
|
73
|
-
writable: true
|
|
74
|
-
});
|
|
75
|
-
} else {
|
|
76
|
-
obj[key] = value;
|
|
77
|
-
}
|
|
78
|
-
return obj;
|
|
79
|
-
}
|
|
80
|
-
function _get_prototype_of(o) {
|
|
81
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
82
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
38
|
+
static tagName = "p";
|
|
39
|
+
static defaultProperties = {
|
|
40
|
+
className: "validation error"
|
|
83
41
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
88
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
89
|
-
}
|
|
90
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
91
|
-
constructor: {
|
|
92
|
-
value: subClass,
|
|
93
|
-
writable: true,
|
|
94
|
-
configurable: true
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
98
|
-
}
|
|
99
|
-
function _is_native_function(fn) {
|
|
100
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
101
|
-
}
|
|
102
|
-
function _iterable_to_array(iter) {
|
|
103
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
104
|
-
}
|
|
105
|
-
function _non_iterable_spread() {
|
|
106
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
107
|
-
}
|
|
108
|
-
function _possible_constructor_return(self, call) {
|
|
109
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
110
|
-
return call;
|
|
42
|
+
static fromClass(Class, properties, ...remainingArguments) {
|
|
43
|
+
const timeout = null, validationErrorParagraph = _easy.Element.fromClass(Class, properties, timeout, ...remainingArguments);
|
|
44
|
+
return validationErrorParagraph;
|
|
111
45
|
}
|
|
112
|
-
return _assert_this_initialized(self);
|
|
113
|
-
}
|
|
114
|
-
function _set_prototype_of(o, p) {
|
|
115
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
116
|
-
o.__proto__ = p;
|
|
117
|
-
return o;
|
|
118
|
-
};
|
|
119
|
-
return _set_prototype_of(o, p);
|
|
120
|
-
}
|
|
121
|
-
function _to_consumable_array(arr) {
|
|
122
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
123
|
-
}
|
|
124
|
-
function _type_of(obj) {
|
|
125
|
-
"@swc/helpers - typeof";
|
|
126
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
127
|
-
}
|
|
128
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
129
|
-
if (!o) return;
|
|
130
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
131
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
132
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
133
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
134
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
135
|
-
}
|
|
136
|
-
function _wrap_native_super(Class) {
|
|
137
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
138
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
139
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
140
|
-
if (typeof Class !== "function") {
|
|
141
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
142
|
-
}
|
|
143
|
-
if (typeof _cache !== "undefined") {
|
|
144
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
145
|
-
_cache.set(Class, Wrapper);
|
|
146
|
-
}
|
|
147
|
-
function Wrapper() {
|
|
148
|
-
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
149
|
-
}
|
|
150
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
151
|
-
constructor: {
|
|
152
|
-
value: Wrapper,
|
|
153
|
-
enumerable: false,
|
|
154
|
-
writable: true,
|
|
155
|
-
configurable: true
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
return _set_prototype_of(Wrapper, Class);
|
|
159
|
-
};
|
|
160
|
-
return _wrap_native_super(Class);
|
|
161
|
-
}
|
|
162
|
-
function _is_native_reflect_construct() {
|
|
163
|
-
try {
|
|
164
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
165
|
-
} catch (_) {}
|
|
166
|
-
return (_is_native_reflect_construct = function() {
|
|
167
|
-
return !!result;
|
|
168
|
-
})();
|
|
169
46
|
}
|
|
170
|
-
var ValidationErrorParagraph = /*#__PURE__*/ function(Element) {
|
|
171
|
-
_inherits(ValidationErrorParagraph, Element);
|
|
172
|
-
function ValidationErrorParagraph(selector, timeout) {
|
|
173
|
-
_class_call_check(this, ValidationErrorParagraph);
|
|
174
|
-
var _this;
|
|
175
|
-
_this = _call_super(this, ValidationErrorParagraph, [
|
|
176
|
-
selector
|
|
177
|
-
]);
|
|
178
|
-
_this.timeout = timeout;
|
|
179
|
-
return _this;
|
|
180
|
-
}
|
|
181
|
-
_create_class(ValidationErrorParagraph, [
|
|
182
|
-
{
|
|
183
|
-
key: "clearValidationError",
|
|
184
|
-
value: function clearValidationError() {
|
|
185
|
-
var html = _constants.EMPTY_STRING;
|
|
186
|
-
this.html(html);
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
key: "showValidationError",
|
|
191
|
-
value: function showValidationError(validationError) {
|
|
192
|
-
var _this = this;
|
|
193
|
-
var html = validationError; ///
|
|
194
|
-
this.html(html);
|
|
195
|
-
if (this.timeout !== null) {
|
|
196
|
-
clearTimeout(this.timeout);
|
|
197
|
-
}
|
|
198
|
-
this.timeout = setTimeout(function() {
|
|
199
|
-
_this.timemout = null;
|
|
200
|
-
_this.clearValidationError();
|
|
201
|
-
}, _constants.ERROR_DELAY);
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
key: "parentContext",
|
|
206
|
-
value: function parentContext() {
|
|
207
|
-
return {
|
|
208
|
-
showValidationError: this.showValidationError.bind(this)
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
], [
|
|
213
|
-
{
|
|
214
|
-
key: "fromClass",
|
|
215
|
-
value: function fromClass(Class, properties) {
|
|
216
|
-
for(var _len = arguments.length, remainingArguments = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
|
|
217
|
-
remainingArguments[_key - 2] = arguments[_key];
|
|
218
|
-
}
|
|
219
|
-
var _Element;
|
|
220
|
-
var timeout = null, validationErrorParagraph = (_Element = _easy.Element).fromClass.apply(_Element, [
|
|
221
|
-
Class,
|
|
222
|
-
properties,
|
|
223
|
-
timeout
|
|
224
|
-
].concat(_to_consumable_array(remainingArguments)));
|
|
225
|
-
return validationErrorParagraph;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
]);
|
|
229
|
-
return ValidationErrorParagraph;
|
|
230
|
-
}(_wrap_native_super(_easy.Element));
|
|
231
|
-
_define_property(ValidationErrorParagraph, "tagName", "p");
|
|
232
|
-
_define_property(ValidationErrorParagraph, "defaultProperties", {
|
|
233
|
-
className: "validation error"
|
|
234
|
-
});
|
|
235
47
|
|
|
236
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
48
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9leGFtcGxlL212Y0FwcGxpY2F0aW9uL3ZpZXcvcGFyYWdyYXBoL3ZhbGlkYXRpb25FcnJvci5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IHsgRWxlbWVudCB9IGZyb20gXCJlYXN5XCI7XG5cbmltcG9ydCB7IEVNUFRZX1NUUklORywgRVJST1JfREVMQVkgfSBmcm9tIFwiLi4vLi4vY29uc3RhbnRzXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFZhbGlkY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