@luftborn/custom-elements 1.1.41 → 1.1.42

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 (170) hide show
  1. package/demo/index.html +2 -2
  2. package/package.json +2 -2
  3. package/demo/index.js +0 -6427
  4. package/demo/index.min.js +0 -6428
  5. package/demo/index.min.js.map +0 -1
  6. package/dist/custom-form.d.ts +0 -20
  7. package/dist/custom-form.js +0 -147
  8. package/dist/custom-form.js.map +0 -1
  9. package/dist/elements/Address/AddressElement.d.ts +0 -28
  10. package/dist/elements/Address/AddressElement.js +0 -207
  11. package/dist/elements/Address/AddressElement.js.map +0 -1
  12. package/dist/elements/BankField/BankFieldElement.d.ts +0 -22
  13. package/dist/elements/BankField/BankFieldElement.js +0 -128
  14. package/dist/elements/BankField/BankFieldElement.js.map +0 -1
  15. package/dist/elements/CPRElement/CPRElement.d.ts +0 -14
  16. package/dist/elements/CPRElement/CPRElement.js +0 -83
  17. package/dist/elements/CPRElement/CPRElement.js.map +0 -1
  18. package/dist/elements/CVRElement/CVRElement.d.ts +0 -14
  19. package/dist/elements/CVRElement/CVRElement.js +0 -83
  20. package/dist/elements/CVRElement/CVRElement.js.map +0 -1
  21. package/dist/elements/CheckBoxElement/CheckBoxElement.d.ts +0 -14
  22. package/dist/elements/CheckBoxElement/CheckBoxElement.js +0 -97
  23. package/dist/elements/CheckBoxElement/CheckBoxElement.js.map +0 -1
  24. package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.d.ts +0 -12
  25. package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js +0 -83
  26. package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js.map +0 -1
  27. package/dist/elements/DateField/DateFieldElement.d.ts +0 -12
  28. package/dist/elements/DateField/DateFieldElement.js +0 -86
  29. package/dist/elements/DateField/DateFieldElement.js.map +0 -1
  30. package/dist/elements/DropDownList/DropDownListElement.d.ts +0 -14
  31. package/dist/elements/DropDownList/DropDownListElement.js +0 -94
  32. package/dist/elements/DropDownList/DropDownListElement.js.map +0 -1
  33. package/dist/elements/Elements.d.ts +0 -18
  34. package/dist/elements/Elements.js +0 -38
  35. package/dist/elements/Elements.js.map +0 -1
  36. package/dist/elements/EmailField/EmailFieldElement.d.ts +0 -13
  37. package/dist/elements/EmailField/EmailFieldElement.js +0 -84
  38. package/dist/elements/EmailField/EmailFieldElement.js.map +0 -1
  39. package/dist/elements/FileField/FileFieldElement.d.ts +0 -12
  40. package/dist/elements/FileField/FileFieldElement.js +0 -84
  41. package/dist/elements/FileField/FileFieldElement.js.map +0 -1
  42. package/dist/elements/IdentificationElement/IdentificationElement.d.ts +0 -18
  43. package/dist/elements/IdentificationElement/IdentificationElement.js +0 -95
  44. package/dist/elements/IdentificationElement/IdentificationElement.js.map +0 -1
  45. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.d.ts +0 -16
  46. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js +0 -109
  47. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js.map +0 -1
  48. package/dist/elements/NumericField/NumericFieldElement.d.ts +0 -12
  49. package/dist/elements/NumericField/NumericFieldElement.js +0 -92
  50. package/dist/elements/NumericField/NumericFieldElement.js.map +0 -1
  51. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.d.ts +0 -14
  52. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +0 -100
  53. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +0 -1
  54. package/dist/elements/TextAreaElement/TextAreaElement.d.ts +0 -12
  55. package/dist/elements/TextAreaElement/TextAreaElement.js +0 -80
  56. package/dist/elements/TextAreaElement/TextAreaElement.js.map +0 -1
  57. package/dist/elements/TextField/TextFieldElement.d.ts +0 -12
  58. package/dist/elements/TextField/TextFieldElement.js +0 -80
  59. package/dist/elements/TextField/TextFieldElement.js.map +0 -1
  60. package/dist/elements/TypeAhead/TypeAheadElement.d.ts +0 -24
  61. package/dist/elements/TypeAhead/TypeAheadElement.js +0 -210
  62. package/dist/elements/TypeAhead/TypeAheadElement.js.map +0 -1
  63. package/dist/framework/CustomEvents.d.ts +0 -21
  64. package/dist/framework/CustomEvents.js +0 -48
  65. package/dist/framework/CustomEvents.js.map +0 -1
  66. package/dist/framework/CustomInputElement.d.ts +0 -50
  67. package/dist/framework/CustomInputElement.js +0 -258
  68. package/dist/framework/CustomInputElement.js.map +0 -1
  69. package/dist/framework/Language/Languages/Base/BaseDictionary.d.ts +0 -4
  70. package/dist/framework/Language/Languages/Base/BaseDictionary.js +0 -21
  71. package/dist/framework/Language/Languages/Base/BaseDictionary.js.map +0 -1
  72. package/dist/framework/Language/Languages/DanishDictionary.d.ts +0 -4
  73. package/dist/framework/Language/Languages/DanishDictionary.js +0 -40
  74. package/dist/framework/Language/Languages/DanishDictionary.js.map +0 -1
  75. package/dist/framework/Language/Languages/EnglishDictionary.d.ts +0 -4
  76. package/dist/framework/Language/Languages/EnglishDictionary.js +0 -40
  77. package/dist/framework/Language/Languages/EnglishDictionary.js.map +0 -1
  78. package/dist/framework/Language/Translator.d.ts +0 -6
  79. package/dist/framework/Language/Translator.js +0 -33
  80. package/dist/framework/Language/Translator.js.map +0 -1
  81. package/dist/framework/Models/OptionWithDescription.d.ts +0 -6
  82. package/dist/framework/Models/OptionWithDescription.js +0 -10
  83. package/dist/framework/Models/OptionWithDescription.js.map +0 -1
  84. package/dist/framework/Polyfills/getAttributeNamesPolyfill.d.ts +0 -1
  85. package/dist/framework/Polyfills/getAttributeNamesPolyfill.js +0 -18
  86. package/dist/framework/Polyfills/getAttributeNamesPolyfill.js.map +0 -1
  87. package/dist/framework/Translations/CaseConverter.d.ts +0 -5
  88. package/dist/framework/Translations/CaseConverter.js +0 -51
  89. package/dist/framework/Translations/CaseConverter.js.map +0 -1
  90. package/dist/framework/Utilities/DomUtility.d.ts +0 -3
  91. package/dist/framework/Utilities/DomUtility.js +0 -13
  92. package/dist/framework/Utilities/DomUtility.js.map +0 -1
  93. package/dist/framework/Utilities/debouncer.d.ts +0 -8
  94. package/dist/framework/Utilities/debouncer.js +0 -52
  95. package/dist/framework/Utilities/debouncer.js.map +0 -1
  96. package/dist/framework/Validation/IValidator.interface.d.ts +0 -3
  97. package/dist/framework/Validation/IValidator.interface.js +0 -3
  98. package/dist/framework/Validation/IValidator.interface.js.map +0 -1
  99. package/dist/framework/Validation/Validators/BankAccount.d.ts +0 -4
  100. package/dist/framework/Validation/Validators/BankAccount.js +0 -13
  101. package/dist/framework/Validation/Validators/BankAccount.js.map +0 -1
  102. package/dist/framework/Validation/Validators/BankAccountRegistrationNumber.d.ts +0 -4
  103. package/dist/framework/Validation/Validators/BankAccountRegistrationNumber.js +0 -13
  104. package/dist/framework/Validation/Validators/BankAccountRegistrationNumber.js.map +0 -1
  105. package/dist/framework/Validation/Validators/BankIdNorway.d.ts +0 -5
  106. package/dist/framework/Validation/Validators/BankIdNorway.js +0 -22
  107. package/dist/framework/Validation/Validators/BankIdNorway.js.map +0 -1
  108. package/dist/framework/Validation/Validators/BankIdSweden.d.ts +0 -5
  109. package/dist/framework/Validation/Validators/BankIdSweden.js +0 -22
  110. package/dist/framework/Validation/Validators/BankIdSweden.js.map +0 -1
  111. package/dist/framework/Validation/Validators/CPR.d.ts +0 -9
  112. package/dist/framework/Validation/Validators/CPR.js +0 -76
  113. package/dist/framework/Validation/Validators/CPR.js.map +0 -1
  114. package/dist/framework/Validation/Validators/CVR.d.ts +0 -5
  115. package/dist/framework/Validation/Validators/CVR.js +0 -31
  116. package/dist/framework/Validation/Validators/CVR.js.map +0 -1
  117. package/dist/framework/custom-element.decorator.d.ts +0 -9
  118. package/dist/framework/custom-element.decorator.js +0 -52
  119. package/dist/framework/custom-element.decorator.js.map +0 -1
  120. package/dist/index.d.ts +0 -7
  121. package/dist/index.js +0 -15
  122. package/dist/index.js.map +0 -1
  123. package/node_modules/@webcomponents/webcomponentsjs/CHANGELOG.md +0 -61
  124. package/node_modules/@webcomponents/webcomponentsjs/LICENSE.md +0 -19
  125. package/node_modules/@webcomponents/webcomponentsjs/README.md +0 -246
  126. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js +0 -63
  127. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js.map +0 -1
  128. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js +0 -60
  129. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js.map +0 -1
  130. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_js.js +0 -95
  131. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_js.js.map +0 -1
  132. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js +0 -360
  133. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js.map +0 -1
  134. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js +0 -228
  135. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js.map +0 -1
  136. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js +0 -185
  137. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js.map +0 -1
  138. package/node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js +0 -15
  139. package/node_modules/@webcomponents/webcomponentsjs/package.json +0 -83
  140. package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/custom-elements-es5-adapter-index.js +0 -16
  141. package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-bundle-index.js +0 -55
  142. package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-ce-index.js +0 -17
  143. package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-pf_dom-index.js +0 -17
  144. package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-pf_js-index.js +0 -13
  145. package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-index.js +0 -19
  146. package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-ce-pf-index.js +0 -25
  147. package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-sd-index.js +0 -18
  148. package/node_modules/@webcomponents/webcomponentsjs/src/flag-parser.js +0 -69
  149. package/node_modules/@webcomponents/webcomponentsjs/src/platform/baseuri.js +0 -28
  150. package/node_modules/@webcomponents/webcomponentsjs/src/platform/child-node/after.js +0 -47
  151. package/node_modules/@webcomponents/webcomponentsjs/src/platform/child-node/before.js +0 -40
  152. package/node_modules/@webcomponents/webcomponentsjs/src/platform/child-node/index.js +0 -14
  153. package/node_modules/@webcomponents/webcomponentsjs/src/platform/child-node/remove.js +0 -37
  154. package/node_modules/@webcomponents/webcomponentsjs/src/platform/child-node/replace-with.js +0 -42
  155. package/node_modules/@webcomponents/webcomponentsjs/src/platform/custom-event.js +0 -79
  156. package/node_modules/@webcomponents/webcomponentsjs/src/platform/es6-misc.js +0 -38
  157. package/node_modules/@webcomponents/webcomponentsjs/src/platform/get-attribute-names.js +0 -27
  158. package/node_modules/@webcomponents/webcomponentsjs/src/platform/matches.js +0 -21
  159. package/node_modules/@webcomponents/webcomponentsjs/src/platform/parent-node/append.js +0 -31
  160. package/node_modules/@webcomponents/webcomponentsjs/src/platform/parent-node/index.js +0 -13
  161. package/node_modules/@webcomponents/webcomponentsjs/src/platform/parent-node/prepend.js +0 -42
  162. package/node_modules/@webcomponents/webcomponentsjs/src/platform/parent-node/replace-children.js +0 -45
  163. package/node_modules/@webcomponents/webcomponentsjs/src/platform/promise.js +0 -50
  164. package/node_modules/@webcomponents/webcomponentsjs/src/platform/svg-element-class-list.js +0 -28
  165. package/node_modules/@webcomponents/webcomponentsjs/src/platform/symbol.js +0 -64
  166. package/node_modules/@webcomponents/webcomponentsjs/src/unresolved.js +0 -32
  167. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.d.ts +0 -174
  168. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js +0 -370
  169. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js.map +0 -1
  170. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js +0 -206
@@ -1,18 +0,0 @@
1
- import { AddressElement } from './Address/AddressElement';
2
- import { TextFieldElement } from './TextField/TextFieldElement';
3
- import { EmailFieldElement } from './EmailField/EmailFieldElement';
4
- import { CheckBoxElement } from './CheckBoxElement/CheckBoxElement';
5
- import { RadioButtonGroupElement } from './RadioButtonGroup/RadioButtonGroupElement';
6
- import { TextAreaElement } from './TextAreaElement/TextAreaElement';
7
- import { DropDownListElement } from './DropDownList/DropDownListElement';
8
- import { FileFieldElement } from './FileField/FileFieldElement';
9
- import { NumericFieldElement } from './NumericField/NumericFieldElement';
10
- import { CustomRegularExpressionElement } from './CustomRegularExpression/CustomRegularExpressionElement';
11
- import { DateFieldElement } from './DateField/DateFieldElement';
12
- import { IntPhoneFieldElement } from './InternationaPhoneNumber/InternationaPhoneNumberElement';
13
- import { CPRElement } from './CPRElement/CPRElement';
14
- import { CVRElement } from './CVRElement/CVRElement';
15
- import { IdentificationElement } from './IdentificationElement/IdentificationElement';
16
- import { BankFieldElement } from './BankField/BankFieldElement';
17
- import { TypeAheadElement } from './TypeAhead/TypeAheadElement';
18
- export { AddressElement, TextFieldElement, EmailFieldElement, CheckBoxElement, RadioButtonGroupElement, TextAreaElement, DropDownListElement, FileFieldElement, NumericFieldElement, CustomRegularExpressionElement, DateFieldElement, IntPhoneFieldElement, CPRElement, CVRElement, IdentificationElement, BankFieldElement, TypeAheadElement };
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeAheadElement = exports.BankFieldElement = exports.IdentificationElement = exports.CVRElement = exports.CPRElement = exports.IntPhoneFieldElement = exports.DateFieldElement = exports.CustomRegularExpressionElement = exports.NumericFieldElement = exports.FileFieldElement = exports.DropDownListElement = exports.TextAreaElement = exports.RadioButtonGroupElement = exports.CheckBoxElement = exports.EmailFieldElement = exports.TextFieldElement = exports.AddressElement = void 0;
4
- var AddressElement_1 = require("./Address/AddressElement");
5
- Object.defineProperty(exports, "AddressElement", { enumerable: true, get: function () { return AddressElement_1.AddressElement; } });
6
- var TextFieldElement_1 = require("./TextField/TextFieldElement");
7
- Object.defineProperty(exports, "TextFieldElement", { enumerable: true, get: function () { return TextFieldElement_1.TextFieldElement; } });
8
- var EmailFieldElement_1 = require("./EmailField/EmailFieldElement");
9
- Object.defineProperty(exports, "EmailFieldElement", { enumerable: true, get: function () { return EmailFieldElement_1.EmailFieldElement; } });
10
- var CheckBoxElement_1 = require("./CheckBoxElement/CheckBoxElement");
11
- Object.defineProperty(exports, "CheckBoxElement", { enumerable: true, get: function () { return CheckBoxElement_1.CheckBoxElement; } });
12
- var RadioButtonGroupElement_1 = require("./RadioButtonGroup/RadioButtonGroupElement");
13
- Object.defineProperty(exports, "RadioButtonGroupElement", { enumerable: true, get: function () { return RadioButtonGroupElement_1.RadioButtonGroupElement; } });
14
- var TextAreaElement_1 = require("./TextAreaElement/TextAreaElement");
15
- Object.defineProperty(exports, "TextAreaElement", { enumerable: true, get: function () { return TextAreaElement_1.TextAreaElement; } });
16
- var DropDownListElement_1 = require("./DropDownList/DropDownListElement");
17
- Object.defineProperty(exports, "DropDownListElement", { enumerable: true, get: function () { return DropDownListElement_1.DropDownListElement; } });
18
- var FileFieldElement_1 = require("./FileField/FileFieldElement");
19
- Object.defineProperty(exports, "FileFieldElement", { enumerable: true, get: function () { return FileFieldElement_1.FileFieldElement; } });
20
- var NumericFieldElement_1 = require("./NumericField/NumericFieldElement");
21
- Object.defineProperty(exports, "NumericFieldElement", { enumerable: true, get: function () { return NumericFieldElement_1.NumericFieldElement; } });
22
- var CustomRegularExpressionElement_1 = require("./CustomRegularExpression/CustomRegularExpressionElement");
23
- Object.defineProperty(exports, "CustomRegularExpressionElement", { enumerable: true, get: function () { return CustomRegularExpressionElement_1.CustomRegularExpressionElement; } });
24
- var DateFieldElement_1 = require("./DateField/DateFieldElement");
25
- Object.defineProperty(exports, "DateFieldElement", { enumerable: true, get: function () { return DateFieldElement_1.DateFieldElement; } });
26
- var InternationaPhoneNumberElement_1 = require("./InternationaPhoneNumber/InternationaPhoneNumberElement");
27
- Object.defineProperty(exports, "IntPhoneFieldElement", { enumerable: true, get: function () { return InternationaPhoneNumberElement_1.IntPhoneFieldElement; } });
28
- var CPRElement_1 = require("./CPRElement/CPRElement");
29
- Object.defineProperty(exports, "CPRElement", { enumerable: true, get: function () { return CPRElement_1.CPRElement; } });
30
- var CVRElement_1 = require("./CVRElement/CVRElement");
31
- Object.defineProperty(exports, "CVRElement", { enumerable: true, get: function () { return CVRElement_1.CVRElement; } });
32
- var IdentificationElement_1 = require("./IdentificationElement/IdentificationElement");
33
- Object.defineProperty(exports, "IdentificationElement", { enumerable: true, get: function () { return IdentificationElement_1.IdentificationElement; } });
34
- var BankFieldElement_1 = require("./BankField/BankFieldElement");
35
- Object.defineProperty(exports, "BankFieldElement", { enumerable: true, get: function () { return BankFieldElement_1.BankFieldElement; } });
36
- var TypeAheadElement_1 = require("./TypeAhead/TypeAheadElement");
37
- Object.defineProperty(exports, "TypeAheadElement", { enumerable: true, get: function () { return TypeAheadElement_1.TypeAheadElement; } });
38
- //# sourceMappingURL=Elements.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Elements.js","sourceRoot":"","sources":["../../src/elements/Elements.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAmBzD,+FAnBQ,+BAAc,OAmBR;AAlBf,iEAAgE;AAmB/D,iGAnBQ,mCAAgB,OAmBR;AAlBjB,oEAAmE;AAmBlE,kGAnBQ,qCAAiB,OAmBR;AAlBlB,qEAAoE;AAmBnE,gGAnBQ,iCAAe,OAmBR;AAlBhB,sFAAqF;AAmBpF,wGAnBQ,iDAAuB,OAmBR;AAlBxB,qEAAoE;AAmBnE,gGAnBQ,iCAAe,OAmBR;AAlBhB,0EAAyE;AAmBxE,oGAnBQ,yCAAmB,OAmBR;AAlBpB,iEAAgE;AAmB/D,iGAnBQ,mCAAgB,OAmBR;AAlBjB,0EAAyE;AAmBxE,oGAnBQ,yCAAmB,OAmBR;AAlBpB,2GAA0G;AAmBzG,+GAnBQ,+DAA8B,OAmBR;AAlB/B,iEAAgE;AAmB/D,iGAnBQ,mCAAgB,OAmBR;AAlBjB,2GAAgG;AAmB/F,qGAnBQ,qDAAoB,OAmBR;AAlBrB,sDAAqD;AAmBpD,2FAnBQ,uBAAU,OAmBR;AAlBX,sDAAqD;AAmBpD,2FAnBQ,uBAAU,OAmBR;AAlBX,uFAAsF;AAmBrF,sGAnBQ,6CAAqB,OAmBR;AAlBtB,iEAAgE;AAmB/D,iGAnBQ,mCAAgB,OAmBR;AAlBjB,iEAAgE;AAmB/D,iGAnBQ,mCAAgB,OAmBR"}
@@ -1,13 +0,0 @@
1
- import { CustomInputElement } from '../../framework/CustomInputElement';
2
- export declare class EmailFieldElement extends CustomInputElement {
3
- mailRegex: RegExp;
4
- email: HTMLInputElement;
5
- constructor();
6
- get value(): string;
7
- set value(value: string);
8
- get valid(): boolean;
9
- connectedCallback(): void;
10
- initChildInputs(): void;
11
- change($event: any): void;
12
- validate(): void;
13
- }
@@ -1,84 +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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.EmailFieldElement = 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 EmailFieldElement = /** @class */ (function (_super) {
29
- __extends(EmailFieldElement, _super);
30
- function EmailFieldElement() {
31
- var _this = _super.call(this) || this;
32
- _this.mailRegex = new RegExp(/^([a-zA-Z0-9ÆØÅæøå_.+-])+\@(([a-zA-Z0-9ÆØÅæøå-])+\.)+([a-zA-Z0-9ÆØÅæøå]{2,4})+$/);
33
- return _this;
34
- }
35
- Object.defineProperty(EmailFieldElement.prototype, "value", {
36
- get: function () {
37
- return "" + this.email.value;
38
- },
39
- set: function (value) {
40
- this.email.value = value;
41
- },
42
- enumerable: false,
43
- configurable: true
44
- });
45
- Object.defineProperty(EmailFieldElement.prototype, "valid", {
46
- get: function () {
47
- var patternValid = !this.value || this.mailRegex.test(this.value);
48
- return this.email.validity.valid && patternValid;
49
- },
50
- enumerable: false,
51
- configurable: true
52
- });
53
- EmailFieldElement.prototype.connectedCallback = function () {
54
- this.initChildInputs();
55
- _super.prototype.connectedCallback.call(this);
56
- };
57
- EmailFieldElement.prototype.initChildInputs = function () {
58
- this.email = _super.prototype.getChildInput.call(this, '#email-field');
59
- this.email.addEventListener('change', this.change.bind(this));
60
- if (this.required) {
61
- this.email.setAttribute('required', '');
62
- }
63
- };
64
- // events
65
- EmailFieldElement.prototype.change = function ($event) {
66
- this.touched = true;
67
- this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
68
- };
69
- EmailFieldElement.prototype.validate = function () {
70
- this.valid;
71
- this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
72
- };
73
- EmailFieldElement = __decorate([
74
- (0, custom_element_decorator_1.default)({
75
- selector: 'email-element',
76
- template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='email-field'/>\n\t\t\t</div>",
77
- 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 ",
78
- useShadow: true,
79
- })
80
- ], EmailFieldElement);
81
- return EmailFieldElement;
82
- }(CustomInputElement_1.CustomInputElement));
83
- exports.EmailFieldElement = EmailFieldElement;
84
- //# sourceMappingURL=EmailFieldElement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmailFieldElement.js","sourceRoot":"","sources":["../../../src/elements/EmailField/EmailFieldElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AA0BtE;IAAuC,qCAAkB;IAOxD;QAAA,YACC,iBAAO,SACP;QARD,eAAS,GAAW,IAAI,MAAM,CAC7B,iFAAiF,CACjF,CAAC;;IAMF,CAAC;IAED,sBAAI,oCAAK;aAAT;YACC,OAAO,KAAG,IAAI,CAAC,KAAK,CAAC,KAAO,CAAC;QAC9B,CAAC;aAED,UAAU,KAAa;YACtB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QAC1B,CAAC;;;OAJA;IAMD,sBAAI,oCAAK;aAAT;YACC,IAAM,YAAY,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,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ustomInputElement {
3
- file: HTMLInputElement;
4
- constructor();
5
- get value(): FileList;
6
- set value(files: FileList);
7
- get valid(): boolean;
8
- connectedCallback(): void;
9
- initChildInputs(): void;
10
- change($event: any): void;
11
- validate(): void;
12
- }
@@ -1,84 +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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.FileFieldElement = 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 FileFieldElement = /** @class */ (function (_super) {
29
- __extends(FileFieldElement, _super);
30
- function FileFieldElement() {
31
- return _super.call(this) || this;
32
- }
33
- Object.defineProperty(FileFieldElement.prototype, "value", {
34
- get: function () {
35
- return this.file.files;
36
- },
37
- set: function (files) {
38
- this.file.files = files;
39
- },
40
- enumerable: false,
41
- configurable: true
42
- });
43
- Object.defineProperty(FileFieldElement.prototype, "valid", {
44
- get: function () {
45
- return this.file.validity.valid;
46
- },
47
- enumerable: false,
48
- configurable: true
49
- });
50
- FileFieldElement.prototype.connectedCallback = function () {
51
- this.initChildInputs();
52
- _super.prototype.connectedCallback.call(this);
53
- };
54
- FileFieldElement.prototype.initChildInputs = function () {
55
- this.file = _super.prototype.getChildInput.call(this, '#file-field');
56
- this.file.addEventListener('change', this.change.bind(this));
57
- if (this.required) {
58
- this.file.setAttribute('required', '');
59
- }
60
- if (this.multi) {
61
- this.file.setAttribute('multiple', '');
62
- }
63
- };
64
- // events
65
- FileFieldElement.prototype.change = function ($event) {
66
- this.touched = true;
67
- this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
68
- };
69
- FileFieldElement.prototype.validate = function () {
70
- this.valid;
71
- this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
72
- };
73
- FileFieldElement = __decorate([
74
- (0, custom_element_decorator_1.default)({
75
- selector: 'file-element',
76
- template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"file\" id='file-field' accept=\"image/*,application/pdf\"/>\n\t\t\t</div>",
77
- 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 ",
78
- useShadow: true,
79
- })
80
- ], FileFieldElement);
81
- return FileFieldElement;
82
- }(CustomInputElement_1.CustomInputElement));
83
- exports.FileFieldElement = FileFieldElement;
84
- //# sourceMappingURL=FileFieldElement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileFieldElement.js","sourceRoot":"","sources":["../../../src/elements/FileField/FileFieldElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;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AAC,CAClD,CAAC;IACH,CAAC;IA9CW,gBAAgB;QAxB5B,IAAA,kCAAa,EAAC;YACd,QAAQ,EAAE,cAAc;YACxB,QAAQ,EAAE,kIAGD;YACT,KAAK,EAAE,iUAeI;YACX,SAAS,EAAE,IAAI;SACf,CAAC;OACW,gBAAgB,CA+C5B;IAAD,uBAAC;CAAA,AA/CD,CAAsC,uCAAkB,GA+CvD;AA/CY,4CAAgB"}
@@ -1,18 +0,0 @@
1
- import { CustomInputElement } from '../../framework/CustomInputElement';
2
- import IValidator from '../../framework/Validation/IValidator.interface';
3
- export declare class IdentificationElement extends CustomInputElement {
4
- typeSelector: HTMLInputElement;
5
- text: HTMLInputElement;
6
- type: string;
7
- validators: {
8
- [index: string]: IValidator;
9
- };
10
- constructor();
11
- get value(): string;
12
- set value(value: string);
13
- get valid(): boolean;
14
- connectedCallback(): void;
15
- initChildInputs(): void;
16
- change($event: any): void;
17
- validate(): void;
18
- }
@@ -1,95 +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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.IdentificationElement = 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 CPR_1 = require("../../framework/Validation/Validators/CPR");
29
- var CVR_1 = require("../../framework/Validation/Validators/CVR");
30
- var BankIdSweden_1 = require("../../framework/Validation/Validators/BankIdSweden");
31
- var BankIdNorway_1 = require("../../framework/Validation/Validators/BankIdNorway");
32
- var IdentificationElement = /** @class */ (function (_super) {
33
- __extends(IdentificationElement, _super);
34
- function IdentificationElement() {
35
- var _this = _super.call(this) || this;
36
- _this.validators = {
37
- cpr: new CPR_1.default(),
38
- cvr: new CVR_1.default(),
39
- swe: new BankIdSweden_1.default(),
40
- nor: new BankIdNorway_1.default(),
41
- };
42
- return _this;
43
- }
44
- Object.defineProperty(IdentificationElement.prototype, "value", {
45
- get: function () {
46
- return "" + this.text.value;
47
- },
48
- set: function (value) {
49
- this.text.value = value;
50
- },
51
- enumerable: false,
52
- configurable: true
53
- });
54
- Object.defineProperty(IdentificationElement.prototype, "valid", {
55
- get: function () {
56
- return this.validators[this.type].isSatisfiedBy(this.value, !this.required);
57
- },
58
- enumerable: false,
59
- configurable: true
60
- });
61
- IdentificationElement.prototype.connectedCallback = function () {
62
- _super.prototype.connectedCallback.call(this);
63
- };
64
- IdentificationElement.prototype.initChildInputs = function () {
65
- this.text = _super.prototype.getChildInput.call(this, '#id-field');
66
- this.typeSelector = _super.prototype.getChildInput.call(this, '#id-type');
67
- this.text.addEventListener('change', this.change.bind(this));
68
- this.typeSelector.addEventListener('change', this.change.bind(this));
69
- if (this.required) {
70
- this.text.setAttribute('required', '');
71
- }
72
- this.type = this.typeSelector.value;
73
- };
74
- // events
75
- IdentificationElement.prototype.change = function ($event) {
76
- this.touched = true;
77
- this.type = this.typeSelector.value;
78
- this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
79
- };
80
- IdentificationElement.prototype.validate = function () {
81
- this.valid;
82
- this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
83
- };
84
- IdentificationElement = __decorate([
85
- (0, custom_element_decorator_1.default)({
86
- selector: 'id-element',
87
- template: "\n\t\t\t<div class=\"wrapper\">\n <select id='id-type'>\n <option value='cvr'>Danish CVR</option>\n <option value='cpr'>Danish CPR</option>\n <option value='swe'>Sweden Bank Id</option>\n <option value='nor'>Norway Bank Id</option>\n </select>\n\t\t\t\t<input type=\"text\" id='id-field' placeholder=''/>\n\t\t\t</div>",
88
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input, select{\n box-sizing: border-box;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n input{\n width: 75% !important;\n }\n select{\n width: 25% !important;\n }\n ",
89
- useShadow: true,
90
- })
91
- ], IdentificationElement);
92
- return IdentificationElement;
93
- }(CustomInputElement_1.CustomInputElement));
94
- exports.IdentificationElement = IdentificationElement;
95
- //# sourceMappingURL=IdentificationElement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IdentificationElement.js","sourceRoot":"","sources":["../../../src/elements/IdentificationElement/IdentificationElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,iEAAqE;AAErE,iEAAqE;AACrE,mFAAuF;AACvF,mFAAuF;AAqCvF;IAA2C,yCAAkB;IAY5D;QAAA,YACC,iBAAO,SACP;QATD,gBAAU,GAAoC;YAC7C,GAAG,EAAE,IAAI,aAAY,EAAE;YACvB,GAAG,EAAE,IAAI,aAAY,EAAE;YACvB,GAAG,EAAE,IAAI,sBAAqB,EAAE;YAChC,GAAG,EAAE,IAAI,sB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IAAI,CAAC,IAAI,qCAAsB,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IACtE,CAAC;IAEM,wCAAQ,GAAf;QACC,IAAI,CAAC,KAAK,CAAC;QACX,IAAI,CAAC,UAAU,CAAC,IAAI,CACnB,IAAI,qCAAsB,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAClD,CAAC;IACH,CAAC;IA1DW,qBAAqB;QAnCjC,IAAA,kCAAa,EAAC;YACd,QAAQ,EAAE,YAAY;YACtB,QAAQ,EAAE,0aASD;YACT,KAAK,EAAE,mZAoBI;YACX,SAAS,EAAE,IAAI;SACf,CAAC;OACW,qBAAqB,CA2DjC;IAAD,4BAAC;CAAA,AA3DD,CAA2C,uCAAkB,GA2D5D;AA3DY,sDAAqB"}
@@ -1,16 +0,0 @@
1
- import { CustomInputElement } from '../../framework/CustomInputElement';
2
- import { Plugin } from 'intl-tel-input';
3
- export declare class IntPhoneFieldElement extends CustomInputElement {
4
- phone: HTMLInputElement;
5
- fullPhone: HTMLInputElement;
6
- intlTelInput: Plugin;
7
- constructor();
8
- get value(): string;
9
- set value(value: string);
10
- get valid(): boolean;
11
- connectedCallback(): void;
12
- initChildInputs(): void;
13
- setIntlTelInput(): void;
14
- change($event: any): void;
15
- validate(): void;
16
- }
@@ -1,109 +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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.IntPhoneFieldElement = 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 intlTelInput = require("intl-tel-input");
29
- var utilities_1 = require("@luftborn/utilities");
30
- var IntPhoneFieldElement = /** @class */ (function (_super) {
31
- __extends(IntPhoneFieldElement, _super);
32
- function IntPhoneFieldElement() {
33
- return _super.call(this) || this;
34
- }
35
- Object.defineProperty(IntPhoneFieldElement.prototype, "value", {
36
- get: function () {
37
- return this.intlTelInput.getNumber();
38
- },
39
- set: function (value) {
40
- this.phone.value = value;
41
- },
42
- enumerable: false,
43
- configurable: true
44
- });
45
- Object.defineProperty(IntPhoneFieldElement.prototype, "valid", {
46
- get: function () {
47
- var patternValid = !this.intlTelInput.getNumber() || this.intlTelInput.isValidNumber();
48
- return patternValid && this.phone.validity.valid;
49
- },
50
- enumerable: false,
51
- configurable: true
52
- });
53
- IntPhoneFieldElement.prototype.connectedCallback = function () {
54
- this.setIntlTelInput();
55
- _super.prototype.connectedCallback.call(this);
56
- };
57
- IntPhoneFieldElement.prototype.initChildInputs = function () {
58
- this.phone.addEventListener('change', this.change.bind(this));
59
- if (this.required) {
60
- this.phone.setAttribute('required', '');
61
- }
62
- };
63
- IntPhoneFieldElement.prototype.setIntlTelInput = function () {
64
- var _this = this;
65
- this.phone = _super.prototype.getChildInput.call(this, '#phone-field');
66
- this.intlTelInput = intlTelInput(this.phone, {
67
- geoIpLookup: function (success, failure) {
68
- return new utilities_1.MakeRequest('https://ipinfo.io/json?token=8226138217a68a', 'get', { 'content-type': 'application/json' })
69
- .send()
70
- .then(function (request) {
71
- var res = JSON.parse(request);
72
- return success(res.country);
73
- })
74
- .catch(function (err) {
75
- return success('DK');
76
- });
77
- },
78
- hiddenInput: 'fullphone',
79
- initialCountry: 'auto',
80
- nationalMode: true,
81
- utilsScript: 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/15.0.1/js/utils.js',
82
- });
83
- this.intlTelInput.promise.then(function (e) {
84
- setTimeout(function () {
85
- _this.fullPhone = _super.prototype.getChildInput.call(_this, '[name="fullphone"]');
86
- }, 1000);
87
- });
88
- };
89
- // events
90
- IntPhoneFieldElement.prototype.change = function ($event) {
91
- this.touched = true;
92
- this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
93
- };
94
- IntPhoneFieldElement.prototype.validate = function () {
95
- this.valid;
96
- this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
97
- };
98
- IntPhoneFieldElement = __decorate([
99
- (0, custom_element_decorator_1.default)({
100
- selector: 'int-phone-element',
101
- template: "\n <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/css/intlTelInput.css\" >\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"tel\" id=\"phone-field\" />\n\t\t\t</div>",
102
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n .iti {\n width: 100% !important;\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 ",
103
- useShadow: true,
104
- })
105
- ], IntPhoneFieldElement);
106
- return IntPhoneFieldElement;
107
- }(CustomInputElement_1.CustomInputElement));
108
- exports.IntPhoneFieldElement = IntPhoneFieldElement;
109
- //# sourceMappingURL=InternationaPhoneNumberElement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InternationaPhoneNumberElement.js","sourceRoot":"","sources":["../../../src/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,6CAA+C;AAE/C,iDAAkD;AA8BlD;IAA0C,wCAAkB;IAI3D;eACC,iBAAO;IACR,CAAC;IAED,sBAAI,uCAAK;aAAT;YACC,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC;QACtC,CAAC;aAED,UAAU,KAAa;YACtB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QAC1B,CAAC;;;OAJA;IAMD,sBAAI,uCAAK;aAAT;YACC,IAAM,YAAY,GACjB,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC;YACrE,OAAO,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;QAClD,CAAC;;;OAAA;IAED,gDAAiB,GAAjB;QACC,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,iBAAM,iBAAiB,WAAE,CAAC;IAC3B,CAAC;IAED,8CAAe,GAAf;QACC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9D,IAAI,IAAI,CAAC,QAAQ,EAAE;YAClB,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;SACxC;IACF,CAAC;IACD,8CAAe,GAAf;QAAA,iBA6BC;QA5BA,IAAI,CAAC,KAAK,GAAG,iBAAM,aAAa,YAAC,cAAc,CAAC,CAAC;QACjD,IA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;QA5BhC,IAAA,kCAAa,EAAC;YACd,QAAQ,EAAE,mBAAmB;YAC7B,QAAQ,EAAE,wPAID;YACT,KAAK,EAAE,qXAkBI;YACX,SAAS,EAAE,IAAI;SACf,CAAC;OACW,oBAAoB,CA2EhC;IAAD,2BAAC;CAAA,AA3ED,CAA0C,uCAAkB,GA2E3D;AA3EY,oDAAoB"}
@@ -1,12 +0,0 @@
1
- import { CustomInputElement } from '../../framework/CustomInputElement';
2
- export declare class NumericFieldElement extends CustomInputElement {
3
- number: HTMLInputElement;
4
- constructor();
5
- get value(): any;
6
- set value(value: any);
7
- get valid(): boolean;
8
- connectedCallback(): void;
9
- initChildInputs(): void;
10
- change($event: any): void;
11
- validate(): void;
12
- }
@@ -1,92 +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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.NumericFieldElement = 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 NumericFieldElement = /** @class */ (function (_super) {
29
- __extends(NumericFieldElement, _super);
30
- function NumericFieldElement() {
31
- return _super.call(this) || this;
32
- }
33
- Object.defineProperty(NumericFieldElement.prototype, "value", {
34
- get: function () {
35
- if (isNaN(this.number.valueAsNumber)) {
36
- return '';
37
- }
38
- return this.number.valueAsNumber;
39
- },
40
- set: function (value) {
41
- this.number.valueAsNumber = value;
42
- },
43
- enumerable: false,
44
- configurable: true
45
- });
46
- Object.defineProperty(NumericFieldElement.prototype, "valid", {
47
- get: function () {
48
- return this.number.validity.valid;
49
- },
50
- enumerable: false,
51
- configurable: true
52
- });
53
- NumericFieldElement.prototype.connectedCallback = function () {
54
- _super.prototype.connectedCallback.call(this);
55
- };
56
- NumericFieldElement.prototype.initChildInputs = function () {
57
- this.number = _super.prototype.getChildInput.call(this, '#numeric-field');
58
- this.number.addEventListener('change', this.change.bind(this));
59
- if (this.required) {
60
- this.number.setAttribute('required', '');
61
- }
62
- if (this.max) {
63
- this.number.setAttribute('max', this.max);
64
- }
65
- if (this.min) {
66
- this.number.setAttribute('min', this.min);
67
- }
68
- if (this.step) {
69
- this.number.setAttribute('step', this.step);
70
- }
71
- };
72
- // events
73
- NumericFieldElement.prototype.change = function ($event) {
74
- this.touched = true;
75
- this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
76
- };
77
- NumericFieldElement.prototype.validate = function () {
78
- this.valid;
79
- this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
80
- };
81
- NumericFieldElement = __decorate([
82
- (0, custom_element_decorator_1.default)({
83
- selector: 'numeric-element',
84
- template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"number\" id='numeric-field'/>\n\t\t\t</div>",
85
- 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 ",
86
- useShadow: true,
87
- })
88
- ], NumericFieldElement);
89
- return NumericFieldElement;
90
- }(CustomInputElement_1.CustomInputElement));
91
- exports.NumericFieldElement = NumericFieldElement;
92
- //# sourceMappingURL=NumericFieldElement.js.map