@nokecy/qc-ui 0.1.4 → 0.1.6

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.
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: (props: any) => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _antd = require("@formily/antd");
13
+
14
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
+
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+
18
+ var _default = function _default(props) {
19
+ var onChange = props.onChange;
20
+
21
+ var index = _antd.ArrayBase.useIndex();
22
+
23
+ (0, _react.useEffect)(function () {
24
+ onChange(index + 1);
25
+ }, [index]);
26
+ return /*#__PURE__*/_react.default.createElement("span", props, "#", index + 1, ".");
27
+ };
28
+
29
+ exports.default = _default;
@@ -1,6 +1,7 @@
1
1
  import ArrayTable from "./array-table";
2
+ import ArrayTableIndex from "./array-table-index";
2
3
  import { AgGridColumn, AgGridPlus } from "./ag-grid-plus";
3
4
  import ExtensibleGrid from "./extensible-grid";
4
5
  import Dashboard from "./dashboard";
5
6
  import Elsa from "./elsa";
6
- export { ArrayTable, AgGridColumn, AgGridPlus, ExtensibleGrid, Dashboard, Elsa };
7
+ export { ArrayTable, ArrayTableIndex, AgGridColumn, AgGridPlus, ExtensibleGrid, Dashboard, Elsa };
package/dist/cjs/index.js CHANGED
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "ArrayTable", {
21
21
  return _arrayTable.default;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "ArrayTableIndex", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _arrayTableIndex.default;
28
+ }
29
+ });
24
30
  Object.defineProperty(exports, "Dashboard", {
25
31
  enumerable: true,
26
32
  get: function get() {
@@ -42,6 +48,8 @@ Object.defineProperty(exports, "ExtensibleGrid", {
42
48
 
43
49
  var _arrayTable = _interopRequireDefault(require("./array-table"));
44
50
 
51
+ var _arrayTableIndex = _interopRequireDefault(require("./array-table-index"));
52
+
45
53
  var _agGridPlus = require("./ag-grid-plus");
46
54
 
47
55
  var _extensibleGrid = _interopRequireDefault(require("./extensible-grid"));
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: (props: any) => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import React, { useEffect } from 'react';
2
+ import { ArrayBase } from '@formily/antd';
3
+ export default (function (props) {
4
+ var onChange = props.onChange;
5
+ var index = ArrayBase.useIndex();
6
+ useEffect(function () {
7
+ onChange(index + 1);
8
+ }, [index]);
9
+ return /*#__PURE__*/React.createElement("span", props, "#", index + 1, ".");
10
+ });
@@ -1,6 +1,7 @@
1
1
  import ArrayTable from "./array-table";
2
+ import ArrayTableIndex from "./array-table-index";
2
3
  import { AgGridColumn, AgGridPlus } from "./ag-grid-plus";
3
4
  import ExtensibleGrid from "./extensible-grid";
4
5
  import Dashboard from "./dashboard";
5
6
  import Elsa from "./elsa";
6
- export { ArrayTable, AgGridColumn, AgGridPlus, ExtensibleGrid, Dashboard, Elsa };
7
+ export { ArrayTable, ArrayTableIndex, AgGridColumn, AgGridPlus, ExtensibleGrid, Dashboard, Elsa };
package/dist/esm/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import ArrayTable from "./array-table";
2
+ import ArrayTableIndex from "./array-table-index";
2
3
  import { AgGridColumn, AgGridPlus } from "./ag-grid-plus";
3
4
  import ExtensibleGrid from "./extensible-grid";
4
5
  import Dashboard from "./dashboard";
5
6
  import Elsa from "./elsa";
6
- export { ArrayTable, AgGridColumn, AgGridPlus, ExtensibleGrid, Dashboard, Elsa };
7
+ export { ArrayTable, ArrayTableIndex, AgGridColumn, AgGridPlus, ExtensibleGrid, Dashboard, Elsa };