@kmkf-fe-packages/basic-components 0.16.0-alpha.4 → 0.17.0-alpha.0

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/index.esm.js CHANGED
@@ -7358,14 +7358,26 @@ var Province = function Province(props) {
7358
7358
  _useState2 = _slicedToArray(_useState, 2),
7359
7359
  option = _useState2[0],
7360
7360
  setOptions = _useState2[1];
7361
+ var num = 1;
7361
7362
  var isFirst = useRef(false);
7363
+ var time = useRef();
7362
7364
  var initPageSource = /*#__PURE__*/function () {
7363
7365
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7366
+ var options;
7364
7367
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7365
7368
  while (1) switch (_context.prev = _context.next) {
7366
7369
  case 0:
7367
- setOptions(type !== 'bs' ? AddressData.getInstance().addressOptions || [] : BsAddressData.getInstance().addressOptions || []);
7368
- case 1:
7370
+ num++;
7371
+ options = type !== 'bs' ? AddressData.getInstance().addressOptions || [] : BsAddressData.getInstance().addressOptions || [];
7372
+ if (!(options === null || options === void 0 ? void 0 : options.length) && num < 5) {
7373
+ time.current = setTimeout(function () {
7374
+ initPageSource();
7375
+ }, 1000);
7376
+ } else {
7377
+ clearTimeout(time.current);
7378
+ }
7379
+ setOptions(options);
7380
+ case 4:
7369
7381
  case "end":
7370
7382
  return _context.stop();
7371
7383
  }
package/dist/index.js CHANGED
@@ -7369,14 +7369,26 @@ var Province = function Province(props) {
7369
7369
  _useState2 = _slicedToArray(_useState, 2),
7370
7370
  option = _useState2[0],
7371
7371
  setOptions = _useState2[1];
7372
+ var num = 1;
7372
7373
  var isFirst = React.useRef(false);
7374
+ var time = React.useRef();
7373
7375
  var initPageSource = /*#__PURE__*/function () {
7374
7376
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7377
+ var options;
7375
7378
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7376
7379
  while (1) switch (_context.prev = _context.next) {
7377
7380
  case 0:
7378
- setOptions(type !== 'bs' ? kmkfUtils.AddressData.getInstance().addressOptions || [] : kmkfUtils.BsAddressData.getInstance().addressOptions || []);
7379
- case 1:
7381
+ num++;
7382
+ options = type !== 'bs' ? kmkfUtils.AddressData.getInstance().addressOptions || [] : kmkfUtils.BsAddressData.getInstance().addressOptions || [];
7383
+ if (!(options === null || options === void 0 ? void 0 : options.length) && num < 5) {
7384
+ time.current = setTimeout(function () {
7385
+ initPageSource();
7386
+ }, 1000);
7387
+ } else {
7388
+ clearTimeout(time.current);
7389
+ }
7390
+ setOptions(options);
7391
+ case 4:
7380
7392
  case "end":
7381
7393
  return _context.stop();
7382
7394
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.16.0-alpha.4",
3
+ "version": "0.17.0-alpha.0",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@
20
20
  "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/kmkf-utils": "^0.15.1-alpha.5",
23
+ "@kmkf-fe-packages/kmkf-utils": "^0.17.0-alpha.0",
24
24
  "lodash": "^4.17.21",
25
25
  "pubsub-js": "^1.9.4",
26
26
  "react-copy-to-clipboard": "^5.1.0",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "0f5cc225b6d88af969f43778084d5b42a474fc27"
64
+ "gitHead": "a83dbac34b4f78b7725a46396757a0c95bcc6698"
65
65
  }