@yklyklpackages/message-card 0.9.2 → 0.10.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/index.umd.js CHANGED
@@ -5316,7 +5316,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5316
5316
  onAction == null ? void 0 : onAction({ type: config.type, payload: commonPayload });
5317
5317
  const handler = (externalActions == null ? void 0 : externalActions[config.type]) || ACTION_HANDLERS[config.type];
5318
5318
  if (handler) {
5319
- await handler(config, {
5319
+ return await handler(config, {
5320
5320
  ctx,
5321
5321
  metadata,
5322
5322
  extra,
@@ -5334,8 +5334,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5334
5334
  }
5335
5335
  };
5336
5336
  const ActionContext = React.createContext({
5337
- executeActions: async () => {
5338
- },
5337
+ executeActions: async () => [],
5339
5338
  getLocalData: () => {
5340
5339
  },
5341
5340
  executeRenderActions: () => {
@@ -5356,7 +5355,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5356
5355
  valuesRef.current = values;
5357
5356
  const executeSingleAction = React.useCallback(
5358
5357
  async (config, extra) => {
5359
- await dispatchAction(config, {
5358
+ return await dispatchAction(config, {
5360
5359
  onAction,
5361
5360
  setValues,
5362
5361
  originProps,
@@ -5372,7 +5371,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5372
5371
  const executeActions = React.useCallback(
5373
5372
  async (configs, extra) => {
5374
5373
  if (!configs || !Array.isArray(configs) || configs.length === 0) return;
5375
- await Promise.all(
5374
+ return await Promise.all(
5376
5375
  configs.map((config) => executeSingleAction(config, extra))
5377
5376
  );
5378
5377
  },