@yklyklpackages/message-card 0.8.0 → 0.9.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.
- package/dist/components/action/ActionContext.d.ts.map +1 -1
- package/dist/components/action/dispatcher.d.ts +4 -1
- package/dist/components/action/dispatcher.d.ts.map +1 -1
- package/dist/components/action/handlers.d.ts +1 -0
- package/dist/components/action/handlers.d.ts.map +1 -1
- package/dist/components/action/types.d.ts +9 -0
- package/dist/components/action/types.d.ts.map +1 -1
- package/dist/components/layout/MultipleColumnLayout.d.ts.map +1 -1
- package/dist/components/message/MessageContainer.d.ts.map +1 -1
- package/dist/components/render/CustomRenderFromProps.d.ts.map +1 -1
- package/dist/components/types/component.d.ts +2 -1
- package/dist/components/types/component.d.ts.map +1 -1
- package/dist/components/utils/styleHelpers.d.ts.map +1 -1
- package/dist/index.cjs +208 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +208 -125
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +204 -121
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -2982,7 +2982,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2982
2982
|
var ys = arrObjKeys(obj, inspect2);
|
|
2983
2983
|
var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
2984
2984
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
2985
|
-
var stringTag = !isPlainObject2 && toStringTag$1 && Object(obj) === obj && toStringTag$1 in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
2985
|
+
var stringTag = !isPlainObject2 && toStringTag$1 && Object(obj) === obj && toStringTag$1 in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
|
|
2986
2986
|
var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
2987
2987
|
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
2988
2988
|
if (ys.length === 0) {
|
|
@@ -3007,25 +3007,25 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3007
3007
|
return !toStringTag$1 || !(typeof obj === "object" && (toStringTag$1 in obj || typeof obj[toStringTag$1] !== "undefined"));
|
|
3008
3008
|
}
|
|
3009
3009
|
function isArray$4(obj) {
|
|
3010
|
-
return toStr(obj) === "[object Array]" && canTrustToString(obj);
|
|
3010
|
+
return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
|
|
3011
3011
|
}
|
|
3012
3012
|
function isDate$1(obj) {
|
|
3013
|
-
return toStr(obj) === "[object Date]" && canTrustToString(obj);
|
|
3013
|
+
return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
|
|
3014
3014
|
}
|
|
3015
3015
|
function isRegExp$2(obj) {
|
|
3016
|
-
return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
3016
|
+
return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
3017
3017
|
}
|
|
3018
3018
|
function isError(obj) {
|
|
3019
|
-
return toStr(obj) === "[object Error]" && canTrustToString(obj);
|
|
3019
|
+
return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
|
|
3020
3020
|
}
|
|
3021
3021
|
function isString$1(obj) {
|
|
3022
|
-
return toStr(obj) === "[object String]" && canTrustToString(obj);
|
|
3022
|
+
return toStr$1(obj) === "[object String]" && canTrustToString(obj);
|
|
3023
3023
|
}
|
|
3024
3024
|
function isNumber$1(obj) {
|
|
3025
|
-
return toStr(obj) === "[object Number]" && canTrustToString(obj);
|
|
3025
|
+
return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
|
|
3026
3026
|
}
|
|
3027
3027
|
function isBoolean$1(obj) {
|
|
3028
|
-
return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
3028
|
+
return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
3029
3029
|
}
|
|
3030
3030
|
function isSymbol(obj) {
|
|
3031
3031
|
if (hasShammedSymbols) {
|
|
@@ -3061,7 +3061,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3061
3061
|
function has$3(obj, key) {
|
|
3062
3062
|
return hasOwn$1.call(obj, key);
|
|
3063
3063
|
}
|
|
3064
|
-
function toStr(obj) {
|
|
3064
|
+
function toStr$1(obj) {
|
|
3065
3065
|
return objectToString.call(obj);
|
|
3066
3066
|
}
|
|
3067
3067
|
function nameOf(f) {
|
|
@@ -3370,7 +3370,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3370
3370
|
var uri = URIError;
|
|
3371
3371
|
var abs$1 = Math.abs;
|
|
3372
3372
|
var floor$1 = Math.floor;
|
|
3373
|
-
var max$
|
|
3373
|
+
var max$2 = Math.max;
|
|
3374
3374
|
var min$1 = Math.min;
|
|
3375
3375
|
var pow$1 = Math.pow;
|
|
3376
3376
|
var round$1 = Math.round;
|
|
@@ -3499,99 +3499,78 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3499
3499
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
3500
3500
|
return Object_getPrototypeOf;
|
|
3501
3501
|
}
|
|
3502
|
-
var
|
|
3503
|
-
var
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
var
|
|
3508
|
-
var
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
var
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
}
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
var str = "";
|
|
3530
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
3531
|
-
str += arr[i];
|
|
3532
|
-
if (i + 1 < arr.length) {
|
|
3533
|
-
str += joiner;
|
|
3534
|
-
}
|
|
3502
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
3503
|
+
var toStr = Object.prototype.toString;
|
|
3504
|
+
var max$1 = Math.max;
|
|
3505
|
+
var funcType = "[object Function]";
|
|
3506
|
+
var concatty = function concatty2(a, b2) {
|
|
3507
|
+
var arr = [];
|
|
3508
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
3509
|
+
arr[i] = a[i];
|
|
3510
|
+
}
|
|
3511
|
+
for (var j2 = 0; j2 < b2.length; j2 += 1) {
|
|
3512
|
+
arr[j2 + a.length] = b2[j2];
|
|
3513
|
+
}
|
|
3514
|
+
return arr;
|
|
3515
|
+
};
|
|
3516
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
3517
|
+
var arr = [];
|
|
3518
|
+
for (var i = offset, j2 = 0; i < arrLike.length; i += 1, j2 += 1) {
|
|
3519
|
+
arr[j2] = arrLike[i];
|
|
3520
|
+
}
|
|
3521
|
+
return arr;
|
|
3522
|
+
};
|
|
3523
|
+
var joiny = function(arr, joiner) {
|
|
3524
|
+
var str = "";
|
|
3525
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
3526
|
+
str += arr[i];
|
|
3527
|
+
if (i + 1 < arr.length) {
|
|
3528
|
+
str += joiner;
|
|
3535
3529
|
}
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
);
|
|
3551
|
-
if (Object(result) === result) {
|
|
3552
|
-
return result;
|
|
3553
|
-
}
|
|
3554
|
-
return this;
|
|
3555
|
-
}
|
|
3556
|
-
return target.apply(
|
|
3557
|
-
that,
|
|
3530
|
+
}
|
|
3531
|
+
return str;
|
|
3532
|
+
};
|
|
3533
|
+
var implementation$1 = function bind2(that) {
|
|
3534
|
+
var target = this;
|
|
3535
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
3536
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
3537
|
+
}
|
|
3538
|
+
var args = slicy(arguments, 1);
|
|
3539
|
+
var bound;
|
|
3540
|
+
var binder = function() {
|
|
3541
|
+
if (this instanceof bound) {
|
|
3542
|
+
var result = target.apply(
|
|
3543
|
+
this,
|
|
3558
3544
|
concatty(args, arguments)
|
|
3559
3545
|
);
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
boundArgs[i] = "$" + i;
|
|
3565
|
-
}
|
|
3566
|
-
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
3567
|
-
if (target.prototype) {
|
|
3568
|
-
var Empty = function Empty2() {
|
|
3569
|
-
};
|
|
3570
|
-
Empty.prototype = target.prototype;
|
|
3571
|
-
bound.prototype = new Empty();
|
|
3572
|
-
Empty.prototype = null;
|
|
3546
|
+
if (Object(result) === result) {
|
|
3547
|
+
return result;
|
|
3548
|
+
}
|
|
3549
|
+
return this;
|
|
3573
3550
|
}
|
|
3574
|
-
return
|
|
3551
|
+
return target.apply(
|
|
3552
|
+
that,
|
|
3553
|
+
concatty(args, arguments)
|
|
3554
|
+
);
|
|
3575
3555
|
};
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
}
|
|
3556
|
+
var boundLength = max$1(0, target.length - args.length);
|
|
3557
|
+
var boundArgs = [];
|
|
3558
|
+
for (var i = 0; i < boundLength; i++) {
|
|
3559
|
+
boundArgs[i] = "$" + i;
|
|
3560
|
+
}
|
|
3561
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
3562
|
+
if (target.prototype) {
|
|
3563
|
+
var Empty = function Empty2() {
|
|
3564
|
+
};
|
|
3565
|
+
Empty.prototype = target.prototype;
|
|
3566
|
+
bound.prototype = new Empty();
|
|
3567
|
+
Empty.prototype = null;
|
|
3568
|
+
}
|
|
3569
|
+
return bound;
|
|
3570
|
+
};
|
|
3571
|
+
var implementation = implementation$1;
|
|
3572
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
3573
|
+
var functionCall = Function.prototype.call;
|
|
3595
3574
|
var functionApply;
|
|
3596
3575
|
var hasRequiredFunctionApply;
|
|
3597
3576
|
function requireFunctionApply() {
|
|
@@ -3601,14 +3580,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3601
3580
|
return functionApply;
|
|
3602
3581
|
}
|
|
3603
3582
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
3604
|
-
var bind$3 =
|
|
3583
|
+
var bind$3 = functionBind;
|
|
3605
3584
|
var $apply$1 = requireFunctionApply();
|
|
3606
|
-
var $call$2 =
|
|
3585
|
+
var $call$2 = functionCall;
|
|
3607
3586
|
var $reflectApply = reflectApply;
|
|
3608
3587
|
var actualApply = $reflectApply || bind$3.call($call$2, $apply$1);
|
|
3609
|
-
var bind$2 =
|
|
3588
|
+
var bind$2 = functionBind;
|
|
3610
3589
|
var $TypeError$4 = type;
|
|
3611
|
-
var $call$1 =
|
|
3590
|
+
var $call$1 = functionCall;
|
|
3612
3591
|
var $actualApply = actualApply;
|
|
3613
3592
|
var callBindApplyHelpers = function callBindBasic2(args) {
|
|
3614
3593
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -3674,7 +3653,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3674
3653
|
hasRequiredHasown = 1;
|
|
3675
3654
|
var call = Function.prototype.call;
|
|
3676
3655
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
3677
|
-
var bind2 =
|
|
3656
|
+
var bind2 = functionBind;
|
|
3678
3657
|
hasown = bind2.call(call, $hasOwn);
|
|
3679
3658
|
return hasown;
|
|
3680
3659
|
}
|
|
@@ -3689,7 +3668,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3689
3668
|
var $URIError = uri;
|
|
3690
3669
|
var abs = abs$1;
|
|
3691
3670
|
var floor = floor$1;
|
|
3692
|
-
var max = max$
|
|
3671
|
+
var max = max$2;
|
|
3693
3672
|
var min = min$1;
|
|
3694
3673
|
var pow = pow$1;
|
|
3695
3674
|
var round = round$1;
|
|
@@ -3723,7 +3702,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3723
3702
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
3724
3703
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
3725
3704
|
var $apply = requireFunctionApply();
|
|
3726
|
-
var $call =
|
|
3705
|
+
var $call = functionCall;
|
|
3727
3706
|
var needsEval = {};
|
|
3728
3707
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
3729
3708
|
var INTRINSICS = {
|
|
@@ -3894,7 +3873,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3894
3873
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3895
3874
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3896
3875
|
};
|
|
3897
|
-
var bind$1 =
|
|
3876
|
+
var bind$1 = functionBind;
|
|
3898
3877
|
var hasOwn = requireHasown();
|
|
3899
3878
|
var $concat = bind$1.call($call, Array.prototype.concat);
|
|
3900
3879
|
var $spliceApply = bind$1.call($apply, Array.prototype.splice);
|
|
@@ -5153,9 +5132,89 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5153
5132
|
return __spreadProps$s(__spreadValues$u({}, prev), { [updateKey]: set });
|
|
5154
5133
|
});
|
|
5155
5134
|
};
|
|
5135
|
+
function setDeep(oldObj, patch, path) {
|
|
5136
|
+
if (!path || path.trim() === "") {
|
|
5137
|
+
return isObject$1(patch) ? __spreadValues$u(__spreadValues$u({}, oldObj), patch) : oldObj;
|
|
5138
|
+
}
|
|
5139
|
+
const keys = path.replace(/\[(\d+)\]/g, ".$1").split(".");
|
|
5140
|
+
function updateRecursive(current, index) {
|
|
5141
|
+
const key = keys[index];
|
|
5142
|
+
if (index === keys.length - 1) {
|
|
5143
|
+
if (isObject$1(current == null ? void 0 : current[key]) && isObject$1(patch)) {
|
|
5144
|
+
return Array.isArray(current[key]) ? [...current[key], ...patch] : __spreadValues$u(__spreadValues$u({}, current[key]), patch);
|
|
5145
|
+
}
|
|
5146
|
+
return patch;
|
|
5147
|
+
}
|
|
5148
|
+
if (!current || typeof current !== "object" || !(key in current)) {
|
|
5149
|
+
return current;
|
|
5150
|
+
}
|
|
5151
|
+
const isArray2 = Array.isArray(current);
|
|
5152
|
+
const newValue = updateRecursive(current[key], index + 1);
|
|
5153
|
+
if (newValue === current[key]) return current;
|
|
5154
|
+
if (isArray2) {
|
|
5155
|
+
const nextArray = [...current];
|
|
5156
|
+
nextArray[Number(key)] = newValue;
|
|
5157
|
+
return nextArray;
|
|
5158
|
+
} else {
|
|
5159
|
+
return __spreadProps$s(__spreadValues$u({}, current), {
|
|
5160
|
+
[key]: newValue
|
|
5161
|
+
});
|
|
5162
|
+
}
|
|
5163
|
+
}
|
|
5164
|
+
return updateRecursive(oldObj, 0);
|
|
5165
|
+
}
|
|
5166
|
+
function isObject$1(val) {
|
|
5167
|
+
return val !== null && typeof val === "object";
|
|
5168
|
+
}
|
|
5156
5169
|
const handleCallApiUpdateData = (config, { onAction, commonPayload }) => {
|
|
5157
5170
|
onAction == null ? void 0 : onAction({ type: config.type, payload: commonPayload });
|
|
5158
5171
|
};
|
|
5172
|
+
const handleCallFetchUpdateData = async ({ params }, { setTemplate, setReferenceComponentList, setData }) => {
|
|
5173
|
+
const { url, method, body } = params;
|
|
5174
|
+
const res = await fetch(url, {
|
|
5175
|
+
method,
|
|
5176
|
+
body: typeof body === "undefined" || method !== "POST" ? void 0 : JSON.stringify(body),
|
|
5177
|
+
headers: {
|
|
5178
|
+
"content-type": "application/json"
|
|
5179
|
+
}
|
|
5180
|
+
});
|
|
5181
|
+
const json = await res.json();
|
|
5182
|
+
if (json) {
|
|
5183
|
+
if (json.code === 0 && Object.prototype.toString.call(json.data) === "[object Object]") {
|
|
5184
|
+
const updateData = json.data;
|
|
5185
|
+
if (updateData.template) {
|
|
5186
|
+
setTemplate((t) => updateData.template);
|
|
5187
|
+
}
|
|
5188
|
+
if (Array.isArray(updateData.referenceComponentList)) {
|
|
5189
|
+
setReferenceComponentList((r) => updateData.referenceComponentList);
|
|
5190
|
+
}
|
|
5191
|
+
if (updateData.data) {
|
|
5192
|
+
setData((d) => updateData.data);
|
|
5193
|
+
}
|
|
5194
|
+
if (Array.isArray(updateData.referenceComponentListUpdate)) {
|
|
5195
|
+
setReferenceComponentList((oldRC) => {
|
|
5196
|
+
const existComponentId = [];
|
|
5197
|
+
return [].concat(oldRC, updateData.referenceComponentListUpdate).reverse().filter((c) => {
|
|
5198
|
+
if (existComponentId.includes(c.componentId)) {
|
|
5199
|
+
return false;
|
|
5200
|
+
}
|
|
5201
|
+
c.componentId && existComponentId.push(c.componentId);
|
|
5202
|
+
return true;
|
|
5203
|
+
});
|
|
5204
|
+
});
|
|
5205
|
+
}
|
|
5206
|
+
if (updateData.dataUpdate) {
|
|
5207
|
+
setData(
|
|
5208
|
+
(oldData) => setDeep(oldData, updateData.dataUpdate, updateData.dataUpdatePath)
|
|
5209
|
+
);
|
|
5210
|
+
}
|
|
5211
|
+
} else {
|
|
5212
|
+
console.error(`请求返回异常:${JSON.stringify(json)}`);
|
|
5213
|
+
}
|
|
5214
|
+
} else {
|
|
5215
|
+
console.error(`请求异常:${json}`);
|
|
5216
|
+
}
|
|
5217
|
+
};
|
|
5159
5218
|
const handleClickTrack = (config, { commonJsonParams }) => {
|
|
5160
5219
|
var _a2;
|
|
5161
5220
|
if ((_a2 = config == null ? void 0 : config.params) == null ? void 0 : _a2.eventId) ;
|
|
@@ -5196,6 +5255,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5196
5255
|
removeLocalDataToSet: handleRemoveLocalDataToSet,
|
|
5197
5256
|
toggleLocalDataToSet: handleToggleLocalDataToSet,
|
|
5198
5257
|
callApiUpdateData: handleCallApiUpdateData,
|
|
5258
|
+
callFetchUpdateData: handleCallFetchUpdateData,
|
|
5199
5259
|
clickTrack: handleClickTrack,
|
|
5200
5260
|
exposureTrack: handleExposureTrack,
|
|
5201
5261
|
disableScroll: handleDisableScroll,
|
|
@@ -5204,7 +5264,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5204
5264
|
const SUPPORTED_ACTIONS = Object.keys(ACTION_HANDLERS);
|
|
5205
5265
|
const dispatchAction = async (config, context) => {
|
|
5206
5266
|
var _a2, _b, _c, _d;
|
|
5207
|
-
const {
|
|
5267
|
+
const {
|
|
5268
|
+
onAction,
|
|
5269
|
+
setValues,
|
|
5270
|
+
originProps,
|
|
5271
|
+
extra,
|
|
5272
|
+
externalActions,
|
|
5273
|
+
setData,
|
|
5274
|
+
setTemplate,
|
|
5275
|
+
setReferenceComponentList
|
|
5276
|
+
} = context;
|
|
5208
5277
|
const commonPayload = {
|
|
5209
5278
|
params: config.params,
|
|
5210
5279
|
extra: extra == null ? void 0 : extra.payload
|
|
@@ -5233,7 +5302,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5233
5302
|
onAction,
|
|
5234
5303
|
commonPayload,
|
|
5235
5304
|
commonJsonParams,
|
|
5236
|
-
originProps
|
|
5305
|
+
originProps,
|
|
5306
|
+
setData,
|
|
5307
|
+
setTemplate,
|
|
5308
|
+
setReferenceComponentList
|
|
5237
5309
|
});
|
|
5238
5310
|
} else {
|
|
5239
5311
|
console.warn(`[ActionContext] 未找到对应的 Action 处理器: ${config.type}`);
|
|
@@ -5251,6 +5323,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5251
5323
|
children,
|
|
5252
5324
|
onAction,
|
|
5253
5325
|
setValues,
|
|
5326
|
+
setData,
|
|
5327
|
+
setTemplate,
|
|
5328
|
+
setReferenceComponentList,
|
|
5254
5329
|
values,
|
|
5255
5330
|
originProps,
|
|
5256
5331
|
externalActions
|
|
@@ -5264,7 +5339,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5264
5339
|
setValues,
|
|
5265
5340
|
originProps,
|
|
5266
5341
|
extra,
|
|
5267
|
-
externalActions
|
|
5342
|
+
externalActions,
|
|
5343
|
+
setData,
|
|
5344
|
+
setTemplate,
|
|
5345
|
+
setReferenceComponentList
|
|
5268
5346
|
});
|
|
5269
5347
|
},
|
|
5270
5348
|
[onAction, setValues, originProps, externalActions]
|
|
@@ -5859,6 +5937,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5859
5937
|
const choiceTheme = theme.components.jdhChoice;
|
|
5860
5938
|
const hasSubDesc = typeof subDescription === "string";
|
|
5861
5939
|
const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t({
|
|
5940
|
+
flex: 1,
|
|
5862
5941
|
width: layout === "image-top" ? runStyle(choiceTheme.wrap.layoutImageTopWidth, scale) : "auto",
|
|
5863
5942
|
opacity: disabled ? choiceTheme.disabledOpacity : 1
|
|
5864
5943
|
}, paddingLogogramToStyle(
|
|
@@ -6345,16 +6424,17 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
6345
6424
|
paddingBottom: containerStyle.marginBottom
|
|
6346
6425
|
};
|
|
6347
6426
|
const gapMargin = `-${resolveSpace(props.gap, theme, scale)}`;
|
|
6348
|
-
const containerStyleForGap = __spreadProps$p(__spreadValues$r({}, containerStyle), {
|
|
6427
|
+
const containerStyleForGap = __spreadValues$r(__spreadProps$p(__spreadValues$r({}, containerStyle), {
|
|
6349
6428
|
margin: void 0,
|
|
6350
6429
|
marginTop: gapMargin,
|
|
6351
6430
|
marginLeft: gapMargin,
|
|
6352
6431
|
marginBottom: void 0,
|
|
6353
|
-
marginRight: void 0
|
|
6432
|
+
marginRight: void 0
|
|
6433
|
+
}), containerStyle.width === "100%" ? {
|
|
6354
6434
|
width: void 0,
|
|
6355
6435
|
// 宽度 100% 和 负margin结合会在flex下有bug,这里改用flexGrow撑开宽度
|
|
6356
6436
|
flexGrow: 1
|
|
6357
|
-
});
|
|
6437
|
+
} : {});
|
|
6358
6438
|
const items = React.Children.toArray(children);
|
|
6359
6439
|
const count = items.length;
|
|
6360
6440
|
const itemFlexShrink = (child) => {
|
|
@@ -10564,17 +10644,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
10564
10644
|
const { scale } = useResponsive();
|
|
10565
10645
|
const { executeActions } = useAction();
|
|
10566
10646
|
const style = textStyleFromTheme(theme, props, scale);
|
|
10567
|
-
const handleClick = (e) => {
|
|
10568
|
-
if (props.actions) {
|
|
10569
|
-
void executeActions(props.actions);
|
|
10570
|
-
}
|
|
10571
|
-
};
|
|
10572
10647
|
const Component = component;
|
|
10573
10648
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10574
10649
|
Component,
|
|
10575
10650
|
{
|
|
10576
10651
|
compiledStyle: style,
|
|
10577
|
-
|
|
10652
|
+
executeActions,
|
|
10578
10653
|
compiledProps: props
|
|
10579
10654
|
}
|
|
10580
10655
|
);
|
|
@@ -11384,9 +11459,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
11384
11459
|
} = props;
|
|
11385
11460
|
const autoDetectContainerWidth = typeof containerWidthFromProps === "number" ? false : typeof props.autoDetectContainerWidth === "boolean" ? props.autoDetectContainerWidth : false;
|
|
11386
11461
|
const {
|
|
11387
|
-
template,
|
|
11388
|
-
referenceComponentList,
|
|
11389
|
-
data,
|
|
11462
|
+
template: templateFromComponent,
|
|
11463
|
+
referenceComponentList: referenceComponentListFromComponent = [],
|
|
11464
|
+
data: dataFromComponent = {},
|
|
11390
11465
|
initLocalData = {},
|
|
11391
11466
|
devicePixelRatio: componentDevicePixelRatio
|
|
11392
11467
|
} = component;
|
|
@@ -11401,6 +11476,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
11401
11476
|
containerWidth
|
|
11402
11477
|
};
|
|
11403
11478
|
}, [props.devicePixelRatio, containerWidth]);
|
|
11479
|
+
const [data, setData] = React.useState(dataFromComponent);
|
|
11480
|
+
const [template, setTemplate] = React.useState(templateFromComponent);
|
|
11481
|
+
const [referenceComponentList, setReferenceComponentList] = React.useState(
|
|
11482
|
+
referenceComponentListFromComponent
|
|
11483
|
+
);
|
|
11404
11484
|
const [values, setValues] = React.useState(initLocalData);
|
|
11405
11485
|
const [dsValues, setDsValues] = React.useState({});
|
|
11406
11486
|
const [nodes, setNodes] = React.useState([]);
|
|
@@ -11522,6 +11602,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
11522
11602
|
{
|
|
11523
11603
|
onAction,
|
|
11524
11604
|
setValues,
|
|
11605
|
+
setData,
|
|
11606
|
+
setTemplate,
|
|
11607
|
+
setReferenceComponentList,
|
|
11525
11608
|
values,
|
|
11526
11609
|
originProps: props,
|
|
11527
11610
|
externalActions,
|