@pisell/materials 2.2.85 → 2.2.87

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 (179) 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 +7 -7
  6. package/build/lowcode/preview.js +144 -160
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +25 -35
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +30 -40
  11. package/es/components/batch-editor/index.d.ts +0 -1
  12. package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
  13. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  14. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
  15. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  16. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  17. package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
  18. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  19. package/es/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
  20. package/es/components/dataSourceComponents/fields/index.d.ts +4 -5
  21. package/es/components/date-picker/index.d.ts +0 -1
  22. package/es/components/filter/index.d.ts +0 -1
  23. package/es/components/page/index.d.ts +0 -1
  24. package/es/components/pisellAdjustPrice/index.d.ts +1 -6
  25. package/es/components/pisellAdjustPrice/index.js +63 -8
  26. package/es/components/pisellAdjustPrice/index.less +35 -6
  27. package/es/components/pisellAdjustPrice/status.d.ts +32 -0
  28. package/es/components/pisellAdjustPrice/status.js +32 -0
  29. package/es/components/pisellAdjustPrice/type.d.ts +20 -0
  30. package/es/components/pisellAdjustPrice/type.js +1 -0
  31. package/es/components/pisellInput/index.d.ts +0 -1
  32. package/es/components/pisellModal/components/IpadModal/index.d.ts +0 -1
  33. package/es/components/pisellModal/components/MobileModal/index.d.ts +0 -1
  34. package/es/components/pisellModal/components/index.d.ts +0 -1
  35. package/es/components/pisellWalletPassCard/index.d.ts +1 -0
  36. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  37. package/es/components/productCard/components/Header/index.js +4 -3
  38. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  39. package/es/components/productCard/components/Sales/index.js +1 -1
  40. package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
  41. package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
  42. package/es/components/table/Actions/component/Group/index.d.ts +0 -1
  43. package/es/components/table/Actions/index.d.ts +0 -1
  44. package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
  45. package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
  46. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  47. package/es/components/table/Table/SelectField/index.d.ts +0 -1
  48. package/es/components/table/Table/fields/date/index.d.ts +0 -1
  49. package/es/components/table/Table/fields/image/Show/index.d.ts +0 -1
  50. package/es/components/table/Table/fields/image/index.d.ts +0 -1
  51. package/es/components/table/Table/fields/index.d.ts +2 -3
  52. package/es/components/table/Table/fields/link/index.d.ts +0 -1
  53. package/es/components/table/Table/fields/number/Show/index.d.ts +0 -1
  54. package/es/components/table/Table/fields/number/index.d.ts +0 -1
  55. package/es/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
  56. package/es/components/table/Table/fields/numberRange/index.d.ts +0 -1
  57. package/es/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
  58. package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
  59. package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  60. package/es/components/table/Table/fields/rangePicker/index.d.ts +0 -1
  61. package/es/components/table/Table/fields/search/Show/index.d.ts +0 -1
  62. package/es/components/table/Table/fields/search/index.d.ts +0 -1
  63. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  64. package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
  65. package/es/components/table/Table/fields/text/index.d.ts +0 -1
  66. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  67. package/es/components/table/Table/utils.d.ts +1 -1
  68. package/es/components/versionSelect/index.d.ts +0 -1
  69. package/es/components/virtual-keyboard/Amount/index.d.ts +10 -0
  70. package/es/components/virtual-keyboard/Amount/index.js +9 -4
  71. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
  72. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +38 -10
  73. package/es/components/virtual-keyboard/Keyboard/index.js +2 -2
  74. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
  75. package/es/components/virtual-keyboard/VirtualKeyInput/index.js +10 -3
  76. package/es/utils/index.d.ts +1 -1
  77. package/lib/components/batch-editor/index.d.ts +0 -1
  78. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
  79. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  80. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
  81. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  82. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  83. package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
  84. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  85. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
  86. package/lib/components/dataSourceComponents/fields/index.d.ts +4 -5
  87. package/lib/components/date-picker/index.d.ts +0 -1
  88. package/lib/components/filter/index.d.ts +0 -1
  89. package/lib/components/page/index.d.ts +0 -1
  90. package/lib/components/pisellAdjustPrice/index.d.ts +1 -6
  91. package/lib/components/pisellAdjustPrice/index.js +118 -57
  92. package/lib/components/pisellAdjustPrice/index.less +35 -6
  93. package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
  94. package/lib/components/pisellAdjustPrice/status.js +60 -0
  95. package/lib/components/pisellAdjustPrice/type.d.ts +20 -0
  96. package/lib/components/pisellAdjustPrice/type.js +17 -0
  97. package/lib/components/pisellInput/index.d.ts +0 -1
  98. package/lib/components/pisellModal/components/IpadModal/index.d.ts +0 -1
  99. package/lib/components/pisellModal/components/MobileModal/index.d.ts +0 -1
  100. package/lib/components/pisellModal/components/index.d.ts +0 -1
  101. package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
  102. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  103. package/lib/components/productCard/components/Header/index.js +4 -3
  104. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  105. package/lib/components/productCard/components/Sales/index.js +1 -1
  106. package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
  107. package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
  108. package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
  109. package/lib/components/table/Actions/index.d.ts +0 -1
  110. package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
  111. package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
  112. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  113. package/lib/components/table/Table/SelectField/index.d.ts +0 -1
  114. package/lib/components/table/Table/fields/date/index.d.ts +0 -1
  115. package/lib/components/table/Table/fields/image/Show/index.d.ts +0 -1
  116. package/lib/components/table/Table/fields/image/index.d.ts +0 -1
  117. package/lib/components/table/Table/fields/index.d.ts +2 -3
  118. package/lib/components/table/Table/fields/link/index.d.ts +0 -1
  119. package/lib/components/table/Table/fields/number/Show/index.d.ts +0 -1
  120. package/lib/components/table/Table/fields/number/index.d.ts +0 -1
  121. package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
  122. package/lib/components/table/Table/fields/numberRange/index.d.ts +0 -1
  123. package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
  124. package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
  125. package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  126. package/lib/components/table/Table/fields/rangePicker/index.d.ts +0 -1
  127. package/lib/components/table/Table/fields/search/Show/index.d.ts +0 -1
  128. package/lib/components/table/Table/fields/search/index.d.ts +0 -1
  129. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  130. package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
  131. package/lib/components/table/Table/fields/text/index.d.ts +0 -1
  132. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  133. package/lib/components/table/Table/utils.d.ts +1 -1
  134. package/lib/components/versionSelect/index.d.ts +0 -1
  135. package/lib/components/virtual-keyboard/Amount/index.d.ts +10 -0
  136. package/lib/components/virtual-keyboard/Amount/index.js +8 -3
  137. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
  138. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +31 -8
  139. package/lib/components/virtual-keyboard/Keyboard/index.js +2 -1
  140. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
  141. package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +34 -27
  142. package/lib/utils/index.d.ts +1 -1
  143. package/lowcode/pisell-adjust-price/meta.ts +168 -0
  144. package/lowcode/pisell-adjust-price/snippets.ts +1 -0
  145. package/package.json +3 -3
  146. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
  147. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
  148. package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  149. package/es/components/drag-sort-tree/index.d.ts +0 -4
  150. package/es/components/iconfont/index.d.ts +0 -8
  151. package/es/components/login-and-register/index.d.ts +0 -82
  152. package/es/components/pisell-config-provider/index.d.ts +0 -12
  153. package/es/components/pisellEmpty/index.d.ts +0 -19
  154. package/es/components/productCard/cartSkuCard/locales.d.ts +0 -93
  155. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
  156. package/es/components/productCard/locales.d.ts +0 -84
  157. package/es/components/productCard/status.d.ts +0 -32
  158. package/es/components/productCard/types.d.ts +0 -84
  159. package/es/components/table/types.d.ts +0 -251
  160. package/es/locales/en-US.d.ts +0 -278
  161. package/es/locales/zh-CN.d.ts +0 -273
  162. package/es/locales/zh-TW.d.ts +0 -273
  163. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
  164. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
  165. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  166. package/lib/components/drag-sort-tree/index.d.ts +0 -4
  167. package/lib/components/iconfont/index.d.ts +0 -8
  168. package/lib/components/login-and-register/index.d.ts +0 -82
  169. package/lib/components/pisell-config-provider/index.d.ts +0 -12
  170. package/lib/components/pisellEmpty/index.d.ts +0 -19
  171. package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -93
  172. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
  173. package/lib/components/productCard/locales.d.ts +0 -84
  174. package/lib/components/productCard/status.d.ts +0 -32
  175. package/lib/components/productCard/types.d.ts +0 -84
  176. package/lib/components/table/types.d.ts +0 -251
  177. package/lib/locales/en-US.d.ts +0 -278
  178. package/lib/locales/zh-CN.d.ts +0 -273
  179. package/lib/locales/zh-TW.d.ts +0 -273
@@ -35,13 +35,22 @@ module.exports = __toCommonJS(pisellAdjustPrice_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_classnames = __toESM(require("classnames"));
38
+ var import_utils = require("@pisell/utils");
38
39
  var import_pisellText = __toESM(require("../pisellText"));
39
40
  var import_Amount = __toESM(require("../virtual-keyboard/Amount"));
40
41
  var import_locales = require("../../locales");
41
42
  var import_index = require("./index.less");
42
43
  var import_usePisellConfig = __toESM(require("../pisell-config-provider/hooks/usePisellConfig"));
44
+ var import_status = require("./status");
43
45
  var PisellAdjustPrice = (props) => {
44
- const { value, onChange, defaultValue, originValue, ...others } = props;
46
+ const {
47
+ value,
48
+ onChange,
49
+ defaultValue,
50
+ originValue,
51
+ selectType = "light",
52
+ ...others
53
+ } = props;
45
54
  const config = (0, import_usePisellConfig.default)();
46
55
  const [newValue, setNewValue] = (0, import_react.useState)(value || 0);
47
56
  const [updateMode, setUpdateMode] = (0, import_react.useState)(
@@ -53,6 +62,16 @@ var PisellAdjustPrice = (props) => {
53
62
  (0, import_react.useEffect)(() => {
54
63
  document.body.id = "body";
55
64
  }, []);
65
+ const configColor = (0, import_react.useMemo)(() => {
66
+ const currentConfig = import_status.defaultConfig[selectType];
67
+ const validProps = Object.entries(props).reduce((acc, [key, value2]) => {
68
+ if (value2 !== void 0 && key in currentConfig) {
69
+ acc[key] = value2;
70
+ }
71
+ return acc;
72
+ }, {});
73
+ return { ...currentConfig, ...validProps };
74
+ }, [selectType, props]);
56
75
  const handleEnter = () => {
57
76
  if (isDiscountError) {
58
77
  return;
@@ -92,65 +111,107 @@ var PisellAdjustPrice = (props) => {
92
111
  return `${v}%`;
93
112
  }
94
113
  };
95
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-adjust-price-wrap" }, /* @__PURE__ */ import_react.default.createElement(
96
- import_antd.Segmented,
97
- {
98
- size: "large",
99
- options: [
100
- {
101
- label: (0, import_locales.getText)("pisell-adjust-price-price-override"),
102
- value: "priceOverride"
103
- },
104
- { label: (0, import_locales.getText)("pisell-adjust-price-discount"), value: "discount" }
105
- ],
106
- value: updateMode,
107
- onChange: handleUpdateMode,
108
- block: true
109
- }
110
- ), updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement(
111
- import_antd.Segmented,
112
- {
113
- size: "large",
114
- options: [
115
- {
116
- label: `${(0, import_locales.getText)("pisell-adjust-price-discount-amount")}(${(config == null ? void 0 : config.symbol) || "$"})`,
117
- value: "amount"
118
- },
119
- {
120
- label: `${(0, import_locales.getText)("pisell-adjust-price-discount-percentage")}(%)`,
121
- value: "percentage"
122
- }
123
- ],
124
- value: discountMode,
125
- onChange: (val) => {
126
- setNewValue("");
127
- setDiscountMode(val);
128
- },
129
- block: true
130
- }
131
- ), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-adjust-price-amount-wrap" }, /* @__PURE__ */ import_react.default.createElement(
132
- import_Amount.default,
133
- {
134
- ...others,
135
- inputFormat,
136
- defaultValue: updateMode === "priceOverride" ? defaultValue : "",
137
- key: updateMode,
138
- value: newValue,
139
- defaultSelect: updateMode === "priceOverride",
140
- onChange: handleChange,
141
- onEnter: handleEnter,
142
- placeholder: discountMode === "amount" ? "0" : "%"
143
- }
144
- )), updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-low-code-adjust-price-total" }, isDiscountError ? /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: originValue }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, newValue && (0, import_locales.getText)("pisell-adjust-price-total-after-discount"), /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: totalAfterDiscount }))), /* @__PURE__ */ import_react.default.createElement(
114
+ (0, import_react.useEffect)(() => {
115
+ (0, import_utils.setTheme)({
116
+ "--pisell-adjust-price-text-color": configColor.textColor,
117
+ "--pisell-adjust-price-background-color": configColor.backgroundColor,
118
+ "--pisell-adjust-price-container-background-color": configColor.containerBackgroundColor,
119
+ "--pisell-adjust-price-button-background-color": configColor.buttonBackgroundColor,
120
+ "--pisell-adjust-price-main-text-color": configColor.mainTextColor,
121
+ "--pisell-adjust-price-sub-text-color": configColor.subTextColor
122
+ });
123
+ }, [configColor]);
124
+ return /* @__PURE__ */ import_react.default.createElement(
145
125
  "div",
146
126
  {
147
- className: (0, import_classnames.default)("pisell-low-code-adjust-price-amount-desc", {
148
- ["pisell-low-code-adjust-price-amount-desc-error"]: isDiscountError
127
+ className: (0, import_classnames.default)("pisell-lowcode-adjust-price-wrap", {
128
+ "pisell-lowcode-adjust-price-dark": selectType === "dark",
129
+ "pisell-lowcode-adjust-price-light": selectType === "light"
149
130
  })
150
131
  },
151
- (0, import_locales.getText)("pisell-adjust-price-discount-can-be-maximum"),
152
- " ",
153
- discountMode === "amount" ? /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: originValue }) : "100%"
154
- )));
132
+ /* @__PURE__ */ import_react.default.createElement(
133
+ import_antd.Segmented,
134
+ {
135
+ size: "large",
136
+ options: [
137
+ {
138
+ label: (0, import_locales.getText)("pisell-adjust-price-price-override"),
139
+ value: "priceOverride"
140
+ },
141
+ { label: (0, import_locales.getText)("pisell-adjust-price-discount"), value: "discount" }
142
+ ],
143
+ value: updateMode,
144
+ onChange: handleUpdateMode,
145
+ block: true
146
+ }
147
+ ),
148
+ updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement(
149
+ import_antd.Segmented,
150
+ {
151
+ size: "large",
152
+ options: [
153
+ {
154
+ label: `${(0, import_locales.getText)("pisell-adjust-price-discount-amount")}(${(config == null ? void 0 : config.symbol) || "$"})`,
155
+ value: "amount"
156
+ },
157
+ {
158
+ label: `${(0, import_locales.getText)("pisell-adjust-price-discount-percentage")}(%)`,
159
+ value: "percentage"
160
+ }
161
+ ],
162
+ value: discountMode,
163
+ onChange: (val) => {
164
+ setNewValue("");
165
+ setDiscountMode(val);
166
+ },
167
+ block: true
168
+ }
169
+ ),
170
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-adjust-price-amount-wrap" }, /* @__PURE__ */ import_react.default.createElement(
171
+ import_Amount.default,
172
+ {
173
+ ...others,
174
+ inputFormat,
175
+ defaultValue: updateMode === "priceOverride" ? defaultValue : "",
176
+ key: updateMode,
177
+ value: newValue,
178
+ defaultSelect: updateMode === "priceOverride",
179
+ onChange: handleChange,
180
+ onEnter: handleEnter,
181
+ placeholder: discountMode === "amount" ? "0" : "%",
182
+ rightItemsStyle: {
183
+ buttonBackgroundColor: configColor.buttonBackgroundColor,
184
+ textColor: configColor.textColor,
185
+ resetButtonBackgroundColor: configColor.resetButtonBackgroundColor,
186
+ resetButtonTextColor: configColor.resetButtonTextColor,
187
+ isDoneButtonFollowTheme: configColor.isDoneButtonFollowTheme,
188
+ doneButtonBackgroundColor: configColor.doneButtonBackgroundColor,
189
+ doneButtonTextColor: configColor.doneButtonTextColor
190
+ }
191
+ }
192
+ )),
193
+ updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement("div", null, configColor.isShowMainText ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-low-code-adjust-price-total" }, isDiscountError ? /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: originValue }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, newValue && (0, import_locales.getText)("pisell-adjust-price-total-after-discount"), /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: totalAfterDiscount }))) : null, configColor.isShowSubText ? /* @__PURE__ */ import_react.default.createElement(
194
+ "div",
195
+ {
196
+ className: (0, import_classnames.default)(
197
+ "pisell-low-code-adjust-price-amount-desc",
198
+ {
199
+ ["pisell-low-code-adjust-price-amount-desc-error"]: isDiscountError
200
+ }
201
+ )
202
+ },
203
+ (0, import_locales.getText)("pisell-adjust-price-discount-can-be-maximum"),
204
+ " ",
205
+ discountMode === "amount" ? /* @__PURE__ */ import_react.default.createElement(
206
+ import_pisellText.default.Amount,
207
+ {
208
+ value: originValue,
209
+ style: {
210
+ color: configColor.subTextColor
211
+ }
212
+ }
213
+ ) : "100%"
214
+ ) : null)
215
+ );
155
216
  };
156
217
  var pisellAdjustPrice_default = PisellAdjustPrice;
@@ -1,30 +1,59 @@
1
1
  .pisell-lowcode-adjust-price-wrap {
2
2
  width: 380px;
3
3
  border-radius: 10px;
4
- background-color: #fff;
4
+ background-color: var(--pisell-adjust-price-background-color);
5
5
  padding: 10px;
6
6
  display: flex;
7
7
  flex-direction: column;
8
8
  gap: 10px;
9
+ transition: all 0.3s ease;
10
+
11
+ // 浅色模式样式
12
+ &.pisell-lowcode-adjust-price-light {
13
+ .pisell-lowcode-segmented-item-label {
14
+ color: #667085;
15
+ }
16
+ }
17
+
18
+ // 深色模式样式
19
+ &.pisell-lowcode-adjust-price-dark {
20
+ .pisell-lowcode-segmented-item-label {
21
+ color: #d0d5dd;
22
+ }
23
+ }
24
+
25
+ .pisell-lowcode-segmented {
26
+ background: var(--pisell-adjust-price-container-background-color);
27
+ :hover {
28
+ color: var(--pisell-adjust-price-text-color);
29
+ }
30
+ .pisell-lowcode-segmented-item-selected {
31
+ background: var(--pisell-adjust-price-button-background-color);
32
+ .pisell-lowcode-segmented-item-label {
33
+ color: var(--pisell-adjust-price-text-color) !important;
34
+ }
35
+ }
36
+ }
37
+
9
38
  .pisell-lowcode-adjust-price-amount-wrap {
10
39
  padding: 10px;
11
40
  border-radius: 10px;
12
- background: var(--Gray-300, #D0D5DD);
41
+ background: var(--pisell-adjust-price-container-background-color);
13
42
  }
14
43
  .pisell-low-code-adjust-price-total {
15
- color: var(--Gray-900, #101828);
44
+ color: var(--pisell-adjust-price-main-text-color);
16
45
  font-size: 20px;
17
46
  font-weight: 600;
18
47
  line-height: 30px; /* 150% */
19
48
  }
20
49
  .pisell-low-code-adjust-price-amount-desc {
21
- color: var(--Gray-500, #667085);
50
+ color: var(--pisell-adjust-price-sub-text-color);
22
51
  font-size: 16px;
23
52
  font-style: normal;
24
53
  font-weight: 400;
25
54
  line-height: 24px; /* 150% */
26
55
  }
27
56
  .pisell-low-code-adjust-price-amount-desc-error {
28
- color: var(--Error-600, #D92D20);
57
+ color: var(--Error-600, #d92d20);
29
58
  }
30
- }
59
+ }
@@ -0,0 +1,32 @@
1
+ export declare const defaultConfig: {
2
+ dark: {
3
+ backgroundColor: string;
4
+ containerBackgroundColor: string;
5
+ buttonBackgroundColor: string;
6
+ textColor: string;
7
+ resetButtonBackgroundColor: string;
8
+ resetButtonTextColor: string;
9
+ isDoneButtonFollowTheme: boolean;
10
+ doneButtonBackgroundColor: string;
11
+ doneButtonTextColor: string;
12
+ isShowMainText: boolean;
13
+ mainTextColor: string;
14
+ isShowSubText: boolean;
15
+ subTextColor: string;
16
+ };
17
+ light: {
18
+ backgroundColor: string;
19
+ containerBackgroundColor: string;
20
+ buttonBackgroundColor: string;
21
+ textColor: string;
22
+ resetButtonBackgroundColor: string;
23
+ resetButtonTextColor: string;
24
+ isDoneButtonFollowTheme: boolean;
25
+ doneButtonBackgroundColor: string;
26
+ doneButtonTextColor: string;
27
+ isShowMainText: boolean;
28
+ mainTextColor: string;
29
+ isShowSubText: boolean;
30
+ subTextColor: string;
31
+ };
32
+ };
@@ -0,0 +1,60 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/pisellAdjustPrice/status.ts
20
+ var status_exports = {};
21
+ __export(status_exports, {
22
+ defaultConfig: () => defaultConfig
23
+ });
24
+ module.exports = __toCommonJS(status_exports);
25
+ var defaultConfig = {
26
+ dark: {
27
+ backgroundColor: "rgba(0, 0, 0, 0.70)",
28
+ containerBackgroundColor: "rgba(0, 0, 0, 0.40)",
29
+ buttonBackgroundColor: "#ffffff",
30
+ textColor: "#000000",
31
+ resetButtonBackgroundColor: "#ffffff",
32
+ resetButtonTextColor: "#d92d20",
33
+ isDoneButtonFollowTheme: true,
34
+ doneButtonBackgroundColor: "#4ca30d",
35
+ doneButtonTextColor: "#ffffff",
36
+ isShowMainText: true,
37
+ mainTextColor: "#ffffff",
38
+ isShowSubText: true,
39
+ subTextColor: "#d0d5dd"
40
+ },
41
+ light: {
42
+ backgroundColor: "#ffffff",
43
+ containerBackgroundColor: "#d0d5dd",
44
+ buttonBackgroundColor: "#ffffff",
45
+ textColor: "#000000",
46
+ resetButtonBackgroundColor: "#ffffff",
47
+ resetButtonTextColor: "#d92d20",
48
+ isDoneButtonFollowTheme: true,
49
+ doneButtonBackgroundColor: "#4ca30d",
50
+ doneButtonTextColor: "#ffffff",
51
+ isShowMainText: true,
52
+ mainTextColor: "#101828",
53
+ isShowSubText: true,
54
+ subTextColor: "#667085"
55
+ }
56
+ };
57
+ // Annotate the CommonJS export names for ESM import in node:
58
+ 0 && (module.exports = {
59
+ defaultConfig
60
+ });
@@ -0,0 +1,20 @@
1
+ export interface PisellAdjustPriceProps {
2
+ value?: number;
3
+ originValue: number;
4
+ defaultValue?: number;
5
+ onChange?: (val: number) => void;
6
+ selectType?: 'light' | 'dark';
7
+ backgroundColor?: string;
8
+ containerBackgroundColor?: string;
9
+ buttonBackgroundColor?: string;
10
+ textColor?: string;
11
+ resetButtonBackgroundColor?: string;
12
+ resetButtonTextColor?: string;
13
+ isDoneButtonFollowTheme?: boolean;
14
+ doneButtonBackgroundColor?: string;
15
+ doneButtonTextColor?: string;
16
+ isShowMainText?: boolean;
17
+ mainTextColor?: string;
18
+ isShowSubText?: boolean;
19
+ subTextColor?: string;
20
+ }
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/components/pisellAdjustPrice/type.ts
16
+ var type_exports = {};
17
+ module.exports = __toCommonJS(type_exports);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputProps } from 'antd';
3
2
  import { PisellContextType } from '../pisell-config-provider/context';
4
3
  declare const PisellInput: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PcModalProps } from '../PcModal';
3
2
  export interface IpadModalProps extends PcModalProps {
4
3
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PcModalProps } from '../PcModal';
3
2
  import './index.less';
4
3
  export interface MobileModalProps extends PcModalProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import IpadModal from './IpadModal';
3
2
  import MobileModal from './MobileModal';
4
3
  import PcModal from './PcModal';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  export interface PisellWalletPassCardProps {
3
4
  id: number;
@@ -6,7 +6,7 @@
6
6
  * @Author: WangHan
7
7
  * @Date: 2024-11-22 10:01
8
8
  */
9
- export declare const minusSign: (item: any, type?: string) => "-" | "";
9
+ export declare const minusSign: (item: any, type?: string) => "" | "-";
10
10
  /**
11
11
  * @title: 金额格式化
12
12
  * @description:
@@ -59,11 +59,12 @@ var Header = (props) => {
59
59
  name,
60
60
  price,
61
61
  symbol,
62
- disabled
62
+ disabled,
63
+ relation_products
63
64
  } = item;
64
65
  const showPrice = (0, import_react.useMemo)(() => {
65
- return (bundle == null ? void 0 : bundle.length) > 0 || (options == null ? void 0 : options.length) > 0;
66
- }, [bundle, options]);
66
+ return (bundle == null ? void 0 : bundle.length) > 0 || (options == null ? void 0 : options.length) > 0 || ((relation_products == null ? void 0 : relation_products.length) || 0) > 0;
67
+ }, [bundle, options, relation_products]);
67
68
  const headerCenterStyle = (0, import_react.useMemo)(() => {
68
69
  return (options == null ? void 0 : options.length) > 0 || product_option_string;
69
70
  }, [options, product_option_string]);
@@ -6,7 +6,7 @@
6
6
  * @Author: WangHan
7
7
  * @Date: 2024-11-22 10:01
8
8
  */
9
- export declare const minusSign: (item: any, type?: string) => "-" | "";
9
+ export declare const minusSign: (item: any, type?: string) => "" | "-";
10
10
  /**
11
11
  * @title: 金额格式化
12
12
  * @description:
@@ -47,7 +47,7 @@ var Sales = ({ item, isShowNote }) => {
47
47
  price: p == null ? void 0 : p.selling_price,
48
48
  symbol: item.symbol,
49
49
  num: p == null ? void 0 : p.product_quantity,
50
- total: p == null ? void 0 : p.payment_price
50
+ total: p == null ? void 0 : p.selling_price
51
51
  };
52
52
  });
53
53
  return (other_products == null ? void 0 : other_products.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-sales-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-sales-title` }, import_utils2.locales.getText("pisell2.product.card.sales")), /* @__PURE__ */ import_react.default.createElement(
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type ColumnsSettingProps = {
3
2
  value?: Record<string, any>[];
4
3
  onChange?: (val: Record<string, any>[]) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GallerySettingType, ModeType } from "../../../types";
3
2
  import "./index.less";
4
3
  declare type GallerySettingProps = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DataSourceGroupType } from "../../../types";
3
2
  declare type GroupProps = {
4
3
  setting: DataSourceGroupType;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FilterType } from "../../filter/types";
3
2
  import { ColumnSettingType, DataSourceGroupType, ExportImportType, GallerySettingType, GridViewType, SortType } from "../types";
4
3
  import "./index.less";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GallerySettingType, GallerySettingValueType } from "../../../../../types";
3
2
  declare type CoverProps = {
4
3
  cover?: GallerySettingType["cover"];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GallerySettingType } from "../../../../../types";
3
2
  import "./index.less";
4
3
  declare type TitleProps = GallerySettingType["title"] & {
@@ -1,5 +1,5 @@
1
1
  declare const useGapSize: (gap: number | number[]) => {
2
- horizontal: number;
3
- vertical: number;
2
+ horizontal: any;
3
+ vertical: any;
4
4
  };
5
5
  export default useGapSize;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const SelectField: () => JSX.Element;
3
2
  export default SelectField;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FieldPropsType } from "../../types";
3
2
  declare const Show: (props: FieldPropsType) => JSX.Element;
4
3
  export default Show;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  field: {
4
3
  field_icon: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const fieldMaps: {
3
2
  text: {
4
3
  field: {
@@ -198,12 +197,12 @@ export declare const fieldList: ({
198
197
  field_icon: string;
199
198
  field_name: string;
200
199
  field_type: string;
201
- default_value: boolean;
200
+ default_value: string;
202
201
  } | {
203
202
  field_icon: string;
204
203
  field_name: string;
205
204
  field_type: string;
206
- default_value: string;
205
+ default_value: boolean;
207
206
  } | {
208
207
  field_icon: string;
209
208
  field_name: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  field: {
4
3
  field_icon: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FieldPropsType } from "../../types";
3
2
  declare const Show: (props: FieldPropsType) => JSX.Element;
4
3
  export default Show;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FieldPropsType } from "../../types";
3
2
  declare const Show: (props: FieldPropsType) => JSX.Element;
4
3
  export default Show;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FieldPropsType } from "../../types";
3
2
  declare const Show: (props: FieldPropsType) => JSX.Element;
4
3
  export default Show;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  field: {
4
3
  field_icon: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FieldPropsType } from "../../types";
3
2
  declare const Show: (props: FieldPropsType) => JSX.Element;
4
3
  export default Show;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;