@fctc/interface-logic 1.5.8 → 1.6.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/utils.mjs CHANGED
@@ -1,43 +1,6 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __pow = Math.pow;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
- var __spreadValues = (a, b) => {
8
- for (var prop in b || (b = {}))
9
- if (__hasOwnProp.call(b, prop))
10
- __defNormalProp(a, prop, b[prop]);
11
- if (__getOwnPropSymbols)
12
- for (var prop of __getOwnPropSymbols(b)) {
13
- if (__propIsEnum.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- }
16
- return a;
17
- };
18
- var __async = (__this, __arguments, generator) => {
19
- return new Promise((resolve, reject) => {
20
- var fulfilled = (value) => {
21
- try {
22
- step(generator.next(value));
23
- } catch (e) {
24
- reject(e);
25
- }
26
- };
27
- var rejected = (value) => {
28
- try {
29
- step(generator.throw(value));
30
- } catch (e) {
31
- reject(e);
32
- }
33
- };
34
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35
- step((generator = generator.apply(__this, __arguments)).next());
36
- });
37
- };
38
-
39
1
  // src/utils/error-handler.ts
40
2
  var WesapError = class extends Error {
3
+ code;
41
4
  constructor(message, code) {
42
5
  super(message);
43
6
  this.code = code;
@@ -1424,6 +1387,22 @@ var PyRelativeDelta = class _PyRelativeDelta {
1424
1387
  this.microsecond = params.microsecond;
1425
1388
  this.weekday = params.weekday;
1426
1389
  }
1390
+ years;
1391
+ months;
1392
+ days;
1393
+ hours;
1394
+ minutes;
1395
+ seconds;
1396
+ microseconds;
1397
+ leapDays;
1398
+ year;
1399
+ month;
1400
+ day;
1401
+ hour;
1402
+ minute;
1403
+ second;
1404
+ microsecond;
1405
+ weekday;
1427
1406
  negate() {
1428
1407
  return new _PyRelativeDelta(this, -1);
1429
1408
  }
@@ -1538,7 +1517,7 @@ function execOnIterable(iterable, func) {
1538
1517
  if (typeof iterable === "object" && !Array.isArray(iterable) && !(iterable instanceof Set)) {
1539
1518
  iterable = Object.keys(iterable);
1540
1519
  }
1541
- if (typeof (iterable == null ? void 0 : iterable[Symbol.iterator]) !== "function") {
1520
+ if (typeof iterable?.[Symbol.iterator] !== "function") {
1542
1521
  throw new EvaluationError("value not iterable");
1543
1522
  }
1544
1523
  return func(iterable);
@@ -1861,7 +1840,7 @@ function applyBinaryOp(ast, context) {
1861
1840
  }
1862
1841
  return Math.floor(left / right);
1863
1842
  case "**":
1864
- return __pow(left, right);
1843
+ return left ** right;
1865
1844
  case "==":
1866
1845
  return isEqual(left, right);
1867
1846
  case "<>":
@@ -1983,7 +1962,7 @@ function evaluate(ast, context = {}) {
1983
1962
  const dicts = /* @__PURE__ */ new Set();
1984
1963
  let pyContext;
1985
1964
  const evalContext = Object.create(context);
1986
- if (!(evalContext == null ? void 0 : evalContext.context)) {
1965
+ if (!evalContext?.context) {
1987
1966
  Object.defineProperty(evalContext, "context", {
1988
1967
  get() {
1989
1968
  if (!pyContext) {
@@ -1994,18 +1973,17 @@ function evaluate(ast, context = {}) {
1994
1973
  });
1995
1974
  }
1996
1975
  function _innerEvaluate(ast2) {
1997
- var _a, _b, _c;
1998
- switch (ast2 == null ? void 0 : ast2.type) {
1976
+ switch (ast2?.type) {
1999
1977
  case 0:
2000
1978
  // Number
2001
1979
  case 1:
2002
1980
  return ast2.value;
2003
1981
  case 5:
2004
1982
  if (ast2.value in evalContext) {
2005
- if (typeof evalContext[ast2.value] === "object" && ((_a = evalContext[ast2.value]) == null ? void 0 : _a.id)) {
2006
- return (_b = evalContext[ast2.value]) == null ? void 0 : _b.id;
1983
+ if (typeof evalContext[ast2.value] === "object" && evalContext[ast2.value]?.id) {
1984
+ return evalContext[ast2.value]?.id;
2007
1985
  }
2008
- return (_c = evalContext[ast2.value]) != null ? _c : false;
1986
+ return evalContext[ast2.value] ?? false;
2009
1987
  } else if (ast2.value in BUILTINS) {
2010
1988
  return BUILTINS[ast2.value];
2011
1989
  } else {
@@ -2042,7 +2020,7 @@ function evaluate(ast, context = {}) {
2042
2020
  const args = ast2.args.map(_evaluate);
2043
2021
  const kwargs = {};
2044
2022
  for (const kwarg in ast2.kwargs) {
2045
- kwargs[kwarg] = _evaluate(ast2 == null ? void 0 : ast2.kwargs[kwarg]);
2023
+ kwargs[kwarg] = _evaluate(ast2?.kwargs[kwarg]);
2046
2024
  }
2047
2025
  if (fnValue === PyDate || fnValue === PyDateTime || fnValue === PyTime || fnValue === PyRelativeDelta || fnValue === PyTimeDelta) {
2048
2026
  return fnValue.create(...args, kwargs);
@@ -2135,7 +2113,7 @@ function evalPartialContext(_context, evaluationContext = {}) {
2135
2113
  const value = ast.value[key];
2136
2114
  try {
2137
2115
  context[key] = evaluate(value, evaluationContext);
2138
- } catch (e) {
2116
+ } catch {
2139
2117
  }
2140
2118
  }
2141
2119
  return context;
@@ -2163,25 +2141,9 @@ function escapeRegExp(str) {
2163
2141
  var InvalidDomainError = class extends Error {
2164
2142
  };
2165
2143
  var Domain = class _Domain {
2166
- constructor(descr = []) {
2167
- this.ast = { type: -1, value: null };
2168
- if (descr instanceof _Domain) {
2169
- return new _Domain(descr.toString());
2170
- } else {
2171
- let rawAST;
2172
- try {
2173
- rawAST = typeof descr === "string" ? parseExpr(descr) : toAST(descr);
2174
- } catch (error) {
2175
- throw new InvalidDomainError(
2176
- `Invalid domain representation: ${descr}`,
2177
- {
2178
- cause: error
2179
- }
2180
- );
2181
- }
2182
- this.ast = normalizeDomainAST(rawAST);
2183
- }
2184
- }
2144
+ ast = { type: -1, value: null };
2145
+ static TRUE;
2146
+ static FALSE;
2185
2147
  static combine(domains, operator) {
2186
2148
  if (domains.length === 0) {
2187
2149
  return new _Domain([]);
@@ -2260,6 +2222,24 @@ var Domain = class _Domain {
2260
2222
  processLeaf(d.ast.value, 0, "&", newDomain);
2261
2223
  return newDomain;
2262
2224
  }
2225
+ constructor(descr = []) {
2226
+ if (descr instanceof _Domain) {
2227
+ return new _Domain(descr.toString());
2228
+ } else {
2229
+ let rawAST;
2230
+ try {
2231
+ rawAST = typeof descr === "string" ? parseExpr(descr) : toAST(descr);
2232
+ } catch (error) {
2233
+ throw new InvalidDomainError(
2234
+ `Invalid domain representation: ${descr}`,
2235
+ {
2236
+ cause: error
2237
+ }
2238
+ );
2239
+ }
2240
+ this.ast = normalizeDomainAST(rawAST);
2241
+ }
2242
+ }
2263
2243
  contains(record) {
2264
2244
  const expr = evaluate(this.ast, record);
2265
2245
  return matchDomain(record, expr);
@@ -2278,7 +2258,7 @@ var Domain = class _Domain {
2278
2258
  return evaluatedAsList;
2279
2259
  }
2280
2260
  return this.toString();
2281
- } catch (e) {
2261
+ } catch {
2282
2262
  return this.toString();
2283
2263
  }
2284
2264
  }
@@ -2502,7 +2482,7 @@ var checkDomain = (context, domain) => {
2502
2482
  };
2503
2483
  var matchDomains = (context, domains) => {
2504
2484
  if (Array.isArray(domains)) {
2505
- if ((domains == null ? void 0 : domains.length) > 0) {
2485
+ if (domains?.length > 0) {
2506
2486
  return domains && domains.some((domain) => checkDomain(context, domain));
2507
2487
  }
2508
2488
  } else return checkDomain(context, domains);
@@ -2519,17 +2499,15 @@ var evalJSONContext = (_context, context = {}) => {
2519
2499
  }
2520
2500
  };
2521
2501
  var evalJSONDomain = (domain, context) => {
2522
- var _a;
2523
2502
  try {
2524
2503
  if (context) {
2525
- (_a = Object.keys(context)) == null ? void 0 : _a.forEach((key) => {
2526
- var _a2, _b;
2504
+ Object.keys(context)?.forEach((key) => {
2527
2505
  if (Array.isArray(context[key])) {
2528
- const isTypeObject = (_a2 = context[key]) == null ? void 0 : _a2.every(
2529
- (item) => typeof item === "object" && item !== null && (item == null ? void 0 : item.id) !== void 0
2506
+ const isTypeObject = context[key]?.every(
2507
+ (item) => typeof item === "object" && item !== null && item?.id !== void 0
2530
2508
  );
2531
2509
  if (isTypeObject) {
2532
- context[key] = (_b = context[key]) == null ? void 0 : _b.map((item) => item == null ? void 0 : item.id);
2510
+ context[key] = context[key]?.map((item) => item?.id);
2533
2511
  }
2534
2512
  }
2535
2513
  });
@@ -2549,7 +2527,7 @@ var formatSortingString = (input) => {
2549
2527
  if (!input) return null;
2550
2528
  return input.split(",").map((field) => {
2551
2529
  const [key, order] = field.trim().split(/\s+/);
2552
- const sortOrder = (order == null ? void 0 : order.toUpperCase()) === "DESC" ? "DESC" : "ASC";
2530
+ const sortOrder = order?.toUpperCase() === "DESC" ? "DESC" : "ASC";
2553
2531
  return `${key} ${sortOrder}`;
2554
2532
  }).join(", ");
2555
2533
  };
@@ -2593,11 +2571,11 @@ var getFieldsOnChange = (fields) => {
2593
2571
  function traverse(items) {
2594
2572
  for (const item of items) {
2595
2573
  if (item) {
2596
- if ((item == null ? void 0 : item.type_co) === "field" && matchDomains(fields, item == null ? void 0 : item.on_change)) {
2574
+ if (item?.type_co === "field" && matchDomains(fields, item?.on_change)) {
2597
2575
  result.push(item.name);
2598
2576
  }
2599
- if ((item == null ? void 0 : item.fields) && Array.isArray(item == null ? void 0 : item.fields)) {
2600
- traverse(item == null ? void 0 : item.fields);
2577
+ if (item?.fields && Array.isArray(item?.fields)) {
2578
+ traverse(item?.fields);
2601
2579
  }
2602
2580
  }
2603
2581
  }
@@ -2613,42 +2591,39 @@ var filterFieldDirty = ({
2613
2591
  model,
2614
2592
  defaultData
2615
2593
  }) => {
2616
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
2617
- const data = id ? __spreadValues({}, dirtyFields) : __spreadValues({}, formValues);
2594
+ const data = id ? { ...dirtyFields } : { ...formValues };
2618
2595
  for (const key in data) {
2619
- if (((_c = (_b = (_a = viewData == null ? void 0 : viewData.models) == null ? void 0 : _a[model]) == null ? void 0 : _b[key]) == null ? void 0 : _c.type) === "one2many" /* ONE2MANY */) {
2596
+ if (viewData?.models?.[model]?.[key]?.type === "one2many" /* ONE2MANY */) {
2620
2597
  const lineData = [];
2621
- ((_d = formValues[key]) != null ? _d : []).forEach((itemData, index) => {
2622
- var _a2, _b2, _c2, _d2;
2623
- if (typeof (itemData == null ? void 0 : itemData.id) === "string" && (itemData == null ? void 0 : itemData.id.includes("virtual"))) {
2624
- itemData == null ? true : delete itemData.id;
2598
+ (formValues[key] ?? []).forEach((itemData, index) => {
2599
+ if (typeof itemData?.id === "string" && itemData?.id.includes("virtual")) {
2600
+ delete itemData?.id;
2625
2601
  }
2626
- if (!(itemData == null ? void 0 : itemData.id)) {
2602
+ if (!itemData?.id) {
2627
2603
  lineData.push([
2628
2604
  0 /* CREATE */,
2629
2605
  `virtual_${index}`,
2630
2606
  filterFieldDirty({
2631
- id: itemData == null ? void 0 : itemData.id,
2607
+ id: itemData?.id,
2632
2608
  viewData,
2633
2609
  formValues: itemData,
2634
2610
  dirtyFields: {},
2635
- model: (_c2 = (_b2 = (_a2 = viewData == null ? void 0 : viewData.models) == null ? void 0 : _a2[model]) == null ? void 0 : _b2[key]) == null ? void 0 : _c2.relation,
2611
+ model: viewData?.models?.[model]?.[key]?.relation,
2636
2612
  defaultData
2637
2613
  })
2638
2614
  ]);
2639
- } else if ((_d2 = dirtyFields[key]) == null ? void 0 : _d2.length) {
2615
+ } else if (dirtyFields[key]?.length) {
2640
2616
  dirtyFields[key].forEach((itemDirty, indexDirty) => {
2641
- var _a3, _b3, _c3;
2642
2617
  if (Object.values(itemDirty).includes(true) && indexDirty === index) {
2643
2618
  lineData.push([
2644
2619
  1 /* UPDATE */,
2645
- itemData == null ? void 0 : itemData.id,
2620
+ itemData?.id,
2646
2621
  filterFieldDirty({
2647
- id: itemData == null ? void 0 : itemData.id,
2622
+ id: itemData?.id,
2648
2623
  viewData,
2649
2624
  formValues: itemData,
2650
2625
  dirtyFields: itemDirty,
2651
- model: (_c3 = (_b3 = (_a3 = viewData == null ? void 0 : viewData.models) == null ? void 0 : _a3[model]) == null ? void 0 : _b3[key]) == null ? void 0 : _c3.relation,
2626
+ model: viewData?.models?.[model]?.[key]?.relation,
2652
2627
  defaultData: {}
2653
2628
  })
2654
2629
  ]);
@@ -2656,39 +2631,37 @@ var filterFieldDirty = ({
2656
2631
  });
2657
2632
  }
2658
2633
  });
2659
- ((_e = defaultData[key]) != null ? _e : []).forEach((item) => {
2660
- var _a2;
2661
- if (!((_a2 = formValues[key]) != null ? _a2 : []).find(
2662
- (itemData) => (itemData == null ? void 0 : itemData.id) === (item == null ? void 0 : item.id)
2634
+ (defaultData[key] ?? []).forEach((item) => {
2635
+ if (!(formValues[key] ?? []).find(
2636
+ (itemData) => itemData?.id === item?.id
2663
2637
  )) {
2664
- lineData.push([2 /* DELETE */, item == null ? void 0 : item.id, item]);
2638
+ lineData.push([2 /* DELETE */, item?.id, item]);
2665
2639
  }
2666
2640
  });
2667
2641
  data[key] = lineData;
2668
- } else if (((_h = (_g = (_f = viewData == null ? void 0 : viewData.models) == null ? void 0 : _f[model]) == null ? void 0 : _g[key]) == null ? void 0 : _h.type) === "many2many" /* MANY2MANY */) {
2642
+ } else if (viewData?.models?.[model]?.[key]?.type === "many2many" /* MANY2MANY */) {
2669
2643
  const lineData = [];
2670
2644
  (formValues[key] || []).forEach((itemData) => {
2671
- if (itemData == null ? void 0 : itemData.id) {
2672
- lineData.push([4 /* NO_CHANGE */, itemData == null ? void 0 : itemData.id]);
2645
+ if (itemData?.id) {
2646
+ lineData.push([4 /* NO_CHANGE */, itemData?.id]);
2673
2647
  }
2674
2648
  });
2675
- ((_i = defaultData[key]) != null ? _i : []).forEach((item) => {
2676
- var _a2;
2677
- if (!((_a2 = formValues[key]) != null ? _a2 : []).find(
2678
- (itemData) => (itemData == null ? void 0 : itemData.id) === (item == null ? void 0 : item.id)
2649
+ (defaultData[key] ?? []).forEach((item) => {
2650
+ if (!(formValues[key] ?? []).find(
2651
+ (itemData) => itemData?.id === item?.id
2679
2652
  )) {
2680
- lineData.push([3 /* UNLINK */, item == null ? void 0 : item.id]);
2653
+ lineData.push([3 /* UNLINK */, item?.id]);
2681
2654
  }
2682
2655
  });
2683
2656
  data[key] = lineData;
2684
2657
  } else {
2685
- if (id && (typeof (dirtyFields == null ? void 0 : dirtyFields[key]) === "object" && !((_j = dirtyFields == null ? void 0 : dirtyFields[key]) == null ? void 0 : _j.id) || typeof dirtyFields[key] !== "object" && !dirtyFields[key])) {
2658
+ if (id && (typeof dirtyFields?.[key] === "object" && !dirtyFields?.[key]?.id || typeof dirtyFields[key] !== "object" && !dirtyFields[key])) {
2686
2659
  delete data[key];
2687
2660
  } else {
2688
2661
  if (!data[key]) {
2689
2662
  delete data[key];
2690
2663
  } else {
2691
- data[key] = ((_k = formValues == null ? void 0 : formValues[key]) == null ? void 0 : _k.display_name) ? (_l = formValues == null ? void 0 : formValues[key]) == null ? void 0 : _l.id : formValues == null ? void 0 : formValues[key];
2664
+ data[key] = formValues?.[key]?.display_name ? formValues?.[key]?.id : formValues?.[key];
2692
2665
  }
2693
2666
  }
2694
2667
  }
@@ -2697,12 +2670,15 @@ var filterFieldDirty = ({
2697
2670
  };
2698
2671
  var mergeObjects = (object1, object2) => {
2699
2672
  if (!object1 || !object2) return void 0;
2700
- const mergedObject = __spreadValues({}, object2);
2673
+ const mergedObject = { ...object2 };
2701
2674
  Object.keys(object1).forEach((key) => {
2702
2675
  if (Array.isArray(object1[key]) && Array.isArray(object2[key])) {
2703
2676
  mergedObject[key] = object2[key].map((item, index) => {
2704
2677
  if (object1[key][index]) {
2705
- return __spreadValues(__spreadValues({}, item), object1[key][index]);
2678
+ return {
2679
+ ...item,
2680
+ ...object1[key][index]
2681
+ };
2706
2682
  }
2707
2683
  return item;
2708
2684
  });
@@ -2744,15 +2720,14 @@ var removeUndefinedFields = (obj) => {
2744
2720
  return newObj;
2745
2721
  };
2746
2722
  var useTabModel = (viewData, onchangeData) => {
2747
- var _a, _b, _c;
2748
- const tabsData = ((_c = (_b = (_a = viewData == null ? void 0 : viewData.views) == null ? void 0 : _a.form) == null ? void 0 : _b.tabs) == null ? void 0 : _c.filter((val) => {
2723
+ const tabsData = viewData?.views?.form?.tabs?.filter((val) => {
2749
2724
  if (!val) return null;
2750
2725
  const hide = checkDomain(onchangeData, val.invisible);
2751
2726
  if (!hide) {
2752
2727
  return val;
2753
2728
  }
2754
2729
  return false;
2755
- })) || [];
2730
+ }) || [];
2756
2731
  return tabsData;
2757
2732
  };
2758
2733
  var isBase64File = (str) => {
@@ -2793,7 +2768,7 @@ var formatFileSize = (size) => {
2793
2768
  return `${(size / Math.pow(1024, i)).toFixed(2)} ${sizes[i]}`;
2794
2769
  };
2795
2770
  var getSubdomain = (url = window.location.href) => {
2796
- const parts = url == null ? void 0 : url.split(".");
2771
+ const parts = url?.split(".");
2797
2772
  if (parts.length > 2) {
2798
2773
  return parts[0].replace("https://", "").replace("http://", "");
2799
2774
  }
@@ -2816,9 +2791,9 @@ var getOffSet = (arr, start, end) => {
2816
2791
  }
2817
2792
  return arr.slice(0, start).length;
2818
2793
  };
2819
- var copyTextToClipboard = (text) => __async(null, null, function* () {
2794
+ var copyTextToClipboard = async (text) => {
2820
2795
  if ("clipboard" in navigator) {
2821
- return yield navigator.clipboard.writeText(text);
2796
+ return await navigator.clipboard.writeText(text);
2822
2797
  } else {
2823
2798
  const textArea = document.createElement("textarea");
2824
2799
  textArea.value = text;
@@ -2832,7 +2807,7 @@ var copyTextToClipboard = (text) => __async(null, null, function* () {
2832
2807
  document.body.removeChild(textArea);
2833
2808
  }
2834
2809
  }
2835
- });
2810
+ };
2836
2811
  var updateTokenParamInOriginalRequest = (originalRequest, newAccessToken) => {
2837
2812
  if (!originalRequest.data) return originalRequest.data;
2838
2813
  if (typeof originalRequest.data === "string") {
@@ -2868,7 +2843,7 @@ var useField = (props) => {
2868
2843
  index,
2869
2844
  name
2870
2845
  } = props;
2871
- const nameField = rootField ? `${rootField == null ? void 0 : rootField.name}.${index}.${name}` : null;
2846
+ const nameField = rootField ? `${rootField?.name}.${index}.${name}` : null;
2872
2847
  useEffect(() => {
2873
2848
  if (onchangeData && Object.keys(onchangeData).length > 0) {
2874
2849
  setRequired(
package/package.json CHANGED
@@ -1,82 +1,81 @@
1
- {
2
- "name": "@fctc/interface-logic",
3
- "version": "1.5.8",
4
- "types": "dist/index.d.ts",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
7
- "type": "commonjs",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.cjs"
13
- },
14
- "./configs": {
15
- "types": "./dist/configs.d.ts",
16
- "import": "./dist/configs.mjs",
17
- "require": "./dist/configs.cjs"
18
- },
19
- "./constants": {
20
- "types": "./dist/constants.d.ts",
21
- "import": "./dist/constants.mjs",
22
- "require": "./dist/constants.cjs"
23
- },
24
- "./environment": {
25
- "types": "./dist/environment.d.ts",
26
- "import": "./dist/environment.mjs",
27
- "require": "./dist/environment.cjs"
28
- },
29
- "./hooks": {
30
- "types": "./dist/hooks.d.ts",
31
- "import": "./dist/hooks.mjs",
32
- "require": "./dist/hooks.cjs"
33
- },
34
- "./provider": {
35
- "types": "./dist/provider.d.ts",
36
- "import": "./dist/provider.mjs",
37
- "require": "./dist/provider.cjs"
38
- },
39
- "./services": {
40
- "types": "./dist/services.d.ts",
41
- "import": "./dist/services.mjs",
42
- "require": "./dist/services.cjs"
43
- },
44
- "./store": {
45
- "types": "./dist/store.d.ts",
46
- "import": "./dist/store.mjs",
47
- "require": "./dist/store.cjs"
48
- },
49
- "./utils": {
50
- "types": "./dist/utils.d.ts",
51
- "import": "./dist/utils.mjs",
52
- "require": "./dist/utils.cjs"
53
- },
54
- "./types": {
55
- "types": "./dist/types.d.ts",
56
- "import": "./dist/types.mjs",
57
- "require": "./dist/types.cjs"
58
- }
59
- },
60
- "files": [
61
- "dist"
62
- ],
63
- "scripts": {
64
- "build": "tsup",
65
- "test": "jest"
66
- },
67
- "dependencies": {
68
- "@reduxjs/toolkit": "^2.8.2",
69
- "@tanstack/react-query": "^5.83.0",
70
- "axios": "^1.11.0",
71
- "moment": "^2.30.1",
72
- "react-redux": "^9.2.0"
73
- },
74
- "devDependencies": {
75
- "@types/react": "^18.3.1",
76
- "react": "18.0.0",
77
- "jest": "^29.7.0",
78
- "tsup": "^8.0.0",
79
- "typescript": "^5.8.2"
80
- },
81
- "packageManager": "yarn@1.22.0"
82
- }
1
+ {
2
+ "name": "@fctc/interface-logic",
3
+ "version": "1.6.0",
4
+ "types": "dist/index.d.ts",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./configs": {
14
+ "types": "./dist/configs.d.ts",
15
+ "import": "./dist/configs.mjs",
16
+ "require": "./dist/configs.cjs"
17
+ },
18
+ "./constants": {
19
+ "types": "./dist/constants.d.ts",
20
+ "import": "./dist/constants.mjs",
21
+ "require": "./dist/constants.cjs"
22
+ },
23
+ "./environment": {
24
+ "types": "./dist/environment.d.ts",
25
+ "import": "./dist/environment.mjs",
26
+ "require": "./dist/environment.cjs"
27
+ },
28
+ "./hooks": {
29
+ "types": "./dist/hooks.d.ts",
30
+ "import": "./dist/hooks.mjs",
31
+ "require": "./dist/hooks.cjs"
32
+ },
33
+ "./provider": {
34
+ "types": "./dist/provider.d.ts",
35
+ "import": "./dist/provider.mjs",
36
+ "require": "./dist/provider.cjs"
37
+ },
38
+ "./services": {
39
+ "types": "./dist/services.d.ts",
40
+ "import": "./dist/services.mjs",
41
+ "require": "./dist/services.cjs"
42
+ },
43
+ "./store": {
44
+ "types": "./dist/store.d.ts",
45
+ "import": "./dist/store.mjs",
46
+ "require": "./dist/store.cjs"
47
+ },
48
+ "./utils": {
49
+ "types": "./dist/utils.d.ts",
50
+ "import": "./dist/utils.mjs",
51
+ "require": "./dist/utils.cjs"
52
+ },
53
+ "./types": {
54
+ "types": "./dist/types.d.ts",
55
+ "import": "./dist/types.mjs",
56
+ "require": "./dist/types.cjs"
57
+ }
58
+ },
59
+ "files": [
60
+ "dist"
61
+ ],
62
+ "scripts": {
63
+ "build": "tsup",
64
+ "test": "jest"
65
+ },
66
+ "dependencies": {
67
+ "@reduxjs/toolkit": "^2.8.2",
68
+ "@tanstack/react-query": "^5.83.0",
69
+ "axios": "^1.11.0",
70
+ "moment": "^2.30.1",
71
+ "react-redux": "^9.2.0"
72
+ },
73
+ "devDependencies": {
74
+ "@types/react": "^18.3.1",
75
+ "react": "18.0.0",
76
+ "jest": "^29.7.0",
77
+ "tsup": "^8.0.0",
78
+ "typescript": "^5.8.2"
79
+ },
80
+ "packageManager": "yarn@1.22.0"
81
+ }