UNPKG

@junte/ui

Version:

Quality Angular UI components kit

1,363 lines (1,307 loc) 640 kB
import { __spread, __decorate, __metadata, __param, __values, __extends, __read, __assign } from 'tslib'; import { keyframes, style, transition, trigger, query, group, animate, animateChild, state } from '@angular/animations'; import 'reflect-metadata'; import { CommonModule, ViewportScroller } from '@angular/common'; import { InjectionToken, EventEmitter, Inject, HostBinding, Input, HostListener, Directive, forwardRef, NgModule, ɵɵdefineInjectable, Injectable, Pipe, Component, NgZone, TemplateRef, ViewContainerRef, Renderer2, ElementRef, Output, ContentChildren, QueryList, ContentChild, ViewChildren, ViewChild, ChangeDetectorRef, ChangeDetectionStrategy, Optional, Host, SkipSelf, ComponentRef } from '@angular/core'; import { NG_VALUE_ACCESSOR, FormBuilder, FormsModule as FormsModule$1, ReactiveFormsModule, FormControl, FormGroupName, FormGroupDirective, FormArrayName, ControlContainer, FormGroup, FormArray, AbstractControl } from '@angular/forms'; import { NGXLogger, LoggerModule, NgxLoggerLevel } from 'ngx-logger'; import { Observable, BehaviorSubject, combineLatest, of, Subscription, merge } from 'rxjs'; import { DomSanitizer, Title, Meta } from '@angular/platform-browser'; import { takeWhile, filter, distinctUntilChanged, map, delay, finalize, tap, debounceTime } from 'rxjs/operators'; import { getYear, addMonths, addYears, format, subMonths, subYears, isSameDay, isWithinInterval, differenceInCalendarMonths, differenceInCalendarDays as differenceInCalendarDays$1, addDays, setDate, getDaysInMonth as getDaysInMonth$1, getMonth, startOfDay as startOfDay$1, isSameMonth as isSameMonth$1, startOfWeek as startOfWeek$1, addWeeks, parse } from 'date-fns'; import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import endOfDay from 'date-fns/endOfDay'; import endOfMonth from 'date-fns/endOfMonth'; import endOfWeek from 'date-fns/endOfWeek'; import { enUS } from 'date-fns/locale'; import endOfYear from 'date-fns/endOfYear'; import format$1 from 'date-fns/format'; import getDate from 'date-fns/getDate'; import getDaysInMonth from 'date-fns/getDaysInMonth'; import isAfter from 'date-fns/isAfter'; import isBefore from 'date-fns/isBefore'; import isEqual$2 from 'date-fns/isEqual'; import isSameMonth from 'date-fns/isSameMonth'; import isSameYear from 'date-fns/isSameYear'; import isThisMonth from 'date-fns/isThisMonth'; import isThisYear from 'date-fns/isThisYear'; import isToday from 'date-fns/isToday'; import isWeekend from 'date-fns/isWeekend'; import max$1 from 'date-fns/max'; import min$1 from 'date-fns/min'; import startOfDay from 'date-fns/startOfDay'; import startOfMonth from 'date-fns/startOfMonth'; import startOfWeek from 'date-fns/startOfWeek'; import startOfYear from 'date-fns/startOfYear'; import eachDayOfInterval from 'date-fns/eachDayOfInterval'; import { HttpClient, HttpClientModule } from '@angular/common/http'; import { TranslateModule, TranslateLoader } from '@ngx-translate/core'; import { RouterLinkActive, RouterModule, NavigationStart, NavigationEnd, NavigationCancel, NavigationError, Router } from '@angular/router'; var moveFromRightKeyframes = keyframes([ style({ transform: 'translateX(100%)', offset: 0, 'z-index': '10' }), style({ transform: 'translateX(0%)', offset: 1 }) ]); var moveToLeftKeyframes = keyframes([ style({ transform: 'translateX(0%)', offset: 0 }), style({ transform: 'translateX(-100%)', opacity: '0', offset: 1 }) ]); var sharedStyles = { position: 'fixed', overflow: 'hidden', backfaceVisibility: 'hidden', transformStyle: 'preserve-3d', }; var noneAnimation = [ transition('void => *', [ //denies any animation for init state ]), transition('false => *', [ //denies any animation from 'false' state ]), transition('* => false', [ //denies any animation from 'false' state ]), ]; var moveFromRight = trigger('moveFromRight', __spread(noneAnimation, [ transition('* => *', [ query(':enter, :leave', style(sharedStyles), { optional: true }), group([ query(':enter', [ animate('{{enterTiming}}s {{enterDelay}}s ease', moveFromRightKeyframes) ], { optional: true }), query(':leave', [ animate('{{leaveTiming}}s {{leaveDelay}}s ease', moveToLeftKeyframes) ], { optional: true }), ]), query(':enter, :leave', animateChild(), { optional: true }), ], { params: { enterTiming: '10', leaveTiming: '10', enterDelay: '0', leaveDelay: '0' } }) ])); var i18nEn = { label: { metrics: 'Metrics', search: 'Search', dark: 'Dark', light: 'Light', }, action: { reload: 'Reload', hide_sidebar: 'Hide sidebar', ok: 'Ok', cancel: 'Cancel', select_all: 'Select all' } }; var i18nRu = { label: { metrics: 'Метрики', search: 'Поиск', dark: 'Темная', light: 'Светлая', }, action: { reload: 'Обновить', hide_sidebar: 'Скрыть панель', ok: 'Ок', cancel: 'Отмена', select_all: 'Выбрать все' } }; var localeEnUs = { masks: { date: '__/__/____', time: '__:__', datetime: '__/__/____, __:__' } }; var localeRu = { masks: { date: '__.__.____', time: '__:__', datetime: '__.__.____, __:__' } }; var Context; (function (Context) { Context["block"] = "block"; Context["modal"] = "modal"; Context["text"] = "text"; Context["box"] = "box"; })(Context || (Context = {})); var GanttTypes; (function (GanttTypes) { GanttTypes["month"] = "month"; GanttTypes["year"] = "year"; })(GanttTypes || (GanttTypes = {})); var ButtonType; (function (ButtonType) { ButtonType["button"] = "button"; ButtonType["submit"] = "submit"; })(ButtonType || (ButtonType = {})); var DatePickerType; (function (DatePickerType) { DatePickerType["date"] = "date"; DatePickerType["time"] = "time"; DatePickerType["dateTime"] = "dateTime"; })(DatePickerType || (DatePickerType = {})); var InputType; (function (InputType) { InputType["text"] = "text"; InputType["password"] = "password"; InputType["number"] = "number"; InputType["email"] = "email"; })(InputType || (InputType = {})); var InputScheme; (function (InputScheme) { InputScheme["normal"] = "normal"; InputScheme["failed"] = "failed"; InputScheme["success"] = "success"; })(InputScheme || (InputScheme = {})); var InputAutocomplete; (function (InputAutocomplete) { InputAutocomplete["on"] = "on"; InputAutocomplete["off"] = "off"; })(InputAutocomplete || (InputAutocomplete = {})); var SelectMode; (function (SelectMode) { SelectMode["single"] = "single"; SelectMode["multiple"] = "multiple"; })(SelectMode || (SelectMode = {})); var SkeletonType; (function (SkeletonType) { SkeletonType["avatar"] = "avatar"; SkeletonType["text"] = "text"; SkeletonType["image"] = "image"; SkeletonType["card"] = "card"; })(SkeletonType || (SkeletonType = {})); var LinkTarget; (function (LinkTarget) { LinkTarget["self"] = "self"; LinkTarget["blank"] = "blank"; LinkTarget["parent"] = "parent"; LinkTarget["top"] = "top"; })(LinkTarget || (LinkTarget = {})); var PagerMode; (function (PagerMode) { PagerMode["page"] = "page"; PagerMode["offset"] = "offset"; })(PagerMode || (PagerMode = {})); var Behaviour; (function (Behaviour) { Behaviour["dropdown"] = "dropdown"; })(Behaviour || (Behaviour = {})); var Breakpoint; (function (Breakpoint) { Breakpoint["mobile"] = "mobile"; Breakpoint["tablet"] = "tablet"; Breakpoint["desktop"] = "desktop"; Breakpoint["wide"] = "wide"; })(Breakpoint || (Breakpoint = {})); var Color; (function (Color) { Color["white"] = "#FFFFFF"; Color["black"] = "#000000"; Color["blue"] = "#E7F5FF"; Color["blue100"] = "#E6E9FA"; Color["orange"] = "#EE8030"; Color["green"] = "#00CCB1"; Color["greenDark"] = "#00B89F"; Color["teal"] = "#1D2932"; Color["red"] = "#FF6262"; Color["redDark"] = "#DE5B5B"; Color["yellow"] = "#F8DB42"; Color["purple"] = "#3949AB"; Color["purpleDark"] = "#00227B"; Color["purpleLight"] = "#6F74DD"; Color["purpleLighten"] = "#C4C9E7"; Color["gray"] = "#C4C4C4"; Color["gray100"] = "#F5F5F5"; Color["gray200"] = "#F7F7F7"; Color["gray300"] = "#F0F0F0"; Color["gray400"] = "#E9E9E9"; Color["paleNavy"] = "#F3F4FC"; Color["gray600"] = "#C4C4C4"; Color["gray700"] = "#D0D0D0"; Color["gray800"] = "#828282"; Color["gray900"] = "#4F4F4F"; Color["grayDark"] = "#343434"; })(Color || (Color = {})); var Feature; (function (Feature) { Feature["adapted"] = "adapted"; Feature["clickable"] = "clickable"; Feature["badge"] = "badge"; Feature["dropdown"] = "dropdown"; Feature["selectAll"] = "selectAll"; Feature["allowEmpty"] = "allowEmpty"; Feature["search"] = "search"; Feature["smarty"] = "smarty"; Feature["reload"] = "reload"; Feature["multiplex"] = "multiplex"; Feature["today"] = "today"; Feature["marks"] = "marks"; Feature["multiline"] = "multiline"; Feature["pulse"] = "pulse"; })(Feature || (Feature = {})); var Fit; (function (Fit) { Fit["width"] = "width"; Fit["height"] = "height"; })(Fit || (Fit = {})); var FlexAlign; (function (FlexAlign) { FlexAlign["start"] = "start"; FlexAlign["center"] = "center"; FlexAlign["end"] = "end"; FlexAlign["baseline"] = "baseline"; FlexAlign["stretch"] = "stretch"; })(FlexAlign || (FlexAlign = {})); var FlexJustify; (function (FlexJustify) { FlexJustify["start"] = "start"; FlexJustify["center"] = "center"; FlexJustify["end"] = "end"; FlexJustify["between"] = "between"; FlexJustify["around"] = "around"; FlexJustify["evenly"] = "evenly"; })(FlexJustify || (FlexJustify = {})); var FlexDirection; (function (FlexDirection) { FlexDirection["row"] = "row"; FlexDirection["column"] = "column"; FlexDirection["rowReverse"] = "rowReverse"; FlexDirection["columnReverse"] = "columnReverse"; })(FlexDirection || (FlexDirection = {})); var FlexWrap; (function (FlexWrap) { FlexWrap["wrap"] = "wrap"; FlexWrap["noWrap"] = "nowrap"; FlexWrap["reverse"] = "reverse"; })(FlexWrap || (FlexWrap = {})); var FlexAlignContent; (function (FlexAlignContent) { FlexAlignContent["start"] = "start"; FlexAlignContent["center"] = "center"; FlexAlignContent["end"] = "end"; FlexAlignContent["between"] = "between"; FlexAlignContent["around"] = "around"; FlexAlignContent["evenly"] = "evenly"; FlexAlignContent["stretch"] = "stretch"; })(FlexAlignContent || (FlexAlignContent = {})); var FlexAlignSelf; (function (FlexAlignSelf) { FlexAlignSelf["start"] = "start"; FlexAlignSelf["center"] = "center"; FlexAlignSelf["end"] = "end"; FlexAlignSelf["stretch"] = "stretch"; FlexAlignSelf["baseline"] = "baseline"; FlexAlignSelf["auto"] = "auto"; })(FlexAlignSelf || (FlexAlignSelf = {})); var Gutter; (function (Gutter) { Gutter["none"] = "none"; Gutter["tiny"] = "tiny"; Gutter["small"] = "small"; Gutter["normal"] = "normal"; Gutter["big"] = "big"; Gutter["large"] = "large"; Gutter["huge"] = "huge"; })(Gutter || (Gutter = {})); var Height; (function (Height) { Height["screen"] = "screen"; Height["default"] = "default"; Height["fluid"] = "fluid"; })(Height || (Height = {})); var icons = { power: 'power:svg:default:main|stroked', dashboard: 'dashboard:svg:default:main|stroked|other', settings: 'settings:svg:default:main|stroked|other', calendar: 'calendar:svg:default:other|stroked', compass: 'compass:svg:default:other|stroked', map: 'map:svg:default:other|stroked', money: 'money:svg:default:other|stroked', solar: 'solar:svg:default:other|stroked', moon: 'moon:svg:default:other|stroked', poop: 'poop:svg:default:other|stroked', knowledge: 'knowledge:svg:default:other|stroked', // access lock: 'lock:svg:default:main|stroked', unlock: 'unlock:svg:default:main|stroked', // states checked: 'checked:svg:default:main|stroked', // actions actions: 'actions:svg:default:main|filled', add: 'add:svg:default:main|stroked', edit: 'edit:svg:default:main|stroked', save: 'save:svg:default:main|stroked', delete: 'delete:svg:default:main|stroked', copy: 'copy:svg:default:main|stroked', cancel: 'cancel:svg:default:main|stroked', reload: 'reload:svg:default:main|stroked', cut: 'cut:svg:default:main|stroked', move: 'move:svg:default:main|stroked', close: 'close:svg:default:main|stroked', closeSmall: 'close-small:svg:default:main|stroked', expand: 'expand:svg:default:main|stroked', print: 'print:svg:default:main|stroked', filter: 'filter:svg:default:main|stroked', create: 'create:svg:default:main|stroked', smallUp: 'small-up:svg:default:main|stroked', smallDown: 'small-down:svg:default:main|stroked', send: 'send:svg:default:main|stroked', today: 'today:svg:default:main|filled', // navigation search: 'search:svg:default:main|stroked', menu: 'menu:svg:default:main|stroked', home: 'home:svg:default:main|stroked', more: 'more:svg:default:main|stroked', // information information: 'information:svg:default:main|stroked', question: 'question:svg:default:main|stroked', warning: 'warning:svg:default:main|stroked', stop: 'stop:svg:default:main|stroked', time: 'time:svg:default:main|stroked', help: 'help:svg:default:main|stroked', // media image: 'image:svg:default:other|stroked', camera: 'camera:svg:default:other|stroked', // rewind first: 'first:svg:default:other|stroked', last: 'last:svg:default:other|stroked', pause: 'pause:svg:default:other|stroked', play: 'play:svg:default:other|stroked', // internet signin: 'signin:svg:default:other|stroked', signout: 'signout:svg:default:other|stroked', link: 'link:svg:default:other|stroked', email: 'email:svg:default:other|stroked', anchor: 'anchor:svg:default:other|stroked', download: 'download:svg:default:other|stroked', cloud: 'cloud:svg:default:other|stroked', sync: 'sync:svg:default:other|stroked', sorting: 'sorting:svg:default:other|stroked', view: 'view:svg:default:other|stroked', viewHide: 'view-hide:svg:default:other|stroked', bubble: 'bubble:svg:default:other|stroked', selectClose: 'select-close:svg:default:other|stroked', selectOpen: 'select-open:svg:default:other|stroked', // programming code: 'code:svg:default:other|stroked', bug: 'bug:svg:default:other|stroked', // social like: 'like:svg:default:other|stroked', dislike: 'dislike:svg:default:other|stroked', profile: 'profile:svg:default:other|stroked', bell: 'bell:svg:default:other|stroked', team: 'team:svg:default:other|stroked', user: 'user:svg:default:other|stroked', messages: 'messages:svg:default:other|stroked', // chevron doubleChevronLeft: 'chevron-double-left:svg:default:controls|stroked', doubleChevronRight: 'chevron-double-right:svg:default:controls|stroked', chevronDown: 'chevron-down:svg:default:controls|stroked', chevronLeft: 'chevron-left:svg:default:controls|stroked', chevronRight: 'chevron-right:svg:default:controls|stroked', chevronUp: 'chevron-up:svg:default:controls|stroked', // arrow arrowUp: 'arrow-up:svg:default:controls|stroked', arrowDown: 'arrow-down:svg:default:controls|stroked', arrowLeft: 'arrow-left:svg:default:controls|stroked', arrowRight: 'arrow-right:svg:default:controls|stroked', // emoji evil: 'evil:svg:emoji:emoji|filled', laughter: 'laughter:svg:emoji:emoji|filled', sad: 'sad:svg:emoji:emoji|filled', shocked: 'shocked:svg:emoji:emoji|filled', skull: 'skull:svg:emoji:emoji|filled', smile: 'smile:svg:emoji:emoji|filled', wink: 'evil:svg:emoji:emoji|filled', neutral: 'neutral:svg:emoji:emoji|filled', // controls checkboxUnchecked: 'checkbox-unchecked:svg:default:controls|filled', checkboxChecked: 'checkbox-checked:svg:default:controls|filled', radioUnchecked: 'radio-unchecked:svg:default:controls|filled', radioChecked: 'radio-checked:svg:default:controls|filled', // countries abkhazia: 'abkhazia:svg:countries:flags', afghanistan: 'afghanistan:svg:countries:flags', alandIslands: 'aland-islands:svg:countries:flags', albania: 'albania:svg:countries:flags', algeria: 'algeria:svg:countries:flags', americanSamoa: 'american-samoa:svg:countries:flags', andorra: 'andorra:svg:countries:flags', angola: 'angola:svg:countries:flags', anguilla: 'anguilla:svg:countries:flags', antiguaAndBarbuda: 'antigua-and-barbuda:svg:countries:flags', argentina: 'argentina:svg:countries:flags', armenia: 'armenia:svg:countries:flags', aruba: 'aruba:svg:countries:flags', australia: 'australia:svg:countries:flags', austria: 'austria:svg:countries:flags', azerbaijan: 'azerbaijan:svg:countries:flags', azoresIslands: 'azores-islands:svg:countries:flags', bahamas: 'bahamas:svg:countries:flags', bahrain: 'bahrain:svg:countries:flags', balearicIslands: 'balearic-islands:svg:countries:flags', bangladesh: 'bangladesh:svg:countries:flags', barbados: 'barbados:svg:countries:flags', basqueCountry: 'basque-country:svg:countries:flags', belarus: 'belarus:svg:countries:flags', belgium: 'belgium:svg:countries:flags', belize: 'belize:svg:countries:flags', benin: 'benin:svg:countries:flags', bermuda: 'bermuda:svg:countries:flags', bhutan: 'bhutan:svg:countries:flags', bolivia: 'bolivia:svg:countries:flags', bonaire: 'bonaire:svg:countries:flags', bosniaAndHerzegovina: 'bosnia-and-herzegovina:svg:countries:flags', botswana: 'botswana:svg:countries:flags', brazil: 'brazil:svg:countries:flags', britishColumbia: 'british-columbia:svg:countries:flags', britishIndianOceanTerritory: 'british-indian-ocean-territory:svg:countries:flags', britishVirginIslands: 'british-virgin-islands:svg:countries:flags', brunei: 'brunei:svg:countries:flags', bulgaria: 'bulgaria:svg:countries:flags', burkinaFaso: 'burkina-faso:svg:countries:flags', burundi: 'burundi:svg:countries:flags', cambodia: 'cambodia:svg:countries:flags', cameroon: 'cameroon:svg:countries:flags', canada: 'canada:svg:countries:flags', canaryIslands: 'canary-islands:svg:countries:flags', capeVerde: 'cape-verde:svg:countries:flags', caymanIslands: 'cayman-islands:svg:countries:flags', centralAfricanRepublic: 'central-african-republic:svg:countries:flags', ceuta: 'ceuta:svg:countries:flags', chad: 'chad:svg:countries:flags', chile: 'chile:svg:countries:flags', china: 'china:svg:countries:flags', christmasIsland: 'christmas-island:svg:countries:flags', cocosIsland: 'cocos-island:svg:countries:flags', colombia: 'colombia:svg:countries:flags', comoros: 'comoros:svg:countries:flags', cookIslands: 'cook-islands:svg:countries:flags', corsica: 'corsica:svg:countries:flags', costaRica: 'costa-rica:svg:countries:flags', croatia: 'croatia:svg:countries:flags', cuba: 'cuba:svg:countries:flags', curacao: 'curacao:svg:countries:flags', cyprus: 'cyprus:svg:countries:flags', czechRepublic: 'czech-republic:svg:countries:flags', democraticRepublicOfCongo: 'democratic-republic-of-congo:svg:countries:flags', denmark: 'denmark:svg:countries:flags', djibouti: 'djibouti:svg:countries:flags', dominica: 'dominica:svg:countries:flags', dominicanRepublic: 'dominican-republic:svg:countries:flags', eastTimor: 'east-timor:svg:countries:flags', ecuador: 'ecuador:svg:countries:flags', egypt: 'egypt:svg:countries:flags', elSalvador: 'el-salvador:svg:countries:flags', england: 'england:svg:countries:flags', equatorialQuinea: 'equatorial-guinea:svg:countries:flags', eritrea: 'eritrea:svg:countries:flags', ersey: 'ersey:svg:countries:flags', estonia: 'estonia:svg:countries:flags', ethiopia: 'ethiopia:svg:countries:flags', europeanUnion: 'european-union:svg:countries:flags', falklandIslands: 'falkland-islands:svg:countries:flags', faroeIslands: 'faroe-islands:svg:countries:flags', fiji: 'fiji:svg:countries:flags', finland: 'finland:svg:countries:flags', france: 'france:svg:countries:flags', frenchPolynesia: 'french-polynesia:svg:countries:flags', gabon: 'gabon:svg:countries:flags', galapagosIslands: 'galapagos-islands:svg:countries:flags', gambia: 'gambia:svg:countries:flags', georgia: 'georgia:svg:countries:flags', germany: 'germany:svg:countries:flags', ghana: 'ghana:svg:countries:flags', gibraltar: 'gibraltar:svg:countries:flags', greece: 'greece:svg:countries:flags', greenland: 'greenland:svg:countries:flags', grenada: 'grenada:svg:countries:flags', guam: 'guam:svg:countries:flags', guatemala: 'guatemala:svg:countries:flags', guernsey: 'guernsey:svg:countries:flags', guinea: 'guinea:svg:countries:flags', guineaBissau: 'guinea-bissau:svg:countries:flags', haiti: 'haiti:svg:countries:flags', hawaii: 'hawaii:svg:countries:flags', honduras: 'honduras:svg:countries:flags', hongKong: 'hong-kong:svg:countries:flags', hungary: 'hungary:svg:countries:flags', iceland: 'iceland:svg:countries:flags', india: 'india:svg:countries:flags', indonesia: 'indonesia:svg:countries:flags', iran: 'iran:svg:countries:flags', iraq: 'iraq:svg:countries:flags', ireland: 'ireland:svg:countries:flags', isleOfMan: 'isle-of-man:svg:countries:flags', israel: 'israel:svg:countries:flags', italy: 'italy:svg:countries:flags', ivoryCoast: 'ivory-coast:svg:countries:flags', jamaica: 'jamaica:svg:countries:flags', japan: 'japan:svg:countries:flags', jordan: 'jordan:svg:countries:flags', kazakhstan: 'kazakhstan:svg:countries:flags', kenya: 'kenya:svg:countries:flags', kosovo: 'kosovo:svg:countries:flags', kuwait: 'kuwait:svg:countries:flags', kyrgyzstan: 'kyrgyzstan:svg:countries:flags', laos: 'laos:svg:countries:flags', latvia: 'latvia:svg:countries:flags', lebanon: 'lebanon:svg:countries:flags', lesotho: 'lesotho:svg:countries:flags', liberia: 'liberia:svg:countries:flags', libya: 'libya:svg:countries:flags', liechtenstein: 'liechtenstein:svg:countries:flags', lithuania: 'lithuania:svg:countries:flags', luxembourg: 'luxembourg:svg:countries:flags', macao: 'macao:svg:countries:flags', madagascar: 'madagascar:svg:countries:flags', madeira: 'madeira:svg:countries:flags', malawi: 'malawi:svg:countries:flags', malaysia: 'malaysia:svg:countries:flags', maldives: 'maldives:svg:countries:flags', mali: 'mali:svg:countries:flags', malta: 'malta:svg:countries:flags', marshallIsland: 'marshall-island:svg:countries:flags', martinique: 'martinique:svg:countries:flags', mauritania: 'mauritania:svg:countries:flags', mauritius: 'mauritius:svg:countries:flags', melilla: 'melilla:svg:countries:flags', mexico: 'mexico:svg:countries:flags', micronesia: 'micronesia:svg:countries:flags', moldova: 'moldova:svg:countries:flags', monaco: 'monaco:svg:countries:flags', mongolia: 'mongolia:svg:countries:flags', montenegro: 'montenegro:svg:countries:flags', montserrat: 'montserrat:svg:countries:flags', morocco: 'morocco:svg:countries:flags', mozambique: 'mozambique:svg:countries:flags', myanmar: 'myanmar:svg:countries:flags', namibia: 'namibia:svg:countries:flags', nauru: 'nauru:svg:countries:flags', nepal: 'nepal:svg:countries:flags', netherlands: 'netherlands:svg:countries:flags', newZealand: 'new-zealand:svg:countries:flags', nicaragua: 'nicaragua:svg:countries:flags', niger: 'niger:svg:countries:flags', nigeria: 'nigeria:svg:countries:flags', niue: 'niue:svg:countries:flags', norfolkIsland: 'norfolk-island:svg:countries:flags', northKorea: 'north-korea:svg:countries:flags', northenCyprus: 'northen-cyprus:svg:countries:flags', northernMarianasIslands: 'northern-marianas-islands:svg:countries:flags', norway: 'norway:svg:countries:flags', oman: 'oman:svg:countries:flags', orkneyIslands: 'orkney-islands:svg:countries:flags', ossetia: 'ossetia:svg:countries:flags', otan: 'otan:svg:countries:flags', pakistan: 'pakistan:svg:countries:flags', palau: 'palau:svg:countries:flags', palestine: 'palestine:svg:countries:flags', panama: 'panama:svg:countries:flags', papuaNewGuinea: 'papua-new-guinea:svg:countries:flags', paraguay: 'paraguay:svg:countries:flags', peru: 'peru:svg:countries:flags', philippines: 'philippines:svg:countries:flags', pitcairnIslands: 'pitcairn-islands:svg:countries:flags', poland: 'poland:svg:countries:flags', portugal: 'portugal:svg:countries:flags', puertoRico: 'puerto-rico:svg:countries:flags', qatar: 'qatar:svg:countries:flags', rapaNui: 'rapa-nui:svg:countries:flags', republicOfMacedonia: 'republic-of-macedonia:svg:countries:flags', republicOfTheCongo: 'republic-of-the-congo:svg:countries:flags', romania: 'romania:svg:countries:flags', russia: 'russia:svg:countries:flags', rwanda: 'rwanda:svg:countries:flags', sabaIsland: 'saba-island:svg:countries:flags', sahrawiArabDemocraticRepublic: 'sahrawi-arab-democratic-republic:svg:countries:flags', saintKittsAndNevis: 'saint-kitts-and-nevis:svg:countries:flags', samoa: 'samoa:svg:countries:flags', sanMarino: 'san-marino:svg:countries:flags', saoTomeAndPrincipe: 'sao-tome-and-principe:svg:countries:flags', sardinia: 'sardinia:svg:countries:flags', saudiArabia: 'saudi-arabia:svg:countries:flags', scotland: 'scotland:svg:countries:flags', senegal: 'senegal:svg:countries:flags', serbia: 'serbia:svg:countries:flags', seychelles: 'seychelles:svg:countries:flags', sicily: 'sicily:svg:countries:flags', sierraLeone: 'sierra-leone:svg:countries:flags', singapore: 'singapore:svg:countries:flags', sintEustatius: 'sint-eustatius:svg:countries:flags', sintMaarten: 'sint-maarten:svg:countries:flags', slovakia: 'slovakia:svg:countries:flags', slovenia: 'slovenia:svg:countries:flags', solomonIslands: 'solomon-islands:svg:countries:flags', somalia: 'somalia:svg:countries:flags', somaliland: 'somaliland:svg:countries:flags', southAfrica: 'south-africa:svg:countries:flags', southKorea: 'south-korea:svg:countries:flags', southSudan: 'south-sudan:svg:countries:flags', spain: 'spain:svg:countries:flags', sriLanka: 'sri-lanka:svg:countries:flags', stBarts: 'st-barts:svg:countries:flags', stLucia: 'st-lucia:svg:countries:flags', stVincentAndTheGrenadines: 'st-vincent-and-the-grenadines:svg:countries:flags', sudan: 'sudan:svg:countries:flags', suriname: 'suriname:svg:countries:flags', sweden: 'sweden:svg:countries:flags', switzerland: 'switzerland:svg:countries:flags', syria: 'syria:svg:countries:flags', taiwan: 'taiwan:svg:countries:flags', tajikistan: 'tajikistan:svg:countries:flags', tanzania: 'tanzania:svg:countries:flags', thailand: 'thailand:svg:countries:flags', tibet: 'tibet:svg:countries:flags', togo: 'togo:svg:countries:flags', tokelau: 'tokelau:svg:countries:flags', tonga: 'tonga:svg:countries:flags', transnistria: 'transnistria:svg:countries:flags', trinidadAndTobago: 'trinidad-and-tobago:svg:countries:flags', tubalu: 'tubalu:svg:countries:flags', tunisia: 'tunisia:svg:countries:flags', turkey: 'turkey:svg:countries:flags', turkmenistan: 'turkmenistan:svg:countries:flags', turksAndCaicos: 'turks-and-caicos:svg:countries:flags', ukraine: 'ukraine:svg:countries:flags', uganda: 'uganda:svg:countries:flags', unitedArabEmirates: 'united-arab-emirates:svg:countries:flags', unitedKingdom: 'united-kingdom:svg:countries:flags', unitedNations: 'united-nations:svg:countries:flags', unitedStatesOfAmerica: 'united-states-of-america:svg:countries:flags', uruguay: 'uruguay:svg:countries:flags', uzbekistn: 'uzbekistn:svg:countries:flags', vanuatu: 'vanuatu:svg:countries:flags', vaticanCity: 'vatican-city:svg:countries:flags', venezuela: 'venezuela:svg:countries:flags', vietnam: 'vietnam:svg:countries:flags', virginIslands: 'virgin-islands:svg:countries:flags', wales: 'wales:svg:countries:flags', yemen: 'yemen:svg:countries:flags', zambia: 'zambia:svg:countries:flags', zimbabwe: 'zimbabwe:svg:countries:flags', rocket: 'rocket:svg:default:stroked', // apps arnold: 'arnold:svg:apps:apps', angular: 'angular:svg:apps:apps', gitlab: 'gitlab:svg:apps:apps', dribbble: 'dribbble:svg:apps:apps', github: 'github:svg:apps:apps', figma: 'figma:svg:apps:apps', stackblitz: 'stackblitz:svg:apps:apps', animated: { runningMan: 'running-man:animated:default:animated', success: 'success:animated:default:animated', settings: 'settings:animated:default:animated|filled', bell: 'bell:animated:default:animated|filled', reload: 'reload:animated:default:animated|filled', spinner: 'spinner:animated:default:animated|stroked', } }; var Key; (function (Key) { Key["unidentified"] = "Unidentified"; Key["enter"] = "Enter"; Key["backspace"] = "Backspace"; Key["tab"] = "Tab"; Key["arrowLeft"] = "ArrowLeft"; Key["arrowTop"] = "ArrowTop"; Key["arrowRight"] = "ArrowRight"; Key["arrowBottom"] = "ArrowBottom"; Key["zero"] = "0"; Key["one"] = "1"; Key["two"] = "2"; Key["three"] = "3"; Key["four"] = "4"; Key["five"] = "5"; Key["six"] = "6"; Key["seven"] = "7"; Key["eight"] = "8"; Key["nine"] = "9"; Key["v"] = "v"; })(Key || (Key = {})); var Modifier; (function (Modifier) { Modifier["altKey"] = "altKey"; Modifier["ctrlKey"] = "ctrlKey"; Modifier["shiftKey"] = "shiftKey"; Modifier["metaKey"] = "metaKey"; })(Modifier || (Modifier = {})); var Orientation; (function (Orientation) { Orientation["horizontal"] = "horizontal"; Orientation["vertical"] = "vertical"; })(Orientation || (Orientation = {})); var Outline; (function (Outline) { Outline["ghost"] = "ghost"; Outline["fill"] = "fill"; Outline["transparent"] = "transparent"; })(Outline || (Outline = {})); var Placement; (function (Placement) { Placement["default"] = "default"; Placement["absolute"] = "absolute"; Placement["fixed"] = "fixed"; })(Placement || (Placement = {})); var Position; (function (Position) { Position["left"] = "left"; Position["right"] = "right"; Position["top"] = "top"; Position["bottom"] = "bottom"; Position["rightTop"] = "rightTop"; Position["leftTop"] = "leftTop"; Position["rightBottom"] = "rightBottom"; Position["leftBottom"] = "leftBottom"; Position["inline"] = "inline"; Position["center"] = "center"; })(Position || (Position = {})); var Scheme; (function (Scheme) { Scheme["primary"] = "primary"; Scheme["secondary"] = "secondary"; Scheme["success"] = "success"; Scheme["fail"] = "fail"; })(Scheme || (Scheme = {})); var Shape; (function (Shape) { Shape["circle"] = "circle"; Shape["square"] = "square"; })(Shape || (Shape = {})); var Size; (function (Size) { Size["auto"] = "auto"; Size["tiny"] = "tiny"; Size["small"] = "small"; Size["normal"] = "normal"; Size["large"] = "large"; })(Size || (Size = {})); var State; (function (State) { State["loading"] = "loading"; State["warning"] = "warning"; State["checked"] = "checked"; State["error"] = "error"; })(State || (State = {})); var Stroke; (function (Stroke) { Stroke["bold"] = "bold"; Stroke["normal"] = "normal"; Stroke["thin"] = "thin"; })(Stroke || (Stroke = {})); var MenuStyle; (function (MenuStyle) { MenuStyle["default"] = "default"; MenuStyle["tabs"] = "tabs"; MenuStyle["tags"] = "tags"; })(MenuStyle || (MenuStyle = {})); var TextAlign; (function (TextAlign) { TextAlign["left"] = "left"; TextAlign["right"] = "right"; TextAlign["center"] = "center"; })(TextAlign || (TextAlign = {})); var TextTransform; (function (TextTransform) { TextTransform["capitalize"] = "capitalize"; TextTransform["uppercase"] = "uppercase"; TextTransform["lowercase"] = "lowercase"; })(TextTransform || (TextTransform = {})); var Theme; (function (Theme) { Theme["light"] = "light"; Theme["dark"] = "dark"; })(Theme || (Theme = {})); var Triggers; (function (Triggers) { Triggers["hover"] = "hover"; Triggers["click"] = "click"; })(Triggers || (Triggers = {})); var UrlMatching; (function (UrlMatching) { UrlMatching["fullMatch"] = "fullMatch"; UrlMatching["wildcard"] = "wildcard"; })(UrlMatching || (UrlMatching = {})); var Validator; (function (Validator) { Validator["required"] = "required"; Validator["minLength"] = "minlength"; Validator["maxLength"] = "maxlength"; Validator["min"] = "min"; Validator["max"] = "max"; Validator["email"] = "email"; Validator["pattern"] = "pattern"; Validator["phone"] = "phone"; })(Validator || (Validator = {})); var Width; (function (Width) { Width["fluid"] = "fluid"; Width["default"] = "default"; })(Width || (Width = {})); var UI = /** @class */ (function () { function UI() { } UI.gutter = Gutter; UI.theme = Theme; UI.scheme = Scheme; UI.size = Size; UI.stroke = Stroke; UI.outline = Outline; UI.position = Position; UI.breakpoint = Breakpoint; UI.behaviour = Behaviour; UI.shape = Shape; UI.orientation = Orientation; UI.width = Width; UI.height = Height; UI.color = Color; UI.icons = icons; UI.matching = UrlMatching; UI.feature = Feature; UI.state = State; UI.fit = Fit; UI.target = LinkTarget; UI.align = FlexAlign; UI.justify = FlexJustify; UI.direction = FlexDirection; UI.wrap = FlexWrap; UI.validator = Validator; UI.placement = Placement; UI.trigger = Triggers; UI.context = Context; UI.text = { align: TextAlign, transform: TextTransform }; UI.datePicker = { type: DatePickerType }; UI.skeleton = { type: SkeletonType }; UI.pager = { mode: PagerMode }; UI.input = { type: InputType, scheme: InputScheme, autocomplete: InputAutocomplete }; UI.select = { mode: SelectMode }; UI.button = { type: ButtonType }; UI.gantt = { type: GanttTypes }; UI.menu = { style: MenuStyle }; UI.keyboard = { key: Key, modifier: Modifier }; return UI; }()); var COMPONENT_API_PROPERTIES_METADATA_KEY = Symbol('component_api_properties_field_meta'); var COMPONENT_API_METHODS_METADATA_KEY = Symbol('component_api_methods_field_meta'); var COMPONENT_API_CONTENT_METADATA_KEY = Symbol('component_api_content_field_meta'); var PropertyMetadata = /** @class */ (function () { function PropertyMetadata() { } return PropertyMetadata; }()); var MethodMetadata = /** @class */ (function () { function MethodMetadata() { } return MethodMetadata; }()); var ContentMetadata = /** @class */ (function () { function ContentMetadata() { } return ContentMetadata; }()); function PropertyApi(data) { return function (obj, property) { var constructor = obj.constructor; var metadata = Reflect.getMetadata(COMPONENT_API_PROPERTIES_METADATA_KEY, constructor) || {}; metadata[property] = data; Reflect.defineMetadata(COMPONENT_API_PROPERTIES_METADATA_KEY, metadata, constructor); }; } function MethodApi(data) { return function (obj, property) { var constructor = obj.constructor; var metadata = Reflect.getMetadata(COMPONENT_API_METHODS_METADATA_KEY, constructor) || {}; metadata[property] = data; Reflect.defineMetadata(COMPONENT_API_METHODS_METADATA_KEY, metadata, constructor); }; } function ContentApi(data) { return function (obj, property) { var constructor = obj.constructor; var metadata = Reflect.getMetadata(COMPONENT_API_CONTENT_METADATA_KEY, constructor) || {}; metadata[property] = data; Reflect.defineMetadata(COMPONENT_API_CONTENT_METADATA_KEY, metadata, constructor); }; } var SelectMode$1; (function (SelectMode) { SelectMode["single"] = "single"; SelectMode["multiple"] = "multiple"; })(SelectMode$1 || (SelectMode$1 = {})); function isEqual(a, b) { return JSON.stringify(a) === JSON.stringify(b); } var Config = /** @class */ (function () { function Config(defs) { if (defs === void 0) { defs = null; } if (!!defs) { Object.assign(this, defs); } } return Config; }()); var SELECTABLE_SIGNALS = new InjectionToken('selectable_signals'); var hub = new EventEmitter(); function eventEmitterFactory() { return hub; } var SelectableDirective = /** @class */ (function () { function SelectableDirective(signals, logger) { var _this = this; this.signals = signals; this.logger = logger; this.config = new Config({ mode: SelectMode$1.single, enabled: true, features: [] }); this.disabled = false; this._mode = SelectMode$1.single; this.onChange = function () { return _this.logger.error('value accessor is not registered'); }; this.onTouched = function () { return _this.logger.error('value accessor is not registered'); }; this.registerOnChange = function (fn) { return _this.onChange = fn; }; this.registerOnTouched = function (fn) { return _this.onTouched = fn; }; this.onBlur = function () { return _this.onTouched(); }; } SelectableDirective_1 = SelectableDirective; Object.defineProperty(SelectableDirective.prototype, "selected", { get: function () { var value = this.config.value; return this.state.findIndex(function (e) { return isEqual(e, value); }) !== -1; }, enumerable: true, configurable: true }); Object.defineProperty(SelectableDirective.prototype, "configure", { set: function (config) { Object.assign(this.config, config); }, enumerable: true, configurable: true }); SelectableDirective.prototype.ngOnInit = function () { var _this = this; this.signals.subscribe(function (state) { return _this.state = state; }); }; SelectableDirective.prototype.writeValue = function (value) { this.state = !!value ? Array.isArray(value) ? value : [value] : []; }; SelectableDirective.prototype.setDisabledState = function (disabled) { this.disabled = disabled; }; SelectableDirective.prototype.select = function () { var _a = this.config, mode = _a.mode, value = _a.value, enabled = _a.enabled, features = _a.features; if (!enabled) { return; } switch (mode) { case SelectMode$1.single: var current = this.state.length > 0 ? this.state[0] : null; if (!!current) { var same = isEqual(current, value); if (same && !features.includes(UI.feature.allowEmpty)) { return; } this.state = same ? [] : [value]; this.onChange(same ? null : value); } else { this.state = [value]; this.onChange(value); } break; case SelectMode$1.multiple: var index = this.state.findIndex(function (e) { return isEqual(e, value); }); if (index !== -1) { this.state.splice(index, 1); } else { this.state.push(value); } this.onChange(this.state); break; } this.signals.emit(this.state); }; var SelectableDirective_1; SelectableDirective.ctorParameters = function () { return [ { type: EventEmitter, decorators: [{ type: Inject, args: [SELECTABLE_SIGNALS,] }] }, { type: NGXLogger } ]; }; __decorate([ HostBinding('attr.data-disabled'), __metadata("design:type", Object) ], SelectableDirective.prototype, "disabled", void 0); __decorate([ HostBinding('attr.data-selected'), __metadata("design:type", Object), __metadata("design:paramtypes", []) ], SelectableDirective.prototype, "selected", null); __decorate([ HostBinding('attr.data-mode'), __metadata("design:type", String) ], SelectableDirective.prototype, "_mode", void 0); __decorate([ PropertyApi({ description: 'Selectable configuration', type: '{mode?: SelectMode, value: any, enabled?: boolean, features?: Feature[]}', default: '{}' }), Input('jntSelectable'), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], SelectableDirective.prototype, "configure", null); __decorate([ HostListener('blur'), __metadata("design:type", Object) ], SelectableDirective.prototype, "onBlur", void 0); __decorate([ HostListener('click'), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0) ], SelectableDirective.prototype, "select", null); SelectableDirective = SelectableDirective_1 = __decorate([ Directive({ selector: '[jntSelectable]', providers: [ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(function () { return SelectableDirective_1; }), multi: true }, { provide: SELECTABLE_SIGNALS, useFactory: eventEmitterFactory } ] }), __param(0, Inject(SELECTABLE_SIGNALS)), __metadata("design:paramtypes", [EventEmitter, NGXLogger]) ], SelectableDirective); return SelectableDirective; }()); var SelectableModule = /** @class */ (function () { function SelectableModule() { } SelectableModule = __decorate([ NgModule({ declarations: [ SelectableDirective ], imports: [ CommonModule ], exports: [ SelectableDirective ] }) ], SelectableModule); return SelectableModule; }()); var ShortcutsDirective = /** @class */ (function () { function ShortcutsDirective() { this.shortcuts = []; } ShortcutsDirective.prototype.select = function (event) { var found = this.shortcuts.find(function (shortcut) { return shortcut.key === event.key; }); if (!!found && (!found.modifier || (found.modifier === Modifier.altKey && event.altKey) || (found.modifier === Modifier.ctrlKey && event.ctrlKey) || (found.modifier === Modifier.shiftKey && event.shiftKey) || (found.modifier === Modifier.metaKey && event.metaKey))) { found.action(); event.preventDefault(); } }; __decorate([ PropertyApi({ description: 'Shortcuts array', type: '[{key: ui.kayboard.key, modifier: ui.keyboard.modifier, action: Function}]', default: '[]' }), Input('jntShortcuts'), __metadata("design:type", Array) ], ShortcutsDirective.prototype, "shortcuts", void 0); __decorate([ HostListener('keydown', ['$event']), __metadata("design:type", Function), __metadata("design:paramtypes", [KeyboardEvent]), __metadata("design:returntype", void 0) ], ShortcutsDirective.prototype, "select", null); ShortcutsDirective = __decorate([ Directive({ selector: '[jntShortcuts]' }) ], ShortcutsDirective); return ShortcutsDirective; }()); var ShortcutsModule = /** @class */ (function () { function ShortcutsModule() { } ShortcutsModule = __decorate([ NgModule({ declarations: [ ShortcutsDirective ], imports: [ CommonModule ], exports: [ ShortcutsDirective ] }) ], ShortcutsModule); return ShortcutsModule; }()); function isEqual$1(a, b) { return JSON.stringify(a) === JSON.stringify(b); } function untilJSONChanged() { return function (source) { var prev = null; return new Observable(function (observer) { return source.subscribe({ next: function (x) { if (JSON.stringify(x) !== JSON.stringify(prev)) { prev = x; observer.next(x); } }, error: function (err) { observer.error(err); }, complete: function () { observer.complete(); } }); }); }; } // thanks for https://github.com/voodoocreation/ts-deepmerge // istanbul ignore next var isObject = function (obj) { if (typeof obj === 'object' && obj !== null) { if (typeof Object.getPrototypeOf === 'function') { var prototype = Object.getPrototypeOf(obj); return prototype === Object.prototype || prototype === null; } return Object.prototype.toString.call(obj) === '[object Object]'; } return false; }; var ɵ0 = isObject; var deepMerge = function () { var objects = []; for (var _i = 0; _i < arguments.length; _i++) { objects[_i] = arguments[_i]; } return objects.reduce(function (result, current) { Object.keys(current).forEach(function (key) { if (Array.isArray(result[key]) && Array.isArray(current[key])) { result[key] = Array.from(new Set(result[key].concat(current[key]))); } else if (isObject(result[key]) && isObject(current[key])) { result[key] = deepMerge(result[key], current[key]); } else { result[key] = current[key]; } }); return result; }, {}); }; var ɵ1 = deepMerge; var InMemoryCacheService = /** @class */ (function () { function InMemoryCacheService() { this.store = {}; } InMemoryCacheService.prototype.contains = function (key) { return this.store[key] !== undefined; }; InMemoryCacheService.prototype.get = function (key) { return this.store[key]; }; InMemoryCacheService.prototype.set = function (key, data) { this.store[key] = data; }; InMemoryCacheService.ɵprov = ɵɵdefineInjectable({ factory: function InMemoryCacheService_Factory() { return new InMemoryCacheService(); }, token: InMemoryCacheService, providedIn: "root" }); InMemoryCacheService = __decorate([ Injectable({ providedIn: 'root' }) ], InMemoryCacheService); return InMemoryCacheService; }()); var FilterEmptyPipe = /** @class */ (function () { function FilterEmptyPipe() { } FilterEmptyPipe.prototype.transform = function (arr) { return arr.filter(function (item) { return item !== null; }); }; FilterEmptyPipe = __decorate([ Pipe({ name: 'filterEmpty' }) ], FilterEmptyPipe); return FilterEmptyPipe; }()); var MockArrayPipe = /** @class */ (function () { function MockArrayPipe() { } MockArrayPipe.prototype.transform = function (count, start) { if (start === void 0) { start = 0; } return count > 0 ? __spread(Array(count).keys()).map(function (x) { return start ? x + start : x; }) : []; }; MockArrayPipe = __decorate([ Pipe({ name: 'mockArray' }) ], MockArrayPipe); return MockArrayPipe; }()); var JoinPipe = /** @class */ (function () { function JoinPipe() { } JoinPipe.prototype.transform = function (arr, separator) { if (separator === void 0) { separator = ', '; } return arr.join(separator); }; JoinPipe = __decorate([ Pipe({ name: 'join' }) ], JoinPipe); return JoinPipe; }()); var PopPipe = /** @class */ (function () { function PopPipe() { } PopPipe.prototype.transform = function (source) { return source.slice(0, -1); }; PopPipe = __decorate([ Pipe({ name: 'pop' }) ], PopPipe); return PopPipe; }()); var IncludesPipe = /** @class */ (function () { function IncludesPipe() { } IncludesPipe.prototype.transform = function (arr, val) { var target = arr || []; if (Array.isArray(val)) { for (var i = 0; i < val.length; i++) { if (target.includes(val[i])) { return true; } } return false; } return target.includes(val); }; IncludesPipe = __decorate([ Pipe({ name: 'includes', pure: false }) ], IncludesPipe); return IncludesPipe; }()); var ArrayPipesModule = /** @class */ (function () { function ArrayPipesModule() { } Arr