iglooform 2.3.8 → 2.3.12

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.
@@ -9,20 +9,18 @@
9
9
  overflow: auto;
10
10
 
11
11
  .igloo-layout-header {
12
- min-height: 56px;
13
- height: 56px;
14
12
  width: 100%;
15
- display: flex;
16
- align-items: center;
17
- justify-content: center;
18
13
  background: #f6f6ff;
19
14
  border-bottom: 1px solid #eeeeee;
20
15
 
21
16
  .header-content {
22
17
  width: 100%;
18
+ min-height: 56px;
19
+ height: 56px;
23
20
  display: flex;
24
21
  align-items: center;
25
22
  justify-content: space-between;
23
+ margin: 0 auto;
26
24
 
27
25
  .header-left {
28
26
  display: flex;
@@ -101,27 +99,25 @@
101
99
 
102
100
  .igloo-layout-center {
103
101
  flex: 1;
104
- display: flex;
105
102
  padding: 0px 16px;
106
- justify-content: center;
107
103
  width: 100%;
108
104
  background-color: #f9f9f9;
109
105
 
110
106
  .igloo-layout-content {
111
107
  width: 100%;
108
+ margin: 0 auto;
112
109
  }
113
110
  }
114
111
 
115
112
  .igloo-layout-footer {
116
113
  width: 100%;
117
- display: flex;
118
- justify-content: center;
119
114
  background-color: #f6f6ff;
120
115
 
121
116
  .footer-content {
122
117
  width: 100%;
123
118
  padding: 32px 0px;
124
119
  color: #424242;
120
+ margin: 0 auto;
125
121
 
126
122
  .footer-top {
127
123
  display: flex;
@@ -221,14 +217,14 @@
221
217
  }
222
218
 
223
219
  .igloo-layout-header {
224
- height: 48px;
225
220
  flex: 0 0 auto;
226
221
  background-color: #f6f6ff;
227
222
  padding: 0px 16px;
223
+ border-bottom: 1px solid #eeeeee;
228
224
  display: flex;
229
225
  align-items: center;
230
226
  justify-content: space-between;
231
- border-bottom: 1px solid #eeeeee;
227
+ height: 48px;
232
228
 
233
229
  .igloo-logo {
234
230
  width: 44px;
@@ -305,24 +301,22 @@
305
301
 
306
302
  .igloo-layout-center {
307
303
  background-color: #f9f9f9;
308
- display: flex;
309
304
  padding: 0px 16px;
310
- justify-content: center;
311
305
  flex: 1;
312
306
 
313
307
  .igloo-layout-content {
314
308
  width: 100%;
309
+ margin: 0 auto;
315
310
  }
316
311
  }
317
312
 
318
313
  .igloo-layout-footer {
319
314
  background-color: #f6f6ff;
320
315
  padding: 24px 16px;
321
- display: flex;
322
- justify-content: center;
323
316
 
324
317
  .footer-content {
325
318
  width: 100%;
319
+ margin: 0 auto;
326
320
 
327
321
  .igloo-logo {
328
322
  width: 44px;
@@ -316,18 +316,30 @@ var IglooSelect = function IglooSelect(_ref) {
316
316
  children: displayOptions.map(function (_ref10) {
317
317
  var label = _ref10.label,
318
318
  value = _ref10.value;
319
- return _jsx(Option, Object.assign({
319
+ return _jsxs(Option, Object.assign({
320
320
  value: value,
321
- label: label
321
+ label: label,
322
+ style: {
323
+ position: 'relative'
324
+ }
322
325
  }, {
323
- children: multiple ? _jsxs("div", {
326
+ children: [multiple ? _jsxs("div", {
324
327
  children: [_jsx(Checkbox, {
325
328
  checked: Array.isArray(selected) && selected.includes(value),
326
329
  style: {
327
330
  marginRight: 8
328
331
  }
329
332
  }, void 0), label]
330
- }, void 0) : label
333
+ }, void 0) : label, _jsx("div", {
334
+ style: {
335
+ position: 'absolute',
336
+ width: '100%',
337
+ height: '100%',
338
+ zIndex: 2,
339
+ top: 0,
340
+ left: 0
341
+ }
342
+ }, void 0)]
331
343
  }), value);
332
344
  })
333
345
  }), void 0)
@@ -20,6 +20,10 @@
20
20
 
21
21
  .ant-table-wrapper {
22
22
  box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.16);
23
+
24
+ .ant-table-container {
25
+ overflow-x: scroll;
26
+ }
23
27
  }
24
28
 
25
29
  & table > thead > tr:first-child {
@@ -284,6 +288,7 @@
284
288
  color: @primary-color;
285
289
  }
286
290
  }
291
+
287
292
  .ant-dropdown-arrow {
288
293
  right: 11px;
289
294
  }
@@ -99,7 +99,8 @@ var Element = function Element(_ref) {
99
99
  asserts = config.asserts,
100
100
  copyValue = config.copyValue,
101
101
  selectValue = config.selectValue,
102
- shouldRender = config.shouldRender;
102
+ shouldRender = config.shouldRender,
103
+ dependField = config.dependField;
103
104
  var dependentField = dependencies || [];
104
105
 
105
106
  if (asserts && asserts.length) {
@@ -124,6 +125,10 @@ var Element = function Element(_ref) {
124
125
  dependentField.push('SUBSCRIBE_ALL');
125
126
  }
126
127
 
128
+ if (dependField) {
129
+ dependentField.push(dependField);
130
+ }
131
+
127
132
  registerDependencies(dependentField, dispatch);
128
133
  }, []);
129
134
  (0, _invariant.default)(type !== 'Pages' && type !== 'Page', "".concat(type, " should not be inner form item"));
@@ -47,7 +47,8 @@ var Login = function Login(_ref) {
47
47
 
48
48
  var _useContext = (0, _react.useContext)(_context.default),
49
49
  submitText = _useContext.submitText,
50
- submitting = _useContext.submitting;
50
+ submitting = _useContext.submitting,
51
+ showSubmitButton = _useContext.showSubmitButton;
51
52
 
52
53
  var _useContext2 = (0, _react.useContext)(_locale.LocaleContext),
53
54
  formatMessage = _useContext2.formatMessage;
@@ -73,7 +74,7 @@ var Login = function Login(_ref) {
73
74
  }, index);
74
75
  })
75
76
  }), void 0)
76
- }), void 0), (0, _jsxRuntime.jsx)(_form.default.Item, {
77
+ }), void 0), showSubmitButton && (0, _jsxRuntime.jsx)(_form.default.Item, {
77
78
  children: (0, _jsxRuntime.jsx)(_button.default, Object.assign({
78
79
  type: "primary",
79
80
  htmlType: "submit",
@@ -89,7 +89,8 @@ var Element = function Element(props) {
89
89
  asserts = props.asserts,
90
90
  copyValue = props.copyValue,
91
91
  selectValue = props.selectValue,
92
- shouldRender = props.shouldRender;
92
+ shouldRender = props.shouldRender,
93
+ dependField = props.dependField;
93
94
  var dependentField = dependencies || [];
94
95
 
95
96
  if (asserts && asserts.length) {
@@ -114,6 +115,10 @@ var Element = function Element(props) {
114
115
  dependentField.push('SUBSCRIBE_ALL');
115
116
  }
116
117
 
118
+ if (dependField) {
119
+ dependentField.push(dependField);
120
+ }
121
+
117
122
  registerDependencies(dependentField, dispatch);
118
123
  }, []);
119
124
  var extraConfig = (0, _react.useMemo)(function () {
@@ -125,7 +130,7 @@ var Element = function Element(props) {
125
130
  children === null || children === void 0 ? void 0 : (_children$type2 = children.type) === null || _children$type2 === void 0 ? void 0 : _children$type2.formItemPropsHandler(props) : {};
126
131
  }, [children]);
127
132
 
128
- var _calcFormItemProps = (0, _utils.calcFormItemProps)(props, _objectSpread(_objectSpread({}, extraConfig), {}, {
133
+ var _calcFormItemProps = (0, _utils.calcFormItemProps)((0, _omit.default)(props, ['children', 'parentName']), _objectSpread(_objectSpread({}, extraConfig), {}, {
129
134
  requiredMark: requiredMark
130
135
  }), form, parentName),
131
136
  colProps = _calcFormItemProps.colProps,
@@ -194,7 +199,7 @@ var Element = function Element(props) {
194
199
 
195
200
  var transformChildren = function transformChildren() {
196
201
  if (! /*#__PURE__*/(0, _react.isValidElement)(children)) return children;
197
- return /*#__PURE__*/(0, _react.cloneElement)(children, _objectSpread(_objectSpread({}, children.props), {}, {
202
+ return /*#__PURE__*/(0, _react.cloneElement)(children, _objectSpread(_objectSpread(_objectSpread({}, children.props), elementProps), {}, {
198
203
  disabled: elementProps.disabled || disabled,
199
204
  containerRef: ref,
200
205
  setFieldError: setFieldError,
@@ -103,6 +103,8 @@ var Page = function Page(_ref) {
103
103
  key: c.props.key || index
104
104
  }));
105
105
  }
106
+
107
+ return c;
106
108
  });
107
109
  }
108
110
 
@@ -0,0 +1,12 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import './style';
3
+ interface ILayoutFooter {
4
+ companyInfoRender?: () => any;
5
+ copyRightRender?: (origin: ReactNode) => any;
6
+ tel?: string;
7
+ email?: string;
8
+ workTime?: any;
9
+ address?: string;
10
+ }
11
+ declare const LayoutFooter: FC<ILayoutFooter>;
12
+ export default LayoutFooter;
@@ -0,0 +1,288 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ require("antd/es/space/style");
9
+
10
+ var _space = _interopRequireDefault(require("antd/es/space"));
11
+
12
+ require("antd/es/grid/style");
13
+
14
+ var _grid = _interopRequireDefault(require("antd/es/grid"));
15
+
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+
18
+ var _iglooicon = require("iglooicon");
19
+
20
+ var _typography = _interopRequireDefault(require("../typography"));
21
+
22
+ var _button = _interopRequireDefault(require("../button"));
23
+
24
+ require("./style");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
+
28
+ var LayoutFooter = function LayoutFooter(_ref) {
29
+ var companyInfoRender = _ref.companyInfoRender,
30
+ copyRightRender = _ref.copyRightRender,
31
+ tel = _ref.tel,
32
+ email = _ref.email,
33
+ workTime = _ref.workTime,
34
+ address = _ref.address;
35
+ var useBreakpoint = _grid.default.useBreakpoint;
36
+
37
+ var _useBreakpoint = useBreakpoint(),
38
+ md = _useBreakpoint.md;
39
+
40
+ var topRightContent = companyInfoRender ? companyInfoRender() : (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
41
+ children: [(0, _jsxRuntime.jsxs)("div", Object.assign({
42
+ className: "no-address-info"
43
+ }, {
44
+ children: [tel && (0, _jsxRuntime.jsxs)("div", Object.assign({
45
+ className: "info-container",
46
+ style: {
47
+ alignItems: 'center'
48
+ }
49
+ }, {
50
+ children: [(0, _jsxRuntime.jsx)(_iglooicon.PhoneOutlined, {}, void 0), (0, _jsxRuntime.jsx)("div", {
51
+ children: typeof tel === 'string' ? (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
52
+ level: "body2",
53
+ className: "info-span"
54
+ }, {
55
+ children: tel
56
+ }), void 0) : tel
57
+ }, void 0)]
58
+ }), void 0), email && (0, _jsxRuntime.jsxs)("div", Object.assign({
59
+ className: "info-container",
60
+ style: {
61
+ alignItems: 'center'
62
+ }
63
+ }, {
64
+ children: [(0, _jsxRuntime.jsx)(_iglooicon.EmailOutlined, {}, void 0), (0, _jsxRuntime.jsx)("div", {
65
+ children: typeof email === 'string' ? (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
66
+ level: "body2",
67
+ className: "info-span"
68
+ }, {
69
+ children: email
70
+ }), void 0) : email
71
+ }, void 0)]
72
+ }), void 0), workTime && (0, _jsxRuntime.jsxs)("div", Object.assign({
73
+ className: "info-container"
74
+ }, {
75
+ children: [(0, _jsxRuntime.jsx)(_iglooicon.TimeOutlined, {}, void 0), (0, _jsxRuntime.jsx)("div", {
76
+ children: typeof workTime === 'string' ? (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
77
+ level: "body2",
78
+ className: "info-span"
79
+ }, {
80
+ children: workTime
81
+ }), void 0) : workTime
82
+ }, void 0)]
83
+ }), void 0)]
84
+ }), void 0), address && (0, _jsxRuntime.jsxs)(_space.default, Object.assign({
85
+ size: 16,
86
+ align: "start"
87
+ }, {
88
+ children: [(0, _jsxRuntime.jsx)(_iglooicon.LocationOutlined, {
89
+ style: {
90
+ fontSize: 24
91
+ }
92
+ }, void 0), (0, _jsxRuntime.jsx)("div", {
93
+ children: typeof address === 'string' ? (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
94
+ level: "body2",
95
+ className: "info-span"
96
+ }, {
97
+ children: address
98
+ }), void 0) : address
99
+ }, void 0)]
100
+ }), void 0)]
101
+ }, void 0);
102
+
103
+ if (md) {
104
+ return (0, _jsxRuntime.jsx)("div", Object.assign({
105
+ className: "igloo-layout-footer"
106
+ }, {
107
+ children: (0, _jsxRuntime.jsxs)("div", Object.assign({
108
+ className: "footer-content"
109
+ }, {
110
+ children: [(0, _jsxRuntime.jsxs)(_space.default, Object.assign({
111
+ size: 32,
112
+ align: "start",
113
+ className: "footer-top"
114
+ }, {
115
+ children: [(0, _jsxRuntime.jsx)("div", Object.assign({
116
+ className: "top-left"
117
+ }, {
118
+ children: (0, _jsxRuntime.jsx)("div", {
119
+ className: "igloo-logo"
120
+ }, void 0)
121
+ }), void 0), topRightContent]
122
+ }), void 0), (0, _jsxRuntime.jsx)("div", {
123
+ className: "footer-divider"
124
+ }, void 0), (0, _jsxRuntime.jsxs)("div", Object.assign({
125
+ className: "footer-bottom"
126
+ }, {
127
+ children: [copyRightRender ? copyRightRender("\xA9 ".concat(new Date().getFullYear(), " Powered by Axinan Pte Ltd. All Rights Reserved.")) : (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
128
+ level: "body3"
129
+ }, {
130
+ children: "\xA9 ".concat(new Date().getFullYear(), " Powered by Axinan Pte Ltd. All Rights Reserved.")
131
+ }), void 0), (0, _jsxRuntime.jsxs)(_typography.default, Object.assign({
132
+ level: "body3"
133
+ }, {
134
+ children: [(0, _jsxRuntime.jsx)(_button.default, Object.assign({
135
+ type: "text",
136
+ onClick: function onClick() {
137
+ return window.open('https://contents.iglooinsure.com/privacypolicy');
138
+ }
139
+ }, {
140
+ children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
141
+ level: "body3"
142
+ }, {
143
+ children: "Privacy Policy"
144
+ }), void 0)
145
+ }), void 0), ' ', (0, _jsxRuntime.jsx)("span", Object.assign({
146
+ style: {
147
+ margin: '0px 16px'
148
+ }
149
+ }, {
150
+ children: "|"
151
+ }), void 0), (0, _jsxRuntime.jsx)(_button.default, Object.assign({
152
+ type: "text",
153
+ onClick: function onClick() {
154
+ return window.open('https://contents.iglooinsure.com/termsofservice');
155
+ }
156
+ }, {
157
+ children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
158
+ level: "body3"
159
+ }, {
160
+ children: "Terms of Service"
161
+ }), void 0)
162
+ }), void 0)]
163
+ }), void 0)]
164
+ }), void 0)]
165
+ }), void 0)
166
+ }), void 0);
167
+ } else {
168
+ return (0, _jsxRuntime.jsx)("div", Object.assign({
169
+ className: "igloo-layout-footer"
170
+ }, {
171
+ children: (0, _jsxRuntime.jsxs)("div", Object.assign({
172
+ className: "footer-content"
173
+ }, {
174
+ children: [(0, _jsxRuntime.jsx)("div", {
175
+ className: "igloo-logo"
176
+ }, void 0), (0, _jsxRuntime.jsxs)("div", Object.assign({
177
+ className: "compony-info"
178
+ }, {
179
+ children: [tel && (0, _jsxRuntime.jsxs)("div", Object.assign({
180
+ className: "info-item"
181
+ }, {
182
+ children: [(0, _jsxRuntime.jsx)(_iglooicon.PhoneOutlined, {}, void 0), (0, _jsxRuntime.jsx)("div", {
183
+ children: typeof tel === 'string' ? (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
184
+ level: "body3",
185
+ className: "info-span"
186
+ }, {
187
+ children: tel
188
+ }), void 0) : tel
189
+ }, void 0)]
190
+ }), void 0), email && (0, _jsxRuntime.jsxs)("div", Object.assign({
191
+ className: "info-item"
192
+ }, {
193
+ children: [(0, _jsxRuntime.jsx)(_iglooicon.EmailOutlined, {}, void 0), (0, _jsxRuntime.jsx)("div", {
194
+ children: typeof email === 'string' ? (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
195
+ level: "body3",
196
+ className: "info-span"
197
+ }, {
198
+ children: email
199
+ }), void 0) : email
200
+ }, void 0)]
201
+ }), void 0), workTime && (0, _jsxRuntime.jsxs)("div", Object.assign({
202
+ className: "info-item"
203
+ }, {
204
+ children: [(0, _jsxRuntime.jsx)(_iglooicon.TimeOutlined, {}, void 0), (0, _jsxRuntime.jsx)("div", {
205
+ children: typeof workTime === 'string' ? (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
206
+ level: "body3",
207
+ className: "info-span"
208
+ }, {
209
+ children: workTime
210
+ }), void 0) : workTime
211
+ }, void 0)]
212
+ }), void 0), address && (0, _jsxRuntime.jsxs)("div", Object.assign({
213
+ className: "info-item"
214
+ }, {
215
+ children: [(0, _jsxRuntime.jsx)(_iglooicon.LocationOutlined, {
216
+ style: {
217
+ fontSize: 24
218
+ }
219
+ }, void 0), (0, _jsxRuntime.jsx)("div", {
220
+ children: typeof address === 'string' ? (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
221
+ level: "body3",
222
+ className: "info-span"
223
+ }, {
224
+ children: address
225
+ }), void 0) : address
226
+ }, void 0)]
227
+ }), void 0)]
228
+ }), void 0), (0, _jsxRuntime.jsxs)("div", Object.assign({
229
+ className: "footer-bottom"
230
+ }, {
231
+ children: [(0, _jsxRuntime.jsx)("div", {
232
+ children: copyRightRender ? copyRightRender((0, _jsxRuntime.jsxs)("div", {
233
+ children: [(0, _jsxRuntime.jsxs)("div", {
234
+ children: ["\xA9 ", new Date().getFullYear(), " Powered by Axinan Pte Ltd."]
235
+ }, void 0), (0, _jsxRuntime.jsx)("div", {
236
+ children: "All Rights Reserved."
237
+ }, void 0)]
238
+ }, void 0)) : (0, _jsxRuntime.jsxs)(_typography.default, Object.assign({
239
+ level: "body3"
240
+ }, {
241
+ children: ["\xA9 ".concat(new Date().getFullYear(), " Powered by Axinan Pte Ltd."), (0, _jsxRuntime.jsx)("div", {
242
+ children: "All Rights Reserved."
243
+ }, void 0)]
244
+ }), void 0)
245
+ }, void 0), (0, _jsxRuntime.jsx)("div", {
246
+ children: (0, _jsxRuntime.jsxs)(_typography.default, Object.assign({
247
+ level: "body3"
248
+ }, {
249
+ children: [(0, _jsxRuntime.jsx)(_button.default, Object.assign({
250
+ type: "text",
251
+ onClick: function onClick() {
252
+ return window.open('https://contents.iglooinsure.com/privacypolicy');
253
+ }
254
+ }, {
255
+ children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
256
+ level: "body3"
257
+ }, {
258
+ children: "Privacy Policy"
259
+ }), void 0)
260
+ }), void 0), ' ', (0, _jsxRuntime.jsx)("span", Object.assign({
261
+ style: {
262
+ margin: '0px 16px'
263
+ }
264
+ }, {
265
+ children: "|"
266
+ }), void 0), ' ', (0, _jsxRuntime.jsx)(_button.default, Object.assign({
267
+ type: "text",
268
+ onClick: function onClick() {
269
+ return window.open('https://contents.iglooinsure.com/termsofservice');
270
+ }
271
+ }, {
272
+ children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
273
+ level: "body3"
274
+ }, {
275
+ children: "Terms of Service"
276
+ }), void 0)
277
+ }), void 0)]
278
+ }), void 0)
279
+ }, void 0)]
280
+ }), void 0)]
281
+ }), void 0)
282
+ }), void 0);
283
+ }
284
+ };
285
+
286
+ LayoutFooter.displayName = 'LayoutFooter';
287
+ var _default = LayoutFooter;
288
+ exports.default = _default;
@@ -0,0 +1,30 @@
1
+ import { FC } from 'react';
2
+ import { BadgeProps } from 'antd';
3
+ import './style/index';
4
+ interface Menu {
5
+ title: string;
6
+ key: string;
7
+ badge?: 'dot' | number | string | BadgeProps | (() => any);
8
+ }
9
+ interface Info {
10
+ title: string;
11
+ value: string;
12
+ }
13
+ interface Action {
14
+ title: string;
15
+ onClick?: () => void;
16
+ }
17
+ interface ILayoutHeader {
18
+ menus?: Menu[];
19
+ defaultSelected?: string;
20
+ selectedKey?: string;
21
+ onMenuChange?: (menuItem: any) => any;
22
+ dropMenuConfig?: {
23
+ customInfos: Info[];
24
+ actions: Action[];
25
+ };
26
+ userName?: string;
27
+ userAvatar?: string;
28
+ }
29
+ declare const LayoutHeader: FC<ILayoutHeader>;
30
+ export default LayoutHeader;