remult 2.7.32 → 2.7.34

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,7 +1,7 @@
1
1
  import { type RelationFields } from '../src/remult3/relationInfoMember.js';
2
2
  import type { ClassType } from '../classType.js';
3
3
  import type { Remult } from '../src/context.js';
4
- import { EntityFilter } from '../src/remult3/remult3.js';
4
+ import type { EntityFilter } from '../src/remult3/remult3.js';
5
5
  export interface EntityUIInfo {
6
6
  superKey: string;
7
7
  key: string;
@@ -7,6 +7,7 @@ var relationInfoMember_js_1 = require("../src/remult3/relationInfoMember.js");
7
7
  var filter_interfaces_js_1 = require("../src/filter/filter-interfaces.js");
8
8
  var get_remult_admin_html_js_1 = require("./get-remult-admin-html.js");
9
9
  var RepositoryImplementation_js_1 = require("../src/remult3/RepositoryImplementation.js");
10
+ var inputTypes_js_1 = require("../inputTypes.js");
10
11
  function remultAdminHtml(options) {
11
12
  var rootPath = options.rootPath, head = options.head;
12
13
  return (0, get_remult_admin_html_js_1.getHtml)()
@@ -80,7 +81,7 @@ function buildEntityInfo(options) {
80
81
  caption: x.caption,
81
82
  relationToOne: relation,
82
83
  inputType: x.inputType,
83
- type: x.valueConverter.fieldTypeInDb == 'json'
84
+ type: x.inputType === inputTypes_js_1.InputTypes.json
84
85
  ? 'json'
85
86
  : x.valueType === Number
86
87
  ? 'number'
@@ -13,6 +13,7 @@ var relationInfoMember_js_1 = require("./relationInfoMember.js");
13
13
  var remult_static_js_1 = require("../remult-static.js");
14
14
  var addValidator_js_1 = require("./addValidator.js");
15
15
  var isOfType_js_1 = require("../isOfType.js");
16
+ var inputTypes_js_1 = require("../../inputTypes.js");
16
17
  var validateNumber = (0, validators_js_1.createValueValidator)(function (x) {
17
18
  return !isNaN(x) && isFinite(x);
18
19
  });
@@ -38,10 +39,14 @@ var Fields = /** @class */ (function () {
38
39
  if (op.valueConverter && !op.valueConverter.fieldTypeInDb)
39
40
  //@ts-ignore
40
41
  op.valueConverter.fieldTypeInDb = 'json';
42
+ if (op.valueType && !op.valueType.inputType)
43
+ //@ts-ignore
44
+ op.valueType.inputType = inputTypes_js_1.InputTypes.json;
41
45
  return Field.apply(void 0, tslib_1.__spreadArray([undefined,
42
46
  {
43
47
  valueConverter: {
44
48
  fieldTypeInDb: 'json',
49
+ inputType: inputTypes_js_1.InputTypes.json,
45
50
  },
46
51
  }], tslib_1.__read(options), false));
47
52
  };
@@ -57,6 +57,8 @@ var ValueConverters = /** @class */ (function () {
57
57
  var d = val;
58
58
  if (typeof d === 'string' || typeof d === 'number')
59
59
  d = new Date(d);
60
+ if (d === undefined)
61
+ return undefined;
60
62
  if (!d || d == null)
61
63
  return null;
62
64
  if (d.getHours() == 0)