@pisell/private-materials 6.3.52 → 6.3.54

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 (196) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  12. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  13. package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
  14. package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
  15. package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  16. package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -1
  17. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  18. package/es/components/booking/info/date/index.d.ts +0 -1
  19. package/es/components/booking/info/notes/index.d.ts +0 -1
  20. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  21. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  22. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
  23. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  24. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  25. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  26. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  27. package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
  28. package/es/components/eftpos/form/index.d.ts +1 -0
  29. package/es/components/eftpos/hooks.d.ts +1 -0
  30. package/es/components/eftposPay/amount.d.ts +0 -1
  31. package/es/components/eftposPay/hooks.d.ts +1 -1
  32. package/es/components/eftposPay/payo/config.d.ts +0 -1
  33. package/es/components/eftposPay/store/index.d.ts +1 -1
  34. package/es/components/eftposPay/tip.d.ts +0 -1
  35. package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  36. package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
  37. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  38. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  39. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  40. package/es/components/index.d.ts +2 -1
  41. package/es/components/index.js +2 -1
  42. package/es/components/login/index.d.ts +0 -1
  43. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  44. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  45. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  46. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  47. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  48. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  49. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  50. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  51. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  52. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  53. package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  54. package/es/components/schedules/calendar/index.d.ts +0 -1
  55. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  56. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  57. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  58. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  59. package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  60. package/es/components/schedules/products/list/index.d.ts +0 -1
  61. package/es/components/schedules/resources/list/index.d.ts +0 -1
  62. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  63. package/es/components/shoppingCart/index.d.ts +0 -1
  64. package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  65. package/es/components/systemSettings/registry/components/GroupModal.js +160 -0
  66. package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  67. package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
  68. package/es/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  69. package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
  70. package/es/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  71. package/es/components/systemSettings/registry/components/SectionList.js +174 -0
  72. package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  73. package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
  74. package/es/components/systemSettings/registry/components/index.d.ts +4 -0
  75. package/es/components/systemSettings/registry/components/index.js +4 -0
  76. package/es/components/systemSettings/registry/index.d.ts +5 -0
  77. package/es/components/systemSettings/registry/index.js +1059 -0
  78. package/es/components/systemSettings/registry/index.less +410 -0
  79. package/es/components/systemSettings/registry/locales.d.ts +272 -0
  80. package/es/components/systemSettings/registry/locales.js +300 -0
  81. package/es/components/systemSettings/registry/services.d.ts +77 -0
  82. package/es/components/systemSettings/registry/services.js +472 -0
  83. package/es/components/systemSettings/registry/types.d.ts +126 -0
  84. package/es/components/systemSettings/registry/types.js +1 -0
  85. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  86. package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
  87. package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
  88. package/es/components/systemSettings/registry/utils/validators.js +44 -0
  89. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
  90. package/es/hooks/usePaymentLogger.d.ts +0 -1
  91. package/es/index.d.ts +1 -0
  92. package/es/index.js +1 -0
  93. package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
  94. package/es/plus/saasRegister/components/EntryEmail.d.ts +0 -1
  95. package/es/plus/saasRegister/components/EntryInfo.d.ts +0 -1
  96. package/es/plus/saasRegister/components/GoLogin.d.ts +0 -1
  97. package/es/plus/saasRegister/components/Header.d.ts +0 -1
  98. package/es/plus/saasRegister/components/VerifyError.d.ts +0 -1
  99. package/es/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
  100. package/es/plus/walletPassGallery/serve.js +2 -0
  101. package/es/pro/Login2.0/AuthModal.js +12 -4
  102. package/es/pro/Login2.0/index.less +3 -3
  103. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  104. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  105. package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
  106. package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
  107. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  108. package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -1
  109. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  110. package/lib/components/booking/info/date/index.d.ts +0 -1
  111. package/lib/components/booking/info/notes/index.d.ts +0 -1
  112. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  113. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  114. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
  115. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  116. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  117. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  118. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  119. package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
  120. package/lib/components/eftpos/form/index.d.ts +1 -0
  121. package/lib/components/eftpos/hooks.d.ts +1 -0
  122. package/lib/components/eftposPay/amount.d.ts +0 -1
  123. package/lib/components/eftposPay/hooks.d.ts +1 -1
  124. package/lib/components/eftposPay/payo/config.d.ts +0 -1
  125. package/lib/components/eftposPay/store/index.d.ts +1 -1
  126. package/lib/components/eftposPay/tip.d.ts +0 -1
  127. package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  128. package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
  129. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  130. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  131. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  132. package/lib/components/index.d.ts +2 -1
  133. package/lib/components/index.js +3 -0
  134. package/lib/components/login/index.d.ts +0 -1
  135. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  136. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  137. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  138. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  139. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  140. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  141. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  142. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  143. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  144. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  145. package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  146. package/lib/components/schedules/calendar/index.d.ts +0 -1
  147. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  148. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  149. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  150. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  151. package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  152. package/lib/components/schedules/products/list/index.d.ts +0 -1
  153. package/lib/components/schedules/resources/list/index.d.ts +0 -1
  154. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  155. package/lib/components/shoppingCart/index.d.ts +0 -1
  156. package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  157. package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
  158. package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  159. package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
  160. package/lib/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  161. package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
  162. package/lib/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  163. package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
  164. package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  165. package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
  166. package/lib/components/systemSettings/registry/components/index.d.ts +4 -0
  167. package/lib/components/systemSettings/registry/components/index.js +48 -0
  168. package/lib/components/systemSettings/registry/index.d.ts +5 -0
  169. package/lib/components/systemSettings/registry/index.js +529 -0
  170. package/lib/components/systemSettings/registry/index.less +410 -0
  171. package/lib/components/systemSettings/registry/locales.d.ts +272 -0
  172. package/lib/components/systemSettings/registry/locales.js +324 -0
  173. package/lib/components/systemSettings/registry/services.d.ts +77 -0
  174. package/lib/components/systemSettings/registry/services.js +290 -0
  175. package/lib/components/systemSettings/registry/types.d.ts +126 -0
  176. package/lib/components/systemSettings/registry/types.js +17 -0
  177. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  178. package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
  179. package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
  180. package/lib/components/systemSettings/registry/utils/validators.js +54 -0
  181. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
  182. package/lib/hooks/usePaymentLogger.d.ts +0 -1
  183. package/lib/index.d.ts +1 -0
  184. package/lib/index.js +3 -0
  185. package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
  186. package/lib/plus/saasRegister/components/EntryEmail.d.ts +0 -1
  187. package/lib/plus/saasRegister/components/EntryInfo.d.ts +0 -1
  188. package/lib/plus/saasRegister/components/GoLogin.d.ts +0 -1
  189. package/lib/plus/saasRegister/components/Header.d.ts +0 -1
  190. package/lib/plus/saasRegister/components/VerifyError.d.ts +0 -1
  191. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
  192. package/lib/plus/walletPassGallery/serve.js +2 -0
  193. package/lib/pro/Login2.0/AuthModal.js +15 -7
  194. package/lib/pro/Login2.0/index.less +3 -3
  195. package/lowcode/settings-registry/meta.ts +29 -0
  196. package/package.json +3 -3
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const SelectHolderModal: (props: any) => JSX.Element;
3
2
  export default SelectHolderModal;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Resource: (props: any) => JSX.Element;
3
2
  export default Resource;
@@ -20,4 +20,5 @@ import StepController from './stepController';
20
20
  import PinModal from './pinModal';
21
21
  import PinVerifyModal from './pinVerifyModal';
22
22
  import { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from './authentication/admin';
23
- export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, };
23
+ import Registry from './systemSettings/registry';
24
+ export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, Registry, };
@@ -47,6 +47,7 @@ __export(components_exports, {
47
47
  PinVerifyModal: () => import_pinVerifyModal.default,
48
48
  PisellSelectCustomerModal: () => import_pisellSelectCustomerModal.default,
49
49
  ProductExtension: () => import_productExtension.default,
50
+ Registry: () => import_registry.default,
50
51
  RuleSetting: () => import_ruleSetting.default,
51
52
  SaaSAdminAuth: () => import_admin.SaaSAdminAuth,
52
53
  SaaSManagermentAuth: () => import_admin.SaaSManagermentAuth,
@@ -83,6 +84,7 @@ var import_stepController = __toESM(require("./stepController"));
83
84
  var import_pinModal = __toESM(require("./pinModal"));
84
85
  var import_pinVerifyModal = __toESM(require("./pinVerifyModal"));
85
86
  var import_admin = require("./authentication/admin");
87
+ var import_registry = __toESM(require("./systemSettings/registry"));
86
88
  // Annotate the CommonJS export names for ESM import in node:
87
89
  0 && (module.exports = {
88
90
  Booking,
@@ -103,6 +105,7 @@ var import_admin = require("./authentication/admin");
103
105
  PinVerifyModal,
104
106
  PisellSelectCustomerModal,
105
107
  ProductExtension,
108
+ Registry,
106
109
  RuleSetting,
107
110
  SaaSAdminAuth,
108
111
  SaaSManagermentAuth,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  export interface LoginProps {
4
3
  title: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
2
3
  public_key: string;
3
4
  client_secret?: string | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.module.less';
2
3
  declare const StripePayment: () => JSX.Element;
3
4
  export default StripePayment;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const DateSectionCom: ({ value, onChange, showTime, className, style, useSpace, format, itemStyle, }: any) => JSX.Element;
3
2
  export default DateSectionCom;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const GenderField: (props: any) => JSX.Element;
3
2
  export default GenderField;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface AddClientProps {
4
3
  onChange: (value: any) => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface InfoProps {
2
3
  relation_id: any;
3
4
  action: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const ProductItemPreview: ({ item, onClick, onRemove, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItemPreview;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface valueType {
4
3
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const SelectResourcesTable: ({ value, onChange }: any) => JSX.Element;
4
3
  export default SelectResourcesTable;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface RuleSettingProps {
4
3
  value: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Calendar: () => JSX.Element;
4
3
  export default Calendar;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare type CurrentDayProps = {
4
3
  onClose: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ScheduleItem } from "../../type";
3
2
  import "./index.less";
4
3
  declare type ScheduleDetailListPropsType = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const ResourcesModule: ({ product }: {
3
2
  product: any;
4
3
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const ProductDetail: ({ form, currentProduct, }: {
3
4
  form: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare type Item = any;
4
3
  interface ProductItemProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface ProductListProps {
4
3
  loading: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare type ResourcesListProps = {
4
3
  list: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const RelationProduct: ({ value, onChange, }: {
3
4
  value?: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { shoppingCartProps } from './type';
3
2
  declare const shoppingCart: ({ onCard, onAction, onChange, onAddProduct, onActiveKey, ...props }: shoppingCartProps) => JSX.Element;
4
3
  export default shoppingCart;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { GroupModalProps } from '../types';
3
+ declare const GroupModal: React.FC<GroupModalProps>;
4
+ export default GroupModal;
@@ -0,0 +1,177 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/systemSettings/registry/components/GroupModal.tsx
30
+ var GroupModal_exports = {};
31
+ __export(GroupModal_exports, {
32
+ default: () => GroupModal_default
33
+ });
34
+ module.exports = __toCommonJS(GroupModal_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_materials = require("@pisell/materials");
38
+ var import_utils = require("@pisell/utils");
39
+ var import_locales = __toESM(require("../locales"));
40
+ var getText = (key) => {
41
+ const globalText = import_utils.locales.getText(key);
42
+ if (globalText !== key) {
43
+ return globalText;
44
+ }
45
+ const currentLocale = import_utils.locales.locale || "zh-CN";
46
+ const localeData = import_locales.default[currentLocale] || import_locales.default["en"] || {};
47
+ return localeData[key] || key;
48
+ };
49
+ var GroupModal = ({
50
+ open,
51
+ type,
52
+ data,
53
+ onOk,
54
+ onCancel
55
+ }) => {
56
+ const [form] = import_antd.Form.useForm();
57
+ (0, import_react.useEffect)(() => {
58
+ if (open) {
59
+ if (type === "edit" && data) {
60
+ form.setFieldsValue({
61
+ title: data.title,
62
+ code: data.code
63
+ });
64
+ } else {
65
+ form.resetFields();
66
+ }
67
+ }
68
+ }, [open, type, data, form]);
69
+ const handleOk = async () => {
70
+ try {
71
+ const values = await form.validateFields();
72
+ await onOk(values);
73
+ form.resetFields();
74
+ } catch (error) {
75
+ console.error("Validation failed:", error);
76
+ }
77
+ };
78
+ const handleCancel = () => {
79
+ form.resetFields();
80
+ onCancel();
81
+ };
82
+ const title = import_utils.locales.getText(
83
+ type === "add" ? "registry.modal.add.group" : "registry.modal.edit.group"
84
+ );
85
+ return /* @__PURE__ */ import_react.default.createElement(
86
+ import_antd.Drawer,
87
+ {
88
+ title,
89
+ open,
90
+ onClose: handleCancel,
91
+ width: 400,
92
+ destroyOnClose: true,
93
+ footer: /* @__PURE__ */ import_react.default.createElement("div", { style: { textAlign: "right" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: "small" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { onClick: handleCancel }, import_utils.locales.getText("registry.button.cancel")), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { type: "primary", onClick: handleOk }, import_utils.locales.getText("registry.button.save"))))
94
+ },
95
+ /* @__PURE__ */ import_react.default.createElement(
96
+ import_antd.Form,
97
+ {
98
+ form,
99
+ layout: "vertical",
100
+ requiredMark: true
101
+ },
102
+ /* @__PURE__ */ import_react.default.createElement(
103
+ import_antd.Form.Item,
104
+ {
105
+ name: "title",
106
+ label: import_utils.locales.getText("registry.form.title"),
107
+ rules: [
108
+ {
109
+ required: true,
110
+ message: import_utils.locales.getText("registry.message.required")
111
+ }
112
+ ]
113
+ },
114
+ /* @__PURE__ */ import_react.default.createElement(
115
+ import_materials.BaseTranslation,
116
+ {
117
+ placeholder: import_utils.locales.getText("registry.form.name.placeholder")
118
+ }
119
+ )
120
+ ),
121
+ /* @__PURE__ */ import_react.default.createElement(
122
+ import_antd.Form.Item,
123
+ {
124
+ name: "code",
125
+ label: import_utils.locales.getText("registry.form.code"),
126
+ rules: [
127
+ {
128
+ required: true,
129
+ message: import_utils.locales.getText("registry.message.required")
130
+ },
131
+ {
132
+ validator: (_, value) => {
133
+ if (!value) return Promise.resolve();
134
+ if (!/^[a-z0-9\._]+$/.test(value)) {
135
+ return Promise.reject(
136
+ new Error(
137
+ getText("registry.message.code.format")
138
+ )
139
+ );
140
+ }
141
+ if (!/^[a-z]/.test(value)) {
142
+ return Promise.reject(
143
+ new Error(
144
+ getText("registry.message.code.start")
145
+ )
146
+ );
147
+ }
148
+ if (/[\._]$/.test(value)) {
149
+ return Promise.reject(
150
+ new Error(
151
+ getText("registry.message.code.end")
152
+ )
153
+ );
154
+ }
155
+ if (/[\.]{2,}|[\_]{2,}/.test(value)) {
156
+ return Promise.reject(
157
+ new Error(
158
+ getText("registry.message.code.consecutive")
159
+ )
160
+ );
161
+ }
162
+ return Promise.resolve();
163
+ }
164
+ }
165
+ ]
166
+ },
167
+ /* @__PURE__ */ import_react.default.createElement(
168
+ import_antd.Input,
169
+ {
170
+ placeholder: import_utils.locales.getText("registry.form.code.placeholder")
171
+ }
172
+ )
173
+ )
174
+ )
175
+ );
176
+ };
177
+ var GroupModal_default = GroupModal;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ItemModalProps } from '../types';
3
+ declare const ItemModal: React.FC<ItemModalProps>;
4
+ export default ItemModal;