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.
- package/dist/{FormEdit-QX5S7TDU.mjs → FormEdit-XTRS74QI.mjs} +1 -1
- package/dist/{ListForm-4DCCOHKJ.mjs → ListForm-DSQ4LR7B.mjs} +1 -1
- package/dist/{TreeView-RDCA3LGU.mjs → TreeView-HFUTD2JY.mjs} +1 -1
- package/dist/{chunk-GSTA5R4B.mjs → chunk-I5BQCTAW.mjs} +11 -4
- package/dist/cjs/d5-testing-library.cjs +10 -2
- package/dist/d5-testing-library.legacy-esm.js +1 -1
- package/dist/d5-testing-library.mjs +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
3323
|
+
SubFormFactoryClass = (await import("./ListForm-DSQ4LR7B.mjs")).default;
|
|
3324
3324
|
break;
|
|
3325
3325
|
case "3" /* TREE */:
|
|
3326
|
-
SubFormFactoryClass = (await import("./TreeView-
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|