@steedos-widgets/amis-object 1.0.2 → 1.0.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.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022, Steedos Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,98 @@
1
+ export declare const AmisAppLauncher: (props: any) => Promise<{
2
+ type: string;
3
+ body: ({
4
+ type: string;
5
+ actionType: string;
6
+ className: string;
7
+ body: {
8
+ type: string;
9
+ className: string;
10
+ tpl: string;
11
+ id: string;
12
+ }[];
13
+ dialog: {
14
+ size: string;
15
+ title: {
16
+ type: string;
17
+ tpl: string;
18
+ className: string;
19
+ };
20
+ actions: any[];
21
+ body: {
22
+ type: string;
23
+ id: string;
24
+ affixFooter: boolean;
25
+ body: {
26
+ type: string;
27
+ activeKey: string[];
28
+ body: ({
29
+ type: string;
30
+ key: string;
31
+ header: string;
32
+ body: {
33
+ type: string;
34
+ name: string;
35
+ items: {
36
+ type: string;
37
+ tpl: string;
38
+ inline: boolean;
39
+ style: {};
40
+ className: string;
41
+ };
42
+ id: string;
43
+ className: string;
44
+ }[];
45
+ id?: undefined;
46
+ className?: undefined;
47
+ } | {
48
+ type: string;
49
+ key: string;
50
+ header: string;
51
+ body: {
52
+ type: string;
53
+ html: string;
54
+ className: string;
55
+ }[];
56
+ id: string;
57
+ className: string;
58
+ })[];
59
+ id: string;
60
+ }[];
61
+ className: string;
62
+ visibleOn: string;
63
+ clearValueOnHidden: boolean;
64
+ visible: boolean;
65
+ messages: {};
66
+ api: {
67
+ method: string;
68
+ url: string;
69
+ data: any;
70
+ headers: {
71
+ Authorization: string;
72
+ };
73
+ adaptor: string;
74
+ };
75
+ }[];
76
+ };
77
+ id: string;
78
+ tpl?: undefined;
79
+ hiddenOn?: undefined;
80
+ } | {
81
+ type: string;
82
+ className: string;
83
+ tpl: string;
84
+ hiddenOn: string;
85
+ actionType?: undefined;
86
+ body?: undefined;
87
+ dialog?: undefined;
88
+ id?: undefined;
89
+ })[];
90
+ api: {
91
+ method: string;
92
+ url: string;
93
+ headers: {
94
+ Authorization: string;
95
+ };
96
+ sendOn: string;
97
+ };
98
+ }>;
@@ -0,0 +1,15 @@
1
+ export declare const AmisAppMenu: (props: any) => Promise<{
2
+ type: string;
3
+ stacked: any;
4
+ overflow: any;
5
+ links: any[];
6
+ id: string;
7
+ source: {
8
+ method: string;
9
+ url: string;
10
+ adaptor: string;
11
+ headers: {
12
+ Authorization: string;
13
+ };
14
+ };
15
+ }>;
@@ -0,0 +1,162 @@
1
+ export declare const AmisGlobalHeader: (props: any) => Promise<{
2
+ type: string;
3
+ id: string;
4
+ className: string;
5
+ size: string;
6
+ body: ({
7
+ type: string;
8
+ id: string;
9
+ onEvent: {
10
+ click: {
11
+ actions: {
12
+ componentId: string;
13
+ args: {
14
+ url: string;
15
+ };
16
+ actionType: string;
17
+ }[];
18
+ };
19
+ };
20
+ body: {
21
+ type: string;
22
+ category: string;
23
+ name: string;
24
+ colorVariant: string;
25
+ id: string;
26
+ className: string;
27
+ }[];
28
+ label: string;
29
+ placement?: undefined;
30
+ trigger?: undefined;
31
+ overlay?: undefined;
32
+ className?: undefined;
33
+ open?: undefined;
34
+ } | {
35
+ type: string;
36
+ placement: string;
37
+ trigger: string[];
38
+ body: {
39
+ type: string;
40
+ category: string;
41
+ name: string;
42
+ colorVariant: string;
43
+ id: string;
44
+ className: string;
45
+ }[];
46
+ overlay: {
47
+ type: string;
48
+ label: string;
49
+ objectApiName: string;
50
+ className: string;
51
+ columns: {
52
+ field: string;
53
+ }[];
54
+ id: string;
55
+ }[];
56
+ id: string;
57
+ className: string;
58
+ open: boolean;
59
+ onEvent?: undefined;
60
+ label?: undefined;
61
+ } | {
62
+ type: string;
63
+ placement: string;
64
+ trigger: string[];
65
+ body: {
66
+ type: string;
67
+ src: any;
68
+ icon: string;
69
+ id: string;
70
+ style: {
71
+ background: string;
72
+ color: string;
73
+ };
74
+ size: number;
75
+ }[];
76
+ overlay: {
77
+ type: string;
78
+ className: string;
79
+ body: ({
80
+ type: string;
81
+ src: any;
82
+ icon: string;
83
+ id: string;
84
+ style: {
85
+ background: string;
86
+ color: string;
87
+ };
88
+ className?: undefined;
89
+ tpl?: undefined;
90
+ inline?: undefined;
91
+ label?: undefined;
92
+ onEvent?: undefined;
93
+ block?: undefined;
94
+ level?: undefined;
95
+ } | {
96
+ type: string;
97
+ className: string;
98
+ tpl: string;
99
+ inline: boolean;
100
+ src?: undefined;
101
+ icon?: undefined;
102
+ id?: undefined;
103
+ style?: undefined;
104
+ label?: undefined;
105
+ onEvent?: undefined;
106
+ block?: undefined;
107
+ level?: undefined;
108
+ } | {
109
+ type: string;
110
+ label: string;
111
+ onEvent: {
112
+ click: {
113
+ actions: {
114
+ args: {
115
+ url: string;
116
+ blank: boolean;
117
+ };
118
+ actionType: string;
119
+ }[];
120
+ };
121
+ };
122
+ id: string;
123
+ block: boolean;
124
+ level: string;
125
+ src?: undefined;
126
+ icon?: undefined;
127
+ style?: undefined;
128
+ className?: undefined;
129
+ tpl?: undefined;
130
+ inline?: undefined;
131
+ } | {
132
+ type: string;
133
+ label: string;
134
+ onEvent: {
135
+ click: {
136
+ actions: {
137
+ componentId: string;
138
+ args: {};
139
+ actionType: string;
140
+ script: any;
141
+ }[];
142
+ };
143
+ };
144
+ id: string;
145
+ block: boolean;
146
+ level: string;
147
+ src?: undefined;
148
+ icon?: undefined;
149
+ style?: undefined;
150
+ className?: undefined;
151
+ tpl?: undefined;
152
+ inline?: undefined;
153
+ })[];
154
+ id: string;
155
+ }[];
156
+ id: string;
157
+ className: string;
158
+ onEvent?: undefined;
159
+ label?: undefined;
160
+ open?: undefined;
161
+ })[];
162
+ }>;
@@ -0,0 +1,5 @@
1
+ export declare const AmisLogo: (props: any) => Promise<{
2
+ type: string;
3
+ tpl: string;
4
+ id: string;
5
+ }>;
@@ -13,7 +13,7 @@ export declare const AmisRecordDetailRelatedLists: (props: any) => Promise<{
13
13
  relatedObjectApiName: any;
14
14
  foreign_key: any;
15
15
  relatedKey: any;
16
- top: any;
16
+ perPage: any;
17
17
  hiddenEmptyTable: boolean;
18
18
  appId: any;
19
19
  }[];
@@ -8,3 +8,7 @@ export * from './AmisRecordDetailRelatedList';
8
8
  export * from './AmisRecordDetailRelatedLists';
9
9
  export * from './AmisSelectUser';
10
10
  export * from './AmisProvider';
11
+ export * from './AmisAppLauncher';
12
+ export * from './AmisLogo';
13
+ export * from './AmisAppMenu';
14
+ export * from './AmisGlobalHeader';
@@ -6,6 +6,7 @@
6
6
  --Form-fontSize: 14px;
7
7
  --Form-selectValue-fontSize: 14px;
8
8
  --Table-toolbar-marginY: 0;
9
+ --Table-borderWidth: 1px;
9
10
  --Table-borderColor: #d9dcde;
10
11
  --Table-thead-fontSize: 13px;
11
12
  --Table-fontSize: 13px;
@@ -56,41 +57,11 @@ fieldset.antd-Collapse > legend.antd-Collapse-header > .antd-Collapse-arrow:befo
56
57
  border-color: initial
57
58
  }
58
59
 
59
-
60
- main {
61
- background: var(--body-bg);
62
- }
63
-
64
-
65
- .ant-modal-root .amis-scope .antd-Panel-footerWrap{
66
- position: sticky;
67
- width: 100%;
68
- bottom: 0px;
69
- background: #ffffff
70
- }
71
-
72
60
  .amis-scope .antd-Select-option > label {
73
61
  display: block;
74
62
  min-width: 100px;
75
63
  }
76
64
 
77
- /* .steedos-related-listview.amis-scope .antd-Table-headToolbar{
78
- display: none;
79
- } */
80
-
81
- /* .steedos-listview.amis-scope .antd-Table-headToolbar{
82
- display: none;
83
- } */
84
-
85
- .antd-Crud-toolbar{
86
- margin-left: 1rem;
87
- margin-right: 1rem;
88
- }
89
-
90
- #__next .antd-Panel {
91
- box-shadow: none;
92
- }
93
-
94
65
  .is-inline .antd-Combo-items{
95
66
  justify-content: space-between !important;
96
67
  display: flex !important;
@@ -109,55 +80,10 @@ main {
109
80
  margin-top: 0 !important;
110
81
  }
111
82
 
112
- /*Table空状态高度调整*/
113
- .antd-Table-placeholder{
114
- height: 20px !important;
115
- }
116
-
117
- .antd-Table-placeholder-empty-icon.icon{
118
- height: 20px !important;
119
- }
120
-
121
83
  .steedos-listview .antd-List-toolbar{
122
84
  display: none;
123
85
  }
124
86
 
125
- /* .steedos-listview .antd-Crud-toolbar:first-child{
126
- display: none;
127
- } */
128
-
129
- .amis-scope .antd-Card{
130
- border-left: none !important;
131
- border-right: none !important;
132
- -o-border-image: none !important;
133
- border-image: none !important;
134
- border-bottom: none !important;
135
- }
136
-
137
- .amis-scope svg.icon {
138
- vertical-align: baseline;
139
- display: inline;
140
- }
141
-
142
- button.antd-Button--primary {
143
- color: #fff;
144
- border-color: #1890ff;
145
- background: #1890ff;
146
- /* background-color: var(--Button--primary-bg); */
147
- }
148
-
149
- #__next .antd-Table {
150
- margin-bottom: 0;
151
- }
152
-
153
- #__next .antd-Table-tr--even {
154
- background-color: #fcfdfe;
155
- }
156
-
157
- #__next .antd-Table-checkCell {
158
- border-right: 0;
159
- }
160
-
161
87
  body {
162
88
  font-family: -apple-system,BlinkMacSystemFont,Helvetica,Arial,Microsoft Yahei,SimHei;
163
89
  }
@@ -180,11 +106,6 @@ body {
180
106
  outline: 0;
181
107
  }
182
108
 
183
- svg.icon {
184
- display: inherit;
185
- }
186
-
187
-
188
109
  /* fix: https://github.com/baidu/amis/issues/5073 */
189
110
  .antd-CBGroup-toolbar .antd-CBGroup-toolbarConditionAdd .antd-ButtonGroup>.antd-Button:first-child {
190
111
  margin-right: 1.5rem;
@@ -201,6 +122,47 @@ svg.icon {
201
122
  overflow: auto;
202
123
  }
203
124
 
125
+
126
+ .antd-Nav-item.is-active {
127
+ box-shadow:var(--link-color) 4px 0 0 inset;
128
+ }
129
+
130
+ .ant-dropdown-menu {
131
+ border: 1px solid #e5e5e5;
132
+ border-radius: 0.25rem;
133
+ padding: 0.25rem 0;
134
+ box-shadow: 0 2px 3px 0 rgb(0 0 0 / 16%);
135
+ }
136
+
137
+ .ant-dropdown-menu-item {
138
+ padding: 0;
139
+ }
140
+
141
+ .ant-dropdown-menu-item .antd-Button.antd-Button--default{
142
+ border: none;
143
+ width: 100%;
144
+ text-align: left;
145
+ background: transparent;
146
+ background-color: transparent;
147
+ }
148
+
149
+ .ant-dropdown-menu-item .antd-Button--default:not(:disabled):not(.is-disabled):hover {
150
+ background: transparent;
151
+ background-color: transparent;
152
+ }
153
+
154
+
155
+ .ant-message{
156
+ z-index: 2600;
157
+ }
158
+
159
+ .ant-modal-root .amis-scope .antd-Panel-footerWrap{
160
+ position: sticky;
161
+ width: 100%;
162
+ bottom: 0px;
163
+ background: #ffffff
164
+ }
165
+
204
166
  /* @tailwind base; */
205
167
  .container {
206
168
  width: 100%
@@ -233,6 +195,9 @@ svg.icon {
233
195
  .visible {
234
196
  visibility: visible
235
197
  }
198
+ .collapse {
199
+ visibility: collapse
200
+ }
236
201
  .static {
237
202
  position: static
238
203
  }
@@ -260,6 +225,15 @@ svg.icon {
260
225
  .ml-1 {
261
226
  margin-left: 0.25rem
262
227
  }
228
+ .ml-4 {
229
+ margin-left: 1rem
230
+ }
231
+ .-ml-px {
232
+ margin-left: -1px
233
+ }
234
+ .mr-1 {
235
+ margin-right: 0.25rem
236
+ }
263
237
  .mb-3 {
264
238
  margin-bottom: 0.75rem
265
239
  }
@@ -284,18 +258,45 @@ svg.icon {
284
258
  .hidden {
285
259
  display: none
286
260
  }
261
+ .h-12 {
262
+ height: 3rem
263
+ }
264
+ .h-6 {
265
+ height: 1.5rem
266
+ }
267
+ .h-7 {
268
+ height: 1.75rem
269
+ }
287
270
  .h-4 {
288
271
  height: 1rem
289
272
  }
290
273
  .w-56 {
291
274
  width: 14rem
292
275
  }
276
+ .w-20 {
277
+ width: 5rem
278
+ }
279
+ .w-12 {
280
+ width: 3rem
281
+ }
282
+ .w-6 {
283
+ width: 1.5rem
284
+ }
285
+ .w-auto {
286
+ width: auto
287
+ }
293
288
  .w-4 {
294
289
  width: 1rem
295
290
  }
296
291
  .w-full {
297
292
  width: 100%
298
293
  }
294
+ .\!min-w-\[160px\] {
295
+ min-width: 160px !important
296
+ }
297
+ .flex-shrink-0 {
298
+ flex-shrink: 0
299
+ }
299
300
  @keyframes spin {
300
301
  to {
301
302
  transform: rotate(360deg)
@@ -330,6 +331,9 @@ svg.icon {
330
331
  .rounded-none {
331
332
  border-radius: 0px
332
333
  }
334
+ .rounded-md {
335
+ border-radius: 0.375rem
336
+ }
333
337
  .border {
334
338
  border-width: 1px
335
339
  }
@@ -368,6 +372,9 @@ svg.icon {
368
372
  --tw-bg-opacity: 1;
369
373
  background-color: rgb(243 244 246 / var(--tw-bg-opacity))
370
374
  }
375
+ .fill-slate-500 {
376
+ fill: #64748b
377
+ }
371
378
  .p-0 {
372
379
  padding: 0px
373
380
  }
@@ -407,13 +414,26 @@ svg.icon {
407
414
  .text-center {
408
415
  text-align: center
409
416
  }
417
+ .align-text-top {
418
+ vertical-align: text-top
419
+ }
410
420
  .text-xl {
411
421
  font-size: 1.25rem;
412
422
  line-height: 1.75rem
413
423
  }
424
+ .text-lg {
425
+ font-size: 1.125rem;
426
+ line-height: 1.75rem
427
+ }
428
+ .text-\[15px\] {
429
+ font-size: 15px
430
+ }
414
431
  .font-bold {
415
432
  font-weight: 700
416
433
  }
434
+ .font-medium {
435
+ font-weight: 500
436
+ }
417
437
  .leading-none {
418
438
  line-height: 1
419
439
  }
@@ -425,11 +445,27 @@ svg.icon {
425
445
  --tw-text-opacity: 1;
426
446
  color: rgb(0 0 0 / var(--tw-text-opacity))
427
447
  }
448
+ .text-blue-600 {
449
+ --tw-text-opacity: 1;
450
+ color: rgb(37 99 235 / var(--tw-text-opacity))
451
+ }
452
+ .text-slate-700 {
453
+ --tw-text-opacity: 1;
454
+ color: rgb(51 65 85 / var(--tw-text-opacity))
455
+ }
456
+ .no-underline {
457
+ text-decoration-line: none
458
+ }
428
459
  .shadow-none {
429
460
  --tw-shadow: 0 0 #0000;
430
461
  --tw-shadow-colored: 0 0 #0000;
431
462
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
432
463
  }
464
+ .shadow {
465
+ --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
466
+ --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
467
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
468
+ }
433
469
  .filter {
434
470
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
435
471
  }
@@ -548,6 +584,23 @@ svg.icon {
548
584
  overflow: hidden;
549
585
  }
550
586
 
587
+ .header-dropdown{
588
+ min-width: 24rem !important;
589
+ }
590
+
591
+ .header-dropdown> * {
592
+ background-color: #fff;
593
+ border-radius: 4px;
594
+ box-shadow: 0 6px 16px -8px rgb(0 0 0 / 8%), 0 9px 28px 0 rgb(0 0 0 / 5%), 0 12px 48px 16px rgb(0 0 0 / 3%);
595
+ }
596
+ @media screen and (max-width: 480px) {
597
+ .header-dropdown {
598
+ width: 100% !important;
599
+ }
600
+ .header-dropdown > * {
601
+ border-radius: 0 !important;
602
+ }
603
+ }
551
604
  @media (min-width: 767px) {
552
605
  .steedos-amis-form .antd-Collapse .antd-Form--normal,
553
606
  .steedos-amis-form .antd-Form--normal .antd-Tabs .antd-Tabs-content .antd-Tabs-pane .form-content {