@wavemaker-ai/app-ng-runtime 12.1.1-rc.352 → 12.1.2-rc.353
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/build-task/bundles/index.umd.js +153 -139
- package/build-task/fesm2022/index.mjs +154 -141
- package/build-task/fesm2022/index.mjs.map +1 -1
- package/build-task/types/index-rolldown-runtime-C25Le4-w.d.ts +1 -0
- package/build-task/types/index.d.ts +41 -37
- package/components/base/bundles/index.umd.js +16 -9
- package/components/base/fesm2022/index.mjs +18 -11
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/basic/audio/bundles/index.umd.js +2 -8
- package/components/basic/audio/fesm2022/index.mjs +3 -9
- package/components/basic/audio/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/bundles/index.umd.js +101 -65
- package/components/containers/wizard/fesm2022/index.mjs +99 -62
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/types/index.d.ts +79 -5
- package/components/containers/wizardstepper/bundles/index.umd.js +237 -0
- package/components/containers/wizardstepper/fesm2022/index.mjs +215 -0
- package/components/containers/wizardstepper/fesm2022/index.mjs.map +1 -0
- package/components/containers/wizardstepper/package.json +19 -0
- package/components/containers/wizardstepper/types/index.d.ts +71 -0
- package/components/data/list/bundles/index.umd.js +4 -0
- package/components/data/list/fesm2022/index.mjs +4 -0
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/types/index.d.ts +1 -0
- package/components/data/pagination/bundles/index.umd.js +26 -8
- package/components/data/pagination/fesm2022/index.mjs +24 -5
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/types/index.d.ts +5 -3
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/core/bundles/index.umd.js +20 -14
- package/core/fesm2022/index.mjs +23 -17
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/types/index.d.ts +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +20 -15
- package/runtime/base/fesm2022/index.mjs +52 -46
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/types/index.d.ts +23 -21
- package/runtime/dynamic/bundles/index.umd.js +6 -1
- package/runtime/dynamic/fesm2022/index.mjs +6 -1
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/variables/bundles/index.umd.js +13 -13
- package/variables/fesm2022/index.mjs +18 -18
- package/variables/fesm2022/index.mjs.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $rootScope as $rootScope$1, ApiAwareVariable, BaseAction, CrudVariable, LiveVariable, ModelVariable, ServiceVariable, TimerAction, VARIABLE_CONSTANTS as VARIABLE_CONSTANTS$1, getTarget, getTargetNodeKey, internalBoundNodeMap, setValueToNode, wmSetDependency } from "@wavemaker-ai/variables";
|
|
1
|
+
import { $rootScope as $rootScope$1, ApiAwareVariable, BaseAction, CrudVariable, LiveVariable, ModelVariable, ServiceVariable, TimerAction, VARIABLE_CONSTANTS as VARIABLE_CONSTANTS$1, getTarget, getTargetNodeKey as getTargetNodeKey$1, internalBoundNodeMap as internalBoundNodeMap$1, setValueToNode as setValueToNode$1, wmSetDependency } from "@wavemaker-ai/variables";
|
|
2
2
|
import * as i1 from "@wm/core";
|
|
3
3
|
import { $invokeWatchers, $parseEvent, $watch, DEFAULT_FORMATS, DataSource, DataType, _WM_APP_PROJECT, extractType, findValueOf, getBlob, getClonedObject, getValidJSON, getWmProjectProperties, isDateTimeType, isDefined, isInsecureContentRequest, isObject, processFilterExpBindNode, replace, stringStartsWith, triggerFn, xmlToJson } from "@wm/core";
|
|
4
4
|
import { capitalize, clone, concat, debounce, each, extend, filter, find, forEach, get, includes, isArray, isBoolean, isDate, isEmpty, isFunction, isNil, isNull, isNumber, isObject as isObject$1, isString, isUndefined, join, keys, map, noop, pickBy, reject, remove, result, set, slice, split, startsWith, toLower, toUpper, trim } from "lodash-es";
|
|
@@ -393,7 +393,7 @@ let oauthService;
|
|
|
393
393
|
let securityService;
|
|
394
394
|
let dialogService;
|
|
395
395
|
const DOT_EXPR_REX = /^\[("|')[\w\W]*(\1)\]$/;
|
|
396
|
-
const internalBoundNodeMap
|
|
396
|
+
const internalBoundNodeMap = /* @__PURE__ */ new Map();
|
|
397
397
|
const timers = /* @__PURE__ */ new Map();
|
|
398
398
|
const _invoke = (variable, op) => {
|
|
399
399
|
let debouncedFn, cancelFn = noop, retVal;
|
|
@@ -641,7 +641,7 @@ const getTargetObj = (obj, root, variable) => {
|
|
|
641
641
|
}
|
|
642
642
|
return targetObj;
|
|
643
643
|
};
|
|
644
|
-
const getTargetNodeKey
|
|
644
|
+
const getTargetNodeKey = (target) => {
|
|
645
645
|
let targetNodeKey;
|
|
646
646
|
if (DOT_EXPR_REX.test(target)) targetNodeKey = target.replace(/(^\[["'])|(["']\]$)/g, "");
|
|
647
647
|
else targetNodeKey = target.split(".").pop();
|
|
@@ -659,8 +659,8 @@ const applyMultiSlotValue = (targetObj, targetNodeKey, obj, value) => {
|
|
|
659
659
|
values[slot] = value;
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
|
-
const setValueToNode
|
|
663
|
-
const targetNodeKey = getTargetNodeKey
|
|
662
|
+
const setValueToNode = (target, obj, root, variable, value, noUpdate) => {
|
|
663
|
+
const targetNodeKey = getTargetNodeKey(target), targetObj = getTargetObj(obj, root, variable);
|
|
664
664
|
if (targetObj) {
|
|
665
665
|
if (obj.collectionFormat === "multi" && !isArray(value)) applyMultiSlotValue(targetObj, targetNodeKey, obj, value);
|
|
666
666
|
else targetObj[targetNodeKey] = value;
|
|
@@ -668,7 +668,7 @@ const setValueToNode$1 = (target, obj, root, variable, value, noUpdate) => {
|
|
|
668
668
|
processVariablePostBindUpdate(targetNodeKey, value, obj.type, variable, noUpdate);
|
|
669
669
|
};
|
|
670
670
|
const updateInternalNodes = (target, root, variable) => {
|
|
671
|
-
const boundInternalNodes = keys(get(internalBoundNodeMap
|
|
671
|
+
const boundInternalNodes = keys(get(internalBoundNodeMap.get(variable), [variable.name, root])), targetNodeKey = getTargetNodeKey(target);
|
|
672
672
|
let internalNodes;
|
|
673
673
|
function findInternalNodeBound() {
|
|
674
674
|
return filter(boundInternalNodes, function(node) {
|
|
@@ -677,7 +677,7 @@ const updateInternalNodes = (target, root, variable) => {
|
|
|
677
677
|
}
|
|
678
678
|
internalNodes = findInternalNodeBound();
|
|
679
679
|
if (internalNodes.length) forEach(internalNodes, function(node) {
|
|
680
|
-
setValueToNode
|
|
680
|
+
setValueToNode(node, { target: node }, root, variable, get(internalBoundNodeMap.get(variable), [
|
|
681
681
|
variable.name,
|
|
682
682
|
root,
|
|
683
683
|
node
|
|
@@ -685,16 +685,16 @@ const updateInternalNodes = (target, root, variable) => {
|
|
|
685
685
|
});
|
|
686
686
|
};
|
|
687
687
|
const processBindObject = (obj, scope, root, variable) => {
|
|
688
|
-
const target = obj.target, targetNodeKey = getTargetNodeKey
|
|
688
|
+
const target = obj.target, targetNodeKey = getTargetNodeKey(target);
|
|
689
689
|
getTargetObj(obj, root, variable);
|
|
690
690
|
const destroyFn = scope.registerDestroyListener ? scope.registerDestroyListener.bind(scope) : noop;
|
|
691
691
|
if (stringStartsWith(obj.value, "bind:")) {
|
|
692
692
|
const listener = (newVal, oldVal) => {
|
|
693
693
|
if (newVal === oldVal && isUndefined(newVal) || isUndefined(newVal) && !isUndefined(oldVal)) return;
|
|
694
694
|
if (!includes(["blob", "file"], obj.type)) newVal = getClonedObject(newVal);
|
|
695
|
-
setValueToNode
|
|
696
|
-
if (!internalBoundNodeMap
|
|
697
|
-
set(internalBoundNodeMap
|
|
695
|
+
setValueToNode(target, obj, root, variable, newVal);
|
|
696
|
+
if (!internalBoundNodeMap.has(variable)) internalBoundNodeMap.set(variable, {});
|
|
697
|
+
set(internalBoundNodeMap.get(variable), [
|
|
698
698
|
variable.name,
|
|
699
699
|
root,
|
|
700
700
|
target
|
|
@@ -703,10 +703,10 @@ const processBindObject = (obj, scope, root, variable) => {
|
|
|
703
703
|
};
|
|
704
704
|
destroyFn($watch(obj.value.replace("bind:", ""), scope, {}, listener, void 0, void 0, void 0, () => variable.isMuted));
|
|
705
705
|
} else if (!isUndefined(obj.value)) {
|
|
706
|
-
setValueToNode
|
|
706
|
+
setValueToNode(target, obj, root, variable, obj.value, true);
|
|
707
707
|
if (root !== targetNodeKey) {
|
|
708
|
-
if (!internalBoundNodeMap
|
|
709
|
-
set(internalBoundNodeMap
|
|
708
|
+
if (!internalBoundNodeMap.has(variable)) internalBoundNodeMap.set(variable, {});
|
|
709
|
+
set(internalBoundNodeMap.get(variable), [
|
|
710
710
|
variable.name,
|
|
711
711
|
root,
|
|
712
712
|
target
|
|
@@ -2056,17 +2056,17 @@ var VariablesService = class VariablesService {
|
|
|
2056
2056
|
return Promise.all(Object.keys(collection).map((name) => collection[name]).filter((variable) => variable?.startUpdate && variable.invoke).map((variable) => variable.invoke()));
|
|
2057
2057
|
}
|
|
2058
2058
|
processBindExp(d, scope, variable) {
|
|
2059
|
-
const root = getTarget(variable), targetNodeKey = getTargetNodeKey(d.target);
|
|
2059
|
+
const root = getTarget(variable), targetNodeKey = getTargetNodeKey$1(d.target);
|
|
2060
2060
|
let v = isArray(d.value) ? d.value[0] : d.value;
|
|
2061
2061
|
if (v) {
|
|
2062
2062
|
if (v.startsWith?.("bind:")) {
|
|
2063
2063
|
const watchExpression = $watch(v.replace("bind:", ""), scope, {}, variable.invokeOnParamChange.bind(variable, d), void 0, void 0, d, () => variable.isMuted);
|
|
2064
2064
|
v = scope.registerDestroyListener ? scope.registerDestroyListener(watchExpression) : watchExpression;
|
|
2065
2065
|
} else {
|
|
2066
|
-
setValueToNode(d.target, d, root, variable, d.value, true);
|
|
2066
|
+
setValueToNode$1(d.target, d, root, variable, d.value, true);
|
|
2067
2067
|
if (root !== targetNodeKey) {
|
|
2068
|
-
if (!internalBoundNodeMap.has(variable)) internalBoundNodeMap.set(variable, {});
|
|
2069
|
-
set(internalBoundNodeMap.get(variable), [
|
|
2068
|
+
if (!internalBoundNodeMap$1.has(variable)) internalBoundNodeMap$1.set(variable, {});
|
|
2069
|
+
set(internalBoundNodeMap$1.get(variable), [
|
|
2070
2070
|
variable.name,
|
|
2071
2071
|
root,
|
|
2072
2072
|
d.target
|