Socket
Socket
Sign inDemoInstall

@ncstate/sat-popover

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ncstate/sat-popover - npm Package Compare versions

Comparing version 1.0.0-beta.3 to 1.0.0-beta.4

14

@ncstate/sat-popover.es5.js
import { Component, Directive, ElementRef, EventEmitter, Inject, Injectable, InjectionToken, Input, NgModule, NgZone, Optional, Output, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CommonModule, DOCUMENT } from '@angular/common';
import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
import { A11yModule, FocusTrapFactory } from '@angular/cdk/a11y';
import { DOCUMENT } from '@angular/platform-browser';
import { DOCUMENT as DOCUMENT$1 } from '@angular/platform-browser';
import { coerceBooleanProperty } from '@angular/cdk/coercion';

@@ -43,3 +43,3 @@ import { animate, style, transition, trigger } from '@angular/animations';

*/
var Directionality = (function () {
var Directionality = /** @class */ (function () {
function Directionality(_document) {

@@ -85,3 +85,3 @@ /**

*/
var Dir = (function () {
var Dir = /** @class */ (function () {
function Dir() {

@@ -112,3 +112,3 @@ this._dir = 'ltr';

if (old !== this._dir && this._isInitialized) {
this.change.emit();
this.change.emit(this._dir);
}

@@ -163,3 +163,3 @@ },

var BidiModule = (function () {
var BidiModule = /** @class */ (function () {
function BidiModule() {

@@ -770,3 +770,3 @@ }

{ type: FocusTrapFactory, },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] },] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT$1,] },] },
]; };

@@ -773,0 +773,0 @@ SatPopover.propDecorators = {

import { Component, Directive, ElementRef, EventEmitter, Inject, Injectable, InjectionToken, Input, NgModule, NgZone, Optional, Output, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CommonModule, DOCUMENT } from '@angular/common';
import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
import { A11yModule, FocusTrapFactory } from '@angular/cdk/a11y';
import { DOCUMENT } from '@angular/platform-browser';
import { DOCUMENT as DOCUMENT$1 } from '@angular/platform-browser';
import { coerceBooleanProperty } from '@angular/cdk/coercion';

@@ -43,3 +43,3 @@ import { animate, style, transition, trigger } from '@angular/animations';

*/
var Directionality = (function () {
var Directionality = /** @class */ (function () {
function Directionality(_document) {

@@ -85,3 +85,3 @@ /**

*/
var Dir = (function () {
var Dir = /** @class */ (function () {
function Dir() {

@@ -112,3 +112,3 @@ this._dir = 'ltr';

if (old !== this._dir && this._isInitialized) {
this.change.emit();
this.change.emit(this._dir);
}

@@ -163,3 +163,3 @@ },

var BidiModule = (function () {
var BidiModule = /** @class */ (function () {
function BidiModule() {

@@ -653,3 +653,3 @@ }

{ type: FocusTrapFactory, },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] },] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT$1,] },] },
];

@@ -656,0 +656,0 @@ SatPopover.propDecorators = {

@@ -34,3 +34,3 @@ (function (global, factory) {

*/
var Directionality = (function () {
var Directionality = /** @class */ (function () {
function Directionality(_document) {

@@ -76,3 +76,3 @@ /**

*/
var Dir = (function () {
var Dir = /** @class */ (function () {
function Dir() {

@@ -103,3 +103,3 @@ this._dir = 'ltr';

if (old !== this._dir && this._isInitialized) {
this.change.emit();
this.change.emit(this._dir);
}

@@ -154,3 +154,3 @@ },

var BidiModule = (function () {
var BidiModule = /** @class */ (function () {
function BidiModule() {

@@ -163,3 +163,3 @@ }

providers: [
{ provide: DIR_DOCUMENT, useExisting: platformBrowser.DOCUMENT },
{ provide: DIR_DOCUMENT, useExisting: common.DOCUMENT },
Directionality,

@@ -166,0 +166,0 @@ ]

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/cdk/overlay"),require("@angular/cdk/a11y"),require("@angular/platform-browser"),require("@angular/cdk/coercion"),require("@angular/animations"),require("rxjs/Subject"),require("@angular/cdk/portal"),require("@angular/cdk/keycodes"),require("rxjs/operators/take"),require("rxjs/operators/takeUntil"),require("rxjs/operators/filter"),require("rxjs/operators/tap")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","@angular/cdk/overlay","@angular/cdk/a11y","@angular/platform-browser","@angular/cdk/coercion","@angular/animations","rxjs/Subject","@angular/cdk/portal","@angular/cdk/keycodes","rxjs/operators/take","rxjs/operators/takeUntil","rxjs/operators/filter","rxjs/operators/tap"],e):e(t.popover={},t.ng.core,t.ng.common,t.ng.cdk.overlay,t.ng.cdk.a11y,t.ng.platformBrowser,t.ng.cdk.coercion,t.ng.animations,t.Rx,t.ng.cdk.portal,t.ng.cdk.keycodes,t.Rx.operators,t.Rx.operators,t.Rx.operators,t.Rx.operators)}(this,function(t,e,o,r,n,i,a,s,p,c,l,u,h,f,v){"use strict";function d(){return Error("SatPopoverAnchor must be provided an SatPopover component instance.")}function y(){return Error("SatPopover is not anchored to any SatPopoverAnchor.")}function g(t){return Error(m("horizontalAlign/xAlign",t,D))}function _(t){return Error(m("verticalAlign/yAlign",t,F))}function b(t){return Error(m("scrollStrategy",t,N))}function m(t,e,o){return"Invalid "+t+": '"+e+"'. Valid options are "+o.map(function(t){return"'"+t+"'"}).join(", ")+"."}function P(t){switch(t){case"before":return{originX:"start",overlayX:"end"};case"start":return{originX:"start",overlayX:"start"};case"end":return{originX:"end",overlayX:"end"};case"after":return{originX:"end",overlayX:"start"};default:return{originX:"center",overlayX:"center"}}}function O(t){switch(t){case"above":return{originY:"top",overlayY:"bottom"};case"start":return{originY:"top",overlayY:"top"};case"end":return{originY:"bottom",overlayY:"bottom"};case"below":return{originY:"bottom",overlayY:"top"};default:return{originY:"center",overlayY:"center"}}}function k(t){return"start"===t?"after":"end"===t?"before":"center"}function E(t){return"top"===t?"below":"bottom"===t?"above":"center"}function w(t,e){for(var o=e.indexOf(t),r=[t],n=e.slice(0,o),i=e.slice(o+1,e.length).reverse();n.length&&i.length;)r.push(i.pop()),r.push(n.pop());for(;i.length;)r.push(i.pop());for(;n.length;)r.push(n.pop());return r}var T=new e.InjectionToken("cdk-dir-doc"),A=function(){function t(t){if(this.value="ltr",this.change=new e.EventEmitter,t){var o=t.body?t.body.dir:null,r=t.documentElement?t.documentElement.dir:null;this.value=o||r||"ltr"}}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[T]}]}]},t}(),C=function(){function t(){this._dir="ltr",this._isInitialized=!1,this.change=new e.EventEmitter}return Object.defineProperty(t.prototype,"dir",{get:function(){return this._dir},set:function(t){var e=this._dir;this._dir=t,e!==this._dir&&this._isInitialized&&this.change.emit()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.dir},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._isInitialized=!0},t.decorators=[{type:e.Directive,args:[{selector:"[dir]",providers:[{provide:A,useExisting:t}],host:{"[dir]":"dir"},exportAs:"dir"}]}],t.ctorParameters=function(){return[]},t.propDecorators={change:[{type:e.Output,args:["dirChange"]}],dir:[{type:e.Input,args:["dir"]}]},t}(),S=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{exports:[C],declarations:[C],providers:[{provide:T,useExisting:i.DOCUMENT},A]}]}],t.ctorParameters=function(){return[]},t}(),x=s.trigger("transformPopover",[s.transition(":enter",[s.style({opacity:0,transform:"scale(0.3)"}),s.animate("{{openTransition}}",s.style({opacity:1,transform:"scale(1)"}))]),s.transition(":leave",[s.animate("{{closeTransition}}",s.style({opacity:0,transform:"scale(0.5)"}))])]),I={OPEN:0,CLOSE:1,TOGGLE:2,REPOSITION:3,UPDATE_CONFIG:4};I[I.OPEN]="OPEN",I[I.CLOSE]="CLOSE",I[I.TOGGLE]="TOGGLE",I[I.REPOSITION]="REPOSITION",I[I.UPDATE_CONFIG]="UPDATE_CONFIG";var R=function(){return function(t,e){this.action=t,this.value=e}}(),j=function(){function t(){this.store=new p.Subject}return t.prototype.dispatch=function(t){this.store.next(t)},t.prototype.events=function(){return this.store.asObservable()},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),N=["noop","block","reposition","close"],D=["before","start","center","end","after"],F=["above","start","center","end","below"],z="200ms cubic-bezier(0.25, 0.8, 0.25, 1)",X=function(){function t(t,o){this._focusTrapFactory=t,this._document=o,this._horizontalAlign="center",this._verticalAlign="center",this._scrollStrategy="reposition",this._hasBackdrop=!1,this._openTransition=z,this._closeTransition=z,this.backdropClass="",this.opened=new e.EventEmitter,this.closed=new e.EventEmitter,this.afterOpen=new e.EventEmitter,this.afterClose=new e.EventEmitter,this.backdropClicked=new e.EventEmitter,this.overlayKeydown=new e.EventEmitter,this._classList={},this._open=!1}return Object.defineProperty(t.prototype,"horizontalAlign",{get:function(){return this._horizontalAlign},set:function(t){this._validateHorizontalAlign(t),this._horizontalAlign!==t&&(this._horizontalAlign=t,this._dispatchConfigNotification(new R(I.REPOSITION)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"xAlign",{get:function(){return this.horizontalAlign},set:function(t){this.horizontalAlign=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"verticalAlign",{get:function(){return this._verticalAlign},set:function(t){this._validateVerticalAlign(t),this._verticalAlign!==t&&(this._verticalAlign=t,this._dispatchConfigNotification(new R(I.REPOSITION)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"yAlign",{get:function(){return this.verticalAlign},set:function(t){this.verticalAlign=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollStrategy",{get:function(){return this._scrollStrategy},set:function(t){this._validateScrollStrategy(t),this._scrollStrategy!==t&&(this._scrollStrategy=t,this._dispatchConfigNotification(new R(I.UPDATE_CONFIG)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasBackdrop",{get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=a.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"openTransition",{get:function(){return this._openTransition},set:function(t){t&&(this._openTransition=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"closeTransition",{get:function(){return this._closeTransition},set:function(t){t&&(this._closeTransition=t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._setAlignmentClasses()},t.prototype.open=function(){var t=new R(I.OPEN);this._dispatchActionNotification(t)},t.prototype.close=function(t){var e=new R(I.CLOSE,t);this._dispatchActionNotification(e)},t.prototype.toggle=function(){var t=new R(I.TOGGLE);this._dispatchActionNotification(t)},t.prototype.isOpen=function(){return this._open},t.prototype._getAnimation=function(){return{value:"visible",params:{openTransition:this.openTransition,closeTransition:this.closeTransition}}},t.prototype._onAnimationDone=function(t){"visible"===t.toState?(this._trapFocus(),this.afterOpen.emit()):"void"===t.toState&&(this._restoreFocus(),this.afterClose.emit())},t.prototype._setAlignmentClasses=function(t,e){void 0===t&&(t=this.horizontalAlign),void 0===e&&(e=this.verticalAlign),this._classList["sat-popover-before"]="before"===t||"end"===t,this._classList["sat-popover-after"]="after"===t||"start"===t,this._classList["sat-popover-above"]="above"===e||"end"===e,this._classList["sat-popover-below"]="below"===e||"start"===e,this._classList["sat-popover-center"]="center"===t||"center"===e},t.prototype._trapFocus=function(){this._savePreviouslyFocusedElement(),this._focusTrapElement&&(!this._focusTrap&&this._focusTrapElement&&(this._focusTrap=this._focusTrapFactory.create(this._focusTrapElement.nativeElement)),this._focusTrap.focusInitialElementWhenReady())},t.prototype._restoreFocus=function(){var t=this._previouslyFocusedElement;t&&"focus"in t&&this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null,this._focusTrap&&(this._focusTrap.destroy(),this._focusTrap=void 0)},t.prototype._savePreviouslyFocusedElement=function(){this._document&&(this._previouslyFocusedElement=this._document.activeElement)},t.prototype._dispatchConfigNotification=function(t){this._notifications&&this._notifications.dispatch(t)},t.prototype._dispatchActionNotification=function(t){if(!this._notifications)throw y();this._notifications.dispatch(t)},t.prototype._validateHorizontalAlign=function(t){if(-1===D.indexOf(t))throw g(t)},t.prototype._validateVerticalAlign=function(t){if(-1===F.indexOf(t))throw _(t)},t.prototype._validateScrollStrategy=function(t){if(-1===N.indexOf(t))throw b(t)},t.decorators=[{type:e.Component,args:[{selector:"sat-popover",encapsulation:e.ViewEncapsulation.None,animations:[x],styles:["/** * Applies styles for users in high contrast mode. Note that this only applies * to Microsoft browsers. Chrome can be included by checking for the `html[hc]` * attribute, however Chrome handles high contrast differently. */ /* Theme for the ripple elements.*/ /** The mixins below are shared between mat-menu and mat-select */ /** * This mixin adds the correct panel transform styles based * on the direction that the menu panel opens. */ /* stylelint-disable material/no-prefixes */ /* stylelint-enable */ /** * This mixin contains shared option styles between the select and * autocomplete components. */ .cdk-overlay-container, .cdk-global-overlay-wrapper { pointer-events: none; top: 0; left: 0; height: 100%; width: 100%; } .cdk-overlay-container { position: fixed; z-index: 1000; } .cdk-global-overlay-wrapper { display: flex; position: absolute; z-index: 1000; } .cdk-overlay-pane { position: absolute; pointer-events: auto; box-sizing: border-box; z-index: 1000; } .cdk-overlay-backdrop { position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 1000; pointer-events: auto; -webkit-tap-highlight-color: transparent; transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1); opacity: 0; } .cdk-overlay-backdrop.cdk-overlay-backdrop-showing { opacity: 0.48; } .cdk-overlay-dark-backdrop { background: rgba(0, 0, 0, 0.6); } .cdk-overlay-transparent-backdrop { background: none; } .cdk-global-scrollblock { position: fixed; width: 100%; overflow-y: scroll; } .sat-popover-container.sat-popover-before.sat-popover-above { transform-origin: right bottom; } [dir='rtl'] .sat-popover-container.sat-popover-before.sat-popover-above { transform-origin: left bottom; } .sat-popover-container.sat-popover-before.sat-popover-center { transform-origin: right center; } [dir='rtl'] .sat-popover-container.sat-popover-before.sat-popover-center { transform-origin: left center; } .sat-popover-container.sat-popover-before.sat-popover-below { transform-origin: right top; } [dir='rtl'] .sat-popover-container.sat-popover-before.sat-popover-below { transform-origin: left top; } .sat-popover-container.sat-popover-center.sat-popover-above { transform-origin: center bottom; } .sat-popover-container.sat-popover-center.sat-popover-below { transform-origin: center top; } .sat-popover-container.sat-popover-after.sat-popover-above { transform-origin: left bottom; } [dir='rtl'] .sat-popover-container.sat-popover-after.sat-popover-above { transform-origin: right bottom; } .sat-popover-container.sat-popover-after.sat-popover-center { transform-origin: left center; } [dir='rtl'] .sat-popover-container.sat-popover-after.sat-popover-center { transform-origin: right center; } .sat-popover-container.sat-popover-after.sat-popover-below { transform-origin: left top; } [dir='rtl'] .sat-popover-container.sat-popover-after.sat-popover-below { transform-origin: right top; } "],template:'<ng-template> <div class="sat-popover-container" #focusTrapElement [ngClass]="_classList" [@transformPopover]="_getAnimation()" (@transformPopover.done)="_onAnimationDone($event)"> <ng-content></ng-content> </div> </ng-template> '}]}],t.ctorParameters=function(){return[{type:n.FocusTrapFactory},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[i.DOCUMENT]}]}]},t.propDecorators={horizontalAlign:[{type:e.Input}],xAlign:[{type:e.Input}],verticalAlign:[{type:e.Input}],yAlign:[{type:e.Input}],scrollStrategy:[{type:e.Input}],hasBackdrop:[{type:e.Input}],openTransition:[{type:e.Input}],closeTransition:[{type:e.Input}],backdropClass:[{type:e.Input}],opened:[{type:e.Output}],closed:[{type:e.Output}],afterOpen:[{type:e.Output}],afterClose:[{type:e.Output}],backdropClicked:[{type:e.Output}],overlayKeydown:[{type:e.Output}],_templateRef:[{type:e.ViewChild,args:[e.TemplateRef]}],_focusTrapElement:[{type:e.ViewChild,args:["focusTrapElement"]}]},t}(),Y=function(){function t(t,o,r,n,i,a){this._overlay=t,this._elementRef=o,this._viewContainerRef=r,this._notifications=n,this._ngZone=i,this._dir=a,this.popoverOpened=new e.EventEmitter,this.popoverClosed=new e.EventEmitter,this._popoverOpen=!1,this._onDestroy=new p.Subject}return Object.defineProperty(t.prototype,"attachedPopover",{get:function(){return this._attachedPopover},set:function(t){this._validateAttachedPopover(t),this._attachedPopover=t,this._attachedPopover._notifications=this._notifications},enumerable:!0,configurable:!0}),t.prototype.isPopoverOpen=function(){return this._popoverOpen},t.prototype.ngOnInit=function(){this._subscribeToNotifications(),this._validateAttachedPopover(this.attachedPopover)},t.prototype.ngOnDestroy=function(){this._onDestroy.next(),this._onDestroy.complete(),this._destroyPopover()},t.prototype.togglePopover=function(){return this._popoverOpen?this.closePopover():this.openPopover()},t.prototype.openPopover=function(){this._popoverOpen||(this._createOverlay(),this._overlayRef.attach(this._portal),this._subscribeToBackdrop(),this._subscribeToEscape(),this._subscribeToDetachments(),this._saveOpenedState())},t.prototype.closePopover=function(t){this._overlayRef&&(this._saveClosedState(t),this._overlayRef.detach())},t.prototype._getDirection=function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},t.prototype._destroyPopover=function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)},t.prototype._destroyPopoverOnceClosed=function(){var t=this;this.isPopoverOpen()&&this._overlayRef?this._overlayRef.detachments().pipe(u.take(1),h.takeUntil(this._onDestroy)).subscribe(function(){return t._destroyPopover()}):this._destroyPopover()},t.prototype._validateAttachedPopover=function(t){if(!(t&&t instanceof X))throw d()},t.prototype._subscribeToNotifications=function(){var t=this;this._notifications.events().pipe(h.takeUntil(this._onDestroy)).subscribe(function(e){switch(e.action){case I.OPEN:t.openPopover();break;case I.CLOSE:t.closePopover(e.value);break;case I.TOGGLE:t.togglePopover();break;case I.REPOSITION:case I.UPDATE_CONFIG:t._destroyPopoverOnceClosed()}})},t.prototype._subscribeToBackdrop=function(){var t=this;this._overlayRef.backdropClick().pipe(h.takeUntil(this.popoverClosed),h.takeUntil(this._onDestroy)).subscribe(function(){t.attachedPopover.backdropClicked.emit(),t.closePopover()})},t.prototype._subscribeToEscape=function(){var t=this;this._overlayRef.keydownEvents().pipe(v.tap(function(e){return t.attachedPopover.overlayKeydown.emit(e)}),f.filter(function(t){return t.keyCode===l.ESCAPE}),h.takeUntil(this.popoverClosed),h.takeUntil(this._onDestroy)).subscribe(function(){return t.closePopover()})},t.prototype._subscribeToDetachments=function(){var t=this;this._overlayRef.detachments().pipe(h.takeUntil(this._onDestroy)).subscribe(function(){return t._saveClosedState()})},t.prototype._saveOpenedState=function(){this._popoverOpen||(this.attachedPopover._open=this._popoverOpen=!0,this.popoverOpened.emit(),this.attachedPopover.opened.emit())},t.prototype._saveClosedState=function(t){this._popoverOpen&&(this.attachedPopover._open=this._popoverOpen=!1,this.popoverClosed.emit(t),this.attachedPopover.closed.emit(t))},t.prototype._createOverlay=function(){if(!this._overlayRef){this._portal=new c.TemplatePortal(this.attachedPopover._templateRef,this._viewContainerRef);var t=this._getOverlayConfig();this._subscribeToPositionChanges(t.positionStrategy),this._overlayRef=this._overlay.create(t)}},t.prototype._getOverlayConfig=function(){return new r.OverlayConfig({positionStrategy:this._getPositionStrategy(),hasBackdrop:this.attachedPopover.hasBackdrop,backdropClass:this.attachedPopover.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._getScrollStrategyInstance(this.attachedPopover.scrollStrategy),direction:this._getDirection()})},t.prototype._subscribeToPositionChanges=function(t){var e=this;t.onPositionChange.pipe(h.takeUntil(this._onDestroy)).subscribe(function(t){e._ngZone.run(function(){e.attachedPopover._setAlignmentClasses(k(t.connectionPair.overlayX),E(t.connectionPair.overlayY))})})},t.prototype._getScrollStrategyInstance=function(t){switch(t){case"block":return this._overlay.scrollStrategies.block();case"reposition":return this._overlay.scrollStrategies.reposition();case"close":return this._overlay.scrollStrategies.close();case"noop":default:return this._overlay.scrollStrategies.noop()}},t.prototype._getPositionStrategy=function(){var t=this.attachedPopover.horizontalAlign,e=this.attachedPopover.verticalAlign,o=P(t),r=o.originX,n=o.overlayX,i=O(e),a=i.originY,s=i.overlayY,p=this._overlay.position().connectedTo(this._elementRef,{originX:r,originY:a},{overlayX:n,overlayY:s}).withDirection(this._getDirection());return this._addFallbacks(p,t,e),p},t.prototype._addFallbacks=function(t,e,o){var r=this,n="before"!==e&&"after"!==e,i="above"!==o&&"below"!==o,a=n?["before","start","center","end","after"]:["before","after"],s=i?["above","start","center","end","below"]:["above","below"],p=[];w(e,a).forEach(function(t){w(o,s).forEach(function(e){p.push({h:t,v:e})})}),p.slice(1,p.length).forEach(function(e){var o=e.h,n=e.v;return r._applyFallback(t,o,n)})},t.prototype._applyFallback=function(t,e,o){var r=P(e),n=r.originX,i=r.overlayX,a=O(o),s=a.originY,p=a.overlayY;t.withFallbackPosition({originX:n,originY:s},{overlayX:i,overlayY:p})},t.decorators=[{type:e.Directive,args:[{selector:"[satPopoverAnchorFor]",exportAs:"satPopoverAnchor",providers:[j]}]}],t.ctorParameters=function(){return[{type:r.Overlay},{type:e.ElementRef},{type:e.ViewContainerRef},{type:j},{type:e.NgZone},{type:A,decorators:[{type:e.Optional}]}]},t.propDecorators={attachedPopover:[{type:e.Input,args:["satPopoverAnchorFor"]}],popoverOpened:[{type:e.Output}],popoverClosed:[{type:e.Output}]},t}(),L=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.CommonModule,r.OverlayModule,n.A11yModule,S],declarations:[X,Y],exports:[X,Y]}]}],t.ctorParameters=function(){return[]},t}();t.SatPopoverModule=L,t.SatPopoverAnchor=Y,t.SatPopover=X,t.ɵb=j,t.ɵa=x,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/cdk/overlay"),require("@angular/cdk/a11y"),require("@angular/platform-browser"),require("@angular/cdk/coercion"),require("@angular/animations"),require("rxjs/Subject"),require("@angular/cdk/portal"),require("@angular/cdk/keycodes"),require("rxjs/operators/take"),require("rxjs/operators/takeUntil"),require("rxjs/operators/filter"),require("rxjs/operators/tap")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","@angular/cdk/overlay","@angular/cdk/a11y","@angular/platform-browser","@angular/cdk/coercion","@angular/animations","rxjs/Subject","@angular/cdk/portal","@angular/cdk/keycodes","rxjs/operators/take","rxjs/operators/takeUntil","rxjs/operators/filter","rxjs/operators/tap"],e):e(t.popover={},t.ng.core,t.ng.common,t.ng.cdk.overlay,t.ng.cdk.a11y,t.ng.platformBrowser,t.ng.cdk.coercion,t.ng.animations,t.Rx,t.ng.cdk.portal,t.ng.cdk.keycodes,t.Rx.operators,t.Rx.operators,t.Rx.operators,t.Rx.operators)}(this,function(t,e,o,r,n,i,a,s,p,c,l,u,h,f,v){"use strict";function d(){return Error("SatPopoverAnchor must be provided an SatPopover component instance.")}function y(){return Error("SatPopover is not anchored to any SatPopoverAnchor.")}function g(t){return Error(m("horizontalAlign/xAlign",t,D))}function _(t){return Error(m("verticalAlign/yAlign",t,F))}function b(t){return Error(m("scrollStrategy",t,N))}function m(t,e,o){return"Invalid "+t+": '"+e+"'. Valid options are "+o.map(function(t){return"'"+t+"'"}).join(", ")+"."}function P(t){switch(t){case"before":return{originX:"start",overlayX:"end"};case"start":return{originX:"start",overlayX:"start"};case"end":return{originX:"end",overlayX:"end"};case"after":return{originX:"end",overlayX:"start"};default:return{originX:"center",overlayX:"center"}}}function O(t){switch(t){case"above":return{originY:"top",overlayY:"bottom"};case"start":return{originY:"top",overlayY:"top"};case"end":return{originY:"bottom",overlayY:"bottom"};case"below":return{originY:"bottom",overlayY:"top"};default:return{originY:"center",overlayY:"center"}}}function k(t){return"start"===t?"after":"end"===t?"before":"center"}function E(t){return"top"===t?"below":"bottom"===t?"above":"center"}function w(t,e){for(var o=e.indexOf(t),r=[t],n=e.slice(0,o),i=e.slice(o+1,e.length).reverse();n.length&&i.length;)r.push(i.pop()),r.push(n.pop());for(;i.length;)r.push(i.pop());for(;n.length;)r.push(n.pop());return r}var T=new e.InjectionToken("cdk-dir-doc"),A=function(){function t(t){if(this.value="ltr",this.change=new e.EventEmitter,t){var o=t.body?t.body.dir:null,r=t.documentElement?t.documentElement.dir:null;this.value=o||r||"ltr"}}return t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[T]}]}]},t}(),C=function(){function t(){this._dir="ltr",this._isInitialized=!1,this.change=new e.EventEmitter}return Object.defineProperty(t.prototype,"dir",{get:function(){return this._dir},set:function(t){var e=this._dir;this._dir=t,e!==this._dir&&this._isInitialized&&this.change.emit(this._dir)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.dir},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){this._isInitialized=!0},t.decorators=[{type:e.Directive,args:[{selector:"[dir]",providers:[{provide:A,useExisting:t}],host:{"[dir]":"dir"},exportAs:"dir"}]}],t.ctorParameters=function(){return[]},t.propDecorators={change:[{type:e.Output,args:["dirChange"]}],dir:[{type:e.Input,args:["dir"]}]},t}(),S=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{exports:[C],declarations:[C],providers:[{provide:T,useExisting:o.DOCUMENT},A]}]}],t.ctorParameters=function(){return[]},t}(),x=s.trigger("transformPopover",[s.transition(":enter",[s.style({opacity:0,transform:"scale(0.3)"}),s.animate("{{openTransition}}",s.style({opacity:1,transform:"scale(1)"}))]),s.transition(":leave",[s.animate("{{closeTransition}}",s.style({opacity:0,transform:"scale(0.5)"}))])]),I={OPEN:0,CLOSE:1,TOGGLE:2,REPOSITION:3,UPDATE_CONFIG:4};I[I.OPEN]="OPEN",I[I.CLOSE]="CLOSE",I[I.TOGGLE]="TOGGLE",I[I.REPOSITION]="REPOSITION",I[I.UPDATE_CONFIG]="UPDATE_CONFIG";var R=function(){return function(t,e){this.action=t,this.value=e}}(),j=function(){function t(){this.store=new p.Subject}return t.prototype.dispatch=function(t){this.store.next(t)},t.prototype.events=function(){return this.store.asObservable()},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[]},t}(),N=["noop","block","reposition","close"],D=["before","start","center","end","after"],F=["above","start","center","end","below"],z="200ms cubic-bezier(0.25, 0.8, 0.25, 1)",X=function(){function t(t,o){this._focusTrapFactory=t,this._document=o,this._horizontalAlign="center",this._verticalAlign="center",this._scrollStrategy="reposition",this._hasBackdrop=!1,this._openTransition=z,this._closeTransition=z,this.backdropClass="",this.opened=new e.EventEmitter,this.closed=new e.EventEmitter,this.afterOpen=new e.EventEmitter,this.afterClose=new e.EventEmitter,this.backdropClicked=new e.EventEmitter,this.overlayKeydown=new e.EventEmitter,this._classList={},this._open=!1}return Object.defineProperty(t.prototype,"horizontalAlign",{get:function(){return this._horizontalAlign},set:function(t){this._validateHorizontalAlign(t),this._horizontalAlign!==t&&(this._horizontalAlign=t,this._dispatchConfigNotification(new R(I.REPOSITION)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"xAlign",{get:function(){return this.horizontalAlign},set:function(t){this.horizontalAlign=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"verticalAlign",{get:function(){return this._verticalAlign},set:function(t){this._validateVerticalAlign(t),this._verticalAlign!==t&&(this._verticalAlign=t,this._dispatchConfigNotification(new R(I.REPOSITION)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"yAlign",{get:function(){return this.verticalAlign},set:function(t){this.verticalAlign=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollStrategy",{get:function(){return this._scrollStrategy},set:function(t){this._validateScrollStrategy(t),this._scrollStrategy!==t&&(this._scrollStrategy=t,this._dispatchConfigNotification(new R(I.UPDATE_CONFIG)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasBackdrop",{get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=a.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"openTransition",{get:function(){return this._openTransition},set:function(t){t&&(this._openTransition=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"closeTransition",{get:function(){return this._closeTransition},set:function(t){t&&(this._closeTransition=t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._setAlignmentClasses()},t.prototype.open=function(){var t=new R(I.OPEN);this._dispatchActionNotification(t)},t.prototype.close=function(t){var e=new R(I.CLOSE,t);this._dispatchActionNotification(e)},t.prototype.toggle=function(){var t=new R(I.TOGGLE);this._dispatchActionNotification(t)},t.prototype.isOpen=function(){return this._open},t.prototype._getAnimation=function(){return{value:"visible",params:{openTransition:this.openTransition,closeTransition:this.closeTransition}}},t.prototype._onAnimationDone=function(t){"visible"===t.toState?(this._trapFocus(),this.afterOpen.emit()):"void"===t.toState&&(this._restoreFocus(),this.afterClose.emit())},t.prototype._setAlignmentClasses=function(t,e){void 0===t&&(t=this.horizontalAlign),void 0===e&&(e=this.verticalAlign),this._classList["sat-popover-before"]="before"===t||"end"===t,this._classList["sat-popover-after"]="after"===t||"start"===t,this._classList["sat-popover-above"]="above"===e||"end"===e,this._classList["sat-popover-below"]="below"===e||"start"===e,this._classList["sat-popover-center"]="center"===t||"center"===e},t.prototype._trapFocus=function(){this._savePreviouslyFocusedElement(),this._focusTrapElement&&(!this._focusTrap&&this._focusTrapElement&&(this._focusTrap=this._focusTrapFactory.create(this._focusTrapElement.nativeElement)),this._focusTrap.focusInitialElementWhenReady())},t.prototype._restoreFocus=function(){var t=this._previouslyFocusedElement;t&&"focus"in t&&this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null,this._focusTrap&&(this._focusTrap.destroy(),this._focusTrap=void 0)},t.prototype._savePreviouslyFocusedElement=function(){this._document&&(this._previouslyFocusedElement=this._document.activeElement)},t.prototype._dispatchConfigNotification=function(t){this._notifications&&this._notifications.dispatch(t)},t.prototype._dispatchActionNotification=function(t){if(!this._notifications)throw y();this._notifications.dispatch(t)},t.prototype._validateHorizontalAlign=function(t){if(-1===D.indexOf(t))throw g(t)},t.prototype._validateVerticalAlign=function(t){if(-1===F.indexOf(t))throw _(t)},t.prototype._validateScrollStrategy=function(t){if(-1===N.indexOf(t))throw b(t)},t.decorators=[{type:e.Component,args:[{selector:"sat-popover",encapsulation:e.ViewEncapsulation.None,animations:[x],styles:["/** * Applies styles for users in high contrast mode. Note that this only applies * to Microsoft browsers. Chrome can be included by checking for the `html[hc]` * attribute, however Chrome handles high contrast differently. */ /* Theme for the ripple elements.*/ /** The mixins below are shared between mat-menu and mat-select */ /** * This mixin adds the correct panel transform styles based * on the direction that the menu panel opens. */ /* stylelint-disable material/no-prefixes */ /* stylelint-enable */ /** * This mixin contains shared option styles between the select and * autocomplete components. */ .cdk-overlay-container, .cdk-global-overlay-wrapper { pointer-events: none; top: 0; left: 0; height: 100%; width: 100%; } .cdk-overlay-container { position: fixed; z-index: 1000; } .cdk-global-overlay-wrapper { display: flex; position: absolute; z-index: 1000; } .cdk-overlay-pane { position: absolute; pointer-events: auto; box-sizing: border-box; z-index: 1000; } .cdk-overlay-backdrop { position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 1000; pointer-events: auto; -webkit-tap-highlight-color: transparent; transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1); opacity: 0; } .cdk-overlay-backdrop.cdk-overlay-backdrop-showing { opacity: 0.48; } .cdk-overlay-dark-backdrop { background: rgba(0, 0, 0, 0.6); } .cdk-overlay-transparent-backdrop { background: none; } .cdk-global-scrollblock { position: fixed; width: 100%; overflow-y: scroll; } .sat-popover-container.sat-popover-before.sat-popover-above { transform-origin: right bottom; } [dir='rtl'] .sat-popover-container.sat-popover-before.sat-popover-above { transform-origin: left bottom; } .sat-popover-container.sat-popover-before.sat-popover-center { transform-origin: right center; } [dir='rtl'] .sat-popover-container.sat-popover-before.sat-popover-center { transform-origin: left center; } .sat-popover-container.sat-popover-before.sat-popover-below { transform-origin: right top; } [dir='rtl'] .sat-popover-container.sat-popover-before.sat-popover-below { transform-origin: left top; } .sat-popover-container.sat-popover-center.sat-popover-above { transform-origin: center bottom; } .sat-popover-container.sat-popover-center.sat-popover-below { transform-origin: center top; } .sat-popover-container.sat-popover-after.sat-popover-above { transform-origin: left bottom; } [dir='rtl'] .sat-popover-container.sat-popover-after.sat-popover-above { transform-origin: right bottom; } .sat-popover-container.sat-popover-after.sat-popover-center { transform-origin: left center; } [dir='rtl'] .sat-popover-container.sat-popover-after.sat-popover-center { transform-origin: right center; } .sat-popover-container.sat-popover-after.sat-popover-below { transform-origin: left top; } [dir='rtl'] .sat-popover-container.sat-popover-after.sat-popover-below { transform-origin: right top; } "],template:'<ng-template> <div class="sat-popover-container" #focusTrapElement [ngClass]="_classList" [@transformPopover]="_getAnimation()" (@transformPopover.done)="_onAnimationDone($event)"> <ng-content></ng-content> </div> </ng-template> '}]}],t.ctorParameters=function(){return[{type:n.FocusTrapFactory},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[i.DOCUMENT]}]}]},t.propDecorators={horizontalAlign:[{type:e.Input}],xAlign:[{type:e.Input}],verticalAlign:[{type:e.Input}],yAlign:[{type:e.Input}],scrollStrategy:[{type:e.Input}],hasBackdrop:[{type:e.Input}],openTransition:[{type:e.Input}],closeTransition:[{type:e.Input}],backdropClass:[{type:e.Input}],opened:[{type:e.Output}],closed:[{type:e.Output}],afterOpen:[{type:e.Output}],afterClose:[{type:e.Output}],backdropClicked:[{type:e.Output}],overlayKeydown:[{type:e.Output}],_templateRef:[{type:e.ViewChild,args:[e.TemplateRef]}],_focusTrapElement:[{type:e.ViewChild,args:["focusTrapElement"]}]},t}(),Y=function(){function t(t,o,r,n,i,a){this._overlay=t,this._elementRef=o,this._viewContainerRef=r,this._notifications=n,this._ngZone=i,this._dir=a,this.popoverOpened=new e.EventEmitter,this.popoverClosed=new e.EventEmitter,this._popoverOpen=!1,this._onDestroy=new p.Subject}return Object.defineProperty(t.prototype,"attachedPopover",{get:function(){return this._attachedPopover},set:function(t){this._validateAttachedPopover(t),this._attachedPopover=t,this._attachedPopover._notifications=this._notifications},enumerable:!0,configurable:!0}),t.prototype.isPopoverOpen=function(){return this._popoverOpen},t.prototype.ngOnInit=function(){this._subscribeToNotifications(),this._validateAttachedPopover(this.attachedPopover)},t.prototype.ngOnDestroy=function(){this._onDestroy.next(),this._onDestroy.complete(),this._destroyPopover()},t.prototype.togglePopover=function(){return this._popoverOpen?this.closePopover():this.openPopover()},t.prototype.openPopover=function(){this._popoverOpen||(this._createOverlay(),this._overlayRef.attach(this._portal),this._subscribeToBackdrop(),this._subscribeToEscape(),this._subscribeToDetachments(),this._saveOpenedState())},t.prototype.closePopover=function(t){this._overlayRef&&(this._saveClosedState(t),this._overlayRef.detach())},t.prototype._getDirection=function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},t.prototype._destroyPopover=function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)},t.prototype._destroyPopoverOnceClosed=function(){var t=this;this.isPopoverOpen()&&this._overlayRef?this._overlayRef.detachments().pipe(u.take(1),h.takeUntil(this._onDestroy)).subscribe(function(){return t._destroyPopover()}):this._destroyPopover()},t.prototype._validateAttachedPopover=function(t){if(!(t&&t instanceof X))throw d()},t.prototype._subscribeToNotifications=function(){var t=this;this._notifications.events().pipe(h.takeUntil(this._onDestroy)).subscribe(function(e){switch(e.action){case I.OPEN:t.openPopover();break;case I.CLOSE:t.closePopover(e.value);break;case I.TOGGLE:t.togglePopover();break;case I.REPOSITION:case I.UPDATE_CONFIG:t._destroyPopoverOnceClosed()}})},t.prototype._subscribeToBackdrop=function(){var t=this;this._overlayRef.backdropClick().pipe(h.takeUntil(this.popoverClosed),h.takeUntil(this._onDestroy)).subscribe(function(){t.attachedPopover.backdropClicked.emit(),t.closePopover()})},t.prototype._subscribeToEscape=function(){var t=this;this._overlayRef.keydownEvents().pipe(v.tap(function(e){return t.attachedPopover.overlayKeydown.emit(e)}),f.filter(function(t){return t.keyCode===l.ESCAPE}),h.takeUntil(this.popoverClosed),h.takeUntil(this._onDestroy)).subscribe(function(){return t.closePopover()})},t.prototype._subscribeToDetachments=function(){var t=this;this._overlayRef.detachments().pipe(h.takeUntil(this._onDestroy)).subscribe(function(){return t._saveClosedState()})},t.prototype._saveOpenedState=function(){this._popoverOpen||(this.attachedPopover._open=this._popoverOpen=!0,this.popoverOpened.emit(),this.attachedPopover.opened.emit())},t.prototype._saveClosedState=function(t){this._popoverOpen&&(this.attachedPopover._open=this._popoverOpen=!1,this.popoverClosed.emit(t),this.attachedPopover.closed.emit(t))},t.prototype._createOverlay=function(){if(!this._overlayRef){this._portal=new c.TemplatePortal(this.attachedPopover._templateRef,this._viewContainerRef);var t=this._getOverlayConfig();this._subscribeToPositionChanges(t.positionStrategy),this._overlayRef=this._overlay.create(t)}},t.prototype._getOverlayConfig=function(){return new r.OverlayConfig({positionStrategy:this._getPositionStrategy(),hasBackdrop:this.attachedPopover.hasBackdrop,backdropClass:this.attachedPopover.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._getScrollStrategyInstance(this.attachedPopover.scrollStrategy),direction:this._getDirection()})},t.prototype._subscribeToPositionChanges=function(t){var e=this;t.onPositionChange.pipe(h.takeUntil(this._onDestroy)).subscribe(function(t){e._ngZone.run(function(){e.attachedPopover._setAlignmentClasses(k(t.connectionPair.overlayX),E(t.connectionPair.overlayY))})})},t.prototype._getScrollStrategyInstance=function(t){switch(t){case"block":return this._overlay.scrollStrategies.block();case"reposition":return this._overlay.scrollStrategies.reposition();case"close":return this._overlay.scrollStrategies.close();case"noop":default:return this._overlay.scrollStrategies.noop()}},t.prototype._getPositionStrategy=function(){var t=this.attachedPopover.horizontalAlign,e=this.attachedPopover.verticalAlign,o=P(t),r=o.originX,n=o.overlayX,i=O(e),a=i.originY,s=i.overlayY,p=this._overlay.position().connectedTo(this._elementRef,{originX:r,originY:a},{overlayX:n,overlayY:s}).withDirection(this._getDirection());return this._addFallbacks(p,t,e),p},t.prototype._addFallbacks=function(t,e,o){var r=this,n="before"!==e&&"after"!==e,i="above"!==o&&"below"!==o,a=n?["before","start","center","end","after"]:["before","after"],s=i?["above","start","center","end","below"]:["above","below"],p=[];w(e,a).forEach(function(t){w(o,s).forEach(function(e){p.push({h:t,v:e})})}),p.slice(1,p.length).forEach(function(e){var o=e.h,n=e.v;return r._applyFallback(t,o,n)})},t.prototype._applyFallback=function(t,e,o){var r=P(e),n=r.originX,i=r.overlayX,a=O(o),s=a.originY,p=a.overlayY;t.withFallbackPosition({originX:n,originY:s},{overlayX:i,overlayY:p})},t.decorators=[{type:e.Directive,args:[{selector:"[satPopoverAnchorFor]",exportAs:"satPopoverAnchor",providers:[j]}]}],t.ctorParameters=function(){return[{type:r.Overlay},{type:e.ElementRef},{type:e.ViewContainerRef},{type:j},{type:e.NgZone},{type:A,decorators:[{type:e.Optional}]}]},t.propDecorators={attachedPopover:[{type:e.Input,args:["satPopoverAnchorFor"]}],popoverOpened:[{type:e.Output}],popoverClosed:[{type:e.Output}]},t}(),L=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.CommonModule,r.OverlayModule,n.A11yModule,S],declarations:[X,Y],exports:[X,Y]}]}],t.ctorParameters=function(){return[]},t}();t.SatPopoverModule=L,t.SatPopoverAnchor=Y,t.SatPopover=X,t.ɵb=j,t.ɵa=x,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=sat-popover.umd.min.js.map
{
"name": "@ncstate/sat-popover",
"version": "1.0.0-beta.3",
"version": "1.0.0-beta.4",
"description": "Popover component for Angular",

@@ -13,3 +13,3 @@ "author": "Will Howell",

"@angular/common": "^5.0.0",
"@angular/cdk": "^5.0.0-rc.1"
"@angular/cdk": "^5.0.0"
},

@@ -16,0 +16,0 @@ "typings": "popover.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc