@fctc/widget-logic 2.5.3 → 2.5.4

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/hooks.js CHANGED
@@ -485,16 +485,19 @@ var useViewV2 = ({
485
485
  }) => {
486
486
  const { useGetView: useGetView2 } = (0, provider_exports.useService)();
487
487
  const viewParams = (0, import_react6.useMemo)(() => {
488
+ if (!action) {
489
+ return void 0;
490
+ }
488
491
  return {
489
492
  model,
490
493
  views,
491
494
  context,
492
495
  id: isNaN(Number(aid)) ? action?.id : aid
493
496
  };
494
- }, [action, context, aid, model, views]);
497
+ }, [action, context, aid]);
495
498
  const view = useGetView2(
496
- viewParams,
497
- !!model
499
+ viewParams || {},
500
+ !!viewParams
498
501
  );
499
502
  return {
500
503
  ...view,
package/dist/hooks.mjs CHANGED
@@ -466,16 +466,19 @@ var useViewV2 = ({
466
466
  }) => {
467
467
  const { useGetView: useGetView2 } = (0, provider_exports.useService)();
468
468
  const viewParams = useMemo3(() => {
469
+ if (!action) {
470
+ return void 0;
471
+ }
469
472
  return {
470
473
  model,
471
474
  views,
472
475
  context,
473
476
  id: isNaN(Number(aid)) ? action?.id : aid
474
477
  };
475
- }, [action, context, aid, model, views]);
478
+ }, [action, context, aid]);
476
479
  const view = useGetView2(
477
- viewParams,
478
- !!model
480
+ viewParams || {},
481
+ !!viewParams
479
482
  );
480
483
  return {
481
484
  ...view,
package/dist/index.js CHANGED
@@ -4535,16 +4535,19 @@ var useViewV2 = ({
4535
4535
  }) => {
4536
4536
  const { useGetView: useGetView2 } = (0, provider_exports.useService)();
4537
4537
  const viewParams = (0, import_react6.useMemo)(() => {
4538
+ if (!action) {
4539
+ return void 0;
4540
+ }
4538
4541
  return {
4539
4542
  model,
4540
4543
  views,
4541
4544
  context,
4542
4545
  id: isNaN(Number(aid)) ? action?.id : aid
4543
4546
  };
4544
- }, [action, context, aid, model, views]);
4547
+ }, [action, context, aid]);
4545
4548
  const view = useGetView2(
4546
- viewParams,
4547
- !!model
4549
+ viewParams || {},
4550
+ !!viewParams
4548
4551
  );
4549
4552
  return {
4550
4553
  ...view,
package/dist/index.mjs CHANGED
@@ -4610,16 +4610,19 @@ var useViewV2 = ({
4610
4610
  }) => {
4611
4611
  const { useGetView: useGetView2 } = (0, provider_exports.useService)();
4612
4612
  const viewParams = useMemo3(() => {
4613
+ if (!action) {
4614
+ return void 0;
4615
+ }
4613
4616
  return {
4614
4617
  model,
4615
4618
  views,
4616
4619
  context,
4617
4620
  id: isNaN(Number(aid)) ? action?.id : aid
4618
4621
  };
4619
- }, [action, context, aid, model, views]);
4622
+ }, [action, context, aid]);
4620
4623
  const view = useGetView2(
4621
- viewParams,
4622
- !!model
4624
+ viewParams || {},
4625
+ !!viewParams
4623
4626
  );
4624
4627
  return {
4625
4628
  ...view,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/widget-logic",
3
- "version": "2.5.3",
3
+ "version": "2.5.4",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",