@wavemaker/app-ng-runtime 11.15.5-rc.267 → 11.15.5-rc.647813

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.
Files changed (69) hide show
  1. package/build-task/bundles/index.umd.js +1 -1
  2. package/build-task/esm2022/data/form/form-field/form-field.build.mjs +2 -2
  3. package/build-task/fesm2022/index.mjs +1 -1
  4. package/build-task/fesm2022/index.mjs.map +1 -1
  5. package/components/base/bundles/index.umd.js +4 -4
  6. package/components/base/esm2022/utils/widget-utils.mjs +5 -5
  7. package/components/base/fesm2022/index.mjs +5 -5
  8. package/components/base/fesm2022/index.mjs.map +1 -1
  9. package/components/containers/accordion/accordion-pane/accordion-pane.component.d.ts +0 -2
  10. package/components/containers/accordion/bundles/index.umd.js +0 -5
  11. package/components/containers/accordion/esm2022/accordion-pane/accordion-pane.component.mjs +1 -6
  12. package/components/containers/accordion/fesm2022/index.mjs +1 -6
  13. package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
  14. package/components/containers/tabs/bundles/index.umd.js +1 -1
  15. package/components/containers/tabs/esm2022/tabs.animator.mjs +2 -2
  16. package/components/containers/tabs/fesm2022/index.mjs +1 -1
  17. package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
  18. package/components/data/form/bundles/index.umd.js +11 -15
  19. package/components/data/form/esm2022/form-field/form-field.directive.mjs +12 -16
  20. package/components/data/form/fesm2022/index.mjs +11 -15
  21. package/components/data/form/fesm2022/index.mjs.map +1 -1
  22. package/components/data/form/form-field/form-field.directive.d.ts +1 -1
  23. package/components/data/pagination/bundles/index.umd.js +2 -2
  24. package/components/data/pagination/esm2022/pagination.component.mjs +3 -3
  25. package/components/data/pagination/fesm2022/index.mjs +2 -2
  26. package/components/data/pagination/fesm2022/index.mjs.map +1 -1
  27. package/components/data/table/bundles/index.umd.js +2 -13
  28. package/components/data/table/esm2022/table.component.mjs +3 -14
  29. package/components/data/table/fesm2022/index.mjs +2 -13
  30. package/components/data/table/fesm2022/index.mjs.map +1 -1
  31. package/components/dialogs/login-dialog/bundles/index.umd.js +1 -1
  32. package/components/dialogs/login-dialog/esm2022/login-dialog.directive.mjs +2 -2
  33. package/components/dialogs/login-dialog/fesm2022/index.mjs +1 -1
  34. package/components/dialogs/login-dialog/fesm2022/index.mjs.map +1 -1
  35. package/components/input/calendar/fesm2022/index.mjs +1 -1
  36. package/components/input/chips/fesm2022/index.mjs +1 -1
  37. package/components/input/dataset-aware-form/fesm2022/index.mjs +1 -1
  38. package/components/input/epoch/base-date-time/bundles/index.umd.js +1 -2
  39. package/components/input/epoch/base-date-time/esm2022/base-date-time.component.mjs +2 -3
  40. package/components/input/epoch/base-date-time/fesm2022/index.mjs +1 -2
  41. package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -1
  42. package/components/navigation/menu/fesm2022/index.mjs +1 -1
  43. package/core/bundles/index.umd.js +4 -0
  44. package/core/esm2022/utils/utils.mjs +5 -1
  45. package/core/fesm2022/index.mjs +4 -0
  46. package/core/fesm2022/index.mjs.map +1 -1
  47. package/npm-shrinkwrap.json +2 -2
  48. package/package-lock.json +2 -2
  49. package/package.json +1 -1
  50. package/runtime/base/bundles/index.umd.js +1 -1
  51. package/runtime/base/esm2022/services/app.manager.service.mjs +2 -2
  52. package/runtime/base/fesm2022/index.mjs +1 -1
  53. package/runtime/base/fesm2022/index.mjs.map +1 -1
  54. package/runtime/dynamic/fesm2022/index.mjs +2 -2
  55. package/scripts/datatable/datatable.js +1 -14
  56. package/transpiler/bundles/index.umd.js +2 -2
  57. package/transpiler/esm2022/build.mjs +3 -3
  58. package/transpiler/fesm2022/index.mjs +2 -2
  59. package/transpiler/fesm2022/index.mjs.map +1 -1
  60. package/variables/bundles/index.umd.js +17 -98
  61. package/variables/esm2022/constants/variables.constants.mjs +6 -6
  62. package/variables/esm2022/factory/variable-manager.factory.mjs +5 -5
  63. package/variables/esm2022/service/variables.service.mjs +4 -16
  64. package/variables/esm2022/util/variable/service-variable.utils.mjs +7 -25
  65. package/variables/esm2022/util/variable/variables.utils.mjs +2 -52
  66. package/variables/fesm2022/index.mjs +18 -99
  67. package/variables/fesm2022/index.mjs.map +1 -1
  68. package/variables/service/variables.service.d.ts +1 -2
  69. package/variables/util/variable/variables.utils.d.ts +0 -7
@@ -1,7 +1,7 @@
1
1
  import { $rootScope as $rootScope$1, BaseAction, ApiAwareVariable, VARIABLE_CONSTANTS as VARIABLE_CONSTANTS$1, TimerAction, CrudVariable, LiveVariable, ServiceVariable, ModelVariable, wmSetDependency, getTarget, getTargetNodeKey as getTargetNodeKey$1, setValueToNode as setValueToNode$1, internalBoundNodeMap as internalBoundNodeMap$1 } from '@wavemaker/variables';
2
2
  import * as i1 from '@wm/core';
3
3
  import { $parseEvent, triggerFn, findValueOf, stringStartsWith, getClonedObject, $watch, getBlob, DEFAULT_FORMATS, DataType, extractType, getWmProjectProperties, getValidJSON, isDateTimeType, isDefined, replace as replace$1, xmlToJson, isInsecureContentRequest, isObject as isObject$1, DataSource, _WM_APP_PROJECT, $invokeWatchers, processFilterExpBindNode } from '@wm/core';
4
- import { noop, debounce, isUndefined, isFunction, forEach, isString, split, join, slice, get, pickBy, isEmpty, includes, toUpper, last, replace, isArray, keys, filter, set, isObject, isNumber, map, trim, remove, isDate, toLower, clone, isNil, capitalize, extend, isBoolean, each, startsWith, find, result, concat, isNull, reject } from 'lodash-es';
4
+ import { noop, debounce, isUndefined, isFunction, forEach, isString, split, join, slice, get, pickBy, isEmpty, includes, toUpper, last, replace, keys, filter, set, isObject, isArray, isNumber, map, trim, remove, isDate, toLower, clone, isNil, capitalize, extend, isBoolean, each, startsWith, find, result, concat, isNull, reject } from 'lodash-es';
5
5
  import * as momentLib from 'moment';
6
6
  import { $WebSocket } from 'angular2-websocket/angular2-websocket';
7
7
  import { jmespath } from '@metrichor/jmespath';
@@ -25,11 +25,11 @@ const VARIABLE_CONSTANTS = {
25
25
  CRUD: 'wm.CrudVariable',
26
26
  SERVICE: 'wm.ServiceVariable',
27
27
  WEBSOCKET: 'wm.WebSocketVariable',
28
- NAVIGATION: 'wm.NavigationAction',
29
- NOTIFICATION: 'wm.NotificationAction',
30
- TIMER: 'wm.TimerAction',
31
- LOGIN: 'wm.LoginAction',
32
- LOGOUT: 'wm.LogoutAction',
28
+ NAVIGATION: 'wm.NavigationVariable',
29
+ NOTIFICATION: 'wm.NotificationVariable',
30
+ TIMER: 'wm.TimerVariable',
31
+ LOGIN: 'wm.LoginVariable',
32
+ LOGOUT: 'wm.LogoutVariable',
33
33
  },
34
34
  EVENTS: ['onBefore',
35
35
  'onBeforeUpdate',
@@ -811,28 +811,7 @@ const setValueToNode = (target, obj, root, variable, value, noUpdate) => {
811
811
  value = !isUndefined(value) ? value : obj.value;
812
812
  /* sanity check, user can bind parent nodes to non-object values, so child node bindings may fail */
813
813
  if (targetObj) {
814
- // Multi query params: one slot per binding; rebinds replace that slot (not append).
815
- // Exception: if the bind expression itself resolved to the complete array
816
- // (e.g. `bind:['fire', 'water']`), assign it directly instead of treating it
817
- // as a single slot's value — same as the non-multi assignment below.
818
- if (obj.collectionFormat === 'multi' && !isArray(value)) {
819
- let values = targetObj[targetNodeKey];
820
- if (!isArray(values)) {
821
- values = targetObj[targetNodeKey] = isUndefined(values) ? [] : [values];
822
- }
823
- let slot = obj.multiIndex !== undefined ? obj.multiIndex : obj.__multiSlotIndex;
824
- if (slot === undefined) {
825
- slot = obj.__multiSlotIndex = values.length;
826
- values.push(value);
827
- }
828
- else {
829
- obj.__multiSlotIndex = slot;
830
- values[slot] = value;
831
- }
832
- }
833
- else {
834
- targetObj[targetNodeKey] = value;
835
- }
814
+ targetObj[targetNodeKey] = value;
836
815
  }
837
816
  processVariablePostBindUpdate(targetNodeKey, value, obj.type, variable, noUpdate);
838
817
  };
@@ -941,32 +920,6 @@ const processBindObject = (obj, scope, root, variable) => {
941
920
  * for some it can be 'dataSet' and hence will be passed as param
942
921
  * @param {string} bindTarget, the object field in variable where the computed bindings will be set
943
922
  */
944
- /**
945
- * In older saved REST/Swagger service variables, duplicate query parameters may not have a
946
- * collectionFormat, so they are treated as multi-value parameters for backward compatibility:
947
- * each duplicate target is tagged collectionFormat 'multi' and given a stable multiIndex.
948
- * Shared by both processBinding implementations (this file and VariablesService).
949
- */
950
- const applyMultiIndexForDuplicateBindings = (bindMap) => {
951
- const targetOccurrences = {};
952
- bindMap.forEach(function (node) {
953
- if (node && node.target) {
954
- targetOccurrences[node.target] = (targetOccurrences[node.target] || 0) + 1;
955
- }
956
- });
957
- const nextMultiIndex = {};
958
- bindMap.forEach(function (node) {
959
- if (node && node.target && targetOccurrences[node.target] > 1) {
960
- if (!node.collectionFormat) {
961
- node.collectionFormat = 'multi';
962
- }
963
- if (node.multiIndex === undefined) {
964
- nextMultiIndex[node.target] = nextMultiIndex[node.target] || 0;
965
- node.multiIndex = nextMultiIndex[node.target]++;
966
- }
967
- }
968
- });
969
- };
970
923
  const processBinding = (variable, context, bindSource, bindTarget) => {
971
924
  bindSource = bindSource || 'dataBinding';
972
925
  bindTarget = bindTarget || 'dataBinding';
@@ -976,9 +929,6 @@ const processBinding = (variable, context, bindSource, bindTarget) => {
976
929
  if (!bindMap || !isArray(bindMap)) {
977
930
  return;
978
931
  }
979
- if (variable.category === VARIABLE_CONSTANTS.CATEGORY.SERVICE) {
980
- applyMultiIndexForDuplicateBindings(bindMap);
981
- }
982
932
  bindMap.forEach(function (node) {
983
933
  /* for static variable change the binding with target 'dataBinding' to 'dataSet', as the results have to reflect directly in the dataSet */
984
934
  if (variable.category === 'wm.Variable' && node.target === 'dataBinding') {
@@ -2160,24 +2110,6 @@ class PaginationUtils {
2160
2110
  const isBodyTypeQueryOrProcedure = (variable) => {
2161
2111
  return (includes(['QueryExecution', 'ProcedureExecution'], variable.controller)) && (includes(['put', 'post'], variable.operationType));
2162
2112
  };
2163
- const appendQueryParam = (queryParams, paramName, paramValue, preEncoded = false) => {
2164
- const encodedValue = preEncoded ? paramValue : encodeURIComponent(paramValue);
2165
- const pair = `${paramName}=${encodedValue}`;
2166
- return queryParams ? `${queryParams}&${pair}` : `?${pair}`;
2167
- };
2168
- const getQueryParamValues = (param, paramValue) => {
2169
- if (isArray(paramValue)) {
2170
- // 'multi' (duplicate query-param bindings) repeats the param, e.g. tag=a&tag=b.
2171
- if (param.collectionFormat === 'multi') {
2172
- return map(paramValue, (value) => ({ value, preEncoded: false }));
2173
- }
2174
- // Otherwise, join into a single comma-separated value, e.g. tag=a,b. Encode each
2175
- // element individually so the joining commas stay literal (unambiguously the
2176
- // separator) while a comma inside an element's own value stays escaped as %2C.
2177
- return [{ value: map(paramValue, (value) => encodeURIComponent(value)).join(','), preEncoded: true }];
2178
- }
2179
- return [{ value: paramValue, preEncoded: false }];
2180
- };
2181
2113
  /**
2182
2114
  * returns true if the variable is a Query service variable
2183
2115
  * @param {string} controller
@@ -2395,12 +2327,12 @@ class ServiceVariableUtils {
2395
2327
  if (isNull(paramValue) && isQueryServiceVar(variable.controller, variable.serviceType)) {
2396
2328
  break;
2397
2329
  }
2398
- getQueryParamValues(param, paramValue).forEach(({ value: queryValue, preEncoded }) => {
2399
- if (isNull(queryValue) && isQueryServiceVar(variable.controller, variable.serviceType)) {
2400
- return;
2401
- }
2402
- queryParams = appendQueryParam(queryParams, param.name, queryValue, preEncoded);
2403
- });
2330
+ if (!queryParams) {
2331
+ queryParams = '?' + param.name + '=' + encodeURIComponent(paramValue);
2332
+ }
2333
+ else {
2334
+ queryParams += '&' + param.name + '=' + encodeURIComponent(paramValue);
2335
+ }
2404
2336
  break;
2405
2337
  case 'PATH':
2406
2338
  /* replacing the path param based on the regular expression in the relative path */
@@ -2822,10 +2754,10 @@ class WebSocketVariableManager extends BaseVariableManager {
2822
2754
  const managerMap = new Map(), typeToManagerMap = {
2823
2755
  'Variable': BaseVariableManager,
2824
2756
  'Action': BaseActionManager,
2825
- 'wm.NavigationAction': NavigationActionManager,
2826
- 'wm.NotificationAction': NotificationActionManager,
2827
- 'wm.LoginAction': LoginActionManager,
2828
- 'wm.LogoutAction': LogoutActionManager,
2757
+ 'wm.NavigationVariable': NavigationActionManager,
2758
+ 'wm.NotificationVariable': NotificationActionManager,
2759
+ 'wm.LoginVariable': LoginActionManager,
2760
+ 'wm.LogoutVariable': LogoutActionManager,
2829
2761
  'wm.WebSocketVariable': WebSocketVariableManager
2830
2762
  };
2831
2763
  class VariableManagerFactory {
@@ -3189,15 +3121,6 @@ class VariablesService {
3189
3121
  value: v
3190
3122
  };
3191
3123
  }
3192
- processSpinnerMessageBinding(variable, scope) {
3193
- if (!variable.spinnerMessage?.startsWith?.('bind:')) {
3194
- return;
3195
- }
3196
- const expr = variable.spinnerMessage.replace('bind:', '');
3197
- variable.spinnerMessage = '';
3198
- const watchExpression = $watch(expr, scope, {}, nv => variable.spinnerMessage = nv ?? '');
3199
- scope.registerDestroyListener?.(watchExpression);
3200
- }
3201
3124
  processBinding(variable, context, bindSource, bindTarget) {
3202
3125
  bindSource = bindSource || 'dataBinding';
3203
3126
  bindTarget = bindTarget || 'dataBinding';
@@ -3207,9 +3130,6 @@ class VariablesService {
3207
3130
  if (!bindMap || !isArray(bindMap)) {
3208
3131
  return;
3209
3132
  }
3210
- if (variable.category === VARIABLE_CONSTANTS.CATEGORY.SERVICE) {
3211
- applyMultiIndexForDuplicateBindings(bindMap);
3212
- }
3213
3133
  bindMap.forEach((node) => {
3214
3134
  /* for static variable change the binding with target 'dataBinding' to 'dataSet', as the results have to reflect directly in the dataSet */
3215
3135
  if (variable.category === 'wm.Variable' && node.target === 'dataBinding') {
@@ -3253,7 +3173,6 @@ class VariablesService {
3253
3173
  const params = {};
3254
3174
  varInstance = VariableFactory.create(variablesJson[variableName], scope);
3255
3175
  varInstance.init();
3256
- this.processSpinnerMessageBinding(varInstance, scope);
3257
3176
  if (this.isVariableSeperated(variablesJson, variableName)) {
3258
3177
  this.processBinding(varInstance, scope, 'dataBinding', this.getBindSourceTarget(varInstance));
3259
3178
  varInstance.httpService = this.httpService;
@@ -3272,7 +3191,7 @@ class VariablesService {
3272
3191
  varInstance.simulateFileDownload = simulateFileDownload;
3273
3192
  }
3274
3193
  }
3275
- if (this.isVariableSeperated(variablesJson, variableName) || variablesJson[variableName].category === 'wm.TimerAction') {
3194
+ if (this.isVariableSeperated(variablesJson, variableName) || variablesJson[variableName].category === 'wm.TimerVariable') {
3276
3195
  for (const e in VARIABLE_CONSTANTS.EVENT) {
3277
3196
  if (varInstance[VARIABLE_CONSTANTS.EVENT[e]]) {
3278
3197
  varInstance[VARIABLE_CONSTANTS.EVENT[e]] = $parseEvent(varInstance[VARIABLE_CONSTANTS.EVENT[e]]);