@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.mjs CHANGED
@@ -5314,7 +5314,7 @@ const dispatchAction = async (config, context) => {
5314
5314
  onAction == null ? void 0 : onAction({ type: config.type, payload: commonPayload });
5315
5315
  const handler = (externalActions == null ? void 0 : externalActions[config.type]) || ACTION_HANDLERS[config.type];
5316
5316
  if (handler) {
5317
- await handler(config, {
5317
+ return await handler(config, {
5318
5318
  ctx,
5319
5319
  metadata,
5320
5320
  extra,
@@ -5332,8 +5332,7 @@ const dispatchAction = async (config, context) => {
5332
5332
  }
5333
5333
  };
5334
5334
  const ActionContext = createContext({
5335
- executeActions: async () => {
5336
- },
5335
+ executeActions: async () => [],
5337
5336
  getLocalData: () => {
5338
5337
  },
5339
5338
  executeRenderActions: () => {
@@ -5354,7 +5353,7 @@ const ActionProvider = ({
5354
5353
  valuesRef.current = values;
5355
5354
  const executeSingleAction = useCallback(
5356
5355
  async (config, extra) => {
5357
- await dispatchAction(config, {
5356
+ return await dispatchAction(config, {
5358
5357
  onAction,
5359
5358
  setValues,
5360
5359
  originProps,
@@ -5370,7 +5369,7 @@ const ActionProvider = ({
5370
5369
  const executeActions = useCallback(
5371
5370
  async (configs, extra) => {
5372
5371
  if (!configs || !Array.isArray(configs) || configs.length === 0) return;
5373
- await Promise.all(
5372
+ return await Promise.all(
5374
5373
  configs.map((config) => executeSingleAction(config, extra))
5375
5374
  );
5376
5375
  },