@skyux/lookup 5.2.2 → 5.5.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.
- package/README.md +6 -4
- package/documentation.json +409 -23
- package/esm2015/index.js +32 -0
- package/esm2015/index.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-adapter.service.js +62 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-default-search-function.js +39 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-default-search-function.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-input.directive.js +220 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-input.directive.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-search-async-disabled.pipe.js +19 -0
- package/esm2015/lib/modules/autocomplete/autocomplete-search-async-disabled.pipe.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete.component.js +732 -0
- package/esm2015/lib/modules/autocomplete/autocomplete.component.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/autocomplete.module.js +65 -0
- package/esm2015/lib/modules/autocomplete/autocomplete.module.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-default-search-function-options.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-default-search-function-options.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-input-text-change.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-input-text-change.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message-type.js +15 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message-type.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-message.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-args.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-args.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-function.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-function.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result-display-type.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result-display-type.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-async-result.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-filter.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-filter.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-response.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function-response.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-search-function.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-selection-change.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-selection-change.js.map +1 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-show-more-args.js +2 -0
- package/esm2015/lib/modules/autocomplete/types/autocomplete-show-more-args.js.map +1 -0
- package/esm2015/{modules → lib/modules}/country-field/country-field.component.js +5 -2
- package/esm2015/lib/modules/country-field/country-field.component.js.map +1 -0
- package/esm2015/lib/modules/country-field/country-field.module.js +49 -0
- package/esm2015/lib/modules/country-field/country-field.module.js.map +1 -0
- package/esm2015/lib/modules/country-field/types/country.js +2 -0
- package/esm2015/lib/modules/country-field/types/country.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup-adapter.service.js +21 -0
- package/esm2015/lib/modules/lookup/lookup-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup-autocomplete-adapter.js +72 -0
- package/esm2015/lib/modules/lookup/lookup-autocomplete-adapter.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup-item-selected.pipe.js +16 -0
- package/esm2015/lib/modules/lookup/lookup-item-selected.pipe.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup-show-more-async-modal.component.js +186 -0
- package/esm2015/lib/modules/lookup/lookup-show-more-async-modal.component.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup-show-more-modal.component.js +258 -0
- package/esm2015/lib/modules/lookup/lookup-show-more-modal.component.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup.component.js +608 -0
- package/esm2015/lib/modules/lookup/lookup.component.js.map +1 -0
- package/esm2015/lib/modules/lookup/lookup.module.js +94 -0
- package/esm2015/lib/modules/lookup/lookup.module.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-add-click-callback-args.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-add-click-callback-args.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-add-click-event-args.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-add-click-event-args.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-select-mode-type.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-select-mode-type.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-select-mode.js +16 -0
- package/esm2015/lib/modules/lookup/types/lookup-select-mode.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-config.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-config.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker-context.js +7 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker-context.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-custom-picker.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-async-context.js +7 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-async-context.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-config.js +2 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-config.js.map +1 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-context.js +7 -0
- package/esm2015/lib/modules/lookup/types/lookup-show-more-native-picker-context.js.map +1 -0
- package/esm2015/lib/modules/search/search-adapter.service.js +45 -0
- package/esm2015/lib/modules/search/search-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/search/search.component.js +260 -0
- package/esm2015/lib/modules/search/search.component.js.map +1 -0
- package/esm2015/lib/modules/search/search.module.js +46 -0
- package/esm2015/lib/modules/search/search.module.js.map +1 -0
- package/esm2015/lib/modules/shared/sky-lookup-resources.module.js +72 -0
- package/esm2015/lib/modules/shared/sky-lookup-resources.module.js.map +1 -0
- package/esm2015/lib/modules/shared/sky-lookup-string-utils.js +8 -0
- package/esm2015/lib/modules/shared/sky-lookup-string-utils.js.map +1 -0
- package/esm2015/lib/polyfills.js +30 -0
- package/esm2015/lib/polyfills.js.map +1 -0
- package/esm2015/skyux-lookup.js +2 -2
- package/esm2015/skyux-lookup.js.map +1 -0
- package/esm2015/testing/country-field/country-field-fixture.js +1 -1
- package/esm2015/testing/country-field/country-field-fixture.js.map +1 -0
- package/esm2015/testing/country-field/country-field-testing.module.js +1 -1
- package/esm2015/testing/country-field/country-field-testing.module.js.map +1 -0
- package/esm2015/testing/public-api.js +1 -1
- package/esm2015/testing/public-api.js.map +1 -0
- package/esm2015/testing/search/search-fixture.js +1 -1
- package/esm2015/testing/search/search-fixture.js.map +1 -0
- package/esm2015/testing/search/search-testing.module.js +1 -1
- package/esm2015/testing/search/search-testing.module.js.map +1 -0
- package/esm2015/testing/skyux-lookup-testing.js +1 -1
- package/esm2015/testing/skyux-lookup-testing.js.map +1 -0
- package/fesm2015/skyux-lookup-testing.js.map +1 -1
- package/fesm2015/skyux-lookup.js +2 -2
- package/fesm2015/skyux-lookup.js.map +1 -1
- package/index.d.ts +27 -0
- package/{modules → lib/modules}/autocomplete/autocomplete-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/autocomplete-default-search-function.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/autocomplete-input.directive.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/autocomplete-search-async-disabled.pipe.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/autocomplete.component.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/autocomplete.module.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-default-search-function-options.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-input-text-change.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-message-type.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-message.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-async-args.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-async-function.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-async-result-display-type.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-async-result.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-function-filter.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-function-response.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-search-function.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-selection-change.d.ts +0 -0
- package/{modules → lib/modules}/autocomplete/types/autocomplete-show-more-args.d.ts +0 -0
- package/{modules → lib/modules}/country-field/country-field.component.d.ts +0 -0
- package/{modules → lib/modules}/country-field/country-field.module.d.ts +0 -0
- package/{modules → lib/modules}/country-field/types/country.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup-autocomplete-adapter.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup-item-selected.pipe.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup-show-more-async-modal.component.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup-show-more-modal.component.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup.component.d.ts +0 -0
- package/{modules → lib/modules}/lookup/lookup.module.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-add-click-callback-args.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-add-click-event-args.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-select-mode-type.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-select-mode.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-show-more-config.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-show-more-custom-picker-context.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-show-more-custom-picker.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-show-more-native-picker-async-context.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-show-more-native-picker-config.d.ts +0 -0
- package/{modules → lib/modules}/lookup/types/lookup-show-more-native-picker-context.d.ts +0 -0
- package/{modules → lib/modules}/search/search-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/search/search.component.d.ts +0 -0
- package/{modules → lib/modules}/search/search.module.d.ts +0 -0
- package/{modules → lib/modules}/shared/sky-lookup-resources.module.d.ts +0 -0
- package/{modules → lib/modules}/shared/sky-lookup-string-utils.d.ts +0 -0
- package/{polyfills.d.ts → lib/polyfills.d.ts} +0 -0
- package/package.json +23 -9
- package/skyux-lookup.d.ts +1 -1
- package/LICENSE +0 -21
- package/esm2015/modules/autocomplete/autocomplete-adapter.service.js +0 -61
- package/esm2015/modules/autocomplete/autocomplete-default-search-function.js +0 -39
- package/esm2015/modules/autocomplete/autocomplete-input.directive.js +0 -220
- package/esm2015/modules/autocomplete/autocomplete-search-async-disabled.pipe.js +0 -19
- package/esm2015/modules/autocomplete/autocomplete.component.js +0 -731
- package/esm2015/modules/autocomplete/autocomplete.module.js +0 -65
- package/esm2015/modules/autocomplete/types/autocomplete-default-search-function-options.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-input-text-change.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-message-type.js +0 -15
- package/esm2015/modules/autocomplete/types/autocomplete-message.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-args.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-function.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-result-display-type.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-async-result.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-function-filter.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-function-response.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-search-function.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-selection-change.js +0 -2
- package/esm2015/modules/autocomplete/types/autocomplete-show-more-args.js +0 -2
- package/esm2015/modules/country-field/country-field.module.js +0 -49
- package/esm2015/modules/country-field/types/country.js +0 -2
- package/esm2015/modules/lookup/lookup-adapter.service.js +0 -21
- package/esm2015/modules/lookup/lookup-autocomplete-adapter.js +0 -72
- package/esm2015/modules/lookup/lookup-item-selected.pipe.js +0 -16
- package/esm2015/modules/lookup/lookup-show-more-async-modal.component.js +0 -184
- package/esm2015/modules/lookup/lookup-show-more-modal.component.js +0 -256
- package/esm2015/modules/lookup/lookup.component.js +0 -602
- package/esm2015/modules/lookup/lookup.module.js +0 -94
- package/esm2015/modules/lookup/types/lookup-add-click-callback-args.js +0 -2
- package/esm2015/modules/lookup/types/lookup-add-click-event-args.js +0 -2
- package/esm2015/modules/lookup/types/lookup-select-mode-type.js +0 -2
- package/esm2015/modules/lookup/types/lookup-select-mode.js +0 -16
- package/esm2015/modules/lookup/types/lookup-show-more-config.js +0 -2
- package/esm2015/modules/lookup/types/lookup-show-more-custom-picker-context.js +0 -7
- package/esm2015/modules/lookup/types/lookup-show-more-custom-picker.js +0 -2
- package/esm2015/modules/lookup/types/lookup-show-more-native-picker-async-context.js +0 -7
- package/esm2015/modules/lookup/types/lookup-show-more-native-picker-config.js +0 -2
- package/esm2015/modules/lookup/types/lookup-show-more-native-picker-context.js +0 -7
- package/esm2015/modules/search/search-adapter.service.js +0 -45
- package/esm2015/modules/search/search.component.js +0 -260
- package/esm2015/modules/search/search.module.js +0 -46
- package/esm2015/modules/shared/sky-lookup-resources.module.js +0 -72
- package/esm2015/modules/shared/sky-lookup-string-utils.js +0 -8
- package/esm2015/polyfills.js +0 -30
- package/esm2015/public-api.js +0 -32
- package/public-api.d.ts +0 -27
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookup-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/lookup/src/lib/modules/lookup/lookup-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,eAAe,CAAC;;AAEvD;;GAEG;AAEH,MAAM,OAAO,uBAAuB;IAC3B,UAAU,CAAC,KAAiB;QACjC,MAAM,OAAO,GACX,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;QAEzD,kBAAkB;QAClB,0BAA0B;QAC1B,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,KAAK,EAAE,CAAC;SACjB;IACH,CAAC;;qHAVU,uBAAuB;yHAAvB,uBAAuB;4FAAvB,uBAAuB;kBADnC,UAAU","sourcesContent":["import { ElementRef, Injectable } from '@angular/core';\n\n/**\n * @internal\n */\n@Injectable()\nexport class SkyLookupAdapterService {\n public focusInput(elRef: ElementRef): void {\n const inputEl: HTMLElement =\n elRef.nativeElement.querySelector('.sky-lookup-input');\n\n /* Sanity check */\n /* istanbul ignore else */\n if (inputEl) {\n inputEl.focus();\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Directive, EventEmitter, Input, Output, TemplateRef, } from '@angular/core';
|
|
2
|
+
import { skyAutocompleteDefaultSearchFunction } from '../autocomplete/autocomplete-default-search-function';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export class SkyLookupAutocompleteAdapter {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.searchAsync = new EventEmitter();
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Specifies an object property to display in the text input after users
|
|
13
|
+
* select an item in the dropdown list.
|
|
14
|
+
* @default "name"
|
|
15
|
+
*/
|
|
16
|
+
set descriptorProperty(value) {
|
|
17
|
+
this._descriptorProperty = value;
|
|
18
|
+
}
|
|
19
|
+
get descriptorProperty() {
|
|
20
|
+
return this._descriptorProperty || 'name';
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Specifies an array of object properties to search.
|
|
24
|
+
* @default ["name"]
|
|
25
|
+
*/
|
|
26
|
+
set propertiesToSearch(value) {
|
|
27
|
+
this._propertiesToSearch = value;
|
|
28
|
+
}
|
|
29
|
+
get propertiesToSearch() {
|
|
30
|
+
return this._propertiesToSearch || ['name'];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Specifies a function to dynamically manage the data source when users
|
|
34
|
+
* change the text in the lookup field. The search function must return
|
|
35
|
+
* an array or a promise of an array. The `search` property is particularly
|
|
36
|
+
* useful when the data source does not live in the source code.
|
|
37
|
+
*/
|
|
38
|
+
set search(value) {
|
|
39
|
+
this._search = value;
|
|
40
|
+
}
|
|
41
|
+
get search() {
|
|
42
|
+
return (this._search ||
|
|
43
|
+
skyAutocompleteDefaultSearchFunction({
|
|
44
|
+
propertiesToSearch: this.propertiesToSearch,
|
|
45
|
+
searchFilters: this.searchFilters,
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
SkyLookupAutocompleteAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupAutocompleteAdapter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
50
|
+
SkyLookupAutocompleteAdapter.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyLookupAutocompleteAdapter, inputs: { debounceTime: "debounceTime", descriptorProperty: "descriptorProperty", propertiesToSearch: "propertiesToSearch", search: "search", searchResultTemplate: "searchResultTemplate", searchTextMinimumCharacters: "searchTextMinimumCharacters", searchFilters: "searchFilters", searchResultsLimit: "searchResultsLimit" }, outputs: { searchAsync: "searchAsync" }, ngImport: i0 });
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupAutocompleteAdapter, decorators: [{
|
|
52
|
+
type: Directive
|
|
53
|
+
}], propDecorators: { debounceTime: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], descriptorProperty: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], propertiesToSearch: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], search: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}], searchResultTemplate: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], searchTextMinimumCharacters: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], searchFilters: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], searchResultsLimit: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], searchAsync: [{
|
|
70
|
+
type: Output
|
|
71
|
+
}] } });
|
|
72
|
+
//# sourceMappingURL=lookup-autocomplete-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookup-autocomplete-adapter.js","sourceRoot":"","sources":["../../../../../../../../libs/components/lookup/src/lib/modules/lookup/lookup-autocomplete-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,KAAK,EACL,MAAM,EACN,WA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@angular/core';\n\nimport { skyAutocompleteDefaultSearchFunction } from '../autocomplete/autocomplete-default-search-function';\nimport { SkyAutocompleteSearchAsyncArgs } from '../autocomplete/types/autocomplete-search-async-args';\n\nimport { SkyAutocompleteSearchFunction } from '../autocomplete/types/autocomplete-search-function';\n\nimport { SkyAutocompleteSearchFunctionFilter } from '../autocomplete/types/autocomplete-search-function-filter';\n\n/**\n * @internal\n */\n@Directive()\nexport class SkyLookupAutocompleteAdapter {\n /**\n * Specifies how many milliseconds to wait before searching while users\n * enter text in the lookup field.\n * @default 0\n */\n @Input()\n public debounceTime: number;\n\n /**\n * Specifies an object property to display in the text input after users\n * select an item in the dropdown list.\n * @default \"name\"\n */\n @Input()\n public set descriptorProperty(value: string) {\n this._descriptorProperty = value;\n }\n\n public get descriptorProperty(): string {\n return this._descriptorProperty || 'name';\n }\n\n /**\n * Specifies an array of object properties to search.\n * @default [\"name\"]\n */\n @Input()\n public set propertiesToSearch(value: string[]) {\n this._propertiesToSearch = value;\n }\n\n public get propertiesToSearch(): string[] {\n return this._propertiesToSearch || ['name'];\n }\n\n /**\n * Specifies a function to dynamically manage the data source when users\n * change the text in the lookup field. The search function must return\n * an array or a promise of an array. The `search` property is particularly\n * useful when the data source does not live in the source code.\n */\n @Input()\n public set search(value: SkyAutocompleteSearchFunction) {\n this._search = value;\n }\n\n public get search(): SkyAutocompleteSearchFunction {\n return (\n this._search ||\n skyAutocompleteDefaultSearchFunction({\n propertiesToSearch: this.propertiesToSearch,\n searchFilters: this.searchFilters,\n })\n );\n }\n\n /**\n * Specifies a template to format each option in the dropdown list. The lookup component\n * injects values into the template as `item` variables that reference all the object\n * properties of the options.\n */\n @Input()\n public searchResultTemplate: TemplateRef<any>;\n\n /**\n * Specifies the minimum number of characters that users must enter before\n * the lookup component searches the data source and displays search results\n * in the dropdown list.\n * @default 1\n */\n @Input()\n public searchTextMinimumCharacters: number;\n\n /**\n * Specifies an array of functions to call against each search result in order\n * to filter the search results when using the default search function. When\n * using a custom search function via the `search` property filters must be\n * applied manually inside that function. The function must return `true` or\n * `false` for each result to indicate whether to display it in the dropdown list.\n */\n @Input()\n public searchFilters: SkyAutocompleteSearchFunctionFilter[];\n\n /**\n * Specifies the maximum number of search results to display in the dropdown\n * list. By default, the lookup component displays all matching results.\n */\n @Input()\n public searchResultsLimit: number;\n\n @Output()\n public searchAsync = new EventEmitter<SkyAutocompleteSearchAsyncArgs>();\n\n private _descriptorProperty: string;\n private _propertiesToSearch: string[];\n private _search: SkyAutocompleteSearchFunction;\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class SkyLookupItemSelectedPipe {
|
|
4
|
+
transform(id, selectedIdMap) {
|
|
5
|
+
return selectedIdMap.has(id);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
SkyLookupItemSelectedPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupItemSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
9
|
+
SkyLookupItemSelectedPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupItemSelectedPipe, name: "skyLookupItemSelected" });
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupItemSelectedPipe, decorators: [{
|
|
11
|
+
type: Pipe,
|
|
12
|
+
args: [{
|
|
13
|
+
name: 'skyLookupItemSelected',
|
|
14
|
+
}]
|
|
15
|
+
}] });
|
|
16
|
+
//# sourceMappingURL=lookup-item-selected.pipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookup-item-selected.pipe.js","sourceRoot":"","sources":["../../../../../../../../libs/components/lookup/src/lib/modules/lookup/lookup-item-selected.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAKpD,MAAM,OAAO,yBAAyB;IAC7B,SAAS,CAAC,EAAW,EAAE,aAAoC;QAChE,OAAO,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC;;uHAHU,yBAAyB;qHAAzB,yBAAyB;4FAAzB,yBAAyB;kBAHrC,IAAI;mBAAC;oBACJ,IAAI,EAAE,uBAAuB;iBAC9B","sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'skyLookupItemSelected',\n})\nexport class SkyLookupItemSelectedPipe implements PipeTransform {\n public transform(id: unknown, selectedIdMap: Map<unknown, unknown>): boolean {\n return selectedIdMap.has(id);\n }\n}\n"]}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, } from '@angular/core';
|
|
2
|
+
import { SkyModalInstance } from '@skyux/modals';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { take } from 'rxjs/operators';
|
|
5
|
+
import { SkyLookupShowMoreNativePickerAsyncContext } from './types/lookup-show-more-native-picker-async-context';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@skyux/modals";
|
|
8
|
+
import * as i2 from "./types/lookup-show-more-native-picker-async-context";
|
|
9
|
+
import * as i3 from "@skyux/indicators";
|
|
10
|
+
import * as i4 from "@skyux/layout";
|
|
11
|
+
import * as i5 from "../search/search.component";
|
|
12
|
+
import * as i6 from "@skyux/forms";
|
|
13
|
+
import * as i7 from "@skyux/lists";
|
|
14
|
+
import * as i8 from "@angular/common";
|
|
15
|
+
import * as i9 from "@skyux/core";
|
|
16
|
+
import * as i10 from "@skyux/theme";
|
|
17
|
+
import * as i11 from "@skyux/i18n";
|
|
18
|
+
import * as i12 from "./lookup-item-selected.pipe";
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
* Internal component to implement the native picker.
|
|
22
|
+
*/
|
|
23
|
+
export class SkyLookupShowMoreAsyncModalComponent {
|
|
24
|
+
constructor(modalInstance, context, changeDetector) {
|
|
25
|
+
this.modalInstance = modalInstance;
|
|
26
|
+
this.context = context;
|
|
27
|
+
this.changeDetector = changeDetector;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
* Fires when users select the button to add new options to the list.
|
|
31
|
+
*/
|
|
32
|
+
this.addClick = new Subject();
|
|
33
|
+
this.displayedItems = [];
|
|
34
|
+
this.onlyShowSelected = false;
|
|
35
|
+
this.isSearching = false;
|
|
36
|
+
this.hasMoreItems = false;
|
|
37
|
+
this.isLoadingMore = false;
|
|
38
|
+
this.offset = 0;
|
|
39
|
+
this.ngUnsubscribe = new Subject();
|
|
40
|
+
}
|
|
41
|
+
ngOnInit() {
|
|
42
|
+
this.searchText = this.context.initialSearch;
|
|
43
|
+
this.createInitialSelectedItemsMap();
|
|
44
|
+
this.loadSearchResults();
|
|
45
|
+
}
|
|
46
|
+
ngOnDestroy() {
|
|
47
|
+
this.cancelCurrentSearch();
|
|
48
|
+
this.ngUnsubscribe.next();
|
|
49
|
+
this.ngUnsubscribe.complete();
|
|
50
|
+
}
|
|
51
|
+
addButtonClicked() {
|
|
52
|
+
this.addClick.next();
|
|
53
|
+
}
|
|
54
|
+
clearAll() {
|
|
55
|
+
this.selectedIdMap = new Map(this.selectedIdMap);
|
|
56
|
+
// Only deselect items that have been loaded; items that would be loaded
|
|
57
|
+
// after an infinite scroll event should remain selected.
|
|
58
|
+
for (const item of this.items) {
|
|
59
|
+
this.selectedIdMap.delete(item[this.context.idProperty]);
|
|
60
|
+
}
|
|
61
|
+
this.updateDisplayedItems();
|
|
62
|
+
this.changeDetector.markForCheck();
|
|
63
|
+
}
|
|
64
|
+
itemClick(selectedItem) {
|
|
65
|
+
if (this.context.selectMode === 'single') {
|
|
66
|
+
this.onItemSelect(!selectedItem.selected, selectedItem);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
onItemSelect(newSelectState, itemToSelect) {
|
|
70
|
+
const itemId = itemToSelect[this.context.idProperty];
|
|
71
|
+
// Create a new Map so the pipe transform will execute on the next
|
|
72
|
+
// change detection cycle.
|
|
73
|
+
this.selectedIdMap = new Map(this.selectedIdMap);
|
|
74
|
+
if (this.context.selectMode === 'single') {
|
|
75
|
+
if (newSelectState) {
|
|
76
|
+
this.selectedIdMap.clear();
|
|
77
|
+
this.selectedIdMap.set(itemId, itemToSelect);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
if (newSelectState) {
|
|
82
|
+
this.selectedIdMap.set(itemId, itemToSelect);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
this.selectedIdMap.delete(itemId);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
this.updateDisplayedItems();
|
|
89
|
+
}
|
|
90
|
+
searchApplied(searchText) {
|
|
91
|
+
this.offset = 0;
|
|
92
|
+
this.searchText = searchText;
|
|
93
|
+
this.loadSearchResults();
|
|
94
|
+
}
|
|
95
|
+
selectAll() {
|
|
96
|
+
this.selectedIdMap = new Map();
|
|
97
|
+
for (const item of this.items) {
|
|
98
|
+
this.selectedIdMap.set(item[this.context.idProperty], item);
|
|
99
|
+
}
|
|
100
|
+
this.updateDisplayedItems();
|
|
101
|
+
}
|
|
102
|
+
infiniteScrollEnd() {
|
|
103
|
+
this.cancelCurrentSearch();
|
|
104
|
+
/* Sanity check - else case would only happen if this was called directly */
|
|
105
|
+
/* istanbul ignore else */
|
|
106
|
+
if (this.hasMoreItems) {
|
|
107
|
+
this.isLoadingMore = true;
|
|
108
|
+
this.performSearch((result) => {
|
|
109
|
+
this.items = this.items.concat(result.items);
|
|
110
|
+
this.updateDisplayedItems();
|
|
111
|
+
this.isLoadingMore = false;
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
save() {
|
|
116
|
+
const selectedItems = Array.from(this.selectedIdMap.values(), (itemData, index) => ({
|
|
117
|
+
index,
|
|
118
|
+
itemData,
|
|
119
|
+
})).sort((a, b) => {
|
|
120
|
+
return this.items.indexOf(a.itemData) < this.items.indexOf(b.itemData)
|
|
121
|
+
? -1
|
|
122
|
+
: 1;
|
|
123
|
+
});
|
|
124
|
+
this.modalInstance.save(selectedItems);
|
|
125
|
+
}
|
|
126
|
+
loadSearchResults() {
|
|
127
|
+
this.cancelCurrentSearch();
|
|
128
|
+
this.isSearching = true;
|
|
129
|
+
this.performSearch((result) => {
|
|
130
|
+
this.isSearching = false;
|
|
131
|
+
this.items = result.items;
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
createInitialSelectedItemsMap() {
|
|
135
|
+
this.selectedIdMap = new Map(this.context.initialValue.map((item) => [
|
|
136
|
+
item[this.context.idProperty],
|
|
137
|
+
item,
|
|
138
|
+
]));
|
|
139
|
+
}
|
|
140
|
+
performSearch(processResults) {
|
|
141
|
+
this.currentSearchSub = this.context
|
|
142
|
+
.searchAsync({
|
|
143
|
+
displayType: 'modal',
|
|
144
|
+
offset: this.offset,
|
|
145
|
+
searchText: this.searchText || '',
|
|
146
|
+
continuationData: this.continuationData,
|
|
147
|
+
})
|
|
148
|
+
.pipe(take(1))
|
|
149
|
+
.subscribe((result) => {
|
|
150
|
+
processResults(result);
|
|
151
|
+
this.continuationData = result.continuationData;
|
|
152
|
+
this.hasMoreItems = result.hasMore;
|
|
153
|
+
this.offset = this.items.length;
|
|
154
|
+
this.updateDisplayedItems();
|
|
155
|
+
this.changeDetector.markForCheck();
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
updateDisplayedItems() {
|
|
159
|
+
if (this.onlyShowSelected) {
|
|
160
|
+
this.displayedItems = this.items.filter((item) => this.selectedIdMap.has(item[this.context.idProperty]));
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
this.displayedItems = this.items;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
cancelCurrentSearch() {
|
|
167
|
+
if (this.currentSearchSub) {
|
|
168
|
+
this.currentSearchSub.unsubscribe();
|
|
169
|
+
this.currentSearchSub = undefined;
|
|
170
|
+
this.isLoadingMore = false;
|
|
171
|
+
this.isSearching = false;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
SkyLookupShowMoreAsyncModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupShowMoreAsyncModalComponent, deps: [{ token: i1.SkyModalInstance }, { token: i2.SkyLookupShowMoreNativePickerAsyncContext }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
176
|
+
SkyLookupShowMoreAsyncModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyLookupShowMoreAsyncModalComponent, selector: "sky-lookup-show-more-async-modal", ngImport: i0, template: "<sky-modal>\n <sky-modal-header>\n <ng-container *ngIf=\"context.userConfig?.title; else defaultTitle\">\n {{ context.userConfig.title }}\n </ng-container>\n </sky-modal-header>\n <sky-modal-content>\n <sky-wait [isWaiting]=\"isSearching\"></sky-wait>\n <div\n [skyViewkeeper]=\"[\n '.sky-lookup-show-more-modal-toolbar',\n '.sky-lookup-show-more-modal-muiltiselect-toolbar'\n ]\"\n >\n <sky-toolbar class=\"sky-lookup-show-more-modal-toolbar\">\n <sky-toolbar-section>\n <sky-toolbar-item>\n <sky-search\n [debounceTime]=\"250\"\n [searchText]=\"searchText\"\n (searchApply)=\"searchApplied($event)\"\n >\n </sky-search>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <button\n *ngIf=\"context.showAddButton\"\n type=\"button\"\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-add\"\n (click)=\"addButtonClicked()\"\n >\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"add\"\n iconType=\"skyux\"\n ></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_lookup_show_more_add' | skyLibResources }}\n </button>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n <sky-toolbar\n *ngIf=\"context.selectMode === 'multiple'\"\n class=\"sky-lookup-show-more-modal-muiltiselect-toolbar\"\n >\n <sky-toolbar-section>\n <sky-toolbar-item>\n <button\n class=\"\n sky-btn sky-btn-link sky-lookup-show-more-modal-select-all-btn\n \"\n type=\"button\"\n (click)=\"selectAll()\"\n >\n {{\n 'skyux_lookup_show_more_select_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-item>\n <button\n class=\"\n sky-btn sky-btn-link sky-lookup-show-more-modal-clear-all-btn\n \"\n type=\"button\"\n (click)=\"clearAll()\"\n >\n {{\n 'skyux_lookup_show_more_clear_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <sky-checkbox\n [(checked)]=\"onlyShowSelected\"\n (change)=\"updateDisplayedItems()\"\n >\n <sky-checkbox-label>\n {{\n 'skyux_lookup_show_more_show_selected_option_title'\n | skyLibResources\n }}\n </sky-checkbox-label>\n </sky-checkbox>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n </div>\n <div\n *ngIf=\"!isSearching && displayedItems.length === 0\"\n class=\"sky-font-deemphasized sky-lookup-show-more-no-results\"\n >\n {{ 'skyux_lookup_show_more_no_results' | skyLibResources }}\n </div>\n <sky-repeater class=\"sky-lookup-show-more-repeater\" expandMode=\"none\">\n <sky-repeater-item\n *ngFor=\"let item of displayedItems\"\n [isSelected]=\"\n item[context.idProperty] | skyLookupItemSelected: selectedIdMap\n \"\n [selectable]=\"context.selectMode === 'multiple'\"\n (click)=\"itemClick(item)\"\n (keyup.enter)=\"itemClick(item)\"\n (isSelectedChange)=\"onItemSelect($event, item)\"\n >\n <sky-repeater-item-content>\n <ng-container\n *ngTemplateOutlet=\"\n context.userConfig?.itemTemplate\n ? context.userConfig?.itemTemplate\n : defaultItemTemplate;\n context: { item: item }\n \"\n >\n </ng-container>\n </sky-repeater-item-content>\n </sky-repeater-item>\n </sky-repeater>\n <sky-infinite-scroll\n [enabled]=\"hasMoreItems\"\n [loading]=\"isLoadingMore\"\n (scrollEnd)=\"infiniteScrollEnd()\"\n >\n </sky-infinite-scroll>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n class=\"\n sky-btn\n sky-btn-primary\n sky-margin-inline-compact\n sky-lookup-show-more-modal-save\n \"\n type=\"button\"\n [disabled]=\"isSearching\"\n (click)=\"save()\"\n >\n {{ 'skyux_lookup_show_more_select' | skyLibResources }}\n </button>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-close\"\n type=\"button\"\n (click)=\"modalInstance.close()\"\n >\n {{ 'skyux_lookup_show_more_cancel' | skyLibResources }}\n </button>\n </sky-modal-footer>\n</sky-modal>\n\n<ng-template let-item=\"item\" #defaultItemTemplate>\n {{ item[context.descriptorProperty] }}\n</ng-template>\n\n<ng-template #defaultTitle>\n <ng-container *ngIf=\"context.selectMode === 'single'\">\n {{ 'skyux_lookup_show_more_modal_title_single' | skyLibResources }}\n </ng-container>\n <ng-container *ngIf=\"context.selectMode === 'multiple'\">\n {{ 'skyux_lookup_show_more_modal_title_multiple' | skyLibResources }}\n </ng-container>\n</ng-template>\n", styles: [".sky-lookup-show-more-no-results{padding:20px 0}:host-context(.sky-theme-modern) .sky-lookup-show-more-no-results{padding:30px 0}.sky-theme-modern .sky-lookup-show-more-no-results{padding:30px 0}\n"], components: [{ type: i1.λ5, selector: "sky-modal", inputs: ["ariaRole", "tiledBody"] }, { type: i1.λ4, selector: "sky-modal-header" }, { type: i1.λ2, selector: "sky-modal-content" }, { type: i3.λ14, selector: "sky-wait", inputs: ["ariaLabel", "isWaiting", "isFullPage", "isNonBlocking"] }, { type: i4.λ37, selector: "sky-toolbar" }, { type: i4.λ38, selector: "sky-toolbar-section" }, { type: i4.λ39, selector: "sky-toolbar-item" }, { type: i5.SkySearchComponent, selector: "sky-search", inputs: ["searchText", "expandMode", "debounceTime", "disabled", "placeholderText"], outputs: ["searchApply", "searchChange", "searchClear"] }, { type: i4.λ40, selector: "sky-toolbar-view-actions" }, { type: i3.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: i6.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "required"], outputs: ["change", "checkedChange", "disabledChange"] }, { type: i6.λ4, selector: "sky-checkbox-label" }, { type: i7.λ11, selector: "sky-repeater", inputs: ["activeIndex", "ariaLabel", "reorderable", "expandMode"], outputs: ["activeIndexChange", "orderChange"] }, { type: i7.λ10, selector: "sky-repeater-item", inputs: ["itemName", "inlineFormConfig", "inlineFormTemplate", "isExpanded", "isSelected", "reorderable", "selectable", "showInlineForm", "tag"], outputs: ["collapse", "expand", "inlineFormClose", "isSelectedChange"] }, { type: i7.λ8, selector: "sky-repeater-item-content" }, { type: i7.λ6, selector: "sky-infinite-scroll", inputs: ["enabled", "loading"], outputs: ["scrollEnd"] }, { type: i1.λ3, selector: "sky-modal-footer" }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.λ3, selector: "[skyViewkeeper]", inputs: ["skyViewkeeper"] }, { type: i10.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "skyLibResources": i11.SkyLibResourcesPipe, "skyLookupItemSelected": i12.SkyLookupItemSelectedPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupShowMoreAsyncModalComponent, decorators: [{
|
|
178
|
+
type: Component,
|
|
179
|
+
args: [{
|
|
180
|
+
selector: 'sky-lookup-show-more-async-modal',
|
|
181
|
+
templateUrl: './lookup-show-more-async-modal.component.html',
|
|
182
|
+
styleUrls: ['./lookup-show-more-async-modal.component.scss'],
|
|
183
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
184
|
+
}]
|
|
185
|
+
}], ctorParameters: function () { return [{ type: i1.SkyModalInstance }, { type: i2.SkyLookupShowMoreNativePickerAsyncContext }, { type: i0.ChangeDetectorRef }]; } });
|
|
186
|
+
//# sourceMappingURL=lookup-show-more-async-modal.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lookup-show-more-async-modal.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/lookup/src/lib/modules/lookup/lookup-show-more-async-modal.component.ts","../../../../../../../../libs/components/lookup/src/lib/modules/lookup/lookup-show-more-async-modal.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GAGV,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAgB,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,yCAAyC,EAAE,MAAM,sDAAsD,CAAC;;;;;;;;;;;;;;AAEjH;;;GAGG;AAOH,MAAM,OAAO,oCAAoC;IAsB/C,YACS,aAA+B,EAC/B,OAAkD,EACjD,cAAiC;QAFlC,kBAAa,GAAb,aAAa,CAAkB;QAC/B,YAAO,GAAP,OAAO,CAA2C;QACjD,mBAAc,GAAd,cAAc,CAAmB;QAxB3C;;;WAGG;QACI,aAAQ,GAAkB,IAAI,OAAO,EAAE,CAAC;QAIxC,mBAAc,GAAc,EAAE,CAAC;QAC/B,q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,gBAAgB,CAAC,WAAW,EAAE,CAAC;YACpC,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;YAClC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;SAC1B;IACH,CAAC;;kIAzMU,oCAAoC;sHAApC,oCAAoC,wEC1BjD,64KAoKA;4FD1Ia,oCAAoC;kBANhD,SAAS;mBAAC;oBACT,QAAQ,EAAE,kCAAkC;oBAC5C,WAAW,EAAE,+CAA+C;oBAC5D,SAAS,EAAE,CAAC,+CAA+C,CAAC;oBAC5D,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD","sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { SkyAutocompleteSearchAsyncResult } from '../autocomplete/types/autocomplete-search-async-result';\n\nimport { SkyModalInstance } from '@skyux/modals';\n\nimport { Subject, Subscription } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport { SkyLookupShowMoreNativePickerAsyncContext } from './types/lookup-show-more-native-picker-async-context';\n\n/**\n * @internal\n * Internal component to implement the native picker.\n */\n@Component({\n selector: 'sky-lookup-show-more-async-modal',\n templateUrl: './lookup-show-more-async-modal.component.html',\n styleUrls: ['./lookup-show-more-async-modal.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SkyLookupShowMoreAsyncModalComponent implements OnInit, OnDestroy {\n /**\n * @internal\n * Fires when users select the button to add new options to the list.\n */\n public addClick: Subject<void> = new Subject();\n\n public items: unknown[];\n\n public displayedItems: unknown[] = [];\n public onlyShowSelected: boolean = false;\n public searchText: string;\n public isSearching = false;\n public hasMoreItems = false;\n public isLoadingMore = false;\n public selectedIdMap: Map<unknown, unknown>;\n\n private continuationData: unknown;\n private offset: number = 0;\n private ngUnsubscribe = new Subject<void>();\n private currentSearchSub: Subscription | undefined;\n\n constructor(\n public modalInstance: SkyModalInstance,\n public context: SkyLookupShowMoreNativePickerAsyncContext,\n private changeDetector: ChangeDetectorRef\n ) {}\n\n public ngOnInit(): void {\n this.searchText = this.context.initialSearch;\n\n this.createInitialSelectedItemsMap();\n this.loadSearchResults();\n }\n\n public ngOnDestroy(): void {\n this.cancelCurrentSearch();\n\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n public addButtonClicked(): void {\n this.addClick.next();\n }\n\n public clearAll(): void {\n this.selectedIdMap = new Map(this.selectedIdMap);\n\n // Only deselect items that have been loaded; items that would be loaded\n // after an infinite scroll event should remain selected.\n for (const item of this.items) {\n this.selectedIdMap.delete(item[this.context.idProperty]);\n }\n\n this.updateDisplayedItems();\n\n this.changeDetector.markForCheck();\n }\n\n public itemClick(selectedItem: any): void {\n if (this.context.selectMode === 'single') {\n this.onItemSelect(!selectedItem.selected, selectedItem);\n }\n }\n\n public onItemSelect(newSelectState: boolean, itemToSelect: any): void {\n const itemId = itemToSelect[this.context.idProperty];\n\n // Create a new Map so the pipe transform will execute on the next\n // change detection cycle.\n this.selectedIdMap = new Map(this.selectedIdMap);\n\n if (this.context.selectMode === 'single') {\n if (newSelectState) {\n this.selectedIdMap.clear();\n this.selectedIdMap.set(itemId, itemToSelect);\n }\n } else {\n if (newSelectState) {\n this.selectedIdMap.set(itemId, itemToSelect);\n } else {\n this.selectedIdMap.delete(itemId);\n }\n }\n\n this.updateDisplayedItems();\n }\n\n public searchApplied(searchText: string) {\n this.offset = 0;\n this.searchText = searchText;\n\n this.loadSearchResults();\n }\n\n public selectAll(): void {\n this.selectedIdMap = new Map();\n\n for (const item of this.items) {\n this.selectedIdMap.set(item[this.context.idProperty], item);\n }\n\n this.updateDisplayedItems();\n }\n\n public infiniteScrollEnd(): void {\n this.cancelCurrentSearch();\n\n /* Sanity check - else case would only happen if this was called directly */\n /* istanbul ignore else */\n if (this.hasMoreItems) {\n this.isLoadingMore = true;\n\n this.performSearch((result) => {\n this.items = this.items.concat(result.items);\n\n this.updateDisplayedItems();\n\n this.isLoadingMore = false;\n });\n }\n }\n\n public save(): void {\n const selectedItems = Array.from(\n this.selectedIdMap.values(),\n (itemData, index) => ({\n index,\n itemData,\n })\n ).sort((a, b) => {\n return this.items.indexOf(a.itemData) < this.items.indexOf(b.itemData)\n ? -1\n : 1;\n });\n\n this.modalInstance.save(selectedItems);\n }\n\n private loadSearchResults(): void {\n this.cancelCurrentSearch();\n\n this.isSearching = true;\n\n this.performSearch((result) => {\n this.isSearching = false;\n this.items = result.items;\n });\n }\n\n private createInitialSelectedItemsMap(): void {\n this.selectedIdMap = new Map(\n this.context.initialValue.map((item) => [\n item[this.context.idProperty],\n item,\n ])\n );\n }\n\n private performSearch(\n processResults: (result: SkyAutocompleteSearchAsyncResult) => void\n ): void {\n this.currentSearchSub = this.context\n .searchAsync({\n displayType: 'modal',\n offset: this.offset,\n searchText: this.searchText || '',\n continuationData: this.continuationData,\n })\n .pipe(take(1))\n .subscribe((result) => {\n processResults(result);\n\n this.continuationData = result.continuationData;\n this.hasMoreItems = result.hasMore;\n this.offset = this.items.length;\n\n this.updateDisplayedItems();\n\n this.changeDetector.markForCheck();\n });\n }\n\n private updateDisplayedItems(): void {\n if (this.onlyShowSelected) {\n this.displayedItems = this.items.filter((item) =>\n this.selectedIdMap.has(item[this.context.idProperty])\n );\n } else {\n this.displayedItems = this.items;\n }\n }\n\n private cancelCurrentSearch(): void {\n if (this.currentSearchSub) {\n this.currentSearchSub.unsubscribe();\n this.currentSearchSub = undefined;\n this.isLoadingMore = false;\n this.isSearching = false;\n }\n }\n}\n","<sky-modal>\n <sky-modal-header>\n <ng-container *ngIf=\"context.userConfig?.title; else defaultTitle\">\n {{ context.userConfig.title }}\n </ng-container>\n </sky-modal-header>\n <sky-modal-content>\n <sky-wait [isWaiting]=\"isSearching\"></sky-wait>\n <div\n [skyViewkeeper]=\"[\n '.sky-lookup-show-more-modal-toolbar',\n '.sky-lookup-show-more-modal-muiltiselect-toolbar'\n ]\"\n >\n <sky-toolbar class=\"sky-lookup-show-more-modal-toolbar\">\n <sky-toolbar-section>\n <sky-toolbar-item>\n <sky-search\n [debounceTime]=\"250\"\n [searchText]=\"searchText\"\n (searchApply)=\"searchApplied($event)\"\n >\n </sky-search>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <button\n *ngIf=\"context.showAddButton\"\n type=\"button\"\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-add\"\n (click)=\"addButtonClicked()\"\n >\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"add\"\n iconType=\"skyux\"\n ></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_lookup_show_more_add' | skyLibResources }}\n </button>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n <sky-toolbar\n *ngIf=\"context.selectMode === 'multiple'\"\n class=\"sky-lookup-show-more-modal-muiltiselect-toolbar\"\n >\n <sky-toolbar-section>\n <sky-toolbar-item>\n <button\n class=\"\n sky-btn sky-btn-link sky-lookup-show-more-modal-select-all-btn\n \"\n type=\"button\"\n (click)=\"selectAll()\"\n >\n {{\n 'skyux_lookup_show_more_select_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-item>\n <button\n class=\"\n sky-btn sky-btn-link sky-lookup-show-more-modal-clear-all-btn\n \"\n type=\"button\"\n (click)=\"clearAll()\"\n >\n {{\n 'skyux_lookup_show_more_clear_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <sky-checkbox\n [(checked)]=\"onlyShowSelected\"\n (change)=\"updateDisplayedItems()\"\n >\n <sky-checkbox-label>\n {{\n 'skyux_lookup_show_more_show_selected_option_title'\n | skyLibResources\n }}\n </sky-checkbox-label>\n </sky-checkbox>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n </div>\n <div\n *ngIf=\"!isSearching && displayedItems.length === 0\"\n class=\"sky-font-deemphasized sky-lookup-show-more-no-results\"\n >\n {{ 'skyux_lookup_show_more_no_results' | skyLibResources }}\n </div>\n <sky-repeater class=\"sky-lookup-show-more-repeater\" expandMode=\"none\">\n <sky-repeater-item\n *ngFor=\"let item of displayedItems\"\n [isSelected]=\"\n item[context.idProperty] | skyLookupItemSelected: selectedIdMap\n \"\n [selectable]=\"context.selectMode === 'multiple'\"\n (click)=\"itemClick(item)\"\n (keyup.enter)=\"itemClick(item)\"\n (isSelectedChange)=\"onItemSelect($event, item)\"\n >\n <sky-repeater-item-content>\n <ng-container\n *ngTemplateOutlet=\"\n context.userConfig?.itemTemplate\n ? context.userConfig?.itemTemplate\n : defaultItemTemplate;\n context: { item: item }\n \"\n >\n </ng-container>\n </sky-repeater-item-content>\n </sky-repeater-item>\n </sky-repeater>\n <sky-infinite-scroll\n [enabled]=\"hasMoreItems\"\n [loading]=\"isLoadingMore\"\n (scrollEnd)=\"infiniteScrollEnd()\"\n >\n </sky-infinite-scroll>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n class=\"\n sky-btn\n sky-btn-primary\n sky-margin-inline-compact\n sky-lookup-show-more-modal-save\n \"\n type=\"button\"\n [disabled]=\"isSearching\"\n (click)=\"save()\"\n >\n {{ 'skyux_lookup_show_more_select' | skyLibResources }}\n </button>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-close\"\n type=\"button\"\n (click)=\"modalInstance.close()\"\n >\n {{ 'skyux_lookup_show_more_cancel' | skyLibResources }}\n </button>\n </sky-modal-footer>\n</sky-modal>\n\n<ng-template let-item=\"item\" #defaultItemTemplate>\n {{ item[context.descriptorProperty] }}\n</ng-template>\n\n<ng-template #defaultTitle>\n <ng-container *ngIf=\"context.selectMode === 'single'\">\n {{ 'skyux_lookup_show_more_modal_title_single' | skyLibResources }}\n </ng-container>\n <ng-container *ngIf=\"context.selectMode === 'multiple'\">\n {{ 'skyux_lookup_show_more_modal_title_multiple' | skyLibResources }}\n </ng-container>\n</ng-template>\n"]}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, } from '@angular/core';
|
|
2
|
+
import { SkyModalInstance } from '@skyux/modals';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { SkyLookupShowMoreNativePickerContext } from './types/lookup-show-more-native-picker-context';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@skyux/modals";
|
|
7
|
+
import * as i2 from "./types/lookup-show-more-native-picker-context";
|
|
8
|
+
import * as i3 from "@skyux/layout";
|
|
9
|
+
import * as i4 from "../search/search.component";
|
|
10
|
+
import * as i5 from "@skyux/indicators";
|
|
11
|
+
import * as i6 from "@skyux/forms";
|
|
12
|
+
import * as i7 from "@skyux/lists";
|
|
13
|
+
import * as i8 from "@angular/common";
|
|
14
|
+
import * as i9 from "@skyux/core";
|
|
15
|
+
import * as i10 from "@skyux/theme";
|
|
16
|
+
import * as i11 from "@skyux/i18n";
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
* Internal component to implement the native picker.
|
|
20
|
+
*/
|
|
21
|
+
export class SkyLookupShowMoreModalComponent {
|
|
22
|
+
constructor(modalInstance, context, changeDetector) {
|
|
23
|
+
this.modalInstance = modalInstance;
|
|
24
|
+
this.context = context;
|
|
25
|
+
this.changeDetector = changeDetector;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* Fires when users select the button to add new options to the list.
|
|
29
|
+
*/
|
|
30
|
+
this.addClick = new Subject();
|
|
31
|
+
this.dataManagerConfig = {
|
|
32
|
+
sortOptions: [
|
|
33
|
+
{
|
|
34
|
+
id: 'az',
|
|
35
|
+
label: 'Alphabetical (A - Z)',
|
|
36
|
+
descending: false,
|
|
37
|
+
propertyName: 'name',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: 'za',
|
|
41
|
+
label: 'Alphabetical (Z - A)',
|
|
42
|
+
descending: true,
|
|
43
|
+
propertyName: 'name',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
this.displayedItems = [];
|
|
48
|
+
this.itemsHaveMore = false;
|
|
49
|
+
this.onlyShowSelected = false;
|
|
50
|
+
this.selectedItems = [];
|
|
51
|
+
this.itemIndex = 0;
|
|
52
|
+
this.ngUnsubscribe = new Subject();
|
|
53
|
+
}
|
|
54
|
+
ngAfterViewInit() {
|
|
55
|
+
this.searchText = this.context.initialSearch;
|
|
56
|
+
this.addItems();
|
|
57
|
+
}
|
|
58
|
+
ngOnDestroy() {
|
|
59
|
+
this.ngUnsubscribe.next();
|
|
60
|
+
this.ngUnsubscribe.complete();
|
|
61
|
+
}
|
|
62
|
+
addButtonClicked() {
|
|
63
|
+
this.addClick.next();
|
|
64
|
+
}
|
|
65
|
+
addItems() {
|
|
66
|
+
if (!this.items || this.items.length === 0) {
|
|
67
|
+
let selectedItems = this.selectedItems.slice();
|
|
68
|
+
this.items = this.context.items
|
|
69
|
+
? this.context.items.map((item) => {
|
|
70
|
+
return {
|
|
71
|
+
value: item,
|
|
72
|
+
selected: false,
|
|
73
|
+
};
|
|
74
|
+
})
|
|
75
|
+
: [];
|
|
76
|
+
this.items.forEach((item) => {
|
|
77
|
+
const isInitialValue = this.context.initialValue === item.value;
|
|
78
|
+
const initialIsArray = Array.isArray(this.context.initialValue);
|
|
79
|
+
const initialValueContainsItem = this.context.initialValue.findIndex((initialItem) => initialItem === item.value) >= 0;
|
|
80
|
+
if (isInitialValue || (initialIsArray && initialValueContainsItem)) {
|
|
81
|
+
item.selected = true;
|
|
82
|
+
const itemIndex = this.items.indexOf(item);
|
|
83
|
+
if (selectedItems.findIndex((selectedItem) => selectedItem.index === itemIndex) < 0) {
|
|
84
|
+
selectedItems.push({ index: itemIndex, itemData: item.value });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
this.selectedItems = selectedItems;
|
|
89
|
+
this.updateDataState();
|
|
90
|
+
this.changeDetector.markForCheck();
|
|
91
|
+
}
|
|
92
|
+
this.itemIndex = this.itemIndex + 10;
|
|
93
|
+
this.searchItems(this.items).then((searchedItems) => {
|
|
94
|
+
this.displayedItems = searchedItems.slice(0, this.itemIndex);
|
|
95
|
+
if (this.itemIndex > searchedItems.length) {
|
|
96
|
+
this.itemsHaveMore = false;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.itemsHaveMore = true;
|
|
100
|
+
}
|
|
101
|
+
this.changeDetector.markForCheck();
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
clearAll() {
|
|
105
|
+
this.displayedItems.forEach((item) => {
|
|
106
|
+
if (item.selected) {
|
|
107
|
+
item.selected = false;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
this.selectedItems = [];
|
|
111
|
+
this.updateDataState();
|
|
112
|
+
this.changeDetector.markForCheck();
|
|
113
|
+
}
|
|
114
|
+
itemClick(selectedItem) {
|
|
115
|
+
if (this.context.selectMode === 'single') {
|
|
116
|
+
this.onItemSelect(!selectedItem.selected, selectedItem);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
onItemSelect(newSelectState, itemToSelect) {
|
|
120
|
+
if (this.context.selectMode === 'single') {
|
|
121
|
+
/* Sanity check - single select mode should only alow for a `true` select state */
|
|
122
|
+
/* istanbul ignore else */
|
|
123
|
+
if (newSelectState) {
|
|
124
|
+
itemToSelect.selected = true;
|
|
125
|
+
this.items.forEach((item) => {
|
|
126
|
+
if (item.value !== itemToSelect.value) {
|
|
127
|
+
item.selected = false;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
this.displayedItems.forEach((item) => {
|
|
131
|
+
if (item.value !== itemToSelect.value) {
|
|
132
|
+
item.selected = false;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
const itemIndex = this.items.findIndex((item) => item.value === itemToSelect.value);
|
|
136
|
+
this.selectedItems = [
|
|
137
|
+
{ index: itemIndex, itemData: this.items[itemIndex].value },
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
let selectedItems = this.selectedItems;
|
|
143
|
+
const allItemsIndex = this.items.findIndex((item) => item.value === itemToSelect.value);
|
|
144
|
+
let selectedItemsIndex = selectedItems.findIndex((selectedItem) => selectedItem.index === allItemsIndex);
|
|
145
|
+
if (newSelectState && selectedItemsIndex === -1) {
|
|
146
|
+
selectedItems.push({
|
|
147
|
+
index: allItemsIndex,
|
|
148
|
+
itemData: this.items[allItemsIndex].value,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
else if (!newSelectState && selectedItemsIndex !== -1) {
|
|
152
|
+
selectedItems.splice(selectedItemsIndex, 1);
|
|
153
|
+
}
|
|
154
|
+
this.selectedItems = selectedItems;
|
|
155
|
+
}
|
|
156
|
+
this.updateDataState();
|
|
157
|
+
this.changeDetector.markForCheck();
|
|
158
|
+
}
|
|
159
|
+
searchApplied(searchText) {
|
|
160
|
+
/* istanbul ignore else */
|
|
161
|
+
if (this.searchText !== searchText) {
|
|
162
|
+
this.itemIndex = 10;
|
|
163
|
+
}
|
|
164
|
+
this.searchText = searchText;
|
|
165
|
+
this.updateDataState();
|
|
166
|
+
}
|
|
167
|
+
searchItems(items) {
|
|
168
|
+
let searchText = this.searchText;
|
|
169
|
+
if (searchText) {
|
|
170
|
+
const resultValues = this.context.search(searchText, items.map((item) => {
|
|
171
|
+
return item.value;
|
|
172
|
+
}));
|
|
173
|
+
if (resultValues instanceof Array) {
|
|
174
|
+
const result = items.filter((item) => resultValues.indexOf(item.value) >= 0);
|
|
175
|
+
return Promise.resolve(result);
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
return resultValues.then((values) => {
|
|
179
|
+
const result = items.filter((item) => values.indexOf(item.value) >= 0);
|
|
180
|
+
return Promise.resolve(result);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
return Promise.resolve(items);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
selectAll() {
|
|
189
|
+
let selectedItems = this.selectedItems;
|
|
190
|
+
this.displayedItems.forEach((item) => {
|
|
191
|
+
if (!item.selected) {
|
|
192
|
+
item.selected = true;
|
|
193
|
+
const index = this.items.indexOf(item);
|
|
194
|
+
/* Sanity check */
|
|
195
|
+
/* istanbul ignore else */
|
|
196
|
+
if (selectedItems.findIndex((selectedItem) => selectedItem.index === index) < 0) {
|
|
197
|
+
selectedItems.push({
|
|
198
|
+
index: index,
|
|
199
|
+
itemData: this.items[index].value,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
this.selectedItems = selectedItems;
|
|
205
|
+
this.updateDataState();
|
|
206
|
+
this.changeDetector.markForCheck();
|
|
207
|
+
}
|
|
208
|
+
updateDataState() {
|
|
209
|
+
let selectedItems = this.selectedItems;
|
|
210
|
+
this.items.forEach((item, index) => {
|
|
211
|
+
item.selected =
|
|
212
|
+
selectedItems.findIndex((selectedItem) => selectedItem.index === index) !== -1;
|
|
213
|
+
});
|
|
214
|
+
this.searchItems(this.items).then((searchedItems) => {
|
|
215
|
+
if (this.onlyShowSelected) {
|
|
216
|
+
searchedItems = searchedItems.filter((item) => item.selected);
|
|
217
|
+
}
|
|
218
|
+
this.displayedItems = searchedItems.slice(0, this.itemIndex);
|
|
219
|
+
if (this.itemIndex > searchedItems.length) {
|
|
220
|
+
this.itemsHaveMore = false;
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
this.itemsHaveMore = true;
|
|
224
|
+
}
|
|
225
|
+
this.changeDetector.markForCheck();
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
updateItemData(data) {
|
|
229
|
+
this.context.items = data;
|
|
230
|
+
this.items = undefined;
|
|
231
|
+
this.itemIndex = 10;
|
|
232
|
+
this.selectedItems.forEach((selectedItem) => {
|
|
233
|
+
this.context.items.forEach((item, index) => {
|
|
234
|
+
if (selectedItem.itemData === item) {
|
|
235
|
+
selectedItem.index = index;
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
this.addItems();
|
|
240
|
+
this.changeDetector.markForCheck();
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
SkyLookupShowMoreModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupShowMoreModalComponent, deps: [{ token: i1.SkyModalInstance }, { token: i2.SkyLookupShowMoreNativePickerContext }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
244
|
+
SkyLookupShowMoreModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyLookupShowMoreModalComponent, selector: "skyux-lookup-show-more-modal", ngImport: i0, template: "<sky-modal>\n <sky-modal-header>\n <ng-container *ngIf=\"context.userConfig?.title; else defaultTitle\">\n {{ context.userConfig.title }}\n </ng-container>\n </sky-modal-header>\n <sky-modal-content>\n <div\n [skyViewkeeper]=\"[\n '.sky-lookup-show-more-modal-toolbar',\n '.sky-lookup-show-more-modal-muiltiselect-toolbar'\n ]\"\n >\n <sky-toolbar class=\"sky-lookup-show-more-modal-toolbar\">\n <sky-toolbar-section>\n <sky-toolbar-item>\n <sky-search\n [debounceTime]=\"250\"\n [searchText]=\"searchText\"\n (searchApply)=\"searchApplied($event)\"\n >\n </sky-search>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <button\n *ngIf=\"context.showAddButton\"\n type=\"button\"\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-add\"\n (click)=\"addButtonClicked()\"\n >\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"add\"\n iconType=\"skyux\"\n ></sky-icon>\n <sky-icon *skyThemeIf=\"'default'\" icon=\"plus-circle\"></sky-icon>\n {{ 'skyux_lookup_show_more_add' | skyLibResources }}\n </button>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n <sky-toolbar\n *ngIf=\"context.selectMode === 'multiple'\"\n class=\"sky-lookup-show-more-modal-muiltiselect-toolbar\"\n >\n <sky-toolbar-section>\n <sky-toolbar-item>\n <button\n class=\"\n sky-btn sky-btn-link sky-lookup-show-more-modal-select-all-btn\n \"\n type=\"button\"\n (click)=\"selectAll()\"\n >\n {{\n 'skyux_lookup_show_more_select_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-item>\n <button\n class=\"\n sky-btn sky-btn-link sky-lookup-show-more-modal-clear-all-btn\n \"\n type=\"button\"\n (click)=\"clearAll()\"\n >\n {{\n 'skyux_lookup_show_more_clear_all_button_title'\n | skyLibResources\n }}\n </button>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <sky-checkbox\n [(checked)]=\"onlyShowSelected\"\n (change)=\"updateDataState()\"\n >\n <sky-checkbox-label>\n {{\n 'skyux_lookup_show_more_show_selected_option_title'\n | skyLibResources\n }}\n </sky-checkbox-label>\n </sky-checkbox>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n </div>\n <div\n *ngIf=\"displayedItems.length === 0\"\n class=\"sky-font-deemphasized sky-lookup-show-more-no-results\"\n >\n {{ 'skyux_lookup_show_more_no_results' | skyLibResources }}\n </div>\n <sky-repeater class=\"sky-lookup-show-more-repeater\" expandMode=\"none\">\n <sky-repeater-item\n *ngFor=\"let item of displayedItems\"\n [selectable]=\"context.selectMode === 'multiple'\"\n [(isSelected)]=\"item.selected\"\n (click)=\"itemClick(item)\"\n (keyup.enter)=\"itemClick(item)\"\n (isSelectedChange)=\"onItemSelect($event, item)\"\n >\n <sky-repeater-item-content>\n <ng-container\n *ngTemplateOutlet=\"\n context.userConfig?.itemTemplate\n ? context.userConfig?.itemTemplate\n : defaultItemTemplate;\n context: { item: item.value }\n \"\n >\n </ng-container>\n </sky-repeater-item-content>\n </sky-repeater-item>\n </sky-repeater>\n <sky-infinite-scroll [enabled]=\"itemsHaveMore\" (scrollEnd)=\"addItems()\">\n </sky-infinite-scroll>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n class=\"\n sky-btn\n sky-btn-primary\n sky-margin-inline-compact\n sky-lookup-show-more-modal-save\n \"\n type=\"button\"\n (click)=\"modalInstance.save(selectedItems)\"\n >\n {{ 'skyux_lookup_show_more_select' | skyLibResources }}\n </button>\n <button\n class=\"sky-btn sky-btn-link sky-lookup-show-more-modal-close\"\n type=\"button\"\n (click)=\"modalInstance.close()\"\n >\n {{ 'skyux_lookup_show_more_cancel' | skyLibResources }}\n </button>\n </sky-modal-footer>\n</sky-modal>\n\n<ng-template let-item=\"item\" #defaultItemTemplate>\n {{ item[context.descriptorProperty] }}\n</ng-template>\n\n<ng-template #defaultTitle>\n <ng-container *ngIf=\"context.selectMode === 'single'\">\n {{ 'skyux_lookup_show_more_modal_title_single' | skyLibResources }}\n </ng-container>\n <ng-container *ngIf=\"context.selectMode === 'multiple'\">\n {{ 'skyux_lookup_show_more_modal_title_multiple' | skyLibResources }}\n </ng-container>\n</ng-template>\n", styles: [".sky-lookup-show-more-no-results{padding:20px 0}:host-context(.sky-theme-modern) .sky-lookup-show-more-no-results{padding:30px 0}.sky-theme-modern .sky-lookup-show-more-no-results{padding:30px 0}\n"], components: [{ type: i1.λ5, selector: "sky-modal", inputs: ["ariaRole", "tiledBody"] }, { type: i1.λ4, selector: "sky-modal-header" }, { type: i1.λ2, selector: "sky-modal-content" }, { type: i3.λ37, selector: "sky-toolbar" }, { type: i3.λ38, selector: "sky-toolbar-section" }, { type: i3.λ39, selector: "sky-toolbar-item" }, { type: i4.SkySearchComponent, selector: "sky-search", inputs: ["searchText", "expandMode", "debounceTime", "disabled", "placeholderText"], outputs: ["searchApply", "searchChange", "searchClear"] }, { type: i3.λ40, selector: "sky-toolbar-view-actions" }, { type: i5.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: i6.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "required"], outputs: ["change", "checkedChange", "disabledChange"] }, { type: i6.λ4, selector: "sky-checkbox-label" }, { type: i7.λ11, selector: "sky-repeater", inputs: ["activeIndex", "ariaLabel", "reorderable", "expandMode"], outputs: ["activeIndexChange", "orderChange"] }, { type: i7.λ10, selector: "sky-repeater-item", inputs: ["itemName", "inlineFormConfig", "inlineFormTemplate", "isExpanded", "isSelected", "reorderable", "selectable", "showInlineForm", "tag"], outputs: ["collapse", "expand", "inlineFormClose", "isSelectedChange"] }, { type: i7.λ8, selector: "sky-repeater-item-content" }, { type: i7.λ6, selector: "sky-infinite-scroll", inputs: ["enabled", "loading"], outputs: ["scrollEnd"] }, { type: i1.λ3, selector: "sky-modal-footer" }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.λ3, selector: "[skyViewkeeper]", inputs: ["skyViewkeeper"] }, { type: i10.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "skyLibResources": i11.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupShowMoreModalComponent, decorators: [{
|
|
246
|
+
type: Component,
|
|
247
|
+
args: [{
|
|
248
|
+
// Suppress this error rather than fix the selector since consumers with unit tests
|
|
249
|
+
// may be looking for an element with this selector. We can change it in the next major
|
|
250
|
+
// version of SKY UX.
|
|
251
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
252
|
+
selector: 'skyux-lookup-show-more-modal',
|
|
253
|
+
templateUrl: './lookup-show-more-modal.component.html',
|
|
254
|
+
styleUrls: ['./lookup-show-more-modal.component.scss'],
|
|
255
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
256
|
+
}]
|
|
257
|
+
}], ctorParameters: function () { return [{ type: i1.SkyModalInstance }, { type: i2.SkyLookupShowMoreNativePickerContext }, { type: i0.ChangeDetectorRef }]; } });
|
|
258
|
+
//# sourceMappingURL=lookup-show-more-modal.component.js.map
|