@fctc/widget-logic 1.9.8 → 1.9.9

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.js CHANGED
@@ -5739,29 +5739,15 @@ var durationController = (props) => {
5739
5739
  var import_hooks14 = require("@fctc/interface-logic/hooks");
5740
5740
  var import_utils9 = require("@fctc/interface-logic/utils");
5741
5741
  var priorityFieldController = (props) => {
5742
- const {
5743
- value,
5744
- isForm,
5745
- name,
5746
- methods,
5747
- onChange,
5748
- model,
5749
- selection,
5750
- id,
5751
- actionData,
5752
- viewData,
5753
- context
5754
- } = props;
5742
+ const { name, model, id, actionData, context, onChange } = props;
5755
5743
  const _context = { ...(0, import_utils9.evalJSONContext)(actionData?.context) };
5756
5744
  const contextObject = { ...context, ..._context };
5757
- const defaultPriority = parseInt(value) + 1;
5758
- const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
5759
5745
  const { mutateAsync: fetchSave } = (0, import_hooks14.useSave)();
5760
5746
  const savePriorities = async ({
5761
- value: value2,
5747
+ value,
5762
5748
  resetPriority
5763
5749
  }) => {
5764
- const priorityValue = value2 <= 0 ? 0 : value2 - 1;
5750
+ const priorityValue = value <= 0 ? 0 : value - 1;
5765
5751
  try {
5766
5752
  fetchSave({
5767
5753
  ids: id ? [id] : [],
@@ -5779,14 +5765,7 @@ var priorityFieldController = (props) => {
5779
5765
  }
5780
5766
  };
5781
5767
  return {
5782
- selection,
5783
- isForm,
5784
- methods,
5785
- defaultPriority,
5786
- savePriorities,
5787
- label,
5788
- id,
5789
- onChange
5768
+ savePriorities
5790
5769
  };
5791
5770
  };
5792
5771
 
package/dist/index.mjs CHANGED
@@ -5778,29 +5778,15 @@ var durationController = (props) => {
5778
5778
  import { useSave as useSave2 } from "@fctc/interface-logic/hooks";
5779
5779
  import { evalJSONContext as evalJSONContext6 } from "@fctc/interface-logic/utils";
5780
5780
  var priorityFieldController = (props) => {
5781
- const {
5782
- value,
5783
- isForm,
5784
- name,
5785
- methods,
5786
- onChange,
5787
- model,
5788
- selection,
5789
- id,
5790
- actionData,
5791
- viewData,
5792
- context
5793
- } = props;
5781
+ const { name, model, id, actionData, context, onChange } = props;
5794
5782
  const _context = { ...evalJSONContext6(actionData?.context) };
5795
5783
  const contextObject = { ...context, ..._context };
5796
- const defaultPriority = parseInt(value) + 1;
5797
- const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
5798
5784
  const { mutateAsync: fetchSave } = useSave2();
5799
5785
  const savePriorities = async ({
5800
- value: value2,
5786
+ value,
5801
5787
  resetPriority
5802
5788
  }) => {
5803
- const priorityValue = value2 <= 0 ? 0 : value2 - 1;
5789
+ const priorityValue = value <= 0 ? 0 : value - 1;
5804
5790
  try {
5805
5791
  fetchSave({
5806
5792
  ids: id ? [id] : [],
@@ -5818,14 +5804,7 @@ var priorityFieldController = (props) => {
5818
5804
  }
5819
5805
  };
5820
5806
  return {
5821
- selection,
5822
- isForm,
5823
- methods,
5824
- defaultPriority,
5825
- savePriorities,
5826
- label,
5827
- id,
5828
- onChange
5807
+ savePriorities
5829
5808
  };
5830
5809
  };
5831
5810
 
package/dist/widget.d.mts CHANGED
@@ -108,25 +108,16 @@ declare const durationController: (props: IDurationFieldProps) => {
108
108
  };
109
109
 
110
110
  interface IPriorityFieldProps extends IInputFieldProps {
111
- selection: any;
112
111
  id: any;
113
112
  actionData: any;
114
- viewData: any;
115
113
  context: any;
116
114
  }
117
115
 
118
116
  declare const priorityFieldController: (props: IPriorityFieldProps) => {
119
- selection: any;
120
- isForm: boolean | undefined;
121
- methods: any;
122
- defaultPriority: number;
123
117
  savePriorities: ({ value, resetPriority, }: {
124
118
  value: number;
125
119
  resetPriority?: () => void;
126
120
  }) => Promise<void>;
127
- label: any;
128
- id: any;
129
- onChange: ((name: string, value: any) => void) | undefined;
130
121
  };
131
122
 
132
123
  declare const downloadFileController: () => {
package/dist/widget.d.ts CHANGED
@@ -108,25 +108,16 @@ declare const durationController: (props: IDurationFieldProps) => {
108
108
  };
109
109
 
110
110
  interface IPriorityFieldProps extends IInputFieldProps {
111
- selection: any;
112
111
  id: any;
113
112
  actionData: any;
114
- viewData: any;
115
113
  context: any;
116
114
  }
117
115
 
118
116
  declare const priorityFieldController: (props: IPriorityFieldProps) => {
119
- selection: any;
120
- isForm: boolean | undefined;
121
- methods: any;
122
- defaultPriority: number;
123
117
  savePriorities: ({ value, resetPriority, }: {
124
118
  value: number;
125
119
  resetPriority?: () => void;
126
120
  }) => Promise<void>;
127
- label: any;
128
- id: any;
129
- onChange: ((name: string, value: any) => void) | undefined;
130
121
  };
131
122
 
132
123
  declare const downloadFileController: () => {
package/dist/widget.js CHANGED
@@ -5465,29 +5465,15 @@ var durationController = (props) => {
5465
5465
  var import_hooks14 = require("@fctc/interface-logic/hooks");
5466
5466
  var import_utils9 = require("@fctc/interface-logic/utils");
5467
5467
  var priorityFieldController = (props) => {
5468
- const {
5469
- value,
5470
- isForm,
5471
- name,
5472
- methods,
5473
- onChange,
5474
- model,
5475
- selection,
5476
- id,
5477
- actionData,
5478
- viewData,
5479
- context
5480
- } = props;
5468
+ const { name, model, id, actionData, context, onChange } = props;
5481
5469
  const _context = { ...(0, import_utils9.evalJSONContext)(actionData?.context) };
5482
5470
  const contextObject = { ...context, ..._context };
5483
- const defaultPriority = parseInt(value) + 1;
5484
- const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
5485
5471
  const { mutateAsync: fetchSave } = (0, import_hooks14.useSave)();
5486
5472
  const savePriorities = async ({
5487
- value: value2,
5473
+ value,
5488
5474
  resetPriority
5489
5475
  }) => {
5490
- const priorityValue = value2 <= 0 ? 0 : value2 - 1;
5476
+ const priorityValue = value <= 0 ? 0 : value - 1;
5491
5477
  try {
5492
5478
  fetchSave({
5493
5479
  ids: id ? [id] : [],
@@ -5505,14 +5491,7 @@ var priorityFieldController = (props) => {
5505
5491
  }
5506
5492
  };
5507
5493
  return {
5508
- selection,
5509
- isForm,
5510
- methods,
5511
- defaultPriority,
5512
- savePriorities,
5513
- label,
5514
- id,
5515
- onChange
5494
+ savePriorities
5516
5495
  };
5517
5496
  };
5518
5497
 
package/dist/widget.mjs CHANGED
@@ -5480,29 +5480,15 @@ var durationController = (props) => {
5480
5480
  import { useSave as useSave2 } from "@fctc/interface-logic/hooks";
5481
5481
  import { evalJSONContext as evalJSONContext6 } from "@fctc/interface-logic/utils";
5482
5482
  var priorityFieldController = (props) => {
5483
- const {
5484
- value,
5485
- isForm,
5486
- name,
5487
- methods,
5488
- onChange,
5489
- model,
5490
- selection,
5491
- id,
5492
- actionData,
5493
- viewData,
5494
- context
5495
- } = props;
5483
+ const { name, model, id, actionData, context, onChange } = props;
5496
5484
  const _context = { ...evalJSONContext6(actionData?.context) };
5497
5485
  const contextObject = { ...context, ..._context };
5498
- const defaultPriority = parseInt(value) + 1;
5499
- const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
5500
5486
  const { mutateAsync: fetchSave } = useSave2();
5501
5487
  const savePriorities = async ({
5502
- value: value2,
5488
+ value,
5503
5489
  resetPriority
5504
5490
  }) => {
5505
- const priorityValue = value2 <= 0 ? 0 : value2 - 1;
5491
+ const priorityValue = value <= 0 ? 0 : value - 1;
5506
5492
  try {
5507
5493
  fetchSave({
5508
5494
  ids: id ? [id] : [],
@@ -5520,14 +5506,7 @@ var priorityFieldController = (props) => {
5520
5506
  }
5521
5507
  };
5522
5508
  return {
5523
- selection,
5524
- isForm,
5525
- methods,
5526
- defaultPriority,
5527
- savePriorities,
5528
- label,
5529
- id,
5530
- onChange
5509
+ savePriorities
5531
5510
  };
5532
5511
  };
5533
5512
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/widget-logic",
3
- "version": "1.9.8",
3
+ "version": "1.9.9",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",