@bravura/ui 1.6.0 → 1.8.0

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 (116) hide show
  1. package/CHANGELOG.md +36 -11
  2. package/LICENSE +6 -6
  3. package/behavior/behavior.module.d.ts +12 -12
  4. package/behavior/bravura-ui-behavior.d.ts +5 -5
  5. package/behavior/public-api.d.ts +3 -3
  6. package/behavior/sizing-monitor.directive.d.ts +23 -23
  7. package/behavior/sizing.directive.d.ts +94 -88
  8. package/bravura-ui.d.ts +5 -5
  9. package/bundles/bravura-ui-behavior.umd.js +631 -601
  10. package/bundles/bravura-ui-behavior.umd.js.map +1 -1
  11. package/bundles/bravura-ui-discrete-input.umd.js +695 -697
  12. package/bundles/bravura-ui-discrete-input.umd.js.map +1 -1
  13. package/bundles/bravura-ui-form-field.umd.js +440 -434
  14. package/bundles/bravura-ui-form-field.umd.js.map +1 -1
  15. package/bundles/bravura-ui-icon-font.umd.js +488 -490
  16. package/bundles/bravura-ui-icon-font.umd.js.map +1 -1
  17. package/bundles/bravura-ui-phone-number.umd.js +634 -636
  18. package/bundles/bravura-ui-phone-number.umd.js.map +1 -1
  19. package/bundles/bravura-ui-radio-panel.umd.js +466 -468
  20. package/bundles/bravura-ui-radio-panel.umd.js.map +1 -1
  21. package/bundles/bravura-ui-selection-panel.umd.js +613 -615
  22. package/bundles/bravura-ui-selection-panel.umd.js.map +1 -1
  23. package/bundles/bravura-ui-tooltip.umd.js +518 -479
  24. package/bundles/bravura-ui-tooltip.umd.js.map +1 -1
  25. package/bundles/bravura-ui.umd.js +4 -4
  26. package/bundles/bravura-ui.umd.js.map +1 -1
  27. package/discrete-input/bravura-ui-discrete-input.d.ts +5 -5
  28. package/discrete-input/discrete-input.component.d.ts +138 -138
  29. package/discrete-input/discrete-input.module.d.ts +11 -11
  30. package/discrete-input/public-api.d.ts +2 -2
  31. package/esm2015/behavior/behavior.module.js +21 -21
  32. package/esm2015/behavior/bravura-ui-behavior.js +4 -4
  33. package/esm2015/behavior/public-api.js +3 -3
  34. package/esm2015/behavior/sizing-monitor.directive.js +30 -30
  35. package/esm2015/behavior/sizing.directive.js +245 -217
  36. package/esm2015/bravura-ui.js +4 -4
  37. package/esm2015/discrete-input/bravura-ui-discrete-input.js +4 -4
  38. package/esm2015/discrete-input/discrete-input.component.js +332 -332
  39. package/esm2015/discrete-input/discrete-input.module.js +19 -19
  40. package/esm2015/discrete-input/public-api.js +2 -2
  41. package/esm2015/form-field/bravura-ui-form-field.js +4 -4
  42. package/esm2015/form-field/form-field.component.js +104 -96
  43. package/esm2015/form-field/form-field.module.js +19 -19
  44. package/esm2015/form-field/public-api.js +2 -2
  45. package/esm2015/icon-font/bravura-ui-icon-font.js +4 -4
  46. package/esm2015/icon-font/icon-font.module.js +21 -21
  47. package/esm2015/icon-font/icon.directive.js +101 -101
  48. package/esm2015/icon-font/public-api.js +3 -3
  49. package/esm2015/icon-font/utilities.js +50 -50
  50. package/esm2015/phone-number/bravura-ui-phone-number.js +4 -4
  51. package/esm2015/phone-number/phone-number.directive.js +191 -191
  52. package/esm2015/phone-number/phone-number.module.js +23 -23
  53. package/esm2015/phone-number/phone-number.pipe.js +46 -46
  54. package/esm2015/phone-number/phone-number.validator.js +63 -63
  55. package/esm2015/phone-number/public-api.js +1 -1
  56. package/esm2015/public-api.js +2 -2
  57. package/esm2015/radio-panel/bravura-ui-radio-panel.js +4 -4
  58. package/esm2015/radio-panel/public-api.js +4 -4
  59. package/esm2015/radio-panel/radio-panel-item.component.js +76 -76
  60. package/esm2015/radio-panel/radio-panel.directive.js +59 -59
  61. package/esm2015/radio-panel/radio-panel.module.js +24 -24
  62. package/esm2015/selection-panel/bravura-ui-selection-panel.js +4 -4
  63. package/esm2015/selection-panel/public-api.js +3 -3
  64. package/esm2015/selection-panel/selection-panel-item.component.js +143 -143
  65. package/esm2015/selection-panel/selection-panel.directive.js +116 -116
  66. package/esm2015/selection-panel/selection-panel.module.js +20 -20
  67. package/esm2015/tooltip/bravura-ui-tooltip.js +4 -4
  68. package/esm2015/tooltip/public-api.js +2 -2
  69. package/esm2015/tooltip/tooltip.component.js +52 -44
  70. package/esm2015/tooltip/tooltip.directive.js +110 -83
  71. package/esm2015/tooltip/tooltip.module.js +25 -25
  72. package/fesm2015/bravura-ui-behavior.js +281 -253
  73. package/fesm2015/bravura-ui-behavior.js.map +1 -1
  74. package/fesm2015/bravura-ui-discrete-input.js +332 -332
  75. package/fesm2015/bravura-ui-form-field.js +111 -103
  76. package/fesm2015/bravura-ui-form-field.js.map +1 -1
  77. package/fesm2015/bravura-ui-icon-font.js +162 -162
  78. package/fesm2015/bravura-ui-phone-number.js +300 -300
  79. package/fesm2015/bravura-ui-radio-panel.js +135 -135
  80. package/fesm2015/bravura-ui-selection-panel.js +258 -258
  81. package/fesm2015/bravura-ui-tooltip.js +163 -128
  82. package/fesm2015/bravura-ui-tooltip.js.map +1 -1
  83. package/fesm2015/bravura-ui.js +2 -2
  84. package/fesm2015/bravura-ui.js.map +1 -1
  85. package/form-field/bravura-ui-form-field.d.ts +5 -5
  86. package/form-field/form-field.component.d.ts +27 -27
  87. package/form-field/form-field.module.d.ts +10 -10
  88. package/form-field/public-api.d.ts +2 -2
  89. package/icon-font/bravura-ui-icon-font.d.ts +5 -5
  90. package/icon-font/icon-font.module.d.ts +12 -12
  91. package/icon-font/icon.directive.d.ts +46 -46
  92. package/icon-font/public-api.d.ts +3 -3
  93. package/icon-font/utilities.d.ts +20 -20
  94. package/package.json +1 -1
  95. package/phone-number/bravura-ui-phone-number.d.ts +5 -5
  96. package/phone-number/phone-number.directive.d.ts +66 -66
  97. package/phone-number/phone-number.module.d.ts +17 -17
  98. package/phone-number/phone-number.pipe.d.ts +13 -13
  99. package/phone-number/phone-number.validator.d.ts +31 -31
  100. package/phone-number/public-api.d.ts +1 -1
  101. package/public-api.d.ts +1 -1
  102. package/radio-panel/bravura-ui-radio-panel.d.ts +5 -5
  103. package/radio-panel/public-api.d.ts +3 -3
  104. package/radio-panel/radio-panel-item.component.d.ts +17 -17
  105. package/radio-panel/radio-panel.directive.d.ts +26 -26
  106. package/radio-panel/radio-panel.module.d.ts +15 -15
  107. package/selection-panel/bravura-ui-selection-panel.d.ts +5 -5
  108. package/selection-panel/public-api.d.ts +3 -3
  109. package/selection-panel/selection-panel-item.component.d.ts +63 -63
  110. package/selection-panel/selection-panel.directive.d.ts +67 -67
  111. package/selection-panel/selection-panel.module.d.ts +12 -12
  112. package/tooltip/bravura-ui-tooltip.d.ts +5 -5
  113. package/tooltip/public-api.d.ts +2 -2
  114. package/tooltip/tooltip.component.d.ts +24 -14
  115. package/tooltip/tooltip.directive.d.ts +39 -36
  116. package/tooltip/tooltip.module.d.ts +13 -13
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('intl-tel-input'), require('rxjs'), require('rxjs/operators'), require('@angular/forms'), require('@angular/material/form-field')) :
3
3
  typeof define === 'function' && define.amd ? define('@bravura/ui/phone-number', ['exports', '@angular/common', '@angular/core', 'intl-tel-input', 'rxjs', 'rxjs/operators', '@angular/forms', '@angular/material/form-field'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bravura = global.bravura || {}, global.bravura.ui = global.bravura.ui || {}, global.bravura.ui['phone-number'] = {}), global.ng.common, global.ng.core, global.intlTelInput, global.rxjs, global.rxjs.operators, global.ng.forms, global.ng.material.formField));
5
- }(this, (function (exports, common, i0, intlTelInput, rxjs, operators, i1, i2) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bravura = global.bravura || {}, global.bravura.ui = global.bravura.ui || {}, global.bravura.ui["phone-number"] = {}), global.ng.common, global.ng.core, global.intlTelInput, global.rxjs, global.rxjs.operators, global.ng.forms, global.ng.material.formField));
5
+ })(this, (function (exports, common, i0, intlTelInput, rxjs, operators, i1, i2) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -15,14 +15,12 @@
15
15
  var d = Object.getOwnPropertyDescriptor(e, k);
16
16
  Object.defineProperty(n, k, d.get ? d : {
17
17
  enumerable: true,
18
- get: function () {
19
- return e[k];
20
- }
18
+ get: function () { return e[k]; }
21
19
  });
22
20
  }
23
21
  });
24
22
  }
25
- n['default'] = e;
23
+ n["default"] = e;
26
24
  return Object.freeze(n);
27
25
  }
28
26
 
@@ -31,645 +29,645 @@
31
29
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
32
30
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
33
31
 
34
- /*! *****************************************************************************
35
- Copyright (c) Microsoft Corporation.
36
-
37
- Permission to use, copy, modify, and/or distribute this software for any
38
- purpose with or without fee is hereby granted.
39
-
40
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
41
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
42
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
43
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
44
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
45
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
46
- PERFORMANCE OF THIS SOFTWARE.
47
- ***************************************************************************** */
48
- /* global Reflect, Promise */
49
- var extendStatics = function (d, b) {
50
- extendStatics = Object.setPrototypeOf ||
51
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52
- function (d, b) { for (var p in b)
53
- if (Object.prototype.hasOwnProperty.call(b, p))
54
- d[p] = b[p]; };
55
- return extendStatics(d, b);
56
- };
57
- function __extends(d, b) {
58
- if (typeof b !== "function" && b !== null)
59
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
60
- extendStatics(d, b);
61
- function __() { this.constructor = d; }
62
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
63
- }
64
- var __assign = function () {
65
- __assign = Object.assign || function __assign(t) {
66
- for (var s, i = 1, n = arguments.length; i < n; i++) {
67
- s = arguments[i];
68
- for (var p in s)
69
- if (Object.prototype.hasOwnProperty.call(s, p))
70
- t[p] = s[p];
71
- }
72
- return t;
73
- };
74
- return __assign.apply(this, arguments);
75
- };
76
- function __rest(s, e) {
77
- var t = {};
78
- for (var p in s)
79
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
80
- t[p] = s[p];
81
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
82
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
83
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
84
- t[p[i]] = s[p[i]];
85
- }
86
- return t;
87
- }
88
- function __decorate(decorators, target, key, desc) {
89
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
90
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
91
- r = Reflect.decorate(decorators, target, key, desc);
92
- else
93
- for (var i = decorators.length - 1; i >= 0; i--)
94
- if (d = decorators[i])
95
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
96
- return c > 3 && r && Object.defineProperty(target, key, r), r;
97
- }
98
- function __param(paramIndex, decorator) {
99
- return function (target, key) { decorator(target, key, paramIndex); };
100
- }
101
- function __metadata(metadataKey, metadataValue) {
102
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
103
- return Reflect.metadata(metadataKey, metadataValue);
104
- }
105
- function __awaiter(thisArg, _arguments, P, generator) {
106
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
107
- return new (P || (P = Promise))(function (resolve, reject) {
108
- function fulfilled(value) { try {
109
- step(generator.next(value));
110
- }
111
- catch (e) {
112
- reject(e);
113
- } }
114
- function rejected(value) { try {
115
- step(generator["throw"](value));
116
- }
117
- catch (e) {
118
- reject(e);
119
- } }
120
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
121
- step((generator = generator.apply(thisArg, _arguments || [])).next());
122
- });
123
- }
124
- function __generator(thisArg, body) {
125
- var _ = { label: 0, sent: function () { if (t[0] & 1)
126
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
127
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
128
- function verb(n) { return function (v) { return step([n, v]); }; }
129
- function step(op) {
130
- if (f)
131
- throw new TypeError("Generator is already executing.");
132
- while (_)
133
- try {
134
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
135
- return t;
136
- if (y = 0, t)
137
- op = [op[0] & 2, t.value];
138
- switch (op[0]) {
139
- case 0:
140
- case 1:
141
- t = op;
142
- break;
143
- case 4:
144
- _.label++;
145
- return { value: op[1], done: false };
146
- case 5:
147
- _.label++;
148
- y = op[1];
149
- op = [0];
150
- continue;
151
- case 7:
152
- op = _.ops.pop();
153
- _.trys.pop();
154
- continue;
155
- default:
156
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
157
- _ = 0;
158
- continue;
159
- }
160
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
161
- _.label = op[1];
162
- break;
163
- }
164
- if (op[0] === 6 && _.label < t[1]) {
165
- _.label = t[1];
166
- t = op;
167
- break;
168
- }
169
- if (t && _.label < t[2]) {
170
- _.label = t[2];
171
- _.ops.push(op);
172
- break;
173
- }
174
- if (t[2])
175
- _.ops.pop();
176
- _.trys.pop();
177
- continue;
178
- }
179
- op = body.call(thisArg, _);
180
- }
181
- catch (e) {
182
- op = [6, e];
183
- y = 0;
184
- }
185
- finally {
186
- f = t = 0;
187
- }
188
- if (op[0] & 5)
189
- throw op[1];
190
- return { value: op[0] ? op[1] : void 0, done: true };
191
- }
192
- }
193
- var __createBinding = Object.create ? (function (o, m, k, k2) {
194
- if (k2 === undefined)
195
- k2 = k;
196
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
197
- }) : (function (o, m, k, k2) {
198
- if (k2 === undefined)
199
- k2 = k;
200
- o[k2] = m[k];
201
- });
202
- function __exportStar(m, o) {
203
- for (var p in m)
204
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
205
- __createBinding(o, m, p);
206
- }
207
- function __values(o) {
208
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
209
- if (m)
210
- return m.call(o);
211
- if (o && typeof o.length === "number")
212
- return {
213
- next: function () {
214
- if (o && i >= o.length)
215
- o = void 0;
216
- return { value: o && o[i++], done: !o };
217
- }
218
- };
219
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
220
- }
221
- function __read(o, n) {
222
- var m = typeof Symbol === "function" && o[Symbol.iterator];
223
- if (!m)
224
- return o;
225
- var i = m.call(o), r, ar = [], e;
226
- try {
227
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
228
- ar.push(r.value);
229
- }
230
- catch (error) {
231
- e = { error: error };
232
- }
233
- finally {
234
- try {
235
- if (r && !r.done && (m = i["return"]))
236
- m.call(i);
237
- }
238
- finally {
239
- if (e)
240
- throw e.error;
241
- }
242
- }
243
- return ar;
244
- }
245
- /** @deprecated */
246
- function __spread() {
247
- for (var ar = [], i = 0; i < arguments.length; i++)
248
- ar = ar.concat(__read(arguments[i]));
249
- return ar;
250
- }
251
- /** @deprecated */
252
- function __spreadArrays() {
253
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
254
- s += arguments[i].length;
255
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
256
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
257
- r[k] = a[j];
258
- return r;
259
- }
260
- function __spreadArray(to, from, pack) {
261
- if (pack || arguments.length === 2)
262
- for (var i = 0, l = from.length, ar; i < l; i++) {
263
- if (ar || !(i in from)) {
264
- if (!ar)
265
- ar = Array.prototype.slice.call(from, 0, i);
266
- ar[i] = from[i];
267
- }
268
- }
269
- return to.concat(ar || from);
270
- }
271
- function __await(v) {
272
- return this instanceof __await ? (this.v = v, this) : new __await(v);
273
- }
274
- function __asyncGenerator(thisArg, _arguments, generator) {
275
- if (!Symbol.asyncIterator)
276
- throw new TypeError("Symbol.asyncIterator is not defined.");
277
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
278
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
279
- function verb(n) { if (g[n])
280
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
281
- function resume(n, v) { try {
282
- step(g[n](v));
283
- }
284
- catch (e) {
285
- settle(q[0][3], e);
286
- } }
287
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
288
- function fulfill(value) { resume("next", value); }
289
- function reject(value) { resume("throw", value); }
290
- function settle(f, v) { if (f(v), q.shift(), q.length)
291
- resume(q[0][0], q[0][1]); }
292
- }
293
- function __asyncDelegator(o) {
294
- var i, p;
295
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
296
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
297
- }
298
- function __asyncValues(o) {
299
- if (!Symbol.asyncIterator)
300
- throw new TypeError("Symbol.asyncIterator is not defined.");
301
- var m = o[Symbol.asyncIterator], i;
302
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
303
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
304
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
305
- }
306
- function __makeTemplateObject(cooked, raw) {
307
- if (Object.defineProperty) {
308
- Object.defineProperty(cooked, "raw", { value: raw });
309
- }
310
- else {
311
- cooked.raw = raw;
312
- }
313
- return cooked;
314
- }
315
- ;
316
- var __setModuleDefault = Object.create ? (function (o, v) {
317
- Object.defineProperty(o, "default", { enumerable: true, value: v });
318
- }) : function (o, v) {
319
- o["default"] = v;
320
- };
321
- function __importStar(mod) {
322
- if (mod && mod.__esModule)
323
- return mod;
324
- var result = {};
325
- if (mod != null)
326
- for (var k in mod)
327
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
328
- __createBinding(result, mod, k);
329
- __setModuleDefault(result, mod);
330
- return result;
331
- }
332
- function __importDefault(mod) {
333
- return (mod && mod.__esModule) ? mod : { default: mod };
334
- }
335
- function __classPrivateFieldGet(receiver, state, kind, f) {
336
- if (kind === "a" && !f)
337
- throw new TypeError("Private accessor was defined without a getter");
338
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
339
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
340
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
341
- }
342
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
343
- if (kind === "m")
344
- throw new TypeError("Private method is not writable");
345
- if (kind === "a" && !f)
346
- throw new TypeError("Private accessor was defined without a setter");
347
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
348
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
349
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
32
+ /*! *****************************************************************************
33
+ Copyright (c) Microsoft Corporation.
34
+
35
+ Permission to use, copy, modify, and/or distribute this software for any
36
+ purpose with or without fee is hereby granted.
37
+
38
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
39
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
40
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
41
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
42
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
+ PERFORMANCE OF THIS SOFTWARE.
45
+ ***************************************************************************** */
46
+ /* global Reflect, Promise */
47
+ var extendStatics = function (d, b) {
48
+ extendStatics = Object.setPrototypeOf ||
49
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
50
+ function (d, b) { for (var p in b)
51
+ if (Object.prototype.hasOwnProperty.call(b, p))
52
+ d[p] = b[p]; };
53
+ return extendStatics(d, b);
54
+ };
55
+ function __extends(d, b) {
56
+ if (typeof b !== "function" && b !== null)
57
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
58
+ extendStatics(d, b);
59
+ function __() { this.constructor = d; }
60
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
61
+ }
62
+ var __assign = function () {
63
+ __assign = Object.assign || function __assign(t) {
64
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
65
+ s = arguments[i];
66
+ for (var p in s)
67
+ if (Object.prototype.hasOwnProperty.call(s, p))
68
+ t[p] = s[p];
69
+ }
70
+ return t;
71
+ };
72
+ return __assign.apply(this, arguments);
73
+ };
74
+ function __rest(s, e) {
75
+ var t = {};
76
+ for (var p in s)
77
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
78
+ t[p] = s[p];
79
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
80
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
81
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
82
+ t[p[i]] = s[p[i]];
83
+ }
84
+ return t;
85
+ }
86
+ function __decorate(decorators, target, key, desc) {
87
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
88
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
89
+ r = Reflect.decorate(decorators, target, key, desc);
90
+ else
91
+ for (var i = decorators.length - 1; i >= 0; i--)
92
+ if (d = decorators[i])
93
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
94
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
95
+ }
96
+ function __param(paramIndex, decorator) {
97
+ return function (target, key) { decorator(target, key, paramIndex); };
98
+ }
99
+ function __metadata(metadataKey, metadataValue) {
100
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
101
+ return Reflect.metadata(metadataKey, metadataValue);
102
+ }
103
+ function __awaiter(thisArg, _arguments, P, generator) {
104
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
105
+ return new (P || (P = Promise))(function (resolve, reject) {
106
+ function fulfilled(value) { try {
107
+ step(generator.next(value));
108
+ }
109
+ catch (e) {
110
+ reject(e);
111
+ } }
112
+ function rejected(value) { try {
113
+ step(generator["throw"](value));
114
+ }
115
+ catch (e) {
116
+ reject(e);
117
+ } }
118
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
119
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
120
+ });
121
+ }
122
+ function __generator(thisArg, body) {
123
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
124
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
125
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
126
+ function verb(n) { return function (v) { return step([n, v]); }; }
127
+ function step(op) {
128
+ if (f)
129
+ throw new TypeError("Generator is already executing.");
130
+ while (_)
131
+ try {
132
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
133
+ return t;
134
+ if (y = 0, t)
135
+ op = [op[0] & 2, t.value];
136
+ switch (op[0]) {
137
+ case 0:
138
+ case 1:
139
+ t = op;
140
+ break;
141
+ case 4:
142
+ _.label++;
143
+ return { value: op[1], done: false };
144
+ case 5:
145
+ _.label++;
146
+ y = op[1];
147
+ op = [0];
148
+ continue;
149
+ case 7:
150
+ op = _.ops.pop();
151
+ _.trys.pop();
152
+ continue;
153
+ default:
154
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
155
+ _ = 0;
156
+ continue;
157
+ }
158
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
159
+ _.label = op[1];
160
+ break;
161
+ }
162
+ if (op[0] === 6 && _.label < t[1]) {
163
+ _.label = t[1];
164
+ t = op;
165
+ break;
166
+ }
167
+ if (t && _.label < t[2]) {
168
+ _.label = t[2];
169
+ _.ops.push(op);
170
+ break;
171
+ }
172
+ if (t[2])
173
+ _.ops.pop();
174
+ _.trys.pop();
175
+ continue;
176
+ }
177
+ op = body.call(thisArg, _);
178
+ }
179
+ catch (e) {
180
+ op = [6, e];
181
+ y = 0;
182
+ }
183
+ finally {
184
+ f = t = 0;
185
+ }
186
+ if (op[0] & 5)
187
+ throw op[1];
188
+ return { value: op[0] ? op[1] : void 0, done: true };
189
+ }
190
+ }
191
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
192
+ if (k2 === undefined)
193
+ k2 = k;
194
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
195
+ }) : (function (o, m, k, k2) {
196
+ if (k2 === undefined)
197
+ k2 = k;
198
+ o[k2] = m[k];
199
+ });
200
+ function __exportStar(m, o) {
201
+ for (var p in m)
202
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
203
+ __createBinding(o, m, p);
204
+ }
205
+ function __values(o) {
206
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
207
+ if (m)
208
+ return m.call(o);
209
+ if (o && typeof o.length === "number")
210
+ return {
211
+ next: function () {
212
+ if (o && i >= o.length)
213
+ o = void 0;
214
+ return { value: o && o[i++], done: !o };
215
+ }
216
+ };
217
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
218
+ }
219
+ function __read(o, n) {
220
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
221
+ if (!m)
222
+ return o;
223
+ var i = m.call(o), r, ar = [], e;
224
+ try {
225
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
226
+ ar.push(r.value);
227
+ }
228
+ catch (error) {
229
+ e = { error: error };
230
+ }
231
+ finally {
232
+ try {
233
+ if (r && !r.done && (m = i["return"]))
234
+ m.call(i);
235
+ }
236
+ finally {
237
+ if (e)
238
+ throw e.error;
239
+ }
240
+ }
241
+ return ar;
242
+ }
243
+ /** @deprecated */
244
+ function __spread() {
245
+ for (var ar = [], i = 0; i < arguments.length; i++)
246
+ ar = ar.concat(__read(arguments[i]));
247
+ return ar;
248
+ }
249
+ /** @deprecated */
250
+ function __spreadArrays() {
251
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
252
+ s += arguments[i].length;
253
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
254
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
255
+ r[k] = a[j];
256
+ return r;
257
+ }
258
+ function __spreadArray(to, from, pack) {
259
+ if (pack || arguments.length === 2)
260
+ for (var i = 0, l = from.length, ar; i < l; i++) {
261
+ if (ar || !(i in from)) {
262
+ if (!ar)
263
+ ar = Array.prototype.slice.call(from, 0, i);
264
+ ar[i] = from[i];
265
+ }
266
+ }
267
+ return to.concat(ar || from);
268
+ }
269
+ function __await(v) {
270
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
271
+ }
272
+ function __asyncGenerator(thisArg, _arguments, generator) {
273
+ if (!Symbol.asyncIterator)
274
+ throw new TypeError("Symbol.asyncIterator is not defined.");
275
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
276
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
277
+ function verb(n) { if (g[n])
278
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
279
+ function resume(n, v) { try {
280
+ step(g[n](v));
281
+ }
282
+ catch (e) {
283
+ settle(q[0][3], e);
284
+ } }
285
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
286
+ function fulfill(value) { resume("next", value); }
287
+ function reject(value) { resume("throw", value); }
288
+ function settle(f, v) { if (f(v), q.shift(), q.length)
289
+ resume(q[0][0], q[0][1]); }
290
+ }
291
+ function __asyncDelegator(o) {
292
+ var i, p;
293
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
294
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
295
+ }
296
+ function __asyncValues(o) {
297
+ if (!Symbol.asyncIterator)
298
+ throw new TypeError("Symbol.asyncIterator is not defined.");
299
+ var m = o[Symbol.asyncIterator], i;
300
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
301
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
302
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
303
+ }
304
+ function __makeTemplateObject(cooked, raw) {
305
+ if (Object.defineProperty) {
306
+ Object.defineProperty(cooked, "raw", { value: raw });
307
+ }
308
+ else {
309
+ cooked.raw = raw;
310
+ }
311
+ return cooked;
312
+ }
313
+ ;
314
+ var __setModuleDefault = Object.create ? (function (o, v) {
315
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
316
+ }) : function (o, v) {
317
+ o["default"] = v;
318
+ };
319
+ function __importStar(mod) {
320
+ if (mod && mod.__esModule)
321
+ return mod;
322
+ var result = {};
323
+ if (mod != null)
324
+ for (var k in mod)
325
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
326
+ __createBinding(result, mod, k);
327
+ __setModuleDefault(result, mod);
328
+ return result;
329
+ }
330
+ function __importDefault(mod) {
331
+ return (mod && mod.__esModule) ? mod : { default: mod };
332
+ }
333
+ function __classPrivateFieldGet(receiver, state, kind, f) {
334
+ if (kind === "a" && !f)
335
+ throw new TypeError("Private accessor was defined without a getter");
336
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
337
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
338
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
339
+ }
340
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
341
+ if (kind === "m")
342
+ throw new TypeError("Private method is not writable");
343
+ if (kind === "a" && !f)
344
+ throw new TypeError("Private accessor was defined without a setter");
345
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
346
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
347
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
350
348
  }
351
349
 
352
- /**
353
- * @internal
354
- */
355
- var PhoneNumberPipe = /** @class */ (function () {
356
- function PhoneNumberPipe(_locale) {
357
- this._locale = _locale;
358
- }
359
- PhoneNumberPipe.prototype.transform = function (value, mode, renderLink) {
360
- if (!value) {
361
- return value;
362
- }
363
- var countryCode = getCountryCodeFromLocale(this._locale);
364
- var format;
365
- switch (mode) {
366
- case 'NATIONAL':
367
- format = intlTelInputUtils.numberFormat.NATIONAL;
368
- break;
369
- default:
370
- format = intlTelInputUtils.numberFormat.INTERNATIONAL;
371
- }
372
- var result = intlTelInputUtils.formatNumber(value, countryCode, format);
373
- if (renderLink) {
374
- return "<a href=\"tel:" + result + "\">" + result + "</a>";
375
- }
376
- else {
377
- return result;
378
- }
379
- };
380
- return PhoneNumberPipe;
381
- }());
382
- PhoneNumberPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PhoneNumberPipe, deps: [{ token: i0.LOCALE_ID }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
383
- PhoneNumberPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PhoneNumberPipe, name: "buiPhone" });
384
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PhoneNumberPipe, decorators: [{
385
- type: i0.Pipe,
386
- args: [{
387
- name: 'buiPhone',
388
- pure: true
389
- }]
390
- }], ctorParameters: function () {
391
- return [{ type: undefined, decorators: [{
392
- type: i0.Inject,
393
- args: [i0.LOCALE_ID]
394
- }] }];
395
- } });
396
- function getCountryCodeFromLocale(locale) {
397
- return locale.replace(/.+[-_]([a-z][a-z])$/i, '$1');
350
+ /**
351
+ * @internal
352
+ */
353
+ var PhoneNumberPipe = /** @class */ (function () {
354
+ function PhoneNumberPipe(_locale) {
355
+ this._locale = _locale;
356
+ }
357
+ PhoneNumberPipe.prototype.transform = function (value, mode, renderLink) {
358
+ if (!value) {
359
+ return value;
360
+ }
361
+ var countryCode = getCountryCodeFromLocale(this._locale);
362
+ var format;
363
+ switch (mode) {
364
+ case 'NATIONAL':
365
+ format = intlTelInputUtils.numberFormat.NATIONAL;
366
+ break;
367
+ default:
368
+ format = intlTelInputUtils.numberFormat.INTERNATIONAL;
369
+ }
370
+ var result = intlTelInputUtils.formatNumber(value, countryCode, format);
371
+ if (renderLink) {
372
+ return "<a href=\"tel:" + result + "\">" + result + "</a>";
373
+ }
374
+ else {
375
+ return result;
376
+ }
377
+ };
378
+ return PhoneNumberPipe;
379
+ }());
380
+ PhoneNumberPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: PhoneNumberPipe, deps: [{ token: i0.LOCALE_ID }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
381
+ PhoneNumberPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: PhoneNumberPipe, name: "buiPhone" });
382
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: PhoneNumberPipe, decorators: [{
383
+ type: i0.Pipe,
384
+ args: [{
385
+ name: 'buiPhone',
386
+ pure: true
387
+ }]
388
+ }], ctorParameters: function () {
389
+ return [{ type: undefined, decorators: [{
390
+ type: i0.Inject,
391
+ args: [i0.LOCALE_ID]
392
+ }] }];
393
+ } });
394
+ function getCountryCodeFromLocale(locale) {
395
+ return locale.replace(/.+[-_]([a-z][a-z])$/i, '$1');
398
396
  }
399
397
 
400
- /**
401
- * @internal
402
- */
403
- var SELECTOR = '[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]';
404
- /**
405
- * @internal
406
- */
407
- var PHONE_VALIDATOR = {
408
- provide: i1.NG_VALIDATORS,
409
- useExisting: i0.forwardRef(function () { return PhoneNumberValidator; }),
410
- multi: true
411
- };
412
- /**
413
- * @internal
414
- */
415
- var PhoneNumberValidator = /** @class */ (function () {
416
- function PhoneNumberValidator(_el) {
417
- this._el = _el;
418
- this.telType = 'FIXED_LINE';
419
- }
420
- PhoneNumberValidator.validateControl = function (inp, type, update) {
421
- var err = { tel: true };
422
- if (!inp.value) {
423
- return null;
424
- }
425
- var iti = inp.$$iti;
426
- if (!iti) {
427
- return null;
428
- }
429
- if (iti.isValidNumber()) {
430
- var n = iti.getNumber(intlTelInputUtils.numberFormat.INTERNATIONAL);
431
- if (update) {
432
- inp.value = n;
433
- }
434
- var t = iti.getNumberType();
435
- if (t !== intlTelInputUtils.numberType.FIXED_LINE_OR_MOBILE) {
436
- if ((type === 'MOBILE' && t !== intlTelInputUtils.numberType.MOBILE) ||
437
- (type === 'FIXED_LINE' && t !== intlTelInputUtils.numberType.FIXED_LINE)) {
438
- return err;
439
- }
440
- }
441
- return null;
442
- }
443
- return err;
444
- };
445
- PhoneNumberValidator.prototype.validate = function (_) {
446
- return PhoneNumberValidator.validateControl(this._el.nativeElement, this.telType, false);
447
- };
448
- return PhoneNumberValidator;
449
- }());
450
- PhoneNumberValidator.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PhoneNumberValidator, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
451
- PhoneNumberValidator.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.4", type: PhoneNumberValidator, selector: "[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]", inputs: { telType: "telType" }, providers: [PHONE_VALIDATOR], ngImport: i0__namespace });
452
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PhoneNumberValidator, decorators: [{
453
- type: i0.Directive,
454
- args: [{
455
- selector: SELECTOR,
456
- providers: [PHONE_VALIDATOR]
457
- }]
458
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { telType: [{
459
- type: i0.Input
398
+ /**
399
+ * @internal
400
+ */
401
+ var SELECTOR = '[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]';
402
+ /**
403
+ * @internal
404
+ */
405
+ var PHONE_VALIDATOR = {
406
+ provide: i1.NG_VALIDATORS,
407
+ useExisting: i0.forwardRef(function () { return PhoneNumberValidator; }),
408
+ multi: true
409
+ };
410
+ /**
411
+ * @internal
412
+ */
413
+ var PhoneNumberValidator = /** @class */ (function () {
414
+ function PhoneNumberValidator(_el) {
415
+ this._el = _el;
416
+ this.telType = 'FIXED_LINE';
417
+ }
418
+ PhoneNumberValidator.validateControl = function (inp, type, update) {
419
+ var err = { tel: true };
420
+ if (!inp.value) {
421
+ return null;
422
+ }
423
+ var iti = inp.$$iti;
424
+ if (!iti) {
425
+ return null;
426
+ }
427
+ if (iti.isValidNumber()) {
428
+ var n = iti.getNumber(intlTelInputUtils.numberFormat.INTERNATIONAL);
429
+ if (update) {
430
+ inp.value = n;
431
+ }
432
+ var t = iti.getNumberType();
433
+ if (t !== intlTelInputUtils.numberType.FIXED_LINE_OR_MOBILE) {
434
+ if ((type === 'MOBILE' && t !== intlTelInputUtils.numberType.MOBILE) ||
435
+ (type === 'FIXED_LINE' && t !== intlTelInputUtils.numberType.FIXED_LINE)) {
436
+ return err;
437
+ }
438
+ }
439
+ return null;
440
+ }
441
+ return err;
442
+ };
443
+ PhoneNumberValidator.prototype.validate = function (_) {
444
+ return PhoneNumberValidator.validateControl(this._el.nativeElement, this.telType, false);
445
+ };
446
+ return PhoneNumberValidator;
447
+ }());
448
+ PhoneNumberValidator.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: PhoneNumberValidator, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
449
+ PhoneNumberValidator.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.7", type: PhoneNumberValidator, selector: "[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]", inputs: { telType: "telType" }, providers: [PHONE_VALIDATOR], ngImport: i0__namespace });
450
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: PhoneNumberValidator, decorators: [{
451
+ type: i0.Directive,
452
+ args: [{
453
+ selector: SELECTOR,
454
+ providers: [PHONE_VALIDATOR]
455
+ }]
456
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { telType: [{
457
+ type: i0.Input
460
458
  }] } });
461
459
 
462
- /**
463
- * Add phone number validation support by specifying the `type` attribute as `tel` in an `<input>` element.
464
- *
465
- * To use this feature, please install a peer dependency `intl-tel-input` in your project and add the following
466
- * to your application polyfills:
467
- *
468
- * ```javascript
469
- * import 'intl-tel-input/build/js/utils.js';
470
- * ```
471
- *
472
- * You will also need to add the following statements to one of your global SCSS files:
473
- *
474
- * ```scss
475
- * $flagsImagePath: '~intl-tel-input/build/img/' !default;
476
- * @import '~intl-tel-input/src/css/intlTelInput';
477
- * ```
478
- */
479
- var PhoneNumberDirective = /** @class */ (function () {
480
- function PhoneNumberDirective(_el, _ngModel, _formControlName, _formControlDirective, _locale, _zone, _matField) {
481
- this._el = _el;
482
- this._ngModel = _ngModel;
483
- this._formControlName = _formControlName;
484
- this._formControlDirective = _formControlDirective;
485
- this._locale = _locale;
486
- this._zone = _zone;
487
- this._matField = _matField;
488
- /**
489
- * The type of phone number to validate for
490
- */
491
- this.telType = 'FIXED_LINE';
492
- /**
493
- * Disable country dropdown by setting this property to `false`.
494
- */
495
- this.telDropdown = true;
496
- /**
497
- * This event is triggered when a new country is selected from the dropdown. The event detail is the ISO country code.
498
- */
499
- this.telCountryChange = new i0.EventEmitter();
500
- this._reactive = false;
501
- this._countryChangeListener = function () { return null; };
502
- }
503
- /** @internal */
504
- PhoneNumberDirective.prototype.onInput = function () {
505
- var err = PhoneNumberValidator.validateControl(this._input, this.telType, true);
506
- this._control.patchValue(this._input.value, { emitEvent: false });
507
- if (this._reactive && err) {
508
- this._control.setErrors(Object.assign(Object.assign({}, this._control.errors), err));
509
- }
510
- };
511
- PhoneNumberDirective.prototype.ngOnInit = function () {
512
- var _this = this;
513
- var ctrDirective = this._ngModel || this._formControlName || this._formControlDirective;
514
- this._control = ctrDirective.control;
515
- this._reactive = this._ngModel ? false : true;
516
- this._input = this._el.nativeElement;
517
- this._countryChangeListener = (function () {
518
- _this._zone.run(function () {
519
- _this._control.markAsDirty();
520
- _this._control.updateValueAndValidity({ emitEvent: true });
521
- _this.telCountryChange.emit(_this._iti.getSelectedCountryData().iso2);
522
- });
523
- }).bind(this);
524
- (PhoneNumberDirective.BYPASS_SHADOW_DETECTION ? rxjs.of(0) : this._zone.onStable)
525
- .pipe(operators.debounceTime(10), operators.take(1))
526
- .subscribe(function () { return _this.initElement(); });
527
- };
528
- PhoneNumberDirective.prototype.ngOnDestroy = function () {
529
- var _a;
530
- this._input.removeEventListener('countrychange', this._countryChangeListener);
531
- (_a = this._iti) === null || _a === void 0 ? void 0 : _a.destroy();
532
- };
533
- PhoneNumberDirective.prototype.ngOnChanges = function (changes) {
534
- var td = changes.telDropdown;
535
- if (td && !td.firstChange) {
536
- this.ngOnDestroy();
537
- this.ngOnInit();
538
- }
539
- var type = changes.telType;
540
- if (type && !type.firstChange) {
541
- this.onInput();
542
- }
543
- };
544
- PhoneNumberDirective.prototype.initElement = function () {
545
- var _this = this;
546
- var _a;
547
- var countryCode = getCountryCodeFromLocale(this._locale).toLowerCase();
548
- var root = this._input.getRootNode();
549
- if (!root.querySelector('#bui-tel-input-style')) {
550
- var styleTag = document.createElement('style');
551
- styleTag.id = 'bui-tel-input-style';
552
- styleTag.innerText =
553
- '.mat-form-field:not(.mat-focused) .bui-tel-input-placeholder.mat-empty { margin-left: 52px }' +
554
- '.bui-tel-input-with-value:disabled { cursor: pointer;}';
555
- (root instanceof Document ? root.querySelector('head') : root).appendChild(styleTag);
556
- }
557
- this._iti = intlTelInput__default['default'](this._input, {
558
- initialCountry: countryCode,
559
- placeholderNumberType: this.telType,
560
- preferredCountries: __spreadArray([countryCode], __read(['au', 'ca', 'nz', 'us', 'gb'].filter(function (c) { return c !== countryCode; }))),
561
- dropdownContainer: root instanceof ShadowRoot ? root.querySelector('overlay-root') : root.body,
562
- autoPlaceholder: 'off',
563
- allowDropdown: this.telDropdown
564
- });
565
- this._input.$$iti = this._iti;
566
- this._input.addEventListener('countrychange', this._countryChangeListener);
567
- var frameTime = Date.now();
568
- var postRenderWork = function () {
569
- var _a, _b;
570
- if (frameTime + PhoneNumberDirective.POST_RENDER_INIT_DELAY > Date.now()) {
571
- window.requestAnimationFrame(postRenderWork);
572
- return;
573
- }
574
- var label;
575
- if (((_a = _this._matField) === null || _a === void 0 ? void 0 : _a.getLabelId()) && typeof root.getElementById === 'function') {
576
- label = root.getElementById(_this._matField.getLabelId());
577
- label === null || label === void 0 ? void 0 : label.classList.remove('bui-tel-input-placeholder');
578
- }
579
- if (label && _this.telDropdown) {
580
- label.classList.add('bui-tel-input-placeholder');
581
- }
582
- if ((_b = _this._input) === null || _b === void 0 ? void 0 : _b.value) {
583
- _this._input.classList.add('bui-tel-input-with-value');
584
- }
585
- };
586
- window.requestAnimationFrame(postRenderWork);
587
- this._input.addEventListener('click', function () {
588
- var _a;
589
- if (((_a = _this._control) === null || _a === void 0 ? void 0 : _a.disabled) && _this._control.value) {
590
- window.location.href = 'tel://' + _this._control.value;
591
- }
592
- });
593
- (_a = this._control) === null || _a === void 0 ? void 0 : _a.registerOnDisabledChange(function (isDisabled) { return _this._patchValueByState(isDisabled); });
594
- this._patchValueByState(this._control.disabled);
595
- };
596
- PhoneNumberDirective.prototype._patchValueByState = function (isDisabled) {
597
- var _this = this;
598
- setTimeout(function () {
599
- var _a, _b;
600
- if (!isDisabled) {
601
- _this.onInput();
602
- }
603
- else {
604
- var v = _this._iti.getNumber(intlTelInputUtils.numberFormat.NATIONAL);
605
- _this._input.value = v;
606
- (_a = _this._control) === null || _a === void 0 ? void 0 : _a.patchValue((_b = _this._input) === null || _b === void 0 ? void 0 : _b.value, { emitEvent: false });
607
- }
608
- }, 20);
609
- };
610
- return PhoneNumberDirective;
611
- }());
612
- /**
613
- * @ignore
614
- */
615
- PhoneNumberDirective.POST_RENDER_INIT_DELAY = 20;
616
- /**
617
- * @ignore
618
- */
619
- PhoneNumberDirective.BYPASS_SHADOW_DETECTION = false;
620
- PhoneNumberDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PhoneNumberDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace.NgModel, optional: true }, { token: i1__namespace.FormControlName, optional: true }, { token: i1__namespace.FormControlDirective, optional: true }, { token: i0.LOCALE_ID }, { token: i0__namespace.NgZone }, { token: i2__namespace.MatFormField, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
621
- PhoneNumberDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.4", type: PhoneNumberDirective, selector: "[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]", inputs: { telType: "telType", telDropdown: "telDropdown" }, outputs: { telCountryChange: "telCountryChange" }, host: { listeners: { "input": "onInput()" } }, usesOnChanges: true, ngImport: i0__namespace });
622
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PhoneNumberDirective, decorators: [{
623
- type: i0.Directive,
624
- args: [{
625
- selector: SELECTOR
626
- }]
627
- }], ctorParameters: function () {
628
- return [{ type: i0__namespace.ElementRef }, { type: i1__namespace.NgModel, decorators: [{
629
- type: i0.Optional
630
- }] }, { type: i1__namespace.FormControlName, decorators: [{
631
- type: i0.Optional
632
- }] }, { type: i1__namespace.FormControlDirective, decorators: [{
633
- type: i0.Optional
634
- }] }, { type: undefined, decorators: [{
635
- type: i0.Inject,
636
- args: [i0.LOCALE_ID]
637
- }] }, { type: i0__namespace.NgZone }, { type: i2__namespace.MatFormField, decorators: [{
638
- type: i0.Optional
639
- }] }];
640
- }, propDecorators: { telType: [{
641
- type: i0.Input
642
- }], telDropdown: [{
643
- type: i0.Input
644
- }], telCountryChange: [{
645
- type: i0.Output
646
- }], onInput: [{
647
- type: i0.HostListener,
648
- args: ['input']
460
+ /**
461
+ * Add phone number validation support by specifying the `type` attribute as `tel` in an `<input>` element.
462
+ *
463
+ * To use this feature, please install a peer dependency `intl-tel-input` in your project and add the following
464
+ * to your application polyfills:
465
+ *
466
+ * ```javascript
467
+ * import 'intl-tel-input/build/js/utils.js';
468
+ * ```
469
+ *
470
+ * You will also need to add the following statements to one of your global SCSS files:
471
+ *
472
+ * ```scss
473
+ * $flagsImagePath: '~intl-tel-input/build/img/' !default;
474
+ * @import '~intl-tel-input/src/css/intlTelInput';
475
+ * ```
476
+ */
477
+ var PhoneNumberDirective = /** @class */ (function () {
478
+ function PhoneNumberDirective(_el, _ngModel, _formControlName, _formControlDirective, _locale, _zone, _matField) {
479
+ this._el = _el;
480
+ this._ngModel = _ngModel;
481
+ this._formControlName = _formControlName;
482
+ this._formControlDirective = _formControlDirective;
483
+ this._locale = _locale;
484
+ this._zone = _zone;
485
+ this._matField = _matField;
486
+ /**
487
+ * The type of phone number to validate for
488
+ */
489
+ this.telType = 'FIXED_LINE';
490
+ /**
491
+ * Disable country dropdown by setting this property to `false`.
492
+ */
493
+ this.telDropdown = true;
494
+ /**
495
+ * This event is triggered when a new country is selected from the dropdown. The event detail is the ISO country code.
496
+ */
497
+ this.telCountryChange = new i0.EventEmitter();
498
+ this._reactive = false;
499
+ this._countryChangeListener = function () { return null; };
500
+ }
501
+ /** @internal */
502
+ PhoneNumberDirective.prototype.onInput = function () {
503
+ var err = PhoneNumberValidator.validateControl(this._input, this.telType, true);
504
+ this._control.patchValue(this._input.value, { emitEvent: false });
505
+ if (this._reactive && err) {
506
+ this._control.setErrors(Object.assign(Object.assign({}, this._control.errors), err));
507
+ }
508
+ };
509
+ PhoneNumberDirective.prototype.ngOnInit = function () {
510
+ var _this = this;
511
+ var ctrDirective = this._ngModel || this._formControlName || this._formControlDirective;
512
+ this._control = ctrDirective.control;
513
+ this._reactive = this._ngModel ? false : true;
514
+ this._input = this._el.nativeElement;
515
+ this._countryChangeListener = (function () {
516
+ _this._zone.run(function () {
517
+ _this._control.markAsDirty();
518
+ _this._control.updateValueAndValidity({ emitEvent: true });
519
+ _this.telCountryChange.emit(_this._iti.getSelectedCountryData().iso2);
520
+ });
521
+ }).bind(this);
522
+ (PhoneNumberDirective.BYPASS_SHADOW_DETECTION ? rxjs.of(0) : this._zone.onStable)
523
+ .pipe(operators.debounceTime(10), operators.take(1))
524
+ .subscribe(function () { return _this.initElement(); });
525
+ };
526
+ PhoneNumberDirective.prototype.ngOnDestroy = function () {
527
+ var _a;
528
+ this._input.removeEventListener('countrychange', this._countryChangeListener);
529
+ (_a = this._iti) === null || _a === void 0 ? void 0 : _a.destroy();
530
+ };
531
+ PhoneNumberDirective.prototype.ngOnChanges = function (changes) {
532
+ var td = changes.telDropdown;
533
+ if (td && !td.firstChange) {
534
+ this.ngOnDestroy();
535
+ this.ngOnInit();
536
+ }
537
+ var type = changes.telType;
538
+ if (type && !type.firstChange) {
539
+ this.onInput();
540
+ }
541
+ };
542
+ PhoneNumberDirective.prototype.initElement = function () {
543
+ var _this = this;
544
+ var _a;
545
+ var countryCode = getCountryCodeFromLocale(this._locale).toLowerCase();
546
+ var root = this._input.getRootNode();
547
+ if (!root.querySelector('#bui-tel-input-style')) {
548
+ var styleTag = document.createElement('style');
549
+ styleTag.id = 'bui-tel-input-style';
550
+ styleTag.innerText =
551
+ '.mat-form-field:not(.mat-focused) .bui-tel-input-placeholder.mat-empty { margin-left: 52px }' +
552
+ '.bui-tel-input-with-value:disabled { cursor: pointer;}';
553
+ (root instanceof Document ? root.querySelector('head') : root).appendChild(styleTag);
554
+ }
555
+ this._iti = intlTelInput__default["default"](this._input, {
556
+ initialCountry: countryCode,
557
+ placeholderNumberType: this.telType,
558
+ preferredCountries: __spreadArray([countryCode], __read(['au', 'ca', 'nz', 'us', 'gb'].filter(function (c) { return c !== countryCode; }))),
559
+ dropdownContainer: root instanceof ShadowRoot ? root.querySelector('overlay-root') : root.body,
560
+ autoPlaceholder: 'off',
561
+ allowDropdown: this.telDropdown
562
+ });
563
+ this._input.$$iti = this._iti;
564
+ this._input.addEventListener('countrychange', this._countryChangeListener);
565
+ var frameTime = Date.now();
566
+ var postRenderWork = function () {
567
+ var _a, _b;
568
+ if (frameTime + PhoneNumberDirective.POST_RENDER_INIT_DELAY > Date.now()) {
569
+ window.requestAnimationFrame(postRenderWork);
570
+ return;
571
+ }
572
+ var label;
573
+ if (((_a = _this._matField) === null || _a === void 0 ? void 0 : _a.getLabelId()) && typeof root.getElementById === 'function') {
574
+ label = root.getElementById(_this._matField.getLabelId());
575
+ label === null || label === void 0 ? void 0 : label.classList.remove('bui-tel-input-placeholder');
576
+ }
577
+ if (label && _this.telDropdown) {
578
+ label.classList.add('bui-tel-input-placeholder');
579
+ }
580
+ if ((_b = _this._input) === null || _b === void 0 ? void 0 : _b.value) {
581
+ _this._input.classList.add('bui-tel-input-with-value');
582
+ }
583
+ };
584
+ window.requestAnimationFrame(postRenderWork);
585
+ this._input.addEventListener('click', function () {
586
+ var _a;
587
+ if (((_a = _this._control) === null || _a === void 0 ? void 0 : _a.disabled) && _this._control.value) {
588
+ window.location.href = 'tel://' + _this._control.value;
589
+ }
590
+ });
591
+ (_a = this._control) === null || _a === void 0 ? void 0 : _a.registerOnDisabledChange(function (isDisabled) { return _this._patchValueByState(isDisabled); });
592
+ this._patchValueByState(this._control.disabled);
593
+ };
594
+ PhoneNumberDirective.prototype._patchValueByState = function (isDisabled) {
595
+ var _this = this;
596
+ setTimeout(function () {
597
+ var _a, _b;
598
+ if (!isDisabled) {
599
+ _this.onInput();
600
+ }
601
+ else {
602
+ var v = _this._iti.getNumber(intlTelInputUtils.numberFormat.NATIONAL);
603
+ _this._input.value = v;
604
+ (_a = _this._control) === null || _a === void 0 ? void 0 : _a.patchValue((_b = _this._input) === null || _b === void 0 ? void 0 : _b.value, { emitEvent: false });
605
+ }
606
+ }, 20);
607
+ };
608
+ return PhoneNumberDirective;
609
+ }());
610
+ /**
611
+ * @ignore
612
+ */
613
+ PhoneNumberDirective.POST_RENDER_INIT_DELAY = 20;
614
+ /**
615
+ * @ignore
616
+ */
617
+ PhoneNumberDirective.BYPASS_SHADOW_DETECTION = false;
618
+ PhoneNumberDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: PhoneNumberDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace.NgModel, optional: true }, { token: i1__namespace.FormControlName, optional: true }, { token: i1__namespace.FormControlDirective, optional: true }, { token: i0.LOCALE_ID }, { token: i0__namespace.NgZone }, { token: i2__namespace.MatFormField, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
619
+ PhoneNumberDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.7", type: PhoneNumberDirective, selector: "[buiTelInput], input([type=tel])[ngModel], input([type=tel])[formControlName], input([type=tel])[formControl]", inputs: { telType: "telType", telDropdown: "telDropdown" }, outputs: { telCountryChange: "telCountryChange" }, host: { listeners: { "input": "onInput()" } }, usesOnChanges: true, ngImport: i0__namespace });
620
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: PhoneNumberDirective, decorators: [{
621
+ type: i0.Directive,
622
+ args: [{
623
+ selector: SELECTOR
624
+ }]
625
+ }], ctorParameters: function () {
626
+ return [{ type: i0__namespace.ElementRef }, { type: i1__namespace.NgModel, decorators: [{
627
+ type: i0.Optional
628
+ }] }, { type: i1__namespace.FormControlName, decorators: [{
629
+ type: i0.Optional
630
+ }] }, { type: i1__namespace.FormControlDirective, decorators: [{
631
+ type: i0.Optional
632
+ }] }, { type: undefined, decorators: [{
633
+ type: i0.Inject,
634
+ args: [i0.LOCALE_ID]
635
+ }] }, { type: i0__namespace.NgZone }, { type: i2__namespace.MatFormField, decorators: [{
636
+ type: i0.Optional
637
+ }] }];
638
+ }, propDecorators: { telType: [{
639
+ type: i0.Input
640
+ }], telDropdown: [{
641
+ type: i0.Input
642
+ }], telCountryChange: [{
643
+ type: i0.Output
644
+ }], onInput: [{
645
+ type: i0.HostListener,
646
+ args: ['input']
649
647
  }] } });
650
648
 
651
- /**
652
- * @internal
653
- */
654
- var PhoneModule = /** @class */ (function () {
655
- function PhoneModule() {
656
- }
657
- return PhoneModule;
658
- }());
659
- PhoneModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PhoneModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
660
- PhoneModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PhoneModule, declarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator], imports: [common.CommonModule], exports: [PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator] });
661
- PhoneModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PhoneModule, imports: [[common.CommonModule]] });
662
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: PhoneModule, decorators: [{
663
- type: i0.NgModule,
664
- args: [{
665
- declarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator],
666
- imports: [common.CommonModule],
667
- exports: [PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator]
668
- }]
649
+ /**
650
+ * @internal
651
+ */
652
+ var PhoneModule = /** @class */ (function () {
653
+ function PhoneModule() {
654
+ }
655
+ return PhoneModule;
656
+ }());
657
+ PhoneModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: PhoneModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
658
+ PhoneModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: PhoneModule, declarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator], imports: [common.CommonModule], exports: [PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator] });
659
+ PhoneModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: PhoneModule, imports: [[common.CommonModule]] });
660
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: PhoneModule, decorators: [{
661
+ type: i0.NgModule,
662
+ args: [{
663
+ declarations: [PhoneNumberPipe, PhoneNumberDirective, PhoneNumberValidator],
664
+ imports: [common.CommonModule],
665
+ exports: [PhoneNumberDirective, PhoneNumberPipe, PhoneNumberValidator]
666
+ }]
669
667
  }] });
670
668
 
671
- /**
672
- * Generated bundle index. Do not edit.
669
+ /**
670
+ * Generated bundle index. Do not edit.
673
671
  */
674
672
 
675
673
  exports.PhoneModule = PhoneModule;
@@ -679,5 +677,5 @@
679
677
 
680
678
  Object.defineProperty(exports, '__esModule', { value: true });
681
679
 
682
- })));
680
+ }));
683
681
  //# sourceMappingURL=bravura-ui-phone-number.umd.js.map