xmlui 0.11.10 → 0.11.12

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.
@@ -1,6 +1,6 @@
1
1
  import { delay as delay$1, HttpResponse, matchRequestUrl } from "msw";
2
2
  import { isArray, isObject, mapValues } from "lodash-es";
3
- import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./index-DfOJVz5h.js";
3
+ import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./index-C_siLDTF.js";
4
4
  import Dexie from "dexie";
5
5
  var HttpStatusCode = /* @__PURE__ */ ((HttpStatusCode2) => {
6
6
  HttpStatusCode2[HttpStatusCode2["Continue"] = 100] = "Continue";
@@ -1,6 +1,3 @@
1
- import { BrowserContext } from '@playwright/test';
2
- import { Color } from 'chroma-js';
3
- import { default as default_2 } from 'chroma-js';
4
1
  import { DelayMode } from 'msw';
5
2
  import { Expect } from 'playwright/test';
6
3
  import { ExpectMatcherState } from 'playwright/test';
@@ -122,10 +119,6 @@ declare interface BlockStatement extends ScripNodeBase {
122
119
  stmts: Statement[];
123
120
  }
124
121
 
125
- export declare type BorderSide = (typeof BorderSideValues)[number];
126
-
127
- declare const BorderSideValues: readonly ["top", "bottom", "left", "right"];
128
-
129
122
  declare type BREAK_STATEMENT = typeof T_BREAK_STATEMENT;
130
123
 
131
124
  declare interface BreakStatement extends ScripNodeBase {
@@ -316,7 +309,7 @@ declare interface ComponentDefCore {
316
309
  debug?: Record<string, any>;
317
310
  }
318
311
 
319
- export declare class ComponentDriver {
312
+ declare class ComponentDriver {
320
313
  protected readonly locator: Locator;
321
314
  protected readonly page: Page_2;
322
315
  constructor({ locator, page }: ComponentDriverParams);
@@ -432,23 +425,7 @@ declare interface ContinueStatement extends ScripNodeBase {
432
425
  type: CONTINUE_STATEMENT;
433
426
  }
434
427
 
435
- export declare type CSSBorder = {
436
- width?: NumericCSS;
437
- style?: CSSBorderStyle;
438
- color?: Color;
439
- };
440
-
441
- export declare type CSSBorderStyle = (typeof CSSBorderStyleValues)[number];
442
-
443
- declare const CSSBorderStyleValues: readonly ["solid", "dotted", "dashed", "double", "none", "hidden", "groove", "ridge", "inset", "outset"];
444
-
445
- export declare type CSSColor = default_2.Color;
446
-
447
- declare type CSSUnit = (typeof CSSUnitValues)[number];
448
-
449
- declare const CSSUnitValues: readonly ["px", "em", "rem", "vh", "vw", "%", "cm", "mm", "in", "pt", "pc", "ex", "ch", "vmin", "vmax"];
450
-
451
- export declare class DateInputDriver extends InputComponentDriver {
428
+ declare class DateInputDriver extends InputComponentDriver {
452
429
  get dayInput(): Locator_2;
453
430
  get monthInput(): Locator_2;
454
431
  get yearInput(): Locator_2;
@@ -476,13 +453,6 @@ declare interface DestructureBase extends ExpressionBase {
476
453
  oDestr?: ObjectDestructure[];
477
454
  }
478
455
 
479
- declare enum DiagnosticCategory {
480
- Error = 1,
481
- Warning = 2,
482
- Information = 3,
483
- Hint = 4
484
- }
485
-
486
456
  declare type DO_WHILE_STATEMENT = typeof T_DO_WHILE_STATEMENT;
487
457
 
488
458
  declare interface DoWhileStatement extends ScripNodeBase {
@@ -553,51 +523,6 @@ declare interface EmptyStatement extends ScripNodeBase {
553
523
  type: EMPTY_STATEMENT;
554
524
  }
555
525
 
556
- declare type EntryPoint = string | Record<string, any>;
557
-
558
- declare enum ErrCodes {
559
- onlyOneElem = "U002",
560
- expTagOpen = "U003",
561
- expTagName = "U004",
562
- expCloseStart = "U005",
563
- expEndOrClose = "U006",
564
- tagNameMismatch = "U007",
565
- expEnd = "U008",
566
- expAttrName = "U009",
567
- expEq = "U010",
568
- expAttrValue = "U011",
569
- duplAttr = "U012",
570
- uppercaseAttr = "U013",
571
- expTagNameAfterNamespace = "U014",
572
- expCloseStartWithName = "U015",
573
- expAttrNameAfterNamespace = "U016",
574
- unexpectedCloseTag = "U017",
575
- expTagNameAfterCloseStart = "U019",
576
- expAttrNameBeforeEq = "U020",
577
- invalidChar = "W001",
578
- untermStr = "W002",
579
- untermComment = "W007",
580
- untermCData = "W008",
581
- untermScript = "W009"
582
- }
583
-
584
- declare interface Error_2 {
585
- readonly category: DiagnosticCategory;
586
- readonly code: ErrCodes;
587
- readonly message: string;
588
- readonly pos: number;
589
- readonly end: number;
590
- readonly contextPos: number;
591
- readonly contextEnd: number;
592
- }
593
-
594
- declare interface ErrorForDisplay extends Error_2 {
595
- contextStartLine: number;
596
- contextSource: string;
597
- errPosLine: number;
598
- errPosCol: number;
599
- }
600
-
601
526
  declare class ExpandableItemDriver extends ComponentDriver {
602
527
  getSummary(): Locator;
603
528
  getSummaryContent(): Locator;
@@ -654,103 +579,6 @@ name: string;
654
579
  expected: number;
655
580
  actual: any;
656
581
  };
657
- /**
658
- * Asserts whether a component has the correct CSS `border-color` styling.
659
- *
660
- * @param expected Expected CSS color
661
- * @param border Border side(s), Default: **"all"**
662
- *
663
- * ---
664
- * **Usage**
665
- *
666
- * ```js
667
- * await initTestBed(`<Button label="hello" />`, {
668
- * testThemeVars: { "borderLeftColor-Button": "rgb(0, 0, 0)" },
669
- * });
670
- * const driver = await createButtonDriver();
671
- * await expect(driver.component).toHaveBorderColor("rgb(0, 0, 0)", "left");
672
- * ```
673
- */
674
- toHaveBorderColor(this: ExpectMatcherState, locator: Locator_2, expected: string, border?: "all" | BorderSide | BorderSide[]): Promise<{
675
- message: () => string;
676
- pass: boolean;
677
- name: string;
678
- expected: string;
679
- actual: any;
680
- }>;
681
- /**
682
- * Asserts whether a component has the correct CSS `border-width` styling.
683
- *
684
- * @param expected Expected CSS size
685
- * @param border Border side(s), Default: **"all"**
686
- *
687
- * ---
688
- * **Usage**
689
- *
690
- * ```js
691
- * await initTestBed(`<Button label="hello" />`, {
692
- * testThemeVars: { "borderLeftWidth-Button": "12px" },
693
- * });
694
- * const driver = await createButtonDriver();
695
- * await expect(driver.component).toHaveBorderWidth("12px", "left");
696
- * ```
697
- */
698
- toHaveBorderWidth(this: ExpectMatcherState, locator: Locator_2, expected: string, border?: "all" | BorderSide | BorderSide[]): Promise<{
699
- message: () => string;
700
- pass: boolean;
701
- name: string;
702
- expected: string;
703
- actual: any;
704
- }>;
705
- /**
706
- * Asserts whether a component has the correct CSS `border-style` styling.
707
- *
708
- * @param expected Expected CSS border style
709
- * @param border Border side(s), default: **"all"**
710
- *
711
- * ---
712
- * **Usage**
713
- *
714
- * ```js
715
- * await initTestBed(`<Button label="hello" />`, {
716
- * testThemeVars: { "borderLeftStyle-Button": "dotted" },
717
- * });
718
- * const driver = await createButtonDriver();
719
- * await expect(driver.component).toHaveBorderStyle("dotted", "left");
720
- * ```
721
- */
722
- toHaveBorderStyle(this: ExpectMatcherState, locator: Locator_2, expected: string, border?: "all" | BorderSide | BorderSide[]): Promise<{
723
- message: () => string;
724
- pass: boolean;
725
- name: string;
726
- expected: string;
727
- actual: any;
728
- }>;
729
- /**
730
- * Asserts whether a component has the correct CSS `border` shorthand set:
731
- * `color`, `width`, `style`.
732
- *
733
- * @param expected Expected string label
734
- * @param border Border side(s), Default: **"all"**
735
- *
736
- * ---
737
- * **Usage**
738
- *
739
- * ```js
740
- * await initTestBed(`<Button label="hello" />`, {
741
- * testThemeVars: { "borderLeft-Button": "1px solid black" },
742
- * });
743
- * const driver = await createButtonDriver();
744
- * await expect(driver.component).toHaveBorder("1px solid black", "left");
745
- * ```
746
- */
747
- toHaveBorder(this: ExpectMatcherState, locator: Locator_2, expected: string, border?: "all" | BorderSide | BorderSide[]): Promise<{
748
- message: () => string;
749
- pass: boolean;
750
- name: string;
751
- expected: string;
752
- actual: any;
753
- }>;
754
582
  }>;
755
583
 
756
584
  declare type Expression = UnaryExpression | BinaryExpression | SequenceExpression | ConditionalExpression | FunctionInvocationExpression | MemberAccessExpression | CalculatedMemberAccessExpression | Identifier | TemplateLiteralExpression | Literal | ArrayLiteral | ObjectLiteral | SpreadExpression | AssignmentExpression | NoArgExpression | ArrowExpression | PrefixOpExpression | PostfixOpExpression | ReactiveVarDeclaration | VarDeclaration | Destructure | ObjectDestructure | ArrayDestructure | SwitchCase;
@@ -897,86 +725,6 @@ declare type GenericToken<T> = {
897
725
  endColumn: number;
898
726
  };
899
727
 
900
- export declare function getBorders(specifier: ComponentDriver | Locator): Promise<{
901
- left: CSSBorder;
902
- right: CSSBorder;
903
- top: CSSBorder;
904
- bottom: CSSBorder;
905
- }>;
906
-
907
- export declare function getBoundingRect(locator: Locator): Promise<DOMRect>;
908
-
909
- /**
910
- * Retrieves the bounding rectangle of the component including **margins** and **padding**
911
- * added to the dimensions.
912
- */
913
- export declare function getBounds(specifier: ComponentDriver | Locator): Promise<{
914
- width: number;
915
- height: number;
916
- left: number;
917
- right: number;
918
- top: number;
919
- bottom: number;
920
- }>;
921
-
922
- export declare function getComponentTagName(locator: Locator): Promise<string>;
923
-
924
- export declare function getElementStyle(specifier: Locator, style: string): Promise<string>;
925
-
926
- /**
927
- * Retreives all the provided style properties from the locator
928
- * @returns an object with the keys being the elements of the styles argument
929
- */
930
- export declare function getElementStyles(locator: Locator, styles?: string[]): Promise<{
931
- [k: string]: string;
932
- }>;
933
-
934
- export declare function getFullRectangle(locator: Locator): Promise<{
935
- width: number;
936
- height: number;
937
- left: number;
938
- right: number;
939
- top: number;
940
- bottom: number;
941
- }>;
942
-
943
- export declare function getHtmlAttributes(specifier: ComponentDriver | Locator, attributes: string | string[]): Promise<{
944
- [k: string]: string;
945
- }>;
946
-
947
- export declare function getMargins(specifier: ComponentDriver | Locator): Promise<{
948
- [k: string]: string;
949
- }>;
950
-
951
- export declare function getPaddings(specifier: ComponentDriver | Locator): Promise<{
952
- left: NumericCSS;
953
- right: NumericCSS;
954
- top: NumericCSS;
955
- bottom: NumericCSS;
956
- }>;
957
-
958
- export declare function getPseudoStyles(specifier: ComponentDriver | Locator, pseudoElement: string, style: string | string[]): Promise<{
959
- [k: string]: string;
960
- }>;
961
-
962
- export declare function getStyles(specifier: ComponentDriver | Locator, style: string | string[]): Promise<{
963
- [k: string]: string;
964
- }>;
965
-
966
- export declare function getThemedBoundingRect(locator: Locator): Promise<DOMRect>;
967
-
968
- export declare function getThemedElementStyle(locator: Locator, style: string): Promise<string>;
969
-
970
- /**
971
- * Retreives all the provided style properties from the locator
972
- * @returns an object with the keys being the elements of the styles argument
973
- */
974
- export declare function getThemedElementStyles(locator: Locator, styles?: string[]): Promise<{
975
- [k: string]: string;
976
- }>;
977
-
978
- export declare function getThemedStyle(page: Page_2, testId: string, style: string): Promise<string>;
979
-
980
728
  declare class HeadingDriver extends ComponentDriver {
981
729
  }
982
730
 
@@ -1007,10 +755,6 @@ declare interface IfStatement extends ScripNodeBase {
1007
755
  elseB?: Statement;
1008
756
  }
1009
757
 
1010
- export declare function initApp(page: Page_2, appDescription: UnparsedAppDescription, url?: string, resources?: {}): Promise<void>;
1011
-
1012
- export declare function initThemedApp(page: Page_2, entryPoint: EntryPoint, theme: Partial<ThemeDefinition>): Promise<void>;
1013
-
1014
758
  declare class InputComponentDriver extends ComponentDriver {
1015
759
  get field(): Locator;
1016
760
  get label(): Locator;
@@ -1029,8 +773,6 @@ declare type InterceptorOperationDef = {
1029
773
  successStatusCode?: number;
1030
774
  };
1031
775
 
1032
- export declare function isIndeterminate(specifier: ComponentDriver | Locator): Promise<boolean>;
1033
-
1034
776
  declare type IsValidFunction<T> = (propKey: string, propValue: T) => string | string[] | undefined | null;
1035
777
 
1036
778
  declare class ItemsDriver extends ComponentDriver {
@@ -1107,8 +849,6 @@ declare interface Literal extends ExpressionBase {
1107
849
  value: any;
1108
850
  }
1109
851
 
1110
- export declare function mapObject<K extends (val: any) => any, V extends (val: string) => string | number>(obj: Record<string, any>, valFn?: K, keyFn?: V): Record<ReturnType<V>, ReturnType<K>>;
1111
-
1112
852
  declare class MarkdownDriver extends ComponentDriver {
1113
853
  hasHtmlElement(elements: string | string[]): Promise<boolean>;
1114
854
  }
@@ -1166,13 +906,6 @@ declare class NumberBoxDriver extends InputComponentDriver {
1166
906
  decrement(): Promise<void>;
1167
907
  }
1168
908
 
1169
- export declare interface NumericCSS {
1170
- value: number;
1171
- unit: CSSUnit;
1172
- }
1173
-
1174
- export declare function numericCSSToString(cssValue: NumericCSS): string;
1175
-
1176
909
  declare type OBJECT_DESTRUCTURE = typeof T_OBJECT_DESTRUCTURE;
1177
910
 
1178
911
  declare type OBJECT_LITERAL = typeof T_OBJECT_LITERAL;
@@ -1191,26 +924,6 @@ declare interface ObjectLiteral extends ExpressionBase {
1191
924
  declare class OptionDriver extends ComponentDriver {
1192
925
  }
1193
926
 
1194
- export declare function overflows(locator: Locator, direction?: "x" | "y" | "both"): Promise<boolean>;
1195
-
1196
- export declare function parseAsCssBorder(str: string): CSSBorder;
1197
-
1198
- export declare function parseAsCSSBorderStyle(str: string): "none" | "double" | "hidden" | "dotted" | "dashed" | "solid" | "groove" | "ridge" | "inset" | "outset";
1199
-
1200
- export declare function parseAsCSSColor(str: string): CSSColor;
1201
-
1202
- export declare function parseAsNumericCss(str: string): NumericCSS;
1203
-
1204
- export declare function parseComponentIfNecessary(rawComponent: ComponentDef<any> | CompoundComponentDef | string): ParserResult;
1205
-
1206
- declare type ParserResult = {
1207
- component: null | ComponentDef | CompoundComponentDef;
1208
- errors: ErrorForDisplay[];
1209
- erroneousCompoundComponentName?: string;
1210
- };
1211
-
1212
- export declare function pixelStrToNum(pixelStr: string): number;
1213
-
1214
927
  declare type POSTFIX_OP_EXPRESSION = typeof T_POSTFIX_OP_EXPRESSION;
1215
928
 
1216
929
  declare interface PostfixOpExpression extends ExpressionBase {
@@ -1229,8 +942,6 @@ declare interface PrefixOpExpression extends ExpressionBase {
1229
942
 
1230
943
  declare type PrefixOpSymbol = "++" | "--";
1231
944
 
1232
- export declare function prepPage(co: BrowserContext, appDesc: StandaloneAppDescription, url?: string): Promise<Page_2>;
1233
-
1234
945
  declare class ProgressBarDriver extends ComponentDriver {
1235
946
  get bar(): Locator;
1236
947
  getProgressRatio(): Promise<number>;
@@ -1264,20 +975,6 @@ declare interface ReturnStatement extends ScripNodeBase {
1264
975
  expr?: Expression;
1265
976
  }
1266
977
 
1267
- /**
1268
- * Scales a value by a percentage, using NumericCSS for parsing and clarity.
1269
- * @param scalarOf100Percent The value representing 100%.
1270
- * @param percentage A percentage string in the format "NN%", e.g., "40%". Must end with '%'.
1271
- * @returns The scaled value.
1272
- */
1273
- export declare function scaleByPercent(scalarOf100Percent: number, percentage: string): number;
1274
-
1275
- /**
1276
- * @param percentage a percenage value as a string, like "40%"
1277
- * @param scalarOf100Percent The value to multiply the percentage by
1278
- */
1279
- export declare function scalePercentBy(scalarOf100Percent: number, percentage: string): number;
1280
-
1281
978
  declare type SchemaDescriptor = {
1282
979
  tables: Array<TableDescriptor>;
1283
980
  relationships?: any;
@@ -1329,23 +1026,6 @@ declare interface SequenceExpression extends ExpressionBase {
1329
1026
  loose?: boolean;
1330
1027
  }
1331
1028
 
1332
- /**
1333
- * Provides annotations for skipped tests and the ability to specify a reason.
1334
- *
1335
- * Usage:
1336
- *
1337
- * ```ts
1338
- * import { SKIP_REASON } from "./tests/component-test-helpers";
1339
- *
1340
- * test.skip(
1341
- * "test name",
1342
- * SKIP_REASON.NOT_IMPLEMENTED_XMLUI("This test is not implemented in xmlui")
1343
- * async ({}) => {},
1344
- * );
1345
- * ```
1346
- */
1347
- export declare const SKIP_REASON: TestSkipReason;
1348
-
1349
1029
  declare class SliderDriver extends ComponentDriver {
1350
1030
  private getActiveThumb;
1351
1031
  dragThumbByMouse(location: "start" | "end" | "middle", thumbNumber?: number): Promise<void>;
@@ -1601,7 +1281,7 @@ declare interface TemplateLiteralExpression extends ExpressionBase {
1601
1281
 
1602
1282
  export declare const test: TestType<PlaywrightTestArgs & PlaywrightTestOptions & TestDriverExtenderProps, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
1603
1283
 
1604
- export declare type TestBedDescription = Omit<Partial<StandaloneAppDescription>, "entryPoint" | "components"> & {
1284
+ declare type TestBedDescription = Omit<Partial<StandaloneAppDescription>, "entryPoint" | "components"> & {
1605
1285
  testThemeVars?: Record<string, string>;
1606
1286
  components?: string[];
1607
1287
  };
@@ -1679,62 +1359,6 @@ declare type TestDriverExtenderProps = {
1679
1359
  createTreeDriver: ComponentDriverMethod<TreeDriver>;
1680
1360
  };
1681
1361
 
1682
- /**
1683
- * Provides annotations for skipped tests and the ability to specify a reason.
1684
- * Use it via the SKIP_REASON exported variable.
1685
- */
1686
- declare class TestSkipReason {
1687
- private addAnnotation;
1688
- NOT_IMPLEMENTED_XMLUI(description?: string): {
1689
- annotation: {
1690
- type: string;
1691
- description: string;
1692
- };
1693
- };
1694
- TO_BE_IMPLEMENTED(description?: string): {
1695
- annotation: {
1696
- type: string;
1697
- description: string;
1698
- };
1699
- };
1700
- XMLUI_BUG(description?: string): {
1701
- annotation: {
1702
- type: string;
1703
- description: string;
1704
- };
1705
- };
1706
- TEST_INFRA_BUG(description?: string): {
1707
- annotation: {
1708
- type: string;
1709
- description: string;
1710
- };
1711
- };
1712
- TEST_NOT_WORKING(description?: string): {
1713
- annotation: {
1714
- type: string;
1715
- description: string;
1716
- };
1717
- };
1718
- TEST_INFRA_NOT_IMPLEMENTED(description?: string): {
1719
- annotation: {
1720
- type: string;
1721
- description: string;
1722
- };
1723
- };
1724
- REFACTOR(description?: string): {
1725
- annotation: {
1726
- type: string;
1727
- description: string;
1728
- };
1729
- };
1730
- UNSURE(description: string): {
1731
- annotation: {
1732
- type: string;
1733
- description: string;
1734
- };
1735
- };
1736
- }
1737
-
1738
1362
  declare class TestStateDriver {
1739
1363
  protected readonly testStateLocator: Locator;
1740
1364
  constructor(testStateLocator: Locator);
@@ -1767,24 +1391,6 @@ declare interface ThemeDefinitionDetails {
1767
1391
  resources?: Record<string, string | FontDef>;
1768
1392
  }
1769
1393
 
1770
- export declare function themedOverflows(locator: Locator, direction?: "x" | "y" | "both"): Promise<boolean>;
1771
-
1772
- export declare function themedPixelStrToNum(pixelStr: string): number;
1773
-
1774
- export declare type ThemedThemeTestDesc = {
1775
- themeVar: string;
1776
- themeVarAsCSS: string;
1777
- expected: string;
1778
- dependsOnVars?: Record<string, string>;
1779
- };
1780
-
1781
- export declare type ThemeTestDesc = {
1782
- themeVar: string;
1783
- themeVarAsCSS: string;
1784
- expected: string;
1785
- dependsOnVars?: Record<string, string>;
1786
- };
1787
-
1788
1394
  declare type ThemeTone = "light" | "dark";
1789
1395
 
1790
1396
  declare type THROW_STATEMENT = typeof T_THROW_STATEMENT;
@@ -1794,7 +1400,7 @@ declare interface ThrowStatement extends ScripNodeBase {
1794
1400
  expr: Expression;
1795
1401
  }
1796
1402
 
1797
- export declare class TimeInputDriver extends InputComponentDriver {
1403
+ declare class TimeInputDriver extends InputComponentDriver {
1798
1404
  get hourInput(): Locator_2;
1799
1405
  get minuteInput(): Locator_2;
1800
1406
  get secondInput(): Locator_2;
@@ -1802,7 +1408,7 @@ export declare class TimeInputDriver extends InputComponentDriver {
1802
1408
  get clearButton(): Locator_2;
1803
1409
  }
1804
1410
 
1805
- export declare class TimerDriver extends ComponentDriver {
1411
+ declare class TimerDriver extends ComponentDriver {
1806
1412
  isEnabled(): Promise<boolean>;
1807
1413
  isRunning(): Promise<boolean>;
1808
1414
  isPaused(): Promise<boolean>;
@@ -1942,10 +1548,6 @@ declare interface UnaryExpression extends ExpressionBase {
1942
1548
 
1943
1549
  declare type UnaryOpSymbols = "+" | "-" | "~" | "!" | "typeof" | "delete";
1944
1550
 
1945
- declare type UnparsedAppDescription = Omit<Partial<StandaloneAppDescription>, "entryPoint"> & {
1946
- entryPoint?: EntryPoint;
1947
- };
1948
-
1949
1551
  declare class ValidationDisplayDriver extends ComponentDriver {
1950
1552
  getSeverity(): Promise<string>;
1951
1553
  getText(): Promise<string>;