@rnw-community/wdio 0.46.1 → 0.46.4
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/dist/cjs/add-wdio-commands.d.ts.map +1 -1
- package/dist/cjs/add-wdio-commands.js +0 -4
- package/dist/cjs/add-wdio-commands.js.map +1 -1
- package/dist/cjs/command/index.d.ts +0 -2
- package/dist/cjs/command/index.d.ts.map +1 -1
- package/dist/cjs/command/index.js +1 -5
- package/dist/cjs/command/index.js.map +1 -1
- package/dist/cjs/command/test-id.command.d.ts.map +1 -1
- package/dist/cjs/command/test-id.command.js +2 -1
- package/dist/cjs/command/test-id.command.js.map +1 -1
- package/dist/cjs/command/test-ids.command.d.ts.map +1 -1
- package/dist/cjs/command/test-ids.command.js +2 -1
- package/dist/cjs/command/test-ids.command.js.map +1 -1
- package/dist/cjs/component/component.d.ts +3 -5
- package/dist/cjs/component/component.d.ts.map +1 -1
- package/dist/cjs/component/component.js +4 -9
- package/dist/cjs/component/component.js.map +1 -1
- package/dist/cjs/component/get-component/get-component.d.ts +2 -2
- package/dist/cjs/component/get-component/get-component.d.ts.map +1 -1
- package/dist/cjs/component/get-component/get-component.js +1 -2
- package/dist/cjs/component/get-component/get-component.js.map +1 -1
- package/dist/cjs/component/get-exteded-component/get-extended-component.d.ts +2 -2
- package/dist/cjs/component/get-exteded-component/get-extended-component.d.ts.map +1 -1
- package/dist/cjs/component/get-exteded-component/get-extended-component.js +2 -2
- package/dist/cjs/component/get-exteded-component/get-extended-component.js.map +1 -1
- package/dist/cjs/component$/create-component$/create-component$.d.ts +3 -0
- package/dist/cjs/component$/create-component$/create-component$.d.ts.map +1 -0
- package/dist/cjs/component$/create-component$/create-component$.js +7 -0
- package/dist/cjs/component$/create-component$/create-component$.js.map +1 -0
- package/dist/cjs/component$/get-component$/get-component$.d.ts +3 -0
- package/dist/cjs/component$/get-component$/get-component$.d.ts.map +1 -0
- package/dist/cjs/component$/get-component$/get-component$.js +8 -0
- package/dist/cjs/component$/get-component$/get-component$.js.map +1 -0
- package/dist/cjs/component$/get-exteded-component$/get-extended-component$.d.ts +5 -0
- package/dist/cjs/component$/get-exteded-component$/get-extended-component$.d.ts.map +1 -0
- package/dist/cjs/component$/get-exteded-component$/get-extended-component$.js +17 -0
- package/dist/cjs/component$/get-exteded-component$/get-extended-component$.js.map +1 -0
- package/dist/cjs/config/default$-component.config.d.ts.map +1 -1
- package/dist/cjs/config/default$-component.config.js +2 -1
- package/dist/cjs/config/default$-component.config.js.map +1 -1
- package/dist/cjs/config/default-component.config.d.ts.map +1 -1
- package/dist/cjs/config/default-component.config.js +2 -1
- package/dist/cjs/config/default-component.config.js.map +1 -1
- package/dist/cjs/index.d.ts +6 -4
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +13 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/rooted-component/create-rooted-component/create-rooted-component.d.ts +2 -2
- package/dist/cjs/rooted-component/create-rooted-component/create-rooted-component.d.ts.map +1 -1
- package/dist/cjs/rooted-component/create-rooted-component/create-rooted-component.js +1 -1
- package/dist/cjs/rooted-component/create-rooted-component/create-rooted-component.js.map +1 -1
- package/dist/cjs/rooted-component/get-extended-rooted-component/get-extended-rooted-component.d.ts +2 -2
- package/dist/cjs/rooted-component/get-extended-rooted-component/get-extended-rooted-component.d.ts.map +1 -1
- package/dist/cjs/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js +2 -2
- package/dist/cjs/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js.map +1 -1
- package/dist/cjs/rooted-component/get-rooted-component/get-rooted-component.d.ts +2 -2
- package/dist/cjs/rooted-component/get-rooted-component/get-rooted-component.d.ts.map +1 -1
- package/dist/cjs/rooted-component/get-rooted-component/get-rooted-component.js +1 -2
- package/dist/cjs/rooted-component/get-rooted-component/get-rooted-component.js.map +1 -1
- package/dist/cjs/rooted-component/rooted-component.d.ts +1 -4
- package/dist/cjs/rooted-component/rooted-component.d.ts.map +1 -1
- package/dist/cjs/rooted-component/rooted-component.js +14 -23
- package/dist/cjs/rooted-component/rooted-component.js.map +1 -1
- package/dist/cjs/{rooted-component/create$-rooted-component/create$-rooted-component.d.ts → rooted-component$/create-rooted-component$/create-rooted-component$.d.ts} +2 -2
- package/dist/cjs/rooted-component$/create-rooted-component$/create-rooted-component$.d.ts.map +1 -0
- package/dist/cjs/rooted-component$/create-rooted-component$/create-rooted-component$.js +7 -0
- package/dist/cjs/rooted-component$/create-rooted-component$/create-rooted-component$.js.map +1 -0
- package/dist/cjs/rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$.d.ts +5 -0
- package/dist/cjs/rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$.d.ts.map +1 -0
- package/dist/cjs/rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$.js +17 -0
- package/dist/cjs/rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$.js.map +1 -0
- package/dist/cjs/rooted-component$/get-rooted-component$/get-rooted-component$.d.ts +4 -0
- package/dist/cjs/rooted-component$/get-rooted-component$/get-rooted-component$.d.ts.map +1 -0
- package/dist/cjs/rooted-component$/get-rooted-component$/get-rooted-component$.js +8 -0
- package/dist/cjs/rooted-component$/get-rooted-component$/get-rooted-component$.js.map +1 -0
- package/dist/cjs/selector-element/selector-element.d.ts +0 -12
- package/dist/cjs/selector-element/selector-element.d.ts.map +1 -1
- package/dist/cjs/selector-element/selector-element.js +0 -12
- package/dist/cjs/selector-element/selector-element.js.map +1 -1
- package/dist/cjs/tsconfig.build-cjs.tsbuildinfo +1 -1
- package/dist/cjs/type/component-input-arg.type.d.ts +1 -1
- package/dist/cjs/type/component-input-arg.type.d.ts.map +1 -1
- package/dist/cjs/type/el-selector-fn.type.d.ts +2 -1
- package/dist/cjs/type/el-selector-fn.type.d.ts.map +1 -1
- package/dist/cjs/type/els-selector-fn.type.d.ts +2 -1
- package/dist/cjs/type/els-selector-fn.type.d.ts.map +1 -1
- package/dist/cjs/type/rooted-component-with-selectors-ctor.type.d.ts +1 -1
- package/dist/cjs/type/rooted-component-with-selectors-ctor.type.d.ts.map +1 -1
- package/dist/cjs/util/index.d.ts +0 -1
- package/dist/cjs/util/index.d.ts.map +1 -1
- package/dist/cjs/util/index.js +1 -3
- package/dist/cjs/util/index.js.map +1 -1
- package/dist/esm/add-wdio-commands.d.ts.map +1 -1
- package/dist/esm/add-wdio-commands.js +1 -5
- package/dist/esm/add-wdio-commands.js.map +1 -1
- package/dist/esm/command/index.d.ts +0 -2
- package/dist/esm/command/index.d.ts.map +1 -1
- package/dist/esm/command/index.js +0 -2
- package/dist/esm/command/index.js.map +1 -1
- package/dist/esm/command/test-id.command.d.ts.map +1 -1
- package/dist/esm/command/test-id.command.js +2 -1
- package/dist/esm/command/test-id.command.js.map +1 -1
- package/dist/esm/command/test-ids.command.d.ts.map +1 -1
- package/dist/esm/command/test-ids.command.js +2 -1
- package/dist/esm/command/test-ids.command.js.map +1 -1
- package/dist/esm/component/component.d.ts +3 -5
- package/dist/esm/component/component.d.ts.map +1 -1
- package/dist/esm/component/component.js +4 -9
- package/dist/esm/component/component.js.map +1 -1
- package/dist/esm/component/get-component/get-component.d.ts +2 -2
- package/dist/esm/component/get-component/get-component.d.ts.map +1 -1
- package/dist/esm/component/get-component/get-component.js +1 -2
- package/dist/esm/component/get-component/get-component.js.map +1 -1
- package/dist/esm/component/get-exteded-component/get-extended-component.d.ts +2 -2
- package/dist/esm/component/get-exteded-component/get-extended-component.d.ts.map +1 -1
- package/dist/esm/component/get-exteded-component/get-extended-component.js +2 -2
- package/dist/esm/component/get-exteded-component/get-extended-component.js.map +1 -1
- package/dist/esm/component$/create-component$/create-component$.d.ts +3 -0
- package/dist/esm/component$/create-component$/create-component$.d.ts.map +1 -0
- package/dist/esm/component$/create-component$/create-component$.js +3 -0
- package/dist/esm/component$/create-component$/create-component$.js.map +1 -0
- package/dist/esm/component$/get-component$/get-component$.d.ts +3 -0
- package/dist/esm/component$/get-component$/get-component$.d.ts.map +1 -0
- package/dist/esm/component$/get-component$/get-component$.js +4 -0
- package/dist/esm/component$/get-component$/get-component$.js.map +1 -0
- package/dist/esm/component$/get-exteded-component$/get-extended-component$.d.ts +5 -0
- package/dist/esm/component$/get-exteded-component$/get-extended-component$.d.ts.map +1 -0
- package/dist/esm/component$/get-exteded-component$/get-extended-component$.js +13 -0
- package/dist/esm/component$/get-exteded-component$/get-extended-component$.js.map +1 -0
- package/dist/esm/config/default$-component.config.d.ts.map +1 -1
- package/dist/esm/config/default$-component.config.js +2 -1
- package/dist/esm/config/default$-component.config.js.map +1 -1
- package/dist/esm/config/default-component.config.d.ts.map +1 -1
- package/dist/esm/config/default-component.config.js +2 -1
- package/dist/esm/config/default-component.config.js.map +1 -1
- package/dist/esm/index.d.ts +6 -4
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +6 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/rooted-component/create-rooted-component/create-rooted-component.d.ts +2 -2
- package/dist/esm/rooted-component/create-rooted-component/create-rooted-component.d.ts.map +1 -1
- package/dist/esm/rooted-component/create-rooted-component/create-rooted-component.js +1 -1
- package/dist/esm/rooted-component/create-rooted-component/create-rooted-component.js.map +1 -1
- package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.d.ts +2 -2
- package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.d.ts.map +1 -1
- package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js +2 -2
- package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js.map +1 -1
- package/dist/esm/rooted-component/get-rooted-component/get-rooted-component.d.ts +2 -2
- package/dist/esm/rooted-component/get-rooted-component/get-rooted-component.d.ts.map +1 -1
- package/dist/esm/rooted-component/get-rooted-component/get-rooted-component.js +1 -2
- package/dist/esm/rooted-component/get-rooted-component/get-rooted-component.js.map +1 -1
- package/dist/esm/rooted-component/rooted-component.d.ts +1 -4
- package/dist/esm/rooted-component/rooted-component.d.ts.map +1 -1
- package/dist/esm/rooted-component/rooted-component.js +14 -23
- package/dist/esm/rooted-component/rooted-component.js.map +1 -1
- package/dist/esm/{rooted-component/create$-rooted-component/create$-rooted-component.d.ts → rooted-component$/create-rooted-component$/create-rooted-component$.d.ts} +2 -2
- package/dist/esm/rooted-component$/create-rooted-component$/create-rooted-component$.d.ts.map +1 -0
- package/dist/esm/rooted-component$/create-rooted-component$/create-rooted-component$.js +3 -0
- package/dist/esm/rooted-component$/create-rooted-component$/create-rooted-component$.js.map +1 -0
- package/dist/esm/rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$.d.ts +5 -0
- package/dist/esm/rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$.d.ts.map +1 -0
- package/dist/esm/rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$.js +13 -0
- package/dist/esm/rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$.js.map +1 -0
- package/dist/esm/rooted-component$/get-rooted-component$/get-rooted-component$.d.ts +4 -0
- package/dist/esm/rooted-component$/get-rooted-component$/get-rooted-component$.d.ts.map +1 -0
- package/dist/esm/rooted-component$/get-rooted-component$/get-rooted-component$.js +4 -0
- package/dist/esm/rooted-component$/get-rooted-component$/get-rooted-component$.js.map +1 -0
- package/dist/esm/selector-element/selector-element.d.ts +0 -12
- package/dist/esm/selector-element/selector-element.d.ts.map +1 -1
- package/dist/esm/selector-element/selector-element.js +0 -12
- package/dist/esm/selector-element/selector-element.js.map +1 -1
- package/dist/esm/tsconfig.build-esm.tsbuildinfo +1 -1
- package/dist/esm/type/component-input-arg.type.d.ts +1 -1
- package/dist/esm/type/component-input-arg.type.d.ts.map +1 -1
- package/dist/esm/type/el-selector-fn.type.d.ts +2 -1
- package/dist/esm/type/el-selector-fn.type.d.ts.map +1 -1
- package/dist/esm/type/els-selector-fn.type.d.ts +2 -1
- package/dist/esm/type/els-selector-fn.type.d.ts.map +1 -1
- package/dist/esm/type/rooted-component-with-selectors-ctor.type.d.ts +1 -1
- package/dist/esm/type/rooted-component-with-selectors-ctor.type.d.ts.map +1 -1
- package/dist/esm/util/index.d.ts +0 -1
- package/dist/esm/util/index.d.ts.map +1 -1
- package/dist/esm/util/index.js +0 -1
- package/dist/esm/util/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/cjs/component/create$-component/create$-component.d.ts +0 -3
- package/dist/cjs/component/create$-component/create$-component.d.ts.map +0 -1
- package/dist/cjs/component/create$-component/create$-component.js +0 -7
- package/dist/cjs/component/create$-component/create$-component.js.map +0 -1
- package/dist/cjs/component/get$-component/get$-component.d.ts +0 -3
- package/dist/cjs/component/get$-component/get$-component.d.ts.map +0 -1
- package/dist/cjs/component/get$-component/get$-component.js +0 -8
- package/dist/cjs/component/get$-component/get$-component.js.map +0 -1
- package/dist/cjs/rooted-component/create$-rooted-component/create$-rooted-component.d.ts.map +0 -1
- package/dist/cjs/rooted-component/create$-rooted-component/create$-rooted-component.js +0 -7
- package/dist/cjs/rooted-component/create$-rooted-component/create$-rooted-component.js.map +0 -1
- package/dist/cjs/rooted-component/get$-rooted-component/get$-rooted-component.d.ts +0 -3
- package/dist/cjs/rooted-component/get$-rooted-component/get$-rooted-component.d.ts.map +0 -1
- package/dist/cjs/rooted-component/get$-rooted-component/get$-rooted-component.js +0 -8
- package/dist/cjs/rooted-component/get$-rooted-component/get$-rooted-component.js.map +0 -1
- package/dist/cjs/util/wdio-element-chain-by-ref/wdio-element-chain-by-ref.util.d.ts +0 -3
- package/dist/cjs/util/wdio-element-chain-by-ref/wdio-element-chain-by-ref.util.d.ts.map +0 -1
- package/dist/cjs/util/wdio-element-chain-by-ref/wdio-element-chain-by-ref.util.js +0 -6
- package/dist/cjs/util/wdio-element-chain-by-ref/wdio-element-chain-by-ref.util.js.map +0 -1
- package/dist/esm/component/create$-component/create$-component.d.ts +0 -3
- package/dist/esm/component/create$-component/create$-component.d.ts.map +0 -1
- package/dist/esm/component/create$-component/create$-component.js +0 -3
- package/dist/esm/component/create$-component/create$-component.js.map +0 -1
- package/dist/esm/component/get$-component/get$-component.d.ts +0 -3
- package/dist/esm/component/get$-component/get$-component.d.ts.map +0 -1
- package/dist/esm/component/get$-component/get$-component.js +0 -4
- package/dist/esm/component/get$-component/get$-component.js.map +0 -1
- package/dist/esm/rooted-component/create$-rooted-component/create$-rooted-component.d.ts.map +0 -1
- package/dist/esm/rooted-component/create$-rooted-component/create$-rooted-component.js +0 -3
- package/dist/esm/rooted-component/create$-rooted-component/create$-rooted-component.js.map +0 -1
- package/dist/esm/rooted-component/get$-rooted-component/get$-rooted-component.d.ts +0 -3
- package/dist/esm/rooted-component/get$-rooted-component/get$-rooted-component.d.ts.map +0 -1
- package/dist/esm/rooted-component/get$-rooted-component/get$-rooted-component.js +0 -4
- package/dist/esm/rooted-component/get$-rooted-component/get$-rooted-component.js.map +0 -1
- package/dist/esm/util/wdio-element-chain-by-ref/wdio-element-chain-by-ref.util.d.ts +0 -3
- package/dist/esm/util/wdio-element-chain-by-ref/wdio-element-chain-by-ref.util.d.ts.map +0 -1
- package/dist/esm/util/wdio-element-chain-by-ref/wdio-element-chain-by-ref.util.js +0 -2
- package/dist/esm/util/wdio-element-chain-by-ref/wdio-element-chain-by-ref.util.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-ids.command.js","sourceRoot":"","sources":["../../../src/command/test-ids.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7C,MAAM,CAAC,MAAM,QAAQ,GAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"test-ids.command.js","sourceRoot":"","sources":["../../../src/command/test-ids.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7C,MAAM,CAAC,MAAM,QAAQ,GAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,EAAE,EAAE,CACjE,OAAO,CAAC,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/// <reference types="webdriverio/async" />
|
|
2
|
-
import type { ComponentConfigInterface
|
|
2
|
+
import type { ComponentConfigInterface } from '../type';
|
|
3
3
|
import type { Enum } from '@rnw-community/shared';
|
|
4
4
|
import type { ChainablePromiseArray, ChainablePromiseElement } from 'webdriverio';
|
|
5
5
|
export declare class Component<T = any> {
|
|
6
|
-
|
|
7
|
-
protected
|
|
8
|
-
protected elsSelectorFn: ElsSelectorFn;
|
|
9
|
-
protected elsIndexSelectorFn: ElsIndexSelectorFn;
|
|
6
|
+
protected config: ComponentConfigInterface;
|
|
7
|
+
protected selectors: Enum<T>;
|
|
10
8
|
protected parentComponents: Component[];
|
|
11
9
|
constructor(config: ComponentConfigInterface, selectors: Enum<T>);
|
|
12
10
|
addParentComponent(component: Component): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/component/component.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/component/component.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAGlF,qBAAa,SAAS,CAAC,CAAC,GAAG,GAAG;IAGd,SAAS,CAAC,MAAM,EAAE,wBAAwB;IAAE,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAFpF,SAAS,CAAC,gBAAgB,EAAE,SAAS,EAAE,CAAM;gBAEvB,MAAM,EAAE,wBAAwB,EAAY,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IASpF,kBAAkB,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAI9C,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC;IAI1E,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,qBAAqB,CAAC,WAAW,CAAC,YAAY,CAAC;IAI9E,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC;IAI5F,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,OAAO,GAAG,OAAO;CAoB5F"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { isDefined } from '@rnw-community/shared';
|
|
2
2
|
import { SelectorElement } from '../selector-element/selector-element';
|
|
3
|
-
/*
|
|
4
|
-
* TODO: Fix getLocation|getSize usage to handle both signatures through variable args array
|
|
5
|
-
*/
|
|
6
3
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
4
|
export class Component {
|
|
8
5
|
constructor(config, selectors) {
|
|
6
|
+
this.config = config;
|
|
9
7
|
this.selectors = selectors;
|
|
10
8
|
this.parentComponents = [];
|
|
11
|
-
this.elSelectorFn = config.elSelectorFn;
|
|
12
|
-
this.elsSelectorFn = config.elsSelectorFn;
|
|
13
|
-
this.elsIndexSelectorFn = config.elsIndexSelectorFn;
|
|
14
9
|
// eslint-disable-next-line no-constructor-return
|
|
15
10
|
return new Proxy(this, {
|
|
16
11
|
get(client, field, receiver) {
|
|
@@ -22,13 +17,13 @@ export class Component {
|
|
|
22
17
|
this.parentComponents.push(component);
|
|
23
18
|
}
|
|
24
19
|
getChildEl(selector) {
|
|
25
|
-
return this.elSelectorFn(selector);
|
|
20
|
+
return this.config.elSelectorFn(selector);
|
|
26
21
|
}
|
|
27
22
|
getChildEls(selector) {
|
|
28
|
-
return this.elsSelectorFn(selector);
|
|
23
|
+
return this.config.elsSelectorFn(selector);
|
|
29
24
|
}
|
|
30
25
|
getChildElByIdx(selector, idx) {
|
|
31
|
-
return this.elsIndexSelectorFn(selector, idx);
|
|
26
|
+
return this.config.elsIndexSelectorFn(selector, idx);
|
|
32
27
|
}
|
|
33
28
|
proxyGet(field, receiver, notFoundFn) {
|
|
34
29
|
if (Reflect.has(this, field)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/component/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAMvE
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/component/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAMvE,8DAA8D;AAC9D,MAAM,OAAO,SAAS;IAGlB,YAAsB,MAAgC,EAAY,SAAkB;QAA9D,WAAM,GAAN,MAAM,CAA0B;QAAY,cAAS,GAAT,SAAS,CAAS;QAF1E,qBAAgB,GAAgB,EAAE,CAAC;QAGzC,iDAAiD;QACjD,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE;YACnB,GAAG,CAAC,MAAM,EAAE,KAAa,EAAE,QAAQ;gBAC/B,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;YAC5C,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;IAED,kBAAkB,CAAC,SAAoB;QACnC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC;IAED,UAAU,CAAC,QAAgB;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAED,WAAW,CAAC,QAAgB;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAED,eAAe,CAAC,QAAgB,EAAE,GAAW;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACzD,CAAC;IAES,QAAQ,CAAC,KAAa,EAAE,QAAiB,EAAE,UAA0B;QAC3E,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;YAC1B,+DAA+D;YAC/D,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;SAC7C;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAsB,CAAC;QAC5D,IAAI,SAAS,CAAC,QAAQ,CAAC,EAAE;YACrB,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;SAC9C;QAED,KAAK,MAAM,eAAe,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACjD,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI,eAAe,CAAC,SAAS,EAAE;gBAC3E,+DAA+D;gBAC/D,OAAO,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;aACxD;SACJ;QAED,OAAO,UAAU,EAAE,EAAE,CAAC;IAC1B,CAAC;CACJ"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getComponent: <T>(selectors: T
|
|
1
|
+
import type { ComponentWithSelectorsCtor } from '../../type';
|
|
2
|
+
export declare const getComponent: <T>(selectors: T) => new () => import("../../type").ComponentWithSelectors<T>;
|
|
3
3
|
//# sourceMappingURL=get-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-component.d.ts","sourceRoot":"","sources":["../../../../src/component/get-component/get-component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-component.d.ts","sourceRoot":"","sources":["../../../../src/component/get-component/get-component.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,YAAY,+EAAiG,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { defaultComponentConfig } from '../../config/default-component.config';
|
|
2
1
|
import { Component } from '../component';
|
|
3
2
|
import { getExtendedComponent } from '../get-exteded-component/get-extended-component';
|
|
4
|
-
export const getComponent = (selectors
|
|
3
|
+
export const getComponent = (selectors) => getExtendedComponent(selectors, Component);
|
|
5
4
|
//# sourceMappingURL=get-component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-component.js","sourceRoot":"","sources":["../../../../src/component/get-component/get-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"get-component.js","sourceRoot":"","sources":["../../../../src/component/get-component/get-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAIvF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAI,SAAY,EAAiC,EAAE,CAAC,oBAAoB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from '../component';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ComponentWithSelectorsCtor } from '../../type';
|
|
3
3
|
import type { ClassType } from '@rnw-community/shared';
|
|
4
|
-
export declare const getExtendedComponent: <T, P extends Component<any>>(selectors: T, ParentComponent: ClassType<P
|
|
4
|
+
export declare const getExtendedComponent: <T, P extends Component<any>>(selectors: T, ParentComponent: ClassType<P>) => ComponentWithSelectorsCtor<T, P>;
|
|
5
5
|
//# sourceMappingURL=get-extended-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-extended-component.d.ts","sourceRoot":"","sources":["../../../../src/component/get-exteded-component/get-extended-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"get-extended-component.d.ts","sourceRoot":"","sources":["../../../../src/component/get-exteded-component/get-extended-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,uBAAuB,CAAC;AAE7D,eAAO,MAAM,oBAAoB,gHAa5B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defaultComponentConfig } from '../../config/default-component.config';
|
|
2
2
|
import { Component } from '../component';
|
|
3
|
-
export const getExtendedComponent = (selectors, ParentComponent
|
|
3
|
+
export const getExtendedComponent = (selectors, ParentComponent) =>
|
|
4
4
|
// @ts-expect-error We use proxy for dynamic fields
|
|
5
5
|
class extends Component {
|
|
6
6
|
constructor() {
|
|
7
|
-
super(
|
|
7
|
+
super(defaultComponentConfig(), selectors);
|
|
8
8
|
if (ParentComponent !== Component) {
|
|
9
9
|
this.addParentComponent(new ParentComponent());
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-extended-component.js","sourceRoot":"","sources":["../../../../src/component/get-exteded-component/get-extended-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAChC,SAAY,EACZ,eAA6B,
|
|
1
|
+
{"version":3,"file":"get-extended-component.js","sourceRoot":"","sources":["../../../../src/component/get-exteded-component/get-extended-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAChC,SAAY,EACZ,eAA6B,EACG,EAAE;AAClC,mDAAmD;AACnD,KAAM,SAAQ,SAAY;IACtB;QACI,KAAK,CAAC,sBAAsB,EAAE,EAAE,SAA+B,CAAC,CAAC;QAEjE,IAAI,eAAe,KAAK,SAAS,EAAE;YAC/B,IAAI,CAAC,kBAAkB,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC;SAClD;IACL,CAAC;CACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-component$.d.ts","sourceRoot":"","sources":["../../../../src/component$/create-component$/create-component$.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,eAAO,MAAM,gBAAgB,gDAAsF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-component$.js","sourceRoot":"","sources":["../../../../src/component$/create-component$/create-component$.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAIjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAI,SAAY,EAA6B,EAAE,CAAC,IAAI,CAAC,aAAa,CAAI,SAAS,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-component$.d.ts","sourceRoot":"","sources":["../../../../src/component$/get-component$/get-component$.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,aAAa,+EAAkG,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Component } from '../../component/component';
|
|
2
|
+
import { getExtendedComponent$ } from '../get-exteded-component$/get-extended-component$';
|
|
3
|
+
export const getComponent$ = (selectors) => getExtendedComponent$(selectors, Component);
|
|
4
|
+
//# sourceMappingURL=get-component$.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-component$.js","sourceRoot":"","sources":["../../../../src/component$/get-component$/get-component$.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAI1F,MAAM,CAAC,MAAM,aAAa,GAAG,CAAI,SAAY,EAAiC,EAAE,CAAC,qBAAqB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Component } from '../../component/component';
|
|
2
|
+
import type { ComponentWithSelectorsCtor } from '../../type';
|
|
3
|
+
import type { ClassType } from '@rnw-community/shared';
|
|
4
|
+
export declare const getExtendedComponent$: <T, P extends Component<any>>(selectors: T, ParentComponent: ClassType<P>) => ComponentWithSelectorsCtor<T, P>;
|
|
5
|
+
//# sourceMappingURL=get-extended-component$.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-extended-component$.d.ts","sourceRoot":"","sources":["../../../../src/component$/get-exteded-component$/get-extended-component$.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,uBAAuB,CAAC;AAE7D,eAAO,MAAM,qBAAqB,gHAa7B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component } from '../../component/component';
|
|
2
|
+
import { default$ComponentConfig } from '../../config/default$-component.config';
|
|
3
|
+
export const getExtendedComponent$ = (selectors, ParentComponent) =>
|
|
4
|
+
// @ts-expect-error We use proxy for dynamic fields
|
|
5
|
+
class extends Component {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(default$ComponentConfig(), selectors);
|
|
8
|
+
if (ParentComponent !== Component) {
|
|
9
|
+
this.addParentComponent(new ParentComponent());
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=get-extended-component$.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-extended-component$.js","sourceRoot":"","sources":["../../../../src/component$/get-exteded-component$/get-extended-component$.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAKjF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,SAAY,EACZ,eAA6B,EACG,EAAE;AAClC,mDAAmD;AACnD,KAAM,SAAQ,SAAY;IACtB;QACI,KAAK,CAAC,uBAAuB,EAAE,EAAE,SAA+B,CAAC,CAAC;QAElE,IAAI,eAAe,KAAK,SAAS,EAAE;YAC/B,IAAI,CAAC,kBAAkB,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC;SAClD;IACL,CAAC;CACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default$-component.config.d.ts","sourceRoot":"","sources":["../../../src/config/default$-component.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default$-component.config.d.ts","sourceRoot":"","sources":["../../../src/config/default$-component.config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,eAAO,MAAM,uBAAuB,EAAE,MAAM,wBAI1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default$-component.config.js","sourceRoot":"","sources":["../../../src/config/default$-component.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"default$-component.config.js","sourceRoot":"","sources":["../../../src/config/default$-component.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAIxD,MAAM,CAAC,MAAM,uBAAuB,GAAmC,GAAG,EAAE,CAAC,CAAC;IAC1E,YAAY,EAAE,GAAG;IACjB,aAAa,EAAE,IAAI;IACnB,kBAAkB,EAAE,SAAS;CAChC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-component.config.d.ts","sourceRoot":"","sources":["../../../src/config/default-component.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default-component.config.d.ts","sourceRoot":"","sources":["../../../src/config/default-component.config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,eAAO,MAAM,sBAAsB,EAAE,MAAM,wBAIzC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { testID$, testID
|
|
1
|
+
import { testID$, testID$$ } from '../command';
|
|
2
|
+
import { testID$$Index } from '../command/test-id-index.command';
|
|
2
3
|
export const defaultComponentConfig = () => ({
|
|
3
4
|
elSelectorFn: testID$,
|
|
4
5
|
elsIndexSelectorFn: testID$$Index,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-component.config.js","sourceRoot":"","sources":["../../../src/config/default-component.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"default-component.config.js","sourceRoot":"","sources":["../../../src/config/default-component.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAIjE,MAAM,CAAC,MAAM,sBAAsB,GAAmC,GAAG,EAAE,CAAC,CAAC;IACzE,YAAY,EAAE,OAAO;IACrB,kBAAkB,EAAE,aAAa;IACjC,aAAa,EAAE,QAAQ;CAC1B,CAAC,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -35,14 +35,16 @@ export { relativeClickCommand } from './command/mobile/relative-click.command';
|
|
|
35
35
|
export { Component } from './component/component';
|
|
36
36
|
export { getExtendedComponent } from './component/get-exteded-component/get-extended-component';
|
|
37
37
|
export { getComponent } from './component/get-component/get-component';
|
|
38
|
-
export { get$Component } from './component/get$-component/get$-component';
|
|
39
38
|
export { createComponent } from './component/create-component/create-component';
|
|
40
|
-
export {
|
|
39
|
+
export { getExtendedComponent$ } from './component$/get-exteded-component$/get-extended-component$';
|
|
40
|
+
export { getComponent$ } from './component$/get-component$/get-component$';
|
|
41
|
+
export { createComponent$ } from './component$/create-component$/create-component$';
|
|
41
42
|
export { RootedComponent } from './rooted-component/rooted-component';
|
|
42
43
|
export { getExtendedRootedComponent } from './rooted-component/get-extended-rooted-component/get-extended-rooted-component';
|
|
43
44
|
export { getRootedComponent } from './rooted-component/get-rooted-component/get-rooted-component';
|
|
44
|
-
export { get$RootedComponent } from './rooted-component/get$-rooted-component/get$-rooted-component';
|
|
45
45
|
export { createRootedComponent } from './rooted-component/create-rooted-component/create-rooted-component';
|
|
46
|
-
export {
|
|
46
|
+
export { getExtendedRootedComponent$ } from './rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$';
|
|
47
|
+
export { getRootedComponent$ } from './rooted-component$/get-rooted-component$/get-rooted-component$';
|
|
48
|
+
export { createRootedComponent$ } from './rooted-component$/create-rooted-component$/create-rooted-component$';
|
|
47
49
|
export { addWdioCommands } from './add-wdio-commands';
|
|
48
50
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,YAAY,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,YAAY,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,YAAY,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACnF,YAAY,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,YAAY,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAChG,YAAY,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAC;AAEzG,YAAY,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAC9E,YAAY,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACvE,YAAY,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAEtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC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Component } from './component/component';
|
|
21
21
|
export { getExtendedComponent } from './component/get-exteded-component/get-extended-component';
|
|
22
22
|
export { getComponent } from './component/get-component/get-component';
|
|
23
|
-
export { get$Component } from './component/get$-component/get$-component';
|
|
24
23
|
export { createComponent } from './component/create-component/create-component';
|
|
25
|
-
export {
|
|
24
|
+
export { getExtendedComponent$ } from './component$/get-exteded-component$/get-extended-component$';
|
|
25
|
+
export { getComponent$ } from './component$/get-component$/get-component$';
|
|
26
|
+
export { createComponent$ } from './component$/create-component$/create-component$';
|
|
26
27
|
export { RootedComponent } from './rooted-component/rooted-component';
|
|
27
28
|
export { getExtendedRootedComponent } from './rooted-component/get-extended-rooted-component/get-extended-rooted-component';
|
|
28
29
|
export { getRootedComponent } from './rooted-component/get-rooted-component/get-rooted-component';
|
|
29
|
-
export { get$RootedComponent } from './rooted-component/get$-rooted-component/get$-rooted-component';
|
|
30
30
|
export { createRootedComponent } from './rooted-component/create-rooted-component/create-rooted-component';
|
|
31
|
-
export {
|
|
31
|
+
export { getExtendedRootedComponent$ } from './rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$';
|
|
32
|
+
export { getRootedComponent$ } from './rooted-component$/get-rooted-component$/get-rooted-component$';
|
|
33
|
+
export { createRootedComponent$ } from './rooted-component$/create-rooted-component$/create-rooted-component$';
|
|
32
34
|
export { addWdioCommands } from './add-wdio-commands';
|
|
33
35
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,cAAc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C;AAC5H,OAAO,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAC;AAE3G,OAAO,EAAE,2BAA2B,EAAE,MAAM,mFAAmF,CAAC;AAChI,OAAO,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,uEAAuE,CAAC;AAE/G,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const createRootedComponent: <T>(selectors: T, selectorOrElement: ComponentInputArg
|
|
1
|
+
import type { ComponentInputArg, RootedComponentWithSelectors } from '../../type';
|
|
2
|
+
export declare const createRootedComponent: <T>(selectors: T, selectorOrElement: ComponentInputArg) => RootedComponentWithSelectors<T>;
|
|
3
3
|
//# sourceMappingURL=create-rooted-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"create-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAElF,eAAO,MAAM,qBAAqB,uCAEX,iBAAiB,oCACuD,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { getRootedComponent } from '../get-rooted-component/get-rooted-component';
|
|
2
|
-
export const createRootedComponent = (selectors, selectorOrElement
|
|
2
|
+
export const createRootedComponent = (selectors, selectorOrElement) => new (getRootedComponent(selectors))(selectorOrElement);
|
|
3
3
|
//# sourceMappingURL=create-rooted-component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAIlF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,SAAY,EACZ,iBAAoC,
|
|
1
|
+
{"version":3,"file":"create-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAIlF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,SAAY,EACZ,iBAAoC,EACL,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAI,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC"}
|
package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RootedComponent } from '../rooted-component';
|
|
2
|
-
import type {
|
|
2
|
+
import type { RootedComponentWithSelectorsCtor } from '../../type';
|
|
3
3
|
import type { ClassType } from '@rnw-community/shared';
|
|
4
|
-
export declare const getExtendedRootedComponent: <T, P extends RootedComponent<any>>(selectors: T, ParentComponent: ClassType<P
|
|
4
|
+
export declare const getExtendedRootedComponent: <T, P extends RootedComponent<any>>(selectors: T, ParentComponent: ClassType<P>) => RootedComponentWithSelectorsCtor<T, P>;
|
|
5
5
|
//# sourceMappingURL=get-extended-rooted-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-extended-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"get-extended-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAqB,gCAAgC,EAAE,MAAM,YAAY,CAAC;AACtF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,eAAO,MAAM,0BAA0B,4HAalC,CAAC"}
|
package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defaultComponentConfig } from '../../config/default-component.config';
|
|
2
2
|
import { RootedComponent } from '../rooted-component';
|
|
3
|
-
export const getExtendedRootedComponent = (selectors, ParentComponent
|
|
3
|
+
export const getExtendedRootedComponent = (selectors, ParentComponent) =>
|
|
4
4
|
// @ts-expect-error We use proxy for dynamic fields
|
|
5
5
|
class extends RootedComponent {
|
|
6
6
|
constructor(selectorOrElement) {
|
|
7
|
-
super(
|
|
7
|
+
super(defaultComponentConfig(), selectors, selectorOrElement);
|
|
8
8
|
if (ParentComponent !== RootedComponent) {
|
|
9
9
|
this.addParentComponent(new ParentComponent(selectorOrElement));
|
|
10
10
|
}
|
package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-extended-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKtD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACtC,SAAY,EACZ,eAA6B,
|
|
1
|
+
{"version":3,"file":"get-extended-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKtD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACtC,SAAY,EACZ,eAA6B,EACS,EAAE;AACxC,mDAAmD;AACnD,KAAM,SAAQ,eAAe;IACzB,YAAY,iBAAoC;QAC5C,KAAK,CAAC,sBAAsB,EAAE,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAE9D,IAAI,eAAe,KAAK,eAAe,EAAE;YACrC,IAAI,CAAC,kBAAkB,CAAC,IAAI,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACnE;IACL,CAAC;CACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RootedComponent } from '../rooted-component';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const getRootedComponent: <T>(selectors: T
|
|
2
|
+
import type { RootedComponentWithSelectorsCtor } from '../../type';
|
|
3
|
+
export declare const getRootedComponent: <T>(selectors: T) => RootedComponentWithSelectorsCtor<T, RootedComponent<T>>;
|
|
4
4
|
//# sourceMappingURL=get-rooted-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/get-rooted-component/get-rooted-component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/get-rooted-component/get-rooted-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAEnE,eAAO,MAAM,kBAAkB,8EAC2B,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { defaultComponentConfig } from '../../config/default-component.config';
|
|
2
1
|
import { getExtendedRootedComponent } from '../get-extended-rooted-component/get-extended-rooted-component';
|
|
3
2
|
import { RootedComponent } from '../rooted-component';
|
|
4
|
-
export const getRootedComponent = (selectors
|
|
3
|
+
export const getRootedComponent = (selectors) => getExtendedRootedComponent(selectors, RootedComponent);
|
|
5
4
|
//# sourceMappingURL=get-rooted-component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/get-rooted-component/get-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"get-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/get-rooted-component/get-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAI,SAAY,EAAuC,EAAE,CACvF,0BAA0B,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC"}
|
|
@@ -4,13 +4,10 @@ import type { ComponentConfigInterface, ComponentInputArg } from '../type';
|
|
|
4
4
|
import type { Enum } from '@rnw-community/shared';
|
|
5
5
|
import type { ChainablePromiseArray, ChainablePromiseElement } from 'webdriverio';
|
|
6
6
|
export declare class RootedComponent<T = any> extends Component<T> {
|
|
7
|
-
selectors: Enum<T>;
|
|
8
7
|
protected readonly parentElInput: ComponentInputArg;
|
|
9
|
-
constructor(config: ComponentConfigInterface, selectors: Enum<T>,
|
|
8
|
+
constructor(config: ComponentConfigInterface, selectors: Enum<T>, parentElInput: ComponentInputArg);
|
|
10
9
|
get RootEl(): ChainablePromiseElement<WebdriverIO.Element>;
|
|
11
10
|
getChildEl(selector: string): ChainablePromiseElement<WebdriverIO.Element>;
|
|
12
11
|
getChildEls(selector: string): ChainablePromiseArray<WebdriverIO.ElementArray>;
|
|
13
|
-
getChildElByIdx(selector: string, idx: number): ChainablePromiseElement<WebdriverIO.Element>;
|
|
14
|
-
private getRootEl;
|
|
15
12
|
}
|
|
16
13
|
//# sourceMappingURL=rooted-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooted-component.d.ts","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"rooted-component.d.ts","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAGlF,qBAAa,eAAe,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACY,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,iBAAiB;gBAAzG,MAAM,EAAE,wBAAwB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,EAAqB,aAAa,EAAE,iBAAiB;IA+BrH,IAAI,MAAM,IAAI,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC,CAMzD;IAEQ,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC;IAI1E,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,qBAAqB,CAAC,WAAW,CAAC,YAAY,CAAC;CAG1F"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { isDefined, isNotEmptyString, isString } from '@rnw-community/shared';
|
|
2
2
|
import { Component } from '../component/component';
|
|
3
|
-
import { wdioElementChainByRef } from '../util';
|
|
4
|
-
// TODO: All Root should have all methods from wdio element, can we do this through the proxy?
|
|
5
3
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
4
|
export class RootedComponent extends Component {
|
|
7
|
-
constructor(config, selectors,
|
|
8
|
-
if (!isDefined(
|
|
5
|
+
constructor(config, selectors, parentElInput) {
|
|
6
|
+
if (!isDefined(parentElInput)) {
|
|
9
7
|
throw new Error('Cannot create RootedComponent - Neither root selector nor root element is passed');
|
|
10
8
|
}
|
|
11
|
-
if (!isString(
|
|
9
|
+
if (!isString(parentElInput) && 'els' in parentElInput) {
|
|
12
10
|
throw new Error('Cannot create RootedComponent from SelectorElement, use .el()');
|
|
13
11
|
}
|
|
12
|
+
if (!isString(parentElInput) && 'elementId' in parentElInput) {
|
|
13
|
+
throw new Error('Cannot create RootedComponent from WebdriverIO.Element, use ChainablePromiseElement instead');
|
|
14
|
+
}
|
|
14
15
|
super(config, selectors);
|
|
15
|
-
this.
|
|
16
|
-
this.parentElInput = selectorOrElement;
|
|
16
|
+
this.parentElInput = parentElInput;
|
|
17
17
|
// eslint-disable-next-line no-constructor-return
|
|
18
18
|
return new Proxy(this, {
|
|
19
19
|
get(client, field, receiver) {
|
|
20
20
|
return client.proxyGet(field, receiver, () => {
|
|
21
21
|
if (!['then', 'catch', 'finally'].includes(field)) {
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
23
|
-
return Reflect.get(client.
|
|
23
|
+
return Reflect.get(client.RootEl, field, receiver);
|
|
24
24
|
}
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
26
26
|
return Reflect.get(client, field, receiver);
|
|
@@ -29,25 +29,16 @@ export class RootedComponent extends Component {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
get RootEl() {
|
|
32
|
-
|
|
32
|
+
if (isNotEmptyString(this.parentElInput)) {
|
|
33
|
+
return this.config.elSelectorFn(this.parentElInput);
|
|
34
|
+
}
|
|
35
|
+
return this.parentElInput;
|
|
33
36
|
}
|
|
34
37
|
getChildEl(selector) {
|
|
35
|
-
return this.
|
|
38
|
+
return this.config.elSelectorFn(selector, this.RootEl);
|
|
36
39
|
}
|
|
37
40
|
getChildEls(selector) {
|
|
38
|
-
return this.
|
|
39
|
-
}
|
|
40
|
-
getChildElByIdx(selector, idx) {
|
|
41
|
-
return this.getRootEl().then(rootEl => this.elsIndexSelectorFn(selector, idx, rootEl));
|
|
42
|
-
}
|
|
43
|
-
getRootEl() {
|
|
44
|
-
if (isNotEmptyString(this.parentElInput)) {
|
|
45
|
-
return this.elSelectorFn(this.parentElInput);
|
|
46
|
-
}
|
|
47
|
-
else if ('then' in this.parentElInput) {
|
|
48
|
-
return this.parentElInput;
|
|
49
|
-
}
|
|
50
|
-
return wdioElementChainByRef(this.parentElInput);
|
|
41
|
+
return this.config.elsSelectorFn(selector, this.RootEl);
|
|
51
42
|
}
|
|
52
43
|
}
|
|
53
44
|
//# sourceMappingURL=rooted-component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooted-component.js","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"rooted-component.js","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAMnD,8DAA8D;AAC9D,MAAM,OAAO,eAAyB,SAAQ,SAAY;IACtD,YAAY,MAAgC,EAAE,SAAkB,EAAqB,aAAgC;QACjH,IAAI,CAAC,SAAS,CAAC,aAAa,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AAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3D,CAAC;IAEQ,WAAW,CAAC,QAAgB;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5D,CAAC;CACJ"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ComponentInputArg, RootedComponentWithSelectors } from '../../type';
|
|
2
|
-
export declare const
|
|
3
|
-
//# sourceMappingURL=create
|
|
2
|
+
export declare const createRootedComponent$: <T>(selectors: T, selectorOrElement: ComponentInputArg) => RootedComponentWithSelectors<T>;
|
|
3
|
+
//# sourceMappingURL=create-rooted-component$.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-rooted-component$.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component$/create-rooted-component$/create-rooted-component$.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAElF,eAAO,MAAM,sBAAsB,uCAEZ,iBAAiB,oCACwD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-rooted-component$.js","sourceRoot":"","sources":["../../../../src/rooted-component$/create-rooted-component$/create-rooted-component$.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAIrF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAClC,SAAY,EACZ,iBAAoC,EACL,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAI,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RootedComponent } from '../../rooted-component/rooted-component';
|
|
2
|
+
import type { RootedComponentWithSelectorsCtor } from '../../type';
|
|
3
|
+
import type { ClassType } from '@rnw-community/shared';
|
|
4
|
+
export declare const getExtendedRootedComponent$: <T, P extends RootedComponent<any>>(selectors: T, ParentComponent: ClassType<P>) => RootedComponentWithSelectorsCtor<T, P>;
|
|
5
|
+
//# sourceMappingURL=get-extended-rooted-component$.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-extended-rooted-component$.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE1E,OAAO,KAAK,EAAqB,gCAAgC,EAAE,MAAM,YAAY,CAAC;AACtF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,eAAO,MAAM,2BAA2B,4HAanC,CAAC"}
|
package/dist/esm/rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default$ComponentConfig } from '../../config/default$-component.config';
|
|
2
|
+
import { RootedComponent } from '../../rooted-component/rooted-component';
|
|
3
|
+
export const getExtendedRootedComponent$ = (selectors, ParentComponent) =>
|
|
4
|
+
// @ts-expect-error We use proxy for dynamic fields
|
|
5
|
+
class extends RootedComponent {
|
|
6
|
+
constructor(selectorOrElement) {
|
|
7
|
+
super(default$ComponentConfig(), selectors, selectorOrElement);
|
|
8
|
+
if (ParentComponent !== RootedComponent) {
|
|
9
|
+
this.addParentComponent(new ParentComponent(selectorOrElement));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=get-extended-rooted-component$.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-extended-rooted-component$.js","sourceRoot":"","sources":["../../../../src/rooted-component$/get-extended-rooted-component$/get-extended-rooted-component$.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAK1E,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACvC,SAAY,EACZ,eAA6B,EACS,EAAE;AACxC,mDAAmD;AACnD,KAAM,SAAQ,eAAe;IACzB,YAAY,iBAAoC;QAC5C,KAAK,CAAC,uBAAuB,EAAE,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAE/D,IAAI,eAAe,KAAK,eAAe,EAAE;YACrC,IAAI,CAAC,kBAAkB,CAAC,IAAI,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACnE;IACL,CAAC;CACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RootedComponent } from '../../rooted-component/rooted-component';
|
|
2
|
+
import type { RootedComponentWithSelectorsCtor } from '../../type';
|
|
3
|
+
export declare const getRootedComponent$: <T>(selectors: T) => RootedComponentWithSelectorsCtor<T, RootedComponent<T>>;
|
|
4
|
+
//# sourceMappingURL=get-rooted-component$.d.ts.map
|