@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"country-field.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/lookup/src/lib/modules/country-field/country-field.component.ts","../../../../../../../../libs/components/lookup/src/lib/modules/country-field/country-field.component.html"],"names":[],"mappings":"AAAA,OAAO,EAEL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,KAAK,EAGL,QAAQ,EACR,MAAM,EACN,WAAW,EAEX,SAAS,EACT,UAAU,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,WAAW,EACX,aAAa,EACb,SAAS,EACT,OAAO,GAGR,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;;;;;;;;;;;AAK7F,sDAAsD;AACtD,MAAM,2BAA2B,GAAG;IAClC,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;IACvD,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,gBAAgB;AAChB,IAAI,QAAQ,GAAG,CAAC,CAA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gBAOO,qBAAqB;sBAJ5B,SAAS;uBAAC,uBAAuB,EAAE;wBAClC,IAAI,EAAE,WAAW;wBACjB,MAAM,EAAE,IAAI;qBACb","sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n TemplateRef,\n Type,\n ViewChild,\n forwardRef,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n FormControl,\n NG_VALIDATORS,\n NgControl,\n NgModel,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport { SkyAppWindowRef } from '@skyux/core';\nimport { SkyInputBoxHostService } from '@skyux/forms';\nimport { SkyThemeService } from '@skyux/theme';\n\nimport 'intl-tel-input';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { SkyAutocompleteInputDirective } from '../autocomplete/autocomplete-input.directive';\nimport { SkyAutocompleteSelectionChange } from '../autocomplete/types/autocomplete-selection-change';\n\nimport { SkyCountryFieldCountry } from './types/country';\n\n// tslint:disable:no-forward-ref no-use-before-declare\nconst SKY_COUNTRY_FIELD_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SkyCountryFieldComponent),\n multi: true,\n};\n\n// tslint:enable\nlet uniqueId = 0;\n\n@Component({\n selector: 'sky-country-field',\n templateUrl: './country-field.component.html',\n styleUrls: ['./country-field.component.scss'],\n providers: [SKY_COUNTRY_FIELD_VALIDATOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SkyCountryFieldComponent\n implements AfterViewInit, ControlValueAccessor, OnDestroy, OnInit, Validator\n{\n /**\n * Specifies the value for the `autocomplete` attribute on the form input.\n * @default \"off\"\n */\n @Input()\n public autocompleteAttribute: string;\n\n /**\n * Specifies the [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)\n * country code for the default country.\n * When search results include the default country, it appears at the top of the list.\n * @default \"us\"\n */\n @Input()\n public set defaultCountry(value: string) {\n if (value !== this._defaultCountry) {\n this._defaultCountry = value.toLowerCase();\n\n this.defaultCountryData = this.countries.find(\n (country) => country.iso2 === this._defaultCountry\n );\n\n this.sortCountriesWithSelectedAndDefault(this.selectedCountry);\n }\n }\n\n public get defaultCountry(): string {\n return this._defaultCountry;\n }\n\n /**\n * Indicates whether to disable the country field.\n * @default false\n */\n @Input()\n public set disabled(isDisabled: boolean) {\n this.removeEventListeners();\n\n if (!isDisabled) {\n this.addEventListeners();\n }\n\n this._disabled = isDisabled;\n\n this.changeDetector.markForCheck();\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n\n /**\n * Indicates whether to hide the flag in the input element.\n * @default false\n */\n @Input()\n public hideSelectedCountryFlag: boolean;\n\n /**\n * Indicates whether to include phone information in the selected country and country dropdown.\n * @default false\n */\n @Input()\n public set includePhoneInfo(includePhoneInfo: boolean) {\n this._includePhoneInfo = includePhoneInfo;\n\n this.setupCountries();\n }\n\n public get includePhoneInfo(): boolean {\n return this._includePhoneInfo;\n }\n\n /**\n * Specifies the [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)\n * country codes for the countries that users can select. By default, all countries are available.\n */\n @Input()\n public set supportedCountryISOs(value: string[]) {\n // Ensure all values are the same case.\n if (Array.isArray(value)) {\n value = value.map((v) => v.toLowerCase());\n }\n\n this._supportedCountryISOs = value;\n this.setupCountries();\n }\n\n public get supportedCountryISOs(): string[] {\n return this._supportedCountryISOs;\n }\n\n /**\n * Fires when the selected country changes.\n */\n @Output()\n public selectedCountryChange: EventEmitter<SkyCountryFieldCountry> = new EventEmitter<SkyCountryFieldCountry>();\n\n public countries: SkyCountryFieldCountry[];\n\n public countrySearchFormControl: FormControl;\n\n public isInputFocused = false;\n\n public searchTextMinimumCharacters = 2;\n\n @ViewChild(SkyAutocompleteInputDirective)\n public countrySearchAutocompleteDirective: SkyAutocompleteInputDirective;\n\n public set selectedCountry(newCountry: SkyCountryFieldCountry) {\n if (!this.countriesAreEqual(this.selectedCountry, newCountry)) {\n if (newCountry && newCountry.iso2) {\n const isoCountry = this.countries.find(\n (country) => country.iso2 === newCountry.iso2\n );\n\n if (isoCountry) {\n newCountry = isoCountry;\n }\n }\n\n this._selectedCountry = newCountry;\n\n this.sortCountriesWithSelectedAndDefault(newCountry);\n\n this.internalFormChange = true;\n this.countrySearchFormControl.setValue(this.selectedCountry);\n\n if (!this.isInitialChange) {\n this.onChange(newCountry);\n this.onTouched();\n\n this.selectedCountryChange.emit(newCountry);\n }\n\n // Do not mark the field as \"dirty\"\n // if the field has been initialized with a value.\n if (this.isInitialChange && this.ngControl && this.ngControl.control) {\n this.ngControl.control.markAsPristine();\n }\n\n this.isInitialChange = false;\n\n /**\n * The second portion of this if statement is complex. The control type check ensures that\n * we only watch for the initial time through this function on reactive forms. However,\n * template forms will send through `null` and then `undefined` on empty initialization\n * so we have to check for when the non-null pass through happens.\n */\n } else if (\n this.isInitialChange &&\n (!(this.ngControl instanceof NgModel) || newCountry !== null)\n ) {\n this.isInitialChange = false;\n }\n }\n\n public get selectedCountry(): SkyCountryFieldCountry {\n return this._selectedCountry;\n }\n\n public currentTheme = 'default';\n\n public inputId: string;\n\n @ViewChild('inputTemplateRef', {\n read: TemplateRef,\n static: true,\n })\n private inputTemplateRef: TemplateRef<any>;\n\n @ViewChild('searchIconTemplateRef', {\n read: TemplateRef,\n static: true,\n })\n private searchIconTemplateRef: TemplateRef<any>;\n\n private defaultCountryData: SkyCountryFieldCountry;\n\n private idle: Subject<any> = new Subject();\n\n private internalFormChange = false;\n\n private isInitialChange = true;\n\n private ngControl: NgControl;\n\n private ngUnsubscribe = new Subject();\n\n private _defaultCountry: string;\n\n private _disabled = false;\n\n private _includePhoneInfo = false;\n\n private _selectedCountry: SkyCountryFieldCountry;\n\n private _supportedCountryISOs: string[];\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n private elRef: ElementRef,\n private windowRef: SkyAppWindowRef,\n private injector: Injector,\n @Optional() public inputBoxHostSvc?: SkyInputBoxHostService,\n @Optional() private themeSvc?: SkyThemeService\n ) {\n this.setupCountries();\n\n this.countrySearchFormControl = new FormControl();\n }\n\n /**\n * Angular lifecycle hook for when the component is initialized\n * @internal\n */\n public ngOnInit(): void {\n this.updateInputBox();\n\n // tslint:disable-next-line: no-null-keyword\n this.ngControl = this.injector.get<NgControl>(\n NgControl as unknown as Type<NgControl>,\n null\n );\n\n this.inputId = `sky-country-field-input-${uniqueId++}`;\n\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n } else {\n /**\n * The initial change boolean is to determine if the form is setting the value. When no form\n * is present we don't want to ignore the first change.\n */\n this.isInitialChange = false;\n }\n\n if (!this.defaultCountry) {\n this.defaultCountry = 'us';\n }\n\n this.countrySearchFormControl.valueChanges\n .pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((newValue) => {\n if (newValue && !this.internalFormChange) {\n this.selectedCountry = newValue;\n }\n });\n\n if (!this.disabled) {\n this.addEventListeners();\n }\n }\n\n public ngAfterViewInit(): void {\n /* istanbul ignore else */\n if (this.themeSvc) {\n this.themeSvc.settingsChange.subscribe((change) => {\n this.currentTheme = change.currentSettings.theme.name;\n this.updateInputBox();\n this.changeDetector.markForCheck();\n });\n }\n }\n\n /**\n * Angular lifecycle hook for when the compoennt is destructed.\n * @internal\n */\n public ngOnDestroy(): void {\n this.selectedCountryChange.complete();\n this.removeEventListeners();\n this.ngUnsubscribe.next();\n this.ngUnsubscribe.complete();\n }\n\n /**\n * Sets the component's touched value when the autocomplete is blurred\n * @internal\n */\n public onAutocompleteBlur(): void {\n this.onTouched();\n }\n\n /**\n * Sets the country to validate against based on the county's iso2 code.\n * @param newCountry The International Organization for Standardization's two-letter code\n * for the default country.\n * @internal\n */\n public onCountrySelected(newCountry: SkyAutocompleteSelectionChange): void {\n if (newCountry.selectedItem) {\n this.writeValue(\n this.countries.find(\n (countryInfo) => countryInfo.iso2 === newCountry.selectedItem.iso2\n )\n );\n } else {\n this.writeValue(undefined);\n }\n }\n\n // Angular automatically constructs these methods.\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onChange = (value: SkyCountryFieldCountry) => {};\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onTouched = () => {};\n\n public registerOnChange(fn: (value: SkyCountryFieldCountry) => void): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n // Allows Angular to disable the input.\n public setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n public validate(control: AbstractControl): ValidationErrors {\n if (control.value) {\n if (\n (this.supportedCountryISOs &&\n this.supportedCountryISOs.length > 0 &&\n this.supportedCountryISOs.indexOf(control.value.iso2) < 0) ||\n !this.countries.find((country) => country.iso2 === control.value.iso2)\n ) {\n return { unsupportedCountry: true };\n }\n }\n return;\n }\n\n public writeValue(value: SkyCountryFieldCountry): void {\n this.selectedCountry = value;\n this.changeDetector.markForCheck();\n }\n\n private addEventListeners(): void {\n this.removeEventListeners();\n\n this.idle = new Subject();\n\n const documentObj = this.windowRef.nativeWindow.document;\n\n fromEvent(documentObj, 'mousedown')\n .pipe(takeUntil(this.idle))\n .subscribe((event: MouseEvent) => {\n this.isInputFocused = this.elRef.nativeElement.contains(event.target);\n this.changeDetector.markForCheck();\n });\n\n fromEvent(documentObj, 'focusin')\n .pipe(takeUntil(this.idle))\n .subscribe((event: KeyboardEvent) => {\n this.isInputFocused = this.elRef.nativeElement.contains(event.target);\n this.changeDetector.markForCheck();\n });\n }\n\n private countriesAreEqual(\n country1: SkyCountryFieldCountry,\n country2: SkyCountryFieldCountry\n ): boolean {\n if (country1 && country2) {\n return country1.iso2 === country2.iso2;\n }\n\n // NOTE: We are doing this in this way because template forms will send through `null`\n // and then `undefined` on empty initialization. These are functionally equivalent but will\n // not pass a standard triple equals check.\n return !country1 && !country2;\n }\n\n private countriesEqual(\n a: SkyCountryFieldCountry,\n b: SkyCountryFieldCountry\n ): boolean {\n return a.iso2 === b.iso2 && a.name === b.name;\n }\n\n private removeEventListeners(): void {\n this.idle.next();\n this.idle.complete();\n }\n\n private setupCountries(): void {\n /**\n * The json functions here ensures that we get a copy of the array and not the global original.\n * This ensures that multiple instances of the component don't overwrite the original data.\n *\n * We must type the window object as any here as the intl-tel-input library adds its object\n * to the main window object.\n */\n this.countries = JSON.parse(\n JSON.stringify((window as any).intlTelInputGlobals.getCountryData())\n );\n\n // Ignoring coverage here as this will be removed in the next release.\n // istanbul ignore next\n if (!this.includePhoneInfo && !this.hideSelectedCountryFlag) {\n if (\n (\n this.elRef.nativeElement.parentElement as HTMLElement\n )?.classList?.contains('sky-phone-field-country-search')\n ) {\n this.includePhoneInfo = true;\n this.hideSelectedCountryFlag = true;\n }\n }\n\n /* istanbul ignore else */\n if (!this.includePhoneInfo) {\n /**\n * The library we get the country data from includes extra phone properties.\n * We want to remove these unless we are in a phone field\n */\n this.countries.forEach((country: any) => {\n delete country.dialCode;\n delete country.areaCodes;\n delete country.priority;\n });\n }\n\n this.sortCountriesWithSelectedAndDefault(this.selectedCountry);\n\n if (this.supportedCountryISOs && this.supportedCountryISOs.length > 0) {\n this.countries = this.countries.filter(\n (country: SkyCountryFieldCountry) => {\n return this.supportedCountryISOs.indexOf(country.iso2) >= 0;\n }\n );\n }\n }\n\n private sortCountriesWithSelectedAndDefault(\n selectedCountry: SkyCountryFieldCountry\n ): void {\n let selectedCountryIndex: number;\n let selectedCountryData: SkyCountryFieldCountry;\n\n const sortedNewCountries = this.countries.sort((a, b) => {\n if (\n ((this.defaultCountryData &&\n this.countriesEqual(a, this.defaultCountryData)) ||\n a.name < b.name) &&\n (!this.defaultCountryData ||\n !this.countriesEqual(this.defaultCountryData, b))\n ) {\n return -1;\n } else {\n return 1;\n }\n });\n\n if (selectedCountry) {\n // Note: We are looking up this data here to ensure we are using the offical data from the\n // library and not the data provided by the user on initialization of the component\n selectedCountryData = this.countries.find(\n (country) => country.iso2 === selectedCountry.iso2.toLocaleLowerCase()\n );\n selectedCountryIndex = this.countries.indexOf(selectedCountryData);\n\n if (selectedCountryIndex >= 0) {\n this.countries.splice(selectedCountryIndex, 1);\n sortedNewCountries.splice(0, 0, selectedCountryData);\n }\n }\n\n this.countries = sortedNewCountries;\n }\n\n private updateInputBox(): void {\n if (this.inputBoxHostSvc) {\n this.inputBoxHostSvc.populate({\n inputTemplate: this.inputTemplateRef,\n iconsInsetTemplate:\n this.currentTheme === 'modern'\n ? this.searchIconTemplateRef\n : undefined,\n });\n }\n }\n}\n","<ng-container *ngIf=\"!inputBoxHostSvc\">\n <ng-container *ngTemplateOutlet=\"inputTemplateRef\"></ng-container>\n</ng-container>\n\n<ng-template #inputTemplateRef>\n <span\n class=\"sky-country-field-container\"\n [ngClass]=\"{\n 'sky-country-field-disabled': disabled\n }\"\n >\n <sky-autocomplete\n [ariaLabelledBy]=\"inputId\"\n [data]=\"countries\"\n [propertiesToSearch]=\"['name', 'iso2']\"\n [searchResultTemplate]=\"countrySearchResultTemplate\"\n [searchTextMinimumCharacters]=\"searchTextMinimumCharacters\"\n (selectionChange)=\"onCountrySelected($event)\"\n >\n <div\n class=\"sky-country-field-input\"\n [ngClass]=\"{\n 'sky-country-field-input-with-flag':\n selectedCountry && selectedCountry.iso2 && !hideSelectedCountryFlag\n }\"\n >\n <div\n *ngIf=\"\n selectedCountry && selectedCountry.iso2 && !hideSelectedCountryFlag\n \"\n class=\"sky-country-field-flag\"\n >\n <div\n class=\"iti-flag\"\n [ngClass]=\"selectedCountry.iso2.toLowerCase()\"\n ></div>\n </div>\n <textarea\n class=\"sky-form-control\"\n name=\"selectedCountry\"\n rows=\"1\"\n skyAutocomplete\n [attr.aria-label]=\"\n 'skyux_country_field_search_placeholder' | skyLibResources\n \"\n [attr.disabled]=\"disabled ? true : undefined\"\n [attr.id]=\"inputId\"\n [autocompleteAttribute]=\"autocompleteAttribute\"\n [formControl]=\"countrySearchFormControl\"\n [placeholder]=\"\n currentTheme === 'default'\n ? ('skyux_country_field_search_placeholder' | skyLibResources)\n : ''\n \"\n (blur)=\"onAutocompleteBlur()\"\n ></textarea>\n </div>\n </sky-autocomplete>\n </span>\n</ng-template>\n\n<ng-template let-item=\"item\" #countrySearchResultTemplate>\n <div\n class=\"sky-country-field-search-result-flag\"\n [ngClass]=\"'iti-flag ' + item.iso2.toLowerCase()\"\n ></div>\n {{ item.name }}\n <span *ngIf=\"includePhoneInfo\" class=\"sky-deemphasized\">\n {{ item.dialCode }}\n </span>\n</ng-template>\n\n<!-- This template should only be used in modern theme input boxes. -->\n<ng-template #searchIconTemplateRef>\n <div class=\"sky-input-group-icon sky-input-box-icon-inset\">\n <sky-icon iconType=\"skyux\" icon=\"search\"></sky-icon>\n </div>\n</ng-template>\n"]}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
-
import { SkyI18nModule } from '@skyux/i18n';
|
|
5
|
-
import { SkyIconModule } from '@skyux/indicators';
|
|
6
|
-
import { SkyThemeModule } from '@skyux/theme';
|
|
7
|
-
import { SkyAutocompleteModule } from '../autocomplete/autocomplete.module';
|
|
8
|
-
import { SkyLookupResourcesModule } from '../shared/sky-lookup-resources.module';
|
|
9
|
-
import { SkyCountryFieldComponent } from './country-field.component';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
export class SkyCountryFieldModule {
|
|
12
|
-
}
|
|
13
|
-
SkyCountryFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCountryFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
14
|
-
SkyCountryFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCountryFieldModule, declarations: [SkyCountryFieldComponent], imports: [CommonModule,
|
|
15
|
-
FormsModule,
|
|
16
|
-
ReactiveFormsModule,
|
|
17
|
-
SkyAutocompleteModule,
|
|
18
|
-
SkyIconModule,
|
|
19
|
-
SkyI18nModule,
|
|
20
|
-
SkyLookupResourcesModule,
|
|
21
|
-
SkyThemeModule], exports: [SkyCountryFieldComponent] });
|
|
22
|
-
SkyCountryFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCountryFieldModule, imports: [[
|
|
23
|
-
CommonModule,
|
|
24
|
-
FormsModule,
|
|
25
|
-
ReactiveFormsModule,
|
|
26
|
-
SkyAutocompleteModule,
|
|
27
|
-
SkyIconModule,
|
|
28
|
-
SkyI18nModule,
|
|
29
|
-
SkyLookupResourcesModule,
|
|
30
|
-
SkyThemeModule,
|
|
31
|
-
]] });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyCountryFieldModule, decorators: [{
|
|
33
|
-
type: NgModule,
|
|
34
|
-
args: [{
|
|
35
|
-
declarations: [SkyCountryFieldComponent],
|
|
36
|
-
imports: [
|
|
37
|
-
CommonModule,
|
|
38
|
-
FormsModule,
|
|
39
|
-
ReactiveFormsModule,
|
|
40
|
-
SkyAutocompleteModule,
|
|
41
|
-
SkyIconModule,
|
|
42
|
-
SkyI18nModule,
|
|
43
|
-
SkyLookupResourcesModule,
|
|
44
|
-
SkyThemeModule,
|
|
45
|
-
],
|
|
46
|
-
exports: [SkyCountryFieldComponent],
|
|
47
|
-
}]
|
|
48
|
-
}] });
|
|
49
|
-
//# sourceMappingURL=country-field.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"country-field.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/lookup/src/lib/modules/country-field/country-field.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;;AAgBrE,MAAM,OAAO,qBAAqB;;mHAArB,qBAAqB;oHAArB,qBAAqB,iBAbjB,wBAAwB,aAErC,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,qBAAqB;QACrB,aAAa;QACb,aAAa;QACb,wBAAwB;QACxB,cAAc,aAEN,wBAAwB;oHAEvB,qBAAqB,YAZvB;YACP,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,qBAAqB;YACrB,aAAa;YACb,aAAa;YACb,wBAAwB;YACxB,cAAc;SACf;4FAGU,qBAAqB;kBAdjC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,wBAAwB,CAAC;oBACxC,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,qBAAqB;wBACrB,aAAa;wBACb,aAAa;wBACb,wBAAwB;wBACxB,cAAc;qBACf;oBACD,OAAO,EAAE,CAAC,wBAAwB,CAAC;iBACpC","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SkyI18nModule } from '@skyux/i18n';\nimport { SkyIconModule } from '@skyux/indicators';\nimport { SkyThemeModule } from '@skyux/theme';\n\nimport { SkyAutocompleteModule } from '../autocomplete/autocomplete.module';\nimport { SkyLookupResourcesModule } from '../shared/sky-lookup-resources.module';\n\nimport { SkyCountryFieldComponent } from './country-field.component';\n\n@NgModule({\n declarations: [SkyCountryFieldComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SkyAutocompleteModule,\n SkyIconModule,\n SkyI18nModule,\n SkyLookupResourcesModule,\n SkyThemeModule,\n ],\n exports: [SkyCountryFieldComponent],\n})\nexport class SkyCountryFieldModule {}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"country.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/lookup/src/lib/modules/country-field/types/country.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents the data for a given country.\n */\nexport interface SkyCountryFieldCountry {\n /**\n * The [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm)\n * country code for the country.\n * @required\n */\n iso2: string;\n\n /**\n * The name of the country.\n */\n name?: string;\n\n /**\n * Specifies the country's international dial code.\n * This property will only be set if the `includePhoneInfo` input is set.\n */\n dialCode?: string;\n\n // NOTE: We intentionally don't document these properties as they are internal use properties\n /**\n * @internal\n */\n areaCodes?: string[];\n\n /**\n * @internal\n */\n priority?: number;\n}\n"]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export class SkyLookupAdapterService {
|
|
7
|
-
focusInput(elRef) {
|
|
8
|
-
const inputEl = elRef.nativeElement.querySelector('.sky-lookup-input');
|
|
9
|
-
/* Sanity check */
|
|
10
|
-
/* istanbul ignore else */
|
|
11
|
-
if (inputEl) {
|
|
12
|
-
inputEl.focus();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
SkyLookupAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
17
|
-
SkyLookupAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupAdapterService });
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupAdapterService, decorators: [{
|
|
19
|
-
type: Injectable
|
|
20
|
-
}] });
|
|
21
|
-
//# sourceMappingURL=lookup-adapter.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,78 +0,0 @@
|
|
|
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
|
-
/**
|
|
10
|
-
* Fires when users enter new search information and allows results to be
|
|
11
|
-
* returned via an observable.
|
|
12
|
-
*/
|
|
13
|
-
this.searchAsync = new EventEmitter();
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Specifies an object property to display in the text input after users
|
|
17
|
-
* select an item in the dropdown list.
|
|
18
|
-
* @default "name"
|
|
19
|
-
*/
|
|
20
|
-
set descriptorProperty(value) {
|
|
21
|
-
this._descriptorProperty = value;
|
|
22
|
-
}
|
|
23
|
-
get descriptorProperty() {
|
|
24
|
-
return this._descriptorProperty || 'name';
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Specifies an array of object properties to search.
|
|
28
|
-
* @default ["name"]
|
|
29
|
-
*/
|
|
30
|
-
set propertiesToSearch(value) {
|
|
31
|
-
this._propertiesToSearch = value;
|
|
32
|
-
}
|
|
33
|
-
get propertiesToSearch() {
|
|
34
|
-
return this._propertiesToSearch || ['name'];
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Specifies a function to dynamically manage the data source when users
|
|
38
|
-
* change the text in the lookup field. The search function must return
|
|
39
|
-
* an array or a promise of an array. The `search` property is particularly
|
|
40
|
-
* useful when the data source does not live in the source code. If the
|
|
41
|
-
* search requires calling a remote data source, use `searchAsync` instead of
|
|
42
|
-
* `search`.
|
|
43
|
-
*/
|
|
44
|
-
set search(value) {
|
|
45
|
-
this._search = value;
|
|
46
|
-
}
|
|
47
|
-
get search() {
|
|
48
|
-
return (this._search ||
|
|
49
|
-
skyAutocompleteDefaultSearchFunction({
|
|
50
|
-
propertiesToSearch: this.propertiesToSearch,
|
|
51
|
-
searchFilters: this.searchFilters,
|
|
52
|
-
}));
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
SkyLookupAutocompleteAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupAutocompleteAdapter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
56
|
-
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 });
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyLookupAutocompleteAdapter, decorators: [{
|
|
58
|
-
type: Directive
|
|
59
|
-
}], propDecorators: { debounceTime: [{
|
|
60
|
-
type: Input
|
|
61
|
-
}], descriptorProperty: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}], propertiesToSearch: [{
|
|
64
|
-
type: Input
|
|
65
|
-
}], search: [{
|
|
66
|
-
type: Input
|
|
67
|
-
}], searchResultTemplate: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], searchTextMinimumCharacters: [{
|
|
70
|
-
type: Input
|
|
71
|
-
}], searchFilters: [{
|
|
72
|
-
type: Input
|
|
73
|
-
}], searchResultsLimit: [{
|
|
74
|
-
type: Input
|
|
75
|
-
}], searchAsync: [{
|
|
76
|
-
type: Output
|
|
77
|
-
}] } });
|
|
78
|
-
//# sourceMappingURL=lookup-autocomplete-adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,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Emitter,\n Input,\n Output,\n TemplateRef,\n} from '@angular/core';\n\nimport { skyAutocompleteDefaultSearchFunction } from '../autocomplete/autocomplete-default-search-function';\nimport { SkyAutocompleteSearchAsyncArgs } from '../autocomplete/types/autocomplete-search-async-args';\nimport { SkyAutocompleteSearchFunction } from '../autocomplete/types/autocomplete-search-function';\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. If the\n * search requires calling a remote data source, use `searchAsync` instead of\n * `search`.\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 /**\n * Fires when users enter new search information and allows results to be\n * returned via an observable.\n */\n @Output()\n public searchAsync = new EventEmitter<SkyAutocompleteSearchAsyncArgs>();\n\n private _descriptorProperty: string;\n private _propertiesToSearch: string[];\n private _search: SkyAutocompleteSearchFunction;\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,186 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAgB,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAItC,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,cA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,IAAI,CAAC,KAAK,CAAC;SAClC;IACH,CAAC;IAEO,mBAAmB;QACzB,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,IAAI,CAAC,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 { SkyModalInstance } from '@skyux/modals';\n\nimport { Subject, Subscription } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport { SkyAutocompleteSearchAsyncResult } from '../autocomplete/types/autocomplete-search-async-result';\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 = 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 = 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"]}
|