@storecraft/dashboard 1.0.11 → 1.0.13

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/lib/index.js CHANGED
@@ -9008,7 +9008,7 @@ const Xt = ({
9008
9008
  }) => /* @__PURE__ */ f.jsx("div", { ...e, children: /* @__PURE__ */ f.jsx(
9009
9009
  "p",
9010
9010
  {
9011
- className: "--mdx md-view",
9011
+ className: "--mdx md-view overflow-auto",
9012
9012
  dangerouslySetInnerHTML: {
9013
9013
  __html: ut.parse(
9014
9014
  t ?? "",
@@ -9173,6 +9173,7 @@ const Xt = ({
9173
9173
  ${e} ${t}`,
9174
9174
  ...a,
9175
9175
  style: {
9176
+ // @ts-ignore
9176
9177
  "background-clip": "border-box",
9177
9178
  "border-color": "transparent",
9178
9179
  "background-origin": "border-box"
@@ -9546,7 +9547,7 @@ var T0 = Sn.GenIcon, zR = function(e) {
9546
9547
  }, KR = function(e) {
9547
9548
  return S0({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "12", cy: "12", r: "3" } }, { tag: "path", attr: { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" } }] })(e);
9548
9549
  };
9549
- const qR = "@storecraft/dashboard", QR = "1.0.11", ZR = "Storecraft Official Dashboard", XR = "MIT", JR = "Tomer Shalev (https://github.com/store-craft)", ej = "https://github.com/store-craft/storecraft", tj = {
9550
+ const qR = "@storecraft/dashboard", QR = "1.0.12", ZR = "Storecraft Official Dashboard", XR = "MIT", JR = "Tomer Shalev (https://github.com/store-craft)", ej = "https://github.com/store-craft/storecraft", tj = {
9550
9551
  type: "git",
9551
9552
  url: "https://github.com/store-craft/storecraft.git",
9552
9553
  directory: "packages/dashboard"
@@ -9568,13 +9569,12 @@ const qR = "@storecraft/dashboard", QR = "1.0.11", ZR = "Storecraft Official Das
9568
9569
  "dashboard:lib:build": "vite build -c vite.lib.config.js",
9569
9570
  "dashboard:lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
9570
9571
  "dashboard:preview": "vite preview",
9571
- "dashboard:publish": "npm publish --access public",
9572
9572
  "dashboard:analyze": "npx vite-bundle-visualizer -c vite.lib.config.js",
9573
- prepublishOnly: "npm run dashboard:build"
9573
+ prepublishOnly: "npm run dashboard:build && npm version patch --force"
9574
9574
  }, oj = {
9575
9575
  "@storecraft/core": "^1.0.0",
9576
- "@storecraft/sdk": "^0.1.0",
9577
- "@storecraft/sdk-react-hooks": "^0.1.0",
9576
+ "@storecraft/sdk": "^1.0.0",
9577
+ "@storecraft/sdk-react-hooks": "^1.0.0",
9578
9578
  "@uiw/react-md-editor": "^3.18.1",
9579
9579
  "@monaco-editor/react": "^4.6.0",
9580
9580
  "monaco-editor": "^0.48.0",
@@ -13496,10 +13496,7 @@ const qF = E.object({
13496
13496
  type: E.string().optional(),
13497
13497
  name: E.string().optional()
13498
13498
  })
13499
- }).describe(
13500
- `Discount meta data,
13501
- see <a href='#DiscountMetaEnum'>#DiscountMetaEnum</a>`
13502
- ), eB = E.object({
13499
+ }).describe("Discount meta data,"), eB = E.object({
13503
13500
  fixed: E.number().describe("`RegularDiscountExtra` params, Fixed price addition"),
13504
13501
  percent: E.number().describe("`RegularDiscountExtra` params, Percents off")
13505
13502
  }).describe("Parameters of a regular discount"), tB = E.object({
@@ -14265,7 +14262,12 @@ const Zc = {
14265
14262
  Auto: { id: 0, name: "Automatic", name2: "automatic" },
14266
14263
  Manual: { id: 1, name: "Manual", name2: "manual" }
14267
14264
  }, Qt = {
14268
- any: {},
14265
+ any: {
14266
+ id: void 0,
14267
+ name: void 0,
14268
+ op: void 0,
14269
+ type: void 0
14270
+ },
14269
14271
  p_in_collections: {
14270
14272
  id: 0,
14271
14273
  type: "product",
@@ -14339,7 +14341,11 @@ const Zc = {
14339
14341
  name: "Order has Customers"
14340
14342
  }
14341
14343
  }, Er = {
14342
- any: {},
14344
+ any: {
14345
+ id: void 0,
14346
+ type: void 0,
14347
+ name: void 0
14348
+ },
14343
14349
  regular: {
14344
14350
  id: 0,
14345
14351
  type: "regular",
@@ -56088,7 +56094,7 @@ Will be computed automatically if not filled by the product title`,
56088
56094
  }, Gce = ({ ...t }) => /* @__PURE__ */ f.jsxs("div", { ...t, children: [
56089
56095
  /* @__PURE__ */ f.jsxs("div", { className: "flex flex-row gap-2 flex-wrap", children: [
56090
56096
  /* @__PURE__ */ f.jsx(on, { to: "/pages/discounts", draggable: "false", children: /* @__PURE__ */ f.jsx(Ka, { value: "all", bgColor: "bg-pink-400 dark:bg-pink-400/60" }) }),
56091
- Object.values(Er).map(
56097
+ Object.values(Er).filter((e) => !!e.type).map(
56092
56098
  (e) => /* @__PURE__ */ f.jsx(
56093
56099
  on,
56094
56100
  {
@@ -56117,7 +56123,7 @@ Will be computed automatically if not filled by the product title`,
56117
56123
  Ka,
56118
56124
  {
56119
56125
  value: e.name,
56120
- bgColor: Ip(e.type)
56126
+ bgColor: Ip("")
56121
56127
  }
56122
56128
  )
56123
56129
  },
@@ -63475,7 +63481,8 @@ const Lhe = (t) => ((t == null ? void 0 : t.filter((n) => n.type === "product"))
63475
63481
  )
63476
63482
  ] });
63477
63483
  return /* @__PURE__ */ f.jsxs("div", { className: "flex flex-row flex-wrap gap-5 --items-start", children: [
63478
- /* @__PURE__ */ f.jsx("div", { className: "flex flex-col gap-2 --flex-shrink-0 w-fit", children: Object.values(Er).map(
63484
+ /* @__PURE__ */ f.jsx("div", { className: "flex flex-col gap-2 --flex-shrink-0 w-fit", children: Object.values(Er).filter((i) => i.type).map(
63485
+ // @ts-ignore
63479
63486
  (i, s) => /* @__PURE__ */ f.jsx(r, { type: i }, i.type)
63480
63487
  ) }),
63481
63488
  /* @__PURE__ */ f.jsx("div", { className: "pl-5 border-l-2 shelf-border-color flex-1 min-w-[13rem]", children: /* @__PURE__ */ f.jsx(
@@ -63799,6 +63806,7 @@ const Lhe = (t) => ((t == null ? void 0 : t.filter((n) => n.type === "product"))
63799
63806
  return `${t}th`;
63800
63807
  }
63801
63808
  }, nE = (t) => t.meta.type === "product", Jhe = ({
63809
+ // @ts-ignore
63802
63810
  meta: t,
63803
63811
  value: e,
63804
63812
  context: n,
@@ -63988,6 +63996,7 @@ const Lhe = (t) => ((t == null ? void 0 : t.filter((n) => n.type === "product"))
63988
63996
  )
63989
63997
  ] });
63990
63998
  }, epe = ({
63999
+ // @ts-ignore
63991
64000
  type: t,
63992
64001
  value: e,
63993
64002
  onChange: n
@@ -64088,6 +64097,7 @@ const Lhe = (t) => ((t == null ? void 0 : t.filter((n) => n.type === "product"))
64088
64097
  ...e
64089
64098
  }
64090
64099
  ), tpe = ({
64100
+ // @ts-ignore
64091
64101
  type: t,
64092
64102
  value: e,
64093
64103
  onChange: n,
@@ -64280,6 +64290,7 @@ const Lhe = (t) => ((t == null ? void 0 : t.filter((n) => n.type === "product"))
64280
64290
  )
64281
64291
  ] });
64282
64292
  }, npe = ({
64293
+ // @ts-ignore
64283
64294
  type: t,
64284
64295
  value: e,
64285
64296
  onChange: n
@@ -64371,9 +64382,12 @@ const Lhe = (t) => ((t == null ? void 0 : t.filter((n) => n.type === "product"))
64371
64382
  id: "cb",
64372
64383
  type: "checkbox",
64373
64384
  checked: r.free_shipping == !0,
64374
- onChange: (a) => s(
64375
- "free_shipping",
64376
- !r.free_shipping
64385
+ onChange: (
64386
+ // @ts-ignore
64387
+ (a) => s(
64388
+ "free_shipping",
64389
+ !r.free_shipping
64390
+ )
64377
64391
  ),
64378
64392
  className: `w-4 h-4 accent-pink-500 border-0 rounded-md
64379
64393
  focus:ring-0`
@@ -64485,6 +64499,7 @@ const Lhe = (t) => ((t == null ? void 0 : t.filter((n) => n.type === "product"))
64485
64499
  return;
64486
64500
  }
64487
64501
  }, ape = ({
64502
+ // @ts-ignore
64488
64503
  field: t,
64489
64504
  value: e,
64490
64505
  context: n,
@@ -66639,15 +66654,15 @@ Decide whether the discount is:
66639
66654
  }
66640
66655
  );
66641
66656
  }, Zpe = (t) => {
66657
+ var n, r;
66642
66658
  let e = `Here is what you need to know:
66643
66659
 
66644
66660
  `;
66645
66661
  return t != null && t.auth_admins_emails && (e = `- The following are the **admin** emails:
66646
- ` + (t == null ? void 0 : t.auth_admins_emails.map((n) => ` - ${n}`).join(`
66647
- `))), t != null && t.auth_password_hash_rounds && (e += `
66648
- - Passwords are hashed with **${t == null ? void 0 : t.auth_password_hash_rounds}** rounds`), t != null && t.auth_secret_access_token && (e += `
66649
- - **JWT** access token \`secret\` is **${t == null ? void 0 : t.auth_secret_access_token}**`), t != null && t.auth_secret_refresh_token && (e += `
66650
- - **JWT** refresh token \`secret\` is **${t == null ? void 0 : t.auth_secret_refresh_token}**`), e;
66662
+ ` + (t == null ? void 0 : t.auth_admins_emails.map((i) => ` - ${i}`).join(`
66663
+ `))), t != null && t.auth_secret_access_token && (e += `
66664
+ - **JWT** access token \`secret\` is **${((n = t == null ? void 0 : t.auth_secret_access_token) == null ? void 0 : n.slice(0, 4)) + "------------"}**`), t != null && t.auth_secret_refresh_token && (e += `
66665
+ - **JWT** refresh token \`secret\` is **${((r = t == null ? void 0 : t.auth_secret_refresh_token) == null ? void 0 : r.slice(0, 4)) + "------------"}**`), e;
66651
66666
  }, Xpe = (t) => {
66652
66667
  const e = (t == null ? void 0 : t.general_store_name) ?? "unknown right now", n = (t == null ? void 0 : t.general_store_website) ?? "unknown right now", r = (t == null ? void 0 : t.general_store_support_email) ?? "unknown right now", i = (t == null ? void 0 : t.general_store_description) ?? "You still have not written one";
66653
66668
  return `Hi 👋, **your** store name is \`${e}\`, your store's