@antscorp/antsomi-ui 1.3.5-beta.443 → 1.3.5-beta.445

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.
@@ -25,7 +25,7 @@ import { DEFAULT_PAGE, DEFAULT_PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../../consta
25
25
  const { Text } = Typography;
26
26
  export const Pagination = props => {
27
27
  // Props
28
- const { pageSize = DEFAULT_PAGE_SIZE, page = DEFAULT_PAGE, total = 70, onChange } = props, restProps = __rest(props, ["pageSize", "page", "total", "onChange"]);
28
+ const { pageSize = DEFAULT_PAGE_SIZE, page = DEFAULT_PAGE, total = 0, onChange } = props, restProps = __rest(props, ["pageSize", "page", "total", "onChange"]);
29
29
  // Instance
30
30
  const { t } = i18nInstance;
31
31
  // Memo
@@ -46,7 +46,7 @@ export const Pagination = props => {
46
46
  t(translations.pagination.showRow).toString(),
47
47
  ":"),
48
48
  React.createElement(Select, { defaultValue: DEFAULT_PAGE_SIZE, value: pageSize, className: "show-row-select", options: paginationSizeOptions, popupMatchSelectWidth: 70, onChange: value => onChangePagination({ pageSize: value, page: 1 }) })),
49
- React.createElement(Text, null, `${page * pageSize - pageSize + 1} - ${Math.min(page * pageSize, total)} of ${total}`),
49
+ React.createElement(Text, null, `${total ? page * pageSize - pageSize + 1 : 0} - ${Math.min(page * pageSize, total)} of ${total}`),
50
50
  React.createElement(Flex, { align: "center", gap: 10 },
51
51
  React.createElement(ActionButton, { onClick: () => onChangePagination({ page: 1 }), disabled: disabledPrevious },
52
52
  React.createElement(Icon, { type: "icon-ants-first-page", size: 12 })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.443",
3
+ "version": "1.3.5-beta.445",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",
@@ -19,7 +19,8 @@
19
19
  "unpkg": "dist/index.js",
20
20
  "types": "es/index.d.ts",
21
21
  "scripts": {
22
- "build:es": "npm run copy-files && npm run ts-compile",
22
+ "prepublishOnly": "yarn && yarn build:es",
23
+ "build:es": "npm run clean && npm run copy-files && npm run ts-compile",
23
24
  "clean": "rimraf dist lib es",
24
25
  "dev": "vite",
25
26
  "build:dist": "webpack --config webpack.build.js",