@skyux/inline-form 5.5.0 → 5.6.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 +66 -66
- package/documentation.json +20 -20
- package/esm2015/lib/modules/inline-form/animations/slide-dissolve.js.map +1 -1
- package/esm2015/lib/modules/inline-form/inline-form-adapter.service.js +2 -2
- package/esm2015/lib/modules/inline-form/inline-form-adapter.service.js.map +1 -1
- package/esm2015/lib/modules/inline-form/inline-form.component.js +3 -3
- package/esm2015/lib/modules/inline-form/inline-form.component.js.map +1 -1
- package/esm2015/lib/modules/inline-form/inline-form.module.js +1 -1
- package/esm2015/lib/modules/inline-form/inline-form.module.js.map +1 -1
- package/esm2015/lib/modules/inline-form/types/inline-form-config.js.map +1 -1
- package/esm2015/lib/modules/shared/sky-inline-form-resources.module.js +1 -1
- package/esm2015/lib/modules/shared/sky-inline-form-resources.module.js.map +1 -1
- package/fesm2015/skyux-inline-form.js +61 -61
- package/fesm2015/skyux-inline-form.js.map +1 -1
- package/lib/modules/inline-form/inline-form.component.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@skyux/inline-form', ['exports', '@angular/common', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/animations', '@skyux/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux["inline-form"] = {}), global.ng.common, global.ng.core, global.rxjs, global.rxjs.operators, global.ng.animations, global.
|
|
5
|
-
})(this, (function (exports, i4, i0, rxjs, operators, animations,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@skyux/i18n'), require('rxjs'), require('rxjs/operators'), require('@angular/animations'), require('@skyux/core')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@skyux/inline-form', ['exports', '@angular/common', '@angular/core', '@skyux/i18n', 'rxjs', 'rxjs/operators', '@angular/animations', '@skyux/core'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux["inline-form"] = {}), global.ng.common, global.ng.core, global.i2, global.rxjs, global.rxjs.operators, global.ng.animations, global.i3));
|
|
5
|
+
})(this, (function (exports, i4, i0, i2, rxjs, operators, animations, i3) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -27,6 +27,59 @@
|
|
|
27
27
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
28
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
32
|
+
* The contents of this file were automatically generated by
|
|
33
|
+
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-inline-form' schematic.
|
|
34
|
+
* To update this file, simply rerun the command.
|
|
35
|
+
*/
|
|
36
|
+
var RESOURCES = {
|
|
37
|
+
'EN-US': {
|
|
38
|
+
skyux_inline_form_button_cancel: { message: 'Cancel' },
|
|
39
|
+
skyux_inline_form_button_delete: { message: 'Delete' },
|
|
40
|
+
skyux_inline_form_button_done: { message: 'Done' },
|
|
41
|
+
skyux_inline_form_button_save: { message: 'Save' },
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
var SkyInlineFormResourcesProvider = /** @class */ (function () {
|
|
45
|
+
function SkyInlineFormResourcesProvider() {
|
|
46
|
+
}
|
|
47
|
+
SkyInlineFormResourcesProvider.prototype.getString = function (localeInfo, name) {
|
|
48
|
+
return i2.getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
49
|
+
};
|
|
50
|
+
return SkyInlineFormResourcesProvider;
|
|
51
|
+
}());
|
|
52
|
+
/**
|
|
53
|
+
* Import into any component library module that needs to use resource strings.
|
|
54
|
+
*/
|
|
55
|
+
var SkyInlineFormResourcesModule = /** @class */ (function () {
|
|
56
|
+
function SkyInlineFormResourcesModule() {
|
|
57
|
+
}
|
|
58
|
+
return SkyInlineFormResourcesModule;
|
|
59
|
+
}());
|
|
60
|
+
SkyInlineFormResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
61
|
+
SkyInlineFormResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, exports: [i2.SkyI18nModule] });
|
|
62
|
+
SkyInlineFormResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, providers: [
|
|
63
|
+
{
|
|
64
|
+
provide: i2.SKY_LIB_RESOURCES_PROVIDERS,
|
|
65
|
+
useClass: SkyInlineFormResourcesProvider,
|
|
66
|
+
multi: true,
|
|
67
|
+
},
|
|
68
|
+
], imports: [i2.SkyI18nModule] });
|
|
69
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, decorators: [{
|
|
70
|
+
type: i0.NgModule,
|
|
71
|
+
args: [{
|
|
72
|
+
exports: [i2.SkyI18nModule],
|
|
73
|
+
providers: [
|
|
74
|
+
{
|
|
75
|
+
provide: i2.SKY_LIB_RESOURCES_PROVIDERS,
|
|
76
|
+
useClass: SkyInlineFormResourcesProvider,
|
|
77
|
+
multi: true,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
}]
|
|
81
|
+
}] });
|
|
82
|
+
|
|
30
83
|
var skySlideDissolve = animations.trigger('skySlideDissolve', [
|
|
31
84
|
animations.transition('* <=> *', [
|
|
32
85
|
// Expand animations
|
|
@@ -52,15 +105,6 @@
|
|
|
52
105
|
]),
|
|
53
106
|
]);
|
|
54
107
|
|
|
55
|
-
exports.SkyInlineFormButtonLayout = void 0;
|
|
56
|
-
(function (SkyInlineFormButtonLayout) {
|
|
57
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["Custom"] = 0] = "Custom";
|
|
58
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneCancel"] = 1] = "DoneCancel";
|
|
59
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneDeleteCancel"] = 2] = "DoneDeleteCancel";
|
|
60
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveCancel"] = 3] = "SaveCancel";
|
|
61
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveDeleteCancel"] = 4] = "SaveDeleteCancel";
|
|
62
|
-
})(exports.SkyInlineFormButtonLayout || (exports.SkyInlineFormButtonLayout = {}));
|
|
63
|
-
|
|
64
108
|
/* tslint:disable */
|
|
65
109
|
var SKY_TABBABLE_SELECTOR = [
|
|
66
110
|
'a[href]',
|
|
@@ -125,6 +169,15 @@
|
|
|
125
169
|
type: i0.Injectable
|
|
126
170
|
}] });
|
|
127
171
|
|
|
172
|
+
exports.SkyInlineFormButtonLayout = void 0;
|
|
173
|
+
(function (SkyInlineFormButtonLayout) {
|
|
174
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["Custom"] = 0] = "Custom";
|
|
175
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneCancel"] = 1] = "DoneCancel";
|
|
176
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneDeleteCancel"] = 2] = "DoneDeleteCancel";
|
|
177
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveCancel"] = 3] = "SaveCancel";
|
|
178
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveDeleteCancel"] = 4] = "SaveDeleteCancel";
|
|
179
|
+
})(exports.SkyInlineFormButtonLayout || (exports.SkyInlineFormButtonLayout = {}));
|
|
180
|
+
|
|
128
181
|
/**
|
|
129
182
|
* Renders form content in the current view instead of a separate modal.
|
|
130
183
|
*/
|
|
@@ -350,59 +403,6 @@
|
|
|
350
403
|
type: i0.Output
|
|
351
404
|
}] } });
|
|
352
405
|
|
|
353
|
-
/**
|
|
354
|
-
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
355
|
-
* The contents of this file were automatically generated by
|
|
356
|
-
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-inline-form' schematic.
|
|
357
|
-
* To update this file, simply rerun the command.
|
|
358
|
-
*/
|
|
359
|
-
var RESOURCES = {
|
|
360
|
-
'EN-US': {
|
|
361
|
-
skyux_inline_form_button_cancel: { message: 'Cancel' },
|
|
362
|
-
skyux_inline_form_button_delete: { message: 'Delete' },
|
|
363
|
-
skyux_inline_form_button_done: { message: 'Done' },
|
|
364
|
-
skyux_inline_form_button_save: { message: 'Save' },
|
|
365
|
-
},
|
|
366
|
-
};
|
|
367
|
-
var SkyInlineFormResourcesProvider = /** @class */ (function () {
|
|
368
|
-
function SkyInlineFormResourcesProvider() {
|
|
369
|
-
}
|
|
370
|
-
SkyInlineFormResourcesProvider.prototype.getString = function (localeInfo, name) {
|
|
371
|
-
return i2.getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
372
|
-
};
|
|
373
|
-
return SkyInlineFormResourcesProvider;
|
|
374
|
-
}());
|
|
375
|
-
/**
|
|
376
|
-
* Import into any component library module that needs to use resource strings.
|
|
377
|
-
*/
|
|
378
|
-
var SkyInlineFormResourcesModule = /** @class */ (function () {
|
|
379
|
-
function SkyInlineFormResourcesModule() {
|
|
380
|
-
}
|
|
381
|
-
return SkyInlineFormResourcesModule;
|
|
382
|
-
}());
|
|
383
|
-
SkyInlineFormResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
384
|
-
SkyInlineFormResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, exports: [i2.SkyI18nModule] });
|
|
385
|
-
SkyInlineFormResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, providers: [
|
|
386
|
-
{
|
|
387
|
-
provide: i2.SKY_LIB_RESOURCES_PROVIDERS,
|
|
388
|
-
useClass: SkyInlineFormResourcesProvider,
|
|
389
|
-
multi: true,
|
|
390
|
-
},
|
|
391
|
-
], imports: [i2.SkyI18nModule] });
|
|
392
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyInlineFormResourcesModule, decorators: [{
|
|
393
|
-
type: i0.NgModule,
|
|
394
|
-
args: [{
|
|
395
|
-
exports: [i2.SkyI18nModule],
|
|
396
|
-
providers: [
|
|
397
|
-
{
|
|
398
|
-
provide: i2.SKY_LIB_RESOURCES_PROVIDERS,
|
|
399
|
-
useClass: SkyInlineFormResourcesProvider,
|
|
400
|
-
multi: true,
|
|
401
|
-
},
|
|
402
|
-
],
|
|
403
|
-
}]
|
|
404
|
-
}] });
|
|
405
|
-
|
|
406
406
|
var SkyInlineFormModule = /** @class */ (function () {
|
|
407
407
|
function SkyInlineFormModule() {
|
|
408
408
|
}
|
package/documentation.json
CHANGED
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"sources": [
|
|
175
175
|
{
|
|
176
176
|
"fileName": "projects/inline-form/src/modules/inline-form/inline-form.module.ts",
|
|
177
|
-
"line":
|
|
177
|
+
"line": 13,
|
|
178
178
|
"character": 13
|
|
179
179
|
}
|
|
180
180
|
]
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
"sources": [
|
|
213
213
|
{
|
|
214
214
|
"fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
|
|
215
|
-
"line":
|
|
215
|
+
"line": 97,
|
|
216
216
|
"character": 2
|
|
217
217
|
}
|
|
218
218
|
],
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
"sources": [
|
|
310
310
|
{
|
|
311
311
|
"fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
|
|
312
|
-
"line":
|
|
312
|
+
"line": 91,
|
|
313
313
|
"character": 9
|
|
314
314
|
}
|
|
315
315
|
],
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
"sources": [
|
|
349
349
|
{
|
|
350
350
|
"fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
|
|
351
|
-
"line":
|
|
351
|
+
"line": 89,
|
|
352
352
|
"character": 9
|
|
353
353
|
}
|
|
354
354
|
],
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
"sources": [
|
|
400
400
|
{
|
|
401
401
|
"fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
|
|
402
|
-
"line":
|
|
402
|
+
"line": 59,
|
|
403
403
|
"character": 9
|
|
404
404
|
}
|
|
405
405
|
],
|
|
@@ -439,7 +439,7 @@
|
|
|
439
439
|
"sources": [
|
|
440
440
|
{
|
|
441
441
|
"fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
|
|
442
|
-
"line":
|
|
442
|
+
"line": 43,
|
|
443
443
|
"character": 13
|
|
444
444
|
}
|
|
445
445
|
],
|
|
@@ -526,7 +526,7 @@
|
|
|
526
526
|
"sources": [
|
|
527
527
|
{
|
|
528
528
|
"fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
|
|
529
|
-
"line":
|
|
529
|
+
"line": 67,
|
|
530
530
|
"character": 13
|
|
531
531
|
}
|
|
532
532
|
],
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
"sources": [
|
|
600
600
|
{
|
|
601
601
|
"fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
|
|
602
|
-
"line":
|
|
602
|
+
"line": 113,
|
|
603
603
|
"character": 9
|
|
604
604
|
}
|
|
605
605
|
],
|
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
"sources": [
|
|
643
643
|
{
|
|
644
644
|
"fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
|
|
645
|
-
"line":
|
|
645
|
+
"line": 109,
|
|
646
646
|
"character": 9
|
|
647
647
|
}
|
|
648
648
|
],
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
"sources": [
|
|
680
680
|
{
|
|
681
681
|
"fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
|
|
682
|
-
"line":
|
|
682
|
+
"line": 105,
|
|
683
683
|
"character": 9
|
|
684
684
|
}
|
|
685
685
|
],
|
|
@@ -744,7 +744,7 @@
|
|
|
744
744
|
"sources": [
|
|
745
745
|
{
|
|
746
746
|
"fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
|
|
747
|
-
"line":
|
|
747
|
+
"line": 37,
|
|
748
748
|
"character": 13
|
|
749
749
|
}
|
|
750
750
|
],
|
|
@@ -974,7 +974,7 @@
|
|
|
974
974
|
"sources": [
|
|
975
975
|
{
|
|
976
976
|
"fileName": "projects/inline-form/src/modules/inline-form/types/inline-form-config.ts",
|
|
977
|
-
"line":
|
|
977
|
+
"line": 15,
|
|
978
978
|
"character": 2
|
|
979
979
|
}
|
|
980
980
|
],
|
|
@@ -998,7 +998,7 @@
|
|
|
998
998
|
"sources": [
|
|
999
999
|
{
|
|
1000
1000
|
"fileName": "projects/inline-form/src/modules/inline-form/types/inline-form-config.ts",
|
|
1001
|
-
"line":
|
|
1001
|
+
"line": 19,
|
|
1002
1002
|
"character": 2
|
|
1003
1003
|
}
|
|
1004
1004
|
],
|
|
@@ -1025,7 +1025,7 @@
|
|
|
1025
1025
|
"sources": [
|
|
1026
1026
|
{
|
|
1027
1027
|
"fileName": "projects/inline-form/src/modules/inline-form/types/inline-form-config.ts",
|
|
1028
|
-
"line":
|
|
1028
|
+
"line": 7,
|
|
1029
1029
|
"character": 17
|
|
1030
1030
|
}
|
|
1031
1031
|
]
|
|
@@ -1074,12 +1074,12 @@
|
|
|
1074
1074
|
{
|
|
1075
1075
|
"fileName": "inline-form-demo.component.ts",
|
|
1076
1076
|
"filePath": "/projects/inline-form/documentation/code-examples/inline-form/basic/inline-form-demo.component.ts",
|
|
1077
|
-
"rawContents": "import { Component, OnInit } from '@angular/core';\
|
|
1077
|
+
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\nimport {\n SkyInlineFormButtonLayout,\n SkyInlineFormCloseArgs,\n SkyInlineFormConfig,\n} from '@skyux/inline-form';\n\n@Component({\n selector: 'app-inline-form-demo',\n templateUrl: './inline-form-demo.component.html',\n})\nexport class InlineFormDemoComponent implements OnInit {\n public firstName = 'Jane';\n\n public myForm: FormGroup;\n\n public inlineFormConfig: SkyInlineFormConfig = {\n buttonLayout: SkyInlineFormButtonLayout.SaveCancel,\n };\n\n public showForm = false;\n\n constructor(private formBuilder: FormBuilder) {}\n\n public ngOnInit(): void {\n this.myForm = this.formBuilder.group({\n myFirstName: new FormControl(),\n });\n }\n\n public onInlineFormClose(args: SkyInlineFormCloseArgs): void {\n if (args.reason === 'save') {\n this.firstName = this.myForm.get('myFirstName').value;\n }\n\n this.showForm = false;\n this.myForm.patchValue({\n myFirstName: undefined,\n });\n }\n\n public onInlineFormOpen(): void {\n this.showForm = true;\n this.myForm.patchValue({\n myFirstName: this.firstName,\n });\n }\n}\n"
|
|
1078
1078
|
},
|
|
1079
1079
|
{
|
|
1080
1080
|
"fileName": "inline-form-demo.module.ts",
|
|
1081
1081
|
"filePath": "/projects/inline-form/documentation/code-examples/inline-form/basic/inline-form-demo.module.ts",
|
|
1082
|
-
"rawContents": "import { CommonModule } from '@angular/common';\
|
|
1082
|
+
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport { SkyInputBoxModule } from '@skyux/forms';\nimport { SkyIconModule } from '@skyux/indicators';\nimport { SkyInlineFormModule } from '@skyux/inline-form';\n\nimport { InlineFormDemoComponent } from './inline-form-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIconModule,\n SkyIdModule,\n SkyInlineFormModule,\n SkyInputBoxModule,\n ],\n exports: [InlineFormDemoComponent],\n declarations: [InlineFormDemoComponent],\n})\nexport class InlineFormDemoModule {}\n"
|
|
1083
1083
|
},
|
|
1084
1084
|
{
|
|
1085
1085
|
"fileName": "inline-form-demo.component.html",
|
|
@@ -1089,12 +1089,12 @@
|
|
|
1089
1089
|
{
|
|
1090
1090
|
"fileName": "inline-form-demo.component.ts",
|
|
1091
1091
|
"filePath": "/projects/inline-form/documentation/code-examples/inline-form/custom-buttons/inline-form-demo.component.ts",
|
|
1092
|
-
"rawContents": "import { Component, OnInit } from '@angular/core';\
|
|
1092
|
+
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\nimport {\n SkyInlineFormButtonLayout,\n SkyInlineFormCloseArgs,\n SkyInlineFormConfig,\n} from '@skyux/inline-form';\n\n@Component({\n selector: 'app-inline-form-demo',\n templateUrl: './inline-form-demo.component.html',\n})\nexport class InlineFormDemoComponent implements OnInit {\n public firstName = 'Jane';\n\n public myForm: FormGroup;\n\n public inlineFormConfig: SkyInlineFormConfig = {\n buttonLayout: SkyInlineFormButtonLayout.Custom,\n buttons: [\n {\n action: 'save',\n text: 'Save',\n styleType: 'primary',\n },\n {\n action: 'delete',\n text: 'Delete',\n styleType: 'default',\n },\n {\n action: 'reset',\n text: 'Reset',\n styleType: 'default',\n },\n {\n action: 'cancel',\n text: 'Cancel',\n styleType: 'link',\n },\n ],\n };\n\n public showForm = false;\n\n constructor(private formBuilder: FormBuilder) {}\n\n public ngOnInit(): void {\n this.myForm = this.formBuilder.group({\n myFirstName: new FormControl(),\n });\n\n this.myForm.valueChanges.subscribe(() => {\n if (this.inlineFormConfig.buttons[0].disabled !== this.myForm.invalid) {\n this.inlineFormConfig.buttons[0].disabled = this.myForm.invalid;\n this.inlineFormConfig = { ...{}, ...this.inlineFormConfig };\n }\n });\n }\n\n public onInlineFormClose(args: SkyInlineFormCloseArgs): void {\n if (args.reason === 'save') {\n this.firstName = this.myForm.get('myFirstName').value;\n }\n\n this.showForm = false;\n this.myForm.patchValue({\n myFirstName: undefined,\n });\n }\n\n public onInlineFormOpen(): void {\n this.showForm = true;\n this.myForm.patchValue({\n myFirstName: this.firstName,\n });\n }\n}\n"
|
|
1093
1093
|
},
|
|
1094
1094
|
{
|
|
1095
1095
|
"fileName": "inline-form-demo.module.ts",
|
|
1096
1096
|
"filePath": "/projects/inline-form/documentation/code-examples/inline-form/custom-buttons/inline-form-demo.module.ts",
|
|
1097
|
-
"rawContents": "import { CommonModule } from '@angular/common';\
|
|
1097
|
+
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport { SkyInputBoxModule } from '@skyux/forms';\nimport { SkyIconModule } from '@skyux/indicators';\nimport { SkyInlineFormModule } from '@skyux/inline-form';\n\nimport { InlineFormDemoComponent } from './inline-form-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIconModule,\n SkyIdModule,\n SkyInlineFormModule,\n SkyInputBoxModule,\n ],\n exports: [InlineFormDemoComponent],\n declarations: [InlineFormDemoComponent],\n})\nexport class InlineFormDemoModule {}\n"
|
|
1098
1098
|
},
|
|
1099
1099
|
{
|
|
1100
1100
|
"fileName": "inline-form-demo.component.html",
|
|
@@ -1109,12 +1109,12 @@
|
|
|
1109
1109
|
{
|
|
1110
1110
|
"fileName": "inline-form-demo.component.ts",
|
|
1111
1111
|
"filePath": "/projects/inline-form/documentation/code-examples/inline-form/repeaters/inline-form-demo.component.ts",
|
|
1112
|
-
"rawContents": "import { Component, OnInit } from '@angular/core';\
|
|
1112
|
+
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\nimport {\n SkyInlineFormButtonLayout,\n SkyInlineFormCloseArgs,\n SkyInlineFormConfig,\n} from '@skyux/inline-form';\n\n@Component({\n selector: 'app-inline-form-demo',\n templateUrl: './inline-form-demo.component.html',\n styleUrls: ['./inline-form-demo.component.scss'],\n})\nexport class InlineFormDemoComponent implements OnInit {\n public activeInlineFormId: string;\n\n public inlineFormConfig: SkyInlineFormConfig = {\n buttonLayout: SkyInlineFormButtonLayout.SaveCancel,\n };\n\n public items: any[] = [\n {\n id: '1',\n title: '2019 Spring Gala',\n note: 'Gala for friends and family',\n },\n {\n id: '2',\n title: '2019 Special Winter Event',\n note: 'A special event',\n },\n {\n id: '3',\n title: '2019 Donor Appreciation Event',\n note: 'Event for all donors and families',\n },\n {\n id: '4',\n title: '2020 Spring Gala',\n note: 'Gala for friends and family',\n },\n ];\n\n public myForm: FormGroup;\n\n constructor(private formBuilder: FormBuilder) {}\n\n public ngOnInit(): void {\n this.myForm = this.formBuilder.group({\n id: new FormControl(),\n title: new FormControl(),\n note: new FormControl(),\n });\n }\n\n public showInlineForm(item: any): void {\n this.activeInlineFormId = item.id;\n this.myForm.patchValue({\n note: item.note,\n title: item.title,\n });\n }\n\n public onInlineFormClose(args: SkyInlineFormCloseArgs): void {\n if (args.reason === 'save') {\n const found = this.items.find(\n (item) => item.id === this.activeInlineFormId\n );\n found.note = this.myForm.get('note').value;\n found.title = this.myForm.get('title').value;\n }\n\n this.myForm.patchValue({\n note: undefined,\n title: undefined,\n });\n\n // Close the active form.\n this.activeInlineFormId = undefined;\n }\n}\n"
|
|
1113
1113
|
},
|
|
1114
1114
|
{
|
|
1115
1115
|
"fileName": "inline-form-demo.module.ts",
|
|
1116
1116
|
"filePath": "/projects/inline-form/documentation/code-examples/inline-form/repeaters/inline-form-demo.module.ts",
|
|
1117
|
-
"rawContents": "import { CommonModule } from '@angular/common';\
|
|
1117
|
+
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport { SkyInputBoxModule } from '@skyux/forms';\nimport { SkyIconModule } from '@skyux/indicators';\nimport { SkyInlineFormModule } from '@skyux/inline-form';\nimport { SkyRepeaterModule } from '@skyux/lists';\n\nimport { InlineFormDemoComponent } from './inline-form-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIconModule,\n SkyIdModule,\n SkyInlineFormModule,\n SkyInputBoxModule,\n SkyRepeaterModule,\n ],\n exports: [InlineFormDemoComponent],\n declarations: [InlineFormDemoComponent],\n})\nexport class InlineFormDemoModule {}\n"
|
|
1118
1118
|
}
|
|
1119
1119
|
]
|
|
1120
1120
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slide-dissolve.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/animations/slide-dissolve.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"slide-dissolve.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/animations/slide-dissolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,EACP,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,OAAO,GACR,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,gBAAgB,GAA6B,OAAO,CAC/D,kBAAkB,EAClB;IAC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nimationTriggerMetadata,\n animate,\n group,\n query,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\nexport const skySlideDissolve: AnimationTriggerMetadata = trigger(\n 'skySlideDissolve',\n [\n transition('* <=> *', [\n // Expand animations\n query(\n '.sky-slide-dissolve-last:enter',\n [\n style({ height: 0, opacity: 0 }),\n animate('200ms ease-in', style({ height: '*', opacity: 0 })),\n ],\n { optional: true }\n ),\n query(\n '.sky-slide-dissolve-last:enter',\n [\n style({ opacity: 0 }),\n animate('200ms ease-in', style({ opacity: 1 })),\n ],\n { optional: true }\n ),\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(\n '.sky-slide-dissolve-last:leave',\n [animate('0ms', style({ opacity: 0 }))],\n { optional: true }\n ),\n\n group([\n query(\n '.sky-slide-dissolve-first:enter',\n [\n style({ opacity: 0, height: 0 }),\n animate('100ms ease-in', style({ opacity: 1, height: '*' })),\n ],\n { optional: true }\n ),\n query(\n '.sky-slide-dissolve-last:leave',\n [animate('200ms ease-in', style({ height: 0 }))],\n { optional: true }\n ),\n ]),\n ]),\n ]\n);\n"]}
|
|
@@ -25,8 +25,8 @@ export class SkyInlineFormAdapterService {
|
|
|
25
25
|
inputWithAutofocus.focus();
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
const focusEl = inlineFormElementRef.nativeElement.querySelector('.sky-inline-form-content');
|
|
29
|
+
const focusableChildren = this.loadFocusableChildren(focusEl);
|
|
30
30
|
this.focusFirstElement(focusableChildren);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-form-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,eAAe,CAAC;;AAEvD,oBAAoB;AACpB,MAAM,qBAAqB,GAAG;IAC5B,SAAS;IACT,YAAY;IACZ,4CAA4C;IAC5C,6CAA6C;IAC7C,6CAA6C;IAC7C,+CAA+C;IAC/C,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,kCAAkC;IAClC,yBAAyB;CAC1B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACb,mBAAmB;AAEnB;;GAEG;AAEH,MAAM,OAAO,2BAA2B;IAC/B,cAAc,CAAC,oBAAgC;QACpD,MAAM,kBAAkB,GACtB,oBAAoB,CAAC,aAAa,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QAElE,IAAI,kBAAkB,EAAE;YACtB,kBAAkB,CAAC,KAAK,EAAE,CAAC;SAC5B;aAAM;YACL,
|
|
1
|
+
{"version":3,"file":"inline-form-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,eAAe,CAAC;;AAEvD,oBAAoB;AACpB,MAAM,qBAAqB,GAAG;IAC5B,SAAS;IACT,YAAY;IACZ,4CAA4C;IAC5C,6CAA6C;IAC7C,6CAA6C;IAC7C,+CAA+C;IAC/C,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,kCAAkC;IAClC,yBAAyB;CAC1B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACb,mBAAmB;AAEnB;;GAEG;AAEH,MAAM,OAAO,2BAA2B;IAC/B,cAAc,CAAC,oBAAgC;QACpD,MAAM,kBAAkB,GACtB,oBAAoB,CAAC,aAAa,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QAElE,IAAI,kBAAkB,EAAE;YACtB,kBAAkB,CAAC,KAAK,EAAE,CAAC;SAC5B;aAAM;YACL,MAAM,OAAO,GACX,oBAAoB,CAAC,aAAa,CAAC,aAAa,CAC9C,0BAA0B,CAC3B,CAAC;YACJ,MAAM,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;YAE9D,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;SAC3C;IACH,CAAC;IAEO,qBAAqB,CAAC,IAAiB;QAC7C,MAAM,QAAQ,GAAuB,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAC7D,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAC7C,CAAC;QAEF,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;YACjC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,SAAS,CAAC,OAAoB;QACpC,MAAM,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,KAAK,MAAM,IAAI,KAAK,CAAC,UAAU,KAAK,QAAQ,CAAC;QAC3E,IAAI,QAAQ,EAAE;YACZ,OAAO,KAAK,CAAC;SACd;QAED,0BAA0B;QAC1B,MAAM,SAAS,GAAG,CAAC,CAAC,CAClB,OAAO,CAAC,WAAW;YACnB,OAAO,CAAC,YAAY;YACpB,OAAO,CAAC,cAAc,EAAE,CAAC,MAAM,CAChC,CAAC;QACF,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,iBAAiB,CAAC,IAAwB;QAChD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;SACjB;IACH,CAAC;;yHAhDU,2BAA2B;6HAA3B,2BAA2B;4FAA3B,2BAA2B;kBADvC,UAAU","sourcesContent":["import { ElementRef, Injectable } 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 public applyAutofocus(inlineFormElementRef: ElementRef): void {\n const inputWithAutofocus =\n inlineFormElementRef.nativeElement.querySelector('[autofocus]');\n\n if (inputWithAutofocus) {\n inputWithAutofocus.focus();\n } else {\n const focusEl: HTMLElement =\n inlineFormElementRef.nativeElement.querySelector(\n '.sky-inline-form-content'\n );\n const focusableChildren = this.loadFocusableChildren(focusEl);\n\n this.focusFirstElement(focusableChildren);\n }\n }\n\n private loadFocusableChildren(elem: HTMLElement): HTMLElement[] {\n const elements: Array<HTMLElement> = Array.prototype.slice.call(\n elem.querySelectorAll(SKY_TABBABLE_SELECTOR)\n );\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"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, Output, TemplateRef, } from '@angular/core';
|
|
2
2
|
import { SkyAppWindowRef } from '@skyux/core';
|
|
3
3
|
import { SkyLibResourcesService } from '@skyux/i18n';
|
|
4
4
|
import { zip as observableZip } from 'rxjs';
|
|
5
5
|
import { take } from 'rxjs/operators';
|
|
6
6
|
import { skySlideDissolve } from './animations/slide-dissolve';
|
|
7
|
-
import { SkyInlineFormButtonLayout } from './types/inline-form-button-layout';
|
|
8
7
|
import { SkyInlineFormAdapterService } from './inline-form-adapter.service';
|
|
8
|
+
import { SkyInlineFormButtonLayout } from './types/inline-form-button-layout';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
import * as i1 from "./inline-form-adapter.service";
|
|
11
11
|
import * as i2 from "@skyux/i18n";
|
|
@@ -83,7 +83,7 @@ export class SkyInlineFormComponent {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
getPresetButtons() {
|
|
86
|
-
|
|
86
|
+
const buttonType = this.config
|
|
87
87
|
? this.config.buttonLayout
|
|
88
88
|
: SkyInlineFormButtonLayout.DoneCancel;
|
|
89
89
|
let promise;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-form.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.component.ts","../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,KAAK,EAGL,MAAM,EACN,WAAW,GACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAI/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAM9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;;;;;;AAE5E;;GAEG;AASH,MAAM,OAAO,sBAAsB;IA4DjC,YACU,OAAoC,EACpC,UAAsB,EACtB,gBAAwC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C,EAAE,EAAE;YAC1D,0BAA0B;YAC1B,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,SAAS,CAAC;YAEhD,OAAO,CAAC,IAAI,CAAC;gBACX,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,SAAS,EAAE,SAAS;gBACpB,IAAI,EAAE,MAAM,CAAC,IAAI;aACW,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,mBAAmB,CAAC,MAA2B;QACrD,OAAO,CACL,MAAM;YACN,MAAM,CAAC,YAAY,KAAK,yBAAyB,CAAC,MAAM;YACxD,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAC1B,CAAC;IACJ,CAAC;;oHA5PU,sBAAsB;wGAAtB,sBAAsB,iJAHtB,CAAC,2BAA2B,CAAC,0BCzC1C,k4BAyBA,uzCDiBc,CAAC,gBAAgB,CAAC;4FAEnB,sBAAsB;kBARlC,SAAS;mBAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,WAAW,EAAE,8BAA8B;oBAC3C,SAAS,EAAE,CAAC,8BAA8B,CAAC;oBAC3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,SAAS,EAAE,CAAC,2BAA2B,CAAC;oBACxC,UAAU,EAAE,CAAC,gBAAgB,CAAC;iBAC/B;8OAOY,MAAM;sBADhB,KAAK;gBAiBC,QAAQ;sBADd,KAAK;gBASK,QAAQ;sBADlB,KAAK;gBAuBC,KAAK;sBAFX,MAAM","sourcesContent":["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 { SkyAppWindowRef } from '@skyux/core';\n\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { zip as observableZip } from 'rxjs';\n\nimport { take } from 'rxjs/operators';\n\nimport { skySlideDissolve } from './animations/slide-dissolve';\n\nimport { SkyInlineFormButtonConfig } from './types/inline-form-button-config';\n\nimport { SkyInlineFormButtonLayout } from './types/inline-form-button-layout';\n\nimport { SkyInlineFormCloseArgs } from './types/inline-form-close-args';\n\nimport { SkyInlineFormConfig } from './types/inline-form-config';\n\nimport { SkyInlineFormAdapterService } 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: [SkyInlineFormAdapterService],\n animations: [skySlideDissolve],\n})\nexport class SkyInlineFormComponent implements OnInit, OnDestroy {\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 // eslint-disable-next-line @angular-eslint/no-output-native\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 = this.config\n ? this.config.buttonLayout\n : 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[]>(\n (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 });\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[]>(\n (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 });\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[]>(\n (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 });\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[]>(\n (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 });\n break;\n }\n\n return promise;\n }\n\n private getCustomButtons(\n buttonConfigs: SkyInlineFormButtonConfig[]\n ): 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","<div [@skySlideDissolve]=\"showForm\">\n <div *ngIf=\"!showForm\" class=\"sky-slide-dissolve-first\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"template && showForm\" class=\"sky-slide-dissolve-last\">\n <div class=\"sky-inline-form sky-shadow sky-box sky-elevation-3\">\n <div class=\"sky-inline-form-content\">\n <ng-container [ngTemplateOutlet]=\"template\"> </ng-container>\n </div>\n <div class=\"sky-inline-form-footer\">\n <button\n *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</div>\n"]}
|
|
1
|
+
{"version":3,"file":"inline-form.component.js","sourceRoot":"","sources":["../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.component.ts","../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,KAAK,EAGL,MAAM,EACN,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;;;;;;AAI9E;;GAEG;AASH,MAAM,OAAO,sBAAsB;IA4DjC,YACU,OAAoC,EACpC,UAAsB,EACtB,gBAAwC,EACxC,eAAgC,EAChC,iBAAoC;QAJpC,YAAO,GAAP,OAAO,CAA6B;QACpC,eAAU,GAAV,UAAU,CAAY;QACtB,qBAAgB,GAA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,IAAI,CAAC;gBACX,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,SAAS,EAAE,SAAS;gBACpB,IAAI,EAAE,MAAM,CAAC,IAAI;aACW,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,mBAAmB,CAAC,MAA2B;QACrD,OAAO,CACL,MAAM;YACN,MAAM,CAAC,YAAY,KAAK,yBAAyB,CAAC,MAAM;YACxD,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAC1B,CAAC;IACJ,CAAC;;oHA5PU,sBAAsB;wGAAtB,sBAAsB,iJAHtB,CAAC,2BAA2B,CAAC,0BCjC1C,k4BAyBA,uzCDSc,CAAC,gBAAgB,CAAC;4FAEnB,sBAAsB;kBARlC,SAAS;mBAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,WAAW,EAAE,8BAA8B;oBAC3C,SAAS,EAAE,CAAC,8BAA8B,CAAC;oBAC3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,SAAS,EAAE,CAAC,2BAA2B,CAAC;oBACxC,UAAU,EAAE,CAAC,gBAAgB,CAAC;iBAC/B;8OAOY,MAAM;sBADhB,KAAK;gBAiBC,QAAQ;sBADd,KAAK;gBASK,QAAQ;sBADlB,KAAK;gBAuBC,KAAK;sBAFX,MAAM","sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n} from '@angular/core';\nimport { SkyAppWindowRef } from '@skyux/core';\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { zip as observableZip } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport { skySlideDissolve } from './animations/slide-dissolve';\nimport { SkyInlineFormAdapterService } from './inline-form-adapter.service';\nimport { SkyInlineFormButtonConfig } from './types/inline-form-button-config';\nimport { SkyInlineFormButtonLayout } from './types/inline-form-button-layout';\nimport { SkyInlineFormCloseArgs } from './types/inline-form-close-args';\nimport { SkyInlineFormConfig } from './types/inline-form-config';\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: [SkyInlineFormAdapterService],\n animations: [skySlideDissolve],\n})\nexport class SkyInlineFormComponent implements OnInit, OnDestroy {\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 // eslint-disable-next-line @angular-eslint/no-output-native\n public close = new EventEmitter<SkyInlineFormCloseArgs>();\n\n public buttons: SkyInlineFormButtonConfig[];\n\n private _config: SkyInlineFormConfig;\n\n private _showForm = 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 const buttonType = this.config\n ? this.config.buttonLayout\n : 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[]>(\n (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 });\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[]>(\n (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 });\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[]>(\n (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 });\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[]>(\n (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 });\n break;\n }\n\n return promise;\n }\n\n private getCustomButtons(\n buttonConfigs: SkyInlineFormButtonConfig[]\n ): 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","<div [@skySlideDissolve]=\"showForm\">\n <div *ngIf=\"!showForm\" class=\"sky-slide-dissolve-first\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"template && showForm\" class=\"sky-slide-dissolve-last\">\n <div class=\"sky-inline-form sky-shadow sky-box sky-elevation-3\">\n <div class=\"sky-inline-form-content\">\n <ng-container [ngTemplateOutlet]=\"template\"> </ng-container>\n </div>\n <div class=\"sky-inline-form-footer\">\n <button\n *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</div>\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
2
|
import { NgModule } from '@angular/core';
|
|
3
|
-
import { SkyInlineFormComponent } from './inline-form.component';
|
|
4
3
|
import { SkyInlineFormResourcesModule } from '../shared/sky-inline-form-resources.module';
|
|
4
|
+
import { SkyInlineFormComponent } from './inline-form.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export class SkyInlineFormModule {
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-form.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"inline-form.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;;AAOjE,MAAM,OAAO,mBAAmB;;iHAAnB,mBAAmB;kHAAnB,mBAAmB,iBAJf,sBAAsB,aAC3B,YAAY,EAAE,4BAA4B,aAC1C,sBAAsB;kHAErB,mBAAmB,YAHrB,CAAC,YAAY,EAAE,4BAA4B,CAAC;4FAG1C,mBAAmB;kBAL/B,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,YAAY,EAAE,4BAA4B,CAAC;oBACrD,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBAClC","sourcesContent":["import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SkyInlineFormResourcesModule } from '../shared/sky-inline-form-resources.module';\n\nimport { SkyInlineFormComponent } from './inline-form.component';\n\n@NgModule({\n declarations: [SkyInlineFormComponent],\n imports: [CommonModule, SkyInlineFormResourcesModule],\n exports: [SkyInlineFormComponent],\n})\nexport class SkyInlineFormModule {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-form-config.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/types/inline-form-config.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyInlineFormButtonConfig } from './inline-form-button-config';\
|
|
1
|
+
{"version":3,"file":"inline-form-config.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/types/inline-form-config.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyInlineFormButtonConfig } from './inline-form-button-config';\nimport { SkyInlineFormButtonLayout } from './inline-form-button-layout';\n\n/**\n * Specifies configuration options for the buttons to display with the inline form.\n */\nexport interface SkyInlineFormConfig {\n /**\n * Specifies the buttons to display with the inline form. The valid options are `Custom`\n * for custom buttons, `DoneCancel` for Done and Cancel buttons, `DoneDeleteCancel` for Done,\n * Delete, and Cancel buttons, `SaveCancel` for Save and Cancel buttons, and `SaveDeleteCancel`\n * for Save, Delete, and Cancel buttons.\n * @required\n */\n buttonLayout: SkyInlineFormButtonLayout;\n /**\n * Specifies configuration options for the inline form's buttons.\n */\n buttons?: SkyInlineFormButtonConfig[];\n}\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* To update this file, simply rerun the command.
|
|
6
6
|
*/
|
|
7
7
|
import { NgModule } from '@angular/core';
|
|
8
|
-
import {
|
|
8
|
+
import { SKY_LIB_RESOURCES_PROVIDERS, SkyI18nModule, getLibStringForLocale, } from '@skyux/i18n';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
const RESOURCES = {
|
|
11
11
|
'EN-US': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sky-inline-form-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/inline-form/src/lib/modules/shared/sky-inline-form-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"sky-inline-form-resources.module.js","sourceRoot":"","sources":["../../../../../../../../libs/components/inline-form/src/lib/modules/shared/sky-inline-form-resources.module.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,2BAA2B,EAE3B,aAAa,EAGb,qBAAqB,GACtB,MAAM,aAAa,CAAC;;AAErB,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE;QACP,+BAA+B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACtD,+BAA+B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACtD,6BAA6B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAClD,6BAA6B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;KACnD;CACF,CAAC;AAEF,MAAM,OAAO,8BAA8B;IAClC,SAAS,CAAC,UAA4B,EAAE,IAAY;QACzD,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;CACF;AAED;;GAEG;AAWH,MAAM,OAAO,4BAA4B;;0HAA5B,4BAA4B;2HAA5B,4BAA4B,YAT7B,aAAa;2HASZ,4BAA4B,aAR5B;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,8BAA8B;YACxC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,4BAA4B;kBAVxC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,8BAA8B;4BACxC,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF","sourcesContent":["/**\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 */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\n skyux_inline_form_button_cancel: { message: 'Cancel' },\n skyux_inline_form_button_delete: { message: 'Delete' },\n skyux_inline_form_button_done: { message: 'Done' },\n skyux_inline_form_button_save: { message: 'Save' },\n },\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 {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyInlineFormResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyInlineFormResourcesModule {}\n"]}
|
|
@@ -1,14 +1,61 @@
|
|
|
1
1
|
import * as i4 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, Input, Output
|
|
5
|
-
import * as i3 from '@skyux/core';
|
|
4
|
+
import { NgModule, Injectable, EventEmitter, Component, ChangeDetectionStrategy, Input, Output } from '@angular/core';
|
|
6
5
|
import * as i2 from '@skyux/i18n';
|
|
7
6
|
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
7
|
+
import * as i3 from '@skyux/core';
|
|
8
8
|
import { zip } from 'rxjs';
|
|
9
9
|
import { take } from 'rxjs/operators';
|
|
10
10
|
import { trigger, transition, query, style, animate, group } from '@angular/animations';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
14
|
+
* The contents of this file were automatically generated by
|
|
15
|
+
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-inline-form' schematic.
|
|
16
|
+
* To update this file, simply rerun the command.
|
|
17
|
+
*/
|
|
18
|
+
const RESOURCES = {
|
|
19
|
+
'EN-US': {
|
|
20
|
+
skyux_inline_form_button_cancel: { message: 'Cancel' },
|
|
21
|
+
skyux_inline_form_button_delete: { message: 'Delete' },
|
|
22
|
+
skyux_inline_form_button_done: { message: 'Done' },
|
|
23
|
+
skyux_inline_form_button_save: { message: 'Save' },
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
class SkyInlineFormResourcesProvider {
|
|
27
|
+
getString(localeInfo, name) {
|
|
28
|
+
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Import into any component library module that needs to use resource strings.
|
|
33
|
+
*/
|
|
34
|
+
class SkyInlineFormResourcesModule {
|
|
35
|
+
}
|
|
36
|
+
SkyInlineFormResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
37
|
+
SkyInlineFormResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormResourcesModule, exports: [SkyI18nModule] });
|
|
38
|
+
SkyInlineFormResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormResourcesModule, providers: [
|
|
39
|
+
{
|
|
40
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
41
|
+
useClass: SkyInlineFormResourcesProvider,
|
|
42
|
+
multi: true,
|
|
43
|
+
},
|
|
44
|
+
], imports: [SkyI18nModule] });
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormResourcesModule, decorators: [{
|
|
46
|
+
type: NgModule,
|
|
47
|
+
args: [{
|
|
48
|
+
exports: [SkyI18nModule],
|
|
49
|
+
providers: [
|
|
50
|
+
{
|
|
51
|
+
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
52
|
+
useClass: SkyInlineFormResourcesProvider,
|
|
53
|
+
multi: true,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
}]
|
|
57
|
+
}] });
|
|
58
|
+
|
|
12
59
|
const skySlideDissolve = trigger('skySlideDissolve', [
|
|
13
60
|
transition('* <=> *', [
|
|
14
61
|
// Expand animations
|
|
@@ -34,15 +81,6 @@ const skySlideDissolve = trigger('skySlideDissolve', [
|
|
|
34
81
|
]),
|
|
35
82
|
]);
|
|
36
83
|
|
|
37
|
-
var SkyInlineFormButtonLayout;
|
|
38
|
-
(function (SkyInlineFormButtonLayout) {
|
|
39
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["Custom"] = 0] = "Custom";
|
|
40
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneCancel"] = 1] = "DoneCancel";
|
|
41
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneDeleteCancel"] = 2] = "DoneDeleteCancel";
|
|
42
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveCancel"] = 3] = "SaveCancel";
|
|
43
|
-
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveDeleteCancel"] = 4] = "SaveDeleteCancel";
|
|
44
|
-
})(SkyInlineFormButtonLayout || (SkyInlineFormButtonLayout = {}));
|
|
45
|
-
|
|
46
84
|
/* tslint:disable */
|
|
47
85
|
const SKY_TABBABLE_SELECTOR = [
|
|
48
86
|
'a[href]',
|
|
@@ -68,8 +106,8 @@ class SkyInlineFormAdapterService {
|
|
|
68
106
|
inputWithAutofocus.focus();
|
|
69
107
|
}
|
|
70
108
|
else {
|
|
71
|
-
|
|
72
|
-
|
|
109
|
+
const focusEl = inlineFormElementRef.nativeElement.querySelector('.sky-inline-form-content');
|
|
110
|
+
const focusableChildren = this.loadFocusableChildren(focusEl);
|
|
73
111
|
this.focusFirstElement(focusableChildren);
|
|
74
112
|
}
|
|
75
113
|
}
|
|
@@ -103,6 +141,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
103
141
|
type: Injectable
|
|
104
142
|
}] });
|
|
105
143
|
|
|
144
|
+
var SkyInlineFormButtonLayout;
|
|
145
|
+
(function (SkyInlineFormButtonLayout) {
|
|
146
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["Custom"] = 0] = "Custom";
|
|
147
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneCancel"] = 1] = "DoneCancel";
|
|
148
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["DoneDeleteCancel"] = 2] = "DoneDeleteCancel";
|
|
149
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveCancel"] = 3] = "SaveCancel";
|
|
150
|
+
SkyInlineFormButtonLayout[SkyInlineFormButtonLayout["SaveDeleteCancel"] = 4] = "SaveDeleteCancel";
|
|
151
|
+
})(SkyInlineFormButtonLayout || (SkyInlineFormButtonLayout = {}));
|
|
152
|
+
|
|
106
153
|
/**
|
|
107
154
|
* Renders form content in the current view instead of a separate modal.
|
|
108
155
|
*/
|
|
@@ -175,7 +222,7 @@ class SkyInlineFormComponent {
|
|
|
175
222
|
});
|
|
176
223
|
}
|
|
177
224
|
getPresetButtons() {
|
|
178
|
-
|
|
225
|
+
const buttonType = this.config
|
|
179
226
|
? this.config.buttonLayout
|
|
180
227
|
: SkyInlineFormButtonLayout.DoneCancel;
|
|
181
228
|
let promise;
|
|
@@ -317,53 +364,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
317
364
|
type: Output
|
|
318
365
|
}] } });
|
|
319
366
|
|
|
320
|
-
/**
|
|
321
|
-
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
322
|
-
* The contents of this file were automatically generated by
|
|
323
|
-
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/sky-inline-form' schematic.
|
|
324
|
-
* To update this file, simply rerun the command.
|
|
325
|
-
*/
|
|
326
|
-
const RESOURCES = {
|
|
327
|
-
'EN-US': {
|
|
328
|
-
skyux_inline_form_button_cancel: { message: 'Cancel' },
|
|
329
|
-
skyux_inline_form_button_delete: { message: 'Delete' },
|
|
330
|
-
skyux_inline_form_button_done: { message: 'Done' },
|
|
331
|
-
skyux_inline_form_button_save: { message: 'Save' },
|
|
332
|
-
},
|
|
333
|
-
};
|
|
334
|
-
class SkyInlineFormResourcesProvider {
|
|
335
|
-
getString(localeInfo, name) {
|
|
336
|
-
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* Import into any component library module that needs to use resource strings.
|
|
341
|
-
*/
|
|
342
|
-
class SkyInlineFormResourcesModule {
|
|
343
|
-
}
|
|
344
|
-
SkyInlineFormResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
345
|
-
SkyInlineFormResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormResourcesModule, exports: [SkyI18nModule] });
|
|
346
|
-
SkyInlineFormResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormResourcesModule, providers: [
|
|
347
|
-
{
|
|
348
|
-
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
349
|
-
useClass: SkyInlineFormResourcesProvider,
|
|
350
|
-
multi: true,
|
|
351
|
-
},
|
|
352
|
-
], imports: [SkyI18nModule] });
|
|
353
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormResourcesModule, decorators: [{
|
|
354
|
-
type: NgModule,
|
|
355
|
-
args: [{
|
|
356
|
-
exports: [SkyI18nModule],
|
|
357
|
-
providers: [
|
|
358
|
-
{
|
|
359
|
-
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
360
|
-
useClass: SkyInlineFormResourcesProvider,
|
|
361
|
-
multi: true,
|
|
362
|
-
},
|
|
363
|
-
],
|
|
364
|
-
}]
|
|
365
|
-
}] });
|
|
366
|
-
|
|
367
367
|
class SkyInlineFormModule {
|
|
368
368
|
}
|
|
369
369
|
SkyInlineFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-inline-form.js","sources":["../../../../../libs/components/inline-form/src/lib/modules/inline-form/animations/slide-dissolve.ts","../../../../../libs/components/inline-form/src/lib/modules/inline-form/types/inline-form-button-layout.ts","../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form-adapter.service.ts","../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.component.ts","../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.component.html","../../../../../libs/components/inline-form/src/lib/modules/shared/sky-inline-form-resources.module.ts","../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.module.ts","../../../../../libs/components/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(\n 'skySlideDissolve',\n [\n transition('* <=> *', [\n // Expand animations\n query(\n '.sky-slide-dissolve-last:enter',\n [\n style({ height: 0, opacity: 0 }),\n animate('200ms ease-in', style({ height: '*', opacity: 0 })),\n ],\n { optional: true }\n ),\n query(\n '.sky-slide-dissolve-last:enter',\n [\n style({ opacity: 0 }),\n animate('200ms ease-in', style({ opacity: 1 })),\n ],\n { optional: true }\n ),\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(\n '.sky-slide-dissolve-last:leave',\n [animate('0ms', style({ opacity: 0 }))],\n { optional: true }\n ),\n\n group([\n query(\n '.sky-slide-dissolve-first:enter',\n [\n style({ opacity: 0, height: 0 }),\n animate('100ms ease-in', style({ opacity: 1, height: '*' })),\n ],\n { optional: true }\n ),\n query(\n '.sky-slide-dissolve-last:leave',\n [animate('200ms ease-in', style({ height: 0 }))],\n { optional: true }\n ),\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 { ElementRef, Injectable } 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 public applyAutofocus(inlineFormElementRef: ElementRef): void {\n const inputWithAutofocus =\n inlineFormElementRef.nativeElement.querySelector('[autofocus]');\n\n if (inputWithAutofocus) {\n inputWithAutofocus.focus();\n } else {\n let focusEl: HTMLElement =\n inlineFormElementRef.nativeElement.querySelector(\n '.sky-inline-form-content'\n );\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> = Array.prototype.slice.call(\n elem.querySelectorAll(SKY_TABBABLE_SELECTOR)\n );\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 { SkyAppWindowRef } from '@skyux/core';\n\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { zip as observableZip } from 'rxjs';\n\nimport { take } from 'rxjs/operators';\n\nimport { skySlideDissolve } from './animations/slide-dissolve';\n\nimport { SkyInlineFormButtonConfig } from './types/inline-form-button-config';\n\nimport { SkyInlineFormButtonLayout } from './types/inline-form-button-layout';\n\nimport { SkyInlineFormCloseArgs } from './types/inline-form-close-args';\n\nimport { SkyInlineFormConfig } from './types/inline-form-config';\n\nimport { SkyInlineFormAdapterService } 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: [SkyInlineFormAdapterService],\n animations: [skySlideDissolve],\n})\nexport class SkyInlineFormComponent implements OnInit, OnDestroy {\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 // eslint-disable-next-line @angular-eslint/no-output-native\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 = this.config\n ? this.config.buttonLayout\n : 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[]>(\n (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 });\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[]>(\n (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 });\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[]>(\n (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 });\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[]>(\n (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 });\n break;\n }\n\n return promise;\n }\n\n private getCustomButtons(\n buttonConfigs: SkyInlineFormButtonConfig[]\n ): 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","<div [@skySlideDissolve]=\"showForm\">\n <div *ngIf=\"!showForm\" class=\"sky-slide-dissolve-first\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"template && showForm\" class=\"sky-slide-dissolve-last\">\n <div class=\"sky-inline-form sky-shadow sky-box sky-elevation-3\">\n <div class=\"sky-inline-form-content\">\n <ng-container [ngTemplateOutlet]=\"template\"> </ng-container>\n </div>\n <div class=\"sky-inline-form-footer\">\n <button\n *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</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': {\n skyux_inline_form_button_cancel: { message: 'Cancel' },\n skyux_inline_form_button_delete: { message: 'Delete' },\n skyux_inline_form_button_done: { message: 'Done' },\n skyux_inline_form_button_save: { message: 'Save' },\n },\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 {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyInlineFormResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyInlineFormResourcesModule {}\n","import { CommonModule } from '@angular/common';\n\nimport { NgModule } from '@angular/core';\n\nimport { SkyInlineFormComponent } from './inline-form.component';\n\nimport { SkyInlineFormResourcesModule } from '../shared/sky-inline-form-resources.module';\n\n@NgModule({\n declarations: [SkyInlineFormComponent],\n imports: [CommonModule, SkyInlineFormResourcesModule],\n exports: [SkyInlineFormComponent],\n})\nexport class SkyInlineFormModule {}\n","/**\n * Generated bund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modules/shared/sky-inline-form-resources.module.ts","../../../../../libs/components/inline-form/src/lib/modules/inline-form/animations/slide-dissolve.ts","../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form-adapter.service.ts","../../../../../libs/components/inline-form/src/lib/modules/inline-form/types/inline-form-button-layout.ts","../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.component.ts","../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.component.html","../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form.module.ts","../../../../../libs/components/inline-form/src/skyux-inline-form.ts"],"sourcesContent":["/**\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 */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\n skyux_inline_form_button_cancel: { message: 'Cancel' },\n skyux_inline_form_button_delete: { message: 'Delete' },\n skyux_inline_form_button_done: { message: 'Done' },\n skyux_inline_form_button_save: { message: 'Save' },\n },\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 {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyInlineFormResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyInlineFormResourcesModule {}\n","import {\n AnimationTriggerMetadata,\n animate,\n group,\n query,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\nexport const skySlideDissolve: AnimationTriggerMetadata = trigger(\n 'skySlideDissolve',\n [\n transition('* <=> *', [\n // Expand animations\n query(\n '.sky-slide-dissolve-last:enter',\n [\n style({ height: 0, opacity: 0 }),\n animate('200ms ease-in', style({ height: '*', opacity: 0 })),\n ],\n { optional: true }\n ),\n query(\n '.sky-slide-dissolve-last:enter',\n [\n style({ opacity: 0 }),\n animate('200ms ease-in', style({ opacity: 1 })),\n ],\n { optional: true }\n ),\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(\n '.sky-slide-dissolve-last:leave',\n [animate('0ms', style({ opacity: 0 }))],\n { optional: true }\n ),\n\n group([\n query(\n '.sky-slide-dissolve-first:enter',\n [\n style({ opacity: 0, height: 0 }),\n animate('100ms ease-in', style({ opacity: 1, height: '*' })),\n ],\n { optional: true }\n ),\n query(\n '.sky-slide-dissolve-last:leave',\n [animate('200ms ease-in', style({ height: 0 }))],\n { optional: true }\n ),\n ]),\n ]),\n ]\n);\n","import { ElementRef, Injectable } 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 public applyAutofocus(inlineFormElementRef: ElementRef): void {\n const inputWithAutofocus =\n inlineFormElementRef.nativeElement.querySelector('[autofocus]');\n\n if (inputWithAutofocus) {\n inputWithAutofocus.focus();\n } else {\n const focusEl: HTMLElement =\n inlineFormElementRef.nativeElement.querySelector(\n '.sky-inline-form-content'\n );\n const focusableChildren = this.loadFocusableChildren(focusEl);\n\n this.focusFirstElement(focusableChildren);\n }\n }\n\n private loadFocusableChildren(elem: HTMLElement): HTMLElement[] {\n const elements: Array<HTMLElement> = Array.prototype.slice.call(\n elem.querySelectorAll(SKY_TABBABLE_SELECTOR)\n );\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","export enum SkyInlineFormButtonLayout {\n Custom = 0,\n DoneCancel = 1,\n DoneDeleteCancel = 2,\n SaveCancel = 3,\n SaveDeleteCancel = 4,\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n} from '@angular/core';\nimport { SkyAppWindowRef } from '@skyux/core';\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { zip as observableZip } from 'rxjs';\nimport { take } from 'rxjs/operators';\n\nimport { skySlideDissolve } from './animations/slide-dissolve';\nimport { SkyInlineFormAdapterService } from './inline-form-adapter.service';\nimport { SkyInlineFormButtonConfig } from './types/inline-form-button-config';\nimport { SkyInlineFormButtonLayout } from './types/inline-form-button-layout';\nimport { SkyInlineFormCloseArgs } from './types/inline-form-close-args';\nimport { SkyInlineFormConfig } from './types/inline-form-config';\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: [SkyInlineFormAdapterService],\n animations: [skySlideDissolve],\n})\nexport class SkyInlineFormComponent implements OnInit, OnDestroy {\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 // eslint-disable-next-line @angular-eslint/no-output-native\n public close = new EventEmitter<SkyInlineFormCloseArgs>();\n\n public buttons: SkyInlineFormButtonConfig[];\n\n private _config: SkyInlineFormConfig;\n\n private _showForm = 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 const buttonType = this.config\n ? this.config.buttonLayout\n : 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[]>(\n (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 });\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[]>(\n (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 });\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[]>(\n (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 });\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[]>(\n (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 });\n break;\n }\n\n return promise;\n }\n\n private getCustomButtons(\n buttonConfigs: SkyInlineFormButtonConfig[]\n ): 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","<div [@skySlideDissolve]=\"showForm\">\n <div *ngIf=\"!showForm\" class=\"sky-slide-dissolve-first\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"template && showForm\" class=\"sky-slide-dissolve-last\">\n <div class=\"sky-inline-form sky-shadow sky-box sky-elevation-3\">\n <div class=\"sky-inline-form-content\">\n <ng-container [ngTemplateOutlet]=\"template\"> </ng-container>\n </div>\n <div class=\"sky-inline-form-footer\">\n <button\n *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</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SkyInlineFormResourcesModule } from '../shared/sky-inline-form-resources.module';\n\nimport { SkyInlineFormComponent } from './inline-form.component';\n\n@NgModule({\n declarations: [SkyInlineFormComponent],\n imports: [CommonModule, SkyInlineFormResourcesModule],\n exports: [SkyInlineFormComponent],\n})\nexport class SkyInlineFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["observableZip"],"mappings":";;;;;;;;;;;AAAA;;;;;;AAgBA,MAAM,SAAS,GAA0C;IACvD,OAAO,EAAE;QACP,+BAA+B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACtD,+BAA+B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACtD,6BAA6B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAClD,6BAA6B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;KACnD;CACF,CAAC;MAEW,8BAA8B;IAClC,SAAS,CAAC,UAA4B,EAAE,IAAY;QACzD,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KAClE;CACF;AAED;;;MAaa,4BAA4B;;0HAA5B,4BAA4B;2HAA5B,4BAA4B,YAT7B,aAAa;2HASZ,4BAA4B,aAR5B;QACT;YACE,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,8BAA8B;YACxC,KAAK,EAAE,IAAI;SACZ;KACF,YAPS,aAAa;4FASZ,4BAA4B;kBAVxC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,2BAA2B;4BACpC,QAAQ,EAAE,8BAA8B;4BACxC,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF;;;ACjCM,MAAM,gBAAgB,GAA6B,OAAO,CAC/D,kBAAkB,EAClB;IACE,UAAU,CAAC,SAAS,EAAE;;QAEpB,KAAK,CACH,gCAAgC,EAChC;YACE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;YAChC,OAAO,CAAC,eAAe,EAAE,KAAK,CA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AAE,CAAC,sBAAsB,CAAC;iBAClC;;;ACXD;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { SkyAppWindowRef } from '@skyux/core';
|
|
3
3
|
import { SkyLibResourcesService } from '@skyux/i18n';
|
|
4
|
+
import { SkyInlineFormAdapterService } from './inline-form-adapter.service';
|
|
4
5
|
import { SkyInlineFormButtonConfig } from './types/inline-form-button-config';
|
|
5
6
|
import { SkyInlineFormCloseArgs } from './types/inline-form-close-args';
|
|
6
7
|
import { SkyInlineFormConfig } from './types/inline-form-config';
|
|
7
|
-
import { SkyInlineFormAdapterService } from './inline-form-adapter.service';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
/**
|
|
10
10
|
* Renders form content in the current view instead of a separate modal.
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/inline-form",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/animations": "^12.2.16",
|
|
6
6
|
"@angular/common": "^12.2.16",
|
|
7
7
|
"@angular/core": "^12.2.16",
|
|
8
|
-
"@skyux/core": "5.
|
|
9
|
-
"@skyux/i18n": "5.
|
|
8
|
+
"@skyux/core": "5.6.0",
|
|
9
|
+
"@skyux/i18n": "5.6.0"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"tslib": "^2.3.1"
|