includio-cms 0.26.0 → 0.28.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.
Files changed (128) hide show
  1. package/API.md +58 -2
  2. package/CHANGELOG.md +105 -0
  3. package/DOCS.md +1 -1
  4. package/ROADMAP.md +8 -0
  5. package/dist/admin/auth-client.d.ts +42 -42
  6. package/dist/admin/client/admin/admin-layout.svelte +12 -2
  7. package/dist/admin/client/admin/admin-layout.svelte.d.ts +2 -1
  8. package/dist/admin/client/collection/data-table.svelte +0 -39
  9. package/dist/admin/client/collection/data-table.svelte.d.ts +0 -2
  10. package/dist/admin/client/shop/coupon-schema.d.ts +1 -1
  11. package/dist/admin/client/shop/refund-dialog.svelte +37 -1
  12. package/dist/admin/client/shop/refund-dialog.svelte.d.ts +3 -0
  13. package/dist/admin/client/shop/shop-order-detail-page.svelte +192 -0
  14. package/dist/admin/components/fields/field-renderer.svelte +6 -1
  15. package/dist/admin/components/fields/icon-field.svelte +86 -0
  16. package/dist/admin/components/fields/icon-field.svelte.d.ts +8 -0
  17. package/dist/admin/components/fields/icon-picker-dialog.svelte +174 -0
  18. package/dist/admin/components/fields/icon-picker-dialog.svelte.d.ts +11 -0
  19. package/dist/admin/components/fields/object-field.svelte +27 -7
  20. package/dist/admin/components/fields/shop-field.svelte +210 -20
  21. package/dist/admin/components/layout/layout-tabs.svelte +1 -0
  22. package/dist/admin/components/variant-form/VariantAttributeRenderer.svelte +109 -0
  23. package/dist/admin/components/variant-form/VariantAttributeRenderer.svelte.d.ts +9 -0
  24. package/dist/admin/helpers/build-icon-set-map.d.ts +8 -0
  25. package/dist/admin/helpers/build-icon-set-map.js +16 -0
  26. package/dist/admin/helpers/index.d.ts +2 -0
  27. package/dist/admin/helpers/index.js +2 -0
  28. package/dist/admin/remote/shop.remote.d.ts +116 -24
  29. package/dist/admin/remote/shop.remote.js +79 -6
  30. package/dist/admin/state/icon-sets.svelte.d.ts +9 -0
  31. package/dist/admin/state/icon-sets.svelte.js +20 -0
  32. package/dist/cli/scaffold/admin.js +2 -2
  33. package/dist/components/ui/checkbox/checkbox.svelte +3 -3
  34. package/dist/core/cms.d.ts +11 -2
  35. package/dist/core/cms.js +29 -0
  36. package/dist/core/fields/fieldSchemaToTs.js +7 -0
  37. package/dist/core/server/generator/fields.d.ts +2 -0
  38. package/dist/core/server/generator/fields.js +34 -1
  39. package/dist/core/server/generator/generator.js +2 -1
  40. package/dist/db-postgres/schema/shop/index.d.ts +1 -0
  41. package/dist/db-postgres/schema/shop/index.js +1 -0
  42. package/dist/db-postgres/schema/shop/invoice.d.ts +254 -0
  43. package/dist/db-postgres/schema/shop/invoice.js +27 -0
  44. package/dist/db-postgres/schema/shop/order.d.ts +107 -1
  45. package/dist/db-postgres/schema/shop/order.js +7 -1
  46. package/dist/db-postgres/schema/shop/payment.d.ts +20 -0
  47. package/dist/db-postgres/schema/shop/payment.js +4 -1
  48. package/dist/db-postgres/schema/shop/product.d.ts +20 -0
  49. package/dist/db-postgres/schema/shop/product.js +3 -1
  50. package/dist/db-postgres/schema/shop/productVariant.d.ts +12 -2
  51. package/dist/db-postgres/schema/shop/productVariant.js +22 -0
  52. package/dist/paraglide/messages/_index.d.ts +36 -3
  53. package/dist/paraglide/messages/_index.js +71 -3
  54. package/dist/paraglide/messages/en.d.ts +5 -0
  55. package/dist/paraglide/messages/en.js +14 -0
  56. package/dist/paraglide/messages/pl.d.ts +5 -0
  57. package/dist/paraglide/messages/pl.js +14 -0
  58. package/dist/shop/adapters/fakturownia/client.d.ts +28 -0
  59. package/dist/shop/adapters/fakturownia/client.js +67 -0
  60. package/dist/shop/adapters/fakturownia/index.d.ts +27 -0
  61. package/dist/shop/adapters/fakturownia/index.js +36 -0
  62. package/dist/shop/adapters/fakturownia/payload.d.ts +35 -0
  63. package/dist/shop/adapters/fakturownia/payload.js +45 -0
  64. package/dist/shop/cart/types.d.ts +1 -0
  65. package/dist/shop/client/index.d.ts +61 -0
  66. package/dist/shop/client/index.js +5 -1
  67. package/dist/shop/expiry.d.ts +35 -0
  68. package/dist/shop/expiry.js +68 -0
  69. package/dist/shop/http/balance-handler.d.ts +20 -0
  70. package/dist/shop/http/balance-handler.js +91 -0
  71. package/dist/shop/http/cart-handler.js +19 -0
  72. package/dist/shop/http/checkout-handler.js +30 -1
  73. package/dist/shop/http/index.d.ts +2 -0
  74. package/dist/shop/http/index.js +2 -0
  75. package/dist/shop/http/upcoming-handler.d.ts +16 -0
  76. package/dist/shop/http/upcoming-handler.js +65 -0
  77. package/dist/shop/http/webhook-handler.js +46 -9
  78. package/dist/shop/index.d.ts +7 -1
  79. package/dist/shop/index.js +10 -1
  80. package/dist/shop/nip.d.ts +12 -0
  81. package/dist/shop/nip.js +23 -0
  82. package/dist/shop/server/balance-payment.d.ts +40 -0
  83. package/dist/shop/server/balance-payment.js +140 -0
  84. package/dist/shop/server/cart-hydrate.js +2 -0
  85. package/dist/shop/server/init.d.ts +14 -0
  86. package/dist/shop/server/init.js +35 -0
  87. package/dist/shop/server/invoices.d.ts +64 -0
  88. package/dist/shop/server/invoices.js +237 -0
  89. package/dist/shop/server/orders.d.ts +38 -0
  90. package/dist/shop/server/orders.js +152 -2
  91. package/dist/shop/server/payment-policy.d.ts +35 -0
  92. package/dist/shop/server/payment-policy.js +55 -0
  93. package/dist/shop/server/payments.d.ts +29 -0
  94. package/dist/shop/server/payments.js +64 -0
  95. package/dist/shop/server/populate.d.ts +1 -1
  96. package/dist/shop/server/refund.d.ts +17 -12
  97. package/dist/shop/server/refund.js +96 -13
  98. package/dist/shop/server/shop-data.d.ts +4 -1
  99. package/dist/shop/server/shop-data.js +24 -2
  100. package/dist/shop/template.d.ts +13 -0
  101. package/dist/shop/template.js +98 -0
  102. package/dist/shop/types.d.ts +208 -1
  103. package/dist/shop/variant-attributes.d.ts +28 -0
  104. package/dist/shop/variant-attributes.js +69 -0
  105. package/dist/sveltekit/server/index.d.ts +1 -0
  106. package/dist/sveltekit/server/index.js +2 -0
  107. package/dist/types/cms.d.ts +4 -3
  108. package/dist/types/cms.schema.d.ts +1 -1
  109. package/dist/types/cms.schema.js +9 -0
  110. package/dist/types/fields.d.ts +21 -2
  111. package/dist/types/index.d.ts +1 -1
  112. package/dist/types/index.js +1 -1
  113. package/dist/types/plugins.d.ts +40 -0
  114. package/dist/types/plugins.js +4 -1
  115. package/dist/updates/0.26.1/index.d.ts +2 -0
  116. package/dist/updates/0.26.1/index.js +19 -0
  117. package/dist/updates/0.27.0/index.d.ts +2 -0
  118. package/dist/updates/0.27.0/index.js +50 -0
  119. package/dist/updates/0.28.0/index.d.ts +2 -0
  120. package/dist/updates/0.28.0/index.js +38 -0
  121. package/dist/updates/index.js +7 -1
  122. package/package.json +1 -1
  123. package/dist/paraglide/messages/hello_world.d.ts +0 -5
  124. package/dist/paraglide/messages/hello_world.js +0 -33
  125. package/dist/paraglide/messages/login_hello.d.ts +0 -16
  126. package/dist/paraglide/messages/login_hello.js +0 -34
  127. package/dist/paraglide/messages/login_please_login.d.ts +0 -16
  128. package/dist/paraglide/messages/login_please_login.js +0 -34
@@ -1,9 +1,9 @@
1
1
  export declare const authClient: {
2
2
  signIn: {
3
3
  social: <FetchOptions extends {
4
+ redirect?: RequestRedirect | undefined;
4
5
  method?: string | undefined;
5
6
  mode?: RequestMode | undefined;
6
- redirect?: RequestRedirect | undefined;
7
7
  headers?: (HeadersInit & (HeadersInit | {
8
8
  accept: "application/json" | "text/plain" | "application/octet-stream";
9
9
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -110,9 +110,9 @@ export declare const authClient: {
110
110
  };
111
111
  } & {
112
112
  signOut: <FetchOptions extends {
113
+ redirect?: RequestRedirect | undefined;
113
114
  method?: string | undefined;
114
115
  mode?: RequestMode | undefined;
115
- redirect?: RequestRedirect | undefined;
116
116
  headers?: (HeadersInit & (HeadersInit | {
117
117
  accept: "application/json" | "text/plain" | "application/octet-stream";
118
118
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -174,9 +174,9 @@ export declare const authClient: {
174
174
  } & {
175
175
  signIn: {
176
176
  email: <FetchOptions extends {
177
+ redirect?: RequestRedirect | undefined;
177
178
  method?: string | undefined;
178
179
  mode?: RequestMode | undefined;
179
- redirect?: RequestRedirect | undefined;
180
180
  headers?: (HeadersInit & (HeadersInit | {
181
181
  accept: "application/json" | "text/plain" | "application/octet-stream";
182
182
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -258,9 +258,9 @@ export declare const authClient: {
258
258
  };
259
259
  } & {
260
260
  forgetPassword: <FetchOptions extends {
261
+ redirect?: RequestRedirect | undefined;
261
262
  method?: string | undefined;
262
263
  mode?: RequestMode | undefined;
263
- redirect?: RequestRedirect | undefined;
264
264
  headers?: (HeadersInit & (HeadersInit | {
265
265
  accept: "application/json" | "text/plain" | "application/octet-stream";
266
266
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -326,9 +326,9 @@ export declare const authClient: {
326
326
  }, FetchOptions["throw"] extends true ? true : false>>;
327
327
  } & {
328
328
  resetPassword: <FetchOptions extends {
329
+ redirect?: RequestRedirect | undefined;
329
330
  method?: string | undefined;
330
331
  mode?: RequestMode | undefined;
331
- redirect?: RequestRedirect | undefined;
332
332
  headers?: (HeadersInit & (HeadersInit | {
333
333
  accept: "application/json" | "text/plain" | "application/octet-stream";
334
334
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -396,9 +396,9 @@ export declare const authClient: {
396
396
  }, FetchOptions["throw"] extends true ? true : false>>;
397
397
  } & {
398
398
  verifyEmail: <FetchOptions extends {
399
+ redirect?: RequestRedirect | undefined;
399
400
  method?: string | undefined;
400
401
  mode?: RequestMode | undefined;
401
- redirect?: RequestRedirect | undefined;
402
402
  headers?: (HeadersInit & (HeadersInit | {
403
403
  accept: "application/json" | "text/plain" | "application/octet-stream";
404
404
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -477,9 +477,9 @@ export declare const authClient: {
477
477
  }, FetchOptions["throw"] extends true ? true : false>>;
478
478
  } & {
479
479
  sendVerificationEmail: <FetchOptions extends {
480
+ redirect?: RequestRedirect | undefined;
480
481
  method?: string | undefined;
481
482
  mode?: RequestMode | undefined;
482
- redirect?: RequestRedirect | undefined;
483
483
  headers?: (HeadersInit & (HeadersInit | {
484
484
  accept: "application/json" | "text/plain" | "application/octet-stream";
485
485
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -545,9 +545,9 @@ export declare const authClient: {
545
545
  }, FetchOptions["throw"] extends true ? true : false>>;
546
546
  } & {
547
547
  changeEmail: <FetchOptions extends {
548
+ redirect?: RequestRedirect | undefined;
548
549
  method?: string | undefined;
549
550
  mode?: RequestMode | undefined;
550
- redirect?: RequestRedirect | undefined;
551
551
  headers?: (HeadersInit & (HeadersInit | {
552
552
  accept: "application/json" | "text/plain" | "application/octet-stream";
553
553
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -613,9 +613,9 @@ export declare const authClient: {
613
613
  }, FetchOptions["throw"] extends true ? true : false>>;
614
614
  } & {
615
615
  changePassword: <FetchOptions extends {
616
+ redirect?: RequestRedirect | undefined;
616
617
  method?: string | undefined;
617
618
  mode?: RequestMode | undefined;
618
- redirect?: RequestRedirect | undefined;
619
619
  headers?: (HeadersInit & (HeadersInit | {
620
620
  accept: "application/json" | "text/plain" | "application/octet-stream";
621
621
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -692,9 +692,9 @@ export declare const authClient: {
692
692
  }, FetchOptions["throw"] extends true ? true : false>>;
693
693
  } & {
694
694
  deleteUser: <FetchOptions extends {
695
+ redirect?: RequestRedirect | undefined;
695
696
  method?: string | undefined;
696
697
  mode?: RequestMode | undefined;
697
- redirect?: RequestRedirect | undefined;
698
698
  headers?: (HeadersInit & (HeadersInit | {
699
699
  accept: "application/json" | "text/plain" | "application/octet-stream";
700
700
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -764,9 +764,9 @@ export declare const authClient: {
764
764
  } & {
765
765
  resetPassword: {
766
766
  ":token": <FetchOptions extends {
767
+ redirect?: RequestRedirect | undefined;
767
768
  method?: string | undefined;
768
769
  mode?: RequestMode | undefined;
769
- redirect?: RequestRedirect | undefined;
770
770
  headers?: (HeadersInit & (HeadersInit | {
771
771
  accept: "application/json" | "text/plain" | "application/octet-stream";
772
772
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -832,9 +832,9 @@ export declare const authClient: {
832
832
  };
833
833
  } & {
834
834
  requestPasswordReset: <FetchOptions extends {
835
+ redirect?: RequestRedirect | undefined;
835
836
  method?: string | undefined;
836
837
  mode?: RequestMode | undefined;
837
- redirect?: RequestRedirect | undefined;
838
838
  headers?: (HeadersInit & (HeadersInit | {
839
839
  accept: "application/json" | "text/plain" | "application/octet-stream";
840
840
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -902,9 +902,9 @@ export declare const authClient: {
902
902
  } & {
903
903
  resetPassword: {
904
904
  ":token": <FetchOptions extends {
905
+ redirect?: RequestRedirect | undefined;
905
906
  method?: string | undefined;
906
907
  mode?: RequestMode | undefined;
907
- redirect?: RequestRedirect | undefined;
908
908
  headers?: (HeadersInit & (HeadersInit | {
909
909
  accept: "application/json" | "text/plain" | "application/octet-stream";
910
910
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -970,9 +970,9 @@ export declare const authClient: {
970
970
  };
971
971
  } & {
972
972
  revokeSession: <FetchOptions extends {
973
+ redirect?: RequestRedirect | undefined;
973
974
  method?: string | undefined;
974
975
  mode?: RequestMode | undefined;
975
- redirect?: RequestRedirect | undefined;
976
976
  headers?: (HeadersInit & (HeadersInit | {
977
977
  accept: "application/json" | "text/plain" | "application/octet-stream";
978
978
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1036,9 +1036,9 @@ export declare const authClient: {
1036
1036
  }, FetchOptions["throw"] extends true ? true : false>>;
1037
1037
  } & {
1038
1038
  revokeSessions: <FetchOptions extends {
1039
+ redirect?: RequestRedirect | undefined;
1039
1040
  method?: string | undefined;
1040
1041
  mode?: RequestMode | undefined;
1041
- redirect?: RequestRedirect | undefined;
1042
1042
  headers?: (HeadersInit & (HeadersInit | {
1043
1043
  accept: "application/json" | "text/plain" | "application/octet-stream";
1044
1044
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1099,9 +1099,9 @@ export declare const authClient: {
1099
1099
  }, FetchOptions["throw"] extends true ? true : false>>;
1100
1100
  } & {
1101
1101
  revokeOtherSessions: <FetchOptions extends {
1102
+ redirect?: RequestRedirect | undefined;
1102
1103
  method?: string | undefined;
1103
1104
  mode?: RequestMode | undefined;
1104
- redirect?: RequestRedirect | undefined;
1105
1105
  headers?: (HeadersInit & (HeadersInit | {
1106
1106
  accept: "application/json" | "text/plain" | "application/octet-stream";
1107
1107
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1162,9 +1162,9 @@ export declare const authClient: {
1162
1162
  }, FetchOptions["throw"] extends true ? true : false>>;
1163
1163
  } & {
1164
1164
  linkSocial: <FetchOptions extends {
1165
+ redirect?: RequestRedirect | undefined;
1165
1166
  method?: string | undefined;
1166
1167
  mode?: RequestMode | undefined;
1167
- redirect?: RequestRedirect | undefined;
1168
1168
  headers?: (HeadersInit & (HeadersInit | {
1169
1169
  accept: "application/json" | "text/plain" | "application/octet-stream";
1170
1170
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1253,9 +1253,9 @@ export declare const authClient: {
1253
1253
  }, FetchOptions["throw"] extends true ? true : false>>;
1254
1254
  } & {
1255
1255
  listAccounts: <FetchOptions extends {
1256
+ redirect?: RequestRedirect | undefined;
1256
1257
  method?: string | undefined;
1257
1258
  mode?: RequestMode | undefined;
1258
- redirect?: RequestRedirect | undefined;
1259
1259
  headers?: (HeadersInit & (HeadersInit | {
1260
1260
  accept: "application/json" | "text/plain" | "application/octet-stream";
1261
1261
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1322,9 +1322,9 @@ export declare const authClient: {
1322
1322
  } & {
1323
1323
  deleteUser: {
1324
1324
  callback: <FetchOptions extends {
1325
+ redirect?: RequestRedirect | undefined;
1325
1326
  method?: string | undefined;
1326
1327
  mode?: RequestMode | undefined;
1327
- redirect?: RequestRedirect | undefined;
1328
1328
  headers?: (HeadersInit & (HeadersInit | {
1329
1329
  accept: "application/json" | "text/plain" | "application/octet-stream";
1330
1330
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1393,9 +1393,9 @@ export declare const authClient: {
1393
1393
  };
1394
1394
  } & {
1395
1395
  unlinkAccount: <FetchOptions extends {
1396
+ redirect?: RequestRedirect | undefined;
1396
1397
  method?: string | undefined;
1397
1398
  mode?: RequestMode | undefined;
1398
- redirect?: RequestRedirect | undefined;
1399
1399
  headers?: (HeadersInit & (HeadersInit | {
1400
1400
  accept: "application/json" | "text/plain" | "application/octet-stream";
1401
1401
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1461,9 +1461,9 @@ export declare const authClient: {
1461
1461
  }, FetchOptions["throw"] extends true ? true : false>>;
1462
1462
  } & {
1463
1463
  refreshToken: <FetchOptions extends {
1464
+ redirect?: RequestRedirect | undefined;
1464
1465
  method?: string | undefined;
1465
1466
  mode?: RequestMode | undefined;
1466
- redirect?: RequestRedirect | undefined;
1467
1467
  headers?: (HeadersInit & (HeadersInit | {
1468
1468
  accept: "application/json" | "text/plain" | "application/octet-stream";
1469
1469
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1529,9 +1529,9 @@ export declare const authClient: {
1529
1529
  }, FetchOptions["throw"] extends true ? true : false>>;
1530
1530
  } & {
1531
1531
  getAccessToken: <FetchOptions extends {
1532
+ redirect?: RequestRedirect | undefined;
1532
1533
  method?: string | undefined;
1533
1534
  mode?: RequestMode | undefined;
1534
- redirect?: RequestRedirect | undefined;
1535
1535
  headers?: (HeadersInit & (HeadersInit | {
1536
1536
  accept: "application/json" | "text/plain" | "application/octet-stream";
1537
1537
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1602,9 +1602,9 @@ export declare const authClient: {
1602
1602
  }, FetchOptions["throw"] extends true ? true : false>>;
1603
1603
  } & {
1604
1604
  accountInfo: <FetchOptions extends {
1605
+ redirect?: RequestRedirect | undefined;
1605
1606
  method?: string | undefined;
1606
1607
  mode?: RequestMode | undefined;
1607
- redirect?: RequestRedirect | undefined;
1608
1608
  headers?: (HeadersInit & (HeadersInit | {
1609
1609
  accept: "application/json" | "text/plain" | "application/octet-stream";
1610
1610
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1670,9 +1670,9 @@ export declare const authClient: {
1670
1670
  } & {
1671
1671
  admin: {
1672
1672
  getUser: <FetchOptions extends {
1673
+ redirect?: RequestRedirect | undefined;
1673
1674
  method?: string | undefined;
1674
1675
  mode?: RequestMode | undefined;
1675
- redirect?: RequestRedirect | undefined;
1676
1676
  headers?: (HeadersInit & (HeadersInit | {
1677
1677
  accept: "application/json" | "text/plain" | "application/octet-stream";
1678
1678
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1745,9 +1745,9 @@ export declare const authClient: {
1745
1745
  } & {
1746
1746
  admin: {
1747
1747
  updateUser: <FetchOptions extends {
1748
+ redirect?: RequestRedirect | undefined;
1748
1749
  method?: string | undefined;
1749
1750
  mode?: RequestMode | undefined;
1750
- redirect?: RequestRedirect | undefined;
1751
1751
  headers?: (HeadersInit & (HeadersInit | {
1752
1752
  accept: "application/json" | "text/plain" | "application/octet-stream";
1753
1753
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1813,9 +1813,9 @@ export declare const authClient: {
1813
1813
  } & {
1814
1814
  admin: {
1815
1815
  listUsers: <FetchOptions extends {
1816
+ redirect?: RequestRedirect | undefined;
1816
1817
  method?: string | undefined;
1817
1818
  mode?: RequestMode | undefined;
1818
- redirect?: RequestRedirect | undefined;
1819
1819
  headers?: (HeadersInit & (HeadersInit | {
1820
1820
  accept: "application/json" | "text/plain" | "application/octet-stream";
1821
1821
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1906,9 +1906,9 @@ export declare const authClient: {
1906
1906
  } & {
1907
1907
  admin: {
1908
1908
  listUserSessions: <FetchOptions extends {
1909
+ redirect?: RequestRedirect | undefined;
1909
1910
  method?: string | undefined;
1910
1911
  mode?: RequestMode | undefined;
1911
- redirect?: RequestRedirect | undefined;
1912
1912
  headers?: (HeadersInit & (HeadersInit | {
1913
1913
  accept: "application/json" | "text/plain" | "application/octet-stream";
1914
1914
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -1974,9 +1974,9 @@ export declare const authClient: {
1974
1974
  } & {
1975
1975
  admin: {
1976
1976
  unbanUser: <FetchOptions extends {
1977
+ redirect?: RequestRedirect | undefined;
1977
1978
  method?: string | undefined;
1978
1979
  mode?: RequestMode | undefined;
1979
- redirect?: RequestRedirect | undefined;
1980
1980
  headers?: (HeadersInit & (HeadersInit | {
1981
1981
  accept: "application/json" | "text/plain" | "application/octet-stream";
1982
1982
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2042,9 +2042,9 @@ export declare const authClient: {
2042
2042
  } & {
2043
2043
  admin: {
2044
2044
  banUser: <FetchOptions extends {
2045
+ redirect?: RequestRedirect | undefined;
2045
2046
  method?: string | undefined;
2046
2047
  mode?: RequestMode | undefined;
2047
- redirect?: RequestRedirect | undefined;
2048
2048
  headers?: (HeadersInit & (HeadersInit | {
2049
2049
  accept: "application/json" | "text/plain" | "application/octet-stream";
2050
2050
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2114,9 +2114,9 @@ export declare const authClient: {
2114
2114
  } & {
2115
2115
  admin: {
2116
2116
  impersonateUser: <FetchOptions extends {
2117
+ redirect?: RequestRedirect | undefined;
2117
2118
  method?: string | undefined;
2118
2119
  mode?: RequestMode | undefined;
2119
- redirect?: RequestRedirect | undefined;
2120
2120
  headers?: (HeadersInit & (HeadersInit | {
2121
2121
  accept: "application/json" | "text/plain" | "application/octet-stream";
2122
2122
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2200,9 +2200,9 @@ export declare const authClient: {
2200
2200
  } & {
2201
2201
  admin: {
2202
2202
  stopImpersonating: <FetchOptions extends {
2203
+ redirect?: RequestRedirect | undefined;
2203
2204
  method?: string | undefined;
2204
2205
  mode?: RequestMode | undefined;
2205
- redirect?: RequestRedirect | undefined;
2206
2206
  headers?: (HeadersInit & (HeadersInit | {
2207
2207
  accept: "application/json" | "text/plain" | "application/octet-stream";
2208
2208
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2266,9 +2266,9 @@ export declare const authClient: {
2266
2266
  } & {
2267
2267
  admin: {
2268
2268
  revokeUserSession: <FetchOptions extends {
2269
+ redirect?: RequestRedirect | undefined;
2269
2270
  method?: string | undefined;
2270
2271
  mode?: RequestMode | undefined;
2271
- redirect?: RequestRedirect | undefined;
2272
2272
  headers?: (HeadersInit & (HeadersInit | {
2273
2273
  accept: "application/json" | "text/plain" | "application/octet-stream";
2274
2274
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2334,9 +2334,9 @@ export declare const authClient: {
2334
2334
  } & {
2335
2335
  admin: {
2336
2336
  revokeUserSessions: <FetchOptions extends {
2337
+ redirect?: RequestRedirect | undefined;
2337
2338
  method?: string | undefined;
2338
2339
  mode?: RequestMode | undefined;
2339
- redirect?: RequestRedirect | undefined;
2340
2340
  headers?: (HeadersInit & (HeadersInit | {
2341
2341
  accept: "application/json" | "text/plain" | "application/octet-stream";
2342
2342
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2402,9 +2402,9 @@ export declare const authClient: {
2402
2402
  } & {
2403
2403
  admin: {
2404
2404
  removeUser: <FetchOptions extends {
2405
+ redirect?: RequestRedirect | undefined;
2405
2406
  method?: string | undefined;
2406
2407
  mode?: RequestMode | undefined;
2407
- redirect?: RequestRedirect | undefined;
2408
2408
  headers?: (HeadersInit & (HeadersInit | {
2409
2409
  accept: "application/json" | "text/plain" | "application/octet-stream";
2410
2410
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2470,9 +2470,9 @@ export declare const authClient: {
2470
2470
  } & {
2471
2471
  admin: {
2472
2472
  setUserPassword: <FetchOptions extends {
2473
+ redirect?: RequestRedirect | undefined;
2473
2474
  method?: string | undefined;
2474
2475
  mode?: RequestMode | undefined;
2475
- redirect?: RequestRedirect | undefined;
2476
2476
  headers?: (HeadersInit & (HeadersInit | {
2477
2477
  accept: "application/json" | "text/plain" | "application/octet-stream";
2478
2478
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2540,9 +2540,9 @@ export declare const authClient: {
2540
2540
  } & {
2541
2541
  admin: {
2542
2542
  setRole: <FetchOptions extends {
2543
+ redirect?: RequestRedirect | undefined;
2543
2544
  method?: string | undefined;
2544
2545
  mode?: RequestMode | undefined;
2545
- redirect?: RequestRedirect | undefined;
2546
2546
  headers?: (HeadersInit & (HeadersInit | {
2547
2547
  accept: "application/json" | "text/plain" | "application/octet-stream";
2548
2548
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2610,9 +2610,9 @@ export declare const authClient: {
2610
2610
  } & {
2611
2611
  admin: {
2612
2612
  createUser: <FetchOptions extends {
2613
+ redirect?: RequestRedirect | undefined;
2613
2614
  method?: string | undefined;
2614
2615
  mode?: RequestMode | undefined;
2615
- redirect?: RequestRedirect | undefined;
2616
2616
  headers?: (HeadersInit & (HeadersInit | {
2617
2617
  accept: "application/json" | "text/plain" | "application/octet-stream";
2618
2618
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2686,9 +2686,9 @@ export declare const authClient: {
2686
2686
  } & {
2687
2687
  admin: {
2688
2688
  hasPermission: <FetchOptions extends {
2689
+ redirect?: RequestRedirect | undefined;
2689
2690
  method?: string | undefined;
2690
2691
  mode?: RequestMode | undefined;
2691
- redirect?: RequestRedirect | undefined;
2692
2692
  headers?: (HeadersInit & (HeadersInit | {
2693
2693
  accept: "application/json" | "text/plain" | "application/octet-stream";
2694
2694
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2781,9 +2781,9 @@ export declare const authClient: {
2781
2781
  } & {
2782
2782
  signUp: {
2783
2783
  email: <FetchOptions extends {
2784
+ redirect?: RequestRedirect | undefined;
2784
2785
  method?: string | undefined;
2785
2786
  mode?: RequestMode | undefined;
2786
- redirect?: RequestRedirect | undefined;
2787
2787
  headers?: (HeadersInit & (HeadersInit | {
2788
2788
  accept: "application/json" | "text/plain" | "application/octet-stream";
2789
2789
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2876,9 +2876,9 @@ export declare const authClient: {
2876
2876
  };
2877
2877
  } & {
2878
2878
  updateUser: <FetchOptions extends {
2879
+ redirect?: RequestRedirect | undefined;
2879
2880
  method?: string | undefined;
2880
2881
  mode?: RequestMode | undefined;
2881
- redirect?: RequestRedirect | undefined;
2882
2882
  headers?: (HeadersInit & (HeadersInit | {
2883
2883
  accept: "application/json" | "text/plain" | "application/octet-stream";
2884
2884
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -2943,9 +2943,9 @@ export declare const authClient: {
2943
2943
  }, FetchOptions["throw"] extends true ? true : false>>;
2944
2944
  } & {
2945
2945
  listSessions: <FetchOptions extends {
2946
+ redirect?: RequestRedirect | undefined;
2946
2947
  method?: string | undefined;
2947
2948
  mode?: RequestMode | undefined;
2948
- redirect?: RequestRedirect | undefined;
2949
2949
  headers?: (HeadersInit & (HeadersInit | {
2950
2950
  accept: "application/json" | "text/plain" | "application/octet-stream";
2951
2951
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -3013,9 +3013,9 @@ export declare const authClient: {
3013
3013
  }, FetchOptions["throw"] extends true ? true : false>>;
3014
3014
  } & {
3015
3015
  getSession: <FetchOptions extends {
3016
+ redirect?: RequestRedirect | undefined;
3016
3017
  method?: string | undefined;
3017
3018
  mode?: RequestMode | undefined;
3018
- redirect?: RequestRedirect | undefined;
3019
3019
  headers?: (HeadersInit & (HeadersInit | {
3020
3020
  accept: "application/json" | "text/plain" | "application/octet-stream";
3021
3021
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
@@ -4,15 +4,25 @@
4
4
  import { Toaster } from '../../../components/ui/sonner/index.js';
5
5
  import { MediaSort, setMediaSort } from '../../state/media-sort.svelte.js';
6
6
  import { setCustomFields } from '../../state/custom-fields.svelte.js';
7
- import type { CustomFieldDefinition } from '../../../types/plugins.js';
7
+ import { setIconSets } from '../../state/icon-sets.svelte.js';
8
+ import type { CustomFieldDefinition, IconSetPlugin } from '../../../types/plugins.js';
8
9
  import AdminPreloader from './admin-preloader.svelte';
9
10
  import { onMount } from 'svelte';
10
11
 
11
12
  setMediaSort(new MediaSort());
12
13
 
13
- let { children, customFields }: { children: Snippet; customFields?: Map<string, CustomFieldDefinition> } = $props();
14
+ let {
15
+ children,
16
+ customFields,
17
+ iconSets
18
+ }: {
19
+ children: Snippet;
20
+ customFields?: Map<string, CustomFieldDefinition>;
21
+ iconSets?: Map<string, IconSetPlugin>;
22
+ } = $props();
14
23
 
15
24
  setCustomFields(customFields ?? new Map());
25
+ setIconSets(iconSets ?? new Map());
16
26
 
17
27
  let mounted = $state(false);
18
28
  onMount(() => {
@@ -1,9 +1,10 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  import '../../styles/admin.css';
3
- import type { CustomFieldDefinition } from '../../../types/plugins.js';
3
+ import type { CustomFieldDefinition, IconSetPlugin } from '../../../types/plugins.js';
4
4
  type $$ComponentProps = {
5
5
  children: Snippet;
6
6
  customFields?: Map<string, CustomFieldDefinition>;
7
+ iconSets?: Map<string, IconSetPlugin>;
7
8
  };
8
9
  declare const AdminLayout: import("svelte").Component<$$ComponentProps, {}, "">;
9
10
  type AdminLayout = ReturnType<typeof AdminLayout>;
@@ -48,8 +48,6 @@
48
48
  onRetry?: () => void;
49
49
  orderable?: boolean;
50
50
  onReorder?: (fromIndex: number, toIndex: number) => void;
51
- /** Pin first column when horizontally scrolling (helps on mobile with wide tables). Default true. */
52
- stickyFirstColumn?: boolean;
53
51
  /** Extend table to viewport edges on mobile via negative horizontal margin. Default true. */
54
52
  mobileEdgeBleed?: boolean;
55
53
  };
@@ -81,7 +79,6 @@
81
79
  onRetry,
82
80
  orderable = false,
83
81
  onReorder,
84
- stickyFirstColumn = true,
85
82
  mobileEdgeBleed = true
86
83
  }: DataTableProps<TData, TValue> = $props();
87
84
 
@@ -173,7 +170,6 @@
173
170
 
174
171
  <div
175
172
  class="data-table-shell"
176
- data-sticky-first={stickyFirstColumn ? 'true' : undefined}
177
173
  data-mobile-bleed={mobileEdgeBleed ? 'true' : undefined}
178
174
  >
179
175
  <Table.Root aria-roledescription={orderable ? 'sortable list' : undefined}>
@@ -373,39 +369,4 @@
373
369
  border-radius: 0;
374
370
  }
375
371
  }
376
-
377
- /* Sticky first column (helps reading wide tables when scrolling horizontally). */
378
- .data-table-shell[data-sticky-first='true'] :global(thead th:first-child),
379
- .data-table-shell[data-sticky-first='true'] :global(tbody td:first-child) {
380
- position: sticky;
381
- left: 0;
382
- background: var(--background);
383
- }
384
- .data-table-shell[data-sticky-first='true'] :global(thead th:first-child) {
385
- z-index: 11;
386
- background: var(--muted, var(--background));
387
- }
388
- .data-table-shell[data-sticky-first='true'] :global(tbody td:first-child) {
389
- z-index: 2;
390
- }
391
- /* Subtle right-edge shadow only when scrolled */
392
- .data-table-shell[data-sticky-first='true'] :global([data-slot='table-container']) {
393
- background:
394
- linear-gradient(to right, var(--background), var(--background)) left center,
395
- linear-gradient(to right, transparent, var(--background)) left center,
396
- radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.08), transparent) 0 center,
397
- radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.08), transparent) 100% center;
398
- background-repeat: no-repeat;
399
- background-size:
400
- 20px 100%,
401
- 20px 100%,
402
- 10px 100%,
403
- 10px 100%;
404
- background-attachment: local, local, scroll, scroll;
405
- }
406
- /* Selected row first-cell needs to keep selection bg over the sticky default */
407
- .data-table-shell[data-sticky-first='true']
408
- :global(tr[data-state='selected'] td:first-child) {
409
- background: var(--accent, var(--background));
410
- }
411
372
  </style>
@@ -27,8 +27,6 @@ type DataTableProps<TData, TValue> = {
27
27
  onRetry?: () => void;
28
28
  orderable?: boolean;
29
29
  onReorder?: (fromIndex: number, toIndex: number) => void;
30
- /** Pin first column when horizontally scrolling (helps on mobile with wide tables). Default true. */
31
- stickyFirstColumn?: boolean;
32
30
  /** Extend table to viewport edges on mobile via negative horizontal margin. Default true. */
33
31
  mobileEdgeBleed?: boolean;
34
32
  };
@@ -16,8 +16,8 @@ export type CouponInput = {
16
16
  export declare function createCouponSchema(lang?: InterfaceLanguage): z.ZodObject<{
17
17
  code: z.ZodString;
18
18
  type: z.ZodEnum<{
19
- fixed: "fixed";
20
19
  percent: "percent";
20
+ fixed: "fixed";
21
21
  }>;
22
22
  value: z.ZodNumber;
23
23
  minOrderAmount: z.ZodNullable<z.ZodNumber>;
@@ -10,6 +10,9 @@
10
10
  orderId: string;
11
11
  currency: string;
12
12
  remainingRefundable: number;
13
+ /** When the order has a deposit policy with paid deposit + balance rows. */
14
+ hasPartial?: boolean;
15
+ balanceOwed?: boolean;
13
16
  onOpenChange: (open: boolean) => void;
14
17
  onRefunded: () => void;
15
18
  };
@@ -19,6 +22,8 @@
19
22
  orderId,
20
23
  currency,
21
24
  remainingRefundable,
25
+ hasPartial = false,
26
+ balanceOwed = false,
22
27
  onOpenChange,
23
28
  onRefunded
24
29
  }: Props = $props();
@@ -28,6 +33,8 @@
28
33
  let mode = $state<'full' | 'partial'>('full');
29
34
  let amountInput = $state('');
30
35
  let reason = $state('');
36
+ let kind = $state<'full' | 'deposit' | 'balance'>('full');
37
+ let releaseStock = $state(false);
31
38
  let submitting = $state(false);
32
39
  let error = $state<string | null>(null);
33
40
 
@@ -43,6 +50,8 @@
43
50
  mode = 'full';
44
51
  amountInput = '';
45
52
  reason = '';
53
+ kind = 'full';
54
+ releaseStock = false;
46
55
  error = null;
47
56
  submitting = false;
48
57
  }
@@ -70,7 +79,9 @@
70
79
  const result = await remotes.refundOrderCmd({
71
80
  orderId,
72
81
  amount,
73
- reason: reason.trim() || undefined
82
+ reason: reason.trim() || undefined,
83
+ kind: hasPartial ? kind : undefined,
84
+ releaseStock: releaseStock || undefined
74
85
  });
75
86
  if (!result.success) {
76
87
  error = result.error;
@@ -102,6 +113,26 @@
102
113
  </Dialog.Description>
103
114
  </Dialog.Header>
104
115
  <form onsubmit={handleSubmit} class="space-y-4">
116
+ {#if hasPartial}
117
+ <fieldset class="space-y-2">
118
+ <legend class="mb-1 text-sm font-semibold">Która płatność?</legend>
119
+ <label class="flex items-center gap-2 text-sm">
120
+ <input type="radio" name="refund-kind" value="deposit" bind:group={kind} />
121
+ <span>Tylko zaliczka</span>
122
+ </label>
123
+ <label class="flex items-center gap-2 text-sm">
124
+ <input
125
+ type="radio"
126
+ name="refund-kind"
127
+ value="balance"
128
+ bind:group={kind}
129
+ disabled={balanceOwed}
130
+ />
131
+ <span>Tylko dopłata{balanceOwed ? ' (brak — nie wpłynęła)' : ''}</span>
132
+ </label>
133
+ </fieldset>
134
+ {/if}
135
+
105
136
  <fieldset class="space-y-2">
106
137
  <legend class="mb-1 text-sm font-semibold">Typ zwrotu</legend>
107
138
  <label class="flex items-center gap-2 text-sm">
@@ -114,6 +145,11 @@
114
145
  </label>
115
146
  </fieldset>
116
147
 
148
+ <label class="flex items-center gap-2 text-sm">
149
+ <input type="checkbox" bind:checked={releaseStock} />
150
+ <span>Zwolnij stan magazynowy</span>
151
+ </label>
152
+
117
153
  {#if mode === 'partial'}
118
154
  <div class="space-y-2">
119
155
  <Label for="refund-amount">Kwota (PLN)</Label>