@rnw-community/wdio 0.26.0 → 0.26.1
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/component/component/component.d.ts +19 -0
- package/dist/component/component/component.d.ts.map +1 -0
- package/dist/component/component/component.js +258 -0
- package/dist/component/component/component.js.map +1 -0
- package/dist/component/create-component/create-component.d.ts +3 -0
- package/dist/component/create-component/create-component.d.ts.map +1 -0
- package/dist/component/create-component/create-component.js +9 -0
- package/dist/component/create-component/create-component.js.map +1 -0
- package/dist/component/create-rooted-component/create-rooted-component.d.ts +3 -0
- package/dist/component/create-rooted-component/create-rooted-component.d.ts.map +1 -0
- package/dist/component/create-rooted-component/create-rooted-component.js +7 -0
- package/dist/component/create-rooted-component/create-rooted-component.js.map +1 -0
- package/dist/component/element.mock.d.ts +14 -0
- package/dist/component/element.mock.d.ts.map +1 -0
- package/dist/component/element.mock.js +29 -0
- package/dist/component/element.mock.js.map +1 -0
- package/dist/component/get-component/get-component.d.ts +5 -0
- package/dist/component/get-component/get-component.d.ts.map +1 -0
- package/dist/component/get-component/get-component.js +41 -0
- package/dist/component/get-component/get-component.js.map +1 -0
- package/dist/component/get-rooted-component/get-rooted-component.d.ts +5 -0
- package/dist/component/get-rooted-component/get-rooted-component.d.ts.map +1 -0
- package/dist/component/get-rooted-component/get-rooted-component.js +50 -0
- package/dist/component/get-rooted-component/get-rooted-component.js.map +1 -0
- package/dist/component/index.d.ts +6 -1
- package/dist/component/index.d.ts.map +1 -1
- package/dist/component/index.js +13 -15
- package/dist/component/index.js.map +1 -1
- package/dist/component/rooted-component/rooted-component.d.ts +19 -0
- package/dist/component/rooted-component/rooted-component.d.ts.map +1 -0
- package/dist/component/rooted-component/rooted-component.js +218 -0
- package/dist/component/rooted-component/rooted-component.js.map +1 -0
- package/dist/component/visible.component.d.ts.map +1 -1
- package/dist/type/component-with-selectors.type.d.ts +7 -0
- package/dist/type/component-with-selectors.type.d.ts.map +1 -0
- package/dist/type/component-with-selectors.type.js +3 -0
- package/dist/type/component-with-selectors.type.js.map +1 -0
- package/dist/type/index.d.ts +1 -2
- package/dist/type/index.d.ts.map +1 -1
- package/dist/type/selector-object.type.d.ts +4 -0
- package/dist/type/selector-object.type.d.ts.map +1 -1
- package/dist/type/visible-component-with-selectors.type.d.ts.map +1 -1
- package/dist/util/get-visible-component.util.d.ts +12 -0
- package/dist/util/get-visible-component.util.d.ts.map +1 -0
- package/dist/util/get-visible-component.util.js +63 -0
- package/dist/util/get-visible-component.util.js.map +1 -0
- package/dist/util/index.d.ts +0 -2
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +1 -5
- package/dist/util/index.js.map +1 -1
- package/dist/visible-component/component/component.d.ts +19 -0
- package/dist/visible-component/component/component.d.ts.map +1 -0
- package/dist/visible-component/component/component.js +258 -0
- package/dist/visible-component/component/component.js.map +1 -0
- package/dist/visible-component/create-component/create-component.d.ts +3 -0
- package/dist/visible-component/create-component/create-component.d.ts.map +1 -0
- package/dist/visible-component/create-component/create-component.js +9 -0
- package/dist/visible-component/create-component/create-component.js.map +1 -0
- package/dist/visible-component/create-rooted-component/create-rooted-component.d.ts +3 -0
- package/dist/visible-component/create-rooted-component/create-rooted-component.d.ts.map +1 -0
- package/dist/visible-component/create-rooted-component/create-rooted-component.js +7 -0
- package/dist/visible-component/create-rooted-component/create-rooted-component.js.map +1 -0
- package/dist/visible-component/get-component/get-component.d.ts +5 -0
- package/dist/visible-component/get-component/get-component.d.ts.map +1 -0
- package/dist/visible-component/get-component/get-component.js +41 -0
- package/dist/visible-component/get-component/get-component.js.map +1 -0
- package/dist/visible-component/get-rooted-component/get-rooted-component.d.ts +5 -0
- package/dist/visible-component/get-rooted-component/get-rooted-component.d.ts.map +1 -0
- package/dist/visible-component/get-rooted-component/get-rooted-component.js +50 -0
- package/dist/visible-component/get-rooted-component/get-rooted-component.js.map +1 -0
- package/dist/visible-component/index.d.ts +7 -0
- package/dist/visible-component/index.d.ts.map +1 -0
- package/dist/visible-component/index.js +16 -0
- package/dist/visible-component/index.js.map +1 -0
- package/dist/visible-component/mocks.d.ts +14 -0
- package/dist/visible-component/mocks.d.ts.map +1 -0
- package/dist/visible-component/mocks.js +29 -0
- package/dist/visible-component/mocks.js.map +1 -0
- package/dist/visible-component/rooted-component/rooted-component.d.ts +19 -0
- package/dist/visible-component/rooted-component/rooted-component.d.ts.map +1 -0
- package/dist/visible-component/rooted-component/rooted-component.js +218 -0
- package/dist/visible-component/rooted-component/rooted-component.js.map +1 -0
- package/dist/wdio.d.ts +25 -0
- package/package.json +2 -2
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.RootedComponent = void 0;
|
|
55
|
+
var shared_1 = require("@rnw-community/shared");
|
|
56
|
+
var command_1 = require("../../command");
|
|
57
|
+
var component_1 = require("../component/component");
|
|
58
|
+
var RootedComponent = /** @class */ (function (_super) {
|
|
59
|
+
__extends(RootedComponent, _super);
|
|
60
|
+
function RootedComponent(selectorOrElement) {
|
|
61
|
+
var _this = _super.call(this) || this;
|
|
62
|
+
_this.constructorSelector = '';
|
|
63
|
+
if ((0, shared_1.isNotEmptyString)(selectorOrElement)) {
|
|
64
|
+
_this.constructorSelector = selectorOrElement;
|
|
65
|
+
}
|
|
66
|
+
else if ((0, shared_1.isDefined)(selectorOrElement)) {
|
|
67
|
+
_this.constructorEl = selectorOrElement;
|
|
68
|
+
}
|
|
69
|
+
return _this;
|
|
70
|
+
}
|
|
71
|
+
Object.defineProperty(RootedComponent.prototype, "RootEl", {
|
|
72
|
+
get: function () {
|
|
73
|
+
if ((0, shared_1.isDefined)(this.constructorEl)) {
|
|
74
|
+
return Promise.resolve(this.constructorEl);
|
|
75
|
+
}
|
|
76
|
+
return (0, command_1.testID$)(this.constructorSelector);
|
|
77
|
+
},
|
|
78
|
+
enumerable: false,
|
|
79
|
+
configurable: true
|
|
80
|
+
});
|
|
81
|
+
RootedComponent.prototype.waitForDisplayed = function () {
|
|
82
|
+
var args = [];
|
|
83
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
84
|
+
args[_i] = arguments[_i];
|
|
85
|
+
}
|
|
86
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
+
var _a;
|
|
88
|
+
return __generator(this, function (_b) {
|
|
89
|
+
switch (_b.label) {
|
|
90
|
+
case 0: return [4 /*yield*/, this.RootEl];
|
|
91
|
+
case 1: return [4 /*yield*/, (_a = (_b.sent())).waitForDisplayed.apply(_a, args)];
|
|
92
|
+
case 2:
|
|
93
|
+
_b.sent();
|
|
94
|
+
return [2 /*return*/];
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
RootedComponent.prototype.waitForEnabled = function () {
|
|
100
|
+
var args = [];
|
|
101
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
102
|
+
args[_i] = arguments[_i];
|
|
103
|
+
}
|
|
104
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
+
var _a;
|
|
106
|
+
return __generator(this, function (_b) {
|
|
107
|
+
switch (_b.label) {
|
|
108
|
+
case 0: return [4 /*yield*/, this.RootEl];
|
|
109
|
+
case 1: return [4 /*yield*/, (_a = (_b.sent())).waitForEnabled.apply(_a, args)];
|
|
110
|
+
case 2:
|
|
111
|
+
_b.sent();
|
|
112
|
+
return [2 /*return*/];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
RootedComponent.prototype.waitForExist = function () {
|
|
118
|
+
var args = [];
|
|
119
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
120
|
+
args[_i] = arguments[_i];
|
|
121
|
+
}
|
|
122
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
123
|
+
var _a;
|
|
124
|
+
return __generator(this, function (_b) {
|
|
125
|
+
switch (_b.label) {
|
|
126
|
+
case 0: return [4 /*yield*/, this.RootEl];
|
|
127
|
+
case 1: return [4 /*yield*/, (_a = (_b.sent())).waitForExist.apply(_a, args)];
|
|
128
|
+
case 2:
|
|
129
|
+
_b.sent();
|
|
130
|
+
return [2 /*return*/];
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
RootedComponent.prototype.isDisplayed = function () {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
137
|
+
return __generator(this, function (_a) {
|
|
138
|
+
switch (_a.label) {
|
|
139
|
+
case 0: return [4 /*yield*/, this.RootEl];
|
|
140
|
+
case 1: return [4 /*yield*/, (_a.sent()).isDisplayed()];
|
|
141
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
RootedComponent.prototype.isExisting = function () {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
148
|
+
return __generator(this, function (_a) {
|
|
149
|
+
switch (_a.label) {
|
|
150
|
+
case 0: return [4 /*yield*/, this.RootEl];
|
|
151
|
+
case 1: return [4 /*yield*/, (_a.sent()).isExisting()];
|
|
152
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
RootedComponent.prototype.click = function () {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
159
|
+
return __generator(this, function (_a) {
|
|
160
|
+
switch (_a.label) {
|
|
161
|
+
case 0: return [4 /*yield*/, this.RootEl];
|
|
162
|
+
case 1: return [4 /*yield*/, (_a.sent()).click()];
|
|
163
|
+
case 2:
|
|
164
|
+
_a.sent();
|
|
165
|
+
return [2 /*return*/];
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
RootedComponent.prototype.getChildEl = function (selector) {
|
|
171
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
172
|
+
var _a, _b;
|
|
173
|
+
return __generator(this, function (_c) {
|
|
174
|
+
switch (_c.label) {
|
|
175
|
+
case 0:
|
|
176
|
+
_a = command_1.testID$;
|
|
177
|
+
_b = [selector];
|
|
178
|
+
return [4 /*yield*/, this.RootEl];
|
|
179
|
+
case 1: return [4 /*yield*/, _a.apply(void 0, _b.concat([_c.sent()]))];
|
|
180
|
+
case 2: return [2 /*return*/, _c.sent()];
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
RootedComponent.prototype.getChildEls = function (selector) {
|
|
186
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
187
|
+
var _a, _b;
|
|
188
|
+
return __generator(this, function (_c) {
|
|
189
|
+
switch (_c.label) {
|
|
190
|
+
case 0:
|
|
191
|
+
_a = command_1.testID$$;
|
|
192
|
+
_b = [selector];
|
|
193
|
+
return [4 /*yield*/, this.RootEl];
|
|
194
|
+
case 1: return [4 /*yield*/, _a.apply(void 0, _b.concat([_c.sent()]))];
|
|
195
|
+
case 2: return [2 /*return*/, _c.sent()];
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
RootedComponent.prototype.getChildElByIdx = function (selector, idx) {
|
|
201
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
202
|
+
var _a, _b;
|
|
203
|
+
return __generator(this, function (_c) {
|
|
204
|
+
switch (_c.label) {
|
|
205
|
+
case 0:
|
|
206
|
+
_a = command_1.testID$$Index;
|
|
207
|
+
_b = [selector, idx];
|
|
208
|
+
return [4 /*yield*/, this.RootEl];
|
|
209
|
+
case 1: return [4 /*yield*/, _a.apply(void 0, _b.concat([_c.sent()]))];
|
|
210
|
+
case 2: return [2 /*return*/, _c.sent()];
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
return RootedComponent;
|
|
216
|
+
}(component_1.Component));
|
|
217
|
+
exports.RootedComponent = RootedComponent;
|
|
218
|
+
//# sourceMappingURL=rooted-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rooted-component.js","sourceRoot":"","sources":["../../../src/component/rooted-component/rooted-component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAoE;AAEpE,yCAAiE;AACjE,oDAAmD;AAInD;IAAqC,mCAAS;IAI1C,yBAAY,iBAA+C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Y,0CAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visible.component.d.ts","sourceRoot":"","sources":["../../src/component/visible
|
|
1
|
+
{"version":3,"file":"visible.component.d.ts","sourceRoot":"","sources":["../../src/component/visible-component.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAExG,qBAAa,gBAAgB;IACzB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAkC;IAChE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAc;IAClD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEtB,iBAAiB,CAAC,EAAE,WAAW,CAAC,OAAO,GAAG,MAAM;IAY5D,IAAI,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAUzC;IAEK,gBAAgB,CAAC,GAAG,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9D,cAAc,CAAC,GAAG,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1D,YAAY,CAAC,GAAG,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAItD,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/B,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAI9B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;IAQ1D,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC;IAQhE,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;IAQ5E,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/D,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAItD,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjD,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7E,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpF,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Component } from '../component';
|
|
2
|
+
import type { SelectorMethods } from './selector-methods.type';
|
|
3
|
+
import type { SelectorObject } from './selector-object.type';
|
|
4
|
+
export declare type ComponentWithSelectors<T extends string> = Component & {
|
|
5
|
+
[TKey in SelectorMethods<T, ''>]: SelectorObject;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=component-with-selectors.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-with-selectors.type.d.ts","sourceRoot":"","sources":["../../src/type/component-with-selectors.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,oBAAY,sBAAsB,CAAC,CAAC,SAAS,MAAM,IAAI,SAAS,GAAG;KAC9D,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,cAAc;CACnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-with-selectors.type.js","sourceRoot":"","sources":["../../src/type/component-with-selectors.type.ts"],"names":[],"mappings":""}
|
package/dist/type/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export type { SelectorContextType } from './selector-context.type';
|
|
2
2
|
export type { SwipeDirectionType } from './swipe-direction.type';
|
|
3
3
|
export type { SelectorMethods } from './selector-methods.type';
|
|
4
|
-
export type {
|
|
5
|
-
export type { VisibleComponentWithSelectorsCtor } from './visible-component-with-selectors-ctor.type';
|
|
4
|
+
export type { ComponentWithSelectors } from './component-with-selectors.type';
|
|
6
5
|
export type { WaitForDisplayedArgs, WaitForEnabledArgs, WaitForExistArgs, SetValueArgs } from './wdio-types.type';
|
|
7
6
|
export type { SelectorObject } from './selector-object.type';
|
|
8
7
|
export type { Enum } from './enum.type';
|
package/dist/type/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/type/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/type/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClH,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/// <reference types="webdriverio/async" />
|
|
1
2
|
import type { SetValueArgs, WaitForDisplayedArgs, WaitForEnabledArgs, WaitForExistArgs } from './wdio-types.type';
|
|
2
3
|
export interface SelectorObject {
|
|
4
|
+
byIdx: (idx: number) => Promise<WebdriverIO.Element>;
|
|
3
5
|
click: () => Promise<void>;
|
|
4
6
|
clickByIdx: (idx: number) => Promise<void>;
|
|
7
|
+
el: () => Promise<WebdriverIO.Element>;
|
|
8
|
+
els: () => Promise<WebdriverIO.ElementArray>;
|
|
5
9
|
getText: () => Promise<string>;
|
|
6
10
|
isDisplayed: () => Promise<boolean>;
|
|
7
11
|
isExisting: () => Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selector-object.type.d.ts","sourceRoot":"","sources":["../../src/type/selector-object.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGlH,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,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C,CAAC;IACnD,gBAAgB,EAAE,CAAC,GAAG,IAAI,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visible-component-with-selectors.type.d.ts","sourceRoot":"","sources":["../../src/type/
|
|
1
|
+
{"version":3,"file":"visible-component-with-selectors.type.d.ts","sourceRoot":"","sources":["../../src/type/component-with-selectors.type.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,oBAAY,6BAA6B,CAAC,CAAC,SAAS,MAAM,IAAI,gBAAgB,GAAG;KAC5E,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;CAC7E,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;CACnE,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC;CACzE,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;CAC3D,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,aAAa,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;CAChE,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;CAC7E,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;CACxD,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAC9C,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,KACvD,OAAO,CAAC,IAAI,CAAC;CACrB,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,gBAAgB,CAAC,GAAG,CAC5C,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KACzD,OAAO,CAAC,IAAI,CAAC;CACrB,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,eAAe,CAAC,GAAG,CAC3C,GAAG,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,KAC3D,OAAO,CAAC,IAAI,CAAC;CACrB,GAAG;KAAG,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,cAAc;CAAE,GAAG;KAAG,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="webdriverio/async" />
|
|
2
|
+
import { VisibleComponent } from '../component';
|
|
3
|
+
declare type SelectorMethods<T extends string, S extends string> = T extends `${infer Prefix}.${infer Selector}` ? Selector extends `Root` ? never : `${Selector}${S}` : never;
|
|
4
|
+
declare type VisibleComponentWithSelectors<T extends string> = VisibleComponent & {
|
|
5
|
+
[TKey in SelectorMethods<T, 'El'>]: Promise<WebdriverIO.Element>;
|
|
6
|
+
} & {
|
|
7
|
+
[TKey in SelectorMethods<T, 'Els'>]: Promise<WebdriverIO.ElementArray>;
|
|
8
|
+
};
|
|
9
|
+
declare type VisibleComponentWithSelectorsCtor<T extends string> = new (selectorOrElement?: WebdriverIO.Element | string) => VisibleComponentWithSelectors<T>;
|
|
10
|
+
export declare const getVisibleComponent: <T extends string, E = unknown>(selectors: E) => VisibleComponentWithSelectorsCtor<T>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=get-visible-component.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-visible-component.util.d.ts","sourceRoot":"","sources":["../../src/util/get-visible-component.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMhD,aAAK,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,MAAM,IAAI,MAAM,QAAQ,EAAE,GAClG,QAAQ,SAAS,MAAM,GACnB,KAAK,GACL,GAAG,QAAQ,GAAG,CAAC,EAAE,GACrB,KAAK,CAAC;AAEZ,aAAK,6BAA6B,CAAC,CAAC,SAAS,MAAM,IAAI,gBAAgB,GAAG;KACrE,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;CACnE,GAAG;KAAG,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC;CAAE,CAAC;AAE/E,aAAK,iCAAiC,CAAC,CAAC,SAAS,MAAM,IAAI,KACvD,iBAAiB,CAAC,EAAE,WAAW,CAAC,OAAO,GAAG,MAAM,KAC/C,6BAA6B,CAAC,CAAC,CAAC,CAAC;AAEtC,eAAO,MAAM,mBAAmB,uFAyC3B,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.getVisibleComponent = void 0;
|
|
19
|
+
var shared_1 = require("@rnw-community/shared");
|
|
20
|
+
var component_1 = require("../component");
|
|
21
|
+
var getVisibleComponent = function (selectors) {
|
|
22
|
+
// @ts-expect-error We use proxy for dynamic fields
|
|
23
|
+
return /** @class */ (function (_super) {
|
|
24
|
+
__extends(class_1, _super);
|
|
25
|
+
function class_1(selectorOrElement) {
|
|
26
|
+
var _this = this;
|
|
27
|
+
var selectorKeys = Object.keys(selectors);
|
|
28
|
+
// @ts-expect-error We need better enum types
|
|
29
|
+
var selectorRootKey = selectors[selectorKeys.find(function (key) { return key === 'Root'; })];
|
|
30
|
+
var rootSelector = (0, shared_1.isDefined)(selectorOrElement) ? selectorOrElement : selectorRootKey;
|
|
31
|
+
if (!(0, shared_1.isDefined)(rootSelector)) {
|
|
32
|
+
throw new Error('Cannot create VisibleComponent - No Root element selector was passed');
|
|
33
|
+
}
|
|
34
|
+
_this = _super.call(this, rootSelector) || this;
|
|
35
|
+
// eslint-disable-next-line no-constructor-return
|
|
36
|
+
return new Proxy(_this, {
|
|
37
|
+
// @ts-expect-error field is required to be string or a symbol, we need it to be keyof TController for proper typings inside
|
|
38
|
+
get: function (proxyClient, field, receiver) {
|
|
39
|
+
if (field in proxyClient) {
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
41
|
+
return Reflect.get(proxyClient, field, receiver);
|
|
42
|
+
}
|
|
43
|
+
if (field in selectorKeys) {
|
|
44
|
+
if (field.includes('Els')) {
|
|
45
|
+
// @ts-expect-error We need to fix types of the enum
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
47
|
+
return proxyClient.getChildEls(selectors[field]);
|
|
48
|
+
}
|
|
49
|
+
else if (field.includes('El')) {
|
|
50
|
+
// @ts-expect-error We need to fix types of the enum
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
52
|
+
return proxyClient.getChildEl(selectors[field]);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return undefined;
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return class_1;
|
|
60
|
+
}(component_1.VisibleComponent));
|
|
61
|
+
};
|
|
62
|
+
exports.getVisibleComponent = getVisibleComponent;
|
|
63
|
+
//# sourceMappingURL=get-visible-component.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-visible-component.util.js","sourceRoot":"","sources":["../../src/util/get-visible-component.util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,gDAAkD;AAElD,0CAAgD;AAoBzC,IAAM,mBAAmB,GAAG,UAAgC,SAAY;IAC3E,mDAAmD;IACnD;QAAc,2BAAgB;QAC1B,iBAAY,iBAAgD;YAA5D,iBAqCC;YApCG,IAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAmB,CAAC;YAC9D,6CAA6C;YAC7C,IAAM,eAAe,GAAG,SAAS,CAAC,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
|
export { setTestID } from './set-test-id';
|
|
2
2
|
export { getTestID } from './get-test-id';
|
|
3
3
|
export { setPropTestID } from './set-prop-test-id';
|
|
4
|
-
export { getVisibleComponent } from './get-visible-component/get-visible-component';
|
|
5
|
-
export { createVisibleComponent } from './create-visible-component/create-visible-component';
|
|
6
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/util/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/util/index.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.setPropTestID = exports.getTestID = exports.setTestID = void 0;
|
|
4
4
|
var set_test_id_1 = require("./set-test-id");
|
|
5
5
|
Object.defineProperty(exports, "setTestID", { enumerable: true, get: function () { return set_test_id_1.setTestID; } });
|
|
6
6
|
var get_test_id_1 = require("./get-test-id");
|
|
7
7
|
Object.defineProperty(exports, "getTestID", { enumerable: true, get: function () { return get_test_id_1.getTestID; } });
|
|
8
8
|
var set_prop_test_id_1 = require("./set-prop-test-id");
|
|
9
9
|
Object.defineProperty(exports, "setPropTestID", { enumerable: true, get: function () { return set_prop_test_id_1.setPropTestID; } });
|
|
10
|
-
var get_visible_component_1 = require("./get-visible-component/get-visible-component");
|
|
11
|
-
Object.defineProperty(exports, "getVisibleComponent", { enumerable: true, get: function () { return get_visible_component_1.getVisibleComponent; } });
|
|
12
|
-
var create_visible_component_1 = require("./create-visible-component/create-visible-component");
|
|
13
|
-
Object.defineProperty(exports, "createVisibleComponent", { enumerable: true, get: function () { return create_visible_component_1.createVisibleComponent; } });
|
|
14
10
|
//# sourceMappingURL=index.js.map
|
package/dist/util/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAAjC,wGAAA,SAAS,OAAA;AAClB,6CAA0C;AAAjC,wGAAA,SAAS,OAAA;AAClB,uDAAmD;AAA1C,iHAAA,aAAa,OAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAAjC,wGAAA,SAAS,OAAA;AAClB,6CAA0C;AAAjC,wGAAA,SAAS,OAAA;AAClB,uDAAmD;AAA1C,iHAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="webdriverio/async" />
|
|
2
|
+
import type { Enum, SelectorObject, SetValueArgs, WaitForDisplayedArgs, WaitForEnabledArgs, WaitForExistArgs } from '../../type';
|
|
3
|
+
export declare class Component {
|
|
4
|
+
clickChildEl(selector: string): Promise<void>;
|
|
5
|
+
clickByIdxChildEl(selector: string, idx: number): Promise<void>;
|
|
6
|
+
setValueChildEl(selector: string, args: SetValueArgs): Promise<void>;
|
|
7
|
+
isDisplayedChildEl(selector: string): Promise<boolean>;
|
|
8
|
+
isExistingChildEl(selector: string): Promise<boolean>;
|
|
9
|
+
getTextChildEl(selector: string): Promise<string>;
|
|
10
|
+
waitForExistsChildEl(selector: string, args: WaitForExistArgs): Promise<void>;
|
|
11
|
+
waitForDisplayedChildEl(selector: string, args: WaitForDisplayedArgs): Promise<void>;
|
|
12
|
+
waitForEnabledChildEl(selector: string, args: WaitForEnabledArgs): Promise<void>;
|
|
13
|
+
getChildEl(selector: string): Promise<WebdriverIO.Element>;
|
|
14
|
+
getChildEls(selector: string): Promise<WebdriverIO.ElementArray>;
|
|
15
|
+
getChildElByIdx(selector: string, idx: number): Promise<WebdriverIO.Element>;
|
|
16
|
+
protected getSelectorObject(selectorValue: string): SelectorObject;
|
|
17
|
+
protected callDynamicMethod<T extends string>(selectors: Enum<T>, field: string): unknown;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/visible-component/component/component.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EACR,IAAI,EACJ,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACnB,MAAM,YAAY,CAAC;AAEpB,qBAAa,SAAS;IACZ,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/D,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAItD,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjD,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7E,uBAAuB,CAAC,QAAQ,EAA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