@cloudtower/eagle 0.17.12 → 0.17.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/SimplePagination/index.d.ts +4 -0
- package/dist/esm/index.js +72 -3
- package/dist/esm/stats1.html +1 -1
- package/dist/spec/base.d.ts +8 -0
- package/dist/style.css +747 -737
- package/dist/umd/index.js +72 -2
- package/dist/umd/stats1.html +1 -1
- package/package.json +4 -3
package/dist/umd/index.js
CHANGED
|
@@ -1322,7 +1322,8 @@
|
|
|
1322
1322
|
arch: ThrowError,
|
|
1323
1323
|
buttonGroup: React.forwardRef(ThrowError),
|
|
1324
1324
|
steps: ThrowError,
|
|
1325
|
-
form: ThrowError
|
|
1325
|
+
form: ThrowError,
|
|
1326
|
+
simplePagination: ThrowError
|
|
1326
1327
|
};
|
|
1327
1328
|
|
|
1328
1329
|
const kitContext = React.createContext(emptyImpl);
|
|
@@ -3174,6 +3175,73 @@
|
|
|
3174
3175
|
}, props), renderChildren());
|
|
3175
3176
|
};
|
|
3176
3177
|
|
|
3178
|
+
const inputStyle = "igz4le8";
|
|
3179
|
+
const SimplePagination = props => {
|
|
3180
|
+
const {
|
|
3181
|
+
className,
|
|
3182
|
+
current,
|
|
3183
|
+
count,
|
|
3184
|
+
size,
|
|
3185
|
+
onPageChange
|
|
3186
|
+
} = props;
|
|
3187
|
+
const pageLength = Math.ceil(count / size);
|
|
3188
|
+
const showPrev = current > 1;
|
|
3189
|
+
const showNext = current * size < count;
|
|
3190
|
+
const changeValue = React.useCallback(value => {
|
|
3191
|
+
const page = parseInt(value);
|
|
3192
|
+
if (page > 0) {
|
|
3193
|
+
onPageChange == null ? void 0 : onPageChange(Math.min(pageLength, page));
|
|
3194
|
+
} else {
|
|
3195
|
+
onPageChange == null ? void 0 : onPageChange(1);
|
|
3196
|
+
}
|
|
3197
|
+
}, [onPageChange, pageLength]);
|
|
3198
|
+
return /* @__PURE__ */React.createElement("div", {
|
|
3199
|
+
className: cs(PaginationStyle, "pagination-wrapper", className)
|
|
3200
|
+
}, /* @__PURE__ */React.createElement("span", {
|
|
3201
|
+
className: Typo.Label.l3_regular_title
|
|
3202
|
+
}, parrot.parrotI18n.t("components.pagination_lots_total", {
|
|
3203
|
+
total: count
|
|
3204
|
+
})), /* @__PURE__ */React.createElement("span", {
|
|
3205
|
+
className: "pagination-right"
|
|
3206
|
+
}, showPrev && /* @__PURE__ */React.createElement(Button, {
|
|
3207
|
+
className: "prev-btn",
|
|
3208
|
+
type: "quiet",
|
|
3209
|
+
size: "small",
|
|
3210
|
+
style: {
|
|
3211
|
+
marginRight: "8px"
|
|
3212
|
+
},
|
|
3213
|
+
prefixIcon: "1-arrow-chevron-left-small-16-bold-blue",
|
|
3214
|
+
onClick: () => {
|
|
3215
|
+
onPageChange == null ? void 0 : onPageChange(current - 1);
|
|
3216
|
+
}
|
|
3217
|
+
}), /* @__PURE__ */React.createElement(InputInteger, {
|
|
3218
|
+
className: cs(Typo.Label.l3_regular, inputStyle),
|
|
3219
|
+
value: current,
|
|
3220
|
+
size: "small",
|
|
3221
|
+
onKeyDown: event => {
|
|
3222
|
+
if (event.key === "Enter") {
|
|
3223
|
+
changeValue(event.target.value);
|
|
3224
|
+
}
|
|
3225
|
+
},
|
|
3226
|
+
onBlur: event => {
|
|
3227
|
+
changeValue(event.target.value);
|
|
3228
|
+
}
|
|
3229
|
+
}), /* @__PURE__ */React.createElement("span", {
|
|
3230
|
+
className: cs("c1riexje", Typo.Label.l3_regular_upper)
|
|
3231
|
+
}, `/ ${pageLength}`), showNext && /* @__PURE__ */React.createElement(Button, {
|
|
3232
|
+
className: "next-btn",
|
|
3233
|
+
type: "quiet",
|
|
3234
|
+
size: "small",
|
|
3235
|
+
style: {
|
|
3236
|
+
marginLeft: "8px"
|
|
3237
|
+
},
|
|
3238
|
+
prefixIcon: "1-arrow-chevron-left-small-16-bold-blue",
|
|
3239
|
+
onClick: () => {
|
|
3240
|
+
onPageChange == null ? void 0 : onPageChange(current + 1);
|
|
3241
|
+
}
|
|
3242
|
+
})));
|
|
3243
|
+
};
|
|
3244
|
+
|
|
3177
3245
|
var __defProp$i = Object.defineProperty;
|
|
3178
3246
|
var __defProps$e = Object.defineProperties;
|
|
3179
3247
|
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
@@ -5573,7 +5641,8 @@
|
|
|
5573
5641
|
arch: Arch,
|
|
5574
5642
|
buttonGroup: ButtonGroup,
|
|
5575
5643
|
steps: Steps,
|
|
5576
|
-
form: antd.Form
|
|
5644
|
+
form: antd.Form,
|
|
5645
|
+
simplePagination: SimplePagination
|
|
5577
5646
|
};
|
|
5578
5647
|
kit.option.isSelectOption = true;
|
|
5579
5648
|
return kit;
|
|
@@ -9423,6 +9492,7 @@
|
|
|
9423
9492
|
exports.NormalAlert = NormalAlert;
|
|
9424
9493
|
exports.NoticeAlert = NoticeAlert;
|
|
9425
9494
|
exports.OperationWraper = OperationWraper;
|
|
9495
|
+
exports.PaginationStyle = PaginationStyle;
|
|
9426
9496
|
exports.PendingTable = PendingTable;
|
|
9427
9497
|
exports.Placeholder = img$3e;
|
|
9428
9498
|
exports.Pointer = Pointer;
|