@inspirer-dev/crm-dashboard 1.0.7 → 1.0.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.
@@ -21,10 +21,12 @@ import {
21
21
  import { Layouts } from '@strapi/admin/strapi-admin';
22
22
 
23
23
  const getBackendUrl = (): string => {
24
- const raw = process.env.STRAPI_ADMIN_BACKEND_URL || 'http://localhost:3100';
24
+ // NOTE: do NOT use STRAPI_ADMIN_BACKEND_URL here — that is reserved for Strapi itself
25
+ // and will break admin if pointed to another service.
26
+ const raw = process.env.STRAPI_ADMIN_CRM_BACKEND_URL || 'http://localhost:3100/api';
25
27
 
26
28
  if (!/^https?:\/\//i.test(raw)) {
27
- return 'http://localhost:3100';
29
+ return 'http://localhost:3100/api';
28
30
  }
29
31
 
30
32
  return raw.endsWith('/') ? raw.slice(0, -1) : raw;
@@ -235,9 +237,7 @@ const AntiSpamLogsTable: React.FC = () => {
235
237
  });
236
238
 
237
239
  const backendUrl = getBackendUrl();
238
- const res = await fetch(
239
- new URL(`/crm/anti-spam-logs?${params}`, backendUrl).toString(),
240
- );
240
+ const res = await fetch(new URL(`/crm/anti-spam-logs?${params}`, backendUrl).toString());
241
241
  if (res.ok) {
242
242
  const data = await res.json();
243
243
  setLogs(data.data || []);
@@ -16950,9 +16950,9 @@ const usersService = adminApi.enhanceEndpoints({
16950
16950
  });
16951
16951
  const { useCreateUserMutation, useGetUsersQuery, useUpdateUserMutation, useDeleteManyUsersMutation, useGetRolesQuery, useCreateRoleMutation, useUpdateRoleMutation, useGetRolePermissionsQuery, useGetRolePermissionLayoutQuery, useUpdateRolePermissionsMutation } = usersService;
16952
16952
  const getBackendUrl = () => {
16953
- const raw = process.env.STRAPI_ADMIN_BACKEND_URL || "http://localhost:3100";
16953
+ const raw = process.env.STRAPI_ADMIN_CRM_BACKEND_URL || "http://localhost:3100/api";
16954
16954
  if (!/^https?:\/\//i.test(raw)) {
16955
- return "http://localhost:3100";
16955
+ return "http://localhost:3100/api";
16956
16956
  }
16957
16957
  return raw.endsWith("/") ? raw.slice(0, -1) : raw;
16958
16958
  };
@@ -17099,9 +17099,7 @@ const AntiSpamLogsTable = () => {
17099
17099
  pageSize: "20"
17100
17100
  });
17101
17101
  const backendUrl = getBackendUrl();
17102
- const res = await fetch(
17103
- new URL(`/crm/anti-spam-logs?${params}`, backendUrl).toString()
17104
- );
17102
+ const res = await fetch(new URL(`/crm/anti-spam-logs?${params}`, backendUrl).toString());
17105
17103
  if (res.ok) {
17106
17104
  const data = await res.json();
17107
17105
  setLogs(data.data || []);
@@ -5034,7 +5034,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
5034
5034
  var ys = arrObjKeys(obj, inspect2);
5035
5035
  var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
5036
5036
  var protoTag = obj instanceof Object ? "" : "null prototype";
5037
- var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
5037
+ var stringTag2 = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
5038
5038
  var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
5039
5039
  var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat$1.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
5040
5040
  if (ys.length === 0) {
@@ -5059,25 +5059,25 @@ function canTrustToString(obj) {
5059
5059
  return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
5060
5060
  }
5061
5061
  function isArray$8(obj) {
5062
- return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
5062
+ return toStr(obj) === "[object Array]" && canTrustToString(obj);
5063
5063
  }
5064
5064
  function isDate$1(obj) {
5065
- return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
5065
+ return toStr(obj) === "[object Date]" && canTrustToString(obj);
5066
5066
  }
5067
5067
  function isRegExp$1(obj) {
5068
- return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
5068
+ return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
5069
5069
  }
5070
5070
  function isError$1(obj) {
5071
- return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
5071
+ return toStr(obj) === "[object Error]" && canTrustToString(obj);
5072
5072
  }
5073
5073
  function isString(obj) {
5074
- return toStr$1(obj) === "[object String]" && canTrustToString(obj);
5074
+ return toStr(obj) === "[object String]" && canTrustToString(obj);
5075
5075
  }
5076
5076
  function isNumber(obj) {
5077
- return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
5077
+ return toStr(obj) === "[object Number]" && canTrustToString(obj);
5078
5078
  }
5079
5079
  function isBoolean(obj) {
5080
- return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
5080
+ return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
5081
5081
  }
5082
5082
  function isSymbol$2(obj) {
5083
5083
  if (hasShammedSymbols) {
@@ -5113,7 +5113,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
5113
5113
  function has$5(obj, key) {
5114
5114
  return hasOwn$1.call(obj, key);
5115
5115
  }
5116
- function toStr$1(obj) {
5116
+ function toStr(obj) {
5117
5117
  return objectToString.call(obj);
5118
5118
  }
5119
5119
  function nameOf(f2) {
@@ -5422,7 +5422,7 @@ var syntax = SyntaxError;
5422
5422
  var uri = URIError;
5423
5423
  var abs$1 = Math.abs;
5424
5424
  var floor$1 = Math.floor;
5425
- var max$2 = Math.max;
5425
+ var max$1 = Math.max;
5426
5426
  var min$1 = Math.min;
5427
5427
  var pow$1 = Math.pow;
5428
5428
  var round$1 = Math.round;
@@ -5551,78 +5551,99 @@ function requireObject_getPrototypeOf() {
5551
5551
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
5552
5552
  return Object_getPrototypeOf;
5553
5553
  }
5554
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
5555
- var toStr = Object.prototype.toString;
5556
- var max$1 = Math.max;
5557
- var funcType = "[object Function]";
5558
- var concatty = function concatty2(a2, b2) {
5559
- var arr = [];
5560
- for (var i2 = 0; i2 < a2.length; i2 += 1) {
5561
- arr[i2] = a2[i2];
5562
- }
5563
- for (var j2 = 0; j2 < b2.length; j2 += 1) {
5564
- arr[j2 + a2.length] = b2[j2];
5565
- }
5566
- return arr;
5567
- };
5568
- var slicy = function slicy2(arrLike, offset) {
5569
- var arr = [];
5570
- for (var i2 = offset, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
5571
- arr[j2] = arrLike[i2];
5572
- }
5573
- return arr;
5574
- };
5575
- var joiny = function(arr, joiner) {
5576
- var str = "";
5577
- for (var i2 = 0; i2 < arr.length; i2 += 1) {
5578
- str += arr[i2];
5579
- if (i2 + 1 < arr.length) {
5580
- str += joiner;
5554
+ var implementation;
5555
+ var hasRequiredImplementation;
5556
+ function requireImplementation() {
5557
+ if (hasRequiredImplementation) return implementation;
5558
+ hasRequiredImplementation = 1;
5559
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
5560
+ var toStr2 = Object.prototype.toString;
5561
+ var max2 = Math.max;
5562
+ var funcType = "[object Function]";
5563
+ var concatty = function concatty2(a2, b2) {
5564
+ var arr = [];
5565
+ for (var i2 = 0; i2 < a2.length; i2 += 1) {
5566
+ arr[i2] = a2[i2];
5581
5567
  }
5582
- }
5583
- return str;
5584
- };
5585
- var implementation$1 = function bind(that) {
5586
- var target = this;
5587
- if (typeof target !== "function" || toStr.apply(target) !== funcType) {
5588
- throw new TypeError(ERROR_MESSAGE + target);
5589
- }
5590
- var args = slicy(arguments, 1);
5591
- var bound;
5592
- var binder = function() {
5593
- if (this instanceof bound) {
5594
- var result = target.apply(
5595
- this,
5596
- concatty(args, arguments)
5597
- );
5598
- if (Object(result) === result) {
5599
- return result;
5568
+ for (var j2 = 0; j2 < b2.length; j2 += 1) {
5569
+ arr[j2 + a2.length] = b2[j2];
5570
+ }
5571
+ return arr;
5572
+ };
5573
+ var slicy = function slicy2(arrLike, offset) {
5574
+ var arr = [];
5575
+ for (var i2 = offset, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
5576
+ arr[j2] = arrLike[i2];
5577
+ }
5578
+ return arr;
5579
+ };
5580
+ var joiny = function(arr, joiner) {
5581
+ var str = "";
5582
+ for (var i2 = 0; i2 < arr.length; i2 += 1) {
5583
+ str += arr[i2];
5584
+ if (i2 + 1 < arr.length) {
5585
+ str += joiner;
5600
5586
  }
5601
- return this;
5602
5587
  }
5603
- return target.apply(
5604
- that,
5605
- concatty(args, arguments)
5606
- );
5588
+ return str;
5607
5589
  };
5608
- var boundLength = max$1(0, target.length - args.length);
5609
- var boundArgs = [];
5610
- for (var i2 = 0; i2 < boundLength; i2++) {
5611
- boundArgs[i2] = "$" + i2;
5612
- }
5613
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
5614
- if (target.prototype) {
5615
- var Empty = function Empty2() {
5590
+ implementation = function bind2(that) {
5591
+ var target = this;
5592
+ if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
5593
+ throw new TypeError(ERROR_MESSAGE + target);
5594
+ }
5595
+ var args = slicy(arguments, 1);
5596
+ var bound;
5597
+ var binder = function() {
5598
+ if (this instanceof bound) {
5599
+ var result = target.apply(
5600
+ this,
5601
+ concatty(args, arguments)
5602
+ );
5603
+ if (Object(result) === result) {
5604
+ return result;
5605
+ }
5606
+ return this;
5607
+ }
5608
+ return target.apply(
5609
+ that,
5610
+ concatty(args, arguments)
5611
+ );
5616
5612
  };
5617
- Empty.prototype = target.prototype;
5618
- bound.prototype = new Empty();
5619
- Empty.prototype = null;
5620
- }
5621
- return bound;
5622
- };
5623
- var implementation = implementation$1;
5624
- var functionBind = Function.prototype.bind || implementation;
5625
- var functionCall = Function.prototype.call;
5613
+ var boundLength = max2(0, target.length - args.length);
5614
+ var boundArgs = [];
5615
+ for (var i2 = 0; i2 < boundLength; i2++) {
5616
+ boundArgs[i2] = "$" + i2;
5617
+ }
5618
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
5619
+ if (target.prototype) {
5620
+ var Empty = function Empty2() {
5621
+ };
5622
+ Empty.prototype = target.prototype;
5623
+ bound.prototype = new Empty();
5624
+ Empty.prototype = null;
5625
+ }
5626
+ return bound;
5627
+ };
5628
+ return implementation;
5629
+ }
5630
+ var functionBind;
5631
+ var hasRequiredFunctionBind;
5632
+ function requireFunctionBind() {
5633
+ if (hasRequiredFunctionBind) return functionBind;
5634
+ hasRequiredFunctionBind = 1;
5635
+ var implementation2 = requireImplementation();
5636
+ functionBind = Function.prototype.bind || implementation2;
5637
+ return functionBind;
5638
+ }
5639
+ var functionCall;
5640
+ var hasRequiredFunctionCall;
5641
+ function requireFunctionCall() {
5642
+ if (hasRequiredFunctionCall) return functionCall;
5643
+ hasRequiredFunctionCall = 1;
5644
+ functionCall = Function.prototype.call;
5645
+ return functionCall;
5646
+ }
5626
5647
  var functionApply;
5627
5648
  var hasRequiredFunctionApply;
5628
5649
  function requireFunctionApply() {
@@ -5632,14 +5653,14 @@ function requireFunctionApply() {
5632
5653
  return functionApply;
5633
5654
  }
5634
5655
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
5635
- var bind$2 = functionBind;
5656
+ var bind$2 = requireFunctionBind();
5636
5657
  var $apply$1 = requireFunctionApply();
5637
- var $call$2 = functionCall;
5658
+ var $call$2 = requireFunctionCall();
5638
5659
  var $reflectApply = reflectApply;
5639
5660
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
5640
- var bind$1 = functionBind;
5661
+ var bind$1 = requireFunctionBind();
5641
5662
  var $TypeError$4 = type;
5642
- var $call$1 = functionCall;
5663
+ var $call$1 = requireFunctionCall();
5643
5664
  var $actualApply = actualApply;
5644
5665
  var callBindApplyHelpers = function callBindBasic(args) {
5645
5666
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -5705,8 +5726,8 @@ function requireHasown() {
5705
5726
  hasRequiredHasown = 1;
5706
5727
  var call = Function.prototype.call;
5707
5728
  var $hasOwn = Object.prototype.hasOwnProperty;
5708
- var bind3 = functionBind;
5709
- hasown = bind3.call(call, $hasOwn);
5729
+ var bind2 = requireFunctionBind();
5730
+ hasown = bind2.call(call, $hasOwn);
5710
5731
  return hasown;
5711
5732
  }
5712
5733
  var undefined$1;
@@ -5720,7 +5741,7 @@ var $TypeError$3 = type;
5720
5741
  var $URIError = uri;
5721
5742
  var abs = abs$1;
5722
5743
  var floor = floor$1;
5723
- var max = max$2;
5744
+ var max = max$1;
5724
5745
  var min = min$1;
5725
5746
  var pow = pow$1;
5726
5747
  var round = round$1;
@@ -5754,7 +5775,7 @@ var getProto = requireGetProto();
5754
5775
  var $ObjectGPO = requireObject_getPrototypeOf();
5755
5776
  var $ReflectGPO = requireReflect_getPrototypeOf();
5756
5777
  var $apply = requireFunctionApply();
5757
- var $call = functionCall;
5778
+ var $call = requireFunctionCall();
5758
5779
  var needsEval = {};
5759
5780
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
5760
5781
  var INTRINSICS = {
@@ -5925,13 +5946,13 @@ var LEGACY_ALIASES = {
5925
5946
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
5926
5947
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
5927
5948
  };
5928
- var bind2 = functionBind;
5949
+ var bind = requireFunctionBind();
5929
5950
  var hasOwn = requireHasown();
5930
- var $concat = bind2.call($call, Array.prototype.concat);
5931
- var $spliceApply = bind2.call($apply, Array.prototype.splice);
5932
- var $replace = bind2.call($call, String.prototype.replace);
5933
- var $strSlice = bind2.call($call, String.prototype.slice);
5934
- var $exec = bind2.call($call, RegExp.prototype.exec);
5951
+ var $concat = bind.call($call, Array.prototype.concat);
5952
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
5953
+ var $replace = bind.call($call, String.prototype.replace);
5954
+ var $strSlice = bind.call($call, String.prototype.slice);
5955
+ var $exec = bind.call($call, RegExp.prototype.exec);
5935
5956
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
5936
5957
  var reEscapeChar = /\\(\\)?/g;
5937
5958
  var stringToPath$1 = function stringToPath(string2) {
@@ -16950,9 +16971,9 @@ const usersService = adminApi.enhanceEndpoints({
16950
16971
  });
16951
16972
  const { useCreateUserMutation, useGetUsersQuery, useUpdateUserMutation, useDeleteManyUsersMutation, useGetRolesQuery, useCreateRoleMutation, useUpdateRoleMutation, useGetRolePermissionsQuery, useGetRolePermissionLayoutQuery, useUpdateRolePermissionsMutation } = usersService;
16952
16973
  const getBackendUrl = () => {
16953
- const raw = process.env.STRAPI_ADMIN_BACKEND_URL || "http://localhost:3100";
16974
+ const raw = process.env.STRAPI_ADMIN_CRM_BACKEND_URL || "http://localhost:3100/api";
16954
16975
  if (!/^https?:\/\//i.test(raw)) {
16955
- return "http://localhost:3100";
16976
+ return "http://localhost:3100/api";
16956
16977
  }
16957
16978
  return raw.endsWith("/") ? raw.slice(0, -1) : raw;
16958
16979
  };
@@ -17099,9 +17120,7 @@ const AntiSpamLogsTable = () => {
17099
17120
  pageSize: "20"
17100
17121
  });
17101
17122
  const backendUrl = getBackendUrl();
17102
- const res = await fetch(
17103
- new URL(`/crm/anti-spam-logs?${params}`, backendUrl).toString()
17104
- );
17123
+ const res = await fetch(new URL(`/crm/anti-spam-logs?${params}`, backendUrl).toString());
17105
17124
  if (res.ok) {
17106
17125
  const data = await res.json();
17107
17126
  setLogs(data.data || []);
@@ -54,7 +54,7 @@ const index = {
54
54
  Component: async () => {
55
55
  const component = await Promise.resolve().then(() => require(
56
56
  /* webpackChunkName: "crm-dashboard-page" */
57
- "../_chunks/index-CFJzc5-t.js"
57
+ "../_chunks/index-CYXNVioH.js"
58
58
  ));
59
59
  return component;
60
60
  },
@@ -53,7 +53,7 @@ const index = {
53
53
  Component: async () => {
54
54
  const component = await import(
55
55
  /* webpackChunkName: "crm-dashboard-page" */
56
- "../_chunks/index-D1piC03o.mjs"
56
+ "../_chunks/index-BWojad6n.mjs"
57
57
  );
58
58
  return component;
59
59
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inspirer-dev/crm-dashboard",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "CRM Dashboard and Tools",
5
5
  "strapi": {
6
6
  "name": "crm-dashboard",