d5-testing-library 2.0.0-alpha.10 → 2.0.0-alpha.11

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 {
2
2
  FormEdit
3
- } from "./chunk-GSTA5R4B.mjs";
3
+ } from "./chunk-I5BQCTAW.mjs";
4
4
  export {
5
5
  FormEdit as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ListForm
3
- } from "./chunk-GSTA5R4B.mjs";
3
+ } from "./chunk-I5BQCTAW.mjs";
4
4
  export {
5
5
  ListForm as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TreeView
3
- } from "./chunk-GSTA5R4B.mjs";
3
+ } from "./chunk-I5BQCTAW.mjs";
4
4
  export {
5
5
  TreeView as default
6
6
  };
@@ -3320,15 +3320,15 @@ async function classDependencyInjector(formType) {
3320
3320
  let SubFormFactoryClass;
3321
3321
  switch (formType) {
3322
3322
  case "1" /* LIST */:
3323
- SubFormFactoryClass = (await import("./ListForm-4DCCOHKJ.mjs")).default;
3323
+ SubFormFactoryClass = (await import("./ListForm-DSQ4LR7B.mjs")).default;
3324
3324
  break;
3325
3325
  case "3" /* TREE */:
3326
- SubFormFactoryClass = (await import("./TreeView-RDCA3LGU.mjs")).default;
3326
+ SubFormFactoryClass = (await import("./TreeView-HFUTD2JY.mjs")).default;
3327
3327
  break;
3328
3328
  case "2" /* EDIT */:
3329
3329
  case "99" /* FREE_FORM */:
3330
3330
  case "4" /* REPORT */:
3331
- SubFormFactoryClass = (await import("./FormEdit-QX5S7TDU.mjs")).default;
3331
+ SubFormFactoryClass = (await import("./FormEdit-XTRS74QI.mjs")).default;
3332
3332
  break;
3333
3333
  default:
3334
3334
  throw new Error(`Unsupported form type ${formType}`);
@@ -4533,6 +4533,9 @@ var isDefined = function(value) {
4533
4533
  var isString = function(object) {
4534
4534
  return typeof object === "string";
4535
4535
  };
4536
+ var isNumeric = function(object) {
4537
+ return typeof object === "number" && isFinite(object) || !isNaN(object - parseFloat(object));
4538
+ };
4536
4539
  var isDate = function(object) {
4537
4540
  return type(object) === "date";
4538
4541
  };
@@ -5226,7 +5229,11 @@ var FileUploader = class extends AbstractElementWithParent {
5226
5229
  const element = await this.getMedataElement();
5227
5230
  if (!element) return null;
5228
5231
  const fileModDate = (await element.getAttribute(FILE_DATE_ATTRIBUTE))?.trim();
5229
- return fileModDate ? new Date(fileModDate) : null;
5232
+ if (isNumeric(+fileModDate)) {
5233
+ const dateString = (/* @__PURE__ */ new Date(+fileModDate)).toISOString();
5234
+ return new Date(dateString.split("T")[0]);
5235
+ }
5236
+ return fileModDate ? new Date(fileModDate.split("T")[0]) : null;
5230
5237
  }
5231
5238
  /**
5232
5239
  * Returns the MIME/content type of the uploaded file from metadata.
@@ -474,7 +474,7 @@ function isEmptyValue(value) {
474
474
  }
475
475
  return false;
476
476
  }
477
- var types, isObject, isEmptyObject, type, isNull, isArray, isDefined, isString, isDate, isArrayOfDates, isUndefined;
477
+ var types, isObject, isEmptyObject, type, isNull, isArray, isDefined, isString, isNumeric, isDate, isArrayOfDates, isUndefined;
478
478
  var init_typesUtil = __esm({
479
479
  "src/utils/typesUtil.ts"() {
480
480
  "use strict";
@@ -507,6 +507,9 @@ var init_typesUtil = __esm({
507
507
  isString = function(object) {
508
508
  return typeof object === "string";
509
509
  };
510
+ isNumeric = function(object) {
511
+ return typeof object === "number" && isFinite(object) || !isNaN(object - parseFloat(object));
512
+ };
510
513
  isDate = function(object) {
511
514
  return type(object) === "date";
512
515
  };
@@ -1273,6 +1276,7 @@ var init_FileUploader = __esm({
1273
1276
  "src/pageObjects/elements/Editors/FileUploader.ts"() {
1274
1277
  "use strict";
1275
1278
  init_AbstractElementWithParent();
1279
+ init_typesUtil();
1276
1280
  FILE_NAME_SELECTOR = ".file-text";
1277
1281
  FILE_SIZE_ATTRIBUTE = "data-filesize";
1278
1282
  FILE_DATE_ATTRIBUTE = "data-moddate";
@@ -1321,7 +1325,11 @@ var init_FileUploader = __esm({
1321
1325
  const element = await this.getMedataElement();
1322
1326
  if (!element) return null;
1323
1327
  const fileModDate = (await element.getAttribute(FILE_DATE_ATTRIBUTE))?.trim();
1324
- return fileModDate ? new Date(fileModDate) : null;
1328
+ if (isNumeric(+fileModDate)) {
1329
+ const dateString = (/* @__PURE__ */ new Date(+fileModDate)).toISOString();
1330
+ return new Date(dateString.split("T")[0]);
1331
+ }
1332
+ return fileModDate ? new Date(fileModDate.split("T")[0]) : null;
1325
1333
  }
1326
1334
  /**
1327
1335
  * Returns the MIME/content type of the uploaded file from metadata.
@@ -23,7 +23,7 @@ import {
23
23
  readonlyLocator,
24
24
  wait,
25
25
  waitElementIsVisible_default
26
- } from "./chunk-GSTA5R4B.mjs";
26
+ } from "./chunk-I5BQCTAW.mjs";
27
27
  export {
28
28
  AbstractPage,
29
29
  ApiRequest,
@@ -23,7 +23,7 @@ import {
23
23
  readonlyLocator,
24
24
  wait,
25
25
  waitElementIsVisible_default
26
- } from "./chunk-GSTA5R4B.mjs";
26
+ } from "./chunk-I5BQCTAW.mjs";
27
27
  export {
28
28
  AbstractPage,
29
29
  ApiRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "d5-testing-library",
3
- "version": "2.0.0-alpha.10",
3
+ "version": "2.0.0-alpha.11",
4
4
  "description": "e2e testing D5 projects",
5
5
  "main": "dist/cjs/d5-testing-library.cjs",
6
6
  "module": "dist/d5-testing-library.legacy-esm.js",