@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.mjs
CHANGED
|
@@ -2980,7 +2980,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
2980
2980
|
var ys = arrObjKeys(obj, inspect2);
|
|
2981
2981
|
var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
2982
2982
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
2983
|
-
var stringTag = !isPlainObject2 && toStringTag$1 && Object(obj) === obj && toStringTag$1 in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
2983
|
+
var stringTag = !isPlainObject2 && toStringTag$1 && Object(obj) === obj && toStringTag$1 in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
|
|
2984
2984
|
var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
2985
2985
|
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
2986
2986
|
if (ys.length === 0) {
|
|
@@ -3005,25 +3005,25 @@ function canTrustToString(obj) {
|
|
|
3005
3005
|
return !toStringTag$1 || !(typeof obj === "object" && (toStringTag$1 in obj || typeof obj[toStringTag$1] !== "undefined"));
|
|
3006
3006
|
}
|
|
3007
3007
|
function isArray$4(obj) {
|
|
3008
|
-
return toStr(obj) === "[object Array]" && canTrustToString(obj);
|
|
3008
|
+
return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
|
|
3009
3009
|
}
|
|
3010
3010
|
function isDate$1(obj) {
|
|
3011
|
-
return toStr(obj) === "[object Date]" && canTrustToString(obj);
|
|
3011
|
+
return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
|
|
3012
3012
|
}
|
|
3013
3013
|
function isRegExp$2(obj) {
|
|
3014
|
-
return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
3014
|
+
return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
3015
3015
|
}
|
|
3016
3016
|
function isError(obj) {
|
|
3017
|
-
return toStr(obj) === "[object Error]" && canTrustToString(obj);
|
|
3017
|
+
return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
|
|
3018
3018
|
}
|
|
3019
3019
|
function isString$1(obj) {
|
|
3020
|
-
return toStr(obj) === "[object String]" && canTrustToString(obj);
|
|
3020
|
+
return toStr$1(obj) === "[object String]" && canTrustToString(obj);
|
|
3021
3021
|
}
|
|
3022
3022
|
function isNumber$1(obj) {
|
|
3023
|
-
return toStr(obj) === "[object Number]" && canTrustToString(obj);
|
|
3023
|
+
return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
|
|
3024
3024
|
}
|
|
3025
3025
|
function isBoolean$1(obj) {
|
|
3026
|
-
return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
3026
|
+
return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
3027
3027
|
}
|
|
3028
3028
|
function isSymbol(obj) {
|
|
3029
3029
|
if (hasShammedSymbols) {
|
|
@@ -3059,7 +3059,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
|
|
|
3059
3059
|
function has$3(obj, key) {
|
|
3060
3060
|
return hasOwn$1.call(obj, key);
|
|
3061
3061
|
}
|
|
3062
|
-
function toStr(obj) {
|
|
3062
|
+
function toStr$1(obj) {
|
|
3063
3063
|
return objectToString.call(obj);
|
|
3064
3064
|
}
|
|
3065
3065
|
function nameOf(f) {
|
|
@@ -3368,7 +3368,7 @@ var syntax = SyntaxError;
|
|
|
3368
3368
|
var uri = URIError;
|
|
3369
3369
|
var abs$1 = Math.abs;
|
|
3370
3370
|
var floor$1 = Math.floor;
|
|
3371
|
-
var max$
|
|
3371
|
+
var max$2 = Math.max;
|
|
3372
3372
|
var min$1 = Math.min;
|
|
3373
3373
|
var pow$1 = Math.pow;
|
|
3374
3374
|
var round$1 = Math.round;
|
|
@@ -3497,99 +3497,78 @@ function requireObject_getPrototypeOf() {
|
|
|
3497
3497
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
3498
3498
|
return Object_getPrototypeOf;
|
|
3499
3499
|
}
|
|
3500
|
-
var
|
|
3501
|
-
var
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
var
|
|
3506
|
-
var
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
var
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
}
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
var str = "";
|
|
3528
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
3529
|
-
str += arr[i];
|
|
3530
|
-
if (i + 1 < arr.length) {
|
|
3531
|
-
str += joiner;
|
|
3532
|
-
}
|
|
3500
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
3501
|
+
var toStr = Object.prototype.toString;
|
|
3502
|
+
var max$1 = Math.max;
|
|
3503
|
+
var funcType = "[object Function]";
|
|
3504
|
+
var concatty = function concatty2(a, b3) {
|
|
3505
|
+
var arr = [];
|
|
3506
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
3507
|
+
arr[i] = a[i];
|
|
3508
|
+
}
|
|
3509
|
+
for (var j3 = 0; j3 < b3.length; j3 += 1) {
|
|
3510
|
+
arr[j3 + a.length] = b3[j3];
|
|
3511
|
+
}
|
|
3512
|
+
return arr;
|
|
3513
|
+
};
|
|
3514
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
3515
|
+
var arr = [];
|
|
3516
|
+
for (var i = offset, j3 = 0; i < arrLike.length; i += 1, j3 += 1) {
|
|
3517
|
+
arr[j3] = arrLike[i];
|
|
3518
|
+
}
|
|
3519
|
+
return arr;
|
|
3520
|
+
};
|
|
3521
|
+
var joiny = function(arr, joiner) {
|
|
3522
|
+
var str = "";
|
|
3523
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
3524
|
+
str += arr[i];
|
|
3525
|
+
if (i + 1 < arr.length) {
|
|
3526
|
+
str += joiner;
|
|
3533
3527
|
}
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
);
|
|
3549
|
-
if (Object(result) === result) {
|
|
3550
|
-
return result;
|
|
3551
|
-
}
|
|
3552
|
-
return this;
|
|
3553
|
-
}
|
|
3554
|
-
return target.apply(
|
|
3555
|
-
that,
|
|
3528
|
+
}
|
|
3529
|
+
return str;
|
|
3530
|
+
};
|
|
3531
|
+
var implementation$1 = function bind(that) {
|
|
3532
|
+
var target = this;
|
|
3533
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
3534
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
3535
|
+
}
|
|
3536
|
+
var args = slicy(arguments, 1);
|
|
3537
|
+
var bound;
|
|
3538
|
+
var binder = function() {
|
|
3539
|
+
if (this instanceof bound) {
|
|
3540
|
+
var result = target.apply(
|
|
3541
|
+
this,
|
|
3556
3542
|
concatty(args, arguments)
|
|
3557
3543
|
);
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
boundArgs[i] = "$" + i;
|
|
3563
|
-
}
|
|
3564
|
-
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
3565
|
-
if (target.prototype) {
|
|
3566
|
-
var Empty = function Empty2() {
|
|
3567
|
-
};
|
|
3568
|
-
Empty.prototype = target.prototype;
|
|
3569
|
-
bound.prototype = new Empty();
|
|
3570
|
-
Empty.prototype = null;
|
|
3544
|
+
if (Object(result) === result) {
|
|
3545
|
+
return result;
|
|
3546
|
+
}
|
|
3547
|
+
return this;
|
|
3571
3548
|
}
|
|
3572
|
-
return
|
|
3549
|
+
return target.apply(
|
|
3550
|
+
that,
|
|
3551
|
+
concatty(args, arguments)
|
|
3552
|
+
);
|
|
3573
3553
|
};
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
var
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
}
|
|
3554
|
+
var boundLength = max$1(0, target.length - args.length);
|
|
3555
|
+
var boundArgs = [];
|
|
3556
|
+
for (var i = 0; i < boundLength; i++) {
|
|
3557
|
+
boundArgs[i] = "$" + i;
|
|
3558
|
+
}
|
|
3559
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
3560
|
+
if (target.prototype) {
|
|
3561
|
+
var Empty = function Empty2() {
|
|
3562
|
+
};
|
|
3563
|
+
Empty.prototype = target.prototype;
|
|
3564
|
+
bound.prototype = new Empty();
|
|
3565
|
+
Empty.prototype = null;
|
|
3566
|
+
}
|
|
3567
|
+
return bound;
|
|
3568
|
+
};
|
|
3569
|
+
var implementation = implementation$1;
|
|
3570
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
3571
|
+
var functionCall = Function.prototype.call;
|
|
3593
3572
|
var functionApply;
|
|
3594
3573
|
var hasRequiredFunctionApply;
|
|
3595
3574
|
function requireFunctionApply() {
|
|
@@ -3599,14 +3578,14 @@ function requireFunctionApply() {
|
|
|
3599
3578
|
return functionApply;
|
|
3600
3579
|
}
|
|
3601
3580
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
3602
|
-
var bind$3 =
|
|
3581
|
+
var bind$3 = functionBind;
|
|
3603
3582
|
var $apply$1 = requireFunctionApply();
|
|
3604
|
-
var $call$2 =
|
|
3583
|
+
var $call$2 = functionCall;
|
|
3605
3584
|
var $reflectApply = reflectApply;
|
|
3606
3585
|
var actualApply = $reflectApply || bind$3.call($call$2, $apply$1);
|
|
3607
|
-
var bind$2 =
|
|
3586
|
+
var bind$2 = functionBind;
|
|
3608
3587
|
var $TypeError$4 = type;
|
|
3609
|
-
var $call$1 =
|
|
3588
|
+
var $call$1 = functionCall;
|
|
3610
3589
|
var $actualApply = actualApply;
|
|
3611
3590
|
var callBindApplyHelpers = function callBindBasic(args) {
|
|
3612
3591
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -3672,8 +3651,8 @@ function requireHasown() {
|
|
|
3672
3651
|
hasRequiredHasown = 1;
|
|
3673
3652
|
var call = Function.prototype.call;
|
|
3674
3653
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
3675
|
-
var
|
|
3676
|
-
hasown =
|
|
3654
|
+
var bind3 = functionBind;
|
|
3655
|
+
hasown = bind3.call(call, $hasOwn);
|
|
3677
3656
|
return hasown;
|
|
3678
3657
|
}
|
|
3679
3658
|
var undefined$1;
|
|
@@ -3687,7 +3666,7 @@ var $TypeError$3 = type;
|
|
|
3687
3666
|
var $URIError = uri;
|
|
3688
3667
|
var abs = abs$1;
|
|
3689
3668
|
var floor = floor$1;
|
|
3690
|
-
var max = max$
|
|
3669
|
+
var max = max$2;
|
|
3691
3670
|
var min = min$1;
|
|
3692
3671
|
var pow = pow$1;
|
|
3693
3672
|
var round = round$1;
|
|
@@ -3721,7 +3700,7 @@ var getProto = requireGetProto();
|
|
|
3721
3700
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
3722
3701
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
3723
3702
|
var $apply = requireFunctionApply();
|
|
3724
|
-
var $call =
|
|
3703
|
+
var $call = functionCall;
|
|
3725
3704
|
var needsEval = {};
|
|
3726
3705
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
3727
3706
|
var INTRINSICS = {
|
|
@@ -3892,7 +3871,7 @@ var LEGACY_ALIASES = {
|
|
|
3892
3871
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3893
3872
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3894
3873
|
};
|
|
3895
|
-
var bind$1 =
|
|
3874
|
+
var bind$1 = functionBind;
|
|
3896
3875
|
var hasOwn = requireHasown();
|
|
3897
3876
|
var $concat = bind$1.call($call, Array.prototype.concat);
|
|
3898
3877
|
var $spliceApply = bind$1.call($apply, Array.prototype.splice);
|
|
@@ -5151,9 +5130,89 @@ const handleToggleLocalDataToSet = (config, { setValues }) => {
|
|
|
5151
5130
|
return __spreadProps$s(__spreadValues$u({}, prev), { [updateKey]: set });
|
|
5152
5131
|
});
|
|
5153
5132
|
};
|
|
5133
|
+
function setDeep(oldObj, patch, path) {
|
|
5134
|
+
if (!path || path.trim() === "") {
|
|
5135
|
+
return isObject$1(patch) ? __spreadValues$u(__spreadValues$u({}, oldObj), patch) : oldObj;
|
|
5136
|
+
}
|
|
5137
|
+
const keys = path.replace(/\[(\d+)\]/g, ".$1").split(".");
|
|
5138
|
+
function updateRecursive(current, index) {
|
|
5139
|
+
const key = keys[index];
|
|
5140
|
+
if (index === keys.length - 1) {
|
|
5141
|
+
if (isObject$1(current == null ? void 0 : current[key]) && isObject$1(patch)) {
|
|
5142
|
+
return Array.isArray(current[key]) ? [...current[key], ...patch] : __spreadValues$u(__spreadValues$u({}, current[key]), patch);
|
|
5143
|
+
}
|
|
5144
|
+
return patch;
|
|
5145
|
+
}
|
|
5146
|
+
if (!current || typeof current !== "object" || !(key in current)) {
|
|
5147
|
+
return current;
|
|
5148
|
+
}
|
|
5149
|
+
const isArray2 = Array.isArray(current);
|
|
5150
|
+
const newValue = updateRecursive(current[key], index + 1);
|
|
5151
|
+
if (newValue === current[key]) return current;
|
|
5152
|
+
if (isArray2) {
|
|
5153
|
+
const nextArray = [...current];
|
|
5154
|
+
nextArray[Number(key)] = newValue;
|
|
5155
|
+
return nextArray;
|
|
5156
|
+
} else {
|
|
5157
|
+
return __spreadProps$s(__spreadValues$u({}, current), {
|
|
5158
|
+
[key]: newValue
|
|
5159
|
+
});
|
|
5160
|
+
}
|
|
5161
|
+
}
|
|
5162
|
+
return updateRecursive(oldObj, 0);
|
|
5163
|
+
}
|
|
5164
|
+
function isObject$1(val) {
|
|
5165
|
+
return val !== null && typeof val === "object";
|
|
5166
|
+
}
|
|
5154
5167
|
const handleCallApiUpdateData = (config, { onAction, commonPayload }) => {
|
|
5155
5168
|
onAction == null ? void 0 : onAction({ type: config.type, payload: commonPayload });
|
|
5156
5169
|
};
|
|
5170
|
+
const handleCallFetchUpdateData = async ({ params }, { setTemplate, setReferenceComponentList, setData }) => {
|
|
5171
|
+
const { url, method, body } = params;
|
|
5172
|
+
const res = await fetch(url, {
|
|
5173
|
+
method,
|
|
5174
|
+
body: typeof body === "undefined" || method !== "POST" ? void 0 : JSON.stringify(body),
|
|
5175
|
+
headers: {
|
|
5176
|
+
"content-type": "application/json"
|
|
5177
|
+
}
|
|
5178
|
+
});
|
|
5179
|
+
const json = await res.json();
|
|
5180
|
+
if (json) {
|
|
5181
|
+
if (json.code === 0 && Object.prototype.toString.call(json.data) === "[object Object]") {
|
|
5182
|
+
const updateData = json.data;
|
|
5183
|
+
if (updateData.template) {
|
|
5184
|
+
setTemplate((t) => updateData.template);
|
|
5185
|
+
}
|
|
5186
|
+
if (Array.isArray(updateData.referenceComponentList)) {
|
|
5187
|
+
setReferenceComponentList((r) => updateData.referenceComponentList);
|
|
5188
|
+
}
|
|
5189
|
+
if (updateData.data) {
|
|
5190
|
+
setData((d) => updateData.data);
|
|
5191
|
+
}
|
|
5192
|
+
if (Array.isArray(updateData.referenceComponentListUpdate)) {
|
|
5193
|
+
setReferenceComponentList((oldRC) => {
|
|
5194
|
+
const existComponentId = [];
|
|
5195
|
+
return [].concat(oldRC, updateData.referenceComponentListUpdate).reverse().filter((c) => {
|
|
5196
|
+
if (existComponentId.includes(c.componentId)) {
|
|
5197
|
+
return false;
|
|
5198
|
+
}
|
|
5199
|
+
c.componentId && existComponentId.push(c.componentId);
|
|
5200
|
+
return true;
|
|
5201
|
+
});
|
|
5202
|
+
});
|
|
5203
|
+
}
|
|
5204
|
+
if (updateData.dataUpdate) {
|
|
5205
|
+
setData(
|
|
5206
|
+
(oldData) => setDeep(oldData, updateData.dataUpdate, updateData.dataUpdatePath)
|
|
5207
|
+
);
|
|
5208
|
+
}
|
|
5209
|
+
} else {
|
|
5210
|
+
console.error(`请求返回异常:${JSON.stringify(json)}`);
|
|
5211
|
+
}
|
|
5212
|
+
} else {
|
|
5213
|
+
console.error(`请求异常:${json}`);
|
|
5214
|
+
}
|
|
5215
|
+
};
|
|
5157
5216
|
const handleClickTrack = (config, { commonJsonParams }) => {
|
|
5158
5217
|
var _a2;
|
|
5159
5218
|
if ((_a2 = config == null ? void 0 : config.params) == null ? void 0 : _a2.eventId) ;
|
|
@@ -5194,6 +5253,7 @@ const ACTION_HANDLERS = {
|
|
|
5194
5253
|
removeLocalDataToSet: handleRemoveLocalDataToSet,
|
|
5195
5254
|
toggleLocalDataToSet: handleToggleLocalDataToSet,
|
|
5196
5255
|
callApiUpdateData: handleCallApiUpdateData,
|
|
5256
|
+
callFetchUpdateData: handleCallFetchUpdateData,
|
|
5197
5257
|
clickTrack: handleClickTrack,
|
|
5198
5258
|
exposureTrack: handleExposureTrack,
|
|
5199
5259
|
disableScroll: handleDisableScroll,
|
|
@@ -5202,7 +5262,16 @@ const ACTION_HANDLERS = {
|
|
|
5202
5262
|
const SUPPORTED_ACTIONS = Object.keys(ACTION_HANDLERS);
|
|
5203
5263
|
const dispatchAction = async (config, context) => {
|
|
5204
5264
|
var _a2, _b, _c, _d;
|
|
5205
|
-
const {
|
|
5265
|
+
const {
|
|
5266
|
+
onAction,
|
|
5267
|
+
setValues,
|
|
5268
|
+
originProps,
|
|
5269
|
+
extra,
|
|
5270
|
+
externalActions,
|
|
5271
|
+
setData,
|
|
5272
|
+
setTemplate,
|
|
5273
|
+
setReferenceComponentList
|
|
5274
|
+
} = context;
|
|
5206
5275
|
const commonPayload = {
|
|
5207
5276
|
params: config.params,
|
|
5208
5277
|
extra: extra == null ? void 0 : extra.payload
|
|
@@ -5231,7 +5300,10 @@ const dispatchAction = async (config, context) => {
|
|
|
5231
5300
|
onAction,
|
|
5232
5301
|
commonPayload,
|
|
5233
5302
|
commonJsonParams,
|
|
5234
|
-
originProps
|
|
5303
|
+
originProps,
|
|
5304
|
+
setData,
|
|
5305
|
+
setTemplate,
|
|
5306
|
+
setReferenceComponentList
|
|
5235
5307
|
});
|
|
5236
5308
|
} else {
|
|
5237
5309
|
console.warn(`[ActionContext] 未找到对应的 Action 处理器: ${config.type}`);
|
|
@@ -5249,6 +5321,9 @@ const ActionProvider = ({
|
|
|
5249
5321
|
children,
|
|
5250
5322
|
onAction,
|
|
5251
5323
|
setValues,
|
|
5324
|
+
setData,
|
|
5325
|
+
setTemplate,
|
|
5326
|
+
setReferenceComponentList,
|
|
5252
5327
|
values,
|
|
5253
5328
|
originProps,
|
|
5254
5329
|
externalActions
|
|
@@ -5262,7 +5337,10 @@ const ActionProvider = ({
|
|
|
5262
5337
|
setValues,
|
|
5263
5338
|
originProps,
|
|
5264
5339
|
extra,
|
|
5265
|
-
externalActions
|
|
5340
|
+
externalActions,
|
|
5341
|
+
setData,
|
|
5342
|
+
setTemplate,
|
|
5343
|
+
setReferenceComponentList
|
|
5266
5344
|
});
|
|
5267
5345
|
},
|
|
5268
5346
|
[onAction, setValues, originProps, externalActions]
|
|
@@ -5857,6 +5935,7 @@ const buildJDHChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
|
|
|
5857
5935
|
const choiceTheme = theme.components.jdhChoice;
|
|
5858
5936
|
const hasSubDesc = typeof subDescription === "string";
|
|
5859
5937
|
const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t({
|
|
5938
|
+
flex: 1,
|
|
5860
5939
|
width: layout === "image-top" ? runStyle(choiceTheme.wrap.layoutImageTopWidth, scale) : "auto",
|
|
5861
5940
|
opacity: disabled ? choiceTheme.disabledOpacity : 1
|
|
5862
5941
|
}, paddingLogogramToStyle(
|
|
@@ -6343,16 +6422,17 @@ const MultipleColumnLayout = ({
|
|
|
6343
6422
|
paddingBottom: containerStyle.marginBottom
|
|
6344
6423
|
};
|
|
6345
6424
|
const gapMargin = `-${resolveSpace(props.gap, theme, scale)}`;
|
|
6346
|
-
const containerStyleForGap = __spreadProps$p(__spreadValues$r({}, containerStyle), {
|
|
6425
|
+
const containerStyleForGap = __spreadValues$r(__spreadProps$p(__spreadValues$r({}, containerStyle), {
|
|
6347
6426
|
margin: void 0,
|
|
6348
6427
|
marginTop: gapMargin,
|
|
6349
6428
|
marginLeft: gapMargin,
|
|
6350
6429
|
marginBottom: void 0,
|
|
6351
|
-
marginRight: void 0
|
|
6430
|
+
marginRight: void 0
|
|
6431
|
+
}), containerStyle.width === "100%" ? {
|
|
6352
6432
|
width: void 0,
|
|
6353
6433
|
// 宽度 100% 和 负margin结合会在flex下有bug,这里改用flexGrow撑开宽度
|
|
6354
6434
|
flexGrow: 1
|
|
6355
|
-
});
|
|
6435
|
+
} : {});
|
|
6356
6436
|
const items = React.Children.toArray(children);
|
|
6357
6437
|
const count = items.length;
|
|
6358
6438
|
const itemFlexShrink = (child) => {
|
|
@@ -10562,17 +10642,12 @@ const CustomRenderFromProps = ({ props, component }) => {
|
|
|
10562
10642
|
const { scale } = useResponsive();
|
|
10563
10643
|
const { executeActions } = useAction();
|
|
10564
10644
|
const style = textStyleFromTheme(theme, props, scale);
|
|
10565
|
-
const handleClick = (e) => {
|
|
10566
|
-
if (props.actions) {
|
|
10567
|
-
void executeActions(props.actions);
|
|
10568
|
-
}
|
|
10569
|
-
};
|
|
10570
10645
|
const Component = component;
|
|
10571
10646
|
return /* @__PURE__ */ jsx(
|
|
10572
10647
|
Component,
|
|
10573
10648
|
{
|
|
10574
10649
|
compiledStyle: style,
|
|
10575
|
-
|
|
10650
|
+
executeActions,
|
|
10576
10651
|
compiledProps: props
|
|
10577
10652
|
}
|
|
10578
10653
|
);
|
|
@@ -11382,9 +11457,9 @@ const MessageContainer = (props) => {
|
|
|
11382
11457
|
} = props;
|
|
11383
11458
|
const autoDetectContainerWidth = typeof containerWidthFromProps === "number" ? false : typeof props.autoDetectContainerWidth === "boolean" ? props.autoDetectContainerWidth : false;
|
|
11384
11459
|
const {
|
|
11385
|
-
template,
|
|
11386
|
-
referenceComponentList,
|
|
11387
|
-
data,
|
|
11460
|
+
template: templateFromComponent,
|
|
11461
|
+
referenceComponentList: referenceComponentListFromComponent = [],
|
|
11462
|
+
data: dataFromComponent = {},
|
|
11388
11463
|
initLocalData = {},
|
|
11389
11464
|
devicePixelRatio: componentDevicePixelRatio
|
|
11390
11465
|
} = component;
|
|
@@ -11399,6 +11474,11 @@ const MessageContainer = (props) => {
|
|
|
11399
11474
|
containerWidth
|
|
11400
11475
|
};
|
|
11401
11476
|
}, [props.devicePixelRatio, containerWidth]);
|
|
11477
|
+
const [data, setData] = useState(dataFromComponent);
|
|
11478
|
+
const [template, setTemplate] = useState(templateFromComponent);
|
|
11479
|
+
const [referenceComponentList, setReferenceComponentList] = useState(
|
|
11480
|
+
referenceComponentListFromComponent
|
|
11481
|
+
);
|
|
11402
11482
|
const [values, setValues] = useState(initLocalData);
|
|
11403
11483
|
const [dsValues, setDsValues] = useState({});
|
|
11404
11484
|
const [nodes, setNodes] = useState([]);
|
|
@@ -11520,6 +11600,9 @@ const MessageContainer = (props) => {
|
|
|
11520
11600
|
{
|
|
11521
11601
|
onAction,
|
|
11522
11602
|
setValues,
|
|
11603
|
+
setData,
|
|
11604
|
+
setTemplate,
|
|
11605
|
+
setReferenceComponentList,
|
|
11523
11606
|
values,
|
|
11524
11607
|
originProps: props,
|
|
11525
11608
|
externalActions,
|
|
@@ -11769,7 +11852,7 @@ class CacheStorage {
|
|
|
11769
11852
|
}
|
|
11770
11853
|
}
|
|
11771
11854
|
}
|
|
11772
|
-
function
|
|
11855
|
+
function bind2(fn, thisArg) {
|
|
11773
11856
|
return function wrap() {
|
|
11774
11857
|
return fn.apply(thisArg, arguments);
|
|
11775
11858
|
};
|
|
@@ -11932,7 +12015,7 @@ const extend = (a, b3, thisArg, { allOwnKeys } = {}) => {
|
|
|
11932
12015
|
(val, key) => {
|
|
11933
12016
|
if (thisArg && isFunction$1(val)) {
|
|
11934
12017
|
Object.defineProperty(a, key, {
|
|
11935
|
-
value:
|
|
12018
|
+
value: bind2(val, thisArg),
|
|
11936
12019
|
writable: true,
|
|
11937
12020
|
enumerable: true,
|
|
11938
12021
|
configurable: true
|
|
@@ -14336,7 +14419,7 @@ Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
|
|
|
14336
14419
|
});
|
|
14337
14420
|
function createInstance(defaultConfig) {
|
|
14338
14421
|
const context = new Axios$1(defaultConfig);
|
|
14339
|
-
const instance =
|
|
14422
|
+
const instance = bind2(Axios$1.prototype.request, context);
|
|
14340
14423
|
utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
|
|
14341
14424
|
utils$1.extend(instance, context, null, { allOwnKeys: true });
|
|
14342
14425
|
instance.create = function create(instanceConfig) {
|