@skyux/inline-form 5.0.0-alpha.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/skyux-inline-form.umd.js +160 -335
- package/bundles/skyux-inline-form.umd.js.map +1 -1
- package/documentation.json +1084 -0
- package/esm2015/modules/inline-form/animations/slide-dissolve.js +1 -1
- package/esm2015/modules/inline-form/inline-form-adapter.service.js +10 -8
- package/esm2015/modules/inline-form/inline-form.component.js +37 -37
- package/esm2015/modules/inline-form/inline-form.module.js +25 -24
- package/esm2015/modules/inline-form/types/inline-form-button-action.js +2 -1
- package/esm2015/modules/inline-form/types/inline-form-button-config.js +2 -1
- package/esm2015/modules/inline-form/types/inline-form-button-layout.js +1 -1
- package/esm2015/modules/inline-form/types/inline-form-close-args.js +2 -1
- package/esm2015/modules/inline-form/types/inline-form-config.js +2 -1
- package/esm2015/modules/shared/sky-inline-form-resources.module.js +41 -0
- package/esm2015/public-api.js +10 -0
- package/esm2015/skyux-inline-form.js +2 -7
- package/fesm2015/skyux-inline-form.js +140 -121
- package/fesm2015/skyux-inline-form.js.map +1 -1
- package/modules/inline-form/inline-form-adapter.service.d.ts +3 -0
- package/modules/inline-form/inline-form.component.d.ts +3 -0
- package/modules/inline-form/inline-form.module.d.ts +7 -0
- package/modules/shared/sky-inline-form-resources.module.d.ts +14 -0
- package/package.json +9 -24
- package/{public_api.d.ts → public-api.d.ts} +1 -0
- package/skyux-inline-form.d.ts +2 -6
- package/CHANGELOG.md +0 -53
- package/bundles/skyux-inline-form.umd.min.js +0 -16
- package/bundles/skyux-inline-form.umd.min.js.map +0 -1
- package/esm2015/modules/shared/inline-form-resources.module.js +0 -20
- package/esm2015/plugin-resources/inline-form-resources-provider.js +0 -16
- package/esm2015/public_api.js +0 -3
- package/esm5/modules/inline-form/animations/slide-dissolve.js +0 -30
- package/esm5/modules/inline-form/inline-form-adapter.service.js +0 -64
- package/esm5/modules/inline-form/inline-form.component.js +0 -238
- package/esm5/modules/inline-form/inline-form.module.js +0 -32
- package/esm5/modules/inline-form/types/inline-form-button-action.js +0 -1
- package/esm5/modules/inline-form/types/inline-form-button-config.js +0 -1
- package/esm5/modules/inline-form/types/inline-form-button-layout.js +0 -9
- package/esm5/modules/inline-form/types/inline-form-close-args.js +0 -1
- package/esm5/modules/inline-form/types/inline-form-config.js +0 -1
- package/esm5/modules/shared/inline-form-resources.module.js +0 -23
- package/esm5/plugin-resources/inline-form-resources-provider.js +0 -17
- package/esm5/public_api.js +0 -3
- package/esm5/skyux-inline-form.js +0 -10
- package/fesm5/skyux-inline-form.js +0 -397
- package/fesm5/skyux-inline-form.js.map +0 -1
- package/modules/shared/inline-form-resources.module.d.ts +0 -2
- package/plugin-resources/inline-form-resources-provider.d.ts +0 -5
- package/skyux-inline-form.metadata.json +0 -1
- package/src/assets/img/anatomy.png +0 -0
- package/src/assets/locales/resources_en_US.json +0 -18
|
@@ -1,11 +1,51 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as i4 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { SkyLibResourcesService, getStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModule } from '@angular/core';
|
|
6
5
|
import { zip } from 'rxjs';
|
|
7
6
|
import { take } from 'rxjs/operators';
|
|
8
7
|
import { trigger, transition, query, style, animate, group } from '@angular/animations';
|
|
8
|
+
import * as i2 from '@skyux/i18n';
|
|
9
|
+
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
10
|
+
import * as i3 from '@skyux/core';
|
|
11
|
+
|
|
12
|
+
const skySlideDissolve = trigger('skySlideDissolve', [
|
|
13
|
+
transition('* <=> *', [
|
|
14
|
+
// Expand animations
|
|
15
|
+
query('.sky-slide-dissolve-last:enter', [
|
|
16
|
+
style({ height: 0, opacity: 0 }),
|
|
17
|
+
animate('200ms ease-in', style({ height: '*', opacity: 0 }))
|
|
18
|
+
], { optional: true }),
|
|
19
|
+
query('.sky-slide-dissolve-last:enter', [
|
|
20
|
+
style({ opacity: 0 }),
|
|
21
|
+
animate('200ms ease-in', style({ opacity: 1 }))
|
|
22
|
+
], { optional: true }),
|
|
23
|
+
// Collapse animations
|
|
24
|
+
// The expanded content should fade out immediately to prevent
|
|
25
|
+
// any overlap with the read-only content that's returning to the screen.
|
|
26
|
+
query('.sky-slide-dissolve-last:leave', [
|
|
27
|
+
animate('0ms', style({ opacity: 0 }))
|
|
28
|
+
], { optional: true }),
|
|
29
|
+
group([
|
|
30
|
+
query('.sky-slide-dissolve-first:enter', [
|
|
31
|
+
style({ opacity: 0, height: 0 }),
|
|
32
|
+
animate('100ms ease-in', style({ opacity: 1, height: '*' }))
|
|
33
|
+
], { optional: true }),
|
|
34
|
+
query('.sky-slide-dissolve-last:leave', [
|
|
35
|
+
animate('200ms ease-in', style({ height: 0 }))
|
|
36
|
+
], { optional: true })
|
|
37
|
+
])
|
|
38
|
+
])
|
|
39
|
+
]);
|
|
40
|
+
|
|
41
|
+
var SkyInlineFormButtonLayout;
|
|
42
|
+
(function (SkyInlineFormButtonLayout) {
|
|
43
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["Custom"] = 0] = "Custom";
|
|
44
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneCancel"] = 1] = "DoneCancel";
|
|
45
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneDeleteCancel"] = 2] = "DoneDeleteCancel";
|
|
46
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveCancel"] = 3] = "SaveCancel";
|
|
47
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveDeleteCancel"] = 4] = "SaveDeleteCancel";
|
|
48
|
+
})(SkyInlineFormButtonLayout || (SkyInlineFormButtonLayout = {}));
|
|
9
49
|
|
|
10
50
|
/* tslint:disable */
|
|
11
51
|
const SKY_TABBABLE_SELECTOR = [
|
|
@@ -25,7 +65,7 @@ const SKY_TABBABLE_SELECTOR = [
|
|
|
25
65
|
/**
|
|
26
66
|
* @internal
|
|
27
67
|
*/
|
|
28
|
-
|
|
68
|
+
class SkyInlineFormAdapterService {
|
|
29
69
|
applyAutofocus(inlineFormElementRef) {
|
|
30
70
|
const inputWithAutofocus = inlineFormElementRef.nativeElement.querySelector('[autofocus]');
|
|
31
71
|
if (inputWithAutofocus) {
|
|
@@ -49,6 +89,7 @@ let SkyInlineFormAdapterService = class SkyInlineFormAdapterService {
|
|
|
49
89
|
if (isHidden) {
|
|
50
90
|
return false;
|
|
51
91
|
}
|
|
92
|
+
/* istanbul ignore next */
|
|
52
93
|
const hasBounds = !!(element.offsetWidth ||
|
|
53
94
|
element.offsetHeight ||
|
|
54
95
|
element.getClientRects().length);
|
|
@@ -59,53 +100,17 @@ let SkyInlineFormAdapterService = class SkyInlineFormAdapterService {
|
|
|
59
100
|
list[0].focus();
|
|
60
101
|
}
|
|
61
102
|
}
|
|
62
|
-
}
|
|
63
|
-
SkyInlineFormAdapterService =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
transition('* <=> *', [
|
|
69
|
-
// Expand animations
|
|
70
|
-
query('.sky-slide-dissolve-last:enter', [
|
|
71
|
-
style({ height: 0, opacity: 0 }),
|
|
72
|
-
animate('200ms ease-in', style({ height: '*', opacity: 0 }))
|
|
73
|
-
], { optional: true }),
|
|
74
|
-
query('.sky-slide-dissolve-last:enter', [
|
|
75
|
-
style({ opacity: 0 }),
|
|
76
|
-
animate('200ms ease-in', style({ opacity: 1 }))
|
|
77
|
-
], { optional: true }),
|
|
78
|
-
// Collapse animations
|
|
79
|
-
// The expanded content should fade out immediately to prevent
|
|
80
|
-
// any overlap with the read-only content that's returning to the screen.
|
|
81
|
-
query('.sky-slide-dissolve-last:leave', [
|
|
82
|
-
animate('0ms', style({ opacity: 0 }))
|
|
83
|
-
], { optional: true }),
|
|
84
|
-
group([
|
|
85
|
-
query('.sky-slide-dissolve-first:enter', [
|
|
86
|
-
style({ opacity: 0, height: 0 }),
|
|
87
|
-
animate('100ms ease-in', style({ opacity: 1, height: '*' }))
|
|
88
|
-
], { optional: true }),
|
|
89
|
-
query('.sky-slide-dissolve-last:leave', [
|
|
90
|
-
animate('200ms ease-in', style({ height: 0 }))
|
|
91
|
-
], { optional: true })
|
|
92
|
-
])
|
|
93
|
-
])
|
|
94
|
-
]);
|
|
95
|
-
|
|
96
|
-
var SkyInlineFormButtonLayout;
|
|
97
|
-
(function (SkyInlineFormButtonLayout) {
|
|
98
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["Custom"] = 0] = "Custom";
|
|
99
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneCancel"] = 1] = "DoneCancel";
|
|
100
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneDeleteCancel"] = 2] = "DoneDeleteCancel";
|
|
101
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveCancel"] = 3] = "SaveCancel";
|
|
102
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveDeleteCancel"] = 4] = "SaveDeleteCancel";
|
|
103
|
-
})(SkyInlineFormButtonLayout || (SkyInlineFormButtonLayout = {}));
|
|
103
|
+
}
|
|
104
|
+
SkyInlineFormAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
105
|
+
SkyInlineFormAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormAdapterService });
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormAdapterService, decorators: [{
|
|
107
|
+
type: Injectable
|
|
108
|
+
}] });
|
|
104
109
|
|
|
105
110
|
/**
|
|
106
111
|
* Renders form content in the current view instead of a separate modal.
|
|
107
112
|
*/
|
|
108
|
-
|
|
113
|
+
class SkyInlineFormComponent {
|
|
109
114
|
constructor(adapter, elementRef, resourcesService, skyAppWindowRef, changeDetectorRef) {
|
|
110
115
|
this.adapter = adapter;
|
|
111
116
|
this.elementRef = elementRef;
|
|
@@ -275,10 +280,12 @@ let SkyInlineFormComponent = class SkyInlineFormComponent {
|
|
|
275
280
|
getCustomButtons(buttonConfigs) {
|
|
276
281
|
const buttons = [];
|
|
277
282
|
buttonConfigs.forEach((config) => {
|
|
283
|
+
/* istanbul ignore next */
|
|
284
|
+
const styleType = config.styleType || 'default';
|
|
278
285
|
buttons.push({
|
|
279
286
|
action: config.action,
|
|
280
287
|
disabled: config.disabled,
|
|
281
|
-
styleType:
|
|
288
|
+
styleType: styleType,
|
|
282
289
|
text: config.text
|
|
283
290
|
});
|
|
284
291
|
});
|
|
@@ -289,87 +296,99 @@ let SkyInlineFormComponent = class SkyInlineFormComponent {
|
|
|
289
296
|
config.buttonLayout === SkyInlineFormButtonLayout.Custom &&
|
|
290
297
|
config.buttons.length > 0);
|
|
291
298
|
}
|
|
292
|
-
}
|
|
293
|
-
SkyInlineFormComponent
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
{ type:
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
]
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
],
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
styles: [".sky-inline-form{background:#eeeeef;border:1px solid #cdcfd2;padding: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}.sky-theme-modern .sky-inline-form,:host-context(.sky-theme-modern) .sky-inline-form{background-color:#fff;border:none;padding:15px}.sky-theme-modern .sky-inline-form .sky-inline-form-footer,:host-context(.sky-theme-modern) .sky-inline-form .sky-inline-form-footer{margin-top:30px}.sky-theme-modern .sky-inline-form .sky-inline-form-footer button,:host-context(.sky-theme-modern) .sky-inline-form .sky-inline-form-footer button{margin-right:10px}.sky-theme-modern.sky-theme-mode-dark .sky-inline-form,:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-inline-form{background-color:#232427}"]
|
|
319
|
-
})
|
|
320
|
-
], SkyInlineFormComponent);
|
|
299
|
+
}
|
|
300
|
+
SkyInlineFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormComponent, deps: [{ token: SkyInlineFormAdapterService }, { token: i0.ElementRef }, { token: i2.SkyLibResourcesService }, { token: i3.SkyAppWindowRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
301
|
+
SkyInlineFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: SkyInlineFormComponent, selector: "sky-inline-form", inputs: { config: "config", template: "template", showForm: "showForm" }, outputs: { close: "close" }, providers: [
|
|
302
|
+
SkyInlineFormAdapterService
|
|
303
|
+
], ngImport: i0, 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 sky-box sky-elevation-3\"\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;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}:host-context(.sky-theme-modern) .sky-inline-form{background-color:#fff;border:none;padding:15px}:host-context(.sky-theme-modern) .sky-inline-form .sky-inline-form-footer{margin-top:30px}:host-context(.sky-theme-modern) .sky-inline-form .sky-inline-form-footer button{margin-right:10px}.sky-theme-modern .sky-inline-form{background-color:#fff;border:none;padding:15px}.sky-theme-modern .sky-inline-form .sky-inline-form-footer{margin-top:30px}.sky-theme-modern .sky-inline-form .sky-inline-form-footer button{margin-right:10px}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-inline-form{background-color:#232427}.sky-theme-modern.sky-theme-mode-dark .sky-inline-form{background-color:#232427}\n"], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [skySlideDissolve], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormComponent, decorators: [{
|
|
305
|
+
type: Component,
|
|
306
|
+
args: [{
|
|
307
|
+
selector: 'sky-inline-form',
|
|
308
|
+
templateUrl: './inline-form.component.html',
|
|
309
|
+
styleUrls: ['./inline-form.component.scss'],
|
|
310
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
311
|
+
providers: [
|
|
312
|
+
SkyInlineFormAdapterService
|
|
313
|
+
],
|
|
314
|
+
animations: [skySlideDissolve]
|
|
315
|
+
}]
|
|
316
|
+
}], ctorParameters: function () { return [{ type: SkyInlineFormAdapterService }, { type: i0.ElementRef }, { type: i2.SkyLibResourcesService }, { type: i3.SkyAppWindowRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { config: [{
|
|
317
|
+
type: Input
|
|
318
|
+
}], template: [{
|
|
319
|
+
type: Input
|
|
320
|
+
}], showForm: [{
|
|
321
|
+
type: Input
|
|
322
|
+
}], close: [{
|
|
323
|
+
type: Output
|
|
324
|
+
}] } });
|
|
321
325
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
+
/**
|
|
327
|
+
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
328
|
+
* The contents of this file were automatically generated by
|
|
329
|
+
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-inline-form' schematic.
|
|
330
|
+
* To update this file, simply rerun the command.
|
|
331
|
+
*/
|
|
332
|
+
const RESOURCES = {
|
|
333
|
+
'EN-US': { "skyux_inline_form_button_cancel": { "message": "Cancel" }, "skyux_inline_form_button_delete": { "message": "Delete" }, "skyux_inline_form_button_done": { "message": "Done" }, "skyux_inline_form_button_save": { "message": "Save" } },
|
|
334
|
+
};
|
|
335
|
+
class SkyInlineFormResourcesProvider {
|
|
326
336
|
getString(localeInfo, name) {
|
|
327
|
-
return
|
|
337
|
+
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
328
338
|
}
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
};
|
|
336
|
-
SkyInlineFormResourcesModule =
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Import into any component library module that needs to use resource strings.
|
|
342
|
+
*/
|
|
343
|
+
class SkyInlineFormResourcesModule {
|
|
344
|
+
}
|
|
345
|
+
SkyInlineFormResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
346
|
+
SkyInlineFormResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormResourcesModule, exports: [SkyI18nModule] });
|
|
347
|
+
SkyInlineFormResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormResourcesModule, providers: [{
|
|
348
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
349
|
+
useClass: SkyInlineFormResourcesProvider,
|
|
350
|
+
multi: true
|
|
351
|
+
}], imports: [SkyI18nModule] });
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormResourcesModule, decorators: [{
|
|
353
|
+
type: NgModule,
|
|
354
|
+
args: [{
|
|
355
|
+
exports: [SkyI18nModule],
|
|
356
|
+
providers: [{
|
|
357
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
358
|
+
useClass: SkyInlineFormResourcesProvider,
|
|
359
|
+
multi: true
|
|
360
|
+
}]
|
|
361
|
+
}]
|
|
362
|
+
}] });
|
|
348
363
|
|
|
349
|
-
|
|
350
|
-
}
|
|
351
|
-
SkyInlineFormModule =
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
],
|
|
356
|
-
imports: [
|
|
364
|
+
class SkyInlineFormModule {
|
|
365
|
+
}
|
|
366
|
+
SkyInlineFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
367
|
+
SkyInlineFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormModule, declarations: [SkyInlineFormComponent], imports: [CommonModule,
|
|
368
|
+
SkyInlineFormResourcesModule], exports: [SkyInlineFormComponent] });
|
|
369
|
+
SkyInlineFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormModule, imports: [[
|
|
357
370
|
CommonModule,
|
|
358
371
|
SkyInlineFormResourcesModule
|
|
359
|
-
]
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
372
|
+
]] });
|
|
373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: SkyInlineFormModule, decorators: [{
|
|
374
|
+
type: NgModule,
|
|
375
|
+
args: [{
|
|
376
|
+
declarations: [
|
|
377
|
+
SkyInlineFormComponent
|
|
378
|
+
],
|
|
379
|
+
imports: [
|
|
380
|
+
CommonModule,
|
|
381
|
+
SkyInlineFormResourcesModule
|
|
382
|
+
],
|
|
383
|
+
exports: [
|
|
384
|
+
SkyInlineFormComponent
|
|
385
|
+
]
|
|
386
|
+
}]
|
|
387
|
+
}] });
|
|
369
388
|
|
|
370
389
|
/**
|
|
371
390
|
* Generated bundle index. Do not edit.
|
|
372
391
|
*/
|
|
373
392
|
|
|
374
|
-
export { SkyInlineFormButtonLayout, SkyInlineFormModule, SkyInlineFormComponent as
|
|
393
|
+
export { SkyInlineFormButtonLayout, SkyInlineFormModule, SkyInlineFormComponent as λ1 };
|
|
375
394
|
//# sourceMappingURL=skyux-inline-form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-inline-form.js","sources":["ng://@skyux/inline-form/modules/inline-form/inline-form-adapter.service.ts","ng://@skyux/inline-form/modules/inline-form/animations/slide-dissolve.ts","ng://@skyux/inline-form/modules/inline-form/types/inline-form-button-layout.ts","ng://@skyux/inline-form/modules/inline-form/inline-form.component.ts","ng://@skyux/inline-form/plugin-resources/inline-form-resources-provider.ts","ng://@skyux/inline-form/modules/shared/inline-form-resources.module.ts","ng://@skyux/inline-form/modules/inline-form/inline-form.module.ts","ng://@skyux/inline-form/skyux-inline-form.ts"],"sourcesContent":["import {\n ElementRef,\n Injectable\n} from '@angular/core';\n\n/* tslint:disable */\nconst SKY_TABBABLE_SELECTOR = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled]):not([tabindex=\\'-1\\'])',\n 'button:not([disabled]):not([tabindex=\\'-1\\'])',\n 'select:not([disabled]):not([tabindex=\\'-1\\'])',\n 'textarea:not([disabled]):not([tabindex=\\'-1\\'])',\n 'iframe',\n 'object',\n 'embed',\n '*[tabindex]:not([tabindex=\\'-1\\'])',\n '*[contenteditable=true]'\n].join(', ');\n/* tslint:enable */\n\n/**\n * @internal\n */\n@Injectable()\nexport class SkyInlineFormAdapterService {\n\n public applyAutofocus(inlineFormElementRef: ElementRef): void {\n const inputWithAutofocus = inlineFormElementRef.nativeElement.querySelector('[autofocus]');\n\n if (inputWithAutofocus) {\n inputWithAutofocus.focus();\n } else {\n let focusEl: HTMLElement = inlineFormElementRef.nativeElement.querySelector('.sky-inline-form-content');\n let focusableChildren = this.loadFocusableChildren(focusEl);\n\n this.focusFirstElement(focusableChildren);\n }\n }\n\n private loadFocusableChildren(elem: HTMLElement): HTMLElement[] {\n const elements: Array<HTMLElement>\n = Array.prototype.slice.call(elem.querySelectorAll(SKY_TABBABLE_SELECTOR));\n\n return elements.filter((element) => {\n return this.isVisible(element);\n });\n }\n\n private isVisible(element: HTMLElement): boolean {\n const style = window.getComputedStyle(element);\n const isHidden = style.display === 'none' || style.visibility === 'hidden';\n if (isHidden) {\n return false;\n }\n\n const hasBounds = !!(\n element.offsetWidth ||\n element.offsetHeight ||\n element.getClientRects().length\n );\n return hasBounds;\n }\n\n private focusFirstElement(list: Array<HTMLElement>): void {\n if (list.length > 0) {\n list[0].focus();\n }\n }\n}\n","import {\n animate,\n AnimationTriggerMetadata,\n group,\n query,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\nexport const skySlideDissolve: AnimationTriggerMetadata = trigger('skySlideDissolve', [\n transition('* <=> *', [\n\n // Expand animations\n query('.sky-slide-dissolve-last:enter', [\n style({ height: 0, opacity: 0 }),\n animate('200ms ease-in', style({ height: '*', opacity: 0 }))\n ], { optional: true }),\n query('.sky-slide-dissolve-last:enter', [\n style({ opacity: 0 }),\n animate('200ms ease-in', style({ opacity: 1 }))\n ], { optional: true }),\n\n // Collapse animations\n // The expanded content should fade out immediately to prevent\n // any overlap with the read-only content that's returning to the screen.\n query('.sky-slide-dissolve-last:leave', [\n animate('0ms', style({ opacity: 0 }))\n ], { optional: true }),\n\n group([\n query('.sky-slide-dissolve-first:enter', [\n style({ opacity: 0, height: 0 }),\n animate('100ms ease-in', style({ opacity: 1, height: '*' }))\n ], { optional: true }),\n query('.sky-slide-dissolve-last:leave', [\n animate('200ms ease-in', style({ height: 0 }))\n ], { optional: true })\n\n ])\n ])\n]);\n","export enum SkyInlineFormButtonLayout {\n Custom = 0,\n DoneCancel = 1,\n DoneDeleteCancel = 2,\n SaveCancel = 3,\n SaveDeleteCancel = 4\n}\n","import {\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef\n} from '@angular/core';\n\nimport {\n SkyAppWindowRef\n} from '@skyux/core';\n\nimport {\n SkyLibResourcesService\n} from '@skyux/i18n';\n\nimport {\n zip as observableZip\n} from 'rxjs';\n\nimport {\n take\n} from 'rxjs/operators';\n\nimport {\n skySlideDissolve\n} from './animations/slide-dissolve';\n\nimport {\n SkyInlineFormButtonConfig\n} from './types/inline-form-button-config';\n\nimport {\n SkyInlineFormButtonLayout\n} from './types/inline-form-button-layout';\n\nimport {\n SkyInlineFormCloseArgs\n} from './types/inline-form-close-args';\n\nimport {\n SkyInlineFormConfig\n} from './types/inline-form-config';\n\nimport {\n SkyInlineFormAdapterService\n} from './inline-form-adapter.service';\n\n/**\n * Renders form content in the current view instead of a separate modal.\n */\n@Component({\n selector: 'sky-inline-form',\n templateUrl: './inline-form.component.html',\n styleUrls: ['./inline-form.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [ skySlideDissolve ]\n})\nexport class SkyInlineFormComponent implements OnInit, OnDestroy {\n\n /**\n * Specifies configuration options for the buttons to display with the inline form.\n * @required\n */\n @Input()\n public set config(value: SkyInlineFormConfig) {\n if (value !== this._config) {\n this._config = value;\n this.setupButtons();\n }\n }\n\n public get config(): SkyInlineFormConfig {\n return this._config;\n }\n\n /**\n * Specifies a template to use to instantiate the inline form.\n * @required\n */\n @Input()\n public template: TemplateRef<any>;\n\n /**\n * Indicates whether to display the inline form. Users can toggle between displaying\n * and hiding the inline form.\n * @default false\n */\n @Input()\n public set showForm(value: boolean) {\n this._showForm = value;\n\n /* istanbul ignore else */\n if (value) {\n // setTimeout() prevents applyAutofocus() from firing\n // until after *ngIf has added the form element to the DOM.\n this.skyAppWindowRef.nativeWindow.setTimeout(() => {\n this.adapter.applyAutofocus(this.elementRef);\n });\n }\n }\n\n public get showForm() {\n return this._showForm;\n }\n\n /**\n * Fires when users close the inline form.\n */\n @Output()\n public close = new EventEmitter<SkyInlineFormCloseArgs>();\n\n public buttons: SkyInlineFormButtonConfig[];\n\n private _config: SkyInlineFormConfig;\n\n private _showForm: boolean = false;\n\n constructor(\n private adapter: SkyInlineFormAdapterService,\n private elementRef: ElementRef,\n private resourcesService: SkyLibResourcesService,\n private skyAppWindowRef: SkyAppWindowRef,\n private changeDetectorRef: ChangeDetectorRef\n ) {}\n\n public ngOnInit(): void {\n this.setupButtons();\n }\n\n public ngOnDestroy(): void {\n this.close.complete();\n }\n\n public closeInlineForm(event: SkyInlineFormButtonConfig): void {\n const args: SkyInlineFormCloseArgs = {\n reason: event.action\n };\n this.close.emit(args);\n }\n\n private setupButtons(): void {\n if (this.isValidCustomConfig(this.config)) {\n this.buttons = this.getCustomButtons(this.config.buttons);\n this.changeDetectorRef.markForCheck();\n return;\n }\n\n this.getPresetButtons().then((buttons) => {\n this.buttons = buttons;\n this.changeDetectorRef.markForCheck();\n });\n }\n\n private getPresetButtons(): Promise<SkyInlineFormButtonConfig[]> {\n let buttonType =\n this.config ? this.config.buttonLayout : SkyInlineFormButtonLayout.DoneCancel;\n\n let promise: Promise<SkyInlineFormButtonConfig[]>;\n\n switch (buttonType) {\n /* istanbul ignore next */\n default:\n case SkyInlineFormButtonLayout.DoneCancel:\n observableZip(\n this.resourcesService.getString('skyux_inline_form_button_done'),\n this.resourcesService.getString('skyux_inline_form_button_cancel')\n )\n .pipe(take(1))\n .subscribe((values: any) => {\n promise = new Promise<SkyInlineFormButtonConfig[]>((resolve: any) => {\n resolve([\n {\n text: values[0],\n styleType: 'primary',\n action: 'done'\n },\n {\n text: values[1],\n styleType: 'link',\n action: 'cancel'\n }\n ]);\n });\n });\n break;\n\n case SkyInlineFormButtonLayout.SaveCancel:\n observableZip(\n this.resourcesService.getString('skyux_inline_form_button_save'),\n this.resourcesService.getString('skyux_inline_form_button_cancel')\n )\n .pipe(take(1))\n .subscribe((values: any) => {\n promise = new Promise<SkyInlineFormButtonConfig[]>((resolve: any) => {\n resolve([\n {\n text: values[0],\n styleType: 'primary',\n action: 'save'\n },\n {\n text: values[1],\n styleType: 'link',\n action: 'cancel'\n }\n ]);\n });\n });\n break;\n\n case SkyInlineFormButtonLayout.DoneDeleteCancel:\n observableZip(\n this.resourcesService.getString('skyux_inline_form_button_done'),\n this.resourcesService.getString('skyux_inline_form_button_delete'),\n this.resourcesService.getString('skyux_inline_form_button_cancel')\n )\n .pipe(take(1))\n .subscribe((values: any) => {\n promise = new Promise<SkyInlineFormButtonConfig[]>((resolve: any) => {\n resolve([\n {\n text: values[0],\n styleType: 'primary',\n action: 'done'\n },\n {\n text: values[1],\n styleType: 'default',\n action: 'delete'\n },\n {\n text: values[2],\n styleType: 'link',\n action: 'cancel'\n }\n ]);\n });\n });\n break;\n\n case SkyInlineFormButtonLayout.SaveDeleteCancel:\n observableZip(\n this.resourcesService.getString('skyux_inline_form_button_save'),\n this.resourcesService.getString('skyux_inline_form_button_delete'),\n this.resourcesService.getString('skyux_inline_form_button_cancel')\n )\n .pipe(take(1))\n .subscribe((values: any) => {\n promise = new Promise<SkyInlineFormButtonConfig[]>((resolve: any) => {\n resolve([\n {\n text: values[0],\n styleType: 'primary',\n action: 'save'\n },\n {\n text: values[1],\n styleType: 'default',\n action: 'delete'\n },\n {\n text: values[2],\n styleType: 'link',\n action: 'cancel'\n }\n ]);\n });\n });\n break;\n }\n\n return promise;\n }\n\n private getCustomButtons(buttonConfigs: SkyInlineFormButtonConfig[]): SkyInlineFormButtonConfig[] {\n const buttons: SkyInlineFormButtonConfig[] = [];\n\n buttonConfigs.forEach((config: SkyInlineFormButtonConfig) => {\n buttons.push({\n action: config.action,\n disabled: config.disabled,\n styleType: config.styleType || 'default',\n text: config.text\n } as SkyInlineFormButtonConfig);\n });\n\n return buttons;\n }\n\n private isValidCustomConfig(config: SkyInlineFormConfig): boolean {\n return (\n config &&\n config.buttonLayout === SkyInlineFormButtonLayout.Custom &&\n config.buttons.length > 0\n );\n }\n\n}\n","\nimport {\n Injectable\n} from '@angular/core';\n\nimport {\n getStringForLocale,\n SkyAppLocaleInfo,\n SkyLibResourcesProvider\n} from '@skyux/i18n';\n\n@Injectable()\nexport class SkyInlineFormResourcesProvider implements SkyLibResourcesProvider {\n private resources: any = {\"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\"}};\n\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getStringForLocale(this.resources, localeInfo.locale, name);\n }\n}\n","import {\n NgModule\n} from '@angular/core';\n\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyI18nModule\n} from '@skyux/i18n';\n\nimport {\n SkyInlineFormResourcesProvider\n} from '../../plugin-resources/inline-form-resources-provider';\n\n@NgModule({\n exports: [\n SkyI18nModule\n ],\n providers: [{\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyInlineFormResourcesProvider,\n multi: true\n }]\n})\nexport class SkyInlineFormResourcesModule { }\n","import {\n CommonModule\n} from '@angular/common';\n\nimport {\n NgModule\n} from '@angular/core';\n\nimport {\n SkyAppWindowRef\n} from '@skyux/core';\n\nimport {\n SkyInlineFormAdapterService\n} from './inline-form-adapter.service';\n\nimport {\n SkyInlineFormComponent\n} from './inline-form.component';\n\nimport {\n SkyInlineFormResourcesModule\n} from '../shared/inline-form-resources.module';\n\n@NgModule({\n declarations: [\n SkyInlineFormComponent\n ],\n imports: [\n CommonModule,\n SkyInlineFormResourcesModule\n ],\n exports: [\n SkyInlineFormComponent\n ],\n providers: [\n SkyAppWindowRef,\n SkyInlineFormAdapterService\n ]\n})\nexport class SkyInlineFormModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {skySlideDissolve as ɵb} from './modules/inline-form/animations/slide-dissolve';\nexport {SkyInlineFormAdapterService as ɵc} from './modules/inline-form/inline-form-adapter.service';\nexport {SkyInlineFormComponent as ɵa} from './modules/inline-form/inline-form.component';\nexport {SkyInlineFormResourcesModule as ɵd} from './modules/shared/inline-form-resources.module';\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AS,GAAQ,EAAC,OAAO,EAAC,EAAC,iCAAiC,EAAC,QAAQ,EAAC,iCAAiC,EAAC,QAAQ,EAAC,+BAA+B,EAAC,MAAM,EAAC,+BAA+B,EAAC,MAAM,EAAC,EAAC,CAAC;KAK1M;IAHQ,SAAS,CAAC,UAA4B,EAAE,IAAY;QACzD,OAAO,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KACpE;EACF;AANY,8BAA8B;IAD1C,UAAU,EAAE;GACA,8BAA8B,CAM1C;;ICKY,4BAA4B,GAAzC,MAAa,4BAA4B;EAAI;AAAhC,4BAA4B;IAVxC,QAAQ,CAAC;QACR,OAAO,EAAE;YACP,aAAa;SACd;QACD,SAAS,EAAE,CAAC;gBACV,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,8BAA8B;gBACxC,KAAK,EAAE,IAAI;aACZ,CAAC;KACH,CAAC;GACW,4BAA4B,CAAI;;ICiBhC,mBAAmB,GAAhC,MAAa,mBAAmB;EAAI;AAAvB,mBAAmB;IAhB/B,QAAQ,CAAC;QACR,YAAY,EAAE;YACZ,sBAAsB;SACvB;QACD,OAAO,EAAE;YACP,YAAY;YACZ,4BAA4B;SAC7B;QACD,OAAO,EAAE;YACP,sBAAsB;SACvB;QACD,SAAS,EAAE;YACT,eAAe;YACf,2BAA2B;SAC5B;KACF,CAAC;GACW,mBAAmB,CAAI;;ACxCpC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"skyux-inline-form.js","sources":["../../../projects/inline-form/src/modules/inline-form/animations/slide-dissolve.ts","../../../projects/inline-form/src/modules/inline-form/types/inline-form-button-layout.ts","../../../projects/inline-form/src/modules/inline-form/inline-form-adapter.service.ts","../../../projects/inline-form/src/modules/inline-form/inline-form.component.ts","../../../projects/inline-form/src/modules/inline-form/inline-form.component.html","../../../projects/inline-form/src/modules/shared/sky-inline-form-resources.module.ts","../../../projects/inline-form/src/modules/inline-form/inline-form.module.ts","../../../projects/inline-form/src/skyux-inline-form.ts"],"sourcesContent":["import {\n animate,\n AnimationTriggerMetadata,\n group,\n query,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\nexport const skySlideDissolve: AnimationTriggerMetadata = trigger('skySlideDissolve', [\n transition('* <=> *', [\n\n // Expand animations\n query('.sky-slide-dissolve-last:enter', [\n style({ height: 0, opacity: 0 }),\n animate('200ms ease-in', style({ height: '*', opacity: 0 }))\n ], { optional: true }),\n query('.sky-slide-dissolve-last:enter', [\n style({ opacity: 0 }),\n animate('200ms ease-in', style({ opacity: 1 }))\n ], { optional: true }),\n\n // Collapse animations\n // The expanded content should fade out immediately to prevent\n // any overlap with the read-only content that's returning to the screen.\n query('.sky-slide-dissolve-last:leave', [\n animate('0ms', style({ opacity: 0 }))\n ], { optional: true }),\n\n group([\n query('.sky-slide-dissolve-first:enter', [\n style({ opacity: 0, height: 0 }),\n animate('100ms ease-in', style({ opacity: 1, height: '*' }))\n ], { optional: true }),\n query('.sky-slide-dissolve-last:leave', [\n animate('200ms ease-in', style({ height: 0 }))\n ], { optional: true })\n\n ])\n ])\n]);\n","export enum SkyInlineFormButtonLayout {\n Custom = 0,\n DoneCancel = 1,\n DoneDeleteCancel = 2,\n SaveCancel = 3,\n SaveDeleteCancel = 4\n}\n","import {\n ElementRef,\n Injectable\n} from '@angular/core';\n\n/* tslint:disable */\nconst SKY_TABBABLE_SELECTOR = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled]):not([tabindex=\\'-1\\'])',\n 'button:not([disabled]):not([tabindex=\\'-1\\'])',\n 'select:not([disabled]):not([tabindex=\\'-1\\'])',\n 'textarea:not([disabled]):not([tabindex=\\'-1\\'])',\n 'iframe',\n 'object',\n 'embed',\n '*[tabindex]:not([tabindex=\\'-1\\'])',\n '*[contenteditable=true]'\n].join(', ');\n/* tslint:enable */\n\n/**\n * @internal\n */\n@Injectable()\nexport class SkyInlineFormAdapterService {\n\n public applyAutofocus(inlineFormElementRef: ElementRef): void {\n const inputWithAutofocus = inlineFormElementRef.nativeElement.querySelector('[autofocus]');\n\n if (inputWithAutofocus) {\n inputWithAutofocus.focus();\n } else {\n let focusEl: HTMLElement = inlineFormElementRef.nativeElement.querySelector('.sky-inline-form-content');\n let focusableChildren = this.loadFocusableChildren(focusEl);\n\n this.focusFirstElement(focusableChildren);\n }\n }\n\n private loadFocusableChildren(elem: HTMLElement): HTMLElement[] {\n const elements: Array<HTMLElement>\n = Array.prototype.slice.call(elem.querySelectorAll(SKY_TABBABLE_SELECTOR));\n\n return elements.filter((element) => {\n return this.isVisible(element);\n });\n }\n\n private isVisible(element: HTMLElement): boolean {\n const style = window.getComputedStyle(element);\n const isHidden = style.display === 'none' || style.visibility === 'hidden';\n if (isHidden) {\n return false;\n }\n\n /* istanbul ignore next */\n const hasBounds = !!(\n element.offsetWidth ||\n element.offsetHeight ||\n element.getClientRects().length\n );\n return hasBounds;\n }\n\n private focusFirstElement(list: Array<HTMLElement>): void {\n if (list.length > 0) {\n list[0].focus();\n }\n }\n}\n","import {\n ChangeDetectorRef,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef\n} from '@angular/core';\n\nimport {\n SkyAppWindowRef\n} from '@skyux/core';\n\nimport {\n SkyLibResourcesService\n} from '@skyux/i18n';\n\nimport {\n zip as observableZip\n} from 'rxjs';\n\nimport {\n take\n} from 'rxjs/operators';\n\nimport {\n skySlideDissolve\n} from './animations/slide-dissolve';\n\nimport {\n SkyInlineFormButtonConfig\n} from './types/inline-form-button-config';\n\nimport {\n SkyInlineFormButtonLayout\n} from './types/inline-form-button-layout';\n\nimport {\n SkyInlineFormCloseArgs\n} from './types/inline-form-close-args';\n\nimport {\n SkyInlineFormConfig\n} from './types/inline-form-config';\n\nimport {\n SkyInlineFormAdapterService\n} from './inline-form-adapter.service';\n\n/**\n * Renders form content in the current view instead of a separate modal.\n */\n@Component({\n selector: 'sky-inline-form',\n templateUrl: './inline-form.component.html',\n styleUrls: ['./inline-form.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n SkyInlineFormAdapterService\n ],\n animations: [ skySlideDissolve ]\n})\nexport class SkyInlineFormComponent implements OnInit, OnDestroy {\n\n /**\n * Specifies configuration options for the buttons to display with the inline form.\n * @required\n */\n @Input()\n public set config(value: SkyInlineFormConfig) {\n if (value !== this._config) {\n this._config = value;\n this.setupButtons();\n }\n }\n\n public get config(): SkyInlineFormConfig {\n return this._config;\n }\n\n /**\n * Specifies a template to use to instantiate the inline form.\n * @required\n */\n @Input()\n public template: TemplateRef<any>;\n\n /**\n * Indicates whether to display the inline form. Users can toggle between displaying\n * and hiding the inline form.\n * @default false\n */\n @Input()\n public set showForm(value: boolean) {\n this._showForm = value;\n\n /* istanbul ignore else */\n if (value) {\n // setTimeout() prevents applyAutofocus() from firing\n // until after *ngIf has added the form element to the DOM.\n this.skyAppWindowRef.nativeWindow.setTimeout(() => {\n this.adapter.applyAutofocus(this.elementRef);\n });\n }\n }\n\n public get showForm() {\n return this._showForm;\n }\n\n /**\n * Fires when users close the inline form.\n */\n @Output()\n public close = new EventEmitter<SkyInlineFormCloseArgs>();\n\n public buttons: SkyInlineFormButtonConfig[];\n\n private _config: SkyInlineFormConfig;\n\n private _showForm: boolean = false;\n\n constructor(\n private adapter: SkyInlineFormAdapterService,\n private elementRef: ElementRef,\n private resourcesService: SkyLibResourcesService,\n private skyAppWindowRef: SkyAppWindowRef,\n private changeDetectorRef: ChangeDetectorRef\n ) {}\n\n public ngOnInit(): void {\n this.setupButtons();\n }\n\n public ngOnDestroy(): void {\n this.close.complete();\n }\n\n public closeInlineForm(event: SkyInlineFormButtonConfig): void {\n const args: SkyInlineFormCloseArgs = {\n reason: event.action\n };\n this.close.emit(args);\n }\n\n private setupButtons(): void {\n if (this.isValidCustomConfig(this.config)) {\n this.buttons = this.getCustomButtons(this.config.buttons);\n this.changeDetectorRef.markForCheck();\n return;\n }\n\n this.getPresetButtons().then((buttons) => {\n this.buttons = buttons;\n this.changeDetectorRef.markForCheck();\n });\n }\n\n private getPresetButtons(): Promise<SkyInlineFormButtonConfig[]> {\n let buttonType =\n this.config ? this.config.buttonLayout : SkyInlineFormButtonLayout.DoneCancel;\n\n let promise: Promise<SkyInlineFormButtonConfig[]>;\n\n switch (buttonType) {\n /* istanbul ignore next */\n default:\n case SkyInlineFormButtonLayout.DoneCancel:\n observableZip(\n this.resourcesService.getString('skyux_inline_form_button_done'),\n this.resourcesService.getString('skyux_inline_form_button_cancel')\n )\n .pipe(take(1))\n .subscribe((values: any) => {\n promise = new Promise<SkyInlineFormButtonConfig[]>((resolve: any) => {\n resolve([\n {\n text: values[0],\n styleType: 'primary',\n action: 'done'\n },\n {\n text: values[1],\n styleType: 'link',\n action: 'cancel'\n }\n ]);\n });\n });\n break;\n\n case SkyInlineFormButtonLayout.SaveCancel:\n observableZip(\n this.resourcesService.getString('skyux_inline_form_button_save'),\n this.resourcesService.getString('skyux_inline_form_button_cancel')\n )\n .pipe(take(1))\n .subscribe((values: any) => {\n promise = new Promise<SkyInlineFormButtonConfig[]>((resolve: any) => {\n resolve([\n {\n text: values[0],\n styleType: 'primary',\n action: 'save'\n },\n {\n text: values[1],\n styleType: 'link',\n action: 'cancel'\n }\n ]);\n });\n });\n break;\n\n case SkyInlineFormButtonLayout.DoneDeleteCancel:\n observableZip(\n this.resourcesService.getString('skyux_inline_form_button_done'),\n this.resourcesService.getString('skyux_inline_form_button_delete'),\n this.resourcesService.getString('skyux_inline_form_button_cancel')\n )\n .pipe(take(1))\n .subscribe((values: any) => {\n promise = new Promise<SkyInlineFormButtonConfig[]>((resolve: any) => {\n resolve([\n {\n text: values[0],\n styleType: 'primary',\n action: 'done'\n },\n {\n text: values[1],\n styleType: 'default',\n action: 'delete'\n },\n {\n text: values[2],\n styleType: 'link',\n action: 'cancel'\n }\n ]);\n });\n });\n break;\n\n case SkyInlineFormButtonLayout.SaveDeleteCancel:\n observableZip(\n this.resourcesService.getString('skyux_inline_form_button_save'),\n this.resourcesService.getString('skyux_inline_form_button_delete'),\n this.resourcesService.getString('skyux_inline_form_button_cancel')\n )\n .pipe(take(1))\n .subscribe((values: any) => {\n promise = new Promise<SkyInlineFormButtonConfig[]>((resolve: any) => {\n resolve([\n {\n text: values[0],\n styleType: 'primary',\n action: 'save'\n },\n {\n text: values[1],\n styleType: 'default',\n action: 'delete'\n },\n {\n text: values[2],\n styleType: 'link',\n action: 'cancel'\n }\n ]);\n });\n });\n break;\n }\n\n return promise;\n }\n\n private getCustomButtons(buttonConfigs: SkyInlineFormButtonConfig[]): SkyInlineFormButtonConfig[] {\n const buttons: SkyInlineFormButtonConfig[] = [];\n\n buttonConfigs.forEach((config: SkyInlineFormButtonConfig) => {\n /* istanbul ignore next */\n const styleType = config.styleType || 'default';\n\n buttons.push({\n action: config.action,\n disabled: config.disabled,\n styleType: styleType,\n text: config.text\n } as SkyInlineFormButtonConfig);\n });\n\n return buttons;\n }\n\n private isValidCustomConfig(config: SkyInlineFormConfig): boolean {\n return (\n config &&\n config.buttonLayout === SkyInlineFormButtonLayout.Custom &&\n config.buttons.length > 0\n );\n }\n\n}\n","<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 sky-box sky-elevation-3\"\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","/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-inline-form' schematic.\n * To update this file, simply rerun the command.\n */\n\nimport { NgModule } from '@angular/core';\nimport {\n getLibStringForLocale,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n SKY_LIB_RESOURCES_PROVIDERS\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\"skyux_inline_form_button_cancel\":{\"message\":\"Cancel\"},\"skyux_inline_form_button_delete\":{\"message\":\"Delete\"},\"skyux_inline_form_button_done\":{\"message\":\"Done\"},\"skyux_inline_form_button_save\":{\"message\":\"Save\"}},\n};\n\nexport class SkyInlineFormResourcesProvider implements SkyLibResourcesProvider {\n public getString(localeInfo: SkyAppLocaleInfo, name: string): string {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [{\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyInlineFormResourcesProvider,\n multi: true\n }]\n})\nexport class SkyInlineFormResourcesModule { }\n","import {\n CommonModule\n} from '@angular/common';\n\nimport {\n NgModule\n} from '@angular/core';\n\nimport {\n SkyInlineFormComponent\n} from './inline-form.component';\n\nimport {\n SkyInlineFormResourcesModule\n} from '../shared/sky-inline-form-resources.module';\n\n@NgModule({\n declarations: [\n SkyInlineFormComponent\n ],\n imports: [\n CommonModule,\n SkyInlineFormResourcesModule\n ],\n exports: [\n SkyInlineFormComponent\n ]\n})\nexport class SkyInlineFormModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["observableZip"],"mappings":";;;;;;;;;;;AAUO,MAAM,gBAAgB,GAA6B,OAAO,CAAC,kBAAkB,EAAE;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
|
*/
|
|
@@ -7,4 +8,6 @@ export declare class SkyInlineFormAdapterService {
|
|
|
7
8
|
private loadFocusableChildren;
|
|
8
9
|
private isVisible;
|
|
9
10
|
private focusFirstElement;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyInlineFormAdapterService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SkyInlineFormAdapterService>;
|
|
10
13
|
}
|
|
@@ -5,6 +5,7 @@ import { SkyInlineFormButtonConfig } from './types/inline-form-button-config';
|
|
|
5
5
|
import { SkyInlineFormCloseArgs } from './types/inline-form-close-args';
|
|
6
6
|
import { SkyInlineFormConfig } from './types/inline-form-config';
|
|
7
7
|
import { SkyInlineFormAdapterService } from './inline-form-adapter.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
9
10
|
* Renders form content in the current view instead of a separate modal.
|
|
10
11
|
*/
|
|
@@ -47,4 +48,6 @@ export declare class SkyInlineFormComponent implements OnInit, OnDestroy {
|
|
|
47
48
|
private getPresetButtons;
|
|
48
49
|
private getCustomButtons;
|
|
49
50
|
private isValidCustomConfig;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyInlineFormComponent, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkyInlineFormComponent, "sky-inline-form", never, { "config": "config"; "template": "template"; "showForm": "showForm"; }, { "close": "close"; }, never, ["*"]>;
|
|
50
53
|
}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./inline-form.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../shared/sky-inline-form-resources.module";
|
|
1
5
|
export declare class SkyInlineFormModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyInlineFormModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyInlineFormModule, [typeof i1.SkyInlineFormComponent], [typeof i2.CommonModule, typeof i3.SkyInlineFormResourcesModule], [typeof i1.SkyInlineFormComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SkyInlineFormModule>;
|
|
2
9
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SkyAppLocaleInfo, SkyLibResourcesProvider } from '@skyux/i18n';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@skyux/i18n";
|
|
4
|
+
export declare class SkyInlineFormResourcesProvider implements SkyLibResourcesProvider {
|
|
5
|
+
getString(localeInfo: SkyAppLocaleInfo, name: string): string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Import into any component library module that needs to use resource strings.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SkyInlineFormResourcesModule {
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkyInlineFormResourcesModule, never>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SkyInlineFormResourcesModule, never, never, [typeof i1.SkyI18nModule]>;
|
|
13
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SkyInlineFormResourcesModule>;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,36 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/inline-form",
|
|
3
|
-
"version": "5.0.0
|
|
4
|
-
"description": "SKY UX Inline Form",
|
|
5
|
-
"keywords": [],
|
|
6
|
-
"author": "Blackbaud",
|
|
7
|
-
"license": "ISC",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/blackbaud/skyux-inline-form.git"
|
|
11
|
-
},
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/blackbaud/skyux-inline-form/issues"
|
|
14
|
-
},
|
|
15
|
-
"homepage": "https://github.com/blackbaud/skyux-inline-form#readme",
|
|
3
|
+
"version": "5.0.0",
|
|
16
4
|
"peerDependencies": {
|
|
17
|
-
"@angular/animations": "^
|
|
18
|
-
"@angular/common": "^
|
|
19
|
-
"@angular/core": "^
|
|
20
|
-
"@skyux/core": "^
|
|
21
|
-
"@skyux/i18n": "^
|
|
5
|
+
"@angular/animations": "^12.2.7",
|
|
6
|
+
"@angular/common": "^12.2.7",
|
|
7
|
+
"@angular/core": "^12.2.7",
|
|
8
|
+
"@skyux/core": "^5.0.0",
|
|
9
|
+
"@skyux/i18n": "^5.0.0"
|
|
22
10
|
},
|
|
23
11
|
"dependencies": {
|
|
24
|
-
"tslib": "^
|
|
12
|
+
"tslib": "^2.3.1"
|
|
25
13
|
},
|
|
26
14
|
"main": "bundles/skyux-inline-form.umd.js",
|
|
27
|
-
"module": "
|
|
15
|
+
"module": "fesm2015/skyux-inline-form.js",
|
|
28
16
|
"es2015": "fesm2015/skyux-inline-form.js",
|
|
29
|
-
"esm5": "esm5/skyux-inline-form.js",
|
|
30
17
|
"esm2015": "esm2015/skyux-inline-form.js",
|
|
31
|
-
"fesm5": "fesm5/skyux-inline-form.js",
|
|
32
18
|
"fesm2015": "fesm2015/skyux-inline-form.js",
|
|
33
19
|
"typings": "skyux-inline-form.d.ts",
|
|
34
|
-
"metadata": "skyux-inline-form.metadata.json",
|
|
35
20
|
"sideEffects": false
|
|
36
|
-
}
|
|
21
|
+
}
|
|
@@ -4,3 +4,4 @@ export * from './modules/inline-form/types/inline-form-button-config';
|
|
|
4
4
|
export * from './modules/inline-form/types/inline-form-close-args';
|
|
5
5
|
export * from './modules/inline-form/types/inline-form-config';
|
|
6
6
|
export * from './modules/inline-form/types/inline-form-button-layout';
|
|
7
|
+
export { SkyInlineFormComponent as λ1 } from './modules/inline-form/inline-form.component';
|
package/skyux-inline-form.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generated bundle index. Do not edit.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export { SkyInlineFormAdapterService as ɵc } from './modules/inline-form/inline-form-adapter.service';
|
|
7
|
-
export { SkyInlineFormComponent as ɵa } from './modules/inline-form/inline-form.component';
|
|
8
|
-
export { SkyInlineFormResourcesModule as ɵd } from './modules/shared/inline-form-resources.module';
|
|
9
|
-
export { SkyInlineFormResourcesProvider as ɵe } from './plugin-resources/inline-form-resources-provider';
|
|
4
|
+
/// <amd-module name="@skyux/inline-form" />
|
|
5
|
+
export * from './public-api';
|
package/CHANGELOG.md
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# 5.0.0-alpha.0 (2021-05-21)
|
|
2
|
-
|
|
3
|
-
- Removed `BrowserAnimationsModule` from the `imports` section of `SkyInlineFormModule` to support lazy-loading. Consumers of `SkyInlineFormModule` must now import `BrowserAnimationsModule` into their application's root module. [#47](https://github.com/blackbaud/skyux-inline-form/pull/47)
|
|
4
|
-
|
|
5
|
-
# 4.1.1 (2021-03-18)
|
|
6
|
-
|
|
7
|
-
- Replaced theme conditionals in templates with the new `skyThemeIf` directive. [#42](https://github.com/blackbaud/skyux-inline-form/pull/42)
|
|
8
|
-
|
|
9
|
-
# 4.1.0 (2020-08-27)
|
|
10
|
-
|
|
11
|
-
- Added modern theme styles to the inline form component. [#36](https://github.com/blackbaud/skyux-inline-form/pull/36)
|
|
12
|
-
|
|
13
|
-
# 4.0.1 (2020-08-10)
|
|
14
|
-
|
|
15
|
-
- Added support for `@skyux/theme@4.8.0` and `@skyux-sdk/builder@4.3.0`. [#29](https://github.com/blackbaud/skyux-inline-form/pull/29)
|
|
16
|
-
|
|
17
|
-
# 4.0.0 (2020-05-12)
|
|
18
|
-
|
|
19
|
-
### New features
|
|
20
|
-
|
|
21
|
-
- Added support for `@angular/core@^9`. [#18](https://github.com/blackbaud/skyux-inline-form/pull/18)
|
|
22
|
-
- Updated the pipeline to transpile to the [Angular Package Format](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview). [#18](https://github.com/blackbaud/skyux-inline-form/pull/18)
|
|
23
|
-
|
|
24
|
-
### Breaking changes
|
|
25
|
-
|
|
26
|
-
- Dropped support for `rxjs@5`. Consumers can install `rxjs-compat@^6` to support older versions of `rxjs`. [#18](https://github.com/blackbaud/skyux-inline-form/pull/18)
|
|
27
|
-
|
|
28
|
-
# 4.0.0-rc.0 (2020-02-21)
|
|
29
|
-
|
|
30
|
-
### New features
|
|
31
|
-
|
|
32
|
-
- Added support for `@angular/core@^9`. [#18](https://github.com/blackbaud/skyux-inline-form/pull/18)
|
|
33
|
-
- Updated the pipeline to transpile to the [Angular Package Format](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview). [#18](https://github.com/blackbaud/skyux-inline-form/pull/18)
|
|
34
|
-
|
|
35
|
-
### Breaking changes
|
|
36
|
-
|
|
37
|
-
- Dropped support for `rxjs@5`. Consumers can install `rxjs-compat@^6` to support older versions of `rxjs`. [#18](https://github.com/blackbaud/skyux-inline-form/pull/18)
|
|
38
|
-
|
|
39
|
-
# 3.1.0 (2019-12-20)
|
|
40
|
-
|
|
41
|
-
- Added the `disabled` property to `SkyInlineFormButtonConfig` to indicate whether to disable the button. [#15](https://github.com/blackbaud/skyux-inline-form/pull/15)
|
|
42
|
-
|
|
43
|
-
# 3.0.1 (2019-12-13)
|
|
44
|
-
|
|
45
|
-
- Fixed the inline form component to recognize changes to the `config` input. [#10](https://github.com/blackbaud/skyux-inline-form/pull/10) (Thanks [@blackbaud-jeremymorgan](https://github.com/blackbaud-jeremymorgan)!)
|
|
46
|
-
|
|
47
|
-
# 3.0.0 (2019-04-15)
|
|
48
|
-
|
|
49
|
-
- Major version release.
|
|
50
|
-
|
|
51
|
-
# 3.0.0-rc.0 (2019-04-10)
|
|
52
|
-
|
|
53
|
-
- Initial release candidate.
|