@skyux/lookup 5.7.2 → 6.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation.json +2 -2
- package/esm2020/index.mjs +32 -0
- package/esm2020/lib/modules/autocomplete/autocomplete-adapter.service.mjs +61 -0
- package/esm2020/lib/modules/autocomplete/autocomplete-default-search-function.mjs +39 -0
- package/esm2020/lib/modules/autocomplete/autocomplete-input.directive.mjs +221 -0
- package/esm2020/lib/modules/autocomplete/autocomplete-search-async-disabled.pipe.mjs +19 -0
- package/esm2020/lib/modules/autocomplete/autocomplete.component.mjs +739 -0
- package/esm2020/lib/modules/autocomplete/autocomplete.module.mjs +65 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-default-search-function-options.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-input-text-change.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-message-type.mjs +15 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-message.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-search-async-args.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-search-async-function.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-search-async-result-display-type.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-search-async-result.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-search-function-filter.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-search-function-response.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-search-function.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-selection-change.mjs +2 -0
- package/esm2020/lib/modules/autocomplete/types/autocomplete-show-more-args.mjs +2 -0
- package/esm2020/lib/modules/country-field/country-field.component.mjs +397 -0
- package/esm2020/lib/modules/country-field/country-field.module.mjs +49 -0
- package/esm2020/lib/modules/country-field/types/country.mjs +2 -0
- package/esm2020/lib/modules/lookup/lookup-adapter.service.mjs +21 -0
- package/esm2020/lib/modules/lookup/lookup-autocomplete-adapter.mjs +78 -0
- package/esm2020/lib/modules/lookup/lookup-item-selected.pipe.mjs +16 -0
- package/esm2020/lib/modules/lookup/lookup-show-more-async-modal.component.mjs +181 -0
- package/esm2020/lib/modules/lookup/lookup-show-more-modal.component.mjs +249 -0
- package/esm2020/lib/modules/lookup/lookup.component.mjs +601 -0
- package/esm2020/lib/modules/lookup/lookup.module.mjs +90 -0
- package/esm2020/lib/modules/lookup/types/lookup-add-click-callback-args.mjs +2 -0
- package/esm2020/lib/modules/lookup/types/lookup-add-click-event-args.mjs +2 -0
- package/esm2020/lib/modules/lookup/types/lookup-select-mode-type.mjs +2 -0
- package/esm2020/lib/modules/lookup/types/lookup-select-mode.mjs +16 -0
- package/esm2020/lib/modules/lookup/types/lookup-show-more-config.mjs +2 -0
- package/esm2020/lib/modules/lookup/types/lookup-show-more-custom-picker-context.mjs +7 -0
- package/esm2020/lib/modules/lookup/types/lookup-show-more-custom-picker.mjs +2 -0
- package/esm2020/lib/modules/lookup/types/lookup-show-more-native-picker-async-context.mjs +7 -0
- package/esm2020/lib/modules/lookup/types/lookup-show-more-native-picker-config.mjs +2 -0
- package/esm2020/lib/modules/lookup/types/lookup-show-more-native-picker-context.mjs +7 -0
- package/esm2020/lib/modules/search/search-adapter.service.mjs +45 -0
- package/esm2020/lib/modules/search/search.component.mjs +253 -0
- package/esm2020/lib/modules/search/search.module.mjs +46 -0
- package/esm2020/lib/modules/shared/sky-lookup-resources.module.mjs +72 -0
- package/esm2020/lib/modules/shared/sky-lookup-string-utils.mjs +8 -0
- package/esm2020/skyux-lookup.mjs +5 -0
- package/esm2020/testing/country-field/country-field-fixture.mjs +114 -0
- package/esm2020/testing/country-field/country-field-testing.module.mjs +15 -0
- package/esm2020/testing/public-api.mjs +5 -0
- package/esm2020/testing/search/search-fixture.mjs +57 -0
- package/esm2020/testing/search/search-testing.module.mjs +15 -0
- package/esm2020/testing/skyux-lookup-testing.mjs +5 -0
- package/fesm2015/{skyux-lookup-testing.js → skyux-lookup-testing.mjs} +9 -9
- package/fesm2015/skyux-lookup-testing.mjs.map +1 -0
- package/fesm2015/skyux-lookup.mjs +3153 -0
- package/fesm2015/skyux-lookup.mjs.map +1 -0
- package/fesm2020/skyux-lookup-testing.mjs +203 -0
- package/fesm2020/skyux-lookup-testing.mjs.map +1 -0
- package/fesm2020/skyux-lookup.mjs +3144 -0
- package/fesm2020/skyux-lookup.mjs.map +1 -0
- package/package.json +45 -21
- package/testing/package.json +5 -5
- package/bundles/skyux-lookup-testing.umd.js +0 -620
- package/bundles/skyux-lookup.umd.js +0 -3793
- package/esm2015/index.js +0 -32
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/autocomplete-adapter.service.js +0 -61
- package/esm2015/lib/modules/autocomplete/autocomplete-adapter.service.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/autocomplete-default-search-function.js +0 -39
- package/esm2015/lib/modules/autocomplete/autocomplete-default-search-function.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/autocomplete-input.directive.js +0 -221
- package/esm2015/lib/modules/autocomplete/autocomplete-input.directive.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/autocomplete-search-async-disabled.pipe.js +0 -19
- package/esm2015/lib/modules/autocomplete/autocomplete-search-async-disabled.pipe.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/autocomplete.component.js +0 -745
- package/esm2015/lib/modules/autocomplete/autocomplete.component.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/autocomplete.module.js +0 -65
- package/esm2015/lib/modules/autocomplete/autocomplete.module.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-default-search-function-options.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-default-search-function-options.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-input-text-change.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-input-text-change.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message-type.js +0 -15
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message-type.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-args.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-args.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-function.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-function.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result-display-type.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result-display-type.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-filter.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-filter.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-response.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-response.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-selection-change.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-selection-change.js.map +0 -1
- package/esm2015/lib/modules/autocomplete/types/autocomplete-show-more-args.js +0 -2
- package/esm2015/lib/modules/autocomplete/types/autocomplete-show-more-args.js.map +0 -1
- package/esm2015/lib/modules/country-field/country-field.component.js +0 -404
- package/esm2015/lib/modules/country-field/country-field.component.js.map +0 -1
- package/esm2015/lib/modules/country-field/country-field.module.js +0 -49
- package/esm2015/lib/modules/country-field/country-field.module.js.map +0 -1
- package/esm2015/lib/modules/country-field/types/country.js +0 -2
- package/esm2015/lib/modules/country-field/types/country.js.map +0 -1
- package/esm2015/lib/modules/lookup/lookup-adapter.service.js +0 -21
- package/esm2015/lib/modules/lookup/lookup-adapter.service.js.map +0 -1
- package/esm2015/lib/modules/lookup/lookup-autocomplete-adapter.js +0 -78
- package/esm2015/lib/modules/lookup/lookup-autocomplete-adapter.js.map +0 -1
- package/esm2015/lib/modules/lookup/lookup-item-selected.pipe.js +0 -16
- package/esm2015/lib/modules/lookup/lookup-item-selected.pipe.js.map +0 -1
- package/esm2015/lib/modules/lookup/lookup-show-more-async-modal.component.js +0 -186
- package/esm2015/lib/modules/lookup/lookup-show-more-async-modal.component.js.map +0 -1
- package/esm2015/lib/modules/lookup/lookup-show-more-modal.component.js +0 -258
- package/esm2015/lib/modules/lookup/lookup-show-more-modal.component.js.map +0 -1
- package/esm2015/lib/modules/lookup/lookup.component.js +0 -610
- package/esm2015/lib/modules/lookup/lookup.component.js.map +0 -1
- package/esm2015/lib/modules/lookup/lookup.module.js +0 -94
- package/esm2015/lib/modules/lookup/lookup.module.js.map +0 -1
- package/esm2015/lib/modules/lookup/types/lookup-add-click-callback-args.js +0 -2
- package/esm2015/lib/modules/lookup/types/lookup-add-click-callback-args.js.map +0 -1
- package/esm2015/lib/modules/lookup/types/lookup-add-click-event-args.js +0 -2
- package/esm2015/lib/modules/lookup/types/lookup-add-click-event-args.js.map +0 -1
- package/esm2015/lib/modules/lookup/types/lookup-select-mode-type.js +0 -2
- package/esm2015/lib/modules/lookup/types/lookup-select-mode-type.js.map +0 -1
- package/esm2015/lib/modules/lookup/types/lookup-select-mode.js +0 -16
- package/esm2015/lib/modules/lookup/types/lookup-select-mode.js.map +0 -1
- package/esm2015/lib/modules/lookup/types/lookup-show-more-config.js +0 -2
- package/esm2015/lib/modules/lookup/types/lookup-show-more-config.js.map +0 -1
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker-context.js +0 -7
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker-context.js.map +0 -1
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker.js +0 -2
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker.js.map +0 -1
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-async-context.js +0 -7
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-async-context.js.map +0 -1
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-config.js +0 -2
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-config.js.map +0 -1
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-context.js +0 -7
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-context.js.map +0 -1
- package/esm2015/lib/modules/search/search-adapter.service.js +0 -45
- package/esm2015/lib/modules/search/search-adapter.service.js.map +0 -1
- package/esm2015/lib/modules/search/search.component.js +0 -260
- package/esm2015/lib/modules/search/search.component.js.map +0 -1
- package/esm2015/lib/modules/search/search.module.js +0 -46
- package/esm2015/lib/modules/search/search.module.js.map +0 -1
- package/esm2015/lib/modules/shared/sky-lookup-resources.module.js +0 -72
- package/esm2015/lib/modules/shared/sky-lookup-resources.module.js.map +0 -1
- package/esm2015/lib/modules/shared/sky-lookup-string-utils.js +0 -8
- package/esm2015/lib/modules/shared/sky-lookup-string-utils.js.map +0 -1
- package/esm2015/skyux-lookup.js +0 -5
- package/esm2015/skyux-lookup.js.map +0 -1
- package/esm2015/testing/country-field/country-field-fixture.js +0 -123
- package/esm2015/testing/country-field/country-field-fixture.js.map +0 -1
- package/esm2015/testing/country-field/country-field-testing.module.js +0 -15
- package/esm2015/testing/country-field/country-field-testing.module.js.map +0 -1
- package/esm2015/testing/public-api.js +0 -5
- package/esm2015/testing/public-api.js.map +0 -1
- package/esm2015/testing/search/search-fixture.js +0 -57
- package/esm2015/testing/search/search-fixture.js.map +0 -1
- package/esm2015/testing/search/search-testing.module.js +0 -15
- package/esm2015/testing/search/search-testing.module.js.map +0 -1
- package/esm2015/testing/skyux-lookup-testing.js +0 -5
- package/esm2015/testing/skyux-lookup-testing.js.map +0 -1
- package/fesm2015/skyux-lookup-testing.js.map +0 -1
- package/fesm2015/skyux-lookup.js +0 -3191
- package/fesm2015/skyux-lookup.js.map +0 -1
|
@@ -1,620 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/platform-browser'), require('@skyux-sdk/testing'), require('@angular/core'), require('@skyux/lookup')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@skyux/lookup/testing', ['exports', '@angular/platform-browser', '@skyux-sdk/testing', '@angular/core', '@skyux/lookup'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.lookup = global.skyux.lookup || {}, global.skyux.lookup.testing = {}), global.ng.platformBrowser, global.testing, global.ng.core, global.skyux.lookup));
|
|
5
|
-
})(this, (function (exports, platformBrowser, testing, i0, lookup) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return e[k]; }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n["default"] = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
-
|
|
27
|
-
/*! *****************************************************************************
|
|
28
|
-
Copyright (c) Microsoft Corporation.
|
|
29
|
-
|
|
30
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
31
|
-
purpose with or without fee is hereby granted.
|
|
32
|
-
|
|
33
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
34
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
35
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
36
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
37
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
38
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
39
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
40
|
-
***************************************************************************** */
|
|
41
|
-
/* global Reflect, Promise */
|
|
42
|
-
var extendStatics = function (d, b) {
|
|
43
|
-
extendStatics = Object.setPrototypeOf ||
|
|
44
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
45
|
-
function (d, b) { for (var p in b)
|
|
46
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
47
|
-
d[p] = b[p]; };
|
|
48
|
-
return extendStatics(d, b);
|
|
49
|
-
};
|
|
50
|
-
function __extends(d, b) {
|
|
51
|
-
if (typeof b !== "function" && b !== null)
|
|
52
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
53
|
-
extendStatics(d, b);
|
|
54
|
-
function __() { this.constructor = d; }
|
|
55
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
56
|
-
}
|
|
57
|
-
var __assign = function () {
|
|
58
|
-
__assign = Object.assign || function __assign(t) {
|
|
59
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
60
|
-
s = arguments[i];
|
|
61
|
-
for (var p in s)
|
|
62
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
63
|
-
t[p] = s[p];
|
|
64
|
-
}
|
|
65
|
-
return t;
|
|
66
|
-
};
|
|
67
|
-
return __assign.apply(this, arguments);
|
|
68
|
-
};
|
|
69
|
-
function __rest(s, e) {
|
|
70
|
-
var t = {};
|
|
71
|
-
for (var p in s)
|
|
72
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
73
|
-
t[p] = s[p];
|
|
74
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
75
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
76
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
77
|
-
t[p[i]] = s[p[i]];
|
|
78
|
-
}
|
|
79
|
-
return t;
|
|
80
|
-
}
|
|
81
|
-
function __decorate(decorators, target, key, desc) {
|
|
82
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
83
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
84
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
85
|
-
else
|
|
86
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
87
|
-
if (d = decorators[i])
|
|
88
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
89
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
90
|
-
}
|
|
91
|
-
function __param(paramIndex, decorator) {
|
|
92
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
93
|
-
}
|
|
94
|
-
function __metadata(metadataKey, metadataValue) {
|
|
95
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
96
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
97
|
-
}
|
|
98
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
99
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
100
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
101
|
-
function fulfilled(value) { try {
|
|
102
|
-
step(generator.next(value));
|
|
103
|
-
}
|
|
104
|
-
catch (e) {
|
|
105
|
-
reject(e);
|
|
106
|
-
} }
|
|
107
|
-
function rejected(value) { try {
|
|
108
|
-
step(generator["throw"](value));
|
|
109
|
-
}
|
|
110
|
-
catch (e) {
|
|
111
|
-
reject(e);
|
|
112
|
-
} }
|
|
113
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
114
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
function __generator(thisArg, body) {
|
|
118
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
119
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
120
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
121
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
122
|
-
function step(op) {
|
|
123
|
-
if (f)
|
|
124
|
-
throw new TypeError("Generator is already executing.");
|
|
125
|
-
while (_)
|
|
126
|
-
try {
|
|
127
|
-
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)
|
|
128
|
-
return t;
|
|
129
|
-
if (y = 0, t)
|
|
130
|
-
op = [op[0] & 2, t.value];
|
|
131
|
-
switch (op[0]) {
|
|
132
|
-
case 0:
|
|
133
|
-
case 1:
|
|
134
|
-
t = op;
|
|
135
|
-
break;
|
|
136
|
-
case 4:
|
|
137
|
-
_.label++;
|
|
138
|
-
return { value: op[1], done: false };
|
|
139
|
-
case 5:
|
|
140
|
-
_.label++;
|
|
141
|
-
y = op[1];
|
|
142
|
-
op = [0];
|
|
143
|
-
continue;
|
|
144
|
-
case 7:
|
|
145
|
-
op = _.ops.pop();
|
|
146
|
-
_.trys.pop();
|
|
147
|
-
continue;
|
|
148
|
-
default:
|
|
149
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
150
|
-
_ = 0;
|
|
151
|
-
continue;
|
|
152
|
-
}
|
|
153
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
154
|
-
_.label = op[1];
|
|
155
|
-
break;
|
|
156
|
-
}
|
|
157
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
158
|
-
_.label = t[1];
|
|
159
|
-
t = op;
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
if (t && _.label < t[2]) {
|
|
163
|
-
_.label = t[2];
|
|
164
|
-
_.ops.push(op);
|
|
165
|
-
break;
|
|
166
|
-
}
|
|
167
|
-
if (t[2])
|
|
168
|
-
_.ops.pop();
|
|
169
|
-
_.trys.pop();
|
|
170
|
-
continue;
|
|
171
|
-
}
|
|
172
|
-
op = body.call(thisArg, _);
|
|
173
|
-
}
|
|
174
|
-
catch (e) {
|
|
175
|
-
op = [6, e];
|
|
176
|
-
y = 0;
|
|
177
|
-
}
|
|
178
|
-
finally {
|
|
179
|
-
f = t = 0;
|
|
180
|
-
}
|
|
181
|
-
if (op[0] & 5)
|
|
182
|
-
throw op[1];
|
|
183
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
187
|
-
if (k2 === undefined)
|
|
188
|
-
k2 = k;
|
|
189
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
190
|
-
}) : (function (o, m, k, k2) {
|
|
191
|
-
if (k2 === undefined)
|
|
192
|
-
k2 = k;
|
|
193
|
-
o[k2] = m[k];
|
|
194
|
-
});
|
|
195
|
-
function __exportStar(m, o) {
|
|
196
|
-
for (var p in m)
|
|
197
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
198
|
-
__createBinding(o, m, p);
|
|
199
|
-
}
|
|
200
|
-
function __values(o) {
|
|
201
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
202
|
-
if (m)
|
|
203
|
-
return m.call(o);
|
|
204
|
-
if (o && typeof o.length === "number")
|
|
205
|
-
return {
|
|
206
|
-
next: function () {
|
|
207
|
-
if (o && i >= o.length)
|
|
208
|
-
o = void 0;
|
|
209
|
-
return { value: o && o[i++], done: !o };
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
213
|
-
}
|
|
214
|
-
function __read(o, n) {
|
|
215
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
216
|
-
if (!m)
|
|
217
|
-
return o;
|
|
218
|
-
var i = m.call(o), r, ar = [], e;
|
|
219
|
-
try {
|
|
220
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
221
|
-
ar.push(r.value);
|
|
222
|
-
}
|
|
223
|
-
catch (error) {
|
|
224
|
-
e = { error: error };
|
|
225
|
-
}
|
|
226
|
-
finally {
|
|
227
|
-
try {
|
|
228
|
-
if (r && !r.done && (m = i["return"]))
|
|
229
|
-
m.call(i);
|
|
230
|
-
}
|
|
231
|
-
finally {
|
|
232
|
-
if (e)
|
|
233
|
-
throw e.error;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
return ar;
|
|
237
|
-
}
|
|
238
|
-
/** @deprecated */
|
|
239
|
-
function __spread() {
|
|
240
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
241
|
-
ar = ar.concat(__read(arguments[i]));
|
|
242
|
-
return ar;
|
|
243
|
-
}
|
|
244
|
-
/** @deprecated */
|
|
245
|
-
function __spreadArrays() {
|
|
246
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
247
|
-
s += arguments[i].length;
|
|
248
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
249
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
250
|
-
r[k] = a[j];
|
|
251
|
-
return r;
|
|
252
|
-
}
|
|
253
|
-
function __spreadArray(to, from, pack) {
|
|
254
|
-
if (pack || arguments.length === 2)
|
|
255
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
256
|
-
if (ar || !(i in from)) {
|
|
257
|
-
if (!ar)
|
|
258
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
259
|
-
ar[i] = from[i];
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
263
|
-
}
|
|
264
|
-
function __await(v) {
|
|
265
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
266
|
-
}
|
|
267
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
268
|
-
if (!Symbol.asyncIterator)
|
|
269
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
270
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
271
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
272
|
-
function verb(n) { if (g[n])
|
|
273
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
274
|
-
function resume(n, v) { try {
|
|
275
|
-
step(g[n](v));
|
|
276
|
-
}
|
|
277
|
-
catch (e) {
|
|
278
|
-
settle(q[0][3], e);
|
|
279
|
-
} }
|
|
280
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
281
|
-
function fulfill(value) { resume("next", value); }
|
|
282
|
-
function reject(value) { resume("throw", value); }
|
|
283
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
284
|
-
resume(q[0][0], q[0][1]); }
|
|
285
|
-
}
|
|
286
|
-
function __asyncDelegator(o) {
|
|
287
|
-
var i, p;
|
|
288
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
289
|
-
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; }
|
|
290
|
-
}
|
|
291
|
-
function __asyncValues(o) {
|
|
292
|
-
if (!Symbol.asyncIterator)
|
|
293
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
294
|
-
var m = o[Symbol.asyncIterator], i;
|
|
295
|
-
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);
|
|
296
|
-
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); }); }; }
|
|
297
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
298
|
-
}
|
|
299
|
-
function __makeTemplateObject(cooked, raw) {
|
|
300
|
-
if (Object.defineProperty) {
|
|
301
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
cooked.raw = raw;
|
|
305
|
-
}
|
|
306
|
-
return cooked;
|
|
307
|
-
}
|
|
308
|
-
;
|
|
309
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
310
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
311
|
-
}) : function (o, v) {
|
|
312
|
-
o["default"] = v;
|
|
313
|
-
};
|
|
314
|
-
function __importStar(mod) {
|
|
315
|
-
if (mod && mod.__esModule)
|
|
316
|
-
return mod;
|
|
317
|
-
var result = {};
|
|
318
|
-
if (mod != null)
|
|
319
|
-
for (var k in mod)
|
|
320
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
321
|
-
__createBinding(result, mod, k);
|
|
322
|
-
__setModuleDefault(result, mod);
|
|
323
|
-
return result;
|
|
324
|
-
}
|
|
325
|
-
function __importDefault(mod) {
|
|
326
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
327
|
-
}
|
|
328
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
329
|
-
if (kind === "a" && !f)
|
|
330
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
331
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
332
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
333
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
334
|
-
}
|
|
335
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
336
|
-
if (kind === "m")
|
|
337
|
-
throw new TypeError("Private method is not writable");
|
|
338
|
-
if (kind === "a" && !f)
|
|
339
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
340
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
341
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
342
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Allows interaction with a SKY UX country field component.
|
|
347
|
-
*/
|
|
348
|
-
var SkyCountryFieldFixture = /** @class */ (function () {
|
|
349
|
-
function SkyCountryFieldFixture(fixture, skyTestId) {
|
|
350
|
-
this.fixture = fixture;
|
|
351
|
-
this.debugEl = testing.SkyAppTestUtility.getDebugElementByTestId(fixture, skyTestId, 'sky-country-field');
|
|
352
|
-
}
|
|
353
|
-
Object.defineProperty(SkyCountryFieldFixture.prototype, "autocompleteAttribute", {
|
|
354
|
-
/**
|
|
355
|
-
* The value of the input field's autocomplete attribute.
|
|
356
|
-
*/
|
|
357
|
-
get: function () {
|
|
358
|
-
return this.getInputElement().getAttribute('autocomplete');
|
|
359
|
-
},
|
|
360
|
-
enumerable: false,
|
|
361
|
-
configurable: true
|
|
362
|
-
});
|
|
363
|
-
Object.defineProperty(SkyCountryFieldFixture.prototype, "countryFlagIsVisible", {
|
|
364
|
-
/**
|
|
365
|
-
* A flag indicating if the country flag is currently visible.
|
|
366
|
-
* The flag will be visible only if a selection has been made
|
|
367
|
-
* and if the hideSelectedCountryFlag option is false.
|
|
368
|
-
*/
|
|
369
|
-
get: function () {
|
|
370
|
-
var flag = this.getCountryFlag();
|
|
371
|
-
return flag !== null;
|
|
372
|
-
},
|
|
373
|
-
enumerable: false,
|
|
374
|
-
configurable: true
|
|
375
|
-
});
|
|
376
|
-
Object.defineProperty(SkyCountryFieldFixture.prototype, "disabled", {
|
|
377
|
-
/**
|
|
378
|
-
* A flag indicating whether or not the input has been disabled.
|
|
379
|
-
*/
|
|
380
|
-
get: function () {
|
|
381
|
-
return this.getInputElement().disabled;
|
|
382
|
-
},
|
|
383
|
-
enumerable: false,
|
|
384
|
-
configurable: true
|
|
385
|
-
});
|
|
386
|
-
Object.defineProperty(SkyCountryFieldFixture.prototype, "searchText", {
|
|
387
|
-
/**
|
|
388
|
-
* The value of the input field.
|
|
389
|
-
*/
|
|
390
|
-
get: function () {
|
|
391
|
-
return this.getInputElement().value;
|
|
392
|
-
},
|
|
393
|
-
enumerable: false,
|
|
394
|
-
configurable: true
|
|
395
|
-
});
|
|
396
|
-
/**
|
|
397
|
-
* Enters the search text into the input field displaying search results, but making no selection.
|
|
398
|
-
* @param searchText The name of the country to select.
|
|
399
|
-
* @returns The list of country names matching the search text.
|
|
400
|
-
*/
|
|
401
|
-
SkyCountryFieldFixture.prototype.search = function (searchText) {
|
|
402
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
403
|
-
var resultNodes, resultArray, results;
|
|
404
|
-
return __generator(this, function (_a) {
|
|
405
|
-
switch (_a.label) {
|
|
406
|
-
case 0: return [4 /*yield*/, this.searchAndGetResults(searchText, this.fixture)];
|
|
407
|
-
case 1:
|
|
408
|
-
resultNodes = _a.sent();
|
|
409
|
-
resultArray = Array.prototype.slice.call(resultNodes);
|
|
410
|
-
results = resultArray.map(function (result) {
|
|
411
|
-
var countryNameEl = result.querySelector('.sky-highlight-mark');
|
|
412
|
-
var countryName = testing.SkyAppTestUtility.getText(countryNameEl);
|
|
413
|
-
return countryName;
|
|
414
|
-
});
|
|
415
|
-
this.fixture.detectChanges();
|
|
416
|
-
return [4 /*yield*/, this.fixture.whenStable()];
|
|
417
|
-
case 2:
|
|
418
|
-
_a.sent();
|
|
419
|
-
return [2 /*return*/, results];
|
|
420
|
-
}
|
|
421
|
-
});
|
|
422
|
-
});
|
|
423
|
-
};
|
|
424
|
-
/**
|
|
425
|
-
* Enters the search text into the input field and selects the first result (if any).
|
|
426
|
-
* @param searchText The name of the country to select.
|
|
427
|
-
*/
|
|
428
|
-
SkyCountryFieldFixture.prototype.searchAndSelectFirstResult = function (searchText) {
|
|
429
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
430
|
-
return __generator(this, function (_a) {
|
|
431
|
-
switch (_a.label) {
|
|
432
|
-
case 0: return [4 /*yield*/, this.searchAndSelect(searchText, 0, this.fixture)];
|
|
433
|
-
case 1:
|
|
434
|
-
_a.sent();
|
|
435
|
-
this.fixture.detectChanges();
|
|
436
|
-
return [2 /*return*/, this.fixture.whenStable()];
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
});
|
|
440
|
-
};
|
|
441
|
-
/**
|
|
442
|
-
* Clears the country selection and input field.
|
|
443
|
-
*/
|
|
444
|
-
SkyCountryFieldFixture.prototype.clear = function () {
|
|
445
|
-
this.enterSearch('', this.fixture);
|
|
446
|
-
this.fixture.detectChanges();
|
|
447
|
-
return this.fixture.whenStable();
|
|
448
|
-
};
|
|
449
|
-
//#region helpers
|
|
450
|
-
SkyCountryFieldFixture.prototype.getCountryFlag = function () {
|
|
451
|
-
return this.debugEl.query(platformBrowser.By.css('.sky-country-field-flag'));
|
|
452
|
-
};
|
|
453
|
-
SkyCountryFieldFixture.prototype.getAutocompleteElement = function () {
|
|
454
|
-
return document.querySelector('.sky-autocomplete-results');
|
|
455
|
-
};
|
|
456
|
-
SkyCountryFieldFixture.prototype.getInputElement = function () {
|
|
457
|
-
var debugEl = this.debugEl.query(platformBrowser.By.css('textarea'));
|
|
458
|
-
return debugEl.nativeElement;
|
|
459
|
-
};
|
|
460
|
-
SkyCountryFieldFixture.prototype.blurInput = function (fixture) {
|
|
461
|
-
testing.SkyAppTestUtility.fireDomEvent(this.getInputElement(), 'blur');
|
|
462
|
-
fixture.detectChanges();
|
|
463
|
-
return fixture.whenStable();
|
|
464
|
-
};
|
|
465
|
-
SkyCountryFieldFixture.prototype.enterSearch = function (newValue, fixture) {
|
|
466
|
-
var inputElement = this.getInputElement();
|
|
467
|
-
inputElement.value = newValue;
|
|
468
|
-
testing.SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
|
|
469
|
-
testing.SkyAppTestUtility.fireDomEvent(inputElement, 'input');
|
|
470
|
-
fixture.detectChanges();
|
|
471
|
-
return fixture.whenStable();
|
|
472
|
-
};
|
|
473
|
-
SkyCountryFieldFixture.prototype.searchAndGetResults = function (newValue, fixture) {
|
|
474
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
475
|
-
return __generator(this, function (_a) {
|
|
476
|
-
switch (_a.label) {
|
|
477
|
-
case 0: return [4 /*yield*/, this.enterSearch(newValue, fixture)];
|
|
478
|
-
case 1:
|
|
479
|
-
_a.sent();
|
|
480
|
-
fixture.detectChanges();
|
|
481
|
-
return [4 /*yield*/, fixture.whenStable()];
|
|
482
|
-
case 2:
|
|
483
|
-
_a.sent();
|
|
484
|
-
return [2 /*return*/, this.getAutocompleteElement().querySelectorAll('.sky-autocomplete-result')];
|
|
485
|
-
}
|
|
486
|
-
});
|
|
487
|
-
});
|
|
488
|
-
};
|
|
489
|
-
SkyCountryFieldFixture.prototype.searchAndSelect = function (newValue, index, fixture) {
|
|
490
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
491
|
-
var inputElement, searchResults;
|
|
492
|
-
return __generator(this, function (_a) {
|
|
493
|
-
switch (_a.label) {
|
|
494
|
-
case 0:
|
|
495
|
-
inputElement = this.getInputElement();
|
|
496
|
-
return [4 /*yield*/, this.searchAndGetResults(newValue, fixture)];
|
|
497
|
-
case 1:
|
|
498
|
-
searchResults = _a.sent();
|
|
499
|
-
if (searchResults.length < index + 1) {
|
|
500
|
-
throw new Error('Index out of range for results');
|
|
501
|
-
}
|
|
502
|
-
// Note: the ordering of these events is important!
|
|
503
|
-
testing.SkyAppTestUtility.fireDomEvent(inputElement, 'change');
|
|
504
|
-
testing.SkyAppTestUtility.fireDomEvent(searchResults[index], 'mousedown');
|
|
505
|
-
this.blurInput(fixture);
|
|
506
|
-
return [2 /*return*/];
|
|
507
|
-
}
|
|
508
|
-
});
|
|
509
|
-
});
|
|
510
|
-
};
|
|
511
|
-
return SkyCountryFieldFixture;
|
|
512
|
-
}());
|
|
513
|
-
|
|
514
|
-
var SkyCountryFieldTestingModule = /** @class */ (function () {
|
|
515
|
-
function SkyCountryFieldTestingModule() {
|
|
516
|
-
}
|
|
517
|
-
return SkyCountryFieldTestingModule;
|
|
518
|
-
}());
|
|
519
|
-
SkyCountryFieldTestingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCountryFieldTestingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
520
|
-
SkyCountryFieldTestingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCountryFieldTestingModule, exports: [lookup.SkyCountryFieldModule] });
|
|
521
|
-
SkyCountryFieldTestingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCountryFieldTestingModule, imports: [lookup.SkyCountryFieldModule] });
|
|
522
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyCountryFieldTestingModule, decorators: [{
|
|
523
|
-
type: i0.NgModule,
|
|
524
|
-
args: [{
|
|
525
|
-
exports: [lookup.SkyCountryFieldModule],
|
|
526
|
-
}]
|
|
527
|
-
}] });
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* Allows interaction with a SKY UX search component.
|
|
531
|
-
*/
|
|
532
|
-
var SkySearchFixture = /** @class */ (function () {
|
|
533
|
-
function SkySearchFixture(fixture, skyTestId) {
|
|
534
|
-
this.debugEl = testing.SkyAppTestUtility.getDebugElementByTestId(fixture, skyTestId, 'sky-search');
|
|
535
|
-
}
|
|
536
|
-
Object.defineProperty(SkySearchFixture.prototype, "searchText", {
|
|
537
|
-
/**
|
|
538
|
-
* Gets the search's current text.
|
|
539
|
-
*/
|
|
540
|
-
get: function () {
|
|
541
|
-
return this.getInputEl().nativeElement.value;
|
|
542
|
-
},
|
|
543
|
-
enumerable: false,
|
|
544
|
-
configurable: true
|
|
545
|
-
});
|
|
546
|
-
Object.defineProperty(SkySearchFixture.prototype, "placeholderText", {
|
|
547
|
-
/**
|
|
548
|
-
* Gets the search's current placeholder text.
|
|
549
|
-
*/
|
|
550
|
-
get: function () {
|
|
551
|
-
return this.getInputEl().nativeElement.placeholder;
|
|
552
|
-
},
|
|
553
|
-
enumerable: false,
|
|
554
|
-
configurable: true
|
|
555
|
-
});
|
|
556
|
-
/**
|
|
557
|
-
* Applies the specified search text, invoking the search.
|
|
558
|
-
* @param searchText The search text to apply. If none is specified, the search's
|
|
559
|
-
* current search text will be applied.
|
|
560
|
-
*/
|
|
561
|
-
SkySearchFixture.prototype.apply = function (searchText) {
|
|
562
|
-
if (searchText) {
|
|
563
|
-
testing.SkyAppTestUtility.setInputValue(this.getInputEl().nativeElement, searchText);
|
|
564
|
-
}
|
|
565
|
-
var btnEl = this.getApplyBtnEl();
|
|
566
|
-
btnEl.triggerEventHandler('click', {});
|
|
567
|
-
};
|
|
568
|
-
/**
|
|
569
|
-
* Clears the current search text. If there is no search text or the search text is
|
|
570
|
-
* not currently applied, an error is thrown.
|
|
571
|
-
*/
|
|
572
|
-
SkySearchFixture.prototype.clear = function () {
|
|
573
|
-
var clearEl = this.debugEl.query(platformBrowser.By.css('.sky-input-group-clear'));
|
|
574
|
-
if (!testing.SkyAppTestUtility.isVisible(clearEl)) {
|
|
575
|
-
throw new Error('There currently is no search text or the current search text has not been applied, ' +
|
|
576
|
-
'so the clear button is not visible.');
|
|
577
|
-
}
|
|
578
|
-
var btnEl = this.getClearBtnEl();
|
|
579
|
-
btnEl.triggerEventHandler('click', {});
|
|
580
|
-
};
|
|
581
|
-
SkySearchFixture.prototype.getApplyBtnEl = function () {
|
|
582
|
-
return this.debugEl.query(platformBrowser.By.css('.sky-search-btn-apply'));
|
|
583
|
-
};
|
|
584
|
-
SkySearchFixture.prototype.getClearBtnEl = function () {
|
|
585
|
-
return this.debugEl.query(platformBrowser.By.css('.sky-search-btn-clear'));
|
|
586
|
-
};
|
|
587
|
-
SkySearchFixture.prototype.getInputEl = function () {
|
|
588
|
-
return this.debugEl.query(platformBrowser.By.css('.sky-search-input'));
|
|
589
|
-
};
|
|
590
|
-
return SkySearchFixture;
|
|
591
|
-
}());
|
|
592
|
-
|
|
593
|
-
var SkySearchTestingModule = /** @class */ (function () {
|
|
594
|
-
function SkySearchTestingModule() {
|
|
595
|
-
}
|
|
596
|
-
return SkySearchTestingModule;
|
|
597
|
-
}());
|
|
598
|
-
SkySearchTestingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySearchTestingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
599
|
-
SkySearchTestingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySearchTestingModule, exports: [lookup.SkySearchModule] });
|
|
600
|
-
SkySearchTestingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySearchTestingModule, imports: [lookup.SkySearchModule] });
|
|
601
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySearchTestingModule, decorators: [{
|
|
602
|
-
type: i0.NgModule,
|
|
603
|
-
args: [{
|
|
604
|
-
exports: [lookup.SkySearchModule],
|
|
605
|
-
}]
|
|
606
|
-
}] });
|
|
607
|
-
|
|
608
|
-
/**
|
|
609
|
-
* Generated bundle index. Do not edit.
|
|
610
|
-
*/
|
|
611
|
-
|
|
612
|
-
exports.SkyCountryFieldFixture = SkyCountryFieldFixture;
|
|
613
|
-
exports.SkyCountryFieldTestingModule = SkyCountryFieldTestingModule;
|
|
614
|
-
exports.SkySearchFixture = SkySearchFixture;
|
|
615
|
-
exports.SkySearchTestingModule = SkySearchTestingModule;
|
|
616
|
-
|
|
617
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
618
|
-
|
|
619
|
-
}));
|
|
620
|
-
//# sourceMappingURL=skyux-lookup-testing.umd.js.map
|