@genesislcap/expression-builder 14.251.5 → 14.253.0

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.
@@ -803,7 +803,7 @@
803
803
  }
804
804
  }
805
805
  ],
806
- "description": "Gets the string representation from a `Date` which is the format a `date` input uses.\n`yyyy-mm-dd`"
806
+ "description": "Gets the string representation from a `Date` which is the format a `date` input uses.\n`yyyy-mm-dd`\nUses UTC methods to ensure consistent output regardless of timezone."
807
807
  },
808
808
  {
809
809
  "kind": "function",
@@ -816,7 +816,7 @@
816
816
  }
817
817
  }
818
818
  ],
819
- "description": "Gets the string representation from a `Date` which is the format a `datetime-local` input uses.\n`yyyy-mm-ddThh:mm:ss`"
819
+ "description": "Gets the string representation from a `Date` which is the format a `datetime-local` input uses.\n`yyyy-mm-ddThh:mm:ss`\nUses UTC methods to ensure consistent output regardless of timezone."
820
820
  }
821
821
  ],
822
822
  "exports": [
@@ -943,120 +943,6 @@
943
943
  }
944
944
  ]
945
945
  },
946
- {
947
- "kind": "javascript-module",
948
- "path": "src/main/rule-field/rule-field.template.ts",
949
- "declarations": [
950
- {
951
- "kind": "variable",
952
- "name": "template",
953
- "default": "html<RuleField>`\n ${(context) => {\n const selectTag = context.styles?.customElements?.select || 'select';\n const optionTag = context.styles?.customElements?.option || 'option';\n const optgroupTag = 'optgroup'; // Not supporting custom optgroup for now\n\n return html<RuleField>`\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.dispatchFieldsChanged(c.event)}\n value=${(x) => x.field?.fieldId}\n >\n <${optionTag} value=\"\">Select a field</${optionTag}>\n ${repeat(\n (x) => x.groupedFieldss,\n html<{ optgroup: string | null; xs: Field[] } | Field, RuleField>`\n ${(groupOrFields) => {\n if ('xs' in groupOrFields) {\n return html<{\n optgroup: string | null;\n xs: Field[];\n }>`\n <${optgroupTag} label=\"${(x) => x.optgroup}\">\n ${repeat(\n (x) => x.xs,\n html<Field>`\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => x.fieldId === c.parentContext.parent?.field?.fieldId}\n >\n ${(x) => x.label}\n </${optionTag}>\n `,\n )}\n </${optgroupTag}>\n `;\n } else {\n return html<Field>`\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => x.fieldId === c.parent?.field?.fieldId}\n >\n ${(x) => x.label}\n </${optionTag}>\n `;\n }\n }}\n `,\n )}\n </${selectTag}>\n `;\n }}\n`"
954
- }
955
- ],
956
- "exports": [
957
- {
958
- "kind": "js",
959
- "name": "template",
960
- "declaration": {
961
- "name": "template",
962
- "module": "src/main/rule-field/rule-field.template.ts"
963
- }
964
- }
965
- ]
966
- },
967
- {
968
- "kind": "javascript-module",
969
- "path": "src/main/rule-field/rule-field.ts",
970
- "declarations": [
971
- {
972
- "kind": "class",
973
- "description": "",
974
- "name": "RuleField",
975
- "members": [
976
- {
977
- "kind": "field",
978
- "name": "fields",
979
- "type": {
980
- "text": "Field[]"
981
- },
982
- "default": "[]"
983
- },
984
- {
985
- "kind": "field",
986
- "name": "field",
987
- "type": {
988
- "text": "Field"
989
- }
990
- },
991
- {
992
- "kind": "field",
993
- "name": "config",
994
- "type": {
995
- "text": "Config"
996
- }
997
- },
998
- {
999
- "kind": "field",
1000
- "name": "styles",
1001
- "type": {
1002
- "text": "Styles | undefined"
1003
- }
1004
- },
1005
- {
1006
- "kind": "field",
1007
- "name": "groupedFieldss",
1008
- "type": {
1009
- "text": "(Field | { optgroup: string | null; xs: Field[] })[]"
1010
- },
1011
- "readonly": true
1012
- },
1013
- {
1014
- "kind": "method",
1015
- "name": "dispatchFieldsChanged",
1016
- "parameters": [
1017
- {
1018
- "name": "event",
1019
- "type": {
1020
- "text": "Event"
1021
- }
1022
- }
1023
- ]
1024
- }
1025
- ],
1026
- "events": [
1027
- {
1028
- "type": {
1029
- "text": "CustomEvent"
1030
- }
1031
- }
1032
- ],
1033
- "superclass": {
1034
- "name": "GenesisElement",
1035
- "package": "@genesislcap/web-core"
1036
- },
1037
- "tagName": "expression-rule-field",
1038
- "customElement": true
1039
- }
1040
- ],
1041
- "exports": [
1042
- {
1043
- "kind": "js",
1044
- "name": "RuleField",
1045
- "declaration": {
1046
- "name": "RuleField",
1047
- "module": "src/main/rule-field/rule-field.ts"
1048
- }
1049
- },
1050
- {
1051
- "kind": "custom-element-definition",
1052
- "name": "expression-rule-field",
1053
- "declaration": {
1054
- "name": "RuleField",
1055
- "module": "src/main/rule-field/rule-field.ts"
1056
- }
1057
- }
1058
- ]
1059
- },
1060
946
  {
1061
947
  "kind": "javascript-module",
1062
948
  "path": "src/main/expression-group/expression-group.styles.ts",
@@ -1529,6 +1415,120 @@
1529
1415
  }
1530
1416
  ]
1531
1417
  },
1418
+ {
1419
+ "kind": "javascript-module",
1420
+ "path": "src/main/rule-field/rule-field.template.ts",
1421
+ "declarations": [
1422
+ {
1423
+ "kind": "variable",
1424
+ "name": "template",
1425
+ "default": "html<RuleField>`\n ${(context) => {\n const selectTag = context.styles?.customElements?.select || 'select';\n const optionTag = context.styles?.customElements?.option || 'option';\n const optgroupTag = 'optgroup'; // Not supporting custom optgroup for now\n\n return html<RuleField>`\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.dispatchFieldsChanged(c.event)}\n value=${(x) => x.field?.fieldId}\n >\n <${optionTag} value=\"\">Select a field</${optionTag}>\n ${repeat(\n (x) => x.groupedFieldss,\n html<{ optgroup: string | null; xs: Field[] } | Field, RuleField>`\n ${(groupOrFields) => {\n if ('xs' in groupOrFields) {\n return html<{\n optgroup: string | null;\n xs: Field[];\n }>`\n <${optgroupTag} label=\"${(x) => x.optgroup}\">\n ${repeat(\n (x) => x.xs,\n html<Field>`\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => x.fieldId === c.parentContext.parent?.field?.fieldId}\n >\n ${(x) => x.label}\n </${optionTag}>\n `,\n )}\n </${optgroupTag}>\n `;\n } else {\n return html<Field>`\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => x.fieldId === c.parent?.field?.fieldId}\n >\n ${(x) => x.label}\n </${optionTag}>\n `;\n }\n }}\n `,\n )}\n </${selectTag}>\n `;\n }}\n`"
1426
+ }
1427
+ ],
1428
+ "exports": [
1429
+ {
1430
+ "kind": "js",
1431
+ "name": "template",
1432
+ "declaration": {
1433
+ "name": "template",
1434
+ "module": "src/main/rule-field/rule-field.template.ts"
1435
+ }
1436
+ }
1437
+ ]
1438
+ },
1439
+ {
1440
+ "kind": "javascript-module",
1441
+ "path": "src/main/rule-field/rule-field.ts",
1442
+ "declarations": [
1443
+ {
1444
+ "kind": "class",
1445
+ "description": "",
1446
+ "name": "RuleField",
1447
+ "members": [
1448
+ {
1449
+ "kind": "field",
1450
+ "name": "fields",
1451
+ "type": {
1452
+ "text": "Field[]"
1453
+ },
1454
+ "default": "[]"
1455
+ },
1456
+ {
1457
+ "kind": "field",
1458
+ "name": "field",
1459
+ "type": {
1460
+ "text": "Field"
1461
+ }
1462
+ },
1463
+ {
1464
+ "kind": "field",
1465
+ "name": "config",
1466
+ "type": {
1467
+ "text": "Config"
1468
+ }
1469
+ },
1470
+ {
1471
+ "kind": "field",
1472
+ "name": "styles",
1473
+ "type": {
1474
+ "text": "Styles | undefined"
1475
+ }
1476
+ },
1477
+ {
1478
+ "kind": "field",
1479
+ "name": "groupedFieldss",
1480
+ "type": {
1481
+ "text": "(Field | { optgroup: string | null; xs: Field[] })[]"
1482
+ },
1483
+ "readonly": true
1484
+ },
1485
+ {
1486
+ "kind": "method",
1487
+ "name": "dispatchFieldsChanged",
1488
+ "parameters": [
1489
+ {
1490
+ "name": "event",
1491
+ "type": {
1492
+ "text": "Event"
1493
+ }
1494
+ }
1495
+ ]
1496
+ }
1497
+ ],
1498
+ "events": [
1499
+ {
1500
+ "type": {
1501
+ "text": "CustomEvent"
1502
+ }
1503
+ }
1504
+ ],
1505
+ "superclass": {
1506
+ "name": "GenesisElement",
1507
+ "package": "@genesislcap/web-core"
1508
+ },
1509
+ "tagName": "expression-rule-field",
1510
+ "customElement": true
1511
+ }
1512
+ ],
1513
+ "exports": [
1514
+ {
1515
+ "kind": "js",
1516
+ "name": "RuleField",
1517
+ "declaration": {
1518
+ "name": "RuleField",
1519
+ "module": "src/main/rule-field/rule-field.ts"
1520
+ }
1521
+ },
1522
+ {
1523
+ "kind": "custom-element-definition",
1524
+ "name": "expression-rule-field",
1525
+ "declaration": {
1526
+ "name": "RuleField",
1527
+ "module": "src/main/rule-field/rule-field.ts"
1528
+ }
1529
+ }
1530
+ ]
1531
+ },
1532
1532
  {
1533
1533
  "kind": "javascript-module",
1534
1534
  "path": "src/main/rule-operator/rule-operator.template.ts",
@@ -1,12 +1,14 @@
1
1
  /**
2
2
  * Gets the string representation from a `Date` which is the format a `date` input uses.
3
3
  * `yyyy-mm-dd`
4
+ * Uses UTC methods to ensure consistent output regardless of timezone.
4
5
  * @alpha
5
6
  */
6
7
  export declare const formatDateString: (date: Date) => string;
7
8
  /**
8
9
  * Gets the string representation from a `Date` which is the format a `datetime-local` input uses.
9
10
  * `yyyy-mm-ddThh:mm:ss`
11
+ * Uses UTC methods to ensure consistent output regardless of timezone.
10
12
  * @alpha
11
13
  */
12
14
  export declare const formatDateTimeString: (date: Date) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../src/utils/formatting.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,SAAU,IAAI,WAK1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,SAAU,IAAI,WAM9C,CAAC"}
1
+ {"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../../src/utils/formatting.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,SAAU,IAAI,WAK1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,SAAU,IAAI,WAM9C,CAAC"}
@@ -1,23 +1,25 @@
1
1
  /**
2
2
  * Gets the string representation from a `Date` which is the format a `date` input uses.
3
3
  * `yyyy-mm-dd`
4
+ * Uses UTC methods to ensure consistent output regardless of timezone.
4
5
  * @alpha
5
6
  */
6
7
  export const formatDateString = (date) => {
7
- const year = date.getFullYear();
8
- const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-indexed
9
- const day = String(date.getDate()).padStart(2, '0');
8
+ const year = date.getUTCFullYear();
9
+ const month = String(date.getUTCMonth() + 1).padStart(2, '0'); // Months are 0-indexed
10
+ const day = String(date.getUTCDate()).padStart(2, '0');
10
11
  return `${year}-${month}-${day}`;
11
12
  };
12
13
  /**
13
14
  * Gets the string representation from a `Date` which is the format a `datetime-local` input uses.
14
15
  * `yyyy-mm-ddThh:mm:ss`
16
+ * Uses UTC methods to ensure consistent output regardless of timezone.
15
17
  * @alpha
16
18
  */
17
19
  export const formatDateTimeString = (date) => {
18
20
  const datePart = formatDateString(date);
19
- const hours = String(date.getHours()).padStart(2, '0');
20
- const minutes = String(date.getMinutes()).padStart(2, '0');
21
- const seconds = String(date.getSeconds()).padStart(2, '0');
21
+ const hours = String(date.getUTCHours()).padStart(2, '0');
22
+ const minutes = String(date.getUTCMinutes()).padStart(2, '0');
23
+ const seconds = String(date.getUTCSeconds()).padStart(2, '0');
22
24
  return `${datePart}T${hours}:${minutes}:${seconds}`;
23
25
  };
@@ -170,6 +170,7 @@ declare type FieldTypes = TextInput | NumberInput | CheckboxInput | SelectInput
170
170
  /**
171
171
  * Gets the string representation from a `Date` which is the format a `date` input uses.
172
172
  * `yyyy-mm-dd`
173
+ * Uses UTC methods to ensure consistent output regardless of timezone.
173
174
  * @alpha
174
175
  */
175
176
  export declare const formatDateString: (date: Date) => string;
@@ -177,6 +178,7 @@ export declare const formatDateString: (date: Date) => string;
177
178
  /**
178
179
  * Gets the string representation from a `Date` which is the format a `datetime-local` input uses.
179
180
  * `yyyy-mm-ddThh:mm:ss`
181
+ * Uses UTC methods to ensure consistent output regardless of timezone.
180
182
  * @alpha
181
183
  */
182
184
  export declare const formatDateTimeString: (date: Date) => string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/expression-builder",
3
3
  "description": "Genesis Foundation Expression Builder",
4
- "version": "14.251.5",
4
+ "version": "14.253.0",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/expression-builder.d.ts",
@@ -62,5 +62,5 @@
62
62
  "access": "public"
63
63
  },
64
64
  "customElements": "dist/custom-elements.json",
65
- "gitHead": "a18270e8f4e91032bd689577f13379ba29158751"
65
+ "gitHead": "fb4d5d95c8012d110b7e5ca82fc03a037fdb12ef"
66
66
  }