@antscorp/antsomi-ui 1.3.5-beta.372 → 1.3.5-beta.375

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.
@@ -20,7 +20,7 @@ const ButtonAdd = () => {
20
20
  }
21
21
  };
22
22
  return (React.createElement(Popover, { open: state.openAccountList, content: React.createElement(AccountList, null), trigger: "click", arrow: false, overlayInnerStyle: { padding: 0 }, onOpenChange: handleClose, afterOpenChange: handleAfterClose },
23
- React.createElement(ButtonAddStyled, { className: "select-account-btn-add", style: Object.assign({}, (((_a = state === null || state === void 0 ? void 0 : state.styles) === null || _a === void 0 ? void 0 : _a.btnAdd) || {})), loading: !state.isInitDone, onClick: () => state.openAccountList
23
+ React.createElement(ButtonAddStyled, { className: "select-account-btn-add", style: Object.assign({}, (((_a = state === null || state === void 0 ? void 0 : state.styles) === null || _a === void 0 ? void 0 : _a.btnAdd) || {})), loading: !state.isInitDone, disabled: state.disabled, onClick: () => state.openAccountList
24
24
  ? dispatch({ type: 'CLOSE_ACCOUNT_LIST' })
25
25
  : dispatch({ type: 'OPEN_ACCOUNT_LIST' }) },
26
26
  React.createElement("div", { className: "icon" },
@@ -35,6 +35,9 @@ export const SelectAccountProvider = props => {
35
35
  useEffect(() => {
36
36
  dispatch({ type: 'INIT' });
37
37
  }, []);
38
+ useEffect(() => {
39
+ dispatch({ type: 'UPDATE', payload: Object.assign({}, rest) });
40
+ }, [rest]);
38
41
  useEffect(() => {
39
42
  if (!isLoading) {
40
43
  const newData = get(data, state === null || state === void 0 ? void 0 : state.dataAccountsKey, Array.isArray(data) ? data : []);
@@ -24,6 +24,12 @@ export const reducer = (state, action) => produce(state, draft => {
24
24
  draft.isInitDone = true;
25
25
  break;
26
26
  }
27
+ case 'UPDATE': {
28
+ Object.keys((action === null || action === void 0 ? void 0 : action.payload) || {}).forEach(key => {
29
+ draft[key] = action === null || action === void 0 ? void 0 : action.payload[key];
30
+ });
31
+ break;
32
+ }
27
33
  case 'OPEN_ACCOUNT_LIST':
28
34
  draft.openAccountList = true;
29
35
  draft.draftUsersSelected = draft.usersSelected;
@@ -48,6 +48,9 @@ export type TAction = {
48
48
  type: 'INIT';
49
49
  } | {
50
50
  type: 'APPLY';
51
+ } | {
52
+ type: 'UPDATE';
53
+ payload: SelectAccountProps;
51
54
  } | {
52
55
  type: 'OPEN_ACCOUNT_LIST';
53
56
  } | {
@@ -65,7 +65,6 @@ export const TemplateListing = memo(props => {
65
65
  return (React.createElement(TemplateListingWrapper, null,
66
66
  React.createElement(CategoryListing, Object.assign({}, categoryListingProps, { emptyProps: emptyProps })),
67
67
  React.createElement(TemplateWrapper, { className: wrapperClassName, style: wrapperStyle },
68
- React.createElement("div", { className: "placeholder-test-template-listing" }),
69
68
  header,
70
69
  React.createElement(Spin, { spinning: loading || !itemPerRow, wrapperClassName: "template-listing__loading template-listing__loading--full" },
71
70
  React.createElement(Scrollbars, { className: "template-listing" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.372",
3
+ "version": "1.3.5-beta.375",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",