@luftborn/custom-elements 1.1.44 → 1.4.1

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.
Files changed (247) hide show
  1. package/README.md +2 -2
  2. package/assets/style.css +277 -277
  3. package/azure-pipeline.yml +54 -0
  4. package/demo/index.html +585 -585
  5. package/demo/index.js +6109 -0
  6. package/demo/index.min.js +6110 -0
  7. package/demo/index.min.js.map +1 -0
  8. package/demo/index.ts +11 -11
  9. package/demo/old/index.html +586 -586
  10. package/demo/old/index.js +10849 -10849
  11. package/demo/old/index.min.js +10850 -10850
  12. package/demo/old/index.ts +10 -10
  13. package/dist/custom-form.d.ts +20 -20
  14. package/dist/custom-form.js +147 -146
  15. package/dist/custom-form.js.map +1 -1
  16. package/dist/elements/Address/AddressElement.d.ts +28 -28
  17. package/dist/elements/Address/AddressElement.js +206 -206
  18. package/dist/elements/BankField/BankFieldElement.d.ts +22 -22
  19. package/dist/elements/BankField/BankFieldElement.js +127 -127
  20. package/dist/elements/CPRElement/CPRElement.d.ts +14 -14
  21. package/dist/elements/CPRElement/CPRElement.js +82 -82
  22. package/dist/elements/CVRElement/CVRElement.d.ts +14 -14
  23. package/dist/elements/CVRElement/CVRElement.js +82 -82
  24. package/dist/elements/CheckBoxElement/CheckBoxElement.d.ts +14 -14
  25. package/dist/elements/CheckBoxElement/CheckBoxElement.js +96 -96
  26. package/dist/elements/CheckBoxElement/CheckBoxElement.js.map +1 -1
  27. package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.d.ts +12 -12
  28. package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js +82 -82
  29. package/dist/elements/DateField/DateFieldElement.d.ts +12 -12
  30. package/dist/elements/DateField/DateFieldElement.js +85 -85
  31. package/dist/elements/DropDownList/DropDownListElement.d.ts +14 -14
  32. package/dist/elements/DropDownList/DropDownListElement.js +93 -93
  33. package/dist/elements/DropDownList/DropDownListElement.js.map +1 -1
  34. package/dist/elements/Elements.d.ts +18 -18
  35. package/dist/elements/Elements.js +37 -37
  36. package/dist/elements/EmailField/EmailFieldElement.d.ts +13 -13
  37. package/dist/elements/EmailField/EmailFieldElement.js +83 -83
  38. package/dist/elements/FileField/FileFieldElement.d.ts +15 -12
  39. package/dist/elements/FileField/FileFieldElement.js +103 -83
  40. package/dist/elements/FileField/FileFieldElement.js.map +1 -1
  41. package/dist/elements/IdentificationElement/IdentificationElement.d.ts +18 -18
  42. package/dist/elements/IdentificationElement/IdentificationElement.js +94 -94
  43. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.d.ts +16 -16
  44. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js +114 -108
  45. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js.map +1 -1
  46. package/dist/elements/NumericField/NumericFieldElement.d.ts +12 -12
  47. package/dist/elements/NumericField/NumericFieldElement.js +91 -91
  48. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.d.ts +14 -14
  49. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +99 -99
  50. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +1 -1
  51. package/dist/elements/TextAreaElement/TextAreaElement.d.ts +12 -12
  52. package/dist/elements/TextAreaElement/TextAreaElement.js +79 -79
  53. package/dist/elements/TextField/TextFieldElement.d.ts +12 -12
  54. package/dist/elements/TextField/TextFieldElement.js +79 -79
  55. package/dist/elements/TypeAhead/TypeAheadElement.d.ts +24 -24
  56. package/dist/elements/TypeAhead/TypeAheadElement.js +209 -209
  57. package/dist/framework/CustomEvents.d.ts +21 -21
  58. package/dist/framework/CustomEvents.js +47 -47
  59. package/dist/framework/CustomInputElement.d.ts +50 -50
  60. package/dist/framework/CustomInputElement.js +258 -257
  61. package/dist/framework/CustomInputElement.js.map +1 -1
  62. package/dist/framework/Language/Languages/Base/BaseDictionary.d.ts +4 -4
  63. package/dist/framework/Language/Languages/Base/BaseDictionary.js +20 -20
  64. package/dist/framework/Language/Languages/CzechDictionary.d.ts +4 -0
  65. package/dist/framework/Language/Languages/CzechDictionary.js +40 -0
  66. package/dist/framework/Language/Languages/CzechDictionary.js.map +1 -0
  67. package/dist/framework/Language/Languages/DanishDictionary.d.ts +4 -4
  68. package/dist/framework/Language/Languages/DanishDictionary.js +39 -39
  69. package/dist/framework/Language/Languages/DutchDictionary.d.ts +4 -0
  70. package/dist/framework/Language/Languages/DutchDictionary.js +40 -0
  71. package/dist/framework/Language/Languages/DutchDictionary.js.map +1 -0
  72. package/dist/framework/Language/Languages/EnglishDictionary.d.ts +4 -4
  73. package/dist/framework/Language/Languages/EnglishDictionary.js +39 -39
  74. package/dist/framework/Language/Languages/EstonianDictionary.d.ts +4 -0
  75. package/dist/framework/Language/Languages/EstonianDictionary.js +40 -0
  76. package/dist/framework/Language/Languages/EstonianDictionary.js.map +1 -0
  77. package/dist/framework/Language/Languages/FinnishDictionary.d.ts +4 -0
  78. package/dist/framework/Language/Languages/FinnishDictionary.js +40 -0
  79. package/dist/framework/Language/Languages/FinnishDictionary.js.map +1 -0
  80. package/dist/framework/Language/Languages/FrenchDictionary.d.ts +4 -0
  81. package/dist/framework/Language/Languages/FrenchDictionary.js +40 -0
  82. package/dist/framework/Language/Languages/FrenchDictionary.js.map +1 -0
  83. package/dist/framework/Language/Languages/GermanDictionary.d.ts +4 -0
  84. package/dist/framework/Language/Languages/GermanDictionary.js +40 -0
  85. package/dist/framework/Language/Languages/GermanDictionary.js.map +1 -0
  86. package/dist/framework/Language/Languages/GreekDictionary.d.ts +4 -0
  87. package/dist/framework/Language/Languages/GreekDictionary.js +40 -0
  88. package/dist/framework/Language/Languages/GreekDictionary.js.map +1 -0
  89. package/dist/framework/Language/Languages/HungarianDictionary.d.ts +4 -0
  90. package/dist/framework/Language/Languages/HungarianDictionary.js +40 -0
  91. package/dist/framework/Language/Languages/HungarianDictionary.js.map +1 -0
  92. package/dist/framework/Language/Languages/IcelandicDictionary.d.ts +4 -0
  93. package/dist/framework/Language/Languages/IcelandicDictionary.js +40 -0
  94. package/dist/framework/Language/Languages/IcelandicDictionary.js.map +1 -0
  95. package/dist/framework/Language/Languages/ItalianDictionary.d.ts +4 -0
  96. package/dist/framework/Language/Languages/ItalianDictionary.js +40 -0
  97. package/dist/framework/Language/Languages/ItalianDictionary.js.map +1 -0
  98. package/dist/framework/Language/Languages/LatvianDictionary.d.ts +4 -0
  99. package/dist/framework/Language/Languages/LatvianDictionary.js +40 -0
  100. package/dist/framework/Language/Languages/LatvianDictionary.js.map +1 -0
  101. package/dist/framework/Language/Languages/LituanianDictionary.d.ts +4 -0
  102. package/dist/framework/Language/Languages/LituanianDictionary.js +40 -0
  103. package/dist/framework/Language/Languages/LituanianDictionary.js.map +1 -0
  104. package/dist/framework/Language/Languages/NorwegianDictionary.d.ts +4 -0
  105. package/dist/framework/Language/Languages/NorwegianDictionary.js +40 -0
  106. package/dist/framework/Language/Languages/NorwegianDictionary.js.map +1 -0
  107. package/dist/framework/Language/Languages/PolishDictionary.d.ts +4 -0
  108. package/dist/framework/Language/Languages/PolishDictionary.js +40 -0
  109. package/dist/framework/Language/Languages/PolishDictionary.js.map +1 -0
  110. package/dist/framework/Language/Languages/PortugueseDictionary.d.ts +4 -0
  111. package/dist/framework/Language/Languages/PortugueseDictionary.js +40 -0
  112. package/dist/framework/Language/Languages/PortugueseDictionary.js.map +1 -0
  113. package/dist/framework/Language/Languages/SpanishDictionary.d.ts +4 -0
  114. package/dist/framework/Language/Languages/SpanishDictionary.js +40 -0
  115. package/dist/framework/Language/Languages/SpanishDictionary.js.map +1 -0
  116. package/dist/framework/Language/Languages/SwedishDictionary.d.ts +4 -0
  117. package/dist/framework/Language/Languages/SwedishDictionary.js +40 -0
  118. package/dist/framework/Language/Languages/SwedishDictionary.js.map +1 -0
  119. package/dist/framework/Language/Translator.d.ts +23 -6
  120. package/dist/framework/Language/Translator.js +115 -32
  121. package/dist/framework/Language/Translator.js.map +1 -1
  122. package/dist/framework/Models/OptionWithDescription.d.ts +6 -6
  123. package/dist/framework/Models/OptionWithDescription.js +9 -9
  124. package/dist/framework/Polyfills/getAttributeNamesPolyfill.d.ts +1 -1
  125. package/dist/framework/Polyfills/getAttributeNamesPolyfill.js +17 -17
  126. package/dist/framework/Translations/CaseConverter.d.ts +5 -5
  127. package/dist/framework/Translations/CaseConverter.js +50 -50
  128. package/dist/framework/Utilities/ArrayUtil.d.ts +6 -0
  129. package/dist/framework/Utilities/ArrayUtil.js +37 -0
  130. package/dist/framework/Utilities/ArrayUtil.js.map +1 -0
  131. package/dist/framework/Utilities/DomUtil.d.ts +21 -0
  132. package/dist/framework/Utilities/DomUtil.js +102 -0
  133. package/dist/framework/Utilities/DomUtil.js.map +1 -0
  134. package/dist/framework/Utilities/DomUtility.d.ts +3 -3
  135. package/dist/framework/Utilities/DomUtility.js +12 -12
  136. package/dist/framework/Utilities/MakeRequest.d.ts +8 -0
  137. package/dist/framework/Utilities/MakeRequest.js +49 -0
  138. package/dist/framework/Utilities/MakeRequest.js.map +1 -0
  139. package/dist/framework/Utilities/StringUtil.d.ts +4 -0
  140. package/dist/framework/Utilities/StringUtil.js +17 -0
  141. package/dist/framework/Utilities/StringUtil.js.map +1 -0
  142. package/dist/framework/Utilities/ViewportUtil.d.ts +8 -0
  143. package/dist/framework/Utilities/ViewportUtil.js +43 -0
  144. package/dist/framework/Utilities/ViewportUtil.js.map +1 -0
  145. package/dist/framework/Utilities/debouncer.d.ts +8 -8
  146. package/dist/framework/Utilities/debouncer.js +51 -51
  147. package/dist/framework/Validation/IValidator.interface.d.ts +3 -3
  148. package/dist/framework/Validation/IValidator.interface.js +2 -2
  149. package/dist/framework/Validation/Validators/BankAccount.d.ts +4 -4
  150. package/dist/framework/Validation/Validators/BankAccount.js +12 -12
  151. package/dist/framework/Validation/Validators/BankAccountRegistrationNumber.d.ts +4 -4
  152. package/dist/framework/Validation/Validators/BankAccountRegistrationNumber.js +12 -12
  153. package/dist/framework/Validation/Validators/BankIdNorway.d.ts +5 -5
  154. package/dist/framework/Validation/Validators/BankIdNorway.js +21 -21
  155. package/dist/framework/Validation/Validators/BankIdSweden.d.ts +5 -5
  156. package/dist/framework/Validation/Validators/BankIdSweden.js +21 -21
  157. package/dist/framework/Validation/Validators/CPR.d.ts +9 -9
  158. package/dist/framework/Validation/Validators/CPR.js +75 -75
  159. package/dist/framework/Validation/Validators/CVR.d.ts +5 -5
  160. package/dist/framework/Validation/Validators/CVR.js +30 -30
  161. package/dist/framework/custom-element.decorator.d.ts +9 -9
  162. package/dist/framework/custom-element.decorator.js +51 -51
  163. package/dist/index.d.ts +7 -7
  164. package/dist/index.js +14 -14
  165. package/node_modules/@webcomponents/webcomponentsjs/CHANGELOG.md +15 -0
  166. package/node_modules/@webcomponents/webcomponentsjs/README.md +13 -0
  167. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js +31 -31
  168. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js.map +1 -1
  169. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js +15 -13
  170. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js.map +1 -1
  171. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_js.js.map +1 -1
  172. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js +237 -223
  173. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js.map +1 -1
  174. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js +188 -176
  175. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js.map +1 -1
  176. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js +155 -144
  177. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js.map +1 -1
  178. package/node_modules/@webcomponents/webcomponentsjs/package.json +31 -64
  179. package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-pf_dom-index.js +2 -0
  180. package/node_modules/@webcomponents/webcomponentsjs/src/platform/event-listener-options.js +122 -0
  181. package/node_modules/@webcomponents/webcomponentsjs/src/platform/toggle-attribute.js +39 -0
  182. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.d.ts +1 -0
  183. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js +239 -225
  184. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js.map +1 -1
  185. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js +35 -3
  186. package/package.json +38 -39
  187. package/src/custom-form.ts +140 -139
  188. package/src/elements/Address/AddressElement.ts +216 -216
  189. package/src/elements/BankField/BankFieldElement.ts +127 -127
  190. package/src/elements/CPRElement/CPRElement.ts +74 -74
  191. package/src/elements/CVRElement/CVRElement.ts +75 -75
  192. package/src/elements/CheckBoxElement/CheckBoxElement.ts +99 -99
  193. package/src/elements/CustomRegularExpression/CustomRegularExpressionElement.ts +75 -75
  194. package/src/elements/DateField/DateFieldElement.ts +78 -78
  195. package/src/elements/DropDownList/DropDownListElement.ts +100 -100
  196. package/src/elements/Elements.ts +37 -37
  197. package/src/elements/EmailField/EmailFieldElement.ts +78 -78
  198. package/src/elements/FileField/FileFieldElement.ts +96 -76
  199. package/src/elements/IdentificationElement/IdentificationElement.ts +104 -104
  200. package/src/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.ts +116 -111
  201. package/src/elements/NumericField/NumericFieldElement.ts +84 -84
  202. package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +103 -103
  203. package/src/elements/TextAreaElement/TextAreaElement.ts +72 -72
  204. package/src/elements/TextField/TextFieldElement.ts +72 -72
  205. package/src/elements/TypeAhead/TypeAheadElement.ts +248 -248
  206. package/src/framework/CustomEvents.ts +47 -47
  207. package/src/framework/CustomInputElement.ts +277 -276
  208. package/src/framework/Language/Languages/Base/BaseDictionary.ts +15 -15
  209. package/src/framework/Language/Languages/CzechDictionary.ts +18 -0
  210. package/src/framework/Language/Languages/DanishDictionary.ts +17 -17
  211. package/src/framework/Language/Languages/DutchDictionary.ts +18 -0
  212. package/src/framework/Language/Languages/EnglishDictionary.ts +18 -18
  213. package/src/framework/Language/Languages/EstonianDictionary.ts +18 -0
  214. package/src/framework/Language/Languages/FinnishDictionary.ts +18 -0
  215. package/src/framework/Language/Languages/FrenchDictionary.ts +18 -0
  216. package/src/framework/Language/Languages/GermanDictionary.ts +18 -0
  217. package/src/framework/Language/Languages/GreekDictionary.ts +18 -0
  218. package/src/framework/Language/Languages/HungarianDictionary.ts +18 -0
  219. package/src/framework/Language/Languages/IcelandicDictionary.ts +18 -0
  220. package/src/framework/Language/Languages/ItalianDictionary.ts +18 -0
  221. package/src/framework/Language/Languages/LatvianDictionary.ts +18 -0
  222. package/src/framework/Language/Languages/LituanianDictionary.ts +18 -0
  223. package/src/framework/Language/Languages/NorwegianDictionary.ts +18 -0
  224. package/src/framework/Language/Languages/PolishDictionary.ts +18 -0
  225. package/src/framework/Language/Languages/PortugueseDictionary.ts +18 -0
  226. package/src/framework/Language/Languages/SpanishDictionary.ts +18 -0
  227. package/src/framework/Language/Languages/SwedishDictionary.ts +18 -0
  228. package/src/framework/Language/Translator.ts +110 -26
  229. package/src/framework/Models/OptionWithDescription.ts +8 -8
  230. package/src/framework/Polyfills/getAttributeNamesPolyfill.ts +13 -13
  231. package/src/framework/Translations/CaseConverter.ts +43 -43
  232. package/src/framework/Utilities/ArrayUtil.ts +31 -0
  233. package/src/framework/Utilities/DomUtil.ts +117 -0
  234. package/src/framework/Utilities/DomUtility.ts +6 -6
  235. package/src/framework/Utilities/MakeRequest.ts +47 -0
  236. package/src/framework/Utilities/StringUtil.ts +9 -0
  237. package/src/framework/Utilities/ViewportUtil.ts +46 -0
  238. package/src/framework/Utilities/debouncer.ts +66 -66
  239. package/src/framework/Validation/IValidator.interface.ts +3 -3
  240. package/src/framework/Validation/Validators/BankAccount.ts +7 -7
  241. package/src/framework/Validation/Validators/BankAccountRegistrationNumber.ts +8 -8
  242. package/src/framework/Validation/Validators/BankIdNorway.ts +21 -21
  243. package/src/framework/Validation/Validators/BankIdSweden.ts +21 -21
  244. package/src/framework/Validation/Validators/CPR.ts +82 -82
  245. package/src/framework/Validation/Validators/CVR.ts +27 -27
  246. package/src/framework/custom-element.decorator.ts +57 -57
  247. package/src/index.ts +12 -12
@@ -1,83 +1,83 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.CVRElement = void 0;
25
- var custom_element_decorator_1 = require("../../framework/custom-element.decorator");
26
- var CustomInputElement_1 = require("../../framework/CustomInputElement");
27
- var CustomEvents_1 = require("../../framework/CustomEvents");
28
- var CVR_1 = require("../../framework/Validation/Validators/CVR");
29
- var CVRElement = /** @class */ (function (_super) {
30
- __extends(CVRElement, _super);
31
- function CVRElement() {
32
- var _this = _super.call(this) || this;
33
- _this.validator = new CVR_1.default();
34
- return _this;
35
- }
36
- Object.defineProperty(CVRElement.prototype, "value", {
37
- get: function () {
38
- return "" + this.text.value;
39
- },
40
- set: function (value) {
41
- this.text.value = value;
42
- },
43
- enumerable: false,
44
- configurable: true
45
- });
46
- Object.defineProperty(CVRElement.prototype, "valid", {
47
- get: function () {
48
- return this.validator.isSatisfiedBy(this.value, !this.required);
49
- },
50
- enumerable: false,
51
- configurable: true
52
- });
53
- CVRElement.prototype.connectedCallback = function () {
54
- _super.prototype.connectedCallback.call(this);
55
- };
56
- CVRElement.prototype.initChildInputs = function () {
57
- this.text = _super.prototype.getChildInput.call(this, '#cvr-field');
58
- this.text.addEventListener('change', this.change.bind(this));
59
- if (this.required) {
60
- this.text.setAttribute('required', '');
61
- }
62
- };
63
- // events
64
- CVRElement.prototype.change = function ($event) {
65
- this.touched = true;
66
- this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
67
- };
68
- CVRElement.prototype.validate = function () {
69
- this.valid;
70
- this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
71
- };
72
- CVRElement = __decorate([
73
- (0, custom_element_decorator_1.default)({
74
- selector: 'cvr-element',
75
- template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='cvr-field' placeholder='SSSSSSSS'/>\n\t\t\t</div>",
76
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
77
- useShadow: true,
78
- })
79
- ], CVRElement);
80
- return CVRElement;
81
- }(CustomInputElement_1.CustomInputElement));
82
- exports.CVRElement = CVRElement;
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
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.CVRElement = void 0;
25
+ var custom_element_decorator_1 = require("../../framework/custom-element.decorator");
26
+ var CustomInputElement_1 = require("../../framework/CustomInputElement");
27
+ var CustomEvents_1 = require("../../framework/CustomEvents");
28
+ var CVR_1 = require("../../framework/Validation/Validators/CVR");
29
+ var CVRElement = /** @class */ (function (_super) {
30
+ __extends(CVRElement, _super);
31
+ function CVRElement() {
32
+ var _this = _super.call(this) || this;
33
+ _this.validator = new CVR_1.default();
34
+ return _this;
35
+ }
36
+ Object.defineProperty(CVRElement.prototype, "value", {
37
+ get: function () {
38
+ return "" + this.text.value;
39
+ },
40
+ set: function (value) {
41
+ this.text.value = value;
42
+ },
43
+ enumerable: false,
44
+ configurable: true
45
+ });
46
+ Object.defineProperty(CVRElement.prototype, "valid", {
47
+ get: function () {
48
+ return this.validator.isSatisfiedBy(this.value, !this.required);
49
+ },
50
+ enumerable: false,
51
+ configurable: true
52
+ });
53
+ CVRElement.prototype.connectedCallback = function () {
54
+ _super.prototype.connectedCallback.call(this);
55
+ };
56
+ CVRElement.prototype.initChildInputs = function () {
57
+ this.text = _super.prototype.getChildInput.call(this, '#cvr-field');
58
+ this.text.addEventListener('change', this.change.bind(this));
59
+ if (this.required) {
60
+ this.text.setAttribute('required', '');
61
+ }
62
+ };
63
+ // events
64
+ CVRElement.prototype.change = function ($event) {
65
+ this.touched = true;
66
+ this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
67
+ };
68
+ CVRElement.prototype.validate = function () {
69
+ this.valid;
70
+ this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
71
+ };
72
+ CVRElement = __decorate([
73
+ (0, custom_element_decorator_1.default)({
74
+ selector: 'cvr-element',
75
+ template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='cvr-field' placeholder='SSSSSSSS'/>\n\t\t\t</div>",
76
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
77
+ useShadow: true,
78
+ })
79
+ ], CVRElement);
80
+ return CVRElement;
81
+ }(CustomInputElement_1.CustomInputElement));
82
+ exports.CVRElement = CVRElement;
83
83
  //# sourceMappingURL=CVRElement.js.map
@@ -1,14 +1,14 @@
1
- import { CustomInputElement } from '../../framework/CustomInputElement';
2
- export declare class CheckBoxElement extends CustomInputElement {
3
- checkbox: HTMLInputElement[];
4
- checkboxTemplate: string;
5
- constructor();
6
- get value(): string[];
7
- set value(values: string[]);
8
- get valid(): boolean;
9
- connectedCallback(): void;
10
- initChildInputs(): void;
11
- private addCheckBoxes;
12
- change($event: any): void;
13
- validate(): void;
14
- }
1
+ import { CustomInputElement } from '../../framework/CustomInputElement';
2
+ export declare class CheckBoxElement extends CustomInputElement {
3
+ checkbox: HTMLInputElement[];
4
+ checkboxTemplate: string;
5
+ constructor();
6
+ get value(): string[];
7
+ set value(values: string[]);
8
+ get valid(): boolean;
9
+ connectedCallback(): void;
10
+ initChildInputs(): void;
11
+ private addCheckBoxes;
12
+ change($event: any): void;
13
+ validate(): void;
14
+ }
@@ -1,97 +1,97 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.CheckBoxElement = void 0;
25
- var custom_element_decorator_1 = require("../../framework/custom-element.decorator");
26
- var CustomInputElement_1 = require("../../framework/CustomInputElement");
27
- var CustomEvents_1 = require("../../framework/CustomEvents");
28
- var utilities_1 = require("@luftborn/utilities");
29
- var CheckBoxElement = /** @class */ (function (_super) {
30
- __extends(CheckBoxElement, _super);
31
- function CheckBoxElement() {
32
- var _this = _super.call(this) || this;
33
- _this.checkboxTemplate = "\n\t<div class='checkbox'>\n\t\t<input type='checkbox' name='{0}' value=\"{1}\" id=\"{2}\"/>\n\t\t<label for=\"{2}\">{1}</label>\n\t</div>";
34
- return _this;
35
- }
36
- Object.defineProperty(CheckBoxElement.prototype, "value", {
37
- get: function () {
38
- return this.checkbox.filter(function (c) { return c.checked; }).map(function (c) { return c.value; });
39
- },
40
- set: function (values) {
41
- // this.checkbox.value = value;
42
- },
43
- enumerable: false,
44
- configurable: true
45
- });
46
- Object.defineProperty(CheckBoxElement.prototype, "valid", {
47
- get: function () {
48
- if (this.required) {
49
- return this.value.length > 0;
50
- }
51
- else {
52
- return true;
53
- }
54
- },
55
- enumerable: false,
56
- configurable: true
57
- });
58
- CheckBoxElement.prototype.connectedCallback = function () {
59
- _super.prototype.connectedCallback.call(this);
60
- };
61
- CheckBoxElement.prototype.initChildInputs = function () {
62
- var _this = this;
63
- this.addCheckBoxes();
64
- this.checkbox = _super.prototype.getChildInputs.call(this, "[name='" + this.name + "']");
65
- this.checkbox.forEach(function (c) {
66
- return c.addEventListener('change', _this.change.bind(_this));
67
- });
68
- };
69
- CheckBoxElement.prototype.addCheckBoxes = function () {
70
- var _this = this;
71
- var wrapper = _super.prototype.getChildElement.call(this, '.wrapper');
72
- wrapper.innerHTML = "";
73
- this.options.forEach(function (element, index) {
74
- wrapper.insertAdjacentHTML('beforeend', utilities_1.StringUtil.StringFormat(_this.checkboxTemplate, _this.name, element, _this.name + "-" + index));
75
- });
76
- };
77
- // events
78
- CheckBoxElement.prototype.change = function ($event) {
79
- this.touched = true;
80
- this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
81
- };
82
- CheckBoxElement.prototype.validate = function () {
83
- this.valid;
84
- this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
85
- };
86
- CheckBoxElement = __decorate([
87
- (0, custom_element_decorator_1.default)({
88
- selector: 'checkbox-element',
89
- template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t</div>",
90
- style: "\n\t\t\t:host{\n\t\t\t\twidth:100%;\n\t\t\t}\n\t\t\t.checkbox {\n\t\t\t\twidth: auto;\n\t\t\t\tmargin: auto 3px;\n\t\t\t\tcolor: rgba(72, 72, 72, 0.75);\n\t\t\t\tfont-size: 13px;\n\t\t\t}\n\t\t\tinput[type='checkbox']{\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: auto !important;\n\t\t\t\tborder: none;\n\t\t\t\tbackground-color: #f1f4ff;\n\t\t\t\tmargin: 2px;\n\t\t\t\tresize: none;\n\t\t\t}\n\t\t",
91
- useShadow: true,
92
- })
93
- ], CheckBoxElement);
94
- return CheckBoxElement;
95
- }(CustomInputElement_1.CustomInputElement));
96
- exports.CheckBoxElement = CheckBoxElement;
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
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.CheckBoxElement = void 0;
25
+ var custom_element_decorator_1 = require("../../framework/custom-element.decorator");
26
+ var CustomInputElement_1 = require("../../framework/CustomInputElement");
27
+ var CustomEvents_1 = require("../../framework/CustomEvents");
28
+ var StringUtil_1 = require("../../framework/Utilities/StringUtil");
29
+ var CheckBoxElement = /** @class */ (function (_super) {
30
+ __extends(CheckBoxElement, _super);
31
+ function CheckBoxElement() {
32
+ var _this = _super.call(this) || this;
33
+ _this.checkboxTemplate = "\n\t<div class='checkbox'>\n\t\t<input type='checkbox' name='{0}' value=\"{1}\" id=\"{2}\"/>\n\t\t<label for=\"{2}\">{1}</label>\n\t</div>";
34
+ return _this;
35
+ }
36
+ Object.defineProperty(CheckBoxElement.prototype, "value", {
37
+ get: function () {
38
+ return this.checkbox.filter(function (c) { return c.checked; }).map(function (c) { return c.value; });
39
+ },
40
+ set: function (values) {
41
+ // this.checkbox.value = value;
42
+ },
43
+ enumerable: false,
44
+ configurable: true
45
+ });
46
+ Object.defineProperty(CheckBoxElement.prototype, "valid", {
47
+ get: function () {
48
+ if (this.required) {
49
+ return this.value.length > 0;
50
+ }
51
+ else {
52
+ return true;
53
+ }
54
+ },
55
+ enumerable: false,
56
+ configurable: true
57
+ });
58
+ CheckBoxElement.prototype.connectedCallback = function () {
59
+ _super.prototype.connectedCallback.call(this);
60
+ };
61
+ CheckBoxElement.prototype.initChildInputs = function () {
62
+ var _this = this;
63
+ this.addCheckBoxes();
64
+ this.checkbox = _super.prototype.getChildInputs.call(this, "[name='" + this.name + "']");
65
+ this.checkbox.forEach(function (c) {
66
+ return c.addEventListener('change', _this.change.bind(_this));
67
+ });
68
+ };
69
+ CheckBoxElement.prototype.addCheckBoxes = function () {
70
+ var _this = this;
71
+ var wrapper = _super.prototype.getChildElement.call(this, '.wrapper');
72
+ wrapper.innerHTML = "";
73
+ this.options.forEach(function (element, index) {
74
+ wrapper.insertAdjacentHTML('beforeend', StringUtil_1.StringUtil.StringFormat(_this.checkboxTemplate, _this.name, element, _this.name + "-" + index));
75
+ });
76
+ };
77
+ // events
78
+ CheckBoxElement.prototype.change = function ($event) {
79
+ this.touched = true;
80
+ this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
81
+ };
82
+ CheckBoxElement.prototype.validate = function () {
83
+ this.valid;
84
+ this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
85
+ };
86
+ CheckBoxElement = __decorate([
87
+ (0, custom_element_decorator_1.default)({
88
+ selector: 'checkbox-element',
89
+ template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t</div>",
90
+ style: "\n\t\t\t:host{\n\t\t\t\twidth:100%;\n\t\t\t}\n\t\t\t.checkbox {\n\t\t\t\twidth: auto;\n\t\t\t\tmargin: auto 3px;\n\t\t\t\tcolor: rgba(72, 72, 72, 0.75);\n\t\t\t\tfont-size: 13px;\n\t\t\t}\n\t\t\tinput[type='checkbox']{\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: auto !important;\n\t\t\t\tborder: none;\n\t\t\t\tbackground-color: #f1f4ff;\n\t\t\t\tmargin: 2px;\n\t\t\t\tresize: none;\n\t\t\t}\n\t\t",
91
+ useShadow: true,
92
+ })
93
+ ], CheckBoxElement);
94
+ return CheckBoxElement;
95
+ }(CustomInputElement_1.CustomInputElement));
96
+ exports.CheckBoxElement = CheckBoxElement;
97
97
  //# sourceMappingURL=CheckBoxElement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckBoxElement.js","sourceRoot":"","sources":["../../../src/elements/CheckBoxElement/CheckBoxElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,iDAAiD;AA4BjD;IAAqC,mCAAkB;IAQtD;QAAA,YACC,iBAAO,SACP;QARD,sBAAgB,GAAG,4IAIZ,CAAC;;IAIR,CAAC;IAED,sBAAI,kCAAK;aAAT;YACC,OAAO,IAAI,CAAC,QAAQ,C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I,CAAC,KAAK,CAAC;QACX,IAAI,CAAC,UAAU,CAAC,IAAI,CACnB,IAAI,qCAAsB,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAClD,CAAC;IACH,CAAC;IAlEW,eAAe;QA1B3B,IAAA,kCAAa,EAAC;YACd,QAAQ,EAAE,kBAAkB;YAC5B,QAAQ,EAAE,+CAED;YACT,KAAK,EAAE,qZAkBL;YACF,SAAS,EAAE,IAAI;SACf,CAAC;OACW,eAAe,CAmE3B;IAAD,sBAAC;CAAA,AAnED,CAAqC,uCAAkB,GAmEtD;AAnEY,0CAAe"}
@@ -1,12 +1,12 @@
1
- import { CustomInputElement } from '../../framework/CustomInputElement';
2
- export declare class CustomRegularExpressionElement extends CustomInputElement {
3
- text: HTMLInputElement;
4
- constructor();
5
- get value(): string;
6
- set value(value: string);
7
- get valid(): boolean;
8
- connectedCallback(): void;
9
- initChildInputs(): void;
10
- change($event: any): void;
11
- validate(): void;
12
- }
1
+ import { CustomInputElement } from '../../framework/CustomInputElement';
2
+ export declare class CustomRegularExpressionElement extends CustomInputElement {
3
+ text: HTMLInputElement;
4
+ constructor();
5
+ get value(): string;
6
+ set value(value: string);
7
+ get valid(): boolean;
8
+ connectedCallback(): void;
9
+ initChildInputs(): void;
10
+ change($event: any): void;
11
+ validate(): void;
12
+ }
@@ -1,83 +1,83 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.CustomRegularExpressionElement = void 0;
25
- var custom_element_decorator_1 = require("../../framework/custom-element.decorator");
26
- var CustomInputElement_1 = require("../../framework/CustomInputElement");
27
- var CustomEvents_1 = require("../../framework/CustomEvents");
28
- var CustomRegularExpressionElement = /** @class */ (function (_super) {
29
- __extends(CustomRegularExpressionElement, _super);
30
- function CustomRegularExpressionElement() {
31
- return _super.call(this) || this;
32
- }
33
- Object.defineProperty(CustomRegularExpressionElement.prototype, "value", {
34
- get: function () {
35
- return "" + this.text.value;
36
- },
37
- set: function (value) {
38
- this.text.value = value;
39
- },
40
- enumerable: false,
41
- configurable: true
42
- });
43
- Object.defineProperty(CustomRegularExpressionElement.prototype, "valid", {
44
- get: function () {
45
- return this.text.validity.valid;
46
- },
47
- enumerable: false,
48
- configurable: true
49
- });
50
- CustomRegularExpressionElement.prototype.connectedCallback = function () {
51
- _super.prototype.connectedCallback.call(this);
52
- };
53
- CustomRegularExpressionElement.prototype.initChildInputs = function () {
54
- this.text = _super.prototype.getChildInput.call(this, '#regex-field');
55
- this.text.addEventListener('change', this.change.bind(this));
56
- if (this.required) {
57
- this.text.setAttribute('required', '');
58
- }
59
- if (this.customValue) {
60
- this.text.setAttribute('pattern', this.customValue);
61
- }
62
- };
63
- // events
64
- CustomRegularExpressionElement.prototype.change = function ($event) {
65
- this.touched = true;
66
- this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
67
- };
68
- CustomRegularExpressionElement.prototype.validate = function () {
69
- this.valid;
70
- this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
71
- };
72
- CustomRegularExpressionElement = __decorate([
73
- (0, custom_element_decorator_1.default)({
74
- selector: 'regex-element',
75
- template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='regex-field'/>\n\t\t\t</div>",
76
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
77
- useShadow: true,
78
- })
79
- ], CustomRegularExpressionElement);
80
- return CustomRegularExpressionElement;
81
- }(CustomInputElement_1.CustomInputElement));
82
- exports.CustomRegularExpressionElement = CustomRegularExpressionElement;
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
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.CustomRegularExpressionElement = void 0;
25
+ var custom_element_decorator_1 = require("../../framework/custom-element.decorator");
26
+ var CustomInputElement_1 = require("../../framework/CustomInputElement");
27
+ var CustomEvents_1 = require("../../framework/CustomEvents");
28
+ var CustomRegularExpressionElement = /** @class */ (function (_super) {
29
+ __extends(CustomRegularExpressionElement, _super);
30
+ function CustomRegularExpressionElement() {
31
+ return _super.call(this) || this;
32
+ }
33
+ Object.defineProperty(CustomRegularExpressionElement.prototype, "value", {
34
+ get: function () {
35
+ return "" + this.text.value;
36
+ },
37
+ set: function (value) {
38
+ this.text.value = value;
39
+ },
40
+ enumerable: false,
41
+ configurable: true
42
+ });
43
+ Object.defineProperty(CustomRegularExpressionElement.prototype, "valid", {
44
+ get: function () {
45
+ return this.text.validity.valid;
46
+ },
47
+ enumerable: false,
48
+ configurable: true
49
+ });
50
+ CustomRegularExpressionElement.prototype.connectedCallback = function () {
51
+ _super.prototype.connectedCallback.call(this);
52
+ };
53
+ CustomRegularExpressionElement.prototype.initChildInputs = function () {
54
+ this.text = _super.prototype.getChildInput.call(this, '#regex-field');
55
+ this.text.addEventListener('change', this.change.bind(this));
56
+ if (this.required) {
57
+ this.text.setAttribute('required', '');
58
+ }
59
+ if (this.customValue) {
60
+ this.text.setAttribute('pattern', this.customValue);
61
+ }
62
+ };
63
+ // events
64
+ CustomRegularExpressionElement.prototype.change = function ($event) {
65
+ this.touched = true;
66
+ this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
67
+ };
68
+ CustomRegularExpressionElement.prototype.validate = function () {
69
+ this.valid;
70
+ this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
71
+ };
72
+ CustomRegularExpressionElement = __decorate([
73
+ (0, custom_element_decorator_1.default)({
74
+ selector: 'regex-element',
75
+ template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='regex-field'/>\n\t\t\t</div>",
76
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
77
+ useShadow: true,
78
+ })
79
+ ], CustomRegularExpressionElement);
80
+ return CustomRegularExpressionElement;
81
+ }(CustomInputElement_1.CustomInputElement));
82
+ exports.CustomRegularExpressionElement = CustomRegularExpressionElement;
83
83
  //# sourceMappingURL=CustomRegularExpressionElement.js.map
@@ -1,12 +1,12 @@
1
- import { CustomInputElement } from '../../framework/CustomInputElement';
2
- export declare class DateFieldElement extends CustomInputElement {
3
- date: HTMLInputElement;
4
- constructor();
5
- get value(): string;
6
- set value(value: string);
7
- get valid(): boolean;
8
- connectedCallback(): void;
9
- initChildInputs(): void;
10
- change($event: any): void;
11
- validate(): void;
12
- }
1
+ import { CustomInputElement } from '../../framework/CustomInputElement';
2
+ export declare class DateFieldElement extends CustomInputElement {
3
+ date: HTMLInputElement;
4
+ constructor();
5
+ get value(): string;
6
+ set value(value: string);
7
+ get valid(): boolean;
8
+ connectedCallback(): void;
9
+ initChildInputs(): void;
10
+ change($event: any): void;
11
+ validate(): void;
12
+ }