mis-crystal-design-system 2.8.7 → 2.8.9

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.
@@ -46,6 +46,7 @@
46
46
  // filter(val => val && val.length >= this.minInputLength),
47
47
  operators.tap(function (val) { return _this.searchQueryChange.emit(val); }), operators.debounceTime(this.debounceTime), operators.distinctUntilChanged())
48
48
  .subscribe(function (res) {
49
+ var _a;
49
50
  if ((res === null || res === void 0 ? void 0 : res.length) < _this.minInputLength) {
50
51
  _this.closeDropdown();
51
52
  return;
@@ -53,7 +54,7 @@
53
54
  else if ((res === null || res === void 0 ? void 0 : res.length) > _this.minInputLength && _this.httpStream) {
54
55
  _this.loading = true;
55
56
  _this.error = false;
56
- if (!_this.overlayRef)
57
+ if (!((_a = _this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached()))
57
58
  _this.openDropdown(_this.dd, _this.origin.nativeElement);
58
59
  _this.httpStream(res).subscribe(function (list) {
59
60
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-async-search-dropdown.umd.js","sources":["../../../projects/mis-components/async-search-dropdown/async-dropdown.component.ts","../../../projects/mis-components/async-search-dropdown/async-dropdown.module.ts","../../../projects/mis-components/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.ts"],"sourcesContent":["import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from \"@angular/core\";\nimport { AbstractControl, FormControl } from \"@angular/forms\";\nimport { Observable, Subscription } from \"rxjs\";\nimport { debounceTime, distinctUntilChanged, filter, tap } from \"rxjs/operators\";\n\n// tslint:disable-next-line\ntype IListData = any;\n\n@Component({\n selector: \"mis-async-search-dropdown\",\n templateUrl: \"./async-dropdown.component.html\",\n styleUrls: [\"./async-dropdown.component.scss\"]\n})\nexport class AsyncDropdownComponent implements OnInit, OnChanges, OnDestroy {\n constructor(private overlay: Overlay, private viewContainerRef: ViewContainerRef) { }\n @Input() height;\n @Input() size: 'md' | 'sm' = 'md'\n @Input() httpStream!: (searchKey: string) => Observable<IListData>; // function that returns an httpobservable\n @Input() displayKey!: string; // string to show value in list\n @Input() secondaryDisplayKey!: string; // string to display secondary value\n @Input() placeholder = \"Select\"; // placeholder for input\n @Input() debounceTime = 400; // wait time till which API call is paused\n @Input() minInputLength = 2; // min length after which API call is made\n @Input() multi = false; // maintain a list or emit value\n @Input() uniqueKey: string; // for identifying unique values\n @Input() control: AbstractControl | null; // form control for reactive forms\n @Input() disabled: boolean; // disable actions on component\n @Input() readonly: boolean; // make component readonly\n @ViewChild(\"ddBtn\", { static: false }) origin: ElementRef;\n @ViewChild(\"input\", { static: false }) input: ElementRef;\n @ViewChild(\"dd\", { static: false }) dd: TemplateRef<Element>;\n @ContentChild(\"misCustomItem\", { static: false })\n customItem: TemplateRef<Element>;\n @ContentChild(\"asyncCustomLoader\", { static: false})\n customLoader: TemplateRef<Element>;\n // tslint:disable-next-line\n @Output() onSelect: EventEmitter<IListData | IListData[]> = new EventEmitter(true); // emit selected values\n searchInput: FormControl = new FormControl();\n data: IListData[] = [];\n opened = false;\n loading: boolean = false;\n error: boolean = false;\n // tslint:disable-next-line\n selections: Map<string, any> = new Map();\n private searchSubscription: Subscription;\n private overlayRef: OverlayRef;\n controlSubscription: Subscription | undefined;\n @Input() searchValue;\n @Output() searchQueryChange = new EventEmitter<string>()\n @Output() clear: EventEmitter<boolean> = new EventEmitter(false);\n ngOnInit(): void {\n if (this.multi && !this.uniqueKey) {\n throw new Error(\"[uniqueKey] required in multi mode.\");\n }\n if (this.disabled) {\n this.searchInput.disable();\n }\n this.searchSubscription = this.searchInput.valueChanges\n .pipe(\n // filter(val => val && val.length >= this.minInputLength),\n tap((val) => this.searchQueryChange.emit(val)),\n debounceTime(this.debounceTime),\n distinctUntilChanged()\n )\n .subscribe(res => {\n if (res?.length < this.minInputLength) {\n this.closeDropdown();\n return;\n } else if (res?.length > this.minInputLength && this.httpStream) {\n this.loading = true;\n this.error = false;\n if(!this.overlayRef)\n this.openDropdown(this.dd, this.origin.nativeElement);\n this.httpStream(res).subscribe(list => {\n this.loading = false;\n this.data = list;\n if (!this.overlayRef?.hasAttached() && list.length > 0) {\n this.openDropdown(this.dd, this.origin.nativeElement);\n }\n }, error => {\n this.loading = false;\n this.error = true;\n });\n }\n });\n if (this.control?.value) {\n this.handleControlChanges(this.control.value);\n }\n this.controlSubscription = this.control?.valueChanges.subscribe(this.handleControlChanges);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes && changes?.searchValue?.currentValue) {\n this.searchInput.patchValue(changes.searchValue.currentValue);\n }\n if (changes && changes.disabled) {\n this.searchInput.enable();\n if (this.disabled) {\n this.searchInput.disable();\n }\n }\n }\n\n ngOnDestroy(): void {\n this.searchSubscription?.unsubscribe();\n }\n\n private handleControlChanges = (values: IListData[]) => {\n values.forEach(el => {\n this.selectData(el, true);\n });\n // tslint:disable-next-line\n };\n\n private openDropdown(template: TemplateRef<Element>, origin: HTMLElement): void {\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(origin)\n .withPositions([\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }),\n new ConnectionPositionPair({ originX: \"start\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"bottom\" })\n ])\n .withPush(true);\n\n const configs = new OverlayConfig({\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy,\n width: origin.clientWidth\n });\n this.overlayRef = this.overlay.create(configs);\n this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));\n this.overlayRef.backdropClick().subscribe(res => {\n this.closeDropdown();\n });\n }\n\n /**\n * closes the dropdown\n */\n closeDropdown(): void {\n this.opened = false;\n this.overlayRef?.detach();\n this.data = [];\n }\n\n /**\n *\n * @param item item to select\n * if item property disabled is set to true, selection will be disabled\n * @param effectedFromOutside set to true if calling from parent component, if true will focus on search input\n */\n selectData(item: IListData, effectedFromOutside = true): void {\n if (item.disabled) {\n return;\n }\n if (!this.multi) {\n this.searchInput.patchValue(item[this.displayKey], { emitEvent: false });\n this.setControlValue(item);\n } else {\n if (!this.selections.has(item[this.uniqueKey])) {\n this.selections.set(item[this.uniqueKey], item);\n }\n this.setControlValue(this.selectedItems);\n if (!effectedFromOutside) {\n setTimeout(() => {\n this.input.nativeElement.focus();\n this.input.nativeElement.scrollIntoView();\n }, 10);\n }\n this.searchInput.patchValue(\"\");\n this.data = [];\n }\n this.closeDropdown();\n }\n\n /**\n *\n * @param item remove item from selected list\n */\n removeItem(item: IListData): void {\n this.selections.delete(item[this.uniqueKey]);\n this.setControlValue(this.selectedItems);\n // tslint:disable-next-line\n this.input[\"nativeElement\"].focus();\n }\n\n private setControlValue(value: IListData): void {\n this.onSelect.emit(value);\n this.control?.patchValue(value, { emitEvent: false });\n }\n\n /**\n * @returns list of selected items\n */\n get selectedItems(): Array<IListData> {\n return Array.from(this.selections.values());\n }\n\n removeInputValue() {\n this.searchInput.reset();\n this.data = [];\n this.clear.emit(true);\n }\n}\n","import { OverlayModule } from \"@angular/cdk/overlay\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { LoaderModule } from \"mis-crystal-design-system/loader\";\nimport { AsyncDropdownComponent } from \"./async-dropdown.component\";\n\n@NgModule({\n declarations: [AsyncDropdownComponent],\n imports: [CommonModule, OverlayModule, ReactiveFormsModule, FormsModule, LoaderModule],\n exports: [AsyncDropdownComponent]\n})\nexport class AsyncDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["EventEmitter","FormControl","tap","debounceTime","distinctUntilChanged","ConnectionPositionPair","OverlayConfig","TemplatePortal","Component","Overlay","ViewContainerRef","Input","ViewChild","ContentChild","Output","NgModule","CommonModule","OverlayModule","ReactiveFormsModule","FormsModule","LoaderModule"],"mappings":";;;;;;;QAgCE,gCAAoB,OAAgB,EAAU,gBAAkC;YAAhF,iBAAqF;YAAjE,YAAO,GAAP,OAAO,CAAS;YAAU,qBAAgB,GAAhB,gBAAgB,CAAkB;YAEvE,SAAI,GAAgB,IAAI,CAAA;YAIxB,gBAAW,GAAG,QAAQ,CAAC;YACvB,iBAAY,GAAG,GAAG,CAAC;YACnB,mBAAc,GAAG,CAAC,CAAC;YACnB,UAAK,GAAG,KAAK,CAAC;;YAab,aAAQ,GAA0C,IAAIA,iBAAY,CAAC,IAAI,CAAC,CAAC;YACnF,gBAAW,GAAgB,IAAIC,iBAAW,EAAE,CAAC;YAC7C,SAAI,GAAgB,EAAE,CAAC;YACvB,WAAM,GAAG,KAAK,CAAC;YACf,YAAO,GAAY,KAAK,CAAC;YACzB,UAAK,GAAY,KAAK,CAAC;;YAEvB,eAAU,GAAqB,IAAI,GAAG,EAAE,CAAC;YAK/B,sBAAiB,GAAG,IAAID,iBAAY,EAAU,CAAA;YAC9C,UAAK,GAA0B,IAAIA,iBAAY,CAAC,KAAK,CAAC,CAAC;YA0DzD,yBAAoB,GAAG,UAAC,MAAmB;gBACjD,MAAM,CAAC,OAAO,CAAC,UAAA,EAAE;oBACf,KAAI,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;iBAC3B,CAAC,CAAC;;aAEJ,CAAC;SAlGmF;QAoCrF,yCAAQ,GAAR;YAAA,iBAuCC;;YAtCC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;gBACjC,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;aACxD;YACD,IAAI,IAAI,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projects/mis-components/async-search-dropdown/async-dropdown.component.ts","../../../projects/mis-components/async-search-dropdown/async-dropdown.module.ts","../../../projects/mis-components/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.ts"],"sourcesContent":["import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from \"@angular/core\";\nimport { AbstractControl, FormControl } from \"@angular/forms\";\nimport { Observable, Subscription } from \"rxjs\";\nimport { debounceTime, distinctUntilChanged, filter, tap } from \"rxjs/operators\";\n\n// tslint:disable-next-line\ntype IListData = any;\n\n@Component({\n selector: \"mis-async-search-dropdown\",\n templateUrl: \"./async-dropdown.component.html\",\n styleUrls: [\"./async-dropdown.component.scss\"]\n})\nexport class AsyncDropdownComponent implements OnInit, OnChanges, OnDestroy {\n constructor(private overlay: Overlay, private viewContainerRef: ViewContainerRef) { }\n @Input() height;\n @Input() size: 'md' | 'sm' = 'md'\n @Input() httpStream!: (searchKey: string) => Observable<IListData>; // function that returns an httpobservable\n @Input() displayKey!: string; // string to show value in list\n @Input() secondaryDisplayKey!: string; // string to display secondary value\n @Input() placeholder = \"Select\"; // placeholder for input\n @Input() debounceTime = 400; // wait time till which API call is paused\n @Input() minInputLength = 2; // min length after which API call is made\n @Input() multi = false; // maintain a list or emit value\n @Input() uniqueKey: string; // for identifying unique values\n @Input() control: AbstractControl | null; // form control for reactive forms\n @Input() disabled: boolean; // disable actions on component\n @Input() readonly: boolean; // make component readonly\n @ViewChild(\"ddBtn\", { static: false }) origin: ElementRef;\n @ViewChild(\"input\", { static: false }) input: ElementRef;\n @ViewChild(\"dd\", { static: false }) dd: TemplateRef<Element>;\n @ContentChild(\"misCustomItem\", { static: false })\n customItem: TemplateRef<Element>;\n @ContentChild(\"asyncCustomLoader\", { static: false})\n customLoader: TemplateRef<Element>;\n // tslint:disable-next-line\n @Output() onSelect: EventEmitter<IListData | IListData[]> = new EventEmitter(true); // emit selected values\n searchInput: FormControl = new FormControl();\n data: IListData[] = [];\n opened = false;\n loading: boolean = false;\n error: boolean = false;\n // tslint:disable-next-line\n selections: Map<string, any> = new Map();\n private searchSubscription: Subscription;\n private overlayRef: OverlayRef;\n controlSubscription: Subscription | undefined;\n @Input() searchValue;\n @Output() searchQueryChange = new EventEmitter<string>()\n @Output() clear: EventEmitter<boolean> = new EventEmitter(false);\n ngOnInit(): void {\n if (this.multi && !this.uniqueKey) {\n throw new Error(\"[uniqueKey] required in multi mode.\");\n }\n if (this.disabled) {\n this.searchInput.disable();\n }\n this.searchSubscription = this.searchInput.valueChanges\n .pipe(\n // filter(val => val && val.length >= this.minInputLength),\n tap((val) => this.searchQueryChange.emit(val)),\n debounceTime(this.debounceTime),\n distinctUntilChanged()\n )\n .subscribe(res => {\n if (res?.length < this.minInputLength) {\n this.closeDropdown();\n return;\n } else if (res?.length > this.minInputLength && this.httpStream) {\n this.loading = true;\n this.error = false;\n if(!this.overlayRef?.hasAttached())\n this.openDropdown(this.dd, this.origin.nativeElement);\n this.httpStream(res).subscribe(list => {\n this.loading = false;\n this.data = list;\n if (!this.overlayRef?.hasAttached() && list.length > 0) {\n this.openDropdown(this.dd, this.origin.nativeElement);\n }\n }, error => {\n this.loading = false;\n this.error = true;\n });\n }\n });\n if (this.control?.value) {\n this.handleControlChanges(this.control.value);\n }\n this.controlSubscription = this.control?.valueChanges.subscribe(this.handleControlChanges);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes && changes?.searchValue?.currentValue) {\n this.searchInput.patchValue(changes.searchValue.currentValue);\n }\n if (changes && changes.disabled) {\n this.searchInput.enable();\n if (this.disabled) {\n this.searchInput.disable();\n }\n }\n }\n\n ngOnDestroy(): void {\n this.searchSubscription?.unsubscribe();\n }\n\n private handleControlChanges = (values: IListData[]) => {\n values.forEach(el => {\n this.selectData(el, true);\n });\n // tslint:disable-next-line\n };\n\n private openDropdown(template: TemplateRef<Element>, origin: HTMLElement): void {\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(origin)\n .withPositions([\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }),\n new ConnectionPositionPair({ originX: \"start\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"bottom\" })\n ])\n .withPush(true);\n\n const configs = new OverlayConfig({\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy,\n width: origin.clientWidth\n });\n this.overlayRef = this.overlay.create(configs);\n this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));\n this.overlayRef.backdropClick().subscribe(res => {\n this.closeDropdown();\n });\n }\n\n /**\n * closes the dropdown\n */\n closeDropdown(): void {\n this.opened = false;\n this.overlayRef?.detach();\n this.data = [];\n }\n\n /**\n *\n * @param item item to select\n * if item property disabled is set to true, selection will be disabled\n * @param effectedFromOutside set to true if calling from parent component, if true will focus on search input\n */\n selectData(item: IListData, effectedFromOutside = true): void {\n if (item.disabled) {\n return;\n }\n if (!this.multi) {\n this.searchInput.patchValue(item[this.displayKey], { emitEvent: false });\n this.setControlValue(item);\n } else {\n if (!this.selections.has(item[this.uniqueKey])) {\n this.selections.set(item[this.uniqueKey], item);\n }\n this.setControlValue(this.selectedItems);\n if (!effectedFromOutside) {\n setTimeout(() => {\n this.input.nativeElement.focus();\n this.input.nativeElement.scrollIntoView();\n }, 10);\n }\n this.searchInput.patchValue(\"\");\n this.data = [];\n }\n this.closeDropdown();\n }\n\n /**\n *\n * @param item remove item from selected list\n */\n removeItem(item: IListData): void {\n this.selections.delete(item[this.uniqueKey]);\n this.setControlValue(this.selectedItems);\n // tslint:disable-next-line\n this.input[\"nativeElement\"].focus();\n }\n\n private setControlValue(value: IListData): void {\n this.onSelect.emit(value);\n this.control?.patchValue(value, { emitEvent: false });\n }\n\n /**\n * @returns list of selected items\n */\n get selectedItems(): Array<IListData> {\n return Array.from(this.selections.values());\n }\n\n removeInputValue() {\n this.searchInput.reset();\n this.data = [];\n this.clear.emit(true);\n }\n}\n","import { OverlayModule } from \"@angular/cdk/overlay\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { LoaderModule } from \"mis-crystal-design-system/loader\";\nimport { AsyncDropdownComponent } from \"./async-dropdown.component\";\n\n@NgModule({\n declarations: [AsyncDropdownComponent],\n imports: [CommonModule, OverlayModule, ReactiveFormsModule, FormsModule, LoaderModule],\n exports: [AsyncDropdownComponent]\n})\nexport class AsyncDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["EventEmitter","FormControl","tap","debounceTime","distinctUntilChanged","ConnectionPositionPair","OverlayConfig","TemplatePortal","Component","Overlay","ViewContainerRef","Input","ViewChild","ContentChild","Output","NgModule","CommonModule","OverlayModule","ReactiveFormsModule","FormsModule","LoaderModule"],"mappings":";;;;;;;QAgCE,gCAAoB,OAAgB,EAAU,gBAAkC;YAAhF,iBAAqF;YAAjE,YAAO,GAAP,OAAO,CAAS;YAAU,qBAAgB,GAAhB,gBAAgB,CAAkB;YAEvE,SAAI,GAAgB,IAAI,CAAA;YAIxB,gBAAW,GAAG,QAAQ,CAAC;YACvB,iBAAY,GAAG,GAAG,CAAC;YACnB,mBAAc,GAAG,CAAC,CAAC;YACnB,UAAK,GAAG,KAAK,CAAC;;YAab,aAAQ,GAA0C,IAAIA,iBAAY,CAAC,IAAI,CAAC,CAAC;YACnF,gBAAW,GAAgB,IAAIC,iBAAW,EAAE,CAAC;YAC7C,SAAI,GAAgB,EAAE,CAAC;YACvB,WAAM,GAAG,KAAK,CAAC;YACf,YAAO,GAAY,KAAK,CAAC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AE,KAAK,EAAE;qBACpCA,cAAS,SAAC,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;6BACjCC,iBAAY,SAAC,eAAe,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;+BAE/CA,iBAAY,SAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAC;2BAGlDC,WAAM;8BAWNH,UAAK;oCACLG,WAAM;wBACNA,WAAM;;;;QCvDT;;;;;gBALCC,aAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAACC,mBAAY,EAAEC,qBAAa,EAAEC,yBAAmB,EAAEC,iBAAW,EAAEC,mBAAY,CAAC;oBACtF,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBAClC;;;ICXD;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/core"),require("@angular/forms"),require("rxjs/operators"),require("@angular/common"),require("mis-crystal-design-system/loader")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/async-search-dropdown",["exports","@angular/cdk/overlay","@angular/cdk/portal","@angular/core","@angular/forms","rxjs/operators","@angular/common","mis-crystal-design-system/loader"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["mis-crystal-design-system"]=e["mis-crystal-design-system"]||{},e["mis-crystal-design-system"]["async-search-dropdown"]={}),e.ng.cdk.overlay,e.ng.cdk.portal,e.ng.core,e.ng.forms,e.rxjs.operators,e.ng.common,e["mis-crystal-design-system"].loader)}(this,(function(e,t,n,i,o,s,r,a){"use strict";var d=function(){function e(e,t){var n=this;this.overlay=e,this.viewContainerRef=t,this.size="md",this.placeholder="Select",this.debounceTime=400,this.minInputLength=2,this.multi=!1,this.onSelect=new i.EventEmitter(!0),this.searchInput=new o.FormControl,this.data=[],this.opened=!1,this.loading=!1,this.error=!1,this.selections=new Map,this.searchQueryChange=new i.EventEmitter,this.clear=new i.EventEmitter(!1),this.handleControlChanges=function(e){e.forEach((function(e){n.selectData(e,!0)}))}}return e.prototype.ngOnInit=function(){var e,t,n=this;if(this.multi&&!this.uniqueKey)throw new Error("[uniqueKey] required in multi mode.");this.disabled&&this.searchInput.disable(),this.searchSubscription=this.searchInput.valueChanges.pipe(s.tap((function(e){return n.searchQueryChange.emit(e)})),s.debounceTime(this.debounceTime),s.distinctUntilChanged()).subscribe((function(e){(null==e?void 0:e.length)<n.minInputLength?n.closeDropdown():(null==e?void 0:e.length)>n.minInputLength&&n.httpStream&&(n.loading=!0,n.error=!1,n.overlayRef||n.openDropdown(n.dd,n.origin.nativeElement),n.httpStream(e).subscribe((function(e){var t;n.loading=!1,n.data=e,!(null===(t=n.overlayRef)||void 0===t?void 0:t.hasAttached())&&e.length>0&&n.openDropdown(n.dd,n.origin.nativeElement)}),(function(e){n.loading=!1,n.error=!0})))})),(null===(e=this.control)||void 0===e?void 0:e.value)&&this.handleControlChanges(this.control.value),this.controlSubscription=null===(t=this.control)||void 0===t?void 0:t.valueChanges.subscribe(this.handleControlChanges)},e.prototype.ngOnChanges=function(e){var t;e&&(null===(t=null==e?void 0:e.searchValue)||void 0===t?void 0:t.currentValue)&&this.searchInput.patchValue(e.searchValue.currentValue),e&&e.disabled&&(this.searchInput.enable(),this.disabled&&this.searchInput.disable())},e.prototype.ngOnDestroy=function(){var e;null===(e=this.searchSubscription)||void 0===e||e.unsubscribe()},e.prototype.openDropdown=function(e,i){var o=this,s=this.overlay.position().flexibleConnectedTo(i).withPositions([new t.ConnectionPositionPair({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),new t.ConnectionPositionPair({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"})]).withPush(!0),r=new t.OverlayConfig({hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),positionStrategy:s,width:i.clientWidth});this.overlayRef=this.overlay.create(r),this.overlayRef.attach(new n.TemplatePortal(e,this.viewContainerRef)),this.overlayRef.backdropClick().subscribe((function(e){o.closeDropdown()}))},e.prototype.closeDropdown=function(){var e;this.opened=!1,null===(e=this.overlayRef)||void 0===e||e.detach(),this.data=[]},e.prototype.selectData=function(e,t){var n=this;void 0===t&&(t=!0),e.disabled||(this.multi?(this.selections.has(e[this.uniqueKey])||this.selections.set(e[this.uniqueKey],e),this.setControlValue(this.selectedItems),t||setTimeout((function(){n.input.nativeElement.focus(),n.input.nativeElement.scrollIntoView()}),10),this.searchInput.patchValue(""),this.data=[]):(this.searchInput.patchValue(e[this.displayKey],{emitEvent:!1}),this.setControlValue(e)),this.closeDropdown())},e.prototype.removeItem=function(e){this.selections.delete(e[this.uniqueKey]),this.setControlValue(this.selectedItems),this.input.nativeElement.focus()},e.prototype.setControlValue=function(e){var t;this.onSelect.emit(e),null===(t=this.control)||void 0===t||t.patchValue(e,{emitEvent:!1})},Object.defineProperty(e.prototype,"selectedItems",{get:function(){return Array.from(this.selections.values())},enumerable:!1,configurable:!0}),e.prototype.removeInputValue=function(){this.searchInput.reset(),this.data=[],this.clear.emit(!0)},e}();d.decorators=[{type:i.Component,args:[{selector:"mis-async-search-dropdown",template:'<div class="dd-wrapper" [ngStyle]="{\'height\': size === \'sm\' ? \'32px\': \'44px\'}" [ngClass]="{ opened: opened, disabled: disabled, readonly: readonly }" #ddBtn>\n <div class="selected-list" *ngIf="multi && selections.size > 0">\n <div class="chip" [ngClass]="{\'chip-md\': size === \'md\', \'chip-sm\': size === \'sm\'}" *ngFor="let item of selectedItems">\n <span [ngClass]="{\'h6\': size === \'md\', \'h8-b\': size === \'sm\'}" style="margin-right: 4px;">{{item[displayKey]}}</span>\n <span style="cursor: pointer;" (click)="removeItem(item)" [ngStyle]="{\'font-size\': size === \'sm\' ? \'12px\': \'14px\'}" class="ic-navigation-cancel-24"></span>\n </div>\n </div>\n <div class="search-input">\n <span class="ic-action-search-24"></span>\n <input [ngClass]="{\'ip-md\': size === \'md\', \'ip-sm\': size === \'sm\'}" tabindex="0" type="text" class="black-text h6" #input [placeholder]="placeholder" [formControl]="searchInput" />\n <div class="ic-navigation-cancel-24 croos-icon" *ngIf="searchInput?.value?.length" (click)="removeInputValue()"></div>\n </div>\n</div>\n\n<ng-template #dd>\n <div class="dd-list" [ngStyle]="{\'max-height\':height}" [ngClass]="{\'dd-list-pd\':data.length === 0}" >\n <ng-container *ngIf="loading">\n <ng-container\n *ngIf="customLoader; else defaultLoader"\n [ngTemplateOutlet]="customLoader"\n ></ng-container>\n <ng-template #defaultLoader>\n <div class="status-container" *ngIf="loading && !customLoader">\n <mis-loader [mobileView]="true"></mis-loader>\n </div>\n </ng-template>\n </ng-container>\n <ng-container *ngIf="error">\n <div class="status-container">\n <p>Unknown error has occurred, <br> Please try again later.</p>\n </div>\n </ng-container>\n <div *ngIf="!loading && !error && data.length > 0">\n <ng-container *ngFor="let item of data">\n <div (click)="selectData(item, false)">\n <ng-container\n *ngIf="customItem; else standardItem"\n [ngTemplateOutlet]="customItem"\n [ngTemplateOutletContext]="{ $implicit: item }"\n ></ng-container>\n <ng-template #standardItem>\n <div class="item">\n <div class="value">\n <div class="primary">\n {{ item[displayKey] }}\n </div>\n <div class="secondary">\n {{ item[secondaryDisplayKey] }}\n </div>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n <div *ngIf="!loading && !error && data.length === 0 && searchInput.value">\n <div class="data-not-found">No Data Available</div>\n </div>\n </div>\n</ng-template>\n',styles:[".dd-wrapper{background:#fff;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:4px;display:block;cursor:pointer;outline:none}.dd-wrapper.opened,.dd-wrapper:hover{background:#f5f5f5}.dd-wrapper .selected-list{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:4px;padding:8px 16px}.dd-wrapper:focus-within{border-color:#0937b2;background:#f5f5f5}.dd-wrapper.disabled,.dd-wrapper.readonly{pointer-events:none}.search-input{position:relative;border-radius:8px}.search-input input{box-sizing:border-box;outline:none;padding-left:40px;padding-right:24px;background-color:transparent;color:#181f33;border-radius:inherit;border:1px solid transparent;width:100%}.search-input span{font-size:24px;line-height:24px;height:24px;left:8px;padding-top:2px}.search-input .croos-icon,.search-input span{position:absolute;top:50%;transform:translateY(-50%)}.search-input .croos-icon{font-size:16px;width:24px;line-height:16px;height:16px;right:0}.dd-list{padding:8px 0;max-height:200px;background:#fff;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);border-radius:8px;min-width:100%;overflow-y:auto}.dd-list::-webkit-scrollbar{width:8px;border-radius:4px}.dd-list::-webkit-scrollbar-track{background:#fff;border-radius:4px}.dd-list::-webkit-scrollbar-thumb{background:#929dab;border-radius:4px}.dd-list::-webkit-scrollbar-thumb:hover{background:#929dab}.dd-list .item{padding:8px 16px;cursor:pointer}.dd-list .item .disabled{color:#6a737d!important;pointer-events:none}.dd-list .item .value{display:flex;justify-content:space-between;align-items:center}.dd-list .item .value .primary,.dd-list .item .value .secondary{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.dd-list .item .reason{font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d}.dd-list .item:hover:not(.disabled){background:#f5f7fc}.dd-list .data-not-found{display:flex;justify-content:center;align-items:center;font-size:16px;padding:8px}.dd-list-pd{padding:unset}.chip{display:inline-flex;align-items:center;background:#e0e0e0;cursor:default}.chip span{color:#181f33}.chip-md{border-radius:16px;padding:4px 12px}.chip-sm{border-radius:6px;padding:4px 8px;text-transform:uppercase}.ip-md{padding-top:8px;padding-bottom:8px}.ip-sm{padding-top:3px;padding-bottom:3px}.status-container{display:flex;justify-content:center;align-items:center;height:128px}.status-container p{text-align:center}::ng-deep #spinner{position:relative!important}"]}]}],d.ctorParameters=function(){return[{type:t.Overlay},{type:i.ViewContainerRef}]},d.propDecorators={height:[{type:i.Input}],size:[{type:i.Input}],httpStream:[{type:i.Input}],displayKey:[{type:i.Input}],secondaryDisplayKey:[{type:i.Input}],placeholder:[{type:i.Input}],debounceTime:[{type:i.Input}],minInputLength:[{type:i.Input}],multi:[{type:i.Input}],uniqueKey:[{type:i.Input}],control:[{type:i.Input}],disabled:[{type:i.Input}],readonly:[{type:i.Input}],origin:[{type:i.ViewChild,args:["ddBtn",{static:!1}]}],input:[{type:i.ViewChild,args:["input",{static:!1}]}],dd:[{type:i.ViewChild,args:["dd",{static:!1}]}],customItem:[{type:i.ContentChild,args:["misCustomItem",{static:!1}]}],customLoader:[{type:i.ContentChild,args:["asyncCustomLoader",{static:!1}]}],onSelect:[{type:i.Output}],searchValue:[{type:i.Input}],searchQueryChange:[{type:i.Output}],clear:[{type:i.Output}]};var l=function(){};l.decorators=[{type:i.NgModule,args:[{declarations:[d],imports:[r.CommonModule,t.OverlayModule,o.ReactiveFormsModule,o.FormsModule,a.LoaderModule],exports:[d]}]}],e.AsyncDropdownComponent=d,e.AsyncDropdownModule=l,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/core"),require("@angular/forms"),require("rxjs/operators"),require("@angular/common"),require("mis-crystal-design-system/loader")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/async-search-dropdown",["exports","@angular/cdk/overlay","@angular/cdk/portal","@angular/core","@angular/forms","rxjs/operators","@angular/common","mis-crystal-design-system/loader"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["mis-crystal-design-system"]=e["mis-crystal-design-system"]||{},e["mis-crystal-design-system"]["async-search-dropdown"]={}),e.ng.cdk.overlay,e.ng.cdk.portal,e.ng.core,e.ng.forms,e.rxjs.operators,e.ng.common,e["mis-crystal-design-system"].loader)}(this,(function(e,t,n,i,o,s,a,r){"use strict";var d=function(){function e(e,t){var n=this;this.overlay=e,this.viewContainerRef=t,this.size="md",this.placeholder="Select",this.debounceTime=400,this.minInputLength=2,this.multi=!1,this.onSelect=new i.EventEmitter(!0),this.searchInput=new o.FormControl,this.data=[],this.opened=!1,this.loading=!1,this.error=!1,this.selections=new Map,this.searchQueryChange=new i.EventEmitter,this.clear=new i.EventEmitter(!1),this.handleControlChanges=function(e){e.forEach((function(e){n.selectData(e,!0)}))}}return e.prototype.ngOnInit=function(){var e,t,n=this;if(this.multi&&!this.uniqueKey)throw new Error("[uniqueKey] required in multi mode.");this.disabled&&this.searchInput.disable(),this.searchSubscription=this.searchInput.valueChanges.pipe(s.tap((function(e){return n.searchQueryChange.emit(e)})),s.debounceTime(this.debounceTime),s.distinctUntilChanged()).subscribe((function(e){var t;(null==e?void 0:e.length)<n.minInputLength?n.closeDropdown():(null==e?void 0:e.length)>n.minInputLength&&n.httpStream&&(n.loading=!0,n.error=!1,(null===(t=n.overlayRef)||void 0===t?void 0:t.hasAttached())||n.openDropdown(n.dd,n.origin.nativeElement),n.httpStream(e).subscribe((function(e){var t;n.loading=!1,n.data=e,!(null===(t=n.overlayRef)||void 0===t?void 0:t.hasAttached())&&e.length>0&&n.openDropdown(n.dd,n.origin.nativeElement)}),(function(e){n.loading=!1,n.error=!0})))})),(null===(e=this.control)||void 0===e?void 0:e.value)&&this.handleControlChanges(this.control.value),this.controlSubscription=null===(t=this.control)||void 0===t?void 0:t.valueChanges.subscribe(this.handleControlChanges)},e.prototype.ngOnChanges=function(e){var t;e&&(null===(t=null==e?void 0:e.searchValue)||void 0===t?void 0:t.currentValue)&&this.searchInput.patchValue(e.searchValue.currentValue),e&&e.disabled&&(this.searchInput.enable(),this.disabled&&this.searchInput.disable())},e.prototype.ngOnDestroy=function(){var e;null===(e=this.searchSubscription)||void 0===e||e.unsubscribe()},e.prototype.openDropdown=function(e,i){var o=this,s=this.overlay.position().flexibleConnectedTo(i).withPositions([new t.ConnectionPositionPair({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),new t.ConnectionPositionPair({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"})]).withPush(!0),a=new t.OverlayConfig({hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),positionStrategy:s,width:i.clientWidth});this.overlayRef=this.overlay.create(a),this.overlayRef.attach(new n.TemplatePortal(e,this.viewContainerRef)),this.overlayRef.backdropClick().subscribe((function(e){o.closeDropdown()}))},e.prototype.closeDropdown=function(){var e;this.opened=!1,null===(e=this.overlayRef)||void 0===e||e.detach(),this.data=[]},e.prototype.selectData=function(e,t){var n=this;void 0===t&&(t=!0),e.disabled||(this.multi?(this.selections.has(e[this.uniqueKey])||this.selections.set(e[this.uniqueKey],e),this.setControlValue(this.selectedItems),t||setTimeout((function(){n.input.nativeElement.focus(),n.input.nativeElement.scrollIntoView()}),10),this.searchInput.patchValue(""),this.data=[]):(this.searchInput.patchValue(e[this.displayKey],{emitEvent:!1}),this.setControlValue(e)),this.closeDropdown())},e.prototype.removeItem=function(e){this.selections.delete(e[this.uniqueKey]),this.setControlValue(this.selectedItems),this.input.nativeElement.focus()},e.prototype.setControlValue=function(e){var t;this.onSelect.emit(e),null===(t=this.control)||void 0===t||t.patchValue(e,{emitEvent:!1})},Object.defineProperty(e.prototype,"selectedItems",{get:function(){return Array.from(this.selections.values())},enumerable:!1,configurable:!0}),e.prototype.removeInputValue=function(){this.searchInput.reset(),this.data=[],this.clear.emit(!0)},e}();d.decorators=[{type:i.Component,args:[{selector:"mis-async-search-dropdown",template:'<div class="dd-wrapper" [ngStyle]="{\'height\': size === \'sm\' ? \'32px\': \'44px\'}" [ngClass]="{ opened: opened, disabled: disabled, readonly: readonly }" #ddBtn>\n <div class="selected-list" *ngIf="multi && selections.size > 0">\n <div class="chip" [ngClass]="{\'chip-md\': size === \'md\', \'chip-sm\': size === \'sm\'}" *ngFor="let item of selectedItems">\n <span [ngClass]="{\'h6\': size === \'md\', \'h8-b\': size === \'sm\'}" style="margin-right: 4px;">{{item[displayKey]}}</span>\n <span style="cursor: pointer;" (click)="removeItem(item)" [ngStyle]="{\'font-size\': size === \'sm\' ? \'12px\': \'14px\'}" class="ic-navigation-cancel-24"></span>\n </div>\n </div>\n <div class="search-input">\n <span class="ic-action-search-24"></span>\n <input [ngClass]="{\'ip-md\': size === \'md\', \'ip-sm\': size === \'sm\'}" tabindex="0" type="text" class="black-text h6" #input [placeholder]="placeholder" [formControl]="searchInput" />\n <div class="ic-navigation-cancel-24 croos-icon" *ngIf="searchInput?.value?.length" (click)="removeInputValue()"></div>\n </div>\n</div>\n\n<ng-template #dd>\n <div class="dd-list" [ngStyle]="{\'max-height\':height}" [ngClass]="{\'dd-list-pd\':data.length === 0}" >\n <ng-container *ngIf="loading">\n <ng-container\n *ngIf="customLoader; else defaultLoader"\n [ngTemplateOutlet]="customLoader"\n ></ng-container>\n <ng-template #defaultLoader>\n <div class="status-container" *ngIf="loading && !customLoader">\n <mis-loader [mobileView]="true"></mis-loader>\n </div>\n </ng-template>\n </ng-container>\n <ng-container *ngIf="error">\n <div class="status-container">\n <p>Unknown error has occurred, <br> Please try again later.</p>\n </div>\n </ng-container>\n <div *ngIf="!loading && !error && data.length > 0">\n <ng-container *ngFor="let item of data">\n <div (click)="selectData(item, false)">\n <ng-container\n *ngIf="customItem; else standardItem"\n [ngTemplateOutlet]="customItem"\n [ngTemplateOutletContext]="{ $implicit: item }"\n ></ng-container>\n <ng-template #standardItem>\n <div class="item">\n <div class="value">\n <div class="primary">\n {{ item[displayKey] }}\n </div>\n <div class="secondary">\n {{ item[secondaryDisplayKey] }}\n </div>\n </div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n <div *ngIf="!loading && !error && data.length === 0 && searchInput.value">\n <div class="data-not-found">No Data Available</div>\n </div>\n </div>\n</ng-template>\n',styles:[".dd-wrapper{background:#fff;border:1px solid #e0e0e0;box-sizing:border-box;border-radius:4px;display:block;cursor:pointer;outline:none}.dd-wrapper.opened,.dd-wrapper:hover{background:#f5f5f5}.dd-wrapper .selected-list{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:4px;padding:8px 16px}.dd-wrapper:focus-within{border-color:#0937b2;background:#f5f5f5}.dd-wrapper.disabled,.dd-wrapper.readonly{pointer-events:none}.search-input{position:relative;border-radius:8px}.search-input input{box-sizing:border-box;outline:none;padding-left:40px;padding-right:24px;background-color:transparent;color:#181f33;border-radius:inherit;border:1px solid transparent;width:100%}.search-input span{font-size:24px;line-height:24px;height:24px;left:8px;padding-top:2px}.search-input .croos-icon,.search-input span{position:absolute;top:50%;transform:translateY(-50%)}.search-input .croos-icon{font-size:16px;width:24px;line-height:16px;height:16px;right:0}.dd-list{padding:8px 0;max-height:200px;background:#fff;box-shadow:0 12px 24px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.12);border-radius:8px;min-width:100%;overflow-y:auto}.dd-list::-webkit-scrollbar{width:8px;border-radius:4px}.dd-list::-webkit-scrollbar-track{background:#fff;border-radius:4px}.dd-list::-webkit-scrollbar-thumb{background:#929dab;border-radius:4px}.dd-list::-webkit-scrollbar-thumb:hover{background:#929dab}.dd-list .item{padding:8px 16px;cursor:pointer}.dd-list .item .disabled{color:#6a737d!important;pointer-events:none}.dd-list .item .value{display:flex;justify-content:space-between;align-items:center}.dd-list .item .value .primary,.dd-list .item .value .secondary{font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.dd-list .item .reason{font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d}.dd-list .item:hover:not(.disabled){background:#f5f7fc}.dd-list .data-not-found{display:flex;justify-content:center;align-items:center;font-size:16px;padding:8px}.dd-list-pd{padding:unset}.chip{display:inline-flex;align-items:center;background:#e0e0e0;cursor:default}.chip span{color:#181f33}.chip-md{border-radius:16px;padding:4px 12px}.chip-sm{border-radius:6px;padding:4px 8px;text-transform:uppercase}.ip-md{padding-top:8px;padding-bottom:8px}.ip-sm{padding-top:3px;padding-bottom:3px}.status-container{display:flex;justify-content:center;align-items:center;height:128px}.status-container p{text-align:center}::ng-deep #spinner{position:relative!important}"]}]}],d.ctorParameters=function(){return[{type:t.Overlay},{type:i.ViewContainerRef}]},d.propDecorators={height:[{type:i.Input}],size:[{type:i.Input}],httpStream:[{type:i.Input}],displayKey:[{type:i.Input}],secondaryDisplayKey:[{type:i.Input}],placeholder:[{type:i.Input}],debounceTime:[{type:i.Input}],minInputLength:[{type:i.Input}],multi:[{type:i.Input}],uniqueKey:[{type:i.Input}],control:[{type:i.Input}],disabled:[{type:i.Input}],readonly:[{type:i.Input}],origin:[{type:i.ViewChild,args:["ddBtn",{static:!1}]}],input:[{type:i.ViewChild,args:["input",{static:!1}]}],dd:[{type:i.ViewChild,args:["dd",{static:!1}]}],customItem:[{type:i.ContentChild,args:["misCustomItem",{static:!1}]}],customLoader:[{type:i.ContentChild,args:["asyncCustomLoader",{static:!1}]}],onSelect:[{type:i.Output}],searchValue:[{type:i.Input}],searchQueryChange:[{type:i.Output}],clear:[{type:i.Output}]};var l=function(){};l.decorators=[{type:i.NgModule,args:[{declarations:[d],imports:[a.CommonModule,t.OverlayModule,o.ReactiveFormsModule,o.FormsModule,r.LoaderModule],exports:[d]}]}],e.AsyncDropdownComponent=d,e.AsyncDropdownModule=l,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=mis-crystal-design-system-async-search-dropdown.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../projects/mis-components/async-search-dropdown/async-dropdown.component.ts","../../../projects/mis-components/async-search-dropdown/async-dropdown.module.ts"],"names":["AsyncDropdownComponent","overlay","viewContainerRef","_this","this","size","placeholder","debounceTime","minInputLength","multi","onSelect","EventEmitter","searchInput","FormControl","data","opened","loading","error","selections","Map","searchQueryChange","clear","handleControlChanges","values","forEach","el","selectData","prototype","ngOnInit","uniqueKey","Error","disabled","disable","searchSubscription","valueChanges","pipe","tap","val","emit","distinctUntilChanged","subscribe","res","length","closeDropdown","httpStream","overlayRef","openDropdown","dd","origin","nativeElement","list","_a","hasAttached","control","value","controlSubscription","_b","ngOnChanges","changes","searchValue","currentValue","patchValue","enable","ngOnDestroy","unsubscribe","template","positionStrategy","position","flexibleConnectedTo","withPositions","ConnectionPositionPair","originX","originY","overlayX","overlayY","withPush","configs","OverlayConfig","hasBackdrop","backdropClass","scrollStrategy","scrollStrategies","reposition","width","clientWidth","create","attach","TemplatePortal","backdropClick","detach","item","effectedFromOutside","has","set","setControlValue","selectedItems","setTimeout","input","focus","scrollIntoView","displayKey","emitEvent","removeItem","delete","Object","defineProperty","Array","from","removeInputValue","reset","Component","args","selector","Overlay","ViewContainerRef","Input","ViewChild","static","ContentChild","Output","NgModule","declarations","imports","CommonModule","OverlayModule","ReactiveFormsModule","FormsModule","LoaderModule","exports"],"mappings":"k5BAgCE,SAAAA,EAAoBC,EAA0BC,GAA9C,IAAAC,EAAAC,KAAoBA,KAAAH,QAAAA,EAA0BG,KAAAF,iBAAAA,EAErCE,KAAAC,KAAoB,KAIpBD,KAAAE,YAAc,SACdF,KAAAG,aAAe,IACfH,KAAAI,eAAiB,EACjBJ,KAAAK,OAAQ,EAaPL,KAAAM,SAAkD,IAAIC,EAAAA,cAAa,GAC7EP,KAAAQ,YAA2B,IAAIC,EAAAA,YAC/BT,KAAAU,KAAoB,GACpBV,KAAAW,QAAS,EACTX,KAAAY,SAAmB,EACnBZ,KAAAa,OAAiB,EAEjBb,KAAAc,WAA+B,IAAIC,IAKzBf,KAAAgB,kBAAoB,IAAIT,EAAAA,aACxBP,KAAAiB,MAA+B,IAAIV,EAAAA,cAAa,GA0DlDP,KAAAkB,qBAAuB,SAACC,GAC9BA,EAAOC,SAAQ,SAAAC,GACbtB,EAAKuB,WAAWD,GAAI,cA3DxBzB,EAAA2B,UAAAC,SAAA,WAAA,QAAAzB,EAAAC,KACE,GAAIA,KAAKK,QAAUL,KAAKyB,UACtB,MAAM,IAAIC,MAAM,uCAEd1B,KAAK2B,UACP3B,KAAKQ,YAAYoB,UAEnB5B,KAAK6B,mBAAqB7B,KAAKQ,YAAYsB,aACxCC,KAECC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AAAA,sBACAA,EAAAA,gBCvDH,iCALCC,EAAAA,SAAQT,KAAA,CAAC,CACRU,aAAc,CAACzH,GACf0H,QAAS,CAACC,EAAAA,aAAcC,EAAAA,cAAeC,EAAAA,oBAAqBC,EAAAA,YAAaC,EAAAA,cACzEC,QAAS,CAAChI","sourcesContent":["import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from \"@angular/core\";\nimport { AbstractControl, FormControl } from \"@angular/forms\";\nimport { Observable, Subscription } from \"rxjs\";\nimport { debounceTime, distinctUntilChanged, filter, tap } from \"rxjs/operators\";\n\n// tslint:disable-next-line\ntype IListData = any;\n\n@Component({\n selector: \"mis-async-search-dropdown\",\n templateUrl: \"./async-dropdown.component.html\",\n styleUrls: [\"./async-dropdown.component.scss\"]\n})\nexport class AsyncDropdownComponent implements OnInit, OnChanges, OnDestroy {\n constructor(private overlay: Overlay, private viewContainerRef: ViewContainerRef) { }\n @Input() height;\n @Input() size: 'md' | 'sm' = 'md'\n @Input() httpStream!: (searchKey: string) => Observable<IListData>; // function that returns an httpobservable\n @Input() displayKey!: string; // string to show value in list\n @Input() secondaryDisplayKey!: string; // string to display secondary value\n @Input() placeholder = \"Select\"; // placeholder for input\n @Input() debounceTime = 400; // wait time till which API call is paused\n @Input() minInputLength = 2; // min length after which API call is made\n @Input() multi = false; // maintain a list or emit value\n @Input() uniqueKey: string; // for identifying unique values\n @Input() control: AbstractControl | null; // form control for reactive forms\n @Input() disabled: boolean; // disable actions on component\n @Input() readonly: boolean; // make component readonly\n @ViewChild(\"ddBtn\", { static: false }) origin: ElementRef;\n @ViewChild(\"input\", { static: false }) input: ElementRef;\n @ViewChild(\"dd\", { static: false }) dd: TemplateRef<Element>;\n @ContentChild(\"misCustomItem\", { static: false })\n customItem: TemplateRef<Element>;\n @ContentChild(\"asyncCustomLoader\", { static: false})\n customLoader: TemplateRef<Element>;\n // tslint:disable-next-line\n @Output() onSelect: EventEmitter<IListData | IListData[]> = new EventEmitter(true); // emit selected values\n searchInput: FormControl = new FormControl();\n data: IListData[] = [];\n opened = false;\n loading: boolean = false;\n error: boolean = false;\n // tslint:disable-next-line\n selections: Map<string, any> = new Map();\n private searchSubscription: Subscription;\n private overlayRef: OverlayRef;\n controlSubscription: Subscription | undefined;\n @Input() searchValue;\n @Output() searchQueryChange = new EventEmitter<string>()\n @Output() clear: EventEmitter<boolean> = new EventEmitter(false);\n ngOnInit(): void {\n if (this.multi && !this.uniqueKey) {\n throw new Error(\"[uniqueKey] required in multi mode.\");\n }\n if (this.disabled) {\n this.searchInput.disable();\n }\n this.searchSubscription = this.searchInput.valueChanges\n .pipe(\n // filter(val => val && val.length >= this.minInputLength),\n tap((val) => this.searchQueryChange.emit(val)),\n debounceTime(this.debounceTime),\n distinctUntilChanged()\n )\n .subscribe(res => {\n if (res?.length < this.minInputLength) {\n this.closeDropdown();\n return;\n } else if (res?.length > this.minInputLength && this.httpStream) {\n this.loading = true;\n this.error = false;\n if(!this.overlayRef)\n this.openDropdown(this.dd, this.origin.nativeElement);\n this.httpStream(res).subscribe(list => {\n this.loading = false;\n this.data = list;\n if (!this.overlayRef?.hasAttached() && list.length > 0) {\n this.openDropdown(this.dd, this.origin.nativeElement);\n }\n }, error => {\n this.loading = false;\n this.error = true;\n });\n }\n });\n if (this.control?.value) {\n this.handleControlChanges(this.control.value);\n }\n this.controlSubscription = this.control?.valueChanges.subscribe(this.handleControlChanges);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes && changes?.searchValue?.currentValue) {\n this.searchInput.patchValue(changes.searchValue.currentValue);\n }\n if (changes && changes.disabled) {\n this.searchInput.enable();\n if (this.disabled) {\n this.searchInput.disable();\n }\n }\n }\n\n ngOnDestroy(): void {\n this.searchSubscription?.unsubscribe();\n }\n\n private handleControlChanges = (values: IListData[]) => {\n values.forEach(el => {\n this.selectData(el, true);\n });\n // tslint:disable-next-line\n };\n\n private openDropdown(template: TemplateRef<Element>, origin: HTMLElement): void {\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(origin)\n .withPositions([\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }),\n new ConnectionPositionPair({ originX: \"start\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"bottom\" })\n ])\n .withPush(true);\n\n const configs = new OverlayConfig({\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy,\n width: origin.clientWidth\n });\n this.overlayRef = this.overlay.create(configs);\n this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));\n this.overlayRef.backdropClick().subscribe(res => {\n this.closeDropdown();\n });\n }\n\n /**\n * closes the dropdown\n */\n closeDropdown(): void {\n this.opened = false;\n this.overlayRef?.detach();\n this.data = [];\n }\n\n /**\n *\n * @param item item to select\n * if item property disabled is set to true, selection will be disabled\n * @param effectedFromOutside set to true if calling from parent component, if true will focus on search input\n */\n selectData(item: IListData, effectedFromOutside = true): void {\n if (item.disabled) {\n return;\n }\n if (!this.multi) {\n this.searchInput.patchValue(item[this.displayKey], { emitEvent: false });\n this.setControlValue(item);\n } else {\n if (!this.selections.has(item[this.uniqueKey])) {\n this.selections.set(item[this.uniqueKey], item);\n }\n this.setControlValue(this.selectedItems);\n if (!effectedFromOutside) {\n setTimeout(() => {\n this.input.nativeElement.focus();\n this.input.nativeElement.scrollIntoView();\n }, 10);\n }\n this.searchInput.patchValue(\"\");\n this.data = [];\n }\n this.closeDropdown();\n }\n\n /**\n *\n * @param item remove item from selected list\n */\n removeItem(item: IListData): void {\n this.selections.delete(item[this.uniqueKey]);\n this.setControlValue(this.selectedItems);\n // tslint:disable-next-line\n this.input[\"nativeElement\"].focus();\n }\n\n private setControlValue(value: IListData): void {\n this.onSelect.emit(value);\n this.control?.patchValue(value, { emitEvent: false });\n }\n\n /**\n * @returns list of selected items\n */\n get selectedItems(): Array<IListData> {\n return Array.from(this.selections.values());\n }\n\n removeInputValue() {\n this.searchInput.reset();\n this.data = [];\n this.clear.emit(true);\n }\n}\n","import { OverlayModule } from \"@angular/cdk/overlay\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { LoaderModule } from \"mis-crystal-design-system/loader\";\nimport { AsyncDropdownComponent } from \"./async-dropdown.component\";\n\n@NgModule({\n declarations: [AsyncDropdownComponent],\n imports: [CommonModule, OverlayModule, ReactiveFormsModule, FormsModule, LoaderModule],\n exports: [AsyncDropdownComponent]\n})\nexport class AsyncDropdownModule {}\n"]}
1
+ {"version":3,"sources":["../../../projects/mis-components/async-search-dropdown/async-dropdown.component.ts","../../../projects/mis-components/async-search-dropdown/async-dropdown.module.ts"],"names":["AsyncDropdownComponent","overlay","viewContainerRef","_this","this","size","placeholder","debounceTime","minInputLength","multi","onSelect","EventEmitter","searchInput","FormControl","data","opened","loading","error","selections","Map","searchQueryChange","clear","handleControlChanges","values","forEach","el","selectData","prototype","ngOnInit","uniqueKey","Error","disabled","disable","searchSubscription","valueChanges","pipe","tap","val","emit","distinctUntilChanged","subscribe","res","length","closeDropdown","httpStream","_a","overlayRef","hasAttached","openDropdown","dd","origin","nativeElement","list","control","value","controlSubscription","_b","ngOnChanges","changes","searchValue","currentValue","patchValue","enable","ngOnDestroy","unsubscribe","template","positionStrategy","position","flexibleConnectedTo","withPositions","ConnectionPositionPair","originX","originY","overlayX","overlayY","withPush","configs","OverlayConfig","hasBackdrop","backdropClass","scrollStrategy","scrollStrategies","reposition","width","clientWidth","create","attach","TemplatePortal","backdropClick","detach","item","effectedFromOutside","has","set","setControlValue","selectedItems","setTimeout","input","focus","scrollIntoView","displayKey","emitEvent","removeItem","delete","Object","defineProperty","Array","from","removeInputValue","reset","Component","args","selector","Overlay","ViewContainerRef","Input","ViewChild","static","ContentChild","Output","NgModule","declarations","imports","CommonModule","OverlayModule","ReactiveFormsModule","FormsModule","LoaderModule","exports"],"mappings":"k5BAgCE,SAAAA,EAAoBC,EAA0BC,GAA9C,IAAAC,EAAAC,KAAoBA,KAAAH,QAAAA,EAA0BG,KAAAF,iBAAAA,EAErCE,KAAAC,KAAoB,KAIpBD,KAAAE,YAAc,SACdF,KAAAG,aAAe,IACfH,KAAAI,eAAiB,EACjBJ,KAAAK,OAAQ,EAaPL,KAAAM,SAAkD,IAAIC,EAAAA,cAAa,GAC7EP,KAAAQ,YAA2B,IAAIC,EAAAA,YAC/BT,KAAAU,KAAoB,GACpBV,KAAAW,QAAS,EACTX,KAAAY,SAAmB,EACnBZ,KAAAa,OAAiB,EAEjBb,KAAAc,WAA+B,IAAIC,IAKzBf,KAAAgB,kBAAoB,IAAIT,EAAAA,aACxBP,KAAAiB,MAA+B,IAAIV,EAAAA,cAAa,GA0DlDP,KAAAkB,qBAAuB,SAACC,GAC9BA,EAAOC,SAAQ,SAAAC,GACbtB,EAAKuB,WAAWD,GAAI,cA3DxBzB,EAAA2B,UAAAC,SAAA,WAAA,QAAAzB,EAAAC,KACE,GAAIA,KAAKK,QAAUL,KAAKyB,UACtB,MAAM,IAAIC,MAAM,uCAEd1B,KAAK2B,UACP3B,KAAKQ,YAAYoB,UAEnB5B,KAAK6B,mBAAqB7B,KAAKQ,YAAYsB,aACxCC,KAECC,EAAAA,KAAI,SAACC,GAAQ,OAAAlC,EAAKiB,kBAAkBkB,KAAKD,MACzC9B,EAAAA,aAAaH,KAAKG,cAClBgC,EAAAA,wBAEDC,WAAU,SAAAC,UACLA,MAAAA,OAAG,EAAHA,EAAKC,QAASvC,EAAKK,eACrBL,EAAKwC,iBAEIF,MAAAA,OAAG,EAAHA,EAAKC,QAASvC,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AS,CAAChI","sourcesContent":["import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from \"@angular/core\";\nimport { AbstractControl, FormControl } from \"@angular/forms\";\nimport { Observable, Subscription } from \"rxjs\";\nimport { debounceTime, distinctUntilChanged, filter, tap } from \"rxjs/operators\";\n\n// tslint:disable-next-line\ntype IListData = any;\n\n@Component({\n selector: \"mis-async-search-dropdown\",\n templateUrl: \"./async-dropdown.component.html\",\n styleUrls: [\"./async-dropdown.component.scss\"]\n})\nexport class AsyncDropdownComponent implements OnInit, OnChanges, OnDestroy {\n constructor(private overlay: Overlay, private viewContainerRef: ViewContainerRef) { }\n @Input() height;\n @Input() size: 'md' | 'sm' = 'md'\n @Input() httpStream!: (searchKey: string) => Observable<IListData>; // function that returns an httpobservable\n @Input() displayKey!: string; // string to show value in list\n @Input() secondaryDisplayKey!: string; // string to display secondary value\n @Input() placeholder = \"Select\"; // placeholder for input\n @Input() debounceTime = 400; // wait time till which API call is paused\n @Input() minInputLength = 2; // min length after which API call is made\n @Input() multi = false; // maintain a list or emit value\n @Input() uniqueKey: string; // for identifying unique values\n @Input() control: AbstractControl | null; // form control for reactive forms\n @Input() disabled: boolean; // disable actions on component\n @Input() readonly: boolean; // make component readonly\n @ViewChild(\"ddBtn\", { static: false }) origin: ElementRef;\n @ViewChild(\"input\", { static: false }) input: ElementRef;\n @ViewChild(\"dd\", { static: false }) dd: TemplateRef<Element>;\n @ContentChild(\"misCustomItem\", { static: false })\n customItem: TemplateRef<Element>;\n @ContentChild(\"asyncCustomLoader\", { static: false})\n customLoader: TemplateRef<Element>;\n // tslint:disable-next-line\n @Output() onSelect: EventEmitter<IListData | IListData[]> = new EventEmitter(true); // emit selected values\n searchInput: FormControl = new FormControl();\n data: IListData[] = [];\n opened = false;\n loading: boolean = false;\n error: boolean = false;\n // tslint:disable-next-line\n selections: Map<string, any> = new Map();\n private searchSubscription: Subscription;\n private overlayRef: OverlayRef;\n controlSubscription: Subscription | undefined;\n @Input() searchValue;\n @Output() searchQueryChange = new EventEmitter<string>()\n @Output() clear: EventEmitter<boolean> = new EventEmitter(false);\n ngOnInit(): void {\n if (this.multi && !this.uniqueKey) {\n throw new Error(\"[uniqueKey] required in multi mode.\");\n }\n if (this.disabled) {\n this.searchInput.disable();\n }\n this.searchSubscription = this.searchInput.valueChanges\n .pipe(\n // filter(val => val && val.length >= this.minInputLength),\n tap((val) => this.searchQueryChange.emit(val)),\n debounceTime(this.debounceTime),\n distinctUntilChanged()\n )\n .subscribe(res => {\n if (res?.length < this.minInputLength) {\n this.closeDropdown();\n return;\n } else if (res?.length > this.minInputLength && this.httpStream) {\n this.loading = true;\n this.error = false;\n if(!this.overlayRef?.hasAttached())\n this.openDropdown(this.dd, this.origin.nativeElement);\n this.httpStream(res).subscribe(list => {\n this.loading = false;\n this.data = list;\n if (!this.overlayRef?.hasAttached() && list.length > 0) {\n this.openDropdown(this.dd, this.origin.nativeElement);\n }\n }, error => {\n this.loading = false;\n this.error = true;\n });\n }\n });\n if (this.control?.value) {\n this.handleControlChanges(this.control.value);\n }\n this.controlSubscription = this.control?.valueChanges.subscribe(this.handleControlChanges);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes && changes?.searchValue?.currentValue) {\n this.searchInput.patchValue(changes.searchValue.currentValue);\n }\n if (changes && changes.disabled) {\n this.searchInput.enable();\n if (this.disabled) {\n this.searchInput.disable();\n }\n }\n }\n\n ngOnDestroy(): void {\n this.searchSubscription?.unsubscribe();\n }\n\n private handleControlChanges = (values: IListData[]) => {\n values.forEach(el => {\n this.selectData(el, true);\n });\n // tslint:disable-next-line\n };\n\n private openDropdown(template: TemplateRef<Element>, origin: HTMLElement): void {\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(origin)\n .withPositions([\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }),\n new ConnectionPositionPair({ originX: \"start\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"bottom\" })\n ])\n .withPush(true);\n\n const configs = new OverlayConfig({\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy,\n width: origin.clientWidth\n });\n this.overlayRef = this.overlay.create(configs);\n this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));\n this.overlayRef.backdropClick().subscribe(res => {\n this.closeDropdown();\n });\n }\n\n /**\n * closes the dropdown\n */\n closeDropdown(): void {\n this.opened = false;\n this.overlayRef?.detach();\n this.data = [];\n }\n\n /**\n *\n * @param item item to select\n * if item property disabled is set to true, selection will be disabled\n * @param effectedFromOutside set to true if calling from parent component, if true will focus on search input\n */\n selectData(item: IListData, effectedFromOutside = true): void {\n if (item.disabled) {\n return;\n }\n if (!this.multi) {\n this.searchInput.patchValue(item[this.displayKey], { emitEvent: false });\n this.setControlValue(item);\n } else {\n if (!this.selections.has(item[this.uniqueKey])) {\n this.selections.set(item[this.uniqueKey], item);\n }\n this.setControlValue(this.selectedItems);\n if (!effectedFromOutside) {\n setTimeout(() => {\n this.input.nativeElement.focus();\n this.input.nativeElement.scrollIntoView();\n }, 10);\n }\n this.searchInput.patchValue(\"\");\n this.data = [];\n }\n this.closeDropdown();\n }\n\n /**\n *\n * @param item remove item from selected list\n */\n removeItem(item: IListData): void {\n this.selections.delete(item[this.uniqueKey]);\n this.setControlValue(this.selectedItems);\n // tslint:disable-next-line\n this.input[\"nativeElement\"].focus();\n }\n\n private setControlValue(value: IListData): void {\n this.onSelect.emit(value);\n this.control?.patchValue(value, { emitEvent: false });\n }\n\n /**\n * @returns list of selected items\n */\n get selectedItems(): Array<IListData> {\n return Array.from(this.selections.values());\n }\n\n removeInputValue() {\n this.searchInput.reset();\n this.data = [];\n this.clear.emit(true);\n }\n}\n","import { OverlayModule } from \"@angular/cdk/overlay\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { LoaderModule } from \"mis-crystal-design-system/loader\";\nimport { AsyncDropdownComponent } from \"./async-dropdown.component\";\n\n@NgModule({\n declarations: [AsyncDropdownComponent],\n imports: [CommonModule, OverlayModule, ReactiveFormsModule, FormsModule, LoaderModule],\n exports: [AsyncDropdownComponent]\n})\nexport class AsyncDropdownModule {}\n"]}
@@ -74,7 +74,7 @@
74
74
  { type: core.Component, args: [{
75
75
  selector: "mis-input",
76
76
  template: "<div\n [class]=\"'input-container ' + size\"\n [ngClass]=\"{\n rounded: type === 'rounded',\n floating: type === 'floating',\n 'has-error': !inputValidity || hasError,\n 'no-hint': noHints,\n 'mis-disabled': inputCtrl?.disabled\n }\"\n>\n <div class=\"input-wrapper\">\n <ng-content select=\"[mis-input-icon]\"></ng-content>\n <div class=\"mis-input\">\n <ng-content select=\"input\"></ng-content>\n <span class=\"mis-placeholder\">{{ placeholder }}</span>\n </div>\n <ng-content select=\"[mis-input-act]\"></ng-content>\n </div>\n <ng-content select=\"[mis-input-hint]\"></ng-content>\n <ng-content select=\"[mis-input-error]\"></ng-content>\n</div>\n",
77
- styles: [".input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded input{box-sizing:initial}.input-container.rounded.sm input{padding:3px 16px}.input-container.rounded.md input{padding:9px 16px}.input-container.rounded.lg input{padding:15px 16px}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0;padding:0}.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper:focus-within{border:1px solid #0937b2}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{margin-left:16px;transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]
77
+ styles: [":root{--pmry-200:#99baf7;--pmry-100:#cbddfb;--pmry-500:#0937b2;--pmry-400:#3c68d0;--pmry-600:#062a99;--pmry-700:#041f80;--pmry-300:#638fe7;--pmry-800:#021567;--pmry-900:#010f55;--sec-d-purple:#40447f;--sec-maroon:#6b034e;--sec-mud-red:#b23600;--sec-orange:#ed711c;--sec-purple:#815fd5;--sec-teal:#10adae;--sec-yellow:#d4900c;--sec-green:#547f40;--sec-bright-green:#27d22e;--sec-dark-teal:#035f6b;--sec-chocolate:#7c2f33;--sec-rube-pink:#c13d6d;--sec-cerulean:#0087b2;--sem-error:#b00020;--sem-info:#0091ff;--sem-warning:#ff9d00;--sem-success:#38af49;--grey-bg-1:#fafafa;--grey-bg:#f5f5f5;--grey-seperators:#e0e0e0;--grey-disabled:#c8cdd3;--grey-hover:#f5f7fc;--grey-pressed:#e6ebf7;--grey-row:#f5f7fc;--dec-light-yellow:#f4e7c3;--dec-light-purple:#dacff9;--dec-light-green:#e4f5e9;--dec-light-green2:#f1fff3;--dec-light-pink:#fae1ea;--dec-:#f4cbc1;--dec-lt-orange:#faefed;--dec-light-blue:#cfecf9;--dec-row-selection:#f1fdf8;--dec-row-selection2:#f2fbff;--dec-row-lines:#d3e1e9;--text-white:#fff;--text-disabled:#929dab;--text-muted:#6a737d;--text-black:#181f33;--MR-solid-blue2:#c8d5f6;--MR-solid-purple:#c9c3fb;--MR-solid-orange:#eeac9f;--MR-solid-green:#acdada;--MR-solid-brown:#e8c8af;--MR-solid-yellow:#ffefc7;--MR-solid-blue:#bbe6ff;--MR-solid-pink:#ffc6f2;--tr-hover:#f0f3fa;--tr-pressed:#dae1f3}.input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded input{box-sizing:initial}.input-container.rounded.sm input{padding:3px 16px}.input-container.rounded.md input{padding:9px 16px}.input-container.rounded.lg input{padding:15px 16px}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0;padding:0}.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper:focus-within{border:1px solid #0937b2}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{margin-left:16px;transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]
78
78
  },] }
79
79
  ];
80
80
  MisInputComponent.ctorParameters = function () { return []; };
@@ -1,2 +1,2 @@
1
- !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/input",["exports","@angular/core","@angular/forms","rxjs","rxjs/operators","@angular/common"],t):t(((n="undefined"!=typeof globalThis?globalThis:n||self)["mis-crystal-design-system"]=n["mis-crystal-design-system"]||{},n["mis-crystal-design-system"].input={}),n.ng.core,n.ng.forms,n.rxjs,n.rxjs.operators,n.ng.common)}(this,(function(n,t,i,e,o,r){"use strict";var p=function(){function n(n,t){this.el=n,this.control=t,this.validityChange=new e.ReplaySubject(1),this.validity=this.validityChange.asObservable(),this.endObs=new e.Subject,this.focus=!1,this.hasValue=!1}return n.prototype.ngOnInit=function(){var n,t,i=this;null===(t=null===(n=this.control)||void 0===n?void 0:n.control)||void 0===t||t.valueChanges.pipe(o.takeUntil(this.endObs)).subscribe((function(){var n;i.validityChange.next(!(null===(n=i.control.control)||void 0===n?void 0:n.invalid))})),this.el.nativeElement.placeholder+=" "},n.prototype.ngOnDestroy=function(){this.endObs.next(),this.endObs.complete()},n}();p.decorators=[{type:t.Directive,args:[{selector:"input[misInput]"}]}],p.ctorParameters=function(){return[{type:t.ElementRef},{type:i.NgControl,decorators:[{type:t.Self},{type:t.Optional}]}]};var a=function(){function n(){this.type="floating",this.size="sm",this.noHints=!1,this.hasError=!1,this.inputValidity=!0}return Object.defineProperty(n.prototype,"formInput",{set:function(n){var t,i,e=this;this.placeholder||(this.placeholder=(null==n?void 0:n.el.nativeElement.placeholder)||""),this.inputCtrl=null===(t=n.control)||void 0===t?void 0:t.control,null===(i=this.inputSubscription)||void 0===i||i.unsubscribe(),this.inputSubscription=null==n?void 0:n.validity.subscribe((function(n){return e.inputValidity=n})),this.placeholder+=" "},enumerable:!1,configurable:!0}),n.prototype.ngOnInit=function(){},n.prototype.ngOnDestroy=function(){var n;null===(n=this.inputSubscription)||void 0===n||n.unsubscribe()},n}();a.decorators=[{type:t.Component,args:[{selector:"mis-input",template:'<div\n [class]="\'input-container \' + size"\n [ngClass]="{\n rounded: type === \'rounded\',\n floating: type === \'floating\',\n \'has-error\': !inputValidity || hasError,\n \'no-hint\': noHints,\n \'mis-disabled\': inputCtrl?.disabled\n }"\n>\n <div class="input-wrapper">\n <ng-content select="[mis-input-icon]"></ng-content>\n <div class="mis-input">\n <ng-content select="input"></ng-content>\n <span class="mis-placeholder">{{ placeholder }}</span>\n </div>\n <ng-content select="[mis-input-act]"></ng-content>\n </div>\n <ng-content select="[mis-input-hint]"></ng-content>\n <ng-content select="[mis-input-error]"></ng-content>\n</div>\n',styles:[".input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded input{box-sizing:initial}.input-container.rounded.sm input{padding:3px 16px}.input-container.rounded.md input{padding:9px 16px}.input-container.rounded.lg input{padding:15px 16px}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0;padding:0}.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper:focus-within{border:1px solid #0937b2}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{margin-left:16px;transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]}]}],a.ctorParameters=function(){return[]},a.propDecorators={type:[{type:t.Input}],size:[{type:t.Input}],placeholder:[{type:t.Input}],noHints:[{type:t.Input}],hasError:[{type:t.Input}],formInput:[{type:t.ContentChild,args:[p]}]};var s=function(){};s.decorators=[{type:t.NgModule,args:[{declarations:[a,p],imports:[r.CommonModule,i.FormsModule],exports:[a,p]}]}],n.MisInputComponent=a,n.MisInputDirective=p,n.MisInputModule=s,Object.defineProperty(n,"__esModule",{value:!0})}));
1
+ !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("mis-crystal-design-system/input",["exports","@angular/core","@angular/forms","rxjs","rxjs/operators","@angular/common"],t):t(((n="undefined"!=typeof globalThis?globalThis:n||self)["mis-crystal-design-system"]=n["mis-crystal-design-system"]||{},n["mis-crystal-design-system"].input={}),n.ng.core,n.ng.forms,n.rxjs,n.rxjs.operators,n.ng.common)}(this,(function(n,t,e,i,r,o){"use strict";var p=function(){function n(n,t){this.el=n,this.control=t,this.validityChange=new i.ReplaySubject(1),this.validity=this.validityChange.asObservable(),this.endObs=new i.Subject,this.focus=!1,this.hasValue=!1}return n.prototype.ngOnInit=function(){var n,t,e=this;null===(t=null===(n=this.control)||void 0===n?void 0:n.control)||void 0===t||t.valueChanges.pipe(r.takeUntil(this.endObs)).subscribe((function(){var n;e.validityChange.next(!(null===(n=e.control.control)||void 0===n?void 0:n.invalid))})),this.el.nativeElement.placeholder+=" "},n.prototype.ngOnDestroy=function(){this.endObs.next(),this.endObs.complete()},n}();p.decorators=[{type:t.Directive,args:[{selector:"input[misInput]"}]}],p.ctorParameters=function(){return[{type:t.ElementRef},{type:e.NgControl,decorators:[{type:t.Self},{type:t.Optional}]}]};var a=function(){function n(){this.type="floating",this.size="sm",this.noHints=!1,this.hasError=!1,this.inputValidity=!0}return Object.defineProperty(n.prototype,"formInput",{set:function(n){var t,e,i=this;this.placeholder||(this.placeholder=(null==n?void 0:n.el.nativeElement.placeholder)||""),this.inputCtrl=null===(t=n.control)||void 0===t?void 0:t.control,null===(e=this.inputSubscription)||void 0===e||e.unsubscribe(),this.inputSubscription=null==n?void 0:n.validity.subscribe((function(n){return i.inputValidity=n})),this.placeholder+=" "},enumerable:!1,configurable:!0}),n.prototype.ngOnInit=function(){},n.prototype.ngOnDestroy=function(){var n;null===(n=this.inputSubscription)||void 0===n||n.unsubscribe()},n}();a.decorators=[{type:t.Component,args:[{selector:"mis-input",template:'<div\n [class]="\'input-container \' + size"\n [ngClass]="{\n rounded: type === \'rounded\',\n floating: type === \'floating\',\n \'has-error\': !inputValidity || hasError,\n \'no-hint\': noHints,\n \'mis-disabled\': inputCtrl?.disabled\n }"\n>\n <div class="input-wrapper">\n <ng-content select="[mis-input-icon]"></ng-content>\n <div class="mis-input">\n <ng-content select="input"></ng-content>\n <span class="mis-placeholder">{{ placeholder }}</span>\n </div>\n <ng-content select="[mis-input-act]"></ng-content>\n </div>\n <ng-content select="[mis-input-hint]"></ng-content>\n <ng-content select="[mis-input-error]"></ng-content>\n</div>\n',styles:[":root{--pmry-200:#99baf7;--pmry-100:#cbddfb;--pmry-500:#0937b2;--pmry-400:#3c68d0;--pmry-600:#062a99;--pmry-700:#041f80;--pmry-300:#638fe7;--pmry-800:#021567;--pmry-900:#010f55;--sec-d-purple:#40447f;--sec-maroon:#6b034e;--sec-mud-red:#b23600;--sec-orange:#ed711c;--sec-purple:#815fd5;--sec-teal:#10adae;--sec-yellow:#d4900c;--sec-green:#547f40;--sec-bright-green:#27d22e;--sec-dark-teal:#035f6b;--sec-chocolate:#7c2f33;--sec-rube-pink:#c13d6d;--sec-cerulean:#0087b2;--sem-error:#b00020;--sem-info:#0091ff;--sem-warning:#ff9d00;--sem-success:#38af49;--grey-bg-1:#fafafa;--grey-bg:#f5f5f5;--grey-seperators:#e0e0e0;--grey-disabled:#c8cdd3;--grey-hover:#f5f7fc;--grey-pressed:#e6ebf7;--grey-row:#f5f7fc;--dec-light-yellow:#f4e7c3;--dec-light-purple:#dacff9;--dec-light-green:#e4f5e9;--dec-light-green2:#f1fff3;--dec-light-pink:#fae1ea;--dec-:#f4cbc1;--dec-lt-orange:#faefed;--dec-light-blue:#cfecf9;--dec-row-selection:#f1fdf8;--dec-row-selection2:#f2fbff;--dec-row-lines:#d3e1e9;--text-white:#fff;--text-disabled:#929dab;--text-muted:#6a737d;--text-black:#181f33;--MR-solid-blue2:#c8d5f6;--MR-solid-purple:#c9c3fb;--MR-solid-orange:#eeac9f;--MR-solid-green:#acdada;--MR-solid-brown:#e8c8af;--MR-solid-yellow:#ffefc7;--MR-solid-blue:#bbe6ff;--MR-solid-pink:#ffc6f2;--tr-hover:#f0f3fa;--tr-pressed:#dae1f3}.input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded input{box-sizing:initial}.input-container.rounded.sm input{padding:3px 16px}.input-container.rounded.md input{padding:9px 16px}.input-container.rounded.lg input{padding:15px 16px}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0;padding:0}.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper:focus-within{border:1px solid #0937b2}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{margin-left:16px;transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]}]}],a.ctorParameters=function(){return[]},a.propDecorators={type:[{type:t.Input}],size:[{type:t.Input}],placeholder:[{type:t.Input}],noHints:[{type:t.Input}],hasError:[{type:t.Input}],formInput:[{type:t.ContentChild,args:[p]}]};var s=function(){};s.decorators=[{type:t.NgModule,args:[{declarations:[a,p],imports:[o.CommonModule,e.FormsModule],exports:[a,p]}]}],n.MisInputComponent=a,n.MisInputDirective=p,n.MisInputModule=s,Object.defineProperty(n,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=mis-crystal-design-system-input.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../projects/mis-components/input/directives/input/input.directive.ts","../../../projects/mis-components/input/mis-input.component.ts","../../../projects/mis-components/input/mis-input.module.ts"],"names":["MisInputDirective","el","control","this","validityChange","ReplaySubject","validity","asObservable","endObs","Subject","focus","hasValue","prototype","ngOnInit","_this","_b","_a","valueChanges","pipe","takeUntil","subscribe","next","invalid","nativeElement","placeholder","ngOnDestroy","complete","Directive","args","selector","ElementRef","NgControl","decorators","type","Self","Optional","MisInputComponent","size","noHints","hasError","inputValidity","Object","defineProperty","input","inputCtrl","inputSubscription","unsubscribe","res","Component","template","Input","ContentChild","NgModule","declarations","imports","CommonModule","FormsModule","exports"],"mappings":"uoBAUE,SAAAA,EAAmBC,EAA2CC,GAA3CC,KAAAF,GAAAA,EAA2CE,KAAAD,QAAAA,EACtDC,KAAAC,eAAyC,IAAIC,EAAAA,cAAc,GACnEF,KAAAG,SAAWH,KAAKC,eAAeG,eAC/BJ,KAAAK,OAAwB,IAAIC,EAAAA,QAC5BN,KAAAO,OAAQ,EACRP,KAAAQ,UAAW,SAEXX,EAAAY,UAAAC,SAAA,WAAA,QAAAC,EAAAX,KACuB,QAArBY,EAAY,QAAZC,EAAAb,KAAKD,eAAO,IAAAc,OAAA,EAAAA,EAAEd,eAAO,IAAAa,GAAAA,EAAEE,aAAaC,KAAKC,EAAAA,UAAUhB,KAAKK,SAASY,WAAU,iBACzEN,EAAKV,eAAeiB,OAA0B,QAArBL,EAACF,EAAKZ,QAAQA,eAAO,IAAAc,OAAA,EAAAA,EAAEM,aAElDnB,KAAKF,GAAGsB,cAAcC,aAAe,KAEvCxB,EAAAY,UAAAa,YAAA,WACEtB,KAAKK,OAAOa,OACZlB,KAAKK,OAAOkB,qCApBfC,EAAAA,UAASC,KAAA,CAAC,CAETC,SAAU,+DAPQC,EAAAA,kBACXC,EAAAA,UAASC,WAAA,CAAA,CAAAC,KASoBC,EAAAA,MAAI,CAAAD,KAAIE,EAAAA,+BCkB5C,SAAAC,IAjBSjC,KAAA8B,KAA+B,WAC/B9B,KAAAkC,KAA2B,KAE3BlC,KAAAmC,SAAU,EACVnC,KAAAoC,UAAW,EAYpBpC,KAAAqC,eAAyB,SAXzBC,OAAAC,eAAqCN,EAAAxB,UAAA,YAAS,KAA9C,SAA+C+B,GAA/C,QAAA7B,EAAAX,KACOA,KAAKqB,cACRrB,KAAKqB,aAAcmB,MAAAA,OAAK,EAALA,EAAO1C,GAAGsB,cAAcC,cAAe,IAE5DrB,KAAKyC,UAAyB,QAAhB5B,EAAG2B,EAAMzC,eAAO,IAAAc,OAAA,EAAAA,EAAEd,QACV,QAAtBa,EAAAZ,KAAK0C,yBAAiB,IAAA9B,GAAAA,EAAE+B,cACxB3C,KAAK0C,kBAAoBF,MAAAA,OAAK,EAALA,EAAOrC,SAASc,WAAU,SAAA2B,GAAO,OAACjC,EAAK0B,cAAgBO,KAChF5C,KAAKqB,aAAe,qCAOtBY,EAAAxB,UAAAC,SAAA,aACAuB,EAAAxB,UAAAa,YAAA,iBACwB,QAAtBT,EAAAb,KAAK0C,yBAAiB,IAAA7B,GAAAA,EAAE8B,wCA3B3BE,EAAAA,UAASpB,KAAA,CAAC,CACTC,SAAU,YACVoB,SAAA,qqKAICC,EAAAA,oBACAA,EAAAA,2BACAA,EAAAA,uBACAA,EAAAA,wBACAA,EAAAA,yBACAC,EAAAA,aAAYvB,KAAA,CAAC5B,YCLhB,iCALCoD,EAAAA,SAAQxB,KAAA,CAAC,CACRyB,aAAc,CAACjB,EAAmBpC,GAClCsD,QAAS,CAACC,EAAAA,aAAcC,EAAAA,aACxBC,QAAS,CAACrB,EAAmBpC","sourcesContent":["import { Directive, ElementRef, OnDestroy, OnInit, Optional, Self } from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\nimport { ReplaySubject, Subject, Subscription } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\n@Directive({\n // tslint:disable-next-line\n selector: \"input[misInput]\"\n})\nexport class MisInputDirective implements OnInit, OnDestroy {\n constructor(public el: ElementRef, @Self() @Optional() public control: NgControl) {}\n private validityChange: ReplaySubject<boolean> = new ReplaySubject(1);\n validity = this.validityChange.asObservable();\n endObs: Subject<void> = new Subject();\n focus = false;\n hasValue = false;\n\n ngOnInit(): void {\n this.control?.control?.valueChanges.pipe(takeUntil(this.endObs)).subscribe(() => {\n this.validityChange.next(!this.control.control?.invalid);\n });\n this.el.nativeElement.placeholder += \" \";\n }\n ngOnDestroy(): void {\n this.endObs.next();\n this.endObs.complete();\n }\n}\n","import { Component, ContentChild, Input, OnDestroy, OnInit, ViewEncapsulation } from \"@angular/core\";\nimport { AbstractControl } from \"@angular/forms\";\nimport { Subscription } from \"rxjs\";\nimport { MisInputDirective } from \"./directives/input/input.directive\";\n\n@Component({\n selector: \"mis-input\",\n templateUrl: \"./mis-input.component.html\",\n styleUrls: [\"./mis-input.component.scss\"]\n})\nexport class MisInputComponent implements OnInit, OnDestroy {\n @Input() type: \"rounded\" | \"floating\" = \"floating\";\n @Input() size: \"sm\" | \"md\" | \"lg\" = \"sm\";\n @Input() placeholder: string; // floating placeholder text\n @Input() noHints = false;\n @Input() hasError = false; // show input in error state\n @ContentChild(MisInputDirective) set formInput(input: MisInputDirective) {\n if (!this.placeholder) {\n this.placeholder = input?.el.nativeElement.placeholder || \"\";\n }\n this.inputCtrl = input.control?.control;\n this.inputSubscription?.unsubscribe();\n this.inputSubscription = input?.validity.subscribe(res => (this.inputValidity = res));\n this.placeholder += \" \";\n }\n inputCtrl: AbstractControl;\n inputSubscription: Subscription | undefined;\n inputValidity: boolean = true;\n constructor() {}\n\n ngOnInit(): void {}\n ngOnDestroy(): void {\n this.inputSubscription?.unsubscribe();\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { MisInputDirective } from \"./directives/input/input.directive\";\nimport { MisInputComponent } from \"./mis-input.component\";\n\n@NgModule({\n declarations: [MisInputComponent, MisInputDirective],\n imports: [CommonModule, FormsModule],\n exports: [MisInputComponent, MisInputDirective]\n})\nexport class MisInputModule {}\n"]}
1
+ {"version":3,"sources":["../../../projects/mis-components/input/directives/input/input.directive.ts","../../../projects/mis-components/input/mis-input.component.ts","../../../projects/mis-components/input/mis-input.module.ts"],"names":["MisInputDirective","el","control","this","validityChange","ReplaySubject","validity","asObservable","endObs","Subject","focus","hasValue","prototype","ngOnInit","_this","_b","_a","valueChanges","pipe","takeUntil","subscribe","next","invalid","nativeElement","placeholder","ngOnDestroy","complete","Directive","args","selector","ElementRef","NgControl","decorators","type","Self","Optional","MisInputComponent","size","noHints","hasError","inputValidity","Object","defineProperty","input","inputCtrl","inputSubscription","unsubscribe","res","Component","template","Input","ContentChild","NgModule","declarations","imports","CommonModule","FormsModule","exports"],"mappings":"uoBAUE,SAAAA,EAAmBC,EAA2CC,GAA3CC,KAAAF,GAAAA,EAA2CE,KAAAD,QAAAA,EACtDC,KAAAC,eAAyC,IAAIC,EAAAA,cAAc,GACnEF,KAAAG,SAAWH,KAAKC,eAAeG,eAC/BJ,KAAAK,OAAwB,IAAIC,EAAAA,QAC5BN,KAAAO,OAAQ,EACRP,KAAAQ,UAAW,SAEXX,EAAAY,UAAAC,SAAA,WAAA,QAAAC,EAAAX,KACuB,QAArBY,EAAY,QAAZC,EAAAb,KAAKD,eAAO,IAAAc,OAAA,EAAAA,EAAEd,eAAO,IAAAa,GAAAA,EAAEE,aAAaC,KAAKC,EAAAA,UAAUhB,KAAKK,SAASY,WAAU,iBACzEN,EAAKV,eAAeiB,OAA0B,QAArBL,EAACF,EAAKZ,QAAQA,eAAO,IAAAc,OAAA,EAAAA,EAAEM,aAElDnB,KAAKF,GAAGsB,cAAcC,aAAe,KAEvCxB,EAAAY,UAAAa,YAAA,WACEtB,KAAKK,OAAOa,OACZlB,KAAKK,OAAOkB,qCApBfC,EAAAA,UAASC,KAAA,CAAC,CAETC,SAAU,+DAPQC,EAAAA,kBACXC,EAAAA,UAASC,WAAA,CAAA,CAAAC,KASoBC,EAAAA,MAAI,CAAAD,KAAIE,EAAAA,+BCkB5C,SAAAC,IAjBSjC,KAAA8B,KAA+B,WAC/B9B,KAAAkC,KAA2B,KAE3BlC,KAAAmC,SAAU,EACVnC,KAAAoC,UAAW,EAYpBpC,KAAAqC,eAAyB,SAXzBC,OAAAC,eAAqCN,EAAAxB,UAAA,YAAS,KAA9C,SAA+C+B,GAA/C,QAAA7B,EAAAX,KACOA,KAAKqB,cACRrB,KAAKqB,aAAcmB,MAAAA,OAAK,EAALA,EAAO1C,GAAGsB,cAAcC,cAAe,IAE5DrB,KAAKyC,UAAyB,QAAhB5B,EAAG2B,EAAMzC,eAAO,IAAAc,OAAA,EAAAA,EAAEd,QACV,QAAtBa,EAAAZ,KAAK0C,yBAAiB,IAAA9B,GAAAA,EAAE+B,cACxB3C,KAAK0C,kBAAoBF,MAAAA,OAAK,EAALA,EAAOrC,SAASc,WAAU,SAAA2B,GAAO,OAACjC,EAAK0B,cAAgBO,KAChF5C,KAAKqB,aAAe,qCAOtBY,EAAAxB,UAAAC,SAAA,aACAuB,EAAAxB,UAAAa,YAAA,iBACwB,QAAtBT,EAAAb,KAAK0C,yBAAiB,IAAA7B,GAAAA,EAAE8B,wCA3B3BE,EAAAA,UAASpB,KAAA,CAAC,CACTC,SAAU,YACVoB,SAAA,47MAICC,EAAAA,oBACAA,EAAAA,2BACAA,EAAAA,uBACAA,EAAAA,wBACAA,EAAAA,yBACAC,EAAAA,aAAYvB,KAAA,CAAC5B,YCLhB,iCALCoD,EAAAA,SAAQxB,KAAA,CAAC,CACRyB,aAAc,CAACjB,EAAmBpC,GAClCsD,QAAS,CAACC,EAAAA,aAAcC,EAAAA,aACxBC,QAAS,CAACrB,EAAmBpC","sourcesContent":["import { Directive, ElementRef, OnDestroy, OnInit, Optional, Self } from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\nimport { ReplaySubject, Subject, Subscription } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\n@Directive({\n // tslint:disable-next-line\n selector: \"input[misInput]\"\n})\nexport class MisInputDirective implements OnInit, OnDestroy {\n constructor(public el: ElementRef, @Self() @Optional() public control: NgControl) {}\n private validityChange: ReplaySubject<boolean> = new ReplaySubject(1);\n validity = this.validityChange.asObservable();\n endObs: Subject<void> = new Subject();\n focus = false;\n hasValue = false;\n\n ngOnInit(): void {\n this.control?.control?.valueChanges.pipe(takeUntil(this.endObs)).subscribe(() => {\n this.validityChange.next(!this.control.control?.invalid);\n });\n this.el.nativeElement.placeholder += \" \";\n }\n ngOnDestroy(): void {\n this.endObs.next();\n this.endObs.complete();\n }\n}\n","import { Component, ContentChild, Input, OnDestroy, OnInit, ViewEncapsulation } from \"@angular/core\";\nimport { AbstractControl } from \"@angular/forms\";\nimport { Subscription } from \"rxjs\";\nimport { MisInputDirective } from \"./directives/input/input.directive\";\n\n@Component({\n selector: \"mis-input\",\n templateUrl: \"./mis-input.component.html\",\n styleUrls: [\"./mis-input.component.scss\"]\n})\nexport class MisInputComponent implements OnInit, OnDestroy {\n @Input() type: \"rounded\" | \"floating\" = \"floating\";\n @Input() size: \"sm\" | \"md\" | \"lg\" = \"sm\";\n @Input() placeholder: string; // floating placeholder text\n @Input() noHints = false;\n @Input() hasError = false; // show input in error state\n @ContentChild(MisInputDirective) set formInput(input: MisInputDirective) {\n if (!this.placeholder) {\n this.placeholder = input?.el.nativeElement.placeholder || \"\";\n }\n this.inputCtrl = input.control?.control;\n this.inputSubscription?.unsubscribe();\n this.inputSubscription = input?.validity.subscribe(res => (this.inputValidity = res));\n this.placeholder += \" \";\n }\n inputCtrl: AbstractControl;\n inputSubscription: Subscription | undefined;\n inputValidity: boolean = true;\n constructor() {}\n\n ngOnInit(): void {}\n ngOnDestroy(): void {\n this.inputSubscription?.unsubscribe();\n }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { MisInputDirective } from \"./directives/input/input.directive\";\nimport { MisInputComponent } from \"./mis-input.component\";\n\n@NgModule({\n declarations: [MisInputComponent, MisInputDirective],\n imports: [CommonModule, FormsModule],\n exports: [MisInputComponent, MisInputDirective]\n})\nexport class MisInputModule {}\n"]}
@@ -43,6 +43,7 @@ export class AsyncDropdownComponent {
43
43
  // filter(val => val && val.length >= this.minInputLength),
44
44
  tap((val) => this.searchQueryChange.emit(val)), debounceTime(this.debounceTime), distinctUntilChanged())
45
45
  .subscribe(res => {
46
+ var _a;
46
47
  if ((res === null || res === void 0 ? void 0 : res.length) < this.minInputLength) {
47
48
  this.closeDropdown();
48
49
  return;
@@ -50,7 +51,7 @@ export class AsyncDropdownComponent {
50
51
  else if ((res === null || res === void 0 ? void 0 : res.length) > this.minInputLength && this.httpStream) {
51
52
  this.loading = true;
52
53
  this.error = false;
53
- if (!this.overlayRef)
54
+ if (!((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached()))
54
55
  this.openDropdown(this.dd, this.origin.nativeElement);
55
56
  this.httpStream(res).subscribe(list => {
56
57
  var _a;
@@ -209,4 +210,4 @@ AsyncDropdownComponent.propDecorators = {
209
210
  searchQueryChange: [{ type: Output }],
210
211
  clear: [{ type: Output }]
211
212
  };
212
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXN5bmMtZHJvcGRvd24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbWlzLWNvbXBvbmVudHMvYXN5bmMtc2VhcmNoLWRyb3Bkb3duL2FzeW5jLWRyb3Bkb3duLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsT0FBTyxFQUFFLGFBQWEsRUFBYyxNQUFNLHNCQUFzQixDQUFDO0FBQ2xHLE9BQ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0aGlzLmRlYm91bmNlVGltZSksXG4gICAgICAgIGRpc3RpbmN0VW50aWxDaGFuZ2VkKClcbiAgICAgIClcbiAgICAgIC5zdWJzY3JpYmUocmVzID0+IHtcbiAgICAgICAgaWYgKHJlcz8ubGVuZ3RoIDwgdGhpcy5taW5JbnB1dExlbmd0aCkge1xuICAgICAgICAgIHRoaXMuY2xvc2VEcm9wZG93bigpO1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfSBlbHNlIGlmIChyZXM/Lmxlbmd0aCA+IHRoaXMubWluSW5wdXRMZW5ndGggJiYgdGhpcy5odHRwU3RyZWFtKSB7XG4gICAgICAgICAgdGhpcy5sb2FkaW5nID0gdHJ1ZTtcbiAgICAgICAgICB0aGlzLmVycm9yID0gZmFsc2U7XG4gICAgICAgICAgaWYoIXRoaXMub3ZlcmxheVJlZilcbiAgICAgICAgICAgIHRoaXMub3BlbkRyb3Bkb3duKHRoaXMuZGQsIHRoaXMub3JpZ2luLm5hdGl2ZUVsZW1lbnQpO1xuICAgICAgICAgIHRoaXMuaHR0cFN0cmVhbShyZXMpLnN1YnNjcmliZShsaXN0ID0+IHtcbiAgICAgICAgICAgIHRoaXMubG9hZGluZyA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5kYXRhID0gbGlzdDtcbiAgICAgICAgICAgIGlmICghdGhpcy5vdmVybGF5UmVmPy5oYXNBdHRhY2hlZCgpICYmIGxpc3QubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICB0aGlzLm9wZW5Ecm9wZG93bih0aGlzLmRkLCB0aGlzLm9yaWdpbi5uYXRpdmVFbGVtZW50KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9LCBlcnJvciA9PiB7XG4gICAgICAgICAgICB0aGlzLmxvYWRpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuZXJyb3IgPSB0cnVlO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICBpZiAodGhpcy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H0pO1xuICB9XG5cbiAgLyoqXG4gICAqIEByZXR1cm5zIGxpc3Qgb2Ygc2VsZWN0ZWQgaXRlbXNcbiAgICovXG4gIGdldCBzZWxlY3RlZEl0ZW1zKCk6IEFycmF5PElMaXN0RGF0YT4ge1xuICAgIHJldHVybiBBcnJheS5mcm9tKHRoaXMuc2VsZWN0aW9ucy52YWx1ZXMoKSk7XG4gIH1cblxuICByZW1vdmVJbnB1dFZhbHVlKCkge1xuICAgIHRoaXMuc2VhcmNoSW5wdXQucmVzZXQoKTtcbiAgICB0aGlzLmRhdGEgPSBbXTtcbiAgICB0aGlzLmNsZWFyLmVtaXQodHJ1ZSk7XG4gIH1cbn1cbiJdfQ==
@@ -28,7 +28,7 @@ MisInputComponent.decorators = [
28
28
  { type: Component, args: [{
29
29
  selector: "mis-input",
30
30
  template: "<div\n [class]=\"'input-container ' + size\"\n [ngClass]=\"{\n rounded: type === 'rounded',\n floating: type === 'floating',\n 'has-error': !inputValidity || hasError,\n 'no-hint': noHints,\n 'mis-disabled': inputCtrl?.disabled\n }\"\n>\n <div class=\"input-wrapper\">\n <ng-content select=\"[mis-input-icon]\"></ng-content>\n <div class=\"mis-input\">\n <ng-content select=\"input\"></ng-content>\n <span class=\"mis-placeholder\">{{ placeholder }}</span>\n </div>\n <ng-content select=\"[mis-input-act]\"></ng-content>\n </div>\n <ng-content select=\"[mis-input-hint]\"></ng-content>\n <ng-content select=\"[mis-input-error]\"></ng-content>\n</div>\n",
31
- styles: [".input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded input{box-sizing:initial}.input-container.rounded.sm input{padding:3px 16px}.input-container.rounded.md input{padding:9px 16px}.input-container.rounded.lg input{padding:15px 16px}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0;padding:0}.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper:focus-within{border:1px solid #0937b2}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{margin-left:16px;transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]
31
+ styles: [":root{--pmry-200:#99baf7;--pmry-100:#cbddfb;--pmry-500:#0937b2;--pmry-400:#3c68d0;--pmry-600:#062a99;--pmry-700:#041f80;--pmry-300:#638fe7;--pmry-800:#021567;--pmry-900:#010f55;--sec-d-purple:#40447f;--sec-maroon:#6b034e;--sec-mud-red:#b23600;--sec-orange:#ed711c;--sec-purple:#815fd5;--sec-teal:#10adae;--sec-yellow:#d4900c;--sec-green:#547f40;--sec-bright-green:#27d22e;--sec-dark-teal:#035f6b;--sec-chocolate:#7c2f33;--sec-rube-pink:#c13d6d;--sec-cerulean:#0087b2;--sem-error:#b00020;--sem-info:#0091ff;--sem-warning:#ff9d00;--sem-success:#38af49;--grey-bg-1:#fafafa;--grey-bg:#f5f5f5;--grey-seperators:#e0e0e0;--grey-disabled:#c8cdd3;--grey-hover:#f5f7fc;--grey-pressed:#e6ebf7;--grey-row:#f5f7fc;--dec-light-yellow:#f4e7c3;--dec-light-purple:#dacff9;--dec-light-green:#e4f5e9;--dec-light-green2:#f1fff3;--dec-light-pink:#fae1ea;--dec-:#f4cbc1;--dec-lt-orange:#faefed;--dec-light-blue:#cfecf9;--dec-row-selection:#f1fdf8;--dec-row-selection2:#f2fbff;--dec-row-lines:#d3e1e9;--text-white:#fff;--text-disabled:#929dab;--text-muted:#6a737d;--text-black:#181f33;--MR-solid-blue2:#c8d5f6;--MR-solid-purple:#c9c3fb;--MR-solid-orange:#eeac9f;--MR-solid-green:#acdada;--MR-solid-brown:#e8c8af;--MR-solid-yellow:#ffefc7;--MR-solid-blue:#bbe6ff;--MR-solid-pink:#ffc6f2;--tr-hover:#f0f3fa;--tr-pressed:#dae1f3}.input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded input{box-sizing:initial}.input-container.rounded.sm input{padding:3px 16px}.input-container.rounded.md input{padding:9px 16px}.input-container.rounded.lg input{padding:15px 16px}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0;padding:0}.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper:focus-within{border:1px solid #0937b2}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{margin-left:16px;transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]
32
32
  },] }
33
33
  ];
34
34
  MisInputComponent.ctorParameters = () => [];
@@ -46,6 +46,7 @@ class AsyncDropdownComponent {
46
46
  // filter(val => val && val.length >= this.minInputLength),
47
47
  tap((val) => this.searchQueryChange.emit(val)), debounceTime(this.debounceTime), distinctUntilChanged())
48
48
  .subscribe(res => {
49
+ var _a;
49
50
  if ((res === null || res === void 0 ? void 0 : res.length) < this.minInputLength) {
50
51
  this.closeDropdown();
51
52
  return;
@@ -53,7 +54,7 @@ class AsyncDropdownComponent {
53
54
  else if ((res === null || res === void 0 ? void 0 : res.length) > this.minInputLength && this.httpStream) {
54
55
  this.loading = true;
55
56
  this.error = false;
56
- if (!this.overlayRef)
57
+ if (!((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached()))
57
58
  this.openDropdown(this.dd, this.origin.nativeElement);
58
59
  this.httpStream(res).subscribe(list => {
59
60
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-async-search-dropdown.js","sources":["../../../projects/mis-components/async-search-dropdown/async-dropdown.component.ts","../../../projects/mis-components/async-search-dropdown/async-dropdown.module.ts","../../../projects/mis-components/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.ts"],"sourcesContent":["import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from \"@angular/core\";\nimport { AbstractControl, FormControl } from \"@angular/forms\";\nimport { Observable, Subscription } from \"rxjs\";\nimport { debounceTime, distinctUntilChanged, filter, tap } from \"rxjs/operators\";\n\n// tslint:disable-next-line\ntype IListData = any;\n\n@Component({\n selector: \"mis-async-search-dropdown\",\n templateUrl: \"./async-dropdown.component.html\",\n styleUrls: [\"./async-dropdown.component.scss\"]\n})\nexport class AsyncDropdownComponent implements OnInit, OnChanges, OnDestroy {\n constructor(private overlay: Overlay, private viewContainerRef: ViewContainerRef) { }\n @Input() height;\n @Input() size: 'md' | 'sm' = 'md'\n @Input() httpStream!: (searchKey: string) => Observable<IListData>; // function that returns an httpobservable\n @Input() displayKey!: string; // string to show value in list\n @Input() secondaryDisplayKey!: string; // string to display secondary value\n @Input() placeholder = \"Select\"; // placeholder for input\n @Input() debounceTime = 400; // wait time till which API call is paused\n @Input() minInputLength = 2; // min length after which API call is made\n @Input() multi = false; // maintain a list or emit value\n @Input() uniqueKey: string; // for identifying unique values\n @Input() control: AbstractControl | null; // form control for reactive forms\n @Input() disabled: boolean; // disable actions on component\n @Input() readonly: boolean; // make component readonly\n @ViewChild(\"ddBtn\", { static: false }) origin: ElementRef;\n @ViewChild(\"input\", { static: false }) input: ElementRef;\n @ViewChild(\"dd\", { static: false }) dd: TemplateRef<Element>;\n @ContentChild(\"misCustomItem\", { static: false })\n customItem: TemplateRef<Element>;\n @ContentChild(\"asyncCustomLoader\", { static: false})\n customLoader: TemplateRef<Element>;\n // tslint:disable-next-line\n @Output() onSelect: EventEmitter<IListData | IListData[]> = new EventEmitter(true); // emit selected values\n searchInput: FormControl = new FormControl();\n data: IListData[] = [];\n opened = false;\n loading: boolean = false;\n error: boolean = false;\n // tslint:disable-next-line\n selections: Map<string, any> = new Map();\n private searchSubscription: Subscription;\n private overlayRef: OverlayRef;\n controlSubscription: Subscription | undefined;\n @Input() searchValue;\n @Output() searchQueryChange = new EventEmitter<string>()\n @Output() clear: EventEmitter<boolean> = new EventEmitter(false);\n ngOnInit(): void {\n if (this.multi && !this.uniqueKey) {\n throw new Error(\"[uniqueKey] required in multi mode.\");\n }\n if (this.disabled) {\n this.searchInput.disable();\n }\n this.searchSubscription = this.searchInput.valueChanges\n .pipe(\n // filter(val => val && val.length >= this.minInputLength),\n tap((val) => this.searchQueryChange.emit(val)),\n debounceTime(this.debounceTime),\n distinctUntilChanged()\n )\n .subscribe(res => {\n if (res?.length < this.minInputLength) {\n this.closeDropdown();\n return;\n } else if (res?.length > this.minInputLength && this.httpStream) {\n this.loading = true;\n this.error = false;\n if(!this.overlayRef)\n this.openDropdown(this.dd, this.origin.nativeElement);\n this.httpStream(res).subscribe(list => {\n this.loading = false;\n this.data = list;\n if (!this.overlayRef?.hasAttached() && list.length > 0) {\n this.openDropdown(this.dd, this.origin.nativeElement);\n }\n }, error => {\n this.loading = false;\n this.error = true;\n });\n }\n });\n if (this.control?.value) {\n this.handleControlChanges(this.control.value);\n }\n this.controlSubscription = this.control?.valueChanges.subscribe(this.handleControlChanges);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes && changes?.searchValue?.currentValue) {\n this.searchInput.patchValue(changes.searchValue.currentValue);\n }\n if (changes && changes.disabled) {\n this.searchInput.enable();\n if (this.disabled) {\n this.searchInput.disable();\n }\n }\n }\n\n ngOnDestroy(): void {\n this.searchSubscription?.unsubscribe();\n }\n\n private handleControlChanges = (values: IListData[]) => {\n values.forEach(el => {\n this.selectData(el, true);\n });\n // tslint:disable-next-line\n };\n\n private openDropdown(template: TemplateRef<Element>, origin: HTMLElement): void {\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(origin)\n .withPositions([\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }),\n new ConnectionPositionPair({ originX: \"start\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"bottom\" })\n ])\n .withPush(true);\n\n const configs = new OverlayConfig({\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy,\n width: origin.clientWidth\n });\n this.overlayRef = this.overlay.create(configs);\n this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));\n this.overlayRef.backdropClick().subscribe(res => {\n this.closeDropdown();\n });\n }\n\n /**\n * closes the dropdown\n */\n closeDropdown(): void {\n this.opened = false;\n this.overlayRef?.detach();\n this.data = [];\n }\n\n /**\n *\n * @param item item to select\n * if item property disabled is set to true, selection will be disabled\n * @param effectedFromOutside set to true if calling from parent component, if true will focus on search input\n */\n selectData(item: IListData, effectedFromOutside = true): void {\n if (item.disabled) {\n return;\n }\n if (!this.multi) {\n this.searchInput.patchValue(item[this.displayKey], { emitEvent: false });\n this.setControlValue(item);\n } else {\n if (!this.selections.has(item[this.uniqueKey])) {\n this.selections.set(item[this.uniqueKey], item);\n }\n this.setControlValue(this.selectedItems);\n if (!effectedFromOutside) {\n setTimeout(() => {\n this.input.nativeElement.focus();\n this.input.nativeElement.scrollIntoView();\n }, 10);\n }\n this.searchInput.patchValue(\"\");\n this.data = [];\n }\n this.closeDropdown();\n }\n\n /**\n *\n * @param item remove item from selected list\n */\n removeItem(item: IListData): void {\n this.selections.delete(item[this.uniqueKey]);\n this.setControlValue(this.selectedItems);\n // tslint:disable-next-line\n this.input[\"nativeElement\"].focus();\n }\n\n private setControlValue(value: IListData): void {\n this.onSelect.emit(value);\n this.control?.patchValue(value, { emitEvent: false });\n }\n\n /**\n * @returns list of selected items\n */\n get selectedItems(): Array<IListData> {\n return Array.from(this.selections.values());\n }\n\n removeInputValue() {\n this.searchInput.reset();\n this.data = [];\n this.clear.emit(true);\n }\n}\n","import { OverlayModule } from \"@angular/cdk/overlay\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { LoaderModule } from \"mis-crystal-design-system/loader\";\nimport { AsyncDropdownComponent } from \"./async-dropdown.component\";\n\n@NgModule({\n declarations: [AsyncDropdownComponent],\n imports: [CommonModule, OverlayModule, ReactiveFormsModule, FormsModule, LoaderModule],\n exports: [AsyncDropdownComponent]\n})\nexport class AsyncDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MA+Ba,sBAAsB;IACjC,YAAoB,OAAgB,EAAU,gBAAkC;QAA5D,YAAO,GAAP,OAAO,CAAS;QAAU,qBAAgB,GAAhB,gBAAgB,CAAkB;QAEvE,SAAI,GAAgB,IAAI,CAAA;QAIxB,gBAAW,GAAG,QAAQ,CAAC;QACvB,iBAAY,GAAG,GAAG,CAAC;QACnB,mBAAc,GAAG,CAAC,CAAC;QACnB,UAAK,GAAG,KAAK,CAAC;;QAab,aAAQ,GAA0C,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;QACnF,gBAAW,GAAgB,IAAI,WAAW,EAAE,CAAC;QAC7C,SAAI,GAAgB,EAAE,CAAC;QACvB,WAAM,GAAG,KAAK,CAAC;QACf,YAAO,GAAY,KAAK,CAAC;QACzB,UAAK,GAAY,KAAK,CAAC;;QAEvB,eAAU,GAAqB,IAAI,GAAG,EAAE,CAAC;QAK/B,sBAAiB,GAAG,IAAI,YAAY,EAAU,CAAA;QAC9C,UAAK,GAA0B,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;QA0DzD,yBAAoB,GAAG,CAAC,MAAmB;YACjD,MAAM,CAAC,OAAO,CAAC,EAAE;gBACf,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;aAC3B,CAAC,CAAC;;SAEJ,CAAC;KAlGmF;IAoCrF,QAAQ;;QACN,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,SAAS,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AAE,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACvB;;;YApMF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,izFAA8C;;aAE/C;;;YA9BgC,OAAO;YAiBtC,gBAAgB;;;qBAgBf,KAAK;mBACL,KAAK;yBACL,KAAK;yBACL,KAAK;kCACL,KAAK;0BACL,KAAK;2BACL,KAAK;6BACL,KAAK;oBACL,KAAK;wBACL,KAAK;sBACL,KAAK;uBACL,KAAK;uBACL,KAAK;qBACL,SAAS,SAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;oBACpC,SAAS,SAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;iBACpC,SAAS,SAAC,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;yBACjC,YAAY,SAAC,eAAe,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;2BAE/C,YAAY,SAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAC;uBAGlD,MAAM;0BAWN,KAAK;gCACL,MAAM;oBACN,MAAM;;;MCvDI,mBAAmB;;;YAL/B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;gBACtC,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,CAAC;gBACtF,OAAO,EAAE,CAAC,sBAAsB,CAAC;aAClC;;;ACXD;;;;;;"}
1
+ {"version":3,"file":"mis-crystal-design-system-async-search-dropdown.js","sources":["../../../projects/mis-components/async-search-dropdown/async-dropdown.component.ts","../../../projects/mis-components/async-search-dropdown/async-dropdown.module.ts","../../../projects/mis-components/async-search-dropdown/mis-crystal-design-system-async-search-dropdown.ts"],"sourcesContent":["import { ConnectionPositionPair, Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from \"@angular/core\";\nimport { AbstractControl, FormControl } from \"@angular/forms\";\nimport { Observable, Subscription } from \"rxjs\";\nimport { debounceTime, distinctUntilChanged, filter, tap } from \"rxjs/operators\";\n\n// tslint:disable-next-line\ntype IListData = any;\n\n@Component({\n selector: \"mis-async-search-dropdown\",\n templateUrl: \"./async-dropdown.component.html\",\n styleUrls: [\"./async-dropdown.component.scss\"]\n})\nexport class AsyncDropdownComponent implements OnInit, OnChanges, OnDestroy {\n constructor(private overlay: Overlay, private viewContainerRef: ViewContainerRef) { }\n @Input() height;\n @Input() size: 'md' | 'sm' = 'md'\n @Input() httpStream!: (searchKey: string) => Observable<IListData>; // function that returns an httpobservable\n @Input() displayKey!: string; // string to show value in list\n @Input() secondaryDisplayKey!: string; // string to display secondary value\n @Input() placeholder = \"Select\"; // placeholder for input\n @Input() debounceTime = 400; // wait time till which API call is paused\n @Input() minInputLength = 2; // min length after which API call is made\n @Input() multi = false; // maintain a list or emit value\n @Input() uniqueKey: string; // for identifying unique values\n @Input() control: AbstractControl | null; // form control for reactive forms\n @Input() disabled: boolean; // disable actions on component\n @Input() readonly: boolean; // make component readonly\n @ViewChild(\"ddBtn\", { static: false }) origin: ElementRef;\n @ViewChild(\"input\", { static: false }) input: ElementRef;\n @ViewChild(\"dd\", { static: false }) dd: TemplateRef<Element>;\n @ContentChild(\"misCustomItem\", { static: false })\n customItem: TemplateRef<Element>;\n @ContentChild(\"asyncCustomLoader\", { static: false})\n customLoader: TemplateRef<Element>;\n // tslint:disable-next-line\n @Output() onSelect: EventEmitter<IListData | IListData[]> = new EventEmitter(true); // emit selected values\n searchInput: FormControl = new FormControl();\n data: IListData[] = [];\n opened = false;\n loading: boolean = false;\n error: boolean = false;\n // tslint:disable-next-line\n selections: Map<string, any> = new Map();\n private searchSubscription: Subscription;\n private overlayRef: OverlayRef;\n controlSubscription: Subscription | undefined;\n @Input() searchValue;\n @Output() searchQueryChange = new EventEmitter<string>()\n @Output() clear: EventEmitter<boolean> = new EventEmitter(false);\n ngOnInit(): void {\n if (this.multi && !this.uniqueKey) {\n throw new Error(\"[uniqueKey] required in multi mode.\");\n }\n if (this.disabled) {\n this.searchInput.disable();\n }\n this.searchSubscription = this.searchInput.valueChanges\n .pipe(\n // filter(val => val && val.length >= this.minInputLength),\n tap((val) => this.searchQueryChange.emit(val)),\n debounceTime(this.debounceTime),\n distinctUntilChanged()\n )\n .subscribe(res => {\n if (res?.length < this.minInputLength) {\n this.closeDropdown();\n return;\n } else if (res?.length > this.minInputLength && this.httpStream) {\n this.loading = true;\n this.error = false;\n if(!this.overlayRef?.hasAttached())\n this.openDropdown(this.dd, this.origin.nativeElement);\n this.httpStream(res).subscribe(list => {\n this.loading = false;\n this.data = list;\n if (!this.overlayRef?.hasAttached() && list.length > 0) {\n this.openDropdown(this.dd, this.origin.nativeElement);\n }\n }, error => {\n this.loading = false;\n this.error = true;\n });\n }\n });\n if (this.control?.value) {\n this.handleControlChanges(this.control.value);\n }\n this.controlSubscription = this.control?.valueChanges.subscribe(this.handleControlChanges);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes && changes?.searchValue?.currentValue) {\n this.searchInput.patchValue(changes.searchValue.currentValue);\n }\n if (changes && changes.disabled) {\n this.searchInput.enable();\n if (this.disabled) {\n this.searchInput.disable();\n }\n }\n }\n\n ngOnDestroy(): void {\n this.searchSubscription?.unsubscribe();\n }\n\n private handleControlChanges = (values: IListData[]) => {\n values.forEach(el => {\n this.selectData(el, true);\n });\n // tslint:disable-next-line\n };\n\n private openDropdown(template: TemplateRef<Element>, origin: HTMLElement): void {\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(origin)\n .withPositions([\n new ConnectionPositionPair({ originX: \"start\", originY: \"bottom\" }, { overlayX: \"start\", overlayY: \"top\" }),\n new ConnectionPositionPair({ originX: \"start\", originY: \"top\" }, { overlayX: \"start\", overlayY: \"bottom\" })\n ])\n .withPush(true);\n\n const configs = new OverlayConfig({\n hasBackdrop: true,\n backdropClass: \"cdk-overlay-transparent-backdrop\",\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy,\n width: origin.clientWidth\n });\n this.overlayRef = this.overlay.create(configs);\n this.overlayRef.attach(new TemplatePortal(template, this.viewContainerRef));\n this.overlayRef.backdropClick().subscribe(res => {\n this.closeDropdown();\n });\n }\n\n /**\n * closes the dropdown\n */\n closeDropdown(): void {\n this.opened = false;\n this.overlayRef?.detach();\n this.data = [];\n }\n\n /**\n *\n * @param item item to select\n * if item property disabled is set to true, selection will be disabled\n * @param effectedFromOutside set to true if calling from parent component, if true will focus on search input\n */\n selectData(item: IListData, effectedFromOutside = true): void {\n if (item.disabled) {\n return;\n }\n if (!this.multi) {\n this.searchInput.patchValue(item[this.displayKey], { emitEvent: false });\n this.setControlValue(item);\n } else {\n if (!this.selections.has(item[this.uniqueKey])) {\n this.selections.set(item[this.uniqueKey], item);\n }\n this.setControlValue(this.selectedItems);\n if (!effectedFromOutside) {\n setTimeout(() => {\n this.input.nativeElement.focus();\n this.input.nativeElement.scrollIntoView();\n }, 10);\n }\n this.searchInput.patchValue(\"\");\n this.data = [];\n }\n this.closeDropdown();\n }\n\n /**\n *\n * @param item remove item from selected list\n */\n removeItem(item: IListData): void {\n this.selections.delete(item[this.uniqueKey]);\n this.setControlValue(this.selectedItems);\n // tslint:disable-next-line\n this.input[\"nativeElement\"].focus();\n }\n\n private setControlValue(value: IListData): void {\n this.onSelect.emit(value);\n this.control?.patchValue(value, { emitEvent: false });\n }\n\n /**\n * @returns list of selected items\n */\n get selectedItems(): Array<IListData> {\n return Array.from(this.selections.values());\n }\n\n removeInputValue() {\n this.searchInput.reset();\n this.data = [];\n this.clear.emit(true);\n }\n}\n","import { OverlayModule } from \"@angular/cdk/overlay\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { LoaderModule } from \"mis-crystal-design-system/loader\";\nimport { AsyncDropdownComponent } from \"./async-dropdown.component\";\n\n@NgModule({\n declarations: [AsyncDropdownComponent],\n imports: [CommonModule, OverlayModule, ReactiveFormsModule, FormsModule, LoaderModule],\n exports: [AsyncDropdownComponent]\n})\nexport class AsyncDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MA+Ba,sBAAsB;IACjC,YAAoB,OAAgB,EAAU,gBAAkC;QAA5D,YAAO,GAAP,OAAO,CAAS;QAAU,qBAAgB,GAAhB,gBAAgB,CAAkB;QAEvE,SAAI,GAAgB,IAAI,CAAA;QAIxB,gBAAW,GAAG,QAAQ,CAAC;QACvB,iBAAY,GAAG,GAAG,CAAC;QACnB,mBAAc,GAAG,CAAC,CAAC;QACnB,UAAK,GAAG,KAAK,CAAC;;QAab,aAAQ,GAA0C,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;QACnF,gBAAW,GAAgB,IAAI,WAAW,EAAE,CAAC;QAC7C,SAAI,GAAgB,EAAE,CAAC;QACvB,WAAM,GAAG,KAAK,CAAC;QACf,YAAO,GAAY,KAAK,CAAC;QACzB,UAAK,GAAY,KAAK,CAAC;;QAEvB,eAAU,GAAqB,IAAI,GAAG,EAAE,CAAC;QAK/B,sBAAiB,GAAG,IAAI,YAAY,EAAU,CAAA;QAC9C,UAAK,GAA0B,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;QA0DzD,yBAAoB,GAAG,CAAC,MAAmB;YACjD,MAAM,CAAC,OAAO,CAAC,EAAE;gBACf,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;aAC3B,CAAC,CAAC;;SAEJ,CAAC;KAlGmF;IAoCrF,QAAQ;;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AAM,EAAE,CAAC,CAAC;KAC7C;IAED,gBAAgB;QACd,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACvB;;;YApMF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,izFAA8C;;aAE/C;;;YA9BgC,OAAO;YAiBtC,gBAAgB;;;qBAgBf,KAAK;mBACL,KAAK;yBACL,KAAK;yBACL,KAAK;kCACL,KAAK;0BACL,KAAK;2BACL,KAAK;6BACL,KAAK;oBACL,KAAK;wBACL,KAAK;sBACL,KAAK;uBACL,KAAK;uBACL,KAAK;qBACL,SAAS,SAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;oBACpC,SAAS,SAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;iBACpC,SAAS,SAAC,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;yBACjC,YAAY,SAAC,eAAe,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;2BAE/C,YAAY,SAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAC;uBAGlD,MAAM;0BAWN,KAAK;gCACL,MAAM;oBACN,MAAM;;;MCvDI,mBAAmB;;;YAL/B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;gBACtC,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,CAAC;gBACtF,OAAO,EAAE,CAAC,sBAAsB,CAAC;aAClC;;;ACXD;;;;;;"}
@@ -66,7 +66,7 @@ MisInputComponent.decorators = [
66
66
  { type: Component, args: [{
67
67
  selector: "mis-input",
68
68
  template: "<div\n [class]=\"'input-container ' + size\"\n [ngClass]=\"{\n rounded: type === 'rounded',\n floating: type === 'floating',\n 'has-error': !inputValidity || hasError,\n 'no-hint': noHints,\n 'mis-disabled': inputCtrl?.disabled\n }\"\n>\n <div class=\"input-wrapper\">\n <ng-content select=\"[mis-input-icon]\"></ng-content>\n <div class=\"mis-input\">\n <ng-content select=\"input\"></ng-content>\n <span class=\"mis-placeholder\">{{ placeholder }}</span>\n </div>\n <ng-content select=\"[mis-input-act]\"></ng-content>\n </div>\n <ng-content select=\"[mis-input-hint]\"></ng-content>\n <ng-content select=\"[mis-input-error]\"></ng-content>\n</div>\n",
69
- styles: [".input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded input{box-sizing:initial}.input-container.rounded.sm input{padding:3px 16px}.input-container.rounded.md input{padding:9px 16px}.input-container.rounded.lg input{padding:15px 16px}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0;padding:0}.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper:focus-within{border:1px solid #0937b2}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{margin-left:16px;transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]
69
+ styles: [":root{--pmry-200:#99baf7;--pmry-100:#cbddfb;--pmry-500:#0937b2;--pmry-400:#3c68d0;--pmry-600:#062a99;--pmry-700:#041f80;--pmry-300:#638fe7;--pmry-800:#021567;--pmry-900:#010f55;--sec-d-purple:#40447f;--sec-maroon:#6b034e;--sec-mud-red:#b23600;--sec-orange:#ed711c;--sec-purple:#815fd5;--sec-teal:#10adae;--sec-yellow:#d4900c;--sec-green:#547f40;--sec-bright-green:#27d22e;--sec-dark-teal:#035f6b;--sec-chocolate:#7c2f33;--sec-rube-pink:#c13d6d;--sec-cerulean:#0087b2;--sem-error:#b00020;--sem-info:#0091ff;--sem-warning:#ff9d00;--sem-success:#38af49;--grey-bg-1:#fafafa;--grey-bg:#f5f5f5;--grey-seperators:#e0e0e0;--grey-disabled:#c8cdd3;--grey-hover:#f5f7fc;--grey-pressed:#e6ebf7;--grey-row:#f5f7fc;--dec-light-yellow:#f4e7c3;--dec-light-purple:#dacff9;--dec-light-green:#e4f5e9;--dec-light-green2:#f1fff3;--dec-light-pink:#fae1ea;--dec-:#f4cbc1;--dec-lt-orange:#faefed;--dec-light-blue:#cfecf9;--dec-row-selection:#f1fdf8;--dec-row-selection2:#f2fbff;--dec-row-lines:#d3e1e9;--text-white:#fff;--text-disabled:#929dab;--text-muted:#6a737d;--text-black:#181f33;--MR-solid-blue2:#c8d5f6;--MR-solid-purple:#c9c3fb;--MR-solid-orange:#eeac9f;--MR-solid-green:#acdada;--MR-solid-brown:#e8c8af;--MR-solid-yellow:#ffefc7;--MR-solid-blue:#bbe6ff;--MR-solid-pink:#ffc6f2;--tr-hover:#f0f3fa;--tr-pressed:#dae1f3}.input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded input{box-sizing:initial}.input-container.rounded.sm input{padding:3px 16px}.input-container.rounded.md input{padding:9px 16px}.input-container.rounded.lg input{padding:15px 16px}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0;padding:0}.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper:focus-within{border:1px solid #0937b2}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{margin-left:16px;transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]
70
70
  },] }
71
71
  ];
72
72
  MisInputComponent.ctorParameters = () => [];
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"MisInputDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"input[misInput]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self","line":10,"character":38}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":10,"character":46}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":10,"character":25},{"__symbolic":"reference","module":"@angular/forms","name":"NgControl","line":10,"character":73}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"MisInputComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"mis-input","template":"<div\n [class]=\"'input-container ' + size\"\n [ngClass]=\"{\n rounded: type === 'rounded',\n floating: type === 'floating',\n 'has-error': !inputValidity || hasError,\n 'no-hint': noHints,\n 'mis-disabled': inputCtrl?.disabled\n }\"\n>\n <div class=\"input-wrapper\">\n <ng-content select=\"[mis-input-icon]\"></ng-content>\n <div class=\"mis-input\">\n <ng-content select=\"input\"></ng-content>\n <span class=\"mis-placeholder\">{{ placeholder }}</span>\n </div>\n <ng-content select=\"[mis-input-act]\"></ng-content>\n </div>\n <ng-content select=\"[mis-input-hint]\"></ng-content>\n <ng-content select=\"[mis-input-error]\"></ng-content>\n</div>\n","styles":[".input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded input{box-sizing:initial}.input-container.rounded.sm input{padding:3px 16px}.input-container.rounded.md input{padding:9px 16px}.input-container.rounded.lg input{padding:15px 16px}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0;padding:0}.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper:focus-within{border:1px solid #0937b2}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{margin-left:16px;transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]}]}],"members":{"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"noHints":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"hasError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"formInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":16,"character":3},"arguments":[{"__symbolic":"reference","name":"MisInputDirective"}]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"MisInputModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MisInputComponent"},{"__symbolic":"reference","name":"MisInputDirective"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":12},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":8,"character":26}],"exports":[{"__symbolic":"reference","name":"MisInputComponent"},{"__symbolic":"reference","name":"MisInputDirective"}]}]}],"members":{}}},"origins":{"MisInputDirective":"./directives/input/input.directive","MisInputComponent":"./mis-input.component","MisInputModule":"./mis-input.module"},"importAs":"mis-crystal-design-system/input"}
1
+ {"__symbolic":"module","version":4,"metadata":{"MisInputDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":5,"character":1},"arguments":[{"selector":"input[misInput]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self","line":10,"character":38}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":10,"character":46}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":10,"character":25},{"__symbolic":"reference","module":"@angular/forms","name":"NgControl","line":10,"character":73}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"MisInputComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"mis-input","template":"<div\n [class]=\"'input-container ' + size\"\n [ngClass]=\"{\n rounded: type === 'rounded',\n floating: type === 'floating',\n 'has-error': !inputValidity || hasError,\n 'no-hint': noHints,\n 'mis-disabled': inputCtrl?.disabled\n }\"\n>\n <div class=\"input-wrapper\">\n <ng-content select=\"[mis-input-icon]\"></ng-content>\n <div class=\"mis-input\">\n <ng-content select=\"input\"></ng-content>\n <span class=\"mis-placeholder\">{{ placeholder }}</span>\n </div>\n <ng-content select=\"[mis-input-act]\"></ng-content>\n </div>\n <ng-content select=\"[mis-input-hint]\"></ng-content>\n <ng-content select=\"[mis-input-error]\"></ng-content>\n</div>\n","styles":[":root{--pmry-200:#99baf7;--pmry-100:#cbddfb;--pmry-500:#0937b2;--pmry-400:#3c68d0;--pmry-600:#062a99;--pmry-700:#041f80;--pmry-300:#638fe7;--pmry-800:#021567;--pmry-900:#010f55;--sec-d-purple:#40447f;--sec-maroon:#6b034e;--sec-mud-red:#b23600;--sec-orange:#ed711c;--sec-purple:#815fd5;--sec-teal:#10adae;--sec-yellow:#d4900c;--sec-green:#547f40;--sec-bright-green:#27d22e;--sec-dark-teal:#035f6b;--sec-chocolate:#7c2f33;--sec-rube-pink:#c13d6d;--sec-cerulean:#0087b2;--sem-error:#b00020;--sem-info:#0091ff;--sem-warning:#ff9d00;--sem-success:#38af49;--grey-bg-1:#fafafa;--grey-bg:#f5f5f5;--grey-seperators:#e0e0e0;--grey-disabled:#c8cdd3;--grey-hover:#f5f7fc;--grey-pressed:#e6ebf7;--grey-row:#f5f7fc;--dec-light-yellow:#f4e7c3;--dec-light-purple:#dacff9;--dec-light-green:#e4f5e9;--dec-light-green2:#f1fff3;--dec-light-pink:#fae1ea;--dec-:#f4cbc1;--dec-lt-orange:#faefed;--dec-light-blue:#cfecf9;--dec-row-selection:#f1fdf8;--dec-row-selection2:#f2fbff;--dec-row-lines:#d3e1e9;--text-white:#fff;--text-disabled:#929dab;--text-muted:#6a737d;--text-black:#181f33;--MR-solid-blue2:#c8d5f6;--MR-solid-purple:#c9c3fb;--MR-solid-orange:#eeac9f;--MR-solid-green:#acdada;--MR-solid-brown:#e8c8af;--MR-solid-yellow:#ffefc7;--MR-solid-blue:#bbe6ff;--MR-solid-pink:#ffc6f2;--tr-hover:#f0f3fa;--tr-pressed:#dae1f3}.input-container{position:relative;padding-bottom:24px}.input-container.mis-disabled .input-wrapper{pointer-events:none!important}.input-container .input-wrapper{box-sizing:border-box;display:flex;align-items:center;flex-direction:row;flex-wrap:nowrap;transition:all 60ms ease-in;background-color:#fff;padding:3px 16px;gap:16px}.input-container .input-wrapper .mis-input{flex:1 1 auto;z-index:0;position:relative;display:flex;align-items:center}.input-container .input-wrapper input{flex:1 1 auto;border:none;outline:none;height:100%;padding:0;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;height:24px;color:#181f33;background-color:transparent;width:100%;vertical-align:middle}.input-container .input-wrapper input::-moz-placeholder{-moz-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input:-ms-input-placeholder{-ms-transition:all .1s ease-in;transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper input::placeholder{transition:all .1s ease-in;opacity:0;transform-origin:left center;color:transparent}.input-container .input-wrapper .mis-placeholder{position:absolute;font-family:Lato;font-style:normal;font-weight:400;font-size:16px;line-height:24px;color:#6a737d;z-index:-1;transition:all .15s ease-in}.input-container .input-wrapper:focus-within{background-color:#f5f5f5}.input-container .input-wrapper:focus-within{border:1px solid #0937b2}.input-container .input-wrapper [mis-input-act],.input-container .input-wrapper [mis-input-icon]{width:18px;height:18px;color:#6a737d;font-size:24px;line-height:18px}.input-container .input-wrapper [mis-input-act]{cursor:pointer}.input-container.no-hint{padding-bottom:0}.input-container.rounded input{box-sizing:initial}.input-container.rounded.sm input{padding:3px 16px}.input-container.rounded.md input{padding:9px 16px}.input-container.rounded.lg input{padding:15px 16px}.input-container.rounded .input-wrapper{border-radius:4px;border:1px solid #e0e0e0;padding:0}.input-container.rounded .input-wrapper:hover{background-color:#f5f5f5}.input-container.rounded .input-wrapper:focus-within{border:1px solid #0937b2}.input-container.rounded .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{color:transparent!important}.input-container.rounded .input-wrapper .mis-placeholder{margin-left:16px;transition-duration:50ms}.input-container.rounded.has-error .input-wrapper{border:1px solid #b00020!important}.input-container.floating .input-wrapper{padding-top:24px;padding-bottom:7px;border-bottom:1px solid #e0e0e0}.input-container.floating .input-wrapper input:focus+.mis-placeholder{color:#0937b2!important}.input-container.floating .input-wrapper input:not(:-moz-placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:not(:-ms-input-placeholder)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper input:focus+.mis-placeholder,.input-container.floating .input-wrapper input:not(:placeholder-shown)+.mis-placeholder{transform:translateY(calc(-100% + 6px))!important;font-size:12px!important;letter-spacing:.2px!important}.input-container.floating .input-wrapper:focus-within{border:none;border-bottom:1px solid #0937b2}.input-container.floating .input-wrapper:focus-within input::-moz-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input:-ms-input-placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating .input-wrapper:focus-within input::placeholder{color:#6a737d;opacity:1;font-size:16px}.input-container.floating.has-error .input-wrapper{border-bottom:1px solid #b00020!important}.input-container.floating.has-error .input-wrapper .mis-placeholder{color:#b00020!important}.input-container [mis-input-error],.input-container [mis-input-hint]{position:absolute;left:0;right:0;bottom:0;line-height:24px;height:24px;font-size:12px;color:#6a737d;letter-spacing:.2px}.input-container [mis-input-error]{color:#b00020}"]}]}],"members":{"type":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"placeholder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"noHints":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"hasError":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"formInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":16,"character":3},"arguments":[{"__symbolic":"reference","name":"MisInputDirective"}]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"MisInputModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MisInputComponent"},{"__symbolic":"reference","name":"MisInputDirective"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":12},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":8,"character":26}],"exports":[{"__symbolic":"reference","name":"MisInputComponent"},{"__symbolic":"reference","name":"MisInputDirective"}]}]}],"members":{}}},"origins":{"MisInputDirective":"./directives/input/input.directive","MisInputComponent":"./mis-input.component","MisInputModule":"./mis-input.module"},"importAs":"mis-crystal-design-system/input"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mis-crystal-design-system",
3
- "version": "2.8.7",
3
+ "version": "2.8.9",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "*",
6
6
  "@angular/core": "*",
@@ -1,73 +1,149 @@
1
+ // PRIMARY_COLORS -----------------------
2
+ $pmry_100: #CBDDFB;
3
+ $pmry_200: #99BAF7;
4
+ $pmry_500: #0937B2;
5
+ $pmry_400: #3C68D0;
6
+ $pmry_600: #062A99;
7
+ $pmry_700: #041F80;
8
+ $pmry_300: #638FE7;
9
+ $pmry_800: #021567;
10
+ $pmry_900: #010F55;
11
+
12
+ // SECONDARY_COLORS ---------------------
13
+ $sec_d_purple: #40447F;
14
+ $sec_maroon: #6B034E;
15
+ $sec_mud_red: #B23600;
16
+ $sec_orange: #ED711C;
17
+ $sec_purple: #815FD5;
18
+ $sec_teal: #10ADAE;
19
+ $sec_yellow: #D4900C;
20
+ $sec_green: #547F40;
21
+ $sec_bright_green: #27D22E;
22
+ $sec_dark_teal: #035F6B;
23
+ $sec_chocolate: #7C2F33;
24
+ $sec_rube_pink: #C13D6D;
25
+ $sec_cerulean: #0087B2;
26
+
27
+ //SEMANTIC COLORS --------------------------
28
+ $sem_error: #B00020;
29
+ $sem_info: #0091FF;
30
+ $sem_warning: #FF9D00;
31
+ $sem_success: #38AF49;
32
+
33
+ //grey -------------------------------------
34
+ $grey_bg-1: #FAFAFA;
35
+ $grey_bg: #F5F5F5;
36
+ $grey_seperators: #E0E0E0;
37
+ $grey_disabled: #C8CDD3;
38
+ $grey_hover: #F5F7FC;
39
+ $grey_pressed: #E6EBF7;
40
+ $grey_row: #F5F7FC;
41
+
42
+ //decor ------------------------------------
43
+ $dec_light-yellow:#F4E7C3;
44
+ $dec_light-purple:#DACFF9;
45
+ $dec_light-green:#E4F5E9;
46
+ $dec_light-green2:#F1FFF3;
47
+ $dec_light-pink:#FAE1EA;
48
+ $dec_:#F4CBC1;
49
+ $dec_lt-orange:#FAEFED;
50
+ $dec_light-blue:#CFECF9;
51
+ $dec_row-selection:#F1FDF8;
52
+ $dec_row-selection2:#F2FBFF;
53
+ $dec_row-lines:#D3E1E9;
54
+
55
+ //Text -------------------------------------
56
+ $text_white: #FFFFFF;
57
+ $text-disabled: #929DAB;
58
+ $text_muted: #6A737D;
59
+ $text_black: #181F33;
60
+
61
+ //meeting-rooms ----------------------------
62
+ $MR_solid_blue2: #C8D5F6;
63
+ $MR_solid_purple: #C9C3FB;
64
+ $MR_solid_orange: #EEAC9F;
65
+ $MR_solid_green: #ACDADA;
66
+ $MR_solid_brown: #E8C8AF;
67
+ $MR_solid_yellow: #FFEFC7;
68
+ $MR_solid_blue: #BBE6FF;
69
+ $MR_solid_pink: #FFC6F2;
70
+
71
+ //transparency -----------------------------
72
+ $tr_hover: #F0F3FA;
73
+ $tr_pressed: #DAE1F3;
74
+
75
+ :root{
1
76
  // PRIMARY_COLORS -----------------------
2
- $pmry_100: #CBDDFB;
3
- $pmry_200: #99BAF7;
4
- $pmry_500: #0937B2;
5
- $pmry_400: #3C68D0;
6
- $pmry_600: #062A99;
7
- $pmry_700: #041F80;
8
- $pmry_300: #638FE7;
9
- $pmry_800: #021567;
10
- $pmry_900: #010F55;
77
+ --pmry-200 : #{$pmry_200};
78
+ --pmry-100 : #{$pmry_100};
79
+ --pmry-500 : #{$pmry_500};
80
+ --pmry-400 : #{$pmry_400};
81
+ --pmry-600 : #{$pmry_600};
82
+ --pmry-700 : #{$pmry_700};
83
+ --pmry-300 : #{$pmry_300};
84
+ --pmry-800 : #{$pmry_800};
85
+ --pmry-900 : #{$pmry_900};
11
86
 
12
87
  // SECONDARY_COLORS ---------------------
13
- $sec_d_purple: #40447F;
14
- $sec_maroon: #6B034E;
15
- $sec_mud_red: #B23600;
16
- $sec_orange: #ED711C;
17
- $sec_purple: #815FD5;
18
- $sec_teal: #10ADAE;
19
- $sec_yellow: #D4900C;
20
- $sec_green: #547F40;
21
- $sec_bright_green: #27D22E;
22
- $sec_dark_teal: #035F6B;
23
- $sec_chocolate: #7C2F33;
24
- $sec_rube_pink: #C13D6D;
25
- $sec_cerulean: #0087B2;
88
+ --sec-d-purple: #{$sec_d_purple};
89
+ --sec-maroon: #{$sec_maroon};
90
+ --sec-mud-red: #{$sec_mud_red};
91
+ --sec-orange: #{$sec_orange};
92
+ --sec-purple: #{$sec_purple};
93
+ --sec-teal: #{$sec_teal};
94
+ --sec-yellow: #{$sec_yellow};
95
+ --sec-green: #{$sec_green};
96
+ --sec-bright-green: #{$sec_bright_green};
97
+ --sec-dark-teal: #{$sec_dark_teal};
98
+ --sec-chocolate: #{$sec_chocolate};
99
+ --sec-rube-pink: #{$sec_rube_pink};
100
+ --sec-cerulean: #{$sec_cerulean};
26
101
 
27
102
  //SEMANTIC COLORS --------------------------
28
- $sem_error: #B00020;
29
- $sem_info: #0091FF;
30
- $sem_warning: #FF9D00;
31
- $sem_success: #38AF49;
103
+ --sem-error: #{$sem_error};
104
+ --sem-info: #{$sem_info};
105
+ --sem-warning: #{$sem_warning};
106
+ --sem-success: #{$sem_success};
32
107
 
33
108
  //grey -------------------------------------
34
- $grey_bg-1: #FAFAFA;
35
- $grey_bg: #F5F5F5;
36
- $grey_seperators: #E0E0E0;
37
- $grey_disabled: #C8CDD3;
38
- $grey_hover: #F5F7FC;
39
- $grey_pressed: #E6EBF7;
40
- $grey_row: #F5F7FC;
109
+ --grey-bg-1: #{$grey_bg-1};
110
+ --grey-bg: #{$grey_bg};
111
+ --grey-seperators: #{$grey_seperators};
112
+ --grey-disabled: #{$grey_disabled};
113
+ --grey-hover: #{$grey_hover};
114
+ --grey-pressed: #{$grey_pressed};
115
+ --grey-row: #{$grey_row};
41
116
 
42
117
  //decor ------------------------------------
43
- $dec_light-yellow:#F4E7C3;
44
- $dec_light-purple:#DACFF9;
45
- $dec_light-green:#E4F5E9;
46
- $dec_light-green2:#F1FFF3;
47
- $dec_light-pink:#FAE1EA;
48
- $dec_:#F4CBC1;
49
- $dec_lt-orange:#FAEFED;
50
- $dec_light-blue:#CFECF9;
51
- $dec_row-selection:#F1FDF8;
52
- $dec_row-selection2:#F2FBFF;
53
- $dec_row-lines:#D3E1E9;
118
+ --dec-light-yellow : #{$dec_light-yellow};
119
+ --dec-light-purple: #{$dec_light-purple};
120
+ --dec-light-green: #{$dec_light-green};
121
+ --dec-light-green2: #{$dec_light-green2};
122
+ --dec-light-pink: #{$dec_light-pink};
123
+ --dec-: #{$dec_};
124
+ --dec-lt-orange: #{$dec_lt-orange};
125
+ --dec-light-blue: #{$dec_light-blue};
126
+ --dec-row-selection: #{$dec_row-selection};
127
+ --dec-row-selection2: #{$dec_row-selection2};
128
+ --dec-row-lines: #{$dec_row-lines};
54
129
 
55
130
  //Text -------------------------------------
56
- $text_white: #FFFFFF;
57
- $text-disabled: #929DAB;
58
- $text_muted: #6A737D;
59
- $text_black: #181F33;
131
+ --text-white: #{$text_white};
132
+ --text-disabled: #{$text-disabled};
133
+ --text-muted: #{$text_muted};
134
+ --text-black: #{$text_black};
60
135
 
61
136
  //meeting-rooms ----------------------------
62
- $MR_solid_blue2: #C8D5F6;
63
- $MR_solid_purple: #C9C3FB;
64
- $MR_solid_orange: #EEAC9F;
65
- $MR_solid_green: #ACDADA;
66
- $MR_solid_brown: #E8C8AF;
67
- $MR_solid_yellow: #FFEFC7;
68
- $MR_solid_blue: #BBE6FF;
69
- $MR_solid_pink: #FFC6F2;
137
+ --MR-solid-blue2 :#{$MR_solid_blue2};
138
+ --MR-solid-purple :#{$MR_solid_purple};
139
+ --MR-solid-orange :#{$MR_solid_orange};
140
+ --MR-solid-green :#{$MR_solid_green};
141
+ --MR-solid-brown :#{$MR_solid_brown};
142
+ --MR-solid-yellow :#{$MR_solid_yellow};
143
+ --MR-solid-blue :#{$MR_solid_blue};
144
+ --MR-solid-pink :#{$MR_solid_pink};
70
145
 
71
146
  //transparency -----------------------------
72
- $tr_hover: #F0F3FA;
73
- $tr_pressed: #DAE1F3;
147
+ --tr-hover :#{$tr_hover};
148
+ --tr-pressed :#{$tr_pressed};
149
+ }
@@ -1,75 +0,0 @@
1
- :root{
2
- // PRIMARY_COLORS -----------------------
3
- $pmry_100: #CBDDFB;
4
- $pmry_200: #99BAF7;
5
- $pmry_500: #0937B2;
6
- $pmry_400: #3C68D0;
7
- $pmry_600: #062A99;
8
- $pmry_700: #041F80;
9
- $pmry_300: #638FE7;
10
- $pmry_800: #021567;
11
- $pmry_900: #010F55;
12
-
13
- // SECONDARY_COLORS ---------------------
14
- $sec_d_purple: #40447F;
15
- $sec_maroon: #6B034E;
16
- $sec_mud_red: #B23600;
17
- $sec_orange: #ED711C;
18
- $sec_purple: #815FD5;
19
- $sec_teal: #10ADAE;
20
- $sec_yellow: #D4900C;
21
- $sec_green: #547F40;
22
- $sec_bright_green: #27D22E;
23
- $sec_dark_teal: #035F6B;
24
- $sec_chocolate: #7C2F33;
25
- $sec_rube_pink: #C13D6D;
26
- $sec_cerulean: #0087B2;
27
-
28
- //SEMANTIC COLORS --------------------------
29
- $sem_error: #B00020;
30
- $sem_info: #0091FF;
31
- $sem_warning: #FF9D00;
32
- $sem_success: #38AF49;
33
-
34
- //grey -------------------------------------
35
- $grey_bg-1: #FAFAFA;
36
- $grey_bg: #F5F5F5;
37
- $grey_seperators: #E0E0E0;
38
- $grey_disabled: #C8CDD3;
39
- $grey_hover: #F5F7FC;
40
- $grey_pressed: #E6EBF7;
41
- $grey_row: #F5F7FC;
42
-
43
- //decor ------------------------------------
44
- $dec_light-yellow:#F4E7C3;
45
- $dec_light-purple:#DACFF9;
46
- $dec_light-green:#E4F5E9;
47
- $dec_light-green2:#F1FFF3;
48
- $dec_light-pink:#FAE1EA;
49
- $dec_:#F4CBC1;
50
- $dec_lt-orange:#FAEFED;
51
- $dec_light-blue:#CFECF9;
52
- $dec_row-selection:#F1FDF8;
53
- $dec_row-selection2:#F2FBFF;
54
- $dec_row-lines:#D3E1E9;
55
-
56
- //Text -------------------------------------
57
- $text_white: #FFFFFF;
58
- $text-disabled: #929DAB;
59
- $text_muted: #6A737D;
60
- $text_black: #181F33;
61
-
62
- //meeting-rooms ----------------------------
63
- $MR_solid_blue2: #C8D5F6;
64
- $MR_solid_purple: #C9C3FB;
65
- $MR_solid_orange: #EEAC9F;
66
- $MR_solid_green: #ACDADA;
67
- $MR_solid_brown: #E8C8AF;
68
- $MR_solid_yellow: #FFEFC7;
69
- $MR_solid_blue: #BBE6FF;
70
- $MR_solid_pink: #FFC6F2;
71
-
72
- //transparency -----------------------------
73
- $tr_hover: #F0F3FA;
74
- $tr_pressed: #DAE1F3;
75
- }