@skyux/inline-form
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core"),require("@skyux/core"),require("@skyux/i18n"),require("@angular/common"),require("@angular/platform-browser/animations"),require("rxjs/add/observable/zip"),require("rxjs/add/operator/take"),require("rxjs/Observable"),require("@angular/animations"),require("@skyux/i18n/modules/i18n/get-string-for-locale")):"function"==typeof define&&define.amd?define(["@angular/core","@skyux/core","@skyux/i18n","@angular/common","@angular/platform-browser/animations","rxjs/add/observable/zip","rxjs/add/operator/take","rxjs/Observable","@angular/animations","@skyux/i18n/modules/i18n/get-string-for-locale"],t):"object"==typeof exports?exports["skyux-inline-form"]=t(require("@angular/core"),require("@skyux/core"),require("@skyux/i18n"),require("@angular/common"),require("@angular/platform-browser/animations"),require("rxjs/add/observable/zip"),require("rxjs/add/operator/take"),require("rxjs/Observable"),require("@angular/animations"),require("@skyux/i18n/modules/i18n/get-string-for-locale")):e["skyux-inline-form"]=t(e["@angular/core"],e["@skyux/core"],e["@skyux/i18n"],e["@angular/common"],e["@angular/platform-browser/animations"],e["rxjs/add/observable/zip"],e["rxjs/add/operator/take"],e["rxjs/Observable"],e["@angular/animations"],e["@skyux/i18n/modules/i18n/get-string-for-locale"])}(window,(function(e,t,n,r,o,i,u,a,s,c){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return u})),n.d(t,"__decorate",(function(){return a})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__exportStar",(function(){return y})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return d})),n.d(t,"__spread",(function(){return m})),n.d(t,"__spreadArrays",(function(){return _})),n.d(t,"__await",(function(){return b})),n.d(t,"__asyncGenerator",(function(){return v})),n.d(t,"__asyncDelegator",(function(){return h})),n.d(t,"__asyncValues",(function(){return g})),n.d(t,"__makeTemplateObject",(function(){return x})),n.d(t,"__importStar",(function(){return k})),n.d(t,"__importDefault",(function(){return S})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core"),require("@skyux/core"),require("@skyux/i18n"),require("@angular/common"),require("@angular/platform-browser/animations"),require("rxjs/add/observable/zip"),require("rxjs/add/operator/take"),require("rxjs/Observable"),require("@angular/animations"),require("@skyux/i18n/modules/i18n/get-string-for-locale")):"function"==typeof define&&define.amd?define(["@angular/core","@skyux/core","@skyux/i18n","@angular/common","@angular/platform-browser/animations","rxjs/add/observable/zip","rxjs/add/operator/take","rxjs/Observable","@angular/animations","@skyux/i18n/modules/i18n/get-string-for-locale"],t):"object"==typeof exports?exports["skyux-inline-form"]=t(require("@angular/core"),require("@skyux/core"),require("@skyux/i18n"),require("@angular/common"),require("@angular/platform-browser/animations"),require("rxjs/add/observable/zip"),require("rxjs/add/operator/take"),require("rxjs/Observable"),require("@angular/animations"),require("@skyux/i18n/modules/i18n/get-string-for-locale")):e["skyux-inline-form"]=t(e["@angular/core"],e["@skyux/core"],e["@skyux/i18n"],e["@angular/common"],e["@angular/platform-browser/animations"],e["rxjs/add/observable/zip"],e["rxjs/add/operator/take"],e["rxjs/Observable"],e["@angular/animations"],e["@skyux/i18n/modules/i18n/get-string-for-locale"])}(window,(function(e,t,n,r,o,i,u,a,s,c){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return u})),n.d(t,"__decorate",(function(){return a})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__exportStar",(function(){return y})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return d})),n.d(t,"__spread",(function(){return m})),n.d(t,"__spreadArrays",(function(){return b})),n.d(t,"__await",(function(){return _})),n.d(t,"__asyncGenerator",(function(){return v})),n.d(t,"__asyncDelegator",(function(){return h})),n.d(t,"__asyncValues",(function(){return g})),n.d(t,"__makeTemplateObject",(function(){return x})),n.d(t,"__importStar",(function(){return k})),n.d(t,"__importDefault",(function(){return S})); | ||
/*! ***************************************************************************** | ||
@@ -16,2 +16,2 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function a(e,t,n,r){var o,i=arguments.length,u=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(u=(i<3?o(u):i>3?o(t,n,u):o(t,n))||u);return i>3&&u&&Object.defineProperty(t,n,u),u}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function y(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function d(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function _(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function v(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function h(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=["a[href]","area[href]","input:not([disabled]):not([tabindex='-1'])","button:not([disabled]):not([tabindex='-1'])","select:not([disabled]):not([tabindex='-1'])","textarea:not([disabled]):not([tabindex='-1'])","iframe","object","embed","*[tabindex]:not([tabindex='-1'])","*[contenteditable=true]"].join(", "),u=function(){function e(){}return e.prototype.applyAutofocus=function(e){var t=e.nativeElement.querySelector("[autofocus]");if(t)t.focus();else{var n=e.nativeElement.querySelector(".sky-inline-form-content"),r=this.loadFocusableChildren(n);this.focusFirstElement(r)}},e.prototype.loadFocusableChildren=function(e){var t=this;return Array.prototype.slice.call(e.querySelectorAll(i)).filter((function(e){return t.isVisible(e)}))},e.prototype.isVisible=function(e){var t=window.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},e.prototype.focusFirstElement=function(e){e.length>0&&e[0].focus()},e=r.__decorate([o.Injectable()],e)}();t.SkyInlineFormAdapterService=u},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Custom=0]="Custom",e[e.DoneCancel=1]="DoneCancel",e[e.DoneDeleteCancel=2]="DoneDeleteCancel",e[e.SaveCancel=3]="SaveCancel",e[e.SaveDeleteCancel=4]="SaveDeleteCancel"}(t.SkyInlineFormButtonLayout||(t.SkyInlineFormButtonLayout={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);r.__exportStar(n(7),t),r.__exportStar(n(5),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(8),i=n(1),u=n(2),a=n(9),s=n(3),c=n(10),l=n(16),f=function(){function e(){}return e=r.__decorate([i.NgModule({declarations:[c.SkyInlineFormComponent],imports:[a.BrowserAnimationsModule,o.CommonModule,l.SkyInlineFormResourcesModule],exports:[c.SkyInlineFormComponent],providers:[u.SkyAppWindowRef,s.SkyInlineFormAdapterService]})],e)}();t.SkyInlineFormModule=f},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1);n(11),n(12);var i=n(13),u=n(2),a=n(4),s=n(14),c=n(3),l=n(5),f=function(){function e(e,t,n,r,i){this.adapter=e,this.elementRef=t,this.resourcesService=n,this.skyAppWindowRef=r,this.changeDetectorRef=i,this.close=new o.EventEmitter,this._showForm=!1}return Object.defineProperty(e.prototype,"config",{get:function(){return this._config},set:function(e){e!==this._config&&(this._config=e,this.setupButtons())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showForm",{get:function(){return this._showForm},set:function(e){var t=this;this._showForm=e,e&&this.skyAppWindowRef.nativeWindow.setTimeout((function(){t.adapter.applyAutofocus(t.elementRef)}))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.setupButtons()},e.prototype.ngOnDestroy=function(){this.close.complete()},e.prototype.closeInlineForm=function(e){var t={reason:e.action};this.close.emit(t)},e.prototype.setupButtons=function(){var e=this;if(this.isValidCustomConfig(this.config))return this.buttons=this.getCustomButtons(this.config.buttons),void this.changeDetectorRef.markForCheck();this.getPresetButtons().then((function(t){e.buttons=t,e.changeDetectorRef.markForCheck()}))},e.prototype.getPresetButtons=function(){var e;switch(this.config&&this.config.buttonLayout||l.SkyInlineFormButtonLayout.DoneCancel){default:case l.SkyInlineFormButtonLayout.DoneCancel:i.Observable.zip(this.resourcesService.getString("skyux_inline_form_button_done"),this.resourcesService.getString("skyux_inline_form_button_cancel")).take(1).subscribe((function(t){e=new Promise((function(e){e([{text:t[0],styleType:"primary",action:"done"},{text:t[1],styleType:"link",action:"cancel"}])}))}));break;case l.SkyInlineFormButtonLayout.SaveCancel:i.Observable.zip(this.resourcesService.getString("skyux_inline_form_button_save"),this.resourcesService.getString("skyux_inline_form_button_cancel")).take(1).subscribe((function(t){e=new Promise((function(e){e([{text:t[0],styleType:"primary",action:"save"},{text:t[1],styleType:"link",action:"cancel"}])}))}));break;case l.SkyInlineFormButtonLayout.DoneDeleteCancel:i.Observable.zip(this.resourcesService.getString("skyux_inline_form_button_done"),this.resourcesService.getString("skyux_inline_form_button_delete"),this.resourcesService.getString("skyux_inline_form_button_cancel")).take(1).subscribe((function(t){e=new Promise((function(e){e([{text:t[0],styleType:"primary",action:"done"},{text:t[1],styleType:"default",action:"delete"},{text:t[2],styleType:"link",action:"cancel"}])}))}));break;case l.SkyInlineFormButtonLayout.SaveDeleteCancel:i.Observable.zip(this.resourcesService.getString("skyux_inline_form_button_save"),this.resourcesService.getString("skyux_inline_form_button_delete"),this.resourcesService.getString("skyux_inline_form_button_cancel")).take(1).subscribe((function(t){e=new Promise((function(e){e([{text:t[0],styleType:"primary",action:"save"},{text:t[1],styleType:"default",action:"delete"},{text:t[2],styleType:"link",action:"cancel"}])}))}))}return e},e.prototype.getCustomButtons=function(e){var t=[];return e.forEach((function(e){t.push({text:e.text,action:e.action,styleType:e.styleType||"default"})})),t},e.prototype.isValidCustomConfig=function(e){return e&&e.buttonLayout===l.SkyInlineFormButtonLayout.Custom&&e.buttons.length>0},r.__decorate([o.Input(),r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[Object])],e.prototype,"config",null),r.__decorate([o.Input(),r.__metadata("design:type",o.TemplateRef)],e.prototype,"template",void 0),r.__decorate([o.Input(),r.__metadata("design:type",Boolean),r.__metadata("design:paramtypes",[Boolean])],e.prototype,"showForm",null),r.__decorate([o.Output(),r.__metadata("design:type",Object)],e.prototype,"close",void 0),e=r.__decorate([o.Component({selector:"sky-inline-form",template:'<div\n [@skySlideDissolve]="showForm"\n>\n\n <div *ngIf="!showForm"\n class="sky-slide-dissolve-first"\n >\n <ng-content></ng-content>\n </div>\n\n <div *ngIf="template && showForm"\n class="sky-slide-dissolve-last"\n >\n <div\n class="sky-inline-form sky-shadow"\n >\n <div\n class="sky-inline-form-content"\n >\n <ng-container\n [ngTemplateOutlet]="template"\n >\n </ng-container>\n </div>\n <div\n class="sky-inline-form-footer"\n >\n <button *ngFor="let button of buttons"\n type="button"\n class="sky-btn"\n ngClass="sky-btn-{{ button.styleType }}"\n (click)="closeInlineForm(button)"\n >\n {{ button.text }}\n </button>\n </div>\n </div>\n </div>\n\n</div>\n',styles:[".sky-inline-form{background:#eeeeef;border:1px solid #cdcfd2;padding:10px 10px 10px 10px;width:100%}.sky-inline-form .sky-inline-form-footer{margin-top:20px}.sky-inline-form .sky-inline-form-footer button{margin:0 5px 0 0}\n"],changeDetection:o.ChangeDetectionStrategy.OnPush,animations:[s.skySlideDissolve]}),r.__metadata("design:paramtypes",[c.SkyInlineFormAdapterService,o.ElementRef,a.SkyLibResourcesService,u.SkyAppWindowRef,o.ChangeDetectorRef])],e)}();t.SkyInlineFormComponent=f},function(e,t){e.exports=i},function(e,t){e.exports=u},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15);t.skySlideDissolve=r.trigger("skySlideDissolve",[r.transition("* <=> *",[r.query(".sky-slide-dissolve-last:enter",[r.style({height:0,opacity:0}),r.animate("200ms ease-in",r.style({height:"*",opacity:0}))],{optional:!0}),r.query(".sky-slide-dissolve-last:enter",[r.style({opacity:0}),r.animate("200ms ease-in",r.style({opacity:1}))],{optional:!0}),r.query(".sky-slide-dissolve-last:leave",[r.animate("0ms",r.style({opacity:0}))],{optional:!0}),r.group([r.query(".sky-slide-dissolve-first:enter",[r.style({opacity:0,height:0}),r.animate("100ms ease-in",r.style({opacity:1,height:"*"}))],{optional:!0}),r.query(".sky-slide-dissolve-last:leave",[r.animate("200ms ease-in",r.style({height:0}))],{optional:!0})])])])},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(4),u=n(17),a=function(){function e(){}return e=r.__decorate([o.NgModule({exports:[i.SkyI18nModule],providers:[{provide:i.SKY_LIB_RESOURCES_PROVIDERS,useClass:u.SkyInlineFormResourcesProvider,multi:!0}]})],e)}();t.SkyInlineFormResourcesModule=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(18),u=function(){function e(){this.resources={"EN-US":{skyux_inline_form_button_cancel:"Cancel",skyux_inline_form_button_delete:"Delete",skyux_inline_form_button_done:"Done",skyux_inline_form_button_save:"Save"}}}return e.prototype.getString=function(e,t){return i.getStringForLocale(this.resources,e.locale,t)},e=r.__decorate([o.Injectable()],e)}();t.SkyInlineFormResourcesProvider=u},function(e,t){e.exports=c}])})); | ||
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function a(e,t,n,r){var o,i=arguments.length,u=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(u=(i<3?o(u):i>3?o(t,n,u):o(t,n))||u);return i>3&&u&&Object.defineProperty(t,n,u),u}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function y(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function d(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r}function _(e){return this instanceof _?(this.v=e,this):new _(e)}function v(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof _?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function h(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:_(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=["a[href]","area[href]","input:not([disabled]):not([tabindex='-1'])","button:not([disabled]):not([tabindex='-1'])","select:not([disabled]):not([tabindex='-1'])","textarea:not([disabled]):not([tabindex='-1'])","iframe","object","embed","*[tabindex]:not([tabindex='-1'])","*[contenteditable=true]"].join(", "),u=function(){function e(){}return e.prototype.applyAutofocus=function(e){var t=e.nativeElement.querySelector("[autofocus]");if(t)t.focus();else{var n=e.nativeElement.querySelector(".sky-inline-form-content"),r=this.loadFocusableChildren(n);this.focusFirstElement(r)}},e.prototype.loadFocusableChildren=function(e){var t=this;return Array.prototype.slice.call(e.querySelectorAll(i)).filter((function(e){return t.isVisible(e)}))},e.prototype.isVisible=function(e){var t=window.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},e.prototype.focusFirstElement=function(e){e.length>0&&e[0].focus()},e=r.__decorate([o.Injectable()],e)}();t.SkyInlineFormAdapterService=u},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Custom=0]="Custom",e[e.DoneCancel=1]="DoneCancel",e[e.DoneDeleteCancel=2]="DoneDeleteCancel",e[e.SaveCancel=3]="SaveCancel",e[e.SaveDeleteCancel=4]="SaveDeleteCancel"}(t.SkyInlineFormButtonLayout||(t.SkyInlineFormButtonLayout={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);r.__exportStar(n(7),t),r.__exportStar(n(5),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(8),i=n(1),u=n(2),a=n(9),s=n(3),c=n(10),l=n(16),f=function(){function e(){}return e=r.__decorate([i.NgModule({declarations:[c.SkyInlineFormComponent],imports:[a.BrowserAnimationsModule,o.CommonModule,l.SkyInlineFormResourcesModule],exports:[c.SkyInlineFormComponent],providers:[u.SkyAppWindowRef,s.SkyInlineFormAdapterService]})],e)}();t.SkyInlineFormModule=f},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1);n(11),n(12);var i=n(13),u=n(2),a=n(4),s=n(14),c=n(3),l=n(5),f=function(){function e(e,t,n,r,i){this.adapter=e,this.elementRef=t,this.resourcesService=n,this.skyAppWindowRef=r,this.changeDetectorRef=i,this.close=new o.EventEmitter,this._showForm=!1}return Object.defineProperty(e.prototype,"config",{get:function(){return this._config},set:function(e){e!==this._config&&(this._config=e,this.setupButtons())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showForm",{get:function(){return this._showForm},set:function(e){var t=this;this._showForm=e,e&&this.skyAppWindowRef.nativeWindow.setTimeout((function(){t.adapter.applyAutofocus(t.elementRef)}))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.setupButtons()},e.prototype.ngOnDestroy=function(){this.close.complete()},e.prototype.closeInlineForm=function(e){var t={reason:e.action};this.close.emit(t)},e.prototype.setupButtons=function(){var e=this;if(this.isValidCustomConfig(this.config))return this.buttons=this.getCustomButtons(this.config.buttons),void this.changeDetectorRef.markForCheck();this.getPresetButtons().then((function(t){e.buttons=t,e.changeDetectorRef.markForCheck()}))},e.prototype.getPresetButtons=function(){var e;switch(this.config&&this.config.buttonLayout||l.SkyInlineFormButtonLayout.DoneCancel){default:case l.SkyInlineFormButtonLayout.DoneCancel:i.Observable.zip(this.resourcesService.getString("skyux_inline_form_button_done"),this.resourcesService.getString("skyux_inline_form_button_cancel")).take(1).subscribe((function(t){e=new Promise((function(e){e([{text:t[0],styleType:"primary",action:"done"},{text:t[1],styleType:"link",action:"cancel"}])}))}));break;case l.SkyInlineFormButtonLayout.SaveCancel:i.Observable.zip(this.resourcesService.getString("skyux_inline_form_button_save"),this.resourcesService.getString("skyux_inline_form_button_cancel")).take(1).subscribe((function(t){e=new Promise((function(e){e([{text:t[0],styleType:"primary",action:"save"},{text:t[1],styleType:"link",action:"cancel"}])}))}));break;case l.SkyInlineFormButtonLayout.DoneDeleteCancel:i.Observable.zip(this.resourcesService.getString("skyux_inline_form_button_done"),this.resourcesService.getString("skyux_inline_form_button_delete"),this.resourcesService.getString("skyux_inline_form_button_cancel")).take(1).subscribe((function(t){e=new Promise((function(e){e([{text:t[0],styleType:"primary",action:"done"},{text:t[1],styleType:"default",action:"delete"},{text:t[2],styleType:"link",action:"cancel"}])}))}));break;case l.SkyInlineFormButtonLayout.SaveDeleteCancel:i.Observable.zip(this.resourcesService.getString("skyux_inline_form_button_save"),this.resourcesService.getString("skyux_inline_form_button_delete"),this.resourcesService.getString("skyux_inline_form_button_cancel")).take(1).subscribe((function(t){e=new Promise((function(e){e([{text:t[0],styleType:"primary",action:"save"},{text:t[1],styleType:"default",action:"delete"},{text:t[2],styleType:"link",action:"cancel"}])}))}))}return e},e.prototype.getCustomButtons=function(e){var t=[];return e.forEach((function(e){t.push({action:e.action,disabled:e.disabled,styleType:e.styleType||"default",text:e.text})})),t},e.prototype.isValidCustomConfig=function(e){return e&&e.buttonLayout===l.SkyInlineFormButtonLayout.Custom&&e.buttons.length>0},r.__decorate([o.Input(),r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[Object])],e.prototype,"config",null),r.__decorate([o.Input(),r.__metadata("design:type",o.TemplateRef)],e.prototype,"template",void 0),r.__decorate([o.Input(),r.__metadata("design:type",Boolean),r.__metadata("design:paramtypes",[Boolean])],e.prototype,"showForm",null),r.__decorate([o.Output(),r.__metadata("design:type",Object)],e.prototype,"close",void 0),e=r.__decorate([o.Component({selector:"sky-inline-form",template:'<div\n [@skySlideDissolve]="showForm"\n>\n\n <div *ngIf="!showForm"\n class="sky-slide-dissolve-first"\n >\n <ng-content></ng-content>\n </div>\n\n <div *ngIf="template && showForm"\n class="sky-slide-dissolve-last"\n >\n <div\n class="sky-inline-form sky-shadow"\n >\n <div\n class="sky-inline-form-content"\n >\n <ng-container\n [ngTemplateOutlet]="template"\n >\n </ng-container>\n </div>\n <div\n class="sky-inline-form-footer"\n >\n <button *ngFor="let button of buttons"\n class="sky-btn {{ \'sky-btn-\' + button.styleType }}"\n type="button"\n [disabled]="(button.disabled) ? true : null"\n [ngClass]="{ \'sky-btn-disabled\' : button.disabled }"\n (click)="closeInlineForm(button)"\n >\n {{ button.text }}\n </button>\n </div>\n </div>\n </div>\n\n</div>\n',styles:[".sky-inline-form{background:#eeeeef;border:1px solid #cdcfd2;padding:10px 10px 10px 10px;width:100%}.sky-inline-form .sky-inline-form-footer{margin-top:20px}.sky-inline-form .sky-inline-form-footer button{margin:0 5px 0 0}\n"],changeDetection:o.ChangeDetectionStrategy.OnPush,animations:[s.skySlideDissolve]}),r.__metadata("design:paramtypes",[c.SkyInlineFormAdapterService,o.ElementRef,a.SkyLibResourcesService,u.SkyAppWindowRef,o.ChangeDetectorRef])],e)}();t.SkyInlineFormComponent=f},function(e,t){e.exports=i},function(e,t){e.exports=u},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15);t.skySlideDissolve=r.trigger("skySlideDissolve",[r.transition("* <=> *",[r.query(".sky-slide-dissolve-last:enter",[r.style({height:0,opacity:0}),r.animate("200ms ease-in",r.style({height:"*",opacity:0}))],{optional:!0}),r.query(".sky-slide-dissolve-last:enter",[r.style({opacity:0}),r.animate("200ms ease-in",r.style({opacity:1}))],{optional:!0}),r.query(".sky-slide-dissolve-last:leave",[r.animate("0ms",r.style({opacity:0}))],{optional:!0}),r.group([r.query(".sky-slide-dissolve-first:enter",[r.style({opacity:0,height:0}),r.animate("100ms ease-in",r.style({opacity:1,height:"*"}))],{optional:!0}),r.query(".sky-slide-dissolve-last:leave",[r.animate("200ms ease-in",r.style({height:0}))],{optional:!0})])])])},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(4),u=n(17),a=function(){function e(){}return e=r.__decorate([o.NgModule({exports:[i.SkyI18nModule],providers:[{provide:i.SKY_LIB_RESOURCES_PROVIDERS,useClass:u.SkyInlineFormResourcesProvider,multi:!0}]})],e)}();t.SkyInlineFormResourcesModule=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(18),u=function(){function e(){this.resources={"EN-US":{skyux_inline_form_button_cancel:"Cancel",skyux_inline_form_button_delete:"Delete",skyux_inline_form_button_done:"Done",skyux_inline_form_button_save:"Save"}}}return e.prototype.getString=function(e,t){return i.getStringForLocale(this.resources,e.locale,t)},e=r.__decorate([o.Injectable()],e)}();t.SkyInlineFormResourcesProvider=u},function(e,t){e.exports=c}])})); |
@@ -0,1 +1,5 @@ | ||
# 3.1.0 (2019-12-20) | ||
- Added the `disabled` property to `SkyInlineFormButtonConfig` to indicate whether to disable the button. [#15](https://github.com/blackbaud/skyux-inline-form/pull/15) | ||
# 3.0.1 (2019-12-13) | ||
@@ -2,0 +6,0 @@ |
@@ -293,5 +293,6 @@ /** | ||
buttons.push((/** @type {?} */ ({ | ||
text: config.text, | ||
action: config.action, | ||
styleType: config.styleType || 'default' | ||
disabled: config.disabled, | ||
styleType: config.styleType || 'default', | ||
text: config.text | ||
}))); | ||
@@ -319,3 +320,3 @@ })); | ||
selector: 'sky-inline-form', | ||
template: "<div\n [@skySlideDissolve]=\"showForm\"\n>\n\n <div *ngIf=\"!showForm\"\n class=\"sky-slide-dissolve-first\"\n >\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"template && showForm\"\n class=\"sky-slide-dissolve-last\"\n >\n <div\n class=\"sky-inline-form sky-shadow\"\n >\n <div\n class=\"sky-inline-form-content\"\n >\n <ng-container\n [ngTemplateOutlet]=\"template\"\n >\n </ng-container>\n </div>\n <div\n class=\"sky-inline-form-footer\"\n >\n <button *ngFor=\"let button of buttons\"\n type=\"button\"\n class=\"sky-btn\"\n ngClass=\"sky-btn-{{ button.styleType }}\"\n (click)=\"closeInlineForm(button)\"\n >\n {{ button.text }}\n </button>\n </div>\n </div>\n </div>\n\n</div>\n", | ||
template: "<div\n [@skySlideDissolve]=\"showForm\"\n>\n\n <div *ngIf=\"!showForm\"\n class=\"sky-slide-dissolve-first\"\n >\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"template && showForm\"\n class=\"sky-slide-dissolve-last\"\n >\n <div\n class=\"sky-inline-form sky-shadow\"\n >\n <div\n class=\"sky-inline-form-content\"\n >\n <ng-container\n [ngTemplateOutlet]=\"template\"\n >\n </ng-container>\n </div>\n <div\n class=\"sky-inline-form-footer\"\n >\n <button *ngFor=\"let button of buttons\"\n class=\"sky-btn {{ 'sky-btn-' + button.styleType }}\"\n type=\"button\"\n [disabled]=\"(button.disabled) ? true : null\"\n [ngClass]=\"{ 'sky-btn-disabled' : button.disabled }\"\n (click)=\"closeInlineForm(button)\"\n >\n {{ button.text }}\n </button>\n </div>\n </div>\n </div>\n\n</div>\n", | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
@@ -322,0 +323,0 @@ animations: [skySlideDissolve], |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":4,"metadata":{"SkyInlineFormComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":53,"character":1},"arguments":[{"selector":"sky-inline-form","template":"<div\n [@skySlideDissolve]=\"showForm\"\n>\n\n <div *ngIf=\"!showForm\"\n class=\"sky-slide-dissolve-first\"\n >\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"template && showForm\"\n class=\"sky-slide-dissolve-last\"\n >\n <div\n class=\"sky-inline-form sky-shadow\"\n >\n <div\n class=\"sky-inline-form-content\"\n >\n <ng-container\n [ngTemplateOutlet]=\"template\"\n >\n </ng-container>\n </div>\n <div\n class=\"sky-inline-form-footer\"\n >\n <button *ngFor=\"let button of buttons\"\n type=\"button\"\n class=\"sky-btn\"\n ngClass=\"sky-btn-{{ button.styleType }}\"\n (click)=\"closeInlineForm(button)\"\n >\n {{ button.text }}\n </button>\n </div>\n </div>\n </div>\n\n</div>\n","styles":[".sky-inline-form{background:#eeeeef;border:1px solid #cdcfd2;padding:10px 10px 10px 10px;width:100%}.sky-inline-form .sky-inline-form-footer{margin-top:20px}.sky-inline-form .sky-inline-form-footer button{margin:0 5px 0 0}\n"],"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":98,"character":19},"member":"OnPush"},"animations":[{"__symbolic":"reference","module":"./animations/slide-dissolve","name":"skySlideDissolve","line":99,"character":16}]}]}],"members":{"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":103,"character":3}}]}],"template":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":115,"character":3}}]}],"showForm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":118,"character":3}}]}],"close":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":135,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./inline-form-adapter.service","name":"SkyInlineFormAdapterService","line":145,"character":21},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":146,"character":24},{"__symbolic":"reference","module":"@skyux/i18n","name":"SkyLibResourcesService","line":147,"character":30},{"__symbolic":"reference","module":"@skyux/core","name":"SkyAppWindowRef","line":148,"character":29},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":149,"character":31}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"closeInlineForm":[{"__symbolic":"method"}],"setupButtons":[{"__symbolic":"method"}],"getPresetButtons":[{"__symbolic":"method"}],"getCustomButtons":[{"__symbolic":"method"}],"isValidCustomConfig":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":4,"metadata":{"SkyInlineFormComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":53,"character":1},"arguments":[{"selector":"sky-inline-form","template":"<div\n [@skySlideDissolve]=\"showForm\"\n>\n\n <div *ngIf=\"!showForm\"\n class=\"sky-slide-dissolve-first\"\n >\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"template && showForm\"\n class=\"sky-slide-dissolve-last\"\n >\n <div\n class=\"sky-inline-form sky-shadow\"\n >\n <div\n class=\"sky-inline-form-content\"\n >\n <ng-container\n [ngTemplateOutlet]=\"template\"\n >\n </ng-container>\n </div>\n <div\n class=\"sky-inline-form-footer\"\n >\n <button *ngFor=\"let button of buttons\"\n class=\"sky-btn {{ 'sky-btn-' + button.styleType }}\"\n type=\"button\"\n [disabled]=\"(button.disabled) ? true : null\"\n [ngClass]=\"{ 'sky-btn-disabled' : button.disabled }\"\n (click)=\"closeInlineForm(button)\"\n >\n {{ button.text }}\n </button>\n </div>\n </div>\n </div>\n\n</div>\n","styles":[".sky-inline-form{background:#eeeeef;border:1px solid #cdcfd2;padding:10px 10px 10px 10px;width:100%}.sky-inline-form .sky-inline-form-footer{margin-top:20px}.sky-inline-form .sky-inline-form-footer button{margin:0 5px 0 0}\n"],"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":99,"character":19},"member":"OnPush"},"animations":[{"__symbolic":"reference","module":"./animations/slide-dissolve","name":"skySlideDissolve","line":100,"character":16}]}]}],"members":{"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":104,"character":3}}]}],"template":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":116,"character":3}}]}],"showForm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":119,"character":3}}]}],"close":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":136,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./inline-form-adapter.service","name":"SkyInlineFormAdapterService","line":146,"character":21},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":147,"character":24},{"__symbolic":"reference","module":"@skyux/i18n","name":"SkyLibResourcesService","line":148,"character":30},{"__symbolic":"reference","module":"@skyux/core","name":"SkyAppWindowRef","line":149,"character":29},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":150,"character":31}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"closeInlineForm":[{"__symbolic":"method"}],"setupButtons":[{"__symbolic":"method"}],"getPresetButtons":[{"__symbolic":"method"}],"getCustomButtons":[{"__symbolic":"method"}],"isValidCustomConfig":[{"__symbolic":"method"}]}}}}] |
@@ -0,5 +1,27 @@ | ||
/** | ||
* Specifies configuration options for the inline form's buttons. | ||
*/ | ||
export interface SkyInlineFormButtonConfig { | ||
/** | ||
* Specifies the action that the button performs. | ||
* The valid options are `cancel`, `delete`, `done`, and `save`. | ||
* This property accepts `string` values. | ||
*/ | ||
action: string; | ||
/** | ||
* Specifies a label for the button. This property accepts `string` values. | ||
*/ | ||
text: string; | ||
/** | ||
* Indicates whether to disable the button. This property accepts `boolean` values. | ||
*/ | ||
disabled?: boolean; | ||
/** | ||
* Specifies a background color and style for the button. | ||
* The valid options are `default`, `link`, and `primary`. | ||
* These values set the background color and style from the | ||
* [secondary, link, and primary button classes](https://developer.blackbaud.com/skyux/components/button) respectively. | ||
* This property accepts `string` values. | ||
*/ | ||
styleType?: string; | ||
} |
@@ -6,2 +6,3 @@ /** | ||
/** | ||
* Specifies configuration options for the inline form's buttons. | ||
* @record | ||
@@ -11,9 +12,29 @@ */ | ||
if (false) { | ||
/** @type {?} */ | ||
/** | ||
* Specifies the action that the button performs. | ||
* The valid options are `cancel`, `delete`, `done`, and `save`. | ||
* This property accepts `string` values. | ||
* @type {?} | ||
*/ | ||
SkyInlineFormButtonConfig.prototype.action; | ||
/** @type {?} */ | ||
/** | ||
* Specifies a label for the button. This property accepts `string` values. | ||
* @type {?} | ||
*/ | ||
SkyInlineFormButtonConfig.prototype.text; | ||
/** @type {?|undefined} */ | ||
/** | ||
* Indicates whether to disable the button. This property accepts `boolean` values. | ||
* @type {?|undefined} | ||
*/ | ||
SkyInlineFormButtonConfig.prototype.disabled; | ||
/** | ||
* Specifies a background color and style for the button. | ||
* The valid options are `default`, `link`, and `primary`. | ||
* These values set the background color and style from the | ||
* [secondary, link, and primary button classes](https://developer.blackbaud.com/skyux/components/button) respectively. | ||
* This property accepts `string` values. | ||
* @type {?|undefined} | ||
*/ | ||
SkyInlineFormButtonConfig.prototype.styleType; | ||
} | ||
//# sourceMappingURL=inline-form-button-config.js.map |
{ | ||
"name": "@skyux/inline-form", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "SKY UX Inline Form", | ||
@@ -5,0 +5,0 @@ "main": "bundles/bundle.umd.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
91599
866
0