@skyux/inline-form 12.8.0 → 12.10.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/fesm2022/skyux-inline-form-testing.mjs +129 -0
- package/fesm2022/skyux-inline-form-testing.mjs.map +1 -0
- package/fesm2022/skyux-inline-form.mjs +9 -3
- package/fesm2022/skyux-inline-form.mjs.map +1 -1
- package/lib/modules/inline-form/inline-form.component.d.ts +1 -0
- package/package.json +8 -3
- package/testing/index.d.ts +5 -0
- package/testing/modules/inline-form/inline-form-button-harness.d.ts +32 -0
- package/testing/modules/inline-form/inline-form-button-harness.filters.d.ts +14 -0
- package/testing/modules/inline-form/inline-form-harness.d.ts +36 -0
- package/testing/modules/inline-form/inline-form-harness.filters.d.ts +6 -0
- package/testing/modules/inline-form/inline-form-template-harness.d.ts +10 -0
- package/testing/public-api.d.ts +5 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { SkyQueryableComponentHarness } from '@skyux/core/testing';
|
|
2
|
+
import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Harness to interact with inline form button component in tests.
|
|
6
|
+
*/
|
|
7
|
+
class SkyInlineFormButtonHarness extends ComponentHarness {
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
static { this.hostSelector = '.sky-inline-form-footer > button'; }
|
|
12
|
+
/**
|
|
13
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
14
|
+
* `SkyInlineFormButtonHarness` that meets certain criteria.
|
|
15
|
+
*/
|
|
16
|
+
static with(filters) {
|
|
17
|
+
return new HarnessPredicate(SkyInlineFormButtonHarness, filters)
|
|
18
|
+
.addOption('text', filters.text, async (harness, text) => {
|
|
19
|
+
const harnessText = await harness.getText();
|
|
20
|
+
return await HarnessPredicate.stringMatches(harnessText, text);
|
|
21
|
+
})
|
|
22
|
+
.addOption('styleType', filters.styleType, async (harness, styleType) => {
|
|
23
|
+
const harnessStyleType = await harness.getStyleType();
|
|
24
|
+
return await HarnessPredicate.stringMatches(harnessStyleType, styleType);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Clicks the button.
|
|
29
|
+
*/
|
|
30
|
+
async click() {
|
|
31
|
+
return await (await this.host()).click();
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Gets the button style type.
|
|
35
|
+
*/
|
|
36
|
+
async getStyleType() {
|
|
37
|
+
const host = await this.host();
|
|
38
|
+
if (await host.hasClass('sky-btn-primary')) {
|
|
39
|
+
return 'primary';
|
|
40
|
+
}
|
|
41
|
+
if (await host.hasClass('sky-btn-link')) {
|
|
42
|
+
return 'link';
|
|
43
|
+
}
|
|
44
|
+
return 'default';
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Gets the button text.
|
|
48
|
+
*/
|
|
49
|
+
async getText() {
|
|
50
|
+
return await (await this.host()).text();
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Whether the button is disabled.
|
|
54
|
+
*/
|
|
55
|
+
async isDisabled() {
|
|
56
|
+
return await (await this.host()).hasClass('sky-btn-disabled');
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Harness to interact with inline form template components in tests.
|
|
62
|
+
*/
|
|
63
|
+
class SkyInlineFormTemplateHarness extends SkyQueryableComponentHarness {
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
static { this.hostSelector = '.sky-inline-form-content'; }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Harness to interact with inline form components in tests.
|
|
72
|
+
*/
|
|
73
|
+
class SkyInlineFormHarness extends SkyQueryableComponentHarness {
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
static { this.hostSelector = 'sky-inline-form'; }
|
|
78
|
+
/**
|
|
79
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
80
|
+
* `SkyInlineFormHarness` that meets certain criteria.
|
|
81
|
+
*/
|
|
82
|
+
static with(filters) {
|
|
83
|
+
return SkyInlineFormHarness.getDataSkyIdPredicate(filters);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Gets an inline form button that matches the given filters.
|
|
87
|
+
*/
|
|
88
|
+
async getButton(filters) {
|
|
89
|
+
if (!(await this.isFormExpanded())) {
|
|
90
|
+
throw new Error('Inline form is not expanded. The buttons cannot be retrieved when not visible.');
|
|
91
|
+
}
|
|
92
|
+
return await this.locatorFor(SkyInlineFormButtonHarness.with(filters))();
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Gets the inline form's buttons.
|
|
96
|
+
*/
|
|
97
|
+
async getButtons(filters) {
|
|
98
|
+
if (!(await this.isFormExpanded())) {
|
|
99
|
+
throw new Error('Inline form is not expanded. The buttons cannot be retrieved when not visible.');
|
|
100
|
+
}
|
|
101
|
+
const buttons = await this.locatorForAll(SkyInlineFormButtonHarness.with(filters || {}))();
|
|
102
|
+
if (filters && buttons.length === 0) {
|
|
103
|
+
throw new Error(`No button(s) found that match the given filter(s): ${JSON.stringify(filters)}`);
|
|
104
|
+
}
|
|
105
|
+
return buttons;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Returns a harness wrapping the inline form's template when expanded.
|
|
109
|
+
*/
|
|
110
|
+
async getTemplate() {
|
|
111
|
+
if (!(await this.isFormExpanded())) {
|
|
112
|
+
throw new Error('Inline form is not expanded. Cannot retrieve template when not visible.');
|
|
113
|
+
}
|
|
114
|
+
return await this.locatorFor(SkyInlineFormTemplateHarness)();
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Whether the inline form is shown.
|
|
118
|
+
*/
|
|
119
|
+
async isFormExpanded() {
|
|
120
|
+
return ((await (await this.host()).getAttribute('data-show-form')) === 'true');
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Generated bundle index. Do not edit.
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
export { SkyInlineFormButtonHarness, SkyInlineFormHarness, SkyInlineFormTemplateHarness };
|
|
129
|
+
//# sourceMappingURL=skyux-inline-form-testing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skyux-inline-form-testing.mjs","sources":["../../../../../libs/components/inline-form/testing/src/modules/inline-form/inline-form-button-harness.ts","../../../../../libs/components/inline-form/testing/src/modules/inline-form/inline-form-template-harness.ts","../../../../../libs/components/inline-form/testing/src/modules/inline-form/inline-form-harness.ts","../../../../../libs/components/inline-form/testing/src/skyux-inline-form-testing.ts"],"sourcesContent":["import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport { SkyInlineFormButtonHarnessFilters } from './inline-form-button-harness.filters';\n\n/**\n * Harness to interact with inline form button component in tests.\n */\nexport class SkyInlineFormButtonHarness extends ComponentHarness {\n /**\n * @internal\n */\n public static hostSelector = '.sky-inline-form-footer > button';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyInlineFormButtonHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyInlineFormButtonHarnessFilters,\n ): HarnessPredicate<SkyInlineFormButtonHarness> {\n return new HarnessPredicate(SkyInlineFormButtonHarness, filters)\n .addOption('text', filters.text, async (harness, text) => {\n const harnessText = await harness.getText();\n return await HarnessPredicate.stringMatches(harnessText, text);\n })\n .addOption('styleType', filters.styleType, async (harness, styleType) => {\n const harnessStyleType = await harness.getStyleType();\n return await HarnessPredicate.stringMatches(\n harnessStyleType,\n styleType,\n );\n });\n }\n\n /**\n * Clicks the button.\n */\n public async click(): Promise<void> {\n return await (await this.host()).click();\n }\n\n /**\n * Gets the button style type.\n */\n public async getStyleType(): Promise<'primary' | 'link' | 'default'> {\n const host = await this.host();\n if (await host.hasClass('sky-btn-primary')) {\n return 'primary';\n }\n if (await host.hasClass('sky-btn-link')) {\n return 'link';\n }\n return 'default';\n }\n\n /**\n * Gets the button text.\n */\n public async getText(): Promise<string> {\n return await (await this.host()).text();\n }\n\n /**\n * Whether the button is disabled.\n */\n public async isDisabled(): Promise<boolean> {\n return await (await this.host()).hasClass('sky-btn-disabled');\n }\n}\n","import { SkyQueryableComponentHarness } from '@skyux/core/testing';\n\n/**\n * Harness to interact with inline form template components in tests.\n */\nexport class SkyInlineFormTemplateHarness extends SkyQueryableComponentHarness {\n /**\n * @internal\n */\n public static hostSelector = '.sky-inline-form-content';\n}\n","import { HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyQueryableComponentHarness } from '@skyux/core/testing';\n\nimport { SkyInlineFormButtonHarness } from './inline-form-button-harness';\nimport { SkyInlineFormButtonHarnessFilters } from './inline-form-button-harness.filters';\nimport { SkyInlineFormHarnessFilters } from './inline-form-harness.filters';\nimport { SkyInlineFormTemplateHarness } from './inline-form-template-harness';\n\n/**\n * Harness to interact with inline form components in tests.\n */\nexport class SkyInlineFormHarness extends SkyQueryableComponentHarness {\n /**\n * @internal\n */\n public static hostSelector = 'sky-inline-form';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyInlineFormHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyInlineFormHarnessFilters,\n ): HarnessPredicate<SkyInlineFormHarness> {\n return SkyInlineFormHarness.getDataSkyIdPredicate(filters);\n }\n\n /**\n * Gets an inline form button that matches the given filters.\n */\n public async getButton(\n filters: SkyInlineFormButtonHarnessFilters,\n ): Promise<SkyInlineFormButtonHarness | null> {\n if (!(await this.isFormExpanded())) {\n throw new Error(\n 'Inline form is not expanded. The buttons cannot be retrieved when not visible.',\n );\n }\n return await this.locatorFor(SkyInlineFormButtonHarness.with(filters))();\n }\n\n /**\n * Gets the inline form's buttons.\n */\n public async getButtons(\n filters?: SkyInlineFormButtonHarnessFilters,\n ): Promise<SkyInlineFormButtonHarness[]> {\n if (!(await this.isFormExpanded())) {\n throw new Error(\n 'Inline form is not expanded. The buttons cannot be retrieved when not visible.',\n );\n }\n const buttons = await this.locatorForAll(\n SkyInlineFormButtonHarness.with(filters || {}),\n )();\n if (filters && buttons.length === 0) {\n throw new Error(\n `No button(s) found that match the given filter(s): ${JSON.stringify(filters)}`,\n );\n }\n return buttons;\n }\n\n /**\n * Returns a harness wrapping the inline form's template when expanded.\n */\n public async getTemplate(): Promise<SkyInlineFormTemplateHarness> {\n if (!(await this.isFormExpanded())) {\n throw new Error(\n 'Inline form is not expanded. Cannot retrieve template when not visible.',\n );\n }\n\n return await this.locatorFor(SkyInlineFormTemplateHarness)();\n }\n\n /**\n * Whether the inline form is shown.\n */\n public async isFormExpanded(): Promise<boolean> {\n return (\n (await (await this.host()).getAttribute('data-show-form')) === 'true'\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAIA;;AAEG;AACG,MAAO,0BAA2B,SAAQ,gBAAgB,CAAA;AAC9D;;AAEG;aACW,IAAY,CAAA,YAAA,GAAG,kCAAkC,CAAC;AAEhE;;;AAGG;IACI,OAAO,IAAI,CAChB,OAA0C,EAAA;AAE1C,QAAA,OAAO,IAAI,gBAAgB,CAAC,0BAA0B,EAAE,OAAO;AAC5D,aAAA,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,OAAO,EAAE,IAAI,KAAI;AACvD,YAAA,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE;YAC3C,OAAO,MAAM,gBAAgB,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,CAAC;AAChE,SAAC;AACA,aAAA,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,OAAO,EAAE,SAAS,KAAI;AACtE,YAAA,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,YAAY,EAAE;YACrD,OAAO,MAAM,gBAAgB,CAAC,aAA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;;AAEH,QAAA,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,0BAA0B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE;;AAG1E;;AAEG;IACI,MAAM,UAAU,CACrB,OAA2C,EAAA;QAE3C,IAAI,EAAE,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC,EAAE;AAClC,YAAA,MAAM,IAAI,KAAK,CACb,gFAAgF,CACjF;;AAEH,QAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CACtC,0BAA0B,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAC/C,EAAE;QACH,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;AACnC,YAAA,MAAM,IAAI,KAAK,CACb,CAAA,mDAAA,EAAsD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAE,CAAA,CAChF;;AAEH,QAAA,OAAO,OAAO;;AAGhB;;AAEG;AACI,IAAA,MAAM,WAAW,GAAA;QACtB,IAAI,EAAE,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC,EAAE;AAClC,YAAA,MAAM,IAAI,KAAK,CACb,yEAAyE,CAC1E;;QAGH,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,4BAA4B,CAAC,EAAE;;AAG9D;;AAEG;AACI,IAAA,MAAM,cAAc,GAAA;AACzB,QAAA,QACE,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,gBAAgB,CAAC,MAAM,MAAM;;;;ACjF3E;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { NgModule, Injectable, EventEmitter, Output, Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { NgModule, Injectable, EventEmitter, Output, HostBinding, Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
5
|
import * as i2 from '@skyux/i18n';
|
|
6
6
|
import { SkyLibResourcesService, SkyI18nModule } from '@skyux/i18n';
|
|
7
7
|
import { Subject, ReplaySubject, zip } from 'rxjs';
|
|
@@ -189,6 +189,9 @@ class SkyInlineFormComponent {
|
|
|
189
189
|
get showForm() {
|
|
190
190
|
return this.#_showForm;
|
|
191
191
|
}
|
|
192
|
+
get showFormData() {
|
|
193
|
+
return this.showForm;
|
|
194
|
+
}
|
|
192
195
|
#_config;
|
|
193
196
|
#_showForm;
|
|
194
197
|
#ngUnsubscribe;
|
|
@@ -353,17 +356,20 @@ class SkyInlineFormComponent {
|
|
|
353
356
|
config.buttonLayout === SkyInlineFormButtonLayout.Custom);
|
|
354
357
|
}
|
|
355
358
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyInlineFormComponent, deps: [{ token: SkyInlineFormAdapterService }, { token: i0.ElementRef }, { token: i2.SkyLibResourcesService }, { token: i3.SkyAppWindowRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
356
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: SkyInlineFormComponent, isStandalone: false, selector: "sky-inline-form", inputs: { config: "config", template: "template", showForm: "showForm" }, outputs: { close: "close" }, providers: [SkyInlineFormAdapterService], ngImport: i0, template: "<div [@skySlideDissolve]=\"showForm\">\n @if (!showForm) {\n <div class=\"sky-slide-dissolve-first\">\n <ng-content />\n </div>\n } @else if (template) {\n <div class=\"sky-slide-dissolve-last\">\n <div\n class=\"sky-inline-form sky-shadow sky-box sky-elevation-1-bordered sky-padding-even-md\"\n >\n <div class=\"sky-inline-form-content\">\n <ng-container [ngTemplateOutlet]=\"template\" />\n </div>\n <div class=\"sky-inline-form-footer\">\n @for (button of buttons; track button) {\n <button\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 }\n </div>\n </div>\n </div>\n }\n</div>\n", styles: [".sky-inline-form:not(.sky-theme-modern *){--sky-override-inline-form-background-color: #eeeeef;--sky-override-inline-form-border: 1px solid #cdcfd2;--sky-override-inline-form-box-shadow: 0 0 5px 0 rgba(0, 0, 0, .3);--sky-override-inline-form-button-margin-right: 5px;--sky-override-inline-form-padding: 10px 10px 10px 10px;--sky-override-inline-form-footer-margin-top: 20px}:host-context(.sky-theme-modern:not(.sky-theme-brand-base)) .sky-inline-form{--sky-override-inline-form-box-shadow: var(--sky-elevation-overflow);--sky-override-inline-form-border: none}.sky-inline-form{background:var(--sky-override-inline-form-background-color, var(--sky-color-background-container-base));border:var(--sky-override-inline-form-border, var(--sky-border-style-elevation) var(--sky-border-width-container-base) var(--sky-color-border-container-base));box-shadow:var(--sky-override-inline-form-box-shadow, var(--sky-elevation-raised-100));padding:var(--sky-override-inline-form-padding, var(--sky-space-inset-balanced-m));width:100%}.sky-inline-form .sky-inline-form-footer{margin-top:var(--sky-override-inline-form-footer-margin-top, var(--sky-space-gap-form-xl))}.sky-inline-form .sky-inline-form-footer button{margin:0 var(--sky-override-inline-form-button-margin-right, var(--sky-space-gap-action_group-m)) 0 0}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [skySlideDissolve], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
359
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: SkyInlineFormComponent, isStandalone: false, selector: "sky-inline-form", inputs: { config: "config", template: "template", showForm: "showForm" }, outputs: { close: "close" }, host: { properties: { "attr.data-show-form": "this.showFormData" } }, providers: [SkyInlineFormAdapterService], ngImport: i0, template: "<div [@skySlideDissolve]=\"showForm\">\n @if (!showForm) {\n <div class=\"sky-slide-dissolve-first\">\n <ng-content />\n </div>\n } @else if (template) {\n <div class=\"sky-slide-dissolve-last\">\n <div\n class=\"sky-inline-form sky-shadow sky-box sky-elevation-1-bordered sky-padding-even-md\"\n >\n <div class=\"sky-inline-form-content\">\n <ng-container [ngTemplateOutlet]=\"template\" />\n </div>\n <div class=\"sky-inline-form-footer\">\n @for (button of buttons; track button.text) {\n <button\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 }\n </div>\n </div>\n </div>\n }\n</div>\n", styles: [".sky-inline-form:not(.sky-theme-modern *){--sky-override-inline-form-background-color: #eeeeef;--sky-override-inline-form-border: 1px solid #cdcfd2;--sky-override-inline-form-box-shadow: 0 0 5px 0 rgba(0, 0, 0, .3);--sky-override-inline-form-button-margin-right: 5px;--sky-override-inline-form-padding: 10px 10px 10px 10px;--sky-override-inline-form-footer-margin-top: 20px}:host-context(.sky-theme-modern:not(.sky-theme-brand-base)) .sky-inline-form{--sky-override-inline-form-box-shadow: var(--sky-elevation-overflow);--sky-override-inline-form-border: none}.sky-inline-form{background:var(--sky-override-inline-form-background-color, var(--sky-color-background-container-base));border:var(--sky-override-inline-form-border, var(--sky-border-style-elevation) var(--sky-border-width-container-base) var(--sky-color-border-container-base));box-shadow:var(--sky-override-inline-form-box-shadow, var(--sky-elevation-raised-100));padding:var(--sky-override-inline-form-padding, var(--sky-space-inset-balanced-m));width:100%}.sky-inline-form .sky-inline-form-footer{margin-top:var(--sky-override-inline-form-footer-margin-top, var(--sky-space-gap-form-xl))}.sky-inline-form .sky-inline-form-footer button{margin:0 var(--sky-override-inline-form-button-margin-right, var(--sky-space-gap-action_group-m)) 0 0}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [skySlideDissolve], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
357
360
|
}
|
|
358
361
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: SkyInlineFormComponent, decorators: [{
|
|
359
362
|
type: Component,
|
|
360
|
-
args: [{ selector: 'sky-inline-form', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SkyInlineFormAdapterService], animations: [skySlideDissolve], standalone: false, template: "<div [@skySlideDissolve]=\"showForm\">\n @if (!showForm) {\n <div class=\"sky-slide-dissolve-first\">\n <ng-content />\n </div>\n } @else if (template) {\n <div class=\"sky-slide-dissolve-last\">\n <div\n class=\"sky-inline-form sky-shadow sky-box sky-elevation-1-bordered sky-padding-even-md\"\n >\n <div class=\"sky-inline-form-content\">\n <ng-container [ngTemplateOutlet]=\"template\" />\n </div>\n <div class=\"sky-inline-form-footer\">\n @for (button of buttons; track button) {\n <button\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 }\n </div>\n </div>\n </div>\n }\n</div>\n", styles: [".sky-inline-form:not(.sky-theme-modern *){--sky-override-inline-form-background-color: #eeeeef;--sky-override-inline-form-border: 1px solid #cdcfd2;--sky-override-inline-form-box-shadow: 0 0 5px 0 rgba(0, 0, 0, .3);--sky-override-inline-form-button-margin-right: 5px;--sky-override-inline-form-padding: 10px 10px 10px 10px;--sky-override-inline-form-footer-margin-top: 20px}:host-context(.sky-theme-modern:not(.sky-theme-brand-base)) .sky-inline-form{--sky-override-inline-form-box-shadow: var(--sky-elevation-overflow);--sky-override-inline-form-border: none}.sky-inline-form{background:var(--sky-override-inline-form-background-color, var(--sky-color-background-container-base));border:var(--sky-override-inline-form-border, var(--sky-border-style-elevation) var(--sky-border-width-container-base) var(--sky-color-border-container-base));box-shadow:var(--sky-override-inline-form-box-shadow, var(--sky-elevation-raised-100));padding:var(--sky-override-inline-form-padding, var(--sky-space-inset-balanced-m));width:100%}.sky-inline-form .sky-inline-form-footer{margin-top:var(--sky-override-inline-form-footer-margin-top, var(--sky-space-gap-form-xl))}.sky-inline-form .sky-inline-form-footer button{margin:0 var(--sky-override-inline-form-button-margin-right, var(--sky-space-gap-action_group-m)) 0 0}\n"] }]
|
|
363
|
+
args: [{ selector: 'sky-inline-form', changeDetection: ChangeDetectionStrategy.OnPush, providers: [SkyInlineFormAdapterService], animations: [skySlideDissolve], standalone: false, template: "<div [@skySlideDissolve]=\"showForm\">\n @if (!showForm) {\n <div class=\"sky-slide-dissolve-first\">\n <ng-content />\n </div>\n } @else if (template) {\n <div class=\"sky-slide-dissolve-last\">\n <div\n class=\"sky-inline-form sky-shadow sky-box sky-elevation-1-bordered sky-padding-even-md\"\n >\n <div class=\"sky-inline-form-content\">\n <ng-container [ngTemplateOutlet]=\"template\" />\n </div>\n <div class=\"sky-inline-form-footer\">\n @for (button of buttons; track button.text) {\n <button\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 }\n </div>\n </div>\n </div>\n }\n</div>\n", styles: [".sky-inline-form:not(.sky-theme-modern *){--sky-override-inline-form-background-color: #eeeeef;--sky-override-inline-form-border: 1px solid #cdcfd2;--sky-override-inline-form-box-shadow: 0 0 5px 0 rgba(0, 0, 0, .3);--sky-override-inline-form-button-margin-right: 5px;--sky-override-inline-form-padding: 10px 10px 10px 10px;--sky-override-inline-form-footer-margin-top: 20px}:host-context(.sky-theme-modern:not(.sky-theme-brand-base)) .sky-inline-form{--sky-override-inline-form-box-shadow: var(--sky-elevation-overflow);--sky-override-inline-form-border: none}.sky-inline-form{background:var(--sky-override-inline-form-background-color, var(--sky-color-background-container-base));border:var(--sky-override-inline-form-border, var(--sky-border-style-elevation) var(--sky-border-width-container-base) var(--sky-color-border-container-base));box-shadow:var(--sky-override-inline-form-box-shadow, var(--sky-elevation-raised-100));padding:var(--sky-override-inline-form-padding, var(--sky-space-inset-balanced-m));width:100%}.sky-inline-form .sky-inline-form-footer{margin-top:var(--sky-override-inline-form-footer-margin-top, var(--sky-space-gap-form-xl))}.sky-inline-form .sky-inline-form-footer button{margin:0 var(--sky-override-inline-form-button-margin-right, var(--sky-space-gap-action_group-m)) 0 0}\n"] }]
|
|
361
364
|
}], ctorParameters: () => [{ type: SkyInlineFormAdapterService }, { type: i0.ElementRef }, { type: i2.SkyLibResourcesService }, { type: i3.SkyAppWindowRef }, { type: i0.ChangeDetectorRef }], propDecorators: { config: [{
|
|
362
365
|
type: Input
|
|
363
366
|
}], template: [{
|
|
364
367
|
type: Input
|
|
365
368
|
}], showForm: [{
|
|
366
369
|
type: Input
|
|
370
|
+
}], showFormData: [{
|
|
371
|
+
type: HostBinding,
|
|
372
|
+
args: ['attr.data-show-form']
|
|
367
373
|
}], close: [{
|
|
368
374
|
type: Output
|
|
369
375
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-inline-form.mjs","sources":["../../../../../libs/components/inline-form/src/lib/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":["/* istanbul ignore file */\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 lib/modules/shared/sky-inline-form' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesService,\n} from '@skyux/i18n';\n\nconst RESOURCES: Record<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 'FR-CA': {\n skyux_inline_form_button_cancel: { message: 'Annuler' },\n skyux_inline_form_button_delete: { message: 'Supprimer' },\n skyux_inline_form_button_done: { message: 'Terminé' },\n skyux_inline_form_button_save: { message: 'Sauvegarder' },\n },\n};\n\nSkyLibResourcesService.addResources(RESOURCES);\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\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\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\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 #loadFocusableChildren(elem: HTMLElement): HTMLElement[] {\n const elements: 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 #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 #focusFirstElement(list: HTMLElement[]): void {\n if (list.length > 0) {\n list[0].focus();\n }\n }\n}\n","export enum SkyInlineFormButtonLayout {\n /**\n * Displays custom buttons.\n */\n Custom = 0,\n /**\n * Displays Done and Cancel buttons.\n */\n DoneCancel = 1,\n /**\n * Displays Done, Delete, and Cancel buttons.\n */\n DoneDeleteCancel = 2,\n /**\n * Displays Save and Cancel buttons.\n */\n SaveCancel = 3,\n /**\n * Displays Save, Delete, and Cancel buttons.\n */\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 { Observable, ReplaySubject, Subject, zip as observableZip } from 'rxjs';\nimport { takeUntil } 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 standalone: false,\n})\nexport class SkyInlineFormComponent implements OnInit, OnDestroy {\n /**\n * Configuration options for the buttons to display with the inline form.\n * @required\n */\n @Input()\n public set config(value: SkyInlineFormConfig | undefined) {\n if (value !== this.#_config && !!value) {\n this.#_config = value;\n this.#setupButtons();\n }\n }\n\n public get config(): SkyInlineFormConfig | undefined {\n return this.#_config;\n }\n\n /**\n * The template to instantiate the inline form.\n * @required\n */\n @Input()\n public template: TemplateRef<unknown> | undefined;\n\n /**\n * 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 | undefined) {\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(): boolean | undefined {\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 // TODO: handle buttons being set asynchronously (\"| undefined\") when setting autofocus\n public buttons!: SkyInlineFormButtonConfig[];\n\n #_config: SkyInlineFormConfig | undefined;\n\n #_showForm: boolean | undefined = false;\n\n #ngUnsubscribe = new Subject<void>();\n\n #adapter: SkyInlineFormAdapterService;\n #elementRef: ElementRef;\n #resourcesService: SkyLibResourcesService;\n #skyAppWindowRef: SkyAppWindowRef;\n #changeDetectorRef: ChangeDetectorRef;\n\n constructor(\n adapter: SkyInlineFormAdapterService,\n elementRef: ElementRef,\n resourcesService: SkyLibResourcesService,\n skyAppWindowRef: SkyAppWindowRef,\n changeDetectorRef: ChangeDetectorRef,\n ) {\n this.#adapter = adapter;\n this.#elementRef = elementRef;\n this.#resourcesService = resourcesService;\n this.#skyAppWindowRef = skyAppWindowRef;\n this.#changeDetectorRef = changeDetectorRef;\n }\n\n public ngOnInit(): void {\n this.#setupButtons();\n }\n\n public ngOnDestroy(): void {\n this.#ngUnsubscribe.next();\n this.#ngUnsubscribe.complete();\n\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 #setupButtons(): void {\n if (\n this.#isValidCustomConfig(this.config) &&\n this.config &&\n this.config.buttons\n ) {\n this.buttons = this.#getCustomButtons(this.config.buttons);\n this.#changeDetectorRef.markForCheck();\n return;\n }\n\n this.#getPresetButtons()\n .pipe(takeUntil(this.#ngUnsubscribe))\n .subscribe((buttons: SkyInlineFormButtonConfig[]) => {\n this.buttons = buttons;\n this.#changeDetectorRef.markForCheck();\n });\n }\n\n #getPresetButtons(): Observable<SkyInlineFormButtonConfig[]> {\n const emitter = new ReplaySubject<SkyInlineFormButtonConfig[]>(1);\n\n const buttonType = this.config\n ? this.config.buttonLayout\n : SkyInlineFormButtonLayout.DoneCancel;\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(takeUntil(this.#ngUnsubscribe))\n .subscribe((values: string[]) => {\n emitter.next([\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 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(takeUntil(this.#ngUnsubscribe))\n .subscribe((values: string[]) => {\n emitter.next([\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 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(takeUntil(this.#ngUnsubscribe))\n .subscribe((values: string[]) => {\n emitter.next([\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 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(takeUntil(this.#ngUnsubscribe))\n .subscribe((values: string[]) => {\n emitter.next([\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 break;\n }\n\n return emitter.asObservable();\n }\n\n #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 #isValidCustomConfig(config: SkyInlineFormConfig | undefined): boolean {\n return (\n !!config &&\n !!config.buttons &&\n config.buttons.length > 0 &&\n config.buttonLayout === SkyInlineFormButtonLayout.Custom\n );\n }\n}\n","<div [@skySlideDissolve]=\"showForm\">\n @if (!showForm) {\n <div class=\"sky-slide-dissolve-first\">\n <ng-content />\n </div>\n } @else if (template) {\n <div class=\"sky-slide-dissolve-last\">\n <div\n class=\"sky-inline-form sky-shadow sky-box sky-elevation-1-bordered sky-padding-even-md\"\n >\n <div class=\"sky-inline-form-content\">\n <ng-container [ngTemplateOutlet]=\"template\" />\n </div>\n <div class=\"sky-inline-form-footer\">\n @for (button of buttons; track button) {\n <button\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 }\n </div>\n </div>\n </div>\n }\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","i1.SkyInlineFormAdapterService"],"mappings":";;;;;;;;;;;AAAA;AACA;;;;;AAKG;AAQH,MAAM,SAAS,GAAoC;AACjD,IAAA,OAAO,EAAE;AACP,QAAA,+BAA+B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;AACtD,QAAA,+BAA+B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;AACtD,QAAA,6BAA6B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;AAClD,QAAA,6BAA6B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;AACnD,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,+BAA+B,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;AACvD,QAAA,+BAA+B,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;AACzD,QAAA,6BAA6B,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;AACrD,QAAA,6BAA6B,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;AAC1D,KAAA;CACF;AAED,sBAAsB,CAAC,YAAY,CAAC,SAAS,CAAC;AAE9C;;AAEG;MAIU,4BAA4B,CAAA;8GAA5B,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAA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AAE,4BAA4B,CAAC;oBACrD,OAAO,EAAE,CAAC,sBAAsB,CAAC;AAClC,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"skyux-inline-form.mjs","sources":["../../../../../libs/components/inline-form/src/lib/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":["/* istanbul ignore file */\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 lib/modules/shared/sky-inline-form' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesService,\n} from '@skyux/i18n';\n\nconst RESOURCES: Record<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 'FR-CA': {\n skyux_inline_form_button_cancel: { message: 'Annuler' },\n skyux_inline_form_button_delete: { message: 'Supprimer' },\n skyux_inline_form_button_done: { message: 'Terminé' },\n skyux_inline_form_button_save: { message: 'Sauvegarder' },\n },\n};\n\nSkyLibResourcesService.addResources(RESOURCES);\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\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\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\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 #loadFocusableChildren(elem: HTMLElement): HTMLElement[] {\n const elements: 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 #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 #focusFirstElement(list: HTMLElement[]): void {\n if (list.length > 0) {\n list[0].focus();\n }\n }\n}\n","export enum SkyInlineFormButtonLayout {\n /**\n * Displays custom buttons.\n */\n Custom = 0,\n /**\n * Displays Done and Cancel buttons.\n */\n DoneCancel = 1,\n /**\n * Displays Done, Delete, and Cancel buttons.\n */\n DoneDeleteCancel = 2,\n /**\n * Displays Save and Cancel buttons.\n */\n SaveCancel = 3,\n /**\n * Displays Save, Delete, and Cancel buttons.\n */\n SaveDeleteCancel = 4,\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\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 { Observable, ReplaySubject, Subject, zip as observableZip } from 'rxjs';\nimport { takeUntil } 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 standalone: false,\n})\nexport class SkyInlineFormComponent implements OnInit, OnDestroy {\n /**\n * Configuration options for the buttons to display with the inline form.\n * @required\n */\n @Input()\n public set config(value: SkyInlineFormConfig | undefined) {\n if (value !== this.#_config && !!value) {\n this.#_config = value;\n this.#setupButtons();\n }\n }\n\n public get config(): SkyInlineFormConfig | undefined {\n return this.#_config;\n }\n\n /**\n * The template to instantiate the inline form.\n * @required\n */\n @Input()\n public template: TemplateRef<unknown> | undefined;\n\n /**\n * 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 | undefined) {\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(): boolean | undefined {\n return this.#_showForm;\n }\n\n @HostBinding('attr.data-show-form')\n public get showFormData(): boolean | undefined {\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 // TODO: handle buttons being set asynchronously (\"| undefined\") when setting autofocus\n public buttons!: SkyInlineFormButtonConfig[];\n\n #_config: SkyInlineFormConfig | undefined;\n\n #_showForm: boolean | undefined = false;\n\n #ngUnsubscribe = new Subject<void>();\n\n #adapter: SkyInlineFormAdapterService;\n #elementRef: ElementRef;\n #resourcesService: SkyLibResourcesService;\n #skyAppWindowRef: SkyAppWindowRef;\n #changeDetectorRef: ChangeDetectorRef;\n\n constructor(\n adapter: SkyInlineFormAdapterService,\n elementRef: ElementRef,\n resourcesService: SkyLibResourcesService,\n skyAppWindowRef: SkyAppWindowRef,\n changeDetectorRef: ChangeDetectorRef,\n ) {\n this.#adapter = adapter;\n this.#elementRef = elementRef;\n this.#resourcesService = resourcesService;\n this.#skyAppWindowRef = skyAppWindowRef;\n this.#changeDetectorRef = changeDetectorRef;\n }\n\n public ngOnInit(): void {\n this.#setupButtons();\n }\n\n public ngOnDestroy(): void {\n this.#ngUnsubscribe.next();\n this.#ngUnsubscribe.complete();\n\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 #setupButtons(): void {\n if (\n this.#isValidCustomConfig(this.config) &&\n this.config &&\n this.config.buttons\n ) {\n this.buttons = this.#getCustomButtons(this.config.buttons);\n this.#changeDetectorRef.markForCheck();\n return;\n }\n\n this.#getPresetButtons()\n .pipe(takeUntil(this.#ngUnsubscribe))\n .subscribe((buttons: SkyInlineFormButtonConfig[]) => {\n this.buttons = buttons;\n this.#changeDetectorRef.markForCheck();\n });\n }\n\n #getPresetButtons(): Observable<SkyInlineFormButtonConfig[]> {\n const emitter = new ReplaySubject<SkyInlineFormButtonConfig[]>(1);\n\n const buttonType = this.config\n ? this.config.buttonLayout\n : SkyInlineFormButtonLayout.DoneCancel;\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(takeUntil(this.#ngUnsubscribe))\n .subscribe((values: string[]) => {\n emitter.next([\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 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(takeUntil(this.#ngUnsubscribe))\n .subscribe((values: string[]) => {\n emitter.next([\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 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(takeUntil(this.#ngUnsubscribe))\n .subscribe((values: string[]) => {\n emitter.next([\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 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(takeUntil(this.#ngUnsubscribe))\n .subscribe((values: string[]) => {\n emitter.next([\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 break;\n }\n\n return emitter.asObservable();\n }\n\n #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 #isValidCustomConfig(config: SkyInlineFormConfig | undefined): boolean {\n return (\n !!config &&\n !!config.buttons &&\n config.buttons.length > 0 &&\n config.buttonLayout === SkyInlineFormButtonLayout.Custom\n );\n }\n}\n","<div [@skySlideDissolve]=\"showForm\">\n @if (!showForm) {\n <div class=\"sky-slide-dissolve-first\">\n <ng-content />\n </div>\n } @else if (template) {\n <div class=\"sky-slide-dissolve-last\">\n <div\n class=\"sky-inline-form sky-shadow sky-box sky-elevation-1-bordered sky-padding-even-md\"\n >\n <div class=\"sky-inline-form-content\">\n <ng-container [ngTemplateOutlet]=\"template\" />\n </div>\n <div class=\"sky-inline-form-footer\">\n @for (button of buttons; track button.text) {\n <button\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 }\n </div>\n </div>\n </div>\n }\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","i1.SkyInlineFormAdapterService"],"mappings":";;;;;;;;;;;AAAA;AACA;;;;;AAKG;AAQH,MAAM,SAAS,GAAoC;AACjD,IAAA,OAAO,EAAE;AACP,QAAA,+BAA+B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;AACtD,QAAA,+BAA+B,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;AACtD,QAAA,6BAA6B,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;AAClD,QAAA,6BAA6B,EAAE,EAAE,OAAO,EAAE,MAAM,EAA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mB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,iBAJf,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAC3B,YAAY,EAAE,4BAA4B,aAC1C,sBAAsB,CAAA,EAAA,CAAA,CAAA;+GAErB,mBAAmB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAAE,4BAA4B,CAAA,EAAA,CAAA,CAAA;;2FAGzC,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;AACtC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,4BAA4B,CAAC;oBACrD,OAAO,EAAE,CAAC,sBAAsB,CAAC;AAClC,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -29,6 +29,7 @@ export declare class SkyInlineFormComponent implements OnInit, OnDestroy {
|
|
|
29
29
|
*/
|
|
30
30
|
set showForm(value: boolean | undefined);
|
|
31
31
|
get showForm(): boolean | undefined;
|
|
32
|
+
get showFormData(): boolean | undefined;
|
|
32
33
|
/**
|
|
33
34
|
* Fires when users close the inline form.
|
|
34
35
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/inline-form",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.10.0",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blackbaud",
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
"homepage": "https://github.com/blackbaud/skyux#readme",
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"@angular/animations": "^19.2.7",
|
|
20
|
+
"@angular/cdk": "^19.2.10",
|
|
20
21
|
"@angular/common": "^19.2.7",
|
|
21
22
|
"@angular/core": "^19.2.7",
|
|
22
|
-
"@skyux/core": "12.
|
|
23
|
-
"@skyux/i18n": "12.
|
|
23
|
+
"@skyux/core": "12.10.0",
|
|
24
|
+
"@skyux/i18n": "12.10.0"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
27
|
"tslib": "^2.8.1"
|
|
@@ -34,6 +35,10 @@
|
|
|
34
35
|
".": {
|
|
35
36
|
"types": "./index.d.ts",
|
|
36
37
|
"default": "./fesm2022/skyux-inline-form.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./testing": {
|
|
40
|
+
"types": "./testing/index.d.ts",
|
|
41
|
+
"default": "./fesm2022/skyux-inline-form-testing.mjs"
|
|
37
42
|
}
|
|
38
43
|
},
|
|
39
44
|
"sideEffects": false
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
import { SkyInlineFormButtonHarnessFilters } from './inline-form-button-harness.filters';
|
|
3
|
+
/**
|
|
4
|
+
* Harness to interact with inline form button component in tests.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SkyInlineFormButtonHarness extends ComponentHarness {
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
static hostSelector: string;
|
|
11
|
+
/**
|
|
12
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
13
|
+
* `SkyInlineFormButtonHarness` that meets certain criteria.
|
|
14
|
+
*/
|
|
15
|
+
static with(filters: SkyInlineFormButtonHarnessFilters): HarnessPredicate<SkyInlineFormButtonHarness>;
|
|
16
|
+
/**
|
|
17
|
+
* Clicks the button.
|
|
18
|
+
*/
|
|
19
|
+
click(): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Gets the button style type.
|
|
22
|
+
*/
|
|
23
|
+
getStyleType(): Promise<'primary' | 'link' | 'default'>;
|
|
24
|
+
/**
|
|
25
|
+
* Gets the button text.
|
|
26
|
+
*/
|
|
27
|
+
getText(): Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the button is disabled.
|
|
30
|
+
*/
|
|
31
|
+
isDisabled(): Promise<boolean>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SkyHarnessFilters } from '@skyux/core/testing';
|
|
2
|
+
/**
|
|
3
|
+
* A set of criteria that can be used to filter a list of `SkyInlineFormButtonHarness` instances.
|
|
4
|
+
*/
|
|
5
|
+
export interface SkyInlineFormButtonHarnessFilters extends SkyHarnessFilters {
|
|
6
|
+
/**
|
|
7
|
+
* Finds the button whose text matches this value.
|
|
8
|
+
*/
|
|
9
|
+
text?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Finds the button whose style type matches this value.
|
|
12
|
+
*/
|
|
13
|
+
styleType?: 'primary' | 'link' | 'default';
|
|
14
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
import { SkyQueryableComponentHarness } from '@skyux/core/testing';
|
|
3
|
+
import { SkyInlineFormButtonHarness } from './inline-form-button-harness';
|
|
4
|
+
import { SkyInlineFormButtonHarnessFilters } from './inline-form-button-harness.filters';
|
|
5
|
+
import { SkyInlineFormHarnessFilters } from './inline-form-harness.filters';
|
|
6
|
+
import { SkyInlineFormTemplateHarness } from './inline-form-template-harness';
|
|
7
|
+
/**
|
|
8
|
+
* Harness to interact with inline form components in tests.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SkyInlineFormHarness extends SkyQueryableComponentHarness {
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
static hostSelector: string;
|
|
15
|
+
/**
|
|
16
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
17
|
+
* `SkyInlineFormHarness` that meets certain criteria.
|
|
18
|
+
*/
|
|
19
|
+
static with(filters: SkyInlineFormHarnessFilters): HarnessPredicate<SkyInlineFormHarness>;
|
|
20
|
+
/**
|
|
21
|
+
* Gets an inline form button that matches the given filters.
|
|
22
|
+
*/
|
|
23
|
+
getButton(filters: SkyInlineFormButtonHarnessFilters): Promise<SkyInlineFormButtonHarness | null>;
|
|
24
|
+
/**
|
|
25
|
+
* Gets the inline form's buttons.
|
|
26
|
+
*/
|
|
27
|
+
getButtons(filters?: SkyInlineFormButtonHarnessFilters): Promise<SkyInlineFormButtonHarness[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Returns a harness wrapping the inline form's template when expanded.
|
|
30
|
+
*/
|
|
31
|
+
getTemplate(): Promise<SkyInlineFormTemplateHarness>;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the inline form is shown.
|
|
34
|
+
*/
|
|
35
|
+
isFormExpanded(): Promise<boolean>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SkyQueryableComponentHarness } from '@skyux/core/testing';
|
|
2
|
+
/**
|
|
3
|
+
* Harness to interact with inline form template components in tests.
|
|
4
|
+
*/
|
|
5
|
+
export declare class SkyInlineFormTemplateHarness extends SkyQueryableComponentHarness {
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
static hostSelector: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { SkyInlineFormHarness } from './modules/inline-form/inline-form-harness';
|
|
2
|
+
export { SkyInlineFormHarnessFilters } from './modules/inline-form/inline-form-harness.filters';
|
|
3
|
+
export { SkyInlineFormButtonHarness } from './modules/inline-form/inline-form-button-harness';
|
|
4
|
+
export { SkyInlineFormButtonHarnessFilters } from './modules/inline-form/inline-form-button-harness.filters';
|
|
5
|
+
export { SkyInlineFormTemplateHarness } from './modules/inline-form/inline-form-template-harness';
|