@wavemaker/app-runtime-wm-build 11.4.0-next.24564 → 11.4.0-next.24568

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
  {
2
2
  "name": "@wavemaker/app-runtime-wm-build",
3
- "version": "11.4.0-next.24564",
3
+ "version": "11.4.0-next.24568",
4
4
  "description": "All modules required for a wavemaker application.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -199876,7 +199876,7 @@ window.requestAnimationFrame = function() {
199876
199876
  var fieldType = _util_variable_live_variable_utils__WEBPACK_IMPORTED_MODULE_3__.LiveVariableUtils.getFieldType(key, variable);
199877
199877
  var fieldValue;
199878
199878
  if ((0, _util_utils__WEBPACK_IMPORTED_MODULE_0__.isDateTimeType)(fieldType)) {
199879
- fieldValue = (0, _util_variable_variables_utils__WEBPACK_IMPORTED_MODULE_2__.formatDate)(value, fieldType);
199879
+ fieldValue = (0, _util_variable_variables_utils__WEBPACK_IMPORTED_MODULE_2__.formatDate)(value, fieldType, variable.dateFormatter);
199880
199880
  rowObject[key] = fieldValue;
199881
199881
  } else if (lodash__WEBPACK_IMPORTED_MODULE_8___default().isArray(value) && _util_variable_live_variable_utils__WEBPACK_IMPORTED_MODULE_3__.LiveVariableUtils.isStringType(fieldType)) {
199882
199882
  fieldValue = lodash__WEBPACK_IMPORTED_MODULE_8___default().join(value, ",");
@@ -199907,7 +199907,7 @@ window.requestAnimationFrame = function() {
199907
199907
  if (action !== "deleteTableData" || _util_variable_live_variable_utils__WEBPACK_IMPORTED_MODULE_3__.LiveVariableUtils.isCompositeKey(primaryKey)) {
199908
199908
  fieldType = _util_variable_live_variable_utils__WEBPACK_IMPORTED_MODULE_3__.LiveVariableUtils.getFieldType(fieldName, variable);
199909
199909
  if ((0, _util_utils__WEBPACK_IMPORTED_MODULE_0__.isDateTimeType)(fieldType)) {
199910
- fieldValue = (0, _util_variable_variables_utils__WEBPACK_IMPORTED_MODULE_2__.formatDate)(fieldValue, fieldType);
199910
+ fieldValue = (0, _util_variable_variables_utils__WEBPACK_IMPORTED_MODULE_2__.formatDate)(fieldValue, fieldType, variable.dateFormatter);
199911
199911
  } else if (lodash__WEBPACK_IMPORTED_MODULE_8___default().isArray(fieldValue) && _util_variable_live_variable_utils__WEBPACK_IMPORTED_MODULE_3__.LiveVariableUtils.isStringType(fieldType)) {
199912
199912
  fieldValue = lodash__WEBPACK_IMPORTED_MODULE_8___default().join(fieldValue, ",");
199913
199913
  }
@@ -202387,6 +202387,13 @@ window.requestAnimationFrame = function() {
202387
202387
  return ServiceVariable;
202388
202388
  }(_api_aware_variable__WEBPACK_IMPORTED_MODULE_3__.ApiAwareVariable);
202389
202389
  },
202390
+ "./src/types/date-formatter.ts":
202391
+ /*!*************************************!*\
202392
+ !*** ./src/types/date-formatter.ts ***!
202393
+ \*************************************/ (__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
202394
+ "use strict";
202395
+ __webpack_require__.r(__webpack_exports__);
202396
+ },
202390
202397
  "./src/types/event-notifier.ts":
202391
202398
  /*!*************************************!*\
202392
202399
  !*** ./src/types/event-notifier.ts ***!
@@ -203678,7 +203685,7 @@ window.requestAnimationFrame = function() {
203678
203685
  case "date":
203679
203686
  case "datetime":
203680
203687
  case "timestamp":
203681
- fieldValue = (0, _variables_utils__WEBPACK_IMPORTED_MODULE_2__.formatDate)(fieldValue, fieldType);
203688
+ fieldValue = (0, _variables_utils__WEBPACK_IMPORTED_MODULE_2__.formatDate)(fieldValue, fieldType, variable.dateFormatter);
203682
203689
  filterCondition = filterCondition ? LiveVariableUtils.getFilterCondition(filterCondition) : matchModes["exact"];
203683
203690
  break;
203684
203691
 
@@ -203905,7 +203912,7 @@ window.requestAnimationFrame = function() {
203905
203912
  if (!lodash__WEBPACK_IMPORTED_MODULE_4___default().isEmpty(options.filterFields)) {
203906
203913
  var operator = "";
203907
203914
  for (var field in options.filterFields) {
203908
- operator = options.filterFields[field]["logicalOp"] || "";
203915
+ operator = options.filterFields[field] && options.filterFields[field]["logicalOp"] || "";
203909
203916
  break;
203910
203917
  }
203911
203918
  filterRules = {
@@ -203913,6 +203920,9 @@ window.requestAnimationFrame = function() {
203913
203920
  rules: []
203914
203921
  };
203915
203922
  lodash__WEBPACK_IMPORTED_MODULE_4___default().forEach(options.filterFields, (function(filterObj, filterName) {
203923
+ if (!filterObj) {
203924
+ return;
203925
+ }
203916
203926
  var filterCondition = matchModes[filterObj.matchMode] || matchModes[filterObj.filterCondition] || filterObj.filterCondition;
203917
203927
  if (lodash__WEBPACK_IMPORTED_MODULE_4___default().includes(_constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.DB_CONSTANTS.DATABASE_EMPTY_MATCH_MODES, filterCondition) || !lodash__WEBPACK_IMPORTED_MODULE_4___default().isNil(filterObj.value) && filterObj.value !== "") {
203918
203928
  var type = filterObj.type || LiveVariableUtils.getSqlType(variable, filterName, options.entityName);
@@ -204374,14 +204384,14 @@ window.requestAnimationFrame = function() {
204374
204384
  return formData;
204375
204385
  }
204376
204386
  };
204377
- var processRequestBody = function(inputData, params) {
204387
+ var processRequestBody = function(inputData, params, variable) {
204378
204388
  var requestBody = {}, missingParams = [];
204379
204389
  var paramValue;
204380
204390
  lodash__WEBPACK_IMPORTED_MODULE_5___default().forEach(params, (function(param) {
204381
204391
  paramValue = lodash__WEBPACK_IMPORTED_MODULE_5___default().get(inputData, param.name);
204382
204392
  if (!lodash__WEBPACK_IMPORTED_MODULE_5___default().isUndefined(paramValue) && paramValue !== "" && paramValue !== null && !param.readOnly) {
204383
204393
  paramValue = (0, _util_utils__WEBPACK_IMPORTED_MODULE_0__.isDateTimeType)(param.type) ? (0,
204384
- _variables_utils__WEBPACK_IMPORTED_MODULE_2__.formatDate)(paramValue, param.type) : paramValue;
204394
+ _variables_utils__WEBPACK_IMPORTED_MODULE_2__.formatDate)(paramValue, param.type, variable.dateFormatter) : paramValue;
204385
204395
  if (lodash__WEBPACK_IMPORTED_MODULE_5___default().isArray(paramValue) && lodash__WEBPACK_IMPORTED_MODULE_5___default().toLower((0,
204386
204396
  _util_utils__WEBPACK_IMPORTED_MODULE_0__.extractType)(param.type)) === "string") {
204387
204397
  paramValue = lodash__WEBPACK_IMPORTED_MODULE_5___default().join(paramValue, ",");
@@ -204513,7 +204523,7 @@ window.requestAnimationFrame = function() {
204513
204523
  if ((0, _util_utils__WEBPACK_IMPORTED_MODULE_0__.isDefined)(paramValue) && paramValue !== null && paramValue !== "" || isBodyTypeQueryProcedure && param.type !== "file") {
204514
204524
  if (variable.serviceType === _constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.VARIABLE_CONSTANTS.SERVICE_TYPE.DATA && (0,
204515
204525
  _util_utils__WEBPACK_IMPORTED_MODULE_0__.isDateTimeType)(param.type)) {
204516
- paramValue = (0, _variables_utils__WEBPACK_IMPORTED_MODULE_2__.formatDate)(paramValue, param.type);
204526
+ paramValue = (0, _variables_utils__WEBPACK_IMPORTED_MODULE_2__.formatDate)(paramValue, param.type, variable.dateFormatter);
204517
204527
  }
204518
204528
  if (lodash__WEBPACK_IMPORTED_MODULE_5___default().isArray(paramValue) && lodash__WEBPACK_IMPORTED_MODULE_5___default().toLower((0,
204519
204529
  _util_utils__WEBPACK_IMPORTED_MODULE_0__.extractType)(param.type)) === "string" && variable.serviceType === _constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.VARIABLE_CONSTANTS.SERVICE_TYPE.DATA) {
@@ -204543,7 +204553,7 @@ window.requestAnimationFrame = function() {
204543
204553
  case "BODY":
204544
204554
  if (isBodyTypeQueryProcedure) {
204545
204555
  setParamsOfChildNode();
204546
- bodyInfo = processRequestBody(paramValueInfo, params);
204556
+ bodyInfo = processRequestBody(paramValueInfo, params, variable);
204547
204557
  requestBody = bodyInfo.requestBody;
204548
204558
  requiredParamMissing = lodash__WEBPACK_IMPORTED_MODULE_5___default().concat(requiredParamMissing, bodyInfo.missingParams);
204549
204559
  } else {
@@ -204554,7 +204564,7 @@ window.requestAnimationFrame = function() {
204554
204564
  case "FORMDATA":
204555
204565
  if (isBodyTypeQueryProcedure && param.name === _constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.SWAGGER_CONSTANTS.WM_DATA_JSON) {
204556
204566
  setParamsOfChildNode();
204557
- bodyInfo = processRequestBody(paramValueInfo, params);
204567
+ bodyInfo = processRequestBody(paramValueInfo, params, variable);
204558
204568
  requestBody = getFormData(getFormDataObj(), param, bodyInfo.requestBody);
204559
204569
  requiredParamMissing = lodash__WEBPACK_IMPORTED_MODULE_5___default().concat(requiredParamMissing, bodyInfo.missingParams);
204560
204570
  } else {
@@ -205019,7 +205029,7 @@ window.requestAnimationFrame = function() {
205019
205029
  var getDateTimeFormatForType = function(type) {
205020
205030
  return _utils__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_FORMATS[lodash__WEBPACK_IMPORTED_MODULE_3___default().toUpper(type)];
205021
205031
  };
205022
- var _formatDate = function(dateValue, type) {
205032
+ var _formatDate = function(dateValue, type, dateFormatter) {
205023
205033
  var epoch;
205024
205034
  if (lodash__WEBPACK_IMPORTED_MODULE_3___default().isDate(dateValue)) {
205025
205035
  epoch = dateValue.getTime();
@@ -205038,18 +205048,18 @@ window.requestAnimationFrame = function() {
205038
205048
  if (type === _utils__WEBPACK_IMPORTED_MODULE_0__.DataType.TIME && !epoch) {
205039
205049
  epoch = moment__WEBPACK_IMPORTED_MODULE_2___default()((new Date).toDateString() + " " + dateValue).valueOf();
205040
205050
  }
205041
- return dateValue && appManager.getPipe("date").transform(epoch, getDateTimeFormatForType(type));
205051
+ return dateValue && dateFormatter.format(epoch, getDateTimeFormatForType(type));
205042
205052
  };
205043
- var formatDate = function(value, type) {
205053
+ var formatDate = function(value, type, dateFormatter) {
205044
205054
  if (lodash__WEBPACK_IMPORTED_MODULE_3___default().includes(type, ".")) {
205045
205055
  type = lodash__WEBPACK_IMPORTED_MODULE_3___default().toLower((0, _utils__WEBPACK_IMPORTED_MODULE_0__.extractType)(type));
205046
205056
  }
205047
205057
  if (lodash__WEBPACK_IMPORTED_MODULE_3___default().isArray(value)) {
205048
205058
  return lodash__WEBPACK_IMPORTED_MODULE_3___default().map(value, (function(val) {
205049
- return _formatDate(val, type);
205059
+ return _formatDate(val, type, dateFormatter);
205050
205060
  }));
205051
205061
  }
205052
- return _formatDate(value, type);
205062
+ return _formatDate(value, type, dateFormatter);
205053
205063
  };
205054
205064
  var parseErrors = function(errors) {
205055
205065
  var errMsg = "";
@@ -205694,6 +205704,7 @@ window.requestAnimationFrame = function() {
205694
205704
  var _src_types_http_client_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./src/types/http-client.service */ "./src/types/http-client.service.ts");
205695
205705
  var _src_util_variable_live_variable_http_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./src/util/variable/live-variable.http.utils */ "./src/util/variable/live-variable.http.utils.ts");
205696
205706
  var _src_util_variable_live_variable_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./src/util/variable/live-variable.utils */ "./src/util/variable/live-variable.utils.ts");
205707
+ var _src_types_date_formatter__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./src/types/date-formatter */ "./src/types/date-formatter.ts");
205697
205708
  var TEST = "hello from variables";
205698
205709
  })();
205699
205710
  return __webpack_exports__;