@theseam/ui-common 0.4.13 → 0.4.14
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/buttons/public-api.d.ts +1 -0
- package/buttons/testing/anchor-badge-button.harness.d.ts +16 -0
- package/buttons/testing/anchor-button.harness.d.ts +16 -0
- package/buttons/testing/badge-button.harness.d.ts +15 -0
- package/buttons/testing/base-badge-button.harness.d.ts +15 -0
- package/buttons/testing/base-button.harness.d.ts +19 -0
- package/buttons/testing/button.harness.d.ts +15 -0
- package/buttons/testing/index.d.ts +5 -0
- package/buttons/testing/toggle-button.harness.d.ts +21 -0
- package/checkbox/checkbox.component.d.ts +1 -1
- package/checkbox/checkbox.module.d.ts +2 -3
- package/datatable/datatable.module.d.ts +1 -1
- package/esm2020/buttons/button/button.component.mjs +2 -1
- package/esm2020/buttons/public-api.mjs +2 -1
- package/esm2020/buttons/testing/anchor-badge-button.harness.mjs +18 -0
- package/esm2020/buttons/testing/anchor-button.harness.mjs +18 -0
- package/esm2020/buttons/testing/badge-button.harness.mjs +14 -0
- package/esm2020/buttons/testing/base-badge-button.harness.mjs +29 -0
- package/esm2020/buttons/testing/base-button.harness.mjs +41 -0
- package/esm2020/buttons/testing/button.harness.mjs +16 -0
- package/esm2020/buttons/testing/index.mjs +6 -0
- package/esm2020/buttons/testing/toggle-button.harness.mjs +25 -0
- package/esm2020/checkbox/checkbox.component.mjs +8 -3
- package/esm2020/checkbox/checkbox.module.mjs +5 -12
- package/esm2020/datatable/datatable.module.mjs +5 -5
- package/esm2020/form-field/form-field.component.mjs +4 -4
- package/esm2020/framework/schema-form/index.mjs +2 -1
- package/esm2020/framework/schema-form/schema-form-framework.component.mjs +6 -3
- package/esm2020/framework/schema-form/schema-form-framework.mjs +62 -7
- package/esm2020/framework/schema-form/schema-form-widget.mjs +2 -0
- package/esm2020/framework/schema-form/schema-form.module.mjs +1 -8
- package/esm2020/framework/schema-form-controls/schema-form-checkbox/schema-form-checkbox.component.mjs +21 -11
- package/esm2020/framework/schema-form-controls/schema-form-divider/schema-form-divider.component.mjs +20 -0
- package/esm2020/framework/schema-form-controls/schema-form-input/schema-form-input.component.mjs +17 -8
- package/esm2020/framework/schema-form-controls/schema-form-number/schema-form-number.component.mjs +14 -5
- package/esm2020/framework/schema-form-controls/schema-form-select/schema-form-select.component.mjs +19 -9
- package/esm2020/framework/schema-form-controls/schema-form-submit/schema-form-submit.component.mjs +21 -13
- package/esm2020/framework/schema-form-controls/schema-form-submit-split/schema-form-submit-split.component.mjs +30 -18
- package/esm2020/framework/schema-form-controls/schema-form-tel/schema-form-tel.component.mjs +48 -0
- package/esm2020/framework/schema-form-controls/schema-form-tiled-select/schema-form-tiled-select.component.mjs +57 -0
- package/esm2020/google-maps/google-maps-places-autocomplete/google-maps-places-autocomplete.component.mjs +3 -3
- package/esm2020/menu/public-api.mjs +5 -1
- package/esm2020/menu/testing/menu-footer.harness.mjs +28 -0
- package/esm2020/menu/testing/menu-header.harness.mjs +23 -0
- package/esm2020/menu/testing/menu-item.harness.mjs +59 -0
- package/esm2020/menu/testing/menu.harness.mjs +163 -0
- package/esm2020/menu/testing/utils.mjs +13 -0
- package/esm2020/services/preferences/preferences-accessor.mjs +1 -1
- package/esm2020/services/preferences/preferences-manager.service.mjs +1 -1
- package/esm2020/services/preferences/preferences-record.mjs +1 -1
- package/esm2020/services/preferences/preferences.models.mjs +1 -1
- package/esm2020/story-helpers/args-to-tpl.mjs +83 -0
- package/esm2020/story-helpers/public-api.mjs +2 -2
- package/esm2020/story-helpers/story-preferences-accessor.service.mjs +1 -1
- package/esm2020/tel-input/public-api.mjs +2 -1
- package/esm2020/tel-input/tel-input/tel-input.component.mjs +22 -10
- package/esm2020/tel-input/tel-input.directive.mjs +12 -13
- package/esm2020/tel-input/tel-input.module.mjs +10 -9
- package/esm2020/tel-input/testing/tel-input.harness.mjs +49 -0
- package/esm2020/testing/harnesses/ng-select-dropdown.harness.mjs +39 -0
- package/esm2020/testing/harnesses/ng-select-option.harness.mjs +26 -0
- package/esm2020/testing/harnesses/ng-select.harness.mjs +104 -0
- package/esm2020/testing/public-api.mjs +4 -1
- package/esm2020/tiled-select/components/tiled-select/tiled-select.component.mjs +1 -1
- package/esm2020/utils/geo-json/coerce-feature-collection.mjs +1 -1
- package/esm2020/utils/geo-json/is-feature-collection.validator.mjs +1 -1
- package/esm2020/utils/geo-json/is-only-geometry-types.mjs +1 -1
- package/esm2020/utils/geo-json/merge-polygons.mjs +1 -1
- package/esm2020/utils/geo-json/no-inner-rings.validator.mjs +1 -1
- package/esm2020/utils/geo-json/split-multi-polygons.mjs +1 -1
- package/esm2020/widget/preferences/widget-preferences.models.mjs +1 -1
- package/esm2020/widget/preferences/widget-preferences.service.mjs +1 -1
- package/esm2020/widget/preferences/widget-preferences.token.mjs +1 -1
- package/esm2020/widget/widget.models.mjs +1 -1
- package/fesm2015/theseam-ui-common-buttons.mjs +181 -3
- package/fesm2015/theseam-ui-common-buttons.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-checkbox.mjs +12 -14
- package/fesm2015/theseam-ui-common-checkbox.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-datatable.mjs +4 -4
- package/fesm2015/theseam-ui-common-datatable.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-form-field.mjs +3 -3
- package/fesm2015/theseam-ui-common-form-field.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-framework.mjs +248 -164
- package/fesm2015/theseam-ui-common-framework.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-google-maps.mjs +2 -2
- package/fesm2015/theseam-ui-common-google-maps.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-menu.mjs +329 -3
- package/fesm2015/theseam-ui-common-menu.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-services.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-story-helpers.mjs +86 -1
- package/fesm2015/theseam-ui-common-story-helpers.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-tel-input.mjs +105 -29
- package/fesm2015/theseam-ui-common-tel-input.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-testing.mjs +197 -1
- package/fesm2015/theseam-ui-common-testing.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-tiled-select.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-utils.mjs.map +1 -1
- package/fesm2015/theseam-ui-common-widget.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-buttons.mjs +154 -2
- package/fesm2020/theseam-ui-common-buttons.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-checkbox.mjs +12 -14
- package/fesm2020/theseam-ui-common-checkbox.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-datatable.mjs +4 -4
- package/fesm2020/theseam-ui-common-datatable.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-form-field.mjs +3 -3
- package/fesm2020/theseam-ui-common-form-field.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-framework.mjs +236 -162
- package/fesm2020/theseam-ui-common-framework.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-google-maps.mjs +2 -2
- package/fesm2020/theseam-ui-common-google-maps.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-menu.mjs +275 -2
- package/fesm2020/theseam-ui-common-menu.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-services.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-story-helpers.mjs +84 -1
- package/fesm2020/theseam-ui-common-story-helpers.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-tel-input.mjs +89 -29
- package/fesm2020/theseam-ui-common-tel-input.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-testing.mjs +165 -1
- package/fesm2020/theseam-ui-common-testing.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-tiled-select.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-utils.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-widget.mjs.map +1 -1
- package/framework/schema-form/index.d.ts +1 -0
- package/framework/schema-form/schema-form-framework.d.ts +12 -1
- package/framework/schema-form/schema-form-widget.d.ts +61 -0
- package/framework/schema-form/schema-form.module.d.ts +1 -2
- package/framework/schema-form-controls/schema-form-checkbox/schema-form-checkbox.component.d.ts +12 -11
- package/framework/schema-form-controls/schema-form-divider/schema-form-divider.component.d.ts +12 -0
- package/framework/schema-form-controls/schema-form-input/schema-form-input.component.d.ts +10 -9
- package/framework/schema-form-controls/schema-form-number/schema-form-number.component.d.ts +8 -7
- package/framework/schema-form-controls/schema-form-select/schema-form-select.component.d.ts +10 -9
- package/framework/schema-form-controls/schema-form-submit/schema-form-submit.component.d.ts +10 -9
- package/framework/schema-form-controls/schema-form-submit-split/schema-form-submit-split.component.d.ts +10 -9
- package/framework/schema-form-controls/schema-form-tel/schema-form-tel.component.d.ts +23 -0
- package/framework/schema-form-controls/schema-form-tiled-select/schema-form-tiled-select.component.d.ts +32 -0
- package/menu/menu-footer-action/menu-footer-action.component.d.ts +1 -1
- package/menu/public-api.d.ts +4 -0
- package/menu/testing/menu-footer.harness.d.ts +22 -0
- package/menu/testing/menu-header.harness.d.ts +18 -0
- package/menu/testing/menu-item.harness.d.ts +37 -0
- package/menu/testing/menu.harness.d.ts +74 -0
- package/menu/testing/utils.d.ts +5 -0
- package/package.json +1 -1
- package/story-helpers/args-to-tpl.d.ts +25 -0
- package/story-helpers/public-api.d.ts +1 -0
- package/tel-input/public-api.d.ts +1 -0
- package/tel-input/tel-input/tel-input.component.d.ts +2 -2
- package/tel-input/tel-input.directive.d.ts +1 -1
- package/tel-input/tel-input.module.d.ts +7 -7
- package/tel-input/testing/tel-input.harness.d.ts +19 -0
- package/testing/harnesses/ng-select-dropdown.harness.d.ts +23 -0
- package/testing/harnesses/ng-select-option.harness.d.ts +18 -0
- package/testing/harnesses/ng-select.harness.d.ts +50 -0
- package/testing/public-api.d.ts +3 -0
- package/tiled-select/components/tiled-select/tiled-select.component.d.ts +10 -10
- package/esm2020/framework/schema-form-controls/schema-form-controls.module.mjs +0 -79
- package/framework/schema-form-controls/schema-form-controls.module.d.ts +0 -20
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
1
2
|
import { Framework } from '@ajsf/core';
|
|
2
3
|
import { TheSeamSchemaFormCheckboxComponent } from '../schema-form-controls/schema-form-checkbox/schema-form-checkbox.component';
|
|
3
4
|
import { TheSeamSchemaFormInputComponent } from '../schema-form-controls/schema-form-input/schema-form-input.component';
|
|
4
5
|
import { TheSeamSchemaFormNumberComponent } from '../schema-form-controls/schema-form-number/schema-form-number.component';
|
|
5
6
|
import { TheSeamSchemaFormSelectComponent } from '../schema-form-controls/schema-form-select/schema-form-select.component';
|
|
6
7
|
import { TheSeamSchemaFormSubmitSplitComponent } from '../schema-form-controls/schema-form-submit-split/schema-form-submit-split.component';
|
|
8
|
+
import { TheSeamSchemaFormDividerComponent } from '../schema-form-controls/schema-form-divider/schema-form-divider.component';
|
|
9
|
+
import { TheSeamSchemaFormTelComponent } from '../schema-form-controls/schema-form-tel/schema-form-tel.component';
|
|
10
|
+
import { TheSeamSchemaFormTiledSelectComponent } from '../schema-form-controls/schema-form-tiled-select/schema-form-tiled-select.component';
|
|
7
11
|
import { TheSeamSchemaFormFrameworkComponent } from './schema-form-framework.component';
|
|
8
12
|
import * as i0 from "@angular/core";
|
|
13
|
+
export type TheSeamSchemaFormFrameworkOverrides = Omit<Framework, 'name' | 'framework' | 'stylesheet' | 'scripts'>;
|
|
14
|
+
export declare const THESEAM_SCHEMA_FRAMEWORK_OVERRIDES: InjectionToken<TheSeamSchemaFormFrameworkOverrides>;
|
|
15
|
+
export declare function extendFramework(toExtend: Framework, extendFrameworkOrName: Framework | string): void;
|
|
9
16
|
export declare class TheSeamFramework extends Framework {
|
|
10
17
|
name: string;
|
|
11
18
|
framework: typeof TheSeamSchemaFormFrameworkComponent;
|
|
@@ -15,7 +22,11 @@ export declare class TheSeamFramework extends Framework {
|
|
|
15
22
|
text: typeof TheSeamSchemaFormInputComponent;
|
|
16
23
|
number: typeof TheSeamSchemaFormNumberComponent;
|
|
17
24
|
select: typeof TheSeamSchemaFormSelectComponent;
|
|
25
|
+
divider: typeof TheSeamSchemaFormDividerComponent;
|
|
26
|
+
tel: typeof TheSeamSchemaFormTelComponent;
|
|
27
|
+
'tiled-select': typeof TheSeamSchemaFormTiledSelectComponent;
|
|
18
28
|
};
|
|
19
|
-
|
|
29
|
+
constructor(_overrides?: TheSeamSchemaFormFrameworkOverrides[]);
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamFramework, [{ optional: true; }]>;
|
|
20
31
|
static ɵprov: i0.ɵɵInjectableDeclaration<TheSeamFramework>;
|
|
21
32
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
export interface TheSeamSchemaFormWidgetLayoutNodeOptions {
|
|
3
|
+
errorMessage: any;
|
|
4
|
+
validationMessages: any;
|
|
5
|
+
showErrors: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* ?
|
|
8
|
+
*/
|
|
9
|
+
copyValueTo: any[];
|
|
10
|
+
title: string;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Interface to represent the properties set on a widget component instance by
|
|
15
|
+
* '@ajsf/core'.
|
|
16
|
+
*
|
|
17
|
+
* NOTE: I am not positive this is completely accurate.
|
|
18
|
+
*/
|
|
19
|
+
export interface TheSeamSchemaFormWidget {
|
|
20
|
+
options?: TheSeamSchemaFormWidgetLayoutNodeOptions;
|
|
21
|
+
/**
|
|
22
|
+
* Node from the json schema.
|
|
23
|
+
*/
|
|
24
|
+
layoutNode?: {
|
|
25
|
+
options?: TheSeamSchemaFormWidgetLayoutNodeOptions;
|
|
26
|
+
name: string;
|
|
27
|
+
value: any;
|
|
28
|
+
dataPointer: string;
|
|
29
|
+
type: string;
|
|
30
|
+
dataType?: string;
|
|
31
|
+
items?: any[];
|
|
32
|
+
_id?: string;
|
|
33
|
+
} | null;
|
|
34
|
+
layoutIndex: number[] | undefined | null;
|
|
35
|
+
dataIndex: number[] | undefined | null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Interface to represent the properties set on a widget component instance by
|
|
39
|
+
* '@ajsf/core', when calling `initializeControl`.
|
|
40
|
+
*
|
|
41
|
+
* Some properties, such as `options` can be set before calling
|
|
42
|
+
* `initializeControl` and will affect how it works.
|
|
43
|
+
*
|
|
44
|
+
* NOTE: I am not positive this is completely accurate.
|
|
45
|
+
*/
|
|
46
|
+
export interface TheSeamSchemaFormControlWidget extends TheSeamSchemaFormWidget {
|
|
47
|
+
formOptions?: {
|
|
48
|
+
validateOnRender: boolean;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The form control for a widget.
|
|
52
|
+
*/
|
|
53
|
+
formControl?: AbstractControl;
|
|
54
|
+
/**
|
|
55
|
+
* ?
|
|
56
|
+
*/
|
|
57
|
+
boundControl?: boolean;
|
|
58
|
+
controlName?: string;
|
|
59
|
+
controlValue?: any;
|
|
60
|
+
controlDisabled?: boolean;
|
|
61
|
+
}
|
|
@@ -2,9 +2,8 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./schema-form-framework.component";
|
|
3
3
|
import * as i2 from "@angular/common";
|
|
4
4
|
import * as i3 from "@ajsf/core";
|
|
5
|
-
import * as i4 from "../schema-form-controls/schema-form-controls.module";
|
|
6
5
|
export declare class TheSeamSchemaFormModule {
|
|
7
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamSchemaFormModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TheSeamSchemaFormModule, [typeof i1.TheSeamSchemaFormFrameworkComponent], [typeof i2.CommonModule, typeof i3.JsonSchemaFormModule, typeof
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TheSeamSchemaFormModule, [typeof i1.TheSeamSchemaFormFrameworkComponent], [typeof i2.CommonModule, typeof i3.JsonSchemaFormModule, typeof i3.WidgetLibraryModule], [typeof i1.TheSeamSchemaFormFrameworkComponent, typeof i3.JsonSchemaFormModule]>;
|
|
9
8
|
static ɵinj: i0.ɵɵInjectorDeclaration<TheSeamSchemaFormModule>;
|
|
10
9
|
}
|
package/framework/schema-form-controls/schema-form-checkbox/schema-form-checkbox.component.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService } from '@ajsf/core';
|
|
4
|
+
import { TheSeamSchemaFormControlWidget, TheSeamSchemaFormWidgetLayoutNodeOptions } from '../../schema-form';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class TheSeamSchemaFormCheckboxComponent implements OnInit {
|
|
6
|
-
private
|
|
6
|
+
export declare class TheSeamSchemaFormCheckboxComponent implements OnInit, TheSeamSchemaFormControlWidget {
|
|
7
|
+
private readonly _jsf;
|
|
7
8
|
formControl?: AbstractControl;
|
|
8
9
|
controlName?: string;
|
|
9
|
-
controlValue
|
|
10
|
+
controlValue?: any;
|
|
10
11
|
controlDisabled: boolean;
|
|
11
12
|
boundControl: boolean;
|
|
12
|
-
options
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
constructor(
|
|
13
|
+
options?: TheSeamSchemaFormWidgetLayoutNodeOptions;
|
|
14
|
+
layoutNode: TheSeamSchemaFormControlWidget['layoutNode'];
|
|
15
|
+
layoutIndex: TheSeamSchemaFormControlWidget['layoutIndex'];
|
|
16
|
+
dataIndex: TheSeamSchemaFormControlWidget['dataIndex'];
|
|
17
|
+
trueValue: boolean;
|
|
18
|
+
falseValue: boolean;
|
|
19
|
+
constructor(_jsf: JsonSchemaFormService);
|
|
19
20
|
ngOnInit(): void;
|
|
20
21
|
updateValue(event: any): void;
|
|
21
22
|
get isChecked(): boolean;
|
|
22
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamSchemaFormCheckboxComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormCheckboxComponent, "seam-schema-form-checkbox", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never,
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormCheckboxComponent, "seam-schema-form-checkbox", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never, true, never>;
|
|
24
25
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { TheSeamSchemaFormWidget } from '../../schema-form';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TheSeamSchemaFormDividerComponent implements OnInit, TheSeamSchemaFormWidget {
|
|
5
|
+
options: TheSeamSchemaFormWidget['options'];
|
|
6
|
+
layoutNode: any;
|
|
7
|
+
layoutIndex: number[] | undefined | null;
|
|
8
|
+
dataIndex: number[] | undefined | null;
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamSchemaFormDividerComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormDividerComponent, "seam-schema-form-divider", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService } from '@ajsf/core';
|
|
4
|
+
import { TheSeamSchemaFormControlWidget, TheSeamSchemaFormWidgetLayoutNodeOptions } from '../../schema-form';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class TheSeamSchemaFormInputComponent implements OnInit {
|
|
6
|
-
private
|
|
6
|
+
export declare class TheSeamSchemaFormInputComponent implements OnInit, TheSeamSchemaFormControlWidget {
|
|
7
|
+
private readonly _jsf;
|
|
7
8
|
formControl?: AbstractControl;
|
|
8
9
|
controlName?: string;
|
|
9
|
-
controlValue?:
|
|
10
|
+
controlValue?: any;
|
|
10
11
|
controlDisabled: boolean;
|
|
11
12
|
boundControl: boolean;
|
|
12
|
-
options
|
|
13
|
+
options?: TheSeamSchemaFormWidgetLayoutNodeOptions;
|
|
14
|
+
layoutNode: TheSeamSchemaFormControlWidget['layoutNode'];
|
|
15
|
+
layoutIndex: TheSeamSchemaFormControlWidget['layoutIndex'];
|
|
16
|
+
dataIndex: TheSeamSchemaFormControlWidget['dataIndex'];
|
|
13
17
|
autoCompleteList: string[];
|
|
14
|
-
|
|
15
|
-
layoutIndex: number[] | undefined | null;
|
|
16
|
-
dataIndex: number[] | undefined | null;
|
|
17
|
-
constructor(jsf: JsonSchemaFormService);
|
|
18
|
+
constructor(_jsf: JsonSchemaFormService);
|
|
18
19
|
ngOnInit(): void;
|
|
19
20
|
updateValue(event: any): void;
|
|
20
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamSchemaFormInputComponent, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormInputComponent, "seam-schema-form-input", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never,
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormInputComponent, "seam-schema-form-input", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never, true, never>;
|
|
22
23
|
}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService } from '@ajsf/core';
|
|
4
|
+
import { TheSeamSchemaFormControlWidget, TheSeamSchemaFormWidgetLayoutNodeOptions } from '../../schema-form';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class TheSeamSchemaFormNumberComponent implements OnInit {
|
|
6
|
+
export declare class TheSeamSchemaFormNumberComponent implements OnInit, TheSeamSchemaFormControlWidget {
|
|
6
7
|
private jsf;
|
|
7
8
|
formControl?: AbstractControl;
|
|
8
9
|
controlName?: string;
|
|
9
|
-
controlValue
|
|
10
|
+
controlValue?: any;
|
|
10
11
|
controlDisabled: boolean;
|
|
11
12
|
boundControl: boolean;
|
|
12
|
-
options
|
|
13
|
+
options?: TheSeamSchemaFormWidgetLayoutNodeOptions;
|
|
14
|
+
layoutNode: TheSeamSchemaFormControlWidget['layoutNode'];
|
|
15
|
+
layoutIndex: TheSeamSchemaFormControlWidget['layoutIndex'];
|
|
16
|
+
dataIndex: TheSeamSchemaFormControlWidget['dataIndex'];
|
|
13
17
|
allowNegative: boolean;
|
|
14
18
|
allowDecimal: boolean;
|
|
15
19
|
allowExponents: boolean;
|
|
16
20
|
lastValidNumber: string;
|
|
17
|
-
layoutNode: any;
|
|
18
|
-
layoutIndex: number[] | undefined | null;
|
|
19
|
-
dataIndex: number[] | undefined | null;
|
|
20
21
|
constructor(jsf: JsonSchemaFormService);
|
|
21
22
|
ngOnInit(): void;
|
|
22
23
|
updateValue(event: any): void;
|
|
23
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamSchemaFormNumberComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormNumberComponent, "seam-schema-form-number", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never,
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormNumberComponent, "seam-schema-form-number", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never, true, never>;
|
|
25
26
|
}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { isArray, JsonSchemaFormService } from '@ajsf/core';
|
|
4
|
+
import { TheSeamSchemaFormControlWidget, TheSeamSchemaFormWidgetLayoutNodeOptions } from '../../schema-form';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class TheSeamSchemaFormSelectComponent implements OnInit {
|
|
6
|
-
private
|
|
6
|
+
export declare class TheSeamSchemaFormSelectComponent implements OnInit, TheSeamSchemaFormControlWidget {
|
|
7
|
+
private readonly _jsf;
|
|
7
8
|
formControl?: AbstractControl;
|
|
8
9
|
controlName?: string;
|
|
9
|
-
controlValue
|
|
10
|
+
controlValue?: any;
|
|
10
11
|
controlDisabled: boolean;
|
|
11
12
|
boundControl: boolean;
|
|
12
|
-
options
|
|
13
|
+
options?: TheSeamSchemaFormWidgetLayoutNodeOptions;
|
|
14
|
+
layoutNode: TheSeamSchemaFormControlWidget['layoutNode'];
|
|
15
|
+
layoutIndex: TheSeamSchemaFormControlWidget['layoutIndex'];
|
|
16
|
+
dataIndex: TheSeamSchemaFormControlWidget['dataIndex'];
|
|
13
17
|
selectList: any[];
|
|
14
18
|
isArray: typeof isArray;
|
|
15
|
-
|
|
16
|
-
layoutIndex: number[] | undefined | null;
|
|
17
|
-
dataIndex: number[] | undefined | null;
|
|
18
|
-
constructor(jsf: JsonSchemaFormService);
|
|
19
|
+
constructor(_jsf: JsonSchemaFormService);
|
|
19
20
|
ngOnInit(): void;
|
|
20
21
|
updateValue(event: any): void;
|
|
21
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamSchemaFormSelectComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormSelectComponent, "seam-schema-form-select", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never,
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormSelectComponent, "seam-schema-form-select", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never, true, never>;
|
|
23
24
|
}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService } from '@ajsf/core';
|
|
4
|
+
import { TheSeamSchemaFormControlWidget, TheSeamSchemaFormWidgetLayoutNodeOptions } from '../../schema-form';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class TheSeamSchemaFormSubmitComponent implements OnInit {
|
|
6
|
-
private
|
|
6
|
+
export declare class TheSeamSchemaFormSubmitComponent implements OnInit, TheSeamSchemaFormControlWidget {
|
|
7
|
+
private readonly _jsf;
|
|
7
8
|
formControl?: AbstractControl;
|
|
8
9
|
controlName?: string;
|
|
9
|
-
controlValue
|
|
10
|
+
controlValue?: any;
|
|
10
11
|
controlDisabled: boolean;
|
|
11
12
|
boundControl: boolean;
|
|
12
|
-
options
|
|
13
|
-
layoutNode:
|
|
14
|
-
layoutIndex:
|
|
15
|
-
dataIndex:
|
|
16
|
-
constructor(
|
|
13
|
+
options?: TheSeamSchemaFormWidgetLayoutNodeOptions;
|
|
14
|
+
layoutNode: TheSeamSchemaFormControlWidget['layoutNode'];
|
|
15
|
+
layoutIndex: TheSeamSchemaFormControlWidget['layoutIndex'];
|
|
16
|
+
dataIndex: TheSeamSchemaFormControlWidget['dataIndex'];
|
|
17
|
+
constructor(_jsf: JsonSchemaFormService);
|
|
17
18
|
ngOnInit(): void;
|
|
18
19
|
updateValue(event: any): void;
|
|
19
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamSchemaFormSubmitComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormSubmitComponent, "seam-schema-form-submit", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never,
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormSubmitComponent, "seam-schema-form-submit", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never, true, never>;
|
|
21
22
|
}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService, TitleMapItem } from '@ajsf/core';
|
|
4
|
+
import { TheSeamSchemaFormControlWidget, TheSeamSchemaFormWidgetLayoutNodeOptions } from '../../schema-form';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export type TheSeamSchemaFormSubmitSplitItem = TitleMapItem;
|
|
6
|
-
export declare class TheSeamSchemaFormSubmitSplitComponent implements OnInit, OnDestroy {
|
|
7
|
-
private
|
|
7
|
+
export declare class TheSeamSchemaFormSubmitSplitComponent implements OnInit, OnDestroy, TheSeamSchemaFormControlWidget {
|
|
8
|
+
private readonly _jsf;
|
|
8
9
|
/** @ignore */
|
|
9
10
|
private readonly _ngUnsubscribe;
|
|
10
11
|
formControl?: AbstractControl;
|
|
11
12
|
controlName?: string;
|
|
12
|
-
controlValue
|
|
13
|
+
controlValue?: any;
|
|
13
14
|
controlDisabled: boolean;
|
|
14
15
|
boundControl: boolean;
|
|
15
|
-
options
|
|
16
|
-
layoutNode:
|
|
17
|
-
layoutIndex:
|
|
18
|
-
dataIndex:
|
|
16
|
+
options?: TheSeamSchemaFormWidgetLayoutNodeOptions;
|
|
17
|
+
layoutNode: TheSeamSchemaFormControlWidget['layoutNode'];
|
|
18
|
+
layoutIndex: TheSeamSchemaFormControlWidget['layoutIndex'];
|
|
19
|
+
dataIndex: TheSeamSchemaFormControlWidget['dataIndex'];
|
|
19
20
|
_buttonLabel: string;
|
|
20
21
|
_dropdownObj: any;
|
|
21
22
|
_dropdownDisabled: boolean;
|
|
22
23
|
_selectList: TheSeamSchemaFormSubmitSplitItem[];
|
|
23
24
|
_selectedItem?: TheSeamSchemaFormSubmitSplitItem;
|
|
24
|
-
constructor(
|
|
25
|
+
constructor(_jsf: JsonSchemaFormService);
|
|
25
26
|
/** @ignore */
|
|
26
27
|
ngOnInit(): void;
|
|
27
28
|
/** @ignore */
|
|
@@ -33,5 +34,5 @@ export declare class TheSeamSchemaFormSubmitSplitComponent implements OnInit, On
|
|
|
33
34
|
private _getSelectedItem;
|
|
34
35
|
_setDropdownValue(value: any): void;
|
|
35
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamSchemaFormSubmitSplitComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormSubmitSplitComponent, "seam-schema-form-submit-split", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never,
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormSubmitSplitComponent, "seam-schema-form-submit-split", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never, true, never>;
|
|
37
38
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
|
+
import { JsonSchemaFormService } from '@ajsf/core';
|
|
4
|
+
import { TheSeamSchemaFormControlWidget, TheSeamSchemaFormWidgetLayoutNodeOptions } from '../../schema-form';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TheSeamSchemaFormTelComponent implements OnInit, TheSeamSchemaFormControlWidget {
|
|
7
|
+
private readonly _jsf;
|
|
8
|
+
formControl?: AbstractControl;
|
|
9
|
+
controlName?: string;
|
|
10
|
+
controlValue?: any;
|
|
11
|
+
controlDisabled: boolean;
|
|
12
|
+
boundControl: boolean;
|
|
13
|
+
options?: TheSeamSchemaFormWidgetLayoutNodeOptions;
|
|
14
|
+
layoutNode: TheSeamSchemaFormControlWidget['layoutNode'];
|
|
15
|
+
layoutIndex: TheSeamSchemaFormControlWidget['layoutIndex'];
|
|
16
|
+
dataIndex: TheSeamSchemaFormControlWidget['dataIndex'];
|
|
17
|
+
autoCompleteList: string[];
|
|
18
|
+
constructor(_jsf: JsonSchemaFormService);
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
updateValue(event: any): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamSchemaFormTelComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormTelComponent, "seam-schema-form-tel", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
|
+
import { JsonSchemaFormService } from '@ajsf/core';
|
|
4
|
+
import { TheSeamSchemaFormControlWidget, TheSeamSchemaFormWidgetLayoutNodeOptions } from '../../schema-form';
|
|
5
|
+
import { TiledSelectItem, TiledSelectLayout } from '@theseam/ui-common/tiled-select';
|
|
6
|
+
import { Platform } from '@angular/cdk/platform';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class TheSeamSchemaFormTiledSelectComponent implements OnInit, TheSeamSchemaFormControlWidget {
|
|
9
|
+
private readonly _jsf;
|
|
10
|
+
private readonly _platform;
|
|
11
|
+
formControl?: AbstractControl;
|
|
12
|
+
controlName?: string;
|
|
13
|
+
controlValue?: any;
|
|
14
|
+
controlDisabled: boolean;
|
|
15
|
+
boundControl: boolean;
|
|
16
|
+
options?: TheSeamSchemaFormWidgetLayoutNodeOptions;
|
|
17
|
+
layoutNode: TheSeamSchemaFormControlWidget['layoutNode'];
|
|
18
|
+
layoutIndex: TheSeamSchemaFormControlWidget['layoutIndex'];
|
|
19
|
+
dataIndex: TheSeamSchemaFormControlWidget['dataIndex'];
|
|
20
|
+
tiles: TiledSelectItem[];
|
|
21
|
+
layout: TiledSelectLayout;
|
|
22
|
+
multiple: boolean;
|
|
23
|
+
selectionToggleable: boolean;
|
|
24
|
+
tileBackdrop: boolean;
|
|
25
|
+
showSelectedIcon: boolean;
|
|
26
|
+
animationsDisabled: boolean;
|
|
27
|
+
constructor(_jsf: JsonSchemaFormService, _platform: Platform);
|
|
28
|
+
ngOnInit(): void;
|
|
29
|
+
updateValue(event: any): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TheSeamSchemaFormTiledSelectComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheSeamSchemaFormTiledSelectComponent, "seam-schema-form-tiled-select", never, { "layoutNode": "layoutNode"; "layoutIndex": "layoutIndex"; "dataIndex": "dataIndex"; }, {}, never, never, true, never>;
|
|
32
|
+
}
|
|
@@ -2,7 +2,7 @@ import { ElementRef } from '@angular/core';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class MenuFooterActionComponent {
|
|
4
4
|
private _elementRef;
|
|
5
|
-
get _attrType(): "
|
|
5
|
+
get _attrType(): "button" | "reset" | "submit" | null | undefined;
|
|
6
6
|
/** ARIA type for the button. */
|
|
7
7
|
get type(): 'button' | 'submit' | 'reset' | undefined | null;
|
|
8
8
|
set type(value: 'button' | 'submit' | 'reset' | undefined | null);
|
package/menu/public-api.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export * from './testing/menu-footer.harness';
|
|
2
|
+
export * from './testing/menu-header.harness';
|
|
3
|
+
export * from './testing/menu-item.harness';
|
|
4
|
+
export * from './testing/menu.harness';
|
|
1
5
|
export * from './menu-animations';
|
|
2
6
|
export * from './menu-divider.component';
|
|
3
7
|
export * from './menu-item.component';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarnessConstructor, ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
/** A set of criteria that can be used to filter a list of `TheSeamMenuFooterHarness` instances. */
|
|
3
|
+
export interface TheSeamMenuFooterHarnessFilters extends BaseHarnessFilters {
|
|
4
|
+
/** Only find instances whose text matches the given value. */
|
|
5
|
+
text?: string | RegExp;
|
|
6
|
+
}
|
|
7
|
+
export declare class TheSeamMenuFooterHarness extends ContentContainerComponentHarness<string> {
|
|
8
|
+
/** The selector for the host element of a `MenuFooterComponent` instance. */
|
|
9
|
+
static hostSelector: string;
|
|
10
|
+
/**
|
|
11
|
+
* Gets a `HarnessPredicate` that can be used to search for a menu item with specific attributes.
|
|
12
|
+
* @param options Options for filtering which menu item instances are considered a match.
|
|
13
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
14
|
+
*/
|
|
15
|
+
static with<T extends TheSeamMenuFooterHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamMenuFooterHarnessFilters): HarnessPredicate<T>;
|
|
16
|
+
/** Gets the text of the menu item. */
|
|
17
|
+
getText(): Promise<string>;
|
|
18
|
+
/** Clicks the menu item. */
|
|
19
|
+
click(): Promise<void>;
|
|
20
|
+
/** Hovers the menu item. */
|
|
21
|
+
hover(): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarnessConstructor, ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
/** A set of criteria that can be used to filter a list of `TheSeamMenuHeaderHarness` instances. */
|
|
3
|
+
export interface TheSeamMenuHeaderHarnessFilters extends BaseHarnessFilters {
|
|
4
|
+
}
|
|
5
|
+
export declare class TheSeamMenuHeaderHarness extends ContentContainerComponentHarness<string> {
|
|
6
|
+
/** The selector for the host element of a `MenuHeaderComponent` instance. */
|
|
7
|
+
static hostSelector: string;
|
|
8
|
+
/**
|
|
9
|
+
* Gets a `HarnessPredicate` that can be used to search for a menu item with specific attributes.
|
|
10
|
+
* @param options Options for filtering which menu item instances are considered a match.
|
|
11
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
12
|
+
*/
|
|
13
|
+
static with<T extends TheSeamMenuHeaderHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamMenuHeaderHarnessFilters): HarnessPredicate<T>;
|
|
14
|
+
/** Clicks the menu item. */
|
|
15
|
+
click(): Promise<void>;
|
|
16
|
+
/** Hovers the menu item. */
|
|
17
|
+
hover(): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarnessConstructor, ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
import { TheSeamMenuHarness } from './menu.harness';
|
|
3
|
+
/** A set of criteria that can be used to filter a list of `TheSeamMenuItemHarness` instances. */
|
|
4
|
+
export interface TheSeamMenuItemHarnessFilters extends BaseHarnessFilters {
|
|
5
|
+
/** Only find instances whose text matches the given value. */
|
|
6
|
+
text?: string | RegExp;
|
|
7
|
+
/** Only find instances that have a sub-menu. */
|
|
8
|
+
hasSubmenu?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class TheSeamMenuItemHarness extends ContentContainerComponentHarness<string> {
|
|
11
|
+
/** The selector for the host element of a `MenuItemComponent` instance. */
|
|
12
|
+
static hostSelector: string;
|
|
13
|
+
/**
|
|
14
|
+
* Gets a `HarnessPredicate` that can be used to search for a menu item with specific attributes.
|
|
15
|
+
* @param options Options for filtering which menu item instances are considered a match.
|
|
16
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
17
|
+
*/
|
|
18
|
+
static with<T extends TheSeamMenuItemHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamMenuItemHarnessFilters): HarnessPredicate<T>;
|
|
19
|
+
/** Whether the menu is disabled. */
|
|
20
|
+
isDisabled(): Promise<boolean>;
|
|
21
|
+
/** Gets the text of the menu item. */
|
|
22
|
+
getText(): Promise<string>;
|
|
23
|
+
/** Focuses the menu item. */
|
|
24
|
+
focus(): Promise<void>;
|
|
25
|
+
/** Blurs the menu item. */
|
|
26
|
+
blur(): Promise<void>;
|
|
27
|
+
/** Whether the menu item is focused. */
|
|
28
|
+
isFocused(): Promise<boolean>;
|
|
29
|
+
/** Clicks the menu item. */
|
|
30
|
+
click(): Promise<void>;
|
|
31
|
+
/** Hovers the menu item. */
|
|
32
|
+
hover(): Promise<void>;
|
|
33
|
+
/** Whether this item has a submenu. */
|
|
34
|
+
hasSubmenu(): Promise<boolean>;
|
|
35
|
+
/** Gets the submenu associated with this menu item, or null if none. */
|
|
36
|
+
getSubmenu(): Promise<TheSeamMenuHarness | null>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ComponentHarnessConstructor, ContentContainerComponentHarness, HarnessLoader, HarnessPredicate, BaseHarnessFilters } from '@angular/cdk/testing';
|
|
2
|
+
import { TheSeamMenuItemHarness, TheSeamMenuItemHarnessFilters } from './menu-item.harness';
|
|
3
|
+
import { TheSeamMenuFooterHarness, TheSeamMenuFooterHarnessFilters } from './menu-footer.harness';
|
|
4
|
+
import { TheSeamMenuHeaderHarness, TheSeamMenuHeaderHarnessFilters } from './menu-header.harness';
|
|
5
|
+
/** A set of criteria that can be used to filter a list of `TheSeamMenuHarness` instances. */
|
|
6
|
+
export interface TheSeamMenuHarnessFilters extends BaseHarnessFilters {
|
|
7
|
+
/** Only find instances whose trigger text matches the given value. */
|
|
8
|
+
triggerText?: string | RegExp;
|
|
9
|
+
}
|
|
10
|
+
export declare class TheSeamMenuHarness extends ContentContainerComponentHarness<string> {
|
|
11
|
+
private _documentRootLocator;
|
|
12
|
+
/** The selector for the host element of a `MenuComponent` instance. */
|
|
13
|
+
static hostSelector: string;
|
|
14
|
+
/**
|
|
15
|
+
* Gets a `HarnessPredicate` that can be used to search for a menu with specific attributes.
|
|
16
|
+
* @param options Options for filtering which menu instances are considered a match.
|
|
17
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
18
|
+
*/
|
|
19
|
+
static with<T extends TheSeamMenuHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamMenuHarnessFilters): HarnessPredicate<T>;
|
|
20
|
+
/** Whether the menu is disabled. */
|
|
21
|
+
isDisabled(): Promise<boolean>;
|
|
22
|
+
/** Whether the menu is open. */
|
|
23
|
+
isOpen(): Promise<boolean>;
|
|
24
|
+
/** Gets the text of the menu's trigger element. */
|
|
25
|
+
getTriggerText(): Promise<string>;
|
|
26
|
+
/** Focuses the menu. */
|
|
27
|
+
focus(): Promise<void>;
|
|
28
|
+
/** Blurs the menu. */
|
|
29
|
+
blur(): Promise<void>;
|
|
30
|
+
/** Whether the menu is focused. */
|
|
31
|
+
isFocused(): Promise<boolean>;
|
|
32
|
+
/** Opens the menu. */
|
|
33
|
+
open(): Promise<void>;
|
|
34
|
+
/** Closes the menu. */
|
|
35
|
+
close(): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Gets a list of `TheSeamMenuItemHarness` representing the items in the menu.
|
|
38
|
+
* @param filters Optionally filters which menu items are included.
|
|
39
|
+
*/
|
|
40
|
+
getItems(filters?: Omit<TheSeamMenuItemHarnessFilters, 'ancestor'>): Promise<TheSeamMenuItemHarness[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Clicks an item in the menu, and optionally continues clicking items in subsequent sub-menus.
|
|
43
|
+
* @param itemFilter A filter used to represent which item in the menu should be clicked. The
|
|
44
|
+
* first matching menu item will be clicked.
|
|
45
|
+
* @param subItemFilters A list of filters representing the items to click in any subsequent
|
|
46
|
+
* sub-menus. The first item in the sub-menu matching the corresponding filter in
|
|
47
|
+
* `subItemFilters` will be clicked.
|
|
48
|
+
*/
|
|
49
|
+
clickItem(itemFilter: Omit<TheSeamMenuItemHarnessFilters, 'ancestor'>, ...subItemFilters: Omit<TheSeamMenuItemHarnessFilters, 'ancestor'>[]): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Hovers an item in the menu, and optionally continues hovering items in subsequent sub-menus.
|
|
52
|
+
* @param itemFilter A filter used to represent which item in the menu should be hovered. The
|
|
53
|
+
* first matching menu item will be hovered.
|
|
54
|
+
* @param subItemFilters A list of filters representing the items to hover in any subsequent
|
|
55
|
+
* sub-menus. The first item in the sub-menu matching the corresponding filter in
|
|
56
|
+
* `subItemFilters` will be hovered.
|
|
57
|
+
*/
|
|
58
|
+
hoverItem(itemFilter: Omit<TheSeamMenuItemHarnessFilters, 'ancestor'>, ...subItemFilters: Omit<TheSeamMenuItemHarnessFilters, 'ancestor'>[]): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Gets a `TheSeamMenuHeaderHarness` representing the header in the menu.
|
|
61
|
+
* @param filters Optionally filters which menu items are included.
|
|
62
|
+
*/
|
|
63
|
+
getHeader(filters?: Omit<TheSeamMenuHeaderHarnessFilters, 'ancestor'>): Promise<TheSeamMenuHeaderHarness | null>;
|
|
64
|
+
/**
|
|
65
|
+
* Gets a `TheSeamMenuFooterHarness` representing the footer in the menu.
|
|
66
|
+
* @param filters Optionally filters which menu items are included.
|
|
67
|
+
*/
|
|
68
|
+
getFooter(filters?: Omit<TheSeamMenuFooterHarnessFilters, 'ancestor'>): Promise<TheSeamMenuFooterHarness | null>;
|
|
69
|
+
protected getRootHarnessLoader(): Promise<HarnessLoader>;
|
|
70
|
+
/** Gets the menu panel associated with this menu. */
|
|
71
|
+
private _getMenuPanel;
|
|
72
|
+
/** Gets the id of the menu panel associated with this menu. */
|
|
73
|
+
private _getPanelId;
|
|
74
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { HandlerFunction } from '@storybook/addon-actions';
|
|
2
|
+
export interface ArgsTplParts {
|
|
3
|
+
actions: {
|
|
4
|
+
[prop: string]: HandlerFunction;
|
|
5
|
+
};
|
|
6
|
+
tplfragment: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ArgsTplOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Properties to always bind to the template.
|
|
11
|
+
*/
|
|
12
|
+
alwaysBind?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Properties to exclude from bidning to the template.
|
|
15
|
+
*/
|
|
16
|
+
exclude?: string[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* This is an attempt at simplifying the use of auto-generated args in stories
|
|
20
|
+
* defined with `template`, since Angular doesn't have a way to simply use a
|
|
21
|
+
* spread operator syntax.
|
|
22
|
+
*
|
|
23
|
+
* @experimental
|
|
24
|
+
*/
|
|
25
|
+
export declare function argsToTpl(options?: ArgsTplOptions): string;
|